diff --git a/.gn b/.gn index bbc0a8e..872350b 100644 --- a/.gn +++ b/.gn
@@ -84,69 +84,7 @@ #"//chrome/*", # Epic number of errors. "//chrome/app/*", "//chrome/app_shim/*", - - #"//chrome/browser/android/*", # Only vr has errors. https://crbug.com/871623 - "//chrome/browser/android/accessibility/*", - "//chrome/browser/android/autofill_assistant/*", - "//chrome/browser/android/bookmarks/*", - "//chrome/browser/android/bottombar/*", - "//chrome/browser/android/browserservices/*", - "//chrome/browser/android/browsing_data/*", - "//chrome/browser/android/component_updater/*", - "//chrome/browser/android/compositor/*", - "//chrome/browser/android/compositor/layer/*", - "//chrome/browser/android/compositor/resources/*", - "//chrome/browser/android/compositor/scene_layer/*", - "//chrome/browser/android/consent_auditor/*", - "//chrome/browser/android/content/*", - "//chrome/browser/android/contextualsearch/*", - "//chrome/browser/android/contextual_suggestions/*", - "//chrome/browser/android/cookies/*", - "//chrome/browser/android/crash/*", - "//chrome/browser/android/customtabs/*", - "//chrome/browser/android/digital_asset_links/*", - "//chrome/browser/android/document/*", - "//chrome/browser/android/dom_distiller/*", - "//chrome/browser/android/download/*", - "//chrome/browser/android/download/items/*", - "//chrome/browser/android/download/service/*", - "//chrome/browser/android/explore_sites/*", - "//chrome/browser/android/feature_engagement/*", - "//chrome/browser/android/feed/*", - "//chrome/browser/android/feedback/*", - "//chrome/browser/android/find_in_page/*", - "//chrome/browser/android/history/*", - "//chrome/browser/android/history_report/*", - "//chrome/browser/android/instantapps/*", - "//chrome/browser/android/locale/*", - "//chrome/browser/android/metrics/*", - "//chrome/browser/android/mojo/*", - "//chrome/browser/android/net/*", - "//chrome/browser/android/ntp/*", - "//chrome/browser/android/omnibox/*", - "//chrome/browser/android/oom_intervention/*", - "//chrome/browser/android/password_manager/*", - "//chrome/browser/android/payments/*", - "//chrome/browser/android/policy/*", - "//chrome/browser/android/preferences/*", - "//chrome/browser/android/preferences/autofill/*", - "//chrome/browser/android/profiles/*", - "//chrome/browser/android/proto/*", - "//chrome/browser/android/provider/*", - "//chrome/browser/android/rappor/*", - "//chrome/browser/android/rlz/*", - "//chrome/browser/android/search_permissions/*", - "//chrome/browser/android/sessions/*", - "//chrome/browser/android/signin/*", - "//chrome/browser/android/subresource_filter/*", - "//chrome/browser/android/tasks/*", - "//chrome/browser/android/thumbnail/*", - "//chrome/browser/android/usb/*", - "//chrome/browser/android/vr/arcore_device/*", - "//chrome/browser/android/webapk/*", - "//chrome/browser/android/webapps/*", - "//chrome/browser/android/widget/*", - + "//chrome/browser/android/*", "//chrome/browser/chromeos/*", "//chrome/browser/extensions/*", "//chrome/browser/resource_coordinator/*",
diff --git a/BUILD.gn b/BUILD.gn index 0cf62b2..627dfd08 100644 --- a/BUILD.gn +++ b/BUILD.gn
@@ -907,7 +907,7 @@ "//skia/public/interfaces:interfaces_js_data_deps", "//third_party/blink/public:blink_devtools_frontend_resources_files", "//third_party/blink/public:mojo_bindings_js_data_deps", - "//third_party/mesa:osmesa", + "//third_party/mesa_headers", "//tools/imagediff", ]
diff --git a/DEPS b/DEPS index 72e063c7..f1280aad 100644 --- a/DEPS +++ b/DEPS
@@ -105,7 +105,7 @@ # 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': 'f1a25c06cd1558efb20b88835302ffcbfdd47de1', + 'skia_revision': 'd4322a8630bcb1bc6fa86a7f545c2949240deb89', # Three lines of non-changing comments so that # the commit queue can handle CLs rolling V8 # and whatever else without interference from each other. @@ -117,7 +117,7 @@ # Three lines of non-changing comments so that # the commit queue can handle CLs rolling ANGLE # and whatever else without interference from each other. - 'angle_revision': '7ae70d8fb360a3defe4d6734687748a786d565ae', + 'angle_revision': '35bc74d6d139192dc0e70f9247d82c338da997ab', # Three lines of non-changing comments so that # the commit queue can handle CLs rolling build tools # and whatever else without interference from each other. @@ -129,7 +129,7 @@ # Three lines of non-changing comments so that # the commit queue can handle CLs rolling PDFium # and whatever else without interference from each other. - 'pdfium_revision': '0c7cf97859dd38f2cd94532cdd423abff7130853', + 'pdfium_revision': '692aeadfe32d9aa9516cfdf7705b979db548d974', # Three lines of non-changing comments so that # the commit queue can handle CLs rolling openmax_dl # and whatever else without interference from each other. @@ -157,7 +157,7 @@ # Three lines of non-changing comments so that # the commit queue can handle CLs rolling freetype # and whatever else without interference from each other. - 'freetype_revision': '578bcf103a12fb742cdb314565819011d1ac12a7', + 'freetype_revision': '96b5e500909cfce39ff78feabefd8063a229b951', # Three lines of non-changing comments so that # the commit queue can handle CLs rolling HarfBuzz # and whatever else without interference from each other. @@ -165,7 +165,7 @@ # Three lines of non-changing comments so that # the commit queue can handle CLs rolling catapult # and whatever else without interference from each other. - 'catapult_revision': '21cd5a309631b78d6deedc1ca56ca83ead9fbadd', + 'catapult_revision': '193e9338017c65bf30c81135723249c858a7a48c', # Three lines of non-changing comments so that # the commit queue can handle CLs rolling libFuzzer # and whatever else without interference from each other. @@ -552,7 +552,7 @@ # Build tools for Chrome OS. Note: This depends on third_party/pyelftools. 'src/third_party/chromite': { - 'url': Var('chromium_git') + '/chromiumos/chromite.git' + '@' + '62dc9deeea75fba1cb5087d8447177baf71f19f0', + 'url': Var('chromium_git') + '/chromiumos/chromite.git' + '@' + '6febc356717c587ccbdc4ce8fb06985df8e97e30', 'condition': 'checkout_linux', }, @@ -583,7 +583,7 @@ Var('chromium_git') + '/external/github.com/ChromeDevTools/devtools-node-modules' + '@' + Var('devtools_node_modules_revision'), 'src/third_party/dom_distiller_js/dist': - Var('chromium_git') + '/chromium/dom-distiller/dist.git' + '@' + '60b46718e28f553ab57e3d2bbda5b3b41456f417', + Var('chromium_git') + '/chromium/dom-distiller/dist.git' + '@' + 'bdf359537190956aabf32826bf33a0ff05b574ac', 'src/third_party/dynamicmodule': { 'url': Var('chromium_git') + '/dynamicmodule' + '@' + 'c6d37ea1003931dd44b78f936ca0882956aa3107', @@ -817,7 +817,7 @@ Var('chromium_git') + '/external/github.com/google/libprotobuf-mutator.git' + '@' + Var('libprotobuf-mutator'), 'src/third_party/libsrtp': - Var('chromium_git') + '/chromium/deps/libsrtp.git' + '@' + 'fc2345089a6b3c5aca9ecd2e1941871a78a13e9c', + Var('chromium_git') + '/chromium/deps/libsrtp.git' + '@' + '368abd6bb3091df2b354250818714f72f0692ca5', # Android Explicit Synchronization. 'src/third_party/libsync/src': { @@ -826,7 +826,7 @@ }, 'src/third_party/libvpx/source/libvpx': - Var('chromium_git') + '/webm/libvpx.git' + '@' + '6fd9d0244c7d8941ce0004bcd2efce5d6676bef5', + Var('chromium_git') + '/webm/libvpx.git' + '@' + 'b8642738c9851232c9bb1e1a22474953d3d367cf', 'src/third_party/libwebm/source': Var('chromium_git') + '/webm/libwebm.git' + '@' + '01c1d1d76f139345c442bfc8e61b4e1cba809059', @@ -850,9 +850,6 @@ 'condition': 'checkout_ios', }, - 'src/third_party/mesa/src': - Var('chromium_git') + '/chromium/deps/mesa.git' + '@' + '9d9b0710470f581cb5485b02b6acd8415cc093e8', - # GNU binutils assembler for x86-64. 'src/third_party/mingw-w64/mingw/bin': { 'url': Var('chromium_git') + '/native_client/deps/third_party/mingw-w64/mingw/bin.git' + '@' + '3cc8b140b883a9fe4986d12cfd46c16a093d3527', @@ -861,7 +858,7 @@ # Graphics buffer allocator for Chrome OS. 'src/third_party/minigbm/src': { - 'url': Var('chromium_git') + '/chromiumos/platform/minigbm.git' + '@' + '3cb5bbacc5c8a79105c868875222696f6b9d8296', + 'url': Var('chromium_git') + '/chromiumos/platform/minigbm.git' + '@' + 'ff1ecaf1014df4cb9ca36c5a270647a9934aaa99', 'condition': 'checkout_linux', }, @@ -930,7 +927,7 @@ }, 'src/third_party/perfetto': - Var('android_git') + '/platform/external/perfetto.git' + '@' + 'c500e36711d5f546b5b41695de1d6cf194207692', + Var('android_git') + '/platform/external/perfetto.git' + '@' + '5059c2eca07a16d22599e85a254364347cb6ea53', 'src/third_party/perl': { 'url': Var('chromium_git') + '/chromium/deps/perl.git' + '@' + 'ac0d98b5cee6c024b0cffeb4f8f45b6fc5ccdb78', @@ -1052,7 +1049,7 @@ Var('chromium_git') + '/external/khronosgroup/webgl.git' + '@' + '21dbf06b5aa6c7dc8cf56314d4a3f96f57956c53', 'src/third_party/webrtc': - Var('webrtc_git') + '/src.git' + '@' + 'f4cf64ec066953d7b175b124a7617557d0c7f27c', + Var('webrtc_git') + '/src.git' + '@' + 'b336c2784f5e1e6e2f59e62a18b2d0e21a555b41', 'src/third_party/xdg-utils': { 'url': Var('chromium_git') + '/chromium/deps/xdg-utils.git' + '@' + 'd80274d5869b17b8c9067a1022e4416ee7ed5e0d', @@ -1086,7 +1083,7 @@ Var('chromium_git') + '/v8/v8.git' + '@' + Var('v8_revision'), 'src-internal': { - 'url': 'https://chrome-internal.googlesource.com/chrome/src-internal.git@36668c6ef51c6ea84bfffc9d96137008eb2a6e0f', + 'url': 'https://chrome-internal.googlesource.com/chrome/src-internal.git@f727862b7b843cd9164854b15690cce172e95f49', 'condition': 'checkout_src_internal', },
diff --git a/WATCHLISTS b/WATCHLISTS index 81eeffd..94aaff8 100644 --- a/WATCHLISTS +++ b/WATCHLISTS
@@ -254,10 +254,12 @@ 'blink_bluetooth': { 'filepath': 'third_party/(WebKit|blink)/.*[Bb]luetooth' }, - 'blink_canvas2d': { + 'blink_canvas': { 'filepath': 'third_party/blink/renderer/core/html/canvas' \ - '|third_party/blink/renderer/modules/canvas2d' \ - '|third_party/blink/renderer/platform/graphics/canvas_2d', + '|third_party/blink/renderer/core/offscreencanvas' \ + '|third_party/blink/renderer/core/geometry' \ + '|third_party/blink/renderer/modules/canvas' \ + '|third_party/blink/renderer/platform/graphics/canvas', }, 'blink_client_hints': { 'filepath': 'third_party/blink/renderer/core/loader/accept_client_hints*' \ @@ -1831,8 +1833,8 @@ 'blink_bindings_serialization': ['jbroman+watch@chromium.org'], 'blink_bluetooth': ['mattreynolds+watch@chromium.org', 'ortuno+watch@chromium.org'], - 'blink_canvas2d': ['dongseong.hwang@intel.com', - 'fserb@chromium.org'], + 'blink_canvas': [ 'dongseong.hwang@intel.com', + 'fserb@chromium.org'], 'blink_client_hints': ['yoav@yoav.ws'], 'blink_clipboard': ['dcheng@chromium.org'], 'blink_common': ['jbroman+watch@chromium.org',
diff --git a/android_webview/BUILD.gn b/android_webview/BUILD.gn index 8f560ec7..7f7b749 100644 --- a/android_webview/BUILD.gn +++ b/android_webview/BUILD.gn
@@ -269,9 +269,9 @@ # webui/resources has way too many resources. The whitelist is trim this down # to a reasonable size - whitelist = rebase_path("ui/grit_resources_whitelist.txt") + whitelist = rebase_path("ui/grit_resources_whitelist.txt", root_build_dir) inputs = [ - whitelist, + "//android_webview/ui/grit_resources_whitelist.txt", ] grit_flags = [ "-w", @@ -292,9 +292,9 @@ source_is_generated = true # See :generate_webui_resources for an explanation of the whitelist - whitelist = rebase_path("ui/grit_resources_whitelist.txt") + whitelist = rebase_path("ui/grit_resources_whitelist.txt", root_build_dir) inputs = [ - whitelist, + "//android_webview/ui/grit_resources_whitelist.txt", ] grit_flags = [ "-w", @@ -317,9 +317,9 @@ # will never display most of them, so we try to limit the included # strings. This whitelist trims about 50% more than the compile-based # whitelist generated by :system_webview_pak_whitelist. - whitelist = rebase_path("ui/grit_strings_whitelist.txt") + whitelist = rebase_path("ui/grit_strings_whitelist.txt", root_build_dir) inputs = [ - whitelist, + "//android_webview/ui/grit_strings_whitelist.txt", ] grit_flags = [ "-w",
diff --git a/android_webview/browser/browser_view_renderer.cc b/android_webview/browser/browser_view_renderer.cc index 2f87ef1..c164315 100644 --- a/android_webview/browser/browser_view_renderer.cc +++ b/android_webview/browser/browser_view_renderer.cc
@@ -350,21 +350,17 @@ SkPictureRecorder recorder; SkCanvas* rec_canvas = recorder.beginRecording(width, height, NULL, 0); if (compositor_) { - gfx::Vector2dF scroll_offset = - content::IsUseZoomForDSFEnabled() - ? gfx::ScaleVector2d(scroll_offset_dip_, dip_scale_) - : scroll_offset_dip_; { // Reset scroll back to the origin, will go back to the old // value when scroll_reset is out of scope. - base::AutoReset<gfx::Vector2dF> scroll_reset(&scroll_offset_dip_, + base::AutoReset<gfx::Vector2dF> scroll_reset(&scroll_offset_unscaled_, gfx::Vector2dF()); compositor_->DidChangeRootLayerScrollOffset( - gfx::ScrollOffset(scroll_offset)); + gfx::ScrollOffset(scroll_offset_unscaled_)); CompositeSW(rec_canvas); } compositor_->DidChangeRootLayerScrollOffset( - gfx::ScrollOffset(scroll_offset)); + gfx::ScrollOffset(scroll_offset_unscaled_)); } return recorder.finishRecordingAsPicture(); } @@ -562,53 +558,53 @@ gfx::Vector2d BrowserViewRenderer::max_scroll_offset() const { DCHECK_GT(dip_scale_, 0.f); - return gfx::ToCeiledVector2d(gfx::ScaleVector2d( - max_scroll_offset_dip_, dip_scale_ * page_scale_factor_)); + float scale = content::IsUseZoomForDSFEnabled() + ? page_scale_factor_ + : dip_scale_ * page_scale_factor_; + return gfx::ToCeiledVector2d( + gfx::ScaleVector2d(max_scroll_offset_unscaled_, scale)); } void BrowserViewRenderer::ScrollTo(const gfx::Vector2d& scroll_offset) { gfx::Vector2d max_offset = max_scroll_offset(); - gfx::Vector2dF scroll_offset_dip; + gfx::Vector2dF scroll_offset_unscaled; // To preserve the invariant that scrolling to the maximum physical pixel // value also scrolls to the maximum dip pixel value we transform the physical // offset into the dip offset by using a proportion (instead of dividing by // dip_scale * page_scale_factor). if (max_offset.x()) { - scroll_offset_dip.set_x((scroll_offset.x() * max_scroll_offset_dip_.x()) / - max_offset.x()); + scroll_offset_unscaled.set_x( + (scroll_offset.x() * max_scroll_offset_unscaled_.x()) / max_offset.x()); } if (max_offset.y()) { - scroll_offset_dip.set_y((scroll_offset.y() * max_scroll_offset_dip_.y()) / - max_offset.y()); + scroll_offset_unscaled.set_y( + (scroll_offset.y() * max_scroll_offset_unscaled_.y()) / max_offset.y()); } - DCHECK_LE(0.f, scroll_offset_dip.x()); - DCHECK_LE(0.f, scroll_offset_dip.y()); - DCHECK(scroll_offset_dip.x() < max_scroll_offset_dip_.x() || - scroll_offset_dip.x() - max_scroll_offset_dip_.x() < kEpsilon) - << scroll_offset_dip.x() << " " << max_scroll_offset_dip_.x(); - DCHECK(scroll_offset_dip.y() < max_scroll_offset_dip_.y() || - scroll_offset_dip.y() - max_scroll_offset_dip_.y() < kEpsilon) - << scroll_offset_dip.y() << " " << max_scroll_offset_dip_.y(); + DCHECK_LE(0.f, scroll_offset_unscaled.x()); + DCHECK_LE(0.f, scroll_offset_unscaled.y()); + DCHECK(scroll_offset_unscaled.x() < max_scroll_offset_unscaled_.x() || + scroll_offset_unscaled.x() - max_scroll_offset_unscaled_.x() < + kEpsilon) + << scroll_offset_unscaled.x() << " " << max_scroll_offset_unscaled_.x(); + DCHECK(scroll_offset_unscaled.y() < max_scroll_offset_unscaled_.y() || + scroll_offset_unscaled.y() - max_scroll_offset_unscaled_.y() < + kEpsilon) + << scroll_offset_unscaled.y() << " " << max_scroll_offset_unscaled_.y(); - if (scroll_offset_dip_ == scroll_offset_dip) + if (scroll_offset_unscaled_ == scroll_offset_unscaled) return; - scroll_offset_dip_ = scroll_offset_dip; + scroll_offset_unscaled_ = scroll_offset_unscaled; - TRACE_EVENT_INSTANT2("android_webview", - "BrowserViewRenderer::ScrollTo", - TRACE_EVENT_SCOPE_THREAD, - "x", - scroll_offset_dip.x(), - "y", - scroll_offset_dip.y()); + TRACE_EVENT_INSTANT2("android_webview", "BrowserViewRenderer::ScrollTo", + TRACE_EVENT_SCOPE_THREAD, "x", + scroll_offset_unscaled.x(), "y", + scroll_offset_unscaled.y()); - if (compositor_) { - compositor_->DidChangeRootLayerScrollOffset(gfx::ScrollOffset( - content::IsUseZoomForDSFEnabled() ? scroll_offset - : scroll_offset_dip_)); - } + if (compositor_) + compositor_->DidChangeRootLayerScrollOffset( + gfx::ScrollOffset(scroll_offset_unscaled)); } void BrowserViewRenderer::DidUpdateContent( @@ -625,23 +621,23 @@ } void BrowserViewRenderer::SetTotalRootLayerScrollOffset( - const gfx::Vector2dF& scroll_offset_dip) { - if (scroll_offset_dip_ == scroll_offset_dip) + const gfx::Vector2dF& scroll_offset_unscaled) { + if (scroll_offset_unscaled_ == scroll_offset_unscaled) return; - scroll_offset_dip_ = scroll_offset_dip; + scroll_offset_unscaled_ = scroll_offset_unscaled; gfx::Vector2d max_offset = max_scroll_offset(); gfx::Vector2d scroll_offset; // For an explanation as to why this is done this way see the comment in // BrowserViewRenderer::ScrollTo. - if (max_scroll_offset_dip_.x()) { - scroll_offset.set_x((scroll_offset_dip.x() * max_offset.x()) / - max_scroll_offset_dip_.x()); + if (max_scroll_offset_unscaled_.x()) { + scroll_offset.set_x((scroll_offset_unscaled.x() * max_offset.x()) / + max_scroll_offset_unscaled_.x()); } - if (max_scroll_offset_dip_.y()) { - scroll_offset.set_y((scroll_offset_dip.y() * max_offset.y()) / - max_scroll_offset_dip_.y()); + if (max_scroll_offset_unscaled_.y()) { + scroll_offset.set_y((scroll_offset_unscaled.y() * max_offset.y()) / + max_scroll_offset_unscaled_.y()); } DCHECK_LE(0, scroll_offset.x()); @@ -663,34 +659,27 @@ if (compositor != compositor_) return; - gfx::Vector2dF total_scroll_offset_dip = total_scroll_offset; - gfx::Vector2dF max_scroll_offset_dip = total_max_scroll_offset; gfx::SizeF scrollable_size_dip = scrollable_size; - if (content::IsUseZoomForDSFEnabled()) { - total_scroll_offset_dip.Scale(1 / dip_scale_); - max_scroll_offset_dip.Scale(1 / dip_scale_); + if (content::IsUseZoomForDSFEnabled()) scrollable_size_dip.Scale(1 / dip_scale_); - } TRACE_EVENT_INSTANT1( - "android_webview", - "BrowserViewRenderer::UpdateRootLayerState", - TRACE_EVENT_SCOPE_THREAD, - "state", - RootLayerStateAsValue(total_scroll_offset_dip, scrollable_size_dip)); + "android_webview", "BrowserViewRenderer::UpdateRootLayerState", + TRACE_EVENT_SCOPE_THREAD, "state", + RootLayerStateAsValue(total_scroll_offset, scrollable_size_dip)); - DCHECK_GE(max_scroll_offset_dip.x(), 0.f); - DCHECK_GE(max_scroll_offset_dip.y(), 0.f); + DCHECK_GE(total_max_scroll_offset.x(), 0.f); + DCHECK_GE(total_max_scroll_offset.y(), 0.f); DCHECK_GT(page_scale_factor, 0.f); // SetDipScale should have been called at least once before this is called. DCHECK_GT(dip_scale_, 0.f); - if (max_scroll_offset_dip_ != max_scroll_offset_dip || + if (max_scroll_offset_unscaled_ != total_max_scroll_offset || scrollable_size_dip_ != scrollable_size_dip || page_scale_factor_ != page_scale_factor || min_page_scale_factor_ != min_page_scale_factor || max_page_scale_factor_ != max_page_scale_factor) { - max_scroll_offset_dip_ = max_scroll_offset_dip; + max_scroll_offset_unscaled_ = total_max_scroll_offset; scrollable_size_dip_ = scrollable_size_dip; page_scale_factor_ = page_scale_factor; min_page_scale_factor_ = min_page_scale_factor; @@ -700,21 +689,23 @@ page_scale_factor, min_page_scale_factor, max_page_scale_factor); } - SetTotalRootLayerScrollOffset(total_scroll_offset_dip); + SetTotalRootLayerScrollOffset(total_scroll_offset); } std::unique_ptr<base::trace_event::ConvertableToTraceFormat> BrowserViewRenderer::RootLayerStateAsValue( - const gfx::Vector2dF& total_scroll_offset_dip, + const gfx::Vector2dF& total_scroll_offset, const gfx::SizeF& scrollable_size_dip) { std::unique_ptr<base::trace_event::TracedValue> state( new base::trace_event::TracedValue()); - state->SetDouble("total_scroll_offset_dip.x", total_scroll_offset_dip.x()); - state->SetDouble("total_scroll_offset_dip.y", total_scroll_offset_dip.y()); + state->SetDouble("total_scroll_offset.x", total_scroll_offset.x()); + state->SetDouble("total_scroll_offset.y", total_scroll_offset.y()); - state->SetDouble("max_scroll_offset_dip.x", max_scroll_offset_dip_.x()); - state->SetDouble("max_scroll_offset_dip.y", max_scroll_offset_dip_.y()); + state->SetDouble("max_scroll_offset_unscaled.x", + max_scroll_offset_unscaled_.x()); + state->SetDouble("max_scroll_offset_unscaled.y", + max_scroll_offset_unscaled_.y()); state->SetDouble("scrollable_size_dip.width", scrollable_size_dip.width()); state->SetDouble("scrollable_size_dip.height", scrollable_size_dip.height()); @@ -777,8 +768,8 @@ base::StringAppendF(&str, "global visible rect: %s ", last_on_draw_global_visible_rect_.ToString().c_str()); - base::StringAppendF( - &str, "scroll_offset_dip: %s ", scroll_offset_dip_.ToString().c_str()); + base::StringAppendF(&str, "scroll_offset_unscaled: %s ", + scroll_offset_unscaled_.ToString().c_str()); base::StringAppendF(&str, "overscroll_rounding_error_: %s ", overscroll_rounding_error_.ToString().c_str());
diff --git a/android_webview/browser/browser_view_renderer.h b/android_webview/browser/browser_view_renderer.h index bfb23dd6..06052ee2 100644 --- a/android_webview/browser/browser_view_renderer.h +++ b/android_webview/browser/browser_view_renderer.h
@@ -100,7 +100,8 @@ float dip_scale() const { return dip_scale_; } float page_scale_factor() const { return page_scale_factor_; } - // Set the root layer scroll offset to |new_value|. + // Set the root layer scroll offset to |new_value|. The |new_value| here is in + // physical pixel. void ScrollTo(const gfx::Vector2d& new_value); // Android views hierarchy gluing. @@ -224,11 +225,13 @@ gfx::SizeF scrollable_size_dip_; - // TODO(miletus): Make scroll_offset_dip_ a gfx::ScrollOffset. - gfx::Vector2dF scroll_offset_dip_; + // When zoom-for-dsf enabled |max_scroll_offset_unscaled_| and + // |scroll_offset_unscaled_| is in physical pixel; otherwise, they are in dip + // TODO(miletus): Make scroll_offset_unscaled_ a gfx::ScrollOffset. + gfx::Vector2dF scroll_offset_unscaled_; - // TODO(miletus): Make max_scroll_offset_dip_ a gfx::ScrollOffset. - gfx::Vector2dF max_scroll_offset_dip_; + // TODO(miletus): Make max_scroll_offset_unscaled_ a gfx::ScrollOffset. + gfx::Vector2dF max_scroll_offset_unscaled_; // Used to prevent rounding errors from accumulating enough to generate // visible skew (especially noticeable when scrolling up and down in the same
diff --git a/android_webview/glue/generate_resource_rewriter.gni b/android_webview/glue/generate_resource_rewriter.gni index 59581df2..f867477 100644 --- a/android_webview/glue/generate_resource_rewriter.gni +++ b/android_webview/glue/generate_resource_rewriter.gni
@@ -39,14 +39,14 @@ deps = invoker.deps + [ ":${_build_config_target_name}" ] script = "//build/android/gyp/generate_resource_rewriter.py" - _rebased_build_config = rebase_path(_build_config) + _rebased_build_config = rebase_path(_build_config, root_build_dir) args = [ "--package-name", invoker.package_name, "--dep-packages", "@FileArg($_rebased_build_config:resources:extra_package_names)", "--srcjar", - rebase_path(_srcjar), + rebase_path(_srcjar, root_build_dir), ] outputs = [ _srcjar,
diff --git a/android_webview/renderer/aw_render_view_ext.cc b/android_webview/renderer/aw_render_view_ext.cc index a013738..b62510b 100644 --- a/android_webview/renderer/aw_render_view_ext.cc +++ b/android_webview/renderer/aw_render_view_ext.cc
@@ -26,7 +26,8 @@ } void AwRenderViewExt::DidUpdateMainFrameLayout() { - UpdateContentsSize(); + // The size may have changed. + needs_contents_size_update_ = true; } void AwRenderViewExt::OnDestruct() { @@ -47,6 +48,10 @@ if (!webview || !main_render_frame) return; + if (!needs_contents_size_update_) + return; + needs_contents_size_update_ = false; + gfx::Size contents_size = main_render_frame->GetWebFrame()->DocumentSize(); // Fall back to contentsPreferredMinimumSize if the mainFrame is reporting a
diff --git a/android_webview/renderer/aw_render_view_ext.h b/android_webview/renderer/aw_render_view_ext.h index 110af566..fc1a7c66 100644 --- a/android_webview/renderer/aw_render_view_ext.h +++ b/android_webview/renderer/aw_render_view_ext.h
@@ -31,6 +31,10 @@ gfx::Size last_sent_contents_size_; + // Whether the contents size may have changed and |UpdateContentsSize| needs + // to be called. + bool needs_contents_size_update_ = true; + DISALLOW_COPY_AND_ASSIGN(AwRenderViewExt); };
diff --git a/ash/BUILD.gn b/ash/BUILD.gn index d885feb..59daa60d 100644 --- a/ash/BUILD.gn +++ b/ash/BUILD.gn
@@ -86,6 +86,7 @@ "assistant/ui/assistant_container_view.h", "assistant/ui/assistant_main_view.h", "assistant/ui/assistant_mini_view.h", + "assistant/ui/assistant_scroll_view.h", "assistant/ui/assistant_web_view.h", "assistant/ui/caption_bar.h", "assistant/ui/dialog_plate/action_view.h", @@ -748,6 +749,7 @@ "assistant/ui/assistant_container_view.cc", "assistant/ui/assistant_main_view.cc", "assistant/ui/assistant_mini_view.cc", + "assistant/ui/assistant_scroll_view.cc", "assistant/ui/assistant_web_view.cc", "assistant/ui/caption_bar.cc", "assistant/ui/dialog_plate/action_view.cc", @@ -1797,6 +1799,7 @@ "screen_util_unittest.cc", "session/session_controller_unittest.cc", "shelf/app_list_button_unittest.cc", + "shelf/app_list_shelf_item_delegate_unittest.cc", "shelf/back_button_unittest.cc", "shelf/login_shelf_view_unittest.cc", "shelf/shelf_application_menu_model_unittest.cc",
diff --git a/ash/PRESUBMIT.py b/ash/PRESUBMIT.py new file mode 100644 index 0000000..f04a6ac --- /dev/null +++ b/ash/PRESUBMIT.py
@@ -0,0 +1,76 @@ +# 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. + +"""Presubmit script for ash (Chrome OS system UI). + +See http://dev.chromium.org/developers/how-tos/depottools/presubmit-scripts +for more details about the presubmit API built into depot_tools. +""" + + +# Tuples of (func_name, message, excluded_paths). +_BANNED_FUNCTIONS = ( + ( + r'aura::Env::GetInstance', + ( + 'aura::Env::GetInstance is banned in //ash because it will return the', + 'wrong aura::Env in SingleProcessMash mode. See //ash/README.md.', + 'Use ash::Shell::Get()->aura_env() instead.' + ), + ( + # Components are mini-apps that run in their own process and only have + # a single aura::Env. + r'^ash/components/', + + # ash_shell is a separate test binary. + r'^ash/shell/', + ) + ), +) + + +def _CheckBannedFunctions(input_api, output_api): + """Make sure that banned functions are not used.""" + errors = [] + + def IsExcludedFile(affected_file, excluded_paths): + local_path = affected_file.LocalPath() + for item in excluded_paths: + if input_api.re.match(item, local_path): + return True + return False + + def CheckForMatch(affected_file, line_num, line, func_name, message): + if func_name in line: + errors.append(' %s:%d:' % (affected_file.LocalPath(), line_num)) + for message_line in message: + errors.append(' %s' % message_line) + + file_filter = lambda f: f.LocalPath().endswith(('.cc', '.h')) + for f in input_api.AffectedFiles(file_filter=file_filter): + for line_num, line in f.ChangedContents(): + for func_name, message, excluded_paths in _BANNED_FUNCTIONS: + if IsExcludedFile(f, excluded_paths): + continue + CheckForMatch(f, line_num, line, func_name, message) + + result = [] + if (errors): + result.append(output_api.PresubmitError( + 'Banned functions were used.\n' + '\n'.join(errors))) + return result + + +def CheckChange(input_api, output_api): + results = [] + results += _CheckBannedFunctions(input_api, output_api) + return results + + +def CheckChangeOnUpload(input_api, output_api): + return CheckChange(input_api, output_api) + + +def CheckChangeOnCommit(input_api, output_api): + return CheckChange(input_api, output_api)
diff --git a/ash/accelerators/accelerator_table_unittest.cc b/ash/accelerators/accelerator_table_unittest.cc index 5c7002f..60d264c9 100644 --- a/ash/accelerators/accelerator_table_unittest.cc +++ b/ash/accelerators/accelerator_table_unittest.cc
@@ -17,10 +17,10 @@ namespace { // The number of non-Search-based accelerators. -constexpr int kNonSearchAcceleratorsNum = 89; +constexpr int kNonSearchAcceleratorsNum = 88; // The hash of non-Search-based accelerators. See HashAcceleratorData(). constexpr char kNonSearchAcceleratorsHash[] = - "1da4d0dbc648ec0f008837da1066599e"; + "3543d8dba556b432db56a383e35df6fb"; struct Cmp { bool operator()(const AcceleratorData& lhs, const AcceleratorData& rhs) {
diff --git a/ash/app_list/BUILD.gn b/ash/app_list/BUILD.gn index 50eaebd..685a736 100644 --- a/ash/app_list/BUILD.gn +++ b/ash/app_list/BUILD.gn
@@ -229,7 +229,7 @@ ] data_deps = [ - "//third_party/mesa:osmesa", + "//third_party/mesa_headers", "//ui/resources:ui_test_pak_data", ] }
diff --git a/ash/app_list/views/app_list_folder_view.cc b/ash/app_list/views/app_list_folder_view.cc index 4109a70..8fcc88d 100644 --- a/ash/app_list/views/app_list_folder_view.cc +++ b/ash/app_list/views/app_list_folder_view.cc
@@ -585,7 +585,7 @@ preferred_bounds_ = gfx::Rect(GetPreferredSize()); preferred_bounds_ += (icon_bounds_in_container.CenterPoint() - preferred_bounds_.CenterPoint()); - preferred_bounds_.AdjustToFit(container_view_->GetContentsBounds()); + preferred_bounds_.AdjustToFit(container_view_->apps_grid_view()->bounds()); auto* const keyboard_controller = keyboard::KeyboardController::Get(); if (keyboard_controller->enabled()) {
diff --git a/ash/app_list/views/app_list_view_unittest.cc b/ash/app_list/views/app_list_view_unittest.cc index bd74c29..041a9b7 100644 --- a/ash/app_list/views/app_list_view_unittest.cc +++ b/ash/app_list/views/app_list_view_unittest.cc
@@ -48,7 +48,6 @@ #include "base/test/icu_test_util.h" #include "base/test/scoped_feature_list.h" #include "testing/gtest/include/gtest/gtest.h" -#include "ui/aura/env.h" #include "ui/base/models/simple_menu_model.h" #include "ui/chromeos/search_box/search_box_constants.h" #include "ui/compositor/layer_animator.h" @@ -255,19 +254,12 @@ } views::ViewsTestBase::SetUp(); - - // Creates AnswerCardContentsRegistry and registers a fake answer card - // view for classic ash. Otherwise, the answer card view will not be - // created. Revisit this when the test runs in mash. - if (aura::Env::GetInstanceDontCreate() && - aura::Env::GetInstanceDontCreate()->mode() == aura::Env::Mode::LOCAL) { - answer_card_contents_registry_ = - std::make_unique<AnswerCardContentsRegistry>(); - fake_answer_card_view_ = std::make_unique<views::View>(); - fake_answer_card_view_->set_owned_by_client(); - fake_answer_card_token_ = answer_card_contents_registry_->Register( - fake_answer_card_view_.get()); - } + answer_card_contents_registry_ = + std::make_unique<AnswerCardContentsRegistry>(); + fake_answer_card_view_ = std::make_unique<views::View>(); + fake_answer_card_view_->set_owned_by_client(); + fake_answer_card_token_ = + answer_card_contents_registry_->Register(fake_answer_card_view_.get()); // Initialize app list view. delegate_ = std::make_unique<AppListTestViewDelegate>();
diff --git a/ash/app_list/views/suggestion_chip_view.cc b/ash/app_list/views/suggestion_chip_view.cc index 7ec2ecd..f05e3b81 100644 --- a/ash/app_list/views/suggestion_chip_view.cc +++ b/ash/app_list/views/suggestion_chip_view.cc
@@ -118,7 +118,7 @@ : kAppListTextColor); text_view_->SetFontList( assistant_style_ - ? ash::assistant::ui::GetDefaultFontList().DeriveWithSizeDelta(2) + ? ash::assistant::ui::GetDefaultFontList().DeriveWithSizeDelta(1) : AppListConfig::instance().app_title_font()); SetText(params.text); AddChildView(text_view_);
diff --git a/ash/ash_strings.grd b/ash/ash_strings.grd index ab1732e..0a89b243 100644 --- a/ash/ash_strings.grd +++ b/ash/ash_strings.grd
@@ -1484,13 +1484,13 @@ Managed by <ph name="DOMAIN">$1<ex>yourdomain.com</ex></ph> </message> <message name="IDS_ASH_LOGIN_PUBLIC_ACCOUNT_MONITORING_WARNING" desc="Template for text shown in the public account user pod, informing the user that this is a public, managed account."> - The device manager may be able to monitor your activity. + The administrator of this device has access to all activity, including passwords and communications. </message> <message name="IDS_ASH_LOGIN_PUBLIC_ACCOUNT_SIGNOUT_REMINDER" desc="Text shown in the public account user pod, reminding the user to log out."> - Your session will be cleared when you sign out. <ph name="LEARN_MORE">$1<ex>Learn more</ex></ph> + Your internet session will be cleared when you sign out. <ph name="LEARN_MORE">$1<ex>Learn more</ex></ph> </message> <message name="IDS_ASH_LOGIN_PUBLIC_SESSION_LANGUAGE_AND_INPUT" desc="Link in public session pod that shows a section which allows the user to change the UI language and keyboard layout."> - Choose language and input + Choose language and keyboard </message> <message name="IDS_ASH_LOGIN_LANGUAGE_SELECTION_SELECT" desc="Label for language selection dropdown"> Set your language
diff --git a/ash/assistant/assistant_controller.cc b/ash/assistant/assistant_controller.cc index 213e384b..162fd1d9 100644 --- a/ash/assistant/assistant_controller.cc +++ b/ash/assistant/assistant_controller.cc
@@ -144,6 +144,12 @@ web_contents_manager_->ReleaseAllWebContents(id_tokens); } +void AssistantController::NavigateWebContentsBack( + const base::UnguessableToken& id_token, + mojom::WebContentsManager::NavigateWebContentsBackCallback callback) { + web_contents_manager_->NavigateWebContentsBack(id_token, std::move(callback)); +} + void AssistantController::DownloadImage( const GURL& url, mojom::AssistantImageDownloader::DownloadCallback callback) {
diff --git a/ash/assistant/assistant_controller.h b/ash/assistant/assistant_controller.h index b3bbafa..7ed56b5 100644 --- a/ash/assistant/assistant_controller.h +++ b/ash/assistant/assistant_controller.h
@@ -73,6 +73,13 @@ // |id_token_list|. void ReleaseWebContents(const std::vector<base::UnguessableToken>& id_tokens); + // Navigates the WebContents uniquely identified by |id_token| back relative + // to the current history entry. The supplied |callback| will run specifying + // true if navigation occurred, false otherwise. + void NavigateWebContentsBack( + const base::UnguessableToken& id_token, + mojom::WebContentsManager::NavigateWebContentsBackCallback callback); + // Downloads the image found at the specified |url|. On completion, the // supplied |callback| will be run with the downloaded image. If the download // attempt is unsuccessful, a NULL image is returned.
diff --git a/ash/assistant/assistant_interaction_controller.cc b/ash/assistant/assistant_interaction_controller.cc index f13df87..9d67f779d 100644 --- a/ash/assistant/assistant_interaction_controller.cc +++ b/ash/assistant/assistant_interaction_controller.cc
@@ -166,7 +166,7 @@ // this, we temporarily pend an empty text query to commit until we can do // development to expose something more meaningful. if (assistant_interaction_model_.pending_query().type() == - AssistantQueryType::kEmpty) { + AssistantQueryType::kNull) { assistant_interaction_model_.SetPendingQuery( std::make_unique<AssistantTextQuery>()); }
diff --git a/ash/assistant/model/assistant_interaction_model.cc b/ash/assistant/model/assistant_interaction_model.cc index 672275d..d244c53 100644 --- a/ash/assistant/model/assistant_interaction_model.cc +++ b/ash/assistant/model/assistant_interaction_model.cc
@@ -11,8 +11,8 @@ namespace ash { AssistantInteractionModel::AssistantInteractionModel() - : committed_query_(std::make_unique<AssistantEmptyQuery>()), - pending_query_(std::make_unique<AssistantEmptyQuery>()) {} + : committed_query_(std::make_unique<AssistantNullQuery>()), + pending_query_(std::make_unique<AssistantNullQuery>()) {} AssistantInteractionModel::~AssistantInteractionModel() = default; @@ -70,35 +70,35 @@ } void AssistantInteractionModel::ClearCommittedQuery() { - if (committed_query_->type() == AssistantQueryType::kEmpty) + if (committed_query_->type() == AssistantQueryType::kNull) return; - committed_query_ = std::make_unique<AssistantEmptyQuery>(); + committed_query_ = std::make_unique<AssistantNullQuery>(); NotifyCommittedQueryCleared(); } void AssistantInteractionModel::SetPendingQuery( std::unique_ptr<AssistantQuery> pending_query) { - DCHECK(pending_query->type() != AssistantQueryType::kEmpty); + DCHECK(pending_query->type() != AssistantQueryType::kNull); pending_query_ = std::move(pending_query); NotifyPendingQueryChanged(); } void AssistantInteractionModel::CommitPendingQuery() { - DCHECK_NE(pending_query_->type(), AssistantQueryType::kEmpty); + DCHECK_NE(pending_query_->type(), AssistantQueryType::kNull); committed_query_ = std::move(pending_query_); - pending_query_ = std::make_unique<AssistantEmptyQuery>(); + pending_query_ = std::make_unique<AssistantNullQuery>(); NotifyCommittedQueryChanged(); NotifyPendingQueryCleared(); } void AssistantInteractionModel::ClearPendingQuery() { - if (pending_query_->type() == AssistantQueryType::kEmpty) + if (pending_query_->type() == AssistantQueryType::kNull) return; - pending_query_ = std::make_unique<AssistantEmptyQuery>(); + pending_query_ = std::make_unique<AssistantNullQuery>(); NotifyPendingQueryCleared(); }
diff --git a/ash/assistant/model/assistant_query.cc b/ash/assistant/model/assistant_query.cc index 2ffbe56..3aa720a 100644 --- a/ash/assistant/model/assistant_query.cc +++ b/ash/assistant/model/assistant_query.cc
@@ -6,9 +6,9 @@ namespace ash { -// AssistantEmptyQuery --------------------------------------------------------- +// AssistantNullQuery ---------------------------------------------------------- -bool AssistantEmptyQuery::Empty() const { +bool AssistantNullQuery::Empty() const { return true; }
diff --git a/ash/assistant/model/assistant_query.h b/ash/assistant/model/assistant_query.h index 08f76c2a7..e0629de 100644 --- a/ash/assistant/model/assistant_query.h +++ b/ash/assistant/model/assistant_query.h
@@ -13,10 +13,9 @@ // AssistantQueryType ---------------------------------------------------------- -// TODO(dmblack): Rename kEmpty to kNull. // Defines possible types of an Assistant query. enum class AssistantQueryType { - kEmpty, // See AssistantEmptyQuery. + kNull, // See AssistantNullQuery. kText, // See AssistantTextQuery. kVoice, // See AssistantVoiceQuery. }; @@ -43,21 +42,20 @@ DISALLOW_COPY_AND_ASSIGN(AssistantQuery); }; -// AssistantEmptyQuery --------------------------------------------------------- +// AssistantNullQuery ---------------------------------------------------------- -// TODO(dmblack): Rename to AssistantNullQuery. -// An empty Assistant query used to signify the absence of an Assistant query. -class AssistantEmptyQuery : public AssistantQuery { +// An null Assistant query used to signify the absence of an Assistant query. +class AssistantNullQuery : public AssistantQuery { public: - AssistantEmptyQuery() : AssistantQuery(AssistantQueryType::kEmpty) {} + AssistantNullQuery() : AssistantQuery(AssistantQueryType::kNull) {} - ~AssistantEmptyQuery() override = default; + ~AssistantNullQuery() override = default; // AssistantQuery: bool Empty() const override; private: - DISALLOW_COPY_AND_ASSIGN(AssistantEmptyQuery); + DISALLOW_COPY_AND_ASSIGN(AssistantNullQuery); }; // AssistantTextQuery ----------------------------------------------------------
diff --git a/ash/assistant/ui/assistant_container_view.cc b/ash/assistant/ui/assistant_container_view.cc index 0741339..d8748fc8d 100644 --- a/ash/assistant/ui/assistant_container_view.cc +++ b/ash/assistant/ui/assistant_container_view.cc
@@ -11,12 +11,14 @@ #include "ash/assistant/model/assistant_ui_model.h" #include "ash/assistant/ui/assistant_main_view.h" #include "ash/assistant/ui/assistant_mini_view.h" +#include "ash/assistant/ui/assistant_ui_constants.h" #include "ash/assistant/ui/assistant_web_view.h" #include "ash/shell.h" #include "base/strings/utf_string_conversions.h" #include "ui/display/display.h" #include "ui/display/screen.h" -#include "ui/views/bubble/bubble_dialog_delegate.h" +#include "ui/gfx/animation/slide_animation.h" +#include "ui/gfx/animation/tween.h" #include "ui/views/bubble/bubble_frame_view.h" #include "ui/views/layout/layout_manager.h" #include "ui/views/view.h" @@ -31,6 +33,9 @@ constexpr int kCornerRadiusDip = 20; constexpr int kMarginDip = 8; +// Animation. +constexpr int kResizeAnimationDurationMs = 250; + // AssistantContainerLayout ---------------------------------------------------- // The AssistantContainerLayout calculates preferred size to fit the largest @@ -110,8 +115,7 @@ AssistantController* assistant_controller) : assistant_controller_(assistant_controller) { set_accept_events(true); - SetAnchor(); - set_arrow(views::BubbleBorder::Arrow::BOTTOM_CENTER); + SetAnchor(nullptr); set_close_on_deactivate(false); set_color(kBackgroundColor); set_margins(gfx::Insets()); @@ -126,9 +130,11 @@ // The AssistantController owns the view hierarchy to which // AssistantContainerView belongs so is guaranteed to outlive it. assistant_controller_->ui_controller()->AddModelObserver(this); + display::Screen::GetScreen()->AddObserver(this); } AssistantContainerView::~AssistantContainerView() { + display::Screen::GetScreen()->RemoveObserver(this); assistant_controller_->ui_controller()->RemoveModelObserver(this); } @@ -137,10 +143,30 @@ } void AssistantContainerView::PreferredSizeChanged() { - views::View::PreferredSizeChanged(); + if (!GetWidget()) + return; - if (GetWidget()) - SizeToContents(); + const bool visible = + assistant_controller_->ui_controller()->model()->visible(); + + // When visible with the motion spec enabled, size changes are animated. + if (visible && assistant::ui::kIsMotionSpecEnabled) { + resize_animation_ = std::make_unique<gfx::SlideAnimation>(this); + resize_animation_->SetSlideDuration(kResizeAnimationDurationMs); + + // Cache start and end animation values. + resize_start_ = gfx::SizeF(size()); + resize_end_ = gfx::SizeF(GetPreferredSize()); + + // Start animation. + resize_animation_->Show(); + return; + } + + // Clear any existing animation. + resize_animation_.reset(); + + SizeToContents(); } int AssistantContainerView::GetDialogButtons() const { @@ -170,6 +196,11 @@ void AssistantContainerView::Init() { SetLayoutManager(std::make_unique<AssistantContainerLayout>()); + // We need to paint to our own layer so we can clip child layers. + SetPaintToLayer(); + layer()->SetFillsBoundsOpaquely(false); + layer()->SetMasksToBounds(true); + // Main view. assistant_main_view_ = new AssistantMainView(assistant_controller_); AddChildView(assistant_main_view_); @@ -207,11 +238,12 @@ } } -// TODO(dmblack): Handle dynamic re-anchoring due to shelf repositioning, etc. -void AssistantContainerView::SetAnchor() { +void AssistantContainerView::SetAnchor(aura::Window* root_window) { + if (!root_window) + root_window = Shell::Get()->GetRootWindowForNewWindows(); // Anchor to the display matching where new windows will be opened. display::Display display = display::Screen::GetScreen()->GetDisplayMatching( - Shell::Get()->GetRootWindowForNewWindows()->GetBoundsInScreen()); + root_window->GetBoundsInScreen()); // Anchor to the bottom center of the work area. gfx::Rect work_area = display.work_area(); @@ -219,6 +251,7 @@ work_area.width(), 0); SetAnchorRect(anchor); + set_arrow(views::BubbleBorder::Arrow::BOTTOM_CENTER); } void AssistantContainerView::OnUiModeChanged(AssistantUiMode ui_mode) { @@ -242,4 +275,41 @@ RequestFocus(); } +// TODO(dmblack): Improve performance of this animation using transformations +// for GPU acceleration. Lower spec hardware may struggle with numerous layouts. +void AssistantContainerView::AnimationProgressed( + const gfx::Animation* animation) { + if (!GetWidget()) + return; + + // Retrieve current bounds. + gfx::Rect bounds = GetWidget()->GetWindowBoundsInScreen(); + + // Our view is horizontally centered and bottom aligned. As such, we should + // retain the same |bottom| and |center_x| position after resizing. + const int bottom = bounds.bottom(); + const int center_x = bounds.CenterPoint().x(); + + // Interpolate size at our current animation value. + const gfx::SizeF size = gfx::Tween::SizeValueBetween( + animation->GetCurrentValue(), resize_start_, resize_end_); + + // Use our interpolated size. + bounds.set_size(gfx::Size(size.width(), size.height())); + + // Maintain our original |bottom| and |center_x| positions. + bounds.set_x(center_x - (bounds.width() / 2)); + bounds.set_y(bottom - bounds.height()); + + GetWidget()->SetBounds(bounds); +} + +void AssistantContainerView::OnDisplayMetricsChanged( + const display::Display& display, + uint32_t changed_metrics) { + aura::Window* root_window = GetWidget()->GetNativeWindow()->GetRootWindow(); + if (root_window == Shell::Get()->GetRootWindowForDisplayId(display.id())) + SetAnchor(root_window); +} + } // namespace ash
diff --git a/ash/assistant/ui/assistant_container_view.h b/ash/assistant/ui/assistant_container_view.h index 29dd49f4..b5d1b80 100644 --- a/ash/assistant/ui/assistant_container_view.h +++ b/ash/assistant/ui/assistant_container_view.h
@@ -7,7 +7,17 @@ #include "ash/assistant/model/assistant_ui_model_observer.h" #include "base/macros.h" -#include "ui/views/bubble/bubble_dialog_delegate.h" +#include "ui/display/display_observer.h" +#include "ui/gfx/animation/animation_delegate.h" +#include "ui/views/bubble/bubble_dialog_delegate_view.h" + +namespace gfx { +class SlideAnimation; +} // namespace gfx + +namespace aura { +class Window; +} // namespace aura namespace ash { @@ -17,7 +27,9 @@ class AssistantWebView; class AssistantContainerView : public views::BubbleDialogDelegateView, - public AssistantUiModelObserver { + public AssistantUiModelObserver, + public display::DisplayObserver, + public gfx::AnimationDelegate { public: explicit AssistantContainerView(AssistantController* assistant_controller); ~AssistantContainerView() override; @@ -35,8 +47,21 @@ // AssistantUiModelObserver: void OnUiModeChanged(AssistantUiMode ui_mode) override; + // gfx::AnimationDelegate: + void AnimationProgressed(const gfx::Animation* animation) override; + + // display::DisplayObserver: + void OnWillProcessDisplayChanges() override {} + void OnDidProcessDisplayChanges() override {} + void OnDisplayAdded(const display::Display& new_display) override {} + void OnDisplayRemoved(const display::Display& old_display) override {} + void OnDisplayMetricsChanged(const display::Display& display, + uint32_t changed_metrics) override; + private: - void SetAnchor(); + // Sets anchor rect to |root_window|. If it's null, + // result of GetRootWindowForNewWindows() will be used. + void SetAnchor(aura::Window* root_window); AssistantController* const assistant_controller_; // Owned by Shell. @@ -44,6 +69,10 @@ AssistantMiniView* assistant_mini_view_; // Owned by view hierarchy. AssistantWebView* assistant_web_view_; // Owned by view hierarchy. + std::unique_ptr<gfx::SlideAnimation> resize_animation_; + gfx::SizeF resize_start_; + gfx::SizeF resize_end_; + DISALLOW_COPY_AND_ASSIGN(AssistantContainerView); };
diff --git a/ash/assistant/ui/assistant_mini_view.cc b/ash/assistant/ui/assistant_mini_view.cc index 08252e4b..a4034ffc 100644 --- a/ash/assistant/ui/assistant_mini_view.cc +++ b/ash/assistant/ui/assistant_mini_view.cc
@@ -25,10 +25,10 @@ namespace { // Appearance. -constexpr int kIconSizeDip = 20; -constexpr int kLineHeightDip = 20; +constexpr int kIconSizeDip = 24; +constexpr int kLineHeightDip = 24; constexpr int kMaxWidthDip = 512; -constexpr int kPaddingLeftDip = 14; +constexpr int kPaddingLeftDip = 12; constexpr int kPaddingRightDip = 24; constexpr int kPreferredHeightDip = 48; @@ -85,8 +85,9 @@ // Label. label_->SetAutoColorReadabilityEnabled(false); label_->SetEnabledColor(kTextColorPrimary); - label_->SetFontList( - assistant::ui::GetDefaultFontList().DeriveWithSizeDelta(1)); + label_->SetFontList(assistant::ui::GetDefaultFontList() + .DeriveWithSizeDelta(1) + .DeriveWithWeight(gfx::Font::Weight::MEDIUM)); label_->SetHorizontalAlignment(gfx::HorizontalAlignment::ALIGN_LEFT); label_->SetLineHeight(kLineHeightDip); AddChildView(label_); @@ -127,8 +128,8 @@ voice_query.low_confidence_speech(); break; } - case AssistantQueryType::kEmpty: - // It shouldn't be possible to commit a query of type kEmpty. + case AssistantQueryType::kNull: + // It shouldn't be possible to commit a query of type kNull. NOTREACHED(); break; }
diff --git a/ash/assistant/ui/assistant_scroll_view.cc b/ash/assistant/ui/assistant_scroll_view.cc new file mode 100644 index 0000000..f1774125 --- /dev/null +++ b/ash/assistant/ui/assistant_scroll_view.cc
@@ -0,0 +1,90 @@ +// 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 "ash/assistant/ui/assistant_scroll_view.h" + +#include "ui/views/controls/scrollbar/overlay_scroll_bar.h" + +namespace ash { + +namespace { + +// ContentView ---------------------------------------------------------------- + +class ContentView : public views::View, views::ViewObserver { + public: + ContentView() { AddObserver(this); } + + ~ContentView() override { RemoveObserver(this); } + + // views::View: + void ChildPreferredSizeChanged(views::View* child) override { + PreferredSizeChanged(); + } + + void ChildVisibilityChanged(views::View* child) override { + PreferredSizeChanged(); + } + + // views::ViewObserver: + void OnChildViewAdded(views::View* view, views::View* child) override { + PreferredSizeChanged(); + } + + void OnChildViewRemoved(views::View* view, views::View* child) override { + PreferredSizeChanged(); + } + + private: + DISALLOW_COPY_AND_ASSIGN(ContentView); +}; + +// InvisibleScrollBar ---------------------------------------------------------- + +class InvisibleScrollBar : public views::OverlayScrollBar { + public: + InvisibleScrollBar(bool horizontal) : views::OverlayScrollBar(horizontal) {} + + ~InvisibleScrollBar() override = default; + + // views::OverlayScrollBar: + int GetThickness() const override { return 0; } + + private: + DISALLOW_COPY_AND_ASSIGN(InvisibleScrollBar); +}; + +} // namespace + +// AssistantScrollView --------------------------------------------------------- + +AssistantScrollView::AssistantScrollView() { + InitLayout(); +} + +AssistantScrollView::~AssistantScrollView() = default; + +void AssistantScrollView::OnViewPreferredSizeChanged(views::View* view) { + OnContentsPreferredSizeChanged(content_view_); + PreferredSizeChanged(); +} + +void AssistantScrollView::InitLayout() { + SetBackgroundColor(SK_ColorTRANSPARENT); + set_draw_overflow_indicator(false); + + // Content view. + content_view_ = new ContentView(); + content_view_->AddObserver(this); + SetContents(content_view_); + + // Scroll bars. + horizontal_scroll_bar_ = new InvisibleScrollBar(/*horizontal=*/true); + SetHorizontalScrollBar(horizontal_scroll_bar_); + + vertical_scroll_bar_ = new InvisibleScrollBar(/*horizontal=*/false); + SetVerticalScrollBar(vertical_scroll_bar_); +} + +} // namespace ash
diff --git a/ash/assistant/ui/assistant_scroll_view.h b/ash/assistant/ui/assistant_scroll_view.h new file mode 100644 index 0000000..fd3389c2 --- /dev/null +++ b/ash/assistant/ui/assistant_scroll_view.h
@@ -0,0 +1,44 @@ +// 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 ASH_ASSISTANT_UI_ASSISTANT_SCROLL_VIEW_H_ +#define ASH_ASSISTANT_UI_ASSISTANT_SCROLL_VIEW_H_ + +#include "base/macros.h" +#include "ui/views/controls/scroll_view.h" +#include "ui/views/view_observer.h" + +namespace ash { + +class AssistantScrollView : public views::ScrollView, views::ViewObserver { + public: + AssistantScrollView(); + ~AssistantScrollView() override; + + // views::ViewObserver: + void OnViewPreferredSizeChanged(views::View* view) override; + + virtual void OnContentsPreferredSizeChanged(views::View* content_view) = 0; + + protected: + views::View* content_view() { return content_view_; } + const views::View* content_view() const { return content_view_; } + + views::ScrollBar* horizontal_scroll_bar() { return horizontal_scroll_bar_; } + + views::ScrollBar* vertical_scroll_bar() { return vertical_scroll_bar_; } + + private: + void InitLayout(); + + views::View* content_view_; // Owned by view hierarchy. + views::ScrollBar* horizontal_scroll_bar_; // Owned by view hierarchy. + views::ScrollBar* vertical_scroll_bar_; // Owned by view hierarchy. + + DISALLOW_COPY_AND_ASSIGN(AssistantScrollView); +}; + +} // namespace ash + +#endif // ASH_ASSISTANT_UI_ASSISTANT_SCROLL_VIEW_H_
diff --git a/ash/assistant/ui/assistant_web_view.cc b/ash/assistant/ui/assistant_web_view.cc index fc49c48..4667c77b 100644 --- a/ash/assistant/ui/assistant_web_view.cc +++ b/ash/assistant/ui/assistant_web_view.cc
@@ -7,7 +7,6 @@ #include "ash/assistant/assistant_controller.h" #include "ash/assistant/assistant_ui_controller.h" #include "ash/assistant/ui/assistant_ui_constants.h" -#include "ash/assistant/ui/caption_bar.h" #include "ash/assistant/util/deep_link_util.h" #include "ash/public/cpp/app_list/answer_card_contents_registry.h" #include "ash/public/interfaces/web_contents_manager.mojom.h" @@ -54,11 +53,36 @@ // Caption bar. caption_bar_ = new CaptionBar(); - caption_bar_->set_delegate(assistant_controller_->ui_controller()); + caption_bar_->set_delegate(this); caption_bar_->SetButtonVisible(CaptionButtonId::kMinimize, false); AddChildView(caption_bar_); } +bool AssistantWebView::OnCaptionButtonPressed(CaptionButtonId id) { + CaptionBarDelegate* delegate = assistant_controller_->ui_controller(); + + // We need special handling of the back button. When possible, the back button + // should navigate backwards in the managed WebContents' history stack. + if (id == CaptionButtonId::kBack && web_contents_id_token_.has_value()) { + assistant_controller_->NavigateWebContentsBack( + web_contents_id_token_.value(), + base::BindOnce( + [](CaptionBarDelegate* delegate, bool navigated) { + // If the WebContents' did not navigate it is because we are + // already at the first entry in the history stack and we cannot + // navigate back any further. In this case, we give back control + // to our primary caption button delegate. + if (!navigated) + delegate->OnCaptionButtonPressed(CaptionButtonId::kBack); + }, + base::Unretained(delegate))); + return true; + } + + // For all other buttons we defer to our primary caption button delegate. + return delegate->OnCaptionButtonPressed(id); +} + void AssistantWebView::OnDeepLinkReceived( assistant::util::DeepLinkType type, const std::map<std::string, std::string>& params) {
diff --git a/ash/assistant/ui/assistant_web_view.h b/ash/assistant/ui/assistant_web_view.h index f8f5d6c..0de782bb 100644 --- a/ash/assistant/ui/assistant_web_view.h +++ b/ash/assistant/ui/assistant_web_view.h
@@ -8,6 +8,7 @@ #include <memory> #include "ash/assistant/assistant_controller_observer.h" +#include "ash/assistant/ui/caption_bar.h" #include "base/macros.h" #include "base/optional.h" #include "ui/views/view.h" @@ -19,14 +20,14 @@ namespace ash { class AssistantController; -class CaptionBar; // AssistantWebView is a child of AssistantBubbleView which allows Assistant UI // to render remotely hosted content within its bubble. It provides a CaptionBar // for window level controls and a WebView/RemoteViewHost for embedding web // contents. class AssistantWebView : public views::View, - public AssistantControllerObserver { + public AssistantControllerObserver, + public CaptionBarDelegate { public: explicit AssistantWebView(AssistantController* assistant_controller); ~AssistantWebView() override; @@ -36,6 +37,9 @@ int GetHeightForWidth(int width) const override; void ChildPreferredSizeChanged(views::View* child) override; + // CaptionBarDelegate: + bool OnCaptionButtonPressed(CaptionButtonId id) override; + // AssistantControllerObserver: void OnDeepLinkReceived( assistant::util::DeepLinkType type,
diff --git a/ash/assistant/ui/dialog_plate/action_view.cc b/ash/assistant/ui/dialog_plate/action_view.cc index b2a2a60..f20f93f6 100644 --- a/ash/assistant/ui/dialog_plate/action_view.cc +++ b/ash/assistant/ui/dialog_plate/action_view.cc
@@ -20,7 +20,7 @@ namespace { // Appearance. -constexpr int kPreferredSizeDip = 26; +constexpr int kPreferredSizeDip = 22; } // namespace
diff --git a/ash/assistant/ui/dialog_plate/dialog_plate.cc b/ash/assistant/ui/dialog_plate/dialog_plate.cc index bf3a49b..b8454fc 100644 --- a/ash/assistant/ui/dialog_plate/dialog_plate.cc +++ b/ash/assistant/ui/dialog_plate/dialog_plate.cc
@@ -31,7 +31,9 @@ namespace { // Appearance. -constexpr int kIconSizeDip = 24; +constexpr int kIconSizeDip = 20; +constexpr int kKeyboardLayoutPaddingLeftDip = 18; +constexpr int kKeyboardLayoutPaddingRightDip = 24; constexpr int kPreferredHeightDip = 48; // Animation. @@ -145,13 +147,15 @@ keyboard_layout_container_->SetLayoutManager( std::make_unique<views::BoxLayout>( views::BoxLayout::Orientation::kHorizontal, - gfx::Insets(0, kPaddingDip), kSpacingDip)); + gfx::Insets(0, kKeyboardLayoutPaddingLeftDip, 0, + kKeyboardLayoutPaddingRightDip), + kSpacingDip)); layout_manager->set_cross_axis_alignment( views::BoxLayout::CrossAxisAlignment::CROSS_AXIS_ALIGNMENT_CENTER); gfx::FontList font_list = - assistant::ui::GetDefaultFontList().DeriveWithSizeDelta(4); + assistant::ui::GetDefaultFontList().DeriveWithSizeDelta(2); // Textfield. textfield_ = new views::Textfield();
diff --git a/ash/assistant/ui/main_stage/assistant_header_view.cc b/ash/assistant/ui/main_stage/assistant_header_view.cc index cfe3af78..02e6ebbe 100644 --- a/ash/assistant/ui/main_stage/assistant_header_view.cc +++ b/ash/assistant/ui/main_stage/assistant_header_view.cc
@@ -25,6 +25,7 @@ // Appearance. constexpr int kIconSizeDip = 24; +constexpr int kPaddingHorizontalDip = 32; // Appear animation. constexpr base::TimeDelta kAppearAnimationFadeInDelay = @@ -75,7 +76,8 @@ void AssistantHeaderView::InitLayout() { layout_manager_ = SetLayoutManager(std::make_unique<views::BoxLayout>( - views::BoxLayout::Orientation::kVertical)); + views::BoxLayout::Orientation::kVertical, + gfx::Insets(0, 0, kSpacingDip, 0))); layout_manager_->set_cross_axis_alignment( views::BoxLayout::CrossAxisAlignment::CROSS_AXIS_ALIGNMENT_CENTER); @@ -121,7 +123,8 @@ // The molecule icon will be animated from the center of its parent, to the // left hand side. gfx::Transform transform; - transform.Translate(-(width() - molecule_icon_->width()) / 2, 0); + transform.Translate( + -(width() - molecule_icon_->width()) / 2 + kPaddingHorizontalDip, 0); // Animate the molecule icon. molecule_icon_->layer()->GetAnimator()->StartTogether(
diff --git a/ash/assistant/ui/main_stage/assistant_main_stage.cc b/ash/assistant/ui/main_stage/assistant_main_stage.cc index b840088..b0f3d25 100644 --- a/ash/assistant/ui/main_stage/assistant_main_stage.cc +++ b/ash/assistant/ui/main_stage/assistant_main_stage.cc
@@ -9,6 +9,7 @@ #include "ash/assistant/assistant_ui_controller.h" #include "ash/assistant/ui/assistant_ui_constants.h" #include "ash/assistant/ui/main_stage/assistant_footer_view.h" +#include "ash/assistant/ui/main_stage/assistant_header_view.h" #include "ash/assistant/ui/main_stage/assistant_progress_indicator.h" #include "ash/assistant/ui/main_stage/assistant_query_view.h" #include "ash/assistant/ui/main_stage/ui_element_container_view.h" @@ -166,7 +167,7 @@ /*animation_ended_callback=*/base::BindRepeating( &AssistantMainStage::OnFooterAnimationEnded, base::Unretained(this)))) { - InitLayout(assistant_controller); + InitLayout(); // The view hierarchy will be destructed before Shell, which owns // AssistantController, so AssistantController is guaranteed to outlive the @@ -211,7 +212,7 @@ PreferredSizeChanged(); } -void AssistantMainStage::InitLayout(AssistantController* assistant_controller) { +void AssistantMainStage::InitLayout() { SetLayoutManager(std::make_unique<views::FillLayout>()); // The children of AssistantMainStage will be animated on their own layers and @@ -220,13 +221,12 @@ layer()->SetFillsBoundsOpaquely(false); layer()->SetMasksToBounds(true); - InitContentLayoutContainer(assistant_controller); - InitQueryLayoutContainer(assistant_controller); + InitContentLayoutContainer(); + InitQueryLayoutContainer(); InitOverlayLayoutContainer(); } -void AssistantMainStage::InitContentLayoutContainer( - AssistantController* assistant_controller) { +void AssistantMainStage::InitContentLayoutContainer() { // Note that we will observe children of |content_layout_container_| to handle // preferred size and visibility change events in AssistantMainStage. This is // necessary because |content_layout_container_| may not change size in @@ -238,15 +238,19 @@ std::make_unique<views::BoxLayout>( views::BoxLayout::Orientation::kVertical)); + // Header. + header_ = new AssistantHeaderView(assistant_controller_); + content_layout_container_->AddChildView(header_); + // UI element container. - ui_element_container_ = new UiElementContainerView(assistant_controller); + ui_element_container_ = new UiElementContainerView(assistant_controller_); ui_element_container_->AddObserver(this); content_layout_container_->AddChildView(ui_element_container_); layout_manager->SetFlexForView(ui_element_container_, 1); // Footer. - footer_ = new AssistantFooterView(assistant_controller); + footer_ = new AssistantFooterView(assistant_controller_); footer_->AddObserver(this); // The footer will be animated on its own layer. @@ -258,8 +262,7 @@ AddChildView(content_layout_container_); } -void AssistantMainStage::InitQueryLayoutContainer( - AssistantController* assistant_controller) { +void AssistantMainStage::InitQueryLayoutContainer() { // Note that we will observe children of |query_layout_container_| to handle // preferred size and visibility change events in AssistantMainStage. This is // necessary because |query_layout_container_| may not change size in response @@ -285,7 +288,8 @@ greeting_label_ = new views::Label( l10n_util::GetStringUTF16(IDS_ASH_ASSISTANT_PROMPT_DEFAULT)); greeting_label_->SetAutoColorReadabilityEnabled(false); - greeting_label_->SetBorder(views::CreateEmptyBorder(/*top=*/32, 0, 0, 0)); + greeting_label_->SetBorder( + views::CreateEmptyBorder(kGreetingLabelMarginTopDip, 0, 0, 0)); greeting_label_->SetEnabledColor(kTextColorPrimary); greeting_label_->SetFontList( assistant::ui::GetDefaultFontList() @@ -612,13 +616,12 @@ const int top_padding = active_query_view_ ? active_query_view_->height() : 0; // Apply top padding to the content layout container by applying an empty - // border to the UI element container, its first child. - ui_element_container_->SetBorder( - views::CreateEmptyBorder(top_padding, 0, 0, 0)); + // border to the header, its first child. + header_->SetBorder(views::CreateEmptyBorder(top_padding, 0, 0, 0)); // Force a layout/paint pass. - ui_element_container_->Layout(); - ui_element_container_->SchedulePaint(); + content_layout_container_->Layout(); + content_layout_container_->SchedulePaint(); // Apply top padding to the overlay layout container by applying an empty // border to its children.
diff --git a/ash/assistant/ui/main_stage/assistant_main_stage.h b/ash/assistant/ui/main_stage/assistant_main_stage.h index c388ecc..71fcb7af 100644 --- a/ash/assistant/ui/main_stage/assistant_main_stage.h +++ b/ash/assistant/ui/main_stage/assistant_main_stage.h
@@ -25,6 +25,7 @@ class AssistantController; class AssistantFooterView; +class AssistantHeaderView; class AssistantProgressIndicator; class AssistantQueryView; class UiElementContainerView; @@ -59,9 +60,9 @@ void OnUiVisibilityChanged(bool visible, AssistantSource source) override; private: - void InitLayout(AssistantController* assistant_controller); - void InitContentLayoutContainer(AssistantController* assistant_controller); - void InitQueryLayoutContainer(AssistantController* assistant_controller); + void InitLayout(); + void InitContentLayoutContainer(); + void InitQueryLayoutContainer(); void InitOverlayLayoutContainer(); void UpdateTopPadding(); @@ -81,6 +82,7 @@ AssistantController* const assistant_controller_; // Owned by Shell. // Content layout container and children. Owned by view hierarchy. + AssistantHeaderView* header_; views::View* content_layout_container_; UiElementContainerView* ui_element_container_; AssistantFooterView* footer_;
diff --git a/ash/assistant/ui/main_stage/assistant_query_view.cc b/ash/assistant/ui/main_stage/assistant_query_view.cc index 306a75c..8cc65c8 100644 --- a/ash/assistant/ui/main_stage/assistant_query_view.cc +++ b/ash/assistant/ui/main_stage/assistant_query_view.cc
@@ -87,7 +87,7 @@ voice_query.low_confidence_speech()); break; } - case AssistantQueryType::kEmpty: + case AssistantQueryType::kNull: SetText(std::string()); break; }
diff --git a/ash/assistant/ui/main_stage/suggestion_container_view.cc b/ash/assistant/ui/main_stage/suggestion_container_view.cc index c637c28..3a00aa0 100644 --- a/ash/assistant/ui/main_stage/suggestion_container_view.cc +++ b/ash/assistant/ui/main_stage/suggestion_container_view.cc
@@ -11,7 +11,6 @@ #include "ash/assistant/model/assistant_response.h" #include "ash/assistant/ui/assistant_ui_constants.h" #include "base/strings/utf_string_conversions.h" -#include "ui/views/controls/scrollbar/overlay_scroll_bar.h" #include "ui/views/layout/box_layout.h" namespace ash { @@ -21,22 +20,6 @@ // Appearance. constexpr int kPreferredHeightDip = 48; -// InvisibleScrollBar ---------------------------------------------------------- - -class InvisibleScrollBar : public views::OverlayScrollBar { - public: - explicit InvisibleScrollBar(bool horizontal) - : views::OverlayScrollBar(horizontal) {} - - ~InvisibleScrollBar() override = default; - - // views::OverlayScrollBar: - int GetThickness() const override { return 0; } - - private: - DISALLOW_COPY_AND_ASSIGN(InvisibleScrollBar); -}; - } // namespace // SuggestionContainerView ----------------------------------------------------- @@ -44,7 +27,6 @@ SuggestionContainerView::SuggestionContainerView( AssistantController* assistant_controller) : assistant_controller_(assistant_controller), - contents_view_(new views::View()), download_request_weak_factory_(this) { InitLayout(); @@ -65,21 +47,20 @@ return kPreferredHeightDip; } +void SuggestionContainerView::OnContentsPreferredSizeChanged( + views::View* content_view) { + const int preferred_width = content_view->GetPreferredSize().width(); + content_view->SetSize(gfx::Size(preferred_width, kPreferredHeightDip)); +} + void SuggestionContainerView::InitLayout() { - // Contents. views::BoxLayout* layout_manager = - contents_view_->SetLayoutManager(std::make_unique<views::BoxLayout>( + content_view()->SetLayoutManager(std::make_unique<views::BoxLayout>( views::BoxLayout::Orientation::kHorizontal, gfx::Insets(0, kPaddingDip), kSpacingDip)); layout_manager->set_cross_axis_alignment( views::BoxLayout::CrossAxisAlignment::CROSS_AXIS_ALIGNMENT_END); - - // ScrollView. - SetBackgroundColor(SK_ColorTRANSPARENT); - SetContents(contents_view_); - SetHorizontalScrollBar(new InvisibleScrollBar(/*horizontal=*/true)); - SetVerticalScrollBar(new InvisibleScrollBar(/*horizontal=*/false)); } void SuggestionContainerView::OnResponseChanged( @@ -123,10 +104,8 @@ // suggestion chip view. This is used for handling icon download events. suggestion_chip_views_[id] = suggestion_chip_view; - contents_view_->AddChildView(suggestion_chip_view); + content_view()->AddChildView(suggestion_chip_view); } - - UpdateContentsBounds(); } void SuggestionContainerView::OnResponseCleared() { @@ -134,10 +113,8 @@ download_request_weak_factory_.InvalidateWeakPtrs(); // When modifying the view hierarchy, make sure we keep our view cache synced. - contents_view_->RemoveAllChildViews(/*delete_children=*/true); + content_view()->RemoveAllChildViews(/*delete_children=*/true); suggestion_chip_views_.clear(); - - UpdateContentsBounds(); } void SuggestionContainerView::OnSuggestionChipIconDownloaded( @@ -153,9 +130,4 @@ static_cast<app_list::SuggestionChipView*>(sender)->id()); } -void SuggestionContainerView::UpdateContentsBounds() { - contents_view_->SetBounds(0, 0, contents_view_->GetPreferredSize().width(), - kPreferredHeightDip); -} - } // namespace ash
diff --git a/ash/assistant/ui/main_stage/suggestion_container_view.h b/ash/assistant/ui/main_stage/suggestion_container_view.h index 890588c2..180db84 100644 --- a/ash/assistant/ui/main_stage/suggestion_container_view.h +++ b/ash/assistant/ui/main_stage/suggestion_container_view.h
@@ -9,6 +9,7 @@ #include "ash/app_list/views/suggestion_chip_view.h" #include "ash/assistant/model/assistant_interaction_model_observer.h" +#include "ash/assistant/ui/assistant_scroll_view.h" #include "base/macros.h" #include "chromeos/services/assistant/public/mojom/assistant.mojom.h" #include "ui/views/controls/scroll_view.h" @@ -20,7 +21,7 @@ // SuggestionContainerView is the child of AssistantMainView concerned with // laying out SuggestionChipViews in response to Assistant interaction model // suggestion events. -class SuggestionContainerView : public views::ScrollView, +class SuggestionContainerView : public AssistantScrollView, public AssistantInteractionModelObserver, public views::ButtonListener { public: @@ -29,9 +30,10 @@ explicit SuggestionContainerView(AssistantController* assistant_controller); ~SuggestionContainerView() override; - // views::View: + // AssistantScrollView: gfx::Size CalculatePreferredSize() const override; int GetHeightForWidth(int width) const override; + void OnContentsPreferredSizeChanged(views::View* content_view) override; // AssistantInteractionModelObserver: void OnResponseChanged(const AssistantResponse& response) override; @@ -42,13 +44,11 @@ private: void InitLayout(); - void UpdateContentsBounds(); // Invoked on suggestion chip icon downloaded event. void OnSuggestionChipIconDownloaded(int id, const gfx::ImageSkia& icon); AssistantController* const assistant_controller_; // Owned by Shell. - views::View* contents_view_; // Owned by view hierarchy. // Cache of suggestion chip views owned by the view hierarchy. The key for the // map is the unique identifier by which the Assistant interaction model
diff --git a/ash/assistant/ui/main_stage/ui_element_container_view.cc b/ash/assistant/ui/main_stage/ui_element_container_view.cc index fa4b36ab..035a3c0 100644 --- a/ash/assistant/ui/main_stage/ui_element_container_view.cc +++ b/ash/assistant/ui/main_stage/ui_element_container_view.cc
@@ -9,7 +9,6 @@ #include "ash/assistant/model/assistant_response.h" #include "ash/assistant/model/assistant_ui_element.h" #include "ash/assistant/ui/assistant_ui_constants.h" -#include "ash/assistant/ui/main_stage/assistant_header_view.h" #include "ash/assistant/ui/main_stage/assistant_text_element_view.h" #include "ash/assistant/util/animation_util.h" #include "ash/public/cpp/app_list/answer_card_contents_registry.h" @@ -24,7 +23,6 @@ #include "ui/views/controls/native/native_view_host.h" #include "ui/views/layout/box_layout.h" #include "ui/views/layout/fill_layout.h" -#include "ui/views/view_observer.h" #include "ui/views/widget/widget.h" #include "ui/views/widget/widget_delegate.h" @@ -131,28 +129,38 @@ ReleaseAllCards(); } -void UiElementContainerView::ChildPreferredSizeChanged(views::View* child) { - PreferredSizeChanged(); +gfx::Size UiElementContainerView::CalculatePreferredSize() const { + return gfx::Size(INT_MAX, GetHeightForWidth(INT_MAX)); +} + +int UiElementContainerView::GetHeightForWidth(int width) const { + return content_view()->GetHeightForWidth(width); +} + +void UiElementContainerView::OnContentsPreferredSizeChanged( + views::View* content_view) { + const int preferred_height = content_view->GetHeightForWidth(width()); + content_view->SetSize(gfx::Size(width(), preferred_height)); } void UiElementContainerView::InitLayout() { views::BoxLayout* layout_manager = - SetLayoutManager(std::make_unique<views::BoxLayout>( + content_view()->SetLayoutManager(std::make_unique<views::BoxLayout>( views::BoxLayout::Orientation::kVertical, gfx::Insets(0, kPaddingHorizontalDip), kSpacingDip)); layout_manager->set_cross_axis_alignment( views::BoxLayout::CrossAxisAlignment::CROSS_AXIS_ALIGNMENT_START); - - // Header. - assistant_header_view_ = - std::make_unique<AssistantHeaderView>(assistant_controller_); - assistant_header_view_->set_owned_by_client(); - AddChildView(assistant_header_view_.get()); } void UiElementContainerView::OnCommittedQueryChanged( const AssistantQuery& query) { + // We don't allow processing of events while waiting for the next query + // response. The contents will be faded out, so it should not be interactive. + // We also scroll to the top to play nice with the transition animation. + set_can_process_events_within_subtree(false); + ScrollToPosition(vertical_scroll_bar(), 0); + if (!assistant::ui::kIsMotionSpecEnabled) return; @@ -206,13 +214,9 @@ // Prevent any in-flight card rendering requests from returning. render_request_weak_factory_.InvalidateWeakPtrs(); - RemoveAllChildViews(/*delete_children=*/true); + content_view()->RemoveAllChildViews(/*delete_children=*/true); ui_element_layers_.clear(); - AddChildView(assistant_header_view_.get()); - - PreferredSizeChanged(); - ReleaseAllCards(); // We can clear any pending UI elements as they are no longer relevant. @@ -242,6 +246,10 @@ void UiElementContainerView::OnAllUiElementsAdded() { DCHECK(!is_processing_ui_element_); + // Now that the response for the current query has been added to the view + // hierarchy, we can re-enable processing of events. + set_can_process_events_within_subtree(true); + // If the motion spec is disabled, there's nothing to do because the views // do not need to be animated in. if (!assistant::ui::kIsMotionSpecEnabled) @@ -347,7 +355,7 @@ app_list::AnswerCardContentsRegistry::Get()->GetView( embed_token.value())); - AddChildView(view_holder); + content_view()->AddChildView(view_holder); view_holder->Attach(); if (assistant::ui::kIsMotionSpecEnabled) { @@ -366,8 +374,6 @@ } // TODO(dmblack): Handle Mash case. - PreferredSizeChanged(); - // Once the card has been rendered and embedded, we can resume processing // any UI elements that are in the pending queue. SetProcessingUiElement(false); @@ -393,8 +399,7 @@ text_element_view->layer(), kTextElementAnimationFadeOutOpacity)); } - AddChildView(text_element_view); - PreferredSizeChanged(); + content_view()->AddChildView(text_element_view); } void UiElementContainerView::SetProcessingUiElement(bool is_processing) {
diff --git a/ash/assistant/ui/main_stage/ui_element_container_view.h b/ash/assistant/ui/main_stage/ui_element_container_view.h index e38ae3f..44f1227 100644 --- a/ash/assistant/ui/main_stage/ui_element_container_view.h +++ b/ash/assistant/ui/main_stage/ui_element_container_view.h
@@ -10,8 +10,9 @@ #include <vector> #include "ash/assistant/model/assistant_interaction_model_observer.h" +#include "ash/assistant/ui/assistant_scroll_view.h" #include "base/macros.h" -#include "ui/views/view.h" +#include "ui/views/view_observer.h" namespace ui { class CallbackLayerAnimationObserver; @@ -21,7 +22,6 @@ class AssistantCardElement; class AssistantController; -class AssistantHeaderView; class AssistantResponse; class AssistantTextElement; class AssistantUiElement; @@ -30,14 +30,16 @@ // UiElementContainerView is the child of AssistantMainView concerned with // laying out text views and embedded card views in response to Assistant // interaction model UI element events. -class UiElementContainerView : public views::View, +class UiElementContainerView : public AssistantScrollView, public AssistantInteractionModelObserver { public: explicit UiElementContainerView(AssistantController* assistant_controller); ~UiElementContainerView() override; - // views::View: - void ChildPreferredSizeChanged(views::View* child) override; + // AssistantScrollView: + gfx::Size CalculatePreferredSize() const override; + int GetHeightForWidth(int width) const override; + void OnContentsPreferredSizeChanged(views::View* content_view) override; // AssistantInteractionModelObserver: void OnCommittedQueryChanged(const AssistantQuery& query) override; @@ -68,8 +70,6 @@ AssistantController* const assistant_controller_; // Owned by Shell. - std::unique_ptr<AssistantHeaderView> assistant_header_view_; - // Uniquely identifies cards owned by AssistantCardRenderer. std::vector<base::UnguessableToken> id_token_list_;
diff --git a/ash/components/shortcut_viewer/last_window_closed_observer.cc b/ash/components/shortcut_viewer/last_window_closed_observer.cc index 58c9e29..28724a0 100644 --- a/ash/components/shortcut_viewer/last_window_closed_observer.cc +++ b/ash/components/shortcut_viewer/last_window_closed_observer.cc
@@ -12,7 +12,7 @@ LastWindowClosedObserver::LastWindowClosedObserver( const base::RepeatingClosure& callback) : callback_(callback) { - env_observer_.Add(aura::Env::GetInstanceDontCreate()); + env_observer_.Add(aura::Env::GetInstance()); } LastWindowClosedObserver::~LastWindowClosedObserver() = default;
diff --git a/ash/login/ui/login_base_bubble_view.h b/ash/login/ui/login_base_bubble_view.h index bc6e71f0..c7957a97 100644 --- a/ash/login/ui/login_base_bubble_view.h +++ b/ash/login/ui/login_base_bubble_view.h
@@ -6,7 +6,7 @@ #define ASH_LOGIN_UI_LOGIN_BASE_BUBBLE_VIEW_H_ #include "ash/ash_export.h" -#include "ui/views/bubble/bubble_dialog_delegate.h" +#include "ui/views/bubble/bubble_dialog_delegate_view.h" #include "ui/views/view.h" namespace ash {
diff --git a/ash/login/ui/login_user_view.cc b/ash/login/ui/login_user_view.cc index 027ae4a..e69ef79 100644 --- a/ash/login/ui/login_user_view.cc +++ b/ash/login/ui/login_user_view.cc
@@ -322,7 +322,7 @@ } LoginBubble* LoginUserView::TestApi::menu() const { - return view_->user_menu_.get(); + return view_->menu_.get(); } bool LoginUserView::TestApi::is_opaque() const { @@ -414,7 +414,7 @@ hover_notifier_ = std::make_unique<HoverNotifier>( this, base::Bind(&LoginUserView::OnHover, base::Unretained(this))); - user_menu_ = std::make_unique<LoginBubble>(); + menu_ = std::make_unique<LoginBubble>(); } LoginUserView::~LoginUserView() = default; @@ -519,8 +519,8 @@ // Handle click on the dropdown arrow. if (sender == dropdown_) { DCHECK(dropdown_); - if (!user_menu_->IsVisible()) { - user_menu_->ShowUserMenu( + if (!menu_->IsVisible()) { + menu_->ShowUserMenu( base::UTF8ToUTF16(current_user_->basic_user_info->display_name), base::UTF8ToUTF16(current_user_->basic_user_info->display_email), current_user_->basic_user_info->type, current_user_->is_device_owner, @@ -528,7 +528,7 @@ current_user_->can_remove /*show_remove_user*/, on_remove_warning_shown_, on_remove_); } else { - user_menu_->Close(); + menu_->Close(); } return;
diff --git a/ash/login/ui/login_user_view.h b/ash/login/ui/login_user_view.h index c1e9841..746697a 100644 --- a/ash/login/ui/login_user_view.h +++ b/ash/login/ui/login_user_view.h
@@ -117,8 +117,8 @@ UserLabel* user_label_ = nullptr; LoginButton* dropdown_ = nullptr; TapButton* tap_button_ = nullptr; - // TODO(jdufault): Rename user_menu_ to menu_ or popup_menu_. - std::unique_ptr<LoginBubble> user_menu_; + + std::unique_ptr<LoginBubble> menu_; // Show the domain information for public account user. UserDomainInfoView* user_domain_ = nullptr;
diff --git a/ash/message_center/message_center_scroll_bar.cc b/ash/message_center/message_center_scroll_bar.cc index 49a54358..0f8db77 100644 --- a/ash/message_center/message_center_scroll_bar.cc +++ b/ash/message_center/message_center_scroll_bar.cc
@@ -68,4 +68,11 @@ observer_->OnMessageCenterScrolled(); } +bool MessageCenterScrollBar::OnScroll(float dx, float dy) { + bool result = views::OverlayScrollBar::OnScroll(dx, dy); + if (observer_) + observer_->OnMessageCenterScrolled(); + return result; +} + } // namespace ash
diff --git a/ash/message_center/message_center_scroll_bar.h b/ash/message_center/message_center_scroll_bar.h index 172c6830..36627e7 100644 --- a/ash/message_center/message_center_scroll_bar.h +++ b/ash/message_center/message_center_scroll_bar.h
@@ -33,6 +33,9 @@ // ui::EventHandler overrides: void OnGestureEvent(ui::GestureEvent* event) override; + // views::ScrollDelegate overrides: + bool OnScroll(float dx, float dy) override; + // False if no event is recorded yet. True if the first event is recorded. bool stats_recorded_ = false;
diff --git a/ash/public/cpp/accelerators.cc b/ash/public/cpp/accelerators.cc index 85abf44..2b664123 100644 --- a/ash/public/cpp/accelerators.cc +++ b/ash/public/cpp/accelerators.cc
@@ -99,11 +99,7 @@ {true, ui::VKEY_BROWSER_REFRESH, ui::EF_SHIFT_DOWN | ui::EF_CONTROL_DOWN | ui::EF_ALT_DOWN, ROTATE_WINDOW}, {true, ui::VKEY_T, ui::EF_SHIFT_DOWN | ui::EF_CONTROL_DOWN, RESTORE_TAB}, - // These correspond to the "Print Screen" key, which changed from VKEY_PRINT - // to VKEY_SNAPSHOT in the XKB code used by Chrome OS in M66. The X11 code - // used when running an OS_CHROMEOS build on a Linux workstation still uses - // VKEY_PRINT: https://crbug.com/872094 - {true, ui::VKEY_PRINT, ui::EF_NONE, TAKE_SCREENSHOT}, + // This corresponds to the "Print Screen" key. {true, ui::VKEY_SNAPSHOT, ui::EF_NONE, TAKE_SCREENSHOT}, // On Chrome OS, Search key is mapped to LWIN. The Search key binding should // act on release instead of press when using Search as a modifier key for
diff --git a/ash/public/cpp/immersive/immersive_fullscreen_controller.cc b/ash/public/cpp/immersive/immersive_fullscreen_controller.cc index 8cffc8a9..ec954511 100644 --- a/ash/public/cpp/immersive/immersive_fullscreen_controller.cc +++ b/ash/public/cpp/immersive/immersive_fullscreen_controller.cc
@@ -19,7 +19,7 @@ #include "ui/gfx/animation/slide_animation.h" #include "ui/gfx/geometry/point.h" #include "ui/gfx/geometry/rect.h" -#include "ui/views/bubble/bubble_dialog_delegate.h" +#include "ui/views/bubble/bubble_dialog_delegate_view.h" #include "ui/views/view.h" #include "ui/views/widget/widget.h"
diff --git a/ash/public/interfaces/web_contents_manager.mojom b/ash/public/interfaces/web_contents_manager.mojom index c23d010..098301e 100644 --- a/ash/public/interfaces/web_contents_manager.mojom +++ b/ash/public/interfaces/web_contents_manager.mojom
@@ -32,6 +32,12 @@ // Releases any resources associated with any WebContents uniquely identified // by one of the specified |id_tokens|. ReleaseAllWebContents(array<mojo_base.mojom.UnguessableToken> id_tokens); + + // Navigates the WebContents uniquely identified by |id_token| back relative + // to the current history entry. The callback returns true if the WebContents + // were navigated, false otherwise. + NavigateWebContentsBack(mojo_base.mojom.UnguessableToken id_token) + => (bool navigated); }; // Defines parameters for a managed WebContents.
diff --git a/ash/resources/vector_icons/auto_hide.icon b/ash/resources/vector_icons/auto_hide.icon index f64612b..133f1ef 100644 --- a/ash/resources/vector_icons/auto_hide.icon +++ b/ash/resources/vector_icons/auto_hide.icon
@@ -3,43 +3,43 @@ // found in the LICENSE file. CANVAS_DIMENSIONS, 20, -MOVE_TO, 11, 8, +MOVE_TO, 13, 11, R_V_LINE_TO, 2, -H_LINE_TO, 9, -V_LINE_TO, 8, +H_LINE_TO, 11, +V_LINE_TO, 11, R_H_LINE_TO, 2, CLOSE, R_MOVE_TO, 2, 0, R_H_LINE_TO, 1, R_V_LINE_TO, 2, R_H_LINE_TO, -1, -V_LINE_TO, 8, +V_LINE_TO, 11, CLOSE, -MOVE_TO, 7, 8, +MOVE_TO, 9, 11, R_V_LINE_TO, 2, -H_LINE_TO, 5, -V_LINE_TO, 8, +H_LINE_TO, 7, +V_LINE_TO, 11, R_H_LINE_TO, 2, CLOSE, -MOVE_TO, 3, 8, +MOVE_TO, 5, 11, R_V_LINE_TO, 2, -H_LINE_TO, 2, -V_LINE_TO, 8, +H_LINE_TO, 4, +V_LINE_TO, 11, R_H_LINE_TO, 1, CLOSE, -MOVE_TO, 2, 0, +MOVE_TO, 4, 3, R_H_LINE_TO, 12, R_ARC_TO, 2, 2, 0, 0, 1, 2, 2, R_V_LINE_TO, 10, R_ARC_TO, 2, 2, 0, 0, 1, -2, 2, -H_LINE_TO, 2, +H_LINE_TO, 4, R_ARC_TO, 2, 2, 0, 0, 1, -2, -2, -V_LINE_TO, 2, +V_LINE_TO, 5, R_ARC_TO, 2, 2, 0, 0, 1, 2, -2, CLOSE, R_MOVE_TO, 0, 2, R_V_LINE_TO, 10, R_H_LINE_TO, 12, -V_LINE_TO, 2, -H_LINE_TO, 2, +V_LINE_TO, 5, +H_LINE_TO, 4, CLOSE
diff --git a/ash/resources/vector_icons/keyboard.icon b/ash/resources/vector_icons/keyboard.icon index 578bef8d1..ef895bb 100644 --- a/ash/resources/vector_icons/keyboard.icon +++ b/ash/resources/vector_icons/keyboard.icon
@@ -2,24 +2,24 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -CANVAS_DIMENSIONS, 24, -MOVE_TO, 4, 19, -H_LINE_TO, 20, -V_LINE_TO, 5, -H_LINE_TO, 4, +CANVAS_DIMENSIONS, 20, +MOVE_TO, 3.33f, 15.83f, +H_LINE_TO, 16.67f, +V_LINE_TO, 4.17f, +H_LINE_TO, 3.33f, CLOSE, -MOVE_TO, 3.25f, 21, -CUBIC_TO, 2.56f, 21, 2, 20.44f, 2, 19.75f, -V_LINE_TO, 4.25f, -CUBIC_TO, 2, 3.56f, 2.56f, 3, 3.25f, 3, -R_H_LINE_TO, 17.5f, -CUBIC_TO, 21.44f, 3, 22, 3.56f, 22, 4.25f, -R_V_LINE_TO, 15.5f, -CUBIC_TO, 22, 20.44f, 21.44f, 21, 20.75f, 21, +MOVE_TO, 2.71f, 17.5f, +CUBIC_TO, 2.13f, 17.5f, 1.67f, 17.03f, 1.67f, 16.46f, +V_LINE_TO, 3.54f, +CUBIC_TO, 1.67f, 2.97f, 2.13f, 2.5f, 2.71f, 2.5f, +H_LINE_TO, 17.29f, +R_CUBIC_TO, 0.57f, 0, 1.04f, 0.47f, 1.04f, 1.04f, +V_LINE_TO, 16.46f, +R_CUBIC_TO, 0, 0.57f, -0.47f, 1.04f, -1.04f, 1.04f, CLOSE, -ROUND_RECT, 7, 9, 2, 2, 0, -ROUND_RECT, 11, 9, 2, 2, 0, -ROUND_RECT, 15, 9, 2, 2, 0, -ROUND_RECT, 7, 13, 2, 2, 0, -ROUND_RECT, 11, 13, 2, 2, 0, -ROUND_RECT, 15, 13, 2, 2, 0 +ROUND_RECT, 5.8330002, 7.5, 1.6670001, 1.6670001, 0, +ROUND_RECT, 12.5, 7.5, 1.6670001, 1.6670001, 0, +ROUND_RECT, 9.1669998, 7.5, 1.6670001, 1.6670001, 0, +ROUND_RECT, 5.8330002, 10.833, 1.6670001, 1.6670001, 0, +ROUND_RECT, 9.1669998, 10.833, 1.6670001, 1.6670001, 0, +ROUND_RECT, 12.5, 10.833, 1.6670001, 1.6670001, 0
diff --git a/ash/resources/vector_icons/mic.icon b/ash/resources/vector_icons/mic.icon index 190e1de5..fa6e192 100644 --- a/ash/resources/vector_icons/mic.icon +++ b/ash/resources/vector_icons/mic.icon
@@ -2,32 +2,30 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -CANVAS_DIMENSIONS, 24, +CANVAS_DIMENSIONS, 20, PATH_COLOR_ARGB, 0xFF, 0x34, 0xA8, 0x53, -ROUND_RECT, 10.666667, 18.5, 2.6666667, 2.8333333, 0, +ROUND_RECT, 8.8900003, 15.42, 2.22, 2.3599999, 0, NEW_PATH, PATH_COLOR_ARGB, 0xFF, 0x42, 0x85, 0xF4, -MOVE_TO, 12, 14.67f, -ARC_TO, 2.67f, 2.67f, 0, 0, 0, 14.67f, 12, -V_LINE_TO, 5.33f, -R_ARC_TO, 2.67f, 2.67f, 0, 1, 0, -5.33f, 0, -V_LINE_TO, 12, -ARC_TO, 2.67f, 2.67f, 0, 0, 0, 12, 14.67f, +MOVE_TO, 10, 12.22f, +ARC_TO, 2.22f, 2.22f, 0, 0, 0, 12.22f, 10, +V_LINE_TO, 4.44f, +R_ARC_TO, 2.22f, 2.22f, 0, 0, 0, -4.44f, 0, +V_LINE_TO, 10, +ARC_TO, 2.22f, 2.22f, 0, 0, 0, 10, 12.22f, CLOSE, NEW_PATH, PATH_COLOR_ARGB, 0xFF, 0xFB, 0xBC, 0x05, -R_MOVE_TO, 7.33f, 12, -R_H_LINE_TO, -2, -R_ARC_TO, 6.67f, 6.67f, 0, 0, 0, 1.95f, 4.71f, -LINE_TO, 8.7f, 15.3f, -ARC_TO, 4.67f, 4.67f, 0, 0, 1, 7.33f, 12, +MOVE_TO, 6.11f, 10, +H_LINE_TO, 4.44f, +R_ARC_TO, 5.54f, 5.54f, 0, 0, 0, 1.63f, 3.93f, +LINE_TO, 7.25f, 12.75f, +ARC_TO, 3.88f, 3.88f, 0, 0, 1, 6.11f, 10, CLOSE, NEW_PATH, PATH_COLOR_ARGB, 0xFF, 0xEA, 0x43, 0x35, -MOVE_TO, 12, 16.67f, -ARC_TO, 4.67f, 4.67f, 0, 0, 1, 8.7f, 15.3f, -LINE_TO, 7.29f, 16.71f, -ARC_TO, 6.67f, 6.67f, 0, 0, 0, 18.67f, 12, -R_H_LINE_TO, -2, -ARC_TO, 4.67f, 4.67f, 0, 0, 1, 12, 16.67f, +MOVE_TO, 13.89f, 10, +ARC_TO, 3.89f, 3.89f, 0, 0, 1, 7.25f, 12.75f, +LINE_TO, 6.07f, 13.93f, +ARC_TO, 5.56f, 5.56f, 0, 0, 0, 15.56f, 10, CLOSE
diff --git a/ash/resources/vector_icons/shelf_position.icon b/ash/resources/vector_icons/shelf_position.icon index db0cc1c..431d01f 100644 --- a/ash/resources/vector_icons/shelf_position.icon +++ b/ash/resources/vector_icons/shelf_position.icon
@@ -3,33 +3,33 @@ // found in the LICENSE file. CANVAS_DIMENSIONS, 20, -MOVE_TO, 6, 8, +MOVE_TO, 8, 11, R_H_LINE_TO, 4, -V_LINE_TO, 2, +V_LINE_TO, 5, R_H_LINE_TO, 2, R_V_LINE_TO, 6, R_H_LINE_TO, 2, R_V_LINE_TO, 2, -H_LINE_TO, 2, -V_LINE_TO, 8, +H_LINE_TO, 4, +V_LINE_TO, 11, R_H_LINE_TO, 2, -V_LINE_TO, 2, +V_LINE_TO, 5, R_H_LINE_TO, 2, R_V_LINE_TO, 6, CLOSE, -MOVE_TO, 2, 0, +MOVE_TO, 4, 3, R_H_LINE_TO, 12, R_ARC_TO, 2, 2, 0, 0, 1, 2, 2, R_V_LINE_TO, 10, R_ARC_TO, 2, 2, 0, 0, 1, -2, 2, -H_LINE_TO, 2, +H_LINE_TO, 4, R_ARC_TO, 2, 2, 0, 0, 1, -2, -2, -V_LINE_TO, 2, +V_LINE_TO, 5, R_ARC_TO, 2, 2, 0, 0, 1, 2, -2, CLOSE, R_MOVE_TO, 0, 2, R_V_LINE_TO, 10, R_H_LINE_TO, 12, -V_LINE_TO, 2, -H_LINE_TO, 2, +V_LINE_TO, 5, +H_LINE_TO, 4, CLOSE
diff --git a/ash/resources/vector_icons/wallpaper.icon b/ash/resources/vector_icons/wallpaper.icon index 434cd28..0d15c2a 100644 --- a/ash/resources/vector_icons/wallpaper.icon +++ b/ash/resources/vector_icons/wallpaper.icon
@@ -3,26 +3,26 @@ // found in the LICENSE file. CANVAS_DIMENSIONS, 20, -MOVE_TO, 2, 0, +MOVE_TO, 4, 3, R_H_LINE_TO, 12, R_ARC_TO, 2, 2, 0, 0, 1, 2, 2, R_V_LINE_TO, 10, R_ARC_TO, 2, 2, 0, 0, 1, -2, 2, -H_LINE_TO, 2, +H_LINE_TO, 4, R_ARC_TO, 2, 2, 0, 0, 1, -2, -2, -V_LINE_TO, 2, +V_LINE_TO, 5, R_ARC_TO, 2, 2, 0, 0, 1, 2, -2, CLOSE, R_MOVE_TO, 0, 2, R_V_LINE_TO, 10, R_H_LINE_TO, 12, -V_LINE_TO, 2, -H_LINE_TO, 2, +V_LINE_TO, 5, +H_LINE_TO, 4, CLOSE, R_MOVE_TO, 2, 8, R_LINE_TO, 3, -6, R_LINE_TO, 2, 4, R_LINE_TO, 1, -1.5f, R_LINE_TO, 2, 3.5f, -H_LINE_TO, 4, +H_LINE_TO, 6, CLOSE
diff --git a/ash/shelf/app_list_button.cc b/ash/shelf/app_list_button.cc index 827dc62e..390ab2d 100644 --- a/ash/shelf/app_list_button.cc +++ b/ash/shelf/app_list_button.cc
@@ -20,6 +20,7 @@ #include "ash/shelf/shelf_constants.h" #include "ash/shelf/shelf_view.h" #include "ash/shell.h" +#include "ash/shell_state.h" #include "ash/strings/grit/ash_strings.h" #include "ash/system/tray/tray_popup_utils.h" #include "ash/voice_interaction/voice_interaction_controller.h" @@ -141,6 +142,8 @@ "VoiceInteraction.Started.AppListButtonLongPress")); assistant_overlay_->BurstAnimation(); event->SetHandled(); + Shell::Get()->shell_state()->SetRootWindowForNewWindows( + GetWidget()->GetNativeWindow()->GetRootWindow()); if (chromeos::switches::IsAssistantEnabled()) { Shell::Get()->assistant_controller()->ui_controller()->ShowUi( AssistantSource::kLongPressLauncher);
diff --git a/ash/shelf/app_list_shelf_item_delegate.cc b/ash/shelf/app_list_shelf_item_delegate.cc index c13dbf8f..06f52ad 100644 --- a/ash/shelf/app_list_shelf_item_delegate.cc +++ b/ash/shelf/app_list_shelf_item_delegate.cc
@@ -51,7 +51,7 @@ Shell::Get()->GetPrimaryRootWindow()->GetChildById( kShellWindowId_AppListTabletModeContainer); aura::Window::Windows windows = - Shell::Get()->mru_window_tracker()->BuildWindowListIgnoreModal(); + Shell::Get()->mru_window_tracker()->BuildWindowForCycleList(); for (auto* window : windows) { if (!app_list_container->Contains(window) && !wm::GetWindowState(window)->IsMinimized()) {
diff --git a/ash/shelf/app_list_shelf_item_delegate.h b/ash/shelf/app_list_shelf_item_delegate.h index b143f3a..fe6883b 100644 --- a/ash/shelf/app_list_shelf_item_delegate.h +++ b/ash/shelf/app_list_shelf_item_delegate.h
@@ -5,13 +5,16 @@ #ifndef ASH_SHELF_APP_LIST_SHELF_ITEM_DELEGATE_H_ #define ASH_SHELF_APP_LIST_SHELF_ITEM_DELEGATE_H_ +#include <memory> + +#include "ash/ash_export.h" #include "ash/public/cpp/shelf_item_delegate.h" #include "base/macros.h" namespace ash { // ShelfItemDelegate for TYPE_APP_LIST. -class AppListShelfItemDelegate : public ShelfItemDelegate { +class ASH_EXPORT AppListShelfItemDelegate : public ShelfItemDelegate { public: AppListShelfItemDelegate(); ~AppListShelfItemDelegate() override;
diff --git a/ash/shelf/app_list_shelf_item_delegate_unittest.cc b/ash/shelf/app_list_shelf_item_delegate_unittest.cc new file mode 100644 index 0000000..691fdd1 --- /dev/null +++ b/ash/shelf/app_list_shelf_item_delegate_unittest.cc
@@ -0,0 +1,61 @@ +// 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 "ash/shelf/app_list_shelf_item_delegate.h" + +#include <memory> +#include <utility> + +#include "ash/shell.h" +#include "ash/test/ash_test_base.h" +#include "ash/wm/mru_window_tracker.h" +#include "ash/wm/tablet_mode/tablet_mode_controller.h" +#include "ash/wm/window_state.h" +#include "ash/wm/window_util.h" +#include "base/macros.h" + +namespace ash { +namespace { + +class AppListShelfItemDelegateTest : public AshTestBase { + public: + AppListShelfItemDelegateTest() + : delegate_(std::make_unique<AppListShelfItemDelegate>()) {} + ~AppListShelfItemDelegateTest() override = default; + + std::unique_ptr<aura::Window> CreateTestWindow() { + return AshTestBase::CreateTestWindow(gfx::Rect(0, 0, 400, 400)); + } + + std::unique_ptr<aura::Window> CreatePopupTestWindow() { + return AshTestBase::CreateTestWindow(gfx::Rect(0, 0, 400, 400), + aura::client::WINDOW_TYPE_POPUP); + } + + AppListShelfItemDelegate* delegate() { return delegate_.get(); } + + private: + std::unique_ptr<AppListShelfItemDelegate> delegate_; + + DISALLOW_COPY_AND_ASSIGN(AppListShelfItemDelegateTest); +}; + +TEST_F(AppListShelfItemDelegateTest, OnlyMinimizeCycleListWindows) { + std::unique_ptr<aura::Window> w1(CreateTestWindow()); + std::unique_ptr<aura::Window> w2(CreatePopupTestWindow()); + + Shell::Get()->tablet_mode_controller()->EnableTabletModeWindowManager(true); + std::unique_ptr<ui::Event> test_event = std::make_unique<ui::KeyEvent>( + ui::EventType::ET_MOUSE_PRESSED, ui::VKEY_UNKNOWN, ui::EF_NONE); + delegate()->ItemSelected( + std::move(test_event), + /*display_id=*/0, ShelfLaunchSource::LAUNCH_FROM_UNKNOWN, + base::BindOnce( + [](ash::ShelfAction, base::Optional<ash::MenuItemList>) {})); + ASSERT_TRUE(wm::GetWindowState(w1.get())->IsMinimized()); + ASSERT_FALSE(wm::GetWindowState(w2.get())->IsMinimized()); +} + +} // namespace +} // namespace ash
diff --git a/ash/shelf/overflow_bubble_view.h b/ash/shelf/overflow_bubble_view.h index f64a03f..7072637 100644 --- a/ash/shelf/overflow_bubble_view.h +++ b/ash/shelf/overflow_bubble_view.h
@@ -9,7 +9,7 @@ #include "ash/shelf/shelf_background_animator.h" #include "ash/shelf/shelf_background_animator_observer.h" #include "base/macros.h" -#include "ui/views/bubble/bubble_dialog_delegate.h" +#include "ui/views/bubble/bubble_dialog_delegate_view.h" namespace ash { class Shelf;
diff --git a/ash/shelf/shelf_tooltip_bubble_base.h b/ash/shelf/shelf_tooltip_bubble_base.h index d80f068..b357e50 100644 --- a/ash/shelf/shelf_tooltip_bubble_base.h +++ b/ash/shelf/shelf_tooltip_bubble_base.h
@@ -6,7 +6,7 @@ #define ASH_SHELF_SHELF_TOOLTIP_BUBBLE_BASE_H_ #include "ash/ash_export.h" -#include "ui/views/bubble/bubble_dialog_delegate.h" +#include "ui/views/bubble/bubble_dialog_delegate_view.h" namespace views { class View;
diff --git a/ash/shelf/shelf_tooltip_manager_unittest.cc b/ash/shelf/shelf_tooltip_manager_unittest.cc index d140e04..69cfe35 100644 --- a/ash/shelf/shelf_tooltip_manager_unittest.cc +++ b/ash/shelf/shelf_tooltip_manager_unittest.cc
@@ -16,7 +16,7 @@ #include "ash/test/ash_test_base.h" #include "ui/events/event_constants.h" #include "ui/events/test/event_generator.h" -#include "ui/views/bubble/bubble_dialog_delegate.h" +#include "ui/views/bubble/bubble_dialog_delegate_view.h" #include "ui/views/widget/widget.h" namespace ash {
diff --git a/ash/shell/bubble.cc b/ash/shell/bubble.cc index 045e8d1..5d44e5e 100644 --- a/ash/shell/bubble.cc +++ b/ash/shell/bubble.cc
@@ -4,7 +4,7 @@ #include "base/strings/utf_string_conversions.h" #include "ui/views/bubble/bubble_border.h" -#include "ui/views/bubble/bubble_dialog_delegate.h" +#include "ui/views/bubble/bubble_dialog_delegate_view.h" #include "ui/views/controls/label.h" #include "ui/views/layout/fill_layout.h" #include "ui/views/widget/widget.h"
diff --git a/ash/strings/ash_strings_bn.xtb b/ash/strings/ash_strings_bn.xtb index b2b0734..c18f4a9 100644 --- a/ash/strings/ash_strings_bn.xtb +++ b/ash/strings/ash_strings_bn.xtb
@@ -25,6 +25,7 @@ <translation id="1346748346194534595">ডানে</translation> <translation id="1351937230027495976">মেনুটি আড়াল করুন</translation> <translation id="1383876407941801731">সার্চ করুন</translation> +<translation id="1419738280318246476">বিজ্ঞপ্তির সম্পর্কিত অ্যাকশন করার জন্য ডিভাইস আনলক করুন</translation> <translation id="1467432559032391204">বামে</translation> <translation id="1484102317210609525"><ph name="DEVICE_NAME" /> (HDMI/DP)</translation> <translation id="1510238584712386396">লঞ্চার</translation> @@ -224,6 +225,7 @@ <translation id="4924411785043111640">রিস্টার্ট করুন এবং রিসেট করুন</translation> <translation id="4961318399572185831">স্ক্রিন কাস্ট করুন</translation> <translation id="5069971504769299223">ডিভাইসের ম্যানেজার আপনার অ্যাক্টিভিটি হয়ত মনিটর করতে পারেন।</translation> +<translation id="5083553833479578423">অ্যাসিস্ট্যান্ট-এর আরও বৈশিষ্ট্য আনলক করুন।</translation> <translation id="5136175204352732067">বিভিন্ন কীবোর্ড কানেক্ট করা হয়েছে</translation> <translation id="5168181903108465623">কাস্ট ডিভাইসগুলি উপলব্ধ</translation> <translation id="5207949376430453814">পাঠ্যের কার্সার হাইলাইট করুন</translation> @@ -296,6 +298,7 @@ <translation id="6376931439017688372">ব্লুটুথ চালু আছে</translation> <translation id="639644700271529076">CAPS LOCK বন্ধ আছে</translation> <translation id="6406704438230478924">altgr</translation> +<translation id="642644398083277086">সমস্ত বিজ্ঞপ্তি মুছে ফেলুন</translation> <translation id="643147933154517414">সব সম্পন্ন!</translation> <translation id="6445835306623867477"><ph name="RECEIVER_NAME" />-এ <ph name="ROUTE_TITLE" /></translation> <translation id="6452181791372256707">প্রত্যাখ্যান</translation> @@ -397,9 +400,11 @@ <translation id="8152119955266188852">ফুল-স্ক্রিন ম্যাগনিফায়ারের জন্য আপনি শর্টকাট প্রেস করেছেন। আপনি কি এটি চালু করতে চান?</translation> <translation id="8190698733819146287">ভাষা এবং ইনপুট কাস্টমাইজ করুন...</translation> <translation id="8191230140820435481">আপনার অ্যাপ্লিকেশন, এক্সটেনশন, এবং থিম পরিচালনা করুন</translation> +<translation id="8192202700944119416">বিজ্ঞপ্তি লুকানো আছে।</translation> <translation id="8261506727792406068">মুছুন</translation> <translation id="8297006494302853456">দুর্বল</translation> <translation id="8308637677604853869">পূর্ববর্তী মেনু</translation> +<translation id="8341451174107936385"><ph name="UNLOCK_MORE_FEATURES" /> <ph name="GET_STARTED" /></translation> <translation id="8351131234907093545">নোট তৈরি করুন</translation> <translation id="8392451568018454956"><ph name="USER_EMAIL_ADDRESS" /> এর জন্য বিকল্পগুলির মেনু</translation> <translation id="8406981827175133772">ফুল-স্ক্রিন ম্যাগনিফায়ার</translation> @@ -441,6 +446,7 @@ <translation id="8938800817013097409">USB-C ডিভাইস (পিছনের ডান পোর্ট)</translation> <translation id="8940956008527784070">(<ph name="PERCENTAGE" />%) কম ব্যাটারি</translation> <translation id="8984179138335769204">দ্রুত চালু করুন</translation> +<translation id="899350903320462459">বিজ্ঞপ্তির সম্পর্কিত অ্যাকশন করার জন্য <ph name="LOGIN_ID" /> হিসেবে ডিভাইস আনলক করুন</translation> <translation id="8995603266996330174">পরিচালনা করেছেন <ph name="DOMAIN" /> </translation> <translation id="9029474291399787231">Adobe Flash Player-এর আপডেট উপলভ্য</translation> <translation id="9056839673611986238">ডিভাইস রোল ব্যাক করা হবে</translation>
diff --git a/ash/strings/ash_strings_hi.xtb b/ash/strings/ash_strings_hi.xtb index 34b2239b..9d85294 100644 --- a/ash/strings/ash_strings_hi.xtb +++ b/ash/strings/ash_strings_hi.xtb
@@ -381,12 +381,12 @@ <translation id="7842569679327885685">चेतावनी: यह फ़ीचर प्रयोग के लिए है</translation> <translation id="7846634333498149051">कीबोर्ड</translation> <translation id="790040513076446191">निजता-संबंधी सेटिंग में हेरफेर करें</translation> -<translation id="7904094684485781019">इस खाते के व्यवस्थापक ने एकाधिक प्रवेश को अस्वीकार कर दिया है.</translation> +<translation id="7904094684485781019">इस खाते के व्यवस्थापक ने एक से ज़्यादा साइन-इन को अक्षम कर दिया है.</translation> <translation id="7933084174919150729">Google Assistant सिर्फ़ प्राथमिक प्रोफ़ाइल के लिए उपलब्ध है.</translation> <translation id="79341161159229895"><ph name="FIRST_PARENT_EMAIL" /> और <ph name="SECOND_PARENT_EMAIL" /> खाता संभालते हैं</translation> <translation id="7977927628060636163">मोबाइल नेटवर्क खोजे जा रहे हैं...</translation> <translation id="7982789257301363584">नेटवर्क</translation> -<translation id="7994370417837006925">एकाधिक प्रवेश</translation> +<translation id="7994370417837006925">एकाधिक साइन इन</translation> <translation id="8000066093800657092">नेटवर्क नहीं है</translation> <translation id="8029241286966751120">फ़ुलस्क्रीन पर सामग्री को बड़ा दिखाने की सुविधा चालू है. उसे बंद पर टॉगल करने के लिए Ctrl+Search+M फिर से दबाएं.</translation> <translation id="8030169304546394654">डिसकनेक्ट किया गया</translation> @@ -459,7 +459,7 @@ <translation id="9151726767154816831">अपडेट करने के लिए पुनः प्रारंभ करें और पावरवॉश करें</translation> <translation id="9179259655489829027">यह फ़ीचर आपको पासवर्ड के बिना किसी भी साइन इन किए हुए उपयोगकर्ता को जल्दी से एक्सेस करने देता है. इस फ़ीचर का इस्तेमाल सिर्फ़ अपने भरोसेमंद खातों के साथ करें.</translation> <translation id="9193626018745640770">ऐसे रिसीवर पर कास्ट किया जा रहा है जिसकी जानकारी नहीं है</translation> -<translation id="9194617393863864469">किसी अन्य उपयोगकर्ता में रूप में साइन इन करें...</translation> +<translation id="9194617393863864469">किसी अन्य उपयोगकर्ता में साइन इन करें...</translation> <translation id="9201131092683066720">बैटरी <ph name="PERCENTAGE" />% भरी हुई है.</translation> <translation id="9210037371811586452">संयुक्त डेस्कटॉप मोड से बाहर निकाला जा रहा है</translation> <translation id="9215934040295798075">वॉलपेपर सेट करें</translation>
diff --git a/ash/strings/ash_strings_iw.xtb b/ash/strings/ash_strings_iw.xtb index 27b24e4..22ff36ff 100644 --- a/ash/strings/ash_strings_iw.xtb +++ b/ash/strings/ash_strings_iw.xtb
@@ -25,6 +25,7 @@ <translation id="1346748346194534595">ימינה</translation> <translation id="1351937230027495976">כיווץ התפריט</translation> <translation id="1383876407941801731">חפש</translation> +<translation id="1419738280318246476">כדי לבצע את פעולת ההודעה יש לבטל את נעילת המכשיר</translation> <translation id="1467432559032391204">שמאלה</translation> <translation id="1484102317210609525"><ph name="DEVICE_NAME" /> (HDMI/DP)</translation> <translation id="1510238584712386396">מפעיל</translation> @@ -224,6 +225,7 @@ <translation id="4924411785043111640">הפעלה מחדש ואתחול</translation> <translation id="4961318399572185831">העברת מסך</translation> <translation id="5069971504769299223">מנהל המכשיר עשוי לעקוב אחרי הפעילות שלך.</translation> +<translation id="5083553833479578423">יש לך אפשרות להפעיל תכונות Assistant נוספות.</translation> <translation id="5136175204352732067">חוברה מקלדת אחרת</translation> <translation id="5168181903108465623">מכשירי העברה זמינים</translation> <translation id="5207949376430453814">הדגשה של סמן הטקסט</translation> @@ -295,6 +297,7 @@ <translation id="6376931439017688372">Bluetooth פועל</translation> <translation id="639644700271529076">CAPS LOCK כבוי</translation> <translation id="6406704438230478924">altgr</translation> +<translation id="642644398083277086">ניקוי כל ההודעות</translation> <translation id="643147933154517414">הפעולה הושלמה</translation> <translation id="6445835306623867477"><ph name="ROUTE_TITLE" /> במכשיר <ph name="RECEIVER_NAME" /></translation> <translation id="6452181791372256707">דחה</translation> @@ -398,9 +401,11 @@ <translation id="8152119955266188852">לחצת על מקש הקיצור של זכוכית מגדלת במסך מלא. להפעיל אותה?</translation> <translation id="8190698733819146287">התאם אישית שפה וקלט...</translation> <translation id="8191230140820435481">לנהל את היישומים, התוספים והעיצובים שלך</translation> +<translation id="8192202700944119416">ההודעות מוסתרות.</translation> <translation id="8261506727792406068">מחיקה</translation> <translation id="8297006494302853456">חלש</translation> <translation id="8308637677604853869">התפריט הקודם</translation> +<translation id="8341451174107936385"><ph name="UNLOCK_MORE_FEATURES" /> <ph name="GET_STARTED" /></translation> <translation id="8351131234907093545">יצירת הערה</translation> <translation id="8392451568018454956">תפריט אפשרויות עבור <ph name="USER_EMAIL_ADDRESS" /></translation> <translation id="8406981827175133772">זכוכית מגדלת במסך מלא</translation> @@ -442,6 +447,7 @@ <translation id="8938800817013097409">מכשיר עם יציאת USB-C (יציאה ימנית מאחור)</translation> <translation id="8940956008527784070">סוללה חלשה (<ph name="PERCENTAGE" />%)</translation> <translation id="8984179138335769204">פתיחה מהירה</translation> +<translation id="899350903320462459">יש לבטל את נעילת המכשיר כ-<ph name="LOGIN_ID" /> על מנת לבצע את פעולת ההודעה</translation> <translation id="8995603266996330174">מנוהל על ידי <ph name="DOMAIN" /></translation> <translation id="9029474291399787231">יש עדכון בשביל Adobe Flash Player</translation> <translation id="9056839673611986238">המכשיר יוחזר למצב קודם</translation>
diff --git a/ash/strings/ash_strings_no.xtb b/ash/strings/ash_strings_no.xtb index 208cd9df..4131faa 100644 --- a/ash/strings/ash_strings_no.xtb +++ b/ash/strings/ash_strings_no.xtb
@@ -25,6 +25,7 @@ <translation id="1346748346194534595">Høyre</translation> <translation id="1351937230027495976">Skjul menyen</translation> <translation id="1383876407941801731">Søk</translation> +<translation id="1419738280318246476">Lås opp enheten for å utføre varselhandlinger</translation> <translation id="1467432559032391204">Venstre</translation> <translation id="1484102317210609525"><ph name="DEVICE_NAME" /> (HDMI/DP)</translation> <translation id="1510238584712386396">Appvelger</translation> @@ -224,6 +225,7 @@ <translation id="4924411785043111640">Start på nytt og tilbakestill</translation> <translation id="4961318399572185831">Cast skjermen</translation> <translation id="5069971504769299223">Enhetsadministratoren kan muligens overvåke aktiviteten din.</translation> +<translation id="5083553833479578423">Lås opp flere Assistent-funksjoner.</translation> <translation id="5136175204352732067">Et annet tastatur er koblet til</translation> <translation id="5168181903108465623">Cast-enheter er tilgjengelige</translation> <translation id="5207949376430453814">Fremhev tekstinnsettingspunktet</translation> @@ -295,6 +297,7 @@ <translation id="6376931439017688372">Bluetooth er på</translation> <translation id="639644700271529076">CAPS LOCK er av</translation> <translation id="6406704438230478924">alt gr</translation> +<translation id="642644398083277086">Fjern alle varsler</translation> <translation id="643147933154517414">Ingen varsler</translation> <translation id="6445835306623867477"><ph name="ROUTE_TITLE" /> på <ph name="RECEIVER_NAME" /></translation> <translation id="6452181791372256707">Avslå</translation> @@ -396,9 +399,11 @@ <translation id="8152119955266188852">Du trykket på snarveien for lupen for hele skjermen. Vil du slå den på?</translation> <translation id="8190698733819146287">Tilpass språk og inndata</translation> <translation id="8191230140820435481">Administrering av programmer, utvidelser og temaer</translation> +<translation id="8192202700944119416">Varsler er skjult.</translation> <translation id="8261506727792406068">Slett</translation> <translation id="8297006494302853456">Svak</translation> <translation id="8308637677604853869">Forrige meny</translation> +<translation id="8341451174107936385"><ph name="UNLOCK_MORE_FEATURES" /><ph name="GET_STARTED" /></translation> <translation id="8351131234907093545">Opprett et notat</translation> <translation id="8392451568018454956">Alternativmenyen for <ph name="USER_EMAIL_ADDRESS" /></translation> <translation id="8406981827175133772">Lupe for hele skjermen</translation> @@ -440,6 +445,7 @@ <translation id="8938800817013097409">USB-C-enhet (høyre port på baksiden)</translation> <translation id="8940956008527784070">Lavt batterinivå (<ph name="PERCENTAGE" /> %)</translation> <translation id="8984179138335769204">Hurtigtaster</translation> +<translation id="899350903320462459">Lås opp enheter som <ph name="LOGIN_ID" /> for å utføre varselhandlinger</translation> <translation id="8995603266996330174">Drevet av <ph name="DOMAIN" /></translation> <translation id="9029474291399787231">En oppdatering av Adobe Flash Player er tilgjengelig</translation> <translation id="9056839673611986238">Enheten blir tilbakestilt til forrige versjon</translation>
diff --git a/ash/strings/ash_strings_sr.xtb b/ash/strings/ash_strings_sr.xtb index 0d87ed7..05b95f5 100644 --- a/ash/strings/ash_strings_sr.xtb +++ b/ash/strings/ash_strings_sr.xtb
@@ -203,7 +203,7 @@ <translation id="4508225577814909926"><ph name="NAME" />: Повезује се...</translation> <translation id="4513946894732546136">Повратне информације</translation> <translation id="4527045527269911712">Bluetooth уређај „<ph name="DEVICE_NAME" />“ жели дозволу за упаривање.</translation> -<translation id="453661520163887813"><ph name="TIME" /> док се не напуни</translation> +<translation id="453661520163887813"><ph name="TIME" /> до краја пуњења</translation> <translation id="4544944664594876241">Пречица за закључавање екрана је промењена. Користите <ph name="NEW_SHORTCUT" /> уместо <ph name="OLD_SHORTCUT" />.</translation> <translation id="4564869809620998694">Услуга за фонтове</translation> <translation id="4570957409596482333">Дугме Изаберите за говор</translation>
diff --git a/ash/system/audio/unified_volume_slider_controller.cc b/ash/system/audio/unified_volume_slider_controller.cc index a1377db..fbf3775 100644 --- a/ash/system/audio/unified_volume_slider_controller.cc +++ b/ash/system/audio/unified_volume_slider_controller.cc
@@ -61,11 +61,9 @@ CrasAudioHandler::Get()->SetOutputVolumePercent(level); // If the volume is above certain level and it's muted, it should be unmuted. - // If the volume is below certain level and it's unmuted, it should be muted. - if (CrasAudioHandler::Get()->IsOutputMuted() == + if (CrasAudioHandler::Get()->IsOutputMuted() && level > CrasAudioHandler::Get()->GetOutputDefaultVolumeMuteThreshold()) { - CrasAudioHandler::Get()->SetOutputMute( - !CrasAudioHandler::Get()->IsOutputMuted()); + CrasAudioHandler::Get()->SetOutputMute(false); } }
diff --git a/ash/system/audio/unified_volume_view.cc b/ash/system/audio/unified_volume_view.cc index 4768c6e..6ce281d 100644 --- a/ash/system/audio/unified_volume_view.cc +++ b/ash/system/audio/unified_volume_view.cc
@@ -32,7 +32,6 @@ // References to the icons that correspond to different volume levels. const gfx::VectorIcon* const kVolumeLevelIcons[] = { - &kUnifiedMenuVolumeMuteIcon, // Muted. &kUnifiedMenuVolumeLowIcon, // Low volume. &kUnifiedMenuVolumeMediumIcon, // Medium volume. &kUnifiedMenuVolumeHighIcon, // High volume. @@ -144,7 +143,8 @@ slider()->UpdateState(!is_muted); button()->SetToggled(!is_muted); - button()->SetVectorIcon(GetVolumeIconForLevel(is_muted ? 0.f : level)); + button()->SetVectorIcon(is_muted ? kUnifiedMenuVolumeMuteIcon + : GetVolumeIconForLevel(level)); more_button_->SetVisible(CrasAudioHandler::Get()->has_alternative_input() || CrasAudioHandler::Get()->has_alternative_output());
diff --git a/ash/system/network/network_state_list_detailed_view.cc b/ash/system/network/network_state_list_detailed_view.cc index 914540a..81acf0a0 100644 --- a/ash/system/network/network_state_list_detailed_view.cc +++ b/ash/system/network/network_state_list_detailed_view.cc
@@ -23,7 +23,7 @@ #include "chromeos/network/network_state_handler.h" #include "third_party/cros_system_api/dbus/service_constants.h" #include "ui/base/l10n/l10n_util.h" -#include "ui/views/bubble/bubble_dialog_delegate.h" +#include "ui/views/bubble/bubble_dialog_delegate_view.h" #include "ui/views/controls/button/button.h" #include "ui/views/controls/label.h" #include "ui/views/layout/fill_layout.h"
diff --git a/ash/system/palette/palette_welcome_bubble.cc b/ash/system/palette/palette_welcome_bubble.cc index f717b9e..febe3fa 100644 --- a/ash/system/palette/palette_welcome_bubble.cc +++ b/ash/system/palette/palette_welcome_bubble.cc
@@ -15,7 +15,7 @@ #include "components/prefs/pref_service.h" #include "ui/aura/window.h" #include "ui/base/l10n/l10n_util.h" -#include "ui/views/bubble/bubble_dialog_delegate.h" +#include "ui/views/bubble/bubble_dialog_delegate_view.h" #include "ui/views/controls/label.h" #include "ui/views/layout/fill_layout.h"
diff --git a/ash/system/tray/tray_constants.h b/ash/system/tray/tray_constants.h index 129aef0..3043292 100644 --- a/ash/system/tray/tray_constants.h +++ b/ash/system/tray/tray_constants.h
@@ -134,9 +134,10 @@ extern const int kTrayPopupSystemInfoRowHeight; // The colors used when --enable-features=SystemTrayUnified flag is enabled. -constexpr SkColor kUnifiedMenuBackgroundColor = SkColorSetRGB(0x20, 0x21, 0x24); +constexpr SkColor kUnifiedMenuBackgroundColor = + SkColorSetARGB(0xf2, 0x20, 0x21, 0x24); constexpr SkColor kUnifiedMenuBackgroundColorWithBlur = - SkColorSetA(kUnifiedMenuBackgroundColor, 0xB3); + SkColorSetA(kUnifiedMenuBackgroundColor, 0x99); constexpr float kUnifiedMenuBackgroundBlur = 30.f; constexpr SkColor kUnifiedMenuTextColor = SkColorSetRGB(0xf1, 0xf3, 0xf4); constexpr SkColor kUnifiedMenuIconColor = SkColorSetRGB(0xf1, 0xf3, 0xf4);
diff --git a/ash/test/ash_test_base.h b/ash/test/ash_test_base.h index 499c5a6..99031ea 100644 --- a/ash/test/ash_test_base.h +++ b/ash/test/ash_test_base.h
@@ -85,7 +85,7 @@ // Call this only if this code is being run outside of ash, for example, in // browser tests that use AshTestBase. This disables CHECKs that are // applicable only when used inside ash. - // TODO: remove this and ban usage of AshTestHelper outside of ash. + // TODO: remove this and ban usage of AshTestBase outside of ash. void SetRunningOutsideAsh(); // Update the display configuration as given in |display_specs|.
diff --git a/ash/wm/immersive_focus_watcher_classic.cc b/ash/wm/immersive_focus_watcher_classic.cc index b9e1ca4..91ade230 100644 --- a/ash/wm/immersive_focus_watcher_classic.cc +++ b/ash/wm/immersive_focus_watcher_classic.cc
@@ -6,7 +6,7 @@ #include "ash/public/cpp/immersive/immersive_fullscreen_controller.h" #include "ui/aura/window.h" -#include "ui/views/bubble/bubble_dialog_delegate.h" +#include "ui/views/bubble/bubble_dialog_delegate_view.h" #include "ui/views/view.h" #include "ui/views/widget/widget.h" #include "ui/wm/core/transient_window_manager.h"
diff --git a/ash/wm/immersive_fullscreen_controller_unittest.cc b/ash/wm/immersive_fullscreen_controller_unittest.cc index 8e5819c..176c5bc 100644 --- a/ash/wm/immersive_fullscreen_controller_unittest.cc +++ b/ash/wm/immersive_fullscreen_controller_unittest.cc
@@ -29,7 +29,7 @@ #include "ui/events/test/event_generator.h" #include "ui/events/test/test_event_handler.h" #include "ui/gfx/animation/slide_animation.h" -#include "ui/views/bubble/bubble_dialog_delegate.h" +#include "ui/views/bubble/bubble_dialog_delegate_view.h" #include "ui/views/controls/native/native_view_host.h" #include "ui/views/view.h" #include "ui/views/widget/widget.h"
diff --git a/base/android/content_uri_utils.cc b/base/android/content_uri_utils.cc index a7955dca..c8553c46 100644 --- a/base/android/content_uri_utils.cc +++ b/base/android/content_uri_utils.cc
@@ -42,4 +42,22 @@ return base::android::ConvertJavaStringToUTF8(env, j_mime.obj()); } +bool MaybeGetFileDisplayName(const FilePath& content_uri, + base::string16* file_display_name) { + DCHECK(content_uri.IsContentUri()); + DCHECK(file_display_name); + + JNIEnv* env = base::android::AttachCurrentThread(); + ScopedJavaLocalRef<jstring> j_uri = + ConvertUTF8ToJavaString(env, content_uri.value()); + ScopedJavaLocalRef<jstring> j_display_name = + Java_ContentUriUtils_maybeGetDisplayName(env, j_uri); + + if (j_display_name.is_null()) + return false; + + *file_display_name = base::android::ConvertJavaStringToUTF16(j_display_name); + return true; +} + } // namespace base
diff --git a/base/android/content_uri_utils.h b/base/android/content_uri_utils.h index 6d817c0..544a8db 100644 --- a/base/android/content_uri_utils.h +++ b/base/android/content_uri_utils.h
@@ -24,6 +24,10 @@ // invalid. BASE_EXPORT std::string GetContentUriMimeType(const FilePath& content_uri); +// Gets the display name from a content URI. Returns true if the name was found. +BASE_EXPORT bool MaybeGetFileDisplayName(const FilePath& content_uri, + base::string16* file_display_name); + } // namespace base #endif // BASE_ANDROID_CONTENT_URI_UTILS_H_
diff --git a/base/android/java/src/org/chromium/base/ContentUriUtils.java b/base/android/java/src/org/chromium/base/ContentUriUtils.java index ba92a56c..add7e8c 100644 --- a/base/android/java/src/org/chromium/base/ContentUriUtils.java +++ b/base/android/java/src/org/chromium/base/ContentUriUtils.java
@@ -12,6 +12,9 @@ import android.os.Build; import android.os.ParcelFileDescriptor; import android.provider.DocumentsContract; +import android.provider.MediaStore; +import android.support.annotation.Nullable; +import android.text.TextUtils; import android.util.Log; import android.webkit.MimeTypeMap; @@ -209,6 +212,22 @@ } /** + * Method to resolve the display name of a content URI if possible. + * + * @param uriString the content URI to look up. + * @return the display name of the uri if present in the database or null otherwise. + */ + @Nullable + @CalledByNative + public static String maybeGetDisplayName(String uriString) { + Uri uri = Uri.parse(uriString); + String displayName = getDisplayName( + uri, ContextUtils.getApplicationContext(), MediaStore.MediaColumns.DISPLAY_NAME); + + return TextUtils.isEmpty(displayName) ? null : displayName; + } + + /** * Checks whether the passed Uri represents a virtual document. * * @param uri the content URI to be resolved.
diff --git a/base/atomic_ref_count.h b/base/atomic_ref_count.h index 3ffa017..5e48c82 100644 --- a/base/atomic_ref_count.h +++ b/base/atomic_ref_count.h
@@ -19,11 +19,13 @@ : ref_count_(initial_value) {} // Increment a reference count. - void Increment() { Increment(1); } + // Returns the previous value of the count. + int Increment() { return Increment(1); } // Increment a reference count by "increment", which must exceed 0. - void Increment(int increment) { - ref_count_.fetch_add(increment, std::memory_order_relaxed); + // Returns the previous value of the count. + int Increment(int increment) { + return ref_count_.fetch_add(increment, std::memory_order_relaxed); } // Decrement a reference count, and return whether the result is non-zero.
diff --git a/base/memory/ref_counted.cc b/base/memory/ref_counted.cc index e2887045..38cd495 100644 --- a/base/memory/ref_counted.cc +++ b/base/memory/ref_counted.cc
@@ -48,6 +48,9 @@ void RefCountedThreadSafeBase::AddRef() const { AddRefImpl(); } +void RefCountedThreadSafeBase::AddRefWithCheck() const { + AddRefWithCheckImpl(); +} #endif #if DCHECK_IS_ON()
diff --git a/base/memory/ref_counted.h b/base/memory/ref_counted.h index d826c9581..e1c78de9 100644 --- a/base/memory/ref_counted.h +++ b/base/memory/ref_counted.h
@@ -171,10 +171,12 @@ // Returns true if the object should self-delete. bool Release() const { return ReleaseImpl(); } void AddRef() const { AddRefImpl(); } + void AddRefWithCheck() const { AddRefWithCheckImpl(); } #else // Returns true if the object should self-delete. bool Release() const; void AddRef() const; + void AddRefWithCheck() const; #endif private: @@ -199,6 +201,17 @@ ref_count_.Increment(); } + ALWAYS_INLINE void AddRefWithCheckImpl() const { +#if DCHECK_IS_ON() + DCHECK(!in_dtor_); + DCHECK(!needs_adopt_ref_) + << "This RefCounted object is created with non-zero reference count." + << " The first reference to such a object has to be made by AdoptRef or" + << " MakeRefCounted."; +#endif + CHECK(ref_count_.Increment() > 0); + } + ALWAYS_INLINE bool ReleaseImpl() const { #if DCHECK_IS_ON() DCHECK(!in_dtor_); @@ -379,9 +392,7 @@ explicit RefCountedThreadSafe() : subtle::RefCountedThreadSafeBase(T::kRefCountPreference) {} - void AddRef() const { - subtle::RefCountedThreadSafeBase::AddRef(); - } + void AddRef() const { AddRefImpl(T::kRefCountPreference); } void Release() const { if (subtle::RefCountedThreadSafeBase::Release()) { @@ -400,6 +411,14 @@ delete x; } + void AddRefImpl(subtle::StartRefCountFromZeroTag) const { + subtle::RefCountedThreadSafeBase::AddRef(); + } + + void AddRefImpl(subtle::StartRefCountFromOneTag) const { + subtle::RefCountedThreadSafeBase::AddRefWithCheck(); + } + DISALLOW_COPY_AND_ASSIGN(RefCountedThreadSafe); };
diff --git a/base/memory/ref_counted_delete_on_sequence.h b/base/memory/ref_counted_delete_on_sequence.h index dd301063..4a8ac74 100644 --- a/base/memory/ref_counted_delete_on_sequence.h +++ b/base/memory/ref_counted_delete_on_sequence.h
@@ -45,7 +45,7 @@ DCHECK(owning_task_runner_); } - void AddRef() const { subtle::RefCountedThreadSafeBase::AddRef(); } + void AddRef() const { AddRefImpl(T::kRefCountPreference); } void Release() const { if (subtle::RefCountedThreadSafeBase::Release()) @@ -72,6 +72,14 @@ owning_task_runner_->DeleteSoon(FROM_HERE, t); } + void AddRefImpl(subtle::StartRefCountFromZeroTag) const { + subtle::RefCountedThreadSafeBase::AddRef(); + } + + void AddRefImpl(subtle::StartRefCountFromOneTag) const { + subtle::RefCountedThreadSafeBase::AddRefWithCheck(); + } + const scoped_refptr<SequencedTaskRunner> owning_task_runner_; DISALLOW_COPY_AND_ASSIGN(RefCountedDeleteOnSequence);
diff --git a/base/task/sequence_manager/task_queue_impl.cc b/base/task/sequence_manager/task_queue_impl.cc index c67b8199..d7d37a6 100644 --- a/base/task/sequence_manager/task_queue_impl.cc +++ b/base/task/sequence_manager/task_queue_impl.cc
@@ -341,6 +341,10 @@ AutoLock immediate_incoming_queue_lock(immediate_incoming_queue_lock_); queue->swap(immediate_incoming_queue()); + // Since |immediate_incoming_queue| is empty, now is a good time to consider + // reducing it's capacity if we're wasting memory. + immediate_incoming_queue().MaybeShrinkQueue(); + // Activate delayed fence if necessary. This is ideologically similar to // ActivateDelayedFenceIfNeeded, but due to immediate tasks being posted // from any thread we can't generate an enqueue order for the fence there, @@ -518,6 +522,13 @@ state->SetInteger("delayed_work_queue_size", main_thread_only().delayed_work_queue->Size()); + state->SetInteger("immediate_incoming_queue_capacity", + immediate_incoming_queue().capacity()); + state->SetInteger("immediate_work_queue_capacity", + immediate_work_queue()->Capacity()); + state->SetInteger("delayed_work_queue_capacity", + delayed_work_queue()->Capacity()); + if (!main_thread_only().delayed_incoming_queue.empty()) { TimeDelta delay_to_next_task = (main_thread_only().delayed_incoming_queue.top().delayed_run_time - @@ -879,6 +890,9 @@ main_thread_only().delayed_incoming_queue = std::move(remaining_tasks); + // Also consider shrinking the work queue if it's wasting memory. + main_thread_only().delayed_work_queue->MaybeShrinkQueue(); + LazyNow lazy_now(now); UpdateDelayedWakeUp(&lazy_now); }
diff --git a/base/task/sequence_manager/task_queue_impl.h b/base/task/sequence_manager/task_queue_impl.h index 07a99d14..323e20b 100644 --- a/base/task/sequence_manager/task_queue_impl.h +++ b/base/task/sequence_manager/task_queue_impl.h
@@ -12,7 +12,6 @@ #include <set> #include "base/callback.h" -#include "base/containers/circular_deque.h" #include "base/macros.h" #include "base/memory/weak_ptr.h" #include "base/message_loop/message_loop.h" @@ -393,7 +392,7 @@ // empty. void PushOntoImmediateIncomingQueueLocked(Task task); - using TaskDeque = circular_deque<Task>; + using TaskDeque = LazilyDeallocatedDeque<Task>; // Extracts all the tasks from the immediate incoming queue and swaps it with // |queue| which must be empty.
diff --git a/base/task/sequence_manager/work_queue.cc b/base/task/sequence_manager/work_queue.cc index 4d95f4b..6e9092c 100644 --- a/base/task/sequence_manager/work_queue.cc +++ b/base/task/sequence_manager/work_queue.cc
@@ -67,7 +67,7 @@ #endif // Make sure the |enqueue_order()| is monotonically increasing. - DCHECK(was_empty || tasks_.rbegin()->enqueue_order() < task.enqueue_order()); + DCHECK(was_empty || tasks_.back().enqueue_order() < task.enqueue_order()); // Amoritized O(1). tasks_.push_back(std::move(task)); @@ -133,9 +133,16 @@ TaskQueueImpl::Task pending_task = std::move(tasks_.front()); tasks_.pop_front(); // NB immediate tasks have a different pipeline to delayed ones. - if (queue_type_ == QueueType::kImmediate && tasks_.empty()) { - // Short-circuit the queue reload so that OnPopQueue does the right thing. - task_queue_->ReloadEmptyImmediateQueue(&tasks_); + if (tasks_.empty()) { + // NB delayed tasks are inserted via Push, no don't need to reload those. + if (queue_type_ == QueueType::kImmediate) { + // Short-circuit the queue reload so that OnPopQueue does the right + // thing. + task_queue_->ReloadEmptyImmediateQueue(&tasks_); + } + // Since the queue is empty, now is a good time to consider reducing it's + // capacity if we're wasting memory. + tasks_.MaybeShrinkQueue(); } // OnPopQueue calls GetFrontTaskEnqueueOrder which checks BlockedByFence() so @@ -154,10 +161,16 @@ task_removed = true; } if (task_removed) { - // NB immediate tasks have a different pipeline to delayed ones. - if (queue_type_ == QueueType::kImmediate && tasks_.empty()) { - // Short-circuit the queue reload so that OnPopQueue does the right thing. - task_queue_->ReloadEmptyImmediateQueue(&tasks_); + if (tasks_.empty()) { + // NB delayed tasks are inserted via Push, no don't need to reload those. + if (queue_type_ == QueueType::kImmediate) { + // Short-circuit the queue reload so that OnPopQueue does the right + // thing. + task_queue_->ReloadEmptyImmediateQueue(&tasks_); + } + // Since the queue is empty, now is a good time to consider reducing it's + // capacity if we're wasting memory. + tasks_.MaybeShrinkQueue(); } work_queue_sets_->OnPopQueue(this); task_queue_->TraceQueueSize(); @@ -231,6 +244,10 @@ tasks_.pop_front(); } +void WorkQueue::MaybeShrinkQueue() { + tasks_.MaybeShrinkQueue(); +} + } // namespace internal } // namespace sequence_manager } // namespace base
diff --git a/base/task/sequence_manager/work_queue.h b/base/task/sequence_manager/work_queue.h index 5197949..06dca78 100644 --- a/base/task/sequence_manager/work_queue.h +++ b/base/task/sequence_manager/work_queue.h
@@ -77,6 +77,8 @@ size_t Size() const { return tasks_.size(); } + size_t Capacity() const { return tasks_.capacity(); } + // 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. @@ -130,6 +132,9 @@ // Test support function. This should not be used in production code. void PopTaskForTesting(); + // Shrinks |tasks_| if it's wasting memory. + void MaybeShrinkQueue(); + private: bool InsertFenceImpl(EnqueueOrder fence);
diff --git a/base/task/task_scheduler/scheduler_worker_pool_impl.cc b/base/task/task_scheduler/scheduler_worker_pool_impl.cc index 38d5d86..ceafcba 100644 --- a/base/task/task_scheduler/scheduler_worker_pool_impl.cc +++ b/base/task/task_scheduler/scheduler_worker_pool_impl.cc
@@ -49,6 +49,7 @@ "TaskScheduler.NumTasksBeforeDetach."; constexpr char kNumTasksBetweenWaitsHistogramPrefix[] = "TaskScheduler.NumTasksBetweenWaits."; +constexpr char kNumThreadsHistogramPrefix[] = "TaskScheduler.NumWorkers."; constexpr size_t kMaxNumberOfWorkers = 256; // Only used in DCHECKs. @@ -196,6 +197,18 @@ 100, 50, HistogramBase::kUmaTargetedHistogramFlag)), + // Mimics the UMA_HISTOGRAM_COUNTS_100 macro. A SchedulerWorkerPool is + // expected to run between zero and a few tens of workers. + // When it runs more than 100 worker, there is no need to know the exact + // number of workers that ran. + num_workers_histogram_(Histogram::FactoryGet( + JoinString( + {kNumThreadsHistogramPrefix, histogram_label, kPoolNameSuffix}, + ""), + 1, + 100, + 50, + HistogramBase::kUmaTargetedHistogramFlag)), tracked_ref_factory_(this) { DCHECK(!histogram_label.empty()); DCHECK(!pool_label_.empty()); @@ -270,6 +283,7 @@ std::vector<const HistogramBase*>* histograms) const { histograms->push_back(detach_duration_histogram_); histograms->push_back(num_tasks_between_waits_histogram_); + histograms->push_back(num_workers_histogram_); } int SchedulerWorkerPoolImpl::GetMaxConcurrentNonBlockedTasksDeprecated() const { @@ -360,6 +374,11 @@ maximum_blocked_threshold_for_testing_.Set(); } +void SchedulerWorkerPoolImpl::RecordNumWorkersHistogram() const { + AutoSchedulerLock auto_lock(lock_); + num_workers_histogram_->Add(workers_.size()); +} + SchedulerWorkerPoolImpl::SchedulerWorkerDelegateImpl:: SchedulerWorkerDelegateImpl(TrackedRef<SchedulerWorkerPoolImpl> outer) : outer_(std::move(outer)) {
diff --git a/base/task/task_scheduler/scheduler_worker_pool_impl.h b/base/task/task_scheduler/scheduler_worker_pool_impl.h index 5ff2992b..ef9edb1 100644 --- a/base/task/task_scheduler/scheduler_worker_pool_impl.h +++ b/base/task/task_scheduler/scheduler_worker_pool_impl.h
@@ -106,6 +106,10 @@ return num_tasks_between_waits_histogram_; } + const HistogramBase* num_workers_histogram() const { + return num_workers_histogram_; + } + void GetHistograms(std::vector<const HistogramBase*>* histograms) const; // Returns the maximum number of non-blocked tasks that can run concurrently @@ -141,6 +145,9 @@ // Sets the MayBlock waiting threshold to TimeDelta::Max(). void MaximizeMayBlockThresholdForTesting(); + // Records number of worker. + void RecordNumWorkersHistogram() const; + private: class SchedulerWorkerDelegateImpl; @@ -334,6 +341,10 @@ // Intentionally leaked. HistogramBase* const num_tasks_between_waits_histogram_; + // TaskScheduler.NumWorkers.[worker pool name] histogram. + // Intentionally leaked. + HistogramBase* const num_workers_histogram_; + scoped_refptr<TaskRunner> service_thread_task_runner_; // Optional observer notified when a worker enters and exits its main
diff --git a/base/task/task_scheduler/scheduler_worker_pool_impl_unittest.cc b/base/task/task_scheduler/scheduler_worker_pool_impl_unittest.cc index d173d41..f202f864 100644 --- a/base/task/task_scheduler/scheduler_worker_pool_impl_unittest.cc +++ b/base/task/task_scheduler/scheduler_worker_pool_impl_unittest.cc
@@ -35,6 +35,7 @@ #include "base/task_runner.h" #include "base/test/bind_test_util.h" #include "base/test/gtest_util.h" +#include "base/test/metrics/histogram_tester.h" #include "base/test/test_simple_task_runner.h" #include "base/test/test_timeouts.h" #include "base/threading/platform_thread.h" @@ -1700,5 +1701,13 @@ worker_pool_.reset(); } +TEST_P(TaskSchedulerWorkerPoolImplTestParam, RecordNumWorkersHistogram) { + HistogramTester tester; + worker_pool_->RecordNumWorkersHistogram(); + EXPECT_FALSE( + tester.GetAllSamples("TaskScheduler.NumWorkers.TestWorkerPoolPool") + .empty()); +} + } // namespace internal } // namespace base
diff --git a/base/task/task_scheduler/service_thread.cc b/base/task/task_scheduler/service_thread.cc index 8beadd60..5d630237 100644 --- a/base/task/task_scheduler/service_thread.cc +++ b/base/task/task_scheduler/service_thread.cc
@@ -23,8 +23,14 @@ } // namespace -ServiceThread::ServiceThread(const TaskTracker* task_tracker) - : Thread("TaskSchedulerServiceThread"), task_tracker_(task_tracker) {} +ServiceThread::ServiceThread(const TaskTracker* task_tracker, + RepeatingClosure report_heartbeat_metrics_callback) + : Thread("TaskSchedulerServiceThread"), + task_tracker_(task_tracker), + report_heartbeat_metrics_callback_( + std::move(report_heartbeat_metrics_callback)) {} + +ServiceThread::~ServiceThread() = default; // static void ServiceThread::SetHeartbeatIntervalForTesting(TimeDelta heartbeat) { @@ -35,17 +41,17 @@ // In unit tests we sometimes do not have a fully functional TaskScheduler // environment, do not perform the heartbeat report in that case since it // relies on such an environment. - if (task_tracker_ && TaskScheduler::GetInstance()) { + if (TaskScheduler::GetInstance()) { // Compute the histogram every hour (with a slight offset to drift if that // hour tick happens to line up with specific events). Once per hour per // user was deemed sufficient to gather a reliable metric. constexpr TimeDelta kHeartbeat = TimeDelta::FromMinutes(59); - heartbeat_latency_timer_.Start( + heartbeat_metrics_timer_.Start( FROM_HERE, g_heartbeat_for_testing.is_zero() ? kHeartbeat : g_heartbeat_for_testing, - BindRepeating(&ServiceThread::PerformHeartbeatLatencyReport, + BindRepeating(&ServiceThread::ReportHeartbeatMetrics, Unretained(this))); } } @@ -56,7 +62,15 @@ base::debug::Alias(&line_number); } +void ServiceThread::ReportHeartbeatMetrics() const { + report_heartbeat_metrics_callback_.Run(); + PerformHeartbeatLatencyReport(); +} + void ServiceThread::PerformHeartbeatLatencyReport() const { + if (!task_tracker_) + return; + static constexpr TaskTraits kReportedTraits[] = { {TaskPriority::BEST_EFFORT}, {TaskPriority::BEST_EFFORT, MayBlock()}, {TaskPriority::USER_VISIBLE}, {TaskPriority::USER_VISIBLE, MayBlock()},
diff --git a/base/task/task_scheduler/service_thread.h b/base/task/task_scheduler/service_thread.h index cc5c0d0d..1790622 100644 --- a/base/task/task_scheduler/service_thread.h +++ b/base/task/task_scheduler/service_thread.h
@@ -24,11 +24,15 @@ // and make it easier to identify the service thread in stack traces. class BASE_EXPORT ServiceThread : public Thread { public: - // Constructs a ServiceThread which will report latency metrics through - // |task_tracker| if non-null. In that case, this ServiceThread will assume a - // registered TaskScheduler instance and that |task_tracker| will outlive this - // ServiceThread. - explicit ServiceThread(const TaskTracker* task_tracker); + // Constructs a ServiceThread which will record heartbeat metrics. This + // includes metrics recorded through |report_heartbeat_metrics_callback|, + // in addition to latency metrics through |task_tracker| if non-null. In that + // case, this ServiceThread will assume a registered TaskScheduler instance + // and that |task_tracker| will outlive this ServiceThread. + explicit ServiceThread(const TaskTracker* task_tracker, + RepeatingClosure report_heartbeat_metrics_callback); + + ~ServiceThread() override; // Overrides the default interval at which |heartbeat_latency_timer_| fires. // Call this with a |heartbeat| of zero to undo the override. @@ -40,16 +44,20 @@ void Init() override; void Run(RunLoop* run_loop) override; + void ReportHeartbeatMetrics() const; + // Kicks off a single async task which will record a histogram on the latency // of a randomly chosen set of TaskTraits. void PerformHeartbeatLatencyReport() const; const TaskTracker* const task_tracker_; - // Fires a recurring heartbeat task to record latency histograms which are - // independent from any execution sequence. This is done on the service thread - // to avoid all external dependencies (even main thread). - base::RepeatingTimer heartbeat_latency_timer_; + // Fires a recurring heartbeat task to record metrics which are independent + // from any execution sequence. This is done on the service thread to avoid + // all external dependencies (even main thread). + base::RepeatingTimer heartbeat_metrics_timer_; + + RepeatingClosure report_heartbeat_metrics_callback_; DISALLOW_COPY_AND_ASSIGN(ServiceThread); };
diff --git a/base/task/task_scheduler/service_thread_unittest.cc b/base/task/task_scheduler/service_thread_unittest.cc index 4f9c405..646dd51 100644 --- a/base/task/task_scheduler/service_thread_unittest.cc +++ b/base/task/task_scheduler/service_thread_unittest.cc
@@ -43,7 +43,7 @@ #endif TEST(TaskSchedulerServiceThreadTest, MAYBE_StackHasIdentifyingFrame) { - ServiceThread service_thread(nullptr); + ServiceThread service_thread(nullptr, DoNothing()); service_thread.Start(); service_thread.task_runner()->PostTask(
diff --git a/base/task/task_scheduler/task_scheduler_impl.cc b/base/task/task_scheduler/task_scheduler_impl.cc index e3db50f8..4903625 100644 --- a/base/task/task_scheduler/task_scheduler_impl.cc +++ b/base/task/task_scheduler/task_scheduler_impl.cc
@@ -8,6 +8,8 @@ #include <string> #include <utility> +#include "base/bind.h" +#include "base/bind_helpers.h" #include "base/compiler_specific.h" #include "base/message_loop/message_loop.h" #include "base/metrics/field_trial_params.h" @@ -34,7 +36,10 @@ StringPiece histogram_label, std::unique_ptr<TaskTrackerImpl> task_tracker) : task_tracker_(std::move(task_tracker)), - service_thread_(std::make_unique<ServiceThread>(task_tracker_.get())), + service_thread_(std::make_unique<ServiceThread>( + task_tracker_.get(), + BindRepeating(&TaskSchedulerImpl::ReportHeartbeatMetrics, + Unretained(this)))), single_thread_task_runner_manager_(task_tracker_->GetTrackedRef(), &delayed_task_manager_) { DCHECK(!histogram_label.empty()); @@ -276,5 +281,10 @@ : traits; } +void TaskSchedulerImpl::ReportHeartbeatMetrics() const { + for (const auto& worker_pool : worker_pools_) + worker_pool->RecordNumWorkersHistogram(); +} + } // namespace internal } // namespace base
diff --git a/base/task/task_scheduler/task_scheduler_impl.h b/base/task/task_scheduler/task_scheduler_impl.h index cfe538f..f435059 100644 --- a/base/task/task_scheduler/task_scheduler_impl.h +++ b/base/task/task_scheduler/task_scheduler_impl.h
@@ -97,6 +97,8 @@ // |all_tasks_user_blocking_| is set. TaskTraits SetUserBlockingPriorityIfNeeded(const TaskTraits& traits) const; + void ReportHeartbeatMetrics() const; + const std::unique_ptr<TaskTrackerImpl> task_tracker_; std::unique_ptr<Thread> service_thread_; DelayedTaskManager delayed_task_manager_;
diff --git a/build/android/gradle/generate_gradle.py b/build/android/gradle/generate_gradle.py index fe9b7a5..dfc2f24 100755 --- a/build/android/gradle/generate_gradle.py +++ b/build/android/gradle/generate_gradle.py
@@ -169,7 +169,7 @@ self._build_config = None self._java_files = None self._all_entries = None - self.android_test_entries = None + self.android_test_entries = [] @classmethod def FromGnTarget(cls, gn_target): @@ -373,21 +373,24 @@ res_zips += entry.ResZips() return set(_RebasePath(res_zips)) - def GeneratedInputs(self, root_entry): - generated_inputs = self.AllResZips(root_entry) - generated_inputs.update(self.AllSrcjars(root_entry)) + def GeneratedInputs(self, root_entry, fast=None): + generated_inputs = set() + if not fast: + generated_inputs.update(self.AllResZips(root_entry)) + generated_inputs.update(self.AllSrcjars(root_entry)) for entry in self._GetEntries(root_entry): generated_inputs.update(entry.GeneratedJavaFiles()) generated_inputs.update(entry.PrebuiltJars()) return generated_inputs - def GeneratedZips(self, root_entry): + def GeneratedZips(self, root_entry, fast=None): entry_output_dir = self.EntryOutputDir(root_entry) tuples = [] - tuples.extend((s, os.path.join(entry_output_dir, _SRCJARS_SUBDIR)) - for s in self.AllSrcjars(root_entry)) - tuples.extend((s, os.path.join(entry_output_dir, _RES_SUBDIR)) - for s in self.AllResZips(root_entry)) + if not fast: + tuples.extend((s, os.path.join(entry_output_dir, _SRCJARS_SUBDIR)) + for s in self.AllSrcjars(root_entry)) + tuples.extend((s, os.path.join(entry_output_dir, _RES_SUBDIR)) + for s in self.AllResZips(root_entry)) return tuples def GenerateManifest(self, root_entry): @@ -972,24 +975,24 @@ _WriteFile(os.path.join(generator.project_dir, 'local.properties'), _GenerateLocalProperties(sdk_path)) - if not args.fast: - zip_tuples = [] - generated_inputs = set() - for entry in entries: + zip_tuples = [] + generated_inputs = set() + for entry in entries: + entries_to_gen = [entry] + entries_to_gen.extend(entry.android_test_entries) + for entry_to_gen in entries_to_gen: # Build all paths references by .gradle that exist within output_dir. - generated_inputs.update(generator.GeneratedInputs(entry)) - zip_tuples.extend(generator.GeneratedZips(entry)) - if generated_inputs: - logging.warning('Building generated source files...') - targets = _RebasePath(generated_inputs, output_dir) - _RunNinja(output_dir, targets, args.j) - if zip_tuples: - _ExtractZips(generator.project_dir, zip_tuples) + generated_inputs.update( + generator.GeneratedInputs(entry_to_gen, args.fast)) + zip_tuples.extend(generator.GeneratedZips(entry_to_gen, args.fast)) + if generated_inputs: + logging.warning('Building generated source files...') + targets = _RebasePath(generated_inputs, output_dir) + _RunNinja(output_dir, targets, args.j) + if zip_tuples: + _ExtractZips(generator.project_dir, zip_tuples) logging.warning('Generated projects for Android Studio %s', channel) - if not args.fast: - logging.warning('Run with --fast flag to skip generating files (faster, ' - 'but less correct)') logging.warning('For more tips: https://chromium.googlesource.com/chromium' '/src.git/+/master/docs/android_studio.md')
diff --git a/build/check_gn_headers_whitelist.txt b/build/check_gn_headers_whitelist.txt index 282f7e9..6b0eb79 100644 --- a/build/check_gn_headers_whitelist.txt +++ b/build/check_gn_headers_whitelist.txt
@@ -359,7 +359,6 @@ ui/gl/gl_bindings_api_autogen_egl.h ui/gl/gl_bindings_api_autogen_gl.h ui/gl/gl_bindings_api_autogen_glx.h -ui/gl/gl_bindings_api_autogen_osmesa.h ui/gl/gpu_preference.h ui/gl/gpu_switching_observer.h ui/ozone/ozone_base_export.h
diff --git a/build/config/android/BUILD.gn b/build/config/android/BUILD.gn index bdc192e..5ebde213 100644 --- a/build/config/android/BUILD.gn +++ b/build/config/android/BUILD.gn
@@ -189,12 +189,14 @@ config("hide_all_but_jni_onload") { ldflags = [ "-Wl,--version-script=" + rebase_path( - "//build/android/android_only_explicit_jni_exports.lst") ] + "//build/android/android_only_explicit_jni_exports.lst", + root_build_dir) ] } config("hide_all_but_jni") { ldflags = [ "-Wl,--version-script=" + - rebase_path("//build/android/android_only_jni_exports.lst") ] + rebase_path("//build/android/android_only_jni_exports.lst", + root_build_dir) ] } config("lld_pack_relocations") {
diff --git a/build/config/android/rules.gni b/build/config/android/rules.gni index 74be70e..3672d45 100644 --- a/build/config/android/rules.gni +++ b/build/config/android/rules.gni
@@ -1822,7 +1822,8 @@ inputs = [ invoker.build_config, ] - _rebased_build_config = rebase_path(invoker.build_config) + _rebased_build_config = + rebase_path(invoker.build_config, root_build_dir) defines += [ "COMPRESSED_LOCALE_LIST=" + "@FileArg($_rebased_build_config:compressed_locales_java_list)",
diff --git a/build/fuchsia/common_args.py b/build/fuchsia/common_args.py index e6366a6..d14bf612 100644 --- a/build/fuchsia/common_args.py +++ b/build/fuchsia/common_args.py
@@ -45,7 +45,8 @@ help='The path to the SSH configuration used for ' 'connecting to the target device.') common_args.add_argument('--system-log-file', - help='File to write system logs to.') + help='File to write system logs to. Specify - to ' + 'log to stdout.') common_args.add_argument('--exclude-system-logs', action='store_false', dest='include_system_logs', @@ -76,9 +77,16 @@ """Constructs a deployment target object using parameters taken from command line arguments.""" + if args.system_log_file == '-': + system_log_file = sys.stdout + elif args.system_log_file: + system_log_file = open(args.system_log_file, 'w') + else: + system_log_file = None + if not args.device: return QemuTarget(args.output_directory, args.target_cpu, - args.system_log_file) + system_log_file) else: return DeviceTarget(args.output_directory, args.target_cpu, args.host, - args.port, args.ssh_config, args.system_log_file) + args.port, args.ssh_config, system_log_file)
diff --git a/build/fuchsia/device_target.py b/build/fuchsia/device_target.py index 91e845f7..013f176 100644 --- a/build/fuchsia/device_target.py +++ b/build/fuchsia/device_target.py
@@ -108,7 +108,7 @@ loglistener_path = os.path.join(SDK_ROOT, 'tools', 'loglistener') self._loglistener = subprocess.Popen( [loglistener_path, node_name], - stdout=open(self._system_log_file, 'w'), + stdout=self._system_log_file, stderr=subprocess.STDOUT, stdin=open(os.devnull)) logging.debug('Waiting for device to join network.')
diff --git a/build/fuchsia/net_test_server.py b/build/fuchsia/net_test_server.py index 2849c44..cc4e2413 100644 --- a/build/fuchsia/net_test_server.py +++ b/build/fuchsia/net_test_server.py
@@ -22,16 +22,42 @@ GET_PORT_NUM_TIMEOUT_SECS = 5 -def _ConnectPortForwardingTask(target, local_port): +class ForwardingScheme: + def __init__(self, local_port, remote_port, is_reversed): + """A simple POD class that represents a single SSH tunnel connection to be + created. + + Args: + local_port (int): The device on the local machine where SSH is running + to allocate as an endpoint for the SSH tunnel. + remote_port (int): The port on the remote device to be allocated for the + SSH tunnel. + is_reversed (bool): Whether or not this should create a reverse SSH + tunnel. + """ + + self.local = local_port + self.remote = remote_port + self.reverse = is_reversed + + +def _ConnectPortForwardingTask(target, scheme): """Establishes a port forwarding SSH task to a localhost TCP endpoint hosted at port |local_port|. Blocks until port forwarding is established. Returns the remote port number.""" - forwarding_flags = ['-O', 'forward', # Send SSH mux control signal. - '-R', '0:localhost:%d' % local_port, + forwarding_schema = '%d:localhost:%d' % (scheme.remote, scheme.local) + if scheme.reverse: + port_forwarding_clause = ['-R', forwarding_schema] + else: + port_forwarding_clause = ['-L', forwarding_schema] + + forwarding_flags = ['-O', 'forward', # Send SSH mux control signal. '-v', # Get forwarded port info from stderr. '-NT'] # Don't execute command; don't allocate terminal. + forwarding_flags.extend(port_forwarding_clause) + task = target.RunCommandPiped([], ssh_args=forwarding_flags, stderr=subprocess.PIPE) @@ -58,7 +84,7 @@ if matched: device_port = int(matched.group('port')) logging.debug('Port forwarding established (local=%d, device=%d)' % - (local_port, device_port)) + (scheme.local, scheme.remote)) task.wait() return device_port line = '' @@ -75,11 +101,10 @@ # Maps the host (server) port to the device port number. self._port_mapping = {} - def Map(self, port_pairs): - for p in port_pairs: - _, host_port = p - self._port_mapping[host_port] = \ - _ConnectPortForwardingTask(self._target, host_port) + def Map(self, scheme_list): + for scheme in scheme_list: + self._port_mapping[scheme.local] = \ + _ConnectPortForwardingTask(self._target, scheme) def GetDevicePortForHostPort(self, host_port): return self._port_mapping[host_port]
diff --git a/build/fuchsia/qemu_target.py b/build/fuchsia/qemu_target.py index c5211fe..966f89c 100644 --- a/build/fuchsia/qemu_target.py +++ b/build/fuchsia/qemu_target.py
@@ -11,6 +11,7 @@ import platform import socket import subprocess +import sys import time from common import SDK_ROOT, EnsurePathExists @@ -143,11 +144,11 @@ # This approach is used instead of loglistener to debug # https://crbug.com/86975 . if self._system_log_file: - stdout = open(self._system_log_file, 'w') + stdout = self._system_log_file stderr = subprocess.STDOUT else: stdout = open(os.devnull) - stderr = open(os.devnull) + stderr = sys.stderr self._qemu_process = subprocess.Popen(qemu_command, stdin=open(os.devnull), stdout=stdout, stderr=stderr) @@ -157,12 +158,13 @@ logging.info('Shutting down QEMU.') self._qemu_process.kill() - def GetQemuStdout(self): - return self._qemu_process.stdout + def _IsQemuStillRunning(self): + return os.waitpid(self._qemu_process.pid, os.WNOHANG)[0] == 0 def _GetEndpoint(self): + if not self._IsQemuStillRunning(): + raise Exception('QEMU quit unexpectedly.') return ('localhost', self._host_ssh_port) def _GetSshConfigPath(self): return boot_data.GetSSHConfigPath(self._output_dir) -
diff --git a/build/sanitizers/tsan_suppressions.cc b/build/sanitizers/tsan_suppressions.cc index 9e475c6..4b2fb090 100644 --- a/build/sanitizers/tsan_suppressions.cc +++ b/build/sanitizers/tsan_suppressions.cc
@@ -261,9 +261,6 @@ // http://crbug.com/797998 "race:content::SandboxIPCHandler::HandleLocaltime\n" - // - "race:third_party/harfbuzz-ng/src/*\n" - // End of suppressions. ; // Please keep this semicolon.
diff --git a/cc/BUILD.gn b/cc/BUILD.gn index a70ef19..ea03f18 100644 --- a/cc/BUILD.gn +++ b/cc/BUILD.gn
@@ -552,7 +552,7 @@ ] if (!is_android) { data_deps = [ - "//third_party/mesa:osmesa", + "//third_party/mesa_headers", ] } } @@ -751,9 +751,8 @@ "//ui/gl", "//ui/gl:test_support", ] - data_deps = [ - "//third_party/mesa:osmesa", + "//third_party/mesa_headers", ] }
diff --git a/cc/trees/layer_tree_host.cc b/cc/trees/layer_tree_host.cc index fb52cb4..6f3609d2 100644 --- a/cc/trees/layer_tree_host.cc +++ b/cc/trees/layer_tree_host.cc
@@ -791,7 +791,12 @@ base::JSONWriter::WriteWithOptions( *property_trees->AsTracedValue()->ToBaseValue(), base::JSONWriter::OPTIONS_PRETTY_PRINT, &out); - VLOG(3) << out; + std::stringstream ss(out); + while (!ss.eof()) { + std::string line; + std::getline(ss, line); + VLOG(3) << line; + } } }
diff --git a/cc/trees/layer_tree_host.h b/cc/trees/layer_tree_host.h index 8cea9a0..ed6c4dd 100644 --- a/cc/trees/layer_tree_host.h +++ b/cc/trees/layer_tree_host.h
@@ -688,7 +688,7 @@ scoped_refptr<HeadsUpDisplayLayer> hud_layer_; - // The number of SurfaceRanges that have (fallback,primary) set to + // The number of SurfaceLayers that have (fallback,primary) set to // viz::SurfaceRange. base::flat_map<viz::SurfaceRange, int> surface_ranges_;
diff --git a/cc/trees/layer_tree_host_impl.cc b/cc/trees/layer_tree_host_impl.cc index 10f3e67..7a2db1c8 100644 --- a/cc/trees/layer_tree_host_impl.cc +++ b/cc/trees/layer_tree_host_impl.cc
@@ -1911,8 +1911,6 @@ metadata.root_background_color = active_tree_->background_color(); metadata.content_source_id = active_tree_->content_source_id(); - active_tree_->GetViewportSelection(&metadata.selection); - // Skip recording frame metrics for android_webview // (using_synchronous_renderer_compositor) scrolls because different // application is handling frame presentation in android webview. @@ -1945,6 +1943,10 @@ if (last_draw_referenced_surfaces_ != referenced_surfaces) last_draw_referenced_surfaces_ = referenced_surfaces; +#if defined(OS_ANDROID) + active_tree_->GetViewportSelection(&metadata.selection); +#endif + const auto* inner_viewport_scroll_node = InnerViewportScrollNode(); if (!inner_viewport_scroll_node) return metadata;
diff --git a/cc/trees/layer_tree_host_impl_unittest.cc b/cc/trees/layer_tree_host_impl_unittest.cc index fd3cd058..9687808 100644 --- a/cc/trees/layer_tree_host_impl_unittest.cc +++ b/cc/trees/layer_tree_host_impl_unittest.cc
@@ -10200,6 +10200,7 @@ ui::INPUT_EVENT_LATENCY_RENDERER_SWAP_COMPONENT, nullptr)); } +#if defined(OS_ANDROID) TEST_F(LayerTreeHostImplTest, SelectionBoundsPassedToCompositorFrameMetadata) { int root_layer_id = 1; std::unique_ptr<SolidColorLayerImpl> root = @@ -10299,6 +10300,7 @@ EXPECT_FALSE(selection_after.start.visible()); EXPECT_FALSE(selection_after.end.visible()); } +#endif // defined(OS_ANDROID) class SimpleSwapPromiseMonitor : public SwapPromiseMonitor { public:
diff --git a/cc/trees/layer_tree_host_pixeltest_blending.cc b/cc/trees/layer_tree_host_pixeltest_blending.cc index f1e3d2e..2682c2a2 100644 --- a/cc/trees/layer_tree_host_pixeltest_blending.cc +++ b/cc/trees/layer_tree_host_pixeltest_blending.cc
@@ -374,16 +374,7 @@ SOFTWARE, FILE_PATH_LITERAL("blending_render_pass_mask.png"), kUseMasks); } -// Fails on Linux CFI, see https://crbug.com/872733. -#if defined(OS_LINUX) -#define MAYBE_BlendingWithRenderPassWithMaskAA_GL \ - DISABLED_BlendingWithRenderPassWithMaskAA_GL -#else -#define MAYBE_BlendingWithRenderPassWithMaskAA_GL \ - BlendingWithRenderPassWithMaskAA_GL -#endif -TEST_F(LayerTreeHostBlendingPixelTest, - MAYBE_BlendingWithRenderPassWithMaskAA_GL) { +TEST_F(LayerTreeHostBlendingPixelTest, BlendingWithRenderPassWithMaskAA_GL) { RunBlendingWithRenderPass(ZERO_COPY, FILE_PATH_LITERAL("blending_render_pass_mask.png"), kUseMasks | kUseAntialiasing); @@ -408,16 +399,7 @@ SOFTWARE, FILE_PATH_LITERAL("blending_render_pass.png"), kUseColorMatrix); } -// Fails on Linux CFI, see https://crbug.com/872733. -#if defined(OS_LINUX) -#define MAYBE_BlendingWithRenderPassColorMatrixAA_GL \ - DISABLED_BlendingWithRenderPassColorMatrixAA_GL -#else -#define MAYBE_BlendingWithRenderPassColorMatrixAA_GL \ - BlendingWithRenderPassColorMatrixAA_GL -#endif -TEST_F(LayerTreeHostBlendingPixelTest, - MAYBE_BlendingWithRenderPassColorMatrixAA_GL) { +TEST_F(LayerTreeHostBlendingPixelTest, BlendingWithRenderPassColorMatrixAA_GL) { RunBlendingWithRenderPass(ZERO_COPY, FILE_PATH_LITERAL("blending_render_pass.png"), kUseAntialiasing | kUseColorMatrix); @@ -445,8 +427,7 @@ } // Often times out on Windows 10. See: https://crbug.com/870236. -// Fails on Linux CFI, see https://crbug.com/872733. -#if (defined(OS_WIN) || defined(OS_LINUX)) +#if defined(OS_WIN) #define MAYBE_BlendingWithRenderPassWithMaskColorMatrixAA_GL \ DISABLED_BlendingWithRenderPassWithMaskColorMatrixAA_GL #else @@ -493,16 +474,8 @@ kUseMasks | kForceShaders); } -// Fails on Linux CFI, see https://crbug.com/872733. -#if defined(OS_LINUX) -#define MAYBE_BlendingWithRenderPassShadersWithMaskAA_GL \ - DISABLED_BlendingWithRenderPassShadersWithMaskAA_GL -#else -#define MAYBE_BlendingWithRenderPassShadersWithMaskAA_GL \ - BlendingWithRenderPassShadersWithMaskAA_GL -#endif TEST_F(LayerTreeHostBlendingPixelTest, - MAYBE_BlendingWithRenderPassShadersWithMaskAA_GL) { + BlendingWithRenderPassShadersWithMaskAA_GL) { RunBlendingWithRenderPass(ZERO_COPY, FILE_PATH_LITERAL("blending_render_pass_mask.png"), kUseMasks | kUseAntialiasing | kForceShaders); @@ -522,54 +495,29 @@ kUseColorMatrix | kForceShaders); } -// Fails on Linux CFI, see https://crbug.com/872733. -#if defined(OS_LINUX) -#define MAYBE_BlendingWithRenderPassShadersColorMatrixAA_GL \ - DISABLED_BlendingWithRenderPassShadersColorMatrixAA_GL -#else -#define MAYBE_BlendingWithRenderPassShadersColorMatrixAA_GL \ - BlendingWithRenderPassShadersColorMatrixAA_GL -#endif TEST_F(LayerTreeHostBlendingPixelTest, - MAYBE_BlendingWithRenderPassShadersColorMatrixAA_GL) { + BlendingWithRenderPassShadersColorMatrixAA_GL) { RunBlendingWithRenderPass(ZERO_COPY, FILE_PATH_LITERAL("blending_render_pass.png"), kUseAntialiasing | kUseColorMatrix | kForceShaders); } -// Fails on Linux CFI, see https://crbug.com/872733. -#if defined(OS_LINUX) -#define MAYBE_BlendingWithRenderPassShadersWithMaskColorMatrix_GL \ - DISABLED_BlendingWithRenderPassShadersWithMaskColorMatrix_GL -#else -#define MAYBE_BlendingWithRenderPassShadersWithMaskColorMatrix_GL \ - BlendingWithRenderPassShadersWithMaskColorMatrix_GL -#endif TEST_F(LayerTreeHostBlendingPixelTest, - MAYBE_BlendingWithRenderPassShadersWithMaskColorMatrix_GL) { + BlendingWithRenderPassShadersWithMaskColorMatrix_GL) { RunBlendingWithRenderPass(ZERO_COPY, FILE_PATH_LITERAL("blending_render_pass_mask.png"), kUseMasks | kUseColorMatrix | kForceShaders); } -// Fails on Linux CFI, see https://crbug.com/872733. -#if defined(OS_LINUX) -#define MAYBE_BlendingWithRenderPassShadersWithMaskColorMatrix_GL_TextureRect \ - DISABLED_BlendingWithRenderPassShadersWithMaskColorMatrix_GL_TextureRect -#else -#define MAYBE_BlendingWithRenderPassShadersWithMaskColorMatrix_GL_TextureRect \ - BlendingWithRenderPassShadersWithMaskColorMatrix_GL_TextureRect -#endif TEST_F(LayerTreeHostBlendingPixelTest, - MAYBE_BlendingWithRenderPassShadersWithMaskColorMatrix_GL_TextureRect) { + BlendingWithRenderPassShadersWithMaskColorMatrix_GL_TextureRect) { RunBlendingWithRenderPass(ZERO_COPY, FILE_PATH_LITERAL("blending_render_pass_mask.png"), kUseMasks | kUseColorMatrix | kForceShaders); } // Often times out on Windows 10. See: https://crbug.com/870236. -// Fails on Linux CFI, see https://crbug.com/872733. -#if (defined(OS_WIN) || defined(OS_LINUX)) +#if defined(OS_WIN) #define MAYBE_BlendingWithRenderPassShadersWithMaskColorMatrixAA_GL \ DISABLED_BlendingWithRenderPassShadersWithMaskColorMatrixAA_GL #else
diff --git a/chrome/VERSION b/chrome/VERSION index 801ca01..306bd2c 100644 --- a/chrome/VERSION +++ b/chrome/VERSION
@@ -1,4 +1,4 @@ MAJOR=70 MINOR=0 -BUILD=3522 +BUILD=3523 PATCH=0
diff --git a/chrome/android/BUILD.gn b/chrome/android/BUILD.gn index be02df0f..d56466e 100644 --- a/chrome/android/BUILD.gn +++ b/chrome/android/BUILD.gn
@@ -533,6 +533,30 @@ ] } +# Files used for both chrome tests and VR/AR tests +android_library("chrome_test_util_java") { + testonly = true + + java_files = [ + "javatests/src/org/chromium/chrome/browser/customtabs/CustomTabActivityTestRule.java", + "javatests/src/org/chromium/chrome/browser/customtabs/CustomTabsTestUtils.java", + "javatests/src/org/chromium/chrome/browser/media/RouterTestUtils.java", + "javatests/src/org/chromium/chrome/browser/webapps/TestFetchStorageCallback.java", + "javatests/src/org/chromium/chrome/browser/webapps/WebappActivityTestRule.java", + ] + + deps = [ + ":browser_java_test_support", + "//base:base_java", + "//base:base_java_test_support", + "//chrome/android:chrome_java", + "//chrome/test/android:chrome_java_test_support", + "//content/public/android:content_java", + "//third_party/custom_tabs_client:custom_tabs_support_java", + "//third_party/espresso:espresso_all_java", + ] +} + android_library("chrome_test_java") { testonly = true @@ -541,6 +565,7 @@ deps = [ ":browser_java_test_support", + ":chrome_test_util_java", ":partner_location_descriptor_proto_java", "$google_play_services_package:google_play_services_base_java", "$google_play_services_package:google_play_services_basement_java", @@ -704,9 +729,6 @@ testonly = true java_files = [ - "javatests/src/org/chromium/chrome/browser/customtabs/CustomTabActivityTestRule.java", - "javatests/src/org/chromium/chrome/browser/customtabs/CustomTabsTestUtils.java", - "javatests/src/org/chromium/chrome/browser/media/RouterTestUtils.java", "javatests/src/org/chromium/chrome/browser/vr/rules/ChromeTabbedActivityXrTestRule.java", "javatests/src/org/chromium/chrome/browser/vr/rules/CustomTabActivityXrTestRule.java", "javatests/src/org/chromium/chrome/browser/vr/rules/XrActivityRestriction.java", @@ -716,11 +738,9 @@ "javatests/src/org/chromium/chrome/browser/vr/util/XrTestRuleUtils.java", "javatests/src/org/chromium/chrome/browser/vr/WebXrTestFramework.java", "javatests/src/org/chromium/chrome/browser/vr/XrTestFramework.java", - "javatests/src/org/chromium/chrome/browser/webapps/TestFetchStorageCallback.java", - "javatests/src/org/chromium/chrome/browser/webapps/WebappActivityTestRule.java", ] - deps = chrome_test_xr_java_deps + deps = chrome_test_xr_java_deps + [ ":chrome_test_util_java" ] data = [ "//chrome/test/data/xr/e2e_test_files/", @@ -734,6 +754,7 @@ testonly = true java_files = [ + "javatests/src/org/chromium/chrome/browser/vr/jsdialog/VrBrowserJavaScriptModalDialogTest.java", "javatests/src/org/chromium/chrome/browser/vr/EmulatedVrController.java", "javatests/src/org/chromium/chrome/browser/vr/mock/MockBrowserKeyboardInterface.java", "javatests/src/org/chromium/chrome/browser/vr/mock/MockVrCoreVersionChecker.java", @@ -777,6 +798,7 @@ "//chrome/android:chrome_test_xr_java", "//third_party/gvr-android-sdk:controller_test_api_java", "//third_party/gvr-android-sdk:gvr_common_java", + ":chrome_test_util_java", ] data = [
diff --git a/chrome/android/java/res/OWNERS b/chrome/android/java/res/OWNERS index 7eb2f55..48593ff 100644 --- a/chrome/android/java/res/OWNERS +++ b/chrome/android/java/res/OWNERS
@@ -6,7 +6,6 @@ file://content/public/android/java/res/OWNERS # New Tab Page changes only: -dgn@chromium.org mvanouwerkerk@chromium.org peconn@chromium.org
diff --git a/chrome/android/java/res/drawable/autofill_chip_inset.xml b/chrome/android/java/res/drawable/autofill_chip_inset.xml index 2e428cab..6d69435 100644 --- a/chrome/android/java/res/drawable/autofill_chip_inset.xml +++ b/chrome/android/java/res/drawable/autofill_chip_inset.xml
@@ -2,14 +2,11 @@ <!-- 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. --> - -<inset xmlns:android="http://schemas.android.com/apk/res/android" - android:insetBottom="@dimen/keyboard_accessory_padding" - android:insetLeft="@dimen/keyboard_accessory_half_padding" - android:insetRight="@dimen/keyboard_accessory_half_padding" - android:insetTop="@dimen/keyboard_accessory_padding"> - <shape> - <solid android:color="@color/google_grey_200" /> - <corners android:radius="2dp" /> - </shape> -</inset> +<layer-list xmlns:android="http://schemas.android.com/apk/res/android"> + <item> + <shape> + <solid android:color="@android:color/white" /> + <corners android:radius="@dimen/keyboard_accessory_action_height" /> + </shape> + </item> +</layer-list>
diff --git a/chrome/android/java/res/drawable/data_reduction_big.xml b/chrome/android/java/res/drawable/data_reduction_big.xml new file mode 100644 index 0000000..7fd6f90 --- /dev/null +++ b/chrome/android/java/res/drawable/data_reduction_big.xml
@@ -0,0 +1,25 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- 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. --> + +<vector xmlns:android="http://schemas.android.com/apk/res/android" + xmlns:tools="http://schemas.android.com/tools" + tools:targetApi="21" + android:width="64dp" + android:height="64dp" + android:viewportWidth="24.0" + android:viewportHeight="24.0"> + + <path + android:fillColor="@color/disabled_text_color" + android:fillType="evenOdd" + android:pathData="M8.907 1.945c2.541 0 4.762 1.372 5.978 3.41l1.604-1.018C14.937 1.769 12.127 0.047 8.907 0.047 a8.86 8.86 0 0 0-8.86 8.86c0 0.067 0.008 0.13 0.01 0.196l2.01-1.463c0.598-3.235 3.435-5.695 6.84-5.695" /> + <path + android:fillColor="@color/disabled_text_color" + android:fillType="evenOdd" + android:pathData="M17.31 6.104l-7.208 4.369-4.92-2.817-4.818 3.572c1.02 3.766 4.454 6.54 8.543 6.54a8.861 8.861 0 0 0 8.862-8.86c0-0.981-0.166-1.922-0.46-2.804zM8.907 15.87c-2.779 0-5.173-1.64-6.288-4l2.8-2.038 4.928 2.82 5.506-3.415c-0.173 3.686-3.217 6.633-6.946 6.633z" /> + <path + android:fillType="evenOdd" + android:pathData="M-3-3h24v24H-3z" /> +</vector>
diff --git a/chrome/android/java/res/drawable/hairline_border_card_background.xml b/chrome/android/java/res/drawable/hairline_border_card_background.xml new file mode 100644 index 0000000..8c8c55f --- /dev/null +++ b/chrome/android/java/res/drawable/hairline_border_card_background.xml
@@ -0,0 +1,12 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- 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. --> + +<shape + xmlns:android="http://schemas.android.com/apk/res/android" + android:shape="rectangle" > + <solid android:color="@android:color/white" /> + <stroke android:width="1dp" android:color="@color/google_grey_300"/> + <corners android:radius="@dimen/content_suggestions_card_modern_corner_radius" /> +</shape>
diff --git a/chrome/android/java/res/layout/autofill_keyboard_accessory_icon.xml b/chrome/android/java/res/layout/autofill_keyboard_accessory_icon.xml deleted file mode 100644 index d06e90d..0000000 --- a/chrome/android/java/res/layout/autofill_keyboard_accessory_icon.xml +++ /dev/null
@@ -1,13 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!-- 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. --> - -<ImageView xmlns:android="http://schemas.android.com/apk/res/android" - xmlns:tools="http://schemas.android.com/tools" - android:layout_height="@dimen/keyboard_accessory_height" - android:layout_width="40dp" - android:background="@drawable/autofill_chip_inset" - android:padding="12dp" - tools:ignore="contentDescription" /> -
diff --git a/chrome/android/java/res/layout/autofill_keyboard_accessory_item.xml b/chrome/android/java/res/layout/autofill_keyboard_accessory_item.xml deleted file mode 100644 index c4ebd14..0000000 --- a/chrome/android/java/res/layout/autofill_keyboard_accessory_item.xml +++ /dev/null
@@ -1,40 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!-- 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. --> - -<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" - android:layout_height="@dimen/keyboard_accessory_height" - android:layout_width="wrap_content" - android:background="@drawable/autofill_chip_inset" - android:paddingEnd="@dimen/keyboard_accessory_padding" - android:paddingStart="@dimen/keyboard_accessory_padding"> - - <TextView - android:id="@+id/autofill_keyboard_accessory_item_label" - android:layout_height="match_parent" - android:layout_width="wrap_content" - android:drawablePadding="@dimen/keyboard_accessory_half_padding" - android:ellipsize="end" - android:fontFamily="sans-serif-medium" - android:gravity="center_vertical" - android:minWidth="@dimen/keyboard_accessory_action_height" - android:paddingEnd="@dimen/keyboard_accessory_half_padding" - android:paddingStart="@dimen/keyboard_accessory_half_padding" - android:singleLine="true" - android:textColor="@color/modern_grey_800" - android:textSize="@dimen/keyboard_accessory_text_size" /> - - <TextView - android:id="@+id/autofill_keyboard_accessory_item_sublabel" - android:layout_height="match_parent" - android:layout_width="wrap_content" - android:ellipsize="end" - android:gravity="center_vertical" - android:paddingEnd="@dimen/keyboard_accessory_half_padding" - android:singleLine="true" - android:textColor="@color/google_grey_600" - android:textSize="@dimen/keyboard_accessory_text_size" - android:visibility="gone" /> - -</LinearLayout>
diff --git a/chrome/android/java/res/layout/data_reduction_stats_layout.xml b/chrome/android/java/res/layout/data_reduction_stats_layout.xml index c1230147..690f3f20 100644 --- a/chrome/android/java/res/layout/data_reduction_stats_layout.xml +++ b/chrome/android/java/res/layout/data_reduction_stats_layout.xml
@@ -11,7 +11,19 @@ android:clipToPadding="false" android:orientation="vertical" > + <TextView + android:id="@+id/initial_data_savings" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:layout_marginTop="8dp" + android:gravity="center_horizontal" + android:drawablePadding="3dp" + android:drawableTop="@drawable/data_reduction_big" + android:text="@string/data_reduction_initial_title" + android:textAppearance="@style/BlackDisabledText1" /> + <LinearLayout + android:id="@+id/data_savings_summary_container" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_marginTop="8dp" @@ -68,6 +80,7 @@ <include layout="@layout/data_usage_chart" /> <FrameLayout + android:id="@+id/chart_dates" android:layout_width="match_parent" android:layout_height="wrap_content" >
diff --git a/chrome/android/java/res/layout/download_manager_image_item.xml b/chrome/android/java/res/layout/download_manager_image_item.xml index c3b416fe..b2530505 100644 --- a/chrome/android/java/res/layout/download_manager_image_item.xml +++ b/chrome/android/java/res/layout/download_manager_image_item.xml
@@ -25,10 +25,6 @@ <org.chromium.chrome.browser.download.home.view.SelectionView android:id="@+id/selection" - android:layout_width="20dp" - android:layout_height="20dp" - android:layout_gravity="start|top" - android:layout_marginStart="6dp" - android:layout_marginTop="6dp"/> + style="@style/DownloadItemSelectionView"/> </FrameLayout>
diff --git a/chrome/android/java/res/layout/download_manager_prefetch_item.xml b/chrome/android/java/res/layout/download_manager_prefetch_item.xml index 21cb9ef..e933e5a 100644 --- a/chrome/android/java/res/layout/download_manager_prefetch_item.xml +++ b/chrome/android/java/res/layout/download_manager_prefetch_item.xml
@@ -10,23 +10,33 @@ xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="114dp" - android:background="@android:color/white" + android:background="@drawable/hairline_border_card_background" android:clickable="true" app:columnCount="4" app:rowCount="4"> - <ImageView + <org.chromium.ui.widget.RoundedCornerImageView android:id="@+id/thumbnail" - android:layout_width="114dp" - android:layout_height="114dp" + android:layout_width="113dp" + android:layout_height="112dp" android:layout_marginEnd="9dp" - android:scaleType="fitCenter" - android:background="@color/google_grey_100" + android:layout_marginTop="1dp" + android:layout_marginBottom="1dp" + android:layout_marginStart="1dp" + android:scaleType="centerCrop" app:layout_column="0" app:layout_row="0" app:layout_rowSpan="4" + app:cornerRadiusTopStart="@dimen/download_manager_prefetch_thumbnail_corner_radius" + app:cornerRadiusBottomStart="@dimen/download_manager_prefetch_thumbnail_corner_radius" tools:ignore="ContentDescription" /> + <org.chromium.chrome.browser.download.home.view.SelectionView + android:id="@+id/selection" + style="@style/DownloadItemSelectionView" + app:layout_column="0" + app:layout_row="0"/> + <Space android:layout_width="wrap_content" android:layout_height="0dp"
diff --git a/chrome/android/java/res/layout/keyboard_accessory.xml b/chrome/android/java/res/layout/keyboard_accessory.xml index db80ce24..a99ddc40 100644 --- a/chrome/android/java/res/layout/keyboard_accessory.xml +++ b/chrome/android/java/res/layout/keyboard_accessory.xml
@@ -16,7 +16,7 @@ android:orientation="horizontal" android:layout_height="@dimen/keyboard_accessory_height" android:layout_width="match_parent" - android:paddingEnd="@dimen/keyboard_accessory_padding" + android:paddingEnd="0dp" android:paddingStart="@dimen/keyboard_accessory_padding"> <android.support.design.widget.TabLayout @@ -30,9 +30,4 @@ android:layout_width="wrap_content" android:layout_height="match_parent" /> - <HorizontalScrollView - android:id="@+id/suggestions_view" - android:layout_width="wrap_content" - android:layout_height="match_parent" /> - </org.chromium.chrome.browser.autofill.keyboard_accessory.KeyboardAccessoryView>
diff --git a/chrome/android/java/res/layout/keyboard_accessory_action.xml b/chrome/android/java/res/layout/keyboard_accessory_action.xml index 8c296a1..2de4c8c 100644 --- a/chrome/android/java/res/layout/keyboard_accessory_action.xml +++ b/chrome/android/java/res/layout/keyboard_accessory_action.xml
@@ -15,8 +15,9 @@ android:paddingEnd="@dimen/keyboard_accessory_half_padding" android:paddingStart="@dimen/keyboard_accessory_half_padding" android:paddingTop="0dp" + android:layout_marginBottom="@dimen/keyboard_accessory_half_padding" + android:layout_marginTop="@dimen/keyboard_accessory_half_padding" android:textAlignment="center" - android:textColor="@color/white_alpha_90" - android:textSize="@dimen/keyboard_accessory_text_size" + android:textAppearance="@style/WhiteButtonText" app:buttonColor="@color/light_active_color" app:buttonRaised="false"/>
diff --git a/chrome/android/java/res/layout/keyboard_accessory_chip.xml b/chrome/android/java/res/layout/keyboard_accessory_chip.xml new file mode 100644 index 0000000..ca663a5c --- /dev/null +++ b/chrome/android/java/res/layout/keyboard_accessory_chip.xml
@@ -0,0 +1,23 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- 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. --> + +<!-- TODO(fhorschig): android:elevation has no effect pre-Lollipop. Possibly, using a CardView or + holo drawables could create compatibility - if this becomes the final design.--> +<TextView + xmlns:android="http://schemas.android.com/apk/res/android" + android:gravity="center" + android:layout_height="@dimen/keyboard_accessory_action_height" + android:layout_width="wrap_content" + android:minHeight="0dp" + android:minWidth="0dp" + android:paddingBottom="0dp" + android:paddingEnd="@dimen/keyboard_accessory_half_padding" + android:paddingStart="@dimen/keyboard_accessory_half_padding" + android:paddingTop="0dp" + android:layout_marginBottom="@dimen/keyboard_accessory_half_padding" + android:layout_marginTop="@dimen/keyboard_accessory_half_padding" + android:elevation="2dp" + android:textAppearance="@style/BlackTitle2" + android:background="@drawable/autofill_chip_inset"/>
diff --git a/chrome/android/java/res/values-v17/styles.xml b/chrome/android/java/res/values-v17/styles.xml index 931d0ea..ac929a2 100644 --- a/chrome/android/java/res/values-v17/styles.xml +++ b/chrome/android/java/res/values-v17/styles.xml
@@ -729,6 +729,12 @@ <item name="android:ellipsize">end</item> <item name="android:singleLine">true</item> </style> + <style name="DownloadItemSelectionView"> + <item name="android:layout_width">24dp</item> + <item name="android:layout_height">24dp</item> + <item name="android:layout_marginStart">8dp</item> + <item name="android:layout_marginTop">8dp</item> + </style> <!-- Data Reduction --> <style name="TextAppearance.DataUsageBreakdownColumnLabel" parent="@style/BlackButtonText"> @@ -826,7 +832,6 @@ <!-- Omnibox --> <style name="TextAppearance.OmniboxVerboseStatus" parent="@android:style/TextAppearance.Medium"> - <item name="android:textColor">@color/locationbar_status_color</item> <item name="android:textSize">@dimen/location_bar_url_text_size</item> </style> </resources>
diff --git a/chrome/android/java/res/values/colors.xml b/chrome/android/java/res/values/colors.xml index dc2f2ec9..475787b 100644 --- a/chrome/android/java/res/values/colors.xml +++ b/chrome/android/java/res/values/colors.xml
@@ -158,8 +158,8 @@ <color name="locationbar_dark_hint_text">@color/search_box_hint</color> <color name="locationbar_light_hint_text">@color/modern_grey_400</color> <color name="locationbar_light_selection_color">#CC5595FE</color> - <color name="locationbar_status_color">@color/black_alpha_54</color> - <color name="locationbar_status_color_light">@android:color/white</color> + <color name="locationbar_status_offline_color">@color/black_alpha_54</color> + <color name="locationbar_status_offline_color_light">@android:color/white</color> <color name="locationbar_status_separator_color">@color/black_alpha_24</color> <color name="locationbar_status_separator_color_light">#3DFFFFFF</color> <color name="omnibox_focused_fading_background_color">@color/black_alpha_65</color>
diff --git a/chrome/android/java/res/values/dimens.xml b/chrome/android/java/res/values/dimens.xml index 68e3352..15860c8a 100644 --- a/chrome/android/java/res/values/dimens.xml +++ b/chrome/android/java/res/values/dimens.xml
@@ -129,7 +129,6 @@ <dimen name="keyboard_accessory_height">48dp</dimen> <dimen name="keyboard_accessory_padding">6dp</dimen> <dimen name="keyboard_accessory_sheet_height">330dp</dimen> - <dimen name="keyboard_accessory_text_size">14sp</dimen> <dimen name="keyboard_accessory_suggestion_margin">16dp</dimen> <dimen name="keyboard_accessory_suggestion_height">48dp</dimen> <dimen name="keyboard_accessory_suggestion_icon_size">20dp</dimen> @@ -588,6 +587,9 @@ <dimen name="download_manager_section_title_padding_top_condensed">0dp</dimen> <dimen name="download_manager_section_title_padding_bottom">0dp</dimen> <dimen name="download_manager_section_title_padding_image">8dp</dimen> + <!-- The corner radius is calculated by subtracting the hairline border width from the + background card corner radius. --> + <dimen name="download_manager_prefetch_thumbnail_corner_radius">7dp</dimen> <!-- Navigation history popup dimensions --> <dimen name="navigation_popup_width">312dp</dimen>
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/autofill/AutofillKeyboardAccessoryBridge.java b/chrome/android/java/src/org/chromium/chrome/browser/autofill/AutofillKeyboardAccessoryBridge.java index 2c327d8c..476a541 100644 --- a/chrome/android/java/src/org/chromium/chrome/browser/autofill/AutofillKeyboardAccessoryBridge.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/autofill/AutofillKeyboardAccessoryBridge.java
@@ -13,12 +13,19 @@ import org.chromium.chrome.R; import org.chromium.chrome.browser.ChromeActivity; import org.chromium.chrome.browser.ResourceId; -import org.chromium.chrome.browser.autofill.keyboard_accessory.KeyboardAccessoryCoordinator; +import org.chromium.chrome.browser.autofill.keyboard_accessory.AccessoryAction; +import org.chromium.chrome.browser.autofill.keyboard_accessory.KeyboardAccessoryData; +import org.chromium.chrome.browser.autofill.keyboard_accessory.KeyboardAccessoryMetricsRecorder; +import org.chromium.chrome.browser.autofill.keyboard_accessory.ManualFillingCoordinator; import org.chromium.components.autofill.AutofillDelegate; import org.chromium.components.autofill.AutofillSuggestion; +import org.chromium.components.autofill.PopupItemId; import org.chromium.ui.DropdownItem; import org.chromium.ui.base.WindowAndroid; +import java.util.ArrayList; +import java.util.List; + /** * JNI call glue for AutofillExternalDelagate C++ and Java objects. * This provides an alternative UI for Autofill suggestions, and replaces AutofillPopupBridge when @@ -28,9 +35,10 @@ public class AutofillKeyboardAccessoryBridge implements AutofillDelegate, DialogInterface.OnClickListener { private long mNativeAutofillKeyboardAccessory; - private KeyboardAccessoryCoordinator mKeyboardAccessory; + private ManualFillingCoordinator mManualFillingCoordinator; private Context mContext; - private AutofillKeyboardSuggestions mAutofillSuggestions; + private KeyboardAccessoryData.Provider<KeyboardAccessoryData.Action> mChipProvider = + new KeyboardAccessoryData.PropertyProvider<>(AccessoryAction.AUTOFILL_SUGGESTION); private AutofillKeyboardAccessoryBridge() { } @@ -48,6 +56,8 @@ @Override public void suggestionSelected(int listIndex) { + KeyboardAccessoryMetricsRecorder.recordActionSelected(AccessoryAction.AUTOFILL_SUGGESTION); + if (mManualFillingCoordinator != null) mManualFillingCoordinator.dismiss(); if (mNativeAutofillKeyboardAccessory == 0) return; nativeSuggestionSelected(mNativeAutofillKeyboardAccessory, listIndex); } @@ -85,12 +95,12 @@ mContext = windowAndroid.getActivity().get(); assert mContext != null; if (mContext instanceof ChromeActivity) { - mKeyboardAccessory = ((ChromeActivity) mContext).getKeyboardAccessory(); + mManualFillingCoordinator = ((ChromeActivity) mContext).getManualFillingController(); + mManualFillingCoordinator.getKeyboardAccessory().registerActionListProvider( + mChipProvider); } mNativeAutofillKeyboardAccessory = nativeAutofillKeyboardAccessory; - mAutofillSuggestions = - new AutofillKeyboardSuggestions(windowAndroid, this, shouldLimitLabelWidth); } /** @@ -106,10 +116,9 @@ */ @CalledByNative private void dismiss() { - if (mKeyboardAccessory != null) mKeyboardAccessory.dismiss(); + mChipProvider.notifyObservers(new KeyboardAccessoryData.Action[0]); mContext = null; - mKeyboardAccessory = null; - mAutofillSuggestions = null; + mManualFillingCoordinator = null; } /** @@ -118,8 +127,27 @@ */ @CalledByNative private void show(AutofillSuggestion[] suggestions, boolean isRtl) { - if (mAutofillSuggestions != null) mAutofillSuggestions.setSuggestions(suggestions, isRtl); - if (mKeyboardAccessory != null) mKeyboardAccessory.setSuggestions(mAutofillSuggestions); + mChipProvider.notifyObservers(convertSuggestionsToChips(suggestions)); + } + + private KeyboardAccessoryData.Action[] convertSuggestionsToChips( + AutofillSuggestion[] suggestions) { + List<KeyboardAccessoryData.Action> suggestionChips = new ArrayList<>(); + for (int i = 0; i < suggestions.length; ++i) { + AutofillSuggestion suggestion = suggestions[i]; + // The accessory doesn't need any special options like clearing or managing for now. + if (suggestion.getSuggestionId() == PopupItemId.ITEM_ID_ALL_SAVED_PASSWORDS_ENTRY + || suggestion.getSuggestionId() == PopupItemId.ITEM_ID_CLEAR_FORM + || suggestion.getSuggestionId() == PopupItemId.ITEM_ID_SEPARATOR + || suggestion.getSuggestionId() == PopupItemId.ITEM_ID_AUTOFILL_OPTIONS) { + continue; + } + final int triggerPosition = i; + suggestionChips.add(new KeyboardAccessoryData.Action(suggestion.getLabel(), + AccessoryAction.AUTOFILL_SUGGESTION, + result -> suggestionSelected(triggerPosition))); + } + return suggestionChips.toArray(new KeyboardAccessoryData.Action[suggestionChips.size()]); } // Helper methods for AutofillSuggestion. These are copied from AutofillPopupBridge (which
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/autofill/AutofillKeyboardSuggestions.java b/chrome/android/java/src/org/chromium/chrome/browser/autofill/AutofillKeyboardSuggestions.java deleted file mode 100644 index 274f22f..0000000 --- a/chrome/android/java/src/org/chromium/chrome/browser/autofill/AutofillKeyboardSuggestions.java +++ /dev/null
@@ -1,190 +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. - -package org.chromium.chrome.browser.autofill; - -import android.graphics.PorterDuff; -import android.graphics.Typeface; -import android.graphics.drawable.Drawable; -import android.os.Build; -import android.support.annotation.NonNull; -import android.support.v7.content.res.AppCompatResources; -import android.text.TextUtils; -import android.view.LayoutInflater; -import android.view.View; -import android.widget.ImageView; -import android.widget.LinearLayout; -import android.widget.TextView; - -import org.chromium.base.ApiCompatibilityUtils; -import org.chromium.chrome.R; -import org.chromium.components.autofill.AutofillDelegate; -import org.chromium.components.autofill.AutofillSuggestion; -import org.chromium.ui.base.WindowAndroid; - -/** - * The lists that shows autofill suggestions in the keyboard accessory. - */ -public class AutofillKeyboardSuggestions - extends LinearLayout implements View.OnClickListener, View.OnLongClickListener { - private final WindowAndroid mWindowAndroid; - private final AutofillDelegate mAutofillDelegate; - // If |mMaximumLabelWidthPx| is 0, we do not call |setMaxWidth| on the |TextView| for a - // fillable suggestion label. - private final int mMaximumLabelWidthPx; - private final int mMaximumSublabelWidthPx; - - /** - * Creates an AutofillKeyboardAccessory with specified parameters. - * @param windowAndroid The owning WindowAndroid. - * @param autofillDelegate A object that handles the calls to the native - * AutofillKeyboardAccessoryView. - * @param shouldLimitLabelWidth If true, limit suggestion label width to 1/2 device's width. - */ - public AutofillKeyboardSuggestions(WindowAndroid windowAndroid, - AutofillDelegate autofillDelegate, boolean shouldLimitLabelWidth) { - super(windowAndroid.getActivity().get()); - assert windowAndroid.getActivity().get() != null; - assert autofillDelegate != null; - mAutofillDelegate = autofillDelegate; - mWindowAndroid = windowAndroid; - - int deviceWidthPx = windowAndroid.getDisplay().getDisplayWidth(); - mMaximumLabelWidthPx = shouldLimitLabelWidth ? deviceWidthPx / 2 : 0; - mMaximumSublabelWidthPx = deviceWidthPx / 4; - - int horizontalPaddingPx = - getResources().getDimensionPixelSize(R.dimen.keyboard_accessory_half_padding); - setPadding(horizontalPaddingPx, 0, horizontalPaddingPx, 0); - } - - /** - * @param isRtl Gives the layout direction for the <input> field. - */ - public void setSuggestions(AutofillSuggestion[] suggestions, boolean isRtl) { - assert suggestions.length > 0; - removeAllViews(); - // The first suggestion may be a hint to call attention to the keyboard accessory. See - // |IsHintEnabledInKeyboardAccessory|. A 'hint' suggestion does not have a label and is - // not fillable, but has an icon. - final boolean isFirstSuggestionAHint = TextUtils.isEmpty(suggestions[0].getLabel()); - if (isFirstSuggestionAHint) { - assert suggestions[0].getIconId() != 0 && !suggestions[0].isFillable(); - } - int separatorPosition = -1; - int startIndex = isRtl ? suggestions.length - 1 : 0; - int endIndex = isRtl ? -1 : suggestions.length; // The index after the last element. - int i = startIndex; - while (i != endIndex) { - AutofillSuggestion suggestion = suggestions[i]; - boolean isKeyboardAccessoryHint = i == 0 && isFirstSuggestionAHint; - if (!isKeyboardAccessoryHint) { - assert !TextUtils.isEmpty(suggestion.getLabel()); - } - - View touchTarget; - if (suggestion.isFillable() || suggestion.getIconId() == 0) { - touchTarget = createAccessoryItem(suggestion); - } else { - if (separatorPosition == -1 && !isKeyboardAccessoryHint) separatorPosition = i; - touchTarget = createAccessoryIcon(suggestion, isKeyboardAccessoryHint); - } - - if (!isKeyboardAccessoryHint) { - touchTarget.setTag(i); - touchTarget.setOnClickListener(this); - if (suggestion.isDeletable()) { - touchTarget.setOnLongClickListener(this); - } - } - addView(touchTarget); - i = isRtl ? i - 1 : i + 1; - } - - if (separatorPosition != -1) { - addView(createSeparatorView(), separatorPosition); - } - } - - @NonNull - private View createAccessoryItem(AutofillSuggestion suggestion) { - View touchTarget; - touchTarget = LayoutInflater.from(getContext()) - .inflate(R.layout.autofill_keyboard_accessory_item, this, false); - - TextView label = - (TextView) touchTarget.findViewById(R.id.autofill_keyboard_accessory_item_label); - - if (mMaximumLabelWidthPx > 0 && suggestion.isFillable()) { - label.setMaxWidth(mMaximumLabelWidthPx); - } - - label.setText(suggestion.getLabel()); - if (Build.VERSION.SDK_INT < Build.VERSION_CODES.LOLLIPOP) { - label.setTypeface(Typeface.DEFAULT_BOLD); - } - - if (suggestion.getIconId() != 0) { - ApiCompatibilityUtils.setCompoundDrawablesRelativeWithIntrinsicBounds(label, - AppCompatResources.getDrawable(getContext(), suggestion.getIconId()), - null /* top */, null /* end */, null /* bottom */); - } - - if (!TextUtils.isEmpty(suggestion.getSublabel())) { - assert suggestion.isFillable(); - TextView sublabel = (TextView) touchTarget.findViewById( - R.id.autofill_keyboard_accessory_item_sublabel); - sublabel.setText(suggestion.getSublabel()); - sublabel.setVisibility(View.VISIBLE); - sublabel.setMaxWidth(mMaximumSublabelWidthPx); - } - return touchTarget; - } - - @NonNull - private View createAccessoryIcon( - AutofillSuggestion suggestion, boolean isKeyboardAccessoryHint) { - View touchTarget; - touchTarget = LayoutInflater.from(getContext()) - .inflate(R.layout.autofill_keyboard_accessory_icon, this, false); - - ImageView icon = (ImageView) touchTarget; - Drawable drawable = AppCompatResources.getDrawable(getContext(), suggestion.getIconId()); - if (isKeyboardAccessoryHint) { - drawable.setColorFilter( - ApiCompatibilityUtils.getColor(getResources(), R.color.default_icon_color_blue), - PorterDuff.Mode.SRC_IN); - } else { - icon.setContentDescription(suggestion.getLabel()); - } - icon.setImageDrawable(drawable); - return touchTarget; - } - - public void dismiss() { - removeAllViews(); - mAutofillDelegate.dismissed(); - } - - @Override - public void onClick(View v) { - mAutofillDelegate.suggestionSelected((int) v.getTag()); - } - - @Override - public boolean onLongClick(View v) { - mAutofillDelegate.deleteSuggestion((int) v.getTag()); - return true; - } - - // Helper to create separator view so that the settings icon is aligned to the right of the - // screen. - private View createSeparatorView() { - View separator = new View(getContext()); - // Specify a layout weight so that the settings icon, which is displayed after the - // separator, is aligned with the edge of the viewport. - separator.setLayoutParams(new LinearLayout.LayoutParams(0, 0, 1)); - return separator; - } -}
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/autofill/keyboard_accessory/AccessorySheetCoordinator.java b/chrome/android/java/src/org/chromium/chrome/browser/autofill/keyboard_accessory/AccessorySheetCoordinator.java index b978bc72..c217e017 100644 --- a/chrome/android/java/src/org/chromium/chrome/browser/autofill/keyboard_accessory/AccessorySheetCoordinator.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/autofill/keyboard_accessory/AccessorySheetCoordinator.java
@@ -40,7 +40,7 @@ model.addObserver(new PropertyModelChangeProcessor<>(model, stubHolder, new LazyViewBinderAdapter<>( new AccessorySheetViewBinder(), this::onViewInflated))); - KeyboardAccessoryMetricsRecorder.recordModelChanges(model); + KeyboardAccessoryMetricsRecorder.registerMetricsObserver(model); mMediator = new AccessorySheetMediator(model); }
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/autofill/keyboard_accessory/KeyboardAccessoryCoordinator.java b/chrome/android/java/src/org/chromium/chrome/browser/autofill/keyboard_accessory/KeyboardAccessoryCoordinator.java index d80708b..2d65f14 100644 --- a/chrome/android/java/src/org/chromium/chrome/browser/autofill/keyboard_accessory/KeyboardAccessoryCoordinator.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/autofill/keyboard_accessory/KeyboardAccessoryCoordinator.java
@@ -8,7 +8,6 @@ import android.view.ViewStub; import org.chromium.base.VisibleForTesting; -import org.chromium.chrome.browser.autofill.AutofillKeyboardSuggestions; import org.chromium.chrome.browser.autofill.keyboard_accessory.KeyboardAccessoryViewBinder.ActionViewHolder; import org.chromium.chrome.browser.autofill.keyboard_accessory.KeyboardAccessoryViewBinder.TabViewBinder; import org.chromium.chrome.browser.modelutil.LazyViewBinderAdapter; @@ -73,7 +72,7 @@ model.addObserver(new PropertyModelChangeProcessor<>(model, mViewHolder, new LazyViewBinderAdapter<>( new KeyboardAccessoryViewBinder(), this::onViewInflated))); - KeyboardAccessoryMetricsRecorder.recordModelChanges(model); + KeyboardAccessoryMetricsRecorder.registerMetricsObserver(model); } /** @@ -85,7 +84,8 @@ static RecyclerViewAdapter<ActionViewHolder, Void> createActionsAdapter( KeyboardAccessoryModel model) { return new RecyclerViewAdapter<>( - new SimpleRecyclerViewMcp<>(model.getActionList(), null, ActionViewHolder::bind), + new SimpleRecyclerViewMcp<>(model.getActionList(), + KeyboardAccessoryData.Action::getActionType, ActionViewHolder::bind), ActionViewHolder::create); } @@ -161,15 +161,6 @@ } /** - * TODO(fhorschig): Remove this function. The suggestions bridge should become a provider. - * Sets a View that will be displayed in a scroll view at the end of the accessory. - * @param suggestions The suggestions to be rendered into the accessory. - */ - public void setSuggestions(AutofillKeyboardSuggestions suggestions) { - mMediator.setSuggestions(suggestions); - } - - /** * Dismisses the accessory by hiding it's view, clearing potentially left over suggestions and * hiding the keyboard. */
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/autofill/keyboard_accessory/KeyboardAccessoryData.java b/chrome/android/java/src/org/chromium/chrome/browser/autofill/keyboard_accessory/KeyboardAccessoryData.java index e9a24cf..4123c19 100644 --- a/chrome/android/java/src/org/chromium/chrome/browser/autofill/keyboard_accessory/KeyboardAccessoryData.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/autofill/keyboard_accessory/KeyboardAccessoryData.java
@@ -44,13 +44,16 @@ * @param <T> An {@link Action}, {@link Tab} or {@link Item} that this instance observes. */ public interface Observer<T> { + int DEFAULT_TYPE = Integer.MIN_VALUE; + /** * A provider calls this function with a list of items that should be available in the * keyboard accessory. - * @param actions The actions to be displayed in the Accessory. It's a native array as the + * @param typeId Specifies which type of item this update affects. + * @param items The items to be displayed in the Accessory. It's a native array as the * provider is typically a bridge called via JNI which prefers native types. */ - void onItemsAvailable(T[] actions); + void onItemsAvailable(int typeId, T[] items); } /** @@ -306,6 +309,15 @@ */ public static class PropertyProvider<T> implements Provider<T> { private final List<Observer<T>> mObservers = new ArrayList<>(); + protected int mType; + + public PropertyProvider() { + this(Observer.DEFAULT_TYPE); + } + + public PropertyProvider(int type) { + mType = type; + } @Override public void addObserver(Observer<T> observer) { @@ -315,7 +327,7 @@ @Override public void notifyObservers(T[] items) { for (Observer<T> observer : mObservers) { - observer.onItemsAvailable(items); + observer.onItemsAvailable(mType, items); } } }
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/autofill/keyboard_accessory/KeyboardAccessoryMediator.java b/chrome/android/java/src/org/chromium/chrome/browser/autofill/keyboard_accessory/KeyboardAccessoryMediator.java index d748af6..bed1591 100644 --- a/chrome/android/java/src/org/chromium/chrome/browser/autofill/keyboard_accessory/KeyboardAccessoryMediator.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/autofill/keyboard_accessory/KeyboardAccessoryMediator.java
@@ -10,13 +10,16 @@ import android.support.design.widget.TabLayout; import org.chromium.base.VisibleForTesting; -import org.chromium.chrome.browser.autofill.AutofillKeyboardSuggestions; import org.chromium.chrome.browser.autofill.keyboard_accessory.KeyboardAccessoryCoordinator.VisibilityDelegate; import org.chromium.chrome.browser.autofill.keyboard_accessory.KeyboardAccessoryData.Action; import org.chromium.chrome.browser.modelutil.ListObservable; import org.chromium.chrome.browser.modelutil.PropertyObservable; import org.chromium.ui.base.WindowAndroid; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; + /** * This is the second part of the controller of the keyboard accessory component. * It is responsible to update the {@link KeyboardAccessoryModel} based on Backend calls and notify @@ -58,8 +61,19 @@ } @Override - public void onItemsAvailable(KeyboardAccessoryData.Action[] actions) { - mModel.setActions(actions); + public void onItemsAvailable(int typeId, KeyboardAccessoryData.Action[] actions) { + assert typeId != DEFAULT_TYPE : "Did not specify which Action type has been updated."; + // If there is a new list, retain all actions that are of a different type than the provided + // actions. + List<Action> retainedActions = new ArrayList<>(); + for (Action a : mModel.getActionList()) { + if (a.getActionType() == typeId) continue; + retainedActions.add(a); + } + // Always append autofill suggestions to the very end. + int insertPos = typeId == AccessoryAction.AUTOFILL_SUGGESTION ? retainedActions.size() : 0; + retainedActions.addAll(insertPos, Arrays.asList(actions)); + mModel.setActions(retainedActions.toArray(new Action[retainedActions.size()])); } @Override @@ -81,16 +95,8 @@ mModel.getTabList().set(tabs); } - void setSuggestions(AutofillKeyboardSuggestions suggestions) { - mModel.setAutofillSuggestions(suggestions); - } - void dismiss() { mModel.setActiveTab(null); - if (mModel.getAutofillSuggestions() != null) { - mModel.getAutofillSuggestions().dismiss(); - mModel.setAutofillSuggestions(null); - } updateVisibility(); } @@ -131,7 +137,8 @@ // When the accessory just (dis)appeared, there should be no active tab. mModel.setActiveTab(null); if (!mModel.isVisible()) { - mModel.setActions(new Action[0]); + // TODO(fhorschig|ioanap): Maybe the generation bridge should take care of that. + onItemsAvailable(AccessoryAction.GENERATE_PASSWORD_AUTOMATIC, new Action[0]); } return; } @@ -148,10 +155,6 @@ if (propertyKey == KeyboardAccessoryModel.PropertyKey.TAB_SELECTION_CALLBACKS) { return; } - if (propertyKey == KeyboardAccessoryModel.PropertyKey.SUGGESTIONS) { - updateVisibility(); - return; - } assert false : "Every property update needs to be handled explicitly!"; } @@ -177,8 +180,7 @@ private boolean shouldShowAccessory() { if (!mIsKeyboardVisible && mModel.activeTab() == null) return false; - return mModel.getAutofillSuggestions() != null || mModel.getActionList().size() > 0 - || mModel.getTabList().size() > 0; + return mModel.getActionList().size() > 0 || mModel.getTabList().size() > 0; } private void updateVisibility() {
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/autofill/keyboard_accessory/KeyboardAccessoryMetricsRecorder.java b/chrome/android/java/src/org/chromium/chrome/browser/autofill/keyboard_accessory/KeyboardAccessoryMetricsRecorder.java index eb5b19cb..3d09371 100644 --- a/chrome/android/java/src/org/chromium/chrome/browser/autofill/keyboard_accessory/KeyboardAccessoryMetricsRecorder.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/autofill/keyboard_accessory/KeyboardAccessoryMetricsRecorder.java
@@ -6,21 +6,27 @@ import static org.chromium.chrome.browser.autofill.keyboard_accessory.AccessorySheetTrigger.MANUAL_OPEN; +import android.support.annotation.Nullable; + import org.chromium.base.VisibleForTesting; import org.chromium.base.metrics.RecordHistogram; import org.chromium.chrome.browser.autofill.keyboard_accessory.KeyboardAccessoryData.Item; import org.chromium.chrome.browser.modelutil.ListObservable; +import org.chromium.chrome.browser.modelutil.PropertyObservable; import org.chromium.chrome.browser.modelutil.SimpleListObservable; +import java.util.HashSet; +import java.util.Set; + /** * This class provides helpers to record metrics related to the keyboard accessory and its sheets. * It can set up observers to observe {@link KeyboardAccessoryModel}s, {@link AccessorySheetModel}s * or {@link ListObservable<Item>}s changes and records metrics accordingly. */ -class KeyboardAccessoryMetricsRecorder { +public class KeyboardAccessoryMetricsRecorder { static final String UMA_KEYBOARD_ACCESSORY_ACTION_IMPRESSION = "KeyboardAccessory.AccessoryActionImpression"; - static final String UMA_KEYBOARD_ACCESSORY_ACTION_SELECTED = + public static final String UMA_KEYBOARD_ACCESSORY_ACTION_SELECTED = "KeyboardAccessory.AccessoryActionSelected"; static final String UMA_KEYBOARD_ACCESSORY_BAR_SHOWN = "KeyboardAccessory.AccessoryBarShown"; static final String UMA_KEYBOARD_ACCESSORY_SHEET_SUGGESTIONS = @@ -36,25 +42,165 @@ */ private KeyboardAccessoryMetricsRecorder() {} - static void recordModelChanges(KeyboardAccessoryModel keyboardAccessoryModel) { - keyboardAccessoryModel.addObserver((source, propertyKey) -> { + /** + * This observer will react to changes of the {@link KeyboardAccessoryModel} and store each + * impression once per visibility change. + */ + private static class AccessoryBarObserver + implements ListObservable.ListObserver<Void>, + PropertyObservable.PropertyObserver<KeyboardAccessoryModel.PropertyKey> { + private final Set<Integer> mRecordedBarBuckets = new HashSet<>(); + private final Set<Integer> mRecordedActionImpressions = new HashSet<>(); + private final KeyboardAccessoryModel mModel; + + AccessoryBarObserver(KeyboardAccessoryModel keyboardAccessoryModel) { + mModel = keyboardAccessoryModel; + } + + @Override + public void onPropertyChanged(PropertyObservable<KeyboardAccessoryModel.PropertyKey> source, + @Nullable KeyboardAccessoryModel.PropertyKey propertyKey) { if (propertyKey == KeyboardAccessoryModel.PropertyKey.VISIBLE) { - if (keyboardAccessoryModel.isVisible()) { - recordAccessoryBarImpression(keyboardAccessoryModel); - recordAccessoryActionImpressions(keyboardAccessoryModel); + if (mModel.isVisible()) { + recordFirstImpression(); + maybeRecordBarBucket(AccessoryBarContents.WITH_AUTOFILL_SUGGESTIONS); + recordUnrecordedList(mModel.getTabList(), 0, mModel.getTabList().size()); + recordUnrecordedList(mModel.getActionList(), 0, mModel.getActionList().size()); + } else { + mRecordedBarBuckets.clear(); + mRecordedActionImpressions.clear(); } return; } if (propertyKey == KeyboardAccessoryModel.PropertyKey.ACTIVE_TAB - || propertyKey == KeyboardAccessoryModel.PropertyKey.TAB_SELECTION_CALLBACKS - || propertyKey == KeyboardAccessoryModel.PropertyKey.SUGGESTIONS) { + || propertyKey == KeyboardAccessoryModel.PropertyKey.TAB_SELECTION_CALLBACKS) { return; } assert false : "Every property update needs to be handled explicitly!"; - }); + } + + /** + * If not done yet, this records an impression for the general type of list that was added. + * In addition, it records impressions for each new action type that changed in the list. + * @param list A generic list with {@link KeyboardAccessoryData.Tab}s or + * {@link KeyboardAccessoryData.Action}s. + * @param first Index of the first element that changed. + * @param count Number of elements starting with |first| that were added or changed. + */ + private void recordUnrecordedList(ListObservable list, int first, int count) { + if (!mModel.isVisible()) return; + if (list == mModel.getTabList()) { + maybeRecordBarBucket(AccessoryBarContents.WITH_TABS); + return; + } + if (list == mModel.getActionList()) { + // Remove all actions that were changed, so changes are treated as new recordings. + for (int index = first; index < first + count; ++index) { + KeyboardAccessoryData.Action action = mModel.getActionList().get(index); + mRecordedActionImpressions.remove(action.getActionType()); + } + // Record any unrecorded type, but not more than once (i.e. one set of suggestion). + for (int index = first; index < first + count; ++index) { + KeyboardAccessoryData.Action action = mModel.getActionList().get(index); + maybeRecordBarBucket( + action.getActionType() == AccessoryAction.AUTOFILL_SUGGESTION + ? AccessoryBarContents.WITH_AUTOFILL_SUGGESTIONS + : AccessoryBarContents.WITH_ACTIONS); + if (mRecordedActionImpressions.add(action.getActionType())) { + recordActionImpression(action.getActionType()); + } + } + return; + } + assert false : "Tried to record metrics for unknown list " + list; + } + + /** + * Records whether the first impression of the bar contained any contents (which it should). + */ + private void recordFirstImpression() { + if (!mRecordedBarBuckets.isEmpty()) return; + @AccessoryBarContents + int bucketToRecord = AccessoryBarContents.NO_CONTENTS; + for (@AccessoryBarContents int bucket = 0; bucket < AccessoryBarContents.COUNT; + ++bucket) { + if (shouldRecordAccessoryBarImpression(bucket)) { + bucketToRecord = AccessoryBarContents.ANY_CONTENTS; + break; + } + } + maybeRecordBarBucket(bucketToRecord); + } + + @Override + public void onItemRangeInserted(ListObservable source, int index, int count) { + recordUnrecordedList(source, index, count); + } + + @Override + public void onItemRangeRemoved(ListObservable source, int index, int count) {} + + @Override + public void onItemRangeChanged( + ListObservable<Void> source, int index, int count, @Nullable Void payload) { + recordUnrecordedList(source, index, count); + } + + /** + * Returns an impression for the accessory bar if it hasn't occurred yet. + * @param bucket The bucket to record. + */ + private void maybeRecordBarBucket(@AccessoryBarContents int bucket) { + if (!shouldRecordAccessoryBarImpression(bucket)) return; + mRecordedBarBuckets.add(bucket); + RecordHistogram.recordEnumeratedHistogram( + UMA_KEYBOARD_ACCESSORY_BAR_SHOWN, bucket, AccessoryBarContents.COUNT); + } + + /** + * If a checks whether the given bucket should be recorded (i.e. the property it observes is + * not empty, the accessory is visible and it wasn't recorded yet). + * @param bucket + * @return + */ + private boolean shouldRecordAccessoryBarImpression(int bucket) { + if (!mModel.isVisible()) return false; + if (mRecordedBarBuckets.contains(bucket)) return false; + switch (bucket) { + case AccessoryBarContents.WITH_ACTIONS: + return hasAtLeastOneActionOfType(mModel.getActionList(), + AccessoryAction.MANAGE_PASSWORDS, + AccessoryAction.GENERATE_PASSWORD_AUTOMATIC); + case AccessoryBarContents.WITH_AUTOFILL_SUGGESTIONS: + return hasAtLeastOneActionOfType( + mModel.getActionList(), AccessoryAction.AUTOFILL_SUGGESTION); + case AccessoryBarContents.WITH_TABS: + return mModel.getTabList().size() > 0; + case AccessoryBarContents.ANY_CONTENTS: // Intentional fallthrough. + case AccessoryBarContents.NO_CONTENTS: + return true; // Logged on first impression. + } + assert false : "Did not check whether to record an impression bucket " + bucket + "."; + return false; + } } - static void recordModelChanges(AccessorySheetModel accessorySheetModel) { + /** + * Registers an observer to the given model that records changes for all properties. + * @param keyboardAccessoryModel The observable {@link KeyboardAccessoryModel}. + */ + static void registerMetricsObserver(KeyboardAccessoryModel keyboardAccessoryModel) { + AccessoryBarObserver observer = new AccessoryBarObserver(keyboardAccessoryModel); + keyboardAccessoryModel.addObserver(observer); + keyboardAccessoryModel.addTabListObserver(observer); + keyboardAccessoryModel.addActionListObserver(observer); + } + + /** + * Registers an observer to the given model that records changes for all properties. + * @param accessorySheetModel The observable {@link AccessorySheetModel}. + */ + static void registerMetricsObserver(AccessorySheetModel accessorySheetModel) { accessorySheetModel.addObserver((source, propertyKey) -> { if (propertyKey == AccessorySheetModel.PropertyKey.VISIBLE) { if (accessorySheetModel.isVisible()) { @@ -77,6 +223,12 @@ }); } + /** + * Gets the complete name of a histogram for the given tab type. + * @param baseHistogram the base histogram. + * @param tabType The tab type that determines the histogram's suffix. + * @return The complete name of the histogram. + */ @VisibleForTesting static String getHistogramForType(String baseHistogram, @AccessoryTabType int tabType) { switch (tabType) { @@ -89,6 +241,11 @@ return ""; } + /** + * Records why an accessory sheet was toggled. + * @param tabType The tab that was selected to trigger the sheet. + * @param bucket The {@link AccessorySheetTrigger} to record.. + */ static void recordSheetTrigger( @AccessoryTabType int tabType, @AccessorySheetTrigger int bucket) { RecordHistogram.recordEnumeratedHistogram( @@ -107,7 +264,7 @@ UMA_KEYBOARD_ACCESSORY_ACTION_IMPRESSION, bucket, AccessoryAction.COUNT); } - static void recordActionSelected(@AccessoryAction int bucket) { + public static void recordActionSelected(@AccessoryAction int bucket) { RecordHistogram.recordEnumeratedHistogram( UMA_KEYBOARD_ACCESSORY_ACTION_SELECTED, bucket, AccessoryAction.COUNT); } @@ -117,6 +274,11 @@ bucket, AccessorySuggestionType.COUNT); } + /** + * Records the number of interactive suggestions in the given list. + * @param tabType The tab that contained the list. + * @param suggestionList The list containing all suggestions. + */ static void recordSheetSuggestions( @AccessoryTabType int tabType, SimpleListObservable<Item> suggestionList) { int interactiveSuggestions = 0; @@ -134,43 +296,14 @@ } } - private static void recordAccessoryActionImpressions( - KeyboardAccessoryModel keyboardAccessoryModel) { - for (KeyboardAccessoryData.Action action : keyboardAccessoryModel.getActionList()) { - recordActionImpression(action.getActionType()); + private static boolean hasAtLeastOneActionOfType( + SimpleListObservable<KeyboardAccessoryData.Action> actionList, + @AccessoryAction int... types) { + Set<Integer> typeList = new HashSet<>(types.length); + for (@AccessoryAction int type : types) typeList.add(type); + for (KeyboardAccessoryData.Action action : actionList) { + if (typeList.contains(action.getActionType())) return true; } - } - - private static void recordAccessoryBarImpression( - KeyboardAccessoryModel keyboardAccessoryModel) { - boolean barImpressionRecorded = false; - for (@AccessoryBarContents int bucket = 0; bucket < AccessoryBarContents.COUNT; ++bucket) { - if (shouldRecordAccessoryImpression(bucket, keyboardAccessoryModel)) { - RecordHistogram.recordEnumeratedHistogram( - UMA_KEYBOARD_ACCESSORY_BAR_SHOWN, bucket, AccessoryBarContents.COUNT); - barImpressionRecorded = true; - } - } - RecordHistogram.recordEnumeratedHistogram(UMA_KEYBOARD_ACCESSORY_BAR_SHOWN, - barImpressionRecorded ? AccessoryBarContents.ANY_CONTENTS - : AccessoryBarContents.NO_CONTENTS, - AccessoryBarContents.COUNT); - } - - private static boolean shouldRecordAccessoryImpression( - int bucket, KeyboardAccessoryModel keyboardAccessoryModel) { - switch (bucket) { - case AccessoryBarContents.WITH_TABS: - return keyboardAccessoryModel.getTabList().size() > 0; - case AccessoryBarContents.WITH_ACTIONS: - return keyboardAccessoryModel.getActionList().size() > 0; - case AccessoryBarContents.WITH_AUTOFILL_SUGGESTIONS: - return keyboardAccessoryModel.getAutofillSuggestions() != null; - case AccessoryBarContents.ANY_CONTENTS: // Intentional fallthrough. - case AccessoryBarContents.NO_CONTENTS: - return false; // General impression is logged last. - } - assert false : "Did not check whether to record an impression bucket " + bucket + "."; return false; } }
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/autofill/keyboard_accessory/KeyboardAccessoryModel.java b/chrome/android/java/src/org/chromium/chrome/browser/autofill/keyboard_accessory/KeyboardAccessoryModel.java index 51cc493..bfa59f3 100644 --- a/chrome/android/java/src/org/chromium/chrome/browser/autofill/keyboard_accessory/KeyboardAccessoryModel.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/autofill/keyboard_accessory/KeyboardAccessoryModel.java
@@ -7,7 +7,6 @@ import android.support.annotation.Nullable; import android.support.design.widget.TabLayout; -import org.chromium.chrome.browser.autofill.AutofillKeyboardSuggestions; import org.chromium.chrome.browser.modelutil.ListObservable; import org.chromium.chrome.browser.modelutil.PropertyObservable; import org.chromium.chrome.browser.modelutil.SimpleListObservable; @@ -30,7 +29,6 @@ static final List<PropertyKey> ALL_PROPERTIES = new ArrayList<>(); static final PropertyKey VISIBLE = new PropertyKey(); - static final PropertyKey SUGGESTIONS = new PropertyKey(); static final PropertyKey ACTIVE_TAB = new PropertyKey(); static final PropertyKey TAB_SELECTION_CALLBACKS = new PropertyKey(); @@ -45,9 +43,6 @@ private @Nullable Integer mActiveTab; private TabLayout.OnTabSelectedListener mTabSelectionCallbacks; - // TODO(fhorschig): Ideally, make this a ListObservable populating a RecyclerView. - private AutofillKeyboardSuggestions mAutofillSuggestions; - KeyboardAccessoryModel() { mActionListObservable = new SimpleListObservable<>(); mTabListObservable = new SimpleListObservable<>(); @@ -113,14 +108,4 @@ mTabSelectionCallbacks = tabSelectionCallbacks; notifyPropertyChanged(PropertyKey.TAB_SELECTION_CALLBACKS); } - - AutofillKeyboardSuggestions getAutofillSuggestions() { - return mAutofillSuggestions; - } - - void setAutofillSuggestions(AutofillKeyboardSuggestions autofillSuggestions) { - if (autofillSuggestions == mAutofillSuggestions) return; // Nothing to do: same object. - mAutofillSuggestions = autofillSuggestions; - notifyPropertyChanged(PropertyKey.SUGGESTIONS); - } }
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/autofill/keyboard_accessory/KeyboardAccessoryView.java b/chrome/android/java/src/org/chromium/chrome/browser/autofill/keyboard_accessory/KeyboardAccessoryView.java index 00e02fc..d084837 100644 --- a/chrome/android/java/src/org/chromium/chrome/browser/autofill/keyboard_accessory/KeyboardAccessoryView.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/autofill/keyboard_accessory/KeyboardAccessoryView.java
@@ -19,21 +19,16 @@ import android.view.View; import android.view.ViewGroup; import android.view.accessibility.AccessibilityEvent; -import android.widget.HorizontalScrollView; import android.widget.LinearLayout; import org.chromium.base.ApiCompatibilityUtils; import org.chromium.chrome.R; -import org.chromium.chrome.browser.autofill.AutofillKeyboardSuggestions; - -import javax.annotation.Nullable; /** * The Accessory sitting above the keyboard and below the content area. It is used for autofill * suggestions and manual entry points assisting the user in filling forms. */ class KeyboardAccessoryView extends LinearLayout { - private HorizontalScrollView mSuggestionsView; private RecyclerView mActionsView; private TabLayout mTabLayout; private TabLayout.TabLayoutOnPageChangeListener mPageChangeListener; @@ -67,20 +62,11 @@ mTabLayout = findViewById(R.id.tabs); - mSuggestionsView = findViewById(R.id.suggestions_view); - // Apply RTL layout changes to the views children: - ApiCompatibilityUtils.setLayoutDirection(mSuggestionsView, + ApiCompatibilityUtils.setLayoutDirection(mActionsView, isLayoutRtl() ? View.LAYOUT_DIRECTION_RTL : View.LAYOUT_DIRECTION_LTR); } - @Override - protected void onLayout(boolean changed, int left, int top, int right, int bottom) { - super.onLayout(changed, left, top, right, bottom); - // When the size changes, the scrolling should be reset. - mSuggestionsView.fullScroll(isLayoutRtl() ? FOCUS_RIGHT : FOCUS_LEFT); - } - void setVisible(boolean visible) { if (visible) { show(); @@ -145,18 +131,6 @@ } } - // TODO(crbug/722897): Check to handle RTL. - // TODO(fhorschig): This should use a RecyclerView. The model should contain single suggestions. - /** - * Shows the given suggestions. If set to null, it only removes existing suggestions. - * @param suggestions Autofill suggestion data. - */ - void updateSuggestions(@Nullable AutofillKeyboardSuggestions suggestions) { - mSuggestionsView.removeAllViews(); - if (suggestions == null) return; - mSuggestionsView.addView(suggestions); - } - private void show() { bringToFront(); // Needs to overlay every component and the bottom sheet - like a keyboard. setVisibility(View.VISIBLE); @@ -172,15 +146,13 @@ recyclerView.setLayoutManager( new LinearLayoutManager(getContext(), LinearLayoutManager.HORIZONTAL, false)); + int pad = getResources().getDimensionPixelSize(R.dimen.keyboard_accessory_padding); // Create margins between every element. - recyclerView.addItemDecoration(new HorizontalDividerItemDecoration( - getResources().getDimensionPixelSize(R.dimen.keyboard_accessory_padding))); + recyclerView.addItemDecoration(new HorizontalDividerItemDecoration(pad)); // Remove all animations - the accessory shouldn't be visibly built anyway. recyclerView.setItemAnimator(null); - int pad = getResources().getDimensionPixelSize(R.dimen.keyboard_accessory_padding); - int halfPad = getResources().getDimensionPixelSize(R.dimen.keyboard_accessory_half_padding); - recyclerView.setPadding(pad, halfPad, pad, halfPad); + recyclerView.setPadding(isLayoutRtl() ? 0 : pad, 0, isLayoutRtl() ? pad : 0, 0); } }
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/autofill/keyboard_accessory/KeyboardAccessoryViewBinder.java b/chrome/android/java/src/org/chromium/chrome/browser/autofill/keyboard_accessory/KeyboardAccessoryViewBinder.java index c5e84e4..d693560 100644 --- a/chrome/android/java/src/org/chromium/chrome/browser/autofill/keyboard_accessory/KeyboardAccessoryViewBinder.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/autofill/keyboard_accessory/KeyboardAccessoryViewBinder.java
@@ -6,7 +6,9 @@ import android.support.v7.widget.RecyclerView; import android.view.LayoutInflater; +import android.view.View; import android.view.ViewGroup; +import android.widget.TextView; import org.chromium.chrome.R; import org.chromium.chrome.browser.autofill.keyboard_accessory.KeyboardAccessoryData.Action; @@ -15,7 +17,6 @@ import org.chromium.chrome.browser.modelutil.LazyViewBinderAdapter; import org.chromium.chrome.browser.modelutil.ListModelChangeProcessor; import org.chromium.chrome.browser.modelutil.SimpleListObservable; -import org.chromium.ui.widget.ButtonCompat; /** * Observes {@link KeyboardAccessoryModel} changes (like a newly available tab) and triggers the @@ -25,24 +26,35 @@ implements LazyViewBinderAdapter.SimpleViewBinder<KeyboardAccessoryModel, KeyboardAccessoryView, PropertyKey> { static class ActionViewHolder extends RecyclerView.ViewHolder { - public ActionViewHolder(ButtonCompat actionView) { + public ActionViewHolder(View actionView) { super(actionView); } - public static ActionViewHolder create(ViewGroup parent, int viewType) { - assert viewType == 0; - return new ActionViewHolder( - (ButtonCompat) LayoutInflater.from(parent.getContext()) - .inflate(R.layout.keyboard_accessory_action, parent, false)); + public static ActionViewHolder create(ViewGroup parent, @AccessoryAction int viewType) { + switch (viewType) { + case AccessoryAction.GENERATE_PASSWORD_AUTOMATIC: + return new ActionViewHolder( + LayoutInflater.from(parent.getContext()) + .inflate(R.layout.keyboard_accessory_action, parent, false)); + case AccessoryAction.AUTOFILL_SUGGESTION: + return new ActionViewHolder( + LayoutInflater.from(parent.getContext()) + .inflate(R.layout.keyboard_accessory_chip, parent, false)); + case AccessoryAction.MANAGE_PASSWORDS: // Intentional fallthrough. + case AccessoryAction.COUNT: + assert false : "Type " + viewType + " is not a valid accessory bar action!"; + } + assert false : "Action type " + viewType + " was not handled!"; + return null; } public void bind(Action action) { - getActionView().setText(action.getCaption()); - getActionView().setOnClickListener(view -> action.getCallback().onResult(action)); + getView().setText(action.getCaption()); + getView().setOnClickListener(view -> action.getCallback().onResult(action)); } - private ButtonCompat getActionView() { - return (ButtonCompat) super.itemView; + private TextView getView() { + return (TextView) super.itemView; } } @@ -126,10 +138,6 @@ view.setTabSelectionAdapter(model.getTabSelectionCallbacks()); return; } - if (propertyKey == PropertyKey.SUGGESTIONS) { - view.updateSuggestions(model.getAutofillSuggestions()); - return; - } assert false : "Every possible property update needs to be handled!"; } }
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/autofill/keyboard_accessory/ManualFillingCoordinator.java b/chrome/android/java/src/org/chromium/chrome/browser/autofill/keyboard_accessory/ManualFillingCoordinator.java index 0a6cd10..6bc858e 100644 --- a/chrome/android/java/src/org/chromium/chrome/browser/autofill/keyboard_accessory/ManualFillingCoordinator.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/autofill/keyboard_accessory/ManualFillingCoordinator.java
@@ -55,6 +55,13 @@ return mMediator.handleBackPress(); } + /** + * Ensures that keyboard accessory and keyboard are hidden and reset. + */ + public void dismiss() { + mMediator.dismiss(); + } + public void notifyPopupAvailable(DropdownPopupWindow popup) { mMediator.notifyPopupOpened(popup); } @@ -74,7 +81,8 @@ mMediator.onOpenKeyboard(); } - void registerActionProvider(Provider<KeyboardAccessoryData.Action> actionProvider) { + void registerActionProvider( + KeyboardAccessoryData.PropertyProvider<KeyboardAccessoryData.Action> actionProvider) { mMediator.registerActionProvider(actionProvider); }
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/autofill/keyboard_accessory/ManualFillingMediator.java b/chrome/android/java/src/org/chromium/chrome/browser/autofill/keyboard_accessory/ManualFillingMediator.java index f99febf2..99132d7 100644 --- a/chrome/android/java/src/org/chromium/chrome/browser/autofill/keyboard_accessory/ManualFillingMediator.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/autofill/keyboard_accessory/ManualFillingMediator.java
@@ -11,6 +11,7 @@ import org.chromium.chrome.browser.ChromeActivity; import org.chromium.chrome.browser.ChromeFeatureList; import org.chromium.chrome.browser.ChromeTabbedActivity; +import org.chromium.chrome.browser.autofill.keyboard_accessory.KeyboardAccessoryData.Action; import org.chromium.chrome.browser.autofill.keyboard_accessory.KeyboardAccessoryData.Provider; import org.chromium.chrome.browser.compositor.layouts.Layout; import org.chromium.chrome.browser.compositor.layouts.SceneChangeObserver; @@ -36,13 +37,11 @@ /** * Provides a cache for a given Provider which can repeat the last notification to all * observers. - * @param <T> The data that is sent to observers. */ - @VisibleForTesting - protected class ProviderCacheAdapter<T> extends KeyboardAccessoryData.PropertyProvider<T> - implements KeyboardAccessoryData.Observer<T> { + private class ActionProviderCacheAdapter extends KeyboardAccessoryData.PropertyProvider<Action> + implements KeyboardAccessoryData.Observer<Action> { private final Tab mTab; - private T[] mLastItems; + private Action[] mLastItems; /** * Creates an adapter that listens to the given |provider| and stores items provided by it. @@ -51,7 +50,9 @@ * @param provider The {@link Provider} to observe and whose data to cache. * @param defaultItems The items to be notified about if the Provider hasn't provided any. */ - ProviderCacheAdapter(Tab tab, Provider<T> provider, T[] defaultItems) { + ActionProviderCacheAdapter(Tab tab, KeyboardAccessoryData.PropertyProvider<Action> provider, + Action[] defaultItems) { + super(provider.mType); mTab = tab; provider.addObserver(this); mLastItems = defaultItems; @@ -66,10 +67,10 @@ } @Override - public void onItemsAvailable(T[] items) { - mLastItems = items; + public void onItemsAvailable(int typeId, Action[] actions) { + mLastItems = actions; // Update the contents immediately, if the adapter connects to an active element. - if (mTab == mActiveBrowserTab) notifyObservers(items); + if (mTab == mActiveBrowserTab) notifyObservers(actions); } } @@ -80,7 +81,7 @@ @VisibleForTesting static class AccessoryState { @Nullable - ProviderCacheAdapter<KeyboardAccessoryData.Action> mActionsProvider; + ActionProviderCacheAdapter mActionsProvider; @Nullable PasswordAccessorySheetCoordinator mPasswordAccessorySheet; } @@ -160,9 +161,9 @@ getPasswordAccessorySheet().registerItemProvider(itemProvider); } - void registerActionProvider(Provider<KeyboardAccessoryData.Action> actionProvider) { - ProviderCacheAdapter<KeyboardAccessoryData.Action> adapter = new ProviderCacheAdapter<>( - mActiveBrowserTab, actionProvider, new KeyboardAccessoryData.Action[0]); + void registerActionProvider(KeyboardAccessoryData.PropertyProvider<Action> actionProvider) { + ActionProviderCacheAdapter adapter = + new ActionProviderCacheAdapter(mActiveBrowserTab, actionProvider, new Action[0]); mModel.get(mActiveBrowserTab).mActionsProvider = adapter; getKeyboardAccessory().registerActionListProvider(adapter); } @@ -180,6 +181,11 @@ return false; } + void dismiss() { + mKeyboardAccessory.dismiss(); + UiUtils.hideKeyboard(mActivity.getCurrentFocus()); + } + void notifyPopupOpened(DropdownPopupWindow popup) { mPopup = popup; }
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/autofill/keyboard_accessory/PasswordAccessoryBridge.java b/chrome/android/java/src/org/chromium/chrome/browser/autofill/keyboard_accessory/PasswordAccessoryBridge.java index 56b0c44e..c93217a 100644 --- a/chrome/android/java/src/org/chromium/chrome/browser/autofill/keyboard_accessory/PasswordAccessoryBridge.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/autofill/keyboard_accessory/PasswordAccessoryBridge.java
@@ -18,7 +18,8 @@ private final KeyboardAccessoryData.PropertyProvider<Item> mItemProvider = new KeyboardAccessoryData.PropertyProvider<>(); private final KeyboardAccessoryData.PropertyProvider<Action> mActionProvider = - new KeyboardAccessoryData.PropertyProvider<>(); + new KeyboardAccessoryData.PropertyProvider<>( + AccessoryAction.GENERATE_PASSWORD_AUTOMATIC); private final ManualFillingCoordinator mManualFillingCoordinator; private final ChromeActivity mActivity; private long mNativeView;
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/autofill/keyboard_accessory/PasswordAccessorySheetCoordinator.java b/chrome/android/java/src/org/chromium/chrome/browser/autofill/keyboard_accessory/PasswordAccessorySheetCoordinator.java index 78937d9..f163784 100644 --- a/chrome/android/java/src/org/chromium/chrome/browser/autofill/keyboard_accessory/PasswordAccessorySheetCoordinator.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/autofill/keyboard_accessory/PasswordAccessorySheetCoordinator.java
@@ -27,7 +27,7 @@ public class PasswordAccessorySheetCoordinator implements KeyboardAccessoryData.Tab.Listener { private final Context mContext; private final SimpleListObservable<Item> mModel = new SimpleListObservable<>(); - private final KeyboardAccessoryData.Observer<Item> mMediator = mModel::set; + private final KeyboardAccessoryData.Observer<Item> mMediator = (t, items) -> mModel.set(items); private final KeyboardAccessoryData.Tab mTab;
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/contextual_suggestions/ContextualSuggestionsCoordinator.java b/chrome/android/java/src/org/chromium/chrome/browser/contextual_suggestions/ContextualSuggestionsCoordinator.java index f246b19a..a9042e4e 100644 --- a/chrome/android/java/src/org/chromium/chrome/browser/contextual_suggestions/ContextualSuggestionsCoordinator.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/contextual_suggestions/ContextualSuggestionsCoordinator.java
@@ -105,6 +105,13 @@ * things needed to display suggestions (e.g. favicons, thumbnails). */ void showSuggestions(ContextualSuggestionsSource suggestionsSource) { + // If the content coordinator has already been destroyed when this method is called, return + // early. See https://crbug.com/873052. + if (mContentCoordinator == null) { + assert false : "ContentCoordinator false when #showSuggestions was called."; + return; + } + SuggestionsNavigationDelegate navigationDelegate = new SuggestionsNavigationDelegateImpl( mActivity, mProfile, mBottomSheetController.getBottomSheet(), mTabModelSelector); SuggestionsUiDelegateImpl uiDelegate = new SuggestionsUiDelegateImpl(suggestionsSource,
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/contextual_suggestions/ContextualSuggestionsMediator.java b/chrome/android/java/src/org/chromium/chrome/browser/contextual_suggestions/ContextualSuggestionsMediator.java index 5423dda..d5e7374 100644 --- a/chrome/android/java/src/org/chromium/chrome/browser/contextual_suggestions/ContextualSuggestionsMediator.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/contextual_suggestions/ContextualSuggestionsMediator.java
@@ -73,6 +73,7 @@ private @Nullable TextBubble mHelpBubble; private @Nullable WebContents mCurrentWebContents; + private boolean mModelPreparedForCurrentTab; private boolean mSuggestionsSetOnBottomSheet; private boolean mDidSuggestionsShowForTab; private boolean mHasRecordedPeekEventForTab; @@ -279,7 +280,7 @@ } private void onToolbarButtonClicked() { - if (mSuggestionsSetOnBottomSheet) return; + if (mSuggestionsSetOnBottomSheet || !mModelPreparedForCurrentTab) return; maybeShowContentInSheet(); mCoordinator.showSuggestions(mSuggestionsSource); @@ -395,7 +396,7 @@ * be cleared. */ private void clearSuggestions() { - // TODO(twellington): Does this signal need to go back to FetchHelper? + mModelPreparedForCurrentTab = false; // Remove suggestions before clearing model state so that views don't respond to model // changes while suggestions are hiding. See https://crbug.com/840579. @@ -470,6 +471,8 @@ mModel.setMenuButtonDelegate(this); mModel.setDefaultToolbarClickListener(view -> mCoordinator.expandBottomSheet()); mModel.setTitle(title); + + mModelPreparedForCurrentTab = true; } private void maybeShowContentInSheet() {
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/download/home/list/holder/GenericViewHolder.java b/chrome/android/java/src/org/chromium/chrome/browser/download/home/list/holder/GenericViewHolder.java index 1632e45..f4ff977 100644 --- a/chrome/android/java/src/org/chromium/chrome/browser/download/home/list/holder/GenericViewHolder.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/download/home/list/holder/GenericViewHolder.java
@@ -77,6 +77,7 @@ private void updateThumbnailView() { Resources resources = itemView.getContext().getResources(); SelectionView selectionView = itemView.findViewById(R.id.selection); + selectionView.setVisibility(selectionView.isSelected() ? View.VISIBLE : View.GONE); mThumbnailView.setVisibility(selectionView.isSelected() ? View.GONE : View.VISIBLE); if (mThumbnailBitmap != null) { assert !mThumbnailBitmap.isRecycled();
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/media/remote/OWNERS b/chrome/android/java/src/org/chromium/chrome/browser/media/remote/OWNERS deleted file mode 100644 index 7ce092c..0000000 --- a/chrome/android/java/src/org/chromium/chrome/browser/media/remote/OWNERS +++ /dev/null
@@ -1 +0,0 @@ -aberent@chromium.org
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/media/router/caf/CafBaseMediaRouteProvider.java b/chrome/android/java/src/org/chromium/chrome/browser/media/router/caf/CafBaseMediaRouteProvider.java new file mode 100644 index 0000000..dd99c95a40 --- /dev/null +++ b/chrome/android/java/src/org/chromium/chrome/browser/media/router/caf/CafBaseMediaRouteProvider.java
@@ -0,0 +1,262 @@ +// 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.media.router.caf; + +import android.os.Handler; +import android.support.annotation.NonNull; +import android.support.annotation.Nullable; +import android.support.v7.media.MediaRouteSelector; +import android.support.v7.media.MediaRouter; +import android.support.v7.media.MediaRouter.RouteInfo; + +import com.google.android.gms.cast.framework.CastSession; +import com.google.android.gms.cast.framework.SessionManagerListener; + +import org.chromium.base.Log; +import org.chromium.chrome.browser.media.router.DiscoveryCallback; +import org.chromium.chrome.browser.media.router.DiscoveryDelegate; +import org.chromium.chrome.browser.media.router.MediaRoute; +import org.chromium.chrome.browser.media.router.MediaRouteManager; +import org.chromium.chrome.browser.media.router.MediaRouteProvider; +import org.chromium.chrome.browser.media.router.MediaSink; +import org.chromium.chrome.browser.media.router.MediaSource; + +import java.util.ArrayList; +import java.util.Collections; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +/** + * A base provider containing common implementation for CAF-based {@link MediaRouteProvider}s. + */ +public abstract class CafBaseMediaRouteProvider + implements MediaRouteProvider, DiscoveryDelegate, SessionManagerListener<CastSession> { + private static final String TAG = "CafMR"; + + protected static final List<MediaSink> NO_SINKS = Collections.emptyList(); + protected final MediaRouter mAndroidMediaRouter; + protected final MediaRouteManager mManager; + protected final Map<String, DiscoveryCallback> mDiscoveryCallbacks = + new HashMap<String, DiscoveryCallback>(); + protected final Map<String, MediaRoute> mRoutes = new HashMap<String, MediaRoute>(); + protected Handler mHandler = new Handler(); + + // There can be only one Cast session at the same time on Android. + private CastSessionController mSessionController; + private CreateRouteRequestInfo mPendingCreateRouteRequestInfo; + + protected CafBaseMediaRouteProvider(MediaRouter androidMediaRouter, MediaRouteManager manager) { + mAndroidMediaRouter = androidMediaRouter; + mManager = manager; + } + + /** + * @return A MediaSource object constructed from |sourceId|, or null if the derived class does + * not support the source. + */ + @Nullable + protected abstract MediaSource getSourceFromId(@NonNull String sourceId); + + protected abstract void requestSessionLaunch(CreateRouteRequestInfo createRouteRequest); + + /** + * Forward the sinks back to the native counterpart. + */ + private final void onSinksReceivedInternal(String sourceId, @NonNull List<MediaSink> sinks) { + Log.d(TAG, "Reporting %d sinks for source: %s", sinks.size(), sourceId); + mManager.onSinksReceived(sourceId, this, sinks); + } + + /** + * {@link DiscoveryDelegate} implementation. + */ + @Override + public final void onSinksReceived(String sourceId, @NonNull List<MediaSink> sinks) { + Log.d(TAG, "Received %d sinks for sourceId: %s", sinks.size(), sourceId); + mHandler.post(() -> { onSinksReceivedInternal(sourceId, sinks); }); + } + + @Override + public final boolean supportsSource(String sourceId) { + return getSourceFromId(sourceId) != null; + } + + @Override + public final void startObservingMediaSinks(String sourceId) { + Log.d(TAG, "startObservingMediaSinks: " + sourceId); + + if (mAndroidMediaRouter == null) { + // If the MediaRouter API is not available, report no devices so the page doesn't even + // try to cast. + onSinksReceived(sourceId, NO_SINKS); + return; + } + + MediaSource source = getSourceFromId(sourceId); + if (source == null) { + // If the source is invalid or not supported by this provider, report no devices + // available. + onSinksReceived(sourceId, NO_SINKS); + return; + } + + // No-op, if already monitoring the application for this source. + String applicationId = source.getApplicationId(); + DiscoveryCallback callback = mDiscoveryCallbacks.get(applicationId); + if (callback != null) { + callback.addSourceUrn(sourceId); + return; + } + + MediaRouteSelector routeSelector = source.buildRouteSelector(); + if (routeSelector == null) { + // If the application invalid, report no devices available. + onSinksReceived(sourceId, NO_SINKS); + return; + } + + List<MediaSink> knownSinks = new ArrayList<MediaSink>(); + for (RouteInfo route : mAndroidMediaRouter.getRoutes()) { + if (route.matchesSelector(routeSelector)) { + knownSinks.add(MediaSink.fromRoute(route)); + } + } + + callback = new DiscoveryCallback(sourceId, knownSinks, this, routeSelector); + mAndroidMediaRouter.addCallback( + routeSelector, callback, MediaRouter.CALLBACK_FLAG_REQUEST_DISCOVERY); + mDiscoveryCallbacks.put(applicationId, callback); + } + + @Override + public final void stopObservingMediaSinks(String sourceId) { + Log.d(TAG, "startObservingMediaSinks: " + sourceId); + + if (mAndroidMediaRouter == null) return; + + MediaSource source = getSourceFromId(sourceId); + if (source == null) return; + + // No-op, if already monitoring the application for this source. + String applicationId = source.getApplicationId(); + DiscoveryCallback callback = mDiscoveryCallbacks.get(applicationId); + if (callback == null) return; + + callback.removeSourceUrn(sourceId); + + if (callback.isEmpty()) { + mAndroidMediaRouter.removeCallback(callback); + mDiscoveryCallbacks.remove(applicationId); + } + } + + @Override + public final void createRoute(String sourceId, String sinkId, String presentationId, + String origin, int tabId, boolean isIncognito, int nativeRequestId) { + Log.d(TAG, "createRoute"); + if (mPendingCreateRouteRequestInfo != null) { + // TODO(zqzhang): do something. + } + if (mAndroidMediaRouter == null) { + mManager.onRouteRequestError("Not supported", nativeRequestId); + return; + } + + MediaSink sink = MediaSink.fromSinkId(sinkId, mAndroidMediaRouter); + if (sink == null) { + mManager.onRouteRequestError("No sink", nativeRequestId); + return; + } + + MediaSource source = getSourceFromId(sourceId); + if (source == null) { + mManager.onRouteRequestError("Unsupported source URL", nativeRequestId); + return; + } + + mPendingCreateRouteRequestInfo = new CreateRouteRequestInfo( + source, sink, presentationId, origin, tabId, isIncognito, nativeRequestId); + + requestSessionLaunch(mPendingCreateRouteRequestInfo); + } + + @Override + public void closeRoute(String routeId) { + MediaRoute route = mRoutes.get(routeId); + if (route == null) return; + + if (!hasSession()) { + mRoutes.remove(routeId); + mManager.onRouteClosed(routeId); + return; + } + + mSessionController.endSession(); + } + + @Override + public void onSessionStartFailed(CastSession session, int error) { + for (String routeId : mRoutes.keySet()) { + mManager.onRouteClosedWithError(routeId, "Launch error"); + } + mRoutes.clear(); + } + + @Override + public final void onSessionStarted(CastSession session, String sessionId) { + mSessionController = new CastSessionController(session, this, + mPendingCreateRouteRequestInfo.sink, mPendingCreateRouteRequestInfo.source); + + onSessionStarted(mPendingCreateRouteRequestInfo); + + MediaSink sink = mPendingCreateRouteRequestInfo.sink; + MediaSource source = mPendingCreateRouteRequestInfo.source; + MediaRoute route = new MediaRoute( + sink.getId(), source.getSourceId(), mPendingCreateRouteRequestInfo.presentationId); + mRoutes.put(route.id, route); + mManager.onRouteCreated( + route.id, route.sinkId, mPendingCreateRouteRequestInfo.nativeRequestId, this, true); + + mPendingCreateRouteRequestInfo = null; + } + + // TODO(zqzhang): this is a temporary workaround for give CafMRP to manage ClientRecords on + // session start. This needs to be removed once ClientRecord management gets refactored. + abstract void onSessionStarted(CreateRouteRequestInfo request); + + protected boolean hasSession() { + return mSessionController != null; + } + + protected CastSessionController sessionController() { + return mSessionController; + } + + // TODO(zqzhang): This should go away once the session controller becomes a sticky instance. + protected void detachFromSession() { + mSessionController = null; + } + + protected static class CreateRouteRequestInfo { + public final MediaSource source; + public final MediaSink sink; + public final String presentationId; + public final String origin; + public final int tabId; + public final boolean isIncognito; + public final int nativeRequestId; + + public CreateRouteRequestInfo(MediaSource source, MediaSink sink, String presentationId, + String origin, int tabId, boolean isIncognito, int nativeRequestId) { + this.source = source; + this.sink = sink; + this.presentationId = presentationId; + this.origin = origin; + this.tabId = tabId; + this.isIncognito = isIncognito; + this.nativeRequestId = nativeRequestId; + } + } +}
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/media/router/caf/CafMediaRouteProvider.java b/chrome/android/java/src/org/chromium/chrome/browser/media/router/caf/CafMediaRouteProvider.java index 92ae53b..69ee510 100644 --- a/chrome/android/java/src/org/chromium/chrome/browser/media/router/caf/CafMediaRouteProvider.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/media/router/caf/CafMediaRouteProvider.java
@@ -4,21 +4,14 @@ package org.chromium.chrome.browser.media.router.caf; -import android.os.Handler; -import android.support.annotation.NonNull; import android.support.annotation.Nullable; -import android.support.v7.media.MediaRouteSelector; import android.support.v7.media.MediaRouter; -import android.support.v7.media.MediaRouter.RouteInfo; import com.google.android.gms.cast.framework.CastSession; -import com.google.android.gms.cast.framework.SessionManagerListener; import org.chromium.base.Log; import org.chromium.chrome.browser.media.router.ChromeMediaRouter; import org.chromium.chrome.browser.media.router.ClientRecord; -import org.chromium.chrome.browser.media.router.DiscoveryCallback; -import org.chromium.chrome.browser.media.router.DiscoveryDelegate; import org.chromium.chrome.browser.media.router.FlingingController; import org.chromium.chrome.browser.media.router.MediaRoute; import org.chromium.chrome.browser.media.router.MediaRouteManager; @@ -27,42 +20,24 @@ import org.chromium.chrome.browser.media.router.MediaSource; import org.chromium.chrome.browser.media.router.cast.CastMediaSource; -import java.util.ArrayList; -import java.util.Collections; import java.util.HashMap; -import java.util.List; import java.util.Map; import java.util.Set; /** * A {@link MediaRouteProvider} implementation for Cast devices and applications, using Cast v3 API. */ -public class CafMediaRouteProvider - implements MediaRouteProvider, DiscoveryDelegate, SessionManagerListener<CastSession> { - private static final String TAG = "cr_CafMRP"; +public class CafMediaRouteProvider extends CafBaseMediaRouteProvider { + private static final String TAG = "CafMRP"; private static final String AUTO_JOIN_PRESENTATION_ID = "auto-join"; private static final String PRESENTATION_ID_SESSION_ID_PREFIX = "cast-session_"; - protected static final List<MediaSink> NO_SINKS = Collections.emptyList(); - - protected final MediaRouter mAndroidMediaRouter; - protected final MediaRouteManager mManager; - protected final Map<String, DiscoveryCallback> mDiscoveryCallbacks = - new HashMap<String, DiscoveryCallback>(); - protected Handler mHandler = new Handler(); - protected final Map<String, MediaRoute> mRoutes = new HashMap<String, MediaRoute>(); private CreateRouteRequestInfo mPendingCreateRouteRequestInfo; - private CastSessionController mSessionController; private ClientRecord mLastRemovedRouteRecord; private final Map<String, ClientRecord> mClientRecords = new HashMap<String, ClientRecord>(); - private CafMediaRouteProvider(MediaRouter androidMediaRouter, MediaRouteManager manager) { - mAndroidMediaRouter = androidMediaRouter; - mManager = manager; - } - public static CafMediaRouteProvider create(MediaRouteManager manager) { return new CafMediaRouteProvider(ChromeMediaRouter.getAndroidMediaRouter(), manager); } @@ -76,152 +51,11 @@ } @Override - public boolean supportsSource(String sourceId) { - return getSourceFromId(sourceId) != null; - } - - @Override - public void startObservingMediaSinks(String sourceId) { - Log.d(TAG, "startObservingMediaSinks: " + sourceId); - - if (mAndroidMediaRouter == null) { - // If the MediaRouter API is not available, report no devices so the page doesn't even - // try to cast. - onSinksReceived(sourceId, NO_SINKS); - return; - } - - MediaSource source = getSourceFromId(sourceId); - if (source == null) { - // If the source is invalid or not supported by this provider, report no devices - // available. - onSinksReceived(sourceId, NO_SINKS); - return; - } - - MediaRouteSelector routeSelector = source.buildRouteSelector(); - if (routeSelector == null) { - // If the application invalid, report no devices available. - onSinksReceived(sourceId, NO_SINKS); - return; - } - - // No-op, if already monitoring the application for this source. - String applicationId = source.getApplicationId(); - DiscoveryCallback callback = mDiscoveryCallbacks.get(applicationId); - if (callback != null) { - callback.addSourceUrn(sourceId); - return; - } - - List<MediaSink> knownSinks = new ArrayList<MediaSink>(); - for (RouteInfo route : mAndroidMediaRouter.getRoutes()) { - if (route.matchesSelector(routeSelector)) { - knownSinks.add(MediaSink.fromRoute(route)); - } - } - - callback = new DiscoveryCallback(sourceId, knownSinks, this, routeSelector); - mAndroidMediaRouter.addCallback( - routeSelector, callback, MediaRouter.CALLBACK_FLAG_REQUEST_DISCOVERY); - mDiscoveryCallbacks.put(applicationId, callback); - } - - @Override - public void stopObservingMediaSinks(String sourceId) { - Log.d(TAG, "startObservingMediaSinks: " + sourceId); - - if (mAndroidMediaRouter == null) { - // If the MediaRouter API is not available, report no devices so the page doesn't even - // try to cast. - onSinksReceived(sourceId, NO_SINKS); - return; - } - - MediaSource source = getSourceFromId(sourceId); - if (source == null) { - // If the source is invalid or not supported by this provider, report no devices - // available. - onSinksReceived(sourceId, NO_SINKS); - return; - } - - MediaRouteSelector routeSelector = source.buildRouteSelector(); - if (routeSelector == null) { - // If the application invalid, report no devices available. - onSinksReceived(sourceId, NO_SINKS); - return; - } - - // No-op, if already monitoring the application for this source. - String applicationId = source.getApplicationId(); - DiscoveryCallback callback = mDiscoveryCallbacks.get(applicationId); - if (callback != null) { - callback.addSourceUrn(sourceId); - return; - } - - List<MediaSink> knownSinks = new ArrayList<MediaSink>(); - for (RouteInfo route : mAndroidMediaRouter.getRoutes()) { - if (route.matchesSelector(routeSelector)) { - knownSinks.add(MediaSink.fromRoute(route)); - } - } - - callback = new DiscoveryCallback(sourceId, knownSinks, this, routeSelector); - mAndroidMediaRouter.addCallback( - routeSelector, callback, MediaRouter.CALLBACK_FLAG_REQUEST_DISCOVERY); - mDiscoveryCallbacks.put(applicationId, callback); - } - - /** - * Forward the sinks back to the native counterpart. - */ - protected void onSinksReceivedInternal(String sourceId, @NonNull List<MediaSink> sinks) { - Log.d(TAG, "Reporting %d sinks for source: %s", sinks.size(), sourceId); - mManager.onSinksReceived(sourceId, this, sinks); - } - - /** - * {@link DiscoveryDelegate} implementation. - */ - @Override - public void onSinksReceived(String sourceId, @NonNull List<MediaSink> sinks) { - Log.d(TAG, "Received %d sinks for sourceId: %s", sinks.size(), sourceId); - mHandler.post(() -> { onSinksReceivedInternal(sourceId, sinks); }); - } - - @Override - public void createRoute(String sourceId, String sinkId, String presentationId, String origin, - int tabId, boolean isIncognito, int nativeRequestId) { - Log.d(TAG, "createRoute"); - if (mPendingCreateRouteRequestInfo != null) { - // TODO(zqzhang): do something. - } - if (mAndroidMediaRouter == null) { - mManager.onRouteRequestError("Not supported", nativeRequestId); - return; - } - - MediaSink sink = MediaSink.fromSinkId(sinkId, mAndroidMediaRouter); - if (sink == null) { - mManager.onRouteRequestError("No sink", nativeRequestId); - return; - } - - MediaSource source = CastMediaSource.from(sourceId); - if (source == null) { - mManager.onRouteRequestError("Unsupported presentation URL", nativeRequestId); - return; - } - - mPendingCreateRouteRequestInfo = new CreateRouteRequestInfo( - source, sink, presentationId, origin, tabId, isIncognito, nativeRequestId); - - CastUtils.getCastContext().setReceiverApplicationId(source.getApplicationId()); + public void requestSessionLaunch(CreateRouteRequestInfo request) { + CastUtils.getCastContext().setReceiverApplicationId(request.source.getApplicationId()); for (MediaRouter.RouteInfo routeInfo : mAndroidMediaRouter.getRoutes()) { - if (routeInfo.getId().equals(sink.getId())) { + if (routeInfo.getId().equals(request.sink.getId())) { // Unselect and then select so that CAF will get notified of the selection. mAndroidMediaRouter.unselect(0); routeInfo.select(); @@ -250,32 +84,29 @@ } MediaRoute route = - new MediaRoute(mSessionController.getSink().getId(), sourceId, presentationId); + new MediaRoute(sessionController().getSink().getId(), sourceId, presentationId); addRoute(route, origin, tabId); mManager.onRouteCreated(route.id, route.sinkId, nativeRequestId, this, false); } + // TODO(zqzhang): the clientRecord/route management is not clean and the logic seems to be + // problematic. @Override public void closeRoute(String routeId) { - MediaRoute route = mRoutes.get(routeId); - if (route == null) return; + boolean isRouteInRecord = mRoutes.containsKey(routeId); - if (!hasSession()) { - mRoutes.remove(routeId); - mManager.onRouteClosed(routeId); - return; - } + super.closeRoute(routeId); + + if (!isRouteInRecord) return; ClientRecord client = getClientRecordByRouteId(routeId); if (client != null && mAndroidMediaRouter != null) { - MediaSink sink = - MediaSink.fromSinkId(mSessionController.getSink().getId(), mAndroidMediaRouter); + MediaSink sink = MediaSink.fromSinkId( + sessionController().getSink().getId(), mAndroidMediaRouter); if (sink != null) { - mSessionController.notifyReceiverAction(routeId, sink, client.clientId, "stop"); + sessionController().notifyReceiverAction(routeId, sink, client.clientId, "stop"); } } - - mSessionController.endSession(); } @Override @@ -297,7 +128,8 @@ return null; } - private MediaSource getSourceFromId(String sourceId) { + @Override + protected MediaSource getSourceFromId(String sourceId) { return CastMediaSource.from(sourceId); } @@ -306,42 +138,33 @@ /////////////////////////////////////////////// @Override - public void onSessionStarting(CastSession session) { - Log.d(TAG, "onSessionStarting"); - mSessionController = new CastSessionController(session, this, - mPendingCreateRouteRequestInfo.sink, mPendingCreateRouteRequestInfo.source); - MediaRoute route = new MediaRoute(mPendingCreateRouteRequestInfo.sink.getId(), - mPendingCreateRouteRequestInfo.source.getSourceId(), - mPendingCreateRouteRequestInfo.presentationId); - addRoute( - route, mPendingCreateRouteRequestInfo.origin, mPendingCreateRouteRequestInfo.tabId); - mManager.onRouteCreated( - route.id, route.sinkId, mPendingCreateRouteRequestInfo.nativeRequestId, this, true); + public void onSessionStarting(CastSession session) {} - String clientId = ((CastMediaSource) mPendingCreateRouteRequestInfo.source).getClientId(); + @Override + public void onSessionStarted(CreateRouteRequestInfo request) { + Log.d(TAG, "onSessionStarted"); + + MediaSink sink = request.sink; + MediaSource source = request.source; + + MediaRoute route = + new MediaRoute(sink.getId(), source.getSourceId(), request.presentationId); + addRoute(route, request.origin, request.tabId); + + String clientId = ((CastMediaSource) source).getClientId(); if (clientId != null) { ClientRecord clientRecord = mClientRecords.get(clientId); if (clientRecord != null) { - mSessionController.notifyReceiverAction(clientRecord.routeId, - mPendingCreateRouteRequestInfo.sink, clientId, "cast"); + sessionController().notifyReceiverAction( + clientRecord.routeId, sink, clientId, "cast"); } } } @Override - public void onSessionStarted(CastSession session, String sessionId) { - Log.d(TAG, "onSessionStarted"); - mPendingCreateRouteRequestInfo = null; - mSessionController.onSessionStarted(); - } - - @Override public void onSessionStartFailed(CastSession session, int error) { - for (String routeId : mRoutes.keySet()) { - mManager.onRouteClosedWithError(routeId, "Launch error"); - } - mRoutes.clear(); + super.onSessionStartFailed(session, error); mClientRecords.clear(); } @@ -385,18 +208,7 @@ @Override public void onSessionSuspended(CastSession session, int reason) {} - public boolean hasSession() { - return mSessionController != null; - } - - private void detachFromSession() { - mSessionController.onSessionEnded(); - mSessionController = null; - } - private void addRoute(MediaRoute route, String origin, int tabId) { - mRoutes.put(route.id, route); - CastMediaSource source = CastMediaSource.from(route.sourceId); final String clientId = source.getClientId(); @@ -422,25 +234,8 @@ return null; } - private static class CreateRouteRequestInfo { - public final MediaSource source; - public final MediaSink sink; - public final String presentationId; - public final String origin; - public final int tabId; - public final boolean isIncognito; - public final int nativeRequestId; - - public CreateRouteRequestInfo(MediaSource source, MediaSink sink, String presentationId, - String origin, int tabId, boolean isIncognito, int nativeRequestId) { - this.source = source; - this.sink = sink; - this.presentationId = presentationId; - this.origin = origin; - this.tabId = tabId; - this.isIncognito = isIncognito; - this.nativeRequestId = nativeRequestId; - } + private CafMediaRouteProvider(MediaRouter androidMediaRouter, MediaRouteManager manager) { + super(androidMediaRouter, manager); } private boolean canJoinExistingSession( @@ -450,7 +245,7 @@ } if (presentationId.startsWith(PRESENTATION_ID_SESSION_ID_PREFIX)) { String sessionId = presentationId.substring(PRESENTATION_ID_SESSION_ID_PREFIX.length()); - return mSessionController.getSession().getSessionId().equals(sessionId); + return sessionController().getSession().getSessionId().equals(sessionId); } for (MediaRoute route : mRoutes.values()) { if (route.presentationId.equals(presentationId)) return true; @@ -461,7 +256,7 @@ private boolean canAutoJoin(CastMediaSource source, String origin, int tabId) { if (source.getAutoJoinPolicy().equals(CastMediaSource.AUTOJOIN_PAGE_SCOPED)) return false; - CastMediaSource currentSource = (CastMediaSource) mSessionController.getSource(); + CastMediaSource currentSource = (CastMediaSource) sessionController().getSource(); if (!currentSource.getApplicationId().equals(source.getApplicationId())) return false; if (mClientRecords.isEmpty() && mLastRemovedRouteRecord != null) {
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/media/router/caf/CastOptionsProvider.java b/chrome/android/java/src/org/chromium/chrome/browser/media/router/caf/CastOptionsProvider.java index b805cc6..6a5f62d 100644 --- a/chrome/android/java/src/org/chromium/chrome/browser/media/router/caf/CastOptionsProvider.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/media/router/caf/CastOptionsProvider.java
@@ -16,7 +16,10 @@ public class CastOptionsProvider implements OptionsProvider { @Override public CastOptions getCastOptions(Context context) { - return new CastOptions.Builder().setCastMediaOptions(null).build(); + return new CastOptions.Builder() + .setCastMediaOptions(null) + .setEnableReconnectionService(false) + .build(); } @Override
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/media/router/caf/CastSessionController.java b/chrome/android/java/src/org/chromium/chrome/browser/media/router/caf/CastSessionController.java index feab413..6535813 100644 --- a/chrome/android/java/src/org/chromium/chrome/browser/media/router/caf/CastSessionController.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/media/router/caf/CastSessionController.java
@@ -6,7 +6,6 @@ import com.google.android.gms.cast.framework.CastSession; -import org.chromium.chrome.browser.media.router.ClientRecord; import org.chromium.chrome.browser.media.router.MediaSink; import org.chromium.chrome.browser.media.router.MediaSource; @@ -19,11 +18,11 @@ private static final String TAG = "CastSessionController"; private final CastSession mCastSession; - private final CafMediaRouteProvider mProvider; + private final CafBaseMediaRouteProvider mProvider; private final MediaSink mSink; private final MediaSource mSource; - public CastSessionController(CastSession castSession, CafMediaRouteProvider provider, + public CastSessionController(CastSession castSession, CafBaseMediaRouteProvider provider, MediaSink sink, MediaSource source) { mCastSession = castSession; mProvider = provider; @@ -43,19 +42,6 @@ return mCastSession; } - public void onSessionStarted() { - for (ClientRecord client : mProvider.getClientRecords().values()) { - if (!client.isConnected) continue; - - onClientConnected(client.clientId); - } - // TODO(zqzhang): register necessary listeners and attach to RemoteMediaClient. - } - - public void onSessionEnded() { - // Not implemented. - } - public void endSession() { CastSession currentCastSession = CastUtils.getCastContext().getSessionManager().getCurrentCastSession(); @@ -64,12 +50,12 @@ } } - public void notifyReceiverAction( - String routeId, MediaSink sink, String clientId, String action) { + public void onSessionStarted() { // Not implemented. } - private void onClientConnected(String clientId) { + public void notifyReceiverAction( + String routeId, MediaSink sink, String clientId, String action) { // Not implemented. } }
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/media/router/cast/BaseMediaRouteProvider.java b/chrome/android/java/src/org/chromium/chrome/browser/media/router/cast/BaseMediaRouteProvider.java index cac193ca..4e37742 100644 --- a/chrome/android/java/src/org/chromium/chrome/browser/media/router/cast/BaseMediaRouteProvider.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/media/router/cast/BaseMediaRouteProvider.java
@@ -70,7 +70,7 @@ /** * Forward the sinks back to the native counterpart. */ - // Migrated to CafMediaRouteProvider. See https://crbug.com/711860. + // Migrated to CafBaseMediaRouteProvider. See https://crbug.com/711860. protected void onSinksReceivedInternal(String sourceId, @Nonnull List<MediaSink> sinks) { Log.d(TAG, "Reporting %d sinks for source: %s", sinks.size(), sourceId); mManager.onSinksReceived(sourceId, this, sinks); @@ -79,7 +79,7 @@ /** * {@link DiscoveryDelegate} implementation. */ - // Migrated to CafMediaRouteProvider. See https://crbug.com/711860. + // Migrated to CafBaseMediaRouteProvider. See https://crbug.com/711860. @Override public void onSinksReceived(String sourceId, @Nonnull List<MediaSink> sinks) { Log.d(TAG, "Received %d sinks for sourceId: %s", sinks.size(), sourceId); @@ -89,13 +89,13 @@ /** * {@link MediaRouteProvider} implementation. */ - // Migrated to CafMediaRouteProvider. See https://crbug.com/711860. + // Migrated to CafBaseMediaRouteProvider. See https://crbug.com/711860. @Override public boolean supportsSource(@Nonnull String sourceId) { return getSourceFromId(sourceId) != null; } - // Migrated to CafMediaRouteProvider. See https://crbug.com/711860. + // Migrated to CafBaseMediaRouteProvider. See https://crbug.com/711860. @Override public void startObservingMediaSinks(@Nonnull String sourceId) { Log.d(TAG, "startObservingMediaSinks: " + sourceId); @@ -143,7 +143,7 @@ mDiscoveryCallbacks.put(applicationId, callback); } - // Migrated to CafMediaRouteProvider. See https://crbug.com/711860. + // Migrated to CafBaseMediaRouteProvider. See https://crbug.com/711860. @Override public void stopObservingMediaSinks(@Nonnull String sourceId) { Log.d(TAG, "stopObservingMediaSinks: " + sourceId); @@ -164,7 +164,7 @@ } } - // Migrated to CafMediaRouteProvider. See https://crbug.com/711860. + // Migrated to CafBaseMediaRouteProvider. See https://crbug.com/711860. @Override public void createRoute(String sourceId, String sinkId, String presentationId, String origin, int tabId, boolean isIncognito, int nativeRequestId) { @@ -212,6 +212,7 @@ @Override public abstract void onSessionEnded(); + // Migrated to CafBaseMediaRouteProvider. See https://crbug.com/711860. @Override public void onSessionStartFailed() { for (String routeId : mRoutes.keySet()) { @@ -220,11 +221,13 @@ mRoutes.clear(); }; + // Migrated to CafBaseMediaRouteProvider. See https://crbug.com/711860. @Override public void onSessionStarted(CastSession session) { mSession = session; } + // Migrated to CafBaseMediaRouteProvider.endAllRoutes(). See https://crbug.com/711860. @Override public void onSessionStopAction() { if (mSession == null) return;
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/media/router/cast/CastMediaRouteProvider.java b/chrome/android/java/src/org/chromium/chrome/browser/media/router/cast/CastMediaRouteProvider.java index ad23c44..9365e9c 100644 --- a/chrome/android/java/src/org/chromium/chrome/browser/media/router/cast/CastMediaRouteProvider.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/media/router/cast/CastMediaRouteProvider.java
@@ -199,6 +199,7 @@ ChromeCastSessionManager.get().stopApplication(); } + // Migrated to CafMediaRouteProvider. See https://crbug.com/711860. @Override public void detachRoute(String routeId) { mRoutes.remove(routeId);
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/ntp/OWNERS b/chrome/android/java/src/org/chromium/chrome/browser/ntp/OWNERS index 76fc90c..f4818dc 100644 --- a/chrome/android/java/src/org/chromium/chrome/browser/ntp/OWNERS +++ b/chrome/android/java/src/org/chromium/chrome/browser/ntp/OWNERS
@@ -1,4 +1,3 @@ -dgn@chromium.org mvanouwerkerk@chromium.org peconn@chromium.org tedchoc@chromium.org
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/omnibox/LocationBarLayout.java b/chrome/android/java/src/org/chromium/chrome/browser/omnibox/LocationBarLayout.java index f22a3e22..4117799 100644 --- a/chrome/android/java/src/org/chromium/chrome/browser/omnibox/LocationBarLayout.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/omnibox/LocationBarLayout.java
@@ -1096,15 +1096,9 @@ int verboseStatusVisibility = verboseStatusVisible ? VISIBLE : GONE; - mVerboseStatusTextView.setTextColor(ApiCompatibilityUtils.getColor(getResources(), - mUseDarkColors ? R.color.locationbar_status_color - : R.color.locationbar_status_color_light)); mVerboseStatusTextView.setVisibility(verboseStatusVisibility); View separator = findViewById(R.id.location_bar_verbose_status_separator); - separator.setBackgroundColor(ApiCompatibilityUtils.getColor(getResources(), mUseDarkColors - ? R.color.locationbar_status_separator_color - : R.color.locationbar_status_separator_color_light)); separator.setVisibility(verboseStatusVisibility); findViewById(R.id.location_bar_verbose_status_extra_space) @@ -1117,6 +1111,11 @@ } mVerboseStatusTextView.setText(mToolbarDataProvider.getVerboseStatusString()); + mVerboseStatusTextView.setTextColor( + mToolbarDataProvider.getVerboseStatusTextColor(getResources(), mUseDarkColors)); + + separator.setBackgroundColor(mToolbarDataProvider.getVerboseStatusSeparatorColor( + getResources(), mUseDarkColors)); } /**
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/partnerbookmarks/PartnerBookmarksReader.java b/chrome/android/java/src/org/chromium/chrome/browser/partnerbookmarks/PartnerBookmarksReader.java index 0b8939c3..cc21bdb 100644 --- a/chrome/android/java/src/org/chromium/chrome/browser/partnerbookmarks/PartnerBookmarksReader.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/partnerbookmarks/PartnerBookmarksReader.java
@@ -124,7 +124,7 @@ assert false : "readBookmarks called after nativeDestroy."; return; } - new ReadBookmarksTask().execute(); + new ReadBookmarksTask().executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR); } /**
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/preferences/datareduction/DataReductionStatsPreference.java b/chrome/android/java/src/org/chromium/chrome/browser/preferences/datareduction/DataReductionStatsPreference.java index ef27eda..bffefe1 100644 --- a/chrome/android/java/src/org/chromium/chrome/browser/preferences/datareduction/DataReductionStatsPreference.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/preferences/datareduction/DataReductionStatsPreference.java
@@ -23,6 +23,7 @@ import android.view.View.OnClickListener; import android.widget.Button; import android.widget.FrameLayout; +import android.widget.LinearLayout; import android.widget.TextView; import org.chromium.base.Callback; @@ -31,6 +32,7 @@ import org.chromium.base.VisibleForTesting; import org.chromium.chrome.R; import org.chromium.chrome.browser.net.spdyproxy.DataReductionProxySettings; +import org.chromium.chrome.browser.util.ConversionUtils; import org.chromium.chrome.browser.util.FileSizeUtil; import org.chromium.third_party.android.datausagechart.ChartDataUsageView; import org.chromium.third_party.android.datausagechart.NetworkStats; @@ -51,11 +53,19 @@ */ private static final String PREF_DATA_REDUCTION_SITE_BREAKDOWN_ALLOWED_DATE = "data_reduction_site_breakdown_allowed_date"; + /** + * The threshold at which to start showing real data usage and savings, in + * kilobytes. + */ + private static final long SHOW_REAL_DATA_USED_KB_THRESHOLD = 100; private NetworkStatsHistory mOriginalNetworkStatsHistory; private NetworkStatsHistory mReceivedNetworkStatsHistory; private List<DataReductionDataUseItem> mSiteBreakdownItems; + private TextView mInitialDataSavingsTextView; + private LinearLayout mDataSavingsSummaryContainer; + private FrameLayout mDataSavingsChartDatesContainer; private TextView mDataSavingsTextView; private TextView mDataUsageTextView; private TextView mStartDateTextView; @@ -63,6 +73,7 @@ private Button mResetStatisticsButton; private ChartDataUsageView mChartDataUsageView; private DataReductionSiteBreakdownView mDataReductionBreakdownView; + private boolean mShouldShowRealData; private boolean mIsFirstDayChart; /** Number of days that the chart will present. */ private int mNumDaysInChart; @@ -155,6 +166,10 @@ mOriginalNetworkStatsHistory = getNetworkStatsHistory(original, mNumDaysInChart); mReceivedNetworkStatsHistory = getNetworkStatsHistory(received, mNumDaysInChart); + mShouldShowRealData = + ConversionUtils.bytesToKilobytes(mReceivedNetworkStatsHistory.getTotalBytes()) + >= SHOW_REAL_DATA_USED_KB_THRESHOLD; + // Determine the visible start and end points based on the available data and when it was // last updated. mVisibleStartTimeMillis = mOriginalNetworkStatsHistory.getStart() @@ -163,7 +178,7 @@ mVisibleEndTimeMillis = mOriginalNetworkStatsHistory.getEnd() + numDaysSinceStatsUpdated.intValue() * DateUtils.DAY_IN_MILLIS; - if (mDataReductionBreakdownView != null + if (mShouldShowRealData && mDataReductionBreakdownView != null && currentTimeMillis > ContextUtils.getAppSharedPreferences().getLong( PREF_DATA_REDUCTION_SITE_BREAKDOWN_ALLOWED_DATE, Long.MAX_VALUE)) { @@ -172,6 +187,7 @@ @Override public void onResult(List<DataReductionDataUseItem> result) { mSiteBreakdownItems = result; + mDataReductionBreakdownView.setAndDisplayDataUseItems( mSiteBreakdownItems); } @@ -188,6 +204,11 @@ return mNumDaysInChart; } + @VisibleForTesting + boolean shouldShowRealData() { + return mShouldShowRealData; + } + private static NetworkStatsHistory getNetworkStatsHistory(long[] history, int days) { if (days > history.length) days = history.length; NetworkStatsHistory networkStatsHistory = new NetworkStatsHistory( @@ -205,17 +226,35 @@ return networkStatsHistory; } - private void setDetailText() { + private void updateDetailView() { final Context context = getContext(); - updateDetailData(); - mStartDateTextView.setText(mStartDatePhrase); - mStartDateTextView.setContentDescription(context.getString( - R.string.data_reduction_start_date_content_description, mStartDatePhrase)); - mEndDateTextView.setText(mEndDatePhrase); - mEndDateTextView.setContentDescription(context.getString( - R.string.data_reduction_end_date_content_description, mEndDatePhrase)); - if (mDataUsageTextView != null) mDataUsageTextView.setText(mReceivedTotalPhrase); - if (mDataSavingsTextView != null) mDataSavingsTextView.setText(mSavingsTotalPhrase); + + // updateDetailData also updates some UMA based on the actual data shown, so only update it + // if we are actually showing the chart. + if (mShouldShowRealData) updateDetailData(); + + mInitialDataSavingsTextView.setVisibility(mShouldShowRealData ? View.GONE : View.VISIBLE); + + mDataSavingsSummaryContainer.setVisibility(mShouldShowRealData ? View.VISIBLE : View.GONE); + mChartDataUsageView.setVisibility(mShouldShowRealData ? View.VISIBLE : View.GONE); + mResetStatisticsButton.setVisibility(mShouldShowRealData ? View.VISIBLE : View.GONE); + + mDataSavingsChartDatesContainer.setVisibility( + mShouldShowRealData ? View.VISIBLE : View.GONE); + mStartDateTextView.setText(mShouldShowRealData ? mStartDatePhrase : ""); + mStartDateTextView.setContentDescription(mShouldShowRealData + ? context.getString(R.string.data_reduction_start_date_content_description, + mStartDatePhrase) + : ""); + mEndDateTextView.setText(mShouldShowRealData ? mEndDatePhrase : ""); + mEndDateTextView.setContentDescription(mShouldShowRealData + ? context.getString(R.string.data_reduction_end_date_content_description, + mEndDatePhrase) + : ""); + if (mDataUsageTextView != null) + mDataUsageTextView.setText(mShouldShowRealData ? mReceivedTotalPhrase : ""); + if (mDataSavingsTextView != null) + mDataSavingsTextView.setText(mShouldShowRealData ? mSavingsTotalPhrase : ""); } /** @@ -234,8 +273,12 @@ @Override protected void onBindView(View view) { super.onBindView(view); + mInitialDataSavingsTextView = (TextView) view.findViewById(R.id.initial_data_savings); + mDataSavingsSummaryContainer = + (LinearLayout) view.findViewById(R.id.data_savings_summary_container); mDataUsageTextView = (TextView) view.findViewById(R.id.data_reduction_usage); mDataSavingsTextView = (TextView) view.findViewById(R.id.data_reduction_savings); + mDataSavingsChartDatesContainer = (FrameLayout) view.findViewById(R.id.chart_dates); mStartDateTextView = (TextView) view.findViewById(R.id.data_reduction_start_date); mEndDateTextView = (TextView) view.findViewById(R.id.data_reduction_end_date); mDataReductionBreakdownView = @@ -245,10 +288,9 @@ // This will query data usage. Only set mSiteBreakdownItems if the statistics are not // being queried. updateReductionStatistics(System.currentTimeMillis()); - } else if (mSiteBreakdownItems != null) { + } else if (mSiteBreakdownItems != null && mShouldShowRealData) { mDataReductionBreakdownView.setAndDisplayDataUseItems(mSiteBreakdownItems); } - setDetailText(); mChartDataUsageView = (ChartDataUsageView) view.findViewById(R.id.chart); mChartDataUsageView.bindNetworkStats( @@ -264,6 +306,8 @@ if (mResetStatisticsButton != null) { setUpResetStatisticsButton(); } + + updateDetailView(); } private void setUpResetStatisticsButton() { @@ -292,7 +336,7 @@ DataReductionProxySavingsClearedReason .USER_ACTION_SETTINGS_MENU); updateReductionStatistics(now); - setDetailText(); + updateDetailView(); notifyChanged(); DataReductionProxyUma.dataReductionProxyUIAction( DataReductionProxyUma.ACTION_STATS_RESET);
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/signin/SigninActivity.java b/chrome/android/java/src/org/chromium/chrome/browser/signin/SigninActivity.java index 1b7bca3..2c75297 100644 --- a/chrome/android/java/src/org/chromium/chrome/browser/signin/SigninActivity.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/signin/SigninActivity.java
@@ -21,6 +21,9 @@ private static final String TAG = "SigninActivity"; private static final String ARGUMENT_FRAGMENT_NAME = "SigninActivity.FragmentName"; private static final String ARGUMENT_FRAGMENT_ARGS = "SigninActivity.FragmentArgs"; + private static final String ARGUMENT_INTERCEPT_BACK = "SigninActivity.InterceptBack"; + + private boolean mInterceptBack; /** * Creates an {@link Intent} which can be used to start sign-in flow. @@ -29,7 +32,7 @@ public static Intent createIntent( Context context, @AccountSigninActivity.AccessPoint int accessPoint) { return createIntentInternal( - context, SigninFragment.class, SigninFragment.createArguments(accessPoint)); + context, SigninFragment.class, SigninFragment.createArguments(accessPoint), false); } /** @@ -40,7 +43,7 @@ public static Intent createIntentForPromoDefaultFlow( Context context, @SigninAccessPoint int accessPoint, String accountName) { return createIntentInternal(context, SigninFragment.class, - SigninFragment.createArgumentsForPromoDefaultFlow(accessPoint, accountName)); + SigninFragment.createArgumentsForPromoDefaultFlow(accessPoint, accountName), false); } /** @@ -52,7 +55,8 @@ public static Intent createIntentForPromoChooseAccountFlow( Context context, @SigninAccessPoint int accessPoint, String accountName) { return createIntentInternal(context, SigninFragment.class, - SigninFragment.createArgumentsForPromoChooseAccountFlow(accessPoint, accountName)); + SigninFragment.createArgumentsForPromoChooseAccountFlow(accessPoint, accountName), + false); } /** @@ -63,7 +67,7 @@ public static Intent createIntentForPromoAddAccountFlow( Context context, @SigninAccessPoint int accessPoint) { return createIntentInternal(context, SigninFragment.class, - SigninFragment.createArgumentsForPromoAddAccountFlow(accessPoint)); + SigninFragment.createArgumentsForPromoAddAccountFlow(accessPoint), false); } /** @@ -72,15 +76,15 @@ */ public static Intent createIntentForConsentBump(Context context, String accountName) { return createIntentInternal(context, ConsentBumpFragment.class, - ConsentBumpFragment.createArguments(accountName)); + ConsentBumpFragment.createArguments(accountName), true); } - private static Intent createIntentInternal( - Context context, Class<? extends Fragment> fragmentName, Bundle fragmentArgs) { + private static Intent createIntentInternal(Context context, + Class<? extends Fragment> fragmentName, Bundle fragmentArgs, boolean interceptBack) { Intent intent = new Intent(context, SigninActivity.class); intent.putExtra(ARGUMENT_FRAGMENT_NAME, fragmentName.getName()); intent.putExtra(ARGUMENT_FRAGMENT_ARGS, fragmentArgs); - intent.putExtras(fragmentArgs); + intent.putExtra(ARGUMENT_INTERCEPT_BACK, interceptBack); return intent; } @@ -97,5 +101,19 @@ fragment = Fragment.instantiate(this, fragmentName, fragmentArgs); fragmentManager.beginTransaction().add(R.id.fragment_container, fragment).commit(); } + mInterceptBack = getIntent().getBooleanExtra(ARGUMENT_INTERCEPT_BACK, false); + } + + @Override + public void onBackPressed() { + if (!mInterceptBack) { + super.onBackPressed(); + return; + } + int backStackEntryCount = getSupportFragmentManager().getBackStackEntryCount(); + // Ditch the button click if fragment manager back stack is empty. + if (backStackEntryCount == 0) return; + // Let FragmentActivity pop the stack, as it has additional safety checks. + super.onBackPressed(); } }
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/toolbar/ToolbarDataProvider.java b/chrome/android/java/src/org/chromium/chrome/browser/toolbar/ToolbarDataProvider.java index 6e8cf8f..2b39265 100644 --- a/chrome/android/java/src/org/chromium/chrome/browser/toolbar/ToolbarDataProvider.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/toolbar/ToolbarDataProvider.java
@@ -5,11 +5,14 @@ package org.chromium.chrome.browser.toolbar; import android.content.res.ColorStateList; +import android.content.res.Resources; +import android.support.annotation.ColorRes; import android.support.annotation.DrawableRes; import android.support.annotation.NonNull; import android.support.annotation.Nullable; import android.support.annotation.StringRes; +import org.chromium.base.ApiCompatibilityUtils; import org.chromium.chrome.R; import org.chromium.chrome.browser.ntp.NewTabPage; import org.chromium.chrome.browser.omnibox.UrlBarData; @@ -102,6 +105,31 @@ int getSecurityIconResource(boolean isTablet); /** + * @return The resource ID of the text color for the verbose status view or 0 if none + * applies. + */ + @ColorRes + default int getVerboseStatusTextColor(Resources res, boolean useDarkColors) { + if (isOfflinePage()) { + return ApiCompatibilityUtils.getColor(res, + useDarkColors ? R.color.locationbar_status_offline_color + : R.color.locationbar_status_offline_color_light); + } + return 0; + } + + /** + * @return The resource ID of the color to use for the separator in the Omnibox Verbose status + * view or 0 if none applies. + */ + @ColorRes + default int getVerboseStatusSeparatorColor(Resources res, boolean useDarkColors) { + return ApiCompatibilityUtils.getColor(res, + useDarkColors ? R.color.locationbar_status_separator_color + : R.color.locationbar_status_separator_color_light); + } + + /** * @return The resource ID of the display string for the verbose status view or 0 if none * applies. */
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/vr/AndroidUiGestureTarget.java b/chrome/android/java/src/org/chromium/chrome/browser/vr/AndroidUiGestureTarget.java index 72ea2488..9acd7ae 100644 --- a/chrome/android/java/src/org/chromium/chrome/browser/vr/AndroidUiGestureTarget.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/vr/AndroidUiGestureTarget.java
@@ -5,7 +5,6 @@ package org.chromium.chrome.browser.vr; import android.os.Handler; -import android.view.InputDevice; import android.view.MotionEvent; import android.view.View; @@ -29,8 +28,7 @@ @CalledByNative private void inject(int action, long timeInMs) { - mMotionEventSynthesizer.inject( - action, 1 /* pointerCount */, timeInMs, InputDevice.SOURCE_CLASS_POINTER); + mMotionEventSynthesizer.inject(action, 1 /* pointerCount */, timeInMs); } @CalledByNative @@ -46,8 +44,7 @@ public void run() { mMotionEventSynthesizer.setPointer( 0 /* index */, x, y, 0 /* id */, MotionEvent.TOOL_TYPE_STYLUS); - mMotionEventSynthesizer.inject(action, 1 /* pointerCount */, timeInMs + delayMs, - InputDevice.SOURCE_CLASS_POINTER); + mMotionEventSynthesizer.inject(action, 1 /* pointerCount */, timeInMs + delayMs); } }, delayMs); }
diff --git a/chrome/android/java/strings/android_chrome_strings.grd b/chrome/android/java/strings/android_chrome_strings.grd index 3e27bee..ad3b4fd6 100644 --- a/chrome/android/java/strings/android_chrome_strings.grd +++ b/chrome/android/java/strings/android_chrome_strings.grd
@@ -1190,6 +1190,9 @@ <message name="IDS_DATA_REDUCTION_TITLE" desc="Menu item for Data Saver, which allows users to save mobile data by compressing network traffic."> Data Saver </message> + <message name="IDS_DATA_REDUCTION_INITIAL_TITLE" desc="This title states that the below chart will contain the user's data savings after they have started browsing."> + Your data savings will appear here + </message> <message name="IDS_DATA_REDUCTION_SAVED_LABEL" desc="Summary text for the menu item that states the amount of mobile data that was saved by Data Saver (i.e. XX MB saved). Data Saver allows users to to reduce their mobile data usage by compressing network traffic."> <ph name="data">%1$s<ex>1.0 GB</ex></ph> saved </message>
diff --git a/chrome/android/java/strings/android_chrome_strings_grd/IDS_DATA_REDUCTION_INITIAL_TITLE.png.sha1 b/chrome/android/java/strings/android_chrome_strings_grd/IDS_DATA_REDUCTION_INITIAL_TITLE.png.sha1 new file mode 100644 index 0000000..d521285 --- /dev/null +++ b/chrome/android/java/strings/android_chrome_strings_grd/IDS_DATA_REDUCTION_INITIAL_TITLE.png.sha1
@@ -0,0 +1 @@ +08d2cfe33c14562fc5989f5fc45e81de3a23ef92 \ No newline at end of file
diff --git a/chrome/android/java/strings/translations/android_chrome_strings_ca.xtb b/chrome/android/java/strings/translations/android_chrome_strings_ca.xtb index 36f540f..95d8581 100644 --- a/chrome/android/java/strings/translations/android_chrome_strings_ca.xtb +++ b/chrome/android/java/strings/translations/android_chrome_strings_ca.xtb
@@ -186,7 +186,7 @@ <translation id="2349710944427398404">Dades totals utilitzades per Chrome, com ara comptes, adreces d'interès i opcions de configuració desades</translation> <translation id="2351097562818989364">S'ha restablert la configuració del Traductor.</translation> <translation id="2359808026110333948">Continua</translation> -<translation id="2369533728426058518">obre les pestanyes</translation> +<translation id="2369533728426058518">pestanyes obertes</translation> <translation id="2387895666653383613">Canvia la mida del text</translation> <translation id="2402980924095424747"><ph name="MEGABYTES" /> MB</translation> <translation id="2410754283952462441">Tria un compte</translation>
diff --git a/chrome/android/java/strings/translations/android_chrome_strings_hi.xtb b/chrome/android/java/strings/translations/android_chrome_strings_hi.xtb index 5990e430..560f1cb3 100644 --- a/chrome/android/java/strings/translations/android_chrome_strings_hi.xtb +++ b/chrome/android/java/strings/translations/android_chrome_strings_hi.xtb
@@ -45,7 +45,7 @@ <translation id="1285320974508926690">कभी भी इस साइट का अनुवाद न करें</translation> <translation id="1291207594882862231">इतिहास, कुकी, साइट डेटा, संचय साफ़ करें…</translation> <translation id="129553762522093515">हाल ही में बंद किए गए</translation> -<translation id="1326317727527857210">अपने अन्य डिवाइस से अपने टैब प्राप्त करने के लिए, Chrome में प्रवेश करें.</translation> +<translation id="1326317727527857210">अपने अन्य डिवाइस से अपने टैब पाने के लिए, Chrome में साइन इन करें.</translation> <translation id="1332501820983677155">Google Chrome सुविधा शॉर्टकट</translation> <translation id="136248372334525878">तेज़ी से लोड करने और ऑफ़लाइन पढ़ने के लिए पेज पहले से लोड करें</translation> <translation id="1369915414381695676"><ph name="SITE_NAME" /> साइट जोड़ी गई</translation> @@ -129,7 +129,7 @@ <translation id="1946005195648379376">नियंत्रित करें कि खोज और अन्य Google सेवाओं को वैयक्तिकृत करने के लिए Google आपके ब्राउज़िंग इतिहास का उपयोग कैसे करता है.</translation> <translation id="1952172573699511566">जब संभव होगा, वेबसाइटें आपकी पसंदीदा भाषा में लेख दिखाएंगी.</translation> <translation id="195283394249132567">दर्शक के मुताबिक बनाई गई Google सेवाएं</translation> -<translation id="1966710179511230534">कृपया अपने प्रवेश विवरण अपडेट करें.</translation> +<translation id="1966710179511230534">कृपया अपने साइन इन विवरण अपडेट करें.</translation> <translation id="1974060860693918893">उन्नत</translation> <translation id="1984937141057606926">तृतीय-पक्ष को छोड़कर अनुमति है</translation> <translation id="1987739130650180037"><ph name="MESSAGE" /> <ph name="LINK_NAME" /> बटन</translation> @@ -297,7 +297,7 @@ <translation id="3341058695485821946">देखें कि आपने कितना डेटा बचाया है</translation> <translation id="3350687908700087792">सभी गुप्त टैब बंद करें</translation> <translation id="3365671512111106261">डेटा बचाने के साधन के चालू होने पर यह सेटिंग अनुपलब्ध होती है</translation> -<translation id="3367813778245106622">समन्वयन शुरू करने के लिए फिर से प्रवेश करें</translation> +<translation id="3367813778245106622">समन्वयन शुरू करने के लिए फिर से साइन इन करें</translation> <translation id="3377025655491224618">निजी टैब</translation> <translation id="3384347053049321195">चित्र शेयर करें</translation> <translation id="3386292677130313581">साइट को अपना स्थान जानने देने से पहले अनुमति लेना आवश्यक बनाएं (अनुशंसित)</translation> @@ -329,7 +329,7 @@ <translation id="3620176948598597475">रीसेट करने से आपकी देखी गई साइटों की सूची के साथ, डेटा बचाने के साधन का इतिहास हमेशा के लिए मिट जाता है.</translation> <translation id="3630011985153972676">सेटिंग में जाकर जब ’वाई-फ़ाई’ पर हों तब Chrome को अपने लिए लेख डाउनलोड करने की अनुमति दें.</translation> <translation id="3632295766818638029">पासवर्ड दिखाएं</translation> -<translation id="363596933471559332">संग्रहित क्रेडेंशियल का उपयोग करके वेबसाइटों में अपने आप प्रवेश करें. सुविधा के बंद होने पर, किसी वेबसाइट में प्रवेश करने से पहले आपसे हर बार सत्यापन के लिए कहा जाएगा.</translation> +<translation id="363596933471559332">संग्रहित क्रेडेंशियल का उपयोग करके वेबसाइटों में अपने आप साइन इन करें. सुविधा के बंद होने पर, किसी वेबसाइट में साइन इन करने से पहले आपसे हर बार सत्यापन के लिए कहा जाएगा.</translation> <translation id="3661699943263275414">तृतीय-पक्ष वेबसाइटें कुकी डेटा को सहेज सकती हैं और पढ़ सकती हैं</translation> <translation id="3662546969139119822">यहां कोई इतिहास नहीं है</translation> <translation id="3672452749423051839">मार्गदर्शक गड़बड़ी सुझाव</translation> @@ -355,7 +355,7 @@ <translation id="3927692899758076493">Sans Serif</translation> <translation id="3928666092801078803">मेरा डेटा संयोजित करें</translation> <translation id="393697183122708255">कोई सक्षम बोलकर खोजें उपलब्ध नहीं</translation> -<translation id="3950820424414687140">प्रवेश करें</translation> +<translation id="3950820424414687140">साइन इन करें</translation> <translation id="395206256282351086">सर्च और साइट सुझाव बंद हैं</translation> <translation id="3967822245660637423">डाउनलोड पूर्ण</translation> <translation id="397583555483684758">समन्वयन ने कार्य करना बंद कर दिया है</translation> @@ -437,7 +437,7 @@ <translation id="4561979708150884304">कोई कनेक्शन नहीं</translation> <translation id="4565377596337484307">पासवर्ड छिपाएं</translation> <translation id="4570913071927164677">विवरण</translation> -<translation id="4572422548854449519">प्रबंधित खाते में प्रवेश करें</translation> +<translation id="4572422548854449519">प्रबंधित खाते में साइन इन करें</translation> <translation id="4581964774250883625">आप गुप्त मोड में चले गए हैं.</translation> <translation id="4583164079174244168">{MINUTES,plural, =1{# मिनट पहले}one{# मिनट पहले}other{# मिनट पहले}}</translation> <translation id="4587589328781138893">साइटें</translation> @@ -869,7 +869,7 @@ <translation id="7925590027513907933">{FILE_COUNT,plural, =1{फ़ाइल डाउनलोड की जा रही है.}one{# फ़ाइलें डाउनलोड की जा रही हैं.}other{# फ़ाइलें डाउनलोड की जा रही हैं.}}</translation> <translation id="7929962904089429003">मेनू खोलें</translation> <translation id="7942131818088350342"><ph name="PRODUCT_NAME" /> पुराना है.</translation> -<translation id="7947953824732555851">स्वीकार करें और प्रवेश करें</translation> +<translation id="7947953824732555851">स्वीकार करें और साइन इन करें</translation> <translation id="7963646190083259054">विक्रेता:</translation> <translation id="7981313251711023384">ज़्यादा तेज़ी से ब्राउज़ करने और खोजने के लिए पेज पहले से लोड करें</translation> <translation id="79859296434321399">'बढ़ी हुई वास्तविकता' की सामग्री देखने के लिए, ARCore इंस्टॉल करें</translation>
diff --git a/chrome/android/java/strings/translations/android_chrome_strings_iw.xtb b/chrome/android/java/strings/translations/android_chrome_strings_iw.xtb index c148e6b..e7a62ad 100644 --- a/chrome/android/java/strings/translations/android_chrome_strings_iw.xtb +++ b/chrome/android/java/strings/translations/android_chrome_strings_iw.xtb
@@ -61,6 +61,7 @@ <translation id="1404122904123200417">מוטבע ב-<ph name="WEBSITE_URL" /></translation> <translation id="1406000523432664303">'ללא מעקב'</translation> <translation id="1407135791313364759">פתח הכל</translation> +<translation id="1409426117486808224">תצוגה פשוטה של כרטיסיות פתוחות</translation> <translation id="1409879593029778104">הורדת <ph name="FILE_NAME" /> נמנעה מכיוון שהקובץ כבר קיים.</translation> <translation id="1414981605391750300">המערכת יוצרת קשר עם Google. עוד מעט מסיימים…</translation> <translation id="1416550906796893042">גרסת אפליקציה</translation> @@ -80,6 +81,7 @@ <translation id="1566400915470565838">כדי להשתמש ב-<ph name="APP_NAME" /> יש להתחבר לאינטרנט.</translation> <translation id="1569387923882100876">מכשיר מחובר</translation> <translation id="1571304935088121812">העתק שם משתמש</translation> +<translation id="1576370611341449972">הורדה מתבצעת רק בחיבור Wi-Fi</translation> <translation id="1612196535745283361">כדי לבצע סריקה לאיתור מכשירים, Chrome זקוק לגישה לנתוני מיקום. הגישה למיקום <ph name="BEGIN_LINK" />כבויה במכשיר הזה<ph name="END_LINK" />.</translation> <translation id="162035744160882748">הפעלת סינכרון, התאמה אישית ושירותים אחרים של Google</translation> <translation id="1620510694547887537">מצלמה</translation> @@ -344,6 +346,7 @@ <translation id="3810838688059735925">וידאו</translation> <translation id="3810973564298564668">נהל</translation> <translation id="3819178904835489326"><ph name="NUMBER_OF_DOWNLOADS" /> הורדות נמחקו</translation> +<translation id="3819562311292413223">הורדת מאמרים שעשויים לעניין אותך</translation> <translation id="3822502789641063741">למחוק נתוני אתר מהאחסון?</translation> <translation id="385051799172605136">חזור</translation> <translation id="3859306556332390985">הרץ קדימה</translation> @@ -383,6 +386,7 @@ <translation id="4113030288477039509">מנוהל על ידי מנהל המערכת שלך</translation> <translation id="4116038641877404294">הורד דפים כדי להשתמש בהם במצב לא מקוון</translation> <translation id="4127069705158143605">{BOOKMARKS_COUNT,plural, =1{סימניה %1$d}two{%1$d סימניות}many{%1$d סימניות}other{%1$d סימניות}}</translation> +<translation id="4149994727733219643">תצוגה פשוטה של דפי אינטרנט</translation> <translation id="4159800535322890630">חסימת הגישה של אתרים אל החיישנים שלך</translation> <translation id="4165986682804962316">הגדרות אתרים</translation> <translation id="4170011742729630528">השירות אינו זמין. נסה שוב מאוחר יותר.</translation> @@ -553,6 +557,7 @@ <translation id="5512137114520586844">החשבון הזה מנוהל על ידי <ph name="PARENT_NAME" />.</translation> <translation id="5514904542973294328">האפשרות הזו הושבתה על-ידי מנהל המערכת של המכשיר</translation> <translation id="5515439363601853141">ביטול הנעילה יציג את הסיסמה</translation> +<translation id="5515716148775388141">הסמלים הועברו אל החלק התחתון של המסך</translation> <translation id="5517095782334947753">יש לך סימניות, היסטוריה, סיסמאות והגדרות נוספות מ-<ph name="FROM_ACCOUNT" />.</translation> <translation id="5524843473235508879">הפניה לכתובת אתר אחרת נחסמה.</translation> <translation id="5527082711130173040">כדי לבצע סריקה לאיתור מכשירים, Chrome זקוק לגישה לנתוני מיקום. <ph name="BEGIN_LINK1" />עדכן את ההרשאות<ph name="END_LINK1" />. כמו כן, הגישה למיקום <ph name="BEGIN_LINK2" />כבויה במכשיר הזה<ph name="END_LINK2" />.</translation> @@ -756,6 +761,7 @@ <translation id="7016516562562142042">מופעל למנוע החיפוש הנוכחי</translation> <translation id="7021515813996758557">הורדת הקובץ <ph name="FILE_NAME" /> בוצעה</translation> <translation id="7022756207310403729">פתיחה בדפדפן</translation> +<translation id="702463548815491781">מומלץ אם הפעלת TalkBack או גישה באמצעות מתג</translation> <translation id="7029809446516969842">סיסמאות</translation> <translation id="7031882061095297553">סינכרון עם</translation> <translation id="7032663816368481562">הקשה על הסמל 'עוד הצעות כאלה' <ph name="ICON" /> בשורת כתובת האתר מציגה קישורים מהירים אל דפים קשורים. כתובות האתרים של דפים שאליהם נכנסת נשלחות אל Google.</translation> @@ -784,6 +790,7 @@ <translation id="7251326866581677552">חסומות באתרים מסוימים</translation> <translation id="7253272406652746122">הוסף חשבון Google מהדף 'חשבונות' שבאפליקציית ההגדרות של המכשיר.</translation> <translation id="7274013316676448362">אתר חסום</translation> +<translation id="72867290065237936">הקשה מעבירה אותך בין ההצעות לסיסמה לבין המקלדת</translation> <translation id="729975465115245577">אין במכשיר אפליקציה לאחסון קובץ הסיסמאות.</translation> <translation id="7302081693174882195">פרטים: מיון לפי נפח הנתונים שנחסכו</translation> <translation id="7333031090786104871">עדיין מוסיף את האתר הקודם</translation>
diff --git a/chrome/android/java/strings/translations/android_chrome_strings_no.xtb b/chrome/android/java/strings/translations/android_chrome_strings_no.xtb index 5546bb3..60ce4fec 100644 --- a/chrome/android/java/strings/translations/android_chrome_strings_no.xtb +++ b/chrome/android/java/strings/translations/android_chrome_strings_no.xtb
@@ -61,6 +61,7 @@ <translation id="1404122904123200417">Innbygd i <ph name="WEBSITE_URL" /></translation> <translation id="1406000523432664303">«Ingen sporing»</translation> <translation id="1407135791313364759">Åpne alle</translation> +<translation id="1409426117486808224">Forenklet visning for åpne faner</translation> <translation id="1409879593029778104">Nedlastingen av <ph name="FILE_NAME" /> ble avbrutt fordi filen finnes allerede.</translation> <translation id="1414981605391750300">Kontakter Google. Dette kan ta en liten stund.</translation> <translation id="1416550906796893042">Programversjon</translation> @@ -80,6 +81,7 @@ <translation id="1566400915470565838">Koble til Internett for å bruke <ph name="APP_NAME" />.</translation> <translation id="1569387923882100876">Tilkoblet enhet</translation> <translation id="1571304935088121812">Kopiér brukernavnet</translation> +<translation id="1576370611341449972">Nedlastning kun når Wi-Fi er på</translation> <translation id="1612196535745283361">Chrome trenger posisjonstilgang for å søke etter enheter. Posisjonstilgang er <ph name="BEGIN_LINK" />slått av for denne enheten<ph name="END_LINK" />.</translation> <translation id="162035744160882748">Slå på synkronisering, personlig tilpasning og andre Google-tjenester</translation> <translation id="1620510694547887537">Kamera</translation> @@ -344,6 +346,7 @@ <translation id="3810838688059735925">Video</translation> <translation id="3810973564298564668">Administrer</translation> <translation id="3819178904835489326"><ph name="NUMBER_OF_DOWNLOADS" /> nedlastinger er slettet</translation> +<translation id="3819562311292413223">Last ned artikler for deg</translation> <translation id="3822502789641063741">Slette nettstedslagring?</translation> <translation id="385051799172605136">Tilbake</translation> <translation id="3859306556332390985">Spol fremover</translation> @@ -383,6 +386,7 @@ <translation id="4113030288477039509">Styres av administratoren din</translation> <translation id="4116038641877404294">Last ned sidene for å bruke dem uten nett</translation> <translation id="4127069705158143605">{BOOKMARKS_COUNT,plural, =1{%1$d bokmerke}other{%1$d bokmerker}}</translation> +<translation id="4149994727733219643">Forenklet visning av nettsider</translation> <translation id="4159800535322890630">Blokkér nettsteder fra å få tilgang til sensorene</translation> <translation id="4165986682804962316">Nettstedsinnstillinger</translation> <translation id="4170011742729630528">Tjenesten er ikke tilgjengelig. Prøv på nytt senere.</translation> @@ -553,6 +557,7 @@ <translation id="5512137114520586844">Denne kontoen er administrert av <ph name="PARENT_NAME" />.</translation> <translation id="5514904542973294328">Deaktivert av administratoren for denne enheten</translation> <translation id="5515439363601853141">Lås opp for å se passordet ditt</translation> +<translation id="5515716148775388141">Ikonene dine er flyttet til bunnen av skjermen</translation> <translation id="5517095782334947753">Du har bokmerker, loggen, passord og andre innstillinger fra <ph name="FROM_ACCOUNT" />.</translation> <translation id="5524843473235508879">Viderekobling blokkert.</translation> <translation id="5527082711130173040">Chrome trenger posisjonstilgang for å søke etter enheter. <ph name="BEGIN_LINK1" />Oppdater tillatelsene<ph name="END_LINK1" />. Posisjonstilgang er også <ph name="BEGIN_LINK2" />slått av for denne enheten<ph name="END_LINK2" />.</translation> @@ -756,6 +761,7 @@ <translation id="7016516562562142042">Tillatt for den aktive søkemotoren</translation> <translation id="7021515813996758557"><ph name="FILE_NAME" /> er lastet ned</translation> <translation id="7022756207310403729">Åpne i nettleseren</translation> +<translation id="702463548815491781">Anbefalt når TalkBack eller brytertilgang er på</translation> <translation id="7029809446516969842">Passord</translation> <translation id="7031882061095297553">Synkroniser med</translation> <translation id="7032663816368481562">Når du trykker på Mer av dette <ph name="ICON" /> i adressefeltet, vises linker til relaterte sider. Nettadressene til sidene du besøker, sendes til Google.</translation> @@ -784,6 +790,7 @@ <translation id="7251326866581677552">Blokkert på noen nettsteder</translation> <translation id="7253272406652746122">Legg til en Google-konto på Kontoer-siden i Innstillinger-appen på enheten din.</translation> <translation id="7274013316676448362">Blokkert nettsted</translation> +<translation id="72867290065237936">For å bytte mellom passordforslag og tastatur</translation> <translation id="729975465115245577">Enheten din har ingen app som kan lagre passordfilen.</translation> <translation id="7302081693174882195">Informasjon: Sortert etter mengden data som er lagret</translation> <translation id="7333031090786104871">Holder fortsatt på å legge til det forrige nettstedet</translation>
diff --git a/chrome/android/java/strings/translations/android_chrome_strings_sr.xtb b/chrome/android/java/strings/translations/android_chrome_strings_sr.xtb index a9e0a0392..ccd267c 100644 --- a/chrome/android/java/strings/translations/android_chrome_strings_sr.xtb +++ b/chrome/android/java/strings/translations/android_chrome_strings_sr.xtb
@@ -557,7 +557,7 @@ <translation id="5512137114520586844">Овим налогом управља <ph name="PARENT_NAME" />.</translation> <translation id="5514904542973294328">Онемогућио је администратор овог уређаја</translation> <translation id="5515439363601853141">Откључајте да бисте прегледали лозинку</translation> -<translation id="5515716148775388141">Иконе су премештене на дно екрана</translation> +<translation id="5515716148775388141">Иконе су премештене у дно екрана</translation> <translation id="5517095782334947753">Имате обележиваче, лозинке и остала подешавања из <ph name="FROM_ACCOUNT" /> налога.</translation> <translation id="5524843473235508879">Преусмеравање је блокирано.</translation> <translation id="5527082711130173040">Chrome-у је потребан приступ локацији да би тражио уређаје. <ph name="BEGIN_LINK1" />Ажурирајте дозволе<ph name="END_LINK1" />. Приступ локацији је такође <ph name="BEGIN_LINK2" />искључен за овај уређај<ph name="END_LINK2" />.</translation>
diff --git a/chrome/android/java_sources.gni b/chrome/android/java_sources.gni index ed7d308..6d308194 100644 --- a/chrome/android/java_sources.gni +++ b/chrome/android/java_sources.gni
@@ -89,7 +89,6 @@ "java/src/org/chromium/chrome/browser/appmenu/AppMenuObserver.java", "java/src/org/chromium/chrome/browser/appmenu/AppMenuPropertiesDelegate.java", "java/src/org/chromium/chrome/browser/autofill/AutofillKeyboardAccessoryBridge.java", - "java/src/org/chromium/chrome/browser/autofill/AutofillKeyboardSuggestions.java", "java/src/org/chromium/chrome/browser/autofill/AutofillLogger.java", "java/src/org/chromium/chrome/browser/autofill/AutofillPopupBridge.java", "java/src/org/chromium/chrome/browser/autofill/CardUnmaskBridge.java", @@ -765,6 +764,7 @@ "java/src/org/chromium/chrome/browser/media/router/caf/CastOptionsProvider.java", "java/src/org/chromium/chrome/browser/media/router/caf/CastSessionController.java", "java/src/org/chromium/chrome/browser/media/router/caf/CastUtils.java", + "java/src/org/chromium/chrome/browser/media/router/caf/CafBaseMediaRouteProvider.java", "java/src/org/chromium/chrome/browser/media/router/caf/CafMediaRouteProvider.java", "java/src/org/chromium/chrome/browser/media/router/caf/CastMessageHandler.java", "java/src/org/chromium/chrome/browser/media/router/cast/BaseMediaRouteProvider.java", @@ -1733,11 +1733,9 @@ "javatests/src/org/chromium/chrome/browser/crypto/CipherFactoryTest.java", "javatests/src/org/chromium/chrome/browser/customtabs/ClientManagerTest.java", "javatests/src/org/chromium/chrome/browser/customtabs/CustomTabActivityTest.java", - "javatests/src/org/chromium/chrome/browser/customtabs/CustomTabActivityTestRule.java", "javatests/src/org/chromium/chrome/browser/customtabs/CustomTabExternalNavigationTest.java", "javatests/src/org/chromium/chrome/browser/customtabs/CustomTabFromChromeExternalNavigationTest.java", "javatests/src/org/chromium/chrome/browser/customtabs/CustomTabsConnectionTest.java", - "javatests/src/org/chromium/chrome/browser/customtabs/CustomTabsTestUtils.java", "javatests/src/org/chromium/chrome/browser/customtabs/CustomTabTabPersistenceIntegrationTest.java", "javatests/src/org/chromium/chrome/browser/customtabs/CustomTabTabPersistencePolicyTest.java", "javatests/src/org/chromium/chrome/browser/customtabs/DetachedResourceRequestTest.java", @@ -1815,7 +1813,6 @@ "javatests/src/org/chromium/chrome/browser/locale/LocaleManagerReferralTest.java", "javatests/src/org/chromium/chrome/browser/locale/LocaleManagerTest.java", "javatests/src/org/chromium/chrome/browser/media/MediaLauncherActivityTest.java", - "javatests/src/org/chromium/chrome/browser/media/RouterTestUtils.java", "javatests/src/org/chromium/chrome/browser/media/remote/CastNotificationTest.java", "javatests/src/org/chromium/chrome/browser/media/remote/CastPositionTransferTest.java", "javatests/src/org/chromium/chrome/browser/media/remote/CastStartStopTest.java", @@ -2065,12 +2062,10 @@ "javatests/src/org/chromium/chrome/browser/webapps/ActivityAssignerTest.java", "javatests/src/org/chromium/chrome/browser/webapps/AddToHomescreenDialogTest.java", "javatests/src/org/chromium/chrome/browser/webapps/AddToHomescreenManagerTest.java", - "javatests/src/org/chromium/chrome/browser/webapps/TestFetchStorageCallback.java", "javatests/src/org/chromium/chrome/browser/webapps/TrustedWebActivityTest.java", "javatests/src/org/chromium/chrome/browser/webapps/WebApkUpdateDataFetcherTest.java", "javatests/src/org/chromium/chrome/browser/webapps/WebApkUpdateManagerTest.java", "javatests/src/org/chromium/chrome/browser/webapps/WebappActionsNotificationTest.java", - "javatests/src/org/chromium/chrome/browser/webapps/WebappActivityTestRule.java", "javatests/src/org/chromium/chrome/browser/webapps/WebappAuthenticatorTest.java", "javatests/src/org/chromium/chrome/browser/webapps/WebappDeferredStartupTest.java", "javatests/src/org/chromium/chrome/browser/webapps/WebappDisplayModeTest.java",
diff --git a/chrome/android/javatests/src/org/chromium/chrome/browser/autofill/AutofillKeyboardAccessoryIntegrationTest.java b/chrome/android/javatests/src/org/chromium/chrome/browser/autofill/AutofillKeyboardAccessoryIntegrationTest.java index 8cdf905..e6dc143 100644 --- a/chrome/android/javatests/src/org/chromium/chrome/browser/autofill/AutofillKeyboardAccessoryIntegrationTest.java +++ b/chrome/android/javatests/src/org/chromium/chrome/browser/autofill/AutofillKeyboardAccessoryIntegrationTest.java
@@ -4,18 +4,12 @@ package org.chromium.chrome.browser.autofill; -import static android.support.test.espresso.Espresso.onView; -import static android.support.test.espresso.action.ViewActions.click; -import static android.support.test.espresso.action.ViewActions.scrollTo; -import static android.support.test.espresso.matcher.ViewMatchers.withText; - import static org.chromium.ui.base.LocalizationUtils.setRtlForTesting; -import android.os.Build; import android.support.test.filters.MediumTest; +import android.support.v7.widget.RecyclerView; import android.view.View; import android.view.ViewGroup; -import android.widget.HorizontalScrollView; import android.widget.LinearLayout; import org.junit.Assert; @@ -27,7 +21,6 @@ import org.chromium.base.test.util.CommandLineFlags; import org.chromium.base.test.util.DisabledTest; import org.chromium.base.test.util.Feature; -import org.chromium.base.test.util.MinAndroidSdkLevel; import org.chromium.base.test.util.RetryOnFailure; import org.chromium.base.test.util.UrlUtils; import org.chromium.chrome.R; @@ -89,13 +82,13 @@ + "</form></body></html>")); new AutofillTestHelper().setProfile(new AutofillProfile("", "https://www.example.com", "Johnathan Smithonian-Jackson", "Acme Inc", "1 Main\nApt A", "CA", "San Francisco", - "", "94102", "", "US", "(415) 888-9999", "john@acme.inc", "en")); + "", "94102", "", "US", "(415) 888-9999", "john.sj@acme-mail.inc", "en")); new AutofillTestHelper().setProfile(new AutofillProfile("", "https://www.example.com", "Jane Erika Donovanova", "Acme Inc", "1 Main\nApt A", "CA", "San Francisco", "", - "94102", "", "US", "(415) 999-0000", "jane@acme.inc", "en")); + "94102", "", "US", "(415) 999-0000", "donovanova.j@acme-mail.inc", "en")); new AutofillTestHelper().setProfile(new AutofillProfile("", "https://www.example.com", "Marcus McSpartangregor", "Acme Inc", "1 Main\nApt A", "CA", "San Francisco", "", - "94102", "", "US", "(415) 999-0000", "marc@acme.inc", "en")); + "94102", "", "US", "(415) 999-0000", "marc@acme-mail.inc", "en")); setRtlForTesting(isRtl); ThreadUtils.runOnUiThreadBlocking(() -> { Tab tab = mActivityTestRule.getActivity().getActivityTab(); @@ -150,51 +143,19 @@ public void testSwitchFieldsRescrollsKeyboardAccessory() throws ExecutionException, InterruptedException, TimeoutException { loadTestPage(false); - DOMUtils.clickNode(mWebContentsRef.get(), "fn"); + DOMUtils.clickNode(mWebContentsRef.get(), "em"); CriteriaHelper.pollUiThread(Criteria.equals(true, () -> UiUtils.isKeyboardShowing( mActivityTestRule.getActivity(), mContainerRef.get()))); - ThreadUtils.runOnUiThreadBlocking(() -> getSuggestionsComponent().scrollTo(2000, 0)); - assertSuggestionScrollPosition( - false, "First suggestion should be off the screen after manual scroll."); + ThreadUtils.runOnUiThreadBlocking(() -> getSuggestionsComponent().scrollToPosition(2)); + + assertSuggestionsScrollState(false, "Should keep the manual scroll position."); DOMUtils.clickNode(mWebContentsRef.get(), "ln"); - assertSuggestionScrollPosition( - true, "First suggestion should be on the screen after switching fields."); - } - - /** - * Switching fields in RTL should re-scroll the keyboard accessory to the right. - * - * RTL is only supported on Jelly Bean MR 1+. - * http://android-developers.blogspot.com/2013/03/native-rtl-support-in-android-42.html - */ - @Test - @MediumTest - @Feature({"keyboard-accessory"}) - @MinAndroidSdkLevel(Build.VERSION_CODES.JELLY_BEAN_MR1) - @DisabledTest(message = "crbug.com/836027") - public void testSwitchFieldsRescrollsKeyboardAccessoryRtl() - throws ExecutionException, InterruptedException, TimeoutException { - loadTestPage(true); - DOMUtils.clickNode(mWebContentsRef.get(), "fn"); - - CriteriaHelper.pollUiThread(Criteria.equals(true, - () - -> UiUtils.isKeyboardShowing( - mActivityTestRule.getActivity(), mContainerRef.get()))); - assertSuggestionScrollPosition(false, "Last suggestion should be off the screen intially."); - - ThreadUtils.runOnUiThreadBlocking(() -> getSuggestionsComponent().scrollTo(-500, 0)); - assertSuggestionScrollPosition( - true, "Last suggestion should be on the screen after manual scroll."); - - DOMUtils.clickNode(mWebContentsRef.get(), "ln"); - assertSuggestionScrollPosition( - false, "Last suggestion should be off the screen after switching fields."); + assertSuggestionsScrollState(true, "Should be scrolled back to position 0."); } /** @@ -216,7 +177,7 @@ mActivityTestRule.getActivity(), mContainerRef.get()))); Assert.assertTrue("Keyboard accessory should be visible.", isAccessoryVisible()); - onView(withText("Marcus")).perform(scrollTo(), click()); + ThreadUtils.runOnUiThreadBlocking(() -> getSuggestionAt(0).performClick()); CriteriaHelper.pollUiThread(Criteria.equals(false, () @@ -225,35 +186,33 @@ Assert.assertTrue("Keyboard accessory should be hidden.", isAccessoryGone()); } - private void assertSuggestionScrollPosition(boolean shouldBeOnScreen, String failureReason) { + private void assertSuggestionsScrollState(boolean isScrollingReset, String failureReason) { CriteriaHelper.pollUiThread(new Criteria(failureReason) { @Override public boolean isSatisfied() { - View suggestion = getSuggestionAt(0); - if (suggestion == null) return false; - int[] location = new int[2]; - suggestion.getLocationOnScreen(location); - return shouldBeOnScreen ? location[0] > 0 : location[0] < 0; + return isScrollingReset + ? getSuggestionsComponent().computeHorizontalScrollOffset() <= 0 + : getSuggestionsComponent().computeHorizontalScrollOffset() > 0; } }); } - private HorizontalScrollView getSuggestionsComponent() { + private RecyclerView getSuggestionsComponent() { final ViewGroup keyboardAccessory = ThreadUtils.runOnUiThreadBlockingNoException( () -> mActivityTestRule.getActivity().findViewById(R.id.keyboard_accessory)); if (keyboardAccessory == null) return null; // It might still be loading, so don't assert! - final View scrollview = keyboardAccessory.findViewById(R.id.suggestions_view); - if (scrollview == null) return null; // It might still be loading, so don't assert! + final View recyclerView = keyboardAccessory.findViewById(R.id.actions_view); + if (recyclerView == null) return null; // It might still be loading, so don't assert! - return (HorizontalScrollView) scrollview; + return (RecyclerView) recyclerView; } private View getSuggestionAt(int index) { - ViewGroup scrollview = getSuggestionsComponent(); - if (scrollview == null) return null; // It might still be loading, so don't assert! + ViewGroup recyclerView = getSuggestionsComponent(); + if (recyclerView == null) return null; // It might still be loading, so don't assert! - return scrollview.getChildAt(index); + return recyclerView.getChildAt(index); } private boolean isAccessoryVisible() throws ExecutionException {
diff --git a/chrome/android/javatests/src/org/chromium/chrome/browser/autofill/keyboard_accessory/KeyboardAccessoryViewTest.java b/chrome/android/javatests/src/org/chromium/chrome/browser/autofill/keyboard_accessory/KeyboardAccessoryViewTest.java index 3f99c371..dce5951 100644 --- a/chrome/android/javatests/src/org/chromium/chrome/browser/autofill/keyboard_accessory/KeyboardAccessoryViewTest.java +++ b/chrome/android/javatests/src/org/chromium/chrome/browser/autofill/keyboard_accessory/KeyboardAccessoryViewTest.java
@@ -20,6 +20,7 @@ import static org.hamcrest.core.AllOf.allOf; import static org.junit.Assert.assertTrue; +import static org.chromium.chrome.browser.autofill.keyboard_accessory.AccessoryAction.AUTOFILL_SUGGESTION; import static org.chromium.chrome.browser.autofill.keyboard_accessory.AccessoryAction.GENERATE_PASSWORD_AUTOMATIC; import static org.chromium.chrome.test.util.ViewUtils.VIEW_GONE; import static org.chromium.chrome.test.util.ViewUtils.VIEW_INVISIBLE; @@ -138,8 +139,7 @@ mModel.getActionList().set(new KeyboardAccessoryData.Action[] { new KeyboardAccessoryData.Action( "First", GENERATE_PASSWORD_AUTOMATIC, action -> {}), - new KeyboardAccessoryData.Action( - "Second", GENERATE_PASSWORD_AUTOMATIC, action -> {})}); + new KeyboardAccessoryData.Action("Second", AUTOFILL_SUGGESTION, action -> {})}); }); onView(isRoot()).check((root, e) -> waitForView((ViewGroup) root, withText("First")));
diff --git a/chrome/android/javatests/src/org/chromium/chrome/browser/autofill/keyboard_accessory/ManualFillingIntegrationTest.java b/chrome/android/javatests/src/org/chromium/chrome/browser/autofill/keyboard_accessory/ManualFillingIntegrationTest.java index a24bd02..f7f88190 100644 --- a/chrome/android/javatests/src/org/chromium/chrome/browser/autofill/keyboard_accessory/ManualFillingIntegrationTest.java +++ b/chrome/android/javatests/src/org/chromium/chrome/browser/autofill/keyboard_accessory/ManualFillingIntegrationTest.java
@@ -27,11 +27,13 @@ import org.chromium.base.ThreadUtils; import org.chromium.base.test.util.CommandLineFlags; import org.chromium.chrome.R; +import org.chromium.chrome.browser.ChromeFeatureList; import org.chromium.chrome.browser.ChromeSwitches; import org.chromium.chrome.browser.autofill.AutofillTestHelper; import org.chromium.chrome.browser.autofill.PersonalDataManager; import org.chromium.chrome.test.ChromeJUnit4ClassRunner; import org.chromium.chrome.test.ChromeTabbedActivityTestRule; +import org.chromium.chrome.test.util.browser.Features; import org.chromium.ui.DropdownPopupWindowInterface; import java.util.concurrent.ExecutionException; @@ -174,6 +176,7 @@ @Test @SmallTest + @Features.DisableFeatures({ChromeFeatureList.AUTOFILL_KEYBOARD_ACCESSORY}) public void testOpeningSheetDismissesAutofill() throws InterruptedException, TimeoutException, ExecutionException { mHelper.loadTestPage(false);
diff --git a/chrome/android/javatests/src/org/chromium/chrome/browser/media/OWNERS b/chrome/android/javatests/src/org/chromium/chrome/browser/media/OWNERS index b844cc3f..28f64e5 100644 --- a/chrome/android/javatests/src/org/chromium/chrome/browser/media/OWNERS +++ b/chrome/android/javatests/src/org/chromium/chrome/browser/media/OWNERS
@@ -1,4 +1,3 @@ -aberent@chromium.org mlamouri@chromium.org # TEAM: media-dev@chromium.org
diff --git a/chrome/android/javatests/src/org/chromium/chrome/browser/offlinepages/OfflinePageBridgeTest.java b/chrome/android/javatests/src/org/chromium/chrome/browser/offlinepages/OfflinePageBridgeTest.java index 818b363..b12588b 100644 --- a/chrome/android/javatests/src/org/chromium/chrome/browser/offlinepages/OfflinePageBridgeTest.java +++ b/chrome/android/javatests/src/org/chromium/chrome/browser/offlinepages/OfflinePageBridgeTest.java
@@ -475,7 +475,7 @@ loadUrlParams = getLoadUrlParamsForOpeningMhtmlFileOrContent(tempFileUrl); Assert.assertEquals(tempFileUrl, loadUrlParams.getUrl()); extraHeaders = loadUrlParams.getVerbatimHeaders(); - Assert.assertEquals("", extraHeaders); + Assert.assertNull(extraHeaders); // Cleans up. Assert.assertTrue(tempFile.delete());
diff --git a/chrome/android/javatests/src/org/chromium/chrome/browser/preferences/datareduction/DataReductionStatsPreferenceTest.java b/chrome/android/javatests/src/org/chromium/chrome/browser/preferences/datareduction/DataReductionStatsPreferenceTest.java index 7a383ff..13f050d 100644 --- a/chrome/android/javatests/src/org/chromium/chrome/browser/preferences/datareduction/DataReductionStatsPreferenceTest.java +++ b/chrome/android/javatests/src/org/chromium/chrome/browser/preferences/datareduction/DataReductionStatsPreferenceTest.java
@@ -51,6 +51,7 @@ private static class TestDataReductionProxySettings extends DataReductionProxySettings { private long mLastUpdateInMillis; + private long[] mReceivedNetworkStatsHistory; /** * Returns the time that the data reduction statistics were last updated. @@ -68,6 +69,16 @@ public void setDataReductionLastUpdateTime(long lastUpdateInMillis) { mLastUpdateInMillis = lastUpdateInMillis; } + + @Override + public long[] getReceivedNetworkStatsHistory() { + if (mReceivedNetworkStatsHistory == null) return new long[0]; + return mReceivedNetworkStatsHistory; + } + + public void setReceivedNetworkStatsHistory(long[] receivedNetworkStatsHistory) { + mReceivedNetworkStatsHistory = receivedNetworkStatsHistory; + } } @Before @@ -250,4 +261,33 @@ Assert.assertEquals(numDaysDataSaverEnabled + 1, pref.getNumDaysInChart()); } + + @Test + @SmallTest + @UiThreadTest + @Feature({"DataReduction"}) + public void testShouldShowRealDataWhenEnoughDataIsUsed() throws Throwable { + DataReductionStatsPreference pref = new DataReductionStatsPreference(mContext, null); + long now = System.currentTimeMillis(); + long lastUpdateTime = now - DateUtils.DAY_IN_MILLIS; + long dataSaverEnableTime = now - DateUtils.HOUR_IN_MILLIS; + mSettings.setDataReductionLastUpdateTime(lastUpdateTime); + ContextUtils.getAppSharedPreferences() + .edit() + .putLong(DataReductionProxySettings.DATA_REDUCTION_FIRST_ENABLED_TIME, + dataSaverEnableTime) + .apply(); + + // User has only used 50KB so far. + mSettings.setReceivedNetworkStatsHistory(new long[] {50 * 1024}); + pref.updateReductionStatistics(now); + + Assert.assertFalse(pref.shouldShowRealData()); + + // User has now used 100KB. + mSettings.setReceivedNetworkStatsHistory(new long[] {100 * 1024}); + pref.updateReductionStatistics(now); + + Assert.assertTrue(pref.shouldShowRealData()); + } }
diff --git a/chrome/android/javatests/src/org/chromium/chrome/browser/vr/VrBrowserControllerInputTest.java b/chrome/android/javatests/src/org/chromium/chrome/browser/vr/VrBrowserControllerInputTest.java index ffa51144..3fe30d36 100644 --- a/chrome/android/javatests/src/org/chromium/chrome/browser/vr/VrBrowserControllerInputTest.java +++ b/chrome/android/javatests/src/org/chromium/chrome/browser/vr/VrBrowserControllerInputTest.java
@@ -35,8 +35,10 @@ import org.chromium.content.browser.test.util.DOMUtils; import org.chromium.content_public.browser.RenderCoordinates; +import java.util.concurrent.Callable; import java.util.concurrent.TimeoutException; import java.util.concurrent.atomic.AtomicInteger; +import java.util.concurrent.atomic.AtomicReference; /** * End-to-end tests for Daydream controller input while in the VR browser. @@ -75,44 +77,95 @@ */ @Test @MediumTest - public void testControllerScrolling() throws InterruptedException { - mVrTestRule.loadUrl( - VrBrowserTestFramework.getFileUrlForHtmlTestFile("test_controller_scrolling"), - PAGE_LOAD_TIMEOUT_S); - final RenderCoordinates coord = - RenderCoordinates.fromWebContents(mVrTestRule.getWebContents()); - waitForPageToBeScrollable(coord); + public void testControllerScrolling() throws InterruptedException, Exception { + String url = VrBrowserTestFramework.getFileUrlForHtmlTestFile("test_controller_scrolling"); - // Test that scrolling down works - int startScrollPoint = coord.getScrollYPixInt(); - // Arbitrary, but valid values to scroll smoothly + final AtomicReference<RenderCoordinates> coord = new AtomicReference<RenderCoordinates>(); + Runnable waitScrollable = () -> { + coord.set(RenderCoordinates.fromWebContents(mVrTestRule.getWebContents())); + waitForPageToBeScrollable(coord.get()); + }; + + Callable<Integer> getYCoord = () -> { + return coord.get().getScrollYPixInt(); + }; + Callable<Integer> getXCoord = () -> { + return coord.get().getScrollXPixInt(); + }; + + testControllerScrollingImpl(url, waitScrollable, getYCoord, getXCoord); + } + + /** + * Verifies that scrolling via the Daydream controller's touchpad works in cross-origin iframes + * (file:// URLs appear to be always treated as different origins). + * Automation of a manual test in https://crbug.com/862153. + */ + @Test + @MediumTest + public void testControllerScrollingIframe() throws InterruptedException, Exception { + String url = VrBrowserTestFramework.getFileUrlForHtmlTestFile( + "test_controller_scrolling_iframe_outer"); + + Runnable waitScrollable = () -> { + // We need to focus the iframe before we can start running JavaScript in it. + mVrBrowserTestFramework.runJavaScriptOrFail( + "document.getElementById('fs_iframe').focus()", POLL_TIMEOUT_SHORT_MS); + mVrBrowserTestFramework.pollJavaScriptBooleanInFrameOrFail( + "document.documentElement.scrollHeight > document.documentElement.clientHeight", + POLL_TIMEOUT_LONG_MS); + }; + + Callable<Integer> getYCoord = () -> { + // Round necessary to prevent Integer from failing due to decimal points. + return Integer.valueOf(mVrBrowserTestFramework.runJavaScriptInFrameOrFail( + "Math.round(document.documentElement.scrollTop)", POLL_TIMEOUT_SHORT_MS)); + }; + Callable<Integer> getXCoord = () -> { + // Round necessary to prevent Integer from failing due to decimal points. + return Integer.valueOf(mVrBrowserTestFramework.runJavaScriptInFrameOrFail( + "Math.round(document.documentElement.scrollLeft)", POLL_TIMEOUT_SHORT_MS)); + }; + + testControllerScrollingImpl(url, waitScrollable, getYCoord, getXCoord); + } + + private void testControllerScrollingImpl(String url, Runnable waitScrollable, + Callable<Integer> getYCoord, Callable<Integer> getXCoord) + throws InterruptedException, Exception { + mVrTestRule.loadUrl(url, PAGE_LOAD_TIMEOUT_S); + waitScrollable.run(); + + // Test that scrolling down works. + int startScrollPoint = getYCoord.call().intValue(); + // Arbitrary, but valid values to scroll smoothly. int scrollSteps = 20; int scrollSpeed = 60; mController.scroll(EmulatedVrController.ScrollDirection.DOWN, scrollSteps, scrollSpeed); // We need this second scroll down, otherwise the horizontal scrolling becomes flaky // This actually seems to not be an issue in this test case anymore, but still occurs in // the fling scroll test, so keep around here as an extra precaution. - // TODO(bsheedy): Figure out why this is the case + // TODO(bsheedy): Figure out why this is the case. mController.scroll(EmulatedVrController.ScrollDirection.DOWN, scrollSteps, scrollSpeed); - int endScrollPoint = coord.getScrollYPixInt(); + int endScrollPoint = getYCoord.call().intValue(); Assert.assertTrue("Controller failed to scroll down", startScrollPoint < endScrollPoint); - // Test that scrolling up works + // Test that scrolling up works. startScrollPoint = endScrollPoint; mController.scroll(EmulatedVrController.ScrollDirection.UP, scrollSteps, scrollSpeed); - endScrollPoint = coord.getScrollYPixInt(); + endScrollPoint = getYCoord.call().intValue(); Assert.assertTrue("Controller failed to scroll up", startScrollPoint > endScrollPoint); - // Test that scrolling right works - startScrollPoint = coord.getScrollXPixInt(); + // Test that scrolling right works. + startScrollPoint = getXCoord.call().intValue(); mController.scroll(EmulatedVrController.ScrollDirection.RIGHT, scrollSteps, scrollSpeed); - endScrollPoint = coord.getScrollXPixInt(); + endScrollPoint = getXCoord.call().intValue(); Assert.assertTrue("Controller failed to scroll right", startScrollPoint < endScrollPoint); - // Test that scrolling left works + // Test that scrolling left works. startScrollPoint = endScrollPoint; mController.scroll(EmulatedVrController.ScrollDirection.LEFT, scrollSteps, scrollSpeed); - endScrollPoint = coord.getScrollXPixInt(); + endScrollPoint = getXCoord.call().intValue(); Assert.assertTrue("Controller failed to scroll left", startScrollPoint > endScrollPoint); } @@ -129,14 +182,14 @@ RenderCoordinates.fromWebContents(mVrTestRule.getWebContents()); waitForPageToBeScrollable(coord); - // Arbitrary, but valid values to trigger fling scrolling + // Arbitrary, but valid values to trigger fling scrolling. int scrollSteps = 10; int scrollSpeed = 10; - // Test fling scrolling down + // Test fling scrolling down. mController.scroll(EmulatedVrController.ScrollDirection.DOWN, scrollSteps, scrollSpeed); final AtomicInteger endScrollPoint = new AtomicInteger(coord.getScrollYPixInt()); - // Check that we continue to scroll past wherever we were when we let go of the touchpad + // Check that we continue to scroll past wherever we were when we let go of the touchpad. CriteriaHelper.pollInstrumentationThread( () -> { return coord.getScrollYPixInt() > endScrollPoint.get(); }, @@ -144,7 +197,7 @@ POLL_CHECK_INTERVAL_LONG_MS); mController.cancelFlingScroll(); - // Test fling scrolling up + // Test fling scrolling up. mController.scroll(EmulatedVrController.ScrollDirection.UP, scrollSteps, scrollSpeed); endScrollPoint.set(coord.getScrollYPixInt()); CriteriaHelper.pollInstrumentationThread( @@ -157,7 +210,7 @@ // horizontally, so scroll down a bit to ensure that isn't the case. mController.scroll(EmulatedVrController.ScrollDirection.DOWN, 10, 60); - // Test fling scrolling right + // Test fling scrolling right. mController.scroll(EmulatedVrController.ScrollDirection.RIGHT, scrollSteps, scrollSpeed); endScrollPoint.set(coord.getScrollXPixInt()); CriteriaHelper.pollInstrumentationThread( @@ -167,7 +220,7 @@ POLL_CHECK_INTERVAL_LONG_MS); mController.cancelFlingScroll(); - // Test fling scrolling left + // Test fling scrolling left. mController.scroll(EmulatedVrController.ScrollDirection.LEFT, scrollSteps, scrollSpeed); endScrollPoint.set(coord.getScrollXPixInt()); CriteriaHelper.pollInstrumentationThread( @@ -193,6 +246,27 @@ VrBrowserTestFramework.getFileUrlForHtmlTestFile("test_navigation_2d_page")); } + /** + * Verifies that controller clicks in the VR browser on cross-origin iframes are properly + * registered. This is done by clicking on a link in the iframe and ensuring that it causes a + * navigation. + * Automation of a manual test in https://crbug.com/862153. + */ + @Test + @MediumTest + public void testControllerClicksRegisterOnIframe() throws InterruptedException { + mVrTestRule.loadUrl( + VrBrowserTestFramework.getFileUrlForHtmlTestFile("test_iframe_clicks_outer")); + mController.performControllerClick(); + // Wait until the iframe's current location matches the URL of the page that gets navigated + // to on click. + mVrBrowserTestFramework.pollJavaScriptBooleanInFrameOrFail("window.location.href == '" + + VrBrowserTestFramework.getFileUrlForHtmlTestFile( + "test_iframe_clicks_inner_nav") + + "'", + POLL_TIMEOUT_SHORT_MS); + } + /* * Verifies that swiping up/down on the Daydream controller's touchpad * scrolls a native page while in the VR browser.
diff --git a/chrome/android/javatests/src/org/chromium/chrome/browser/vr/VrBrowserWebInputEditingTest.java b/chrome/android/javatests/src/org/chromium/chrome/browser/vr/VrBrowserWebInputEditingTest.java index 4b363fe..f25920a 100644 --- a/chrome/android/javatests/src/org/chromium/chrome/browser/vr/VrBrowserWebInputEditingTest.java +++ b/chrome/android/javatests/src/org/chromium/chrome/browser/vr/VrBrowserWebInputEditingTest.java
@@ -58,10 +58,25 @@ @MediumTest @CommandLineFlags.Add("enable-features=VrLaunchIntents") public void testWebInputFocus() throws InterruptedException { - // Load page in VR and make sure the controller is pointed at the content quad. - mVrTestRule.loadUrl( - VrBrowserTestFramework.getFileUrlForHtmlTestFile("test_web_input_editing"), - PAGE_LOAD_TIMEOUT_S); + testWebInputFocusImpl( + VrBrowserTestFramework.getFileUrlForHtmlTestFile("test_web_input_editing")); + } + + /** + * Verifies the same thing as testWebInputFocus, but with the input box in a cross-origin + * iframe. + * Automation of a manual test in https://crbug.com/862153 + */ + @Test + @MediumTest + @CommandLineFlags.Add("enable-features=VrLaunchIntents") + public void testWebInputFocusIframe() throws InterruptedException { + testWebInputFocusImpl(VrBrowserTestFramework.getFileUrlForHtmlTestFile( + "test_web_input_editing_iframe_outer")); + } + + private void testWebInputFocusImpl(String url) throws InterruptedException { + mVrTestRule.loadUrl(url, PAGE_LOAD_TIMEOUT_S); VrBrowserTransitionUtils.forceEnterVrBrowserOrFail(POLL_TIMEOUT_LONG_MS); VrShell vrShell = TestVrShellDelegate.getVrShellForTesting();
diff --git a/chrome/android/javatests/src/org/chromium/chrome/browser/vr/XrTestFramework.java b/chrome/android/javatests/src/org/chromium/chrome/browser/vr/XrTestFramework.java index 0e8d337d..11ccb81 100644 --- a/chrome/android/javatests/src/org/chromium/chrome/browser/vr/XrTestFramework.java +++ b/chrome/android/javatests/src/org/chromium/chrome/browser/vr/XrTestFramework.java
@@ -17,12 +17,15 @@ import org.chromium.chrome.test.ChromeActivityTestRule; import org.chromium.content.browser.test.util.CriteriaHelper; import org.chromium.content.browser.test.util.JavaScriptUtils; +import org.chromium.content_public.browser.RenderFrameHost; import org.chromium.content_public.browser.WebContents; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; +import java.util.concurrent.CountDownLatch; import java.util.concurrent.TimeUnit; import java.util.concurrent.TimeoutException; +import java.util.concurrent.atomic.AtomicReference; /** * Class containing the core framework for all XR (VR and AR) testing, which requires @@ -115,6 +118,19 @@ } /** + * Runs the given JavaScript in the focused frame, failing if a timeout/interrupt occurs. + * + * @param js The JavaScript to run. + * @param timeout The timeout in milliseconds before failure. + * @param webContents The WebContents object to get the focused frame from. + * @return The return value of the JavaScript. + */ + public static String runJavaScriptInFrameOrFail( + String js, int timeout, final WebContents webContents) { + return runJavaScriptInFrameInternal(js, timeout, webContents, true /* failOnTimeout */); + } + + /** * Polls the provided JavaScript boolean expression until the timeout is reached or the boolean * is true. * @@ -137,7 +153,32 @@ return Boolean.parseBoolean(result); }, "Polling timed out", timeoutMs, POLL_CHECK_INTERVAL_LONG_MS); } catch (AssertionError e) { - Log.d(TAG, "pollJavaScriptBoolean() timed out"); + Log.d(TAG, "pollJavaScriptBoolean() timed out: " + e.toString()); + return false; + } + return true; + } + + /** + * Polls the provided JavaScript boolean expression in the focused frame until the timeout is + * reached or the boolean is true. + * + * @param boolExpression The JavaScript boolean expression to poll. + * @param timeoutMs The polling timeout in milliseconds. + * @param webContents The WebContents to get the focused frame from. + * @return True if the boolean evaluated to true, false if timed out. + */ + public static boolean pollJavaScriptBooleanInFrame( + final String boolExpression, int timeoutMs, final WebContents webContents) { + try { + CriteriaHelper.pollInstrumentationThread(() -> { + String result = "false"; + result = runJavaScriptInFrameInternal(boolExpression, POLL_CHECK_INTERVAL_SHORT_MS, + webContents, false /* failOnTimeout */); + return Boolean.parseBoolean(result); + }, "Polling timed out", timeoutMs, POLL_CHECK_INTERVAL_LONG_MS); + } catch (AssertionError e) { + Log.d(TAG, "pollJavaScriptBooleanInFrame() timed out: " + e.toString()); return false; } return true; @@ -158,6 +199,20 @@ } /** + * Polls the provided JavaScript boolean expression in the focused frame, failing the test if + * it does not evaluate to true within the provided timeout. + * + * @param boolExpression The JavaScript boolean expression to poll. + * @param timeoutMs The polling timeout in milliseconds. + * @param webContents The WebContents to get the focused frame from. + */ + public static void pollJavaScriptBooleanInFrameOrFail( + String boolExpression, int timeoutMs, WebContents webContents) { + Assert.assertTrue("Timed out polling boolean expression in frame: " + boolExpression, + pollJavaScriptBooleanInFrame(boolExpression, timeoutMs, webContents)); + } + + /** * Executes a JavaScript step function using the given WebContents. * * @param stepFunction The JavaScript step function to call. @@ -272,6 +327,27 @@ Assert.assertNotEquals(checkTestStatus(webContents), TestStatus.FAILED); } + private static String runJavaScriptInFrameInternal( + String js, int timeout, final WebContents webContents, boolean failOnTimeout) { + final AtomicReference<RenderFrameHost> rfh = new AtomicReference<RenderFrameHost>(); + ThreadUtils.runOnUiThreadBlocking(() -> { rfh.set(webContents.getFocusedFrame()); }); + Assert.assertTrue("Did not get a focused frame", rfh.get() != null); + final CountDownLatch latch = new CountDownLatch(1); + final AtomicReference<String> result = new AtomicReference<String>(); + rfh.get().executeJavaScriptForTests(js, (String r) -> { + result.set(r); + latch.countDown(); + }); + try { + if (!latch.await(timeout, TimeUnit.MILLISECONDS) && failOnTimeout) { + Assert.fail("Timed out running JavaScript in focused frame: " + js); + } + } catch (InterruptedException e) { + Assert.fail("Waiting for latch was interrupted: " + e.toString()); + } + return result.get(); + } + /** * Must be constructed after the rule has been applied (e.g. in whatever method is * tagged with @Before). @@ -311,6 +387,17 @@ } /** + * Helper method to run runJavaScriptInFrameOrFail with the first tab's WebContents. + * + * @param js The JavaScript to run. + * @param timeout The timeout in milliseconds before a failure. + * @return The return value of the JavaScript. + */ + public String runJavaScriptInFrameOrFail(String js, int timeout) { + return runJavaScriptInFrameOrFail(js, timeout, mFirstTabWebContents); + } + + /** * Helper function to run pollJavaScriptBoolean with the first tab's WebContents. * * @param boolExpression The JavaScript boolean expression to poll. @@ -322,6 +409,17 @@ } /** + * Helper function to run pollJavaScriptBooleanInFrame with the first tab's WebContents. + * + * @param boolExpression The JavaScript boolean expression to poll. + * @param timeoutMs The polling timeout in milliseconds. + * @return True if the boolean evaluated to true, false if timed out. + */ + public boolean pollJavaScriptInFrameBoolean(String boolExpression, int timeoutMs) { + return pollJavaScriptBooleanInFrame(boolExpression, timeoutMs, mFirstTabWebContents); + } + + /** * Helper function to run pollJavaScriptBooleanOrFail with the first tab's WebContents. * * @param boolExpression The JavaScript boolean expression to poll. @@ -332,6 +430,16 @@ } /** + * Helper function to run pollJavaScriptBooleanInFrameOrFail with the first tab's WebContents. + * + * @param boolExpression The JavaScript boolean expression to poll. + * @param timeoutMs The polling timeout in milliseconds. + */ + public void pollJavaScriptBooleanInFrameOrFail(String boolExpression, int timeoutMs) { + pollJavaScriptBooleanInFrameOrFail(boolExpression, timeoutMs, mFirstTabWebContents); + } + + /** * Helper function to run executeStepAndWait using the first tab's WebContents. * * @param stepFunction The JavaScript step function to call.
diff --git a/chrome/android/javatests/src/org/chromium/chrome/browser/vr/jsdialog/VrBrowserJavaScriptModalDialogTest.java b/chrome/android/javatests/src/org/chromium/chrome/browser/vr/jsdialog/VrBrowserJavaScriptModalDialogTest.java new file mode 100644 index 0000000..74ce2f4 --- /dev/null +++ b/chrome/android/javatests/src/org/chromium/chrome/browser/vr/jsdialog/VrBrowserJavaScriptModalDialogTest.java
@@ -0,0 +1,112 @@ +// 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.vr.jsdialog; + +import static org.chromium.chrome.browser.vr.XrTestFramework.POLL_TIMEOUT_LONG_MS; +import static org.chromium.chrome.test.util.ChromeRestriction.RESTRICTION_TYPE_VIEWER_DAYDREAM; + +import android.support.test.filters.MediumTest; + +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.ThreadUtils; +import org.chromium.base.test.util.CommandLineFlags; +import org.chromium.base.test.util.Feature; +import org.chromium.base.test.util.Restriction; +import org.chromium.base.test.util.UrlUtils; +import org.chromium.chrome.browser.ChromeSwitches; +import org.chromium.chrome.browser.ChromeTabbedActivity; +import org.chromium.chrome.browser.jsdialog.JavascriptTabModalDialog; +import org.chromium.chrome.browser.vr.rules.ChromeTabbedActivityVrTestRule; +import org.chromium.chrome.browser.vr.util.NativeUiUtils; +import org.chromium.chrome.browser.vr.util.VrBrowserTransitionUtils; +import org.chromium.chrome.test.ChromeJUnit4ClassRunner; +import org.chromium.chrome.test.util.RenderTestRule; +import org.chromium.content.browser.test.util.Criteria; +import org.chromium.content.browser.test.util.CriteriaHelper; +import org.chromium.content.browser.test.util.JavaScriptUtils; + +import java.util.concurrent.ExecutionException; +import java.util.concurrent.TimeoutException; + +/** + * Test JavaScript modal dialogs in VR. + */ +@RunWith(ChromeJUnit4ClassRunner.class) +@CommandLineFlags.Add({ChromeSwitches.DISABLE_FIRST_RUN_EXPERIENCE}) +public class VrBrowserJavaScriptModalDialogTest { + @Rule + public ChromeTabbedActivityVrTestRule mActivityTestRule = new ChromeTabbedActivityVrTestRule(); + + @Rule + public RenderTestRule mRenderTestRule = + new RenderTestRule("components/test/data/js_dialogs/render_tests"); + + private static final String EMPTY_PAGE = UrlUtils.encodeHtmlDataUri( + "<html><title>Modal Dialog Test</title><p>Testcase.</p></title></html>"); + + private ChromeTabbedActivity mActivity; + + @Before + public void setUp() throws InterruptedException { + mActivity = mActivityTestRule.getActivity(); + } + + /** + * Verifies modal alert-dialog appearance and that it looks as it is expected. + */ + @Test + @MediumTest + @Restriction(RESTRICTION_TYPE_VIEWER_DAYDREAM) + @Feature({"Browser", "RenderTest"}) + public void testAlertModalDialog() + throws InterruptedException, TimeoutException, ExecutionException, Throwable { + VrBrowserTransitionUtils.forceEnterVrBrowserOrFail(POLL_TIMEOUT_LONG_MS); + + executeJavaScriptAndWaitForDialog("alert('Hello Android!')"); + + JavascriptTabModalDialog jsDialog = getCurrentDialog(); + Assert.assertNotNull("No dialog showing.", jsDialog); + + Assert.assertEquals(NativeUiUtils.getVrViewContainer().getChildCount(), 1); + mRenderTestRule.render( + NativeUiUtils.getVrViewContainer().getChildAt(0), "js_modal_view_vr"); + } + + /** + * Asynchronously executes the given code for spawning a dialog and waits + * for the dialog to be visible. + */ + private void executeJavaScriptAndWaitForDialog(String script) { + JavaScriptUtils.executeJavaScript(mActivity.getCurrentWebContents(), script); + checkDialogShowing("Could not spawn or locate a modal dialog.", true); + } + + /** + * Returns the current JavaScript modal dialog showing or null if no such dialog is currently + * showing. + */ + private JavascriptTabModalDialog getCurrentDialog() throws ExecutionException { + return (JavascriptTabModalDialog) ThreadUtils.runOnUiThreadBlocking( + () -> mActivity.getModalDialogManager().getCurrentDialogForTest().getController()); + } + + /** + * Check whether dialog is showing as expected. + */ + private void checkDialogShowing(final String errorMessage, final boolean shouldBeShown) { + CriteriaHelper.pollUiThread(new Criteria(errorMessage) { + @Override + public boolean isSatisfied() { + final boolean isShown = mActivity.getModalDialogManager().isShowing(); + return shouldBeShown == isShown; + } + }); + } +}
diff --git a/chrome/android/javatests/src/org/chromium/chrome/browser/vr/util/NativeUiUtils.java b/chrome/android/javatests/src/org/chromium/chrome/browser/vr/util/NativeUiUtils.java index 53b7658..c038bbb 100644 --- a/chrome/android/javatests/src/org/chromium/chrome/browser/vr/util/NativeUiUtils.java +++ b/chrome/android/javatests/src/org/chromium/chrome/browser/vr/util/NativeUiUtils.java
@@ -7,6 +7,7 @@ import android.graphics.PointF; import android.view.Choreographer; import android.view.View; +import android.view.ViewGroup; import org.junit.Assert; @@ -172,6 +173,14 @@ frameLatch.await(); } + /** + * Returns the Container of 2D UI that is shown in VR. + */ + public static ViewGroup getVrViewContainer() { + VrShell vrShell = TestVrShellDelegate.getVrShellForTesting(); + return vrShell.getVrViewContainerForTesting(); + } + private static void clickFallbackUiButton(int buttonId) throws InterruptedException { VrShell vrShell = TestVrShellDelegate.getVrShellForTesting(); VrViewContainer viewContainer = vrShell.getVrViewContainerForTesting();
diff --git a/chrome/android/junit/src/org/chromium/chrome/browser/autofill/keyboard_accessory/KeyboardAccessoryControllerTest.java b/chrome/android/junit/src/org/chromium/chrome/browser/autofill/keyboard_accessory/KeyboardAccessoryControllerTest.java index 50c8a80..2d028419 100644 --- a/chrome/android/junit/src/org/chromium/chrome/browser/autofill/keyboard_accessory/KeyboardAccessoryControllerTest.java +++ b/chrome/android/junit/src/org/chromium/chrome/browser/autofill/keyboard_accessory/KeyboardAccessoryControllerTest.java
@@ -9,12 +9,14 @@ import static org.hamcrest.Matchers.equalTo; import static org.hamcrest.Matchers.nullValue; import static org.junit.Assert.assertThat; -import static org.mockito.Mockito.mock; import static org.mockito.Mockito.times; import static org.mockito.Mockito.verify; import static org.mockito.Mockito.verifyNoMoreInteractions; import static org.mockito.Mockito.when; +import static org.chromium.chrome.browser.autofill.keyboard_accessory.AccessoryAction.AUTOFILL_SUGGESTION; +import static org.chromium.chrome.browser.autofill.keyboard_accessory.AccessoryAction.GENERATE_PASSWORD_AUTOMATIC; + import android.view.ViewStub; import org.junit.Before; @@ -28,7 +30,6 @@ import org.chromium.base.metrics.test.ShadowRecordHistogram; import org.chromium.base.test.BaseRobolectricTestRunner; import org.chromium.base.test.asynctask.CustomShadowAsyncTask; -import org.chromium.chrome.browser.autofill.AutofillKeyboardSuggestions; import org.chromium.chrome.browser.autofill.keyboard_accessory.KeyboardAccessoryData.Action; import org.chromium.chrome.browser.autofill.keyboard_accessory.KeyboardAccessoryData.PropertyProvider; import org.chromium.chrome.browser.modelutil.ListObservable; @@ -118,7 +119,8 @@ @Test public void testModelNotifiesAboutActionsChangedByProvider() { - final PropertyProvider<Action> testProvider = new PropertyProvider<>(); + final PropertyProvider<Action> testProvider = + new PropertyProvider<>(GENERATE_PASSWORD_AUTOMATIC); final Action testAction = new Action(null, 0, null); mModel.addActionListObserver(mMockActionListObserver); @@ -165,15 +167,21 @@ @Test public void testIsVisibleWithSuggestionsBeforeKeyboardComesUp() { + KeyboardAccessoryData.PropertyProvider<Action> autofillSuggestionProvider = + new KeyboardAccessoryData.PropertyProvider<>(AUTOFILL_SUGGESTION); + Action suggestion = new Action("Suggestion", AUTOFILL_SUGGESTION, (a) -> {}); + mCoordinator.registerActionListProvider(autofillSuggestionProvider); + // Without suggestions, the accessory should remain invisible - even if the keyboard shows. - assertThat(mModel.getAutofillSuggestions(), is(nullValue())); + assertThat(mModel.getActionList().size(), is(0)); assertThat(mModel.isVisible(), is(false)); mMediator.keyboardVisibilityChanged(true); assertThat(mModel.isVisible(), is(false)); mMediator.keyboardVisibilityChanged(false); // Adding suggestions doesn't change the visibility by itself. - mMediator.setSuggestions(mock(AutofillKeyboardSuggestions.class)); + autofillSuggestionProvider.notifyObservers(new Action[] {suggestion, suggestion}); + assertThat(mModel.getActionList().size(), is(2)); assertThat(mModel.isVisible(), is(false)); // But as soon as the keyboard comes up, it should be showing. @@ -183,16 +191,22 @@ @Test public void testIsVisibleWithSuggestionsAfterKeyboardComesUp() { + KeyboardAccessoryData.PropertyProvider<Action> autofillSuggestionProvider = + new KeyboardAccessoryData.PropertyProvider<>(AUTOFILL_SUGGESTION); + Action suggestion = new Action("Suggestion", AUTOFILL_SUGGESTION, (a) -> {}); + mCoordinator.registerActionListProvider(autofillSuggestionProvider); + // Without any suggestions, the accessory should remain invisible. - assertThat(mModel.getAutofillSuggestions(), is(nullValue())); assertThat(mModel.isVisible(), is(false)); + assertThat(mModel.getActionList().size(), is(0)); // If the keyboard comes up, but there are no suggestions set, keep the accessory hidden. mMediator.keyboardVisibilityChanged(true); assertThat(mModel.isVisible(), is(false)); // Adding suggestions while the keyboard is visible triggers the accessory. - mMediator.setSuggestions(mock(AutofillKeyboardSuggestions.class)); + autofillSuggestionProvider.notifyObservers(new Action[] {suggestion, suggestion}); + assertThat(mModel.getActionList().size(), is(2)); assertThat(mModel.isVisible(), is(true)); } @@ -209,6 +223,57 @@ } @Test + public void testSortsActionsBasedOnType() { + KeyboardAccessoryData.PropertyProvider<Action> generationProvider = + new KeyboardAccessoryData.PropertyProvider<>(GENERATE_PASSWORD_AUTOMATIC); + KeyboardAccessoryData.PropertyProvider<Action> autofillSuggestionProvider = + new KeyboardAccessoryData.PropertyProvider<>(AUTOFILL_SUGGESTION); + + mCoordinator.registerActionListProvider(generationProvider); + mCoordinator.registerActionListProvider(autofillSuggestionProvider); + + Action suggestion1 = new Action("FirstSuggestion", AUTOFILL_SUGGESTION, (a) -> {}); + Action suggestion2 = new Action("SecondSuggestion", AUTOFILL_SUGGESTION, (a) -> {}); + Action generationAction = new Action("Generate", GENERATE_PASSWORD_AUTOMATIC, (a) -> {}); + autofillSuggestionProvider.notifyObservers(new Action[] {suggestion1, suggestion2}); + generationProvider.notifyObservers(new Action[] {generationAction}); + + // Autofill suggestions should always come last, independent of when they were added. + assertThat(mModel.getActionList().size(), is(3)); + assertThat(mModel.getActionList().indexOf(generationAction), is(0)); + assertThat(mModel.getActionList().indexOf(suggestion1), is(1)); + assertThat(mModel.getActionList().indexOf(suggestion2), is(2)); + } + + @Test + public void testDeletingActionsAffectsOnlyOneType() { + KeyboardAccessoryData.PropertyProvider<Action> generationProvider = + new KeyboardAccessoryData.PropertyProvider<>(GENERATE_PASSWORD_AUTOMATIC); + KeyboardAccessoryData.PropertyProvider<Action> autofillSuggestionProvider = + new KeyboardAccessoryData.PropertyProvider<>(AUTOFILL_SUGGESTION); + + mCoordinator.registerActionListProvider(generationProvider); + mCoordinator.registerActionListProvider(autofillSuggestionProvider); + + Action suggestion = new Action("NewSuggestion", AUTOFILL_SUGGESTION, (a) -> {}); + Action generationAction = new Action("Generate", GENERATE_PASSWORD_AUTOMATIC, (a) -> {}); + autofillSuggestionProvider.notifyObservers(new Action[] {suggestion, suggestion}); + generationProvider.notifyObservers(new Action[] {generationAction}); + assertThat(mModel.getActionList().size(), is(3)); + + // Drop all Autofill suggestions. Only the generation action should remain. + autofillSuggestionProvider.notifyObservers(new Action[0]); + assertThat(mModel.getActionList().size(), is(1)); + assertThat(mModel.getActionList().indexOf(generationAction), is(0)); + + // Readd an Autofill suggestion and drop the generation. Only the suggestion should remain. + autofillSuggestionProvider.notifyObservers(new Action[] {suggestion}); + generationProvider.notifyObservers(new Action[0]); + assertThat(mModel.getActionList().size(), is(1)); + assertThat(mModel.getActionList().indexOf(suggestion), is(0)); + } + + @Test public void testActionsRemovedWhenNotVisible() { // Make the accessory visible and add an action to it. mMediator.keyboardVisibilityChanged(true); @@ -278,7 +343,11 @@ // Adding suggestions adds to the suggestions bucket - and again to tabs and total. mMediator.keyboardVisibilityChanged(false); // Hide, so it's brought up again. - mMediator.setSuggestions(mock(AutofillKeyboardSuggestions.class)); + KeyboardAccessoryData.PropertyProvider<Action> autofillSuggestionProvider = + new KeyboardAccessoryData.PropertyProvider<>(AUTOFILL_SUGGESTION); + Action suggestion = new Action("Suggestion", AUTOFILL_SUGGESTION, (a) -> {}); + mCoordinator.registerActionListProvider(autofillSuggestionProvider); + autofillSuggestionProvider.notifyObservers(new Action[] {suggestion}); mMediator.keyboardVisibilityChanged(true); // Hiding the keyboard clears actions, so don't log more actions from here on out. @@ -289,7 +358,7 @@ // Removing suggestions adds to everything but the suggestions bucket. The value remains. mMediator.keyboardVisibilityChanged(false); // Hide, so it's brought up again. - mMediator.setSuggestions(null); + autofillSuggestionProvider.notifyObservers(new Action[0]); mMediator.keyboardVisibilityChanged(true); assertThat(getShownMetricsCount(AccessoryBarContents.WITH_AUTOFILL_SUGGESTIONS), is(1)); @@ -299,26 +368,64 @@ } @Test - public void testRecordsContentImpressionsOnlyOnInitialShowing() { + public void testRecordsContentBarImpressionOnceAndContentsUpToOnce() { assertThat(RecordHistogram.getHistogramTotalCountForTesting( KeyboardAccessoryMetricsRecorder.UMA_KEYBOARD_ACCESSORY_BAR_SHOWN), is(0)); // First showing contains actions only. - mModel.getActionList().add(new Action(null, 0, null)); - mMediator.keyboardVisibilityChanged(true); - - assertThat(getShownMetricsCount(AccessoryBarContents.WITH_ACTIONS), is(1)); - assertThat(getShownMetricsCount(AccessoryBarContents.ANY_CONTENTS), is(1)); - - // Adding a tabs or suggestions now doesn't change the impression count mCoordinator.addTab(mTestTab); - mMediator.setSuggestions(mock(AutofillKeyboardSuggestions.class)); mMediator.keyboardVisibilityChanged(true); - assertThat(getShownMetricsCount(AccessoryBarContents.WITH_TABS), is(0)); + assertThat(getShownMetricsCount(AccessoryBarContents.WITH_TABS), is(1)); + assertThat(getShownMetricsCount(AccessoryBarContents.ANY_CONTENTS), is(1)); + + // Adding a tabs doesn't change the total impression count but the specific bucket. + mModel.getActionList().add(new Action(null, 0, null)); assertThat(getShownMetricsCount(AccessoryBarContents.WITH_ACTIONS), is(1)); assertThat(getShownMetricsCount(AccessoryBarContents.ANY_CONTENTS), is(1)); + + KeyboardAccessoryData.PropertyProvider<Action> autofillSuggestionProvider = + new KeyboardAccessoryData.PropertyProvider<>(AUTOFILL_SUGGESTION); + Action suggestion = new Action("Suggestion", AUTOFILL_SUGGESTION, (a) -> {}); + mCoordinator.registerActionListProvider(autofillSuggestionProvider); + autofillSuggestionProvider.notifyObservers(new Action[] {suggestion}); + assertThat(getShownMetricsCount(AccessoryBarContents.WITH_AUTOFILL_SUGGESTIONS), is(1)); + + // The other changes were not recorded again - just the changes. + assertThat(getShownMetricsCount(AccessoryBarContents.WITH_ACTIONS), is(1)); + assertThat(getShownMetricsCount(AccessoryBarContents.WITH_TABS), is(1)); + assertThat(getShownMetricsCount(AccessoryBarContents.NO_CONTENTS), is(0)); + } + + @Test + public void testRecordsAgainIfExistingItemsChange() { + assertThat(RecordHistogram.getHistogramTotalCountForTesting( + KeyboardAccessoryMetricsRecorder.UMA_KEYBOARD_ACCESSORY_BAR_SHOWN), + is(0)); + + // Add a tab and show, so the accessory is permanently visible. + mCoordinator.addTab(mTestTab); + mMediator.keyboardVisibilityChanged(true); + + // Adding an action fills the bar impression bucket and the actions set once. + mModel.getActionList().set( + new Action[] {new Action("One", AccessoryAction.GENERATE_PASSWORD_AUTOMATIC, null), + new Action("Two", AccessoryAction.GENERATE_PASSWORD_AUTOMATIC, null)}); + assertThat(getActionImpressionCount(AccessoryAction.GENERATE_PASSWORD_AUTOMATIC), is(1)); + assertThat(getShownMetricsCount(AccessoryBarContents.WITH_ACTIONS), is(1)); + + // Adding another action leaves bar impressions unchanged but affects the actions bucket. + mModel.getActionList().set( + new Action[] {new Action("Uno", AccessoryAction.GENERATE_PASSWORD_AUTOMATIC, null), + new Action("Dos", AccessoryAction.GENERATE_PASSWORD_AUTOMATIC, null)}); + assertThat(getShownMetricsCount(AccessoryBarContents.WITH_ACTIONS), is(1)); + assertThat(getActionImpressionCount(AccessoryAction.GENERATE_PASSWORD_AUTOMATIC), is(2)); + } + + private int getActionImpressionCount(@AccessoryAction int bucket) { + return RecordHistogram.getHistogramValueCountForTesting( + KeyboardAccessoryMetricsRecorder.UMA_KEYBOARD_ACCESSORY_ACTION_IMPRESSION, bucket); } private int getShownMetricsCount(@AccessoryBarContents int bucket) {
diff --git a/chrome/android/junit/src/org/chromium/chrome/browser/autofill/keyboard_accessory/ManualFillingControllerTest.java b/chrome/android/junit/src/org/chromium/chrome/browser/autofill/keyboard_accessory/ManualFillingControllerTest.java index c5ca59b..7807a5c1 100644 --- a/chrome/android/junit/src/org/chromium/chrome/browser/autofill/keyboard_accessory/ManualFillingControllerTest.java +++ b/chrome/android/junit/src/org/chromium/chrome/browser/autofill/keyboard_accessory/ManualFillingControllerTest.java
@@ -177,8 +177,10 @@ @Test public void testKeyboardAccessoryActionsPersistAfterSwitchingBrowserTabs() { ManualFillingMediator mediator = mController.getMediatorForTesting(); - Provider<Action> firstTabProvider = new PropertyProvider<>(); - Provider<Action> secondTabProvider = new PropertyProvider<>(); + PropertyProvider<Action> firstTabProvider = + new PropertyProvider<>(GENERATE_PASSWORD_AUTOMATIC); + PropertyProvider<Action> secondTabProvider = + new PropertyProvider<>(GENERATE_PASSWORD_AUTOMATIC); SimpleListObservable<Action> keyboardActions = mediator.getKeyboardAccessory() .getMediatorForTesting() .getModelForTesting() @@ -196,7 +198,7 @@ // Simulate creating a second tab: Tab secondTab = addTab(mediator, 2222, firstTab); mController.registerActionProvider(secondTabProvider); - secondTabProvider.notifyObservers(new Action[] {}); + secondTabProvider.notifyObservers(new Action[0]); mMockItemListObserver.onItemRangeRemoved(keyboardActions, 0, 1); assertThat(keyboardActions.size(), is(0)); // No actions on this tab. @@ -270,12 +272,14 @@ // Open a tab. Tab tab = addTab(mediator, 1111, null); // Add an action provider that never provided actions. - mController.registerActionProvider(new PropertyProvider<>()); + mController.registerActionProvider( + new PropertyProvider<Action>(GENERATE_PASSWORD_AUTOMATIC)); assertThat(keyboardAccessoryModel.getActionList().size(), is(0)); // Create a new tab with an action: Tab secondTab = addTab(mediator, 1111, tab); - PropertyProvider<Action> provider = new PropertyProvider<>(); + PropertyProvider<Action> provider = + new PropertyProvider<Action>(GENERATE_PASSWORD_AUTOMATIC); mController.registerActionProvider(provider); provider.notifyObservers(new Action[] { new Action("Test Action", GENERATE_PASSWORD_AUTOMATIC, (action) -> {})}); @@ -294,13 +298,15 @@ // Open a tab. Tab tab = addTab(mediator, 1111, null); // Add an action provider that hasn't provided actions yet. - PropertyProvider<Action> delayedProvider = new PropertyProvider<>(); + PropertyProvider<Action> delayedProvider = + new PropertyProvider<>(GENERATE_PASSWORD_AUTOMATIC); mController.registerActionProvider(delayedProvider); assertThat(keyboardAccessoryModel.getActionList().size(), is(0)); // Create and switch to a new tab: Tab secondTab = addTab(mediator, 1111, tab); - PropertyProvider<Action> provider = new PropertyProvider<>(); + PropertyProvider<Action> provider = + new PropertyProvider<Action>(GENERATE_PASSWORD_AUTOMATIC); mController.registerActionProvider(provider); // And provide data to the active tab. @@ -331,9 +337,11 @@ .getModelForTesting(); Provider<Item> firstTabProvider = new PropertyProvider<>(); - PropertyProvider<Action> firstActionProvider = new PropertyProvider<>(); + PropertyProvider<Action> firstActionProvider = + new PropertyProvider<Action>(GENERATE_PASSWORD_AUTOMATIC); Provider<Item> secondTabProvider = new PropertyProvider<>(); - PropertyProvider<Action> secondActionProvider = new PropertyProvider<>(); + PropertyProvider<Action> secondActionProvider = + new PropertyProvider<Action>(GENERATE_PASSWORD_AUTOMATIC); // Simulate opening a new tab: Tab firstTab = addTab(mediator, 1111, null);
diff --git a/chrome/android/junit/src/org/chromium/chrome/browser/media/remote/OWNERS b/chrome/android/junit/src/org/chromium/chrome/browser/media/remote/OWNERS deleted file mode 100644 index 67e24b16..0000000 --- a/chrome/android/junit/src/org/chromium/chrome/browser/media/remote/OWNERS +++ /dev/null
@@ -1,2 +0,0 @@ -aberent@chromium.org -dgn@chromium.org \ No newline at end of file
diff --git a/chrome/android/profiles/newest.txt b/chrome/android/profiles/newest.txt index 495b6110..0e21650 100644 --- a/chrome/android/profiles/newest.txt +++ b/chrome/android/profiles/newest.txt
@@ -1 +1 @@ -chromeos-chrome-amd64-70.0.3520.0_rc-r1.afdo.bz2 \ No newline at end of file +chromeos-chrome-amd64-70.0.3521.0_rc-r1.afdo.bz2 \ No newline at end of file
diff --git a/chrome/app/chromium_strings.grd b/chrome/app/chromium_strings.grd index 41630a6d..dd8bc48 100644 --- a/chrome/app/chromium_strings.grd +++ b/chrome/app/chromium_strings.grd
@@ -412,7 +412,7 @@ <!-- Print Preview --> <message name="IDS_PRINT_PREVIEW_NO_PLUGIN" desc="Message to display when the PDF viewer is missing."> - Chromium does not include the PDF viewer which is required for Print Preview to function. + Chromium cannot show the print preview when the built-in PDF viewer is missing. </message> <!-- Download Shelf Items -->
diff --git a/chrome/app/resources/chromium_strings_am.xtb b/chrome/app/resources/chromium_strings_am.xtb index 30566da..c739505 100644 --- a/chrome/app/resources/chromium_strings_am.xtb +++ b/chrome/app/resources/chromium_strings_am.xtb
@@ -248,7 +248,6 @@ <translation id="8599548569518771270">{0,plural, =0{Chromium OS አሁን ዳግም ይጀምራል}=1{Chromium OS በ1 ሰከንድ ውስጥ ዳግም ይጀምራል}one{Chromium OS በ# ሰከንዶች ውስጥ ዳግም ይጀምራል}other{Chromium OS በ# ሰከንዶች ውስጥ ዳግም ይጀምራል}}</translation> <translation id="8619360774459241877">Chromiumን በማስጀመር ላይ...</translation> <translation id="8621669128220841554">ተለይቶ ባልታወቀ ስህተት ምክንያት ጭነት ከሽፏል። እባክዎ Chromiumን እንደገና ያውርዱ።</translation> -<translation id="8628626585870903697">Chromium የህትመት ቅድመ እይታ እንዲሰራ የሚያስፈልገው የፒ ዲ ኤፍ ማያውን አያካትትም።</translation> <translation id="8667808506758191620">የእርስዎ <ph name="DEVICE_TYPE" /> የተዘመነ ነው።</translation> <translation id="8697124171261953979">እንዲሁም Chromiumን ሲጀምሩት ወይም ከኦምኒቦክሱ ሆነው ሲፈልጉ የሚታየውን ገጽ ይቆጣጠራል።</translation> <translation id="8704119203788522458">ይሄ የእርስዎ Chromium ነው</translation>
diff --git a/chrome/app/resources/chromium_strings_ar.xtb b/chrome/app/resources/chromium_strings_ar.xtb index 30b21bdd..ba5aeca2 100644 --- a/chrome/app/resources/chromium_strings_ar.xtb +++ b/chrome/app/resources/chromium_strings_ar.xtb
@@ -246,7 +246,6 @@ <translation id="8599548569518771270">{0,plural, =0{ستتم إعادة تشغيل نظام التشغيل Chromium الآن}=1{ستتم إعادة تشغيل نظام التشغيل Chromium خلال ثانية واحدة}two{ستتم إعادة تشغيل نظام التشغيل Chromium خلال ثانيتين (#)}few{ستتم إعادة تشغيل نظام التشغيل Chromium خلال # ثوانٍ}many{ستتم إعادة تشغيل نظام التشغيل Chromium خلال # ثانيةً}other{ستتم إعادة تشغيل نظام التشغيل Chromium خلال # ثانية}}</translation> <translation id="8619360774459241877">جارٍ إطلاق Chromium...</translation> <translation id="8621669128220841554">تعذّر التثبيت نظرًا لحدوث خطأ غير محدد. يُرجى إعادة تنزيل Chromium.</translation> -<translation id="8628626585870903697">لا يتضمن Chromium عارض PDF المطلوب لإجراء معاينة الطباعة.</translation> <translation id="8667808506758191620">جهاز <ph name="DEVICE_TYPE" /> مُحدّث.</translation> <translation id="8697124171261953979">كما أنها تتحكم في الصفحة التي تظهر عند تشغيل Chromium أو إجراء بحث من المربع متعدد الاستخدامات.</translation> <translation id="8704119203788522458">هذا هو Chromium الخاص بك</translation>
diff --git a/chrome/app/resources/chromium_strings_bg.xtb b/chrome/app/resources/chromium_strings_bg.xtb index 733cfdb12..1c7948c1 100644 --- a/chrome/app/resources/chromium_strings_bg.xtb +++ b/chrome/app/resources/chromium_strings_bg.xtb
@@ -240,7 +240,6 @@ <translation id="8599548569518771270">{0,plural, =0{Chromium OS ще се рестартира сега}=1{Chromium OS ще се рестартира след 1 секунда}other{Chromium OS ще се рестартира след # секунди}}</translation> <translation id="8619360774459241877">Chromium стартира…</translation> <translation id="8621669128220841554">Инсталирането не бе успешно поради неизвестна грешка. Моля, изтеглете отново Chromium.</translation> -<translation id="8628626585870903697">Chromium не включва визуализатора на PDF, който се изисква, за да функционира визуализацията за печат.</translation> <translation id="8667808506758191620">Устройството ви <ph name="DEVICE_TYPE" /> е актуално.</translation> <translation id="8697124171261953979">То също контролира коя страница се показва при стартиране на Chromium или при търсене от полето за всичко.</translation> <translation id="8704119203788522458">Това е вашият Chromium</translation>
diff --git a/chrome/app/resources/chromium_strings_bn.xtb b/chrome/app/resources/chromium_strings_bn.xtb index d60f4ce..b763296 100644 --- a/chrome/app/resources/chromium_strings_bn.xtb +++ b/chrome/app/resources/chromium_strings_bn.xtb
@@ -244,7 +244,6 @@ <translation id="8599548569518771270">{0,plural, =0{Chrome OS এখন রিস্টার্ট হবে}=1{Chromium OS ১ সেকেন্ডের মধ্যে রিস্টার্ট হবে}one{Chromium OS # সেকেন্ডের মধ্যে রিস্টার্ট হবে}other{Chromium OS # সেকেন্ডের মধ্যে রিস্টার্ট হবে}}</translation> <translation id="8619360774459241877">Chromium লঞ্চ করা হচ্ছে...</translation> <translation id="8621669128220841554">অনির্দিষ্ট ত্রুটির কারণে ইনস্টলেশন ব্যর্থ৷ দয়া করে Chromium পুনরায় ডাউনলোড করুন৷</translation> -<translation id="8628626585870903697">Chromium PDF দর্শক যা ফাংশানে প্রিন্ট প্রিভিউ জন্য আবশ্যক, তা অন্তর্ভূক্ত করেনি৷</translation> <translation id="8667808506758191620">আপনার <ph name="DEVICE_TYPE" /> আপ টু ডেট রয়েছে।</translation> <translation id="8697124171261953979">আপনি Chromium শুরু করলে বা Omnibox থেকে সার্চ করলে কোন পৃষ্ঠাটি দেখানো হবে তাও এটি নিয়ন্ত্রণ করে।</translation> <translation id="8704119203788522458">এটি হল আপনার Chromium</translation>
diff --git a/chrome/app/resources/chromium_strings_ca.xtb b/chrome/app/resources/chromium_strings_ca.xtb index a4a8417..2b88a4b 100644 --- a/chrome/app/resources/chromium_strings_ca.xtb +++ b/chrome/app/resources/chromium_strings_ca.xtb
@@ -246,7 +246,6 @@ <translation id="8599548569518771270">{0,plural, =0{Chromium OS es reiniciarà ara}=1{Chromium OS es reiniciarà d'aquí a 1 segon}other{Chromium OS es reiniciarà d'aquí a # segons}}</translation> <translation id="8619360774459241877">S'està iniciant Chromium...</translation> <translation id="8621669128220841554">La instal·lació ha fallat a causa d'un error no especificat. Torneu a baixar Chromium.</translation> -<translation id="8628626585870903697">Chromium no inclou el lector de PDF que és necessari perquè la previsualització funcioni.</translation> <translation id="8667808506758191620">El dispositiu <ph name="DEVICE_TYPE" /> està actualitzat.</translation> <translation id="8697124171261953979">També controla la pàgina que es mostra quan inicieu Chromium o quan feu una cerca des de l'omnibox.</translation> <translation id="8704119203788522458">Aquest és el vostre Chromium</translation>
diff --git a/chrome/app/resources/chromium_strings_cs.xtb b/chrome/app/resources/chromium_strings_cs.xtb index 5be7884b..c871f73 100644 --- a/chrome/app/resources/chromium_strings_cs.xtb +++ b/chrome/app/resources/chromium_strings_cs.xtb
@@ -248,7 +248,6 @@ <translation id="8599548569518771270">{0,plural, =0{Chrome OS se teď restartuje}=1{Chromium OS se za 1 sekundu restartuje}few{Chromium OS se za # sekundy restartuje}many{Chromium OS se za # sekundy restartuje}other{Chromium OS se za # sekund restartuje}}</translation> <translation id="8619360774459241877">Spouštění prohlížeče Chromium...</translation> <translation id="8621669128220841554">Instalace se z neznámého důvodu nezdařila. Stáhněte prosím Chromium znovu.</translation> -<translation id="8628626585870903697">Chromium neobsahuje prohlížeč PDF, který je požadován ke správnému fungování Náhledu tisku.</translation> <translation id="8667808506758191620">Vaše zařízení <ph name="DEVICE_TYPE" /> je aktuální.</translation> <translation id="8697124171261953979">Také řídí, která stránka se zobrazí po spuštění prohlížeče Chromium nebo při vyhledávání v omniboxu.</translation> <translation id="8704119203788522458">Toto je váš prohlížeč Chromium</translation>
diff --git a/chrome/app/resources/chromium_strings_da.xtb b/chrome/app/resources/chromium_strings_da.xtb index d5cb4cc..d32a3fa 100644 --- a/chrome/app/resources/chromium_strings_da.xtb +++ b/chrome/app/resources/chromium_strings_da.xtb
@@ -246,7 +246,6 @@ <translation id="8599548569518771270">{0,plural, =0{Chromium OS genstarter nu}=1{Chromium OS genstarter om 1 sekund}one{Chromium OS genstarter om # sekund}other{Chromium OS genstarter om # sekunder}}</translation> <translation id="8619360774459241877">Starter Chromium...</translation> <translation id="8621669128220841554">Installationen mislykkedes på grund af en uspecificeret fejl. Download Chromium igen.</translation> -<translation id="8628626585870903697">Chromium inkluderer ikke PDF-fremviseren, som er påkrævet, for at Vis udskrift kan fungere.</translation> <translation id="8667808506758191620">Din <ph name="DEVICE_TYPE" /> er opdateret.</translation> <translation id="8697124171261953979">Den styrer også, hvilken side der vises, når du åbner Chromium eller søger via omnifeltet.</translation> <translation id="8704119203788522458">Dette er din Chromium-browser</translation>
diff --git a/chrome/app/resources/chromium_strings_de.xtb b/chrome/app/resources/chromium_strings_de.xtb index 8d81ec0..5936469 100644 --- a/chrome/app/resources/chromium_strings_de.xtb +++ b/chrome/app/resources/chromium_strings_de.xtb
@@ -246,7 +246,6 @@ <translation id="8599548569518771270">{0,plural, =0{Chromium OS wird jetzt neu gestartet}=1{Chromium OS wird in 1 Sekunde neu gestartet}other{Chromium OS wird in # Sekunden neu gestartet}}</translation> <translation id="8619360774459241877">Chromium wird gestartet…</translation> <translation id="8621669128220841554">Die Installation konnte aufgrund eines undefinierten Fehlers nicht abgeschlossen werden. Bitte laden Sie Chromium erneut herunter.</translation> -<translation id="8628626585870903697">Chromium verfügt nicht über den PDF-Viewer, der für die Druckvorschau erforderlich ist.</translation> <translation id="8667808506758191620">Ihr <ph name="DEVICE_TYPE" /> ist auf dem neuesten Stand.</translation> <translation id="8697124171261953979">Die Erweiterung legt auch fest, welche Seite beim Start von Chromium oder bei der Suche über die Omnibox angezeigt wird.</translation> <translation id="8704119203788522458">Dies ist Ihr persönlicher Chromium-Browser</translation>
diff --git a/chrome/app/resources/chromium_strings_el.xtb b/chrome/app/resources/chromium_strings_el.xtb index 96f19f6..fb171eda 100644 --- a/chrome/app/resources/chromium_strings_el.xtb +++ b/chrome/app/resources/chromium_strings_el.xtb
@@ -246,7 +246,6 @@ <translation id="8599548569518771270">{0,plural, =0{Η επανεκκίνηση του Chromium OS θα γίνει τώρα}=1{Η επανεκκίνηση του Chromium OS θα γίνει σε 1 δευτερόλεπτο}other{Η επανεκκίνηση του Chromium OS θα γίνει σε # δευτερόλεπτα}}</translation> <translation id="8619360774459241877">Εκκίνηση του Chromium…</translation> <translation id="8621669128220841554">Η εγκατάσταση απέτυχε λόγω μη καθορισμένου σφάλματος. Κατεβάστε το Chromium ξανά.</translation> -<translation id="8628626585870903697">Το Chromium δεν περιλαμβάνει το πρόγραμμα προβολής αρχείων PDF το οποίο είναι απαραίτητο για τη λειτουργία της Προεπισκόπησης εκτύπωσης.</translation> <translation id="8667808506758191620">Το <ph name="DEVICE_TYPE" /> είναι ενημερωμένο.</translation> <translation id="8697124171261953979">Επίσης, ελέγχει τη σελίδα που εμφανίζεται κατά την εκκίνηση του Chromium ή όταν κάνετε αναζήτηση από το κύριο πλαίσιο.</translation> <translation id="8704119203788522458">Ορίστε το δικό σας Chromium</translation>
diff --git a/chrome/app/resources/chromium_strings_en-GB.xtb b/chrome/app/resources/chromium_strings_en-GB.xtb index eb90adf..ba0953b 100644 --- a/chrome/app/resources/chromium_strings_en-GB.xtb +++ b/chrome/app/resources/chromium_strings_en-GB.xtb
@@ -248,7 +248,6 @@ <translation id="8599548569518771270">{0,plural, =0{Chromium OS will restart now}=1{Chromium OS will restart in 1 second}other{Chromium OS will restart in # seconds}}</translation> <translation id="8619360774459241877">Launching Chromium...</translation> <translation id="8621669128220841554">Installation failed due to unspecified error. Please download Chromium again.</translation> -<translation id="8628626585870903697">Chromium does not include the PDF viewer which is required for Print Preview to function.</translation> <translation id="8667808506758191620">Your <ph name="DEVICE_TYPE" /> is up to date.</translation> <translation id="8697124171261953979">It also controls what page is shown when you start Chromium or search from the Omnibox.</translation> <translation id="8704119203788522458">This is your Chromium</translation>
diff --git a/chrome/app/resources/chromium_strings_es-419.xtb b/chrome/app/resources/chromium_strings_es-419.xtb index b729eb9..6166006 100644 --- a/chrome/app/resources/chromium_strings_es-419.xtb +++ b/chrome/app/resources/chromium_strings_es-419.xtb
@@ -240,7 +240,6 @@ <translation id="8599548569518771270">{0,plural, =0{El SO Chromium se reiniciará ahora}=1{El SO Chromium se reiniciará en 1 segundo}other{El SO Chromium se reiniciará en # segundos}}</translation> <translation id="8619360774459241877">Iniciando Chromium…</translation> <translation id="8621669128220841554">La instalación falló debido a un error no especificado. Descarga Chromium otra vez.</translation> -<translation id="8628626585870903697">Chromium no incluye el visor de PDF que se requiere para la vista previa de impresión.</translation> <translation id="8667808506758191620">Tu <ph name="DEVICE_TYPE" /> está actualizado.</translation> <translation id="8697124171261953979">También controla qué página se muestra al iniciar Chromium o al realizar búsquedas desde el cuadro multifunción.</translation> <translation id="8704119203788522458">Este es tu Chromium</translation>
diff --git a/chrome/app/resources/chromium_strings_es.xtb b/chrome/app/resources/chromium_strings_es.xtb index 8b9b8b2..596b47d 100644 --- a/chrome/app/resources/chromium_strings_es.xtb +++ b/chrome/app/resources/chromium_strings_es.xtb
@@ -248,7 +248,6 @@ <translation id="8599548569518771270">{0,plural, =0{Chromium OS se reiniciará ahora}=1{Chromium OS se reiniciará en 1 segundo}other{Chromium OS se reiniciará en # segundos}}</translation> <translation id="8619360774459241877">Iniciando Chromium...</translation> <translation id="8621669128220841554">La instalación ha fallado debido a un error no especificado. Vuelve a descargar Chromium.</translation> -<translation id="8628626585870903697">Chromium no incluye el visor de PDF que se necesita para que la vista previa de impresión funcione.</translation> <translation id="8667808506758191620">El dispositivo <ph name="DEVICE_TYPE" /> está actualizado.</translation> <translation id="8697124171261953979">También controla qué página se muestra al iniciar Chromium o al hacer búsquedas desde el omnibox.</translation> <translation id="8704119203788522458">Aquí tienes tu navegador Chromium</translation>
diff --git a/chrome/app/resources/chromium_strings_et.xtb b/chrome/app/resources/chromium_strings_et.xtb index 1ab03a1..c753164 100644 --- a/chrome/app/resources/chromium_strings_et.xtb +++ b/chrome/app/resources/chromium_strings_et.xtb
@@ -246,7 +246,6 @@ <translation id="8599548569518771270">{0,plural, =0{Chromium OS taaskäivitub kohe}=1{Chromium OS taaskäivitub 1 sekundi pärast}other{Chromium OS taaskäivitub # sekundi pärast}}</translation> <translation id="8619360774459241877">Chromiumi käivitamine …</translation> <translation id="8621669128220841554">Installimine ebaõnnestus tundmatu vea tõttu. Laadige Chromium uuesti alla.</translation> -<translation id="8628626585870903697">Chromium ei sisalda PDF-vaaturit, mida on printimise eelvaate jaoks vaja.</translation> <translation id="8667808506758191620">Teie <ph name="DEVICE_TYPE" /> on ajakohane.</translation> <translation id="8697124171261953979">Lisaks juhib see seda, mis leht kuvatakse Chromiumi käivitamisel või omnikastikeses otsingu tegemisel.</translation> <translation id="8704119203788522458">See on teie Chromium</translation>
diff --git a/chrome/app/resources/chromium_strings_fa.xtb b/chrome/app/resources/chromium_strings_fa.xtb index 5b4479b..a043061 100644 --- a/chrome/app/resources/chromium_strings_fa.xtb +++ b/chrome/app/resources/chromium_strings_fa.xtb
@@ -244,7 +244,6 @@ <translation id="8599548569518771270">{0,plural, =0{سیستمعامل Chromium اکنون بازراهاندازی میشود}=1{سیستمعامل Chromium ۱ ثانیه دیگر بازراهاندازی میشود}one{سیستمعامل Chromium # ثانیه دیگر بازراهاندازی میشود}other{سیستمعامل Chromium # ثانیه دیگر بازراهاندازی میشود}}</translation> <translation id="8619360774459241877">درحال راهاندازی Chromium…</translation> <translation id="8621669128220841554">به دلیل خطای نامشخص، نصب ناموفق بود. لطفاً دوباره Chromium را بارگیری کنید.</translation> -<translation id="8628626585870903697">Chromium فاقد نمایشگر PDF است که برای عملکرد پیشنمایش چاپ لازم است.</translation> <translation id="8667808506758191620"><ph name="DEVICE_TYPE" /> شما به روز است.</translation> <translation id="8697124171261953979">این برنامه همچنین صفحهای را که هنگام راهاندازی Chromium یا جستجو از Omnibox نشان داده میشود، کنترل میکند.</translation> <translation id="8704119203788522458">این Chromium شماست</translation>
diff --git a/chrome/app/resources/chromium_strings_fi.xtb b/chrome/app/resources/chromium_strings_fi.xtb index 2daadc1..71c8416 100644 --- a/chrome/app/resources/chromium_strings_fi.xtb +++ b/chrome/app/resources/chromium_strings_fi.xtb
@@ -246,7 +246,6 @@ <translation id="8599548569518771270">{0,plural, =0{Chromium OS käynnistetään uudelleen nyt}=1{Chromium OS käynnistetään uudelleen 1 sekunnin kuluttua}other{Chromium OS käynnistetään uudelleen # sekunnin kuluttua}}</translation> <translation id="8619360774459241877">Käynnistetään Chromiumia…</translation> <translation id="8621669128220841554">Asennus epäonnistui määrittelemättömän virheen vuoksi. Lataa Chromium uudelleen.</translation> -<translation id="8628626585870903697">Chromium ei sisällä PDF-katseluohjelmaa, joka tarvitaan tulostuksen esikatseluun.</translation> <translation id="8667808506758191620"><ph name="DEVICE_TYPE" /> on ajan tasalla.</translation> <translation id="8697124171261953979">Määrittää myös Chromiumin ja omnibox-hakujen aloitussivun.</translation> <translation id="8704119203788522458">Tämä on oma Chromiumisi</translation>
diff --git a/chrome/app/resources/chromium_strings_fil.xtb b/chrome/app/resources/chromium_strings_fil.xtb index 3ce6bf4..2db2998 100644 --- a/chrome/app/resources/chromium_strings_fil.xtb +++ b/chrome/app/resources/chromium_strings_fil.xtb
@@ -248,7 +248,6 @@ <translation id="8599548569518771270">{0,plural, =0{Magre-restart na ang Chromium OS}=1{Magre-restart ang Chromium OS sa loob ng 1 segundo}one{Magre-restart ang Chromium OS sa loob ng # segundo}other{Magre-restart ang Chromium OS sa loob ng # na segundo}}</translation> <translation id="8619360774459241877">Inilulunsad ang Chromium...</translation> <translation id="8621669128220841554">Nabigo ang pag-install dahil sa hindi natukoy na error. Mangyaring i-download muli ang Chromium.</translation> -<translation id="8628626585870903697">Hindi isinasama ng Chromium ang PDF viewer na kinakailangan upang gumana ang Preview ng Pag-print.</translation> <translation id="8667808506758191620">Napapanahon ang iyong <ph name="DEVICE_TYPE" />.</translation> <translation id="8697124171261953979">Kinokontrol din nito kung anong pahina ang ipinapakita kapag sinimulan mo ang Chromium o naghanap mula sa Omnibox.</translation> <translation id="8704119203788522458">Ito ang iyong Chromium</translation>
diff --git a/chrome/app/resources/chromium_strings_fr.xtb b/chrome/app/resources/chromium_strings_fr.xtb index 523225fd..1f07df6 100644 --- a/chrome/app/resources/chromium_strings_fr.xtb +++ b/chrome/app/resources/chromium_strings_fr.xtb
@@ -247,7 +247,6 @@ <translation id="8599548569518771270">{0,plural, =0{Chromium OS va redémarrer maintenant}=1{Chromium OS va redémarrer dans 1 seconde}one{Chromium OS va redémarrer dans # seconde}other{Chromium OS va redémarrer dans # secondes}}</translation> <translation id="8619360774459241877">Lancement de Chromium…</translation> <translation id="8621669128220841554">Échec de l'installation en raison d'une erreur non spécifiée. Veuillez télécharger Chromium à nouveau.</translation> -<translation id="8628626585870903697">Chromium ne comprend pas le lecteur de PDF qui est nécessaire au fonctionnement de l'aperçu avant impression.</translation> <translation id="8667808506758191620">Votre <ph name="DEVICE_TYPE" /> est à jour.</translation> <translation id="8697124171261953979">Elle contrôle également la page qui s'affiche au démarrage de Chromium ou lorsque vous effectuez une recherche dans l'omnibox.</translation> <translation id="8704119203788522458">Voici votre Chromium</translation>
diff --git a/chrome/app/resources/chromium_strings_gu.xtb b/chrome/app/resources/chromium_strings_gu.xtb index 7e711a0..031d8a1 100644 --- a/chrome/app/resources/chromium_strings_gu.xtb +++ b/chrome/app/resources/chromium_strings_gu.xtb
@@ -248,7 +248,6 @@ <translation id="8599548569518771270">{0,plural, =0{Chromium OS હવે ફરી શરૂ થશે}=1{Chromium OS 1 સેકન્ડમાં ફરી શરૂ થશે}one{Chromium OS # સેકન્ડમાં ફરી શરૂ થશે}other{Chromium OS # સેકન્ડમાં ફરી શરૂ થશે}}</translation> <translation id="8619360774459241877">Chromium લૉન્ચ કરી રહ્યાં છીએ…</translation> <translation id="8621669128220841554">અનુલ્લેખિત ભૂલને કારણે ઇન્સ્ટોલેશન નિષ્ફળ રહ્યું. કૃપા કરીને Chromium ફરીથી ડાઉનલોડ કરો.</translation> -<translation id="8628626585870903697">Chromium માં PDF વ્યૂઅર સામેલ કરતું નથી, જે પ્રિંટ પૂર્વાવલોકનને કાર્ય કરવા માટે જરૂરી છે.</translation> <translation id="8667808506758191620">તમારું <ph name="DEVICE_TYPE" /> અપ ટૂ ડેટ છે.</translation> <translation id="8697124171261953979">જ્યારે તમે Chromium શરૂ કરો અથવા ઑમ્નિબૉક્સ પરથી શોધ કરો ત્યારે કયું પૃષ્ઠ બતાવવામાં આવે તે તેનું પણ નિયંત્રણ કરે છે.</translation> <translation id="8704119203788522458">આ તમારું Chromium છે</translation>
diff --git a/chrome/app/resources/chromium_strings_hi.xtb b/chrome/app/resources/chromium_strings_hi.xtb index ae0e1a5..72dd125 100644 --- a/chrome/app/resources/chromium_strings_hi.xtb +++ b/chrome/app/resources/chromium_strings_hi.xtb
@@ -28,7 +28,7 @@ <translation id="1895626441344023878">{0,plural, =0{क्रोमियम का एक अपडेट उपलब्ध है}=1{क्रोमियम का एक अपडेट उपलब्ध है}one{क्रोमियम का एक अपडेट # दिनों से उपलब्ध है}other{क्रोमियम का एक अपडेट # दिनों से उपलब्ध है}}</translation> <translation id="1929939181775079593">क्रोमियम अनुत्तरदायी है. अभी रीलॉन्च करें?</translation> <translation id="1966382378801805537">क्रोमियम, डिफ़ॉल्ट ब्राउज़र को निर्धारित या सेट नहीं कर सकता</translation> -<translation id="2008474315282236005">ऐसा करने से इस डिवाइस से 1 आइटम हट जाएगा. बाद में अपना डेटा पाने के लिए, Chromium में <ph name="USER_EMAIL" /> के रूप में प्रवेश करें.</translation> +<translation id="2008474315282236005">ऐसा करने से इस डिवाइस से 1 आइटम हट जाएगा. बाद में अपना डेटा पाने के लिए, Chromium में <ph name="USER_EMAIL" /> के रूप में साइन इन करें.</translation> <translation id="2117378023188580026">आपके एडमिन का कहना है कि यह अपडेट लागू करने के लिए आप क्रोमियम को फिर से लॉन्च करें</translation> <translation id="2119636228670142020">&क्रोमियम OS के बारे में</translation> <translation id="2241627712206172106">यदि आप किसी कंप्यूटर को शेयर करते हैं, तो मित्र और परिवार अलग-अलग ब्राउज़ कर सकते हैं और क्रोमियम को जैसा चाहें सेट कर सकते हैं.</translation> @@ -38,7 +38,7 @@ <translation id="2483889755041906834">क्रोमियम में</translation> <translation id="2485422356828889247">विस्थापित करें</translation> <translation id="2527042973354814951"><ph name="PLUGIN_NAME" /> सक्षम करने के लिए क्रोमियम को फिर से शुरू करें</translation> -<translation id="2535480412977113886">क्रोमियम OS आपका डेटा समन्वयित नहीं कर सका क्योंकि आपके खाता प्रवेश विवरण पुराने हो चुके हैं.</translation> +<translation id="2535480412977113886">क्रोमियम OS आपका डेटा समन्वयित नहीं कर सका क्योंकि आपके खाता साइन इन विवरण पुराने हो चुके हैं.</translation> <translation id="2560420686485554789">फ़ाइलें डाउनलोड करने के लिए क्रोमियम को मेमोरी एक्सेस की ज़रूरत होगी</translation> <translation id="2572494885440352020">क्रोमियम सहायक</translation> <translation id="2587578672395088481">अपडेट को लागू करने के लिए क्रोमियम OS को फिर से चालू करने की आवश्यकता होती है.</translation> @@ -70,7 +70,7 @@ <translation id="328888136576916638">Google API (एपीआई) कुंजियां मौजूद नहीं हैं. क्रोमियम के कुछ फ़ंक्शन बंद कर दिए जाएंगे.</translation> <translation id="3296368748942286671">जब क्रोमियम बंद हो तब पृष्ठभूमि ऐप्लिकेशन चलाना जारी रखें</translation> <translation id="331951419404882060">प्रवेश करने संबंधी गड़बड़ी के कारण क्रोमियम OS आपका डेटा समन्वयित नहीं कर सका.</translation> -<translation id="3474745554856756813">ऐसा करने से इस डिवाइस से <ph name="ITEMS_COUNT" /> आइटम हट जाएंगे. बाद में अपना डेटा पाने के लिए, Chromium में <ph name="USER_EMAIL" /> के रूप में प्रवेश करें.</translation> +<translation id="3474745554856756813">ऐसा करने से इस डिवाइस से <ph name="ITEMS_COUNT" /> आइटम हट जाएंगे. बाद में अपना डेटा पाने के लिए, क्रोमियम में <ph name="USER_EMAIL" /> के रूप में साइन इन करें.</translation> <translation id="3479552764303398839">अभी नहीं</translation> <translation id="3509308970982693815">कृपया सभी क्रोमियम विंडो बंद करें और पुन: प्रयास करें.</translation> <translation id="352783484088404971">क्रोमियम से निकालें...</translation> @@ -128,7 +128,7 @@ <translation id="5529843986978123325">{0,plural, =1{क्रोमियम OS एक मिनट में रीस्टार्ट होगा}one{क्रोमियम OS # मिनटों में रीस्टार्ट होगा}other{क्रोमियम OS # मिनटों में रीस्टार्ट होगा}}</translation> <translation id="5631814766731275228">क्रोमियम पर नाम और तस्वीर</translation> <translation id="5634636535844844681">क्रोमियम के लिए Windows 7 या उसके बाद के वर्शन की आवश्यकता होती है.</translation> -<translation id="5680901439334282664">क्रोमियम में प्रवेश करें</translation> +<translation id="5680901439334282664">क्रोमियम में साइन इन करें</translation> <translation id="5698481217667032250">क्रोमियम इस भाषा में दिखाएं</translation> <translation id="5712253116097046984">आपके एडमिन का कहना है कि यह अपडेट लागू करने के लिए आप क्रोमियम OS को रीस्टार्ट करें</translation> <translation id="5726838626470692954">आपके प्रबंधक को आपको क्रोमियम से निकालना और वापस जोड़ना होगा.</translation> @@ -138,7 +138,7 @@ <translation id="5862307444128926510">क्रोमियम में आपका स्वागत है</translation> <translation id="5877064549588274448">चैनल बदल दिया गया है. बदलावों का लागू करने के लिए अपने डिवाइस को फिर से प्रारंभ करें.</translation> <translation id="5895138241574237353">पुन: प्रारंभ करें</translation> -<translation id="5902536751647951209">प्रमाणीकरण प्रमाणपत्र विफल रहा. कृपया क्रोमियम में फिर से प्रवेश करें या अधिक जानकारी के लिए अपने व्यवस्थापक से संपर्क करें. <ph name="ADDITIONAL_EXPLANATION" /></translation> +<translation id="5902536751647951209">प्रमाणीकरण प्रमाणपत्र विफल रहा. कृपया क्रोमियम में फिर से साइन इन करें या ज़्यादा जानकारी के लिए अपने व्यवस्थापक से संपर्क करें. <ph name="ADDITIONAL_EXPLANATION" /></translation> <translation id="5906655207909574370">लगभग अप टू डेट हो गया है! अपडेट करना पूरा करने के लिए अपना डिवाइस पुन: प्रारंभ करें.</translation> <translation id="5987687638152509985">सिंक शुरू करने के लिए क्रोमियम अपडेट करें</translation> <translation id="6040143037577758943">बंद करें</translation> @@ -219,7 +219,7 @@ <translation id="7747138024166251722">इंस्टॉलर अस्थायी निर्देशिका नहीं बना सकता. कृपया डिस्क में खाली जगह और सॉफ़्टवेयर को इंस्टॉल करने की अनुमति की जाँच करें.</translation> <translation id="7756122083761163394">इस व्यक्ति का ब्राउज़िंग डेटा इस डिवाइस से हटा दिया जाएगा. डेटा वापस पाने के लिए, $2 के रूप में Chrome में प्रवेश करें.</translation> <translation id="7773960292263897147">चेतावनी: क्रोमियम आपका ब्राउज़िंग इतिहास रिकॉर्ड करने से एक्सटेंशन को नहीं रोक सकता है. गुप्त मोड में इस एक्सटेंशन को बंद करने के लिए, इस विकल्प का चयन हटाएं.</translation> -<translation id="7774736947049807614">प्रमाणीकरण प्रमाणपत्र विफल रहा. कृपया क्रोमियम में <ph name="USER_NAME" /> के रूप में फिर से प्रवेश करें या अधिक जानकारी के लिए अपने व्यवस्थापक से संपर्क करें. <ph name="ADDITIONAL_EXPLANATION" /></translation> +<translation id="7774736947049807614">प्रमाणीकरण प्रमाणपत्र विफल रहा. कृपया क्रोमियम में <ph name="USER_NAME" /> के रूप में फिर से साइन इन करें या ज़्यादा जानकारी के लिए अपने व्यवस्थापक से संपर्क करें. <ph name="ADDITIONAL_EXPLANATION" /></translation> <translation id="7790626492778995050"><ph name="PAGE_TITLE" /> - क्रोमियम कैनरी</translation> <translation id="7867198900892795913">क्रोमियम सबसे नए वर्शन में अपडेट नहीं कर सका, इसलिए आपको नई सुविधाएं और सुरक्षा सुधार नहीं मिल रहे हैं.</translation> <translation id="7901117350626490574">क्रोमियम के लिए एक नया अपडेट उपलब्ध है और जैसे ही आप फिर से लॉन्च करेंगे, अपडेट लागू कर दिया जाएगा.</translation> @@ -246,13 +246,12 @@ <translation id="8599548569518771270">{0,plural, =0{अब क्रोमियम OS रीस्टार्ट होगा}=1{क्रोमियम OS एक सेकंड में रीस्टार्ट होगा}one{क्रोमियम OS # सेकंड में रीस्टार्ट होगा}other{क्रोमियम OS # सेकंड में रीस्टार्ट होगा}}</translation> <translation id="8619360774459241877">क्रोमियम लॉन्च हो रहा है...</translation> <translation id="8621669128220841554">अनिर्दिष्ट कारणों से इंस्टॉलेशन विफल हुआ. कृपया क्रोमियम पुन: डाउनलोड करें.</translation> -<translation id="8628626585870903697">क्रोमियम में PDF व्यूअर शामिल नहीं है, जिसकी ज़रूरत प्रिंट करने से पहले दस्तावेज़ की झलक देखने के लिए पड़ती है.</translation> <translation id="8667808506758191620">आपका <ph name="DEVICE_TYPE" /> अद्यतित है.</translation> <translation id="8697124171261953979">इससे यह भी नियंत्रित होता है कि जब आप क्रोमियम प्रारंभ करते हैं या खोज वाली पट्टी से खोजते हैं तब कौन सा पेज दिखाया जाए.</translation> <translation id="8704119203788522458">यह आपका क्रोमियम है</translation> <translation id="8796602469536043152">क्रोमियम को इस साइट के लिए आपका कैमरा और माइक्रोफ़ोन एक्सेस करने की अनुमति चाहिए</translation> <translation id="8803635938069941624">क्रोमियम OS शर्तें</translation> -<translation id="8821041990367117597">क्रोमियम आपका डेटा समन्वयित नहीं कर सका क्योंकि आपके खाते के प्रवेश विवरण पुराने हैं.</translation> +<translation id="8821041990367117597">क्रोमियम आपका डेटा समन्वयित नहीं कर सका क्योंकि आपके खाते के साइन इन विवरण पुराने हैं.</translation> <translation id="8862326446509486874">सिस्टम-स्तर स्थापना के लिए आपके पास उचित अधिकार नहीं हैं. इंस्टॉलर को व्यवस्थापक के रूप में फिर से चलाने का प्रयास करें.</translation> <translation id="8897323336392112261">इससे यह भी नियंत्रित होता है कि जब आप क्रोमियम प्रारंभ करते हैं या होम बटन क्लिक करते हैं तब कौन सा पृष्ठ दिखाया जाए.</translation> <translation id="8907580949721785412">Chromium पासवर्ड दिखाने का प्रयास कर रहा है. इसे अनुमति देने के लिए अपना Windows पासवर्ड लिखें.</translation> @@ -263,7 +262,7 @@ किसी भी तरह साइन इन करने से बुकमार्क, इतिहास और अन्य सेटिंग से जुड़ी Chromium की जानकारियां <ph name="ACCOUNT_EMAIL_NEW" /> में मिल जाएंगी.</translation> <translation id="9013087743919948559">क्रोमियम में जोड़ें</translation> <translation id="9019929317751753759">क्रोमियम को अधिक सुरक्षित बनाने के लिए, हमने निम्न एक्सटेंशन को अक्षम कर दिया है जो <ph name="IDS_EXTENSION_WEB_STORE_TITLE" /> में सूचीबद्ध नहीं है और आपकी जानकारी के बिना जोड़ा गया हो सकता है.</translation> -<translation id="9022552996538154597">क्रोमियम में प्रवेश करें</translation> +<translation id="9022552996538154597">क्रोमियम में साइन इन करें</translation> <translation id="9025992965467895364">यह पेज बहुत ज़्यादा मेमोरी का इस्तेमाल करता है, इसलिए क्रोमियम ने इसे रोक दिया है.</translation> <translation id="9036189287518468038">क्रोमियम ऐप चलाने का साधन</translation> <translation id="9089354809943900324">क्रोमियम पुराना हो गया है</translation>
diff --git a/chrome/app/resources/chromium_strings_hr.xtb b/chrome/app/resources/chromium_strings_hr.xtb index 9650780..2e5c1f27 100644 --- a/chrome/app/resources/chromium_strings_hr.xtb +++ b/chrome/app/resources/chromium_strings_hr.xtb
@@ -246,7 +246,6 @@ <translation id="8599548569518771270">{0,plural, =0{OS Chromium sada će se ponovo pokrenuti}=1{OS Chromium ponovo će se pokrenuti za 1 sekundu}one{OS Chromium ponovo će se pokrenuti za # sekundu}few{OS Chromium ponovo će se pokrenuti za # sekunde}other{OS Chromium ponovo će se pokrenuti za # sekundi}}</translation> <translation id="8619360774459241877">Pokretanje Chromiuma...</translation> <translation id="8621669128220841554">Instalacija nije uspjela zbog nepoznate pogreške. Ponovo preuzmite Chromium.</translation> -<translation id="8628626585870903697">Chromium ne uključuje pregledač PDF-a koji je potreban da bi pregled ispisa funkcionirao.</translation> <translation id="8667808506758191620"><ph name="DEVICE_TYPE" /> je ažuriran.</translation> <translation id="8697124171261953979">Upravlja i time koja se stranica prikazuje prilikom pokretanja Chromiuma ili pretraživanja putem višenamjenskog okvira.</translation> <translation id="8704119203788522458">To je vaš Chromium</translation>
diff --git a/chrome/app/resources/chromium_strings_hu.xtb b/chrome/app/resources/chromium_strings_hu.xtb index c42fade..dcf6a7f5 100644 --- a/chrome/app/resources/chromium_strings_hu.xtb +++ b/chrome/app/resources/chromium_strings_hu.xtb
@@ -244,7 +244,6 @@ <translation id="8599548569518771270">{0,plural, =0{A Chromium OS most újraindul}=1{A Chromium OS 1 másodpercen belül újraindul}other{A Chromium OS # másodpercen belül újraindul}}</translation> <translation id="8619360774459241877">Chromium indítása…</translation> <translation id="8621669128220841554">A telepítés egy meg nem határozott hiba miatt nem sikerült. Kérjük, töltse le újra a Chromiumot.</translation> -<translation id="8628626585870903697">A Chromium nem tartalmazza a PDF Viewer alkalmazást, amely a Nyomtatási előnézet működéséhez szükséges.</translation> <translation id="8667808506758191620"><ph name="DEVICE_TYPE" /> eszköze naprakész.</translation> <translation id="8697124171261953979">Továbbá azt is szabályozza, hogy melyik oldal jelenik meg a Chromium indításakor vagy a cím- és keresősávban indított kereséskor.</translation> <translation id="8704119203788522458">Ez az Ön Chromiumja</translation>
diff --git a/chrome/app/resources/chromium_strings_id.xtb b/chrome/app/resources/chromium_strings_id.xtb index 8addae9..cb49acc 100644 --- a/chrome/app/resources/chromium_strings_id.xtb +++ b/chrome/app/resources/chromium_strings_id.xtb
@@ -246,7 +246,6 @@ <translation id="8599548569518771270">{0,plural, =0{Chromium OS akan dimulai ulang sekarang}=1{Chromium OS akan dimulai ulang dalam 1 detik}other{Chromium OS akan dimulai ulang dalam # detik}}</translation> <translation id="8619360774459241877">Meluncurkan Chromium...</translation> <translation id="8621669128220841554">Pemasangan gagal karena kesalahan yang tidak ditentukan. Download Chromium lagi.</translation> -<translation id="8628626585870903697">Chromium tidak menyertakan penampil PDF yang dibutuhkan agar Pratinjau Cetak berfungsi.</translation> <translation id="8667808506758191620"><ph name="DEVICE_TYPE" /> Anda sudah diperbarui.</translation> <translation id="8697124171261953979">Juga mengontrol halaman apa yang ditampilkan saat Anda memulai Chromium atau menelusuri dari Omnibox.</translation> <translation id="8704119203788522458">Ini Chromium Anda</translation>
diff --git a/chrome/app/resources/chromium_strings_it.xtb b/chrome/app/resources/chromium_strings_it.xtb index 86cbc36..f9cdb97 100644 --- a/chrome/app/resources/chromium_strings_it.xtb +++ b/chrome/app/resources/chromium_strings_it.xtb
@@ -246,7 +246,6 @@ <translation id="8599548569518771270">{0,plural, =0{Chromium OS verrà riavviato ora}=1{Chromium verrà riavviato tra un secondo}other{Chromium OS verrà riavviato tra # secondi}}</translation> <translation id="8619360774459241877">Avvio di Chromium...</translation> <translation id="8621669128220841554">Installazione non riuscita a causa di un errore imprecisato. Scarica di nuovo Chromium.</translation> -<translation id="8628626585870903697">Chromium non include il visualizzatore PDF necessario per la funzione Anteprima di stampa.</translation> <translation id="8667808506758191620">Il dispositivo <ph name="DEVICE_TYPE" /> è aggiornato.</translation> <translation id="8697124171261953979">Controlla anche la pagina visualizzata all'avvio di Chromium o quando esegui ricerche dalla Omnibox.</translation> <translation id="8704119203788522458">Questo è il tuo account Chromium</translation>
diff --git a/chrome/app/resources/chromium_strings_iw.xtb b/chrome/app/resources/chromium_strings_iw.xtb index 28467ba..a734d60d 100644 --- a/chrome/app/resources/chromium_strings_iw.xtb +++ b/chrome/app/resources/chromium_strings_iw.xtb
@@ -244,7 +244,6 @@ <translation id="8599548569518771270">{0,plural, =0{Chromium OS תופעל מחדש עכשיו}=1{Chromium OS תופעל מחדש בעוד שנייה אחת}two{Chromium OS תופעל מחדש בעוד שתי שניות}many{Chromium OS תופעל מחדש בעוד # שניות}other{Chromium OS תופעל מחדש בעוד # שניות}}</translation> <translation id="8619360774459241877">הפעלת Chromium מתבצעת...</translation> <translation id="8621669128220841554">ההתקנה נכשלה בשל שגיאה לא מזוהה. הורד שוב את Chromium.</translation> -<translation id="8628626585870903697">Chromium אינו כולל מציג PDF, הנדרש להפעלת תצוגה מקדימה של הדפסה.</translation> <translation id="8667808506758191620">ה-<ph name="DEVICE_TYPE" /> שלך מעודכן.</translation> <translation id="8697124171261953979">הגדרה זו גם קובעת איזה דף מוצג כשאתה מפעיל את Chromium או מבצע חיפוש מסרגל הכתובות.</translation> <translation id="8704119203788522458">זהו ה-Chromium שלך</translation>
diff --git a/chrome/app/resources/chromium_strings_ja.xtb b/chrome/app/resources/chromium_strings_ja.xtb index c885b96c..00d7a1f 100644 --- a/chrome/app/resources/chromium_strings_ja.xtb +++ b/chrome/app/resources/chromium_strings_ja.xtb
@@ -246,7 +246,6 @@ <translation id="8599548569518771270">{0,plural, =0{Chromium OS は今すぐ再起動されます}=1{Chromium OS は 1 秒後に再起動されます}other{Chromium OS は # 秒後に再起動されます}}</translation> <translation id="8619360774459241877">Chromium を起動しています...</translation> <translation id="8621669128220841554">原因不明のエラーによりインストールに失敗しました。Chromium をもう一度ダウンロードしてください。</translation> -<translation id="8628626585870903697">印刷プレビューの表示に必要な PDF ビューアが Chromium にインストールされていません。</translation> <translation id="8667808506758191620">お使いの <ph name="DEVICE_TYPE" /> は最新です。</translation> <translation id="8697124171261953979">この拡張機能では、Chromium の起動時、またはアドレスバーからの検索時に表示されるページも制御されます。</translation> <translation id="8704119203788522458">自分好みに設定</translation>
diff --git a/chrome/app/resources/chromium_strings_kn.xtb b/chrome/app/resources/chromium_strings_kn.xtb index a7a1aff..2b74b40 100644 --- a/chrome/app/resources/chromium_strings_kn.xtb +++ b/chrome/app/resources/chromium_strings_kn.xtb
@@ -240,7 +240,6 @@ <translation id="8599548569518771270">{0,plural, =0{ಇದೀಗ Chromium OS ಮರುಪ್ರಾರಂಭಗೊಳ್ಳುತ್ತದೆ}=1{1 ಸೆಕೆಂಡ್ನಲ್ಲಿ Chromium OS ಮರುಪ್ರಾರಂಭಗೊಳ್ಳುತ್ತದೆ}one{# ಸೆಕೆಂಡುಗಳಲ್ಲಿ Chromium OS ಮರುಪ್ರಾರಂಭಗೊಳ್ಳುತ್ತದೆ}other{# ಸೆಕೆಂಡುಗಳಲ್ಲಿ Chromium OS ಮರುಪ್ರಾರಂಭಗೊಳ್ಳುತ್ತದೆ}}</translation> <translation id="8619360774459241877">Chromium ಅನ್ನು ಪ್ರಾರಂಭಿಸಲಾಗುತ್ತಿದೆ...</translation> <translation id="8621669128220841554">ಅನಿರ್ದಿಷ್ಟ ದೋಷದಿಂದಾಗಿ ಸ್ಥಾಪನೆ ವಿಫಲವಾಗಿದೆ. ದಯವಿಟ್ಟು ಮತ್ತೊಮ್ಮೆ Chromium ಅನ್ನು ಡೌನ್ಲೋಡ್ ಮಾಡಿ.</translation> -<translation id="8628626585870903697">ಕಾರ್ಯಾಚರಣೆ ನಡೆಸಲು ಮುದ್ರಣ ಪೂರ್ವವೀಕ್ಷಣೆಗೆ ಅಗತ್ಯವಿರುವಂತಹ PDF ವೀಕ್ಷಕರನ್ನು Chromium ಒಳಗೊಂಡಿಲ್ಲ.</translation> <translation id="8667808506758191620">ನಿಮ್ಮ <ph name="DEVICE_TYPE" /> ನವೀಕೃತವಾಗಿದೆ.</translation> <translation id="8697124171261953979">ನೀವು Chromium ಪ್ರಾರಂಭಿಸಿದಾಗ ಅಥವಾ ಓಮ್ನಿಬಾಕ್ಸ್ನಿಂದ ಹುಡುಕಿದಾಗ ತೋರಿಸಬೇಕಾದ ಪುಟವನ್ನು ಕೂಡಾ ಇದು ನಿಯಂತ್ರಿಸುತ್ತದೆ.</translation> <translation id="8704119203788522458">ಇದು ನಿಮ್ಮ Chromium</translation>
diff --git a/chrome/app/resources/chromium_strings_ko.xtb b/chrome/app/resources/chromium_strings_ko.xtb index 819aa22d..27e38b6 100644 --- a/chrome/app/resources/chromium_strings_ko.xtb +++ b/chrome/app/resources/chromium_strings_ko.xtb
@@ -248,7 +248,6 @@ <translation id="8599548569518771270">{0,plural, =0{곧 Chromium OS 다시 시작}=1{1초 후에 Chromium OS 다시 시작}other{#초 후에 Chromium OS 다시 시작}}</translation> <translation id="8619360774459241877">Chromium 실행 중...</translation> <translation id="8621669128220841554">알 수 없는 오류로 인해 설치에 실패했습니다. Chromium을 다시 다운로드하세요.</translation> -<translation id="8628626585870903697">Chromium은 인쇄 미리보기에 필요한 PDF 뷰어가 포함되어 있지 않습니다.</translation> <translation id="8667808506758191620"><ph name="DEVICE_TYPE" />이(가) 최신 버전입니다.</translation> <translation id="8697124171261953979">또한 Chromium을 시작하거나 검색주소창에서 검색할 때 표시되는 페이지를 설정합니다.</translation> <translation id="8704119203788522458">나만의 Chromium</translation>
diff --git a/chrome/app/resources/chromium_strings_lt.xtb b/chrome/app/resources/chromium_strings_lt.xtb index d323b3d..69d33656 100644 --- a/chrome/app/resources/chromium_strings_lt.xtb +++ b/chrome/app/resources/chromium_strings_lt.xtb
@@ -248,7 +248,6 @@ <translation id="8599548569518771270">{0,plural, =0{„Chromium“ OS bus paleista iš naujo dabar}=1{„Chromium“ OS bus paleista iš naujo po 1 sekundės}one{„Chromium“ OS bus paleista iš naujo po # sekundės}few{„Chromium“ OS bus paleista iš naujo po # sekundžių}many{„Chromium“ OS bus paleista iš naujo po # sekundės}other{„Chromium“ OS bus paleista iš naujo po # sekundžių}}</translation> <translation id="8619360774459241877">Pristatoma „Chromium“...</translation> <translation id="8621669128220841554">Nepavyko įdiegti dėl nenurodytos klaidos. Atsisiųskite „Chromium“ dar kartą.</translation> -<translation id="8628626585870903697">„Chromium“ neįtraukta PDF žiūryklė, reikalinga, kad veiktų „Spaudinio peržiūra“.</translation> <translation id="8667808506758191620">Jūsų „<ph name="DEVICE_TYPE" />“ atnaujintas.</translation> <translation id="8697124171261953979">Ji taip pat kontroliuoja, koks puslapis rodomas, kai paleidžiate „Chromium“ arba ieškote „Omnibox“.</translation> <translation id="8704119203788522458">Tai jūsų „Chromium“</translation>
diff --git a/chrome/app/resources/chromium_strings_lv.xtb b/chrome/app/resources/chromium_strings_lv.xtb index ab7c103..08d90e36 100644 --- a/chrome/app/resources/chromium_strings_lv.xtb +++ b/chrome/app/resources/chromium_strings_lv.xtb
@@ -244,7 +244,6 @@ <translation id="8599548569518771270">{0,plural, =0{Operētājsistēma Chromium OS tiks restartēta tūlīt}=1{Operētājsistēma Chromium OS tiks restartēta pēc 1 sekundes}zero{Operētājsistēma Chromium OS tiks restartēta pēc # sekundēm}one{Operētājsistēma Chromium OS tiks restartēta pēc # sekundes}other{Operētājsistēma Chromium OS tiks restartēta pēc # sekundēm}}</translation> <translation id="8619360774459241877">Notiek Chromium palaišana...</translation> <translation id="8621669128220841554">Instalēšana neizdevās nenoteiktas kļūdas dēļ. Lejupielādējiet pārlūku Chromium vēlreiz.</translation> -<translation id="8628626585870903697">Pārlūka Chromium komplektācijā nav PDF skatītāja, kas nepieciešams funkcijas Drukas priekšskatījums darbībai.</translation> <translation id="8667808506758191620"><ph name="DEVICE_TYPE" /> ierīce ir atjaunināta.</translation> <translation id="8697124171261953979">Tas nosaka arī to, kāda lapa tiks rādīta, kad atvērsiet pārlūku Chromium vai meklēsiet, izmantojot universālo lodziņu.</translation> <translation id="8704119203788522458">Šis ir jūsu Chromium</translation>
diff --git a/chrome/app/resources/chromium_strings_ml.xtb b/chrome/app/resources/chromium_strings_ml.xtb index aeecb9b..11db3cf 100644 --- a/chrome/app/resources/chromium_strings_ml.xtb +++ b/chrome/app/resources/chromium_strings_ml.xtb
@@ -248,7 +248,6 @@ <translation id="8599548569518771270">{0,plural, =0{Chromium OS ഇപ്പോൾ പുനഃരാരംഭിക്കും}=1{Chromium OS ഒരു സെക്കൻഡിൽ പുനഃരാരംഭിക്കും}other{Chromium OS # സെക്കൻഡിൽ പുനഃരാരംഭിക്കും}}</translation> <translation id="8619360774459241877">Chromium സമാരംഭിക്കുന്നു...</translation> <translation id="8621669128220841554">അവ്യക്തമായ പിശകിനാൽ ഇൻസ്റ്റാളുചെയ്യൽ പരാജയപ്പെട്ടു. Chromium വീണ്ടും ഡൗൺലോഡുചെയ്യുക.</translation> -<translation id="8628626585870903697">Chromium-ത്തിൽ പ്രിന്റ് പ്രിവ്യൂവിന് പ്രവർത്തിക്കുന്നതിന് ആവശ്യമായ PDF വ്യൂവർ ഉൾപ്പെടുന്നില്ല.</translation> <translation id="8667808506758191620">നിങ്ങളുടെ <ph name="DEVICE_TYPE" /> അപ് ടു ഡേറ്റാണ്.</translation> <translation id="8697124171261953979">നിങ്ങൾ Chromium ആരംഭിയ്ക്കുമ്പോഴോ ഓമ്നിബോക്സിൽ നിന്ന് തിരയുമ്പോഴോ ദൃശ്യമാകുന്ന പേജും അത് നിയന്ത്രിയ്ക്കുന്നു.</translation> <translation id="8704119203788522458">ഇത് നിങ്ങളുടെ Chromium ആണ്</translation>
diff --git a/chrome/app/resources/chromium_strings_mr.xtb b/chrome/app/resources/chromium_strings_mr.xtb index e9d5308..9fbbe01d 100644 --- a/chrome/app/resources/chromium_strings_mr.xtb +++ b/chrome/app/resources/chromium_strings_mr.xtb
@@ -246,7 +246,6 @@ <translation id="8599548569518771270">{0,plural, =0{Chromium OS आता रीस्टार्ट होईल}=1{Chromium OS एका सेकंदात रीस्टार्ट होईल}one{Chromium OS # सेकंदात रीस्टार्ट होईल}other{Chromium OS # सेकंदामध्ये रीस्टार्ट होईल}}</translation> <translation id="8619360774459241877">Chromium लाँच करत आहे...</translation> <translation id="8621669128220841554">अनिर्दिष्ट त्रुटीमुळे स्थापना अयशस्वी झाली. कृपया Chromium पुन्हा डाउनलोड करा.</translation> -<translation id="8628626585870903697">Chromium कार्य करण्यासाठी प्रिंट पूर्वावलोकनास आवश्यक असलेले PDF viewer समाविष्ट करीत नाही.</translation> <translation id="8667808506758191620">आपले <ph name="DEVICE_TYPE" /> अद्ययावत आहे.</translation> <translation id="8697124171261953979">आपण Chromium सुरू करता किंवा ओम्निबॉक्समधून शोध घेता तेव्हा कोणते पृष्ठ दर्शविले जाते हे देखील हे नियंत्रित करते.</translation> <translation id="8704119203788522458">हे आपले Chromium आहे</translation>
diff --git a/chrome/app/resources/chromium_strings_ms.xtb b/chrome/app/resources/chromium_strings_ms.xtb index f7603bf..aa4f67e 100644 --- a/chrome/app/resources/chromium_strings_ms.xtb +++ b/chrome/app/resources/chromium_strings_ms.xtb
@@ -246,7 +246,6 @@ <translation id="8599548569518771270">{0,plural, =0{OS Chromium akan dimulakan semula sekarang}=1{OS Chromium akan dimulakan semula dalam masa sesaat}other{OS Chromium akan dimulakan semula dalam masa # saat}}</translation> <translation id="8619360774459241877">Melancarkan Chromium...</translation> <translation id="8621669128220841554">Pemasangan gagal disebabkan ralat yang tidak dinyatakan. Sila muat turun semula Chromium.</translation> -<translation id="8628626585870903697">Chromium tidak menyertakan pemapar PDF yang diperlukan oleh Pratonton Cetakan untuk berfungsi.</translation> <translation id="8667808506758191620"><ph name="DEVICE_TYPE" /> anda sudah dikemas kini.</translation> <translation id="8697124171261953979">Sambungan turut mengawal halaman yang ditunjukkan apabila anda memulakan Chromium atau membuat carian dari Kotak Omni.</translation> <translation id="8704119203788522458">Ini Chromium anda</translation>
diff --git a/chrome/app/resources/chromium_strings_nl.xtb b/chrome/app/resources/chromium_strings_nl.xtb index 1cb2f48..a5a49e6 100644 --- a/chrome/app/resources/chromium_strings_nl.xtb +++ b/chrome/app/resources/chromium_strings_nl.xtb
@@ -248,7 +248,6 @@ <translation id="8599548569518771270">{0,plural, =0{Chromium OS wordt nu opnieuw opgestart}=1{Chromium OS wordt over één seconde opnieuw opgestart}other{Chromium OS wordt over # seconden opnieuw opgestart}}</translation> <translation id="8619360774459241877">Chromium starten…</translation> <translation id="8621669128220841554">De installatie is mislukt wegens een onbekende fout. Download Chromium opnieuw.</translation> -<translation id="8628626585870903697">Chromium bevat niet de pdf-viewer die nodig is om de functie 'Afdrukvoorbeeld' te laten werken.</translation> <translation id="8667808506758191620">Je <ph name="DEVICE_TYPE" /> is up-to-date.</translation> <translation id="8697124171261953979">Hiermee wordt ook gecontroleerd welke pagina wordt weergegeven wanneer je Chromium start of vanuit de omnibox zoekt.</translation> <translation id="8704119203788522458">Personaliseer jouw Chromium</translation>
diff --git a/chrome/app/resources/chromium_strings_no.xtb b/chrome/app/resources/chromium_strings_no.xtb index 19b41363..2d1db5d 100644 --- a/chrome/app/resources/chromium_strings_no.xtb +++ b/chrome/app/resources/chromium_strings_no.xtb
@@ -246,7 +246,6 @@ <translation id="8599548569518771270">{0,plural, =0{Chromium OS startes på nytt nå}=1{Chromium OS startes på nytt om 1 sekund}other{Chromium OS startes på nytt om # sekunder}}</translation> <translation id="8619360774459241877">Starter Chromium ...</translation> <translation id="8621669128220841554">Installeringen mislyktes på grunn av en uspesifisert feil. Last ned Chromium på nytt.</translation> -<translation id="8628626585870903697">Chromium omfatter ikke PDF-visningsprogrammet som er nødvendig for at «Forhåndsvisning av utskrift» skal fungere.</translation> <translation id="8667808506758191620"><ph name="DEVICE_TYPE" />-enheten er oppdatert.</translation> <translation id="8697124171261953979">Den styrer også hvilken side som vises når du starter Chromium eller søker fra multifunksjonsfeltet.</translation> <translation id="8704119203788522458">Dette er din Chromium</translation>
diff --git a/chrome/app/resources/chromium_strings_pl.xtb b/chrome/app/resources/chromium_strings_pl.xtb index d1747d9..d7a5be8 100644 --- a/chrome/app/resources/chromium_strings_pl.xtb +++ b/chrome/app/resources/chromium_strings_pl.xtb
@@ -244,7 +244,6 @@ <translation id="8599548569518771270">{0,plural, =0{Chromium OS uruchomi się ponownie teraz}=1{Chromium OS uruchomi się ponownie za 1 sekundę}few{Chromium OS uruchomi się ponownie za # sekundy}many{Chromium OS uruchomi się ponownie za # sekund}other{Chromium OS uruchomi się ponownie za # sekundy}}</translation> <translation id="8619360774459241877">Uruchamiam Chromium…</translation> <translation id="8621669128220841554">Instalacja nie powiodła się z powodu nieokreślonego błędu. Pobierz Chromium ponownie.</translation> -<translation id="8628626585870903697">Chromium nie zawiera przeglądarki PDF wymaganej przez podgląd wydruku.</translation> <translation id="8667808506758191620"><ph name="DEVICE_TYPE" /> używa aktualnej wersji oprogramowania.</translation> <translation id="8697124171261953979">Kontroluje także to, jaka strona wyświetla się po uruchomieniu Chromium lub wyszukiwaniu w omniboksie.</translation> <translation id="8704119203788522458">Oto Twoja przeglądarka Chromium</translation>
diff --git a/chrome/app/resources/chromium_strings_pt-BR.xtb b/chrome/app/resources/chromium_strings_pt-BR.xtb index 09968078..f2e14b5 100644 --- a/chrome/app/resources/chromium_strings_pt-BR.xtb +++ b/chrome/app/resources/chromium_strings_pt-BR.xtb
@@ -241,7 +241,6 @@ <translation id="8599548569518771270">{0,plural, =0{O Chromium OS será reiniciado agora}=1{O Chromium OS será reiniciado em 1 segundo}one{O Chromium OS será reiniciado em # segundo}other{O Chromium OS será reiniciado em # segundos}}</translation> <translation id="8619360774459241877">Iniciando o Chromium…</translation> <translation id="8621669128220841554">Falha na instalação devido a um erro não especificado. Faça o download do Chromium novamente.</translation> -<translation id="8628626585870903697">O Chromium não inclui o visualizador de PDF que é necessário para que a visualização de impressão funcione.</translation> <translation id="8667808506758191620">Seu dispositivo <ph name="DEVICE_TYPE" /> está atualizado.</translation> <translation id="8697124171261953979">Controla também qual página deve ser exibida quando você inicia o Chromium ou faz uma pesquisa na Omnibox.</translation> <translation id="8704119203788522458">Este é seu Chromium</translation>
diff --git a/chrome/app/resources/chromium_strings_pt-PT.xtb b/chrome/app/resources/chromium_strings_pt-PT.xtb index bbe4319..88ce67b 100644 --- a/chrome/app/resources/chromium_strings_pt-PT.xtb +++ b/chrome/app/resources/chromium_strings_pt-PT.xtb
@@ -246,7 +246,6 @@ <translation id="8599548569518771270">{0,plural, =0{O Chromium OS será reiniciado agora}=1{O Chromium OS será reiniciado dentro de 1 segundo}other{O Chromium OS será reiniciado dentro de # segundos}}</translation> <translation id="8619360774459241877">A iniciar o Chromium…</translation> <translation id="8621669128220841554">A instalação falhou devido a um erro não especificado. Transfira novamente o Chromium .</translation> -<translation id="8628626585870903697">O Chromium não inclui o visualizador de PDF que é necessário para que a Pré-visualização da Impressão funcione.</translation> <translation id="8667808506758191620">O seu <ph name="DEVICE_TYPE" /> está atualizado.</translation> <translation id="8697124171261953979">Também controla a página apresentada quando inicia o Chromium ou pesquisa a partir da Caixa geral.</translation> <translation id="8704119203788522458">Este é o seu Chromium</translation>
diff --git a/chrome/app/resources/chromium_strings_ro.xtb b/chrome/app/resources/chromium_strings_ro.xtb index c1a8db13..8cf6755 100644 --- a/chrome/app/resources/chromium_strings_ro.xtb +++ b/chrome/app/resources/chromium_strings_ro.xtb
@@ -246,7 +246,6 @@ <translation id="8599548569518771270">{0,plural, =0{Sistemul de operare Chromium va reporni acum}=1{Sistemul de operare Chromium va reporni într-o secundă}few{Sistemul de operare Chromium va reporni în # secunde}other{Sistemul de operare Chromium va reporni în # de secunde}}</translation> <translation id="8619360774459241877">Se lansează Chromium...</translation> <translation id="8621669128220841554">Instalarea nu a reușit din cauza unei erori neprecizate. Descărcați Chromium din nou.</translation> -<translation id="8628626585870903697">Chromium nu include vizualizatorul PDF care este necesar pentru funcționarea Previzualizării înainte de printare.</translation> <translation id="8667808506758191620">Dispozitivul <ph name="DEVICE_TYPE" /> este actualizat.</translation> <translation id="8697124171261953979">Stabilește și ce pagină se afișează când porniți Chromium sau când căutați din caseta polivalentă.</translation> <translation id="8704119203788522458">Acesta este browserul dvs. Chromium</translation>
diff --git a/chrome/app/resources/chromium_strings_ru.xtb b/chrome/app/resources/chromium_strings_ru.xtb index 305fba00..e7c922d 100644 --- a/chrome/app/resources/chromium_strings_ru.xtb +++ b/chrome/app/resources/chromium_strings_ru.xtb
@@ -242,7 +242,6 @@ <translation id="8599548569518771270">{0,plural, =0{Chromium OS перезапускается}=1{Chromium OS перезапустится через 1 секунду}one{Chromium OS перезапустится через # секунду}few{Chromium OS перезапустится через # секунды}many{Chromium OS перезапустится через # секунд}other{Chromium OS перезапустится через # секунды}}</translation> <translation id="8619360774459241877">Запуск Chromium...</translation> <translation id="8621669128220841554">В процессе установки произошла неизвестная ошибка. Скачайте Chromium ещё раз.</translation> -<translation id="8628626585870903697">В Chromium нет функции просмотра PDF-файлов, которая нужна для предварительного просмотра при печати.</translation> <translation id="8667808506758191620">На устройстве <ph name="DEVICE_TYPE" /> используется последняя версия Chromium OS.</translation> <translation id="8697124171261953979">Кроме того, расширение изменило стартовую страницу Chromium и поисковую систему, используемую по умолчанию при вводе запроса в омнибокс.</translation> <translation id="8704119203788522458">Ваш персональный Chromium</translation>
diff --git a/chrome/app/resources/chromium_strings_sk.xtb b/chrome/app/resources/chromium_strings_sk.xtb index 4b2ae76..036391d 100644 --- a/chrome/app/resources/chromium_strings_sk.xtb +++ b/chrome/app/resources/chromium_strings_sk.xtb
@@ -248,7 +248,6 @@ <translation id="8599548569518771270">{0,plural, =0{Chromium OS sa teraz reštartuje}=1{Chromium OS sa reštartuje o 1 sekundu}few{Chromium OS sa reštartujte o # sekundy}many{Chromium OS sa reštartujte o # sekundy}other{Chromium OS sa reštartujte o # sekúnd}}</translation> <translation id="8619360774459241877">Spúšťa sa Chromium…</translation> <translation id="8621669128220841554">Inštalácia zlyhala kvôli neznámej chybe. Skúste prehliadač Chromium stiahnuť znova.</translation> -<translation id="8628626585870903697">Prehliadač Chromium neobsahuje nástroj na zobrazovanie súborov PDF, ktorý je potrebný pre funkciu Ukážka pred tlačou.</translation> <translation id="8667808506758191620">Vaše zariadenie <ph name="DEVICE_TYPE" /> je aktuálne.</translation> <translation id="8697124171261953979">Tiež určuje, ktorá stránka sa zobrazí pri spustení prehliadača Chromium alebo pri vyhľadávaní pomocou všeobecného poľa.</translation> <translation id="8704119203788522458">Toto je váš prehliadač Chromium</translation>
diff --git a/chrome/app/resources/chromium_strings_sl.xtb b/chrome/app/resources/chromium_strings_sl.xtb index 3ca9ebb5..bf606df 100644 --- a/chrome/app/resources/chromium_strings_sl.xtb +++ b/chrome/app/resources/chromium_strings_sl.xtb
@@ -249,7 +249,6 @@ <translation id="8599548569518771270">{0,plural, =0{OS Chromium se bo zdaj znova zagnal}=1{OS Chromium se bo znova zagnal čez 1 sekundo}one{OS Chromium se bo znova zagnal čez # sekundo}two{OS Chromium se bo znova zagnal čez # sekundi}few{OS Chromium se bo znova zagnal čez # sekunde}other{OS Chromium se bo znova zagnal čez # sekund}}</translation> <translation id="8619360774459241877">Zagon Chromiuma …</translation> <translation id="8621669128220841554">Namestitev ni uspela zaradi nenavedene napake. Znova prenesite Chromium.</translation> -<translation id="8628626585870903697">Chromium nima pregledovalnika datotek PDF, ki je potreben za predogled tiskanja.</translation> <translation id="8667808506758191620">Naprava <ph name="DEVICE_TYPE" /> je posodobljena.</translation> <translation id="8697124171261953979">Določa tudi, katera stran je prikazana, ko zaženete Chromium ali iščete v naslovni vrstici.</translation> <translation id="8704119203788522458">To je vaš Chromium</translation>
diff --git a/chrome/app/resources/chromium_strings_sr.xtb b/chrome/app/resources/chromium_strings_sr.xtb index 37932ed3..8bceaad 100644 --- a/chrome/app/resources/chromium_strings_sr.xtb +++ b/chrome/app/resources/chromium_strings_sr.xtb
@@ -248,7 +248,6 @@ <translation id="8599548569518771270">{0,plural, =0{Chromium ОС ће се рестартовати}=1{Chromium ОС ће се рестартовати за 1 секунду}one{Chromium ОС ће се рестартовати за # секунду}few{Chromium ОС ће се рестартовати за # секунде}other{Chromium ОС ће се рестартовати за # секунди}}</translation> <translation id="8619360774459241877">Покреће се Chromium...</translation> <translation id="8621669128220841554">Инсталација није успела због неодређене грешке. Преузмите Chromium поново.</translation> -<translation id="8628626585870903697">Chromium не садржи PDF приказивач који је потребан да би Приказ пре штампања функционисао.</translation> <translation id="8667808506758191620"><ph name="DEVICE_TYPE" /> је ажуриран.</translation> <translation id="8697124171261953979">Контролише и страницу која се приказује када покренете Chromium или претражујете из омнибокса.</translation> <translation id="8704119203788522458">Ово је ваш Chromium</translation>
diff --git a/chrome/app/resources/chromium_strings_sv.xtb b/chrome/app/resources/chromium_strings_sv.xtb index 0daae73..50e7e46 100644 --- a/chrome/app/resources/chromium_strings_sv.xtb +++ b/chrome/app/resources/chromium_strings_sv.xtb
@@ -248,7 +248,6 @@ <translation id="8599548569518771270">{0,plural, =0{Chromium OS startas om nu}=1{Om en sekund startas Chromium OS om}other{Om # sekunder startas Chromium OS om}}</translation> <translation id="8619360774459241877">Chromium startas …</translation> <translation id="8621669128220841554">Installationen misslyckades på grund av ett okänt fel. Ladda ned Chromium igen.</translation> -<translation id="8628626585870903697">Chromium har inte det PDF-visningsprogram som krävs för att förhandsgranskning ska fungera.</translation> <translation id="8667808506758191620"><ph name="DEVICE_TYPE" /> är uppdaterad.</translation> <translation id="8697124171261953979">Det styr också vilken sida som visas när du startar Chromium eller söker i adressfältet.</translation> <translation id="8704119203788522458">Det här är Chromium</translation>
diff --git a/chrome/app/resources/chromium_strings_sw.xtb b/chrome/app/resources/chromium_strings_sw.xtb index 150d370..90e9e06 100644 --- a/chrome/app/resources/chromium_strings_sw.xtb +++ b/chrome/app/resources/chromium_strings_sw.xtb
@@ -247,7 +247,6 @@ <translation id="8599548569518771270">{0,plural, =0{Mfumo wa uendeshaji wa Chromium utazimwa kisha uwashwe sasa}=1{Mfumo wa uendeshaji wa Chromium utazimwa kisha uwashwe baada ya sekunde 1}other{Mfumo wa uendeshaji wa Chromium utazimwa kisha uwashwe baada ya sekunde #}}</translation> <translation id="8619360774459241877">Inaanzisha Chromium...</translation> <translation id="8621669128220841554">Usakinishaji ulishindwa kwa sababu ya hitilafu isiyobainika. Tafadhali pakua Chromium tena.</translation> -<translation id="8628626585870903697">Chromium haijumuishi kitazamaji cha PDF kinachohitajika ili Uhakiki wa Uchapishaji ufanye kazi.</translation> <translation id="8667808506758191620">Kifaa chako cha <ph name="DEVICE_TYPE" /> kimesasishwa.</translation> <translation id="8697124171261953979">Pia inadhibiti ukurasa unaoonyeshwa unapoanzisha Chromium au unapotafuta kutoka Sanduku Kuu.</translation> <translation id="8704119203788522458">Hii ni Chromium yako</translation>
diff --git a/chrome/app/resources/chromium_strings_ta.xtb b/chrome/app/resources/chromium_strings_ta.xtb index 83f2ada..b270a230 100644 --- a/chrome/app/resources/chromium_strings_ta.xtb +++ b/chrome/app/resources/chromium_strings_ta.xtb
@@ -246,7 +246,6 @@ <translation id="8599548569518771270">{0,plural, =0{இப்போது Chromium OS மீண்டும் தொடங்கும்}=1{1 வினாடியில் Chromium OS மீண்டும் தொடங்கும்}other{# வினாடிகளில் Chromium OS மீண்டும் தொடங்கும்}}</translation> <translation id="8619360774459241877">Chromiumமைத் தொடங்குகிறது...</translation> <translation id="8621669128220841554">குறிப்பிடப்படாத பிழை காரணமாக நிறுவல் தோல்வியடைந்தது. Chromium ஐ மீண்டும் பதிவிறக்கம் செய்க.</translation> -<translation id="8628626585870903697">அச்சிடல் முன்னோட்டத்தைச் செயல்படுத்த தேவைப்படும் PDF வியூவர், Chromium இல் சேர்க்கப்படவில்லை.</translation> <translation id="8667808506758191620">உங்கள் <ph name="DEVICE_TYPE" /> புதுப்பித்த நிலையில் உள்ளது.</translation> <translation id="8697124171261953979">Chromium ஐத் தொடங்கும்போது அல்லது சர்வபுலத்திலிருந்து தேடலை மேற்கொள்ளும்போது காண்பிக்கப்படும் பக்கத்தையும் இது கட்டுப்படுத்துகிறது.</translation> <translation id="8704119203788522458">இது உங்கள் Chromium ஆகும்</translation>
diff --git a/chrome/app/resources/chromium_strings_te.xtb b/chrome/app/resources/chromium_strings_te.xtb index cb77db6..00fb99e 100644 --- a/chrome/app/resources/chromium_strings_te.xtb +++ b/chrome/app/resources/chromium_strings_te.xtb
@@ -242,7 +242,6 @@ <translation id="8599548569518771270">{0,plural, =0{Chromium OS ఇప్పుడు మళ్లీ ప్రారంభించబడుతుంది}=1{Chromium OS 1 సెకనులో మళ్లీ ప్రారంభమవుతుంది}other{Chromium OS # సెకన్లలో మళ్లీ ప్రారంభమవుతుంది}}</translation> <translation id="8619360774459241877">Chromiumని ప్రారంభిస్తోంది...</translation> <translation id="8621669128220841554">పేర్కొనబడలేని లోపం కారణంగా ఇన్స్టాలేషన్ విఫలమైంది. దయచేసి Chromiumని మళ్లీ డౌన్లోడ్ చేయండి.</translation> -<translation id="8628626585870903697">ముద్రణా పరిదృశ్యం పని చేయడానికి అవసరమైన PDF వ్యూయర్ని Chromium చేర్చలేదు.</translation> <translation id="8667808506758191620">మీ <ph name="DEVICE_TYPE" /> ఆధునికంగా ఉంది.</translation> <translation id="8697124171261953979">ఇది మీరు Chromiumని ప్రారంభించేటప్పుడు లేదా ఓమ్నిపెట్టె నుండి శోధించేటప్పుడు చూపబడే పేజీని కూడా నియంత్రిస్తుంది.</translation> <translation id="8704119203788522458">ఇది మీ Chromium</translation>
diff --git a/chrome/app/resources/chromium_strings_th.xtb b/chrome/app/resources/chromium_strings_th.xtb index 8fce934..9adb2f35 100644 --- a/chrome/app/resources/chromium_strings_th.xtb +++ b/chrome/app/resources/chromium_strings_th.xtb
@@ -246,7 +246,6 @@ <translation id="8599548569518771270">{0,plural, =0{Chromium OS จะรีสตาร์ทตอนนี้}=1{Chromium OS จะรีสตาร์ทใน 1 วินาที}other{Chromium OS จะรีสตาร์ทใน # วินาที}}</translation> <translation id="8619360774459241877">กำลังเปิด Chromium...</translation> <translation id="8621669128220841554">การติดตั้งล้มเหลวเนื่องจากเกิดข้อผิดพลาดที่ไม่ระบุ โปรดดาวน์โหลด Chromium อีกครั้ง</translation> -<translation id="8628626585870903697">Chromium ไม่มีโปรแกรมดู PDF ที่ต้องใช้ในการทำงานของหน้าตัวอย่างก่อนพิมพ์</translation> <translation id="8667808506758191620"><ph name="DEVICE_TYPE" /> ของคุณเป็นเวอร์ชันล่าสุดแล้ว</translation> <translation id="8697124171261953979">อีกทั้งยังควบคุมหน้าที่จะแสดงเมื่อคุณเปิด Chromium หรือทำการค้นหาจากแถบอเนกประสงค์ด้วย</translation> <translation id="8704119203788522458">นี่คือ Chromium ของคุณ</translation>
diff --git a/chrome/app/resources/chromium_strings_tr.xtb b/chrome/app/resources/chromium_strings_tr.xtb index 07bd47e..d74bc501 100644 --- a/chrome/app/resources/chromium_strings_tr.xtb +++ b/chrome/app/resources/chromium_strings_tr.xtb
@@ -244,7 +244,6 @@ <translation id="8599548569518771270">{0,plural, =0{Chromium OS şimdi yeniden başlatılacak}=1{Chromium OS 1 saniye içinde yeniden başlatılacak}other{Chromium OS # saniye içinde yeniden başlatılacak}}</translation> <translation id="8619360774459241877">Chromium başlatılıyor...</translation> <translation id="8621669128220841554">Yükleme belirtilmeyen bir hata nedeniyle başarısız oldu. Lütfen Chromium'u tekrar indirin.</translation> -<translation id="8628626585870903697">Chromium, Baskı Önizleme için gerekli olan PDF görüntüleyiciyi içermez.</translation> <translation id="8667808506758191620"><ph name="DEVICE_TYPE" /> cihazınız güncel.</translation> <translation id="8697124171261953979">Ayrıca Chromium'u başlattığınızda veya Çok Amaçlı Adres Çubuğu'ndan arama yaptığınızda gösterilecek sayfayı da denetler.</translation> <translation id="8704119203788522458">Bu sizin Chromium'unuz</translation>
diff --git a/chrome/app/resources/chromium_strings_uk.xtb b/chrome/app/resources/chromium_strings_uk.xtb index 91a1543e..fd0fb2e 100644 --- a/chrome/app/resources/chromium_strings_uk.xtb +++ b/chrome/app/resources/chromium_strings_uk.xtb
@@ -246,7 +246,6 @@ <translation id="8599548569518771270">{0,plural, =0{ОС Chromium перезапуститься зараз}=1{ОС Chromium перезапуститься через 1 секунду}one{ОС Chromium перезапуститься через # секунду}few{ОС Chromium перезапуститься через # секунди}many{ОС Chromium перезапуститься через # секунд}other{ОС Chromium перезапуститься через # секунди}}</translation> <translation id="8619360774459241877">Запускається Chromium…</translation> <translation id="8621669128220841554">Не вдалося встановити через невизначену помилку. Завантажте Chromium ще раз.</translation> -<translation id="8628626585870903697">У Chromium немає засобу перегляду файлів PDF, який потрібен для перегляду версії для друку.</translation> <translation id="8667808506758191620">Ваш пристрій <ph name="DEVICE_TYPE" /> оновлено.</translation> <translation id="8697124171261953979">Розширення також змінило сторінку, яка відкривається під час запуску Chromium або пошуку в універсальному вікні пошуку.</translation> <translation id="8704119203788522458">Це ваш Chromium</translation>
diff --git a/chrome/app/resources/chromium_strings_vi.xtb b/chrome/app/resources/chromium_strings_vi.xtb index 25168e267..36832d7 100644 --- a/chrome/app/resources/chromium_strings_vi.xtb +++ b/chrome/app/resources/chromium_strings_vi.xtb
@@ -246,7 +246,6 @@ <translation id="8599548569518771270">{0,plural, =0{Chromium OS sẽ khởi động lại ngay bây giờ}=1{Chromium OS sẽ khởi động lại sau 1 giây}other{Chromium OS sẽ khởi động lại sau # giây}}</translation> <translation id="8619360774459241877">Đang khởi động Chromium...</translation> <translation id="8621669128220841554">Không thể cài đặt do xảy ra lỗi không xác định. Hãy tải xuống Chromium lại lần nữa.</translation> -<translation id="8628626585870903697">Chromium không bao gồm trình xem PDF được yêu cầu để tính năng xem trước bản in hoạt động.</translation> <translation id="8667808506758191620"><ph name="DEVICE_TYPE" /> của bạn đã cập nhật.</translation> <translation id="8697124171261953979">Tiện ích này cũng điều khiển trang nào được hiển thị khi bạn khởi động Chromium hoặc tìm kiếm từ Thanh địa chỉ.</translation> <translation id="8704119203788522458">Đây là Chromium của bạn</translation>
diff --git a/chrome/app/resources/chromium_strings_zh-CN.xtb b/chrome/app/resources/chromium_strings_zh-CN.xtb index 3e0b996..19f28f28 100644 --- a/chrome/app/resources/chromium_strings_zh-CN.xtb +++ b/chrome/app/resources/chromium_strings_zh-CN.xtb
@@ -246,7 +246,6 @@ <translation id="8599548569518771270">{0,plural, =0{Chromium 操作系统将会立即重启}=1{Chromium 操作系统将会在 1 秒后重启}other{Chromium 操作系统将会在 # 秒后重启}}</translation> <translation id="8619360774459241877">正在启动 Chromium…</translation> <translation id="8621669128220841554">未指定的错误导致安装失败。请重新下载 Chromium。</translation> -<translation id="8628626585870903697">Chromium 未包含运行打印预览所需的 PDF 查看器。</translation> <translation id="8667808506758191620">您的 <ph name="DEVICE_TYPE" /> 是最新版本。</translation> <translation id="8697124171261953979">它还能够控制您启动Chromium后或通过多功能框进行搜索时系统显示的页面。</translation> <translation id="8704119203788522458">这是您的专属Chromium</translation>
diff --git a/chrome/app/resources/chromium_strings_zh-TW.xtb b/chrome/app/resources/chromium_strings_zh-TW.xtb index 197d163c..9f5de5c7 100644 --- a/chrome/app/resources/chromium_strings_zh-TW.xtb +++ b/chrome/app/resources/chromium_strings_zh-TW.xtb
@@ -246,7 +246,6 @@ <translation id="8599548569518771270">{0,plural, =0{Chromium 作業系統將立即重新啟動}=1{Chromium 作業系統將於 1 秒後重新啟動}other{Chromium 作業系統將於 # 秒後重新啟動}}</translation> <translation id="8619360774459241877">正在啟動 Chromium…</translation> <translation id="8621669128220841554">不明錯誤導致安裝失敗,請重新下載 Chromium。</translation> -<translation id="8628626585870903697">Chromium 不含 PDF 檢視器,因此無法執行預覽列印功能。</translation> <translation id="8667808506758191620">您的 <ph name="DEVICE_TYPE" /> 已搭載最新版作業系統。</translation> <translation id="8697124171261953979">這個擴充功能也會控管 Chromium 啟動時或你使用網址列搜尋時所顯示的網頁。</translation> <translation id="8704119203788522458">這是你專屬的 Chromium</translation>
diff --git a/chrome/app/resources/generated_resources_am.xtb b/chrome/app/resources/generated_resources_am.xtb index 4205465..158b2ea 100644 --- a/chrome/app/resources/generated_resources_am.xtb +++ b/chrome/app/resources/generated_resources_am.xtb
@@ -458,7 +458,6 @@ <translation id="166179487779922818">የይለፍ ቃሉ በጣም አጭር ነው።</translation> <translation id="1661867754829461514">ፒን ይጎድላል</translation> <translation id="16620462294541761">ይቅርታ፣ የይለፍ ቃልዎ ሊረጋገጥ አልቻለም። እባክዎ እንደገና ይሞክሩ።</translation> -<translation id="1662550410081243962">የመክፈያ ዘዴዎችን አስቀምጥ እና ሙላ</translation> <translation id="166278006618318542">የርዕሰ ጉዳዩ ህዝባዊ ቁልፍ አልጎሪዝም</translation> <translation id="166439687370499867">የተጋራ አውታረ መረብ ውቅረቶችን መለወጥ አይፈቀድም</translation> <translation id="1665611772925418501">ይህ ፋይል ሊቀየር አልቻለም።</translation> @@ -866,7 +865,6 @@ <translation id="2282146716419988068">የጂፒዩ ሂደት</translation> <translation id="2282155092769082568">የራስ-ውቅር ዩአርኤል፦</translation> <translation id="2283117145434822734">F6</translation> -<translation id="2283340219607151381">አድራሻዎችን አስቀምጥ እና ሙላ</translation> <translation id="2286841657746966508">የመላኪያ አድራሻ</translation> <translation id="2288181517385084064">ወደ ቪዲዮ መቅረጫ ቀይር</translation> <translation id="2288735659267887385">የተደራሽነት ቅንብሮች</translation>
diff --git a/chrome/app/resources/generated_resources_ar.xtb b/chrome/app/resources/generated_resources_ar.xtb index d5b28d3..8d0098e 100644 --- a/chrome/app/resources/generated_resources_ar.xtb +++ b/chrome/app/resources/generated_resources_ar.xtb
@@ -458,7 +458,6 @@ <translation id="166179487779922818">كلمة المرور أقصر مما يجب.</translation> <translation id="1661867754829461514">رقم التعريف الشخصي غير موجود</translation> <translation id="16620462294541761">عذرًا، ولكن تعذر التحقق من كلمة المرور. يُرجى المحاولة مرة أخرى.</translation> -<translation id="1662550410081243962">حفظ طرق الدفع وملؤها</translation> <translation id="166278006618318542">خوارزمية المفتاح العام لصاحب الشهادة</translation> <translation id="166439687370499867">لا يُسمح بتغيير عمليات تهيئة الشبكة المشتركة.</translation> <translation id="1665611772925418501">تعذر تعديل على الملف.</translation> @@ -866,7 +865,6 @@ <translation id="2282146716419988068">معالجة وحدة معالجة الرسومات (GPU)</translation> <translation id="2282155092769082568">عنوان URL للتهيئة التلقائية:</translation> <translation id="2283117145434822734">F6</translation> -<translation id="2283340219607151381">حفظ العناوين وملؤها</translation> <translation id="2286841657746966508">عنوان الفاتورة</translation> <translation id="2288181517385084064">التبديل إلى مسجل الفيديو</translation> <translation id="2288735659267887385">إعدادات إمكانية الوصول</translation>
diff --git a/chrome/app/resources/generated_resources_bg.xtb b/chrome/app/resources/generated_resources_bg.xtb index 2e3f2df..298e699 100644 --- a/chrome/app/resources/generated_resources_bg.xtb +++ b/chrome/app/resources/generated_resources_bg.xtb
@@ -455,7 +455,6 @@ <translation id="166179487779922818">Паролата е твърде кратка.</translation> <translation id="1661867754829461514">Липсва PIN</translation> <translation id="16620462294541761">За съжаление паролата ви не можа да бъде потвърдена. Моля, опитайте отново.</translation> -<translation id="1662550410081243962">Запазване и попълване на начини на плащане</translation> <translation id="166278006618318542">Алгоритъм на публичен ключ на субект</translation> <translation id="166439687370499867">Промените в конфигурациите за споделени мрежи не са разрешени</translation> <translation id="1665611772925418501">Файлът не можа да бъде променен.</translation> @@ -863,7 +862,6 @@ <translation id="2282146716419988068">Процес на графичния процесор</translation> <translation id="2282155092769082568">URL адрес за автоматично конфигуриране:</translation> <translation id="2283117145434822734">F6</translation> -<translation id="2283340219607151381">Запазване и попълване на адреси</translation> <translation id="2286841657746966508">Адрес за фактуриране</translation> <translation id="2288181517385084064">Превключване към видеорекордер</translation> <translation id="2288735659267887385">Настройки за достъпност</translation>
diff --git a/chrome/app/resources/generated_resources_bn.xtb b/chrome/app/resources/generated_resources_bn.xtb index 1ae399d..527c22ee 100644 --- a/chrome/app/resources/generated_resources_bn.xtb +++ b/chrome/app/resources/generated_resources_bn.xtb
@@ -271,6 +271,7 @@ <translation id="1397854323885047133">সিঙ্ক এবং ব্যক্তিগতকরণ</translation> <translation id="1398853756734560583">বড় করুন</translation> <translation id="1399511500114202393">কোনও ব্যবহারকারীর সার্টিফিকেট নেই</translation> +<translation id="1401165786814632797">আপনার ডিভাইস সক্রিয় এবং আনলক থাকাকালীন "OK Google" বলে যেকোনও সময়ে আপনার অ্যাসিস্ট্যান্ট অ্যাক্সেস করুন।</translation> <translation id="140250605646987970">আপনার ফোন পাওয়া গেছে৷ কিন্তু ডিভাইসে শুধুমাত্র Android 5.0 এবং তার উপরের সংস্করণের সঙ্গেই Smart Lock কাজ করে৷ <a>আরও জানুন</a></translation> <translation id="140520891692800925"><ph name="PROFILE_DISPLAY_NAME" /> (তত্বাবধানে থাকা)</translation> <translation id="1405476660552109915">আপনি কি চান যে <ph name="PASSWORD_MANAGER_BRAND" /> এই সাইটের জন্য আপনার অ্যাকাউন্ট সংরক্ষণ করুক?</translation> @@ -456,7 +457,6 @@ <translation id="166179487779922818">পাসওয়ার্ডটি অত্যন্ত ছোট৷</translation> <translation id="1661867754829461514">পিন হারিয়েছে</translation> <translation id="16620462294541761">দুঃখিত, আপনার পাসওয়ার্ড যাচাই করা যায়নি৷ দয়া করে আবার চেষ্টা করুন৷</translation> -<translation id="1662550410081243962">পেমেন্টের পদ্ধতিগুলি পূরণ করে সেভ করুন</translation> <translation id="166278006618318542">বিষয় সর্বজনীন কী অ্যালগারিদম</translation> <translation id="166439687370499867">শেয়ার করার নেটওয়ার্ক কনফিগারেশন পরিবর্তনের অনুমতি নেই</translation> <translation id="1665611772925418501">ফাইল সংশোধন করা যায়নি৷</translation> @@ -864,7 +864,6 @@ <translation id="2282146716419988068">GPU প্রক্রিয়া</translation> <translation id="2282155092769082568">স্বতঃকনফিগারেশান URL:</translation> <translation id="2283117145434822734">F6</translation> -<translation id="2283340219607151381">অ্যাড্রেস পূরণ করে সেভ করুন</translation> <translation id="2286841657746966508">বিলিং ঠিকানা</translation> <translation id="2288181517385084064">এর বদলে ভিডিও রেকর্ড করুন</translation> <translation id="2288735659267887385">অ্যাক্সেসযোগ্যতার সেটিংস</translation> @@ -1370,6 +1369,7 @@ <translation id="3031557471081358569">আমদানির জন্য আইটেম বেছে নিন:</translation> <translation id="3031601332414921114">প্রিন্ট আবার শুরু করুন</translation> <translation id="303198083543495566">ভূগোল</translation> +<translation id="3033999583152214331">আপনার Chromebook-এ Linux টুল, এডিটর, এবং IDEs চালান৷ <a target="_blank" href="<ph name="URL" />">আরও জানুন</a></translation> <translation id="3036546437875325427">Flash সক্ষম করুন</translation> <translation id="3037754279345160234">ডোমেনে যোগ করার জন্য প্রয়োজনীয় কনফিগারেশন পার্স করা যাচ্ছে না। আপনার অ্যাডমিনিস্ট্রেটরের সাথে যোগাযোগ করুন।</translation> <translation id="3038612606416062604">নিজ হাতে একটি প্রিন্টার যোগ করুন</translation> @@ -1510,6 +1510,7 @@ <translation id="3271648667212143903"><ph name="ORIGIN" /> এদের সঙ্গে সংযুক্ত হতে চায়</translation> <translation id="3274763671541996799">আপনি পূর্ণ পর্দায় দেথতে শুরু করেছেন৷</translation> <translation id="3275778913554317645">উইন্ডো হিসাবে খুলুন</translation> +<translation id="3278877214895457897">আপনার Chromebook সেট-আপ করা হয়ে গেলে, অ্যাসিস্ট্যান্টের থেকে যেকোনও সময় সাহায্য পেতে অ্যাসিস্ট্যান্ট বোতামটি টিপুন অথবা "Ok Google" বলুন।</translation> <translation id="3279230909244266691">এতে কয়েক মিনিট সময় লাগতে পারে। ভার্চুয়াল মেশিন শুরু করা হচ্ছে।</translation> <translation id="3279741024917655738">এতে সম্পূর্ণ স্ক্রিন ভিডিও দেখুন</translation> <translation id="3280237271814976245">এই &রূপে সেভ করুন...</translation> @@ -2599,6 +2600,7 @@ <translation id="4992066212339426712">সশব্দ করুন</translation> <translation id="4992458225095111526">পাওয়ারওয়াশ নিশ্চিত করুন</translation> <translation id="4992473555164495036">আপনার অ্যাডমিনিস্ট্রেটর উপলভ্য ইনপুট পদ্ধতিগুলি সীমাবদ্ধ করেছেন।</translation> +<translation id="4992926179187649719">'Ok Google' চালু করুন</translation> <translation id="4994474651455208930">সাইটগুলিকে প্রোটোকলের জন্য ডিফল্ট হ্যান্ডলার হওয়ার জন্য জিজ্ঞাসা করার অনুমতি দেয়</translation> <translation id="4994754230098574403">সেট আপ করা হচ্ছে</translation> <translation id="4996978546172906250">এর মাধ্যমে শেয়ার করুন</translation> @@ -4523,6 +4525,7 @@ <translation id="7908378463497120834">দুঃখিত, ডিভাইসটির কমপক্ষে একটি ভাগ আটকানো যায়নি৷</translation> <translation id="7909969815743704077">ছদ্মবেশী ভাবে ডাউনলোড হয়েছে</translation> <translation id="7910768399700579500">&নতুন ফোল্ডার</translation> +<translation id="7911118814695487383">Linux</translation> <translation id="7912080627461681647">সার্ভারে আপনার পাসওয়ার্ড পাল্টানো হয়েছে। অনুগ্রহ করে সাইন-আউট করে আবার সাইন-ইন করুন।</translation> <translation id="7915471803647590281">প্রতিক্রিয়াটি প্রেরণের আগে কী ঘটছে তা দয়া করে আমাদের জানান৷ </translation> <translation id="7916556741383518510">ক্লিক করা হলে</translation>
diff --git a/chrome/app/resources/generated_resources_ca.xtb b/chrome/app/resources/generated_resources_ca.xtb index 129d085..5e83767 100644 --- a/chrome/app/resources/generated_resources_ca.xtb +++ b/chrome/app/resources/generated_resources_ca.xtb
@@ -458,7 +458,6 @@ <translation id="166179487779922818">La contrasenya és massa curta.</translation> <translation id="1661867754829461514">Falta el PIN</translation> <translation id="16620462294541761">No s'ha pogut verificar la teva contrasenya. Torna-ho a provar.</translation> -<translation id="1662550410081243962">Desa i emplena les formes de pagament</translation> <translation id="166278006618318542">Algoritme de clau pública del subjecte</translation> <translation id="166439687370499867">No es pot canviar la configuració de la xarxa compartida</translation> <translation id="1665611772925418501">El fitxer no s'ha pogut modificar.</translation> @@ -866,7 +865,6 @@ <translation id="2282146716419988068">Procés de GPU</translation> <translation id="2282155092769082568">URL de configuració automàtica:</translation> <translation id="2283117145434822734">F6</translation> -<translation id="2283340219607151381">Desa i emplena les adreces</translation> <translation id="2286841657746966508">Adreça de facturació</translation> <translation id="2288181517385084064">Canvia a la gravadora de vídeo</translation> <translation id="2288735659267887385">Configuració d'accessibilitat</translation> @@ -1369,6 +1367,7 @@ <translation id="3031557471081358569">Seleccioneu els elements que voleu importar:</translation> <translation id="3031601332414921114">Reprèn la impressió</translation> <translation id="303198083543495566">Geografia</translation> +<translation id="3033999583152214331">Executa les eines, els editors i els IDE de Linux a Chromebook. <a target="_blank" href="<ph name="URL" />">Més informació</a></translation> <translation id="3036546437875325427">Activa Flash</translation> <translation id="3037754279345160234">No es pot analitzar la configuració per unir-se al domini. Contacta amb l'administrador.</translation> <translation id="3038612606416062604">Afegeix una impressora manualment</translation>
diff --git a/chrome/app/resources/generated_resources_cs.xtb b/chrome/app/resources/generated_resources_cs.xtb index 50f42094..8db7a37 100644 --- a/chrome/app/resources/generated_resources_cs.xtb +++ b/chrome/app/resources/generated_resources_cs.xtb
@@ -458,7 +458,6 @@ <translation id="166179487779922818">Heslo je příliš krátké.</translation> <translation id="1661867754829461514">Chybí kód PIN</translation> <translation id="16620462294541761">Litujeme, heslo nelze ověřit. Zkuste to prosím znovu.</translation> -<translation id="1662550410081243962">Ukládat a vyplňovat platební metody</translation> <translation id="166278006618318542">Algoritmus veřejného klíče subjektu</translation> <translation id="166439687370499867">Změna konfigurace sdílené sítě není povolena</translation> <translation id="1665611772925418501">Soubor se nepodařilo upravit.</translation> @@ -866,7 +865,6 @@ <translation id="2282146716419988068">Proces GPU</translation> <translation id="2282155092769082568">Adresa URL automatické konfigurace:</translation> <translation id="2283117145434822734">F6</translation> -<translation id="2283340219607151381">Ukládat a vyplňovat adresy</translation> <translation id="2286841657746966508">Fakturační adresa</translation> <translation id="2288181517385084064">Přepnout na videokameru</translation> <translation id="2288735659267887385">Nastavení přístupnosti</translation>
diff --git a/chrome/app/resources/generated_resources_da.xtb b/chrome/app/resources/generated_resources_da.xtb index c853229..31fac2a 100644 --- a/chrome/app/resources/generated_resources_da.xtb +++ b/chrome/app/resources/generated_resources_da.xtb
@@ -455,7 +455,6 @@ <translation id="166179487779922818">Adgangskoden er for kort.</translation> <translation id="1661867754829461514">Pinkode mangler</translation> <translation id="16620462294541761">Din adgangskode blev ikke bekræftet. Prøv igen.</translation> -<translation id="1662550410081243962">Gem og udfyld betalingsmetoder</translation> <translation id="166278006618318542">Algoritme for emnets offentlige nøgle</translation> <translation id="166439687370499867">Det er ikke tilladt at ændre delte netværkskonfigurationer</translation> <translation id="1665611772925418501">Filen kunne ikke ændres.</translation> @@ -863,7 +862,6 @@ <translation id="2282146716419988068">GPU-proces</translation> <translation id="2282155092769082568">Webadresse til automatisk konfiguration:</translation> <translation id="2283117145434822734">F6</translation> -<translation id="2283340219607151381">Gem og udfyld adresser</translation> <translation id="2286841657746966508">Faktureringsadresse</translation> <translation id="2288181517385084064">Skift til videooptagelse</translation> <translation id="2288735659267887385">Indstillinger for hjælpefunktioner</translation> @@ -1368,6 +1366,7 @@ <translation id="3031557471081358569">Vælg at importere følgende:</translation> <translation id="3031601332414921114">Genoptag udskrivning</translation> <translation id="303198083543495566">Geografi</translation> +<translation id="3033999583152214331">Kør Linux-værktøjer, -redigeringsværktøjer og -IDE'er på din Chromebook. <a target="_blank" href="<ph name="URL" />">Få flere oplysninger</a></translation> <translation id="3036546437875325427">Aktivér Flash</translation> <translation id="3037754279345160234">Konfigurationen for domænetilmelding kunne ikke parses. Kontakt din administrator.</translation> <translation id="3038612606416062604">Tilføj en printer manuelt</translation>
diff --git a/chrome/app/resources/generated_resources_de.xtb b/chrome/app/resources/generated_resources_de.xtb index 034868c2..432b6077 100644 --- a/chrome/app/resources/generated_resources_de.xtb +++ b/chrome/app/resources/generated_resources_de.xtb
@@ -455,7 +455,6 @@ <translation id="166179487779922818">Das Passwort ist zu kurz.</translation> <translation id="1661867754829461514">PIN fehlt</translation> <translation id="16620462294541761">Ihr Passwort konnte nicht bestätigt werden. Bitte versuchen Sie es erneut.</translation> -<translation id="1662550410081243962">Zahlungsmethode speichern und ausfüllen</translation> <translation id="166278006618318542">Algorithmus für öffentlichen Schlüssel des Antragstellers</translation> <translation id="166439687370499867">Freigegebene Netzwerkkonfigurationen dürfen nicht geändert werden</translation> <translation id="1665611772925418501">Die Datei konnte nicht geändert werden.</translation> @@ -863,7 +862,6 @@ <translation id="2282146716419988068">GPU-Verarbeitung</translation> <translation id="2282155092769082568">URL für Autokonfiguration:</translation> <translation id="2283117145434822734">F6</translation> -<translation id="2283340219607151381">Adressen speichern und ausfüllen</translation> <translation id="2286841657746966508">Rechnungsadresse</translation> <translation id="2288181517385084064">Zum Videorekorder wechseln</translation> <translation id="2288735659267887385">Einstellungen für Bedienungshilfen</translation> @@ -1366,6 +1364,7 @@ <translation id="3031557471081358569">Zu importierende Daten wählen:</translation> <translation id="3031601332414921114">Druckvorgang fortsetzen</translation> <translation id="303198083543495566">Längen- und Breitengrad</translation> +<translation id="3033999583152214331">Führen Sie auf Ihrem Chromebook Linux-Tools, -Editoren und -IDEs aus. <a target="_blank" href="<ph name="URL" />">Weitere Informationen</a></translation> <translation id="3036546437875325427">Flash aktivieren</translation> <translation id="3037754279345160234">Die Konfiguration zum Domainbeitritt kann nicht geparst werden. Bitte wenden Sie sich an Ihren Administrator.</translation> <translation id="3038612606416062604">Drucker manuell hinzufügen</translation>
diff --git a/chrome/app/resources/generated_resources_el.xtb b/chrome/app/resources/generated_resources_el.xtb index 2b8273e5..b241075 100644 --- a/chrome/app/resources/generated_resources_el.xtb +++ b/chrome/app/resources/generated_resources_el.xtb
@@ -458,7 +458,6 @@ <translation id="166179487779922818">Ο κωδικός πρόσβασης είναι πολύ σύντομος.</translation> <translation id="1661867754829461514">Απουσιάζει το PIN </translation> <translation id="16620462294541761">Λυπούμαστε, δεν ήταν δυνατή η επαλήθευση του κωδικού πρόσβασής σας. Δοκιμάστε ξανά.</translation> -<translation id="1662550410081243962">Αποθήκευση και συμπλήρωση τρόπων πληρωμής</translation> <translation id="166278006618318542">Αλγόριθμος δημόσιου κλειδιού υποκειμένου</translation> <translation id="166439687370499867">Δεν επιτρέπεται η αλλαγή διαμορφώσεων κοινόχρηστου δικτύου</translation> <translation id="1665611772925418501">Δεν ήταν δυνατή η τροποποίηση του αρχείου.</translation> @@ -866,7 +865,6 @@ <translation id="2282146716419988068">Διαδικασία GPU</translation> <translation id="2282155092769082568">Αυτόματη διαμόρφωση URL</translation> <translation id="2283117145434822734">F6</translation> -<translation id="2283340219607151381">Αποθήκευση και συμπλήρωση διευθύνσεων</translation> <translation id="2286841657746966508">Διεύθυνση τιμολόγησης</translation> <translation id="2288181517385084064">Εναλλαγή σε πρόγραμμα εγγραφής βίντεο</translation> <translation id="2288735659267887385">Ρυθμίσεις προσβασιμότητας</translation> @@ -1370,6 +1368,7 @@ <translation id="3031557471081358569">Επιλογή στοιχείων για εισαγωγή:</translation> <translation id="3031601332414921114">Συνέχιση εκτύπωσης</translation> <translation id="303198083543495566">Γεωγραφία</translation> +<translation id="3033999583152214331">Εκτελέστε εργαλεία, προγράμματα επεξεργασίας και IDE Linux στο Chromebook. <a target="_blank" href="<ph name="URL" />">Μάθετε περισσότερα</a></translation> <translation id="3036546437875325427">Ενεργοποίηση Flash</translation> <translation id="3037754279345160234">Δεν είναι δυνατή η ανάλυση της διαμόρφωσης για συμμετοχή σε τομέα. Επικοινωνήστε με τον διαχειριστή σας.</translation> <translation id="3038612606416062604">Μη αυτόματη προσθήκη εκτυπωτή</translation>
diff --git a/chrome/app/resources/generated_resources_en-GB.xtb b/chrome/app/resources/generated_resources_en-GB.xtb index 76bc646..8579ba2 100644 --- a/chrome/app/resources/generated_resources_en-GB.xtb +++ b/chrome/app/resources/generated_resources_en-GB.xtb
@@ -458,7 +458,6 @@ <translation id="166179487779922818">Password is too short.</translation> <translation id="1661867754829461514">PIN missing</translation> <translation id="16620462294541761">Sorry, your password could not be verified. Please try again.</translation> -<translation id="1662550410081243962">Save and fill payment methods</translation> <translation id="166278006618318542">Subject Public Key Algorithm</translation> <translation id="166439687370499867">Changing shared network configurations is not allowed</translation> <translation id="1665611772925418501">The file could not be modified.</translation> @@ -866,7 +865,6 @@ <translation id="2282146716419988068">GPU Process</translation> <translation id="2282155092769082568">Auto-configuration URL:</translation> <translation id="2283117145434822734">F6</translation> -<translation id="2283340219607151381">Save and fill addresses</translation> <translation id="2286841657746966508">Billing address</translation> <translation id="2288181517385084064">Switch to video recorder</translation> <translation id="2288735659267887385">Accessibility settings</translation>
diff --git a/chrome/app/resources/generated_resources_es-419.xtb b/chrome/app/resources/generated_resources_es-419.xtb index 35fa50e..f02d55b4 100644 --- a/chrome/app/resources/generated_resources_es-419.xtb +++ b/chrome/app/resources/generated_resources_es-419.xtb
@@ -455,7 +455,6 @@ <translation id="166179487779922818">La contraseña es demasiado corta.</translation> <translation id="1661867754829461514">Falta el número de PIN </translation> <translation id="16620462294541761">No es posible verificar tu contraseña. Inténtalo nuevamente.</translation> -<translation id="1662550410081243962">Guardar y completar formas de pago</translation> <translation id="166278006618318542">Algoritmo de clave pública del sujeto</translation> <translation id="166439687370499867">No se permite cambiar las opciones de configuración de la red compartida</translation> <translation id="1665611772925418501">No se pudo modificar el archivo.</translation> @@ -863,7 +862,6 @@ <translation id="2282146716419988068">Proceso de GPU</translation> <translation id="2282155092769082568">URL de autoconfiguración:</translation> <translation id="2283117145434822734">F6</translation> -<translation id="2283340219607151381">Guardar y completar direcciones</translation> <translation id="2286841657746966508">Dirección de facturación</translation> <translation id="2288181517385084064">Cambiar a la grabadora de video</translation> <translation id="2288735659267887385">Configuración de accesibilidad</translation> @@ -1367,6 +1365,7 @@ <translation id="3031557471081358569">Selecciona elementos para importar:</translation> <translation id="3031601332414921114">Reanudar la impresión</translation> <translation id="303198083543495566">Geografía</translation> +<translation id="3033999583152214331">Ejecuta IDE, editores y herramientas de Linux en tu Chromebook. <a target="_blank" href="<ph name="URL" />">Más información</a></translation> <translation id="3036546437875325427">Habilitar Flash</translation> <translation id="3037754279345160234">No se puede analizar la configuración para vincular el dominio. Comunícate con el administrador.</translation> <translation id="3038612606416062604">Agregar una impresora manualmente</translation>
diff --git a/chrome/app/resources/generated_resources_es.xtb b/chrome/app/resources/generated_resources_es.xtb index 52c655c1..13c6232 100644 --- a/chrome/app/resources/generated_resources_es.xtb +++ b/chrome/app/resources/generated_resources_es.xtb
@@ -458,7 +458,6 @@ <translation id="166179487779922818">La contraseña es demasiado corta.</translation> <translation id="1661867754829461514">Falta el PIN.</translation> <translation id="16620462294541761">La contraseña no se ha podido verificar. Vuelve a intentarlo.</translation> -<translation id="1662550410081243962">Guardar y autocompletar métodos de pago</translation> <translation id="166278006618318542">Algoritmo de clave pública de la entidad receptora</translation> <translation id="166439687370499867">No se permite cambiar la configuración de las redes compartidas</translation> <translation id="1665611772925418501">No se ha podido modificar el archivo.</translation> @@ -866,7 +865,6 @@ <translation id="2282146716419988068">Proceso de GPU</translation> <translation id="2282155092769082568">URL de configuración automática:</translation> <translation id="2283117145434822734">F6</translation> -<translation id="2283340219607151381">Guardar y autocompletar direcciones</translation> <translation id="2286841657746966508">Dirección de facturación</translation> <translation id="2288181517385084064">Cambiar al modo de cámara de vídeo</translation> <translation id="2288735659267887385">Configuración de accesibilidad</translation>
diff --git a/chrome/app/resources/generated_resources_et.xtb b/chrome/app/resources/generated_resources_et.xtb index 5d8fcdd..ff08fbe 100644 --- a/chrome/app/resources/generated_resources_et.xtb +++ b/chrome/app/resources/generated_resources_et.xtb
@@ -458,7 +458,6 @@ <translation id="166179487779922818">Parool on liiga lühike.</translation> <translation id="1661867754829461514">PIN-kood puudub</translation> <translation id="16620462294541761">Kahjuks ei õnnestunud teie parooli kinnitada. Proovige uuesti.</translation> -<translation id="1662550410081243962">Salvesta ja sisesta makseviisid</translation> <translation id="166278006618318542">Subjekti avaliku võtme algoritm</translation> <translation id="166439687370499867">Jagatud võrgu seadistuste muutmine ei ole lubatud</translation> <translation id="1665611772925418501">Faili ei saa muuta.</translation> @@ -866,7 +865,6 @@ <translation id="2282146716419988068">GPU-protsess</translation> <translation id="2282155092769082568">Automaatse konfigureerimise URL:</translation> <translation id="2283117145434822734">F6</translation> -<translation id="2283340219607151381">Salvesta ja sisesta aadressid</translation> <translation id="2286841657746966508">Arveldusaadress</translation> <translation id="2288181517385084064">Lülitu videosalvestile</translation> <translation id="2288735659267887385">Juurdepääsetavuse seaded</translation> @@ -1370,6 +1368,7 @@ <translation id="3031557471081358569">Valige imporditavad üksused:</translation> <translation id="3031601332414921114">Jätka printimist</translation> <translation id="303198083543495566">Geograafia</translation> +<translation id="3033999583152214331">Käitage oma Chromebookis Linuxi tööriistu, redaktoreid ja IDE-sid. <a target="_blank" href="<ph name="URL" />">Lisateave</a></translation> <translation id="3036546437875325427">Luba Flash</translation> <translation id="3037754279345160234">Domeeniga liitumise seadistust ei saa sõeluda. Võtke ühendust administraatoriga.</translation> <translation id="3038612606416062604">Printeri käsitsi lisamine</translation>
diff --git a/chrome/app/resources/generated_resources_fa.xtb b/chrome/app/resources/generated_resources_fa.xtb index 2f46eaa3..aa02bd43 100644 --- a/chrome/app/resources/generated_resources_fa.xtb +++ b/chrome/app/resources/generated_resources_fa.xtb
@@ -455,7 +455,6 @@ <translation id="166179487779922818">گذرواژه بیش از حد کوتاه است.</translation> <translation id="1661867754829461514">پین جا افتاده</translation> <translation id="16620462294541761">متأسفانه، گذرواژه شما تأیید نشد. لطفاً دوباره امتحان کنید.</translation> -<translation id="1662550410081243962">ذخیره و تکمیل روشهای پرداخت</translation> <translation id="166278006618318542">الگوریتم کلید عمومی موضوع</translation> <translation id="166439687370499867">تغییر پیکربندیهای شبکه همرسانیشده مجاز نیست</translation> <translation id="1665611772925418501">امکان تغییر این فایل وجود نداشت.</translation> @@ -863,7 +862,6 @@ <translation id="2282146716419988068">پردازش GPU</translation> <translation id="2282155092769082568">نشانی وب پیکربندی خودکار</translation> <translation id="2283117145434822734">F6</translation> -<translation id="2283340219607151381">ذخیره و تکمیل نشانی</translation> <translation id="2286841657746966508">آدرس ارسال صورتحساب</translation> <translation id="2288181517385084064">رفتن به ضبطکننده ویدیو</translation> <translation id="2288735659267887385">تنظیمات دسترسپذیری</translation> @@ -1366,6 +1364,7 @@ <translation id="3031557471081358569">مواردی را برای وارد کردن انتخاب کنید:</translation> <translation id="3031601332414921114">ازسرگیری چاپ</translation> <translation id="303198083543495566">جغرافیا</translation> +<translation id="3033999583152214331">اجرای ابزارها، ویرایشگرها و محیطهای یکپارچه توسعه نرمافزار (IDEs) Linux در Chromebook. <a target="_blank" href="<ph name="URL" />">بیشتر بدانید</a></translation> <translation id="3036546437875325427">فعال کردن Flash</translation> <translation id="3037754279345160234">نمیتوان پیکربندی پیوستن به دامنه را تجزیه کرد. لطفاً با سرپرست سیستم تماس بگیرید.</translation> <translation id="3038612606416062604">افزودن چاپگری بهصورت دستی</translation>
diff --git a/chrome/app/resources/generated_resources_fi.xtb b/chrome/app/resources/generated_resources_fi.xtb index 01eee6a2..af762d9 100644 --- a/chrome/app/resources/generated_resources_fi.xtb +++ b/chrome/app/resources/generated_resources_fi.xtb
@@ -458,7 +458,6 @@ <translation id="166179487779922818">Salasana on liian lyhyt.</translation> <translation id="1661867754829461514">PIN-koodi puuttuu</translation> <translation id="16620462294541761">Salasanasi vahvistaminen epäonnistui. Yritä uudelleen.</translation> -<translation id="1662550410081243962">Tallenna ja täytä maksutavat</translation> <translation id="166278006618318542">Kohteen julkisen avaimen algoritmi</translation> <translation id="166439687370499867">Jaettujen verkkojen määritysten muokkaaminen on estetty.</translation> <translation id="1665611772925418501">Tiedostoa ei voi muuttaa.</translation> @@ -866,7 +865,6 @@ <translation id="2282146716419988068">GPU-prosessi</translation> <translation id="2282155092769082568">Automaattisen määrityksen URL-osoite:</translation> <translation id="2283117145434822734">F6</translation> -<translation id="2283340219607151381">Tallenna ja täytä osoitteet</translation> <translation id="2286841657746966508">Laskutusosoite</translation> <translation id="2288181517385084064">Vaihda videokameraan</translation> <translation id="2288735659267887385">Esteettömyysasetukset</translation>
diff --git a/chrome/app/resources/generated_resources_fil.xtb b/chrome/app/resources/generated_resources_fil.xtb index da183aab..716b13e8 100644 --- a/chrome/app/resources/generated_resources_fil.xtb +++ b/chrome/app/resources/generated_resources_fil.xtb
@@ -458,7 +458,6 @@ <translation id="166179487779922818">Masyadong maikli ang password.</translation> <translation id="1661867754829461514">Nawawala ang PIN</translation> <translation id="16620462294541761">Paumanhin, hindi ma-verify ang iyong password. Pakisubukang muli.</translation> -<translation id="1662550410081243962">I-save at punan ang mga paraan ng pagbabayad</translation> <translation id="166278006618318542">Subject Public Key Algorithm</translation> <translation id="166439687370499867">Hindi pinapayagan ang pagbago sa mga nakabahaging configuration ng network</translation> <translation id="1665611772925418501">Hindi mababago ang file.</translation> @@ -866,7 +865,6 @@ <translation id="2282146716419988068">Proseso ng GPU</translation> <translation id="2282155092769082568">Autoconfiguration URL:</translation> <translation id="2283117145434822734">F6</translation> -<translation id="2283340219607151381">I-save at punan ang mga address</translation> <translation id="2286841657746966508">Billing address</translation> <translation id="2288181517385084064">Lumipat sa video recorder</translation> <translation id="2288735659267887385">Mga setting ng pagiging naa-access</translation> @@ -1370,6 +1368,7 @@ <translation id="3031557471081358569">Pumili ng mga item na ii-import:</translation> <translation id="3031601332414921114">Ituloy ang pag-print</translation> <translation id="303198083543495566">Heograpiya</translation> +<translation id="3033999583152214331">Magpatakbo ng mga Linux tool, editor, at IDE sa iyong Chromebook. <a target="_blank" href="<ph name="URL" />">Matuto pa</a></translation> <translation id="3036546437875325427">I-enable ang Flash</translation> <translation id="3037754279345160234">Hindi ma-parse ang configuration para magsama ng domain. Makipag-ugnayan sa iyong administrator.</translation> <translation id="3038612606416062604">Manual na magdagdag ng printer</translation>
diff --git a/chrome/app/resources/generated_resources_fr.xtb b/chrome/app/resources/generated_resources_fr.xtb index 330bbfb..f15a76b 100644 --- a/chrome/app/resources/generated_resources_fr.xtb +++ b/chrome/app/resources/generated_resources_fr.xtb
@@ -458,7 +458,6 @@ <translation id="166179487779922818">Mot de passe trop court.</translation> <translation id="1661867754829461514">Code secret manquant</translation> <translation id="16620462294541761">Mot de passe incorrect. Veuillez réessayer.</translation> -<translation id="1662550410081243962">Enregistrer et renseigner les modes de paiement</translation> <translation id="166278006618318542">Algorithme de clé publique de l'objet</translation> <translation id="166439687370499867">La modification de la configuration d'un réseau partagé n'est pas autorisée</translation> <translation id="1665611772925418501">Impossible de modifier le fichier.</translation> @@ -866,7 +865,6 @@ <translation id="2282146716419988068">GPU</translation> <translation id="2282155092769082568">URL de configuration automatique :</translation> <translation id="2283117145434822734">F6</translation> -<translation id="2283340219607151381">Enregistrer et renseigner les adresses</translation> <translation id="2286841657746966508">Adresse de facturation</translation> <translation id="2288181517385084064">Passer en mode enregistreur vidéo</translation> <translation id="2288735659267887385">Paramètres d'accessibilité</translation> @@ -1370,6 +1368,7 @@ <translation id="3031557471081358569">Sélectionnez les éléments à importer :</translation> <translation id="3031601332414921114">Reprendre l'impression</translation> <translation id="303198083543495566">Géographie</translation> +<translation id="3033999583152214331">Exécutez des outils, des éditeurs et des IDE Linux sur votre Chromebook. <a target="_blank" href="<ph name="URL" />">En savoir plus</a></translation> <translation id="3036546437875325427">Activer Flash</translation> <translation id="3037754279345160234">Impossible d'analyser la configuration d'association de l'appareil au domaine. Veuillez contacter votre administrateur.</translation> <translation id="3038612606416062604">Ajouter une imprimante manuellement</translation>
diff --git a/chrome/app/resources/generated_resources_gu.xtb b/chrome/app/resources/generated_resources_gu.xtb index b0b9bab..164526d 100644 --- a/chrome/app/resources/generated_resources_gu.xtb +++ b/chrome/app/resources/generated_resources_gu.xtb
@@ -454,7 +454,6 @@ <translation id="166179487779922818">પાસવર્ડ ખૂબ ટૂંકો છે.</translation> <translation id="1661867754829461514">PIN ખૂટે છે</translation> <translation id="16620462294541761">માફ કરશો, તમારો પાસવર્ડ ચકાસી શકાયો નથી. કૃપા કરીને ફરીથી પ્રયત્ન કરો.</translation> -<translation id="1662550410081243962">ચુકવણી પદ્ધતિઓ સાચવો અને ભરો</translation> <translation id="166278006618318542">વિષય સાર્વજનિક કી અલ્ગોરિધમ</translation> <translation id="166439687370499867">શેર કરેલ નેટવર્કની ગોઠવણીમાં ફેરફાર કરવાની મંજૂરી નથી</translation> <translation id="1665611772925418501">ફાઇલ સંશોધિત કરી શકાઈ નથી.</translation> @@ -862,7 +861,6 @@ <translation id="2282146716419988068">GPU પ્રક્રિયા</translation> <translation id="2282155092769082568">સ્વતઃગોઠવણી URL:</translation> <translation id="2283117145434822734">F6</translation> -<translation id="2283340219607151381">સરનામાં સાચવો અને ભરો</translation> <translation id="2286841657746966508">બિલિંગ સરનામું</translation> <translation id="2288181517385084064">વીડિઓ રેકોર્ડર પર સ્વિચ કરો</translation> <translation id="2288735659267887385">ઍક્સેસિબિલિટી સેટિંગ્સ</translation> @@ -1366,6 +1364,7 @@ <translation id="3031557471081358569">આયાત કરવા માટે આઇટમ્સ પસંદ કરો:</translation> <translation id="3031601332414921114">છાપવાનું ફરી શરૂ કરો</translation> <translation id="303198083543495566">સ્થાન માહિતી</translation> +<translation id="3033999583152214331">તમારી Chromebook પર Linuxના સાધનો, એડિટર અને IDEs ચલાવો. <a target="_blank" href="<ph name="URL" />">વધુ જાણો</a></translation> <translation id="3036546437875325427">ફ્લેશ સક્ષમ કરો</translation> <translation id="3037754279345160234">ડોમેનમાં જોડાવા માટે ગોઠવણીનું વિશ્લેષણ કરી શકતાં નથી. કૃપા કરીને તમારા વ્યવસ્થાપકનો સંપર્ક કરો.</translation> <translation id="3038612606416062604">પ્રિન્ટરને મેન્યુઅલી ઉમેરો</translation>
diff --git a/chrome/app/resources/generated_resources_hi.xtb b/chrome/app/resources/generated_resources_hi.xtb index b8bdf97..8cfd3f9 100644 --- a/chrome/app/resources/generated_resources_hi.xtb +++ b/chrome/app/resources/generated_resources_hi.xtb
@@ -91,7 +91,7 @@ <translation id="1136155683023653803">पासवर्ड, बुकमार्क, इतिहास और कई चीज़ें आपके खाते में सिंक की जाती हैं</translation> <translation id="1137673463384776352"><ph name="APP" /> में लिंक खोलें</translation> <translation id="1140351953533677694">अपने ब्लूटूथ और Serial डिवाइस एक्सेस करें</translation> -<translation id="1140610710803014750">अपने सभी डिवाइस पर अपने बुकमार्क पाने के लिए, साइन इन करें और सिंक चालू करें.</translation> +<translation id="1140610710803014750">अपने सभी डिवाइस पर अपने बुकमार्क पाने के लिए साइन इन करें और सिंक चालू करें.</translation> <translation id="1143142264369994168">प्रमाणपत्र हस्ताक्षरकर्ता</translation> <translation id="1145292499998999162">प्लग इन अवरोधित</translation> <translation id="1145532888383813076">अपने डिवाइस, ऐप और वेब पर खोजें.</translation> @@ -223,7 +223,7 @@ <translation id="1316495628809031177">सिंक रोका हुआ है</translation> <translation id="1319979322914001937">ऐसा ऐप जो Chrome वेब स्टोर से एक्सटेंशन की फ़िल्टर की गई सूची दिखाता है. सूची में मौजूद एक्सटेंशन सीधे ऐप से इंस्टॉल किए गए हो सकते हैं.</translation> <translation id="1322046419516468189">अपने <ph name="SAVED_PASSWORDS_STORE" /> में सेव किए गए पासवर्ड देखें और उन्हें प्रबंधित करें</translation> -<translation id="1326317727527857210">अपने अन्य डिवाइस से अपने टैब प्राप्त करने के लिए, Chrome में प्रवेश करें.</translation> +<translation id="1326317727527857210">अपने अन्य डिवाइस से अपने टैब पाने के लिए, Chrome में साइन इन करें.</translation> <translation id="1327074568633507428">Google क्लाउड प्रिंट पर प्रिंटर</translation> <translation id="1327977588028644528">गेटवे</translation> <translation id="1329584516321524826">अभी-अभी अपडेट किया गया</translation> @@ -337,7 +337,7 @@ <translation id="1495486559005647033"><ph name="NUM_PRINTERS" /> अन्य उपलब्ध डिवाइस.</translation> <translation id="1497522201463361063">"<ph name="FILE_NAME" />" का नाम बदलने में असमर्थ. <ph name="ERROR_MESSAGE" /></translation> <translation id="1500297251995790841">अज्ञात डिवाइस [<ph name="VENDOR_ID" />:<ph name="PRODUCT_ID" />]</translation> -<translation id="1503394326855300303">किसी एकाधिक प्रवेश सत्र में इस मालिक खाते को पहला प्रवेश खाता होना चाहिए.</translation> +<translation id="1503394326855300303">किसी एकाधिक साइन इन सत्र में इस मालिक खाते को पहला साइन इन किया हुआ खाता होना चाहिए.</translation> <translation id="1503914375822320413">कॉपी बनाने का कार्य विफल रहा, अप्रत्याशित गड़बड़ी: $1</translation> <translation id="150411034776756821"><ph name="SITE" /> को निकालें</translation> <translation id="1505091014076919009">ऐप्लिकेशन और वेबसाइटों पर आपके सभी साइन इन किए हुए खाते यहां प्रबंधित किए जा सकते हैं.</translation> @@ -458,7 +458,6 @@ <translation id="166179487779922818">पासवर्ड बहुत छोटा है.</translation> <translation id="1661867754829461514">पिन गुम</translation> <translation id="16620462294541761">क्षमा करें, आपका पासवर्ड सत्यापित नहीं हो सका. कृपया फिर से प्रयास करें.</translation> -<translation id="1662550410081243962">भुगतान के तरीके सेव करें और भरें</translation> <translation id="166278006618318542">विषय सार्वजनिक कुंजी कलन विधि</translation> <translation id="166439687370499867">शेयर किए गए नेटवर्क कॉन्फ़िगरेशन बदलने की अनुमति नहीं है</translation> <translation id="1665611772925418501">फ़ाइल को संशोधित नहीं किया जा सका.</translation> @@ -605,7 +604,7 @@ <translation id="1871615898038944731">आपका <ph name="DEVICE_TYPE" /> अप टू डेट है</translation> <translation id="1875312262568496299">शुरू करें</translation> <translation id="1875387611427697908">इसे केवल <ph name="CHROME_WEB_STORE" /> से ही जोड़ा जा सकता है</translation> -<translation id="1877520246462554164">प्रमाणीकरण टोकन नहीं पा सके. दोबारा कोशिश करने के लिए कृपया साइन आउट करें उसके बाद फिर से प्रवेश करें.</translation> +<translation id="1877520246462554164">प्रमाणीकरण टोकन नहीं पा सके. दोबारा कोशिश करने के लिए कृपया साइन आउट करें उसके बाद फिर से साइन इन करें.</translation> <translation id="1878302395768190018">आप किसी भी समय Chrome सेटिंग में जाकर इसे अपनी पसंद के मुताबिक बना सकते हैं</translation> <translation id="1880905663253319515">प्रमाणपत्र "<ph name="CERTIFICATE_NAME" />" हटाएं?</translation> <translation id="1886996562706621347">साइटों को प्रोटोकॉल के लिए डिफ़ॉल्ट हैंडलर बनने के लिए पूछने देने की अनुमति दें (सुझाव)</translation> @@ -664,7 +663,7 @@ <translation id="1974821797477522211">नेटवर्क से कनेक्ट करें</translation> <translation id="197560921582345123">संपादित कर सकता है</translation> <translation id="1975841812214822307">निकालें...</translation> -<translation id="1976150099241323601">सुरक्षा डिवाइस में प्रवेश करें</translation> +<translation id="1976150099241323601">सुरक्षा डिवाइस में साइन इन करें</translation> <translation id="1976315108329706992">अब आप Android ऐप का इस्तेमाल कर सकते हैं.</translation> <translation id="1976323404609382849">एकाधिक साइटों से कुकी को अवरोधित किया गया.</translation> <translation id="1977965994116744507">अपने <ph name="DEVICE_TYPE" /> को अनलॉक करने के लिए अपने फ़ोन को पास लाएं.</translation> @@ -736,7 +735,7 @@ <translation id="2090165459409185032">अपनी खाता जानकारी पुनर्प्राप्त करने के लिए, यहां जाएं: google.com/accounts/recovery</translation> <translation id="2090876986345970080">सिस्टम सुरक्षा सेटिंग</translation> <translation id="2091887806945687916">ध्वनि</translation> -<translation id="2097372108957554726">नए डिवाइस पंजीकृत करने के लिए आपको Chrome में प्रवेश करने की आवश्यकता है.</translation> +<translation id="2097372108957554726">नए डिवाइस पंजीकृत करने के लिए आपको Chrome में साइन इन करने की आवश्यकता है.</translation> <translation id="2098305189700762159">नहीं मिला</translation> <translation id="2099172618127234427">आप Chrome OS की डीबग करने वाली सुविधाएं सक्षम कर रहे हैं जिससे sshd daemon सेट हो जाएगा और USB डिवाइस से बूट करना सक्षम हो जाएगा.</translation> <translation id="2099686503067610784">सर्वर प्रमाणपत्र "<ph name="CERTIFICATE_NAME" />" हटाएं?</translation> @@ -785,9 +784,9 @@ <translation id="215753907730220065">पूर्ण स्क्रीन से बाहर निकलें</translation> <translation id="2157875535253991059">यह पेज अब पूर्ण स्क्रीन है.</translation> <translation id="216169395504480358">वाई-फ़ाई जोड़ें...</translation> -<translation id="2163470535490402084">अपने <ph name="DEVICE_TYPE" /> में प्रवेश करने के लिए कृपया इंटरनेट से कनेक्ट करें.</translation> +<translation id="2163470535490402084">अपने <ph name="DEVICE_TYPE" /> में साइन इन करने के लिए कृपया इंटरनेट से कनेक्ट करें.</translation> <translation id="2166369534954157698">स्वास्थ्यप्रद ठण्ढ में सफल गणितज्ञ के घर छत पर द्वन्द के उद्घोष का शङ्ख बजकर जैसे ही थमा, उच्च मञ्च पर वह दम्भी अकड़ू क्षत्रिय झट धनुष ले आ डटा कि चिह्नित उपजाऊ कृषि-भूमि की इकाई पर कब्ज़े से सम्बन्धित प्रश्नोत्तर हो, किन्तु तप भग्न होने से रुष्ट ऋषि की धुँआईं आँखों ने ऐसा श्राप दिया कि प्रसन्नचित्त कव्वाल की उच्छृङ्खल स्वर-शृंखला के उग्र रूप ने मेरे अद्भुत प्रज्ज्वलित ख्वाबों को मिट्टी की चुक्कड़ की चाय में डुबो डाला, और तब उदभ्रमित मैं दीर्घ उच्छ्वास लेकर कब्र से उठा कि पुरानी चिट्ठियाँ ढूँढकर पढ़ूँगा</translation> -<translation id="2169062631698640254">किसी भी तरह प्रवेश करें</translation> +<translation id="2169062631698640254">किसी भी तरह साइन इन करें</translation> <translation id="2173801458090845390">इस डिवाइस में मांग आईडी जोड़ें</translation> <translation id="2175042898143291048">हमेशा ऐसा करें</translation> <translation id="2175607476662778685">त्वरित लॉन्च बार</translation> @@ -866,7 +865,6 @@ <translation id="2282146716419988068">GPU प्रक्रिया</translation> <translation id="2282155092769082568">URL का अपने आप कॉन्फ़िगरेशन:</translation> <translation id="2283117145434822734">F6</translation> -<translation id="2283340219607151381">पतों की जानकारी सेव करें और भरें</translation> <translation id="2286841657746966508">बिलिंग पता</translation> <translation id="2288181517385084064">वीडियो रिकॉर्डर पर स्विच करें</translation> <translation id="2288735659267887385">एक्सेस-योग्यता सेटिंग</translation> @@ -892,7 +890,7 @@ <translation id="2325650632570794183">इस तरह की फ़ाइल नहीं खुल सकती है. वैसा ऐप्लिकेशन जिसमें ऐसी फ़ाइल खुल सके, उसे ढूंढने के लिए कृपया 'Chrome वेब स्टोर' पर जाएं.</translation> <translation id="2326931316514688470">&ऐप फिर लोड करें</translation> <translation id="2327492829706409234">ऐप्स सक्षम करें</translation> -<translation id="2329597144923131178">सभी डिवाइसों पर बुकमार्क, इतिहास, पासवर्ड और अन्य सेटिंग प्राप्त करने हेतु प्रवेश करें.</translation> +<translation id="2329597144923131178">सभी डिवाइसों पर बुकमार्क, इतिहास, पासवर्ड और अन्य सेटिंग प्राप्त करने के लिए साइन इन करें.</translation> <translation id="2332131598580221120">स्टोर में देखें</translation> <translation id="2332742915001411729">डिफ़ॉल्ट पर रीसेट करें</translation> <translation id="2335122562899522968">यह पेज कुकी सेट करता है.</translation> @@ -1180,7 +1178,7 @@ <translation id="2740393541869613458">'निगरानी में रखे गए उपयोगकर्ता' ने जो वेबसाइटें देखी हैं उनकी समीक्षा करें, और</translation> <translation id="2743387203779672305">क्लिपबोर्ड में कॉपी करें</translation> <translation id="2745080116229976798">Microsoft Qualified Subordination</translation> -<translation id="2749756011735116528"><ph name="PRODUCT_NAME" /> में प्रवेश करें</translation> +<translation id="2749756011735116528"><ph name="PRODUCT_NAME" /> में साइन इन करें</translation> <translation id="2749881179542288782">वर्तनी के साथ व्याकरण की जाँच करें</translation> <translation id="2751739896257479635">EAP चरण 2 प्रमाणीकरण</translation> <translation id="2755367719610958252">एक्सेस-योग्यता सुविधाएं प्रबंधित करें</translation> @@ -1299,7 +1297,7 @@ <translation id="2926085873880284723">डिफ़ॉल्ट शॉर्टकट बहाल करें</translation> <translation id="2927017729816812676">संचय मेमोरी</translation> <translation id="2932330436172705843"><ph name="PROFILE_DISPLAY_NAME" /> (बच्चों का खाता)</translation> -<translation id="2932483646085333864">सिंक शुरू करने के लिए प्रस्थान करें और फिर से प्रवेश करें</translation> +<translation id="2932483646085333864">सिंक शुरू करने के लिए साइन आउट करें और फिर से साइन इन करें</translation> <translation id="2932883381142163287">दुर्व्यवहार की रिपोर्ट करें</translation> <translation id="2938225289965773019"><ph name="PROTOCOL" /> लिंक खोलें</translation> <translation id="2939938020978911855">उपलब्ध ब्लूटूथ डिवाइस दिखाएं</translation> @@ -1370,6 +1368,7 @@ <translation id="3031557471081358569">आयात करने के लिए आइटम को चुनें:</translation> <translation id="3031601332414921114">प्रिंटिंग फिर से शुरू करें</translation> <translation id="303198083543495566">भूगोल</translation> +<translation id="3033999583152214331">अपने Chromebook पर Linux टूल, संपादक और IDE चलाएं. <a target="_blank" href="<ph name="URL" />">ज़्यादा जानें</a></translation> <translation id="3036546437875325427">Flash सक्षम करें</translation> <translation id="3037754279345160234">डोमेन जोड़ने का कॉन्फ़िगरेशन पार्स नहीं किया जा सकता. कृपया अपने एडमिन से संपर्क करें.</translation> <translation id="3038612606416062604">कोई प्रिंटर मैन्युअल रूप से जोड़ें</translation> @@ -1576,7 +1575,7 @@ <translation id="337286756654493126">आपके द्वारा ऐप्लिकेशन में खोले गए फ़ोल्डर पढ़ें</translation> <translation id="3378503599595235699">स्थानीय डेटा केवल तब तक रखें जब तक कि आप अपने ब्राउज़र से बाहर न निकल जाएं</translation> <translation id="3378572629723696641">यह एक्सटेंशन दूषित हो सकता है.</translation> -<translation id="3378630551672149129">इनपुट तत्वों के साथ सहभागिता करने के लिए प्रवेश करें, टैब कुंजी को दबाएं</translation> +<translation id="3378630551672149129">इनपुट तत्वों के साथ सहभागिता करने के लिए साइन इन करें, टैब कुंजी को दबाएं</translation> <translation id="337920581046691015"><ph name="PRODUCT_NAME" /> स्थापित कर दिया जाएगा.</translation> <translation id="3380365263193509176">अज्ञात गड़बड़ी</translation> <translation id="3382073616108123819">ओह! सिस्टम इस डिवाइस के लिए डिवाइस पहचानकर्ताओं का निर्धारण करने में विफल रहा.</translation> @@ -1977,7 +1976,7 @@ <translation id="3949371968208420848">Hangouts Meet में आपका स्वागत है!</translation> <translation id="3949790930165450333"><ph name="DEVICE_NAME" /> (<ph name="DEVICE_ID" />)</translation> <translation id="394984172568887996">IE से आयात किया गया</translation> -<translation id="3950820424414687140">प्रवेश करें</translation> +<translation id="3950820424414687140">साइन इन करें</translation> <translation id="3954354850384043518">जारी है</translation> <translation id="3954469006674843813"><ph name="WIDTH" /> गुणा <ph name="HEIGHT" /> (<ph name="REFRESH_RATE" /> हर्ट्ज़)</translation> <translation id="3955193568934677022">साइटों को सुरक्षित सामग्री चलाने दें (अनुशंसित)</translation> @@ -2047,7 +2046,7 @@ <translation id="4068506536726151626">इस पेज पर आपके स्थान की जानकारी रखने वाली निम्न साइटों की कुछ चीजें मौजूद हैं:</translation> <translation id="4068776064906523561">सहेजे गए फ़िंगरप्रिंट</translation> <translation id="407173827865827707">क्लिक करने पर</translation> -<translation id="4071770069230198275"><ph name="PROFILE_NAME" />: प्रवेश करने संबंधी गड़बड़ी</translation> +<translation id="4071770069230198275"><ph name="PROFILE_NAME" />: साइन इन करने संबंधी त्रुटि</translation> <translation id="4074900173531346617">ईमेल हस्ताक्षरकर्ता प्रमाणपत्र</translation> <translation id="407520071244661467">स्केल</translation> <translation id="4075639477629295004"><ph name="FILE_NAME" /> कास्ट नहीं हो पा रहा है.</translation> @@ -2103,7 +2102,7 @@ <translation id="4158739975813877944">प्ले लिस्ट खोलें</translation> <translation id="4159681666905192102">यह बच्चों के लिए बनाया गया खाता है जिसे <ph name="CUSTODIAN_EMAIL" /> और <ph name="SECOND_CUSTODIAN_EMAIL" /> द्वारा प्रबंधित किया जाता है.</translation> <translation id="4163560723127662357">अज्ञात कीबोर्ड</translation> -<translation id="4168015872538332605"><ph name="PRIMARY_EMAIL" /> से संबंधित कुछ सेटिंग आपके साथ शेयर की जा रही हैं. ये सेटिंग आपके खाते को केवल तभी प्रभावित करती हैं जब एकाधिक प्रवेश का उपयोग किया जाता है.</translation> +<translation id="4168015872538332605"><ph name="PRIMARY_EMAIL" /> से संबंधित कुछ सेटिंग आपके साथ शेयर की जा रही हैं. ये सेटिंग आपके खाते को केवल तभी प्रभावित करती हैं जब एकाधिक साइन इन का उपयोग किया जाता है.</translation> <translation id="4170314459383239649">बाहर निकलने पर हटाएं</translation> <translation id="4172051516777682613">हमेशा दिखाएं</translation> <translation id="4175737294868205930">स्थायी जगह</translation> @@ -2138,7 +2137,7 @@ <translation id="4225397296022057997">सभी साइट पर</translation> <translation id="4235200303672858594">संपूर्ण स्क्रीन</translation> <translation id="4235813040357936597"><ph name="PROFILE_NAME" /> के लिए खाता जोड़ें</translation> -<translation id="4235965441080806197">प्रवेश नहीं करें</translation> +<translation id="4235965441080806197">साइन इन नहीं करें</translation> <translation id="4242533952199664413">सेटिंग खोलें</translation> <translation id="4242577469625748426">डिवाइस पर नीति सेटिंग इंस्टॉल करने में विफल रहा: <ph name="VALIDATION_ERROR" />.</translation> <translation id="4244238649050961491">और अधिक स्टाइलस ऐप ढूंढें</translation> @@ -2366,7 +2365,7 @@ <translation id="4631887759990505102">कलाकार</translation> <translation id="4632483769545853758">टैब अनम्यूट करें</translation> <translation id="4633003931260532286">एक्सटेंशन के लिए "<ph name="IMPORT_NAME" />" को न्यूनतम "<ph name="IMPORT_VERSION" />" वर्शन का होना चाहिए, लेकिन केवल "<ph name="INSTALLED_VERSION" />" वर्शन ही इंस्टॉल किया गया है</translation> -<translation id="4634771451598206121">पुन: प्रवेश करें...</translation> +<translation id="4634771451598206121">फिर से साइन इन करें...</translation> <translation id="4635398712689569051"><ph name="PAGE_NAME" /> मेहमान उपयोगकर्ताओं के लिए उपलब्ध नहीं है.</translation> <translation id="4641539339823703554">Chrome सिस्टम का समय सेट करने में असमर्थ था. कृपया नीचे दिया गया समय देखें और आवश्यकता होने पर उसे सही करें.</translation> <translation id="4643612240819915418">वीडियो नए टैब में &खोलें</translation> @@ -2562,7 +2561,7 @@ <translation id="4924638091161556692">निश्चित</translation> <translation id="4925542575807923399">इस खाते के व्यवस्थापक के लिए आवश्यक है कि किसी एकाधिक प्रवेश सत्र में यह खाता सबसे पहले प्रवेश किया जाने वाला खाता हो.</translation> <translation id="4927753642311223124">यहां देखने के लिए कुछ भी नहीं है, आगे चलें.</translation> -<translation id="4927846293686536410">अपने सभी डिवाइस पर अपने बुकमार्क, इतिहास, पासवर्ड और अन्य सेटिंग प्राप्त करने के लिए प्रवेश करें. आप अपनी Google सेवाओं में भी अपने आप प्रवेश कर जाएंगे.</translation> +<translation id="4927846293686536410">अपने सभी डिवाइस पर अपने बुकमार्क, इतिहास, पासवर्ड और अन्य सेटिंग प्राप्त करने के लिए साइन इन करें. आप अपनी Google सेवाओं में भी अपने आप साइन इन कर जाएंगे.</translation> <translation id="4929386379796360314">प्रिंट करने की जगहें</translation> <translation id="4931132176527519925">स्क्रीन हमेशा शेयर करें</translation> <translation id="4933484234309072027"><ph name="URL" /> पर एम्बेड किया गया</translation> @@ -2854,7 +2853,7 @@ <translation id="5367091008316207019">फ़ाइल पढ़ी जा रही है..</translation> <translation id="5367116720986018215">थ्रॉटल्ड</translation> <translation id="5368720394188453070">आपका फ़ोन लॉक हो गया है. प्रवेश करने के लिए उसे अनलॉक करें.</translation> -<translation id="5368779022775404937"><ph name="REALM" /> में प्रवेश करें</translation> +<translation id="5368779022775404937"><ph name="REALM" /> में साइन इन करें</translation> <translation id="5370819323174483825">&पुन: लोड करें</translation> <translation id="5372529912055771682">आपूर्ति किया गया नामांकन मोड, ऑपरेटिंग सिस्टम के इस वर्शन द्वारा समर्थित नहीं है. कृपया सुनिश्चित करें कि आप नवीनतम वर्शन चला रहे हैं और पुन: प्रयास करें.</translation> <translation id="5374359983950678924">चित्र बदलें</translation> @@ -2905,7 +2904,7 @@ <translation id="5434706434408777842">F3</translation> <translation id="5436492226391861498">प्रॉक्सी टनेल की प्रतीक्षा कर रहा है...</translation> <translation id="5436510242972373446">खोज <ph name="SITE_NAME" />:</translation> -<translation id="5436822233913560332">सभी ब्राउज़र विंडो, प्रवेश किए बिना जल्द ही अपने आप बंद हो जाएंगी.</translation> +<translation id="5436822233913560332">सभी ब्राउज़र विंडो, साइन इन किए बिना जल्द ही अपने आप बंद हो जाएंगी.</translation> <translation id="5438224778284622050">ऑफ़लाइन फ़ाइलें हटाएं?</translation> <translation id="544083962418256601">शॉर्टकट बनाएं...</translation> <translation id="5442228125690314719">डिस्क इमेज बनाते समय गड़बड़ी हुई. कृपया फिर से कोशिश करें.</translation> @@ -2946,7 +2945,7 @@ <translation id="5493792505296048976">स्क्रीन चालू है</translation> <translation id="5494362494988149300">&पू्र्ण होने पर खोलें</translation> <translation id="5494920125229734069">सभी को चुनें</translation> -<translation id="5495466433285976480">इससे, आपके द्वारा अगली बार पुन: प्रारंभ करने के बाद सभी स्थानीय उपयोगकर्ताओं, फ़ाइलों, डेटा, और अन्य सेटिंग को निकाल दिया जाएगा. सभी उपयोगकर्ताओं को पुन: प्रवेश करना होगा.</translation> +<translation id="5495466433285976480">इससे, आपके अगली बार फिर से प्रारंभ करने के बाद सभी स्थानीय उपयोगकर्ताओं, फ़ाइलों, डेटा, और अन्य सेटिंग को निकाल दिया जाएगा. सभी उपयोगकर्ताओं को फिर से साइन इन करना होगा.</translation> <translation id="5495597166260341369">प्रदर्शन चालू रखें</translation> <translation id="5496587651328244253">व्यवस्थित करें</translation> <translation id="549673810209994709">इस पेज का अनुवाद नहीं किया जा सका.</translation> @@ -3006,7 +3005,7 @@ <translation id="5569544776448152862"><ph name="BEGIN_BOLD" /><ph name="DOMAIN_NAME" /><ph name="END_BOLD" /> में नामांकन कर रहा है...</translation> <translation id="5575473780076478375">गुप्त एक्सटेंशन: <ph name="EXTENSION_NAME" /></translation> <translation id="557722062034137776">अपने डिवाइस को रीसेट करना आपके Google खातों या इन खातों से समन्वयित किसी भी डेटा को प्रभावित नहीं करेगा. हालांकि, आपके डिवाइस पर स्थानीय रूप से सहेजी गईं सभी फ़ाइलें हट जाएंगी.</translation> -<translation id="5578059481725149024">ऑटो प्रवेश</translation> +<translation id="5578059481725149024">ऑटो साइन इन</translation> <translation id="5581700288664681403"><ph name="CLOUD_PRINT_NAME" /> लोड हो रहा है</translation> <translation id="558170650521898289">Microsoft Windows Hardware Driver Verification</translation> <translation id="5582839680698949063">मुख्य मेनू</translation> @@ -3047,7 +3046,7 @@ <translation id="5627676517703583263">Chrome के ज़रिए स्मार्ट तरीके से ब्राउज़ करें</translation> <translation id="562935524653278697">आपके व्यवस्थापक ने आपके बुकमार्क, इतिहास, पासवर्ड और अन्य सेटिंग को सिंक करना अक्षम कर दिया है.</translation> <translation id="563535393368633106">एक्सेस करने से पहले पूछें (अनुशंसित)</translation> -<translation id="5636996382092289526"><ph name="NETWORK_ID" /> का उपयोग करने के लिए आपको सबसे पहले <ph name="LINK_START" />नेटवर्क के साइन-इन पेज पर जाना<ph name="LINK_END" /> होगा, जो कुछ ही सेकंड में अपने आप खुल जाएगा. अगर ऐसा नहीं होता तो नेटवर्क का उपयोग नहीं किया जा सकेगा.</translation> +<translation id="5636996382092289526"><ph name="NETWORK_ID" /> का उपयोग करने के लिए आपको सबसे पहले <ph name="LINK_START" />नेटवर्क के साइन-इन पृष्ठ पर जाना<ph name="LINK_END" /> होगा, जो कुछ ही सेकंड में स्वचालित रूप से खुल जाएगा. अगर ऐसा नहीं होता, तो नेटवर्क का उपयोग नहीं किया जा सकेगा.</translation> <translation id="5637476008227280525">मोबाइल डेटा सक्षम</translation> <translation id="5638309510554459422"><ph name="BEGIN_LINK" />Chrome वेब स्टोर<ph name="END_LINK" /> में एक्सटेंशन और थीम ढूंढें</translation> <translation id="5638497698949808140"><ph name="HOURS" /> घंटे पहले अपडेट किया गया</translation> @@ -3249,7 +3248,7 @@ <translation id="5939518447894949180">रीसेट करें</translation> <translation id="5939847200023027600">PDF कंपोज़िटर सेवा</translation> <translation id="5941153596444580863">व्यक्ति को शामिल करें...</translation> -<translation id="5941343993301164315">कृपया <ph name="TOKEN_NAME" /> में प्रवेश करें.</translation> +<translation id="5941343993301164315">कृपया <ph name="TOKEN_NAME" /> में साइन इन करें.</translation> <translation id="5941711191222866238">छोटा करें</translation> <translation id="5946591249682680882">रिपोर्ट आईडी <ph name="WEBRTC_LOG_REPORT_ID" /></translation> <translation id="5949544233750246342">फ़ाइल को पार्स नहीं किया जा सका</translation> @@ -3408,7 +3407,7 @@ <translation id="6189412234224385711"><ph name="EXTENSION_NAME" /> से खोलें</translation> <translation id="6196640612572343990">तृतीय पक्ष कुकी ब्लॉक करें</translation> <translation id="6196854373336333322">एक्सटेंशन "<ph name="EXTENSION_NAME" />" ने आपकी प्रॉक्सी सेटिंग पर नियंत्रण कर लिया है, जिसका अर्थ है कि यह आपके द्वारा ऑनलाइन किए जाने वाले कार्यों को बदल सकता है, रोक सकता है या उसे छिप कर सुन सकता है. यदि आप सुनिश्चित नहीं हैं कि यह बदलाव क्यों हुआ है, तो संभवत: आप उसे नहीं चाहते हैं.</translation> -<translation id="6198102561359457428">प्रस्थान करें फिर पुन: प्रवेश करें...</translation> +<translation id="6198102561359457428">साइन आउट करें फिर दुबारा साइन इन करें...</translation> <translation id="6198252989419008588">पिन बदलें</translation> <translation id="6199801702437275229">स्थान जानकारी की प्रतीक्षा कर रहा है...</translation> <translation id="6201792273624501289">Linux ऐप्लिकेशन</translation> @@ -3661,7 +3660,7 @@ <translation id="6579705087617859690"><ph name="WINDOW_TITLE" /> - डेस्कटॉप की सामग्री शेयर की गई</translation> <translation id="6580151766480067746">ARC वर्शन</translation> <translation id="6581162200855843583">Google डिस्क लिंक</translation> -<translation id="6582421931165117398">अपनी व्यक्तिगत जानकारी की सुरक्षा करने के लिए, अभी अपना पासवर्ड बदलें. आपके पासवर्ड बदलने से पहले आपको प्रवेश करने के लिए कहा जाएगा.</translation> +<translation id="6582421931165117398">अपनी व्यक्तिगत जानकारी की सुरक्षा करने के लिए, अभी अपना पासवर्ड बदलें. आपके पासवर्ड बदलने से पहले आपको साइन इन करने के लिए कहा जाएगा.</translation> <translation id="6583851739559471707">ऐसी साइटों पर ब्लॉक है जो तंग करने वाले विज्ञापन दिखाने के लिए जानी जाती हैं (सुझाया गया)</translation> <translation id="6584878029876017575">Microsoft Lifetime Signing</translation> <translation id="6585283250473596934">सार्वजनिक सत्र में प्रवेश कर रहा है.</translation> @@ -3808,7 +3807,7 @@ <translation id="6802031077390104172"><ph name="USAGE" /> (<ph name="OID" />)</translation> <translation id="6804671422566312077">सभी बुकमार्क &नई विंडो में खोलें</translation> <translation id="6805038906417219576">ठीक है</translation> -<translation id="6805647936811177813"><ph name="HOST_NAME" /> से क्लाइंट प्रमाणपत्र आयात करने के लिए, कृपया <ph name="TOKEN_NAME" /> में प्रवेश करें.</translation> +<translation id="6805647936811177813"><ph name="HOST_NAME" /> से क्लाइंट प्रमाणपत्र आयात करने के लिए, कृपया <ph name="TOKEN_NAME" /> में साइन इन करें.</translation> <translation id="680572642341004180"><ph name="SHORT_PRODUCT_OS_NAME" /> पर RLZ ट्रैकिंग सक्षम करें.</translation> <translation id="6807889908376551050">सभी दिखाएं...</translation> <translation id="6810613314571580006">संग्रहित क्रेडेंशियल का उपयोग करके वेबसाइट में अपने आप प्रवेश करें. सुविधा के अक्षम होने पर, किसी वेबसाइट में प्रवेश करने से पहले आपसे हर बार पुष्टि के लिए कहा जाएगा.</translation> @@ -3912,7 +3911,7 @@ <translation id="6981982820502123353">पहुंच क्षमता</translation> <translation id="6983783921975806247">पंजीकृत OID</translation> <translation id="6983991971286645866">सभी संपादन $1 पर सहेजे जाएंगे.</translation> -<translation id="6984299437918708277">प्रवेश स्क्रीन पर अपने खाते के लिए प्रदर्शित किया जाने वाला चित्र चुनें</translation> +<translation id="6984299437918708277">साइन इन स्क्रीन पर अपने खाते के लिए प्रदर्शित किया जाने वाला चित्र चुनें</translation> <translation id="6985235333261347343">Microsoft Key Recovery Agent</translation> <translation id="6985607387932385770">प्रिंटर</translation> <translation id="6990081529015358884">अब आपके पास और स्थान शेष नहीं है</translation> @@ -4335,7 +4334,7 @@ <translation id="765293928828334535">इस वेबसाइट से ऐप्लिकेशन, एक्सटेंशन और उपयोगकर्ता स्क्रिप्ट नहीं जोड़े जा सकते हैं</translation> <translation id="7654941827281939388">यह खाता पहले से ही इस कंप्यूटर पर उपयोग किया जा रहा है.</translation> <translation id="7658239707568436148">अभी नहीं</translation> -<translation id="7659584679870740384">आप इस डिवाइस का उपयोग करने के लिए अधिकृत नहीं हैं. कृपया प्रवेश अनुमति के लिए नियंत्रक से संपर्क करें.</translation> +<translation id="7659584679870740384">आप इस डिवाइस का उपयोग करने के लिए अधिकृत नहीं हैं. कृपया साइन इन अनुमति के लिए नियंत्रक से संपर्क करें.</translation> <translation id="7661259717474717992">साइटों को कुकी डेटा सहेजने और पढ़ने दें</translation> <translation id="7661451191293163002">पंजीकरण प्रमाणपत्र नहीं लिया जा सका.</translation> <translation id="7662283695561029522">कॉन्फ़िगर करने के लिए टैप करें</translation> @@ -4486,7 +4485,7 @@ <translation id="7849264908733290972">नए टैब में &छवि खोलें</translation> <translation id="784934925303690534">समय सीमा</translation> <translation id="7850851215703745691">इन डिस्क फ़ाइलों को अभी तक शेयर नहीं किया गया है</translation> -<translation id="7851457902707056880">प्रवेश को केवल मालिक खाते तक प्रतिबंधित कर दिया गया है. कृपया रीबूट करें और मालिक खाते से प्रवेश करें. मशीन 30 सेकंड में स्वत: रीबूट हो जाएगी.</translation> +<translation id="7851457902707056880">साइन इन को केवल मालिक खाते तक प्रतिबंधित कर दिया गया है. कृपया रीबूट करें और मालिक खाते से साइन इन करें. मशीन 30 सेकंड में स्वत: रीबूट हो जाएगी.</translation> <translation id="7851716364080026749">कैमरा और माइक्रोफ़ोन एक्सेस हमेशा अवरुद्ध करें</translation> <translation id="7851816139220202929">NFC के ज़रिए अपनी 'सुरक्षा चाबी' का इस्तेमाल करें</translation> <translation id="7853747251428735">अधिक टू&ल</translation> @@ -4525,7 +4524,7 @@ <translation id="7903345046358933331">पेज कोई प्रतिसाद नहीं दे रहा है. आप उसके प्रतिसाद देने तक प्रतीक्षा कर सकते हैं या उसे बंद कर सकते हैं.</translation> <translation id="7903742244674067440">इन प्रमाणपत्र प्राधिकारियों की पहचान करने वाले प्रमाणपत्र आपके रिकॉर्ड में हैं</translation> <translation id="7903925330883316394">उपयोगिता: <ph name="UTILITY_TYPE" /></translation> -<translation id="7904094684485781019">इस खाते के व्यवस्थापक ने एकाधिक प्रवेश को अस्वीकार कर दिया है.</translation> +<translation id="7904094684485781019">इस खाते के व्यवस्थापक ने एक से ज़्यादा साइन-इन को अक्षम कर दिया है.</translation> <translation id="7904402721046740204">प्रमाणित किया जा रहा है</translation> <translation id="7908378463497120834">क्षमा करें, आपके बाह्य मेमोरी डिवाइस पर कम-से-कम एक विभाजन माउंट नहीं हो सका.</translation> <translation id="7909969815743704077">गुप्त मोड में डाउनलोड किया गया</translation> @@ -4689,7 +4688,7 @@ <translation id="8140778357236808512">'निगरानी में रखा गया कोई मौजूदा उपयोगकर्ता' चुनें</translation> <translation id="8141725884565838206">अपने पासवर्ड प्रबंधित करें</translation> <translation id="8143442547342702591">अमान्य ऐप्लिकेशन</translation> -<translation id="8146177459103116374">अगर इस डिवाइस पर आपने पहले से रजिस्ट्रेशन किया है तो, आप <ph name="LINK2_START" />मौजूदा उपयोगकर्ता के रूप में साइन इन<ph name="LINK2_END" /> कर सकते हैं.</translation> +<translation id="8146177459103116374">अगर आप इस उपकरण पर पहले से पंजीकृत हैं, तो आप <ph name="LINK2_START" />मौजूदा उपयोगकर्ता के रूप में साइन इन<ph name="LINK2_END" /> कर सकते हैं.</translation> <translation id="8146793085009540321">प्रवेश करना विफल रहा. कृपया अपने व्यवस्थापक से संपर्क करें या पुन: प्रयास करें.</translation> <translation id="8151185429379586178">डेवलपर टूल</translation> <translation id="8151638057146502721">कॉन्फ़िगर करें</translation> @@ -4777,7 +4776,7 @@ <translation id="8282947398454257691">आपका अद्वितीय डिवाइस पहचानकर्ता पता करना</translation> <translation id="8283475148136688298">"<ph name="DEVICE_NAME" />" से कनेक्ट करते समय प्रमाणीकरण कोड अस्वीकार हो गया.</translation> <translation id="8284279544186306258">सभी <ph name="WEBSITE_1" /> साइटें</translation> -<translation id="8286036467436129157">प्रवेश करें</translation> +<translation id="8286036467436129157">साइन इन करें</translation> <translation id="8286963743045814739">आप गुप्त विंडो का उपयोग करके निजी रूप से ब्राउज़ कर सकते हैं</translation> <translation id="82871696630048499">वेब पेज दोबारा लोड किया गया क्योंकि उसके लिए ज़रूरी मेमोरी नहीं बची थी.</translation> <translation id="8291967909914612644">होम प्रदाता देश</translation> @@ -4920,7 +4919,7 @@ <translation id="8538358978858059843">Cast के लिए क्लाउड सेवाएं चालू करें?</translation> <translation id="8539727552378197395">नहीं (केवल Http)</translation> <translation id="8541166929715485291">सिस्टम डेटा भेजें. निदान और डिवाइस और ऐप्लिकेशन के इस्तेमाल का डेटा Google को अपने आप भेजें. यह सेटिंग डिवाइस के मालिक ने लागू की है. मालिक Google को निदान और इस डिवाइस के इस्तेमाल का डेटा भेजना चुन सकता है. आप इसे <ph name="BEGIN_LINK1" />सेटिंग<ph name="END_LINK1" /> में जाकर देख सकते हैं. अगर आपने अतिरिक्त वेब और ऐप्लिकेशन गतिविधि चालू की है, तो यह जानकारी आपके खाते से संग्रहित की जाएगी, ताकि आप इसे मेरी गतिविधि में प्रबंधित कर सकें. <ph name="BEGIN_LINK2" />अधिक जानें<ph name="END_LINK2" /></translation> -<translation id="8545575359873600875">माफ़ करें, आपके पासवर्ड की पुष्टि नहीं हो सकी. हो सकता है कि इस 'निगरानी में रखे गए उपयोगकर्ता' के प्रबंधक ने हाल ही में पासवर्ड बदल दिया हाे. अगर ऐसा है तो, अगली बार जब आप साइन इन करेंगे तो नया पासवर्ड लागू होगा. अपने पुराने पासवर्ड का उपयोग करके देखें.</translation> +<translation id="8545575359873600875">क्षमा करें, आपका पासवर्ड सत्यापित नहीं किया जा सका. हो सकता है इस निगरानी में रखे गए उपयोगकर्ता के प्रबंधक ने हाल ही में पासवर्ड बदल दिया हाे. अगर ऐसा है, तो आपके अगली बार साइन इन करने पर नया पासवर्ड लागू होगा. अपने पुराने पासवर्ड का उपयोग करके देखें.</translation> <translation id="8546186510985480118">डिवाइस में स्पेस कम है</translation> <translation id="8546306075665861288">चित्र संचय</translation> <translation id="8546541260734613940">[*.]example.com</translation> @@ -5019,7 +5018,7 @@ <translation id="8677212948402625567">सभी संक्षिप्त करें...</translation> <translation id="8678648549315280022">डाउनलोड सेटिंग प्रबंधित करें...</translation> <translation id="8678933587484842200">आप इस ऐप्लिकेशन को कैसे लॉन्च करना चाहते हैं?</translation> -<translation id="8680251145628383637">अपने सभी डिवाइसों पर अपने बुकमार्क, इतिहास, पासवर्ड और अन्य सेटिंग प्राप्त करने के लिए प्रवेश करें. आप अपनी Google सेवाओं में भी अपने आप प्रवेश कर जाएंगे.</translation> +<translation id="8680251145628383637">अपने सभी डिवाइसों पर अपने बुकमार्क, इतिहास, पासवर्ड और अन्य सेटिंग प्राप्त करने के लिए साइन इन करें. आप अपनी Google सेवाओं में भी अपने आप साइन इन कर जाएंगे.</translation> <translation id="8686213429977032554">यह डिस्क अभी तक शेयर नहीं की गई है</translation> <translation id="8687485617085920635">अगली विंडो</translation> <translation id="8688579245973331962">आपका नाम दिखाई नहीं दे रहा?</translation>
diff --git a/chrome/app/resources/generated_resources_hr.xtb b/chrome/app/resources/generated_resources_hr.xtb index c5ed6086..7a1e5ac 100644 --- a/chrome/app/resources/generated_resources_hr.xtb +++ b/chrome/app/resources/generated_resources_hr.xtb
@@ -458,7 +458,6 @@ <translation id="166179487779922818">Zaporka je prekratka.</translation> <translation id="1661867754829461514">Nedostaje PIN</translation> <translation id="16620462294541761">Žao nam je, nije bilo moguće potvrditi zaporku. Pokušajte ponovo.</translation> -<translation id="1662550410081243962">Spremi i popuni načine plaćanja</translation> <translation id="166278006618318542">Algoritam predmeta javnog ključa</translation> <translation id="166439687370499867">Promjena zajedničkih konfiguracija mreže nije dopuštena</translation> <translation id="1665611772925418501">Nije bilo moguće mijenjati datoteku.</translation> @@ -866,7 +865,6 @@ <translation id="2282146716419988068">GPU proces</translation> <translation id="2282155092769082568">URL za automatsku konfiguraciju:</translation> <translation id="2283117145434822734">F6</translation> -<translation id="2283340219607151381">Spremi i popuni adrese</translation> <translation id="2286841657746966508">Adresa za naplatu</translation> <translation id="2288181517385084064">Prijeđi na videorekorder</translation> <translation id="2288735659267887385">Postavke pristupačnosti</translation>
diff --git a/chrome/app/resources/generated_resources_hu.xtb b/chrome/app/resources/generated_resources_hu.xtb index b1b4988c..555a1be 100644 --- a/chrome/app/resources/generated_resources_hu.xtb +++ b/chrome/app/resources/generated_resources_hu.xtb
@@ -458,7 +458,6 @@ <translation id="166179487779922818">A jelszó túl rövid.</translation> <translation id="1661867754829461514">Hiányzó PIN-kód</translation> <translation id="16620462294541761">Sajnáljuk, jelszavát nem sikerült megerősíteni. Próbálja meg újra.</translation> -<translation id="1662550410081243962">Fizetési módok mentése és betöltése</translation> <translation id="166278006618318542">Nyilvános kulcs algoritmusa</translation> <translation id="166439687370499867">A megosztott hálózati konfigurációk módosítása nem engedélyezett</translation> <translation id="1665611772925418501">A fájlt nem lehet módosítani.</translation> @@ -866,7 +865,6 @@ <translation id="2282146716419988068">GPU-folyamat</translation> <translation id="2282155092769082568">URL automatikus konfigurációja:</translation> <translation id="2283117145434822734">F6</translation> -<translation id="2283340219607151381">Címek mentése és betöltése</translation> <translation id="2286841657746966508">Számlázási cím</translation> <translation id="2288181517385084064">Váltás videófelvevőre</translation> <translation id="2288735659267887385">Kisegítő beállítások</translation> @@ -1371,6 +1369,7 @@ <translation id="3031557471081358569">Válassza ki az importálandó elemeket:</translation> <translation id="3031601332414921114">A nyomtatás folytatása</translation> <translation id="303198083543495566">Földrajzi helyzet</translation> +<translation id="3033999583152214331">Linuxos eszközök, szerkesztők és IDE-szoftverek futtatása a Chromebookon. <a target="_blank" href="<ph name="URL" />">További információ</a>.</translation> <translation id="3036546437875325427">Flash engedélyezése</translation> <translation id="3037754279345160234">Nem lehet elemezni a domaincsatlakoztatási konfigurációt. Vegye fel a kapcsolatot a rendszergazdával.</translation> <translation id="3038612606416062604">Nyomtató hozzáadása manuálisan</translation>
diff --git a/chrome/app/resources/generated_resources_id.xtb b/chrome/app/resources/generated_resources_id.xtb index 1f70d0f..2aa1787 100644 --- a/chrome/app/resources/generated_resources_id.xtb +++ b/chrome/app/resources/generated_resources_id.xtb
@@ -458,7 +458,6 @@ <translation id="166179487779922818">Sandi terlalu pendek.</translation> <translation id="1661867754829461514">PIN hilang</translation> <translation id="16620462294541761">Maaf, sandi Anda tidak dapat diverifikasi. Harap coba lagi.</translation> -<translation id="1662550410081243962">Simpan dan isi metode pembayaran</translation> <translation id="166278006618318542">Algoritme Kunci Publik Subjek</translation> <translation id="166439687370499867">Mengubah konfigurasi jaringan bersama tidak diizinkan</translation> <translation id="1665611772925418501">File tidak dapat diubah.</translation> @@ -866,7 +865,6 @@ <translation id="2282146716419988068">Proses GPU</translation> <translation id="2282155092769082568">URL konfigurasi otomatis:</translation> <translation id="2283117145434822734">F6</translation> -<translation id="2283340219607151381">Simpan dan isi alamat</translation> <translation id="2286841657746966508">Alamat penagihan</translation> <translation id="2288181517385084064">Beralih ke perekam video</translation> <translation id="2288735659267887385">Setelan aksesibilitas</translation>
diff --git a/chrome/app/resources/generated_resources_it.xtb b/chrome/app/resources/generated_resources_it.xtb index f1bd0793..814de7a3 100644 --- a/chrome/app/resources/generated_resources_it.xtb +++ b/chrome/app/resources/generated_resources_it.xtb
@@ -458,7 +458,6 @@ <translation id="166179487779922818">La password è troppo corta.</translation> <translation id="1661867754829461514">PIN mancante</translation> <translation id="16620462294541761">Spiacenti, impossibile verificare la password. Riprova.</translation> -<translation id="1662550410081243962">Salva e compila i metodi di pagamento</translation> <translation id="166278006618318542">Algoritmo chiave pubblica del soggetto</translation> <translation id="166439687370499867">La modifica delle configurazioni di rete condivise non è consentita</translation> <translation id="1665611772925418501">Impossibile modificare il file.</translation> @@ -866,7 +865,6 @@ <translation id="2282146716419988068">Processo GPU</translation> <translation id="2282155092769082568">URL di configurazione automatica:</translation> <translation id="2283117145434822734">F6</translation> -<translation id="2283340219607151381">Salva e compila gli indirizzi</translation> <translation id="2286841657746966508">Indirizzo di fatturazione</translation> <translation id="2288181517385084064">Passa al videoregistratore</translation> <translation id="2288735659267887385">Impostazioni di accessibilità</translation>
diff --git a/chrome/app/resources/generated_resources_iw.xtb b/chrome/app/resources/generated_resources_iw.xtb index 75cabcaf..e49edc6 100644 --- a/chrome/app/resources/generated_resources_iw.xtb +++ b/chrome/app/resources/generated_resources_iw.xtb
@@ -271,6 +271,7 @@ <translation id="1397854323885047133">סנכרון והתאמה אישית</translation> <translation id="1398853756734560583">הגדל</translation> <translation id="1399511500114202393">אין אישור משתמש</translation> +<translation id="1401165786814632797">גישה אל Assistant בכל פעם שאומרים "OK Google" כשהמכשיר אינו במצב שינה ואינו נעול.</translation> <translation id="140250605646987970">הטלפון שלך נמצא, אך Smart Lock פועל רק במכשירי Android מגרסה 5.0 ואילך. <a>למידע נוסף</a></translation> <translation id="140520891692800925"><ph name="PROFILE_DISPLAY_NAME" /> (בפיקוח)</translation> <translation id="1405476660552109915">האם ברצונך ש-<ph name="PASSWORD_MANAGER_BRAND" /> ישמור את חשבונך לאתר הזה?</translation> @@ -454,7 +455,6 @@ <translation id="166179487779922818">הסיסמה קצרה מדי.</translation> <translation id="1661867754829461514">חסר PIN</translation> <translation id="16620462294541761">מצטערים, לא ניתן לאמת את הסיסמה שלך. נסה שוב.</translation> -<translation id="1662550410081243962">שמירה ומילוי של אמצעי תשלום</translation> <translation id="166278006618318542">אלגוריתם מפתח ציבורי של נושא</translation> <translation id="166439687370499867">אין אישור לשנות את תצורת הרשתות המשותפות</translation> <translation id="1665611772925418501">הקובץ לא ניתן לשינוי.</translation> @@ -862,7 +862,6 @@ <translation id="2282146716419988068">תהליך GPU</translation> <translation id="2282155092769082568">כתובת אתר של תצורה אוטומטית:</translation> <translation id="2283117145434822734">F6</translation> -<translation id="2283340219607151381">שמירה ומילוי של כתובות</translation> <translation id="2286841657746966508">כתובת לחיוב</translation> <translation id="2288181517385084064">מעבר למקליט וידאו</translation> <translation id="2288735659267887385">הגדרות של נגישות</translation> @@ -1366,6 +1365,7 @@ <translation id="3031557471081358569">בחר פריטים לייבוא:</translation> <translation id="3031601332414921114">המשך בהדפסה</translation> <translation id="303198083543495566">גיאוגרפיה</translation> +<translation id="3033999583152214331">הפעלת כלים, עורכים וסביבות פיתוח משולבות (IDE) של Linux ב-Chromebook. <a target="_blank" href="<ph name="URL" />">מידע נוסף</a></translation> <translation id="3036546437875325427">הפעל Flash</translation> <translation id="3037754279345160234">אי אפשר לנתח את התצורה כדי להצטרף לדומיין. יש לפנות למנהל המערכת.</translation> <translation id="3038612606416062604">הוספה ידנית של מדפסת</translation> @@ -1506,6 +1506,7 @@ <translation id="3271648667212143903"><ph name="ORIGIN" /> רוצה להתחבר אל</translation> <translation id="3274763671541996799">עברת למסך מלא.</translation> <translation id="3275778913554317645">פתח כחלון</translation> +<translation id="3278877214895457897">אחרי הגדרת ה-Chromebook, כדי לקבל עזרה מה-Assistant אפשר ללחוץ על לחצן ה-Assistant או לומר "OK Google".</translation> <translation id="3279230909244266691">הפעולה עשויה להימשך מספר דקות. מתבצעת הפעלה של המכונה הווירטואלית.</translation> <translation id="3279741024917655738">הצגת סרטונים במסך מלא פועלת</translation> <translation id="3280237271814976245">שמור &בשם...</translation> @@ -2599,6 +2600,7 @@ <translation id="4992066212339426712">בטל השתקה</translation> <translation id="4992458225095111526">אשר פעולת Powerwash</translation> <translation id="4992473555164495036">מנהל המערכת הגביל את שיטות הקלט הזמינות.</translation> +<translation id="4992926179187649719">הפעלת 'Ok Google'</translation> <translation id="4994474651455208930">אפשר לאתרים לבקש להפוך למטפלי ברירת המחדל עבור פרוטוקולים</translation> <translation id="4994754230098574403">בתהליך הגדרה</translation> <translation id="4996978546172906250">שתף באמצעות</translation> @@ -4523,6 +4525,7 @@ <translation id="7908378463497120834">מצטערים, לא ניתן להעלות לפחות מחיצה אחת במכשיר האחסון החיצוני שלך.</translation> <translation id="7909969815743704077">ההורדה בוצעה במצב גלישה בסתר</translation> <translation id="7910768399700579500">&תיקייה חדשה</translation> +<translation id="7911118814695487383">Linux</translation> <translation id="7912080627461681647">הסיסמה שלך שונתה בשרת. צא ולאחר מכן היכנס מחדש.</translation> <translation id="7915471803647590281">ספר לנו מה קורה לפני שליחת המשוב.</translation> <translation id="7916556741383518510">בזמן לחיצה</translation>
diff --git a/chrome/app/resources/generated_resources_ja.xtb b/chrome/app/resources/generated_resources_ja.xtb index 98256c9..d9b9e9df 100644 --- a/chrome/app/resources/generated_resources_ja.xtb +++ b/chrome/app/resources/generated_resources_ja.xtb
@@ -458,7 +458,6 @@ <translation id="166179487779922818">パスワードが短すぎます。</translation> <translation id="1661867754829461514">PIN がありません</translation> <translation id="16620462294541761">パスワードを確認できませんでした。もう一度お試しください。</translation> -<translation id="1662550410081243962">お支払い方法の保存と入力</translation> <translation id="166278006618318542">サブジェクトの公開鍵アルゴリズム</translation> <translation id="166439687370499867">共有のネットワーク設定を変更することはできません</translation> <translation id="1665611772925418501">ファイルを修正することができませんでした。</translation> @@ -866,7 +865,6 @@ <translation id="2282146716419988068">GPU プロセス</translation> <translation id="2282155092769082568">自動設定 URL:</translation> <translation id="2283117145434822734">F6</translation> -<translation id="2283340219607151381">住所の保存と入力</translation> <translation id="2286841657746966508">請求先住所</translation> <translation id="2288181517385084064">動画レコーダーに切り替え</translation> <translation id="2288735659267887385">ユーザー補助機能の設定</translation> @@ -1370,6 +1368,7 @@ <translation id="3031557471081358569">インポートするデータを選択:</translation> <translation id="3031601332414921114">印刷を再開</translation> <translation id="303198083543495566">位置情報</translation> +<translation id="3033999583152214331">Chromebook で Linux のツール、エディタ、IDE を実行します。<a target="_blank" href="<ph name="URL" />">詳細</a></translation> <translation id="3036546437875325427">Flash を有効にする</translation> <translation id="3037754279345160234">ドメインの参加設定を解析できません。管理者にお問い合わせください。</translation> <translation id="3038612606416062604">プリンタを手動で追加</translation>
diff --git a/chrome/app/resources/generated_resources_kn.xtb b/chrome/app/resources/generated_resources_kn.xtb index f6469e8..323bd0d 100644 --- a/chrome/app/resources/generated_resources_kn.xtb +++ b/chrome/app/resources/generated_resources_kn.xtb
@@ -455,7 +455,6 @@ <translation id="166179487779922818">ಪಾಸ್ವರ್ಡ್ ತುಂಬಾ ಚಿಕ್ಕದಾಗಿದೆ.</translation> <translation id="1661867754829461514">PIN ಕಾಣೆಯಾಗಿದೆ</translation> <translation id="16620462294541761">ಕ್ಷಮಿಸಿ, ನಿಮ್ಮ ಪಾಸ್ವರ್ಡ್ ಅನ್ನು ಪರಿಶೀಲಿಸಲಾಗುವುದಿಲ್ಲ. ದಯವಿಟ್ಟು ಮತ್ತೆ ಪ್ರಯತ್ನಿಸಿ.</translation> -<translation id="1662550410081243962">ಪಾವತಿ ವಿಧಾನಗಳನ್ನು ಉಳಿಸಿ ಮತ್ತು ಭರ್ತಿ ಮಾಡಿ</translation> <translation id="166278006618318542">ವಿಷಯ ಸಾರ್ವಜನಿಕ ಕೀಲಿ ಆಲ್ಗಾರಿದಮ್</translation> <translation id="166439687370499867">ಹಂಚಿದ ನೆಟ್ವರ್ಕ್ ಕಾನ್ಫಿಗರ್ಗಳನ್ನು ಬದಲಾಯಿಸಲು ಅನುಮತಿಸುವುದಿಲ್ಲ</translation> <translation id="1665611772925418501">ಫೈಲ್ ಅನ್ನು ಮಾರ್ಪಡಿಸಲಾಗಲಿಲ್ಲ.</translation> @@ -863,7 +862,6 @@ <translation id="2282146716419988068">GPU ಪ್ರಕ್ರಿಯೆ</translation> <translation id="2282155092769082568">ಸ್ವಯಂ ಕಾನ್ಫಿಗರೇಶನ್ URL:</translation> <translation id="2283117145434822734">F6</translation> -<translation id="2283340219607151381">ವಿಳಾಸಗಳನ್ನು ಉಳಿಸಿ ಮತ್ತು ಭರ್ತಿ ಮಾಡಿ</translation> <translation id="2286841657746966508">ಬಿಲ್ಲಿಂಗ್ ವಿಳಾಸ</translation> <translation id="2288181517385084064">ವೀಡಿಯೊ ರೆಕಾರ್ಡರ್ಗೆ ಬದಲಿಸಿ</translation> <translation id="2288735659267887385">ಪ್ರವೇಶಿಸುವಿಕೆ ಸೆಟ್ಟಿಂಗ್ಗಳು</translation>
diff --git a/chrome/app/resources/generated_resources_ko.xtb b/chrome/app/resources/generated_resources_ko.xtb index d3a751c..5445d42 100644 --- a/chrome/app/resources/generated_resources_ko.xtb +++ b/chrome/app/resources/generated_resources_ko.xtb
@@ -458,7 +458,6 @@ <translation id="166179487779922818">비밀번호가 너무 짧습니다.</translation> <translation id="1661867754829461514">PIN이 없습니다.</translation> <translation id="16620462294541761">비밀번호가 일치하지 않습니다. 다시 시도해 주세요.</translation> -<translation id="1662550410081243962">결제 수단 저장 및 자동 입력</translation> <translation id="166278006618318542">대상 공개 키 알고리즘</translation> <translation id="166439687370499867">공유 네트워크 설정 변경은 허용되지 않습니다</translation> <translation id="1665611772925418501">파일을 수정하지 못했습니다.</translation> @@ -866,7 +865,6 @@ <translation id="2282146716419988068">GPU 프로세스</translation> <translation id="2282155092769082568">자동설정 URL:</translation> <translation id="2283117145434822734">F6</translation> -<translation id="2283340219607151381">주소 저장 및 자동 입력</translation> <translation id="2286841657746966508">결제주소</translation> <translation id="2288181517385084064">동영상 녹화로 전환</translation> <translation id="2288735659267887385">접근성 설정</translation> @@ -1370,6 +1368,7 @@ <translation id="3031557471081358569">가져올 항목 선택:</translation> <translation id="3031601332414921114">인쇄 계속하기</translation> <translation id="303198083543495566">위치</translation> +<translation id="3033999583152214331">Chromebook에서 Linux 도구, 편집기, IDE를 실행하세요. <a target="_blank" href="<ph name="URL" />">자세히 알아보기</a></translation> <translation id="3036546437875325427">Flash 사용</translation> <translation id="3037754279345160234">도메인 연결 구성을 파싱할 수 없습니다. 관리자에게 문의하세요.</translation> <translation id="3038612606416062604">수동으로 프린터 추가</translation>
diff --git a/chrome/app/resources/generated_resources_lt.xtb b/chrome/app/resources/generated_resources_lt.xtb index 8d0a5f5..6e35508 100644 --- a/chrome/app/resources/generated_resources_lt.xtb +++ b/chrome/app/resources/generated_resources_lt.xtb
@@ -458,7 +458,6 @@ <translation id="166179487779922818">Slaptažodis per trumpas.</translation> <translation id="1661867754829461514">Trūksta PIN kodo</translation> <translation id="16620462294541761">Atsiprašome, slaptažodžio patvirtinti nepavyko. Bandykite dar kartą.</translation> -<translation id="1662550410081243962">Išsaugoti ir užpildyti mokėjimo metodų informaciją</translation> <translation id="166278006618318542">Subjekto privačiojo rakto algoritmas</translation> <translation id="166439687370499867">Neleidžiama keisti bendrinamo tinklo konfigūracijos</translation> <translation id="1665611772925418501">Nepavyko pakeisti failo.</translation> @@ -866,7 +865,6 @@ <translation id="2282146716419988068">GPU procesas</translation> <translation id="2282155092769082568">Automatinės konfigūracijos URL:</translation> <translation id="2283117145434822734">F6</translation> -<translation id="2283340219607151381">Išsaugoti ir užpildyti adresus</translation> <translation id="2286841657746966508">Atsiskaitymo adresas</translation> <translation id="2288181517385084064">Perjungti į vaizdo įrašymo priemonę</translation> <translation id="2288735659267887385">Pasiekiamumo nustatymai</translation> @@ -1370,6 +1368,7 @@ <translation id="3031557471081358569">Pasirinkite elementus importuoti:</translation> <translation id="3031601332414921114">Tęsti spausdinimą</translation> <translation id="303198083543495566">Geografija</translation> +<translation id="3033999583152214331">Paleiskite „Linux“ įrankius, redagavimo priemones ir IDE savo „Chromebook“ įrenginyje. <a target="_blank" href="<ph name="URL" />">Sužinokite daugiau</a></translation> <translation id="3036546437875325427">Įgalinti „Flash“</translation> <translation id="3037754279345160234">Nepavyko išanalizuoti domeno prisijungimo konfigūracijos. Susisiekite su administratoriumi.</translation> <translation id="3038612606416062604">Pridėti spausdintuvą neautomatiškai</translation>
diff --git a/chrome/app/resources/generated_resources_lv.xtb b/chrome/app/resources/generated_resources_lv.xtb index 3d49e4d..d0d5e88a 100644 --- a/chrome/app/resources/generated_resources_lv.xtb +++ b/chrome/app/resources/generated_resources_lv.xtb
@@ -458,7 +458,6 @@ <translation id="166179487779922818">Parole ir pārāk īsa.</translation> <translation id="1661867754829461514">Trūkst PIN koda</translation> <translation id="16620462294541761">Diemžēl jūsu paroli nevarēja verificēt. Lūdzu, mēģiniet vēlreiz.</translation> -<translation id="1662550410081243962">Saglabāt un aizpildīt maksājuma veidus</translation> <translation id="166278006618318542">Subjekta publiskās atslēgas algoritms</translation> <translation id="166439687370499867">Nav atļauts mainīt koplietota tīkla konfigurāciju.</translation> <translation id="1665611772925418501">Failu nevarēja pārveidot.</translation> @@ -866,7 +865,6 @@ <translation id="2282146716419988068">GPU process</translation> <translation id="2282155092769082568">Automātiskās konfigurācijas vietrādis URL</translation> <translation id="2283117145434822734">F6</translation> -<translation id="2283340219607151381">Saglabāt un aizpildīt adreses</translation> <translation id="2286841657746966508">Norēķinu adrese</translation> <translation id="2288181517385084064">Pārslēgt uz video ierakstītāju</translation> <translation id="2288735659267887385">Pieejamības iestatījumi</translation> @@ -1370,6 +1368,7 @@ <translation id="3031557471081358569">Izvēlieties importējamos vienumus:</translation> <translation id="3031601332414921114">Atsākt drukāšanu</translation> <translation id="303198083543495566">Ģeogrāfiskie dati</translation> +<translation id="3033999583152214331">Palaidiet Linux rīkus, redaktorus un IDE savā Chromebook datorā. <a target="_blank" href="<ph name="URL" />">Uzziniet vairāk</a>.</translation> <translation id="3036546437875325427">Iespējot Flash</translation> <translation id="3037754279345160234">Nevar parsēt domēna pievienošanas konfigurāciju. Lūdzu, sazinieties ar administratoru.</translation> <translation id="3038612606416062604">Printera manuāla pievienošana</translation>
diff --git a/chrome/app/resources/generated_resources_ml.xtb b/chrome/app/resources/generated_resources_ml.xtb index 970c38d..c092f6b 100644 --- a/chrome/app/resources/generated_resources_ml.xtb +++ b/chrome/app/resources/generated_resources_ml.xtb
@@ -455,7 +455,6 @@ <translation id="166179487779922818">പാസ്വേഡ് വളരെ ചെറുതാണ്.</translation> <translation id="1661867754829461514">PIN കാണാനില്ല</translation> <translation id="16620462294541761">ക്ഷമിക്കൂ, നിങ്ങളുടെ രഹസ്യവാക്ക് പരിശോധിക്കാന് കഴിഞ്ഞില്ല. ദയവായി വീണ്ടും ശ്രമിക്കുക.</translation> -<translation id="1662550410081243962">പേയ്മെന്റ് രീതികൾ സംരക്ഷിച്ച് സ്വമേധയാ പൂരിപ്പിക്കുക</translation> <translation id="166278006618318542">സബ്ജക്റ്റ് പൊതു കീ അല്ഗോരിതം</translation> <translation id="166439687370499867">പങ്കിട്ട നെറ്റ്വര്ക്ക് കോൺഫിഗറേഷനുകൾ മാറ്റാനാകില്ല</translation> <translation id="1665611772925418501">ഫയൽ പരിഷ്ക്കരിക്കാൻ കഴിഞ്ഞില്ല.</translation> @@ -863,7 +862,6 @@ <translation id="2282146716419988068">GPU പ്രോസസ്സ്</translation> <translation id="2282155092769082568">സ്വയമേവ കോൺഫിഗറേഷൻ URL:</translation> <translation id="2283117145434822734">F6</translation> -<translation id="2283340219607151381">വിലാസങ്ങൾ സംരക്ഷിച്ച് സ്വമേധയാ പൂരിപ്പിക്കുക</translation> <translation id="2286841657746966508">ബില്ലിംഗ് വിലാസം</translation> <translation id="2288181517385084064">വീഡിയോ റെക്കോർഡറിലേക്ക് മാറുക</translation> <translation id="2288735659267887385">ഉപയോഗസഹായി ക്രമീകരണങ്ങൾ</translation> @@ -1367,6 +1365,7 @@ <translation id="3031557471081358569">ഇറക്കുമതി ചെയ്യുന്നതിനായി ഇനങ്ങള് തിരഞ്ഞെടുക്കുക:</translation> <translation id="3031601332414921114">പ്രിന്റിംഗ് ആരംഭിക്കുക</translation> <translation id="303198083543495566">ഭൂമിശാസ്ത്രം</translation> +<translation id="3033999583152214331">നിങ്ങളുടെ Chromebook-ൽ Linux ടൂളുകളും എഡിറ്ററുകളും IDE-കളും റൺ ചെയ്യുക. <a target="_blank" href="<ph name="URL" />">കൂടുതലറിയുക</a></translation> <translation id="3036546437875325427">'ഫ്ലാഷ്' പ്രവർത്തനക്ഷമമാക്കുക</translation> <translation id="3037754279345160234">ഡൊമെയ്നിൽ ചേരാനുള്ള കോൺഫിഗറേഷൻ വിശകലനം ചെയ്യാനാവില്ല. നിങ്ങളുടെ അഡ്മിനിസ്ട്രേറ്ററെ ബന്ധപ്പെടുക.</translation> <translation id="3038612606416062604">നേരിട്ട് ഒരു പ്രിന്റർ ചേർക്കുക</translation>
diff --git a/chrome/app/resources/generated_resources_mr.xtb b/chrome/app/resources/generated_resources_mr.xtb index 1ece926..31dcb2b 100644 --- a/chrome/app/resources/generated_resources_mr.xtb +++ b/chrome/app/resources/generated_resources_mr.xtb
@@ -457,7 +457,6 @@ <translation id="166179487779922818">पासवर्ड खूप लहान आहे.</translation> <translation id="1661867754829461514">पिन गहाळ आहे </translation> <translation id="16620462294541761">क्षमस्व, आपला पासवर्ड सत्यापित करणे शक्य नाही. कृपया पुन्हा प्रयत्न करा.</translation> -<translation id="1662550410081243962">पेमेंट पद्धती सेव्ह करा आणि भरा</translation> <translation id="166278006618318542">विषय सार्वजनिक की अल्गोरिदम</translation> <translation id="166439687370499867">शेअर केलेल्या नेटवर्कची कॉन्फिगरेशन बदलण्याची परवानगी नाही</translation> <translation id="1665611772925418501">फाइल सुधारली जाऊ शकली नाही.</translation> @@ -865,7 +864,6 @@ <translation id="2282146716419988068">GPU प्रक्रिया</translation> <translation id="2282155092769082568">स्वयंकॉन्फिगरेशन URL:</translation> <translation id="2283117145434822734">F6</translation> -<translation id="2283340219607151381">पत्ते भरा आणि सेव्ह करा</translation> <translation id="2286841657746966508">बिलिंग पत्ता</translation> <translation id="2288181517385084064">व्हिडिओ रेकॉर्डरवर स्विच करा</translation> <translation id="2288735659267887385">प्रवेशयोग्यता सेटिंग्ज</translation> @@ -1369,6 +1367,7 @@ <translation id="3031557471081358569">आयात करण्यासाठी आयटम निवडा:</translation> <translation id="3031601332414921114">प्रिंट पुन्हा सुरू करा</translation> <translation id="303198083543495566">भूगोल</translation> +<translation id="3033999583152214331">तुमच्या Chromebook वर Linux टूल, संपादक आणि IDEs रन करा <a target="_blank" href="<ph name="URL" />">अधिक जाणून घ्या</a></translation> <translation id="3036546437875325427">फ्लॅश सक्षम करा</translation> <translation id="3037754279345160234">डोमेनला कॉंफिगरेशनमध्ये सामील करण्यासाठी पार्स करू शकत नाही. कृपया तुमच्या अॅडमिनिस्ट्रेटरशी संपर्क साधा.</translation> <translation id="3038612606416062604">एक प्रिंटर व्यक्तिचलितपणे जोडा</translation>
diff --git a/chrome/app/resources/generated_resources_ms.xtb b/chrome/app/resources/generated_resources_ms.xtb index 213b60a..36aff9a 100644 --- a/chrome/app/resources/generated_resources_ms.xtb +++ b/chrome/app/resources/generated_resources_ms.xtb
@@ -458,7 +458,6 @@ <translation id="166179487779922818">Kata laluan terlalu pendek.</translation> <translation id="1661867754829461514">PIN tiada</translation> <translation id="16620462294541761">Maaf, kata laluan anda tidak dapat disahkan. Sila cuba semula.</translation> -<translation id="1662550410081243962">Simpan dan lengkapkan kaedah pembayaran</translation> <translation id="166278006618318542">Algoritma Kekunci Awam Subjek</translation> <translation id="166439687370499867">Penukaran konfigurasi rangkaian kongsi tidak dibenarkan</translation> <translation id="1665611772925418501">Fail tidak boleh diubah suai.</translation> @@ -866,7 +865,6 @@ <translation id="2282146716419988068">Proses GPU</translation> <translation id="2282155092769082568">URL autokonfigurasi:</translation> <translation id="2283117145434822734">F6</translation> -<translation id="2283340219607151381">Simpan dan lengkapkan alamat</translation> <translation id="2286841657746966508">Alamat pengebilan</translation> <translation id="2288181517385084064">Beralih kepada perakam video</translation> <translation id="2288735659267887385">Tetapan kebolehaksesan</translation>
diff --git a/chrome/app/resources/generated_resources_nl.xtb b/chrome/app/resources/generated_resources_nl.xtb index 1cb1ecb..4e3338ed 100644 --- a/chrome/app/resources/generated_resources_nl.xtb +++ b/chrome/app/resources/generated_resources_nl.xtb
@@ -458,7 +458,6 @@ <translation id="166179487779922818">Wachtwoord is te kort.</translation> <translation id="1661867754829461514">Pincode ontbreekt</translation> <translation id="16620462294541761">Je wachtwoord kan niet worden geverifieerd. Probeer het opnieuw.</translation> -<translation id="1662550410081243962">Betaalmethoden toevoegen en invullen</translation> <translation id="166278006618318542">Algoritme van openbare sleutel van entiteit</translation> <translation id="166439687370499867">Het wijzigen van gedeelde netwerkconfiguraties is niet toegestaan</translation> <translation id="1665611772925418501">Het bestand kan niet worden aangepast.</translation> @@ -866,7 +865,6 @@ <translation id="2282146716419988068">GPU-proces</translation> <translation id="2282155092769082568">URL voor autoconfiguratie</translation> <translation id="2283117145434822734">F6</translation> -<translation id="2283340219607151381">Adressen opslaan en invullen</translation> <translation id="2286841657746966508">Factuuradres</translation> <translation id="2288181517385084064">Overschakelen naar videorecorder</translation> <translation id="2288735659267887385">Toegankelijkheidsinstellingen</translation>
diff --git a/chrome/app/resources/generated_resources_no.xtb b/chrome/app/resources/generated_resources_no.xtb index 03d7b7f..75702a3 100644 --- a/chrome/app/resources/generated_resources_no.xtb +++ b/chrome/app/resources/generated_resources_no.xtb
@@ -271,6 +271,7 @@ <translation id="1397854323885047133">Synkronisering og personlig tilpasning</translation> <translation id="1398853756734560583">Maksimer</translation> <translation id="1399511500114202393">Ingen brukersertifikater</translation> +<translation id="1401165786814632797">Få tilgang til assistenten din når som helst ved å si «Ok Google» når enheten er på og ulåst.</translation> <translation id="140250605646987970">Telefonen din er funnet, men Smart Lock fungerer bare på enheter med Android 5.0 og nyere. <a>Finn ut mer</a></translation> <translation id="140520891692800925"><ph name="PROFILE_DISPLAY_NAME" /> (administrert)</translation> <translation id="1405476660552109915">Vil du at <ph name="PASSWORD_MANAGER_BRAND" /> skal lagre kontoen din for dette nettstedet?</translation> @@ -454,7 +455,6 @@ <translation id="166179487779922818">Passordet er for kort.</translation> <translation id="1661867754829461514">Personlig kode mangler</translation> <translation id="16620462294541761">Beklager, passordet kan ikke verifiseres. Prøv på nytt.</translation> -<translation id="1662550410081243962">Lagre og fyll ut betalingsmåter</translation> <translation id="166278006618318542">Algoritme for enhetens offentlige nøkkel</translation> <translation id="166439687370499867">Det er ikke tillatt å endre delte nettverkskonfigurasjoner</translation> <translation id="1665611772925418501">Kunne ikke endre filen.</translation> @@ -862,7 +862,6 @@ <translation id="2282146716419988068">GPU-prosess</translation> <translation id="2282155092769082568">Nettadresse for automatisk konfigurering:</translation> <translation id="2283117145434822734">F6</translation> -<translation id="2283340219607151381">Lagre og fyll inn adresser</translation> <translation id="2286841657746966508">Faktureringsadresse</translation> <translation id="2288181517385084064">Bytt til videoopptaker</translation> <translation id="2288735659267887385">Innstillinger for tilgjengelighet</translation> @@ -1506,6 +1505,7 @@ <translation id="3271648667212143903"><ph name="ORIGIN" /> vil koble til</translation> <translation id="3274763671541996799">Du bruker full skjerm.</translation> <translation id="3275778913554317645">Åpne som vindu</translation> +<translation id="3278877214895457897">Når Chromebooken er konfigurert, trykker du på Assistent-knappen eller sier «Ok Google» for å snakke med assistenten når som helst.</translation> <translation id="3279230909244266691">Denne prosessen kan ta noen minutter. Starter den virtuelle maskinen.</translation> <translation id="3279741024917655738">Vis videoer i full skjerm på</translation> <translation id="3280237271814976245">L&agre som...</translation> @@ -2596,6 +2596,7 @@ <translation id="4992066212339426712">Slå på lyden</translation> <translation id="4992458225095111526">Bekreft Powerwash</translation> <translation id="4992473555164495036">Administratoren har begrenset de tilgjengelige inndatametodene.</translation> +<translation id="4992926179187649719">Slå på «Ok Google»</translation> <translation id="4994474651455208930">Tillat at nettsteder kan be om å bli standard behandlere for protokoller</translation> <translation id="4994754230098574403">Konfigurerer</translation> <translation id="4996978546172906250">Del via</translation> @@ -4518,6 +4519,7 @@ <translation id="7908378463497120834">Beklager, men minst én partisjon på den eksterne lagringsenheten din kunne ikke tilkobles.</translation> <translation id="7909969815743704077">Lastet ned i inkognitomodus</translation> <translation id="7910768399700579500">&Ny mappe</translation> +<translation id="7911118814695487383">Linux</translation> <translation id="7912080627461681647">Passordet ditt er endret på tjeneren. Logg av og på igjen.</translation> <translation id="7915471803647590281">Fortell oss hva som skjer før du sender tilbakemeldingen.</translation> <translation id="7916556741383518510">Ved klikk</translation>
diff --git a/chrome/app/resources/generated_resources_pl.xtb b/chrome/app/resources/generated_resources_pl.xtb index 6318a29a..104c412 100644 --- a/chrome/app/resources/generated_resources_pl.xtb +++ b/chrome/app/resources/generated_resources_pl.xtb
@@ -458,7 +458,6 @@ <translation id="166179487779922818">Hasło jest zbyt krótkie.</translation> <translation id="1661867754829461514">Brak kodu PIN</translation> <translation id="16620462294541761">Niestety, nie udało się zweryfikować Twojego hasła. Spróbuj ponownie.</translation> -<translation id="1662550410081243962">Zapisuj i automatycznie uzupełniaj informacje o formach płatności</translation> <translation id="166278006618318542">Algorytm klucza publicznego podmiotu</translation> <translation id="166439687370499867">Wprowadzanie zmian w konfiguracjach sieci współdzielonych jest niedozwolone.</translation> <translation id="1665611772925418501">Nie można zmodyfikować pliku.</translation> @@ -866,7 +865,6 @@ <translation id="2282146716419988068">Proces GPU</translation> <translation id="2282155092769082568">URL automatycznej konfiguracji:</translation> <translation id="2283117145434822734">F6</translation> -<translation id="2283340219607151381">Zapisuj i automatycznie uzupełniaj adresy</translation> <translation id="2286841657746966508">Adres rozliczeniowy</translation> <translation id="2288181517385084064">Przełącz na rejestrator wideo</translation> <translation id="2288735659267887385">Ustawienia ułatwień dostępu</translation>
diff --git a/chrome/app/resources/generated_resources_pt-BR.xtb b/chrome/app/resources/generated_resources_pt-BR.xtb index 9aeb22d..9e4b28f 100644 --- a/chrome/app/resources/generated_resources_pt-BR.xtb +++ b/chrome/app/resources/generated_resources_pt-BR.xtb
@@ -458,7 +458,6 @@ <translation id="166179487779922818">A senha é muito pequena.</translation> <translation id="1661867754829461514">PIN ausente</translation> <translation id="16620462294541761">Não foi possível confirmar sua senha. Tente novamente.</translation> -<translation id="1662550410081243962">Salvar e preencher as formas de pagamento</translation> <translation id="166278006618318542">Algoritmo da chave pública do requerente</translation> <translation id="166439687370499867">A alteração das configurações de rede compartilhada não é permitida</translation> <translation id="1665611772925418501">Não foi possível modificar o arquivo.</translation> @@ -866,7 +865,6 @@ <translation id="2282146716419988068">Processo de GPU</translation> <translation id="2282155092769082568">URL de configuração automática</translation> <translation id="2283117145434822734">F6</translation> -<translation id="2283340219607151381">Salvar e preencher endereços</translation> <translation id="2286841657746966508">Endereço de faturamento</translation> <translation id="2288181517385084064">Alternar para gravador de vídeo</translation> <translation id="2288735659267887385">Configurações de acessibilidade</translation>
diff --git a/chrome/app/resources/generated_resources_pt-PT.xtb b/chrome/app/resources/generated_resources_pt-PT.xtb index 596f1cc..e01df019 100644 --- a/chrome/app/resources/generated_resources_pt-PT.xtb +++ b/chrome/app/resources/generated_resources_pt-PT.xtb
@@ -458,7 +458,6 @@ <translation id="166179487779922818">A palavra-passe é demasiado curta.</translation> <translation id="1661867754829461514">Falta o PIN</translation> <translation id="16620462294541761">Lamentamos, mas não foi possível confirmar a sua palavra-passe. Tente novamente.</translation> -<translation id="1662550410081243962">Guardar e preencher métodos de pagamento</translation> <translation id="166278006618318542">Algoritmo de chave pública do requerente</translation> <translation id="166439687370499867">Não é permitido alterar as configurações de rede partilhadas.</translation> <translation id="1665611772925418501">Não foi possível modificar o ficheiro.</translation> @@ -866,7 +865,6 @@ <translation id="2282146716419988068">Processo GPU</translation> <translation id="2282155092769082568">URL de configuração automática:</translation> <translation id="2283117145434822734">F6</translation> -<translation id="2283340219607151381">Guardar e preencher endereços</translation> <translation id="2286841657746966508">Endereço de facturação</translation> <translation id="2288181517385084064">Mudar para gravador de vídeo</translation> <translation id="2288735659267887385">Definições de acessibilidade</translation>
diff --git a/chrome/app/resources/generated_resources_ro.xtb b/chrome/app/resources/generated_resources_ro.xtb index abb0b050..8122f2f5 100644 --- a/chrome/app/resources/generated_resources_ro.xtb +++ b/chrome/app/resources/generated_resources_ro.xtb
@@ -458,7 +458,6 @@ <translation id="166179487779922818">Parola este prea scurtă.</translation> <translation id="1661867754829461514">Codul PIN lipsește</translation> <translation id="16620462294541761">Ne pare rău, parola nu a putut fi verificată. Încercați din nou.</translation> -<translation id="1662550410081243962">Salvează și completează metodele de plată</translation> <translation id="166278006618318542">Algoritm cu cheie publică pentru subiect</translation> <translation id="166439687370499867">Nu se permite modificarea configurațiilor de rețea cu acces comun</translation> <translation id="1665611772925418501">Fișierul nu a putut fi modificat.</translation> @@ -866,7 +865,6 @@ <translation id="2282146716419988068">Proces GPU</translation> <translation id="2282155092769082568">Adresa URL de autoconfigurare:</translation> <translation id="2283117145434822734">F6</translation> -<translation id="2283340219607151381">Salvează și completează adresele</translation> <translation id="2286841657746966508">Adresa de facturare</translation> <translation id="2288181517385084064">Comută la înregistrarea video</translation> <translation id="2288735659267887385">Setări de accesibilitate</translation>
diff --git a/chrome/app/resources/generated_resources_ru.xtb b/chrome/app/resources/generated_resources_ru.xtb index 31f4b9f4..45c89e2 100644 --- a/chrome/app/resources/generated_resources_ru.xtb +++ b/chrome/app/resources/generated_resources_ru.xtb
@@ -457,7 +457,6 @@ <translation id="166179487779922818">Слишком короткий пароль.</translation> <translation id="1661867754829461514">PIN-код отсутствует</translation> <translation id="16620462294541761">К сожалению, не удалось подтвердить пароль. Повторите попытку.</translation> -<translation id="1662550410081243962">Сохранять и автоматически подставлять платежные данные</translation> <translation id="166278006618318542">Алгоритм открытого ключа субъекта</translation> <translation id="166439687370499867">Изменять настройки общей сети запрещено</translation> <translation id="1665611772925418501">Не удалось изменить файл.</translation> @@ -865,7 +864,6 @@ <translation id="2282146716419988068">Процесс GPU</translation> <translation id="2282155092769082568">URL автоматической настройки:</translation> <translation id="2283117145434822734">F6</translation> -<translation id="2283340219607151381">Сохранять и автоматически подставлять адреса</translation> <translation id="2286841657746966508">Платежный адрес</translation> <translation id="2288181517385084064">Перейти в режим видео</translation> <translation id="2288735659267887385">Специальные возможности</translation> @@ -1371,6 +1369,7 @@ <translation id="3031557471081358569">Выберите элементы для импорта:</translation> <translation id="3031601332414921114">Возобновить печать</translation> <translation id="303198083543495566">Место съемки</translation> +<translation id="3033999583152214331">Запускайте инструменты, редакторы и интегрированные среды разработки Linux на устройстве Chromebook. <a target="_blank" href="<ph name="URL" />">Подробнее…</a></translation> <translation id="3036546437875325427">Включить Flash</translation> <translation id="3037754279345160234">Не удалось проанализировать конфигурацию для подключения к домену. Обратитесь к администратору.</translation> <translation id="3038612606416062604">Добавление принтера вручную</translation>
diff --git a/chrome/app/resources/generated_resources_sk.xtb b/chrome/app/resources/generated_resources_sk.xtb index 68c9ed1..e4205d0 100644 --- a/chrome/app/resources/generated_resources_sk.xtb +++ b/chrome/app/resources/generated_resources_sk.xtb
@@ -458,7 +458,6 @@ <translation id="166179487779922818">Heslo je príliš krátke.</translation> <translation id="1661867754829461514">Chýba kód PIN</translation> <translation id="16620462294541761">Vaše heslo sa nepodarilo overiť. Skúste to znova.</translation> -<translation id="1662550410081243962">Ukladať a dopĺňať spôsoby platby</translation> <translation id="166278006618318542">Algoritmus verejného kľúča subjektu</translation> <translation id="166439687370499867">Zmena konfigurácií zdieľanej siete nie je povolená</translation> <translation id="1665611772925418501">Súbor sa nepodarilo upraviť.</translation> @@ -867,7 +866,6 @@ <translation id="2282146716419988068">Proces GPU</translation> <translation id="2282155092769082568">Webová adresa automatickej konfigurácie</translation> <translation id="2283117145434822734">F6</translation> -<translation id="2283340219607151381">Ukladať a dopĺňať adresy</translation> <translation id="2286841657746966508">Fakturačná adresa</translation> <translation id="2288181517385084064">Prepnúť na videorekordér</translation> <translation id="2288735659267887385">Nastavenia dostupnosti</translation> @@ -1370,6 +1368,7 @@ <translation id="3031557471081358569">Vyberte položky na import:</translation> <translation id="3031601332414921114">Pokračovať v tlači</translation> <translation id="303198083543495566">Geografia</translation> +<translation id="3033999583152214331">Spúšťajte v Chromebooku nástroje, editory a prostredia IDE pre Linux. <a target="_blank" href="<ph name="URL" />">Ďalšie informácie</a></translation> <translation id="3036546437875325427">Povoliť Flash</translation> <translation id="3037754279345160234">Konfigurácia pridania do domény sa nedá analyzovať. Kontaktujte správcu.</translation> <translation id="3038612606416062604">Manuálne pridanie tlačiarne</translation>
diff --git a/chrome/app/resources/generated_resources_sl.xtb b/chrome/app/resources/generated_resources_sl.xtb index 393ecf8..bbdba94 100644 --- a/chrome/app/resources/generated_resources_sl.xtb +++ b/chrome/app/resources/generated_resources_sl.xtb
@@ -458,7 +458,6 @@ <translation id="166179487779922818">Geslo je prekratko.</translation> <translation id="1661867754829461514">Manjka PIN</translation> <translation id="16620462294541761">Vašega gesla žal ni bilo mogoče preveriti. Poskusite znova.</translation> -<translation id="1662550410081243962">Shranjevanje in izpolnjevanje plačilnih sredstev</translation> <translation id="166278006618318542">Algoritem javnega ključa subjekta</translation> <translation id="166439687370499867">Spreminjanje omrežnih konfiguracij v skupni rabi ni dovoljeno</translation> <translation id="1665611772925418501">Datoteke ni bilo mogoče spremeniti.</translation> @@ -866,7 +865,6 @@ <translation id="2282146716419988068">Proces GPU</translation> <translation id="2282155092769082568">Spletni naslov samodejne konfiguracije:</translation> <translation id="2283117145434822734">F6</translation> -<translation id="2283340219607151381">Shranjevanje in izpolnjevanje naslovov</translation> <translation id="2286841657746966508">Naslov za obračun storitev</translation> <translation id="2288181517385084064">Preklopi na snemalnik videoposnetkov</translation> <translation id="2288735659267887385">Nastavitve funkcij za ljudi s posebnimi potrebami</translation> @@ -1370,6 +1368,7 @@ <translation id="3031557471081358569">Izberite elemente, ki jih želite uvoziti:</translation> <translation id="3031601332414921114">Nadaljuj tiskanje</translation> <translation id="303198083543495566">Geografija</translation> +<translation id="3033999583152214331">Izvajanje orodij, urejevalnikov in vdelanih orodij za razvoj programske opreme (IDE) za Linux v Chromebooku. <a target="_blank" href="<ph name="URL" />">Več o tem</a></translation> <translation id="3036546437875325427">Omogoči Flash</translation> <translation id="3037754279345160234">Konfiguracije za pridružitev domeni ni mogoče razčleniti. Obrnite se na skrbnika.</translation> <translation id="3038612606416062604">Ročno dodajanje tiskalnika</translation>
diff --git a/chrome/app/resources/generated_resources_sr.xtb b/chrome/app/resources/generated_resources_sr.xtb index eecbfb61..b09f32e 100644 --- a/chrome/app/resources/generated_resources_sr.xtb +++ b/chrome/app/resources/generated_resources_sr.xtb
@@ -455,7 +455,6 @@ <translation id="166179487779922818">Лозинка је прекратка.</translation> <translation id="1661867754829461514">Недостаје PIN</translation> <translation id="16620462294541761">Жао нам је, нисмо успели да верификујемо лозинку. Пробајте поново.</translation> -<translation id="1662550410081243962">Чувај и уноси начине плаћања</translation> <translation id="166278006618318542">Алгоритам јавног кључа субјекта</translation> <translation id="166439687370499867">Промена конфигурације дељене мреже није дозвољена</translation> <translation id="1665611772925418501">Није могуће изменити датотеку.</translation> @@ -863,7 +862,6 @@ <translation id="2282146716419988068">GPU процес</translation> <translation id="2282155092769082568">URL за аутоматску конфигурацију:</translation> <translation id="2283117145434822734">F6</translation> -<translation id="2283340219607151381">Чувај и уноси адресе</translation> <translation id="2286841657746966508">Адреса за наплату</translation> <translation id="2288181517385084064">Пребаци на видео-рикордер</translation> <translation id="2288735659267887385">Подешавања приступачности</translation> @@ -1366,6 +1364,7 @@ <translation id="3031557471081358569">Изаберите ставке за увоз:</translation> <translation id="3031601332414921114">Настави штампање</translation> <translation id="303198083543495566">Географија</translation> +<translation id="3033999583152214331">Покрените Linux алатке, уређиваче и IDE-ове на Chromebook-у. <a target="_blank" href="<ph name="URL" />">Сазнајте више</a></translation> <translation id="3036546437875325427">Омогући Flash</translation> <translation id="3037754279345160234">Не можемо да рашчланимо конфигурацију ради придруживања домену. Обратите се администратору.</translation> <translation id="3038612606416062604">Ручно додајте штампач</translation> @@ -4103,7 +4102,7 @@ <translation id="7270858098575133036">Питај када сајт жели да користи ексклузивне поруке система за приступ MIDI уређајима</translation> <translation id="7272674038937250585">Није наведен ниједан опис</translation> <translation id="7273110280511444812">последњи пут је прикључено <ph name="DATE" /></translation> -<translation id="727441411541283857"><ph name="PERCENTAGE" />% – <ph name="TIME" /> док се не напуни</translation> +<translation id="727441411541283857"><ph name="PERCENTAGE" />% – <ph name="TIME" /> до краја пуњења</translation> <translation id="727952162645687754">Грешка при преузимању</translation> <translation id="7279701417129455881">Управљај блокирањем колачића...</translation> <translation id="7280041992884344566">Дошло је до грешке док је Chrome тражио штетан софтвер</translation>
diff --git a/chrome/app/resources/generated_resources_sv.xtb b/chrome/app/resources/generated_resources_sv.xtb index c66d32b9..7651a5c 100644 --- a/chrome/app/resources/generated_resources_sv.xtb +++ b/chrome/app/resources/generated_resources_sv.xtb
@@ -457,7 +457,6 @@ <translation id="166179487779922818">Lösenordet är för kort.</translation> <translation id="1661867754829461514">PIN saknas</translation> <translation id="16620462294541761">Det gick inte att verifiera lösenordet. Försök igen.</translation> -<translation id="1662550410081243962">Spara och fyll i betalningsmetoder</translation> <translation id="166278006618318542">Mottagarens publika nyckelalgoritm</translation> <translation id="166439687370499867">Du får inte ändra delade nätverkskonfigurationer</translation> <translation id="1665611772925418501">Det gick inte att ändra filen.</translation> @@ -865,7 +864,6 @@ <translation id="2282146716419988068">GPU-bearbetning</translation> <translation id="2282155092769082568">Webbadress för automatisk konfiguration:</translation> <translation id="2283117145434822734">F6</translation> -<translation id="2283340219607151381">Spara och fyll i adresser</translation> <translation id="2286841657746966508">Faktureringsadress</translation> <translation id="2288181517385084064">Byt till videoinspelaren</translation> <translation id="2288735659267887385">Inställningar för tillgänglighet</translation>
diff --git a/chrome/app/resources/generated_resources_sw.xtb b/chrome/app/resources/generated_resources_sw.xtb index 79a60ee..9f02f40 100644 --- a/chrome/app/resources/generated_resources_sw.xtb +++ b/chrome/app/resources/generated_resources_sw.xtb
@@ -455,7 +455,6 @@ <translation id="166179487779922818">Nenosiri ni fupi mno.</translation> <translation id="1661867754829461514">PIN inakosekana</translation> <translation id="16620462294541761">Samahani, nenosiri lako halikuweza kuthibitishwa. Tafadhali jaribu tena.</translation> -<translation id="1662550410081243962">Hifadhi na ujaze njia za kulipa</translation> <translation id="166278006618318542">Kanuni ya Ufunguo wa Umma wa Mhusika</translation> <translation id="166439687370499867">Huruhusiwi kubadilisha mipangilio ya mtandao unaoshirikiwa</translation> <translation id="1665611772925418501">Faili isingeweza kurekebishwa.</translation> @@ -863,7 +862,6 @@ <translation id="2282146716419988068">Mchakato wa GPU</translation> <translation id="2282155092769082568">URL ya kuweka mipangilio kiotomatiki:</translation> <translation id="2283117145434822734">F6</translation> -<translation id="2283340219607151381">Hifadhi na ujaze anwani</translation> <translation id="2286841657746966508">Anwani ya kutoza</translation> <translation id="2288181517385084064">Tumia rekoda ya video</translation> <translation id="2288735659267887385">Mipangilio ya zana za walio na matatizo ya kuona au kusikia</translation>
diff --git a/chrome/app/resources/generated_resources_ta.xtb b/chrome/app/resources/generated_resources_ta.xtb index e38a21f..4e0c7ef7 100644 --- a/chrome/app/resources/generated_resources_ta.xtb +++ b/chrome/app/resources/generated_resources_ta.xtb
@@ -458,7 +458,6 @@ <translation id="166179487779922818">கடவுச்சொல் மிகச் சிறியதாக உள்ளது.</translation> <translation id="1661867754829461514">PIN இல்லை</translation> <translation id="16620462294541761">மன்னிக்கவும், உங்கள் கடவுச்சொல்லைச் சரிபார்க்க முடியவில்லை. தயவுசெய்து மீண்டும் முயற்சி செய்க.</translation> -<translation id="1662550410081243962">கட்டண முறைகளைச் சேமித்துத் தானாக நிரப்பு</translation> <translation id="166278006618318542">பொருள் பொது விசை அல்காரிதம்</translation> <translation id="166439687370499867">பகிர்ந்த நெட்வொர்க் உள்ளமைவுகளை மாற்றுவதற்கு அனுமதியில்லை</translation> <translation id="1665611772925418501">கோப்பை மாற்ற முடியவில்லை.</translation> @@ -866,7 +865,6 @@ <translation id="2282146716419988068">GPU செயல்முறை</translation> <translation id="2282155092769082568">தானியங்கு உள்ளமைவு URL:</translation> <translation id="2283117145434822734">F6</translation> -<translation id="2283340219607151381">முகவரிகளைச் சேமித்துத் தானாக நிரப்பு</translation> <translation id="2286841657746966508">பில்லிங் முகவரி</translation> <translation id="2288181517385084064">வீடியோ ரெக்கார்டருக்கு மாறு</translation> <translation id="2288735659267887385">அணுகல்தன்மை அமைப்புகள்</translation>
diff --git a/chrome/app/resources/generated_resources_te.xtb b/chrome/app/resources/generated_resources_te.xtb index bde12bf..3275873 100644 --- a/chrome/app/resources/generated_resources_te.xtb +++ b/chrome/app/resources/generated_resources_te.xtb
@@ -457,7 +457,6 @@ <translation id="166179487779922818">పాస్వర్డ్ చాలా చిన్నదిగా ఉంది.</translation> <translation id="1661867754829461514">PIN లేదు</translation> <translation id="16620462294541761">క్షమించండి, మీ పాస్వర్డ్ ధృవీకరించబడలేదు. దయచేసి మళ్ళీ ప్రయత్నించండి.</translation> -<translation id="1662550410081243962">చెల్లింపు పద్ధతులను సేవ్ చేసి, పూరించండి</translation> <translation id="166278006618318542">విషయం పబ్లిక్ కీ అల్గారిథం</translation> <translation id="166439687370499867">షేర్ చేసిన నెట్వర్క్ కాన్ఫిగరేషన్లను మార్చడం అనుమతించబడదు</translation> <translation id="1665611772925418501">ఫైల్ను సవరించడం సాధ్యపడదు.</translation> @@ -865,7 +864,6 @@ <translation id="2282146716419988068">GPU ప్రాసెస్</translation> <translation id="2282155092769082568">స్వయంచాలక కాన్ఫిగరేషన్ URL:</translation> <translation id="2283117145434822734">F6</translation> -<translation id="2283340219607151381">చిరునామాలను సేవ్ చేసి, పూరించండి</translation> <translation id="2286841657746966508">బిల్లింగ్ చిరునామా</translation> <translation id="2288181517385084064">వీడియో రికార్డర్కి మార్చు</translation> <translation id="2288735659267887385">ప్రాప్యత సెట్టింగ్లు</translation> @@ -1369,6 +1367,7 @@ <translation id="3031557471081358569">దిగుమతి చెయ్యడానికి ఐటమ్లను ఎంచుకోండి:</translation> <translation id="3031601332414921114">ముద్రణను పునఃప్రారంభించు</translation> <translation id="303198083543495566">భూగోళ శాస్త్రం</translation> +<translation id="3033999583152214331">మీ Chromebookలో Linux సాధనాలు, ఎడిటర్లు మరియు IDEలను అమలు చేయండి. <a target = "_ blank" href = " <ph name="URL" /> ">మరింత తెలుసుకోండి</a></translation> <translation id="3036546437875325427">ఫ్లాష్ను ప్రారంభించు</translation> <translation id="3037754279345160234">డొమైన్లో చేరడానికి కాన్ఫిగరేషన్ను అన్వయించడం సాధ్యపడలేదు. దయచేసి మీ నిర్వాహకుడిని సంప్రదించండి.</translation> <translation id="3038612606416062604">ఒక ప్రింటర్ను మాన్యువల్గా జోడించండి</translation>
diff --git a/chrome/app/resources/generated_resources_th.xtb b/chrome/app/resources/generated_resources_th.xtb index 74e3a31..8b2341d 100644 --- a/chrome/app/resources/generated_resources_th.xtb +++ b/chrome/app/resources/generated_resources_th.xtb
@@ -458,7 +458,6 @@ <translation id="166179487779922818">รหัสผ่านสั้นเกินไป</translation> <translation id="1661867754829461514">ไม่พบ PIN</translation> <translation id="16620462294541761">ขออภัย ไม่สามารถยืนยันรหัสผ่านของคุณได้ โปรดลองอีกครั้ง</translation> -<translation id="1662550410081243962">บันทึกและกรอกวิธีการชำระเงิน</translation> <translation id="166278006618318542">อัลกอริธึมหัวเรื่องคีย์ส่วนตัว</translation> <translation id="166439687370499867">ไม่อนุญาตให้เปลี่ยนการกำหนดค่าเครือข่ายที่ใช้ร่วมกัน</translation> <translation id="1665611772925418501">ไม่สามารถแก้ไขไฟล์</translation> @@ -866,7 +865,6 @@ <translation id="2282146716419988068">การประมวลผลของ GPU</translation> <translation id="2282155092769082568">URL การกำหนดค่าอัตโนมัติ:</translation> <translation id="2283117145434822734">F6</translation> -<translation id="2283340219607151381">บันทึกและกรอกที่อยู่</translation> <translation id="2286841657746966508">ที่อยู่สำหรับเรียกเก็บเงิน</translation> <translation id="2288181517385084064">สลับไปเป็นโปรแกรมบันทึกวิดีโอ</translation> <translation id="2288735659267887385">การตั้งค่าการเข้าถึง</translation>
diff --git a/chrome/app/resources/generated_resources_tr.xtb b/chrome/app/resources/generated_resources_tr.xtb index 3a0446b..541fb78 100644 --- a/chrome/app/resources/generated_resources_tr.xtb +++ b/chrome/app/resources/generated_resources_tr.xtb
@@ -458,7 +458,6 @@ <translation id="166179487779922818">Şifre çok kısa.</translation> <translation id="1661867754829461514">PIN eksik</translation> <translation id="16620462294541761">Maalesef, şifreniz doğrulanamadı. Lütfen tekrar deneyin.</translation> -<translation id="1662550410081243962">Ödeme yöntemlerini kaydet ve doldur</translation> <translation id="166278006618318542">Konu Ortak Anahtar Algoritması</translation> <translation id="166439687370499867">Paylaşılan ağ yapılandırmalarının değiştirilmesine izin verilmez</translation> <translation id="1665611772925418501">Dosya değiştirilemedi.</translation> @@ -866,7 +865,6 @@ <translation id="2282146716419988068">GPU İşlemi</translation> <translation id="2282155092769082568">Otomatik yapılandırma URL'si:</translation> <translation id="2283117145434822734">F6</translation> -<translation id="2283340219607151381">Adresleri kaydet ve doldur</translation> <translation id="2286841657746966508">Fatura adresi</translation> <translation id="2288181517385084064">Video kaydediciye geç</translation> <translation id="2288735659267887385">Erişilebilirlik ayarları</translation> @@ -1370,6 +1368,7 @@ <translation id="3031557471081358569">İçe aktarılacak öğeleri seçin:</translation> <translation id="3031601332414921114">Yazdırma işlemini devam ettir</translation> <translation id="303198083543495566">Coğrafya</translation> +<translation id="3033999583152214331">Chromebook'unuzda Linux araçları, düzenleyicileri ve IDE'lerini çalıştırın. <a target="_blank" href="<ph name="URL" />">Daha fazla bilgi</a></translation> <translation id="3036546437875325427">Flash'ı etkinleştir</translation> <translation id="3037754279345160234">Alana katılmak için yapılandırma ayrıştırılamıyor. Lütfen yöneticinizle iletişime geçin.</translation> <translation id="3038612606416062604">Manuel olarak yazıcı ekleyin</translation>
diff --git a/chrome/app/resources/generated_resources_uk.xtb b/chrome/app/resources/generated_resources_uk.xtb index fb23faac..e6dc7f3 100644 --- a/chrome/app/resources/generated_resources_uk.xtb +++ b/chrome/app/resources/generated_resources_uk.xtb
@@ -458,7 +458,6 @@ <translation id="166179487779922818">Пароль закороткий.</translation> <translation id="1661867754829461514">Відсутній PIN-код</translation> <translation id="16620462294541761">На жаль, не вдалося підтвердити ваш пароль. Повторіть спробу.</translation> -<translation id="1662550410081243962">Зберігати й заповнювати способи оплати</translation> <translation id="166278006618318542">Алгоритм відкритого ключа суб'єкта</translation> <translation id="166439687370499867">Заборонено змінювати налаштування спільної мережі</translation> <translation id="1665611772925418501">Файл неможливо змінити.</translation> @@ -866,7 +865,6 @@ <translation id="2282146716419988068">Процес GPU</translation> <translation id="2282155092769082568">URL-адреса автоконфігурації:</translation> <translation id="2283117145434822734">F6</translation> -<translation id="2283340219607151381">Зберігати й заповнювати адреси</translation> <translation id="2286841657746966508">Розрахункова адреса</translation> <translation id="2288181517385084064">Перейти до запису відео</translation> <translation id="2288735659267887385">Налаштування спеціальних можливостей</translation>
diff --git a/chrome/app/resources/generated_resources_vi.xtb b/chrome/app/resources/generated_resources_vi.xtb index f71528fb9..c8618869 100644 --- a/chrome/app/resources/generated_resources_vi.xtb +++ b/chrome/app/resources/generated_resources_vi.xtb
@@ -458,7 +458,6 @@ <translation id="166179487779922818">Mật khẩu quá ngắn.</translation> <translation id="1661867754829461514">Thiếu PIN</translation> <translation id="16620462294541761">Rất tiếc, không thể xác minh được mật khẩu của bạn. Vui lòng thử lại.</translation> -<translation id="1662550410081243962">Lưu và điền phương thức thanh toán</translation> <translation id="166278006618318542">Thuật toán Khoá Công cộng Đối tượng</translation> <translation id="166439687370499867">Không cho phép thay đổi cấu hình mạng dùng chung</translation> <translation id="1665611772925418501">Không thể sửa đổi tệp.</translation> @@ -866,7 +865,6 @@ <translation id="2282146716419988068">Quá trình GPU</translation> <translation id="2282155092769082568">URL tự động định cấu hình:</translation> <translation id="2283117145434822734">F6</translation> -<translation id="2283340219607151381">Lưu và điền địa chỉ</translation> <translation id="2286841657746966508">Địa chỉ thanh toán</translation> <translation id="2288181517385084064">Chuyển sang chế độ quay video</translation> <translation id="2288735659267887385">Cài đặt trợ năng</translation>
diff --git a/chrome/app/resources/generated_resources_zh-CN.xtb b/chrome/app/resources/generated_resources_zh-CN.xtb index 85703dc..39a1c2e 100644 --- a/chrome/app/resources/generated_resources_zh-CN.xtb +++ b/chrome/app/resources/generated_resources_zh-CN.xtb
@@ -455,7 +455,6 @@ <translation id="166179487779922818">密码太短。</translation> <translation id="1661867754829461514">缺少 PIN</translation> <translation id="16620462294541761">抱歉,无法验证您的密码,请重试。</translation> -<translation id="1662550410081243962">保存并填写付款方式</translation> <translation id="166278006618318542">证书持有者公共密钥算法</translation> <translation id="166439687370499867">不允许更改共享网络配置</translation> <translation id="1665611772925418501">无法修改该文件。</translation> @@ -863,7 +862,6 @@ <translation id="2282146716419988068">GPU 进程</translation> <translation id="2282155092769082568">自动配置网址:</translation> <translation id="2283117145434822734">F6</translation> -<translation id="2283340219607151381">保存并填写地址</translation> <translation id="2286841657746966508">帐单邮寄地址</translation> <translation id="2288181517385084064">切换到录像机</translation> <translation id="2288735659267887385">无障碍设置</translation>
diff --git a/chrome/app/resources/generated_resources_zh-TW.xtb b/chrome/app/resources/generated_resources_zh-TW.xtb index 943f313..9bdb4b7d 100644 --- a/chrome/app/resources/generated_resources_zh-TW.xtb +++ b/chrome/app/resources/generated_resources_zh-TW.xtb
@@ -458,7 +458,6 @@ <translation id="166179487779922818">密碼太短。</translation> <translation id="1661867754829461514">找不到 PIN</translation> <translation id="16620462294541761">很抱歉,系統無法驗證你的密碼,請再試一次。</translation> -<translation id="1662550410081243962">儲存及填入付款方式</translation> <translation id="166278006618318542">主體公開金鑰演算法</translation> <translation id="166439687370499867">不允許變更共用網路設定</translation> <translation id="1665611772925418501">無法修改檔案。</translation> @@ -866,7 +865,6 @@ <translation id="2282146716419988068">GPU 處理程序</translation> <translation id="2282155092769082568">自動設定網址:</translation> <translation id="2283117145434822734">F6</translation> -<translation id="2283340219607151381">儲存及填入地址</translation> <translation id="2286841657746966508">帳單地址</translation> <translation id="2288181517385084064">切換至攝影機</translation> <translation id="2288735659267887385">協助工具設定</translation> @@ -1370,6 +1368,7 @@ <translation id="3031557471081358569">選取要匯入的項目:</translation> <translation id="3031601332414921114">繼續列印</translation> <translation id="303198083543495566">地理位置</translation> +<translation id="3033999583152214331">在 Chromebook 上執行 Linux 工具、編輯器和 IDE。<a target="_blank" href="<ph name="URL" />">瞭解詳情</a></translation> <translation id="3036546437875325427">啟用 Flash</translation> <translation id="3037754279345160234">無法對加入網域的設定進行剖析,請與你的管理員聯絡。</translation> <translation id="3038612606416062604">手動新增印表機</translation>
diff --git a/chrome/app/resources/google_chrome_strings_hi.xtb b/chrome/app/resources/google_chrome_strings_hi.xtb index f7d8859..d64bebb 100644 --- a/chrome/app/resources/google_chrome_strings_hi.xtb +++ b/chrome/app/resources/google_chrome_strings_hi.xtb
@@ -3,7 +3,7 @@ <translationbundle lang="hi"> <translation id="1001534784610492198">इंस्टॉलर संग्रह खराब या अमान्य है. कृपया Google Chrome फिर से डाउनलोड करें.</translation> <translation id="102763973188675173">Google Chrome को पसंद के मुताबिक बनाएं और नियंत्रित करें. अपडेट उपलब्ध है.</translation> -<translation id="1035334672863811645">Chrome में प्रवेश करें</translation> +<translation id="1035334672863811645">Chrome में साइन इन करें</translation> <translation id="1065672644894730302">आपकी प्राथमिकताओं को पढ़ा नहीं जा सकता| \\n\\nकुछ विशेषताएं अनुपलब्ध हो सकती हैं और प्राथमिकताओं में किए गए परिवर्तनों को सहेजा नहीं जाएगा.</translation> <translation id="1088300314857992706"><ph name="USER_EMAIL_ADDRESS" /> पहले Chrome का उपयोग कर रहा था</translation> <translation id="1104959162601287462">&Chrome OS के बारे में</translation> @@ -43,7 +43,7 @@ <translation id="2063848847527508675">अपडेट लागू करने के लिए Chrome OS को फिर से चालू करने की आवश्यकता होती है.</translation> <translation id="2084710999043359739">Chrome में जोड़ें</translation> <translation id="2094919256425865063">फिर भी Chrome छोड़ें?</translation> -<translation id="2120620239521071941">ऐसा करने से इस डिवाइस से <ph name="ITEMS_COUNT" /> आइटम हट जाएंगे. बाद में अपना डेटा पाने के लिए, Chrome में <ph name="USER_EMAIL" /> के रूप में प्रवेश करें.</translation> +<translation id="2120620239521071941">ऐसा करने से इस डिवाइस से <ph name="ITEMS_COUNT" /> आइटम हट जाएंगे. बाद में अपना डेटा पाने के लिए, Chrome में <ph name="USER_EMAIL" /> के रूप में साइन इन करें.</translation> <translation id="2123055963409958220"><ph name="BEGIN_LINK" />अभी वाली सेटिंग<ph name="END_LINK" /> की रिपोर्ट करके Chrome को बेहतर बनाने में सहायता करें</translation> <translation id="216054706567564023">अपने फ़ोन पर Chrome इंस्टॉल करें. हम आपके उस फ़ोन नंबर पर एक मैसेज (एसएमएस) भेजेंगे, जिसे आपने अपना खाता वापस पाने के लिए सेट किया है.</translation> <translation id="2246246234298806438">अगर Google Chrome के साथ ही आने वाला PDF व्यूअर मौजूद नहीं होगा तो, Google Chrome प्रिंट करने से पहले की झलक नहीं दिखा पाएगा.</translation> @@ -66,7 +66,7 @@ <translation id="2534507159460261402">Google Pay (Chrome पर कॉपी किया गया)</translation> <translation id="2535429035253759792">आपके एडमिन का कहना है कि यह अपडेट लागू करने के लिए आप Chrome को फिर से लॉन्च करें</translation> <translation id="2580411288591421699">Google Chrome के उस वर्शन के समान वर्शन को इंस्टॉल नहीं कर सकता, जो वर्तमान में चल रहा है. कृपया Google Chrome बंद करें और फिर से प्रयास करें.</translation> -<translation id="2586406160782125153">ऐसा करने से इस डिवाइस से आपका ब्राउज़िंग डेटा हट जाएगा. बाद में अपना डेटा पाने के लिए, Chrome में <ph name="USER_EMAIL" /> के रूप में प्रवेश करें.</translation> +<translation id="2586406160782125153">ऐसा करने से इस डिवाइस से आपका ब्राउज़िंग डेटा हट जाएगा. बाद में अपना डेटा पाने के लिए, Chrome में <ph name="USER_EMAIL" /> के रूप में साइन इन करें.</translation> <translation id="2588322182880276190">Chrome लोगो</translation> <translation id="2652691236519827073">नए Chrome &टैब में लिंक खोलें</translation> <translation id="2665296953892887393">Google को क्रैश रिपोर्ट और <ph name="UMA_LINK" /> भेजकर Google Chrome को बेहतर बनाने में सहायता करें</translation> @@ -104,7 +104,7 @@ <translation id="3622797965165704966">अब अपने Google खाते के साथ और शेयर किए गए कंप्यूटर पर Chrome का उपयोग करना आसान हो गया है.</translation> <translation id="3637702109597584617">Google Chrome OS <ph name="TERMS_OF_SERVICE_LINK" />सेवा की शर्तें<ph name="END_TERMS_OF_SERVICE_LINK" /></translation> <translation id="3716182511346448902">यह पेज बहुत ज़्यादा मेमोरी का इस्तेमाल करता है, इसलिए Chrome ने इसे रोक दिया है.</translation> -<translation id="3718181793972440140">ऐसा करने से इस डिवाइस से 1 आइटम हट जाएगा. बाद में अपना डेटा पाने के लिए, Chrome में <ph name="USER_EMAIL" /> के रूप में प्रवेश करें.</translation> +<translation id="3718181793972440140">ऐसा करने से इस डिवाइस से 1 आइटम हट जाएगा. बाद में अपना डेटा पाने के लिए, Chrome में <ph name="USER_EMAIL" /> के रूप में साइन इन करें.</translation> <translation id="3735758079232443276">एक्सटेंशन "<ph name="EXTENSION_NAME" />" ने यह बदल दिया है कि जब आप Chrome प्रारंभ करते हैं तब कौन सा पृष्ठ दिखाया जाए.</translation> <translation id="3780814664026482060">Chrome - <ph name="PAGE_TITLE" /></translation> <translation id="3784527566857328444">Chrome से निकालें...</translation> @@ -230,7 +230,7 @@ <translation id="7552219221109926349">Chrome OS इस भाषा में दिखाएं</translation> <translation id="7561940363513215021">{0,plural, =1{Chrome एक मिनट में फिर से लॉन्च होगा}one{Chrome # मिनटों में फिर से लॉन्च होगा}other{Chrome # मिनटों में फिर से लॉन्च होगा}}</translation> <translation id="7589360514048265910">इस कंप्यूटर पर अब Google Chrome के अपडेट नहीं मिलेंगे क्योंकि अब इस पर Mac OS X 10.9 की सुविधा नहीं है.</translation> -<translation id="7592736734348559088">Google Chrome आपका डेटा समन्वयित नहीं कर सका क्योंकि आपके खाते के प्रवेश विवरण पुराने हैं.</translation> +<translation id="7592736734348559088">Google Chrome आपका डेटा समन्वयित नहीं कर सका क्योंकि आपके खाते के साइन इन विवरण पुराने हैं.</translation> <translation id="7626032353295482388">Chrome में आपका स्वागत है</translation> <translation id="7651907282515937834">Chrome Enterprise लोगो</translation> <translation id="7747138024166251722">इंस्टॉलर अस्थायी निर्देशिका नहीं बना सकता. कृपया डिस्क में खाली जगह और सॉफ़्टवेयर को इंस्टॉल करने की अनुमति की जाँच करें.</translation> @@ -284,9 +284,9 @@ <translation id="884296878221830158">इससे यह भी नियंत्रित होता है कि जब आप Chrome प्रारंभ करते हैं या होम बटन क्लिक करते हैं तब कौन सा पृष्ठ दिखाया जाए.</translation> <translation id="8862326446509486874">सिस्टम-स्तर स्थापना के लिए आपके पास उचित अधिकार नहीं हैं. इंस्टॉलर को व्यवस्थापक के रूप में फिर से चलाने का प्रयास करें.</translation> <translation id="8914504000324227558">Chrome को पुन: लॉन्च करें</translation> -<translation id="9026991721384951619">Chrome OS आपका डेटा समन्वयित नहीं कर सका क्योंकि आपके खाता प्रवेश विवरण पुराने हो चुके हैं.</translation> +<translation id="9026991721384951619">Chrome OS आपका डेटा समन्वयित नहीं कर सका क्योंकि आपके खाता साइन इन विवरण पुराने हो चुके हैं.</translation> <translation id="9067395829937117663">Google Chrome के लिए Windows 7 या उसके बाद के वर्शन की आवश्यकता होती है.</translation> -<translation id="9084668267983921457">प्रमाणीकरण प्रमाणपत्र विफल रहा. कृपया Google Chrome में फिर से प्रवेश करें या अधिक जानकारी के लिए अपने व्यवस्थापक से संपर्क करें. <ph name="ADDITIONAL_EXPLANATION" /></translation> +<translation id="9084668267983921457">प्रमाणीकरण प्रमाणपत्र विफल रहा. कृपया Google Chrome में फिर से साइन इन करें या ज़्यादा जानकारी के लिए अपने व्यवस्थापक से संपर्क करें. <ph name="ADDITIONAL_EXPLANATION" /></translation> <translation id="909149346112452267">{0,plural, =1{Chrome OS एक घंटे में रीस्टार्ट होगा}one{Chrome OS # घंटों में रीस्टार्ट होगा}other{Chrome OS # घंटों में रीस्टार्ट होगा}}</translation> <translation id="911206726377975832">अपने ब्राउज़िंग डेटा भी हटाएं?</translation> <translation id="919706545465235479">सिंक शुरू करने के लिए Chrome अपडेट करें</translation>
diff --git a/chrome/app/settings_strings.grdp b/chrome/app/settings_strings.grdp index 50d8330..e9b1a5e 100644 --- a/chrome/app/settings_strings.grdp +++ b/chrome/app/settings_strings.grdp
@@ -631,15 +631,6 @@ <message name="IDS_SETTINGS_AUTOFILL_TOGGLE_LABEL" desc="Label for a toggle that allows users to control whether forms should be autofilled with data such as addresses and credit cards, but not passwords."> Autofill forms </message> - <message name="IDS_SETTINGS_AUTOFILL_ENABLE_PROFILES_TOGGLE_LABEL" desc="Label for a toggle that allows users to control whether addresses should be saved and forms should be autofilled with them."> - Save and fill addresses - </message> - <message name="IDS_SETTINGS_AUTOFILL_ENABLE_CREDIT_CARDS_TOGGLE_LABEL" desc="Label for a toggle that allows users to control whether credit cards should be saved and forms should be autofilled with it."> - Save and fill payment methods - </message> - <message name="IDS_SETTINGS_AUTOFILL_ADDRESSES_HEADING" desc="Title for the list of addresses that chrome has saved for use in filling in forms."> - Addresses - </message> <message name="IDS_SETTINGS_AUTOFILL_ADDRESSES_ADD_TITLE" desc="This is the title for the 'Add address' dialog. This dialog allows a user to create a new address."> Add address </message> @@ -663,9 +654,6 @@ <message name="IDS_SETTINGS_AUTOFILL_CREDIT_CARD_DETAIL" desc="Description of what toggling the 'Credit card' setting does. Immediately underneath IDS_SETTINGS_AUTOFILL_CREDIT_CARD_HEADING."> Enable credit card Autofill to fill out forms in a single click </message> - <message name="IDS_SETTINGS_AUTOFILL_PAYMENT_METHODS" desc="Title for the list of saved payment methods that can be used to fill in forms."> - Payment methods - </message> <message name="IDS_SETTINGS_AUTOFILL_CREDIT_CARD_TYPE_COLUMN_LABEL" desc="Label for the column containing the type of credit card that is saved. The type is in the format: `Visa ****1234`."> Type </message>
diff --git a/chrome/browser/BUILD.gn b/chrome/browser/BUILD.gn index 8a3799c..fdcbc71 100644 --- a/chrome/browser/BUILD.gn +++ b/chrome/browser/BUILD.gn
@@ -2594,10 +2594,16 @@ "lifetime/browser_close_manager.h", "lifetime/termination_notification.cc", "lifetime/termination_notification.h", + "media/capture_access_handler_base.cc", + "media/capture_access_handler_base.h", "media/unified_autoplay_config.cc", "media/unified_autoplay_config.h", + "media/webrtc/desktop_capture_devices_util.cc", + "media/webrtc/desktop_capture_devices_util.h", "media/webrtc/desktop_media_picker_factory_impl.cc", "media/webrtc/desktop_media_picker_factory_impl.h", + "media/webrtc/display_media_access_handler.cc", + "media/webrtc/display_media_access_handler.h", "media/webrtc/tab_desktop_media_list.cc", "media/webrtc/tab_desktop_media_list.h", "media_galleries/chromeos/mtp_device_delegate_impl_chromeos.cc", @@ -3657,8 +3663,6 @@ "guest_view/web_view/chrome_web_view_permission_helper_delegate.h", "guest_view/web_view/context_menu_content_type_web_view.cc", "guest_view/web_view/context_menu_content_type_web_view.h", - "media/capture_access_handler_base.cc", - "media/capture_access_handler_base.h", "media/cast_transport_host_filter.cc", "media/cast_transport_host_filter.h", "media/extension_media_access_handler.cc",
diff --git a/chrome/browser/about_flags.cc b/chrome/browser/about_flags.cc index 0d3bdea..d3177ac1 100644 --- a/chrome/browser/about_flags.cc +++ b/chrome/browser/about_flags.cc
@@ -1315,6 +1315,9 @@ {"WebRtcUseEchoCanceller3", flag_descriptions::kWebrtcEchoCanceller3Name, flag_descriptions::kWebrtcEchoCanceller3Description, kOsAll, FEATURE_VALUE_TYPE(features::kWebRtcUseEchoCanceller3)}, + {"enable-webrtc-hybrid-agc", flag_descriptions::kWebrtcHybridAgcName, + flag_descriptions::kWebrtcHybridAgcDescription, kOsAll, + FEATURE_VALUE_TYPE(features::kWebRtcHybridAgc)}, {"enable-webrtc-new-encode-cpu-load-estimator", flag_descriptions::kWebrtcNewEncodeCpuLoadEstimatorName, flag_descriptions::kWebrtcNewEncodeCpuLoadEstimatorDescription, kOsAll, @@ -2795,6 +2798,10 @@ flag_descriptions::kPassiveDocumentEventListenersName, flag_descriptions::kPassiveDocumentEventListenersDescription, kOsAll, FEATURE_VALUE_TYPE(features::kPassiveDocumentEventListeners)}, + {"document-passive-wheel-event-listeners", + flag_descriptions::kPassiveDocumentWheelEventListenersName, + flag_descriptions::kPassiveDocumentWheelEventListenersDescription, kOsAll, + FEATURE_VALUE_TYPE(features::kPassiveDocumentWheelEventListeners)}, {"passive-event-listeners-due-to-fling", flag_descriptions::kPassiveEventListenersDueToFlingName, flag_descriptions::kPassiveEventListenersDueToFlingDescription, kOsAll,
diff --git a/chrome/browser/android/vr/arcore_device/arcore_gl.cc b/chrome/browser/android/vr/arcore_device/arcore_gl.cc index ab23afb3..1962ad7 100644 --- a/chrome/browser/android/vr/arcore_device/arcore_gl.cc +++ b/chrome/browser/android/vr/arcore_device/arcore_gl.cc
@@ -43,20 +43,19 @@ gfx::Transform ConvertUvsToTransformMatrix(const std::vector<float>& uvs) { // We're creating a matrix that transforms viewport UV coordinates (for a // screen-filling quad, origin at bottom left, u=1 at right, v=1 at top) to - // camera texture UV coordinates. This matrix is used with - // vr::WebVrRenderer to compute texture coordinates for copying an - // appropriately cropped and rotated subsection of the camera image. The - // SampleData is a bit unfortunate. ARCore doesn't provide a way to get a - // matrix directly. There's a function to transform UV vectors individually, - // which obviously can't be used from a shader, so we run that on selected - // vectors and recreate the matrix from the result. + // camera texture UV coordinates. This matrix is used to compute texture + // coordinates for copying an appropriately cropped and rotated subsection of + // the camera image. The SampleData is a bit unfortunate. ARCore doesn't + // provide a way to get a matrix directly. There's a function to transform UV + // vectors individually, which obviously can't be used from a shader, so we + // run that on selected vectors and recreate the matrix from the result. // Assumes that |uvs| is the result of transforming the display coordinates // from kDisplayCoordinatesForTransform. This combines the solved matrix with // a Y flip because ARCore's "normalized screen space" coordinates have the // origin at the top left to match 2D Android APIs, so it needs a Y flip to // get an origin at bottom left as used for textures. - DCHECK(uvs.size() == 6); + DCHECK_EQ(uvs.size(), 6U); float u00 = uvs[0]; float v00 = uvs[1]; float u10 = uvs[2];
diff --git a/chrome/browser/android/vr/arcore_device/arcore_gl.h b/chrome/browser/android/vr/arcore_device/arcore_gl.h index 2262ca97..5e941f3 100644 --- a/chrome/browser/android/vr/arcore_device/arcore_gl.h +++ b/chrome/browser/android/vr/arcore_device/arcore_gl.h
@@ -15,7 +15,6 @@ #include "base/memory/weak_ptr.h" #include "base/single_thread_task_runner.h" #include "chrome/browser/vr/fps_meter.h" -#include "chrome/browser/vr/renderers/web_vr_renderer.h" #include "device/vr/public/mojom/vr_service.mojom.h" #include "mojo/public/cpp/bindings/binding.h" #include "ui/display/display.h"
diff --git a/chrome/browser/android/vr/gvr_controller_delegate.cc b/chrome/browser/android/vr/gvr_controller_delegate.cc index 232546b..56efa65 100644 --- a/chrome/browser/android/vr/gvr_controller_delegate.cc +++ b/chrome/browser/android/vr/gvr_controller_delegate.cc
@@ -10,7 +10,7 @@ #include "chrome/browser/vr/input_event.h" #include "chrome/browser/vr/model/controller_model.h" #include "chrome/browser/vr/pose_util.h" -#include "chrome/browser/vr/ui_renderer.h" +#include "chrome/browser/vr/render_info.h" namespace { constexpr gfx::Vector3dF kForwardVector = {0.0f, 0.0f, -1.0f};
diff --git a/chrome/browser/android/vr/vr_gl_thread.h b/chrome/browser/android/vr/vr_gl_thread.h index 858e9c4..3d5db8f3 100644 --- a/chrome/browser/android/vr/vr_gl_thread.h +++ b/chrome/browser/android/vr/vr_gl_thread.h
@@ -14,13 +14,12 @@ #include "chrome/browser/android/vr/gl_browser_interface.h" #include "chrome/browser/android/vr/gvr_keyboard_delegate.h" #include "chrome/browser/vr/browser_ui_interface.h" -#include "chrome/browser/vr/content_input_delegate.h" #include "chrome/browser/vr/model/omnibox_suggestions.h" #include "chrome/browser/vr/model/sound_id.h" #include "chrome/browser/vr/platform_input_handler.h" #include "chrome/browser/vr/text_input_delegate.h" -#include "chrome/browser/vr/ui.h" #include "chrome/browser/vr/ui_browser_interface.h" +#include "chrome/browser/vr/ui_initial_state.h" #include "chrome/browser/vr/ui_test_input.h" #include "third_party/gvr-android-sdk/src/libraries/headers/vr/gvr/capi/include/gvr_types.h" #include "ui/gfx/native_widget_types.h"
diff --git a/chrome/browser/android/vr/vr_shell.h b/chrome/browser/android/vr/vr_shell.h index a85323f..504aaae 100644 --- a/chrome/browser/android/vr/vr_shell.h +++ b/chrome/browser/android/vr/vr_shell.h
@@ -18,13 +18,13 @@ #include "chrome/browser/ui/page_info/page_info_ui.h" #include "chrome/browser/ui/toolbar/chrome_toolbar_model_delegate.h" #include "chrome/browser/vr/assets_load_status.h" -#include "chrome/browser/vr/content_input_delegate.h" #include "chrome/browser/vr/exit_vr_prompt_choice.h" #include "chrome/browser/vr/metrics/session_metrics_helper.h" #include "chrome/browser/vr/model/capturing_state_model.h" +#include "chrome/browser/vr/platform_ui_input_delegate.h" #include "chrome/browser/vr/speech_recognizer.h" -#include "chrome/browser/vr/ui.h" #include "chrome/browser/vr/ui_browser_interface.h" +#include "chrome/browser/vr/ui_initial_state.h" #include "chrome/browser/vr/ui_unsupported_mode.h" #include "content/public/browser/web_contents_observer.h" #include "device/vr/android/gvr/cardboard_gamepad_data_provider.h" @@ -56,6 +56,8 @@ class VrInputConnection; class VrShellDelegate; class VrWebContentsObserver; +enum class VrUiTestActivityResult; +struct Assets; struct AutocompleteRequest; // The native instance of the Java VrShell. This class is not threadsafe and
diff --git a/chrome/browser/android/vr/vr_shell_delegate.h b/chrome/browser/android/vr/vr_shell_delegate.h index 0d9e60d8..c82b863 100644 --- a/chrome/browser/android/vr/vr_shell_delegate.h +++ b/chrome/browser/android/vr/vr_shell_delegate.h
@@ -15,7 +15,6 @@ #include "base/cancelable_callback.h" #include "base/macros.h" #include "chrome/browser/android/vr/vr_core_info.h" -#include "chrome/browser/vr/content_input_delegate.h" #include "chrome/browser/vr/metrics/session_metrics_helper.h" #include "device/vr/android/gvr/gvr_delegate_provider.h" #include "device/vr/public/mojom/vr_service.mojom.h"
diff --git a/chrome/browser/android/vr/vr_shell_gl.cc b/chrome/browser/android/vr/vr_shell_gl.cc index be9bdb06..ce0581ce 100644 --- a/chrome/browser/android/vr/vr_shell_gl.cc +++ b/chrome/browser/android/vr/vr_shell_gl.cc
@@ -29,17 +29,13 @@ #include "chrome/browser/android/vr/vr_controller.h" #include "chrome/browser/android/vr/vr_shell.h" #include "chrome/browser/vr/assets_loader.h" -#include "chrome/browser/vr/elements/ui_element.h" +#include "chrome/browser/vr/gl_texture_location.h" #include "chrome/browser/vr/graphics_delegate.h" #include "chrome/browser/vr/metrics/session_metrics_helper.h" #include "chrome/browser/vr/model/assets.h" #include "chrome/browser/vr/model/camera_model.h" -#include "chrome/browser/vr/model/model.h" #include "chrome/browser/vr/pose_util.h" -#include "chrome/browser/vr/ui.h" -#include "chrome/browser/vr/ui_element_renderer.h" #include "chrome/browser/vr/ui_interface.h" -#include "chrome/browser/vr/ui_scene.h" #include "chrome/browser/vr/ui_test_input.h" #include "chrome/browser/vr/vr_geometry_util.h" #include "chrome/browser/vr/vr_gl_util.h" @@ -178,19 +174,15 @@ return bounds; } -gvr::Rectf GetMinimalFov(const gfx::Transform& view_matrix, - const std::vector<const UiElement*>& elements, - const gvr::Rectf& recommended, - float z_near, - UiInterface* ui) { - Ui::FovRectangle rect = - ui->GetMinimalFov(view_matrix, elements, - Ui::FovRectangle{recommended.left, recommended.right, - recommended.bottom, recommended.top}, - z_near); +gvr::Rectf ToGvrRectf(const UiInterface::FovRectangle& rect) { return gvr::Rectf{rect.left, rect.right, rect.bottom, rect.top}; } +UiInterface::FovRectangle ToUiFovRect(const gvr::Rectf& rect) { + return UiInterface::FovRectangle{rect.left, rect.right, rect.bottom, + rect.top}; +} + } // namespace VrShellGl::VrShellGl(GlBrowserInterface* browser, @@ -316,10 +308,9 @@ // responding to RequestPresent. InitializeRenderer(); - ui_->OnGlInitialized( - content_texture_id_, UiElementRenderer::kTextureLocationExternal, - content_overlay_texture_id_, UiElementRenderer::kTextureLocationExternal, - ui_texture_id); + ui_->OnGlInitialized(content_texture_id_, kGlTextureLocationExternal, + content_overlay_texture_id_, kGlTextureLocationExternal, + ui_texture_id); } void VrShellGl::OnGpuProcessConnectionReady() { @@ -1281,7 +1272,7 @@ glClear(GL_COLOR_BUFFER_BIT); - DrawContentQuad(!ui_->IsContentOverlayTextureEmpty()); + DrawContentQuad(); acquired_frame_.Unbind(); } @@ -1318,21 +1309,16 @@ } std::vector<const UiElement*> overlay_elements; - if (is_webxr_frame) { - overlay_elements = ui_->GetWebVrOverlayElementsToDraw(); - } - - TRACE_COUNTER1("gpu", "VR overlay element count", overlay_elements.size()); - - if (!overlay_elements.empty() && is_webxr_frame) { + if (is_webxr_frame && ui_->HasWebXrOverlayElementsToDraw()) { // WebVR content may use an arbitrary size buffer. We need to draw browser // UI on a different buffer to make sure that our UI has enough resolution. acquired_frame_.BindBuffer(kMultiSampleBuffer); glClear(GL_COLOR_BUFFER_BIT); // Update recommended fov and uv per frame. - const gvr::Rectf& fov_recommended_left = main_viewport_.left.GetSourceFov(); - const gvr::Rectf& fov_recommended_right = - main_viewport_.right.GetSourceFov(); + const auto& fov_recommended_left = + ToUiFovRect(main_viewport_.left.GetSourceFov()); + const auto& fov_recommended_right = + ToUiFovRect(main_viewport_.right.GetSourceFov()); // Set render info to recommended setting. It will be used as our base for // optimization. @@ -1342,12 +1328,13 @@ UpdateEyeInfos(render_info_webvr_browser_ui.head_pose, webvr_overlay_viewport_, render_size_webvr_ui_, &render_info_webvr_browser_ui); - webvr_overlay_viewport_.left.SetSourceFov(GetMinimalFov( + auto fovs = ui_->GetMinimalFovForWebXrOverlayElements( render_info_webvr_browser_ui.left_eye_model.view_matrix, - overlay_elements, fov_recommended_left, kZNear, ui_.get())); - webvr_overlay_viewport_.right.SetSourceFov(GetMinimalFov( + fov_recommended_left, render_info_webvr_browser_ui.right_eye_model.view_matrix, - overlay_elements, fov_recommended_right, kZNear, ui_.get())); + fov_recommended_right, kZNear); + webvr_overlay_viewport_.left.SetSourceFov(ToGvrRectf(fovs.first)); + webvr_overlay_viewport_.right.SetSourceFov(ToGvrRectf(fovs.second)); DCHECK_EQ(viewport_list_.GetSize(), 2U); viewport_list_.SetBufferViewport(2, webvr_overlay_viewport_.left); @@ -1630,18 +1617,17 @@ CHECK(buffer); // Use an identity UV transform, the image is already oriented correctly. - ui_->DrawWebVr(buffer->local_texture, kWebVrIdentityUvTransform, 0, 0); + ui_->DrawWebXr(buffer->local_texture, kWebVrIdentityUvTransform); } else { // Apply the UV transform from the SurfaceTexture, that's usually a Y flip. - ui_->DrawWebVr(webvr_texture_id_, webvr_surface_texture_uv_transform_, 0, - 0); + ui_->DrawWebXr(webvr_texture_id_, webvr_surface_texture_uv_transform_); } } -void VrShellGl::DrawContentQuad(bool draw_overlay_texture) { +void VrShellGl::DrawContentQuad() { // Add a 2 pixel border to avoid aliasing issues at the edge of the texture. constexpr float kBorder = 2; - TRACE_EVENT0("gpu", "VrShellGl::DrawContentQuad"); + TRACE_EVENT0("gpu", __func__); // Don't need face culling, depth testing, blending, etc. Turn it all off. glDisable(GL_CULL_FACE); glDisable(GL_SCISSOR_TEST); @@ -1654,16 +1640,10 @@ content_tex_buffer_size_.height() * kContentVignetteBorder - kBorder, content_tex_buffer_size_.width() + 2 * kBorder, content_tex_buffer_size_.height() + 2 * kBorder); - ui_->DrawWebVr(content_texture_id_, kContentUvTransform, - kBorder / content_tex_buffer_size_.width(), - kBorder / content_tex_buffer_size_.height()); - if (draw_overlay_texture) { - glEnable(GL_BLEND); - glBlendFunc(GL_ONE, GL_ONE_MINUS_SRC_ALPHA); - ui_->DrawWebVr(content_overlay_texture_id_, kContentUvTransform, + + ui_->DrawContent(kContentUvTransform, kBorder / content_tex_buffer_size_.width(), kBorder / content_tex_buffer_size_.height()); - } } void VrShellGl::OnPause() {
diff --git a/chrome/browser/android/vr/vr_shell_gl.h b/chrome/browser/android/vr/vr_shell_gl.h index b9deacda..8dedd921 100644 --- a/chrome/browser/android/vr/vr_shell_gl.h +++ b/chrome/browser/android/vr/vr_shell_gl.h
@@ -19,13 +19,11 @@ #include "chrome/browser/android/vr/android_vsync_helper.h" #include "chrome/browser/android/vr/vr_controller.h" #include "chrome/browser/android/vr/web_xr_presentation_state.h" -#include "chrome/browser/vr/content_input_delegate.h" #include "chrome/browser/vr/fps_meter.h" #include "chrome/browser/vr/model/controller_model.h" +#include "chrome/browser/vr/render_info.h" #include "chrome/browser/vr/render_loop.h" #include "chrome/browser/vr/sliding_average.h" -#include "chrome/browser/vr/ui_input_manager.h" -#include "chrome/browser/vr/ui_renderer.h" #include "chrome/browser/vr/ui_test_input.h" #include "device/vr/public/mojom/vr_service.mojom.h" #include "device/vr/vr_device.h" @@ -64,6 +62,8 @@ class FPSMeter; class GlBrowserInterface; class MailboxToSurfaceBridge; +class PlatformInputHandler; +class PlatformUiInputDelegate; class ScopedGpuTrace; class SlidingTimeDeltaAverage; class UiInterface; @@ -187,7 +187,7 @@ void DrawFrameSubmitNow(int16_t frame_index, const gfx::Transform& head_pose); bool ShouldDrawWebVr(); void DrawWebVr(); - void DrawContentQuad(bool draw_overlay_texture); + void DrawContentQuad(); bool WebVrPoseByteIsValid(int pose_index_byte); void OnContentFrameAvailable();
diff --git a/chrome/browser/apps/guest_view/web_view_browsertest.cc b/chrome/browser/apps/guest_view/web_view_browsertest.cc index ea7c17e5..5e6d444 100644 --- a/chrome/browser/apps/guest_view/web_view_browsertest.cc +++ b/chrome/browser/apps/guest_view/web_view_browsertest.cc
@@ -237,12 +237,10 @@ class SelectControlWaiter : public aura::WindowObserver, public aura::EnvObserver { public: - SelectControlWaiter() { - aura::Env::GetInstanceDontCreate()->AddObserver(this); - } + SelectControlWaiter() { aura::Env::GetInstance()->AddObserver(this); } ~SelectControlWaiter() override { - aura::Env::GetInstanceDontCreate()->RemoveObserver(this); + aura::Env::GetInstance()->RemoveObserver(this); } void Wait(bool wait_for_widget_shown) {
diff --git a/chrome/browser/apps/guest_view/web_view_interactive_browsertest.cc b/chrome/browser/apps/guest_view/web_view_interactive_browsertest.cc index 49211550..86b7f71 100644 --- a/chrome/browser/apps/guest_view/web_view_interactive_browsertest.cc +++ b/chrome/browser/apps/guest_view/web_view_interactive_browsertest.cc
@@ -22,6 +22,7 @@ #include "chrome/browser/profiles/profile.h" #include "chrome/browser/renderer_context_menu/render_view_context_menu_browsertest_util.h" #include "chrome/browser/renderer_context_menu/render_view_context_menu_test_util.h" +#include "chrome/browser/ui/views_mode_controller.h" #include "chrome/test/base/interactive_test_utils.h" #include "chrome/test/base/test_launcher_utils.h" #include "chrome/test/base/ui_test_utils.h" @@ -52,6 +53,7 @@ #include "ui/base/ime/ime_text_span.h" #include "ui/base/ime/text_input_client.h" #include "ui/base/test/ui_controls.h" +#include "ui/base/ui_features.h" #include "ui/events/keycodes/keyboard_codes.h" #include "ui/gfx/geometry/rect.h" #include "ui/gfx/range/range.h" @@ -871,20 +873,27 @@ // move the focus to the next focusable element. ExtensionTestMessageListener listener("button1-advance-focus", false); listener.set_failure_message("TEST_FAILED"); - // TODO(fsamuel): A third Tab key press should not be necessary. - // The <webview> will take keyboard focus but it will not focus an initial - // element. The initial element is dependent upon tab direction which blink - // does not propagate to the plugin. - // See http://crbug.com/147644. content::SimulateKeyPress(embedder_web_contents, ui::DomKey::TAB, ui::DomCode::TAB, ui::VKEY_TAB, false, false, false, false); content::SimulateKeyPress(embedder_web_contents, ui::DomKey::TAB, ui::DomCode::TAB, ui::VKEY_TAB, false, false, false, false); - content::SimulateKeyPress(embedder_web_contents, ui::DomKey::TAB, - ui::DomCode::TAB, ui::VKEY_TAB, false, false, - false, false); + +#if defined(OS_MACOSX) + bool is_cocoa = true; +#if BUILDFLAG(MAC_VIEWS_BROWSER) + is_cocoa = views_mode_controller::IsViewsBrowserCocoa(); +#endif // BUILDFLAG(MAC_VIEWS_BROWSER) + // TODO(mcnee): A third Tab key press should not be necessary, but we seem + // to need this on Mac when using Cocoa browser UI. + if (is_cocoa) { + content::SimulateKeyPress(embedder_web_contents, ui::DomKey::TAB, + ui::DomCode::TAB, ui::VKEY_TAB, false, false, + false, false); + } +#endif // defined(OS_MACOSX) + ASSERT_TRUE(listener.WaitUntilSatisfied()); } }
diff --git a/chrome/browser/background/background_mode_manager_unittest.cc b/chrome/browser/background/background_mode_manager_unittest.cc index deb11b0..e4dfba4 100644 --- a/chrome/browser/background/background_mode_manager_unittest.cc +++ b/chrome/browser/background/background_mode_manager_unittest.cc
@@ -45,8 +45,7 @@ #if defined(OS_CHROMEOS) #include "chrome/browser/chromeos/login/users/scoped_test_user_manager.h" -#include "chrome/browser/chromeos/settings/cros_settings.h" -#include "chrome/browser/chromeos/settings/device_settings_service.h" +#include "chrome/browser/chromeos/settings/scoped_cros_settings_test_helper.h" #endif using testing::_; @@ -320,8 +319,7 @@ #if defined(OS_CHROMEOS) // ChromeOS needs extra services to run in the following order. - chromeos::ScopedTestDeviceSettingsService test_device_settings_service_; - chromeos::ScopedTestCrosSettings test_cros_settings_; + chromeos::ScopedCrosSettingsTestHelper cros_settings_test_helper_; chromeos::ScopedTestUserManager test_user_manager_; #endif
diff --git a/chrome/browser/background_fetch/background_fetch_browsertest.cc b/chrome/browser/background_fetch/background_fetch_browsertest.cc index 689cd1dfd..653f9b97 100644 --- a/chrome/browser/background_fetch/background_fetch_browsertest.cc +++ b/chrome/browser/background_fetch/background_fetch_browsertest.cc
@@ -493,7 +493,7 @@ IN_PROC_BROWSER_TEST_F(BackgroundFetchBrowserTest, FetchesRunToCompletionAndUpdateTitle_Fetched) { ASSERT_NO_FATAL_FAILURE(RunScriptAndCheckResultingEvent( - "RunFetchTillCompletion()", "backgroundfetched")); + "RunFetchTillCompletion()", "backgroundfetchsuccess")); base::RunLoop().RunUntilIdle(); // Give `updateUI` a chance to propagate. EXPECT_TRUE( base::StartsWith(offline_content_provider_observer_->latest_item().title,
diff --git a/chrome/browser/browser_resources.grd b/chrome/browser/browser_resources.grd index 643b28c..9462f9f 100644 --- a/chrome/browser/browser_resources.grd +++ b/chrome/browser/browser_resources.grd
@@ -75,6 +75,16 @@ <include name="IDR_ABOUT_DISCARDS_JS" file="resources\discards\discards.js" type="BINDATA" /> <include name="IDR_ABOUT_DISCARDS_MOJO_JS" file="${root_gen_dir}\chrome\browser\ui\webui\discards\discards.mojom.js" use_base_dir="false" type="BINDATA" /> <include name="IDR_ABOUT_DISCARDS_LIFECYCLE_UNIT_STATE_MOJO_JS" file="${root_gen_dir}\chrome\browser\resource_coordinator\lifecycle_unit_state.mojom.js" use_base_dir="false" type="BINDATA" /> + <include name="IDR_WEBAUTHN_ILLUSTRATION_BLE_1X" file="resources\webauthn\ble.png" type="BINDATA" /> + <include name="IDR_WEBAUTHN_ILLUSTRATION_BLE_NAME_1X" file="resources\webauthn\ble_name.png" type="BINDATA" /> + <include name="IDR_WEBAUTHN_ILLUSTRATION_BLE_TAP_1X" file="resources\webauthn\ble_tap.png" type="BINDATA" /> + <include name="IDR_WEBAUTHN_ILLUSTRATION_BLE_PIN_1X" file="resources\webauthn\ble_pin.png" type="BINDATA" /> + <include name="IDR_WEBAUTHN_ILLUSTRATION_ERROR_BLUETOOTH_1X" file="resources\webauthn\error_bt.png" type="BINDATA" /> + <include name="IDR_WEBAUTHN_ILLUSTRATION_ERROR_TIMEOUT_1X" file="resources\webauthn\error_timeout.png" type="BINDATA" /> + <include name="IDR_WEBAUTHN_ILLUSTRATION_PHONE_1X" file="resources\webauthn\phone.png" type="BINDATA" /> + <include name="IDR_WEBAUTHN_ILLUSTRATION_TOUCHID_1X" file="resources\webauthn\touchid.png" type="BINDATA" /> + <include name="IDR_WEBAUTHN_ILLUSTRATION_USB_1X" file="resources\webauthn\usb.png" type="BINDATA" /> + <include name="IDR_WEBAUTHN_ILLUSTRATION_WELCOME_1X" file="resources\webauthn\welcome.png" type="BINDATA" /> </if> <if expr="is_win"> <include name="IDR_ABOUT_CONFLICTS_HTML" file="resources\conflicts\about_conflicts.html" flattenhtml="true" allowexternalscript="true" type="BINDATA" />
diff --git a/chrome/browser/chrome_browser_main.cc b/chrome/browser/chrome_browser_main.cc index 34a8760..eae8352 100644 --- a/chrome/browser/chrome_browser_main.cc +++ b/chrome/browser/chrome_browser_main.cc
@@ -192,7 +192,6 @@ #include "third_party/blink/public/common/experiments/memory_ablation_experiment.h" #include "ui/base/l10n/l10n_util.h" #include "ui/base/layout.h" -#include "ui/base/material_design/material_design_controller.h" #include "ui/base/resource/resource_bundle.h" #if defined(OS_ANDROID) @@ -1224,11 +1223,6 @@ chrome::UMABrowsingActivityObserver::Init(); #endif // !defined(OS_ANDROID) - // The MaterialDesignController needs to look at command line flags, which - // are not available until this point. Now that they are, proceed with - // initializing the MaterialDesignController. - ui::MaterialDesignController::Initialize(); - #if defined(OS_WIN) // This is needed to enable ETW exporting when requested in about:flags. // Normally, we enable it in ContentMainRunnerImpl::Initialize when the flag
diff --git a/chrome/browser/chrome_security_exploit_browsertest.cc b/chrome/browser/chrome_security_exploit_browsertest.cc index 6289244..a6440a0 100644 --- a/chrome/browser/chrome_security_exploit_browsertest.cc +++ b/chrome/browser/chrome_security_exploit_browsertest.cc
@@ -435,14 +435,10 @@ CreateMemoryBackedBlob(payload, payload_type); std::string blob_id = blob->GetUUID(); - // Note: a well-behaved renderer would always send the following message here, - // but it's actually not necessary for the original attack to succeed, so we - // omit it. As a result there are some log warnings from the quota observer. - // - // IPC::IpcSecurityTestUtil::PwnMessageReceived( - // rfh->GetProcess()->GetChannel(), - // FileSystemHostMsg_OpenFileSystem(22, GURL(target_origin), - // storage::kFileSystemTypeTemporary)); + // Note: a well-behaved renderer would always call Open first before calling + // Create and Write, but it's actually not necessary for the original attack + // to succeed, so we omit it. As a result there are some log warnings from the + // quota observer. GURL target_url = GURL("filesystem:" + target_origin + "/temporary/exploit.html");
diff --git a/chrome/browser/chromeos/BUILD.gn b/chrome/browser/chromeos/BUILD.gn index e45b8d7..821355dc 100644 --- a/chrome/browser/chromeos/BUILD.gn +++ b/chrome/browser/chromeos/BUILD.gn
@@ -124,6 +124,7 @@ "//components/password_manager/core/browser:hash_password_manager", "//components/policy:generated", "//components/policy/core/browser", + "//components/policy/core/common:common", "//components/pref_registry", "//components/proxy_config", "//components/quirks", @@ -1384,6 +1385,8 @@ "policy/configuration_policy_handler_chromeos.h", "policy/device_auto_update_time_restrictions_decoder.cc", "policy/device_auto_update_time_restrictions_decoder.h", + "policy/device_auto_update_time_restrictions_utils.cc", + "policy/device_auto_update_time_restrictions_utils.h", "policy/device_cloud_policy_initializer.cc", "policy/device_cloud_policy_initializer.h", "policy/device_cloud_policy_manager_chromeos.cc", @@ -2143,6 +2146,7 @@ "policy/component_active_directory_policy_service_unittest.cc", "policy/configuration_policy_handler_chromeos_unittest.cc", "policy/device_auto_update_time_restrictions_decoder_unittest.cc", + "policy/device_auto_update_time_restrictions_utils_unittest.cc", "policy/device_cloud_policy_initializer_unittest.cc", "policy/device_cloud_policy_manager_chromeos_unittest.cc", "policy/device_cloud_policy_store_chromeos_unittest.cc", @@ -2395,12 +2399,12 @@ args = [ # generated file name - rebase_path(device_policy_remover_path), + rebase_path(device_policy_remover_path, root_build_dir), # directories for PATH variable to compile generated file - rebase_path(descriptor_pool_path), - rebase_path(symbol_database_path), - rebase_path(chrome_device_policy_pb2_path), + rebase_path(descriptor_pool_path, root_build_dir), + rebase_path(symbol_database_path, root_build_dir), + rebase_path(chrome_device_policy_pb2_path, root_build_dir), ] public_deps = [
diff --git a/chrome/browser/chromeos/accessibility/select_to_speak_event_handler.cc b/chrome/browser/chromeos/accessibility/select_to_speak_event_handler.cc index 72d45ac..dc1cddc 100644 --- a/chrome/browser/chromeos/accessibility/select_to_speak_event_handler.cc +++ b/chrome/browser/chromeos/accessibility/select_to_speak_event_handler.cc
@@ -49,14 +49,15 @@ const ui::KeyboardCode kSpeakSelectionKey = ui::VKEY_S; SelectToSpeakEventHandler::SelectToSpeakEventHandler() { - if (aura::Env::GetInstanceDontCreate()) - aura::Env::GetInstanceDontCreate()->AddPreTargetHandler( + if (aura::Env::HasInstance()) { + aura::Env::GetInstance()->AddPreTargetHandler( this, ui::EventTarget::Priority::kAccessibility); + } } SelectToSpeakEventHandler::~SelectToSpeakEventHandler() { - if (aura::Env::GetInstanceDontCreate()) - aura::Env::GetInstanceDontCreate()->RemovePreTargetHandler(this); + if (aura::Env::HasInstance()) + aura::Env::GetInstance()->RemovePreTargetHandler(this); } void SelectToSpeakEventHandler::SetSelectToSpeakStateSelecting(
diff --git a/chrome/browser/chromeos/arc/accessibility/ax_tree_source_arc.cc b/chrome/browser/chromeos/arc/accessibility/ax_tree_source_arc.cc index cae2312..3d470d8 100644 --- a/chrome/browser/chromeos/arc/accessibility/ax_tree_source_arc.cc +++ b/chrome/browser/chromeos/arc/accessibility/ax_tree_source_arc.cc
@@ -350,7 +350,7 @@ int labelled_by = -1; // Accessible name computation picks the first non-empty string from content - // description, text, or labelled by text. + // description, text, labelled by text, or pane title. std::string name; bool has_name = GetProperty(node, AXStringProperty::CONTENT_DESCRIPTION, &name); @@ -366,6 +366,8 @@ ax::mojom::StringAttribute::kName, &name); } } + if (name.empty()) + has_name |= GetProperty(node, AXStringProperty::PANE_TITLE, &name); // If it exists, set tooltip value as descritiption on node. std::string tooltip; @@ -400,6 +402,12 @@ } } + std::string place_holder; + if (GetProperty(node, AXStringProperty::HINT_TEXT, &place_holder)) { + out_data->AddStringAttribute(ax::mojom::StringAttribute::kPlaceholder, + place_holder); + } + // Int properties. int traversal_before = -1, traversal_after = -1; if (GetProperty(node, AXIntProperty::TRAVERSAL_BEFORE, &traversal_before)) {
diff --git a/chrome/browser/chromeos/arc/arc_util_unittest.cc b/chrome/browser/chromeos/arc/arc_util_unittest.cc index cf683ae..099dd77 100644 --- a/chrome/browser/chromeos/arc/arc_util_unittest.cc +++ b/chrome/browser/chromeos/arc/arc_util_unittest.cc
@@ -23,7 +23,7 @@ #include "chrome/browser/chromeos/profiles/profile_helper.h" #include "chrome/browser/chromeos/settings/cros_settings.h" #include "chrome/browser/chromeos/settings/device_settings_service.h" -#include "chrome/browser/chromeos/settings/install_attributes.h" +#include "chrome/browser/chromeos/settings/stub_install_attributes.h" #include "chrome/browser/policy/profile_policy_connector.h" #include "chrome/browser/policy/profile_policy_connector_factory.h" #include "chrome/browser/profiles/profile.h" @@ -153,22 +153,6 @@ DISALLOW_COPY_AND_ASSIGN(ScopedLogIn); }; -class FakeInstallAttributesManaged : public chromeos::InstallAttributes { - public: - FakeInstallAttributesManaged() : chromeos::InstallAttributes(nullptr) { - device_locked_ = true; - } - - ~FakeInstallAttributesManaged() { - policy::BrowserPolicyConnectorChromeOS::RemoveInstallAttributesForTesting(); - } - - void SetIsManaged(bool is_managed) { - registration_mode_ = is_managed ? policy::DEVICE_MODE_ENTERPRISE - : policy::DEVICE_MODE_CONSUMER; - } -}; - bool IsArcAllowedForProfileOnFirstCall(const Profile* profile) { ResetArcAllowedCheckForTesting(profile); return IsArcAllowedForProfile(profile); @@ -228,6 +212,7 @@ private: std::unique_ptr<base::test::ScopedCommandLine> command_line_; content::TestBrowserThreadBundle thread_bundle_; + chromeos::ScopedStubInstallAttributes test_install_attributes_; base::ScopedTempDir data_dir_; std::unique_ptr<TestingProfileManager> profile_manager_; std::unique_ptr<user_manager::ScopedUserManager> user_manager_enabler_;
diff --git a/chrome/browser/chromeos/attestation/enrollment_policy_observer_unittest.cc b/chrome/browser/chromeos/attestation/enrollment_policy_observer_unittest.cc index b7f6ae4..dd89c0b 100644 --- a/chrome/browser/chromeos/attestation/enrollment_policy_observer_unittest.cc +++ b/chrome/browser/chromeos/attestation/enrollment_policy_observer_unittest.cc
@@ -88,8 +88,7 @@ void SetUpDevicePolicy(bool enrollment_id_needed) { device_policy_.policy_data().set_enrollment_id_needed(enrollment_id_needed); - device_policy_.Build(); - session_manager_client_.set_device_policy(device_policy_.GetBlob()); + ReloadDevicePolicy(); ReloadDeviceSettings(); }
diff --git a/chrome/browser/chromeos/child_accounts/screen_time_controller.cc b/chrome/browser/chromeos/child_accounts/screen_time_controller.cc index 8fdcfbb..2d38ad6 100644 --- a/chrome/browser/chromeos/child_accounts/screen_time_controller.cc +++ b/chrome/browser/chromeos/child_accounts/screen_time_controller.cc
@@ -91,9 +91,12 @@ return current_screen_duration + previous_duration; } -void ScreenTimeController::CheckTimeLimit() { - // Stop any currently running timer. - ResetTimers(); +void ScreenTimeController::CheckTimeLimit(const std::string& source) { + VLOG(1) << "Checking time limits (source=" << source << ")"; + + // Stop all timers. They will be rescheduled below. + ResetStateTimers(); + ResetInSessionTimers(); base::Time now = base::Time::Now(); const icu::TimeZone& time_zone = @@ -162,10 +165,12 @@ } if (!state.next_state_change_time.is_null()) { + VLOG(1) << "Scheduling state change timer in " + << state.next_state_change_time - now; next_state_timer_.Start( - FROM_HERE, state.next_state_change_time - base::Time::Now(), + FROM_HERE, state.next_state_change_time - now, base::BindRepeating(&ScreenTimeController::CheckTimeLimit, - base::Unretained(this))); + base::Unretained(this), "next_state_timer_")); } // Schedule timer to refresh the screen time usage. @@ -174,6 +179,7 @@ if (reset_time <= now) { RefreshScreenLimit(); } else { + VLOG(1) << "Scheduling screen reset timer in " << reset_time - now; reset_screen_time_timer_.Start( FROM_HERE, reset_time - now, base::BindRepeating(&ScreenTimeController::RefreshScreenLimit, @@ -246,24 +252,30 @@ } void ScreenTimeController::OnPolicyChanged() { - CheckTimeLimit(); + CheckTimeLimit("OnPolicyChanged"); } -void ScreenTimeController::ResetTimers() { +void ScreenTimeController::ResetStateTimers() { + VLOG(1) << "Stopping state timers"; next_state_timer_.Stop(); - warning_notification_timer_.Stop(); - exit_notification_timer_.Stop(); - save_screen_time_timer_.Stop(); reset_screen_time_timer_.Stop(); } +void ScreenTimeController::ResetInSessionTimers() { + VLOG(1) << "Stopping in-session timers"; + warning_notification_timer_.Stop(); + exit_notification_timer_.Stop(); + save_screen_time_timer_.Stop(); +} + void ScreenTimeController::SaveScreenTimeProgressBeforeExit() { + VLOG(1) << "Saving screen time progress before exiting"; pref_service_->SetInteger(prefs::kScreenTimeMinutesUsed, GetScreenTimeDuration().InMinutes()); pref_service_->ClearPref(prefs::kCurrentScreenStartTime); pref_service_->CommitPendingWrite(); current_screen_start_time_ = base::Time(); - ResetTimers(); + ResetInSessionTimers(); } void ScreenTimeController::SaveScreenTimeProgressPeriodically() { @@ -428,7 +440,7 @@ pref_service_->SetTime(prefs::kCurrentScreenStartTime, current_screen_start_time_); pref_service_->CommitPendingWrite(); - CheckTimeLimit(); + CheckTimeLimit("OnSessionStateChanged"); save_screen_time_timer_.Start( FROM_HERE, kScreenTimeUsageUpdateFrequency, @@ -439,7 +451,7 @@ } void ScreenTimeController::TimezoneChanged(const icu::TimeZone& timezone) { - CheckTimeLimit(); + CheckTimeLimit("TimezoneChanged"); } } // namespace chromeos
diff --git a/chrome/browser/chromeos/child_accounts/screen_time_controller.h b/chrome/browser/chromeos/child_accounts/screen_time_controller.h index d75fe10..40285a1e 100644 --- a/chrome/browser/chromeos/child_accounts/screen_time_controller.h +++ b/chrome/browser/chromeos/child_accounts/screen_time_controller.h
@@ -39,15 +39,15 @@ // kScreenTimeMinutesUsed plus time passed since |current_screen_start_time_|. base::TimeDelta GetScreenTimeDuration() const; - // Call time limit processor for new state. - void CheckTimeLimit(); - private: // The types of time limit notifications. |SCREEN_TIME| is used when the // the screen time limit is about to be used up, and |BED_TIME| is used when // the bed time is approaching. enum TimeLimitNotificationType { kScreenTime, kBedTime }; + // Call time limit processor for new state. + void CheckTimeLimit(const std::string& source); + // Request to lock the screen and show the time limits message when the screen // is locked. void ForceScreenLockByPolicy(base::Time next_unlock_time); @@ -73,7 +73,8 @@ void OnPolicyChanged(); // Reset any currently running timers. - void ResetTimers(); + void ResetStateTimers(); + void ResetInSessionTimers(); // Save the screen time progress when screen is locked, or user sign out or // power down the device. @@ -98,10 +99,17 @@ content::BrowserContext* context_; PrefService* pref_service_; + + // Called to show warning and exit notifications. base::OneShotTimer warning_notification_timer_; base::OneShotTimer exit_notification_timer_; - base::OneShotTimer next_state_timer_; + + // Called to record the current amount of time spent in-session. base::RepeatingTimer save_screen_time_timer_; + + // Timers that are called when lock screen state change event happens, ie, + // bedtime is over or the usage limit ends. + base::OneShotTimer next_state_timer_; base::OneShotTimer reset_screen_time_timer_; // Timestamp to keep track of the screen start time for the current active
diff --git a/chrome/browser/chromeos/child_accounts/usage_time_limit_processor.h b/chrome/browser/chromeos/child_accounts/usage_time_limit_processor.h index ae04f5a4..c7dd5fd9 100644 --- a/chrome/browser/chromeos/child_accounts/usage_time_limit_processor.h +++ b/chrome/browser/chromeos/child_accounts/usage_time_limit_processor.h
@@ -112,8 +112,8 @@ enum class ActivePolicies { kNoActivePolicy, kOverride, - kFixedLimit, - kUsageLimit + kFixedLimit, // Past bed time (ie, 9pm) + kUsageLimit // Too much time on screen (ie, 30 minutes per day) }; struct State {
diff --git a/chrome/browser/chromeos/chrome_browser_main_chromeos.cc b/chrome/browser/chromeos/chrome_browser_main_chromeos.cc index 319fbbb..69f3ee6 100644 --- a/chrome/browser/chromeos/chrome_browser_main_chromeos.cc +++ b/chrome/browser/chromeos/chrome_browser_main_chromeos.cc
@@ -89,6 +89,7 @@ #include "chrome/browser/chromeos/resource_reporter/resource_reporter.h" #include "chrome/browser/chromeos/settings/device_oauth2_token_service_factory.h" #include "chrome/browser/chromeos/settings/device_settings_service.h" +#include "chrome/browser/chromeos/settings/install_attributes.h" #include "chrome/browser/chromeos/settings/shutdown_policy_forwarder.h" #include "chrome/browser/chromeos/system/input_device_settings.h" #include "chrome/browser/chromeos/system/user_removal_manager.h" @@ -301,6 +302,7 @@ // signals sent from the session manager. This needs to happen before // g_browser_process initializes BrowserPolicyConnector. DeviceSettingsService::Initialize(); + InstallAttributes::Initialize(); } ~DBusPreEarlyInit() { @@ -531,6 +533,11 @@ std::move(system_slot) /* public_slot */, crypto::ScopedPK11Slot() /* private_slot */); database->SetSystemSlot(std::move(system_slot_copy)); + + // TODO(https://crbug.com/844537): Remove this after we've collected logs + // that show device-wide certificates disappearing. + database->LogUserCertificates("SystemTokenInitiallyLoaded"); + system_token_cert_database_ = std::move(database); VLOG(1) << "SystemTokenCertDBInitializer: Passing system token NSS " @@ -1206,7 +1213,8 @@ ChromeBrowserMainPartsLinux::PostDestroyThreads(); - // Destroy DeviceSettingsService after g_browser_process. + // Shutdown these services after g_browser_process. + InstallAttributes::Shutdown(); DeviceSettingsService::Shutdown(); }
diff --git a/chrome/browser/chromeos/extensions/backdrop_wallpaper_handlers/backdrop_wallpaper_handlers.cc b/chrome/browser/chromeos/extensions/backdrop_wallpaper_handlers/backdrop_wallpaper_handlers.cc index f666ce65..c68f3b1 100644 --- a/chrome/browser/chromeos/extensions/backdrop_wallpaper_handlers/backdrop_wallpaper_handlers.cc +++ b/chrome/browser/chromeos/extensions/backdrop_wallpaper_handlers/backdrop_wallpaper_handlers.cc
@@ -32,6 +32,9 @@ "https://clients3.google.com/cast/chromecast/home/wallpaper/" "image?rt=b"; +// The label used to return exclusive content or filter unwanted images. +constexpr char kFilteringLabel[] = "chromebook"; + // Helper function to parse the data from a |backdrop::Image| object and save it // to |image_info_out|. void ParseImageInfo( @@ -142,6 +145,7 @@ backdrop::GetCollectionsRequest request; // The language field may include the country code (e.g. "en-US"). request.set_language(g_browser_process->GetApplicationLocale()); + request.add_filtering_label(kFilteringLabel); std::string serialized_proto; request.SerializeToString(&serialized_proto); @@ -219,6 +223,7 @@ // The language field may include the country code (e.g. "en-US"). request.set_language(g_browser_process->GetApplicationLocale()); request.set_collection_id(collection_id_); + request.add_filtering_label(kFilteringLabel); std::string serialized_proto; request.SerializeToString(&serialized_proto); @@ -294,6 +299,7 @@ // The language field may include the country code (e.g. "en-US"). request.set_language(g_browser_process->GetApplicationLocale()); request.add_collection_ids(collection_id_); + request.add_filtering_label(kFilteringLabel); if (!resume_token_.empty()) request.set_resume_token(resume_token_); std::string serialized_proto;
diff --git a/chrome/browser/chromeos/extensions/device_local_account_external_policy_loader_unittest.cc b/chrome/browser/chromeos/extensions/device_local_account_external_policy_loader_unittest.cc index f2fc817..3253e83 100644 --- a/chrome/browser/chromeos/extensions/device_local_account_external_policy_loader_unittest.cc +++ b/chrome/browser/chromeos/extensions/device_local_account_external_policy_loader_unittest.cc
@@ -44,8 +44,7 @@ #include "url/gurl.h" #if defined(OS_CHROMEOS) -#include "chrome/browser/chromeos/settings/cros_settings.h" -#include "chrome/browser/chromeos/settings/device_settings_service.h" +#include "chrome/browser/chromeos/settings/scoped_cros_settings_test_helper.h" #endif // defined(OS_CHROMEOS) using ::testing::Field; @@ -130,8 +129,7 @@ content::InProcessUtilityThreadHelper in_process_utility_thread_helper_; #if defined(OS_CHROMEOS) - chromeos::ScopedTestDeviceSettingsService test_device_settings_service_; - chromeos::ScopedTestCrosSettings test_cros_settings_; + chromeos::ScopedCrosSettingsTestHelper cros_settings_test_helper_; #endif // defined(OS_CHROMEOS) };
diff --git a/chrome/browser/chromeos/extensions/external_cache_impl_unittest.cc b/chrome/browser/chromeos/extensions/external_cache_impl_unittest.cc index 01a755e2..f035f24 100644 --- a/chrome/browser/chromeos/extensions/external_cache_impl_unittest.cc +++ b/chrome/browser/chromeos/extensions/external_cache_impl_unittest.cc
@@ -17,8 +17,7 @@ #include "base/task/post_task.h" #include "base/values.h" #include "chrome/browser/chromeos/extensions/external_cache_delegate.h" -#include "chrome/browser/chromeos/settings/cros_settings.h" -#include "chrome/browser/chromeos/settings/device_settings_service.h" +#include "chrome/browser/chromeos/settings/scoped_cros_settings_test_helper.h" #include "chrome/browser/extensions/external_provider_impl.h" #include "content/public/browser/browser_thread.h" #include "content/public/test/test_browser_thread_bundle.h" @@ -128,8 +127,7 @@ std::unique_ptr<base::DictionaryValue> prefs_; std::map<std::string, std::string> installed_extensions_; - ScopedTestDeviceSettingsService test_device_settings_service_; - ScopedTestCrosSettings test_cros_settings_; + ScopedCrosSettingsTestHelper cros_settings_test_helper_; DISALLOW_COPY_AND_ASSIGN(ExternalCacheImplTest); };
diff --git a/chrome/browser/chromeos/extensions/info_private_apitest.cc b/chrome/browser/chromeos/extensions/info_private_apitest.cc index 58d76d6..7d86214 100644 --- a/chrome/browser/chromeos/extensions/info_private_apitest.cc +++ b/chrome/browser/chromeos/extensions/info_private_apitest.cc
@@ -259,18 +259,11 @@ ChromeOSManagedDeviceInfoPrivateTest() = default; ~ChromeOSManagedDeviceInfoPrivateTest() override = default; - protected: - void SetUpInProcessBrowserTestFixture() override { - // Set up fake install attributes. - std::unique_ptr<chromeos::StubInstallAttributes> attributes = - std::make_unique<chromeos::StubInstallAttributes>(); - attributes->SetCloudManaged("fake-domain", "fake-id"); - policy::BrowserPolicyConnectorChromeOS::SetInstallAttributesForTesting( - attributes.release()); - ChromeOSInfoPrivateTest::SetUpInProcessBrowserTestFixture(); - } - private: + chromeos::ScopedStubInstallAttributes test_install_attributes_{ + chromeos::StubInstallAttributes::CreateCloudManaged("fake-domain", + "fake-id")}; + DISALLOW_COPY_AND_ASSIGN(ChromeOSManagedDeviceInfoPrivateTest); };
diff --git a/chrome/browser/chromeos/extensions/wallpaper_private_api_unittest.cc b/chrome/browser/chromeos/extensions/wallpaper_private_api_unittest.cc index 11f59d6..19d176e 100644 --- a/chrome/browser/chromeos/extensions/wallpaper_private_api_unittest.cc +++ b/chrome/browser/chromeos/extensions/wallpaper_private_api_unittest.cc
@@ -9,8 +9,7 @@ #include "base/macros.h" #include "base/memory/ptr_util.h" #include "chrome/browser/chromeos/login/users/fake_chrome_user_manager.h" -#include "chrome/browser/chromeos/settings/cros_settings.h" -#include "chrome/browser/chromeos/settings/device_settings_service.h" +#include "chrome/browser/chromeos/settings/scoped_cros_settings_test_helper.h" #include "chrome/browser/ui/ash/test_wallpaper_controller.h" #include "chrome/browser/ui/ash/wallpaper_controller_client.h" #include "chromeos/cryptohome/system_salt_getter.h" @@ -37,14 +36,10 @@ void SetUp() override { // Required for WallpaperControllerClient. - chromeos::DeviceSettingsService::Initialize(); - chromeos::CrosSettings::Initialize(); chromeos::SystemSaltGetter::Initialize(); } void TearDown() override { - chromeos::CrosSettings::Shutdown(); - chromeos::DeviceSettingsService::Shutdown(); chromeos::SystemSaltGetter::Shutdown(); } @@ -56,6 +51,8 @@ private: std::unique_ptr<content::TestBrowserThreadBundle> thread_bundle_; + chromeos::ScopedCrosSettingsTestHelper cros_settings_test_helper_; + chromeos::FakeChromeUserManager* fake_user_manager_; user_manager::ScopedUserManager scoped_user_manager_;
diff --git a/chrome/browser/chromeos/file_manager/file_manager_browsertest_base.cc b/chrome/browser/chromeos/file_manager/file_manager_browsertest_base.cc index e58c2a3..6ec182a 100644 --- a/chrome/browser/chromeos/file_manager/file_manager_browsertest_base.cc +++ b/chrome/browser/chromeos/file_manager/file_manager_browsertest_base.cc
@@ -17,6 +17,7 @@ #include "base/run_loop.h" #include "base/strings/strcat.h" #include "base/strings/string_piece.h" +#include "base/test/test_timeouts.h" #include "base/threading/thread_restrictions.h" #include "base/time/time.h" #include "chrome/browser/browser_process.h" @@ -48,6 +49,7 @@ #include "content/public/test/test_utils.h" #include "extensions/browser/api/test/test_api.h" #include "extensions/browser/notification_types.h" +#include "extensions/browser/process_manager.h" #include "google_apis/drive/drive_api_parser.h" #include "google_apis/drive/test_util.h" #include "media/base/media_switches.h" @@ -1015,6 +1017,9 @@ display_service_ = std::make_unique<NotificationDisplayServiceTester>(profile()); + extensions::ProcessManager::SetEventPageIdleTimeForTesting( + TestTimeouts::action_max_timeout().InMilliseconds()); + // The test resources are setup: enable and add default ChromeOS component // extensions now and not before: crbug.com/831074, crbug.com/804413 test::AddDefaultComponentExtensionsOnMainThread(profile());
diff --git a/chrome/browser/chromeos/file_manager/file_tasks_unittest.cc b/chrome/browser/chromeos/file_manager/file_tasks_unittest.cc index 8f059ad..d0dc4ac 100644 --- a/chrome/browser/chromeos/file_manager/file_tasks_unittest.cc +++ b/chrome/browser/chromeos/file_manager/file_tasks_unittest.cc
@@ -17,8 +17,7 @@ #include "chrome/browser/chromeos/file_manager/app_id.h" #include "chrome/browser/chromeos/file_manager/path_util.h" #include "chrome/browser/chromeos/login/users/scoped_test_user_manager.h" -#include "chrome/browser/chromeos/settings/cros_settings.h" -#include "chrome/browser/chromeos/settings/device_settings_service.h" +#include "chrome/browser/chromeos/settings/scoped_cros_settings_test_helper.h" #include "chrome/browser/extensions/extension_service.h" #include "chrome/browser/extensions/test_extension_system.h" #include "chrome/common/pref_names.h" @@ -533,8 +532,7 @@ }; content::TestBrowserThreadBundle thread_bundle_; - chromeos::ScopedTestDeviceSettingsService test_device_settings_service_; - chromeos::ScopedTestCrosSettings test_cros_settings_; + chromeos::ScopedCrosSettingsTestHelper cros_settings_test_helper_; chromeos::ScopedTestUserManager test_user_manager_; TestingProfile test_profile_; base::CommandLine command_line_;
diff --git a/chrome/browser/chromeos/file_manager/gallery_jstest.cc b/chrome/browser/chromeos/file_manager/gallery_jstest.cc index 6580e24..bb7cc59 100644 --- a/chrome/browser/chromeos/file_manager/gallery_jstest.cc +++ b/chrome/browser/chromeos/file_manager/gallery_jstest.cc
@@ -43,8 +43,7 @@ } IN_PROC_BROWSER_TEST_F(GalleryJsTest, GalleryDataModelTest) { - RunTest( - base::FilePath(FILE_PATH_LITERAL("gallery_data_model_unittest.html"))); + RunGeneratedTest("/gallery_data_model_unittest.html"); } IN_PROC_BROWSER_TEST_F(GalleryJsTest, RibbonTest) {
diff --git a/chrome/browser/chromeos/lock_screen_apps/app_manager_impl_unittest.cc b/chrome/browser/chromeos/lock_screen_apps/app_manager_impl_unittest.cc index c227c5fa..5bbe5cd8a 100644 --- a/chrome/browser/chromeos/lock_screen_apps/app_manager_impl_unittest.cc +++ b/chrome/browser/chromeos/lock_screen_apps/app_manager_impl_unittest.cc
@@ -20,8 +20,7 @@ #include "chrome/browser/chromeos/lock_screen_apps/fake_lock_screen_profile_creator.h" #include "chrome/browser/chromeos/login/users/scoped_test_user_manager.h" #include "chrome/browser/chromeos/note_taking_helper.h" -#include "chrome/browser/chromeos/settings/cros_settings.h" -#include "chrome/browser/chromeos/settings/device_settings_service.h" +#include "chrome/browser/chromeos/settings/scoped_cros_settings_test_helper.h" #include "chrome/browser/extensions/extension_service.h" #include "chrome/browser/extensions/test_extension_system.h" #include "chrome/common/chrome_constants.h" @@ -441,8 +440,7 @@ std::unique_ptr<base::test::ScopedCommandLine> command_line_; content::TestBrowserThreadBundle threads_; - chromeos::ScopedTestDeviceSettingsService test_device_settings_service_; - chromeos::ScopedTestCrosSettings test_cros_settings_; + chromeos::ScopedCrosSettingsTestHelper cros_settings_test_helper_; chromeos::ScopedTestUserManager user_manager_; TestingProfileManager profile_manager_;
diff --git a/chrome/browser/chromeos/lock_screen_apps/lock_screen_profile_creator_impl_unittest.cc b/chrome/browser/chromeos/lock_screen_apps/lock_screen_profile_creator_impl_unittest.cc index ec820d9..388a495 100644 --- a/chrome/browser/chromeos/lock_screen_apps/lock_screen_profile_creator_impl_unittest.cc +++ b/chrome/browser/chromeos/lock_screen_apps/lock_screen_profile_creator_impl_unittest.cc
@@ -20,8 +20,7 @@ #include "chrome/browser/chromeos/login/users/scoped_test_user_manager.h" #include "chrome/browser/chromeos/note_taking_helper.h" #include "chrome/browser/chromeos/profiles/profile_helper.h" -#include "chrome/browser/chromeos/settings/cros_settings.h" -#include "chrome/browser/chromeos/settings/device_settings_service.h" +#include "chrome/browser/chromeos/settings/scoped_cros_settings_test_helper.h" #include "chrome/browser/extensions/extension_service.h" #include "chrome/browser/extensions/test_extension_system.h" #include "chrome/browser/profiles/profile_manager.h" @@ -342,8 +341,8 @@ base::ScopedTempDir user_data_dir_; ScopedTestingLocalState local_state_; content::TestBrowserThreadBundle threads_; - chromeos::ScopedTestDeviceSettingsService test_device_settings_service_; - chromeos::ScopedTestCrosSettings test_cros_settings_; + + chromeos::ScopedCrosSettingsTestHelper cros_settings_test_helper_; chromeos::ScopedTestUserManager test_user_manager_; UnittestProfileManager* profile_manager_;
diff --git a/chrome/browser/chromeos/lock_screen_apps/toast_dialog_view.h b/chrome/browser/chromeos/lock_screen_apps/toast_dialog_view.h index 0ae4ab9..57428260 100644 --- a/chrome/browser/chromeos/lock_screen_apps/toast_dialog_view.h +++ b/chrome/browser/chromeos/lock_screen_apps/toast_dialog_view.h
@@ -8,7 +8,7 @@ #include "base/callback.h" #include "base/macros.h" #include "base/strings/string16.h" -#include "ui/views/bubble/bubble_dialog_delegate.h" +#include "ui/views/bubble/bubble_dialog_delegate_view.h" namespace lock_screen_apps {
diff --git a/chrome/browser/chromeos/login/auth/cryptohome_authenticator_unittest.cc b/chrome/browser/chromeos/login/auth/cryptohome_authenticator_unittest.cc index 9d68638..af0732b 100644 --- a/chrome/browser/chromeos/login/auth/cryptohome_authenticator_unittest.cc +++ b/chrome/browser/chromeos/login/auth/cryptohome_authenticator_unittest.cc
@@ -22,7 +22,6 @@ #include "chrome/browser/chromeos/ownership/owner_settings_service_chromeos_factory.h" #include "chrome/browser/chromeos/profiles/profile_helper.h" #include "chrome/browser/chromeos/settings/cros_settings.h" -#include "chrome/browser/chromeos/settings/device_settings_test_helper.h" #include "chrome/browser/chromeos/settings/scoped_cros_settings_test_helper.h" #include "chrome/test/base/testing_browser_process.h" #include "chrome/test/base/testing_profile.h" @@ -435,10 +434,8 @@ UserContext user_context_with_transformed_key_; Key transformed_key_; - ScopedDeviceSettingsTestHelper device_settings_test_helper_; - ScopedTestCrosSettings test_cros_settings_; - - chromeos::FakeChromeUserManager* user_manager_; + ScopedCrosSettingsTestHelper cros_settings_test_helper_; + FakeChromeUserManager* user_manager_; std::unique_ptr<TestingProfile> profile_; std::unique_ptr<TestingProfileManager> profile_manager_; user_manager::ScopedUserManager user_manager_enabler_;
diff --git a/chrome/browser/chromeos/login/auto_launched_kiosk_browsertest.cc b/chrome/browser/chromeos/login/auto_launched_kiosk_browsertest.cc index 4cc3a61..373cb8e 100644 --- a/chrome/browser/chromeos/login/auto_launched_kiosk_browsertest.cc +++ b/chrome/browser/chromeos/login/auto_launched_kiosk_browsertest.cc
@@ -287,9 +287,8 @@ public: AutoLaunchedKioskTest() : install_attributes_( - chromeos::ScopedStubInstallAttributes::CreateCloudManaged( - "domain.com", - "device_id")), + chromeos::StubInstallAttributes::CreateCloudManaged("domain.com", + "device_id")), fake_session_manager_(new PersistentSessionManagerClient()), fake_cws_(new FakeCWS) { set_chromeos_user_ = false;
diff --git a/chrome/browser/chromeos/login/demo_mode/demo_extensions_external_loader_unittest.cc b/chrome/browser/chromeos/login/demo_mode/demo_extensions_external_loader_unittest.cc index f9a172a..39fc144 100644 --- a/chrome/browser/chromeos/login/demo_mode/demo_extensions_external_loader_unittest.cc +++ b/chrome/browser/chromeos/login/demo_mode/demo_extensions_external_loader_unittest.cc
@@ -140,7 +140,7 @@ bool wait_for_offline_resources_load) { if (mount_demo_resources) { image_loader_client_->SetMountPathForComponent( - "demo_mode_resources", offline_demo_resources_.GetPath()); + "demo-mode-resources", offline_demo_resources_.GetPath()); } ASSERT_TRUE(DemoSession::StartIfInDemoMode());
diff --git a/chrome/browser/chromeos/login/demo_mode/demo_session.cc b/chrome/browser/chromeos/login/demo_mode/demo_session.cc index 43e00e2..dd5165e 100644 --- a/chrome/browser/chromeos/login/demo_mode/demo_session.cc +++ b/chrome/browser/chromeos/login/demo_mode/demo_session.cc
@@ -29,11 +29,11 @@ DemoSession::EnrollmentType::kNone; // The name of the offline demo resource image loader component. -constexpr char kOfflineResourcesComponentName[] = "demo_mode_resources"; +constexpr char kDemoResourcesComponentName[] = "demo-mode-resources"; // The path from which the offline demo mode resources component should be // loaded by the image loader service. -constexpr base::FilePath::CharType kOfflineResourcesComponentPath[] = +constexpr base::FilePath::CharType kPreInstalledDemoResourcesComponentPath[] = FILE_PATH_LITERAL( "/mnt/stateful_partition/unencrypted/demo_mode_resources"); @@ -135,13 +135,40 @@ if (offline_resources_load_requested_) return; - offline_resources_load_requested_ = true; + + component_updater::CrOSComponentManager* cros_component_manager = + g_browser_process->platform_part()->cros_component_manager(); + if (cros_component_manager) { + g_browser_process->platform_part()->cros_component_manager()->Load( + kDemoResourcesComponentName, + component_updater::CrOSComponentManager::MountPolicy::kMount, + component_updater::CrOSComponentManager::UpdatePolicy::kSkip, + base::BindOnce(&DemoSession::InstalledComponentLoaded, + weak_ptr_factory_.GetWeakPtr())); + } else { + // Cros component manager may be unset in tests - if that is the case, + // report component install failure, so DemoSession attempts loading the + // component directly from the pre-installed component path. + InstalledComponentLoaded( + component_updater::CrOSComponentManager::Error::INSTALL_FAILURE, + base::FilePath()); + } +} + +void DemoSession::InstalledComponentLoaded( + component_updater::CrOSComponentManager::Error error, + const base::FilePath& path) { + if (error == component_updater::CrOSComponentManager::Error::NONE) { + OnOfflineResourcesLoaded(base::make_optional(path)); + return; + } + chromeos::DBusThreadManager::Get() ->GetImageLoaderClient() ->LoadComponentAtPath( - kOfflineResourcesComponentName, - base::FilePath(kOfflineResourcesComponentPath), + kDemoResourcesComponentName, + base::FilePath(kPreInstalledDemoResourcesComponentPath), base::BindOnce(&DemoSession::OnOfflineResourcesLoaded, weak_ptr_factory_.GetWeakPtr())); }
diff --git a/chrome/browser/chromeos/login/demo_mode/demo_session.h b/chrome/browser/chromeos/login/demo_mode/demo_session.h index 800cf46..7550bec8 100644 --- a/chrome/browser/chromeos/login/demo_mode/demo_session.h +++ b/chrome/browser/chromeos/login/demo_mode/demo_session.h
@@ -12,6 +12,7 @@ #include "base/macros.h" #include "base/memory/weak_ptr.h" #include "base/optional.h" +#include "chrome/browser/component_updater/cros_component_installer_chromeos.h" namespace chromeos { @@ -90,6 +91,14 @@ DemoSession(); ~DemoSession(); + // Called after load of a currently installed (if any) demo mode resources + // component has finished. + // On success, |path| is expected to contain the path as which the component + // is loaded. + void InstalledComponentLoaded( + component_updater::CrOSComponentManager::Error error, + const base::FilePath& path); + // Callback for the image loader request to load offline demo mode resources. // |mount_path| is the path at which the resources were loaded. void OnOfflineResourcesLoaded(base::Optional<base::FilePath> mounted_path);
diff --git a/chrome/browser/chromeos/login/demo_mode/demo_session_browsertest.cc b/chrome/browser/chromeos/login/demo_mode/demo_session_browsertest.cc index 2c8d74a..9ecd0c1 100644 --- a/chrome/browser/chromeos/login/demo_mode/demo_session_browsertest.cc +++ b/chrome/browser/chromeos/login/demo_mode/demo_session_browsertest.cc
@@ -22,7 +22,7 @@ public: DemoSessionDemoEnrolledDeviceTest() : LoginManagerTest(true /*should_launch_browser*/), - install_attributes_(ScopedStubInstallAttributes::CreateCloudManaged( + install_attributes_(StubInstallAttributes::CreateCloudManaged( DemoSetupController::kDemoModeDomain, kFakeDeviceId)) {} ~DemoSessionDemoEnrolledDeviceTest() override = default; @@ -44,8 +44,8 @@ DemoSessionNonDemoEnrolledDeviceTest() : LoginManagerTest(true /*should_launch_browser*/), install_attributes_( - ScopedStubInstallAttributes::CreateCloudManaged(kNonDemoDomain, - kFakeDeviceId)) {} + StubInstallAttributes::CreateCloudManaged(kNonDemoDomain, + kFakeDeviceId)) {} ~DemoSessionNonDemoEnrolledDeviceTest() override = default; private: @@ -64,8 +64,7 @@ public: DemoSessionConsumerDeviceTest() : LoginManagerTest(true /*should_launch_browser*/), - install_attributes_( - ScopedStubInstallAttributes::CreateConsumerOwned()) {} + install_attributes_(StubInstallAttributes::CreateConsumerOwned()) {} ~DemoSessionConsumerDeviceTest() override = default; private: @@ -84,7 +83,7 @@ public: DemoSessionUnownedDeviceTest() : LoginManagerTest(true /*should_launch_browser*/), - install_attributes_(ScopedStubInstallAttributes::CreateUnset()) {} + install_attributes_(StubInstallAttributes::CreateUnset()) {} ~DemoSessionUnownedDeviceTest() override = default; private: @@ -103,10 +102,9 @@ public: DemoSessionActiveDirectoryDeviceTest() : LoginManagerTest(true /*should_launch_browser*/), - install_attributes_( - ScopedStubInstallAttributes::CreateActiveDirectoryManaged( - DemoSetupController::kDemoModeDomain, - kFakeDeviceId)) {} + install_attributes_(StubInstallAttributes::CreateActiveDirectoryManaged( + DemoSetupController::kDemoModeDomain, + kFakeDeviceId)) {} ~DemoSessionActiveDirectoryDeviceTest() override = default; private:
diff --git a/chrome/browser/chromeos/login/demo_mode/demo_session_unittest.cc b/chrome/browser/chromeos/login/demo_mode/demo_session_unittest.cc index 7c82d275..a2a01dd 100644 --- a/chrome/browser/chromeos/login/demo_mode/demo_session_unittest.cc +++ b/chrome/browser/chromeos/login/demo_mode/demo_session_unittest.cc
@@ -22,7 +22,7 @@ namespace { -constexpr char kOfflineResourcesComponent[] = "demo_mode_resources"; +constexpr char kOfflineResourcesComponent[] = "demo-mode-resources"; constexpr char kTestDemoModeResourcesMountPoint[] = "/run/imageloader/demo_mode_resources"; constexpr char kDemoAppsImageFile[] = "android_demo_apps.squash";
diff --git a/chrome/browser/chromeos/login/demo_mode/demo_setup_controller.cc b/chrome/browser/chromeos/login/demo_mode/demo_setup_controller.cc index ef4df2a..c8f9433f 100644 --- a/chrome/browser/chromeos/login/demo_mode/demo_setup_controller.cc +++ b/chrome/browser/chromeos/login/demo_mode/demo_setup_controller.cc
@@ -30,7 +30,7 @@ // The policy blob data for offline demo-mode is embedded into the filesystem. // TODO(mukai, agawronska): fix this when switching to dm-verity image. constexpr const base::FilePath::CharType kOfflineDemoModeDir[] = - FILE_PATH_LITERAL("/usr/share/chromeos-assets/demo_mode_resources/policy"); + FILE_PATH_LITERAL("/usr/share/demo_mode_resources/policy"); bool CheckOfflinePolicyFilesExist(const base::FilePath& policy_dir, std::string* message) {
diff --git a/chrome/browser/chromeos/login/demo_mode/demo_setup_controller_unittest.cc b/chrome/browser/chromeos/login/demo_mode/demo_setup_controller_unittest.cc index 67eabad..f55b40a8 100644 --- a/chrome/browser/chromeos/login/demo_mode/demo_setup_controller_unittest.cc +++ b/chrome/browser/chromeos/login/demo_mode/demo_setup_controller_unittest.cc
@@ -15,6 +15,7 @@ #include "base/test/scoped_task_environment.h" #include "chrome/browser/chromeos/login/demo_mode/demo_setup_test_utils.h" #include "chrome/browser/chromeos/settings/device_settings_service.h" +#include "chrome/browser/chromeos/settings/stub_install_attributes.h" #include "chrome/test/base/scoped_testing_local_state.h" #include "chrome/test/base/testing_browser_process.h" #include "chromeos/cryptohome/system_salt_getter.h" @@ -107,6 +108,7 @@ private: base::test::ScopedTaskEnvironment scoped_task_environment_; ScopedTestingLocalState testing_local_state_; + ScopedStubInstallAttributes test_install_attributes_; DISALLOW_COPY_AND_ASSIGN(DemoSetupControllerTest); };
diff --git a/chrome/browser/chromeos/login/easy_unlock/easy_unlock_app_manager_unittest.cc b/chrome/browser/chromeos/login/easy_unlock/easy_unlock_app_manager_unittest.cc index f7c1c55..91ca6ce 100644 --- a/chrome/browser/chromeos/login/easy_unlock/easy_unlock_app_manager_unittest.cc +++ b/chrome/browser/chromeos/login/easy_unlock/easy_unlock_app_manager_unittest.cc
@@ -15,8 +15,7 @@ #include "base/run_loop.h" #include "build/build_config.h" #include "chrome/browser/chromeos/login/users/scoped_test_user_manager.h" -#include "chrome/browser/chromeos/settings/cros_settings.h" -#include "chrome/browser/chromeos/settings/device_settings_service.h" +#include "chrome/browser/chromeos/settings/scoped_cros_settings_test_helper.h" #include "chrome/browser/extensions/api/screenlock_private/screenlock_private_api.h" #include "chrome/browser/extensions/component_loader.h" #include "chrome/browser/extensions/extension_service.h" @@ -271,9 +270,8 @@ // Needed by extension system. content::TestBrowserThreadBundle thread_bundle_; - // Cros settings and device settings are needed when creating user manager. - ScopedTestDeviceSettingsService test_device_settings_service_; - ScopedTestCrosSettings test_cros_settings_; + // Cros settings are needed when creating user manager. + ScopedCrosSettingsTestHelper cros_settings_test_helper_; // Needed for creating ExtensionService. ScopedTestUserManager test_user_manager_;
diff --git a/chrome/browser/chromeos/login/enrollment/enrollment_screen_unittest.cc b/chrome/browser/chromeos/login/enrollment/enrollment_screen_unittest.cc index 88ba17e..de8b82f 100644 --- a/chrome/browser/chromeos/login/enrollment/enrollment_screen_unittest.cc +++ b/chrome/browser/chromeos/login/enrollment/enrollment_screen_unittest.cc
@@ -16,6 +16,7 @@ #include "chrome/browser/chromeos/policy/device_cloud_policy_manager_chromeos.h" #include "chrome/browser/chromeos/policy/enrollment_config.h" #include "chrome/browser/chromeos/policy/enrollment_status_chromeos.h" +#include "chrome/browser/chromeos/settings/stub_install_attributes.h" #include "chrome/test/base/testing_browser_process.h" #include "chromeos/chromeos_switches.h" #include "chromeos/dbus/dbus_thread_manager.h" @@ -68,6 +69,8 @@ // Replace main thread's task runner with a mock for duration of test. base::ScopedMockTimeMessageLoopTaskRunner runner_; + ScopedStubInstallAttributes test_install_attributes_; + // Objects required by the EnrollmentScreen that can be re-used. pairing_chromeos::FakeControllerPairingController fake_controller_; MockBaseScreenDelegate mock_delegate_;
diff --git a/chrome/browser/chromeos/login/existing_user_controller_auto_login_unittest.cc b/chrome/browser/chromeos/login/existing_user_controller_auto_login_unittest.cc index 20c54b4..98542e4c3 100644 --- a/chrome/browser/chromeos/login/existing_user_controller_auto_login_unittest.cc +++ b/chrome/browser/chromeos/login/existing_user_controller_auto_login_unittest.cc
@@ -15,6 +15,7 @@ #include "chrome/browser/chromeos/policy/device_local_account.h" #include "chrome/browser/chromeos/settings/cros_settings.h" #include "chrome/browser/chromeos/settings/device_settings_test_helper.h" +#include "chrome/browser/chromeos/settings/stub_install_attributes.h" #include "chrome/test/base/scoped_testing_local_state.h" #include "chrome/test/base/testing_browser_process.h" #include "chromeos/settings/cros_settings_names.h" @@ -137,6 +138,7 @@ ScopedTestingLocalState local_state_; // Required by ExistingUserController: + ScopedStubInstallAttributes test_install_attributes_; ScopedDeviceSettingsTestHelper device_settings_test_helper_; ScopedTestCrosSettings test_cros_settings_; MockUserManager* mock_user_manager_;
diff --git a/chrome/browser/chromeos/login/ui/login_display_host_webui.cc b/chrome/browser/chromeos/login/ui/login_display_host_webui.cc index a77031a..abb0931 100644 --- a/chrome/browser/chromeos/login/ui/login_display_host_webui.cc +++ b/chrome/browser/chromeos/login/ui/login_display_host_webui.cc
@@ -18,6 +18,7 @@ #include "base/location.h" #include "base/logging.h" #include "base/macros.h" +#include "base/metrics/histogram_macros.h" #include "base/single_thread_task_runner.h" #include "base/strings/string_split.h" #include "base/strings/utf_string_conversions.h" @@ -113,7 +114,7 @@ namespace { // Maximum delay for startup sound after 'loginPromptVisible' signal. -const int kStartupSoundMaxDelayMs = 2000; +const int kStartupSoundMaxDelayMs = 4000; // URL which corresponds to the login WebUI. const char kLoginURL[] = "chrome://oobe/login"; @@ -357,14 +358,6 @@ device.type != chromeos::AudioDeviceType::AUDIO_TYPE_OTHER; } -// Returns true if it is too late to play startup sound. -bool StartupSoundOutdated(base::TimeTicks login_prompt_visible_time) { - // Don't try to play startup sound if login prompt has been already visible - // for a long time. - return base::TimeTicks::Now() - login_prompt_visible_time > - base::TimeDelta::FromMilliseconds(kStartupSoundMaxDelayMs); -} - } // namespace namespace chromeos { @@ -1202,9 +1195,17 @@ need_to_play_startup_sound_ = false; oobe_startup_sound_played_ = true; - if (StartupSoundOutdated(login_prompt_visible_time_)) - return; + const base::TimeDelta time_since_login_prompt_visible = + base::TimeTicks::Now() - login_prompt_visible_time_; + UMA_HISTOGRAM_TIMES("Accessibility.OOBEStartupSoundDelay", + time_since_login_prompt_visible); + // Don't try to play startup sound if login prompt has been already visible + // for a long time. + if (time_since_login_prompt_visible > + base::TimeDelta::FromMilliseconds(kStartupSoundMaxDelayMs)) { + return; + } AccessibilityManager::Get()->PlayEarcon(SOUND_STARTUP, PlaySoundOption::ALWAYS); }
diff --git a/chrome/browser/chromeos/login/users/avatar/user_image_manager_browsertest.cc b/chrome/browser/chromeos/login/users/avatar/user_image_manager_browsertest.cc index f3166b1..4012317 100644 --- a/chrome/browser/chromeos/login/users/avatar/user_image_manager_browsertest.cc +++ b/chrome/browser/chromeos/login/users/avatar/user_image_manager_browsertest.cc
@@ -620,12 +620,6 @@ DBusThreadManager::GetSetterForTesting()->SetSessionManagerClient( std::unique_ptr<SessionManagerClient>(fake_session_manager_client_)); - // Set up fake install attributes. - std::unique_ptr<chromeos::StubInstallAttributes> attributes = - std::make_unique<chromeos::StubInstallAttributes>(); - attributes->SetCloudManaged("fake-domain", "fake-id"); - policy::BrowserPolicyConnectorChromeOS::SetInstallAttributesForTesting( - attributes.release()); UserImageManagerTest::SetUpInProcessBrowserTestFixture(); } @@ -684,6 +678,8 @@ return policy; } + ScopedStubInstallAttributes test_install_attributes_{ + StubInstallAttributes::CreateCloudManaged("fake-domain", "fake-id")}; policy::UserPolicyBuilder user_policy_; policy::DevicePolicyBuilder device_policy_; scoped_refptr<ownership::MockOwnerKeyUtil> owner_key_util_;
diff --git a/chrome/browser/chromeos/login/users/chrome_user_manager_util.cc b/chrome/browser/chromeos/login/users/chrome_user_manager_util.cc index 1e0c99b2..03a3ac8 100644 --- a/chrome/browser/chromeos/login/users/chrome_user_manager_util.cc +++ b/chrome/browser/chromeos/login/users/chrome_user_manager_util.cc
@@ -66,6 +66,10 @@ ->policy_map() .Get(policy::key::kDeviceLocalAccountManagedSessionEnabled); + // If the policy is not set, enable managed session by default. + if (!entry) + return true; + return entry && entry->value && entry->value->GetBool(); }
diff --git a/chrome/browser/chromeos/login/users/chrome_user_manager_util.h b/chrome/browser/chromeos/login/users/chrome_user_manager_util.h index b91c86c..cfb3e09 100644 --- a/chrome/browser/chromeos/login/users/chrome_user_manager_util.h +++ b/chrome/browser/chromeos/login/users/chrome_user_manager_util.h
@@ -10,9 +10,11 @@ #include "components/user_manager/user.h" class AccountId; -class CrosSettings; namespace chromeos { + +class CrosSettings; + namespace chrome_user_manager_util { // Implements user_manager::UserManager::GetPlatformKnownUserId for ChromeOS
diff --git a/chrome/browser/chromeos/login/users/wallpaper_policy_browsertest.cc b/chrome/browser/chromeos/login/users/wallpaper_policy_browsertest.cc index acaa0d1..bbf648f 100644 --- a/chrome/browser/chromeos/login/users/wallpaper_policy_browsertest.cc +++ b/chrome/browser/chromeos/login/users/wallpaper_policy_browsertest.cc
@@ -179,13 +179,6 @@ DBusThreadManager::GetSetterForTesting()->SetSessionManagerClient( std::unique_ptr<SessionManagerClient>(fake_session_manager_client_)); - // Set up fake install attributes. - std::unique_ptr<chromeos::StubInstallAttributes> attributes = - std::make_unique<chromeos::StubInstallAttributes>(); - attributes->SetCloudManaged("fake-domain", "fake-id"); - policy::BrowserPolicyConnectorChromeOS::SetInstallAttributesForTesting( - attributes.release()); - LoginManagerTest::SetUpInProcessBrowserTestFixture(); ASSERT_TRUE(base::PathService::Get(chrome::DIR_TEST_DATA, &test_data_dir_)); } @@ -323,6 +316,9 @@ fake_session_manager_client_->OnPropertyChangeComplete(true /* success */); } + ScopedStubInstallAttributes test_install_attributes_{ + StubInstallAttributes::CreateCloudManaged("fake-domain", "fake-id")}; + base::FilePath test_data_dir_; std::unique_ptr<base::RunLoop> run_loop_; int wallpaper_change_count_; @@ -344,7 +340,8 @@ DISALLOW_COPY_AND_ASSIGN(WallpaperPolicyTest); }; -IN_PROC_BROWSER_TEST_F(WallpaperPolicyTest, PRE_SetResetClear) { +// Disabled due to flakiness: https://crbug.com/873908. +IN_PROC_BROWSER_TEST_F(WallpaperPolicyTest, DISABLED_PRE_SetResetClear) { RegisterUser(testUsers_[0]); RegisterUser(testUsers_[1]); StartupUtils::MarkOobeCompleted(); @@ -354,7 +351,9 @@ // setting policy for a user that is not logged in doesn't affect the current // user. Also verifies that after the policy has been cleared, the wallpaper // reverts to default. -IN_PROC_BROWSER_TEST_F(WallpaperPolicyTest, SetResetClear) { +// +// Disabled due to flakiness: https://crbug.com/873908. +IN_PROC_BROWSER_TEST_F(WallpaperPolicyTest, DISABLED_SetResetClear) { SetSystemSalt(); LoginUser(testUsers_[0]);
diff --git a/chrome/browser/chromeos/login/wizard_controller_browsertest.cc b/chrome/browser/chromeos/login/wizard_controller_browsertest.cc index 8a21865..693f29fc 100644 --- a/chrome/browser/chromeos/login/wizard_controller_browsertest.cc +++ b/chrome/browser/chromeos/login/wizard_controller_browsertest.cc
@@ -1013,8 +1013,7 @@ class WizardControllerDeviceStateTest : public WizardControllerFlowTest { protected: - WizardControllerDeviceStateTest() - : install_attributes_(ScopedStubInstallAttributes::CreateUnset()) { + WizardControllerDeviceStateTest() { fake_statistics_provider_.SetMachineStatistic( system::kSerialNumberKeyForTest, "test"); fake_statistics_provider_.SetMachineStatistic(system::kActivateDateKey, @@ -1060,7 +1059,9 @@ base::HistogramTester* histogram_tester() { return histogram_tester_.get(); } private: - ScopedStubInstallAttributes install_attributes_; + ScopedStubInstallAttributes test_install_attributes_{ + StubInstallAttributes::CreateUnset()}; + std::unique_ptr<base::HistogramTester> histogram_tester_; DISALLOW_COPY_AND_ASSIGN(WizardControllerDeviceStateTest);
diff --git a/chrome/browser/chromeos/policy/affiliated_invalidation_service_provider_impl_unittest.cc b/chrome/browser/chromeos/policy/affiliated_invalidation_service_provider_impl_unittest.cc index bd30975..46ee913bc 100644 --- a/chrome/browser/chromeos/policy/affiliated_invalidation_service_provider_impl_unittest.cc +++ b/chrome/browser/chromeos/policy/affiliated_invalidation_service_provider_impl_unittest.cc
@@ -13,10 +13,8 @@ #include "base/memory/ref_counted.h" #include "chrome/browser/chrome_notification_types.h" #include "chrome/browser/chromeos/login/users/fake_chrome_user_manager.h" -#include "chrome/browser/chromeos/settings/cros_settings.h" #include "chrome/browser/chromeos/settings/device_oauth2_token_service_factory.h" -#include "chrome/browser/chromeos/settings/device_settings_service.h" -#include "chrome/browser/chromeos/settings/stub_install_attributes.h" +#include "chrome/browser/chromeos/settings/scoped_cros_settings_test_helper.h" #include "chrome/browser/invalidation/profile_invalidation_provider_factory.h" #include "chrome/browser/profiles/profile.h" #include "chrome/test/base/testing_browser_process.h" @@ -136,10 +134,7 @@ content::TestBrowserThreadBundle thread_bundle_; chromeos::FakeChromeUserManager* fake_user_manager_; user_manager::ScopedUserManager user_manager_enabler_; - chromeos::ScopedStubInstallAttributes install_attributes_; - std::unique_ptr<chromeos::ScopedTestDeviceSettingsService> - test_device_settings_service_; - std::unique_ptr<chromeos::ScopedTestCrosSettings> test_cros_settings_; + chromeos::ScopedCrosSettingsTestHelper cros_settings_test_helper_; network::TestURLLoaderFactory test_url_loader_factory_; scoped_refptr<network::WeakWrapperSharedURLLoaderFactory> test_shared_loader_factory_; @@ -199,30 +194,26 @@ profile_invalidation_service_(nullptr), fake_user_manager_(new chromeos::FakeChromeUserManager), user_manager_enabler_(base::WrapUnique(fake_user_manager_)), - install_attributes_( - chromeos::ScopedStubInstallAttributes::CreateCloudManaged( - "example.com", - "device_id")), test_shared_loader_factory_( base::MakeRefCounted<network::WeakWrapperSharedURLLoaderFactory>( &test_url_loader_factory_)), - profile_manager_(TestingBrowserProcess::GetGlobal()) {} + profile_manager_(TestingBrowserProcess::GetGlobal()) { + cros_settings_test_helper_.InstallAttributes()->SetCloudManaged("example.com", + "device_id"); +} void AffiliatedInvalidationServiceProviderImplTest::SetUp() { chromeos::SystemSaltGetter::Initialize(); chromeos::DBusThreadManager::Initialize(); ASSERT_TRUE(profile_manager_.SetUp()); - test_device_settings_service_.reset(new - chromeos::ScopedTestDeviceSettingsService); - test_cros_settings_.reset(new chromeos::ScopedTestCrosSettings); chromeos::DeviceOAuth2TokenServiceFactory::Initialize( test_shared_loader_factory_); invalidation::ProfileInvalidationProviderFactory::GetInstance()-> RegisterTestingFactory(BuildProfileInvalidationProvider); - provider_.reset(new AffiliatedInvalidationServiceProviderImpl); + provider_ = std::make_unique<AffiliatedInvalidationServiceProviderImpl>(); } void AffiliatedInvalidationServiceProviderImplTest::TearDown() {
diff --git a/chrome/browser/chromeos/policy/browser_policy_connector_chromeos.cc b/chrome/browser/chromeos/policy/browser_policy_connector_chromeos.cc index f4833ab..1535ee2 100644 --- a/chrome/browser/chromeos/policy/browser_policy_connector_chromeos.cc +++ b/chrome/browser/chromeos/policy/browser_policy_connector_chromeos.cc
@@ -13,7 +13,6 @@ #include "base/location.h" #include "base/logging.h" #include "base/memory/ptr_util.h" -#include "base/path_service.h" #include "base/sequenced_task_runner.h" #include "base/single_thread_task_runner.h" #include "base/strings/utf_string_conversions.h" @@ -42,7 +41,6 @@ #include "chrome/browser/policy/device_management_service_configuration.h" #include "chrome/common/pref_names.h" #include "chromeos/attestation/attestation_flow.h" -#include "chromeos/chromeos_paths.h" #include "chromeos/chromeos_switches.h" #include "chromeos/cryptohome/async_method_caller.h" #include "chromeos/cryptohome/system_salt_getter.h" @@ -69,9 +67,6 @@ namespace { -// Install attributes for tests. -chromeos::InstallAttributes* g_testing_install_attributes = nullptr; - // Helper that returns a new BACKGROUND SequencedTaskRunner. Each // SequencedTaskRunner returned is independent from the others. scoped_refptr<base::SequencedTaskRunner> GetBackgroundTaskRunner() { @@ -84,36 +79,21 @@ BrowserPolicyConnectorChromeOS::BrowserPolicyConnectorChromeOS() : weak_ptr_factory_(this) { - if (g_testing_install_attributes) { - install_attributes_.reset(g_testing_install_attributes); - g_testing_install_attributes = nullptr; - } + DCHECK(chromeos::InstallAttributes::IsInitialized()); - // SystemSaltGetter, DBusThreadManager or DeviceSettingsService may be + // DBusThreadManager or DeviceSettingsService may be // uninitialized on unit tests. // TODO(satorux): Remove SystemSaltGetter::IsInitialized() when it's ready // (removing it now breaks tests). crbug.com/141016. - if (chromeos::SystemSaltGetter::IsInitialized() && - chromeos::DBusThreadManager::IsInitialized() && + if (chromeos::DBusThreadManager::IsInitialized() && chromeos::DeviceSettingsService::IsInitialized()) { - // Don't initialize install attributes if g_testing_install_attributes have - // been injected. - if (!install_attributes_) { - install_attributes_ = std::make_unique<chromeos::InstallAttributes>( - chromeos::DBusThreadManager::Get()->GetCryptohomeClient()); - base::FilePath install_attrs_file; - CHECK(base::PathService::Get(chromeos::FILE_INSTALL_ATTRIBUTES, - &install_attrs_file)); - install_attributes_->Init(install_attrs_file); - } - std::unique_ptr<DeviceCloudPolicyStoreChromeOS> device_cloud_policy_store = std::make_unique<DeviceCloudPolicyStoreChromeOS>( - chromeos::DeviceSettingsService::Get(), install_attributes_.get(), - GetBackgroundTaskRunner()); + chromeos::DeviceSettingsService::Get(), + chromeos::InstallAttributes::Get(), GetBackgroundTaskRunner()); - if (install_attributes_->IsActiveDirectoryManaged()) { + if (chromeos::InstallAttributes::Get()->IsActiveDirectoryManaged()) { chromeos::DBusThreadManager::Get() ->GetUpstartClient() ->StartAuthPolicyService(); @@ -164,8 +144,7 @@ RestartDeviceCloudPolicyInitializer(); } - DCHECK(install_attributes_); - if (!install_attributes_->IsActiveDirectoryManaged()) { + if (!chromeos::InstallAttributes::Get()->IsActiveDirectoryManaged()) { device_local_account_policy_service_ = std::make_unique<DeviceLocalAccountPolicyService>( chromeos::DBusThreadManager::Get()->GetSessionManagerClient(), @@ -239,20 +218,20 @@ } bool BrowserPolicyConnectorChromeOS::IsEnterpriseManaged() const { - return install_attributes_ && install_attributes_->IsEnterpriseManaged(); + return chromeos::InstallAttributes::Get()->IsEnterpriseManaged(); } bool BrowserPolicyConnectorChromeOS::IsCloudManaged() const { - return install_attributes_ && install_attributes_->IsCloudManaged(); + return chromeos::InstallAttributes::Get()->IsCloudManaged(); } bool BrowserPolicyConnectorChromeOS::IsActiveDirectoryManaged() const { - return install_attributes_ && install_attributes_->IsActiveDirectoryManaged(); + return chromeos::InstallAttributes::Get()->IsActiveDirectoryManaged(); } std::string BrowserPolicyConnectorChromeOS::GetEnterpriseEnrollmentDomain() const { - return install_attributes_ ? install_attributes_->GetDomain() : std::string(); + return chromeos::InstallAttributes::Get()->GetDomain(); } std::string BrowserPolicyConnectorChromeOS::GetEnterpriseDisplayDomain() const { @@ -263,7 +242,7 @@ } std::string BrowserPolicyConnectorChromeOS::GetRealm() const { - return install_attributes_ ? install_attributes_->GetRealm() : std::string(); + return chromeos::InstallAttributes::Get()->GetRealm(); } std::string BrowserPolicyConnectorChromeOS::GetDeviceAssetID() const { @@ -288,8 +267,12 @@ } DeviceMode BrowserPolicyConnectorChromeOS::GetDeviceMode() const { - return install_attributes_ ? install_attributes_->GetMode() - : DEVICE_MODE_NOT_SET; + return chromeos::InstallAttributes::Get()->GetMode(); +} + +chromeos::InstallAttributes* +BrowserPolicyConnectorChromeOS::GetInstallAttributes() const { + return chromeos::InstallAttributes::Get(); } EnrollmentConfig BrowserPolicyConnectorChromeOS::GetPrescribedEnrollmentConfig() @@ -311,21 +294,6 @@ } // static -void BrowserPolicyConnectorChromeOS::SetInstallAttributesForTesting( - chromeos::InstallAttributes* attributes) { - DCHECK(!g_testing_install_attributes); - g_testing_install_attributes = attributes; -} - -// static -void BrowserPolicyConnectorChromeOS::RemoveInstallAttributesForTesting() { - if (g_testing_install_attributes) { - delete g_testing_install_attributes; - g_testing_install_attributes = nullptr; - } -} - -// static void BrowserPolicyConnectorChromeOS::RegisterPrefs( PrefRegistrySimple* registry) { registry->RegisterIntegerPref( @@ -380,7 +348,7 @@ device_cloud_policy_initializer_ = std::make_unique<DeviceCloudPolicyInitializer>( local_state_, device_management_service(), GetBackgroundTaskRunner(), - install_attributes_.get(), state_keys_broker_.get(), + chromeos::InstallAttributes::Get(), state_keys_broker_.get(), device_cloud_policy_manager_->device_store(), device_cloud_policy_manager_, cryptohome::AsyncMethodCaller::GetInstance(), CreateAttestationFlow(),
diff --git a/chrome/browser/chromeos/policy/browser_policy_connector_chromeos.h b/chrome/browser/chromeos/policy/browser_policy_connector_chromeos.h index 81218d9b..e5c92f18 100644 --- a/chrome/browser/chromeos/policy/browser_policy_connector_chromeos.h +++ b/chrome/browser/chromeos/policy/browser_policy_connector_chromeos.h
@@ -108,6 +108,9 @@ // For other OSes the function will always return DEVICE_MODE_CONSUMER. DeviceMode GetDeviceMode() const; + // Delegates to chromeos::InstallAttributes::Get() + chromeos::InstallAttributes* GetInstallAttributes() const; + // Get the enrollment configuration for the device as decided by various // factors. See DeviceCloudPolicyInitializer::GetPrescribedEnrollmentConfig() // for details. @@ -134,10 +137,6 @@ return device_local_account_policy_service_.get(); } - chromeos::InstallAttributes* GetInstallAttributes() const { - return install_attributes_.get(); - } - // May be nullptr, e.g. for devices managed by Active Directory. ServerBackedStateKeysBroker* GetStateKeysBroker() const { return state_keys_broker_.get(); @@ -167,13 +166,6 @@ void SetDeviceCloudPolicyInitializerForTesting( std::unique_ptr<DeviceCloudPolicyInitializer> initializer); - // Sets the install attributes for testing. Must be called before the browser - // is created. RemoveInstallAttributesForTesting must be called after the test - // to free the attributes. - static void SetInstallAttributesForTesting( - chromeos::InstallAttributes* attributes); - static void RemoveInstallAttributesForTesting(); - // Registers device refresh rate pref. static void RegisterPrefs(PrefRegistrySimple* registry); @@ -206,7 +198,6 @@ // Components of the device cloud policy implementation. std::unique_ptr<ServerBackedStateKeysBroker> state_keys_broker_; - std::unique_ptr<chromeos::InstallAttributes> install_attributes_; std::unique_ptr<AffiliatedInvalidationServiceProvider> affiliated_invalidation_service_provider_; DeviceCloudPolicyManagerChromeOS* device_cloud_policy_manager_ = nullptr;
diff --git a/chrome/browser/chromeos/policy/cloud_external_data_policy_observer_unittest.cc b/chrome/browser/chromeos/policy/cloud_external_data_policy_observer_unittest.cc index 19d6d31..aaa4799 100644 --- a/chrome/browser/chromeos/policy/cloud_external_data_policy_observer_unittest.cc +++ b/chrome/browser/chromeos/policy/cloud_external_data_policy_observer_unittest.cc
@@ -137,7 +137,7 @@ std::string avatar_policy_1_; std::string avatar_policy_2_; - chromeos::CrosSettings cros_settings_; + std::unique_ptr<chromeos::CrosSettings> cros_settings_; std::unique_ptr<DeviceLocalAccountPolicyService> device_local_account_policy_service_; FakeAffiliatedInvalidationServiceProvider @@ -171,9 +171,7 @@ : device_local_account_user_id_(GenerateDeviceLocalAccountUserId( kDeviceLocalAccount, DeviceLocalAccount::TYPE_PUBLIC_SESSION)), - cros_settings_(&device_settings_service_), - profile_manager_(TestingBrowserProcess::GetGlobal()) { -} + profile_manager_(TestingBrowserProcess::GetGlobal()) {} CloudExternalDataPolicyObserverTest::~CloudExternalDataPolicyObserverTest() { } @@ -185,10 +183,12 @@ shared_url_loader_factory_ = base::MakeRefCounted<network::WeakWrapperSharedURLLoaderFactory>( &url_loader_factory_); + cros_settings_ = + std::make_unique<chromeos::CrosSettings>(&device_settings_service_); device_local_account_policy_service_.reset( new DeviceLocalAccountPolicyService( - &session_manager_client_, &device_settings_service_, &cros_settings_, - &affiliated_invalidation_service_provider_, + &session_manager_client_, &device_settings_service_, + cros_settings_.get(), &affiliated_invalidation_service_provider_, base::ThreadTaskRunnerHandle::Get(), base::ThreadTaskRunnerHandle::Get(), base::ThreadTaskRunnerHandle::Get(), shared_url_loader_factory_)); @@ -217,6 +217,7 @@ } device_local_account_policy_service_->Shutdown(); device_local_account_policy_service_.reset(); + cros_settings_.reset(); chromeos::DeviceSettingsTestBase::TearDown(); } @@ -246,10 +247,8 @@ void CloudExternalDataPolicyObserverTest::CreateObserver() { observer_.reset(new CloudExternalDataPolicyObserver( - &cros_settings_, - device_local_account_policy_service_.get(), - key::kUserAvatarImage, - this)); + cros_settings_.get(), device_local_account_policy_service_.get(), + key::kUserAvatarImage, this)); observer_->Init(); }
diff --git a/chrome/browser/chromeos/policy/component_active_directory_policy_browsertest.cc b/chrome/browser/chromeos/policy/component_active_directory_policy_browsertest.cc index c0d87f1..bb9b892 100644 --- a/chrome/browser/chromeos/policy/component_active_directory_policy_browsertest.cc +++ b/chrome/browser/chromeos/policy/component_active_directory_policy_browsertest.cc
@@ -72,7 +72,7 @@ protected: ComponentActiveDirectoryPolicyTest() : install_attributes_( - chromeos::ScopedStubInstallAttributes::CreateActiveDirectoryManaged( + chromeos::StubInstallAttributes::CreateActiveDirectoryManaged( kTestDomain, kTestDeviceId)) { builder_.policy_data().set_policy_type(
diff --git a/chrome/browser/chromeos/policy/device_auto_update_time_restrictions_utils.cc b/chrome/browser/chromeos/policy/device_auto_update_time_restrictions_utils.cc new file mode 100644 index 0000000..476126f2 --- /dev/null +++ b/chrome/browser/chromeos/policy/device_auto_update_time_restrictions_utils.cc
@@ -0,0 +1,78 @@ +// 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/chromeos/policy/device_auto_update_time_restrictions_utils.h" + +#include "base/logging.h" +#include "base/memory/ptr_util.h" +#include "base/time/clock.h" +#include "base/values.h" +#include "chrome/browser/chromeos/policy/device_auto_update_time_restrictions_decoder.h" +#include "chrome/browser/chromeos/policy/weekly_time/time_utils.h" +#include "chrome/browser/chromeos/policy/weekly_time/weekly_time.h" +#include "chrome/browser/chromeos/policy/weekly_time/weekly_time_interval.h" +#include "chrome/browser/chromeos/settings/cros_settings.h" +#include "chromeos/settings/cros_settings_names.h" +#include "third_party/icu/source/i18n/unicode/timezone.h" + +using base::Clock; +using base::ListValue; +using std::vector; + +namespace policy { + +namespace { + +// Expects timezone agnostic |WeeklyTimeInterval|s in |intervals|. +// Transforms |intervals| into |*intervals_out|, converting them to the local +// timezone. The local timezone is determined using |clock|. If this returns +// false, an error occurred and the output vector should not be used. This can +// happen if the local timezone offset can not be determined, or if at least one +// of the passed intervals was already bound to a timezone. +bool MaterializeIntervalsToLocalTimezone( + const vector<WeeklyTimeInterval>& intervals, + Clock* clock, + vector<WeeklyTimeInterval>* intervals_out) { + DCHECK(intervals_out); + int local_to_gmt_offset; + auto local_time_zone = base::WrapUnique(icu::TimeZone::createDefault()); + if (!weekly_time_utils::GetOffsetFromTimezoneToGmt(*local_time_zone, clock, + &local_to_gmt_offset)) { + LOG(ERROR) << "Unable to get local timezone."; + return false; + } + int gmt_to_local_offset = -local_to_gmt_offset; + intervals_out->clear(); + for (const auto& interval : intervals) { + if (interval.start().timezone_offset()) { + LOG(ERROR) << "Intervals are not timezone-agnostic."; + return false; + } + intervals_out->push_back(WeeklyTimeInterval( + interval.start().ConvertToCustomTimezone(gmt_to_local_offset), + interval.end().ConvertToCustomTimezone(gmt_to_local_offset))); + } + return true; +} + +} // namespace + +bool GetDeviceAutoUpdateTimeRestrictionsIntervalsInLocalTimezone( + Clock* clock, + vector<WeeklyTimeInterval>* intervals_out) { + const ListValue* intervals_list; + if (!chromeos::CrosSettings::Get()->GetList( + chromeos::kDeviceAutoUpdateTimeRestrictions, &intervals_list)) { + return false; + } + + vector<WeeklyTimeInterval> decoded_intervals; + if (!WeeklyTimeIntervalsFromListValue(*intervals_list, &decoded_intervals)) { + return false; + } + + return MaterializeIntervalsToLocalTimezone(decoded_intervals, clock, + intervals_out); +} + +} // namespace policy
diff --git a/chrome/browser/chromeos/policy/device_auto_update_time_restrictions_utils.h b/chrome/browser/chromeos/policy/device_auto_update_time_restrictions_utils.h new file mode 100644 index 0000000..b7ae299 --- /dev/null +++ b/chrome/browser/chromeos/policy/device_auto_update_time_restrictions_utils.h
@@ -0,0 +1,32 @@ +// 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_CHROMEOS_POLICY_DEVICE_AUTO_UPDATE_TIME_RESTRICTIONS_UTILS_H_ +#define CHROME_BROWSER_CHROMEOS_POLICY_DEVICE_AUTO_UPDATE_TIME_RESTRICTIONS_UTILS_H_ + +#include <vector> + +#include "base/optional.h" + +namespace base { +class Clock; +} +namespace policy { + +class WeeklyTimeInterval; + +// Places the intervals for DeviceAutoUpdateTimeRestrictions according to +// CrosSettings into |intervals_out|. Note that the intervals are specified in +// a timezone-agnostic format by the policy, so this function converts them to +// the local timezone. It is thus not advisable to store the returned intervals +// for extended periods (because the local timezone could change). Returns false +// if there are no intervals set or if the conversion to the local timezone was +// unsuccessful. +bool GetDeviceAutoUpdateTimeRestrictionsIntervalsInLocalTimezone( + base::Clock* clock, + std::vector<WeeklyTimeInterval>* intervals_out); + +} // namespace policy + +#endif // CHROME_BROWSER_CHROMEOS_POLICY_DEVICE_AUTO_UPDATE_TIME_RESTRICTIONS_UTILS_H_
diff --git a/chrome/browser/chromeos/policy/device_auto_update_time_restrictions_utils_unittest.cc b/chrome/browser/chromeos/policy/device_auto_update_time_restrictions_utils_unittest.cc new file mode 100644 index 0000000..b81fc5f --- /dev/null +++ b/chrome/browser/chromeos/policy/device_auto_update_time_restrictions_utils_unittest.cc
@@ -0,0 +1,147 @@ +// 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/chromeos/policy/device_auto_update_time_restrictions_utils.h" + +#include <memory> +#include <string> +#include <tuple> +#include <utility> + +#include "base/strings/string16.h" +#include "base/test/simple_test_clock.h" +#include "base/time/time.h" +#include "base/values.h" +#include "chrome/browser/chromeos/policy/weekly_time/weekly_time.h" +#include "chrome/browser/chromeos/policy/weekly_time/weekly_time_interval.h" +#include "chrome/browser/chromeos/settings/scoped_cros_settings_test_helper.h" +#include "chromeos/settings/cros_settings_names.h" +#include "testing/gtest/include/gtest/gtest.h" +#include "third_party/icu/source/i18n/unicode/timezone.h" + +using base::ListValue; +using base::Time; +using base::Value; +using std::tuple; +using std::vector; + +namespace policy { + +namespace { + +enum { + kMonday = 1, + kTuesday = 2, + kWednesday = 3, + kThursday = 4, + kFriday = 5, + kSaturday = 6, + kSunday = 7, +}; + +std::string DayToString(int day_of_week) { + switch (day_of_week) { + case kMonday: + return "Monday"; + case kTuesday: + return "Tuesday"; + case kWednesday: + return "Wednesday"; + case kThursday: + return "Thursday"; + case kFriday: + return "Friday"; + case kSaturday: + return "Saturday"; + case kSunday: + return "Sunday"; + } + return ""; +} + +const char* kNewYorkTimezone = "America/New_York"; +constexpr int kMillisecondsInMinute = 60000; +constexpr int kMillisecondsInHour = 3600000; +constexpr int kNewYorkOffset = -4 * kMillisecondsInHour; +constexpr Time::Exploded kDaylightTime{2018, 8, 3, 8, 15, 0, 0, 0}; + +} // namespace + +class DeviceAutoUpdateTimeRestrictionsUtilTest : public testing::Test { + protected: + void SetUp() override { + timezone_.reset(icu::TimeZone::createDefault()); + icu::TimeZone::adoptDefault( + icu::TimeZone::createTimeZone(kNewYorkTimezone)); + // Use Daylight savings to use EDT. + Time test_time; + ASSERT_TRUE(base::Time::FromUTCExploded(kDaylightTime, &test_time)); + test_clock_.SetNow(test_time); + } + + void TearDown() override { icu::TimeZone::adoptDefault(timezone_.release()); } + + void SetCrosSettings(const std::string& path, const Value& in_value) { + cros_settings_helper_.Set(path, in_value); + cros_settings_helper_.ReplaceProvider(path); + } + + ListValue GetIntervalsAsList(const vector<WeeklyTimeInterval>& intervals) { + ListValue list_val; + for (const auto& interval : intervals) { + base::DictionaryValue start; + int start_hours = interval.start().milliseconds() / kMillisecondsInHour; + int start_minutes = (interval.start().milliseconds() - + start_hours * kMillisecondsInHour) / + kMillisecondsInMinute; + start.SetKey("day_of_week", + Value(DayToString(interval.start().day_of_week()))); + start.SetKey("hours", Value(start_hours)); + start.SetKey("minutes", Value(start_minutes)); + + base::DictionaryValue end; + int end_hours = interval.end().milliseconds() / kMillisecondsInHour; + int end_minutes = + (interval.end().milliseconds() - end_hours * kMillisecondsInHour) / + kMillisecondsInMinute; + end.SetKey("day_of_week", + Value(DayToString(interval.end().day_of_week()))); + end.SetKey("hours", Value(end_hours)); + end.SetKey("minutes", Value(end_minutes)); + + base::DictionaryValue time_dict; + time_dict.SetKey("start", std::move(start)); + time_dict.SetKey("end", std::move(end)); + list_val.GetList().push_back(std::move(time_dict)); + } + return list_val; + } + + base::SimpleTestClock test_clock_; + + private: + std::unique_ptr<icu::TimeZone> timezone_; + // These initialize CrosSettings and then tear down when the test is done. + chromeos::ScopedCrosSettingsTestHelper cros_settings_helper_; +}; + +TEST_F(DeviceAutoUpdateTimeRestrictionsUtilTest, + GetDeviceAutoUpdateTimeRestrictionsIntervalsInLocalTimezone) { + const vector<WeeklyTimeInterval> kExpected{ + WeeklyTimeInterval( + WeeklyTime(kMonday, 5 * kMillisecondsInHour, kNewYorkOffset), + WeeklyTime(kTuesday, 10 * kMillisecondsInHour, kNewYorkOffset)), + WeeklyTimeInterval( + WeeklyTime(kWednesday, 10 * kMillisecondsInHour, kNewYorkOffset), + WeeklyTime(kWednesday, 15 * kMillisecondsInHour, kNewYorkOffset))}; + + SetCrosSettings(chromeos::kDeviceAutoUpdateTimeRestrictions, + GetIntervalsAsList(kExpected)); + + vector<WeeklyTimeInterval> result; + ASSERT_TRUE(GetDeviceAutoUpdateTimeRestrictionsIntervalsInLocalTimezone( + &test_clock_, &result)); + EXPECT_EQ(result, kExpected); +} + +} // namespace policy
diff --git a/chrome/browser/chromeos/policy/device_cloud_policy_manager_chromeos_unittest.cc b/chrome/browser/chromeos/policy/device_cloud_policy_manager_chromeos_unittest.cc index acf27f5..1c07ebe 100644 --- a/chrome/browser/chromeos/policy/device_cloud_policy_manager_chromeos_unittest.cc +++ b/chrome/browser/chromeos/policy/device_cloud_policy_manager_chromeos_unittest.cc
@@ -149,14 +149,14 @@ chromeos::DBusThreadManager::Get()->GetCryptohomeClient(); cryptohome::AsyncMethodCaller::Initialize(); - install_attributes_.reset( - new chromeos::InstallAttributes(fake_cryptohome_client_)); + install_attributes_ = + std::make_unique<chromeos::InstallAttributes>(fake_cryptohome_client_); store_ = new DeviceCloudPolicyStoreChromeOS( &device_settings_service_, install_attributes_.get(), base::ThreadTaskRunnerHandle::Get()); - manager_.reset(new TestingDeviceCloudPolicyManagerChromeOS( + manager_ = std::make_unique<TestingDeviceCloudPolicyManagerChromeOS>( base::WrapUnique(store_), base::ThreadTaskRunnerHandle::Get(), - &state_keys_broker_)); + &state_keys_broker_); RegisterLocalState(local_state_.registry()); manager_->Init(&schema_registry_); @@ -272,8 +272,6 @@ std::string url_fetcher_response_string_; TestingPrefServiceSimple local_state_; MockDeviceManagementService device_management_service_; - chromeos::ScopedTestDeviceSettingsService test_device_settings_service_; - chromeos::ScopedTestCrosSettings test_cros_settings_; chromeos::system::ScopedFakeStatisticsProvider fake_statistics_provider_; chromeos::FakeSessionManagerClient fake_session_manager_client_; chromeos::FakeCryptohomeClient* fake_cryptohome_client_;
diff --git a/chrome/browser/chromeos/policy/device_local_account_policy_service_unittest.cc b/chrome/browser/chromeos/policy/device_local_account_policy_service_unittest.cc index b1c17be..508d9a86 100644 --- a/chrome/browser/chromeos/policy/device_local_account_policy_service_unittest.cc +++ b/chrome/browser/chromeos/policy/device_local_account_policy_service_unittest.cc
@@ -84,9 +84,7 @@ : public chromeos::DeviceSettingsTestBase { public: DeviceLocalAccountPolicyServiceTestBase(); - - void SetUp() override; - void TearDown() override; + ~DeviceLocalAccountPolicyServiceTestBase() override; void CreatePolicyService(); @@ -99,7 +97,7 @@ PolicyMap expected_policy_map_; UserPolicyBuilder device_local_account_policy_; - chromeos::CrosSettings cros_settings_; + std::unique_ptr<chromeos::CrosSettings> cros_settings_; scoped_refptr<base::TestSimpleTaskRunner> extension_cache_task_runner_; MockDeviceManagementService mock_device_management_service_; FakeAffiliatedInvalidationServiceProvider @@ -117,9 +115,7 @@ protected: DeviceLocalAccountPolicyServiceTest(); - - void SetUp() override; - void TearDown() override; + ~DeviceLocalAccountPolicyServiceTest(); void InstallDevicePolicy() override; @@ -137,13 +133,9 @@ account_2_user_id_(GenerateDeviceLocalAccountUserId( kAccount2, DeviceLocalAccount::TYPE_PUBLIC_SESSION)), - cros_settings_(&device_settings_service_), + cros_settings_( + std::make_unique<chromeos::CrosSettings>(&device_settings_service_)), extension_cache_task_runner_(new base::TestSimpleTaskRunner) { -} - -void DeviceLocalAccountPolicyServiceTestBase::SetUp() { - chromeos::DeviceSettingsTestBase::SetUp(); - expected_policy_map_.Set(key::kSearchSuggestEnabled, POLICY_LEVEL_MANDATORY, POLICY_SCOPE_USER, POLICY_SOURCE_CLOUD, std::make_unique<base::Value>(true), nullptr); @@ -155,7 +147,8 @@ dm_protocol::kChromePublicAccountPolicyType); } -void DeviceLocalAccountPolicyServiceTestBase::TearDown() { +DeviceLocalAccountPolicyServiceTestBase:: + ~DeviceLocalAccountPolicyServiceTestBase() { service_->Shutdown(); service_.reset(); extension_cache_task_runner_->RunUntilIdle(); @@ -164,7 +157,7 @@ void DeviceLocalAccountPolicyServiceTestBase::CreatePolicyService() { service_.reset(new DeviceLocalAccountPolicyService( - &session_manager_client_, &device_settings_service_, &cros_settings_, + &session_manager_client_, &device_settings_service_, cros_settings_.get(), &affiliated_invalidation_service_provider_, base::ThreadTaskRunnerHandle::Get(), extension_cache_task_runner_, base::ThreadTaskRunnerHandle::Get(), @@ -197,16 +190,11 @@ DeviceLocalAccountPolicyServiceTest::DeviceLocalAccountPolicyServiceTest() { CreatePolicyService(); -} - -void DeviceLocalAccountPolicyServiceTest::SetUp() { - DeviceLocalAccountPolicyServiceTestBase::SetUp(); service_->AddObserver(&service_observer_); } -void DeviceLocalAccountPolicyServiceTest::TearDown() { +DeviceLocalAccountPolicyServiceTest::~DeviceLocalAccountPolicyServiceTest() { service_->RemoveObserver(&service_observer_); - DeviceLocalAccountPolicyServiceTestBase::TearDown(); } void DeviceLocalAccountPolicyServiceTest::InstallDevicePolicy() { @@ -789,16 +777,16 @@ DISALLOW_COPY_AND_ASSIGN(DeviceLocalAccountPolicyProviderTest); }; -DeviceLocalAccountPolicyProviderTest::DeviceLocalAccountPolicyProviderTest() { +DeviceLocalAccountPolicyProviderTest::DeviceLocalAccountPolicyProviderTest() + : DeviceLocalAccountPolicyServiceTestBase() {} + +void DeviceLocalAccountPolicyProviderTest::SetUp() { + DeviceLocalAccountPolicyServiceTestBase::SetUp(); CreatePolicyService(); provider_ = DeviceLocalAccountPolicyProvider::Create( GenerateDeviceLocalAccountUserId(kAccount1, DeviceLocalAccount::TYPE_PUBLIC_SESSION), service_.get(), false /*force_immediate_load*/); -} - -void DeviceLocalAccountPolicyProviderTest::SetUp() { - DeviceLocalAccountPolicyServiceTestBase::SetUp(); provider_->Init(&schema_registry_); provider_->AddObserver(&provider_observer_); @@ -998,13 +986,12 @@ }; DeviceLocalAccountPolicyProviderLoadImmediateTest:: - DeviceLocalAccountPolicyProviderLoadImmediateTest() { - CreatePolicyService(); -} + DeviceLocalAccountPolicyProviderLoadImmediateTest() {} void DeviceLocalAccountPolicyProviderLoadImmediateTest::SetUp() { - service_->AddObserver(&service_observer_); DeviceLocalAccountPolicyServiceTestBase::SetUp(); + CreatePolicyService(); + service_->AddObserver(&service_observer_); } void DeviceLocalAccountPolicyProviderLoadImmediateTest::TearDown() {
diff --git a/chrome/browser/chromeos/policy/device_status_collector_browsertest.cc b/chrome/browser/chromeos/policy/device_status_collector_browsertest.cc index ddb6cdf..9df7b25 100644 --- a/chrome/browser/chromeos/policy/device_status_collector_browsertest.cc +++ b/chrome/browser/chromeos/policy/device_status_collector_browsertest.cc
@@ -296,9 +296,8 @@ public: DeviceStatusCollectorTest() : install_attributes_( - chromeos::ScopedStubInstallAttributes::CreateCloudManaged( - "managed.com", - "device_id")), + chromeos::StubInstallAttributes::CreateCloudManaged("managed.com", + "device_id")), settings_helper_(false), user_manager_(new chromeos::MockUserManager()), user_manager_enabler_(base::WrapUnique(user_manager_)),
diff --git a/chrome/browser/chromeos/policy/site_isolation_flag_handling_browsertest.cc b/chrome/browser/chromeos/policy/site_isolation_flag_handling_browsertest.cc index 41e2f2e..32df7509 100644 --- a/chrome/browser/chromeos/policy/site_isolation_flag_handling_browsertest.cc +++ b/chrome/browser/chromeos/policy/site_isolation_flag_handling_browsertest.cc
@@ -269,13 +269,6 @@ void SetUpInProcessBrowserTestFixture() override { policy::LoginPolicyTestBase::SetUpInProcessBrowserTestFixture(); - // Set up fake install attributes to pretend the machine is enrolled. This - // is important because ephemeral users only work on enrolled machines. - auto attributes = std::make_unique<StubInstallAttributes>(); - attributes->SetCloudManaged("example.com", "fake-id"); - policy::BrowserPolicyConnectorChromeOS::SetInstallAttributesForTesting( - attributes.release()); - // Set up fake_session_manager_client_ so we can verify the flags for the // user session. auto fake_session_manager_client = @@ -356,6 +349,11 @@ // This will be set to |true| when chrome has requested a restart. bool attempt_restart_called_ = false; + // Set up fake install attributes to pretend the machine is enrolled. This + // is important because ephemeral users only work on enrolled machines. + ScopedStubInstallAttributes test_install_attributes_{ + StubInstallAttributes::CreateCloudManaged("example.com", "fake-id")}; + // Observes for user session start. std::unique_ptr<content::WindowedNotificationObserver> user_session_started_observer_;
diff --git a/chrome/browser/chromeos/policy/weekly_time/time_utils.cc b/chrome/browser/chromeos/policy/weekly_time/time_utils.cc index aa698b6..2a3f8a4 100644 --- a/chrome/browser/chromeos/policy/weekly_time/time_utils.cc +++ b/chrome/browser/chromeos/policy/weekly_time/time_utils.cc
@@ -80,8 +80,8 @@ if (!weekly_time.timezone_offset()) { // Get offset to convert the WeeklyTime int offset; - if (!GetOffsetFromTimezoneToGmt(*icu::TimeZone::createDefault(), clock, - &offset)) { + auto local_time_zone = base::WrapUnique(icu::TimeZone::createDefault()); + if (!GetOffsetFromTimezoneToGmt(*local_time_zone, clock, &offset)) { LOG(ERROR) << "Unable to obtain offset for time agnostic timezone"; return base::string16(); } @@ -120,5 +120,17 @@ return till_next_interval; } +base::Optional<WeeklyTimeInterval> GetIntervalForCurrentTime( + const std::vector<WeeklyTimeInterval>& intervals, + base::Clock* clock) { + WeeklyTime weekly_time_now = WeeklyTime::GetCurrentGmtWeeklyTime(clock); + for (const auto& interval : intervals) { + if (interval.Contains(weekly_time_now)) { + return interval; + } + } + return base::nullopt; +} + } // namespace weekly_time_utils } // namespace policy
diff --git a/chrome/browser/chromeos/policy/weekly_time/time_utils.h b/chrome/browser/chromeos/policy/weekly_time/time_utils.h index 17ccc6c4..65730ee 100644 --- a/chrome/browser/chromeos/policy/weekly_time/time_utils.h +++ b/chrome/browser/chromeos/policy/weekly_time/time_utils.h
@@ -9,6 +9,7 @@ #include <string> #include <vector> +#include "base/optional.h" #include "base/strings/string16.h" #include "third_party/icu/source/i18n/unicode/timezone.h" @@ -56,6 +57,14 @@ const WeeklyTime& current_time, const std::vector<WeeklyTimeInterval>& weekly_time_intervals); +// Takes in a vector of weekly time intervals. If |clock->Now()| +// is inside one of the intervals, then the function returns the +// interval that contains |clock->Now()|. Otherwise, return |base::nullopt|. +// The intervals must have a defined +base::Optional<WeeklyTimeInterval> GetIntervalForCurrentTime( + const std::vector<WeeklyTimeInterval>& intervals, + base::Clock* clock); + } // namespace weekly_time_utils } // namespace policy
diff --git a/chrome/browser/chromeos/policy/weekly_time/time_utils_unittest.cc b/chrome/browser/chromeos/policy/weekly_time/time_utils_unittest.cc index 13e07c8..7bfa1ff 100644 --- a/chrome/browser/chromeos/policy/weekly_time/time_utils_unittest.cc +++ b/chrome/browser/chromeos/policy/weekly_time/time_utils_unittest.cc
@@ -23,9 +23,25 @@ namespace weekly_time_utils { namespace { + +enum { + kMonday = 1, + kTuesday = 2, + kWednesday = 3, + kThursday = 4, + kFriday = 5, + kSaturday = 6, + kSunday = 7, +}; + constexpr int kMinutesInHour = 60; +constexpr int kMillisecondsInHour = 3600000; constexpr base::TimeDelta kMinute = base::TimeDelta::FromMinutes(1); constexpr base::TimeDelta kHour = base::TimeDelta::FromHours(1); +constexpr base::Time::Exploded kDaylightSavingsTime{2018, 8, 3, 8, 15, 0, 0, 0}; +constexpr base::Time::Exploded kNonDaylightSavingsTime{2018, 1, 0, 28, + 0, 0, 0, 0}; + } // namespace class TimeUtilsTimezoneFunctionsTest : public testing::Test { @@ -43,15 +59,15 @@ void SetDaylightSavings(bool is_daylight_savings) { if (is_daylight_savings) { // Friday July 13th - base::Time::Exploded exploded_daylight{2018, 7, 5, 13, 0, 0, 0, 0}; base::Time test_time; - ASSERT_TRUE(base::Time::FromUTCExploded(exploded_daylight, &test_time)); + ASSERT_TRUE( + base::Time::FromUTCExploded(kDaylightSavingsTime, &test_time)); test_clock_.SetNow(test_time); } else { // Sunday January 28 - base::Time::Exploded exploded_standard{2018, 1, 0, 28, 0, 0, 0, 0}; base::Time test_time; - ASSERT_TRUE(base::Time::FromUTCExploded(exploded_standard, &test_time)); + ASSERT_TRUE( + base::Time::FromUTCExploded(kNonDaylightSavingsTime, &test_time)); test_clock_.SetNow(test_time); } } @@ -144,5 +160,116 @@ EXPECT_EQ(result2, result); } +class GetIntervalForCurrentTimeTest + : public testing::TestWithParam< + std::tuple<std::vector<WeeklyTimeInterval>, + base::Optional<WeeklyTimeInterval>>> { + protected: + void SetUp() override { + // Wednesday August 8th at 15:00 GMT + base::Time test_time; + ASSERT_TRUE(base::Time::FromUTCExploded(kDaylightSavingsTime, &test_time)); + test_clock_.SetNow(test_time); + } + + std::vector<WeeklyTimeInterval> intervals() { + return std::get<0>(GetParam()); + } + base::Optional<WeeklyTimeInterval> expected_result() { + return std::get<1>(GetParam()); + } + + base::SimpleTestClock test_clock_; +}; + +TEST_P(GetIntervalForCurrentTimeTest, Test) { + base::Optional<WeeklyTimeInterval> result = + GetIntervalForCurrentTime(intervals(), &test_clock_); + EXPECT_EQ(result, expected_result()); +} + +INSTANTIATE_TEST_CASE_P( + SameTimezoneNone, + GetIntervalForCurrentTimeTest, + testing::Values(std::make_tuple( + std::vector<WeeklyTimeInterval>{ + WeeklyTimeInterval( + WeeklyTime(kTuesday, 10 * kMillisecondsInHour, 0), + WeeklyTime(kWednesday, 8 * kMillisecondsInHour, 0)), + WeeklyTimeInterval( + WeeklyTime(kSunday, 5 * kMillisecondsInHour, 0), + WeeklyTime(kSunday, 16 * kMillisecondsInHour, 0))}, + base::nullopt))); + +INSTANTIATE_TEST_CASE_P( + SameTimezoneResult, + GetIntervalForCurrentTimeTest, + testing::Values( + std::make_tuple( + std::vector<WeeklyTimeInterval>{ + WeeklyTimeInterval( + WeeklyTime(kTuesday, 10 * kMillisecondsInHour, 0), + WeeklyTime(kThursday, 8 * kMillisecondsInHour, 0)), + WeeklyTimeInterval( + WeeklyTime(kSunday, 5 * kMillisecondsInHour, 0), + WeeklyTime(kSunday, 16 * kMillisecondsInHour, 0))}, + WeeklyTimeInterval( + WeeklyTime(kTuesday, 10 * kMillisecondsInHour, 0), + WeeklyTime(kThursday, 8 * kMillisecondsInHour, 0))), + std::make_tuple( + std::vector<WeeklyTimeInterval>{ + WeeklyTimeInterval( + WeeklyTime(kTuesday, 10 * kMillisecondsInHour, 0), + WeeklyTime(kWednesday, 8 * kMillisecondsInHour, 0)), + WeeklyTimeInterval( + WeeklyTime(kSunday, 5 * kMillisecondsInHour, 0), + WeeklyTime(kWednesday, 16 * kMillisecondsInHour, 0))}, + WeeklyTimeInterval( + WeeklyTime(kSunday, 5 * kMillisecondsInHour, 0), + WeeklyTime(kWednesday, 16 * kMillisecondsInHour, 0))))); + +INSTANTIATE_TEST_CASE_P( + DifferentTimezoneNone, + GetIntervalForCurrentTimeTest, + testing::Values(std::make_tuple( + std::vector<WeeklyTimeInterval>{ + WeeklyTimeInterval(WeeklyTime(kTuesday, + 10 * kMillisecondsInHour, + 5 * kMillisecondsInHour), + WeeklyTime(kWednesday, + 17 * kMillisecondsInHour, + 5 * kMillisecondsInHour)), + WeeklyTimeInterval(WeeklyTime(kSunday, + 5 * kMillisecondsInHour, + 5 * kMillisecondsInHour), + WeeklyTime(kSunday, + 16 * kMillisecondsInHour, + 5 * kMillisecondsInHour))}, + base::nullopt))); + +INSTANTIATE_TEST_CASE_P( + DifferentTimezoneResult, + GetIntervalForCurrentTimeTest, + testing::Values(std::make_tuple( + std::vector<WeeklyTimeInterval>{ + WeeklyTimeInterval(WeeklyTime(kTuesday, + 10 * kMillisecondsInHour, + -8 * kMillisecondsInHour), + WeeklyTime(kWednesday, + 8 * kMillisecondsInHour, + -8 * kMillisecondsInHour)), + WeeklyTimeInterval(WeeklyTime(kSunday, + 5 * kMillisecondsInHour, + -8 * kMillisecondsInHour), + WeeklyTime(kSunday, + 16 * kMillisecondsInHour, + -8 * kMillisecondsInHour))}, + WeeklyTimeInterval(WeeklyTime(kTuesday, + 10 * kMillisecondsInHour, + -8 * kMillisecondsInHour), + WeeklyTime(kWednesday, + 8 * kMillisecondsInHour, + -8 * kMillisecondsInHour))))); + } // namespace weekly_time_utils } // namespace policy
diff --git a/chrome/browser/chromeos/policy/weekly_time/weekly_time.h b/chrome/browser/chromeos/policy/weekly_time/weekly_time.h index 7c93392f..790a2834 100644 --- a/chrome/browser/chromeos/policy/weekly_time/weekly_time.h +++ b/chrome/browser/chromeos/policy/weekly_time/weekly_time.h
@@ -28,6 +28,12 @@ WeeklyTime& operator=(const WeeklyTime& rhs); + bool operator==(const WeeklyTime& rhs) const { + return day_of_week_ == rhs.day_of_week() && + milliseconds_ == rhs.milliseconds() && + timezone_offset_ == rhs.timezone_offset(); + } + // Return DictionaryValue in format: // { "day_of_week" : int # value is from 1 to 7 (1 = Monday, 2 = Tuesday, // etc.)
diff --git a/chrome/browser/chromeos/policy/weekly_time/weekly_time_interval.h b/chrome/browser/chromeos/policy/weekly_time/weekly_time_interval.h index 3985dad..59f25936 100644 --- a/chrome/browser/chromeos/policy/weekly_time/weekly_time_interval.h +++ b/chrome/browser/chromeos/policy/weekly_time/weekly_time_interval.h
@@ -26,6 +26,10 @@ WeeklyTimeInterval& operator=(const WeeklyTimeInterval& rhs); + bool operator==(const WeeklyTimeInterval& rhs) const { + return start_ == rhs.start() && end_ == rhs.end(); + } + // Return DictionaryValue in format: // { "start" : WeeklyTime, // "end" : WeeklyTime }
diff --git a/chrome/browser/chromeos/power/extension_event_observer_unittest.cc b/chrome/browser/chromeos/power/extension_event_observer_unittest.cc index 3655020..fd5b1b0 100644 --- a/chrome/browser/chromeos/power/extension_event_observer_unittest.cc +++ b/chrome/browser/chromeos/power/extension_event_observer_unittest.cc
@@ -13,8 +13,7 @@ #include "base/memory/ptr_util.h" #include "base/run_loop.h" #include "chrome/browser/chromeos/login/users/fake_chrome_user_manager.h" -#include "chrome/browser/chromeos/settings/cros_settings.h" -#include "chrome/browser/chromeos/settings/device_settings_service.h" +#include "chrome/browser/chromeos/settings/scoped_cros_settings_test_helper.h" #include "chrome/common/extensions/api/gcm.h" #include "chrome/test/base/testing_browser_process.h" #include "chrome/test/base/testing_profile.h" @@ -144,9 +143,8 @@ // and RenderProcessHosts. content::RenderViewHostTestEnabler render_view_host_test_enabler_; - // Chrome OS needs extra services to run in the following order. - ScopedTestDeviceSettingsService test_device_settings_service_; - ScopedTestCrosSettings test_cros_settings_; + // Chrome OS needs the CrosSettings test helper. + ScopedCrosSettingsTestHelper cros_settings_test_helper_; // Owned by |scoped_user_manager_enabler_|. FakeChromeUserManager* fake_user_manager_;
diff --git a/chrome/browser/chromeos/power/renderer_freezer_unittest.cc b/chrome/browser/chromeos/power/renderer_freezer_unittest.cc index 8e0f0d4..2be09581 100644 --- a/chrome/browser/chromeos/power/renderer_freezer_unittest.cc +++ b/chrome/browser/chromeos/power/renderer_freezer_unittest.cc
@@ -13,8 +13,7 @@ #include "base/memory/ref_counted.h" #include "base/run_loop.h" #include "chrome/browser/chromeos/login/users/scoped_test_user_manager.h" -#include "chrome/browser/chromeos/settings/cros_settings.h" -#include "chrome/browser/chromeos/settings/device_settings_service.h" +#include "chrome/browser/chromeos/settings/scoped_cros_settings_test_helper.h" #include "chrome/browser/extensions/extension_service.h" #include "chrome/browser/extensions/test_extension_system.h" #include "chrome/test/base/testing_browser_process.h" @@ -277,10 +276,8 @@ std::unique_ptr<TestingProfileManager> profile_manager_; private: - // Chrome OS needs extra services to run in the following order. - chromeos::ScopedTestDeviceSettingsService test_device_settings_service_; - chromeos::ScopedTestCrosSettings test_cros_settings_; - chromeos::ScopedTestUserManager test_user_manager_; + // Chrome OS needs the CrosSettings test helper. + chromeos::ScopedCrosSettingsTestHelper cros_settings_test_helper_; DISALLOW_COPY_AND_ASSIGN(RendererFreezerTestWithExtensions); };
diff --git a/chrome/browser/chromeos/proxy_config_service_impl_unittest.cc b/chrome/browser/chromeos/proxy_config_service_impl_unittest.cc index 7f5638ab..7daaada 100644 --- a/chrome/browser/chromeos/proxy_config_service_impl_unittest.cc +++ b/chrome/browser/chromeos/proxy_config_service_impl_unittest.cc
@@ -15,8 +15,7 @@ #include "base/macros.h" #include "base/run_loop.h" #include "base/strings/stringprintf.h" -#include "chrome/browser/chromeos/settings/cros_settings.h" -#include "chrome/browser/chromeos/settings/device_settings_service.h" +#include "chrome/browser/chromeos/settings/scoped_cros_settings_test_helper.h" #include "chromeos/dbus/dbus_thread_manager.h" #include "chromeos/dbus/shill_profile_client.h" #include "chromeos/dbus/shill_service_client.h" @@ -370,8 +369,7 @@ sync_preferences::TestingPrefServiceSyncable profile_prefs_; private: - ScopedTestDeviceSettingsService test_device_settings_service_; - ScopedTestCrosSettings test_cros_settings_; + ScopedCrosSettingsTestHelper cros_settings_test_helper_; }; TEST_F(ProxyConfigServiceImplTest, NetworkProxy) {
diff --git a/chrome/browser/chromeos/settings/cros_settings_unittest.cc b/chrome/browser/chromeos/settings/cros_settings_unittest.cc index 9b49f90..f4698a1 100644 --- a/chrome/browser/chromeos/settings/cros_settings_unittest.cc +++ b/chrome/browser/chromeos/settings/cros_settings_unittest.cc
@@ -13,6 +13,7 @@ #include "base/values.h" #include "chrome/browser/chromeos/settings/device_settings_service.h" #include "chrome/browser/chromeos/settings/device_settings_test_helper.h" +#include "chrome/browser/chromeos/settings/stub_install_attributes.h" #include "chrome/test/base/scoped_testing_local_state.h" #include "chrome/test/base/testing_browser_process.h" #include "chromeos/settings/cros_settings_names.h" @@ -92,6 +93,7 @@ ScopedTestingLocalState local_state_; ScopedDeviceSettingsTestHelper device_settings_test_helper_; + ScopedStubInstallAttributes scoped_stub_install_attributes_; CrosSettings settings_; std::map<std::string, std::unique_ptr<base::Value>> expected_props_;
diff --git a/chrome/browser/chromeos/settings/device_oauth2_token_service_unittest.cc b/chrome/browser/chromeos/settings/device_oauth2_token_service_unittest.cc index 4839bffe..01e58efa 100644 --- a/chrome/browser/chromeos/settings/device_oauth2_token_service_unittest.cc +++ b/chrome/browser/chromeos/settings/device_oauth2_token_service_unittest.cc
@@ -17,6 +17,7 @@ #include "chrome/browser/chromeos/settings/cros_settings.h" #include "chrome/browser/chromeos/settings/device_oauth2_token_service_delegate.h" #include "chrome/browser/chromeos/settings/device_settings_service.h" +#include "chrome/browser/chromeos/settings/stub_install_attributes.h" #include "chrome/browser/chromeos/settings/token_encryptor.h" #include "chrome/common/pref_names.h" #include "chrome/test/base/scoped_testing_local_state.h" @@ -212,6 +213,7 @@ }; content::TestBrowserThreadBundle test_browser_thread_bundle_; + ScopedStubInstallAttributes test_install_attributes_; ScopedTestingLocalState scoped_testing_local_state_; network::TestURLLoaderFactory test_url_loader_factory_; scoped_refptr<network::WeakWrapperSharedURLLoaderFactory>
diff --git a/chrome/browser/chromeos/settings/device_settings_provider.cc b/chrome/browser/chromeos/settings/device_settings_provider.cc index 08d32646..4904303 100644 --- a/chrome/browser/chromeos/settings/device_settings_provider.cc +++ b/chrome/browser/chromeos/settings/device_settings_provider.cc
@@ -21,17 +21,18 @@ #include "base/values.h" #include "chrome/browser/browser_process.h" #include "chrome/browser/chromeos/ownership/owner_settings_service_chromeos.h" -#include "chrome/browser/chromeos/policy/browser_policy_connector_chromeos.h" #include "chrome/browser/chromeos/policy/device_local_account.h" #include "chrome/browser/chromeos/policy/off_hours/off_hours_proto_parser.h" #include "chrome/browser/chromeos/settings/cros_settings.h" #include "chrome/browser/chromeos/settings/device_settings_cache.h" +#include "chrome/browser/chromeos/settings/install_attributes.h" #include "chrome/browser/chromeos/tpm_firmware_update.h" #include "chrome/browser/metrics/metrics_reporting_state.h" #include "chromeos/chromeos_switches.h" #include "chromeos/dbus/cryptohome_client.h" #include "chromeos/dbus/dbus_thread_manager.h" #include "chromeos/settings/cros_settings_names.h" +#include "components/policy/core/common/chrome_schema.h" #include "components/policy/core/common/cloud/cloud_policy_constants.h" #include "components/policy/core/common/schema.h" #include "components/policy/proto/device_management_backend.pb.h" @@ -136,9 +137,8 @@ return nullptr; } - const policy::Schema& schema = g_browser_process->browser_policy_connector() - ->GetChromeSchema() - .GetKnownProperty(policy_name); + const policy::Schema& schema = + policy::GetChromeSchema().GetKnownProperty(policy_name); if (!schema.valid()) { LOG(WARNING) << "Unknown or invalid policy schema for " << policy_name @@ -162,9 +162,9 @@ return root; } -void DecodeLoginPolicies( - const em::ChromeDeviceSettingsProto& policy, - PrefValueMap* new_values_cache) { +void DecodeLoginPolicies(const em::ChromeDeviceSettingsProto& policy, + bool is_enterprise_managed, + PrefValueMap* new_values_cache) { // For all our boolean settings the following is applicable: // true is default permissive value and false is safe prohibitive value. // Exceptions: @@ -201,10 +201,8 @@ !policy.guest_mode_enabled().has_guest_mode_enabled() || policy.guest_mode_enabled().guest_mode_enabled()); - policy::BrowserPolicyConnectorChromeOS* connector = - g_browser_process->platform_part()->browser_policy_connector_chromeos(); bool supervised_users_enabled = false; - if (connector->IsEnterpriseManaged()) { + if (is_enterprise_managed) { supervised_users_enabled = policy.has_supervised_users_settings() && policy.supervised_users_settings().has_supervised_users_enabled() && @@ -535,9 +533,9 @@ } } -void DecodeGenericPolicies( - const em::ChromeDeviceSettingsProto& policy, - PrefValueMap* new_values_cache) { +void DecodeGenericPolicies(const em::ChromeDeviceSettingsProto& policy, + bool is_enterprise_managed, + PrefValueMap* new_values_cache) { if (policy.has_metrics_enabled() && policy.metrics_enabled().has_metrics_enabled()) { new_values_cache->SetBoolean(kStatsReportingPref, @@ -545,9 +543,6 @@ } else { // If the policy is missing, default to reporting enabled on enterprise- // enrolled devices, c.f. crbug/456186. - policy::BrowserPolicyConnectorChromeOS* connector = - g_browser_process->platform_part()->browser_policy_connector_chromeos(); - bool is_enterprise_managed = connector->IsEnterpriseManaged(); new_values_cache->SetBoolean(kStatsReportingPref, is_enterprise_managed); } @@ -709,9 +704,7 @@ } else { // If the policy is missing, default to false on enterprise-enrolled // devices. - policy::BrowserPolicyConnectorChromeOS* connector = - g_browser_process->platform_part()->browser_policy_connector_chromeos(); - if (connector->IsEnterpriseManaged()) { + if (is_enterprise_managed) { new_values_cache->SetBoolean(kVirtualMachinesAllowed, false); } } @@ -779,12 +772,14 @@ void DeviceSettingsProvider::DecodePolicies( const em::ChromeDeviceSettingsProto& policy, PrefValueMap* new_values_cache) { - DecodeLoginPolicies(policy, new_values_cache); + bool is_enterprise_managed = InstallAttributes::Get()->IsEnterpriseManaged(); + + DecodeLoginPolicies(policy, is_enterprise_managed, new_values_cache); DecodeNetworkPolicies(policy, new_values_cache); DecodeAutoUpdatePolicies(policy, new_values_cache); DecodeReportingPolicies(policy, new_values_cache); DecodeHeartbeatPolicies(policy, new_values_cache); - DecodeGenericPolicies(policy, new_values_cache); + DecodeGenericPolicies(policy, is_enterprise_managed, new_values_cache); DecodeLogUploadPolicies(policy, new_values_cache); } @@ -958,9 +953,7 @@ bool DeviceSettingsProvider::MitigateMissingPolicy() { // First check if the device has been owned already and if not exit // immediately. - policy::BrowserPolicyConnectorChromeOS* connector = - g_browser_process->platform_part()->browser_policy_connector_chromeos(); - if (connector->GetDeviceMode() != policy::DEVICE_MODE_CONSUMER) + if (InstallAttributes::Get()->GetMode() != policy::DEVICE_MODE_CONSUMER) return false; // If we are here the policy file were corrupted or missing. This can happen
diff --git a/chrome/browser/chromeos/settings/device_settings_provider.h b/chrome/browser/chromeos/settings/device_settings_provider.h index 7a499ea9..4adbea3 100644 --- a/chrome/browser/chromeos/settings/device_settings_provider.h +++ b/chrome/browser/chromeos/settings/device_settings_provider.h
@@ -21,7 +21,7 @@ namespace base { class Value; -} +} // namespace base namespace enterprise_management { class ChromeDeviceSettingsProto; @@ -30,6 +30,8 @@ namespace chromeos { // CrosSettingsProvider implementation that works with device settings. +// Dependency: chromeos::InstallAttributes must be initialized while this class +// is in use. // // Note that the write path is in the process of being migrated to // OwnerSettingsServiceChromeOS (crbug.com/230018).
diff --git a/chrome/browser/chromeos/settings/device_settings_provider_unittest.cc b/chrome/browser/chromeos/settings/device_settings_provider_unittest.cc index 9e818647..535ecd3 100644 --- a/chrome/browser/chromeos/settings/device_settings_provider_unittest.cc +++ b/chrome/browser/chromeos/settings/device_settings_provider_unittest.cc
@@ -265,13 +265,13 @@ // Same as above, but enrolled into an enterprise class DeviceSettingsProviderTestEnterprise : public DeviceSettingsProviderTest { protected: - DeviceSettingsProviderTestEnterprise() - : install_attributes_(ScopedStubInstallAttributes::CreateCloudManaged( - policy::PolicyBuilder::kFakeDomain, - policy::PolicyBuilder::kFakeDeviceId)) {} - - private: - ScopedStubInstallAttributes install_attributes_; + void SetUp() override { + DeviceSettingsProviderTest::SetUp(); + profile_->ScopedCrosSettingsTestHelper() + ->InstallAttributes() + ->SetCloudManaged(policy::PolicyBuilder::kFakeDomain, + policy::PolicyBuilder::kFakeDeviceId); + } }; TEST_F(DeviceSettingsProviderTest, InitializationTest) {
diff --git a/chrome/browser/chromeos/settings/device_settings_service_unittest.cc b/chrome/browser/chromeos/settings/device_settings_service_unittest.cc index 87cc8c4..9bd866c9 100644 --- a/chrome/browser/chromeos/settings/device_settings_service_unittest.cc +++ b/chrome/browser/chromeos/settings/device_settings_service_unittest.cc
@@ -62,12 +62,10 @@ : operation_completed_(false), is_owner_(true), is_owner_set_(false), - ownership_status_(DeviceSettingsService::OWNERSHIP_UNKNOWN) {} - - void SetUp() override { + ownership_status_(DeviceSettingsService::OWNERSHIP_UNKNOWN) { device_policy_.payload().mutable_device_policy_refresh_rate()-> set_device_policy_refresh_rate(120); - DeviceSettingsTestBase::SetUp(); + ReloadDevicePolicy(); } void CheckPolicy() {
diff --git a/chrome/browser/chromeos/settings/device_settings_test_helper.cc b/chrome/browser/chromeos/settings/device_settings_test_helper.cc index ea8724d..c429fb3 100644 --- a/chrome/browser/chromeos/settings/device_settings_test_helper.cc +++ b/chrome/browser/chromeos/settings/device_settings_test_helper.cc
@@ -39,38 +39,35 @@ : thread_bundle_(content::TestBrowserThreadBundle::IO_MAINLOOP), user_manager_(new FakeChromeUserManager()), user_manager_enabler_(base::WrapUnique(user_manager_)), - owner_key_util_(new ownership::MockOwnerKeyUtil()) { + owner_key_util_(new ownership::MockOwnerKeyUtil()), + dbus_setter_(chromeos::DBusThreadManager::GetSetterForTesting()) { OwnerSettingsServiceChromeOSFactory::SetDeviceSettingsServiceForTesting( &device_settings_service_); OwnerSettingsServiceChromeOSFactory::GetInstance()->SetOwnerKeyUtilForTesting( owner_key_util_); -} - -DeviceSettingsTestBase::~DeviceSettingsTestBase() { - base::RunLoop().RunUntilIdle(); -} - -void DeviceSettingsTestBase::SetUp() { - // Initialize DBusThreadManager with a stub implementation. - dbus_setter_ = chromeos::DBusThreadManager::GetSetterForTesting(); - base::RunLoop().RunUntilIdle(); device_policy_.payload().mutable_metrics_enabled()->set_metrics_enabled( false); + ReloadDevicePolicy(); owner_key_util_->SetPublicKeyFromPrivateKey(*device_policy_.GetSigningKey()); - device_policy_.Build(); - session_manager_client_.set_device_policy(device_policy_.GetBlob()); device_settings_service_.SetSessionManager(&session_manager_client_, owner_key_util_); + profile_.reset(new TestingProfile()); } -void DeviceSettingsTestBase::TearDown() { +DeviceSettingsTestBase::~DeviceSettingsTestBase() { OwnerSettingsServiceChromeOSFactory::SetDeviceSettingsServiceForTesting(NULL); FlushDeviceSettings(); device_settings_service_.UnsetSessionManager(); DBusThreadManager::Shutdown(); + base::RunLoop().RunUntilIdle(); +} + +void DeviceSettingsTestBase::ReloadDevicePolicy() { + device_policy_.Build(); + session_manager_client_.set_device_policy(device_policy_.GetBlob()); } void DeviceSettingsTestBase::FlushDeviceSettings() {
diff --git a/chrome/browser/chromeos/settings/device_settings_test_helper.h b/chrome/browser/chromeos/settings/device_settings_test_helper.h index 566775c0..419c246 100644 --- a/chrome/browser/chromeos/settings/device_settings_test_helper.h +++ b/chrome/browser/chromeos/settings/device_settings_test_helper.h
@@ -47,8 +47,8 @@ DeviceSettingsTestBase(); ~DeviceSettingsTestBase() override; - void SetUp() override; - void TearDown() override; + // Subclasses that modify the DevicePolicy should call this afterwards. + void ReloadDevicePolicy(); // Flushes any pending device settings operations. void FlushDeviceSettings(); @@ -72,10 +72,11 @@ // Local DeviceSettingsService instance for tests. Avoid using in combination // with the global instance (DeviceSettingsService::Get()). DeviceSettingsService device_settings_service_; - std::unique_ptr<TestingProfile> profile_; std::unique_ptr<DBusThreadManagerSetter> dbus_setter_; + std::unique_ptr<TestingProfile> profile_; + private: DISALLOW_COPY_AND_ASSIGN(DeviceSettingsTestBase); };
diff --git a/chrome/browser/chromeos/settings/install_attributes.cc b/chrome/browser/chromeos/settings/install_attributes.cc index 1339e9f2..5279c71ce 100644 --- a/chrome/browser/chromeos/settings/install_attributes.cc +++ b/chrome/browser/chromeos/settings/install_attributes.cc
@@ -15,10 +15,12 @@ #include "base/macros.h" #include "base/metrics/histogram_base.h" #include "base/metrics/histogram_macros.h" +#include "base/path_service.h" #include "base/single_thread_task_runner.h" #include "base/sys_info.h" #include "base/threading/thread_task_runner_handle.h" #include "base/time/time.h" +#include "chromeos/chromeos_paths.h" #include "chromeos/dbus/cryptohome/rpc.pb.h" #include "chromeos/dbus/dbus_thread_manager.h" #include "chromeos/dbus/util/tpm_util.h" @@ -30,11 +32,18 @@ namespace { +InstallAttributes* g_install_attributes = nullptr; + +// Calling SetForTesting sets this flag. This flag means that the production +// code which calls Initialize and Shutdown will have no effect - the test +// install attributes will remain in place until ShutdownForTesting is called. +bool g_using_install_attributes_for_testing = false; + // Number of TPM lock state query retries during consistency check. -int kDbusRetryCount = 12; +const int kDbusRetryCount = 12; // Interval of TPM lock state query retries during consistency check. -int kDbusRetryIntervalInSeconds = 5; +const int kDbusRetryIntervalInSeconds = 5; std::string ReadMapKey(const std::map<std::string, std::string>& map, const std::string& key) { @@ -62,6 +71,59 @@ } // namespace // static +void InstallAttributes::Initialize() { + // Don't reinitialize if a specific instance has already been set for test. + if (g_using_install_attributes_for_testing) + return; + + DCHECK(!g_install_attributes); + DCHECK(DBusThreadManager::IsInitialized()); + g_install_attributes = + new InstallAttributes(DBusThreadManager::Get()->GetCryptohomeClient()); + base::FilePath install_attrs_file; + CHECK(base::PathService::Get(chromeos::FILE_INSTALL_ATTRIBUTES, + &install_attrs_file)); + g_install_attributes->Init(install_attrs_file); +} + +// static +bool InstallAttributes::IsInitialized() { + return g_install_attributes; +} + +// static +void InstallAttributes::Shutdown() { + if (g_using_install_attributes_for_testing) + return; + + DCHECK(g_install_attributes); + delete g_install_attributes; + g_install_attributes = nullptr; +} + +// static +InstallAttributes* InstallAttributes::Get() { + DCHECK(g_install_attributes); + return g_install_attributes; +} + +// static +void InstallAttributes::SetForTesting(InstallAttributes* test_instance) { + DCHECK(!g_install_attributes); + DCHECK(!g_using_install_attributes_for_testing); + g_install_attributes = test_instance; + g_using_install_attributes_for_testing = true; +} + +// static +void InstallAttributes::ShutdownForTesting() { + DCHECK(g_using_install_attributes_for_testing); + // Don't delete the test instance, we are not the owner. + g_install_attributes = nullptr; + g_using_install_attributes_for_testing = false; +} + +// static std::string InstallAttributes::GetEnterpriseOwnedInstallAttributesBlobForTesting( const std::string& user_name) {
diff --git a/chrome/browser/chromeos/settings/install_attributes.h b/chrome/browser/chromeos/settings/install_attributes.h index 1986396..aebab31 100644 --- a/chrome/browser/chromeos/settings/install_attributes.h +++ b/chrome/browser/chromeos/settings/install_attributes.h
@@ -49,6 +49,18 @@ static std::string GetEnterpriseOwnedInstallAttributesBlobForTesting( const std::string& user_name); + // Manage singleton instance. + static void Initialize(); + static bool IsInitialized(); + static void Shutdown(); + static InstallAttributes* Get(); + + // Sets the singleton to |test_instance|. Does not take ownership of the + // instance. Should be matched with a call to |ShutdownForTesting| once the + // test is finished and before the instance is deleted. + static void SetForTesting(InstallAttributes* test_instance); + static void ShutdownForTesting(); + explicit InstallAttributes(CryptohomeClient* cryptohome_client); ~InstallAttributes();
diff --git a/chrome/browser/chromeos/settings/scoped_cros_settings_test_helper.cc b/chrome/browser/chromeos/settings/scoped_cros_settings_test_helper.cc index cc70123..34ea622 100644 --- a/chrome/browser/chromeos/settings/scoped_cros_settings_test_helper.cc +++ b/chrome/browser/chromeos/settings/scoped_cros_settings_test_helper.cc
@@ -123,8 +123,13 @@ } } +StubInstallAttributes* ScopedCrosSettingsTestHelper::InstallAttributes() { + return test_install_attributes_->Get(); +} + void ScopedCrosSettingsTestHelper::Initialize(bool create_settings_service) { if (create_settings_service) { + test_install_attributes_.reset(new ScopedStubInstallAttributes()); CHECK(!DeviceSettingsService::IsInitialized()); test_device_settings_service_.reset(new ScopedTestDeviceSettingsService()); test_cros_settings_.reset(new ScopedTestCrosSettings());
diff --git a/chrome/browser/chromeos/settings/scoped_cros_settings_test_helper.h b/chrome/browser/chromeos/settings/scoped_cros_settings_test_helper.h index 1c647fac..8d2128f 100644 --- a/chrome/browser/chromeos/settings/scoped_cros_settings_test_helper.h +++ b/chrome/browser/chromeos/settings/scoped_cros_settings_test_helper.h
@@ -10,6 +10,7 @@ #include "base/macros.h" #include "chrome/browser/chromeos/settings/stub_cros_settings_provider.h" +#include "chrome/browser/chromeos/settings/stub_install_attributes.h" #include "chromeos/settings/cros_settings_provider.h" class Profile; @@ -64,8 +65,13 @@ // later on browser test startup by the device settings service. void StoreCachedDeviceSetting(const std::string& path); + // Get the scoped install attributes to change them as needed for the + // current test. + StubInstallAttributes* InstallAttributes(); + private: // Helpers used to mock out cros settings. + std::unique_ptr<ScopedStubInstallAttributes> test_install_attributes_; std::unique_ptr<ScopedTestDeviceSettingsService> test_device_settings_service_; std::unique_ptr<ScopedTestCrosSettings> test_cros_settings_;
diff --git a/chrome/browser/chromeos/settings/stub_install_attributes.cc b/chrome/browser/chromeos/settings/stub_install_attributes.cc index c72be6f8..815eb484 100644 --- a/chrome/browser/chromeos/settings/stub_install_attributes.cc +++ b/chrome/browser/chromeos/settings/stub_install_attributes.cc
@@ -6,7 +6,6 @@ #include <string> -#include "chrome/browser/chromeos/policy/browser_policy_connector_chromeos.h" #include "components/policy/core/common/cloud/cloud_policy_constants.h" namespace chromeos { @@ -15,6 +14,40 @@ device_locked_ = true; } +// static +std::unique_ptr<StubInstallAttributes> StubInstallAttributes::CreateUnset() { + auto result = std::make_unique<StubInstallAttributes>(); + result->Clear(); + return result; +} + +// static +std::unique_ptr<StubInstallAttributes> +StubInstallAttributes::CreateConsumerOwned() { + auto result = std::make_unique<StubInstallAttributes>(); + result->SetConsumerOwned(); + return result; +} + +// static +std::unique_ptr<StubInstallAttributes> +StubInstallAttributes::CreateCloudManaged(const std::string& domain, + const std::string& device_id) { + auto result = std::make_unique<StubInstallAttributes>(); + result->SetCloudManaged(domain, device_id); + return result; +} + +// static +std::unique_ptr<StubInstallAttributes> +StubInstallAttributes::CreateActiveDirectoryManaged( + const std::string& realm, + const std::string& device_id) { + auto result = std::make_unique<StubInstallAttributes>(); + result->SetActiveDirectoryManaged(realm, device_id); + return result; +} + void StubInstallAttributes::Clear() { registration_mode_ = policy::DEVICE_MODE_NOT_SET; registration_domain_.clear(); @@ -46,50 +79,28 @@ registration_device_id_ = device_id; } -// static -ScopedStubInstallAttributes ScopedStubInstallAttributes::CreateUnset() { - StubInstallAttributes* attributes = new StubInstallAttributes(); - attributes->Clear(); - policy::BrowserPolicyConnectorChromeOS::SetInstallAttributesForTesting( - attributes); - return ScopedStubInstallAttributes(); -} +ScopedStubInstallAttributes::ScopedStubInstallAttributes() + : ScopedStubInstallAttributes(std::make_unique<StubInstallAttributes>()) {} -// static -ScopedStubInstallAttributes ScopedStubInstallAttributes::CreateConsumerOwned() { - StubInstallAttributes* attributes = new StubInstallAttributes(); - attributes->SetConsumerOwned(); - policy::BrowserPolicyConnectorChromeOS::SetInstallAttributesForTesting( - attributes); - return ScopedStubInstallAttributes(); -} - -// static -ScopedStubInstallAttributes ScopedStubInstallAttributes::CreateCloudManaged( - const std::string& domain, - const std::string& device_id) { - StubInstallAttributes* attributes = new StubInstallAttributes(); - attributes->SetCloudManaged(domain, device_id); - policy::BrowserPolicyConnectorChromeOS::SetInstallAttributesForTesting( - attributes); - return ScopedStubInstallAttributes(); -} - -// static -ScopedStubInstallAttributes -ScopedStubInstallAttributes::CreateActiveDirectoryManaged( - const std::string& realm, - const std::string& device_id) { - StubInstallAttributes* attributes = new StubInstallAttributes(); - attributes->SetActiveDirectoryManaged(realm, device_id); - policy::BrowserPolicyConnectorChromeOS::SetInstallAttributesForTesting( - attributes); - return ScopedStubInstallAttributes(); +ScopedStubInstallAttributes::ScopedStubInstallAttributes( + std::unique_ptr<StubInstallAttributes> install_attributes) + : install_attributes_(std::move(install_attributes)) { + // The constructor calls SetForTesting with these install_attributes, so + // in the destructor we make the matching call to ShutdownForTesting. + InstallAttributes::SetForTesting(install_attributes_.get()); } ScopedStubInstallAttributes::~ScopedStubInstallAttributes() { - if (cleanup_) - policy::BrowserPolicyConnectorChromeOS::RemoveInstallAttributesForTesting(); + // Make sure that the install_attributes_ that are held by this class + // are still the same as the global singleton - if not, then that singleton + // has been overwritten somewhere else, which is probably a bug. + CHECK_EQ(install_attributes_.get(), InstallAttributes::Get()); + + InstallAttributes::ShutdownForTesting(); // Unset the global singleton. +} + +StubInstallAttributes* ScopedStubInstallAttributes::Get() { + return install_attributes_.get(); } } // namespace chromeos
diff --git a/chrome/browser/chromeos/settings/stub_install_attributes.h b/chrome/browser/chromeos/settings/stub_install_attributes.h index cf9bee6..da92819 100644 --- a/chrome/browser/chromeos/settings/stub_install_attributes.h +++ b/chrome/browser/chromeos/settings/stub_install_attributes.h
@@ -16,17 +16,28 @@ // This class allows tests to set specific configurations for testing. class StubInstallAttributes : public InstallAttributes { public: + // The default StubInstallAttributes has a DeviceMode of PENDING. StubInstallAttributes(); + // Creates a StubInstallAttributes and Clears it. + static std::unique_ptr<StubInstallAttributes> CreateUnset(); + // Creates a StubInstallAttributes and calls SetConsumerOwned. + static std::unique_ptr<StubInstallAttributes> CreateConsumerOwned(); + // Creates a StubInstallAttributes and calls SetCloudManaged. + static std::unique_ptr<StubInstallAttributes> CreateCloudManaged( + const std::string& domain, + const std::string& device_id); + // Creates a StubInstallAttributes and calls SetActiveDirectoryManaged. + static std::unique_ptr<StubInstallAttributes> CreateActiveDirectoryManaged( + const std::string& realm, + const std::string& device_id); + // Setup as not-yet enrolled. void Clear(); - // Setup as consumer owned device. (Clears existing configuration.) void SetConsumerOwned(); - // Setup as managed by Google cloud. (Clears existing configuration.) void SetCloudManaged(const std::string& domain, const std::string& device_id); - // Setup as managed by Active Directory server. (Clears existing // configuration.) void SetActiveDirectoryManaged(const std::string& realm, @@ -37,44 +48,26 @@ }; // Helper class to set install attributes in tests. Using one of the Create* -// methods injects the generated StubInstallAttributes into the next -// instantiation of BrowserPolicyConnectorChromeOS. Scoping ensures that the -// generated StubInstallAttributes are not leaked in case there is no -// instantiation of BrowserPolicyConnectorChromeOS. +// methods injects the generated StubInstallAttributes into the singleton +// at chromeos::InstallAttributes::Get(). Scoping ensures that +// chromes::InstallAttributes::Shutdown is called when this is destructed. class ScopedStubInstallAttributes { public: - // Setting |cleanup_| to false in the moved-from object ensures that the - // StubInstallAttributes are not deleted prematurely when the return value of - // a Create* method is move-assigned to the scoping variable. - ScopedStubInstallAttributes(ScopedStubInstallAttributes&& other) { - cleanup_ = other.cleanup_; - other.cleanup_ = false; - } + // Scopes the default StubInstallAttributes, with a DeviceMode of PENDING. + ScopedStubInstallAttributes(); + // Scopes the given StubInstallAttributes. + explicit ScopedStubInstallAttributes( + std::unique_ptr<StubInstallAttributes> install_attributes); ~ScopedStubInstallAttributes(); - // Factory for empty (unset) ScopedStubInstallAttributes. - static ScopedStubInstallAttributes CreateUnset(); - - // Factory for consumer-type ScopedStubInstallAttributes. - static ScopedStubInstallAttributes CreateConsumerOwned(); - - // Factory for cloud managed ScopedStubInstallAttributes. - static ScopedStubInstallAttributes CreateCloudManaged( - const std::string& domain, - const std::string& device_id); - - // Factory for Active Directory managed ScopedStubInstallAttributes. - static ScopedStubInstallAttributes CreateActiveDirectoryManaged( - const std::string& realm, - const std::string& device_id); + // Get the StubInstallAttributes that have been installed for modification. + StubInstallAttributes* Get(); private: - ScopedStubInstallAttributes() = default; - - // Whether the destructor should call into BrowserPolicyConnectorChromeOS to - // delete the StubInstallAttributes. - bool cleanup_ = true; + // The InstallAttributes that are currently installed and that this + // ScopedStubInstallAttributes is responsible for shutting down. + std::unique_ptr<StubInstallAttributes> install_attributes_; DISALLOW_COPY_AND_ASSIGN(ScopedStubInstallAttributes); };
diff --git a/chrome/browser/chromeos/system/device_disabling_manager_unittest.cc b/chrome/browser/chromeos/system/device_disabling_manager_unittest.cc index e0b75fd..d481e55 100644 --- a/chrome/browser/chromeos/system/device_disabling_manager_unittest.cc +++ b/chrome/browser/chromeos/system/device_disabling_manager_unittest.cc
@@ -17,7 +17,7 @@ #include "chrome/browser/chromeos/policy/device_policy_builder.h" #include "chrome/browser/chromeos/policy/server_backed_device_state.h" #include "chrome/browser/chromeos/settings/device_settings_service.h" -#include "chrome/browser/chromeos/settings/stub_install_attributes.h" +#include "chrome/browser/chromeos/settings/scoped_cros_settings_test_helper.h" #include "chrome/common/pref_names.h" #include "chrome/test/base/testing_browser_process.h" #include "chromeos/chromeos_switches.h" @@ -74,12 +74,8 @@ void SetConsumerOwned(); private: - chromeos::StubInstallAttributes* GetInstallAttributes(); - content::TestBrowserThreadBundle thread_bundle_; - chromeos::ScopedStubInstallAttributes install_attributes_; - chromeos::ScopedTestDeviceSettingsService test_device_settings_service_; - chromeos::ScopedTestCrosSettings test_cros_settings_; + chromeos::ScopedCrosSettingsTestHelper cros_settings_test_helper_; chromeos::FakeChromeUserManager fake_user_manager_; std::unique_ptr<DeviceDisablingManager> device_disabling_manager_; FakeStatisticsProvider statistics_provider_; @@ -87,8 +83,7 @@ DISALLOW_COPY_AND_ASSIGN(DeviceDisablingManagerTestBase); }; -DeviceDisablingManagerTestBase::DeviceDisablingManagerTestBase() - : install_attributes_(ScopedStubInstallAttributes::CreateUnset()) { +DeviceDisablingManagerTestBase::DeviceDisablingManagerTestBase() { system::StatisticsProvider::SetTestProvider(&statistics_provider_); } @@ -113,24 +108,16 @@ } void DeviceDisablingManagerTestBase::SetUnowned() { - GetInstallAttributes()->Clear(); + cros_settings_test_helper_.InstallAttributes()->Clear(); } void DeviceDisablingManagerTestBase::SetEnterpriseOwned() { - GetInstallAttributes()->SetCloudManaged(kEnrollmentDomain, "fake-id"); + cros_settings_test_helper_.InstallAttributes()->SetCloudManaged( + kEnrollmentDomain, "fake-id"); } void DeviceDisablingManagerTestBase::SetConsumerOwned() { - GetInstallAttributes()->SetConsumerOwned(); -} - -chromeos::StubInstallAttributes* -DeviceDisablingManagerTestBase::GetInstallAttributes() { - return static_cast<chromeos::StubInstallAttributes*>( - TestingBrowserProcess::GetGlobal() - ->platform_part() - ->browser_policy_connector_chromeos() - ->GetInstallAttributes()); + cros_settings_test_helper_.InstallAttributes()->SetConsumerOwned(); } // Base class for tests that verify device disabling behavior during OOBE, when @@ -251,6 +238,7 @@ // as disabled, device disabling is not turned off by flag and the device is not // owned yet. TEST_F(DeviceDisablingManagerOOBETest, ShowWhenDisabledAndNotOwned) { + SetUnowned(); SetDeviceDisabled(true); CheckWhetherDeviceDisabledDuringOOBE(); EXPECT_TRUE(device_disabled());
diff --git a/chrome/browser/chromeos/tpm_firmware_update_unittest.cc b/chrome/browser/chromeos/tpm_firmware_update_unittest.cc index 7df3453b..18bb708 100644 --- a/chrome/browser/chromeos/tpm_firmware_update_unittest.cc +++ b/chrome/browser/chromeos/tpm_firmware_update_unittest.cc
@@ -94,6 +94,7 @@ std::unique_ptr<base::ScopedPathOverride> path_override_; base::test::ScopedTaskEnvironment scoped_task_environment_{ base::test::ScopedTaskEnvironment::MainThreadType::MOCK_TIME}; + ScopedCrosSettingsTestHelper cros_settings_test_helper_; chromeos::system::ScopedFakeStatisticsProvider statistics_provider_; const std::set<Mode> kAllModes{Mode::kPowerwash, Mode::kPreserveDeviceState}; @@ -180,6 +181,8 @@ void SetUp() override { TPMFirmwareUpdateModesTest::SetUp(); cros_settings_test_helper_.ReplaceProvider(kTPMFirmwareUpdateSettings); + cros_settings_test_helper_.InstallAttributes()->SetCloudManaged( + "example.com", "fake-device-id"); } void SetPolicy(const std::set<Mode>& modes) { @@ -190,11 +193,6 @@ base::Value(modes.count(Mode::kPreserveDeviceState) > 0)); cros_settings_test_helper_.Set(kTPMFirmwareUpdateSettings, dict); } - - ScopedStubInstallAttributes install_attributes_ = - ScopedStubInstallAttributes::CreateCloudManaged("example.com", - "fake-device-id"); - ScopedCrosSettingsTestHelper cros_settings_test_helper_; }; TEST_F(TPMFirmwareUpdateModesEnterpriseTest, DeviceSettingPending) {
diff --git a/chrome/browser/component_updater/cros_component_installer_chromeos.cc b/chrome/browser/component_updater/cros_component_installer_chromeos.cc index 157c709..05c69d4 100644 --- a/chrome/browser/component_updater/cros_component_installer_chromeos.cc +++ b/chrome/browser/component_updater/cros_component_installer_chromeos.cc
@@ -320,7 +320,8 @@ // Check whether an installed component was found during registration, and // determine whether OnDemandUpdater should be started accordingly. const bool is_compatible = IsCompatible(name); - if (is_compatible && update_policy != UpdatePolicy::kForce) { + if (update_policy == UpdatePolicy::kSkip || + (is_compatible && update_policy != UpdatePolicy::kForce)) { base::ThreadTaskRunnerHandle::Get()->PostTask( FROM_HERE, base::BindOnce(std::move(install_callback), update_client::Error::NONE));
diff --git a/chrome/browser/component_updater/cros_component_installer_chromeos.h b/chrome/browser/component_updater/cros_component_installer_chromeos.h index 03eb4e1..ece47580 100644 --- a/chrome/browser/component_updater/cros_component_installer_chromeos.h +++ b/chrome/browser/component_updater/cros_component_installer_chromeos.h
@@ -98,6 +98,9 @@ kForce, // Do not update if a compatible component is installed. kDontForce, + // Do not run updater, even if a compatible component is not installed at + // the moment. + kSkip }; class Delegate {
diff --git a/chrome/browser/conflicts/module_blacklist_cache_updater_win.cc b/chrome/browser/conflicts/module_blacklist_cache_updater_win.cc index 90503a0..8b5a795 100644 --- a/chrome/browser/conflicts/module_blacklist_cache_updater_win.cc +++ b/chrome/browser/conflicts/module_blacklist_cache_updater_win.cc
@@ -36,6 +36,9 @@ namespace { +using ModuleBlockingDecision = + ModuleBlacklistCacheUpdater::ModuleBlockingDecision; + // The maximum number of modules allowed in the cache. This keeps the cache // from growing indefinitely. // Note: This value is tied to the "ModuleBlacklistCache.ModuleCount" histogram. @@ -123,28 +126,51 @@ return result; } -// Inserts a module into |modules|. Also does the type conversion. -void InsertPackedListModule( - ModuleInfoKey module_key, - std::vector<third_party_dlls::PackedListModule>* modules) { - DCHECK(modules); - - // Do the insertion. - modules->emplace_back(); - third_party_dlls::PackedListModule& module = modules->back(); - +// Populates a third_party_dlls::PackedListModule entry from a ModuleInfoKey. +void PopulatePackedListModule( + const ModuleInfoKey& module_key, + third_party_dlls::PackedListModule* packed_list_module) { // Hash the basename. const std::string module_basename = base::UTF16ToUTF8( base::i18n::ToLower(module_key.module_path.BaseName().value())); base::SHA1HashBytes(reinterpret_cast<const uint8_t*>(module_basename.data()), - module_basename.length(), module.basename_hash); + module_basename.length(), + packed_list_module->basename_hash); // Hash the code id. const std::string module_code_id = GenerateCodeId(module_key); base::SHA1HashBytes(reinterpret_cast<const uint8_t*>(module_code_id.data()), - module_code_id.length(), module.code_id_hash); + module_code_id.length(), + packed_list_module->code_id_hash); - module.time_date_stamp = CalculateTimeDateStamp(base::Time::Now()); + packed_list_module->time_date_stamp = + CalculateTimeDateStamp(base::Time::Now()); +} + +// Returns true if a ModuleBlockingDecision means that the module should be +// added to the blacklist cache. +bool ShouldInsertInBlacklistCache(ModuleBlockingDecision blocking_decision) { + switch (blocking_decision) { + case ModuleBlockingDecision::kUnknown: + break; + + // All of these are reasons that allow the module to be loaded. + case ModuleBlockingDecision::kAllowedIME: + case ModuleBlockingDecision::kAllowedSameCertificate: + case ModuleBlockingDecision::kAllowedSameDirectory: + case ModuleBlockingDecision::kAllowedMicrosoft: + case ModuleBlockingDecision::kAllowedWhitelisted: + case ModuleBlockingDecision::kTolerated: + return false; + + // The following are reasons for the module to be blocked. + case ModuleBlockingDecision::kDisallowedExplicit: + case ModuleBlockingDecision::kDisallowedImplicit: + return true; + } + + NOTREACHED() << static_cast<int>(blocking_decision); + return false; } } // namespace @@ -208,115 +234,55 @@ DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_); // The module id is always positive. - if (module_key.module_id + 1 > module_blocking_decisions_.size()) - module_blocking_decisions_.resize(module_key.module_id + 1); + if (module_key.module_id + 1 > module_blocking_state_.size()) + module_blocking_state_.resize(module_key.module_id + 1); - if (module_data.module_properties & ModuleInfoData::kPropertyBlocked) { - InsertPackedListModule(module_key, &blocked_modules_); + // Create a "packed list module" entry for this module. + third_party_dlls::PackedListModule packed_list_module; + PopulatePackedListModule(module_key, &packed_list_module); - module_blocking_decisions_[module_key.module_id] = - ModuleBlockingDecision::kBlocked; - return; - } - - // Only consider loaded modules. - if ((module_data.module_properties & ModuleInfoData::kPropertyLoadedModule) == - 0) { - module_blocking_decisions_[module_key.module_id] = - ModuleBlockingDecision::kNotLoaded; - return; - } - - // First check if this module is a part of Chrome. - - // Explicitly whitelist modules whose signing cert's Subject field matches the - // one in the current executable. No attempt is made to check the validity of - // module signatures or of signing certs. - if (exe_certificate_info_.type != CertificateType::NO_CERTIFICATE && - exe_certificate_info_.subject == - module_data.inspection_result->certificate_info.subject) { - module_blocking_decisions_[module_key.module_id] = - ModuleBlockingDecision::kAllowedSameCertificate; - return; - } - -// For developer builds only, whitelist modules in the same directory as the -// executable. -#if !defined(OFFICIAL_BUILD) - base::FilePath exe_path; - if (base::PathService::Get(base::DIR_EXE, &exe_path) && - exe_path.DirName().IsParent(module_key.module_path)) { - module_blocking_decisions_[module_key.module_id] = - ModuleBlockingDecision::kAllowedSameDirectory; - return; - } -#endif - - // Second, check if the module is seemingly signed by Microsoft. Again, no - // attempt is made to check the validity of the certificate. - if (IsMicrosoftModule( - module_data.inspection_result->certificate_info.subject)) { - module_blocking_decisions_[module_key.module_id] = - ModuleBlockingDecision::kAllowedMicrosoft; - return; - } - - // Skip modules whitelisted by the Module List component. - if (module_list_filter_->IsWhitelisted(module_key, module_data)) { - module_blocking_decisions_[module_key.module_id] = - ModuleBlockingDecision::kAllowedWhitelisted; - return; - } - - // It is preferable to mark a whitelisted IME as allowed because it is - // whitelisted, not because it's a shell extension. Thus, check for the module - // type after. Note that shell extensions are blocked. - if (module_data.module_properties & ModuleInfoData::kPropertyIme) { - module_blocking_decisions_[module_key.module_id] = - ModuleBlockingDecision::kAllowedIME; - return; - } - - // Some blacklisted modules are allowed to load. - std::unique_ptr<chrome::conflicts::BlacklistAction> blacklist_action = - module_list_filter_->IsBlacklisted(module_key, module_data); - if (blacklist_action && blacklist_action->allow_load()) { - module_blocking_decisions_[module_key.module_id] = - ModuleBlockingDecision::kTolerated; - return; - } - - // Now it has been determined that the module should be blocked. So make sure - // it gets added to the blacklist cache. - InsertPackedListModule(module_key, &newly_blacklisted_modules_); - - // Check if a blacklisted module was able to bypass the blocking. - if (std::binary_search(std::begin(initial_blacklisted_modules_), + // Determine if the module was in the initial blacklist cache. + auto& blocking_state = module_blocking_state_[module_key.module_id]; + blocking_state.was_in_blacklist_cache = + std::binary_search(std::begin(initial_blacklisted_modules_), std::end(initial_blacklisted_modules_), - newly_blacklisted_modules_.back(), - internal::ModuleLess())) { - module_blocking_decisions_[module_key.module_id] = - ModuleBlockingDecision::kBypassedBlocking; + packed_list_module, internal::ModuleLess()); - // Return here and don't notify the ModuleDatabase that the module was added - // to the blacklist so that it can trigger an incompatible applications - // warning. - return; - } + // Make note of the fact that the module was blocked. It could be that the + // module subsequently ends up being loaded, but an earlier load attempt was + // blocked (ie, the injector actively worked around the blocking logic). This + // is a one way switch so that it doesn't get reset if the module is analyzed + // a second time. + if (module_data.module_properties & ModuleInfoData::kPropertyBlocked) + blocking_state.was_blocked = true; - module_blocking_decisions_[module_key.module_id] = - ModuleBlockingDecision::kBlacklisted; + // Make note of the fact that the module was loaded. This is a one-way toggle + // for the same reasons as above. + if (module_data.module_properties & ModuleInfoData::kPropertyLoadedModule) + blocking_state.was_loaded = true; - // Signal the module database that this module will be added to the cache. - // Note that observers that care about this information should register to - // the Module Database's observer interface after the ModuleBlacklistCache - // instance. - // The Module Database can be null during tests. - auto* module_database = ModuleDatabase::GetInstance(); - if (module_database) { - module_database->OnModuleAddedToBlacklist( - module_key.module_path, module_key.module_size, - module_key.module_time_date_stamp); + // Determine the current blocking decision. This can change at runtime as the + // module list component changes so re-run this analysis every time through. + blocking_state.blocking_decision = + DetermineModuleBlockingDecision(module_key, module_data); + + if (blocking_state.was_blocked) + blocked_modules_.push_back(packed_list_module); + + if (ShouldInsertInBlacklistCache(blocking_state.blocking_decision)) { + newly_blacklisted_modules_.push_back(packed_list_module); + + // Signal the module database that this module will be added to the cache. + // Note that observers that care about this information should register to + // the Module Database's observer interface after the ModuleBlacklistCache + // instance. + // The Module Database can be null during tests. + auto* module_database = ModuleDatabase::GetInstance(); + if (module_database) { + module_database->OnModuleAddedToBlacklist( + module_key.module_path, module_key.module_size, + module_key.module_time_date_stamp); + } } } @@ -333,13 +299,14 @@ StartModuleBlacklistCacheUpdate(); } -ModuleBlacklistCacheUpdater::ModuleBlockingDecision -ModuleBlacklistCacheUpdater::GetModuleBlockingDecision( +const ModuleBlacklistCacheUpdater::ModuleBlockingState& +ModuleBlacklistCacheUpdater::GetModuleBlockingState( ModuleInfoKey module_key) const { - DCHECK(module_blocking_decisions_.size() > module_key.module_id); - DCHECK_NE(module_blocking_decisions_[module_key.module_id], + DCHECK_GT(module_blocking_state_.size(), + static_cast<size_t>(module_key.module_id)); + DCHECK_NE(module_blocking_state_[module_key.module_id].blocking_decision, ModuleBlockingDecision::kUnknown); - return module_blocking_decisions_[module_key.module_id]; + return module_blocking_state_[module_key.module_id]; } void ModuleBlacklistCacheUpdater::OnTimerExpired() { @@ -348,6 +315,85 @@ StartModuleBlacklistCacheUpdate(); } +ModuleBlacklistCacheUpdater::ModuleListState +ModuleBlacklistCacheUpdater::DetermineModuleListState( + const ModuleInfoKey& module_key, + const ModuleInfoData& module_data) { + DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_); + + if (module_list_filter_->IsWhitelisted(module_key, module_data)) + return ModuleListState::kWhitelisted; + std::unique_ptr<chrome::conflicts::BlacklistAction> blacklist_action = + module_list_filter_->IsBlacklisted(module_key, module_data); + if (!blacklist_action) + return ModuleListState::kUnlisted; + return blacklist_action->allow_load() ? ModuleListState::kTolerated + : ModuleListState::kBlacklisted; +} + +ModuleBlacklistCacheUpdater::ModuleBlockingDecision +ModuleBlacklistCacheUpdater::DetermineModuleBlockingDecision( + const ModuleInfoKey& module_key, + const ModuleInfoData& module_data) { + DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_); + + // First check if this module is a part of Chrome's installation. This can + // override explicit directions in the module list. This prevents us from + // shooting ourselves in the foot by accidentally issuing a blacklisting + // rule that blocks one of our own modules. + + // Explicitly whitelist modules whose signing cert's Subject field matches the + // one in the current executable. No attempt is made to check the validity of + // module signatures or of signing certs. + if (exe_certificate_info_.type != CertificateType::NO_CERTIFICATE && + exe_certificate_info_.subject == + module_data.inspection_result->certificate_info.subject) { + return ModuleBlockingDecision::kAllowedSameCertificate; + } + +#if !defined(OFFICIAL_BUILD) + // For developer builds only, whitelist modules in the same directory as the + // executable. + base::FilePath exe_path; + if (base::PathService::Get(base::DIR_EXE, &exe_path) && + exe_path.DirName().IsParent(module_key.module_path)) { + return ModuleBlockingDecision::kAllowedSameDirectory; + } +#endif + + // Get the state of the module with respect to the module list component. If + // there are explicit directions in the list then respect those. + switch (DetermineModuleListState(module_key, module_data)) { + case ModuleListState::kUnlisted: + break; + case ModuleListState::kWhitelisted: + return ModuleBlockingDecision::kAllowedWhitelisted; + case ModuleListState::kTolerated: + return ModuleBlockingDecision::kTolerated; + case ModuleListState::kBlacklisted: + return ModuleBlockingDecision::kDisallowedExplicit; + } + + // If the module isn't explicitly listed in the module list then it is either + // implicitly whitelisted or implicitly blacklisted by other policy. + + // Check if the module is seemingly signed by Microsoft. Again, no attempt is + // made to check the validity of the certificate. + if (IsMicrosoftModule( + module_data.inspection_result->certificate_info.subject)) { + return ModuleBlockingDecision::kAllowedMicrosoft; + } + + // It is preferable to mark a whitelisted IME as allowed because it is + // whitelisted, not because it's a shell extension. Thus, check for the module + // type after. Note that shell extensions are blocked. + if (module_data.module_properties & ModuleInfoData::kPropertyIme) + return ModuleBlockingDecision::kAllowedIME; + + // Getting here means that the module is implicitly blacklisted. + return ModuleBlockingDecision::kDisallowedImplicit; +} + void ModuleBlacklistCacheUpdater::StartModuleBlacklistCacheUpdate() { DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
diff --git a/chrome/browser/conflicts/module_blacklist_cache_updater_win.h b/chrome/browser/conflicts/module_blacklist_cache_updater_win.h index ad9c05d..97bf00e 100644 --- a/chrome/browser/conflicts/module_blacklist_cache_updater_win.h +++ b/chrome/browser/conflicts/module_blacklist_cache_updater_win.h
@@ -63,19 +63,27 @@ // blacklist. class ModuleBlacklistCacheUpdater : public ModuleDatabaseObserver { public: - // The decision that explains why a particular module was added to the - // blacklist or not. + // A decision that explains whether or not a module is to be blocked. This + // decision is made with respect to the logic in the currently running + // executable and the current version of the module list. It may not + // correspond with the blocking decisions that were enforced by the blocking + // logic in chrome_elf during early startup. Those decisions are cached from + // the previous browser launch which may be with respect to (a) an entirely + // different version of the browser and/or (b) an entirely different version + // of the module list. // // Note that this enum is very similar to the ModuleWarningDecision in // IncompatibleApplicationsUpdater. This is done so that it is easier to keep // the 2 features separate, as they can be independently enabled/disabled. - enum ModuleBlockingDecision { + enum class ModuleBlockingDecision { // Explicitly defined as zero so it is the default value when a // ModuleBlockingDecision variable is value-initialized // (std::vector::resize()). kUnknown = 0, - // A shell extension or IME that is not loaded in the process yet. - kNotLoaded, + + // Detailed reasons why modules will be allowed to load in subsequent + // startups. + // Input method editors are allowed. kAllowedIME, // Allowed because the certificate's subject of the module matches the @@ -90,18 +98,44 @@ kAllowedMicrosoft, // Explicitly whitelisted by the Module List component. kAllowedWhitelisted, + // New "allowed" reasons should be added here! + // Unwanted, but allowed to load by the Module List component. This is // usually because blocking the module would cause more stability issues // than allowing it. If the IncompatibleApplicationsWarning feature is - // enabled, this module may cause a warning, depending on if it can be tied - // back to an installed application. + // enabled, this module will cause a warning if it can be tied back to an + // installed application. kTolerated, - // Blacklisted and will be blocked next launch. - kBlacklisted, - // The module was blocked from loading into the process. - kBlocked, - // This module should have been blocked but wasn't. - kBypassedBlocking, + + // Detailed reasons why modules will not be allowed to load in subsequent + // startups. + + // The module will be blocked because it is explicitly listed in the module + // blacklist. + kDisallowedExplicit, + // The module will be implicitly blocked because it is not otherwise + // whitelisted. + kDisallowedImplicit, + // New "disallowed" reasons should be added here! + }; + + struct ModuleBlockingState { + // Whether or not the module was in the blacklist cache that existed at + // startup. + bool was_in_blacklist_cache; + + // Whether or not the module was ever actively blocked from loading during + // this session. + bool was_blocked; + + // Whether or not the module ever loaded during this session. Usually this + // means that the module is currently loaded, but it's possible for DLLs to + // subsequently be unloaded at runtime. + bool was_loaded; + + // The current blocking decision. This is synced to the cache and will be + // applied at the next startup. + ModuleBlockingDecision blocking_decision; }; struct CacheUpdateResult { @@ -149,12 +183,35 @@ void OnModuleDatabaseIdle() override; // Returns the blocking decision for a module. - ModuleBlockingDecision GetModuleBlockingDecision( + const ModuleBlockingState& GetModuleBlockingState( ModuleInfoKey module_key) const; private: + // The state of the module with respect to the ModuleList. + enum class ModuleListState { + // The module is not in the module list at all. + kUnlisted, + // The module is in the module list and is explicitly whitelisted. + kWhitelisted, + // The module is in the module list and "blacklisted", but loading is + // tolerated. + kTolerated, + // The module is explicitly blacklisted. + kBlacklisted, + }; + void OnTimerExpired(); + // Gets the state of a module with respect to the module list. + ModuleListState DetermineModuleListState(const ModuleInfoKey& module_key, + const ModuleInfoData& module_data); + + // Determines whether or not a module *should* be whitelisted or blacklisted + // on the next startup. Returns a ModuleBlockingDecision. + ModuleBlockingDecision DetermineModuleBlockingDecision( + const ModuleInfoKey& module_key, + const ModuleInfoData& module_data); + // Posts the task to update the cache on |background_sequence_|. void StartModuleBlacklistCacheUpdate(); @@ -185,9 +242,9 @@ // OnModuleDatabaseIdle() is never called again. base::OneShotTimer timer_; - // Holds the blocking decision for all known modules. The index is the module + // Holds the blocking state for all known modules. The index is the module // id. - std::vector<ModuleBlockingDecision> module_blocking_decisions_; + std::vector<ModuleBlockingState> module_blocking_state_; SEQUENCE_CHECKER(sequence_checker_);
diff --git a/chrome/browser/conflicts/module_blacklist_cache_updater_win_unittest.cc b/chrome/browser/conflicts/module_blacklist_cache_updater_win_unittest.cc index 9ed72f2..c3dfab2 100644 --- a/chrome/browser/conflicts/module_blacklist_cache_updater_win_unittest.cc +++ b/chrome/browser/conflicts/module_blacklist_cache_updater_win_unittest.cc
@@ -220,8 +220,9 @@ EXPECT_EQ(1u, blacklisted_modules.size()); ASSERT_EQ( - ModuleBlacklistCacheUpdater::ModuleBlockingDecision::kBlacklisted, - module_blacklist_cache_updater->GetModuleBlockingDecision(module_key)); + ModuleBlacklistCacheUpdater::ModuleBlockingDecision::kDisallowedImplicit, + module_blacklist_cache_updater->GetModuleBlockingState(module_key) + .blocking_decision); } TEST_F(ModuleBlacklistCacheUpdaterTest, IgnoreMicrosoftModules) { @@ -265,7 +266,8 @@ EXPECT_EQ(0u, blacklisted_modules.size()); ASSERT_EQ( ModuleBlacklistCacheUpdater::ModuleBlockingDecision::kAllowedMicrosoft, - module_blacklist_cache_updater->GetModuleBlockingDecision(module_key)); + module_blacklist_cache_updater->GetModuleBlockingState(module_key) + .blocking_decision); } // Tests that modules with a matching certificate subject are whitelisted. @@ -294,10 +296,10 @@ &blacklisted_modules, &md5_digest)); EXPECT_EQ(0u, blacklisted_modules.size()); - ASSERT_EQ( - ModuleBlacklistCacheUpdater::ModuleBlockingDecision:: - kAllowedSameCertificate, - module_blacklist_cache_updater->GetModuleBlockingDecision(module_key)); + ASSERT_EQ(ModuleBlacklistCacheUpdater::ModuleBlockingDecision:: + kAllowedSameCertificate, + module_blacklist_cache_updater->GetModuleBlockingState(module_key) + .blocking_decision); } // Make sure IMEs are allowed while shell extensions are blacklisted. @@ -335,12 +337,13 @@ // Make sure the only blacklisted module is the shell extension. ASSERT_EQ(1u, blacklisted_modules.size()); + ASSERT_EQ(ModuleBlacklistCacheUpdater::ModuleBlockingDecision::kAllowedIME, + module_blacklist_cache_updater->GetModuleBlockingState(module_key1) + .blocking_decision); ASSERT_EQ( - ModuleBlacklistCacheUpdater::ModuleBlockingDecision::kAllowedIME, - module_blacklist_cache_updater->GetModuleBlockingDecision(module_key1)); - ASSERT_EQ( - ModuleBlacklistCacheUpdater::ModuleBlockingDecision::kBlacklisted, - module_blacklist_cache_updater->GetModuleBlockingDecision(module_key2)); + ModuleBlacklistCacheUpdater::ModuleBlockingDecision::kDisallowedImplicit, + module_blacklist_cache_updater->GetModuleBlockingState(module_key2) + .blocking_decision); third_party_dlls::PackedListModule expected; const std::string module_basename = base::UTF16ToUTF8(
diff --git a/chrome/browser/devtools/devtools_auto_opener.cc b/chrome/browser/devtools/devtools_auto_opener.cc index af0bda1..d55387ba 100644 --- a/chrome/browser/devtools/devtools_auto_opener.cc +++ b/chrome/browser/devtools/devtools_auto_opener.cc
@@ -16,6 +16,7 @@ } void DevToolsAutoOpener::OnTabStripModelChanged( + TabStripModel* tab_strip_model, const TabStripModelChange& change, const TabStripSelectionChange& selection) { if (change.type() != TabStripModelChange::kInserted)
diff --git a/chrome/browser/devtools/devtools_auto_opener.h b/chrome/browser/devtools/devtools_auto_opener.h index ae5bb89..05a5246 100644 --- a/chrome/browser/devtools/devtools_auto_opener.h +++ b/chrome/browser/devtools/devtools_auto_opener.h
@@ -16,6 +16,7 @@ private: // TabStripModelObserver overrides. void OnTabStripModelChanged( + TabStripModel* tab_strip_model, const TabStripModelChange& change, const TabStripSelectionChange& selection) override;
diff --git a/chrome/browser/devtools/global_confirm_info_bar.cc b/chrome/browser/devtools/global_confirm_info_bar.cc index 1e1dc7f2..e262243 100644 --- a/chrome/browser/devtools/global_confirm_info_bar.cc +++ b/chrome/browser/devtools/global_confirm_info_bar.cc
@@ -178,6 +178,7 @@ } void GlobalConfirmInfoBar::OnTabStripModelChanged( + TabStripModel* tab_strip_model, const TabStripModelChange& change, const TabStripSelectionChange& selection) { if (change.type() != TabStripModelChange::kInserted)
diff --git a/chrome/browser/devtools/global_confirm_info_bar.h b/chrome/browser/devtools/global_confirm_info_bar.h index a91996d3..6410931d 100644 --- a/chrome/browser/devtools/global_confirm_info_bar.h +++ b/chrome/browser/devtools/global_confirm_info_bar.h
@@ -44,6 +44,7 @@ // TabStripModelObserver: void OnTabStripModelChanged( + TabStripModel* tab_strip_model, const TabStripModelChange& change, const TabStripSelectionChange& selection) override; void TabChangedAt(content::WebContents* web_contents,
diff --git a/chrome/browser/download/download_file_picker.cc b/chrome/browser/download/download_file_picker.cc index 8889bdf..8830056 100644 --- a/chrome/browser/download/download_file_picker.cc +++ b/chrome/browser/download/download_file_picker.cc
@@ -4,7 +4,6 @@ #include "chrome/browser/download/download_file_picker.h" -#include "base/metrics/histogram_macros.h" #include "chrome/browser/download/download_prefs.h" #include "chrome/browser/platform_util.h" #include "chrome/browser/ui/chrome_select_file_policy.h" @@ -18,49 +17,13 @@ using content::DownloadManager; using content::WebContents; -namespace { - -enum FilePickerResult { - FILE_PICKER_SAME, - FILE_PICKER_DIFFERENT_DIR, - FILE_PICKER_DIFFERENT_NAME, - FILE_PICKER_CANCEL, - FILE_PICKER_MAX, -}; - -// Record how the File Picker was used during a download. This UMA is only -// recorded for profiles that do not always prompt for save locations on -// downloads. -void RecordFilePickerResult(const base::FilePath& suggested_path, - const base::FilePath& actual_path) { - FilePickerResult result; - if (suggested_path == actual_path) - result = FILE_PICKER_SAME; - else if (actual_path.empty()) - result = FILE_PICKER_CANCEL; - else if (suggested_path.DirName() != actual_path.DirName()) - result = FILE_PICKER_DIFFERENT_DIR; - else - result = FILE_PICKER_DIFFERENT_NAME; - - UMA_HISTOGRAM_ENUMERATION("Download.FilePickerResult", - result, - FILE_PICKER_MAX); -} - -} // namespace - DownloadFilePicker::DownloadFilePicker(DownloadItem* item, const base::FilePath& suggested_path, const ConfirmationCallback& callback) - : suggested_path_(suggested_path), - file_selected_callback_(callback), - should_record_file_picker_result_(false) { + : suggested_path_(suggested_path), file_selected_callback_(callback) { const DownloadPrefs* prefs = DownloadPrefs::FromBrowserContext( content::DownloadItemUtils::GetBrowserContext(item)); DCHECK(prefs); - // Only record UMA if we aren't prompting the user for all downloads. - should_record_file_picker_result_ = !prefs->PromptForDownload(); WebContents* web_contents = content::DownloadItemUtils::GetWebContents(item); if (!web_contents || !web_contents->GetNativeView()) { @@ -112,8 +75,6 @@ } void DownloadFilePicker::OnFileSelected(const base::FilePath& path) { - if (should_record_file_picker_result_) - RecordFilePickerResult(suggested_path_, path); file_selected_callback_.Run(path.empty() ? DownloadConfirmationResult::CANCELED : DownloadConfirmationResult::CONFIRMED,
diff --git a/chrome/browser/download/download_file_picker.h b/chrome/browser/download/download_file_picker.h index 398f5aa..6fa783c 100644 --- a/chrome/browser/download/download_file_picker.h +++ b/chrome/browser/download/download_file_picker.h
@@ -63,10 +63,6 @@ // For managing select file dialogs. scoped_refptr<ui::SelectFileDialog> select_file_dialog_; - // True if UMA regarding on the result of the file selection should be - // recorded. - bool should_record_file_picker_result_; - DISALLOW_COPY_AND_ASSIGN(DownloadFilePicker); };
diff --git a/chrome/browser/download/download_stats.cc b/chrome/browser/download/download_stats.cc index 5c9a15b..80785020 100644 --- a/chrome/browser/download/download_stats.cc +++ b/chrome/browser/download/download_stats.cc
@@ -6,21 +6,6 @@ #include "base/metrics/histogram_macros.h" -void RecordDownloadShelfClose(int size, int in_progress, bool autoclose) { - static const int kMaxShelfSize = 16; - if (autoclose) { - UMA_HISTOGRAM_ENUMERATION( - "Download.ShelfSizeOnAutoClose", size, kMaxShelfSize); - UMA_HISTOGRAM_ENUMERATION( - "Download.ShelfInProgressSizeOnAutoClose", in_progress, kMaxShelfSize); - } else { - UMA_HISTOGRAM_ENUMERATION( - "Download.ShelfSizeOnUserClose", size, kMaxShelfSize); - UMA_HISTOGRAM_ENUMERATION( - "Download.ShelfInProgressSizeOnUserClose", in_progress, kMaxShelfSize); - } -} - void RecordDownloadCount(ChromeDownloadCountTypes type) { UMA_HISTOGRAM_ENUMERATION( "Download.CountsChrome", type, CHROME_DOWNLOAD_COUNT_TYPES_LAST_ENTRY);
diff --git a/chrome/browser/download/download_stats.h b/chrome/browser/download/download_stats.h index 1c422ebe..925c547 100644 --- a/chrome/browser/download/download_stats.h +++ b/chrome/browser/download/download_stats.h
@@ -8,11 +8,6 @@ #include "chrome/browser/download/download_path_reservation_tracker.h" #include "components/download/public/common/download_danger_type.h" -// Record the total number of items and the number of in-progress items showing -// in the shelf when it closes. Set |autoclose| to true when the shelf is -// closing itself, false when the user explicitly closed it. -void RecordDownloadShelfClose(int size, int in_progress, bool autoclose); - // Used for counting UMA stats. Similar to content's // download_stats::DownloadCountTypes but from the chrome layer. enum ChromeDownloadCountTypes {
diff --git a/chrome/browser/extensions/DEPS b/chrome/browser/extensions/DEPS index 2ca2617..f5c35287 100644 --- a/chrome/browser/extensions/DEPS +++ b/chrome/browser/extensions/DEPS
@@ -13,8 +13,25 @@ # For access to testing command line switches. "+ppapi/shared_impl", + + # The extensions system should not depend on Chrome Platform Apps (or any + # other component of the apps system). + # https://crbug.com/873872. + "-chrome/browser/apps/", ] specific_include_rules = { + "extension_system_impl\.cc": [ + # TODO(https://crbug.com/873872): Remove this. + "+chrome/browser/apps/platform_apps/browser_context_keyed_service_factories.h", + ], + + ".*test(_chromeos)?\.(cc|h)$": [ + # For now, tests are allowed to depend on app_browsertest_util.h, since + # that's where PlatformAppBrowserTest is defined. Ideally, we'd eventually + # move all Platform App-specific tests to chrome/browser/apps/platform_apps. + "+chrome/browser/apps/platform_apps/app_browsertest_util.h", + ], + "extension_protocols_unittest\.cc": [ "+services/network/test", ],
diff --git a/chrome/browser/extensions/activity_log/counting_policy_unittest.cc b/chrome/browser/extensions/activity_log/counting_policy_unittest.cc index 2c6e01e6..e353d11 100644 --- a/chrome/browser/extensions/activity_log/counting_policy_unittest.cc +++ b/chrome/browser/extensions/activity_log/counting_policy_unittest.cc
@@ -38,8 +38,7 @@ #if defined(OS_CHROMEOS) #include "chrome/browser/chromeos/login/users/scoped_test_user_manager.h" -#include "chrome/browser/chromeos/settings/cros_settings.h" -#include "chrome/browser/chromeos/settings/device_settings_service.h" +#include "chrome/browser/chromeos/settings/scoped_cros_settings_test_helper.h" #endif namespace extensions { @@ -385,8 +384,7 @@ content::TestBrowserThreadBundle thread_bundle_; #if defined OS_CHROMEOS - chromeos::ScopedTestDeviceSettingsService test_device_settings_service_; - chromeos::ScopedTestCrosSettings test_cros_settings_; + chromeos::ScopedCrosSettingsTestHelper cros_settings_test_helper_; std::unique_ptr<chromeos::ScopedTestUserManager> test_user_manager_; #endif };
diff --git a/chrome/browser/extensions/activity_log/fullstream_ui_policy_unittest.cc b/chrome/browser/extensions/activity_log/fullstream_ui_policy_unittest.cc index efbfadc..4150fc36 100644 --- a/chrome/browser/extensions/activity_log/fullstream_ui_policy_unittest.cc +++ b/chrome/browser/extensions/activity_log/fullstream_ui_policy_unittest.cc
@@ -35,8 +35,7 @@ #if defined(OS_CHROMEOS) #include "chrome/browser/chromeos/login/users/scoped_test_user_manager.h" -#include "chrome/browser/chromeos/settings/cros_settings.h" -#include "chrome/browser/chromeos/settings/device_settings_service.h" +#include "chrome/browser/chromeos/settings/scoped_cros_settings_test_helper.h" #endif namespace extensions { @@ -327,8 +326,7 @@ content::TestBrowserThreadBundle thread_bundle_; #if defined OS_CHROMEOS - chromeos::ScopedTestDeviceSettingsService test_device_settings_service_; - chromeos::ScopedTestCrosSettings test_cros_settings_; + chromeos::ScopedCrosSettingsTestHelper cros_settings_test_helper_; std::unique_ptr<chromeos::ScopedTestUserManager> test_user_manager_; #endif };
diff --git a/chrome/browser/extensions/api/DEPS b/chrome/browser/extensions/api/DEPS index d7be18a5..5d03455 100644 --- a/chrome/browser/extensions/api/DEPS +++ b/chrome/browser/extensions/api/DEPS
@@ -1,6 +1,5 @@ include_rules = [ "+apps", - "+chrome/browser/apps", "+components/about_handler", "+components/guest_view/common", "+components/language/core/browser",
diff --git a/chrome/browser/extensions/api/developer_private/DEPS b/chrome/browser/extensions/api/developer_private/DEPS index 5ad83b6..5b9436c 100644 --- a/chrome/browser/extensions/api/developer_private/DEPS +++ b/chrome/browser/extensions/api/developer_private/DEPS
@@ -1,4 +1,8 @@ specific_include_rules = { + "show_permissions_dialog_helper.cc": [ + #TODO(https://crbug.com/873872): Remove this. + "+chrome/browser/apps/platform_apps/app_load_service.h", + ], "developer_private_api_unittest.cc": [ # Allow the unittest to create a data_decoder service. "+services/data_decoder"
diff --git a/chrome/browser/extensions/api/downloads/downloads_api.cc b/chrome/browser/extensions/api/downloads/downloads_api.cc index 1205f08..9ad91ec 100644 --- a/chrome/browser/extensions/api/downloads/downloads_api.cc +++ b/chrome/browser/extensions/api/downloads/downloads_api.cc
@@ -642,12 +642,7 @@ download_item->SetUserData(kKey, base::WrapUnique(this)); } - ~ExtensionDownloadsEventRouterData() override { - if (updated_ > 0) { - UMA_HISTOGRAM_PERCENTAGE("Download.OnChanged", - (changed_fired_ * 100 / updated_)); - } - } + ~ExtensionDownloadsEventRouterData() override = default; void set_is_download_completed(bool is_download_completed) { is_download_completed_ = is_download_completed;
diff --git a/chrome/browser/extensions/api/enterprise_device_attributes/enterprise_device_attributes_apitest.cc b/chrome/browser/extensions/api/enterprise_device_attributes/enterprise_device_attributes_apitest.cc index 916c086..20b08efdfd 100644 --- a/chrome/browser/extensions/api/enterprise_device_attributes/enterprise_device_attributes_apitest.cc +++ b/chrome/browser/extensions/api/enterprise_device_attributes/enterprise_device_attributes_apitest.cc
@@ -131,14 +131,6 @@ nullptr /* fake_auth_policy_client */, affiliated_account_id_, user_affiliation_ids); - // Set up fake install attributes. - std::unique_ptr<chromeos::StubInstallAttributes> attributes = - std::make_unique<chromeos::StubInstallAttributes>(); - - attributes->SetCloudManaged("fake-domain", "fake-id"); - policy::BrowserPolicyConnectorChromeOS::SetInstallAttributesForTesting( - attributes.release()); - test_helper_.InstallOwnerKey(); // Init the device policy. policy::DevicePolicyBuilder* device_policy = test_helper_.device_policy(); @@ -230,6 +222,9 @@ kAffiliatedUserGaiaId); private: + chromeos::ScopedStubInstallAttributes test_install_attributes_{ + chromeos::StubInstallAttributes::CreateCloudManaged("fake-domain", + "fake-id")}; policy::MockConfigurationPolicyProvider policy_provider_; policy::DevicePolicyCrosTestHelper test_helper_; chromeos::system::ScopedFakeStatisticsProvider fake_statistics_provider_;
diff --git a/chrome/browser/extensions/api/enterprise_platform_keys/enterprise_platform_keys_api_unittest.cc b/chrome/browser/extensions/api/enterprise_platform_keys/enterprise_platform_keys_api_unittest.cc index 6022dfc..30be624 100644 --- a/chrome/browser/extensions/api/enterprise_platform_keys/enterprise_platform_keys_api_unittest.cc +++ b/chrome/browser/extensions/api/enterprise_platform_keys/enterprise_platform_keys_api_unittest.cc
@@ -13,6 +13,7 @@ #include "base/threading/thread_task_runner_handle.h" #include "base/values.h" #include "chrome/browser/chromeos/login/users/fake_chrome_user_manager.h" +#include "chrome/browser/chromeos/settings/cros_settings.h" #include "chrome/browser/chromeos/settings/scoped_cros_settings_test_helper.h" #include "chrome/browser/chromeos/settings/stub_install_attributes.h" #include "chrome/browser/extensions/extension_function_test_utils.h"
diff --git a/chrome/browser/extensions/api/enterprise_platform_keys_private/enterprise_platform_keys_private_api_unittest.cc b/chrome/browser/extensions/api/enterprise_platform_keys_private/enterprise_platform_keys_private_api_unittest.cc index 2ff23cd..62671ff 100644 --- a/chrome/browser/extensions/api/enterprise_platform_keys_private/enterprise_platform_keys_private_api_unittest.cc +++ b/chrome/browser/extensions/api/enterprise_platform_keys_private/enterprise_platform_keys_private_api_unittest.cc
@@ -14,6 +14,7 @@ #include "base/values.h" #include "chrome/browser/chromeos/login/users/fake_chrome_user_manager.h" #include "chrome/browser/chromeos/profiles/profile_helper.h" +#include "chrome/browser/chromeos/settings/cros_settings.h" #include "chrome/browser/chromeos/settings/scoped_cros_settings_test_helper.h" #include "chrome/browser/chromeos/settings/stub_install_attributes.h" #include "chrome/browser/extensions/extension_function_test_utils.h"
diff --git a/chrome/browser/extensions/api/identity/identity_apitest.cc b/chrome/browser/extensions/api/identity/identity_apitest.cc index 70d0771..c196fc13 100644 --- a/chrome/browser/extensions/api/identity/identity_apitest.cc +++ b/chrome/browser/extensions/api/identity/identity_apitest.cc
@@ -1937,21 +1937,13 @@ protected: void SetUpInProcessBrowserTestFixture() override { - GetAuthTokenFunctionTest::SetUpInProcessBrowserTestFixture(); + GetAuthTokenFunctionTest::SetUpInProcessBrowserTestFixture(); - // Set up the user manager to fake a public session. - EXPECT_CALL(*user_manager_, IsLoggedInAsKioskApp()) - .WillRepeatedly(Return(false)); - EXPECT_CALL(*user_manager_, IsLoggedInAsPublicAccount()) - .WillRepeatedly(Return(true)); - - // Set up fake install attributes to make the device appeared as - // enterprise-managed. - std::unique_ptr<chromeos::StubInstallAttributes> attributes = - std::make_unique<chromeos::StubInstallAttributes>(); - attributes->SetCloudManaged("example.com", "fake-id"); - policy::BrowserPolicyConnectorChromeOS::SetInstallAttributesForTesting( - attributes.release()); + // Set up the user manager to fake a public session. + EXPECT_CALL(*user_manager_, IsLoggedInAsKioskApp()) + .WillRepeatedly(Return(false)); + EXPECT_CALL(*user_manager_, IsLoggedInAsPublicAccount()) + .WillRepeatedly(Return(true)); } scoped_refptr<Extension> CreateTestExtension(const std::string& id) { @@ -1965,6 +1957,12 @@ .Build(); } + // Set up fake install attributes to make the device appeared as + // enterprise-managed. + chromeos::ScopedStubInstallAttributes test_install_attributes_{ + chromeos::StubInstallAttributes::CreateCloudManaged("example.com", + "fake-id")}; + // Owned by |user_manager_enabler|. chromeos::MockUserManager* user_manager_; };
diff --git a/chrome/browser/extensions/api/tabs/tabs_event_router.cc b/chrome/browser/extensions/api/tabs/tabs_event_router.cc index 43d4ab7..a2c3f3a 100644 --- a/chrome/browser/extensions/api/tabs/tabs_event_router.cc +++ b/chrome/browser/extensions/api/tabs/tabs_event_router.cc
@@ -63,6 +63,23 @@ return true; } +bool WillDispatchTabCreatedEvent(WebContents* contents, + bool active, + content::BrowserContext* context, + const Extension* extension, + Event* event, + const base::DictionaryValue* listener_filter) { + event->event_args->Clear(); + std::unique_ptr<base::DictionaryValue> tab_value = + ExtensionTabUtil::CreateTabObject(contents, ExtensionTabUtil::kScrubTab, + extension) + ->ToValue(); + tab_value->SetBoolean(tabs_constants::kSelectedKey, active); + tab_value->SetBoolean(tabs_constants::kActiveKey, active); + event->event_args->Append(std::move(tab_value)); + return true; +} + } // namespace TabsEventRouter::TabEntry::TabEntry(TabsEventRouter* router, @@ -155,28 +172,6 @@ ExtensionTabUtil::BrowserSupportsTabs(browser); } -void TabsEventRouter::RegisterForTabNotifications(WebContents* contents) { - favicon_scoped_observer_.Add( - favicon::ContentFaviconDriver::FromWebContents(contents)); - - ZoomController::FromWebContents(contents)->AddObserver(this); - - int tab_id = ExtensionTabUtil::GetTabId(contents); - DCHECK(tab_entries_.find(tab_id) == tab_entries_.end()); - tab_entries_[tab_id] = std::make_unique<TabEntry>(this, contents); -} - -void TabsEventRouter::UnregisterForTabNotifications(WebContents* contents) { - favicon_scoped_observer_.Remove( - favicon::ContentFaviconDriver::FromWebContents(contents)); - - ZoomController::FromWebContents(contents)->RemoveObserver(this); - - int tab_id = ExtensionTabUtil::GetTabId(contents); - int removed_count = tab_entries_.erase(tab_id); - DCHECK_GT(removed_count, 0); -} - void TabsEventRouter::OnBrowserSetLastActive(Browser* browser) { TabsWindowsAPI* tabs_window_api = TabsWindowsAPI::Get(profile_); if (tabs_window_api) { @@ -185,44 +180,135 @@ } } -static bool WillDispatchTabCreatedEvent( - WebContents* contents, - bool active, - content::BrowserContext* context, - const Extension* extension, - Event* event, - const base::DictionaryValue* listener_filter) { - event->event_args->Clear(); - std::unique_ptr<base::DictionaryValue> tab_value = - ExtensionTabUtil::CreateTabObject(contents, ExtensionTabUtil::kScrubTab, - extension) - ->ToValue(); - tab_value->SetBoolean(tabs_constants::kSelectedKey, active); - tab_value->SetBoolean(tabs_constants::kActiveKey, active); - event->event_args->Append(std::move(tab_value)); - return true; +void TabsEventRouter::OnTabStripModelChanged( + TabStripModel* tab_strip_model, + const TabStripModelChange& change, + const TabStripSelectionChange& selection) { + switch (change.type()) { + case TabStripModelChange::kInserted: { + for (const auto& delta : change.deltas()) { + DispatchTabInsertedAt(tab_strip_model, delta.insert.contents, + delta.insert.index, + selection.new_contents == delta.insert.contents); + } + break; + } + case TabStripModelChange::kRemoved: { + for (const auto& delta : change.deltas()) { + if (delta.remove.will_be_deleted) + DispatchTabClosingAt(tab_strip_model, delta.remove.contents, + delta.remove.index); + + DispatchTabDetachedAt(delta.remove.contents, delta.remove.index, + selection.old_contents == delta.remove.contents); + } + break; + } + case TabStripModelChange::kMoved: { + for (const auto& delta : change.deltas()) { + DispatchTabMoved(delta.move.contents, delta.move.from_index, + delta.move.to_index); + } + break; + } + case TabStripModelChange::kReplaced: { + for (const auto& delta : change.deltas()) { + DispatchTabReplacedAt(delta.replace.old_contents, + delta.replace.new_contents, delta.replace.index); + } + break; + } + case TabStripModelChange::kSelectionOnly: + break; + } + + if (tab_strip_model->empty()) + return; + + if (selection.active_tab_changed()) { + DispatchActiveTabChanged(selection.old_contents, selection.new_contents, + selection.new_model.active(), selection.reason); + } + + if (selection.selection_changed()) { + DispatchTabSelectionChanged(tab_strip_model, selection.old_model); + } } -void TabsEventRouter::TabCreatedAt(WebContents* contents, +void TabsEventRouter::TabChangedAt(WebContents* contents, int index, - bool active) { - Profile* profile = Profile::FromBrowserContext(contents->GetBrowserContext()); - std::unique_ptr<base::ListValue> args(new base::ListValue); - auto event = std::make_unique<Event>(events::TABS_ON_CREATED, - api::tabs::OnCreated::kEventName, - std::move(args), profile); - event->user_gesture = EventRouter::USER_GESTURE_NOT_ENABLED; - event->will_dispatch_callback = - base::Bind(&WillDispatchTabCreatedEvent, contents, active); - EventRouter::Get(profile)->BroadcastEvent(std::move(event)); - - RegisterForTabNotifications(contents); + TabChangeType change_type) { + TabEntry* entry = GetTabEntry(contents); + // TabClosingAt() may have already removed the entry for |contents| even + // though the tab has not yet been detached. + if (entry) + TabUpdated(entry, entry->UpdateLoadState()); } -void TabsEventRouter::TabInsertedAt(TabStripModel* tab_strip_model, - WebContents* contents, - int index, - bool active) { +void TabsEventRouter::TabPinnedStateChanged(TabStripModel* tab_strip_model, + WebContents* contents, + int index) { + std::set<std::string> changed_property_names; + changed_property_names.insert(tabs_constants::kPinnedKey); + DispatchTabUpdatedEvent(contents, std::move(changed_property_names)); +} + +void TabsEventRouter::OnZoomChanged( + const ZoomController::ZoomChangedEventData& data) { + DCHECK(data.web_contents); + int tab_id = ExtensionTabUtil::GetTabId(data.web_contents); + if (tab_id < 0) + return; + + // Prepare the zoom change information. + api::tabs::OnZoomChange::ZoomChangeInfo zoom_change_info; + zoom_change_info.tab_id = tab_id; + zoom_change_info.old_zoom_factor = + content::ZoomLevelToZoomFactor(data.old_zoom_level); + zoom_change_info.new_zoom_factor = + content::ZoomLevelToZoomFactor(data.new_zoom_level); + ZoomModeToZoomSettings(data.zoom_mode, &zoom_change_info.zoom_settings); + + // Dispatch the |onZoomChange| event. + Profile* profile = + Profile::FromBrowserContext(data.web_contents->GetBrowserContext()); + DispatchEvent(profile, events::TABS_ON_ZOOM_CHANGE, + api::tabs::OnZoomChange::kEventName, + api::tabs::OnZoomChange::Create(zoom_change_info), + EventRouter::USER_GESTURE_UNKNOWN); +} + +void TabsEventRouter::OnFaviconUpdated( + favicon::FaviconDriver* favicon_driver, + NotificationIconType notification_icon_type, + const GURL& icon_url, + bool icon_url_changed, + const gfx::Image& image) { + if (notification_icon_type == NON_TOUCH_16_DIP && icon_url_changed) { + favicon::ContentFaviconDriver* content_favicon_driver = + static_cast<favicon::ContentFaviconDriver*>(favicon_driver); + FaviconUrlUpdated(content_favicon_driver->web_contents()); + } +} + +void TabsEventRouter::OnDiscardedStateChange(WebContents* contents, + bool is_discarded) { + std::set<std::string> changed_property_names; + changed_property_names.insert(tabs_constants::kDiscardedKey); + DispatchTabUpdatedEvent(contents, std::move(changed_property_names)); +} + +void TabsEventRouter::OnAutoDiscardableStateChange(WebContents* contents, + bool is_auto_discardable) { + std::set<std::string> changed_property_names; + changed_property_names.insert(tabs_constants::kAutoDiscardableKey); + DispatchTabUpdatedEvent(contents, std::move(changed_property_names)); +} + +void TabsEventRouter::DispatchTabInsertedAt(TabStripModel* tab_strip_model, + WebContents* contents, + int index, + bool active) { if (!GetTabEntry(contents)) { // We've never seen this tab, send create event as long as we're not in the // constructor. @@ -252,9 +338,33 @@ EventRouter::USER_GESTURE_UNKNOWN); } -void TabsEventRouter::TabDetachedAt(WebContents* contents, - int index, - bool was_active) { +void TabsEventRouter::DispatchTabClosingAt(TabStripModel* tab_strip_model, + WebContents* contents, + int index) { + int tab_id = ExtensionTabUtil::GetTabId(contents); + + std::unique_ptr<base::ListValue> args(new base::ListValue); + args->AppendInteger(tab_id); + + std::unique_ptr<base::DictionaryValue> object_args( + new base::DictionaryValue()); + object_args->SetInteger(tabs_constants::kWindowIdKey, + ExtensionTabUtil::GetWindowIdOfTab(contents)); + object_args->SetBoolean(tabs_constants::kWindowClosing, + tab_strip_model->closing_all()); + args->Append(std::move(object_args)); + + Profile* profile = Profile::FromBrowserContext(contents->GetBrowserContext()); + DispatchEvent(profile, events::TABS_ON_REMOVED, + api::tabs::OnRemoved::kEventName, std::move(args), + EventRouter::USER_GESTURE_UNKNOWN); + + UnregisterForTabNotifications(contents); +} + +void TabsEventRouter::DispatchTabDetachedAt(WebContents* contents, + int index, + bool was_active) { if (!GetTabEntry(contents)) { // The tab was removed. Don't send detach event. return; @@ -278,34 +388,10 @@ EventRouter::USER_GESTURE_UNKNOWN); } -void TabsEventRouter::TabClosingAt(TabStripModel* tab_strip_model, - WebContents* contents, - int index) { - int tab_id = ExtensionTabUtil::GetTabId(contents); - - std::unique_ptr<base::ListValue> args(new base::ListValue); - args->AppendInteger(tab_id); - - std::unique_ptr<base::DictionaryValue> object_args( - new base::DictionaryValue()); - object_args->SetInteger(tabs_constants::kWindowIdKey, - ExtensionTabUtil::GetWindowIdOfTab(contents)); - object_args->SetBoolean(tabs_constants::kWindowClosing, - tab_strip_model->closing_all()); - args->Append(std::move(object_args)); - - Profile* profile = Profile::FromBrowserContext(contents->GetBrowserContext()); - DispatchEvent(profile, events::TABS_ON_REMOVED, - api::tabs::OnRemoved::kEventName, std::move(args), - EventRouter::USER_GESTURE_UNKNOWN); - - UnregisterForTabNotifications(contents); -} - -void TabsEventRouter::ActiveTabChanged(WebContents* old_contents, - WebContents* new_contents, - int index, - int reason) { +void TabsEventRouter::DispatchActiveTabChanged(WebContents* old_contents, + WebContents* new_contents, + int index, + int reason) { auto args = std::make_unique<base::ListValue>(); int tab_id = ExtensionTabUtil::GetTabId(new_contents); args->AppendInteger(tab_id); @@ -340,7 +426,7 @@ std::move(on_activated_args), gesture); } -void TabsEventRouter::TabSelectionChanged( +void TabsEventRouter::DispatchTabSelectionChanged( TabStripModel* tab_strip_model, const ui::ListSelectionModel& old_model) { ui::ListSelectionModel::SelectedIndices new_selection = @@ -378,9 +464,9 @@ EventRouter::USER_GESTURE_UNKNOWN); } -void TabsEventRouter::TabMoved(WebContents* contents, - int from_index, - int to_index) { +void TabsEventRouter::DispatchTabMoved(WebContents* contents, + int from_index, + int to_index) { std::unique_ptr<base::ListValue> args(new base::ListValue); args->AppendInteger(ExtensionTabUtil::GetTabId(contents)); @@ -400,6 +486,43 @@ std::move(args), EventRouter::USER_GESTURE_UNKNOWN); } +void TabsEventRouter::DispatchTabReplacedAt(WebContents* old_contents, + WebContents* new_contents, + int index) { + // Notify listeners that the next tabs closing or being added are due to + // WebContents being swapped. + const int new_tab_id = ExtensionTabUtil::GetTabId(new_contents); + const int old_tab_id = ExtensionTabUtil::GetTabId(old_contents); + std::unique_ptr<base::ListValue> args(new base::ListValue); + args->AppendInteger(new_tab_id); + args->AppendInteger(old_tab_id); + + DispatchEvent(Profile::FromBrowserContext(new_contents->GetBrowserContext()), + events::TABS_ON_REPLACED, api::tabs::OnReplaced::kEventName, + std::move(args), EventRouter::USER_GESTURE_UNKNOWN); + + UnregisterForTabNotifications(old_contents); + + if (!GetTabEntry(new_contents)) + RegisterForTabNotifications(new_contents); +} + +void TabsEventRouter::TabCreatedAt(WebContents* contents, + int index, + bool active) { + Profile* profile = Profile::FromBrowserContext(contents->GetBrowserContext()); + std::unique_ptr<base::ListValue> args(new base::ListValue); + auto event = std::make_unique<Event>(events::TABS_ON_CREATED, + api::tabs::OnCreated::kEventName, + std::move(args), profile); + event->user_gesture = EventRouter::USER_GESTURE_NOT_ENABLED; + event->will_dispatch_callback = + base::Bind(&WillDispatchTabCreatedEvent, contents, active); + EventRouter::Get(profile)->BroadcastEvent(std::move(event)); + + RegisterForTabNotifications(contents); +} + void TabsEventRouter::TabUpdated(TabEntry* entry, std::set<std::string> changed_property_names) { auto* audible_helper = @@ -476,103 +599,32 @@ EventRouter::Get(profile)->BroadcastEvent(std::move(event)); } +void TabsEventRouter::RegisterForTabNotifications(WebContents* contents) { + favicon_scoped_observer_.Add( + favicon::ContentFaviconDriver::FromWebContents(contents)); + + ZoomController::FromWebContents(contents)->AddObserver(this); + + int tab_id = ExtensionTabUtil::GetTabId(contents); + DCHECK(tab_entries_.find(tab_id) == tab_entries_.end()); + tab_entries_[tab_id] = std::make_unique<TabEntry>(this, contents); +} + +void TabsEventRouter::UnregisterForTabNotifications(WebContents* contents) { + favicon_scoped_observer_.Remove( + favicon::ContentFaviconDriver::FromWebContents(contents)); + + ZoomController::FromWebContents(contents)->RemoveObserver(this); + + int tab_id = ExtensionTabUtil::GetTabId(contents); + int removed_count = tab_entries_.erase(tab_id); + DCHECK_GT(removed_count, 0); +} + TabsEventRouter::TabEntry* TabsEventRouter::GetTabEntry(WebContents* contents) { const auto it = tab_entries_.find(ExtensionTabUtil::GetTabId(contents)); return it == tab_entries_.end() ? nullptr : it->second.get(); } -void TabsEventRouter::TabChangedAt(WebContents* contents, - int index, - TabChangeType change_type) { - TabEntry* entry = GetTabEntry(contents); - // TabClosingAt() may have already removed the entry for |contents| even - // though the tab has not yet been detached. - if (entry) - TabUpdated(entry, entry->UpdateLoadState()); -} - -void TabsEventRouter::TabReplacedAt(TabStripModel* tab_strip_model, - WebContents* old_contents, - WebContents* new_contents, - int index) { - // Notify listeners that the next tabs closing or being added are due to - // WebContents being swapped. - const int new_tab_id = ExtensionTabUtil::GetTabId(new_contents); - const int old_tab_id = ExtensionTabUtil::GetTabId(old_contents); - std::unique_ptr<base::ListValue> args(new base::ListValue); - args->AppendInteger(new_tab_id); - args->AppendInteger(old_tab_id); - - DispatchEvent(Profile::FromBrowserContext(new_contents->GetBrowserContext()), - events::TABS_ON_REPLACED, api::tabs::OnReplaced::kEventName, - std::move(args), EventRouter::USER_GESTURE_UNKNOWN); - - UnregisterForTabNotifications(old_contents); - - if (!GetTabEntry(new_contents)) - RegisterForTabNotifications(new_contents); -} - -void TabsEventRouter::TabPinnedStateChanged(TabStripModel* tab_strip_model, - WebContents* contents, - int index) { - std::set<std::string> changed_property_names; - changed_property_names.insert(tabs_constants::kPinnedKey); - DispatchTabUpdatedEvent(contents, std::move(changed_property_names)); -} - -void TabsEventRouter::OnZoomChanged( - const ZoomController::ZoomChangedEventData& data) { - DCHECK(data.web_contents); - int tab_id = ExtensionTabUtil::GetTabId(data.web_contents); - if (tab_id < 0) - return; - - // Prepare the zoom change information. - api::tabs::OnZoomChange::ZoomChangeInfo zoom_change_info; - zoom_change_info.tab_id = tab_id; - zoom_change_info.old_zoom_factor = - content::ZoomLevelToZoomFactor(data.old_zoom_level); - zoom_change_info.new_zoom_factor = - content::ZoomLevelToZoomFactor(data.new_zoom_level); - ZoomModeToZoomSettings(data.zoom_mode, - &zoom_change_info.zoom_settings); - - // Dispatch the |onZoomChange| event. - Profile* profile = Profile::FromBrowserContext( - data.web_contents->GetBrowserContext()); - DispatchEvent(profile, events::TABS_ON_ZOOM_CHANGE, - api::tabs::OnZoomChange::kEventName, - api::tabs::OnZoomChange::Create(zoom_change_info), - EventRouter::USER_GESTURE_UNKNOWN); -} - -void TabsEventRouter::OnFaviconUpdated( - favicon::FaviconDriver* favicon_driver, - NotificationIconType notification_icon_type, - const GURL& icon_url, - bool icon_url_changed, - const gfx::Image& image) { - if (notification_icon_type == NON_TOUCH_16_DIP && icon_url_changed) { - favicon::ContentFaviconDriver* content_favicon_driver = - static_cast<favicon::ContentFaviconDriver*>(favicon_driver); - FaviconUrlUpdated(content_favicon_driver->web_contents()); - } -} - -void TabsEventRouter::OnDiscardedStateChange(WebContents* contents, - bool is_discarded) { - std::set<std::string> changed_property_names; - changed_property_names.insert(tabs_constants::kDiscardedKey); - DispatchTabUpdatedEvent(contents, std::move(changed_property_names)); -} - -void TabsEventRouter::OnAutoDiscardableStateChange(WebContents* contents, - bool is_auto_discardable) { - std::set<std::string> changed_property_names; - changed_property_names.insert(tabs_constants::kAutoDiscardableKey); - DispatchTabUpdatedEvent(contents, std::move(changed_property_names)); -} - } // namespace extensions
diff --git a/chrome/browser/extensions/api/tabs/tabs_event_router.h b/chrome/browser/extensions/api/tabs/tabs_event_router.h index d0b11d8..a7796a9 100644 --- a/chrome/browser/extensions/api/tabs/tabs_event_router.h +++ b/chrome/browser/extensions/api/tabs/tabs_event_router.h
@@ -54,32 +54,14 @@ void OnBrowserSetLastActive(Browser* browser) override; // TabStripModelObserver: - void TabInsertedAt(TabStripModel* tab_strip_model, - content::WebContents* contents, - int index, - bool active) override; - void TabClosingAt(TabStripModel* tab_strip_model, - content::WebContents* contents, - int index) override; - void TabDetachedAt(content::WebContents* contents, - int index, - bool was_active) override; - void ActiveTabChanged(content::WebContents* old_contents, - content::WebContents* new_contents, - int index, - int reason) override; - void TabSelectionChanged(TabStripModel* tab_strip_model, - const ui::ListSelectionModel& old_model) override; - void TabMoved(content::WebContents* contents, - int from_index, - int to_index) override; + void OnTabStripModelChanged( + TabStripModel* tab_strip_model, + const TabStripModelChange& change, + const TabStripSelectionChange& selection) override; + void TabChangedAt(content::WebContents* contents, int index, TabChangeType change_type) override; - void TabReplacedAt(TabStripModel* tab_strip_model, - content::WebContents* old_contents, - content::WebContents* new_contents, - int index) override; void TabPinnedStateChanged(TabStripModel* tab_strip_model, content::WebContents* contents, int index) override; @@ -102,7 +84,32 @@ bool is_auto_discardable) override; private: - // "Synthetic" event. Called from TabInsertedAt if new tab is detected. + // Methods called from OnTabStripModelChanged. + void DispatchTabInsertedAt(TabStripModel* tab_strip_model, + content::WebContents* contents, + int index, + bool active); + void DispatchTabClosingAt(TabStripModel* tab_strip_model, + content::WebContents* contents, + int index); + void DispatchTabDetachedAt(content::WebContents* contents, + int index, + bool was_active); + void DispatchActiveTabChanged(content::WebContents* old_contents, + content::WebContents* new_contents, + int index, + int reason); + void DispatchTabSelectionChanged(TabStripModel* tab_strip_model, + const ui::ListSelectionModel& old_model); + void DispatchTabMoved(content::WebContents* contents, + int from_index, + int to_index); + void DispatchTabReplacedAt(content::WebContents* old_contents, + content::WebContents* new_contents, + int index); + + // "Synthetic" event. Called from DispatchTabInsertedAt if new tab is + // detected. void TabCreatedAt(content::WebContents* contents, int index, bool active); // Internal processing of tab updated events. Intended to be called when @@ -123,12 +130,6 @@ std::unique_ptr<base::ListValue> args, EventRouter::UserGestureState user_gesture); - void DispatchEventsAcrossIncognito( - Profile* profile, - const std::string& event_name, - std::unique_ptr<base::ListValue> event_args, - std::unique_ptr<base::ListValue> cross_incognito_args); - // Packages |changed_property_names| as a tab updated event for the tab // |contents| and dispatches the event to the extension. void DispatchTabUpdatedEvent(
diff --git a/chrome/browser/extensions/api/webrtc_logging_private/webrtc_logging_private_apitest.cc b/chrome/browser/extensions/api/webrtc_logging_private/webrtc_logging_private_apitest.cc index 959390fa..04adb38 100644 --- a/chrome/browser/extensions/api/webrtc_logging_private/webrtc_logging_private_apitest.cc +++ b/chrome/browser/extensions/api/webrtc_logging_private/webrtc_logging_private_apitest.cc
@@ -19,6 +19,7 @@ #include "chrome/browser/extensions/extension_apitest.h" #include "chrome/browser/extensions/extension_function_test_utils.h" #include "chrome/browser/extensions/extension_tab_util.h" +#include "chrome/browser/media/webrtc/webrtc_event_log_manager.h" #include "chrome/browser/media/webrtc/webrtc_event_log_manager_common.h" #include "chrome/browser/media/webrtc/webrtc_log_uploader.h" #include "chrome/browser/ui/tabs/tab_strip_model.h" @@ -29,7 +30,6 @@ #include "components/policy/policy_constants.h" #include "content/public/browser/notification_service.h" #include "content/public/browser/render_view_host.h" -#include "content/public/browser/webrtc_event_logger.h" #include "content/public/test/test_utils.h" #include "extensions/common/extension_builder.h" #include "third_party/zlib/google/compression_utils.h" @@ -349,7 +349,7 @@ } void SetUpPeerConnection(const std::string& peer_connection_id) { - auto* manager = content::WebRtcEventLogger::Get(); + auto* manager = WebRtcEventLogManager::GetInstance(); auto* rph = web_contents()->GetRenderViewHost()->GetProcess(); const int render_process_id = rph->GetID(); @@ -634,15 +634,25 @@ protected: void SetUp() override { - auto const webrtc_remote_event_logging = features::kWebRtcRemoteEventLog; - if (WebRtcEventLogCollectionFeature()) { - scoped_feature_list_.InitAndEnableFeature(webrtc_remote_event_logging); - } else { - scoped_feature_list_.InitAndDisableFeature(webrtc_remote_event_logging); - } + SetUpFeatures(); WebrtcLoggingPrivateApiTest::SetUp(); } + void SetUpFeatures() { + std::vector<base::Feature> enabled; + std::vector<base::Feature> disabled; + + if (WebRtcEventLogCollectionFeature()) { + enabled.push_back(features::kWebRtcRemoteEventLog); + } else { + disabled.push_back(features::kWebRtcRemoteEventLog); + } + + enabled.push_back(features::kWebRtcRemoteEventLogGzipped); + + scoped_feature_list_.InitWithFeatures(enabled, disabled); + } + void SetUpInProcessBrowserTestFixture() override { EXPECT_CALL(provider_, IsInitializationComplete(testing::_)) .WillRepeatedly(testing::Return(true)); @@ -710,6 +720,18 @@ IN_PROC_BROWSER_TEST_F( WebrtcLoggingPrivateApiStartEventLoggingTestFeatureAndPolicyEnabled, + StartEventLoggingWithTooSmallMaxSize) { + const std::string peer_connection_id = "id"; + SetUpPeerConnection(peer_connection_id); + const int max_size_bytes = 1; + constexpr bool expect_success = false; + const std::string error_message = kStartRemoteLoggingFailureMaxSizeTooSmall; + StartEventLogging(peer_connection_id, max_size_bytes, expect_success, + error_message); +} + +IN_PROC_BROWSER_TEST_F( + WebrtcLoggingPrivateApiStartEventLoggingTestFeatureAndPolicyEnabled, StartEventLoggingWithExcessiveMaxSizeFails) { const std::string peer_connection_id = "id"; SetUpPeerConnection(peer_connection_id);
diff --git a/chrome/browser/extensions/api/webstore_private/webstore_private_apitest.cc b/chrome/browser/extensions/api/webstore_private/webstore_private_apitest.cc index 5dc6a3e..e1ecf59 100644 --- a/chrome/browser/extensions/api/webstore_private/webstore_private_apitest.cc +++ b/chrome/browser/extensions/api/webstore_private/webstore_private_apitest.cc
@@ -30,6 +30,7 @@ #include "content/public/browser/notification_registrar.h" #include "content/public/browser/render_frame_host.h" #include "content/public/test/browser_test_utils.h" +#include "content/public/test/test_navigation_observer.h" #include "extensions/browser/api/management/management_api.h" #include "extensions/browser/extension_dialog_auto_confirm.h" #include "extensions/browser/extension_system.h" @@ -194,16 +195,22 @@ "/extensions/api_test/webstore_private/noframe.html"); content::WebContents* web_contents = GetWebContents(); ui_test_utils::NavigateToURL(browser(), url); + + // Try to load the same URL, but with the current Chrome web store origin in + // an iframe (i.e. http://www.example.com) + content::TestNavigationObserver observer(web_contents); ASSERT_TRUE(content::ExecuteScript(web_contents, "dropFrame()")); WaitForLoadStop(web_contents); content::RenderFrameHost* subframe = content::ChildFrameAt(web_contents->GetMainFrame(), 0); ASSERT_TRUE(subframe); - // The subframe load should fail due to XFO. Currently that results in - // loading a blank page with the URL "data:,", but this check will need to - // change when XFO failures result in an error page - see - // https://crbug.com/870815. - EXPECT_EQ(GURL("data:,"), subframe->GetLastCommittedURL()); + + // The subframe load should fail due to XFO. + GURL iframe_url = embedded_test_server()->GetURL( + "www.example.com", "/extensions/api_test/webstore_private/noframe.html"); + EXPECT_EQ(iframe_url, subframe->GetLastCommittedURL()); + EXPECT_FALSE(observer.last_navigation_succeeded()); + EXPECT_EQ(net::ERR_BLOCKED_BY_RESPONSE, observer.last_net_error_code()); } IN_PROC_BROWSER_TEST_F(ExtensionWebstorePrivateApiTest, FrameErrorPageBlocked) { @@ -211,16 +218,23 @@ "/extensions/api_test/webstore_private/noframe2.html"); content::WebContents* web_contents = GetWebContents(); ui_test_utils::NavigateToURL(browser(), url); + + // Try to load the same URL, but with the current Chrome web store origin in + // an iframe (i.e. http://www.example.com) + content::TestNavigationObserver observer(web_contents); ASSERT_TRUE(content::ExecuteScript(web_contents, "dropFrame()")); WaitForLoadStop(web_contents); content::RenderFrameHost* subframe = content::ChildFrameAt(web_contents->GetMainFrame(), 0); ASSERT_TRUE(subframe); - // The subframe load should fail due to XFO. Currently that results in - // loading a blank page with the URL "data:,", but this check will need to - // change when XFO failures result in an error page - see - // https://crbug.com/870815. - EXPECT_EQ(GURL("data:,"), subframe->GetLastCommittedURL()); + + // The subframe load should fail due to XFO. + GURL iframe_url = embedded_test_server()->GetURL( + "www.example.com", + "/nonesuch/extensions/api_test/webstore_private/noframe2.html "); + EXPECT_EQ(iframe_url, subframe->GetLastCommittedURL()); + EXPECT_FALSE(observer.last_navigation_succeeded()); + EXPECT_EQ(net::ERR_BLOCKED_BY_RESPONSE, observer.last_net_error_code()); } // Test cases where the user accepts the install confirmation dialog.
diff --git a/chrome/browser/extensions/bookmark_app_helper.cc b/chrome/browser/extensions/bookmark_app_helper.cc index 6ea2b79..37874b9 100644 --- a/chrome/browser/extensions/bookmark_app_helper.cc +++ b/chrome/browser/extensions/bookmark_app_helper.cc
@@ -208,9 +208,12 @@ for (const auto& icon : web_app_info_.icons) sizes_to_generate.insert(icon.width); + web_app_info_.generated_icon_color = SK_ColorTRANSPARENT; std::map<int, web_app::BitmapAndSource> size_map = - BookmarkAppHelper::ResizeIconsAndGenerateMissing( - downloaded_bitmaps_, sizes_to_generate, &web_app_info_); + web_app::ResizeIconsAndGenerateMissing( + downloaded_bitmaps_, sizes_to_generate, web_app_info_.app_url, + &web_app_info_.generated_icon_color); + BookmarkAppHelper::UpdateWebAppIconsWithoutChangingLinks(size_map, &web_app_info_); scoped_refptr<CrxInstaller> installer(CrxInstaller::CreateSilent(service_)); @@ -305,23 +308,6 @@ } // static -std::map<int, web_app::BitmapAndSource> -BookmarkAppHelper::ResizeIconsAndGenerateMissing( - std::vector<web_app::BitmapAndSource> icons, - std::set<int> sizes_to_generate, - WebApplicationInfo* web_app_info) { - SkColor generated_icon_color = SK_ColorTRANSPARENT; - - std::map<int, web_app::BitmapAndSource> resized_bitmaps = - web_app::ResizeIconsAndGenerateMissing(icons, sizes_to_generate, - web_app_info->app_url, - &generated_icon_color); - - web_app_info->generated_icon_color = generated_icon_color; - return resized_bitmaps; -} - -// static void BookmarkAppHelper::UpdateWebAppIconsWithoutChangingLinks( std::map<int, web_app::BitmapAndSource> bitmap_map, WebApplicationInfo* web_app_info) { @@ -508,8 +494,10 @@ // is not possible. web_app_info_.generated_icon_color = SK_ColorTRANSPARENT; std::map<int, web_app::BitmapAndSource> size_to_icons = - ResizeIconsAndGenerateMissing(downloaded_icons, SizesToGenerate(), - &web_app_info_); + web_app::ResizeIconsAndGenerateMissing( + downloaded_icons, SizesToGenerate(), web_app_info_.app_url, + &web_app_info_.generated_icon_color); + ReplaceWebAppIcons(size_to_icons, &web_app_info_); web_app_icon_downloader_.reset(); @@ -546,6 +534,15 @@ const WebApplicationInfo& web_app_info) { if (user_accepted) { web_app_info_ = web_app_info; + + if (is_policy_installed_app_) + crx_installer_->set_install_source(Manifest::EXTERNAL_POLICY); + + // InstallWebApp will OR the creation flags with FROM_BOOKMARK. + crx_installer_->set_creation_flags(is_default_app_ + ? Extension::WAS_INSTALLED_BY_DEFAULT + : Extension::NO_FLAGS); + crx_installer_->InstallWebApp(web_app_info_); if (InstallableMetrics::IsReportableInstallSource(install_source_) &&
diff --git a/chrome/browser/extensions/bookmark_app_helper.h b/chrome/browser/extensions/bookmark_app_helper.h index 382dd3c9..5670749 100644 --- a/chrome/browser/extensions/bookmark_app_helper.h +++ b/chrome/browser/extensions/bookmark_app_helper.h
@@ -19,6 +19,7 @@ #include "chrome/common/web_application_info.h" #include "content/public/browser/notification_observer.h" #include "content/public/browser/notification_registrar.h" +#include "extensions/common/extension.h" #include "third_party/blink/public/common/manifest/manifest.h" class WebAppIconDownloader; @@ -81,13 +82,6 @@ static bool BookmarkOrHostedAppInstalled( content::BrowserContext* browser_context, const GURL& url); - // Resize icons to the accepted sizes, and generate any that are missing. Does - // not update |web_app_info| except to update |generated_icon_color|. - static std::map<int, web_app::BitmapAndSource> ResizeIconsAndGenerateMissing( - std::vector<web_app::BitmapAndSource> icons, - std::set<int> sizes_to_generate, - WebApplicationInfo* web_app_info); - // It is important that the linked app information in any extension that // gets created from sync matches the linked app information that came from // sync. If there are any changes, they will be synced back to other devices @@ -102,6 +96,12 @@ // Begins the asynchronous bookmark app creation. void Create(const CreateBookmarkAppCallback& callback); + // If called, the installed extension will be considered policy installed. + void set_is_policy_installed_app() { is_policy_installed_app_ = true; } + + // If called, the installed extension will be considered default installed. + void set_is_default_app() { is_default_app_ = true; } + protected: // Protected methods for testing. @@ -157,6 +157,10 @@ ForInstallableSite for_installable_site_ = ForInstallableSite::kUnknown; + bool is_policy_installed_app_ = false; + + bool is_default_app_ = false; + // The mechanism via which the app creation was triggered. WebappInstallSource install_source_;
diff --git a/chrome/browser/extensions/bookmark_app_helper_unittest.cc b/chrome/browser/extensions/bookmark_app_helper_unittest.cc index 4c430cf..98d1c7b 100644 --- a/chrome/browser/extensions/bookmark_app_helper_unittest.cc +++ b/chrome/browser/extensions/bookmark_app_helper_unittest.cc
@@ -79,6 +79,8 @@ InitializeEmptyExtensionService(); service_->Init(); EXPECT_EQ(0u, registry()->enabled_extensions().size()); + web_contents_ = + content::WebContentsTester::CreateTestWebContents(profile(), nullptr); } void TearDown() override { @@ -94,7 +96,11 @@ } } + content::WebContents* web_contents() { return web_contents_.get(); } + private: + std::unique_ptr<content::WebContents> web_contents_; + DISALLOW_COPY_AND_ASSIGN(BookmarkAppHelperExtensionServiceTest); }; @@ -155,6 +161,17 @@ BookmarkAppHelper::OnIconsDownloaded(success, bitmaps); } + void FinishCreationForNonInstallableSite() { + CompleteInstallableCheck("", blink::Manifest(), ForInstallableSite::kNo); + + std::map<GURL, std::vector<SkBitmap>> icon_map; + icon_map[GURL(kAppUrl)].push_back( + CreateSquareBitmapWithColor(kIconSizeSmall, SK_ColorRED)); + CompleteIconDownload(true, icon_map); + + content::RunAllTasksUntilIdle(); + } + const Extension* extension() { return extension_; } const WebAppIconDownloader* web_app_icon_downloader() { @@ -176,27 +193,20 @@ web_app_info.title = base::UTF8ToUTF16(kAppTitle); web_app_info.description = base::UTF8ToUTF16(kAppDescription); - std::unique_ptr<content::WebContents> contents( - content::WebContentsTester::CreateTestWebContents(profile(), nullptr)); - TestBookmarkAppHelper helper(service_, web_app_info, contents.get()); + TestBookmarkAppHelper helper(service_, web_app_info, web_contents()); helper.Create(base::Bind(&TestBookmarkAppHelper::CreationComplete, base::Unretained(&helper))); + helper.FinishCreationForNonInstallableSite(); - helper.CompleteInstallableCheck(kManifestUrl, blink::Manifest(), - ForInstallableSite::kNo); - - std::map<GURL, std::vector<SkBitmap> > icon_map; - icon_map[GURL(kAppUrl)].push_back( - CreateSquareBitmapWithColor(kIconSizeSmall, SK_ColorRED)); - helper.CompleteIconDownload(true, icon_map); - - content::RunAllTasksUntilIdle(); EXPECT_TRUE(helper.extension()); const Extension* extension = service_->GetInstalledExtension(helper.extension()->id()); EXPECT_TRUE(extension); EXPECT_EQ(1u, registry()->enabled_extensions().size()); EXPECT_TRUE(extension->from_bookmark()); + EXPECT_FALSE(extension->was_installed_by_default()); + EXPECT_FALSE(Manifest::IsPolicyLocation(helper.extension()->location())); + EXPECT_EQ(kAppTitle, extension->name()); EXPECT_EQ(kAppDescription, extension->description()); EXPECT_EQ(GURL(kAppUrl), AppLaunchInfo::GetLaunchWebURL(extension)); @@ -205,11 +215,48 @@ extension, kIconSizeSmall, ExtensionIconSet::MATCH_EXACTLY).empty()); EXPECT_FALSE( AppBannerSettingsHelper::GetSingleBannerEvent( - contents.get(), web_app_info.app_url, web_app_info.app_url.spec(), + web_contents(), web_app_info.app_url, web_app_info.app_url.spec(), AppBannerSettingsHelper::APP_BANNER_EVENT_DID_ADD_TO_HOMESCREEN) .is_null()); } +TEST_F(BookmarkAppHelperExtensionServiceTest, CreateBookmarkAppDefaultApp) { + WebApplicationInfo web_app_info; + web_app_info.app_url = GURL(kAppUrl); + web_app_info.title = base::UTF8ToUTF16(kAppTitle); + web_app_info.description = base::UTF8ToUTF16(kAppDescription); + + TestBookmarkAppHelper helper(service_, web_app_info, web_contents()); + helper.set_is_default_app(); + helper.Create(base::Bind(&TestBookmarkAppHelper::CreationComplete, + base::Unretained(&helper))); + helper.FinishCreationForNonInstallableSite(); + + ASSERT_TRUE(helper.extension()); + EXPECT_TRUE(helper.extension()->from_bookmark()); + EXPECT_TRUE(helper.extension()->was_installed_by_default()); + EXPECT_FALSE(Manifest::IsPolicyLocation(helper.extension()->location())); +} + +TEST_F(BookmarkAppHelperExtensionServiceTest, + CreateBookmarkAppPolicyInstalled) { + WebApplicationInfo web_app_info; + web_app_info.app_url = GURL(kAppUrl); + web_app_info.title = base::UTF8ToUTF16(kAppTitle); + web_app_info.description = base::UTF8ToUTF16(kAppDescription); + + TestBookmarkAppHelper helper(service_, web_app_info, web_contents()); + helper.set_is_policy_installed_app(); + helper.Create(base::Bind(&TestBookmarkAppHelper::CreationComplete, + base::Unretained(&helper))); + helper.FinishCreationForNonInstallableSite(); + + ASSERT_TRUE(helper.extension()); + EXPECT_TRUE(helper.extension()->from_bookmark()); + EXPECT_FALSE(helper.extension()->was_installed_by_default()); + EXPECT_TRUE(Manifest::IsPolicyLocation(helper.extension()->location())); +} + class BookmarkAppHelperExtensionServiceInstallableSiteTest : public BookmarkAppHelperExtensionServiceTest, public ::testing::WithParamInterface<ForInstallableSite> { @@ -226,9 +273,7 @@ CreateBookmarkAppWithManifest) { WebApplicationInfo web_app_info; - std::unique_ptr<content::WebContents> contents( - content::WebContentsTester::CreateTestWebContents(profile(), nullptr)); - TestBookmarkAppHelper helper(service_, web_app_info, contents.get()); + TestBookmarkAppHelper helper(service_, web_app_info, web_contents()); helper.Create(base::Bind(&TestBookmarkAppHelper::CreationComplete, base::Unretained(&helper))); @@ -254,7 +299,7 @@ EXPECT_EQ(SK_ColorBLUE, AppThemeColorInfo::GetThemeColor(extension).value()); EXPECT_FALSE( AppBannerSettingsHelper::GetSingleBannerEvent( - contents.get(), manifest.start_url, manifest.start_url.spec(), + web_contents(), manifest.start_url, manifest.start_url.spec(), AppBannerSettingsHelper::APP_BANNER_EVENT_DID_ADD_TO_HOMESCREEN) .is_null()); @@ -268,9 +313,7 @@ TEST_P(BookmarkAppHelperExtensionServiceInstallableSiteTest, CreateBookmarkAppWithManifestIcons) { WebApplicationInfo web_app_info; - std::unique_ptr<content::WebContents> contents( - content::WebContentsTester::CreateTestWebContents(profile(), nullptr)); - TestBookmarkAppHelper helper(service_, web_app_info, contents.get()); + TestBookmarkAppHelper helper(service_, web_app_info, web_contents()); helper.Create(base::Bind(&TestBookmarkAppHelper::CreationComplete, base::Unretained(&helper))); @@ -318,9 +361,7 @@ CreateBookmarkAppWithManifestNoScope) { WebApplicationInfo web_app_info; - std::unique_ptr<content::WebContents> contents( - content::WebContentsTester::CreateTestWebContents(profile(), nullptr)); - TestBookmarkAppHelper helper(service_, web_app_info, contents.get()); + TestBookmarkAppHelper helper(service_, web_app_info, web_contents()); helper.Create(base::Bind(&TestBookmarkAppHelper::CreationComplete, base::Unretained(&helper))); @@ -356,14 +397,12 @@ WebApplicationInfo web_app_info; std::map<GURL, std::vector<SkBitmap>> icon_map; - std::unique_ptr<content::WebContents> contents( - content::WebContentsTester::CreateTestWebContents(profile(), nullptr)); blink::Manifest manifest; manifest.start_url = GURL(kAppUrl); manifest.name = base::NullableString16(base::UTF8ToUTF16(kAppTitle), false); manifest.scope = GURL(kAppScope); { - TestBookmarkAppHelper helper(service_, web_app_info, contents.get()); + TestBookmarkAppHelper helper(service_, web_app_info, web_contents()); helper.Create(base::Bind(&TestBookmarkAppHelper::CreationComplete, base::Unretained(&helper))); @@ -380,7 +419,7 @@ GetLaunchContainer(ExtensionPrefs::Get(profile()), extension)); } { - TestBookmarkAppHelper helper(service_, web_app_info, contents.get()); + TestBookmarkAppHelper helper(service_, web_app_info, web_contents()); helper.Create(base::Bind(&TestBookmarkAppHelper::CreationComplete, base::Unretained(&helper))); @@ -405,9 +444,7 @@ web_app_info.description = base::UTF8ToUTF16(kAppDescription); web_app_info.app_url = GURL(kAppUrl); - std::unique_ptr<content::WebContents> contents( - content::WebContentsTester::CreateTestWebContents(profile(), nullptr)); - TestBookmarkAppHelper helper(service_, web_app_info, contents.get()); + TestBookmarkAppHelper helper(service_, web_app_info, web_contents()); helper.Create(base::Bind(&TestBookmarkAppHelper::CreationComplete, base::Unretained(&helper)));
diff --git a/chrome/browser/extensions/convert_web_app.cc b/chrome/browser/extensions/convert_web_app.cc index 353954a..cc4bb36c 100644 --- a/chrome/browser/extensions/convert_web_app.cc +++ b/chrome/browser/extensions/convert_web_app.cc
@@ -141,7 +141,9 @@ scoped_refptr<Extension> ConvertWebAppToExtension( const WebApplicationInfo& web_app, const base::Time& create_time, - const base::FilePath& extensions_dir) { + const base::FilePath& extensions_dir, + int extra_creation_flags, + Manifest::Location install_source) { base::FilePath install_temp_dir = file_util::GetInstallTempDir(extensions_dir); if (install_temp_dir.empty()) { @@ -236,9 +238,9 @@ // Finally, create the extension object to represent the unpacked directory. std::string error; - scoped_refptr<Extension> extension = - Extension::Create(temp_dir.GetPath(), Manifest::INTERNAL, *root, - Extension::FROM_BOOKMARK, &error); + scoped_refptr<Extension> extension = Extension::Create( + temp_dir.GetPath(), install_source, *root, + Extension::FROM_BOOKMARK | extra_creation_flags, &error); if (!extension.get()) { LOG(ERROR) << error; return NULL;
diff --git a/chrome/browser/extensions/convert_web_app.h b/chrome/browser/extensions/convert_web_app.h index 55ee03da..38d99dc 100644 --- a/chrome/browser/extensions/convert_web_app.h +++ b/chrome/browser/extensions/convert_web_app.h
@@ -8,6 +8,7 @@ #include <string> #include "base/memory/ref_counted.h" +#include "extensions/common/manifest.h" namespace base { class DictionaryValue; @@ -71,7 +72,9 @@ scoped_refptr<Extension> ConvertWebAppToExtension( const WebApplicationInfo& web_app_info, const base::Time& create_time, - const base::FilePath& extensions_dir); + const base::FilePath& extensions_dir, + int extra_creation_flags, + Manifest::Location install_source); } // namespace extensions
diff --git a/chrome/browser/extensions/convert_web_app_unittest.cc b/chrome/browser/extensions/convert_web_app_unittest.cc index 673aa4f..84dbd9c 100644 --- a/chrome/browser/extensions/convert_web_app_unittest.cc +++ b/chrome/browser/extensions/convert_web_app_unittest.cc
@@ -258,7 +258,8 @@ } scoped_refptr<Extension> extension = ConvertWebAppToExtension( - web_app, GetTestTime(1978, 12, 11, 0, 0, 0, 0), extensions_dir.GetPath()); + web_app, GetTestTime(1978, 12, 11, 0, 0, 0, 0), extensions_dir.GetPath(), + Extension::NO_FLAGS, Manifest::INTERNAL); ASSERT_TRUE(extension.get()); base::ScopedTempDir extension_dir; @@ -266,8 +267,14 @@ EXPECT_TRUE(extension->is_app()); EXPECT_TRUE(extension->is_hosted_app()); + EXPECT_TRUE(extension->from_bookmark()); EXPECT_FALSE(extension->is_legacy_packaged_app()); + EXPECT_FALSE(extension->was_installed_by_default()); + EXPECT_FALSE(extension->was_installed_by_oem()); + EXPECT_FALSE(extension->from_webstore()); + EXPECT_EQ(Manifest::INTERNAL, extension->location()); + EXPECT_EQ("zVvdNZy3Mp7CFU8JVSyXNlDuHdVLbP7fDO3TGVzj/0w=", extension->public_key()); EXPECT_EQ("oplhagaaipaimkjlbekcdjkffijdockj", extension->id()); @@ -304,7 +311,8 @@ web_app.app_url = GURL("http://aaronboodman.com/gearpad/"); scoped_refptr<Extension> extension = ConvertWebAppToExtension( - web_app, GetTestTime(1978, 12, 11, 0, 0, 0, 0), extensions_dir.GetPath()); + web_app, GetTestTime(1978, 12, 11, 0, 0, 0, 0), extensions_dir.GetPath(), + Extension::NO_FLAGS, Manifest::INTERNAL); ASSERT_TRUE(extension.get()); base::ScopedTempDir extension_dir; @@ -312,8 +320,14 @@ EXPECT_TRUE(extension->is_app()); EXPECT_TRUE(extension->is_hosted_app()); + EXPECT_TRUE(extension->from_bookmark()); EXPECT_FALSE(extension->is_legacy_packaged_app()); + EXPECT_FALSE(extension->was_installed_by_default()); + EXPECT_FALSE(extension->was_installed_by_oem()); + EXPECT_FALSE(extension->from_webstore()); + EXPECT_EQ(Manifest::INTERNAL, extension->location()); + EXPECT_EQ("zVvdNZy3Mp7CFU8JVSyXNlDuHdVLbP7fDO3TGVzj/0w=", extension->public_key()); EXPECT_EQ("oplhagaaipaimkjlbekcdjkffijdockj", extension->id()); @@ -328,6 +342,52 @@ ASSERT_EQ(0u, extension->web_extent().patterns().size()); } +TEST(ExtensionFromWebApp, ExtraInstallationFlags) { + base::ScopedTempDir extensions_dir; + ASSERT_TRUE(extensions_dir.CreateUniqueTempDir()); + + WebApplicationInfo web_app; + web_app.title = base::ASCIIToUTF16("Gearpad"); + web_app.app_url = GURL("http://aaronboodman.com/gearpad/"); + + scoped_refptr<Extension> extension = ConvertWebAppToExtension( + web_app, GetTestTime(1978, 12, 11, 0, 0, 0, 0), extensions_dir.GetPath(), + Extension::FROM_WEBSTORE | Extension::WAS_INSTALLED_BY_OEM, + Manifest::INTERNAL); + ASSERT_TRUE(extension.get()); + + EXPECT_TRUE(extension->is_app()); + EXPECT_TRUE(extension->is_hosted_app()); + EXPECT_TRUE(extension->from_bookmark()); + EXPECT_FALSE(extension->is_legacy_packaged_app()); + + EXPECT_TRUE(extension->was_installed_by_oem()); + EXPECT_TRUE(extension->from_webstore()); + EXPECT_FALSE(extension->was_installed_by_default()); + EXPECT_EQ(Manifest::INTERNAL, extension->location()); +} + +TEST(ExtensionFromWebApp, ExternalPolicyLocation) { + base::ScopedTempDir extensions_dir; + ASSERT_TRUE(extensions_dir.CreateUniqueTempDir()); + + WebApplicationInfo web_app; + web_app.title = base::ASCIIToUTF16("Gearpad"); + web_app.app_url = GURL("http://aaronboodman.com/gearpad/"); + + scoped_refptr<Extension> extension = ConvertWebAppToExtension( + web_app, GetTestTime(1978, 12, 11, 0, 0, 0, 0), extensions_dir.GetPath(), + Extension::NO_FLAGS, Manifest::EXTERNAL_POLICY); + ASSERT_TRUE(extension.get()); + + EXPECT_TRUE(extension->is_app()); + EXPECT_TRUE(extension->is_hosted_app()); + EXPECT_TRUE(extension->from_bookmark()); + EXPECT_FALSE(extension->is_legacy_packaged_app()); + + EXPECT_EQ(Manifest::EXTERNAL_POLICY, extension->location()); +} + // Tests that a scope not ending in "/" works correctly. // The tested behavior is unexpected but is working correctly according // to the Web Manifest spec. https://github.com/w3c/manifest/issues/554 @@ -343,7 +403,8 @@ web_app.scope = GURL("http://aaronboodman.com/gear"); scoped_refptr<Extension> extension = ConvertWebAppToExtension( - web_app, GetTestTime(1978, 12, 11, 0, 0, 0, 0), extensions_dir.GetPath()); + web_app, GetTestTime(1978, 12, 11, 0, 0, 0, 0), extensions_dir.GetPath(), + Extension::NO_FLAGS, Manifest::INTERNAL); ASSERT_TRUE(extension.get()); EXPECT_EQ(web_app.scope, GetScopeURLFromBookmarkApp(extension.get())); }
diff --git a/chrome/browser/extensions/crx_installer.cc b/chrome/browser/extensions/crx_installer.cc index c8b386f..af204648 100644 --- a/chrome/browser/extensions/crx_installer.cc +++ b/chrome/browser/extensions/crx_installer.cc
@@ -293,8 +293,9 @@ void CrxInstaller::ConvertWebAppOnFileThread( const WebApplicationInfo& web_app) { - scoped_refptr<Extension> extension(ConvertWebAppToExtension( - web_app, base::Time::Now(), install_directory_)); + scoped_refptr<Extension> extension( + ConvertWebAppToExtension(web_app, base::Time::Now(), install_directory_, + creation_flags_, install_source_)); if (!extension.get()) { // Validation should have stopped any potential errors before getting here. NOTREACHED() << "Could not convert web app to extension.";
diff --git a/chrome/browser/extensions/extension_action_icon_factory_unittest.cc b/chrome/browser/extensions/extension_action_icon_factory_unittest.cc index 2c9a9b8..9262301 100644 --- a/chrome/browser/extensions/extension_action_icon_factory_unittest.cc +++ b/chrome/browser/extensions/extension_action_icon_factory_unittest.cc
@@ -33,8 +33,7 @@ #if defined(OS_CHROMEOS) #include "chrome/browser/chromeos/login/users/scoped_test_user_manager.h" -#include "chrome/browser/chromeos/settings/cros_settings.h" -#include "chrome/browser/chromeos/settings/device_settings_service.h" +#include "chrome/browser/chromeos/settings/scoped_cros_settings_test_helper.h" #endif namespace extensions { @@ -170,8 +169,7 @@ material_design_state_; #if defined OS_CHROMEOS - chromeos::ScopedTestDeviceSettingsService test_device_settings_service_; - chromeos::ScopedTestCrosSettings test_cros_settings_; + chromeos::ScopedCrosSettingsTestHelper cros_settings_test_helper_; chromeos::ScopedTestUserManager test_user_manager_; #endif
diff --git a/chrome/browser/extensions/extension_bindings_apitest.cc b/chrome/browser/extensions/extension_bindings_apitest.cc index f0fa2d0f..c18fccc 100644 --- a/chrome/browser/extensions/extension_bindings_apitest.cc +++ b/chrome/browser/extensions/extension_bindings_apitest.cc
@@ -9,18 +9,22 @@ #include "chrome/browser/extensions/api/permissions/permissions_api.h" #include "chrome/browser/extensions/extension_apitest.h" #include "chrome/browser/net/url_request_mock_util.h" +#include "chrome/browser/sessions/session_tab_helper.h" #include "chrome/browser/ui/browser.h" +#include "chrome/browser/ui/browser_tabstrip.h" #include "chrome/browser/ui/tabs/tab_strip_model.h" #include "chrome/common/chrome_switches.h" #include "chrome/test/base/ui_test_utils.h" #include "content/public/browser/browser_thread.h" #include "content/public/browser/render_frame_host.h" #include "content/public/test/browser_test_utils.h" +#include "extensions/browser/event_router.h" #include "extensions/browser/extension_host.h" #include "extensions/browser/process_manager.h" #include "extensions/common/extension_features.h" #include "extensions/test/extension_test_message_listener.h" #include "extensions/test/result_catcher.h" +#include "extensions/test/test_extension_dir.h" #include "net/dns/mock_host_resolver.h" #include "net/test/embedded_test_server/embedded_test_server.h" @@ -433,6 +437,91 @@ ASSERT_TRUE(RunExtensionTest("crazy_extension")); } +// Tests attaching two listeners from the same extension but different pages, +// then removing one, and ensuring the second is still notified. +// Regression test for https://crbug.com/868763. +IN_PROC_BROWSER_TEST_P( + ExtensionBindingsApiTest, + MultipleEventListenersFromDifferentContextsAndTheSameExtension) { + // A script that listens for tab creation and populates the result in a + // global variable. + constexpr char kTestPageScript[] = R"( + window.tabEventId = -1; + function registerListener() { + chrome.tabs.onCreated.addListener((tab) => { + window.tabEventId = tab.id; + }); + } + )"; + TestExtensionDir test_dir; + test_dir.WriteManifest(R"( + { + "name": "Duplicate event listeners", + "manifest_version": 2, + "version": "0.1" + })"); + test_dir.WriteFile(FILE_PATH_LITERAL("page.html"), + R"(<html><script src="page.js"></script></html>)"); + test_dir.WriteFile(FILE_PATH_LITERAL("page.js"), kTestPageScript); + + const Extension* extension = LoadExtension(test_dir.UnpackedPath()); + ASSERT_TRUE(extension); + + // Set up: open two tabs to the same extension page, and wait for each to + // load. + const GURL page_url = extension->GetResourceURL("page.html"); + ui_test_utils::NavigateToURLWithDisposition( + browser(), page_url, WindowOpenDisposition::NEW_FOREGROUND_TAB, + ui_test_utils::BROWSER_TEST_WAIT_FOR_NAVIGATION); + content::WebContents* first_tab = + browser()->tab_strip_model()->GetActiveWebContents(); + ui_test_utils::NavigateToURLWithDisposition( + browser(), page_url, WindowOpenDisposition::NEW_FOREGROUND_TAB, + ui_test_utils::BROWSER_TEST_WAIT_FOR_NAVIGATION); + content::WebContents* second_tab = + browser()->tab_strip_model()->GetActiveWebContents(); + + // Initially, there are no listeners registered. + EventRouter* event_router = EventRouter::Get(profile()); + EXPECT_FALSE(event_router->ExtensionHasEventListener(extension->id(), + "tabs.onCreated")); + + // Register both lsiteners, and verify they were added. + ASSERT_TRUE(content::ExecuteScript(first_tab, "registerListener()")); + ASSERT_TRUE(content::ExecuteScript(second_tab, "registerListener()")); + EXPECT_TRUE(event_router->ExtensionHasEventListener(extension->id(), + "tabs.onCreated")); + + // Close one of the extension pages. + constexpr bool add_to_history = false; + content::WebContentsDestroyedWatcher watcher(second_tab); + chrome::CloseWebContents(browser(), second_tab, add_to_history); + watcher.Wait(); + // Hacky round trip to the renderer to flush IPCs. + ASSERT_TRUE(content::ExecuteScript(first_tab, "")); + + // Since the second page is still open, the extension should still be + // registered as a listener. + EXPECT_TRUE(event_router->ExtensionHasEventListener(extension->id(), + "tabs.onCreated")); + + // Open a new tab. + ui_test_utils::NavigateToURLWithDisposition( + browser(), GURL("chrome://newtab"), + WindowOpenDisposition::NEW_FOREGROUND_TAB, + ui_test_utils::BROWSER_TEST_WAIT_FOR_NAVIGATION); + content::WebContents* new_tab = + browser()->tab_strip_model()->GetActiveWebContents(); + + // The extension should have been notified about the new tab, and have + // recorded the result. + int result_tab_id = -1; + EXPECT_TRUE(content::ExecuteScriptAndExtractInt( + first_tab, "domAutomationController.send(window.tabEventId)", + &result_tab_id)); + EXPECT_EQ(SessionTabHelper::IdForTab(new_tab).id(), result_tab_id); +} + // Run core bindings API tests with both native and JS-based bindings. This // ensures we have some minimum level of coverage while in the experimental // phase, when native bindings may be enabled on trunk but not at 100% stable.
diff --git a/chrome/browser/extensions/extension_gcm_app_handler_unittest.cc b/chrome/browser/extensions/extension_gcm_app_handler_unittest.cc index 25fc22c3..16ec066f 100644 --- a/chrome/browser/extensions/extension_gcm_app_handler_unittest.cc +++ b/chrome/browser/extensions/extension_gcm_app_handler_unittest.cc
@@ -62,8 +62,7 @@ #if defined(OS_CHROMEOS) #include "chrome/browser/chromeos/login/users/scoped_test_user_manager.h" -#include "chrome/browser/chromeos/settings/cros_settings.h" -#include "chrome/browser/chromeos/settings/device_settings_service.h" +#include "chrome/browser/chromeos/settings/scoped_cros_settings_test_helper.h" #include "chromeos/dbus/dbus_thread_manager.h" #endif @@ -410,8 +409,7 @@ // This is needed to create extension service under CrOS. #if defined(OS_CHROMEOS) - chromeos::ScopedTestDeviceSettingsService test_device_settings_service_; - chromeos::ScopedTestCrosSettings test_cros_settings_; + chromeos::ScopedCrosSettingsTestHelper cros_settings_test_helper_; std::unique_ptr<chromeos::ScopedTestUserManager> test_user_manager_; #endif
diff --git a/chrome/browser/extensions/extension_service_test_base.h b/chrome/browser/extensions/extension_service_test_base.h index 2f08138..a2782f3 100644 --- a/chrome/browser/extensions/extension_service_test_base.h +++ b/chrome/browser/extensions/extension_service_test_base.h
@@ -24,8 +24,7 @@ #if defined(OS_CHROMEOS) #include "chrome/browser/chromeos/login/users/scoped_test_user_manager.h" -#include "chrome/browser/chromeos/settings/cros_settings.h" -#include "chrome/browser/chromeos/settings/device_settings_service.h" +#include "chrome/browser/chromeos/settings/scoped_cros_settings_test_helper.h" #endif class Profile; @@ -178,8 +177,7 @@ extensions::ExtensionRegistry* registry_; #if defined OS_CHROMEOS - chromeos::ScopedTestDeviceSettingsService test_device_settings_service_; - chromeos::ScopedTestCrosSettings test_cros_settings_; + chromeos::ScopedCrosSettingsTestHelper cros_settings_test_helper_; chromeos::ScopedTestUserManager test_user_manager_; #endif
diff --git a/chrome/browser/extensions/extension_tabs_apitest.cc b/chrome/browser/extensions/extension_tabs_apitest.cc index cc0593b5..e3df4ed 100644 --- a/chrome/browser/extensions/extension_tabs_apitest.cc +++ b/chrome/browser/extensions/extension_tabs_apitest.cc
@@ -4,7 +4,9 @@ #include "chrome/browser/extensions/extension_apitest.h" +#include "base/strings/stringprintf.h" #include "build/build_config.h" +#include "chrome/browser/extensions/extension_tab_util.h" #include "chrome/browser/prefs/incognito_mode_prefs.h" #include "chrome/browser/profiles/profile.h" #include "chrome/browser/ui/browser.h" @@ -287,6 +289,28 @@ ASSERT_TRUE(RunExtensionTest("tabs/tab_opener_id")); } +class IncognitoExtensionApiTabTest : public ExtensionApiTabTest, + public testing::WithParamInterface<bool> { +}; + +IN_PROC_BROWSER_TEST_P(IncognitoExtensionApiTabTest, Tabs) { + bool is_incognito_enabled = GetParam(); + Browser* incognito_browser = + OpenURLOffTheRecord(browser()->profile(), GURL("about:blank")); + std::string args = base::StringPrintf( + R"({"isIncognito": %s, "windowId": %d})", + is_incognito_enabled ? "true" : "false", + extensions::ExtensionTabUtil::GetWindowId(incognito_browser)); + + EXPECT_TRUE(RunExtensionSubtestWithArgAndFlags( + "tabs/basics", "incognito.html", args.data(), + is_incognito_enabled ? extensions::ExtensionApiTest::kFlagEnableIncognito + : extensions::ExtensionApiTest::kFlagNone)) + << message_; +} + +INSTANTIATE_TEST_CASE_P(, IncognitoExtensionApiTabTest, testing::Bool()); + // Adding a new test? Awesome. But API tests are the old hotness. The new // hotness is extension_function_test_utils. See tabs_test.cc for an example. // We are trying to phase out many uses of API tests as they tend to be flaky.
diff --git a/chrome/browser/extensions/extension_web_ui_unittest.cc b/chrome/browser/extensions/extension_web_ui_unittest.cc index 0261326..d3c4f78 100644 --- a/chrome/browser/extensions/extension_web_ui_unittest.cc +++ b/chrome/browser/extensions/extension_web_ui_unittest.cc
@@ -20,8 +20,7 @@ #if defined(OS_CHROMEOS) #include "chrome/browser/chromeos/login/users/scoped_test_user_manager.h" -#include "chrome/browser/chromeos/settings/cros_settings.h" -#include "chrome/browser/chromeos/settings/device_settings_service.h" +#include "chrome/browser/chromeos/settings/scoped_cros_settings_test_helper.h" #endif namespace extensions { @@ -61,8 +60,7 @@ content::TestBrowserThreadBundle test_browser_thread_bundle_; #if defined OS_CHROMEOS - chromeos::ScopedTestDeviceSettingsService test_device_settings_service_; - chromeos::ScopedTestCrosSettings test_cros_settings_; + chromeos::ScopedCrosSettingsTestHelper cros_settings_test_helper_; chromeos::ScopedTestUserManager test_user_manager_; #endif };
diff --git a/chrome/browser/extensions/external_provider_impl.cc b/chrome/browser/extensions/external_provider_impl.cc index cc1ee8a..9d16ef7 100644 --- a/chrome/browser/extensions/external_provider_impl.cc +++ b/chrome/browser/extensions/external_provider_impl.cc
@@ -76,7 +76,7 @@ // Certain default extensions are no longer needed on ARC devices as they were // replaced by their ARC counterparts. bool ShouldUninstallExtensionReplacedByArcApp(const std::string& extension_id) { - if (arc::IsWebstoreSearchEnabled()) + if (!arc::IsArcAvailable()) return false; if (extension_id == extension_misc::kGooglePlayBooksAppId ||
diff --git a/chrome/browser/extensions/test_extension_environment.cc b/chrome/browser/extensions/test_extension_environment.cc index aefac31..beb5caa 100644 --- a/chrome/browser/extensions/test_extension_environment.cc +++ b/chrome/browser/extensions/test_extension_environment.cc
@@ -23,8 +23,8 @@ #if defined(OS_CHROMEOS) #include "chrome/browser/chromeos/login/users/scoped_test_user_manager.h" -#include "chrome/browser/chromeos/settings/cros_settings.h" #include "chrome/browser/chromeos/settings/device_settings_service.h" +#include "chrome/browser/chromeos/settings/scoped_cros_settings_test_helper.h" #endif namespace extensions { @@ -77,8 +77,7 @@ ChromeOSEnv() {} private: - chromeos::ScopedTestDeviceSettingsService test_device_settings_service_; - chromeos::ScopedTestCrosSettings test_cros_settings_; + chromeos::ScopedCrosSettingsTestHelper cros_settings_test_helper_; chromeos::ScopedTestUserManager test_user_manager_; DISALLOW_COPY_AND_ASSIGN(ChromeOSEnv);
diff --git a/chrome/browser/extensions/updater/extension_update_client_base_browsertest.cc b/chrome/browser/extensions/updater/extension_update_client_base_browsertest.cc index 24c37a8a..1ee23e8 100644 --- a/chrome/browser/extensions/updater/extension_update_client_base_browsertest.cc +++ b/chrome/browser/extensions/updater/extension_update_client_base_browsertest.cc
@@ -4,6 +4,7 @@ #include "chrome/browser/extensions/updater/extension_update_client_base_browsertest.h" +#include "base/bind.h" #include "base/path_service.h" #include "base/run_loop.h" #include "base/task/post_task.h" @@ -13,7 +14,6 @@ #include "chrome/browser/extensions/browsertest_util.h" #include "components/update_client/url_loader_post_interceptor.h" #include "content/public/browser/browser_context.h" -#include "content/public/browser/browser_thread.h" #include "extensions/browser/updater/update_service.h" #include "extensions/browser/updater/update_service_factory.h" #include "extensions/common/extension_features.h" @@ -158,11 +158,11 @@ ASSERT_TRUE(update_service_); } -void ExtensionUpdateClientBaseTest::SetUpNetworkInterceptors() { - auto io_thread = content::BrowserThread::GetTaskRunnerForThread( - content::BrowserThread::IO); - ASSERT_TRUE(io_thread); +void ExtensionUpdateClientBaseTest::TearDownOnMainThread() { + get_interceptor_.reset(); +} +void ExtensionUpdateClientBaseTest::SetUpNetworkInterceptors() { const auto update_urls = GetUpdateUrls(); ASSERT_TRUE(!update_urls.empty()); const GURL update_url = update_urls.front(); @@ -180,10 +180,9 @@ ping_urls, &https_server_for_ping_); https_server_for_ping_.StartAcceptingConnections(); - get_interceptor_ = std::make_unique<net::LocalHostTestURLRequestInterceptor>( - io_thread, base::CreateTaskRunnerWithTraits( - {base::MayBlock(), base::TaskPriority::BEST_EFFORT, - base::TaskShutdownBehavior::SKIP_ON_SHUTDOWN})); + get_interceptor_ = + std::make_unique<content::URLLoaderInterceptor>(base::BindRepeating( + &ExtensionUpdateClientBaseTest::OnRequest, base::Unretained(this))); } update_client::UpdateClient::Observer::Events @@ -197,4 +196,13 @@ return event; } +bool ExtensionUpdateClientBaseTest::OnRequest( + content::URLLoaderInterceptor::RequestParams* params) { + if (params->url_request.url.host() != "localhost") + return false; + + get_interceptor_count_++; + return callback_ && callback_.Run(params); +} + } // namespace extensions
diff --git a/chrome/browser/extensions/updater/extension_update_client_base_browsertest.h b/chrome/browser/extensions/updater/extension_update_client_base_browsertest.h index 7f29727..025e784 100644 --- a/chrome/browser/extensions/updater/extension_update_client_base_browsertest.h +++ b/chrome/browser/extensions/updater/extension_update_client_base_browsertest.h
@@ -9,6 +9,7 @@ #include "chrome/browser/extensions/extension_browsertest.h" #include "chrome/browser/extensions/updater/chrome_update_client_config.h" #include "components/update_client/update_client.h" +#include "content/public/test/url_loader_interceptor.h" namespace base { namespace test { @@ -20,10 +21,6 @@ class BrowserMainParts; } // namespace content -namespace net { -class TestURLRequestInterceptor; -} // namespace net - namespace update_client { class URLLoaderPostInterceptor; } // namespace update_client @@ -45,6 +42,7 @@ void SetUp() override; void SetUpOnMainThread() override; void CreatedBrowserMainParts(content::BrowserMainParts* parts) final; + void TearDownOnMainThread() override; // Injects a test configurator to the main extension browser client. // Override this function to inject your own custom configurator to the @@ -65,9 +63,18 @@ virtual std::vector<GURL> GetUpdateUrls() const; virtual std::vector<GURL> GetPingUrls() const; + void set_interceptor_hook( + content::URLLoaderInterceptor::InterceptCallback callback) { + callback_ = std::move(callback); + } + + int get_interceptor_count() { return get_interceptor_count_; } + protected: extensions::UpdateService* update_service_ = nullptr; - std::unique_ptr<net::TestURLRequestInterceptor> get_interceptor_; + std::unique_ptr<content::URLLoaderInterceptor> get_interceptor_; + int get_interceptor_count_ = 0; + content::URLLoaderInterceptor::InterceptCallback callback_; std::unique_ptr<update_client::URLLoaderPostInterceptor> update_interceptor_; std::unique_ptr<update_client::URLLoaderPostInterceptor> ping_interceptor_; @@ -76,6 +83,8 @@ net::EmbeddedTestServer https_server_for_ping_; private: + bool OnRequest(content::URLLoaderInterceptor::RequestParams* params); + base::test::ScopedFeatureList scoped_feature_list_; DISALLOW_COPY_AND_ASSIGN(ExtensionUpdateClientBaseTest);
diff --git a/chrome/browser/extensions/updater/extension_updater_unittest.cc b/chrome/browser/extensions/updater/extension_updater_unittest.cc index f47bcd4..0104e28 100644 --- a/chrome/browser/extensions/updater/extension_updater_unittest.cc +++ b/chrome/browser/extensions/updater/extension_updater_unittest.cc
@@ -83,8 +83,7 @@ #if defined(OS_CHROMEOS) #include "chrome/browser/chromeos/login/users/scoped_test_user_manager.h" -#include "chrome/browser/chromeos/settings/cros_settings.h" -#include "chrome/browser/chromeos/settings/device_settings_service.h" +#include "chrome/browser/chromeos/settings/scoped_cros_settings_test_helper.h" #endif using base::Time; @@ -2248,8 +2247,7 @@ data_decoder::TestDataDecoderService test_data_decoder_service_; #if defined OS_CHROMEOS - chromeos::ScopedTestDeviceSettingsService test_device_settings_service_; - chromeos::ScopedTestCrosSettings test_cros_settings_; + chromeos::ScopedCrosSettingsTestHelper cros_settings_test_helper_; chromeos::ScopedTestUserManager test_user_manager_; #endif };
diff --git a/chrome/browser/extensions/updater/update_service_browsertest.cc b/chrome/browser/extensions/updater/update_service_browsertest.cc index 6a39cd1..1bb9a19 100644 --- a/chrome/browser/extensions/updater/update_service_browsertest.cc +++ b/chrome/browser/extensions/updater/update_service_browsertest.cc
@@ -4,6 +4,7 @@ #include "base/command_line.h" #include "base/run_loop.h" +#include "base/test/bind_test_util.h" #include "base/test/metrics/histogram_tester.h" #include "chrome/browser/extensions/content_verifier_test_utils.h" #include "chrome/browser/extensions/extension_management_test_util.h" @@ -97,7 +98,7 @@ << update_interceptor_->GetRequestsAsString(); // No update, thus no download nor ping activities. - EXPECT_EQ(0, get_interceptor_->GetHitCount()); + EXPECT_EQ(0, get_interceptor_count()); EXPECT_EQ(0, ping_interceptor_->GetCount()) << ping_interceptor_->GetRequestsAsString(); @@ -155,7 +156,7 @@ << update_interceptor_->GetRequestsAsString(); // Error, thus no download nor ping activities. - EXPECT_EQ(0, get_interceptor_->GetHitCount()); + EXPECT_EQ(0, get_interceptor_count()); EXPECT_EQ(0, ping_interceptor_->GetCount()) << ping_interceptor_->GetRequestsAsString(); @@ -224,7 +225,7 @@ << update_interceptor_->GetRequestsAsString(); // Error, thus no download nor ping activities. - EXPECT_EQ(0, get_interceptor_->GetHitCount()); + EXPECT_EQ(0, get_interceptor_count()); EXPECT_EQ(0, ping_interceptor_->GetCount()) << ping_interceptor_->GetRequestsAsString(); } @@ -246,8 +247,15 @@ ASSERT_TRUE(ping_interceptor_->ExpectRequest( std::make_unique<update_client::PartialMatch>("eventtype"), ping_response)); - get_interceptor_->SetResponseIgnoreQuery( - GURL("http://localhost/download/v1.crx"), crx_path); + set_interceptor_hook(base::BindLambdaForTesting( + [&](content::URLLoaderInterceptor::RequestParams* params) { + if (params->url_request.url.path() != "/download/v1.crx") + return false; + + content::URLLoaderInterceptor::WriteResponse(crx_path, + params->client.get()); + return true; + })); const Extension* extension = InstallExtension(crx_path, 1, Manifest::EXTERNAL_POLICY_DOWNLOAD); @@ -283,7 +291,7 @@ ASSERT_EQ(1, update_interceptor_->GetCount()) << update_interceptor_->GetRequestsAsString(); - EXPECT_EQ(1, get_interceptor_->GetHitCount()); + EXPECT_EQ(1, get_interceptor_count()); const std::string update_request = std::get<0>(update_interceptor_->GetRequests()[0]); @@ -311,8 +319,15 @@ ASSERT_TRUE(ping_interceptor_->ExpectRequest( std::make_unique<update_client::PartialMatch>("eventtype"), ping_response)); - get_interceptor_->SetResponseIgnoreQuery( - GURL("http://localhost/download/v1.crx"), crx_path); + set_interceptor_hook(base::BindLambdaForTesting( + [&](content::URLLoaderInterceptor::RequestParams* params) { + if (params->url_request.url.path() != "/download/v1.crx") + return false; + + content::URLLoaderInterceptor::WriteResponse(crx_path, + params->client.get()); + return true; + })); // Setup fake policy and update check objects. content_verifier_test::ForceInstallProvider policy(kExtensionId); @@ -353,7 +368,7 @@ ASSERT_EQ(1, update_interceptor_->GetCount()) << update_interceptor_->GetRequestsAsString(); - EXPECT_EQ(1, get_interceptor_->GetHitCount()); + EXPECT_EQ(1, get_interceptor_count()); // Make sure that the update check request is formed correctly when the // extension is corrupted: @@ -409,7 +424,7 @@ EXPECT_EQ(0, update_interceptor_->GetCount()) << update_interceptor_->GetRequestsAsString(); - EXPECT_EQ(0, get_interceptor_->GetHitCount()); + EXPECT_EQ(0, get_interceptor_count()); } class PolicyUpdateServiceTest : public ExtensionUpdateClientBaseTest { @@ -455,8 +470,15 @@ const base::FilePath ping_response = test_data_dir_.AppendASCII("updater/ping_reply_1.xml"); - get_interceptor_->SetResponseIgnoreQuery( - GURL("http://localhost/download/v1.crx"), crx_path); + set_interceptor_hook(base::BindLambdaForTesting( + [=](content::URLLoaderInterceptor::RequestParams* params) { + if (params->url_request.url.path() != "/download/v1.crx") + return false; + + content::URLLoaderInterceptor::WriteResponse(crx_path, + params->client.get()); + return true; + })); ASSERT_TRUE(update_interceptor_->ExpectRequest( std::make_unique<update_client::PartialMatch>("<updatecheck/>"), update_response)); @@ -540,7 +562,7 @@ ASSERT_EQ(1, update_interceptor_->GetCount()) << update_interceptor_->GetRequestsAsString(); - EXPECT_EQ(1, get_interceptor_->GetHitCount()); + EXPECT_EQ(1, get_interceptor_count()); // Make sure that the update check request is formed correctly when the // extension is corrupted: @@ -594,7 +616,7 @@ ASSERT_EQ(4, update_interceptor_->GetCount()) << update_interceptor_->GetRequestsAsString(); - EXPECT_EQ(4, get_interceptor_->GetHitCount()); + EXPECT_EQ(4, get_interceptor_count()); const std::vector<base::TimeDelta>& calls = delay_tracker.calls(); @@ -640,7 +662,7 @@ EXPECT_EQ(0, update_interceptor_->GetCount()) << update_interceptor_->GetRequestsAsString(); - EXPECT_EQ(0, get_interceptor_->GetHitCount()); + EXPECT_EQ(0, get_interceptor_count()); } // Now actually test what happens on the next startup after the PRE test above. @@ -665,7 +687,7 @@ ASSERT_EQ(1, update_interceptor_->GetCount()) << update_interceptor_->GetRequestsAsString(); - EXPECT_EQ(1, get_interceptor_->GetHitCount()); + EXPECT_EQ(1, get_interceptor_count()); const std::string update_request = std::get<0>(update_interceptor_->GetRequests()[0]);
diff --git a/chrome/browser/extensions/zipfile_installer_unittest.cc b/chrome/browser/extensions/zipfile_installer_unittest.cc index 98fbaa5..7fbf7d2f 100644 --- a/chrome/browser/extensions/zipfile_installer_unittest.cc +++ b/chrome/browser/extensions/zipfile_installer_unittest.cc
@@ -35,8 +35,7 @@ #if defined(OS_CHROMEOS) #include "chrome/browser/chromeos/login/users/scoped_test_user_manager.h" -#include "chrome/browser/chromeos/settings/cros_settings.h" -#include "chrome/browser/chromeos/settings/device_settings_service.h" +#include "chrome/browser/chromeos/settings/scoped_cros_settings_test_helper.h" #endif namespace extensions { @@ -175,8 +174,7 @@ MockExtensionRegistryObserver observer_; #if defined(OS_CHROMEOS) - chromeos::ScopedTestDeviceSettingsService test_device_settings_service_; - chromeos::ScopedTestCrosSettings test_cros_settings_; + chromeos::ScopedCrosSettingsTestHelper cros_settings_test_helper_; // ChromeOS needs a user manager to instantiate an extension service. chromeos::ScopedTestUserManager test_user_manager_; #endif
diff --git a/chrome/browser/flag_descriptions.cc b/chrome/browser/flag_descriptions.cc index 5fb5141..4cb7f5e0 100644 --- a/chrome/browser/flag_descriptions.cc +++ b/chrome/browser/flag_descriptions.cc
@@ -1402,6 +1402,12 @@ "Forces touchstart, and touchmove event listeners on document level " "targets (which haven't requested otherwise) to be treated as passive."; +const char kPassiveDocumentWheelEventListenersName[] = + "Document Level Wheel Event Listeners Passive Default"; +const char kPassiveDocumentWheelEventListenersDescription[] = + "Forces wheel, and mousewheel event listeners on document level targets " + "(which haven't requested otherwise) to be treated as passive."; + const char kPasswordForceSavingName[] = "Force-saving of passwords"; const char kPasswordForceSavingDescription[] = "Allow the user to manually enforce password saving instead of relying on " @@ -2041,6 +2047,10 @@ const char kWebrtcEchoCanceller3Description[] = "Experimental WebRTC echo canceller (AEC3)."; +const char kWebrtcHybridAgcName[] = "WebRTC hybrid Agc2/Agc1."; +const char kWebrtcHybridAgcDescription[] = + "WebRTC Agc2 digital adaptation with Agc1 analog adaptation."; + const char kWebrtcHwDecodingName[] = "WebRTC hardware video decoding"; const char kWebrtcHwDecodingDescription[] = "Support in WebRTC for decoding video streams using platform hardware.";
diff --git a/chrome/browser/flag_descriptions.h b/chrome/browser/flag_descriptions.h index 7984625b..7914d2a 100644 --- a/chrome/browser/flag_descriptions.h +++ b/chrome/browser/flag_descriptions.h
@@ -862,6 +862,9 @@ extern const char kPassiveDocumentEventListenersName[]; extern const char kPassiveDocumentEventListenersDescription[]; +extern const char kPassiveDocumentWheelEventListenersName[]; +extern const char kPassiveDocumentWheelEventListenersDescription[]; + extern const char kPasswordForceSavingName[]; extern const char kPasswordForceSavingDescription[]; @@ -1237,6 +1240,9 @@ extern const char kWebrtcEchoCanceller3Name[]; extern const char kWebrtcEchoCanceller3Description[]; +extern const char kWebrtcHybridAgcName[]; +extern const char kWebrtcHybridAgcDescription[]; + extern const char kWebrtcHwDecodingName[]; extern const char kWebrtcHwDecodingDescription[];
diff --git a/chrome/browser/media/android/remote/OWNERS b/chrome/browser/media/android/remote/OWNERS deleted file mode 100644 index 42175cf1..0000000 --- a/chrome/browser/media/android/remote/OWNERS +++ /dev/null
@@ -1,2 +0,0 @@ -aberent@chromium.org -dgn@chromium.org
diff --git a/chrome/browser/media/capture_access_handler_base.cc b/chrome/browser/media/capture_access_handler_base.cc index 7b6fd50..194fb46 100644 --- a/chrome/browser/media/capture_access_handler_base.cc +++ b/chrome/browser/media/capture_access_handler_base.cc
@@ -4,6 +4,7 @@ #include "chrome/browser/media/capture_access_handler_base.h" +#include <string> #include <utility> #include "base/strings/string_number_conversions.h" @@ -26,7 +27,7 @@ // Extensions control the routing of the captured MediaStream content. // Therefore, only built-in extensions (and certain whitelisted ones) can be // trusted to set-up secure links. - bool is_extension_trusted; + bool is_trusted; // This is true only if all connected video sinks are reported secure. bool is_capturing_link_secure; @@ -39,9 +40,9 @@ void CaptureAccessHandlerBase::AddCaptureSession(int render_process_id, int render_frame_id, int page_request_id, - bool is_extension_trusted) { + bool is_trusted) { Session session = {render_process_id, render_frame_id, page_request_id, - is_extension_trusted, true}; + is_trusted, true}; sessions_.push_back(session); } @@ -74,7 +75,8 @@ content::MediaRequestState state) { DCHECK_CURRENTLY_ON(BrowserThread::UI); if ((stream_type != content::MEDIA_GUM_DESKTOP_VIDEO_CAPTURE) && - (stream_type != content::MEDIA_GUM_TAB_VIDEO_CAPTURE)) + (stream_type != content::MEDIA_GUM_TAB_VIDEO_CAPTURE) && + (stream_type != content::MEDIA_DISPLAY_VIDEO_CAPTURE)) return; if (state == content::MEDIA_REQUEST_STATE_DONE) { @@ -99,32 +101,36 @@ void CaptureAccessHandlerBase::UpdateExtensionTrusted( const content::MediaStreamRequest& request, const extensions::Extension* extension) { - bool is_extension_trusted = - MediaCaptureDevicesDispatcher::IsOriginForCasting( - request.security_origin) || - IsExtensionWhitelistedForScreenCapture(extension) || - IsBuiltInExtension(request.security_origin); + const bool is_trusted = MediaCaptureDevicesDispatcher::IsOriginForCasting( + request.security_origin) || + IsExtensionWhitelistedForScreenCapture(extension) || + IsBuiltInExtension(request.security_origin); + UpdateTrusted(request, is_trusted); +} +void CaptureAccessHandlerBase::UpdateTrusted( + const content::MediaStreamRequest& request, + bool is_trusted) { std::list<CaptureAccessHandlerBase::Session>::iterator it = FindSession(request.render_process_id, request.render_frame_id, request.page_request_id); if (it != sessions_.end()) { - it->is_extension_trusted = is_extension_trusted; - DVLOG(2) << "CaptureAccessHandlerBase::UpdateExtensionTrusted" + it->is_trusted = is_trusted; + DVLOG(2) << "CaptureAccessHandlerBase::UpdateTrusted" << " render_process_id: " << request.render_process_id << " render_frame_id: " << request.render_frame_id - << "page_request_id: " << request.page_request_id - << " is_extension_trusted: " << is_extension_trusted; + << " page_request_id: " << request.page_request_id + << " is_trusted: " << is_trusted; return; } AddCaptureSession(request.render_process_id, request.render_frame_id, - request.page_request_id, is_extension_trusted); - DVLOG(2) << "Add new session while UpdateExtensionTrusted" + request.page_request_id, is_trusted); + DVLOG(2) << "Add new session while UpdateTrusted" << " render_process_id: " << request.render_process_id << " render_frame_id: " << request.render_frame_id << " page_request_id: " << request.page_request_id - << " is_extension_trusted: " << is_extension_trusted; + << " is_trusted: " << is_trusted; } bool CaptureAccessHandlerBase::IsInsecureCapturingInProgress( @@ -136,7 +142,7 @@ if (session.render_process_id != render_process_id || session.render_frame_id != render_frame_id) continue; - if (!session.is_extension_trusted || !session.is_capturing_link_secure) + if (!session.is_trusted || !session.is_capturing_link_secure) return true; } return false;
diff --git a/chrome/browser/media/capture_access_handler_base.h b/chrome/browser/media/capture_access_handler_base.h index 7e22fe9..0658c0f 100644 --- a/chrome/browser/media/capture_access_handler_base.h +++ b/chrome/browser/media/capture_access_handler_base.h
@@ -30,12 +30,12 @@ // deemed secure if all connected video sinks are reported secure and the // connections to the sinks are being managed by a trusted extension. bool IsInsecureCapturingInProgress(int render_process_id, - int render_frame_id); + int render_frame_id) override; void UpdateCapturingLinkSecured(int render_process_id, int render_frame_id, int page_request_id, - bool is_secure); + bool is_secure) override; protected: static bool IsExtensionWhitelistedForScreenCapture( @@ -46,13 +46,16 @@ void UpdateExtensionTrusted(const content::MediaStreamRequest& request, const extensions::Extension* extension); + void UpdateTrusted(const content::MediaStreamRequest& request, + bool is_trusted); + private: struct Session; void AddCaptureSession(int render_process_id, int render_frame_id, int page_request_id, - bool is_extension_trusted); + bool is_trusted); void RemoveCaptureSession(int render_process_id, int render_frame_id,
diff --git a/chrome/browser/media/media_access_handler.cc b/chrome/browser/media/media_access_handler.cc index f822eba4..318aa88b 100644 --- a/chrome/browser/media/media_access_handler.cc +++ b/chrome/browser/media/media_access_handler.cc
@@ -4,6 +4,7 @@ #include "chrome/browser/media/media_access_handler.h" +#include <memory> #include <utility> #include "chrome/browser/media/webrtc/media_capture_devices_dispatcher.h" @@ -11,6 +12,11 @@ #include "chrome/browser/profiles/profile.h" #include "content/public/browser/web_contents.h" +bool MediaAccessHandler::IsInsecureCapturingInProgress(int render_process_id, + int render_frame_id) { + return false; +} + // static void MediaAccessHandler::CheckDevicesAndRunCallback( content::WebContents* web_contents,
diff --git a/chrome/browser/media/media_access_handler.h b/chrome/browser/media/media_access_handler.h index af5b9cc..fd93a9a 100644 --- a/chrome/browser/media/media_access_handler.h +++ b/chrome/browser/media/media_access_handler.h
@@ -29,6 +29,7 @@ virtual bool SupportsStreamType(content::WebContents* web_contents, const content::MediaStreamType type, const extensions::Extension* extension) = 0; + // Check media access permission. |extension| is set to NULL if request was // made from a drive-by page. virtual bool CheckMediaAccessPermission( @@ -36,12 +37,14 @@ const GURL& security_origin, content::MediaStreamType type, const extensions::Extension* extension) = 0; + // Process media access requests. |extension| is set to NULL if request was // made from a drive-by page. virtual void HandleRequest(content::WebContents* web_contents, const content::MediaStreamRequest& request, content::MediaResponseCallback callback, const extensions::Extension* extension) = 0; + // Update media request state. Called on UI thread. virtual void UpdateMediaRequestState(int render_process_id, int render_frame_id, @@ -49,6 +52,18 @@ content::MediaStreamType stream_type, content::MediaRequestState state) {} + // Return true if there is any ongoing insecured capturing. The capturing is + // deemed secure if all connected video sinks are reported secure and the + // connections to the sinks are being managed by a trusted source. + virtual bool IsInsecureCapturingInProgress(int render_process_id, + int render_frame_id); + + // Update any ongoing insecured capturing state. + virtual void UpdateCapturingLinkSecured(int render_process_id, + int render_frame_id, + int page_request_id, + bool is_secure) {} + protected: // Helper function for derived classes which takes in whether audio/video // permissions are allowed and queries for the requested devices, running the
diff --git a/chrome/browser/media/webrtc/desktop_capture_access_handler.cc b/chrome/browser/media/webrtc/desktop_capture_access_handler.cc index 09a3b40..b4d1196 100644 --- a/chrome/browser/media/webrtc/desktop_capture_access_handler.cc +++ b/chrome/browser/media/webrtc/desktop_capture_access_handler.cc
@@ -4,13 +4,15 @@ #include "chrome/browser/media/webrtc/desktop_capture_access_handler.h" -#include <utility> +#include <memory> +#include <string> #include "base/command_line.h" #include "base/strings/string_number_conversions.h" #include "base/strings/string_util.h" #include "base/strings/utf_string_conversions.h" #include "build/build_config.h" +#include "chrome/browser/media/webrtc/desktop_capture_devices_util.h" #include "chrome/browser/media/webrtc/media_capture_devices_dispatcher.h" #include "chrome/browser/media/webrtc/media_stream_capture_indicator.h" #include "chrome/browser/ui/browser.h" @@ -21,7 +23,6 @@ #include "chrome/common/chrome_switches.h" #include "chrome/grit/generated_resources.h" #include "content/public/browser/browser_thread.h" -#include "content/public/browser/desktop_media_id.h" #include "content/public/browser/desktop_streams_registry.h" #include "content/public/browser/render_frame_host.h" #include "content/public/browser/render_process_host.h" @@ -33,7 +34,6 @@ #include "extensions/common/constants.h" #include "extensions/common/extension.h" #include "extensions/common/switches.h" -#include "media/audio/audio_device_description.h" #include "net/base/url_util.h" #include "third_party/webrtc/modules/desktop_capture/desktop_capture_types.h" #include "ui/base/l10n/l10n_util.h" @@ -73,136 +73,6 @@ extension->location() == extensions::Manifest::EXTERNAL_COMPONENT)); } -base::string16 GetStopSharingUIString( - const base::string16& application_title, - const base::string16& registered_extension_name, - bool capture_audio, - content::DesktopMediaID::Type capture_type) { - if (!capture_audio) { - if (application_title == registered_extension_name) { - switch (capture_type) { - case content::DesktopMediaID::TYPE_SCREEN: - return l10n_util::GetStringFUTF16( - IDS_MEDIA_SCREEN_CAPTURE_NOTIFICATION_TEXT, application_title); - case content::DesktopMediaID::TYPE_WINDOW: - return l10n_util::GetStringFUTF16( - IDS_MEDIA_WINDOW_CAPTURE_NOTIFICATION_TEXT, application_title); - case content::DesktopMediaID::TYPE_WEB_CONTENTS: - return l10n_util::GetStringFUTF16( - IDS_MEDIA_TAB_CAPTURE_NOTIFICATION_TEXT, application_title); - case content::DesktopMediaID::TYPE_NONE: - NOTREACHED(); - } - } else { - switch (capture_type) { - case content::DesktopMediaID::TYPE_SCREEN: - return l10n_util::GetStringFUTF16( - IDS_MEDIA_SCREEN_CAPTURE_NOTIFICATION_TEXT_DELEGATED, - registered_extension_name, application_title); - case content::DesktopMediaID::TYPE_WINDOW: - return l10n_util::GetStringFUTF16( - IDS_MEDIA_WINDOW_CAPTURE_NOTIFICATION_TEXT_DELEGATED, - registered_extension_name, application_title); - case content::DesktopMediaID::TYPE_WEB_CONTENTS: - return l10n_util::GetStringFUTF16( - IDS_MEDIA_TAB_CAPTURE_NOTIFICATION_TEXT_DELEGATED, - registered_extension_name, application_title); - case content::DesktopMediaID::TYPE_NONE: - NOTREACHED(); - } - } - } else { // The case with audio - if (application_title == registered_extension_name) { - switch (capture_type) { - case content::DesktopMediaID::TYPE_SCREEN: - return l10n_util::GetStringFUTF16( - IDS_MEDIA_SCREEN_CAPTURE_WITH_AUDIO_NOTIFICATION_TEXT, - application_title); - case content::DesktopMediaID::TYPE_WEB_CONTENTS: - return l10n_util::GetStringFUTF16( - IDS_MEDIA_TAB_CAPTURE_WITH_AUDIO_NOTIFICATION_TEXT, - application_title); - case content::DesktopMediaID::TYPE_NONE: - case content::DesktopMediaID::TYPE_WINDOW: - NOTREACHED(); - } - } else { - switch (capture_type) { - case content::DesktopMediaID::TYPE_SCREEN: - return l10n_util::GetStringFUTF16( - IDS_MEDIA_SCREEN_CAPTURE_WITH_AUDIO_NOTIFICATION_TEXT_DELEGATED, - registered_extension_name, application_title); - case content::DesktopMediaID::TYPE_WEB_CONTENTS: - return l10n_util::GetStringFUTF16( - IDS_MEDIA_TAB_CAPTURE_WITH_AUDIO_NOTIFICATION_TEXT_DELEGATED, - registered_extension_name, application_title); - case content::DesktopMediaID::TYPE_NONE: - case content::DesktopMediaID::TYPE_WINDOW: - NOTREACHED(); - } - } - } - return base::string16(); -} -// Helper to get list of media stream devices for desktop capture in |devices|. -// Registers to display notification if |display_notification| is true. -// Returns an instance of MediaStreamUI to be passed to content layer. -std::unique_ptr<content::MediaStreamUI> GetDevicesForDesktopCapture( - content::WebContents* web_contents, - content::MediaStreamDevices* devices, - content::DesktopMediaID media_id, - bool capture_audio, - bool disable_local_echo, - bool display_notification, - const base::string16& application_title, - const base::string16& registered_extension_name) { - DCHECK_CURRENTLY_ON(BrowserThread::UI); - - DVLOG(2) << __func__ << ": media_id " << media_id.ToString() - << ", capture_audio " << capture_audio << ", disable_local_echo " - << disable_local_echo << ", display_notification " - << display_notification << ", application_title " - << application_title << ", extension_name " - << registered_extension_name; - - // Add selected desktop source to the list. - devices->push_back( - content::MediaStreamDevice(content::MEDIA_GUM_DESKTOP_VIDEO_CAPTURE, - media_id.ToString(), media_id.ToString())); - if (capture_audio) { - if (media_id.type == content::DesktopMediaID::TYPE_WEB_CONTENTS) { - content::WebContentsMediaCaptureId web_id = media_id.web_contents_id; - web_id.disable_local_echo = disable_local_echo; - devices->push_back( - content::MediaStreamDevice(content::MEDIA_GUM_DESKTOP_AUDIO_CAPTURE, - web_id.ToString(), "Tab audio")); - } else if (disable_local_echo) { - // Use the special loopback device ID for system audio capture. - devices->push_back(content::MediaStreamDevice( - content::MEDIA_GUM_DESKTOP_AUDIO_CAPTURE, - media::AudioDeviceDescription::kLoopbackWithMuteDeviceId, - "System Audio")); - } else { - // Use the special loopback device ID for system audio capture. - devices->push_back(content::MediaStreamDevice( - content::MEDIA_GUM_DESKTOP_AUDIO_CAPTURE, - media::AudioDeviceDescription::kLoopbackInputDeviceId, - "System Audio")); - } - } - - // If required, register to display the notification for stream capture. - std::unique_ptr<ScreenCaptureNotificationUI> notification_ui; - if (display_notification) { - notification_ui = ScreenCaptureNotificationUI::Create( - GetStopSharingUIString(application_title, registered_extension_name, - capture_audio, media_id.type)); - } - - return MediaCaptureDevicesDispatcher::GetInstance() - ->GetMediaStreamCaptureIndicator() - ->RegisterMediaStream(web_contents, *devices, std::move(notification_ui)); -} #if !defined(OS_ANDROID) // Find browser or app window from a given |web_contents|. @@ -341,7 +211,9 @@ const bool display_notification = ShouldDisplayNotification(extension); ui = GetDevicesForDesktopCapture( - web_contents, &devices, screen_id, capture_audio, + web_contents, &devices, screen_id, + content::MEDIA_GUM_DESKTOP_VIDEO_CAPTURE, + content::MEDIA_GUM_DESKTOP_AUDIO_CAPTURE, capture_audio, request.disable_local_echo, display_notification, application_title, application_title); DCHECK(!devices.empty()); @@ -464,6 +336,8 @@ const bool display_notification = ShouldDisplayNotification(extension); ui = GetDevicesForDesktopCapture(web_contents, &devices, media_id, + content::MEDIA_GUM_DESKTOP_VIDEO_CAPTURE, + content::MEDIA_GUM_DESKTOP_AUDIO_CAPTURE, capture_audio, request.disable_local_echo, display_notification, GetApplicationTitle(web_contents, extension),
diff --git a/chrome/browser/media/webrtc/desktop_capture_access_handler.h b/chrome/browser/media/webrtc/desktop_capture_access_handler.h index 6d3bd7bb..c5991fb7 100644 --- a/chrome/browser/media/webrtc/desktop_capture_access_handler.h +++ b/chrome/browser/media/webrtc/desktop_capture_access_handler.h
@@ -6,6 +6,7 @@ #define CHROME_BROWSER_MEDIA_WEBRTC_DESKTOP_CAPTURE_ACCESS_HANDLER_H_ #include <list> +#include <utility> #include "chrome/browser/media/capture_access_handler_base.h" #include "chrome/browser/media/media_access_handler.h" @@ -14,7 +15,9 @@ class Extension; } -// MediaAccessHandler for DesktopCapture API. +// MediaAccessHandler for DesktopCapture API requests that originate from +// getUserMedia() calls. Note that getDisplayMedia() calls are handled in +// DisplayMediaAccessHandler. class DesktopCaptureAccessHandler : public CaptureAccessHandlerBase { public: DesktopCaptureAccessHandler();
diff --git a/chrome/browser/media/webrtc/desktop_capture_devices_util.cc b/chrome/browser/media/webrtc/desktop_capture_devices_util.cc new file mode 100644 index 0000000..ab79f5a --- /dev/null +++ b/chrome/browser/media/webrtc/desktop_capture_devices_util.cc
@@ -0,0 +1,149 @@ +// 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/media/webrtc/desktop_capture_devices_util.h" + +#include <string> +#include <utility> + +#include "base/strings/string_util.h" +#include "chrome/browser/media/webrtc/media_capture_devices_dispatcher.h" +#include "chrome/browser/ui/screen_capture_notification_ui.h" +#include "chrome/grit/generated_resources.h" +#include "content/public/browser/browser_thread.h" +#include "media/audio/audio_device_description.h" +#include "ui/base/l10n/l10n_util.h" + +namespace { + +base::string16 GetStopSharingUIString( + const base::string16& application_title, + const base::string16& registered_extension_name, + bool capture_audio, + content::DesktopMediaID::Type capture_type) { + if (!capture_audio) { + if (application_title == registered_extension_name) { + switch (capture_type) { + case content::DesktopMediaID::TYPE_SCREEN: + return l10n_util::GetStringFUTF16( + IDS_MEDIA_SCREEN_CAPTURE_NOTIFICATION_TEXT, application_title); + case content::DesktopMediaID::TYPE_WINDOW: + return l10n_util::GetStringFUTF16( + IDS_MEDIA_WINDOW_CAPTURE_NOTIFICATION_TEXT, application_title); + case content::DesktopMediaID::TYPE_WEB_CONTENTS: + return l10n_util::GetStringFUTF16( + IDS_MEDIA_TAB_CAPTURE_NOTIFICATION_TEXT, application_title); + case content::DesktopMediaID::TYPE_NONE: + NOTREACHED(); + } + } else { + switch (capture_type) { + case content::DesktopMediaID::TYPE_SCREEN: + return l10n_util::GetStringFUTF16( + IDS_MEDIA_SCREEN_CAPTURE_NOTIFICATION_TEXT_DELEGATED, + registered_extension_name, application_title); + case content::DesktopMediaID::TYPE_WINDOW: + return l10n_util::GetStringFUTF16( + IDS_MEDIA_WINDOW_CAPTURE_NOTIFICATION_TEXT_DELEGATED, + registered_extension_name, application_title); + case content::DesktopMediaID::TYPE_WEB_CONTENTS: + return l10n_util::GetStringFUTF16( + IDS_MEDIA_TAB_CAPTURE_NOTIFICATION_TEXT_DELEGATED, + registered_extension_name, application_title); + case content::DesktopMediaID::TYPE_NONE: + NOTREACHED(); + } + } + } else { // The case with audio + if (application_title == registered_extension_name) { + switch (capture_type) { + case content::DesktopMediaID::TYPE_SCREEN: + return l10n_util::GetStringFUTF16( + IDS_MEDIA_SCREEN_CAPTURE_WITH_AUDIO_NOTIFICATION_TEXT, + application_title); + case content::DesktopMediaID::TYPE_WEB_CONTENTS: + return l10n_util::GetStringFUTF16( + IDS_MEDIA_TAB_CAPTURE_WITH_AUDIO_NOTIFICATION_TEXT, + application_title); + case content::DesktopMediaID::TYPE_NONE: + case content::DesktopMediaID::TYPE_WINDOW: + NOTREACHED(); + } + } else { + switch (capture_type) { + case content::DesktopMediaID::TYPE_SCREEN: + return l10n_util::GetStringFUTF16( + IDS_MEDIA_SCREEN_CAPTURE_WITH_AUDIO_NOTIFICATION_TEXT_DELEGATED, + registered_extension_name, application_title); + case content::DesktopMediaID::TYPE_WEB_CONTENTS: + return l10n_util::GetStringFUTF16( + IDS_MEDIA_TAB_CAPTURE_WITH_AUDIO_NOTIFICATION_TEXT_DELEGATED, + registered_extension_name, application_title); + case content::DesktopMediaID::TYPE_NONE: + case content::DesktopMediaID::TYPE_WINDOW: + NOTREACHED(); + } + } + } + return base::string16(); +} + +} // namespace + +std::unique_ptr<content::MediaStreamUI> GetDevicesForDesktopCapture( + content::WebContents* web_contents, + content::MediaStreamDevices* devices, + content::DesktopMediaID media_id, + content::MediaStreamType devices_video_type, + content::MediaStreamType devices_audio_type, + bool capture_audio, + bool disable_local_echo, + bool display_notification, + const base::string16& application_title, + const base::string16& registered_extension_name) { + DCHECK_CURRENTLY_ON(content::BrowserThread::UI); + + DVLOG(2) << __func__ << ": media_id " << media_id.ToString() + << ", capture_audio " << capture_audio << ", disable_local_echo " + << disable_local_echo << ", display_notification " + << display_notification << ", application_title " + << application_title << ", extension_name " + << registered_extension_name; + + // Add selected desktop source to the list. + devices->push_back(content::MediaStreamDevice( + devices_video_type, media_id.ToString(), media_id.ToString())); + if (capture_audio) { + if (media_id.type == content::DesktopMediaID::TYPE_WEB_CONTENTS) { + content::WebContentsMediaCaptureId web_id = media_id.web_contents_id; + web_id.disable_local_echo = disable_local_echo; + devices->push_back(content::MediaStreamDevice( + devices_audio_type, web_id.ToString(), "Tab audio")); + } else if (disable_local_echo) { + // Use the special loopback device ID for system audio capture. + devices->push_back(content::MediaStreamDevice( + devices_audio_type, + media::AudioDeviceDescription::kLoopbackWithMuteDeviceId, + "System Audio")); + } else { + // Use the special loopback device ID for system audio capture. + devices->push_back(content::MediaStreamDevice( + devices_audio_type, + media::AudioDeviceDescription::kLoopbackInputDeviceId, + "System Audio")); + } + } + + // If required, register to display the notification for stream capture. + std::unique_ptr<ScreenCaptureNotificationUI> notification_ui; + if (display_notification) { + notification_ui = ScreenCaptureNotificationUI::Create( + GetStopSharingUIString(application_title, registered_extension_name, + capture_audio, media_id.type)); + } + + return MediaCaptureDevicesDispatcher::GetInstance() + ->GetMediaStreamCaptureIndicator() + ->RegisterMediaStream(web_contents, *devices, std::move(notification_ui)); +}
diff --git a/chrome/browser/media/webrtc/desktop_capture_devices_util.h b/chrome/browser/media/webrtc/desktop_capture_devices_util.h new file mode 100644 index 0000000..637878135 --- /dev/null +++ b/chrome/browser/media/webrtc/desktop_capture_devices_util.h
@@ -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. + +#ifndef CHROME_BROWSER_MEDIA_WEBRTC_DESKTOP_CAPTURE_DEVICES_UTIL_H_ +#define CHROME_BROWSER_MEDIA_WEBRTC_DESKTOP_CAPTURE_DEVICES_UTIL_H_ + +#include <memory> + +#include "base/strings/string_util.h" +#include "content/public/browser/desktop_media_id.h" +#include "content/public/browser/web_contents.h" +#include "content/public/common/media_stream_request.h" + +// Helper to get list of media stream devices for desktop capture in |devices|. +// Registers to display notification if |display_notification| is true. +// Returns an instance of MediaStreamUI to be passed to content layer. +std::unique_ptr<content::MediaStreamUI> GetDevicesForDesktopCapture( + content::WebContents* web_contents, + content::MediaStreamDevices* devices, + content::DesktopMediaID media_id, + content::MediaStreamType devices_video_type, + content::MediaStreamType devices_audio_type, + bool capture_audio, + bool disable_local_echo, + bool display_notification, + const base::string16& application_title, + const base::string16& registered_extension_name); + +#endif // CHROME_BROWSER_MEDIA_WEBRTC_DESKTOP_CAPTURE_DEVICES_UTIL_H_
diff --git a/chrome/browser/media/webrtc/display_media_access_handler.cc b/chrome/browser/media/webrtc/display_media_access_handler.cc new file mode 100644 index 0000000..3af4185 --- /dev/null +++ b/chrome/browser/media/webrtc/display_media_access_handler.cc
@@ -0,0 +1,221 @@ +// 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/media/webrtc/display_media_access_handler.h" + +#include <utility> +#include <vector> + +#include "base/bind.h" +#include "base/callback.h" +#include "base/strings/utf_string_conversions.h" +#include "build/build_config.h" +#include "chrome/browser/media/webrtc/desktop_capture_devices_util.h" +#include "chrome/browser/media/webrtc/desktop_media_picker_factory_impl.h" +#include "chrome/browser/media/webrtc/native_desktop_media_list.h" +#include "chrome/browser/media/webrtc/tab_desktop_media_list.h" +#include "content/public/browser/browser_thread.h" +#include "content/public/browser/desktop_capture.h" +#include "content/public/browser/notification_service.h" +#include "content/public/browser/notification_types.h" +#include "content/public/browser/render_frame_host.h" +#include "content/public/browser/render_process_host.h" +#include "content/public/browser/web_contents.h" + +// Holds pending request information so that we display one picker UI at a time +// for each content::WebContents. +struct DisplayMediaAccessHandler::PendingAccessRequest { + PendingAccessRequest(std::unique_ptr<DesktopMediaPicker> picker, + const content::MediaStreamRequest& request, + content::MediaResponseCallback callback) + : picker(std::move(picker)), + request(request), + callback(std::move(callback)) {} + ~PendingAccessRequest() = default; + + std::unique_ptr<DesktopMediaPicker> picker; + content::MediaStreamRequest request; + content::MediaResponseCallback callback; +}; + +DisplayMediaAccessHandler::DisplayMediaAccessHandler() + : picker_factory_(new DesktopMediaPickerFactoryImpl()) { + AddNotificationObserver(); +} + +DisplayMediaAccessHandler::DisplayMediaAccessHandler( + std::unique_ptr<DesktopMediaPickerFactory> picker_factory, + bool display_notification) + : display_notification_(display_notification), + picker_factory_(std::move(picker_factory)) { + AddNotificationObserver(); +} + +DisplayMediaAccessHandler::~DisplayMediaAccessHandler() = default; + +bool DisplayMediaAccessHandler::SupportsStreamType( + content::WebContents* web_contents, + const content::MediaStreamType stream_type, + const extensions::Extension* extension) { + return stream_type == content::MEDIA_DISPLAY_VIDEO_CAPTURE; +} + +bool DisplayMediaAccessHandler::CheckMediaAccessPermission( + content::RenderFrameHost* render_frame_host, + const GURL& security_origin, + content::MediaStreamType type, + const extensions::Extension* extension) { + return false; +} + +void DisplayMediaAccessHandler::HandleRequest( + content::WebContents* web_contents, + const content::MediaStreamRequest& request, + content::MediaResponseCallback callback, + const extensions::Extension* extension) { + DCHECK_CURRENTLY_ON(content::BrowserThread::UI); + + std::unique_ptr<DesktopMediaPicker> picker = picker_factory_->CreatePicker(); + if (!picker) { + std::move(callback).Run(content::MediaStreamDevices(), + content::MEDIA_DEVICE_INVALID_STATE, nullptr); + return; + } + + RequestsQueue& queue = pending_requests_[web_contents]; + queue.push_back(std::make_unique<PendingAccessRequest>( + std::move(picker), request, std::move(callback))); + // If this is the only request then pop picker UI. + if (queue.size() == 1) + ProcessQueuedAccessRequest(queue, web_contents); +} + +void DisplayMediaAccessHandler::UpdateMediaRequestState( + int render_process_id, + int render_frame_id, + int page_request_id, + content::MediaStreamType stream_type, + content::MediaRequestState state) { + DCHECK_CURRENTLY_ON(content::BrowserThread::UI); + + if (state != content::MEDIA_REQUEST_STATE_DONE && + state != content::MEDIA_REQUEST_STATE_CLOSING) { + return; + } + + if (state == content::MEDIA_REQUEST_STATE_CLOSING) { + DeletePendingAccessRequest(render_process_id, render_frame_id, + page_request_id); + } + CaptureAccessHandlerBase::UpdateMediaRequestState( + render_process_id, render_frame_id, page_request_id, stream_type, state); + + // This method only gets called with the above checked states when all + // requests are to be canceled. Therefore, we don't need to process the + // next queued request. +} + +void DisplayMediaAccessHandler::ProcessQueuedAccessRequest( + const RequestsQueue& queue, + content::WebContents* web_contents) { + DCHECK_CURRENTLY_ON(content::BrowserThread::UI); + + const PendingAccessRequest& pending_request = *queue.front(); + UpdateTrusted(pending_request.request, false /* is_trusted */); + + std::vector<content::DesktopMediaID::Type> media_types = { + content::DesktopMediaID::TYPE_SCREEN, + content::DesktopMediaID::TYPE_WINDOW, + content::DesktopMediaID::TYPE_WEB_CONTENTS}; + auto source_lists = picker_factory_->CreateMediaList(media_types); + + DesktopMediaPicker::DoneCallback done_callback = + base::BindRepeating(&DisplayMediaAccessHandler::OnPickerDialogResults, + base::Unretained(this), web_contents); + DesktopMediaPicker::Params picker_params; + picker_params.web_contents = web_contents; + gfx::NativeWindow parent_window = web_contents->GetTopLevelNativeWindow(); + picker_params.context = parent_window; + picker_params.parent = parent_window; + picker_params.app_name = web_contents->GetTitle(); + picker_params.target_name = web_contents->GetTitle(); + picker_params.request_audio = false; + pending_request.picker->Show(picker_params, std::move(source_lists), + done_callback); +} + +void DisplayMediaAccessHandler::OnPickerDialogResults( + content::WebContents* web_contents, + content::DesktopMediaID media_id) { + DCHECK_CURRENTLY_ON(content::BrowserThread::UI); + DCHECK(web_contents); + + auto it = pending_requests_.find(web_contents); + if (it == pending_requests_.end()) + return; + RequestsQueue& queue = it->second; + if (queue.empty()) { + // UpdateMediaRequestState() called with MEDIA_REQUEST_STATE_CLOSING. Don't + // need to do anything. + return; + } + + PendingAccessRequest& pending_request = *queue.front(); + content::MediaStreamDevices devices; + content::MediaStreamRequestResult request_result = + content::MEDIA_DEVICE_PERMISSION_DENIED; + std::unique_ptr<content::MediaStreamUI> ui; + if (media_id.is_null()) { + request_result = content::MEDIA_DEVICE_PERMISSION_DENIED; + } else { + request_result = content::MEDIA_DEVICE_OK; + ui = GetDevicesForDesktopCapture( + web_contents, &devices, media_id, content::MEDIA_DISPLAY_VIDEO_CAPTURE, + content::MEDIA_NO_SERVICE, false /* capture_audio */, + false /* disable_local_echo */, display_notification_, + web_contents->GetTitle(), web_contents->GetTitle()); + } + + std::move(pending_request.callback) + .Run(devices, request_result, std::move(ui)); + queue.pop_front(); + + if (!queue.empty()) + ProcessQueuedAccessRequest(queue, web_contents); +} + +void DisplayMediaAccessHandler::AddNotificationObserver() { + DCHECK_CURRENTLY_ON(content::BrowserThread::UI); + notifications_registrar_.Add(this, + content::NOTIFICATION_WEB_CONTENTS_DESTROYED, + content::NotificationService::AllSources()); +} + +void DisplayMediaAccessHandler::Observe( + int type, + const content::NotificationSource& source, + const content::NotificationDetails& details) { + DCHECK_CURRENTLY_ON(content::BrowserThread::UI); + DCHECK_EQ(content::NOTIFICATION_WEB_CONTENTS_DESTROYED, type); + + pending_requests_.erase(content::Source<content::WebContents>(source).ptr()); +} + +void DisplayMediaAccessHandler::DeletePendingAccessRequest( + int render_process_id, + int render_frame_id, + int page_request_id) { + for (auto& queue_it : pending_requests_) { + RequestsQueue& queue = queue_it.second; + for (auto it = queue.begin(); it != queue.end(); ++it) { + const PendingAccessRequest& pending_request = **it; + if (pending_request.request.render_process_id == render_process_id && + pending_request.request.render_frame_id == render_frame_id && + pending_request.request.page_request_id == page_request_id) { + queue.erase(it); + return; + } + } + } +}
diff --git a/chrome/browser/media/webrtc/display_media_access_handler.h b/chrome/browser/media/webrtc/display_media_access_handler.h new file mode 100644 index 0000000..daa4146 --- /dev/null +++ b/chrome/browser/media/webrtc/display_media_access_handler.h
@@ -0,0 +1,88 @@ +// 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_MEDIA_WEBRTC_DISPLAY_MEDIA_ACCESS_HANDLER_H_ +#define CHROME_BROWSER_MEDIA_WEBRTC_DISPLAY_MEDIA_ACCESS_HANDLER_H_ + +#include <memory> + +#include "base/containers/flat_map.h" +#include "base/macros.h" +#include "chrome/browser/media/capture_access_handler_base.h" +#include "chrome/browser/media/media_access_handler.h" +#include "chrome/browser/media/webrtc/desktop_media_list.h" +#include "chrome/browser/media/webrtc/desktop_media_picker.h" +#include "chrome/browser/media/webrtc/desktop_media_picker_factory.h" +#include "content/public/browser/desktop_media_id.h" +#include "content/public/browser/notification_observer.h" +#include "content/public/browser/notification_registrar.h" + +namespace extensions { +class Extension; +} + +// MediaAccessHandler for getDisplayMedia API, see +// https://w3c.github.io/mediacapture-screen-share. +class DisplayMediaAccessHandler : public CaptureAccessHandlerBase, + public content::NotificationObserver { + public: + DisplayMediaAccessHandler(); + DisplayMediaAccessHandler( + std::unique_ptr<DesktopMediaPickerFactory> picker_factory, + bool display_notification); + ~DisplayMediaAccessHandler() override; + + // MediaAccessHandler implementation. + bool SupportsStreamType(content::WebContents* web_contents, + const content::MediaStreamType stream_type, + const extensions::Extension* extension) override; + bool CheckMediaAccessPermission( + content::RenderFrameHost* render_frame_host, + const GURL& security_origin, + content::MediaStreamType type, + const extensions::Extension* extension) override; + void HandleRequest(content::WebContents* web_contents, + const content::MediaStreamRequest& request, + content::MediaResponseCallback callback, + const extensions::Extension* extension) override; + void UpdateMediaRequestState(int render_process_id, + int render_frame_id, + int page_request_id, + content::MediaStreamType stream_type, + content::MediaRequestState state) override; + + private: + friend class DisplayMediaAccessHandlerTest; + + struct PendingAccessRequest; + using RequestsQueue = + base::circular_deque<std::unique_ptr<PendingAccessRequest>>; + using RequestsQueues = base::flat_map<content::WebContents*, RequestsQueue>; + + void ProcessQueuedAccessRequest(const RequestsQueue& queue, + content::WebContents* web_contents); + + void OnPickerDialogResults(content::WebContents* web_contents, + content::DesktopMediaID source); + + void AddNotificationObserver(); + + // content::NotificationObserver implementation. + void Observe(int type, + const content::NotificationSource& source, + const content::NotificationDetails& details) override; + + void DeletePendingAccessRequest(int render_process_id, + int render_frame_id, + int page_request_id); + + bool display_notification_ = true; + std::unique_ptr<DesktopMediaPickerFactory> picker_factory_; + RequestsQueues pending_requests_; + content::NotificationRegistrar notifications_registrar_; + + DISALLOW_COPY_AND_ASSIGN(DisplayMediaAccessHandler); +}; + +#endif // CHROME_BROWSER_MEDIA_WEBRTC_DISPLAY_MEDIA_ACCESS_HANDLER_H_
diff --git a/chrome/browser/media/webrtc/display_media_access_handler_unittest.cc b/chrome/browser/media/webrtc/display_media_access_handler_unittest.cc new file mode 100644 index 0000000..79fb3e08 --- /dev/null +++ b/chrome/browser/media/webrtc/display_media_access_handler_unittest.cc
@@ -0,0 +1,222 @@ +// 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/media/webrtc/display_media_access_handler.h" + +#include <memory> +#include <string> +#include <utility> + +#include "base/macros.h" +#include "chrome/browser/media/webrtc/fake_desktop_media_picker_factory.h" +#include "chrome/test/base/chrome_render_view_host_test_harness.h" +#include "content/public/browser/browser_context.h" +#include "content/public/browser/desktop_media_id.h" +#include "content/public/browser/notification_service.h" +#include "content/public/browser/notification_types.h" +#include "content/public/browser/web_contents.h" +#include "content/public/common/media_stream_request.h" +#include "testing/gtest/include/gtest/gtest.h" + +class DisplayMediaAccessHandlerTest : public ChromeRenderViewHostTestHarness { + public: + DisplayMediaAccessHandlerTest() {} + ~DisplayMediaAccessHandlerTest() override {} + + void SetUp() override { + ChromeRenderViewHostTestHarness::SetUp(); + auto picker_factory = std::make_unique<FakeDesktopMediaPickerFactory>(); + picker_factory_ = picker_factory.get(); + access_handler_ = std::make_unique<DisplayMediaAccessHandler>( + std::move(picker_factory), false /* display_notification */); + } + + void ProcessRequest( + const content::DesktopMediaID& fake_desktop_media_id_response, + content::MediaStreamRequestResult* request_result, + content::MediaStreamDevices* devices_result) { + FakeDesktopMediaPickerFactory::TestFlags test_flags[] = { + {true /* expect_screens */, true /* expect_windows*/, + true /* expect_tabs */, false /* expect_audio */, + fake_desktop_media_id_response /* selected_source */}}; + picker_factory_->SetTestFlags(test_flags, base::size(test_flags)); + content::MediaStreamRequest request( + 0, 0, 0, GURL("http://origin/"), false, content::MEDIA_GENERATE_STREAM, + std::string(), std::string(), content::MEDIA_NO_SERVICE, + content::MEDIA_DISPLAY_VIDEO_CAPTURE, false); + + base::RunLoop wait_loop; + content::MediaResponseCallback callback = base::BindOnce( + [](base::RunLoop* wait_loop, + content::MediaStreamRequestResult* request_result, + content::MediaStreamDevices* devices_result, + const content::MediaStreamDevices& devices, + content::MediaStreamRequestResult result, + std::unique_ptr<content::MediaStreamUI> ui) { + *request_result = result; + *devices_result = devices; + wait_loop->Quit(); + }, + &wait_loop, request_result, devices_result); + access_handler_->HandleRequest(web_contents(), request, std::move(callback), + nullptr /* extension */); + wait_loop.Run(); + EXPECT_TRUE(test_flags[0].picker_created); + + access_handler_.reset(); + EXPECT_TRUE(test_flags[0].picker_deleted); + } + + void NotifyWebContentsDestroyed() { + access_handler_->Observe( + content::NOTIFICATION_WEB_CONTENTS_DESTROYED, + content::Source<content::WebContents>(web_contents()), + content::NotificationDetails()); + } + + const DisplayMediaAccessHandler::RequestsQueues& GetRequestQueues() { + return access_handler_->pending_requests_; + } + + protected: + FakeDesktopMediaPickerFactory* picker_factory_; + std::unique_ptr<DisplayMediaAccessHandler> access_handler_; +}; + +TEST_F(DisplayMediaAccessHandlerTest, PermissionGiven) { + content::MediaStreamRequestResult result; + content::MediaStreamDevices devices; + ProcessRequest(content::DesktopMediaID(content::DesktopMediaID::TYPE_SCREEN, + content::DesktopMediaID::kFakeId), + &result, &devices); + EXPECT_EQ(content::MEDIA_DEVICE_OK, result); + EXPECT_EQ(1u, devices.size()); + EXPECT_EQ(content::MEDIA_DISPLAY_VIDEO_CAPTURE, devices[0].type); +} + +TEST_F(DisplayMediaAccessHandlerTest, PermissionDenied) { + content::MediaStreamRequestResult result; + content::MediaStreamDevices devices; + ProcessRequest(content::DesktopMediaID(), &result, &devices); + EXPECT_EQ(content::MEDIA_DEVICE_PERMISSION_DENIED, result); + EXPECT_EQ(0u, devices.size()); +} + +TEST_F(DisplayMediaAccessHandlerTest, UpdateMediaRequestStateWithClosing) { + const int render_process_id = 0; + const int render_frame_id = 0; + const int page_request_id = 0; + const content::MediaStreamType stream_type = + content::MEDIA_DISPLAY_VIDEO_CAPTURE; + FakeDesktopMediaPickerFactory::TestFlags test_flags[] = { + {true /* expect_screens */, true /* expect_windows*/, + true /* expect_tabs */, false /* expect_audio */, + content::DesktopMediaID(), true /* cancelled */}}; + picker_factory_->SetTestFlags(test_flags, base::size(test_flags)); + content::MediaStreamRequest request( + render_process_id, render_frame_id, page_request_id, + GURL("http://origin/"), false, content::MEDIA_GENERATE_STREAM, + std::string(), std::string(), content::MEDIA_NO_SERVICE, stream_type, + false); + content::MediaResponseCallback callback; + access_handler_->HandleRequest(web_contents(), request, std::move(callback), + nullptr /* extension */); + EXPECT_TRUE(test_flags[0].picker_created); + EXPECT_EQ(1u, GetRequestQueues().size()); + auto queue_it = GetRequestQueues().find(web_contents()); + EXPECT_TRUE(queue_it != GetRequestQueues().end()); + EXPECT_EQ(1u, queue_it->second.size()); + + access_handler_->UpdateMediaRequestState( + render_process_id, render_frame_id, page_request_id, stream_type, + content::MEDIA_REQUEST_STATE_CLOSING); + EXPECT_EQ(1u, GetRequestQueues().size()); + queue_it = GetRequestQueues().find(web_contents()); + EXPECT_TRUE(queue_it != GetRequestQueues().end()); + EXPECT_EQ(0u, queue_it->second.size()); + EXPECT_TRUE(test_flags[0].picker_deleted); + access_handler_.reset(); +} + +TEST_F(DisplayMediaAccessHandlerTest, WebContentsDestroyed) { + FakeDesktopMediaPickerFactory::TestFlags test_flags[] = { + {true /* expect_screens */, true /* expect_windows*/, + true /* expect_tabs */, false /* expect_audio */, + content::DesktopMediaID(), true /* cancelled */}}; + picker_factory_->SetTestFlags(test_flags, base::size(test_flags)); + content::MediaStreamRequest request( + 0, 0, 0, GURL("http://origin/"), false, content::MEDIA_GENERATE_STREAM, + std::string(), std::string(), content::MEDIA_NO_SERVICE, + content::MEDIA_DISPLAY_VIDEO_CAPTURE, false); + content::MediaResponseCallback callback; + access_handler_->HandleRequest(web_contents(), request, std::move(callback), + nullptr /* extension */); + EXPECT_TRUE(test_flags[0].picker_created); + EXPECT_EQ(1u, GetRequestQueues().size()); + auto queue_it = GetRequestQueues().find(web_contents()); + EXPECT_TRUE(queue_it != GetRequestQueues().end()); + EXPECT_EQ(1u, queue_it->second.size()); + + NotifyWebContentsDestroyed(); + EXPECT_EQ(0u, GetRequestQueues().size()); + access_handler_.reset(); +} + +TEST_F(DisplayMediaAccessHandlerTest, MultipleRequests) { + FakeDesktopMediaPickerFactory::TestFlags test_flags[] = { + {true /* expect_screens */, true /* expect_windows*/, + true /* expect_tabs */, false /* expect_audio */, + content::DesktopMediaID( + content::DesktopMediaID::TYPE_SCREEN, + content::DesktopMediaID::kFakeId) /* selected_source */}, + {true /* expect_screens */, true /* expect_windows*/, + true /* expect_tabs */, false /* expect_audio */, + content::DesktopMediaID( + content::DesktopMediaID::TYPE_WINDOW, + content::DesktopMediaID::kNullId) /* selected_source */}}; + const size_t kTestFlagCount = 2; + picker_factory_->SetTestFlags(test_flags, kTestFlagCount); + + content::MediaStreamRequestResult result; + content::MediaStreamDevices devices; + base::RunLoop wait_loop[kTestFlagCount]; + for (size_t i = 0; i < kTestFlagCount; ++i) { + content::MediaStreamRequest request( + 0, 0, 0, GURL("http://origin/"), false, content::MEDIA_GENERATE_STREAM, + std::string(), std::string(), content::MEDIA_NO_SERVICE, + content::MEDIA_DISPLAY_VIDEO_CAPTURE, false); + content::MediaResponseCallback callback = base::BindOnce( + [](base::RunLoop* wait_loop, + content::MediaStreamRequestResult* request_result, + content::MediaStreamDevices* devices_result, + const content::MediaStreamDevices& devices, + content::MediaStreamRequestResult result, + std::unique_ptr<content::MediaStreamUI> ui) { + *request_result = result; + *devices_result = devices; + wait_loop->Quit(); + }, + &wait_loop[i], &result, &devices); + access_handler_->HandleRequest(web_contents(), request, std::move(callback), + nullptr /* extension */); + } + wait_loop[0].Run(); + EXPECT_TRUE(test_flags[0].picker_created); + EXPECT_TRUE(test_flags[0].picker_deleted); + EXPECT_EQ(content::MEDIA_DEVICE_OK, result); + EXPECT_EQ(1u, devices.size()); + EXPECT_EQ(content::MEDIA_DISPLAY_VIDEO_CAPTURE, devices[0].type); + + content::MediaStreamDevice first_device = devices[0]; + EXPECT_TRUE(test_flags[1].picker_created); + EXPECT_FALSE(test_flags[1].picker_deleted); + wait_loop[1].Run(); + EXPECT_TRUE(test_flags[1].picker_deleted); + EXPECT_EQ(content::MEDIA_DEVICE_OK, result); + EXPECT_EQ(1u, devices.size()); + EXPECT_EQ(content::MEDIA_DISPLAY_VIDEO_CAPTURE, devices[0].type); + EXPECT_FALSE(devices[0].IsSameDevice(first_device)); + + access_handler_.reset(); +}
diff --git a/chrome/browser/media/webrtc/media_capture_devices_dispatcher.cc b/chrome/browser/media/webrtc/media_capture_devices_dispatcher.cc index 52f5d57..69024fa 100644 --- a/chrome/browser/media/webrtc/media_capture_devices_dispatcher.cc +++ b/chrome/browser/media/webrtc/media_capture_devices_dispatcher.cc
@@ -4,6 +4,9 @@ #include "chrome/browser/media/webrtc/media_capture_devices_dispatcher.h" +#include <memory> +#include <utility> + #include "base/command_line.h" #include "base/logging.h" #include "base/metrics/field_trial.h" @@ -33,6 +36,10 @@ #include "extensions/common/constants.h" #include "media/base/media_switches.h" +#if !defined(OS_ANDROID) +#include "chrome/browser/media/webrtc/display_media_access_handler.h" +#endif // defined(OS_ANDROID) + #if defined(OS_CHROMEOS) #include "ash/shell.h" #include "chrome/browser/media/chromeos_login_media_access_handler.h" @@ -47,7 +54,7 @@ #include "extensions/browser/extension_registry.h" #include "extensions/common/extension.h" #include "extensions/common/permissions/permissions_data.h" -#endif +#endif // BUILDFLAG(ENABLE_EXTENSIONS) using content::BrowserThread; using content::MediaCaptureDevices; @@ -76,12 +83,6 @@ return web_contents; } -#if BUILDFLAG(ENABLE_EXTENSIONS) -inline CaptureAccessHandlerBase* ToCaptureAccessHandlerBase( - MediaAccessHandler* handler) { - return static_cast<CaptureAccessHandlerBase*>(handler); -} -#endif } // namespace MediaCaptureDevicesDispatcher* MediaCaptureDevicesDispatcher::GetInstance() { @@ -93,6 +94,11 @@ media_stream_capture_indicator_(new MediaStreamCaptureIndicator()) { DCHECK_CURRENTLY_ON(BrowserThread::UI); +#if !defined(OS_ANDROID) + media_access_handlers_.push_back( + std::make_unique<DisplayMediaAccessHandler>()); +#endif // defined(OS_ANDROID) + #if BUILDFLAG(ENABLE_EXTENSIONS) #if defined(OS_CHROMEOS) media_access_handlers_.push_back( @@ -338,9 +344,8 @@ page_request_id, security_origin, stream_type, state)); } -void MediaCaptureDevicesDispatcher::OnCreatingAudioStream( - int render_process_id, - int render_frame_id) { +void MediaCaptureDevicesDispatcher::OnCreatingAudioStream(int render_process_id, + int render_frame_id) { // TODO(https://crbug.com/837606): Figure out how to simplify threading here. // Currently, this will either always be called on the UI thread, or always // on the IO thread, depending on how far along the work to migrate to the @@ -419,21 +424,12 @@ int render_process_id, int render_frame_id) { DCHECK_CURRENTLY_ON(BrowserThread::UI); -#if BUILDFLAG(ENABLE_EXTENSIONS) + for (const auto& handler : media_access_handlers_) { - if (handler->SupportsStreamType( - WebContentsFromIds(render_process_id, render_frame_id), - content::MEDIA_GUM_DESKTOP_VIDEO_CAPTURE, nullptr) || - handler->SupportsStreamType( - WebContentsFromIds(render_process_id, render_frame_id), - content::MEDIA_GUM_TAB_VIDEO_CAPTURE, nullptr)) { - if (ToCaptureAccessHandlerBase(handler.get()) - ->IsInsecureCapturingInProgress(render_process_id, - render_frame_id)) - return true; - } + if (handler->IsInsecureCapturingInProgress(render_process_id, + render_frame_id)) + return true; } -#endif return false; } @@ -455,9 +451,10 @@ bool is_secure) { DCHECK_CURRENTLY_ON(BrowserThread::IO); if (stream_type != content::MEDIA_GUM_TAB_VIDEO_CAPTURE && - stream_type != content::MEDIA_GUM_DESKTOP_VIDEO_CAPTURE) + stream_type != content::MEDIA_GUM_DESKTOP_VIDEO_CAPTURE && + stream_type != content::MEDIA_DISPLAY_VIDEO_CAPTURE) { return; - + } BrowserThread::PostTask( BrowserThread::UI, FROM_HERE, base::BindOnce(&MediaCaptureDevicesDispatcher::UpdateCapturingLinkSecured, @@ -473,19 +470,14 @@ bool is_secure) { DCHECK_CURRENTLY_ON(BrowserThread::UI); if (stream_type != content::MEDIA_GUM_TAB_VIDEO_CAPTURE && - stream_type != content::MEDIA_GUM_DESKTOP_VIDEO_CAPTURE) + stream_type != content::MEDIA_GUM_DESKTOP_VIDEO_CAPTURE && + stream_type != content::MEDIA_DISPLAY_VIDEO_CAPTURE) { return; - -#if BUILDFLAG(ENABLE_EXTENSIONS) - for (const auto& handler : media_access_handlers_) { - if (handler->SupportsStreamType( - WebContentsFromIds(render_process_id, render_frame_id), stream_type, - nullptr)) { - ToCaptureAccessHandlerBase(handler.get()) - ->UpdateCapturingLinkSecured(render_process_id, render_frame_id, - page_request_id, is_secure); - break; - } } -#endif + + for (const auto& handler : media_access_handlers_) { + handler->UpdateCapturingLinkSecured(render_process_id, render_frame_id, + page_request_id, is_secure); + break; + } }
diff --git a/chrome/browser/media/webrtc/permission_bubble_media_access_handler.cc b/chrome/browser/media/webrtc/permission_bubble_media_access_handler.cc index 3595a406..ac2a7837 100644 --- a/chrome/browser/media/webrtc/permission_bubble_media_access_handler.cc +++ b/chrome/browser/media/webrtc/permission_bubble_media_access_handler.cc
@@ -4,6 +4,7 @@ #include "chrome/browser/media/webrtc/permission_bubble_media_access_handler.h" +#include <memory> #include <utility> #include "base/metrics/field_trial.h" @@ -28,6 +29,7 @@ #include "chrome/browser/media/webrtc/screen_capture_infobar_delegate_android.h" #include "chrome/browser/permissions/permission_uma_util.h" #include "chrome/browser/permissions/permission_util.h" + #endif // defined(OS_ANDROID) using content::BrowserThread; @@ -69,7 +71,8 @@ #if defined(OS_ANDROID) return type == content::MEDIA_DEVICE_VIDEO_CAPTURE || type == content::MEDIA_DEVICE_AUDIO_CAPTURE || - type == content::MEDIA_GUM_DESKTOP_VIDEO_CAPTURE; + type == content::MEDIA_GUM_DESKTOP_VIDEO_CAPTURE || + type == content::MEDIA_DISPLAY_VIDEO_CAPTURE; #else return type == content::MEDIA_DEVICE_VIDEO_CAPTURE || type == content::MEDIA_DEVICE_AUDIO_CAPTURE; @@ -107,7 +110,7 @@ DCHECK_CURRENTLY_ON(BrowserThread::UI); #if defined(OS_ANDROID) - if (request.video_type == content::MEDIA_GUM_DESKTOP_VIDEO_CAPTURE && + if (IsScreenCaptureMediaType(request.video_type) && !base::FeatureList::IsEnabled( chrome::android::kUserMediaScreenCapturing)) { // If screen capturing isn't enabled on Android, we'll use "invalid state" @@ -143,7 +146,7 @@ const content::MediaStreamRequest request = it->second.front().request; #if defined(OS_ANDROID) - if (request.video_type == content::MEDIA_GUM_DESKTOP_VIDEO_CAPTURE) { + if (IsScreenCaptureMediaType(request.video_type)) { ScreenCaptureInfoBarDelegateAndroid::Create( web_contents, request, base::Bind(&PermissionBubbleMediaAccessHandler::OnAccessRequestResponse,
diff --git a/chrome/browser/media/webrtc/tab_desktop_media_list_unittest.cc b/chrome/browser/media/webrtc/tab_desktop_media_list_unittest.cc index e444f16..7d0737dd 100644 --- a/chrome/browser/media/webrtc/tab_desktop_media_list_unittest.cc +++ b/chrome/browser/media/webrtc/tab_desktop_media_list_unittest.cc
@@ -31,8 +31,7 @@ #if defined(OS_CHROMEOS) #include "chrome/browser/chromeos/login/users/scoped_test_user_manager.h" -#include "chrome/browser/chromeos/settings/cros_settings.h" -#include "chrome/browser/chromeos/settings/device_settings_service.h" +#include "chrome/browser/chromeos/settings/scoped_cros_settings_test_helper.h" #endif // defined(OS_CHROMEOS) using content::WebContents; @@ -254,8 +253,7 @@ content::TestBrowserThreadBundle thread_bundle_; #if defined(OS_CHROMEOS) - chromeos::ScopedTestDeviceSettingsService test_device_settings_service_; - chromeos::ScopedTestCrosSettings test_cros_settings_; + chromeos::ScopedCrosSettingsTestHelper cros_settings_test_helper_; chromeos::ScopedTestUserManager test_user_manager_; #endif
diff --git a/chrome/browser/media/webrtc/webrtc_event_log_manager.cc b/chrome/browser/media/webrtc/webrtc_event_log_manager.cc index f4c8e72..835f6f35 100644 --- a/chrome/browser/media/webrtc/webrtc_event_log_manager.cc +++ b/chrome/browser/media/webrtc/webrtc_event_log_manager.cc
@@ -142,33 +142,50 @@ first_browser_context_initializations_done_ = true; } - const bool enable_for_remote_logging = - IsRemoteLoggingAllowedForBrowserContext(browser_context); + StartListeningForPrefChangeForBrowserContext(browser_context); + + if (!IsRemoteLoggingAllowedForBrowserContext(browser_context)) { + // If remote-bound logging was enabled during a previous Chrome session, + // it might have produced some pending log files, which we will now + // wish to remove. + // |this| is destroyed by ~BrowserProcessImpl(), so base::Unretained(this) + // will not be dereferenced after destruction. + task_runner_->PostTask( + FROM_HERE, + base::BindOnce( + &WebRtcEventLogManager:: + RemovePendingRemoteBoundLogsForNotEnabledBrowserContext, + base::Unretained(this), GetBrowserContextId(browser_context), + browser_context->GetPath(), std::move(reply))); + return; + } // |this| is destroyed by ~BrowserProcessImpl(), so base::Unretained(this) // will not be dereferenced after destruction. task_runner_->PostTask( FROM_HERE, - base::BindOnce(&WebRtcEventLogManager::EnableForBrowserContextInternal, - base::Unretained(this), - GetBrowserContextId(browser_context), - browser_context->GetPath(), enable_for_remote_logging, - std::move(reply))); + base::BindOnce( + &WebRtcEventLogManager::EnableRemoteBoundLoggingForBrowserContext, + base::Unretained(this), GetBrowserContextId(browser_context), + browser_context->GetPath(), std::move(reply))); } void WebRtcEventLogManager::DisableForBrowserContext( - const content::BrowserContext* browser_context, + content::BrowserContext* browser_context, base::OnceClosure reply) { DCHECK_CURRENTLY_ON(BrowserThread::UI); DCHECK(browser_context); + StopListeningForPrefChangeForBrowserContext(browser_context); + // |this| is destroyed by ~BrowserProcessImpl(), so base::Unretained(this) // will not be dereferenced after destruction. task_runner_->PostTask( FROM_HERE, - base::BindOnce(&WebRtcEventLogManager::DisableForBrowserContextInternal, - base::Unretained(this), - GetBrowserContextId(browser_context), std::move(reply))); + base::BindOnce( + &WebRtcEventLogManager::DisableRemoteBoundLoggingForBrowserContext, + base::Unretained(this), GetBrowserContextId(browser_context), + std::move(reply))); } void WebRtcEventLogManager::PeerConnectionAdded( @@ -494,14 +511,14 @@ void WebRtcEventLogManager::OnLoggingTargetStarted(LoggingTarget target, PeerConnectionKey key) { DCHECK(task_runner_->RunsTasksInCurrentSequence()); - auto it = peer_connections_with_event_logging_enabled_.find(key); - if (it != peer_connections_with_event_logging_enabled_.end()) { + auto it = peer_connections_with_event_logging_enabled_in_webrtc_.find(key); + if (it != peer_connections_with_event_logging_enabled_in_webrtc_.end()) { DCHECK_EQ((it->second & target), 0u); it->second |= target; } else { // This is the first client for WebRTC event logging - let WebRTC know // that it should start informing us of events. - peer_connections_with_event_logging_enabled_.emplace(key, target); + peer_connections_with_event_logging_enabled_in_webrtc_.emplace(key, target); pc_tracker_proxy_->SetWebRtcEventLoggingState(key, true); } } @@ -511,19 +528,92 @@ DCHECK(task_runner_->RunsTasksInCurrentSequence()); // Record that we're no longer performing this type of logging for this PC. - auto it = peer_connections_with_event_logging_enabled_.find(key); - CHECK(it != peer_connections_with_event_logging_enabled_.end()); + auto it = peer_connections_with_event_logging_enabled_in_webrtc_.find(key); + CHECK(it != peer_connections_with_event_logging_enabled_in_webrtc_.end()); DCHECK_NE(it->second, 0u); it->second &= ~target; // If we're not doing any other type of logging for this peer connection, // it's time to stop receiving notifications for it from WebRTC. if (it->second == 0u) { - peer_connections_with_event_logging_enabled_.erase(it); + peer_connections_with_event_logging_enabled_in_webrtc_.erase(it); pc_tracker_proxy_->SetWebRtcEventLoggingState(key, false); } } +void WebRtcEventLogManager::StartListeningForPrefChangeForBrowserContext( + BrowserContext* browser_context) { + DCHECK_CURRENTLY_ON(BrowserThread::UI); + DCHECK(first_browser_context_initializations_done_); + CHECK(!browser_context->IsOffTheRecord()); + + const auto browser_context_id = GetBrowserContextId(browser_context); + auto it = pref_change_registrars_.emplace(std::piecewise_construct, + std::make_tuple(browser_context_id), + std::make_tuple()); + DCHECK(it.second) << "Already listening."; + PrefChangeRegistrar& registrar = it.first->second; + + Profile* profile = Profile::FromBrowserContext(browser_context); + DCHECK(profile); + registrar.Init(profile->GetPrefs()); + + // * |this| is destroyed by ~BrowserProcessImpl(), so base::Unretained(this) + // will not be dereferenced after destruction. + // * base::Unretained(browser_context) is safe, because |browser_context| + // stays alive until Chrome shut-down, at which point we'll stop listening + // as part of its (BrowserContext's) tear-down process. + registrar.Add(prefs::kWebRtcEventLogCollectionAllowed, + base::BindRepeating(&WebRtcEventLogManager::OnPrefChange, + base::Unretained(this), + base::Unretained(browser_context))); +} + +void WebRtcEventLogManager::StopListeningForPrefChangeForBrowserContext( + BrowserContext* browser_context) { + DCHECK_CURRENTLY_ON(BrowserThread::UI); + + const auto browser_context_id = GetBrowserContextId(browser_context); + + size_t erased_count = pref_change_registrars_.erase(browser_context_id); + DCHECK_EQ(erased_count, 1u); +} + +void WebRtcEventLogManager::OnPrefChange(BrowserContext* browser_context) { + DCHECK_CURRENTLY_ON(BrowserThread::UI); + DCHECK(first_browser_context_initializations_done_); + + const Profile* profile = Profile::FromBrowserContext(browser_context); + DCHECK(profile); + + const bool enabled = + profile->GetPrefs()->GetBoolean(prefs::kWebRtcEventLogCollectionAllowed); + + if (!enabled) { + // Dynamic refresh of the policy to DISABLED; stop ongoing logs, remove + // pending log files and stop any active uploads. + ClearCacheForBrowserContext(browser_context, base::Time::Min(), + base::Time::Max(), base::DoNothing()); + } + + // |this| is destroyed by ~BrowserProcessImpl(), so base::Unretained(this) + // will not be dereferenced after destruction. + base::OnceClosure task; + if (enabled) { + task = base::BindOnce( + &WebRtcEventLogManager::EnableRemoteBoundLoggingForBrowserContext, + base::Unretained(this), GetBrowserContextId(browser_context), + browser_context->GetPath(), base::OnceClosure()); + } else { + task = base::BindOnce( + &WebRtcEventLogManager::DisableRemoteBoundLoggingForBrowserContext, + base::Unretained(this), GetBrowserContextId(browser_context), + base::OnceClosure()); + } + + task_runner_->PostTask(FROM_HERE, std::move(task)); +} + void WebRtcEventLogManager::OnFirstBrowserContextLoaded() { DCHECK_CURRENTLY_ON(BrowserThread::UI); @@ -568,32 +658,44 @@ std::move(log_file_writer_factory)); } -void WebRtcEventLogManager::EnableForBrowserContextInternal( +void WebRtcEventLogManager::EnableRemoteBoundLoggingForBrowserContext( BrowserContextId browser_context_id, const base::FilePath& browser_context_dir, - bool enable_for_remote_logging, base::OnceClosure reply) { DCHECK(task_runner_->RunsTasksInCurrentSequence()); DCHECK_NE(browser_context_id, kNullBrowserContextId); - if (enable_for_remote_logging) { - remote_logs_manager_.EnableForBrowserContext(browser_context_id, - browser_context_dir); - } + remote_logs_manager_.EnableForBrowserContext(browser_context_id, + browser_context_dir); MaybeReply(FROM_HERE, std::move(reply)); } -void WebRtcEventLogManager::DisableForBrowserContextInternal( +void WebRtcEventLogManager::DisableRemoteBoundLoggingForBrowserContext( BrowserContextId browser_context_id, base::OnceClosure reply) { DCHECK(task_runner_->RunsTasksInCurrentSequence()); + // Note that the BrowserContext might never have been enabled in the + // remote-bound manager; that's not a problem. remote_logs_manager_.DisableForBrowserContext(browser_context_id); MaybeReply(FROM_HERE, std::move(reply)); } +void WebRtcEventLogManager:: + RemovePendingRemoteBoundLogsForNotEnabledBrowserContext( + BrowserContextId browser_context_id, + const base::FilePath& browser_context_dir, + base::OnceClosure reply) { + DCHECK(task_runner_->RunsTasksInCurrentSequence()); + + remote_logs_manager_.RemovePendingLogsForNotEnabledBrowserContext( + browser_context_id, browser_context_dir); + + MaybeReply(FROM_HERE, std::move(reply)); +} + void WebRtcEventLogManager::PeerConnectionAddedInternal( PeerConnectionKey key, const std::string& peer_connection_id, @@ -810,3 +912,14 @@ void WebRtcEventLogManager::PostNullTaskForTesting(base::OnceClosure reply) { task_runner_->PostTask(FROM_HERE, std::move(reply)); } + +void WebRtcEventLogManager::ShutDownForTesting(base::OnceClosure reply) { + DCHECK_CURRENTLY_ON(BrowserThread::UI); + // Unit tests block until |callback| is sent back, so the use + // of base::Unretained(&remote_logs_manager_) is safe. + task_runner_->PostTask( + FROM_HERE, + base::BindOnce(&WebRtcRemoteEventLogManager::ShutDownForTesting, + base::Unretained(&remote_logs_manager_), + std::move(reply))); +}
diff --git a/chrome/browser/media/webrtc/webrtc_event_log_manager.h b/chrome/browser/media/webrtc/webrtc_event_log_manager.h index f283b7c..a3c35cf 100644 --- a/chrome/browser/media/webrtc/webrtc_event_log_manager.h +++ b/chrome/browser/media/webrtc/webrtc_event_log_manager.h
@@ -19,6 +19,7 @@ #include "chrome/browser/media/webrtc/webrtc_event_log_manager_common.h" #include "chrome/browser/media/webrtc/webrtc_event_log_manager_local.h" #include "chrome/browser/media/webrtc/webrtc_event_log_manager_remote.h" +#include "components/prefs/pref_change_registrar.h" #include "content/public/browser/render_process_host_observer.h" #include "content/public/browser/webrtc_event_logger.h" @@ -71,10 +72,10 @@ ~WebRtcEventLogManager() override; void EnableForBrowserContext(content::BrowserContext* browser_context, - base::OnceClosure reply) override; + base::OnceClosure reply); - void DisableForBrowserContext(const content::BrowserContext* browser_context, - base::OnceClosure reply) override; + void DisableForBrowserContext(content::BrowserContext* browser_context, + base::OnceClosure reply); void PeerConnectionAdded(int render_process_id, int lid, // Renderer-local PeerConnection ID. @@ -152,8 +153,9 @@ base::OnceClosure reply); private: - friend class SigninManagerAndroidTest; // Calls *ForTesting() methods. - friend class WebRtcEventLogManagerTestBase; // Calls *ForTesting() methods. + friend class SigninManagerAndroidTest; + friend class WebRtcEventLogManagerTestBase; + friend class WebRTCInternalsIntegrationBrowserTest; using PeerConnectionKey = WebRtcEventLogPeerConnectionKey; @@ -198,6 +200,13 @@ void OnLoggingTargetStarted(LoggingTarget target, PeerConnectionKey key); void OnLoggingTargetStopped(LoggingTarget target, PeerConnectionKey key); + void StartListeningForPrefChangeForBrowserContext( + content::BrowserContext* browser_context); + void StopListeningForPrefChangeForBrowserContext( + content::BrowserContext* browser_context); + + void OnPrefChange(content::BrowserContext* browser_context); + // network_connection_tracker() and system_request_context() are not available // during instantiation; we get them when the first profile is loaded, which // is also the earliest time when they could be needed. @@ -211,17 +220,19 @@ net::URLRequestContextGetter* url_request_context_getter, std::unique_ptr<LogFileWriter::Factory> log_file_writer_factory); - // The BrowserContext is always enabled for local-bound logs. - // |enable_for_remote_logging| indicates whether it should also be enabled - // for remote-bound logs. This depends on a Chrome policy. - void EnableForBrowserContextInternal( + void EnableRemoteBoundLoggingForBrowserContext( BrowserContextId browser_context_id, const base::FilePath& browser_context_dir, - bool enable_for_remote_logging, base::OnceClosure reply); - void DisableForBrowserContextInternal(BrowserContextId browser_context_id, - base::OnceClosure reply); + void DisableRemoteBoundLoggingForBrowserContext( + BrowserContextId browser_context_id, + base::OnceClosure reply); + + void RemovePendingRemoteBoundLogsForNotEnabledBrowserContext( + BrowserContextId browser_context_id, + const base::FilePath& browser_context_dir, + base::OnceClosure reply); void PeerConnectionAddedInternal(PeerConnectionKey key, const std::string& peer_connection_id, @@ -296,7 +307,10 @@ // TODO(crbug.com/775415): Remove this and use PostNullTaskForTesting instead. scoped_refptr<base::SequencedTaskRunner>& GetTaskRunnerForTesting(); - void PostNullTaskForTesting(base::OnceClosure reply) override; + void PostNullTaskForTesting(base::OnceClosure reply); + + // Documented in WebRtcRemoteEventLogManager. + void ShutDownForTesting(base::OnceClosure reply); static WebRtcEventLogManager* g_webrtc_event_log_manager; @@ -328,10 +342,15 @@ // This is only possible when the appropriate Chrome policy is configured. WebRtcRemoteEventLogManager remote_logs_manager_; + // Each loaded BrowserContext is mapped to a PrefChangeRegistrar, which keeps + // us informed about preference changes, thereby allowing as to support + // dynamic refresh. + std::map<BrowserContextId, PrefChangeRegistrar> pref_change_registrars_; + // This keeps track of which peer connections have event logging turned on // in WebRTC, and for which client(s). std::map<PeerConnectionKey, LoggingTargetBitmap> - peer_connections_with_event_logging_enabled_; + peer_connections_with_event_logging_enabled_in_webrtc_; // The set of RenderProcessHosts with which the manager is registered for // observation. Allows us to register for each RPH only once, and get notified
diff --git a/chrome/browser/media/webrtc/webrtc_event_log_manager_keyed_service.cc b/chrome/browser/media/webrtc/webrtc_event_log_manager_keyed_service.cc index cd8f53be..78221e8 100644 --- a/chrome/browser/media/webrtc/webrtc_event_log_manager_keyed_service.cc +++ b/chrome/browser/media/webrtc/webrtc_event_log_manager_keyed_service.cc
@@ -6,17 +6,17 @@ #include "base/callback_forward.h" #include "base/logging.h" +#include "chrome/browser/media/webrtc/webrtc_event_log_manager.h" #include "content/public/browser/browser_context.h" -#include "content/public/browser/webrtc_event_logger.h" WebRtcEventLogManagerKeyedService::WebRtcEventLogManagerKeyedService( content::BrowserContext* browser_context) : browser_context_(browser_context) { DCHECK(!browser_context_->IsOffTheRecord()); - content::WebRtcEventLogger* logger = content::WebRtcEventLogger::Get(); - if (logger) { - logger->EnableForBrowserContext(browser_context_, base::OnceClosure()); + WebRtcEventLogManager* manager = WebRtcEventLogManager::GetInstance(); + if (manager) { + manager->EnableForBrowserContext(browser_context_, base::OnceClosure()); reported_ = true; } else { reported_ = false; @@ -24,9 +24,9 @@ } void WebRtcEventLogManagerKeyedService::Shutdown() { - content::WebRtcEventLogger* logger = content::WebRtcEventLogger::Get(); - if (logger) { - DCHECK(reported_) << "content::WebRtcEventLogger constructed too late."; - logger->DisableForBrowserContext(browser_context_, base::OnceClosure()); + WebRtcEventLogManager* manager = WebRtcEventLogManager::GetInstance(); + if (manager) { + DCHECK(reported_) << "WebRtcEventLogManager constructed too late."; + manager->DisableForBrowserContext(browser_context_, base::OnceClosure()); } }
diff --git a/chrome/browser/media/webrtc/webrtc_event_log_manager_remote.cc b/chrome/browser/media/webrtc/webrtc_event_log_manager_remote.cc index b4502da9..ec35ee16 100644 --- a/chrome/browser/media/webrtc/webrtc_event_log_manager_remote.cc +++ b/chrome/browser/media/webrtc/webrtc_event_log_manager_remote.cc
@@ -17,7 +17,6 @@ #include "base/logging.h" #include "base/strings/string_number_conversions.h" #include "base/strings/string_util.h" -#include "base/threading/sequenced_task_runner_handle.h" #include "base/unguessable_token.h" #include "chrome/common/chrome_switches.h" #include "content/public/browser/browser_thread.h" @@ -128,7 +127,10 @@ network_connection_tracker_(nullptr), uploading_supported_for_connection_type_(false), scheduled_upload_tasks_(0), - task_runner_(task_runner) { + task_runner_(task_runner), + weak_ptr_factory_( + std::make_unique<base::WeakPtrFactory<WebRtcRemoteEventLogManager>>( + this)) { DCHECK_CURRENTLY_ON(content::BrowserThread::UI); // Proactive pruning would not do anything at the moment; it will be started // with the first enabled browser context. This will all have the benefit @@ -141,6 +143,14 @@ // while destruction took place, thereby avoiding endless attempts to upload // the same file. + if (weak_ptr_factory_) { + // Not a unit test; that would have gone through ShutDownForTesting(). + const bool will_delete = + task_runner_->DeleteSoon(FROM_HERE, weak_ptr_factory_.release()); + DCHECK(!will_delete) + << "Task runners must have been stopped by this stage of shutdown."; + } + if (network_connection_tracker_) { // * |network_connection_tracker_| might already have posted a task back // to us, but it will not run, because |task_runner_| has already been @@ -161,14 +171,14 @@ DCHECK(!network_connection_tracker_); // |this| is only destroyed (on the UI thread) after |task_runner_| stops, - // so both base::Unretained(this) and AddNetworkConnectionObserver() are safe. + // so AddNetworkConnectionObserver() is safe. network_connection_tracker_ = network_connection_tracker; network_connection_tracker_->AddNetworkConnectionObserver(this); auto callback = base::BindOnce(&WebRtcRemoteEventLogManager::OnConnectionChanged, - base::Unretained(this)); + weak_ptr_factory_->GetWeakPtr()); network::mojom::ConnectionType connection_type; const bool sync_answer = network_connection_tracker_->GetConnectionType( &connection_type, std::move(callback)); @@ -217,10 +227,10 @@ return; } - AddPendingLogs(browser_context_id, remote_bound_logs_dir); - enabled_browser_contexts_.insert(browser_context_id); + AddPendingLogs(browser_context_id, remote_bound_logs_dir); + if (!proactive_prune_scheduling_delta_.is_zero() && !proactive_prune_scheduling_started_) { proactive_prune_scheduling_started_ = true; @@ -228,7 +238,6 @@ } } -// TODO(crbug.com/775415): Add unit tests. void WebRtcRemoteEventLogManager::DisableForBrowserContext( BrowserContextId browser_context_id) { DCHECK(task_runner_->RunsTasksInCurrentSequence()); @@ -240,8 +249,14 @@ enabled_browser_contexts_.erase(browser_context_id); #if DCHECK_IS_ON() - // All of the RPHs associated with this BrowserContext must already have - // exited, which should have implicitly stopped all active logs. + // DisableForBrowserContext() is called in one of two cases: + // 1. If Chrome is shutting down. In that case, all the RPHs associated with + // this BrowserContext must already have exited, which should have + // implicitly stopped all active logs. + // 2. Remote-bound logging is no longer allowed for this BrowserContext. + // In that case, some peer connections associated with this BrowserContext + // might still be active, or become active at a later time, but all + // logs must have already been stopped. auto pred = [browser_context_id](decltype(active_logs_)::value_type& log) { return log.first.browser_context_id == browser_context_id; }; @@ -249,7 +264,6 @@ #endif // Pending logs for this BrowserContext are no longer eligible for upload. - // (Active uploads, if any, are not affected.) for (auto it = pending_logs_.begin(); it != pending_logs_.end();) { if (it->browser_context_id == browser_context_id) { it = pending_logs_.erase(it); @@ -258,6 +272,9 @@ } } + // Active uploads of logs associated with this BrowserContext must be stopped. + MaybeCancelUpload(base::Time::Min(), base::Time::Max(), browser_context_id); + // Active logs may have been removed, which could remove upload suppression, // or pending logs which were about to be uploaded may have been removed, // so uploading may no longer be possible. @@ -385,6 +402,18 @@ MaybeCancelUpload(delete_begin, delete_end, browser_context_id); } +void WebRtcRemoteEventLogManager::RemovePendingLogsForNotEnabledBrowserContext( + BrowserContextId browser_context_id, + const base::FilePath& browser_context_dir) { + DCHECK(task_runner_->RunsTasksInCurrentSequence()); + DCHECK(!BrowserContextEnabled(browser_context_id)); + const base::FilePath remote_bound_logs_dir = + GetRemoteBoundWebRtcEventLogsDir(browser_context_dir); + if (!base::DeleteFile(remote_bound_logs_dir, /*recursive=*/true)) { + LOG(ERROR) << "Failed to delete `" << remote_bound_logs_dir << "."; + } +} + void WebRtcRemoteEventLogManager::RenderProcessHostExitedDestroyed( int render_process_id) { DCHECK(task_runner_->RunsTasksInCurrentSequence()); @@ -417,6 +446,7 @@ void WebRtcRemoteEventLogManager::OnConnectionChanged( network::mojom::ConnectionType type) { + DCHECK(task_runner_->RunsTasksInCurrentSequence()); // Even if switching from WiFi to Ethernet, or between to WiFi connections, // reset the timer (if running) until an upload is permissible due to stable // upload-supporting conditions. @@ -445,6 +475,14 @@ base::BindOnce(std::move(callback), UploadConditionsHold())); } +void WebRtcRemoteEventLogManager::ShutDownForTesting(base::OnceClosure reply) { + DCHECK(task_runner_->RunsTasksInCurrentSequence()); + weak_ptr_factory_->InvalidateWeakPtrs(); + weak_ptr_factory_.reset(); + content::BrowserThread::PostTask(content::BrowserThread::UI, FROM_HERE, + base::BindOnce(std::move(reply))); +} + bool WebRtcRemoteEventLogManager::AreLogParametersValid( size_t max_file_size_bytes, std::string* error_message) const { @@ -473,6 +511,7 @@ bool WebRtcRemoteEventLogManager::BrowserContextEnabled( BrowserContextId browser_context_id) const { + DCHECK(task_runner_->RunsTasksInCurrentSequence()); const auto it = enabled_browser_contexts_.find(browser_context_id); return it != enabled_browser_contexts_.cend(); } @@ -627,12 +666,10 @@ PrunePendingLogs(); - // |this| is only destroyed (on the UI thread) after |task_runner_| stops, - // so both base::Unretained(this) is safe. - base::SequencedTaskRunnerHandle::Get()->PostDelayedTask( + task_runner_->PostDelayedTask( FROM_HERE, base::BindOnce(&WebRtcRemoteEventLogManager::RecurringPendingLogsPrune, - base::Unretained(this)), + weak_ptr_factory_->GetWeakPtr()), proactive_prune_scheduling_delta_); } @@ -666,6 +703,7 @@ const base::Time& delete_begin, const base::Time& delete_end, BrowserContextId browser_context_id) { + DCHECK(task_runner_->RunsTasksInCurrentSequence()); for (auto it = active_logs_.begin(); it != active_logs_.end();) { // Since the file is active, assume it's still being modified. if (LogFileMatchesFilter(it->first.browser_context_id, base::Time::Now(), @@ -681,6 +719,7 @@ const base::Time& delete_begin, const base::Time& delete_end, base::Optional<BrowserContextId> browser_context_id) { + DCHECK(task_runner_->RunsTasksInCurrentSequence()); if (uploader_) { const WebRtcLogFileInfo& info = uploader_->GetWebRtcLogFileInfo(); if (LogFileMatchesFilter(info.browser_context_id, info.last_modified, @@ -704,6 +743,7 @@ base::Optional<BrowserContextId> filter_browser_context_id, const base::Time& filter_range_begin, const base::Time& filter_range_end) const { + DCHECK(task_runner_->RunsTasksInCurrentSequence()); if (filter_browser_context_id && *filter_browser_context_id != log_browser_context_id) { return false; @@ -742,6 +782,7 @@ } bool WebRtcRemoteEventLogManager::UploadConditionsHold() const { + DCHECK(task_runner_->RunsTasksInCurrentSequence()); return !uploader_ && !pending_logs_.empty() && !UploadSuppressed() && uploading_supported_for_connection_type_; } @@ -769,7 +810,7 @@ task_runner_->PostDelayedTask( FROM_HERE, base::BindOnce(&WebRtcRemoteEventLogManager::MaybeStartUploading, - base::Unretained(this)), + weak_ptr_factory_->GetWeakPtr()), upload_delay_); } @@ -800,12 +841,9 @@ // delay of length |upload_delay_| before the next one starts. time_when_upload_conditions_met_ = base::TimeTicks(); - // |this| is only destroyed (on the UI thread) after |task_runner_| stops, - // so base::Unretained(this) is safe. (|uploader_| and |uploader_factory_| - // live on |task_runner_|.) auto callback = base::BindOnce( &WebRtcRemoteEventLogManager::OnWebRtcEventLogUploadComplete, - base::Unretained(this)); + weak_ptr_factory_->GetWeakPtr()); // The uploader takes ownership of the file; it's no longer considered to be // pending. (If the upload fails, the log will be deleted.)
diff --git a/chrome/browser/media/webrtc/webrtc_event_log_manager_remote.h b/chrome/browser/media/webrtc/webrtc_event_log_manager_remote.h index 838e984d..1326d20f 100644 --- a/chrome/browser/media/webrtc/webrtc_event_log_manager_remote.h +++ b/chrome/browser/media/webrtc/webrtc_event_log_manager_remote.h
@@ -8,6 +8,7 @@ #include <map> #include <set> +#include "base/memory/weak_ptr.h" #include "base/optional.h" #include "base/sequenced_task_runner.h" #include "base/time/time.h" @@ -57,12 +58,18 @@ // peer connections associated with this BrowserContext, in the // BrowserContext's user-data directory, becomes possible. // This method would typically be called when a BrowserContext is initialized. + // Enabling for the same BrowserContext twice in a row, without disabling + // in between, is an error. void EnableForBrowserContext(BrowserContextId browser_context_id, const base::FilePath& browser_context_dir); - // Enables remote-bound logging for a given BrowserContext. Pending logs from - // earlier (while it was enabled) may still be uploaded, but no additional - // logs will be created. + // Disables remote-bound logging for a given BrowserContext. Pending logs from + // earlier (while it was enabled) may no longer be uploaded, additional + // logs will not be created, and any active uploads associated with the + // BrowserContext will be cancelled. + // Disabling for a BrowserContext which was not enabled is not an error, + // because the caller is not required to know whether a previous call + // to EnableForBrowserContext() was successful. void DisableForBrowserContext(BrowserContextId browser_context_id); // Called to inform |this| of peer connections being added/removed. @@ -132,6 +139,13 @@ const base::Time& delete_begin, const base::Time& delete_end); + // Works on not-enabled BrowserContext-s, which means the logs are never made + // eligible for upload. Useful when a BrowserContext is loaded which in + // the past had remote-logging enabled, but no longer does. + void RemovePendingLogsForNotEnabledBrowserContext( + BrowserContextId browser_context_id, + const base::FilePath& browser_context_dir); + // An implicit PeerConnectionRemoved() on all of the peer connections that // were associated with the renderer process. void RenderProcessHostExitedDestroyed(int render_process_id); @@ -153,6 +167,11 @@ // documentation for the rationale. void UploadConditionsHoldForTesting(base::OnceCallback<void(bool)> callback); + // In production code, |task_runner_| stops running tasks as part of Chrome's + // shut-down process, before |this| is torn down. In unit tests, this is + // not the case. + void ShutDownForTesting(base::OnceClosure reply); + private: // Validates log parameters (at the moment, only max file size). // If valid, returns true. Otherwise, false, and |error_message| gets @@ -381,6 +400,15 @@ // following IO-capable sequenced task runner. scoped_refptr<base::SequencedTaskRunner> task_runner_; + // Weak pointer factory. Only expected to be useful for unit tests, because + // in production, |task_runner_| is stopped during shut-down, so tasks will + // either find the pointer to be valid, or not run because the runner has + // already been stopped. + // Note that the unique_ptr is used just to make it clearer that ownership is + // here. In reality, this is never auto-destroyed; see destructor for details. + std::unique_ptr<base::WeakPtrFactory<WebRtcRemoteEventLogManager>> + weak_ptr_factory_; + DISALLOW_COPY_AND_ASSIGN(WebRtcRemoteEventLogManager); };
diff --git a/chrome/browser/media/webrtc/webrtc_event_log_manager_unittest.cc b/chrome/browser/media/webrtc/webrtc_event_log_manager_unittest.cc index 1cf5a9c4..82d8bc7 100644 --- a/chrome/browser/media/webrtc/webrtc_event_log_manager_unittest.cc +++ b/chrome/browser/media/webrtc/webrtc_event_log_manager_unittest.cc
@@ -118,6 +118,20 @@ return PeerConnectionKey(rph->GetID(), lid, browser_context_id); } +bool CreateRemoteBoundLogFile(const base::FilePath& dir, + const base::FilePath::StringPieceType& extension, + base::FilePath* file_path, + base::File* file) { + *file_path = + dir.Append(kRemoteBoundWebRtcEventLogFileNamePrefix) + .InsertBeforeExtensionASCII("01234567890123456789012345678901") + .AddExtension(extension); + constexpr int file_flags = base::File::FLAG_CREATE | base::File::FLAG_WRITE | + base::File::FLAG_EXCLUSIVE_WRITE; + file->Initialize(*file_path, file_flags); + return (file->IsValid() && file->created()); +} + // This implementation does not upload files, nor pretends to have finished an // upload. Most importantly, it does not get rid of the locally-stored log file // after finishing a simulated upload; this is useful because it keeps the file @@ -151,20 +165,33 @@ class Factory : public WebRtcEventLogUploader::Factory { public: - explicit Factory(bool cancellation_expected) - : cancellation_expected_(cancellation_expected) {} + Factory(bool cancellation_expected, + base::Optional<size_t> expected_instance_count = + base::Optional<size_t>()) + : cancellation_expected_(cancellation_expected), + expected_instance_count_(expected_instance_count), + instance_count_(0) {} - ~Factory() override = default; + ~Factory() override { + if (expected_instance_count_.has_value()) { + EXPECT_EQ(instance_count_, expected_instance_count_.value()); + } + } std::unique_ptr<WebRtcEventLogUploader> Create( const WebRtcLogFileInfo& log_file, UploadResultCallback callback) override { + if (expected_instance_count_.has_value()) { + EXPECT_LE(++instance_count_, expected_instance_count_.value()); + } return std::make_unique<NullWebRtcEventLogUploader>( log_file, cancellation_expected_); } private: const bool cancellation_expected_; + const base::Optional<size_t> expected_instance_count_; + size_t instance_count_; }; private: @@ -219,6 +246,10 @@ ~WebRtcEventLogManagerTestBase() override { WaitForPendingTasks(); + base::RunLoop run_loop; + event_log_manager_->ShutDownForTesting(run_loop.QuitClosure()); + run_loop.Run(); + // We do not want to satisfy any unsatisfied expectations by destroying // |rph_|, |browser_context_|, etc., at the end of the test, before we // destroy |event_log_manager_|. However, we must also make sure that their @@ -564,7 +595,12 @@ base::FilePath RemoteBoundLogsDir( const BrowserContext* browser_context) const { - return GetRemoteBoundWebRtcEventLogsDir(browser_context->GetPath()); + return RemoteBoundLogsDir(browser_context->GetPath()); + } + + base::FilePath RemoteBoundLogsDir( + const base::FilePath& browser_context_base_dir) const { + return GetRemoteBoundWebRtcEventLogsDir(browser_context_base_dir); } // Initiate an arbitrary synchronous operation, allowing any tasks pending @@ -657,9 +693,9 @@ } // Testing utilities. + content::TestBrowserThreadBundle test_browser_thread_bundle_; base::test::ScopedFeatureList scoped_feature_list_; base::test::ScopedCommandLine scoped_command_line_; - content::TestBrowserThreadBundle test_browser_thread_bundle_; base::SimpleTestClock frozen_clock_; scoped_refptr<net::TestURLRequestContextGetter> url_request_context_getter_; @@ -879,6 +915,34 @@ const bool policy_enabled_; // Whether the policy is enabled for the profile. }; +class WebRtcEventLogManagerTestPolicy : public WebRtcEventLogManagerTestBase { + public: + ~WebRtcEventLogManagerTestPolicy() override = default; + + // Defer to setup from the body. + void SetUp() override {} + + void SetUp(bool feature_enabled) { + if (feature_enabled) { + scoped_feature_list_.InitAndEnableFeature( + features::kWebRtcRemoteEventLog); + } else { + scoped_feature_list_.InitAndDisableFeature( + features::kWebRtcRemoteEventLog); + } + + // Avoid proactive pruning; it has the potential to mess up tests, as well + // as keep pendings tasks around with a dangling reference to the unit + // under test. (Zero is a sentinel value for disabling proactive pruning.) + scoped_command_line_.GetProcessCommandLine()->AppendSwitchASCII( + ::switches::kWebRtcRemoteEventLogUploadDelayMs, "0"); + + CreateWebRtcEventLogManager(Compression::GZIP_PERFECT_ESTIMATION); + + WebRtcEventLogManagerTestBase::SetUp(); + } +}; + class WebRtcEventLogManagerTestUploadSuppressionDisablingFlag : public WebRtcEventLogManagerTestBase { public: @@ -938,15 +1002,10 @@ // creation of logs in a previous session. ASSERT_TRUE(CreateDirectory(remote_logs_dir)); - const base::FilePath file_path = - remote_logs_dir.Append(kRemoteBoundWebRtcEventLogFileNamePrefix) - .InsertBeforeExtensionASCII("01234567890123456789012345678901") - .AddExtension(remote_log_extension_); - constexpr int file_flags = base::File::FLAG_CREATE | - base::File::FLAG_WRITE | - base::File::FLAG_EXCLUSIVE_WRITE; - file_ = base::File(file_path, file_flags); - ASSERT_TRUE(file_.IsValid() && file_.created()); + base::FilePath file_path; + ASSERT_TRUE(CreateRemoteBoundLogFile(remote_logs_dir, remote_log_extension_, + &file_path, &file_)); + expected_files_.emplace_back(browser_context_id_, file_path, GetLastModificationTime(file_path)); } @@ -1000,6 +1059,9 @@ WebRtcEventLogManagerTestCompression() { scoped_feature_list_.InitAndEnableFeature(features::kWebRtcRemoteEventLog); + // Avoid proactive pruning; it has the potential to mess up tests, as well + // as keep pendings tasks around with a dangling reference to the unit + // under test. (Zero is a sentinel value for disabling proactive pruning.) scoped_command_line_.GetProcessCommandLine()->AppendSwitchASCII( ::switches::kWebRtcRemoteEventLogUploadDelayMs, "0"); } @@ -3547,6 +3609,351 @@ WebRtcEventLogManagerTestWithRemoteLoggingDisabled, ::testing::Bool()); +// This test is redundant; it is provided for completeness; see following tests. +TEST_F(WebRtcEventLogManagerTestPolicy, StartsEnabledAllowsRemoteLogging) { + SetUp(true); // Feature generally enabled (kill-switch not engaged). + + const bool allow_remote_logging = true; + auto browser_context = CreateBrowserContext("name", allow_remote_logging); + + auto rph = std::make_unique<MockRenderProcessHost>(browser_context.get()); + const auto key = GetPeerConnectionKey(rph.get(), kLid); + + ASSERT_TRUE(PeerConnectionAdded(key)); + EXPECT_EQ(StartRemoteLogging(key), allow_remote_logging); +} + +// This test is redundant; it is provided for completeness; see following tests. +TEST_F(WebRtcEventLogManagerTestPolicy, StartsDisabledRejectsRemoteLogging) { + SetUp(true); // Feature generally enabled (kill-switch not engaged). + + const bool allow_remote_logging = false; + auto browser_context = CreateBrowserContext("name", allow_remote_logging); + + auto rph = std::make_unique<MockRenderProcessHost>(browser_context.get()); + const auto key = GetPeerConnectionKey(rph.get(), kLid); + + ASSERT_TRUE(PeerConnectionAdded(key)); + EXPECT_EQ(StartRemoteLogging(key), allow_remote_logging); +} + +// #1 and #2 differ in the order of AddPeerConnection and the changing of +// the pref value. +TEST_F(WebRtcEventLogManagerTestPolicy, + StartsEnabledThenDisabledRejectsRemoteLogging1) { + SetUp(true); // Feature generally enabled (kill-switch not engaged). + + bool allow_remote_logging = true; + auto profile = CreateBrowserContext("name", allow_remote_logging); + + auto rph = std::make_unique<MockRenderProcessHost>(profile.get()); + const auto key = GetPeerConnectionKey(rph.get(), kLid); + + ASSERT_TRUE(PeerConnectionAdded(key)); + + allow_remote_logging = !allow_remote_logging; + profile->GetPrefs()->SetBoolean(prefs::kWebRtcEventLogCollectionAllowed, + allow_remote_logging); + + EXPECT_EQ(StartRemoteLogging(key), allow_remote_logging); +} + +// #1 and #2 differ in the order of AddPeerConnection and the changing of +// the pref value. +TEST_F(WebRtcEventLogManagerTestPolicy, + StartsEnabledThenDisabledRejectsRemoteLogging2) { + SetUp(true); // Feature generally enabled (kill-switch not engaged). + + bool allow_remote_logging = true; + auto profile = CreateBrowserContext("name", allow_remote_logging); + + auto rph = std::make_unique<MockRenderProcessHost>(profile.get()); + const auto key = GetPeerConnectionKey(rph.get(), kLid); + + allow_remote_logging = !allow_remote_logging; + profile->GetPrefs()->SetBoolean(prefs::kWebRtcEventLogCollectionAllowed, + allow_remote_logging); + + ASSERT_TRUE(PeerConnectionAdded(key)); + + EXPECT_EQ(StartRemoteLogging(key), allow_remote_logging); +} + +// #1 and #2 differ in the order of AddPeerConnection and the changing of +// the pref value. +TEST_F(WebRtcEventLogManagerTestPolicy, + StartsDisabledThenEnabledAllowsRemoteLogging1) { + SetUp(true); // Feature generally enabled (kill-switch not engaged). + + bool allow_remote_logging = false; + auto profile = CreateBrowserContext("name", allow_remote_logging); + + auto rph = std::make_unique<MockRenderProcessHost>(profile.get()); + const auto key = GetPeerConnectionKey(rph.get(), kLid); + + ASSERT_TRUE(PeerConnectionAdded(key)); + + allow_remote_logging = !allow_remote_logging; + profile->GetPrefs()->SetBoolean(prefs::kWebRtcEventLogCollectionAllowed, + allow_remote_logging); + + EXPECT_EQ(StartRemoteLogging(key), allow_remote_logging); +} + +// #1 and #2 differ in the order of AddPeerConnection and the changing of +// the pref value. +TEST_F(WebRtcEventLogManagerTestPolicy, + StartsDisabledThenEnabledAllowsRemoteLogging2) { + SetUp(true); // Feature generally enabled (kill-switch not engaged). + + bool allow_remote_logging = false; + auto profile = CreateBrowserContext("name", allow_remote_logging); + + auto rph = std::make_unique<MockRenderProcessHost>(profile.get()); + const auto key = GetPeerConnectionKey(rph.get(), kLid); + + allow_remote_logging = !allow_remote_logging; + profile->GetPrefs()->SetBoolean(prefs::kWebRtcEventLogCollectionAllowed, + allow_remote_logging); + + ASSERT_TRUE(PeerConnectionAdded(key)); + + EXPECT_EQ(StartRemoteLogging(key), allow_remote_logging); +} + +TEST_F(WebRtcEventLogManagerTestPolicy, + StartsDisabledThenEnabledUploadsPendingLogFiles) { + SetUp(true); // Feature generally enabled (kill-switch not engaged). + + bool allow_remote_logging = false; + auto profile = CreateBrowserContext("name", allow_remote_logging); + + auto rph = std::make_unique<MockRenderProcessHost>(profile.get()); + const auto key = GetPeerConnectionKey(rph.get(), kLid); + + allow_remote_logging = !allow_remote_logging; + profile->GetPrefs()->SetBoolean(prefs::kWebRtcEventLogCollectionAllowed, + allow_remote_logging); + + base::Optional<base::FilePath> log_file; + ON_CALL(remote_observer_, OnRemoteLogStarted(key, _)) + .WillByDefault(Invoke(SaveFilePathTo(&log_file))); + ASSERT_TRUE(PeerConnectionAdded(key)); + ASSERT_TRUE(allow_remote_logging) + << "Must turn on before StartRemoteLogging, to test the right thing."; + ASSERT_EQ(StartRemoteLogging(key), allow_remote_logging); + ASSERT_TRUE(log_file); + + base::RunLoop run_loop; + std::list<WebRtcLogFileInfo> expected_files = {WebRtcLogFileInfo( + browser_context_id_, *log_file, GetLastModificationTime(*log_file))}; + SetWebRtcEventLogUploaderFactoryForTesting( + std::make_unique<FileListExpectingWebRtcEventLogUploader::Factory>( + &expected_files, true, &run_loop)); + + ASSERT_TRUE(PeerConnectionRemoved(key)); + + WaitForPendingTasks(&run_loop); +} + +TEST_F(WebRtcEventLogManagerTestPolicy, + StartsEnabledThenDisabledDoesNotUploadPendingLogFiles) { + SetUp(true); // Feature generally enabled (kill-switch not engaged). + + SuppressUploading(); + + std::list<WebRtcLogFileInfo> empty_list; + base::RunLoop run_loop; + SetWebRtcEventLogUploaderFactoryForTesting( + std::make_unique<FileListExpectingWebRtcEventLogUploader::Factory>( + &empty_list, true, &run_loop)); + + bool allow_remote_logging = true; + auto profile = CreateBrowserContext("name", allow_remote_logging); + + auto rph = std::make_unique<MockRenderProcessHost>(profile.get()); + const auto key = GetPeerConnectionKey(rph.get(), kLid); + + ASSERT_TRUE(PeerConnectionAdded(key)); + ASSERT_TRUE(allow_remote_logging) + << "Must turn off after StartRemoteLogging, to test the right thing."; + ASSERT_EQ(StartRemoteLogging(key), allow_remote_logging); + ASSERT_TRUE(PeerConnectionRemoved(key)); + + allow_remote_logging = !allow_remote_logging; + profile->GetPrefs()->SetBoolean(prefs::kWebRtcEventLogCollectionAllowed, + allow_remote_logging); + + UnsuppressUploading(); + + WaitForPendingTasks(&run_loop); +} + +TEST_F(WebRtcEventLogManagerTestPolicy, + StartsEnabledThenDisabledDeletesPendingLogFiles) { + SetUp(true); // Feature generally enabled (kill-switch not engaged). + + SuppressUploading(); + + std::list<WebRtcLogFileInfo> empty_list; + base::RunLoop run_loop; + SetWebRtcEventLogUploaderFactoryForTesting( + std::make_unique<FileListExpectingWebRtcEventLogUploader::Factory>( + &empty_list, true, &run_loop)); + + bool allow_remote_logging = true; + auto profile = CreateBrowserContext("name", allow_remote_logging); + + auto rph = std::make_unique<MockRenderProcessHost>(profile.get()); + const auto key = GetPeerConnectionKey(rph.get(), kLid); + + base::Optional<base::FilePath> log_file; + ON_CALL(remote_observer_, OnRemoteLogStarted(key, _)) + .WillByDefault(Invoke(SaveFilePathTo(&log_file))); + ASSERT_TRUE(PeerConnectionAdded(key)); + ASSERT_TRUE(allow_remote_logging) + << "Must turn off after StartRemoteLogging, to test the right thing."; + ASSERT_EQ(StartRemoteLogging(key), allow_remote_logging); + ASSERT_TRUE(log_file); + + // Make the file PENDING. + ASSERT_TRUE(PeerConnectionRemoved(key)); + ASSERT_TRUE(base::PathExists(*log_file)); // Test sanity; exists before. + + allow_remote_logging = !allow_remote_logging; + profile->GetPrefs()->SetBoolean(prefs::kWebRtcEventLogCollectionAllowed, + allow_remote_logging); + + WaitForPendingTasks(&run_loop); + + // Test focus - file deleted without being uploaded. + EXPECT_FALSE(base::PathExists(*log_file)); + + // Still not uploaded. + UnsuppressUploading(); + WaitForPendingTasks(); +} + +TEST_F(WebRtcEventLogManagerTestPolicy, + StartsEnabledThenDisabledCancelsAndDeletesCurrentlyUploadedLogFile) { + SetUp(true); // Feature generally enabled (kill-switch not engaged). + + // This factory expects exactly one log to be created, then cancelled. + SetWebRtcEventLogUploaderFactoryForTesting( + std::make_unique<NullWebRtcEventLogUploader::Factory>(true, 1)); + + bool allow_remote_logging = true; + auto profile = CreateBrowserContext("name", allow_remote_logging); + + auto rph = std::make_unique<MockRenderProcessHost>(profile.get()); + const auto key = GetPeerConnectionKey(rph.get(), kLid); + + base::Optional<base::FilePath> log_file; + ON_CALL(remote_observer_, OnRemoteLogStarted(key, _)) + .WillByDefault(Invoke(SaveFilePathTo(&log_file))); + ASSERT_TRUE(PeerConnectionAdded(key)); + ASSERT_TRUE(allow_remote_logging) + << "Must turn off after StartRemoteLogging, to test the right thing."; + ASSERT_EQ(StartRemoteLogging(key), allow_remote_logging); + ASSERT_TRUE(log_file); + + // Log file's upload commences. + ASSERT_TRUE(PeerConnectionRemoved(key)); + + ASSERT_TRUE(base::PathExists(*log_file)); // Test sanity; exists before. + + allow_remote_logging = !allow_remote_logging; + profile->GetPrefs()->SetBoolean(prefs::kWebRtcEventLogCollectionAllowed, + allow_remote_logging); + + WaitForPendingTasks(); + + // Test focus - file deleted without being uploaded. + // When the test terminates, the NullWebRtcEventLogUploader::Factory's + // expectation that one log file was uploaded, and that the upload was + // cancelled, is enforced. + // Deletion of the file not performed by NullWebRtcEventLogUploader; instead, + // WebRtcEventLogUploaderImplTest.CancelOnOngoingUploadDeletesFile tests that. +} + +// This test makes sure that if the policy was enabled in the past, but was +// disabled while Chrome was not running, pending logs created during the +// earlier session will be deleted from disk. +TEST_F(WebRtcEventLogManagerTestPolicy, + PendingLogsFromPreviousSessionRemovedIfPolicyDisabledAtNewSessionStart) { + SetUp(true); // Feature generally enabled (kill-switch not engaged). + + SuppressUploading(); + + SetWebRtcEventLogUploaderFactoryForTesting( + std::make_unique<NullWebRtcEventLogUploader::Factory>(true, 0)); + + bool allow_remote_logging = true; + auto browser_context = CreateBrowserContext("name", allow_remote_logging); + + const base::FilePath browser_context_dir = + RemoteBoundLogsDir(browser_context.get()); + ASSERT_TRUE(base::DirectoryExists(browser_context_dir)); + + auto rph = std::make_unique<MockRenderProcessHost>(browser_context.get()); + const auto key = GetPeerConnectionKey(rph.get(), kLid); + + // Produce an empty log file in the BrowserContext. It's not uploaded + // because uploading is suppressed. + ASSERT_TRUE(PeerConnectionAdded(key)); + ASSERT_TRUE(allow_remote_logging) + << "Must turn off after StartRemoteLogging, to test the right thing."; + ASSERT_EQ(StartRemoteLogging(key), allow_remote_logging); + ASSERT_TRUE(PeerConnectionRemoved(key)); + + // Reload the BrowserContext, but this time with the policy disabling + // the feature. + rph.reset(); + browser_context.reset(); + ASSERT_TRUE(base::DirectoryExists(browser_context_dir)); // Test sanity + allow_remote_logging = false; + browser_context = CreateBrowserContext("name", allow_remote_logging); + + // Test focus - pending log files removed, as well as any potential metadata + // associated with remote-bound logging for |browser_context|. + ASSERT_FALSE(base::DirectoryExists(browser_context_dir)); + + // When NullWebRtcEventLogUploader::Factory is destroyed, it will show that + // the deleted log file was never uploaded. + UnsuppressUploading(); + WaitForPendingTasks(); +} + +TEST_F(WebRtcEventLogManagerTestPolicy, + PendingLogsFromPreviousSessionRemovedIfRemoteLoggingKillSwitchEngaged) { + SetUp(false); // Feature generally disabled (kill-switch engaged). + + SetWebRtcEventLogUploaderFactoryForTesting( + std::make_unique<NullWebRtcEventLogUploader::Factory>(true, 0)); + + const std::string name = "name"; + const base::FilePath browser_context_dir = + profiles_dir_.GetPath().AppendASCII(name); + const base::FilePath remote_bound_dir = + RemoteBoundLogsDir(browser_context_dir); + ASSERT_FALSE(base::PathExists(remote_bound_dir)); + + base::FilePath file_path; + base::File file; + ASSERT_TRUE(base::CreateDirectory(remote_bound_dir)); + ASSERT_TRUE(CreateRemoteBoundLogFile(remote_bound_dir, remote_log_extension_, + &file_path, &file)); + file.Close(); + + const bool allow_remote_logging = true; + auto browser_context = CreateBrowserContext(name, allow_remote_logging); + ASSERT_EQ(browser_context->GetPath(), browser_context_dir); // Test sanity + + WaitForPendingTasks(); + + EXPECT_FALSE(base::PathExists(remote_bound_dir)); +} + TEST_F(WebRtcEventLogManagerTestUploadSuppressionDisablingFlag, UploadingNotSuppressedByActivePeerConnections) { SuppressUploading();
diff --git a/chrome/browser/media/webrtc/webrtc_internals_integration_browsertest.cc b/chrome/browser/media/webrtc/webrtc_internals_integration_browsertest.cc index 7ea1f96..bd9a6ce 100644 --- a/chrome/browser/media/webrtc/webrtc_internals_integration_browsertest.cc +++ b/chrome/browser/media/webrtc/webrtc_internals_integration_browsertest.cc
@@ -8,8 +8,8 @@ #include "base/run_loop.h" #include "base/threading/thread_restrictions.h" #include "chrome/browser/media/webrtc/webrtc_browsertest_base.h" +#include "chrome/browser/media/webrtc/webrtc_event_log_manager.h" #include "content/public/browser/web_contents.h" -#include "content/public/browser/webrtc_event_logger.h" #include "content/public/common/content_switches.h" #include "media/base/media_switches.h" #include "net/test/embedded_test_server/embedded_test_server.h" @@ -40,11 +40,11 @@ // internal task runners (if any exist) before we examine anything we // expect to be produced by WebRtcEventLogger (files, etc.). void WaitForEventLogProcessing() { - auto* webrtc_event_logger = content::WebRtcEventLogger::Get(); - ASSERT_TRUE(webrtc_event_logger); + WebRtcEventLogManager* manager = WebRtcEventLogManager::GetInstance(); + ASSERT_TRUE(manager); base::RunLoop run_loop; - webrtc_event_logger->PostNullTaskForTesting(run_loop.QuitWhenIdleClosure()); + manager->PostNullTaskForTesting(run_loop.QuitWhenIdleClosure()); run_loop.Run(); }
diff --git a/chrome/browser/media_galleries/gallery_watch_manager_unittest.cc b/chrome/browser/media_galleries/gallery_watch_manager_unittest.cc index 52da6a7..5169442 100644 --- a/chrome/browser/media_galleries/gallery_watch_manager_unittest.cc +++ b/chrome/browser/media_galleries/gallery_watch_manager_unittest.cc
@@ -31,8 +31,7 @@ #if defined(OS_CHROMEOS) #include "chrome/browser/chromeos/login/users/scoped_test_user_manager.h" -#include "chrome/browser/chromeos/settings/cros_settings.h" -#include "chrome/browser/chromeos/settings/device_settings_service.h" +#include "chrome/browser/chromeos/settings/scoped_cros_settings_test_helper.h" #endif namespace component_updater { @@ -202,8 +201,7 @@ EnsureMediaDirectoriesExists mock_gallery_locations_; #if defined(OS_CHROMEOS) - chromeos::ScopedTestDeviceSettingsService test_device_settings_service_; - chromeos::ScopedTestCrosSettings test_cros_settings_; + chromeos::ScopedCrosSettingsTestHelper cros_settings_test_helper_; std::unique_ptr<chromeos::ScopedTestUserManager> test_user_manager_; #endif
diff --git a/chrome/browser/media_galleries/media_file_system_registry_unittest.cc b/chrome/browser/media_galleries/media_file_system_registry_unittest.cc index 62e5f89..527fbfd 100644 --- a/chrome/browser/media_galleries/media_file_system_registry_unittest.cc +++ b/chrome/browser/media_galleries/media_file_system_registry_unittest.cc
@@ -51,8 +51,7 @@ #include "testing/gtest/include/gtest/gtest.h" #if defined(OS_CHROMEOS) -#include "chrome/browser/chromeos/settings/cros_settings.h" -#include "chrome/browser/chromeos/settings/device_settings_service.h" +#include "chrome/browser/chromeos/settings/scoped_cros_settings_test_helper.h" #endif namespace content { @@ -393,8 +392,7 @@ // Needed for extension service & friends to work. #if defined(OS_CHROMEOS) - chromeos::ScopedTestDeviceSettingsService test_device_settings_service_; - chromeos::ScopedTestCrosSettings test_cros_settings_; + chromeos::ScopedCrosSettingsTestHelper cros_settings_test_helper_; #endif MockProfileSharedRenderProcessHostFactory rph_factory_;
diff --git a/chrome/browser/media_galleries/media_galleries_permission_controller_unittest.cc b/chrome/browser/media_galleries/media_galleries_permission_controller_unittest.cc index de7b992a..decf180c 100644 --- a/chrome/browser/media_galleries/media_galleries_permission_controller_unittest.cc +++ b/chrome/browser/media_galleries/media_galleries_permission_controller_unittest.cc
@@ -25,8 +25,7 @@ #if defined(OS_CHROMEOS) #include "chrome/browser/chromeos/login/users/scoped_test_user_manager.h" -#include "chrome/browser/chromeos/settings/cros_settings.h" -#include "chrome/browser/chromeos/settings/device_settings_service.h" +#include "chrome/browser/chromeos/settings/scoped_cros_settings_test_helper.h" #endif using storage_monitor::StorageInfo; @@ -154,8 +153,7 @@ scoped_refptr<extensions::Extension> extension_; #if defined OS_CHROMEOS - chromeos::ScopedTestDeviceSettingsService test_device_settings_service_; - chromeos::ScopedTestCrosSettings test_cros_settings_; + chromeos::ScopedCrosSettingsTestHelper cros_settings_test_helper_; chromeos::ScopedTestUserManager test_user_manager_; #endif
diff --git a/chrome/browser/media_galleries/media_galleries_preferences_unittest.cc b/chrome/browser/media_galleries/media_galleries_preferences_unittest.cc index 55c7203a..089a26e 100644 --- a/chrome/browser/media_galleries/media_galleries_preferences_unittest.cc +++ b/chrome/browser/media_galleries/media_galleries_preferences_unittest.cc
@@ -43,8 +43,7 @@ #if defined(OS_CHROMEOS) #include "chrome/browser/chromeos/login/users/scoped_test_user_manager.h" -#include "chrome/browser/chromeos/settings/cros_settings.h" -#include "chrome/browser/chromeos/settings/device_settings_service.h" +#include "chrome/browser/chromeos/settings/scoped_cros_settings_test_helper.h" #endif using base::ASCIIToUTF16; @@ -371,8 +370,7 @@ EnsureMediaDirectoriesExists mock_gallery_locations_; #if defined(OS_CHROMEOS) - chromeos::ScopedTestDeviceSettingsService test_device_settings_service_; - chromeos::ScopedTestCrosSettings test_cros_settings_; + chromeos::ScopedCrosSettingsTestHelper cros_settings_test_helper_; chromeos::ScopedTestUserManager test_user_manager_; #endif
diff --git a/chrome/browser/net/chrome_network_delegate.cc b/chrome/browser/net/chrome_network_delegate.cc index 4067eb7..a301416 100644 --- a/chrome/browser/net/chrome_network_delegate.cc +++ b/chrome/browser/net/chrome_network_delegate.cc
@@ -92,6 +92,7 @@ "/home/chronos/user/WebRTC Logs", "/media", "/opt/oem", + "/run/arc/sdcard/write/emulated/0", "/usr/share/chromeos-assets", "/var/log", };
diff --git a/chrome/browser/net/errorpage_browsertest.cc b/chrome/browser/net/errorpage_browsertest.cc index 5b2c358..af65db0e 100644 --- a/chrome/browser/net/errorpage_browsertest.cc +++ b/chrome/browser/net/errorpage_browsertest.cc
@@ -1280,11 +1280,10 @@ #if defined(OS_CHROMEOS) if (enroll_) { // Set up fake install attributes. - std::unique_ptr<chromeos::StubInstallAttributes> attributes = - std::make_unique<chromeos::StubInstallAttributes>(); - attributes->SetCloudManaged("example.com", "fake-id"); - policy::BrowserPolicyConnectorChromeOS::SetInstallAttributesForTesting( - attributes.release()); + test_install_attributes_ = + std::make_unique<chromeos::ScopedStubInstallAttributes>( + chromeos::StubInstallAttributes::CreateCloudManaged("example.com", + "fake-id")); } #endif @@ -1319,7 +1318,7 @@ std::string NavigateToPageAndReadText() { #if defined(OS_CHROMEOS) - // Check enterprise enrollment + // Check enterprise enrollment policy::BrowserPolicyConnectorChromeOS* connector = g_browser_process->platform_part() ->browser_policy_connector_chromeos(); @@ -1353,6 +1352,9 @@ #if defined(OS_CHROMEOS) // Whether to enroll this CrOS device bool enroll_ = true; + + std::unique_ptr<chromeos::ScopedStubInstallAttributes> + test_install_attributes_; #endif // Mock policy provider for both user and device policies.
diff --git a/chrome/browser/page_load_metrics/observers/previews_ukm_observer.cc b/chrome/browser/page_load_metrics/observers/previews_ukm_observer.cc index 8fd88f1..e69f4e8 100644 --- a/chrome/browser/page_load_metrics/observers/previews_ukm_observer.cc +++ b/chrome/browser/page_load_metrics/observers/previews_ukm_observer.cc
@@ -59,6 +59,10 @@ previews::PreviewsType::NOSCRIPT) { noscript_seen_ = true; } + if (previews_state && previews::GetMainFramePreviewsType(previews_state) == + previews::PreviewsType::RESOURCE_LOADING_HINTS) { + resource_loading_hints_seen_ = true; + } previews::PreviewsUserData* previews_user_data = chrome_navigation_data->previews_user_data(); if (previews_user_data && @@ -108,7 +112,8 @@ const page_load_metrics::PageLoadExtraInfo& info) { // Only record previews types when they are active. if (!server_lofi_seen_ && !client_lofi_seen_ && !lite_page_seen_ && - !noscript_seen_ && !origin_opt_out_occurred_ && !save_data_enabled_) { + !noscript_seen_ && !resource_loading_hints_seen_ && + !origin_opt_out_occurred_ && !save_data_enabled_) { return; } @@ -121,6 +126,8 @@ builder.Setlite_page(1); if (noscript_seen_) builder.Setnoscript(1); + if (resource_loading_hints_seen_) + builder.Setresource_loading_hints(1); if (opt_out_occurred_) builder.Setopt_out(1); if (origin_opt_out_occurred_)
diff --git a/chrome/browser/page_load_metrics/observers/previews_ukm_observer.h b/chrome/browser/page_load_metrics/observers/previews_ukm_observer.h index c7481d5..a4837924 100644 --- a/chrome/browser/page_load_metrics/observers/previews_ukm_observer.h +++ b/chrome/browser/page_load_metrics/observers/previews_ukm_observer.h
@@ -53,6 +53,7 @@ bool client_lofi_seen_ = false; bool lite_page_seen_ = false; bool noscript_seen_ = false; + bool resource_loading_hints_seen_ = false; bool opt_out_occurred_ = false; bool origin_opt_out_occurred_ = false; bool save_data_enabled_ = false;
diff --git a/chrome/browser/page_load_metrics/observers/previews_ukm_observer_unittest.cc b/chrome/browser/page_load_metrics/observers/previews_ukm_observer_unittest.cc index 8664539..faad523 100644 --- a/chrome/browser/page_load_metrics/observers/previews_ukm_observer_unittest.cc +++ b/chrome/browser/page_load_metrics/observers/previews_ukm_observer_unittest.cc
@@ -53,12 +53,14 @@ bool data_reduction_proxy_used, bool lite_page_received, bool noscript_on, + bool resource_loading_hints_on, bool origin_opt_out_received, bool save_data_enabled) : web_contents_(web_contents), data_reduction_proxy_used_(data_reduction_proxy_used), lite_page_received_(lite_page_received), noscript_on_(noscript_on), + resource_loading_hints_on_(resource_loading_hints_on), origin_opt_out_received_(origin_opt_out_received), save_data_enabled_(save_data_enabled) {} @@ -85,6 +87,18 @@ content::NOSCRIPT_ON); } + if (resource_loading_hints_on_) { + // ChromeNavigationData is guaranteed to be non-null at this point, as + // DataForNavigationHandle is always called prior to this and creates one. + ChromeNavigationData* chrome_navigation_data = + static_cast<ChromeNavigationData*>( + navigation_handle->GetNavigationData()); + content::PreviewsState previews_state = + chrome_navigation_data->previews_state(); + chrome_navigation_data->set_previews_state( + previews_state |= content::RESOURCE_LOADING_HINTS_ON); + } + if (origin_opt_out_received_) { // ChromeNavigationData is guaranteed to be non-null at this point, as // DataForNavigationHandle is always called prior to this and creates one. @@ -110,6 +124,7 @@ bool data_reduction_proxy_used_; bool lite_page_received_; bool noscript_on_; + bool resource_loading_hints_on_; bool origin_opt_out_received_; const bool save_data_enabled_; @@ -125,11 +140,13 @@ void RunTest(bool data_reduction_proxy_used, bool lite_page_received, bool noscript_on, + bool resource_loading_hints_on, bool origin_opt_out, bool save_data_enabled) { data_reduction_proxy_used_ = data_reduction_proxy_used; lite_page_received_ = lite_page_received; noscript_on_ = noscript_on; + resource_loading_hints_on_ = resource_loading_hints_on; origin_opt_out_ = origin_opt_out; save_data_enabled_ = save_data_enabled; NavigateAndCommit(GURL(kDefaultTestUrl)); @@ -139,13 +156,15 @@ bool client_lofi_expected, bool lite_page_expected, bool noscript_expected, + bool resource_loading_hints_expected, bool opt_out_expected, bool origin_opt_out_expected, bool save_data_enabled_expected) { using UkmEntry = ukm::builders::Previews; auto entries = test_ukm_recorder().GetEntriesByName(UkmEntry::kEntryName); if (!server_lofi_expected && !client_lofi_expected && !lite_page_expected && - !noscript_expected && !opt_out_expected && !origin_opt_out_expected && + !noscript_expected && !resource_loading_hints_expected && + !opt_out_expected && !origin_opt_out_expected && !save_data_enabled_expected) { EXPECT_EQ(0u, entries.size()); return; @@ -161,6 +180,9 @@ entry, UkmEntry::klite_pageName)); EXPECT_EQ(noscript_expected, test_ukm_recorder().EntryHasMetric( entry, UkmEntry::knoscriptName)); + EXPECT_EQ(resource_loading_hints_expected, + test_ukm_recorder().EntryHasMetric( + entry, UkmEntry::kresource_loading_hintsName)); EXPECT_EQ(opt_out_expected, test_ukm_recorder().EntryHasMetric( entry, UkmEntry::kopt_outName)); EXPECT_EQ(origin_opt_out_expected, @@ -176,11 +198,13 @@ void RegisterObservers(page_load_metrics::PageLoadTracker* tracker) override { tracker->AddObserver(std::make_unique<TestPreviewsUKMObserver>( web_contents(), data_reduction_proxy_used_, lite_page_received_, - noscript_on_, origin_opt_out_, save_data_enabled_)); + noscript_on_, resource_loading_hints_on_, origin_opt_out_, + save_data_enabled_)); // Data is only added to the first navigation after RunTest(). data_reduction_proxy_used_ = false; lite_page_received_ = false; noscript_on_ = false; + resource_loading_hints_on_ = false; origin_opt_out_ = false; } @@ -188,6 +212,7 @@ bool data_reduction_proxy_used_ = false; bool lite_page_received_ = false; bool noscript_on_ = false; + bool resource_loading_hints_on_ = false; bool origin_opt_out_ = false; bool save_data_enabled_ = false; @@ -196,21 +221,22 @@ TEST_F(PreviewsUKMObserverTest, NoPreviewSeen) { RunTest(false /* data_reduction_proxy_used */, false /* lite_page_received */, - false /* noscript_on */, false /* origin_opt_out */, - false /* save_data_enabled */); + false /* noscript_on */, false /* resource_loading_hints_on */, + false /* origin_opt_out */, false /* save_data_enabled */); NavigateToUntrackedUrl(); ValidateUKM(false /* server_lofi_expected */, false /* client_lofi_expected */, false /* lite_page_expected */, - false /* noscript_expected */, false /* opt_out_expected */, - false /* origin_opt_out_expected */, + false /* noscript_expected */, + false /* resource_loading_hints_expected */, + false /* opt_out_expected */, false /* origin_opt_out_expected */, false /* save_data_enabled_expected */); } TEST_F(PreviewsUKMObserverTest, UntrackedPreviewTypeOptOut) { RunTest(false /* data_reduction_proxy_used */, false /* lite_page_received */, - false /* noscript_on */, false /* origin_opt_out */, - false /* save_data_enabled */); + false /* noscript_on */, false /* resource_loading_hints_on */, + false /* origin_opt_out */, false /* save_data_enabled */); observer()->BroadcastEventToObservers( PreviewsInfoBarDelegate::OptOutEventKey()); NavigateToUntrackedUrl(); @@ -218,29 +244,31 @@ // Opt out should not be added since we don't track this type. ValidateUKM(false /* server_lofi_expected */, false /* client_lofi_expected */, false /* lite_page_expected */, - false /* noscript_expected */, false /* opt_out_expected */, - false /* origin_opt_out_expected */, + false /* noscript_expected */, + false /* resource_loading_hints_expected */, + false /* opt_out_expected */, false /* origin_opt_out_expected */, false /* save_data_enabled_expected */); } TEST_F(PreviewsUKMObserverTest, LitePageSeen) { RunTest(true /* data_reduction_proxy_used */, true /* lite_page_received */, - false /* noscript_on */, false /* origin_opt_out */, - false /* save_data_enabled */); + false /* noscript_on */, false /* resource_loading_hints_on */, + false /* origin_opt_out */, false /* save_data_enabled */); NavigateToUntrackedUrl(); ValidateUKM(false /* server_lofi_expected */, false /* client_lofi_expected */, true /* lite_page_expected */, - false /* noscript_expected */, false /* opt_out_expected */, - false /* origin_opt_out_expected */, + false /* noscript_expected */, + false /* resource_loading_hints_expected */, + false /* opt_out_expected */, false /* origin_opt_out_expected */, false /* save_data_enabled_expected */); } TEST_F(PreviewsUKMObserverTest, LitePageOptOut) { RunTest(true /* data_reduction_proxy_used */, true /* lite_page_received */, - false /* noscript_on */, false /* origin_opt_out */, - false /* save_data_enabled */); + false /* noscript_on */, false /* resource_loading_hints_on */, + false /* origin_opt_out */, false /* save_data_enabled */); observer()->BroadcastEventToObservers( PreviewsInfoBarDelegate::OptOutEventKey()); @@ -248,29 +276,31 @@ ValidateUKM(false /* server_lofi_expected */, false /* client_lofi_expected */, true /* lite_page_expected */, - false /* noscript_expected */, true /* opt_out_expected */, - false /* origin_opt_out_expected */, + false /* noscript_expected */, + false /* resource_loading_hints_expected */, + true /* opt_out_expected */, false /* origin_opt_out_expected */, false /* save_data_enabled_expected */); } TEST_F(PreviewsUKMObserverTest, NoScriptSeen) { RunTest(false /* data_reduction_proxy_used */, false /* lite_page_received */, - true /* noscript_on */, false /* origin_opt_out */, - false /* save_data_enabled */); + true /* noscript_on */, false /* resource_loading_hints_on */, + false /* origin_opt_out */, false /* save_data_enabled */); NavigateToUntrackedUrl(); ValidateUKM(false /* server_lofi_expected */, false /* client_lofi_expected */, false /* lite_page_expected */, - true /* noscript_expected */, false /* opt_out_expected */, - false /* origin_opt_out_expected */, + true /* noscript_expected */, + false /* resource_loading_hints_expected */, + false /* opt_out_expected */, false /* origin_opt_out_expected */, false /* save_data_enabled_expected */); } TEST_F(PreviewsUKMObserverTest, NoScriptOptOut) { RunTest(false /* data_reduction_proxy_used */, false /* lite_page_received */, - true /* noscript_on */, false /* origin_opt_out */, - false /* save_data_enabled */); + true /* noscript_on */, false /* resource_loading_hints_on */, + false /* origin_opt_out */, false /* save_data_enabled */); observer()->BroadcastEventToObservers( PreviewsInfoBarDelegate::OptOutEventKey()); @@ -278,15 +308,48 @@ ValidateUKM(false /* server_lofi_expected */, false /* client_lofi_expected */, false /* lite_page_expected */, - true /* noscript_expected */, true /* opt_out_expected */, - false /* origin_opt_out_expected */, + true /* noscript_expected */, + false /* resource_loading_hints_expected */, + true /* opt_out_expected */, false /* origin_opt_out_expected */, + false /* save_data_enabled_expected */); +} + +TEST_F(PreviewsUKMObserverTest, ResourceLoadingHintsSeen) { + RunTest(false /* data_reduction_proxy_used */, false /* lite_page_received */, + false /* noscript_on */, true /* resource_loading_hints_on */, + false /* origin_opt_out */, false /* save_data_enabled */); + + NavigateToUntrackedUrl(); + + ValidateUKM(false /* server_lofi_expected */, + false /* client_lofi_expected */, false /* lite_page_expected */, + false /* noscript_expected */, + true /* resource_loading_hints_expected */, + false /* opt_out_expected */, false /* origin_opt_out_expected */, + false /* save_data_enabled_expected */); +} + +TEST_F(PreviewsUKMObserverTest, ResourceLoadingHintsOptOut) { + RunTest(false /* data_reduction_proxy_used */, false /* lite_page_received */, + false /* noscript_on */, true /* resource_loading_hints_on */, + false /* origin_opt_out */, false /* save_data_enabled */); + + observer()->BroadcastEventToObservers( + PreviewsInfoBarDelegate::OptOutEventKey()); + NavigateToUntrackedUrl(); + + ValidateUKM(false /* server_lofi_expected */, + false /* client_lofi_expected */, false /* lite_page_expected */, + false /* noscript_expected */, + true /* resource_loading_hints_expected */, + true /* opt_out_expected */, false /* origin_opt_out_expected */, false /* save_data_enabled_expected */); } TEST_F(PreviewsUKMObserverTest, ClientLoFiSeen) { RunTest(false /* data_reduction_proxy_used */, false /* lite_page_received */, - false /* noscript_on */, false /* origin_opt_out */, - false /* save_data_enabled */); + false /* noscript_on */, false /* resource_loading_hints_on */, + false /* origin_opt_out */, false /* save_data_enabled */); std::unique_ptr<data_reduction_proxy::DataReductionProxyData> data = std::make_unique<data_reduction_proxy::DataReductionProxyData>(); @@ -316,14 +379,15 @@ ValidateUKM(false /* server_lofi_expected */, true /* client_lofi_expected */, false /* lite_page_expected */, false /* noscript_expected */, + false /* resource_loading_hints_expected */, false /* opt_out_expected */, false /* origin_opt_out_expected */, false /* save_data_enabled_expected */); } TEST_F(PreviewsUKMObserverTest, ClientLoFiOptOut) { RunTest(false /* data_reduction_proxy_used */, false /* lite_page_received */, - false /* noscript_on */, false /* origin_opt_out */, - false /* save_data_enabled */); + false /* noscript_on */, false /* resource_loading_hints_on */, + false /* origin_opt_out */, false /* save_data_enabled */); std::unique_ptr<data_reduction_proxy::DataReductionProxyData> data = std::make_unique<data_reduction_proxy::DataReductionProxyData>(); @@ -354,14 +418,15 @@ ValidateUKM(false /* server_lofi_expected */, true /* client_lofi_expected */, false /* lite_page_expected */, false /* noscript_expected */, + false /* resource_loading_hints_expected */, true /* opt_out_expected */, false /* origin_opt_out_expected */, false /* save_data_enabled_expected */); } TEST_F(PreviewsUKMObserverTest, ServerLoFiSeen) { RunTest(true /* data_reduction_proxy_used */, false /* lite_page_received */, - false /* noscript_on */, false /* origin_opt_out */, - false /* save_data_enabled */); + false /* noscript_on */, false /* resource_loading_hints_on */, + false /* origin_opt_out */, false /* save_data_enabled */); std::unique_ptr<data_reduction_proxy::DataReductionProxyData> data = std::make_unique<data_reduction_proxy::DataReductionProxyData>(); @@ -391,14 +456,15 @@ ValidateUKM(true /* server_lofi_expected */, false /* client_lofi_expected */, false /* lite_page_expected */, false /* noscript_expected */, + false /* resource_loading_hints_expected */, false /* opt_out_expected */, false /* origin_opt_out_expected */, false /* save_data_enabled_expected */); } TEST_F(PreviewsUKMObserverTest, ServerLoFiOptOut) { RunTest(true /* data_reduction_proxy_used */, false /* lite_page_received */, - false /* noscript_on */, false /* origin_opt_out */, - false /* save_data_enabled */); + false /* noscript_on */, false /* resource_loading_hints_on */, + false /* origin_opt_out */, false /* save_data_enabled */); std::unique_ptr<data_reduction_proxy::DataReductionProxyData> data = std::make_unique<data_reduction_proxy::DataReductionProxyData>(); @@ -430,14 +496,15 @@ ValidateUKM(true /* server_lofi_expected */, false /* client_lofi_expected */, false /* lite_page_expected */, false /* noscript_expected */, + false /* resource_loading_hints_expected */, true /* opt_out_expected */, false /* origin_opt_out_expected */, false /* save_data_enabled_expected */); } TEST_F(PreviewsUKMObserverTest, BothLoFiSeen) { RunTest(true /* data_reduction_proxy_used */, false /* lite_page_received */, - false /* noscript_on */, false /* origin_opt_out */, - false /* save_data_enabled */); + false /* noscript_on */, false /* resource_loading_hints_on */, + false /* origin_opt_out */, false /* save_data_enabled */); std::unique_ptr<data_reduction_proxy::DataReductionProxyData> data1 = std::make_unique<data_reduction_proxy::DataReductionProxyData>(); @@ -472,14 +539,15 @@ NavigateToUntrackedUrl(); ValidateUKM(true /* server_lofi_expected */, true /* client_lofi_expected */, false /* lite_page_expected */, false /* noscript_expected */, + false /* resource_loading_hints_expected */, false /* opt_out_expected */, false /* origin_opt_out_expected */, false /* save_data_enabled_expected */); } TEST_F(PreviewsUKMObserverTest, BothLoFiOptOut) { RunTest(true /* data_reduction_proxy_used */, false /* lite_page_received */, - false /* noscript_on */, false /* origin_opt_out */, - false /* save_data_enabled */); + false /* noscript_on */, false /* resource_loading_hints_on */, + false /* origin_opt_out */, false /* save_data_enabled */); std::unique_ptr<data_reduction_proxy::DataReductionProxyData> data1 = std::make_unique<data_reduction_proxy::DataReductionProxyData>(); @@ -515,63 +583,68 @@ NavigateToUntrackedUrl(); ValidateUKM(true /* server_lofi_expected */, true /* client_lofi_expected */, false /* lite_page_expected */, false /* noscript_expected */, + false /* resource_loading_hints_expected */, true /* opt_out_expected */, false /* origin_opt_out_expected */, false /* save_data_enabled_expected */); } TEST_F(PreviewsUKMObserverTest, OriginOptOut) { RunTest(false /* data_reduction_proxy_used */, false /* lite_page_received */, - false /* noscript_on */, true /* origin_opt_out */, - false /* save_data_enabled */); + false /* noscript_on */, false /* resource_loading_hints_on */, + true /* origin_opt_out */, false /* save_data_enabled */); NavigateToUntrackedUrl(); ValidateUKM(false /* server_lofi_expected */, false /* client_lofi_expected */, false /* lite_page_expected */, - false /* noscript_expected */, false /* opt_out_expected */, - true /* origin_opt_out_expected */, + false /* noscript_expected */, + false /* resource_loading_hints_expected */, + false /* opt_out_expected */, true /* origin_opt_out_expected */, false /* save_data_enabled_expected */); } TEST_F(PreviewsUKMObserverTest, DataSaverEnabled) { RunTest(false /* data_reduction_proxy_used */, false /* lite_page_received */, - false /* noscript_on */, false /* origin_opt_out */, - true /* save_data_enabled */); + false /* noscript_on */, false /* resource_loading_hints_on */, + false /* origin_opt_out */, true /* save_data_enabled */); NavigateToUntrackedUrl(); ValidateUKM(false /* server_lofi_expected */, false /* client_lofi_expected */, false /* lite_page_expected */, - false /* noscript_expected */, false /* opt_out_expected */, - false /* origin_opt_out_expected */, + false /* noscript_expected */, + false /* resource_loading_hints_expected */, + false /* opt_out_expected */, false /* origin_opt_out_expected */, true /* save_data_enabled_expected */); } TEST_F(PreviewsUKMObserverTest, CheckReportingForHidden) { RunTest(false /* data_reduction_proxy_used */, false /* lite_page_received */, - false /* noscript_on */, false /* origin_opt_out */, - true /* save_data_enabled */); + false /* noscript_on */, false /* resource_loading_hints_on */, + false /* origin_opt_out */, true /* save_data_enabled */); web_contents()->WasHidden(); ValidateUKM(false /* server_lofi_expected */, false /* client_lofi_expected */, false /* lite_page_expected */, - false /* noscript_expected */, false /* opt_out_expected */, - false /* origin_opt_out_expected */, + false /* noscript_expected */, + false /* resource_loading_hints_expected */, + false /* opt_out_expected */, false /* origin_opt_out_expected */, true /* save_data_enabled_expected */); } TEST_F(PreviewsUKMObserverTest, CheckReportingForFlushMetrics) { RunTest(false /* data_reduction_proxy_used */, false /* lite_page_received */, - false /* noscript_on */, false /* origin_opt_out */, - true /* save_data_enabled */); + false /* noscript_on */, false /* resource_loading_hints_on */, + false /* origin_opt_out */, true /* save_data_enabled */); SimulateAppEnterBackground(); ValidateUKM(false /* server_lofi_expected */, false /* client_lofi_expected */, false /* lite_page_expected */, - false /* noscript_expected */, false /* opt_out_expected */, - false /* origin_opt_out_expected */, + false /* noscript_expected */, + false /* resource_loading_hints_expected */, + false /* opt_out_expected */, false /* origin_opt_out_expected */, true /* save_data_enabled_expected */); }
diff --git a/chrome/browser/password_manager/chrome_password_manager_client.cc b/chrome/browser/password_manager/chrome_password_manager_client.cc index 38ff519..5e0398d 100644 --- a/chrome/browser/password_manager/chrome_password_manager_client.cc +++ b/chrome/browser/password_manager/chrome_password_manager_client.cc
@@ -18,6 +18,7 @@ #include "build/build_config.h" #include "chrome/browser/browser_process.h" #include "chrome/browser/browsing_data/browsing_data_helper.h" +#include "chrome/browser/favicon/favicon_service_factory.h" #include "chrome/browser/metrics/chrome_metrics_service_accessor.h" #include "chrome/browser/password_manager/password_store_factory.h" #include "chrome/browser/prerender/prerender_contents.h" @@ -908,6 +909,11 @@ Profile::FromBrowserContext(web_contents()->GetBrowserContext())); } +favicon::FaviconService* ChromePasswordManagerClient::GetFaviconService() { + return FaviconServiceFactory::GetForProfile( + profile_, ServiceAccessType::EXPLICIT_ACCESS); +} + void ChromePasswordManagerClient::UpdateFormManagers() { password_manager_.UpdateFormManagers(); }
diff --git a/chrome/browser/password_manager/chrome_password_manager_client.h b/chrome/browser/password_manager/chrome_password_manager_client.h index d4d6c84..1622917 100644 --- a/chrome/browser/password_manager/chrome_password_manager_client.h +++ b/chrome/browser/password_manager/chrome_password_manager_client.h
@@ -109,6 +109,7 @@ const password_manager::LogManager* GetLogManager() const override; password_manager::PasswordRequirementsService* GetPasswordRequirementsService() override; + favicon::FaviconService* GetFaviconService() override; void UpdateFormManagers() override; // autofill::mojom::PasswordManagerClient overrides.
diff --git a/chrome/browser/password_manager/password_accessory_metrics_util.h b/chrome/browser/password_manager/password_accessory_metrics_util.h index b41840d..57bb8ed 100644 --- a/chrome/browser/password_manager/password_accessory_metrics_util.h +++ b/chrome/browser/password_manager/password_accessory_metrics_util.h
@@ -36,6 +36,9 @@ }; // Used to record metrics specific to a tab types (e.g. passwords, payments). +// These values are persisted to logs. Entries should not be renumbered and +// numeric values should never be reused. Must be kept in sync with the enum +// in enums.xml. A java IntDef@ is generated from this. // GENERATED_JAVA_ENUM_PACKAGE: ( // org.chromium.chrome.browser.autofill.keyboard_accessory) enum class AccessoryTabType { @@ -45,15 +48,22 @@ }; // Used to record impressions and clicks on specific actions and links. +// These values are persisted to logs. Entries should not be renumbered and +// numeric values should never be reused. Must be kept in sync with the enum +// in enums.xml. A java IntDef@ is generated from this. // GENERATED_JAVA_ENUM_PACKAGE: ( // org.chromium.chrome.browser.autofill.keyboard_accessory) enum class AccessoryAction { GENERATE_PASSWORD_AUTOMATIC = 0, MANAGE_PASSWORDS = 1, + AUTOFILL_SUGGESTION = 2, COUNT, }; // Used to record which type of suggestion was selected. +// These values are persisted to logs. Entries should not be renumbered and +// numeric values should never be reused. Must be kept in sync with the enum +// in enums.xml. A java IntDef@ is generated from this. // GENERATED_JAVA_ENUM_PACKAGE: ( // org.chromium.chrome.browser.autofill.keyboard_accessory) enum class AccessorySuggestionType {
diff --git a/chrome/browser/password_manager/password_generation_interactive_uitest.cc b/chrome/browser/password_manager/password_generation_interactive_uitest.cc index 120150ec..8eafd4b 100644 --- a/chrome/browser/password_manager/password_generation_interactive_uitest.cc +++ b/chrome/browser/password_manager/password_generation_interactive_uitest.cc
@@ -300,9 +300,8 @@ EXPECT_TRUE(GenerationPopupShowing()); } -// https://crbug.com/791389 IN_PROC_BROWSER_TEST_F(PasswordGenerationInteractiveTest, - DISABLED_AutoSavingGeneratedPassword) { + AutoSavingGeneratedPassword) { scoped_refptr<password_manager::TestPasswordStore> password_store = static_cast<password_manager::TestPasswordStore*>( PasswordStoreFactory::GetForProfile( @@ -319,9 +318,7 @@ content::SimulateKeyPress(WebContents(), ui::DomKey::FromCharacter('U'), ui::DomCode::US_U, ui::VKEY_U, false, false, false, false); - content::SimulateKeyPress(WebContents(), ui::DomKey::FromCharacter('N'), - ui::DomCode::US_N, ui::VKEY_N, false, false, false, - false); + WaitForElementValue("username_field", "U"); // Submit form. NavigationObserver observer(WebContents()); @@ -338,6 +335,6 @@ password_store->stored_passwords(); EXPECT_EQ(1u, stored_passwords.size()); EXPECT_EQ(1u, stored_passwords.begin()->second.size()); - EXPECT_EQ(base::UTF8ToUTF16("UN"), + EXPECT_EQ(base::UTF8ToUTF16("U"), (stored_passwords.begin()->second)[0].username_value); }
diff --git a/chrome/browser/payments/service_worker_payment_app_factory_browsertest.cc b/chrome/browser/payments/service_worker_payment_app_factory_browsertest.cc index 72ebd09..e9612f8 100644 --- a/chrome/browser/payments/service_worker_payment_app_factory_browsertest.cc +++ b/chrome/browser/payments/service_worker_payment_app_factory_browsertest.cc
@@ -20,6 +20,7 @@ #include "chrome/test/remoting/remote_test_helper.h" #include "components/network_session_configurator/common/network_switches.h" #include "components/payments/content/payment_manifest_web_data_service.h" +#include "components/payments/core/features.h" #include "components/payments/core/test_payment_manifest_downloader.h" #include "content/public/browser/storage_partition.h" #include "content/public/common/content_features.h" @@ -43,9 +44,12 @@ : alicepay_(net::EmbeddedTestServer::TYPE_HTTPS), bobpay_(net::EmbeddedTestServer::TYPE_HTTPS), frankpay_(net::EmbeddedTestServer::TYPE_HTTPS), - georgepay_(net::EmbeddedTestServer::TYPE_HTTPS) { - scoped_feature_list_.InitAndEnableFeature( - features::kServiceWorkerPaymentApps); + georgepay_(net::EmbeddedTestServer::TYPE_HTTPS), + kylepay_(net::EmbeddedTestServer::TYPE_HTTPS) { + scoped_feature_list_.InitWithFeatures( + {::features::kServiceWorkerPaymentApps, + features::kWebPaymentsJustInTimePaymentApp}, + {}); } ~ServiceWorkerPaymentAppFactoryBrowserTest() override {} @@ -68,6 +72,7 @@ ASSERT_TRUE(StartTestServer("bobpay.com", &bobpay_)); ASSERT_TRUE(StartTestServer("frankpay.com", &frankpay_)); ASSERT_TRUE(StartTestServer("georgepay.com", &georgepay_)); + ASSERT_TRUE(StartTestServer("kylepay.com", &kylepay_)); GetPermissionRequestManager()->set_auto_response_for_test( PermissionRequestManager::ACCEPT_ALL); @@ -119,6 +124,8 @@ frankpay_.GetURL("frankpay.com", "/")); downloader->AddTestServerURL("https://georgepay.com/", georgepay_.GetURL("georgepay.com", "/")); + downloader->AddTestServerURL("https://kylepay.com/", + kylepay_.GetURL("kylepay.com", "/")); ServiceWorkerPaymentAppFactory::GetInstance() ->SetDownloaderAndIgnorePortInAppScopeForTesting(std::move(downloader)); @@ -143,9 +150,17 @@ run_loop.Run(); } - // Returns the apps that have been found in GetAllPaymentAppsForMethods(). + // Returns the installed apps that have been found in + // GetAllPaymentAppsForMethods(). const content::PaymentAppProvider::PaymentApps& apps() const { return apps_; } + // Returns the installable apps that have been found in + // GetAllPaymentAppsForMethods(). + const ServiceWorkerPaymentAppFactory::InstallablePaymentApps& + installable_apps() const { + return installable_apps_; + } + // Expects that the first app has the |expected_method|. void ExpectPaymentAppWithMethod(const std::string& expected_method) { ExpectPaymentAppFromScopeWithMethod(kDefaultScope, expected_method); @@ -169,6 +184,20 @@ << app->scope; } + // Expects an installable payment app in |scope|. The |scope| is also the + // payment method. + void ExpectInstallablePaymentAppInScope(const std::string& scope) { + ASSERT_FALSE(installable_apps().empty()); + WebAppInstallationInfo* app = nullptr; + for (const auto& it : installable_apps()) { + if (it.second->sw_scope == scope) { + app = it.second.get(); + break; + } + } + ASSERT_NE(nullptr, app) << "No installable app found in scope " << scope; + } + private: // Called by the factory upon completed app lookup. These |apps| have only // valid payment methods. @@ -176,6 +205,7 @@ content::PaymentAppProvider::PaymentApps apps, ServiceWorkerPaymentAppFactory::InstallablePaymentApps installable_apps) { apps_ = std::move(apps); + installable_apps_ = std::move(installable_apps); } // Starts the |test_server| for |hostname|. Returns true on success. @@ -204,10 +234,18 @@ // https://alicepay.com. net::EmbeddedTestServer georgepay_; - // The apps that have been found by the factory in + // https://kylepay.com hosts a payment handler that can be installed "just in + // time." + net::EmbeddedTestServer kylepay_; + + // The installed apps that have been found by the factory in // GetAllPaymentAppsForMethods() method. content::PaymentAppProvider::PaymentApps apps_; + // The installable apps that have been found by the factory in + // GetAllPaymentAppsForMethods() method. + ServiceWorkerPaymentAppFactory::InstallablePaymentApps installable_apps_; + base::test::ScopedFeatureList scoped_feature_list_; DISALLOW_COPY_AND_ASSIGN(ServiceWorkerPaymentAppFactoryBrowserTest); @@ -219,6 +257,7 @@ GetAllPaymentAppsForMethods({"basic-card", "https://alicepay.com/webpay", "https://bobpay.com/webpay"}); + EXPECT_TRUE(installable_apps().empty()); EXPECT_TRUE(apps().empty()); } @@ -227,6 +266,7 @@ GetAllPaymentAppsForMethods({"basic-card", "https://alicepay.com/webpay", "https://bobpay.com/webpay"}); + EXPECT_TRUE(installable_apps().empty()); EXPECT_TRUE(apps().empty()); } } @@ -241,6 +281,7 @@ "https://alicepay.com/webpay", "https://bobpay.com/webpay"}); + EXPECT_TRUE(installable_apps().empty()); EXPECT_TRUE(apps().empty()); } @@ -250,6 +291,7 @@ "https://alicepay.com/webpay", "https://bobpay.com/webpay"}); + EXPECT_TRUE(installable_apps().empty()); EXPECT_TRUE(apps().empty()); } } @@ -262,6 +304,7 @@ GetAllPaymentAppsForMethods({"basic-card", "https://alicepay.com/webpay", "https://bobpay.com/webpay"}); + EXPECT_TRUE(installable_apps().empty()); ASSERT_EQ(1U, apps().size()); ExpectPaymentAppWithMethod("basic-card"); } @@ -271,6 +314,7 @@ GetAllPaymentAppsForMethods({"basic-card", "https://alicepay.com/webpay", "https://bobpay.com/webpay"}); + EXPECT_TRUE(installable_apps().empty()); ASSERT_EQ(1U, apps().size()); ExpectPaymentAppWithMethod("basic-card"); } @@ -284,6 +328,7 @@ GetAllPaymentAppsForMethods({"basic-card", "https://alicepay.com/webpay", "https://bobpay.com/webpay"}); + EXPECT_TRUE(installable_apps().empty()); ASSERT_EQ(1U, apps().size()); ExpectPaymentAppWithMethod("https://alicepay.com/webpay"); } @@ -293,6 +338,7 @@ GetAllPaymentAppsForMethods({"basic-card", "https://alicepay.com/webpay", "https://bobpay.com/webpay"}); + EXPECT_TRUE(installable_apps().empty()); ASSERT_EQ(1U, apps().size()); ExpectPaymentAppWithMethod("https://alicepay.com/webpay"); } @@ -309,6 +355,7 @@ GetAllPaymentAppsForMethods({"basic-card", "https://alicepay.com/webpay", "https://bobpay.com/webpay"}); + EXPECT_TRUE(installable_apps().empty()); EXPECT_TRUE(apps().empty()); } @@ -317,6 +364,7 @@ GetAllPaymentAppsForMethods({"basic-card", "https://alicepay.com/webpay", "https://bobpay.com/webpay"}); + EXPECT_TRUE(installable_apps().empty()); EXPECT_TRUE(apps().empty()); } } @@ -331,6 +379,7 @@ { GetAllPaymentAppsForMethods({"https://frankpay.com/webpay"}); + EXPECT_TRUE(installable_apps().empty()); ASSERT_EQ(1U, apps().size()); ExpectPaymentAppWithMethod("https://frankpay.com/webpay"); } @@ -339,6 +388,7 @@ { GetAllPaymentAppsForMethods({"https://frankpay.com/webpay"}); + EXPECT_TRUE(installable_apps().empty()); ASSERT_EQ(1U, apps().size()); ExpectPaymentAppWithMethod("https://frankpay.com/webpay"); } @@ -355,6 +405,7 @@ { GetAllPaymentAppsForMethods({"https://georgepay.com/webpay"}); + EXPECT_TRUE(installable_apps().empty()); ASSERT_EQ(1U, apps().size()); ExpectPaymentAppWithMethod("https://georgepay.com/webpay"); } @@ -363,6 +414,7 @@ { GetAllPaymentAppsForMethods({"https://georgepay.com/webpay"}); + EXPECT_TRUE(installable_apps().empty()); ASSERT_EQ(1U, apps().size()); ExpectPaymentAppWithMethod("https://georgepay.com/webpay"); } @@ -380,6 +432,7 @@ { GetAllPaymentAppsForMethods({"https://georgepay.com/webpay"}); + EXPECT_TRUE(installable_apps().empty()); ASSERT_EQ(2U, apps().size()); ExpectPaymentAppFromScopeWithMethod("/app1/", "https://georgepay.com/webpay"); @@ -391,6 +444,7 @@ { GetAllPaymentAppsForMethods({"https://georgepay.com/webpay"}); + EXPECT_TRUE(installable_apps().empty()); ASSERT_EQ(2U, apps().size()); ExpectPaymentAppFromScopeWithMethod("/app1/", "https://georgepay.com/webpay"); @@ -414,6 +468,7 @@ GetAllPaymentAppsForMethods( {"https://georgepay.com/webpay", "https://frankpay.com/webpay"}); + EXPECT_TRUE(installable_apps().empty()); ASSERT_EQ(2U, apps().size()); ExpectPaymentAppFromScopeWithMethod("/app1/", "https://georgepay.com/webpay"); @@ -426,6 +481,7 @@ GetAllPaymentAppsForMethods( {"https://georgepay.com/webpay", "https://frankpay.com/webpay"}); + EXPECT_TRUE(installable_apps().empty()); ASSERT_EQ(2U, apps().size()); ExpectPaymentAppFromScopeWithMethod("/app1/", "https://georgepay.com/webpay"); @@ -434,4 +490,28 @@ } } +// The payment method https://kylepay.com/webpay does not require explicit +// installation, because the webapp manifest https://kylepay.com/app.json +// includes enough information for just in time installation of the service +// worker https://kylepay.com/app.js with scope https://kylepay.com/webpay. +IN_PROC_BROWSER_TEST_F(ServiceWorkerPaymentAppFactoryBrowserTest, + InstallablePaymentApp) { + { + GetAllPaymentAppsForMethods({"https://kylepay.com/webpay"}); + + EXPECT_TRUE(apps().empty()); + ASSERT_EQ(1U, installable_apps().size()); + ExpectInstallablePaymentAppInScope("https://kylepay.com/webpay"); + } + + // Repeat lookups should have identical results. + { + GetAllPaymentAppsForMethods({"https://kylepay.com/webpay"}); + + EXPECT_TRUE(apps().empty()); + ASSERT_EQ(1U, installable_apps().size()); + ExpectInstallablePaymentAppInScope("https://kylepay.com/webpay"); + } +} + } // namespace payments
diff --git a/chrome/browser/policy/profile_policy_connector_unittest.cc b/chrome/browser/policy/profile_policy_connector_unittest.cc index fe92b9f9..2114dcf6 100644 --- a/chrome/browser/policy/profile_policy_connector_unittest.cc +++ b/chrome/browser/policy/profile_policy_connector_unittest.cc
@@ -30,6 +30,7 @@ #if defined(OS_CHROMEOS) #include "chrome/browser/chromeos/login/users/fake_chrome_user_manager.h" +#include "chrome/browser/chromeos/settings/stub_install_attributes.h" #include "components/user_manager/scoped_user_manager.h" #endif // defined(OS_CHROMEOS) @@ -75,6 +76,10 @@ MockConfigurationPolicyProvider mock_provider_; MockCloudPolicyStore cloud_policy_store_; std::unique_ptr<CloudPolicyManager> cloud_policy_manager_; + +#if defined(OS_CHROMEOS) + chromeos::ScopedStubInstallAttributes test_install_attributes_; +#endif // defined(OS_CHROMEOS) }; TEST_F(ProfilePolicyConnectorTest, IsManagedForManagedUsers) {
diff --git a/chrome/browser/prefs/pref_service_incognito_whitelist.cc b/chrome/browser/prefs/pref_service_incognito_whitelist.cc index 6fea4b1..6ecb9557 100644 --- a/chrome/browser/prefs/pref_service_incognito_whitelist.cc +++ b/chrome/browser/prefs/pref_service_incognito_whitelist.cc
@@ -23,13 +23,10 @@ #include "components/proxy_config/proxy_config_pref_names.h" #include "components/proxy_config/proxy_prefs.h" #include "components/rappor/rappor_pref_names.h" -#include "components/rappor/rappor_prefs.h" #include "components/reading_list/core/reading_list_pref_names.h" #include "components/search_engines/search_engines_pref_names.h" -#include "components/startup_metric_utils/browser/pref_names.h" #include "components/suggestions/suggestions_pref_names.h" #include "components/ukm/ukm_pref_names.h" -#include "components/unified_consent/pref_names.h" #include "components/variations/pref_names.h" #include "components/web_resource/web_resource_pref_names.h" #include "services/preferences/public/cpp/tracked/pref_names.h" @@ -54,7 +51,7 @@ // List of keys that can be changed in the user prefs file by the incognito // profile. -const char* persistent_pref_names[] = { +const char* const kPersistentPrefNames[] = { #if defined(OS_CHROMEOS) // Accessibility preferences should be persisted if they are changed in // incognito mode. @@ -137,6 +134,11 @@ metrics::prefs::kUninstallMetricsUptimeSec, metrics::prefs::kUkmCellDataUse, metrics::prefs::kUmaCellDataUse, metrics::prefs::kUserCellDataUse, + // Rappor preferences are not used in incognito mode, but they are written + // in startup if they don't exist. So if the startup would be in incognito, + // they need to be persisted. + rappor::prefs::kRapporCohortSeed, rappor::prefs::kRapporSecret, + // Although UKMs are not collected in incognito, theses preferences may be // changed by UMA/Sync/Unity consent, and need to be the same between // incognito and regular modes. @@ -169,8 +171,8 @@ // This list is temporarily added for transition of incognito preferences // storage default, from on disk to in memory. All items in this list will be // audited, checked with owners, and removed or transfered to -// |persistent_pref_names|. -const char* temporary_incognito_whitelist[] = { +// |kPersistentPrefNames|. +const char* const kTemporaryIncognitoWhitelist[] = { // ash/public/cpp/ash_pref_names.h #if defined(OS_CHROMEOS) ash::prefs::kDetachableBaseDevices, ash::prefs::kEnableStylusTools, @@ -800,14 +802,6 @@ ProxyPrefs::kPacScriptProxyModeName, ProxyPrefs::kFixedServersProxyModeName, ProxyPrefs::kSystemProxyModeName, - // components/rappor/rappor_pref_names.h - rappor::prefs::kRapporCohortDeprecated, rappor::prefs::kRapporCohortSeed, - rappor::prefs::kRapporLastDailySample, rappor::prefs::kRapporSecret, - - // components/rappor/rappor_prefs.h - rappor::internal::kLoadCohortHistogramName, - rappor::internal::kLoadSecretHistogramName, - // components/reading_list/core/reading_list_pref_names.h reading_list::prefs::kReadingListHasUnseenEntries, @@ -816,20 +810,10 @@ prefs::kDefaultSearchProviderEnabled, prefs::kSearchProviderOverrides, prefs::kSearchProviderOverridesVersion, prefs::kCountryIDAtInstall, - // components/startup_metric_utils/browser/pref_names.h - startup_metric_utils::prefs::kLastStartupTimestamp, - startup_metric_utils::prefs::kLastStartupVersion, - startup_metric_utils::prefs::kSameVersionStartupCount, - // components/suggestions/suggestions_pref_names.h suggestions::prefs::kSuggestionsBlacklist, suggestions::prefs::kSuggestionsData, - // components/unified_consent/pref_names.h - unified_consent::prefs::kUnifiedConsentGiven, - unified_consent::prefs::kUnifiedConsentMigrationState, - unified_consent::prefs::kUrlKeyedAnonymizedDataCollectionEnabled, - // components/web_resource/web_resource_pref_names.h prefs::kEulaAccepted, @@ -854,14 +838,14 @@ std::vector<const char*> GetIncognitoPersistentPrefsWhitelist() { std::vector<const char*> whitelist; - whitelist.insert(whitelist.end(), persistent_pref_names, - persistent_pref_names + base::size(persistent_pref_names)); + whitelist.insert(whitelist.end(), kPersistentPrefNames, + kPersistentPrefNames + base::size(kPersistentPrefNames)); // TODO(https://crbug.com/861722): Remove after the list is audited and // emptied. - whitelist.insert(whitelist.end(), temporary_incognito_whitelist, - temporary_incognito_whitelist + - base::size(temporary_incognito_whitelist)); + whitelist.insert( + whitelist.end(), kTemporaryIncognitoWhitelist, + kTemporaryIncognitoWhitelist + base::size(kTemporaryIncognitoWhitelist)); return whitelist; }
diff --git a/chrome/browser/prefs/proxy_policy_unittest.cc b/chrome/browser/prefs/proxy_policy_unittest.cc index 1cc417f..7eb41af 100644 --- a/chrome/browser/prefs/proxy_policy_unittest.cc +++ b/chrome/browser/prefs/proxy_policy_unittest.cc
@@ -29,6 +29,10 @@ #include "content/public/test/test_browser_thread_bundle.h" #include "testing/gtest/include/gtest/gtest.h" +#if defined(OS_CHROMEOS) +#include "chrome/browser/chromeos/settings/stub_install_attributes.h" +#endif + using ::testing::Return; using ::testing::_; @@ -123,6 +127,10 @@ base::CommandLine command_line_; MockConfigurationPolicyProvider provider_; std::unique_ptr<PolicyServiceImpl> policy_service_; + +#if defined(OS_CHROMEOS) + chromeos::ScopedStubInstallAttributes test_install_attributes_; +#endif }; TEST_F(ProxyPolicyTest, OverridesCommandLineOptions) {
diff --git a/chrome/browser/profiles/gaia_info_update_service.cc b/chrome/browser/profiles/gaia_info_update_service.cc index ec2e2e2..cb9fb5cd 100644 --- a/chrome/browser/profiles/gaia_info_update_service.cc +++ b/chrome/browser/profiles/gaia_info_update_service.cc
@@ -164,6 +164,12 @@ entry->SetGAIAPicture(nullptr); // Unset the cached URL. profile_->GetPrefs()->ClearPref(prefs::kProfileGAIAInfoPictureURL); + if (profile_->GetPrefs()->GetInteger(prefs::kProfileLocalAvatarIndex) != + -1) { + // Restore avatar from the local prefs. + entry->SetAvatarIconIndex( + profile_->GetPrefs()->GetInteger(prefs::kProfileLocalAvatarIndex)); + } } else { // Update the new user's GAIA info. Update();
diff --git a/chrome/browser/profiles/gaia_info_update_service_unittest.cc b/chrome/browser/profiles/gaia_info_update_service_unittest.cc index ed21e6c5..cb0b2ae 100644 --- a/chrome/browser/profiles/gaia_info_update_service_unittest.cc +++ b/chrome/browser/profiles/gaia_info_update_service_unittest.cc
@@ -338,4 +338,27 @@ "pat@example.com"); } +TEST_F(GAIAInfoUpdateServiceTest, RestoreAvatarIndexOnLogout) { + identity::SetPrimaryAccount(SigninManagerFactory::GetForProfile(profile()), + IdentityManagerFactory::GetForProfile(profile()), + "pat@example.com"); + + const size_t kLocalAvatarIndex = 10; + const size_t kRemoteAvatarIndex = 5; + + profile()->GetPrefs()->SetInteger(prefs::kProfileLocalAvatarIndex, + kLocalAvatarIndex); + + ASSERT_EQ(1u, storage()->GetNumberOfProfiles()); + ProfileAttributesEntry* entry = storage()->GetAllProfilesAttributes().front(); + entry->SetAvatarIconIndex(kRemoteAvatarIndex); + EXPECT_EQ(kRemoteAvatarIndex, entry->GetAvatarIconIndex()); + + // Log out. + identity::ClearPrimaryAccount( + SigninManagerFactory::GetForProfile(profile()), + IdentityManagerFactory::GetForProfile(profile())); + EXPECT_EQ(kLocalAvatarIndex, entry->GetAvatarIconIndex()); +} + #endif
diff --git a/chrome/browser/profiles/profile_impl.cc b/chrome/browser/profiles/profile_impl.cc index 042865c..9af4767 100644 --- a/chrome/browser/profiles/profile_impl.cc +++ b/chrome/browser/profiles/profile_impl.cc
@@ -396,6 +396,7 @@ registry->RegisterStringPref(prefs::kProfileName, std::string(), user_prefs::PrefRegistrySyncable::SYNCABLE_PREF); #endif + registry->RegisterIntegerPref(prefs::kProfileLocalAvatarIndex, -1); registry->RegisterStringPref(prefs::kSupervisedUserId, std::string()); #if defined(OS_ANDROID)
diff --git a/chrome/browser/profiles/profile_manager.cc b/chrome/browser/profiles/profile_manager.cc index 675efeca..9864c31 100644 --- a/chrome/browser/profiles/profile_manager.cc +++ b/chrome/browser/profiles/profile_manager.cc
@@ -1055,6 +1055,11 @@ if (!profile->GetPrefs()->HasPrefPath(prefs::kProfileAvatarIndex)) profile->GetPrefs()->SetInteger(prefs::kProfileAvatarIndex, avatar_index); + if (!profile->GetPrefs()->HasPrefPath(prefs::kProfileLocalAvatarIndex)) { + profile->GetPrefs()->SetInteger(prefs::kProfileLocalAvatarIndex, + avatar_index); + } + if (!profile->GetPrefs()->HasPrefPath(prefs::kProfileName)) profile->GetPrefs()->SetString(prefs::kProfileName, profile_name);
diff --git a/chrome/browser/profiles/profile_manager_unittest.cc b/chrome/browser/profiles/profile_manager_unittest.cc index 07eb826..f7b0668a 100644 --- a/chrome/browser/profiles/profile_manager_unittest.cc +++ b/chrome/browser/profiles/profile_manager_unittest.cc
@@ -55,8 +55,7 @@ #include "chrome/browser/chromeos/login/users/fake_chrome_user_manager.h" #include "chrome/browser/chromeos/login/users/scoped_test_user_manager.h" #include "chrome/browser/chromeos/profiles/profile_helper.h" -#include "chrome/browser/chromeos/settings/cros_settings.h" -#include "chrome/browser/chromeos/settings/device_settings_service.h" +#include "chrome/browser/chromeos/settings/scoped_cros_settings_test_helper.h" #include "chrome/browser/ui/ash/test_wallpaper_controller.h" #include "chrome/browser/ui/ash/wallpaper_controller_client.h" #include "chromeos/chromeos_switches.h" @@ -239,8 +238,7 @@ profile_helper->GetProfilePathByUserIdHash(user_id_hash)); } - chromeos::ScopedTestDeviceSettingsService test_device_settings_service_; - chromeos::ScopedTestCrosSettings test_cros_settings_; + chromeos::ScopedCrosSettingsTestHelper cros_settings_test_helper_; #endif content::TestBrowserThreadBundle thread_bundle_;
diff --git a/chrome/browser/resources/chromeos/chromevox/chromevox/injected/event_watcher.js b/chrome/browser/resources/chromeos/chromevox/chromevox/injected/event_watcher.js index fe6a0dbb..62bf4c4c4 100644 --- a/chrome/browser/resources/chromeos/chromevox/chromevox/injected/event_watcher.js +++ b/chrome/browser/resources/chromeos/chromevox/chromevox/injected/event_watcher.js
@@ -1355,21 +1355,21 @@ lastFocusTimestamp = evt.timeStamp; } } - cvox.ChromeVoxEventWatcher.events_ = []; + var liveRegionEvents = []; + var otherEvents = []; for (i = 0; evt = events[i]; i++) { var prevEvt = events[i - 1] || {}; if ((i >= lastFocusIndex || evt.type == 'LiveRegion') && (prevEvt.type != 'focus' || evt.type != 'change')) { - cvox.ChromeVoxEventWatcher.events_.push(evt); + if (evt.type == 'LiveRegion') { + liveRegionEvents.push(evt); + } else { + otherEvents.push(evt); + } } } - - cvox.ChromeVoxEventWatcher.events_.sort(function(a, b) { - if (b.type != 'LiveRegion' && a.type == 'LiveRegion') { - return 1; - } - return -1; - }); + // Make sure that live region events are at the end of the events array. + cvox.ChromeVoxEventWatcher.events_ = [...otherEvents, ...liveRegionEvents]; // If the most recent focus event was very recent, wait for things to // settle down before processing events, unless the max wait time has
diff --git a/chrome/browser/resources/chromeos/chromevox/cvox2/background/background.js b/chrome/browser/resources/chromeos/chromevox/cvox2/background/background.js index 60f6708..6d80426f 100644 --- a/chrome/browser/resources/chromeos/chromevox/cvox2/background/background.js +++ b/chrome/browser/resources/chromeos/chromevox/cvox2/background/background.js
@@ -213,11 +213,10 @@ var prevRange = this.currentRange_; // Specialization for math output. - var forceQueue = false; + var skipOutput = false; if (MathHandler.init(range)) { - MathHandler.instance.speak(); + skipOutput = MathHandler.instance.speak(); opt_focus = false; - forceQueue = true; } if (opt_focus) @@ -286,7 +285,7 @@ o.withRichSpeechAndBraille( selectedRange || range, prevRange, Output.EventType.NAVIGATE); - o.withQueueMode(forceQueue ? cvox.QueueMode.QUEUE : cvox.QueueMode.FLUSH); + o.withQueueMode(cvox.QueueMode.FLUSH); if (msg) o.format(msg); @@ -294,7 +293,8 @@ for (var prop in opt_speechProps) o.format('!' + prop); - o.go(); + if (!skipOutput) + o.go(); }, /**
diff --git a/chrome/browser/resources/chromeos/chromevox/cvox2/background/background_test.extjs b/chrome/browser/resources/chromeos/chromevox/cvox2/background/background_test.extjs index 0118b572..c7ccfdc 100644 --- a/chrome/browser/resources/chromeos/chromevox/cvox2/background/background_test.extjs +++ b/chrome/browser/resources/chromeos/chromevox/cvox2/background/background_test.extjs
@@ -1645,3 +1645,46 @@ mockFeedback.expectSpeech('New title').replay(); }); }); + +TEST_F('BackgroundTest', 'MathContentViaInnerHtml', function() { + var mockFeedback = this.createMockFeedback(); + this.runWithLoadedTree(function(root) {/* + <div role="math"> + <semantics> + <mrow class="MJX-TeXAtom-ORD"> + <mstyle displaystyle="true" scriptlevel="0"> + <mi>a</mi> + <mo stretchy="false">(</mo> + <mi>y</mi> + <mo>+</mo> + <mi>m</mi> + <msup> + <mo stretchy="false">)</mo> + <mrow class="MJX-TeXAtom-ORD"> + <mn>2</mn> + </mrow> + </msup> + <mo>+</mo> + <mi>b</mi> + <mo stretchy="false">(</mo> + <mi>y</mi> + <mo>+</mo> + <mi>m</mi> + <mo stretchy="false">)</mo> + <mo>+</mo> + <mi>c</mi> + <mo>=</mo> + <mn>0.</mn> + </mstyle> + </mrow> + <annotation encoding="application/x-tex">{\displaystyle a(y+m)^{2}+b(y+m)+c=0.}</annotation> + </semantics> + </div> + */}, function(root) { + mockFeedback + .call(doCmd('nextObject')) + .expectSpeech('a ( y + m ) squared + b ( y + m ) + c = 0 .') + .expectSpeech('Press up, down, left, or right to explore math.') + .replay(); + }); +});
diff --git a/chrome/browser/resources/chromeos/chromevox/cvox2/background/math_handler.js b/chrome/browser/resources/chromeos/chromevox/cvox2/background/math_handler.js index 2de01c1..8ed6336 100644 --- a/chrome/browser/resources/chromeos/chromevox/cvox2/background/math_handler.js +++ b/chrome/browser/resources/chromeos/chromevox/cvox2/background/math_handler.js
@@ -16,28 +16,42 @@ MathHandler = function(node) { /** @private {!chrome.automation.AutomationNode} */ this.node_ = node; - - // A math ml structure can exist either as a data attribute or a full tree. We - // want the serialization of the tree in the latter case. - var ns = node.htmlAttributes['xmlns']; - if (node.role == chrome.automation.RoleType.MATH && ns && - ns.toLowerCase().indexOf('mathml') != -1) { - var mathMlRoot = MathHandler.createMathMlDom_(node); - this.mathml_ = mathMlRoot.outerHTML; - } else { - this.mathml_ = node.htmlAttributes['data-mathml']; - } }; MathHandler.prototype = { /** * Speaks the current node. + * @return {boolean} Whether any math was spoken. */ speak: function() { - cvox.ChromeVox.tts.speak(SRE.walk(this.mathml_), cvox.QueueMode.FLUSH); + var mathml; + // Math can exist either as explicit innerHtml (handled by the Blink + // renderer for nodes with role math) or as a data attribute. + if (this.node_.role == chrome.automation.RoleType.MATH && + this.node_.innerHtml) + mathml = this.node_.innerHtml; + else + mathml = this.node_.htmlAttributes['data-mathml']; + + if (!mathml) + return false; + + var text; + + try { + text = SRE.walk(mathml); + } catch (e) { + // Swallow exceptions from third party library. + } + + if (!text) + return false; + + cvox.ChromeVox.tts.speak(text, cvox.QueueMode.FLUSH); cvox.ChromeVox.tts.speak( Msgs.getMsg('hint_math_keyboard'), cvox.QueueMode.QUEUE); + return true; } }; @@ -79,27 +93,3 @@ cvox.ChromeVox.tts.speak(output, cvox.QueueMode.FLUSH); return false; }; - -/** - * @private - */ -MathHandler.createMathMlDom_ = function(node) { - if (!node.htmlTag && node.role != chrome.automation.RoleType.STATIC_TEXT) - return null; - - var domNode; - if (node.htmlTag) - domNode = document.createElement(node.htmlTag); - else - domNode = document.createTextNode(node.name); - for (var key in node.htmlAttributes) - domNode.setAttribute(key, node.htmlAttributes[key]); - - for (var i = 0; i < node.children.length; i++) { - var child = MathHandler.createMathMlDom_(node.children[i]); - if (child) - domNode.appendChild(child); - } - - return domNode; -};
diff --git a/chrome/browser/resources/chromeos/chromevox/strings/chromevox_strings_bn.xtb b/chrome/browser/resources/chromeos/chromevox/strings/chromevox_strings_bn.xtb index de21a5c..1ea4c0eb 100644 --- a/chrome/browser/resources/chromeos/chromevox/strings/chromevox_strings_bn.xtb +++ b/chrome/browser/resources/chromeos/chromevox/strings/chromevox_strings_bn.xtb
@@ -2,6 +2,7 @@ <!DOCTYPE translationbundle> <translationbundle lang="bn"> <translation id="100812568230599391">প্রদর্শন শৈলীকে একটি অন্যটির মাঝে সমাবেশিত হিসেবে পরিবর্তন করুন।</translation> +<translation id="1011903154582639569">একটি বোতাম খুঁজুন, তারপর টাইপ করার জন্য তুলুন</translation> <translation id="1012173283529841972">তালিকা আইটেম</translation> <translation id="1013742170491673792">srched</translation> <translation id="1022586497894531524">আপনি কি ChromeVox এর পড়ে শোনানো মতামতের সুবিধাটি প্রথমবারের জন্য ব্যবহার করছেন? কিভাবে ChromeVox ব্যবহার করা শুরু করতে হয় এই সংক্ষিপ্ত টিউটোরিয়ালটি সে বিষয়ে প্রয়োজনীয় বিষয়গুলি ব্যাখ্যা করে।</translation> @@ -163,6 +164,7 @@ <translation id="2553108862507765288">ব্যাকরণগত ভুল</translation> <translation id="257674075312929031">গ্রুপ</translation> <translation id="2582407057977008361">একপাশে</translation> +<translation id="2592212930811759050">এডিট শুরু করতে ডবল-ট্যাপ করুন</translation> <translation id="2606210917827248971">সাথে আছে {COUNT,plural, =1{#টি আইটেম}one{#টি আইটেম}other{#টি আইটেম}}</translation> <translation id="2614981083756825552">গাণিতিক ML লেআউট</translation> <translation id="2624431853467395961">শিখন মোড খুলুন</translation>
diff --git a/chrome/browser/resources/chromeos/chromevox/strings/chromevox_strings_iw.xtb b/chrome/browser/resources/chromeos/chromevox/strings/chromevox_strings_iw.xtb index 16431d4e..f415070 100644 --- a/chrome/browser/resources/chromeos/chromevox/strings/chromevox_strings_iw.xtb +++ b/chrome/browser/resources/chromeos/chromevox/strings/chromevox_strings_iw.xtb
@@ -2,6 +2,7 @@ <!DOCTYPE translationbundle> <translationbundle lang="iw"> <translation id="100812568230599391">עבור להצגה משולבת.</translation> +<translation id="1011903154582639569">יש לעבור אל מקש רצוי ולהרים את האצבע כדי להקליד אותו</translation> <translation id="1012173283529841972">פריט רשימה</translation> <translation id="1013742170491673792">srched</translation> <translation id="1022586497894531524">האם זה השימוש הראשון שלך בקורא המסך הקולי ChromeVox? המדריך הקצר הזה מסביר את עקרונות הבסיס של ChromeVox למתחילים.</translation> @@ -163,6 +164,7 @@ <translation id="2553108862507765288">grammatical mistake</translation> <translation id="257674075312929031">קבוצה</translation> <translation id="2582407057977008361">בצד</translation> +<translation id="2592212930811759050">לחיצה פעמיים מפעילה עריכה</translation> <translation id="2606210917827248971">עם {COUNT,plural, =1{פריט אחד}two{שני פריטים}many{# פריטים}other{# פריטים}}</translation> <translation id="2614981083756825552">פריסת Math ML</translation> <translation id="2624431853467395961">פתח מצב למידה</translation>
diff --git a/chrome/browser/resources/chromeos/chromevox/strings/chromevox_strings_no.xtb b/chrome/browser/resources/chromeos/chromevox/strings/chromevox_strings_no.xtb index e8f8c10..f497539a 100644 --- a/chrome/browser/resources/chromeos/chromevox/strings/chromevox_strings_no.xtb +++ b/chrome/browser/resources/chromeos/chromevox/strings/chromevox_strings_no.xtb
@@ -2,6 +2,7 @@ <!DOCTYPE translationbundle> <translationbundle lang="no"> <translation id="100812568230599391">Endre visningsstilen til innfelt.</translation> +<translation id="1011903154582639569">Finn en tast, deretter løft for å skrive</translation> <translation id="1012173283529841972">Listeelement</translation> <translation id="1013742170491673792">srched</translation> <translation id="1022586497894531524">Bruker du taletilbakemelding med ChromeVox for første gang? Denne kjappe veiledningen forklarer det grunnleggende om hvordan du tar i bruk ChromeVox.</translation> @@ -163,6 +164,7 @@ <translation id="2553108862507765288">grammatical mistake</translation> <translation id="257674075312929031">Gruppe</translation> <translation id="2582407057977008361">Aside-tag</translation> +<translation id="2592212930811759050">Dobbelttrykk for å starte å redigere</translation> <translation id="2606210917827248971">med {COUNT,plural, =1{# element}other{# elementer}}</translation> <translation id="2614981083756825552">MathML-utforming</translation> <translation id="2624431853467395961">Åpne læremodus</translation>
diff --git a/chrome/browser/resources/chromeos/first_run/first_run.js b/chrome/browser/resources/chromeos/first_run/first_run.js index bd82d036..71e9c5d 100644 --- a/chrome/browser/resources/chromeos/first_run/first_run.js +++ b/chrome/browser/resources/chromeos/first_run/first_run.js
@@ -246,6 +246,8 @@ } if (stepParams.voiceInteractionEnabled) step.setVoiceInteractionEnabled(); + if (stepParams.unifiedSystemTrayEnabled) + step.setUnifiedSystemTrayEnabled(true); step.show(true, function(step) { step.focusDefaultControl(); this.currentStep_ = step;
diff --git a/chrome/browser/resources/chromeos/first_run/step.js b/chrome/browser/resources/chromeos/first_run/step.js index 7c438af..fd8fc546 100644 --- a/chrome/browser/resources/chromeos/first_run/step.js +++ b/chrome/browser/resources/chromeos/first_run/step.js
@@ -15,7 +15,7 @@ // Name of step. name_: null, - // Button leading to next tutorial step. + // Button leading to next tutorial step. For testing. nextButton_: null, // Default control for this step. @@ -26,15 +26,19 @@ var controlsContainer = this.getElementsByClassName('controls')[0]; if (!controlsContainer) throw Error('Controls not found.'); - this.nextButton_ = - controlsContainer.getElementsByClassName('next-button')[0]; - if (!this.nextButton_) + + var nextButtons = controlsContainer.getElementsByClassName('next-button'); + if (nextButtons.length <= 0) throw Error('Next button not found.'); - this.nextButton_.addEventListener( - 'click', (function(e) { - chrome.send('nextButtonClicked', [this.getName()]); - e.stopPropagation(); - }).bind(this)); + this.nextButton_ = nextButtons[0]; + Array.prototype.forEach.call(nextButtons, function(nextButton) { + nextButton.addEventListener( + 'click', (function(e) { + chrome.send('nextButtonClicked', [this.getName()]); + e.stopPropagation(); + }).bind(this)); + }.bind(this)); + this.defaultControl_ = controlsContainer.children[0]; }, @@ -266,9 +270,38 @@ }, }; + var TrayStep = cr.ui.define('div'); + + TrayStep.prototype = { + __proto__: HelpStep.prototype, + + decorate: function() { + HelpStep.prototype.decorate.call(this); + this.setUnifiedSystemTrayEnabled(false); + }, + + /** + * Updates UI when UnifiedSystemTray is enabled. + */ + setUnifiedSystemTrayEnabled: function(enabled) { + Array.prototype.forEach.call( + this.getElementsByClassName('unified-system-tray-enabled'), + function(el) { + el.hidden = !enabled; + }.bind(this)); + Array.prototype.forEach.call( + this.getElementsByClassName('unified-system-tray-disabled'), + function(el) { + el.hidden = enabled; + }.bind(this)); + }, + }; + var DecorateStep = function(el) { if (el.id == 'help') HelpStep.decorate(el); + else if (el.id == 'tray') + TrayStep.decorate(el); else if (el.classList.contains('bubble')) Bubble.decorate(el); else
diff --git a/chrome/browser/resources/chromeos/first_run/tray_step.html b/chrome/browser/resources/chromeos/first_run/tray_step.html index 2b7b9e7..3cf4f01 100644 --- a/chrome/browser/resources/chromeos/first_run/tray_step.html +++ b/chrome/browser/resources/chromeos/first_run/tray_step.html
@@ -2,7 +2,14 @@ <h1 i18n-content="trayHeader"></h1> <p i18n-content="trayText"><p> <div class="controls"> + <button i18n-content="helpKeepExploringButton" + class="help-button custom-appearance blue-button + unified-system-tray-enabled"></button> + <button i18n-content="helpFinishButton" + class="next-button custom-appearance white-button + unified-system-tray-enabled"></button> <button i18n-content="nextButton" - class="next-button custom-appearance blue-button"></button> + class="next-button custom-appearance blue-button + unified-system-tray-disabled"></button> </div> </div>
diff --git a/chrome/browser/resources/chromeos/login/oobe_eula.css b/chrome/browser/resources/chromeos/login/oobe_eula.css index 6cb2bb8..1661283 100644 --- a/chrome/browser/resources/chromeos/login/oobe_eula.css +++ b/chrome/browser/resources/chromeos/login/oobe_eula.css
@@ -22,8 +22,8 @@ } #crosEulaFrame { - border: 1px solid var(--google-blue-500); - border-radius: 2px; + border: 1px solid rgb(218, 220, 224); /* #DADCE0 */ + border-radius: 4px; box-shadow: 0 1px 4px rgba(0, 0, 0, .13); }
diff --git a/chrome/browser/resources/chromeos/select_to_speak/BUILD.gn b/chrome/browser/resources/chromeos/select_to_speak/BUILD.gn index 5180b01..2324b147 100644 --- a/chrome/browser/resources/chromeos/select_to_speak/BUILD.gn +++ b/chrome/browser/resources/chromeos/select_to_speak/BUILD.gn
@@ -161,7 +161,6 @@ ] gen_include_files = [ "../chromevox/testing/callback_helper.js", - "mock_notifications.js", "mock_storage.js", "mock_tts.js", "select_to_speak_e2e_test_base.js",
diff --git a/chrome/browser/resources/chromeos/select_to_speak/manifest.json.jinja2 b/chrome/browser/resources/chromeos/select_to_speak/manifest.json.jinja2 index 0a424e77..810363f 100644 --- a/chrome/browser/resources/chromeos/select_to_speak/manifest.json.jinja2 +++ b/chrome/browser/resources/chromeos/select_to_speak/manifest.json.jinja2
@@ -39,8 +39,7 @@ "https://docs.sandbox.google.com/*", "clipboard", "clipboardRead", - "clipboardWrite", - "notifications" + "clipboardWrite" ], "automation": { "desktop": true
diff --git a/chrome/browser/resources/chromeos/select_to_speak/mock_notifications.js b/chrome/browser/resources/chromeos/select_to_speak/mock_notifications.js deleted file mode 100644 index 4d7d810..0000000 --- a/chrome/browser/resources/chromeos/select_to_speak/mock_notifications.js +++ /dev/null
@@ -1,55 +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. - -/* - * A mock chrome.notifications API for tests. - * @constructor. - */ -let MockNotifications = function() { - /** @type {NotificationOptions} */ - this.options; - - /** @type {function<NotificationOptions> */ - this.callback_; -}; - -MockNotifications.prototype = { - /** - * Mock notification create function. - * @param {string} notificationId - * @param {NotificationOptions} options - * @param {function=} opt_callback This is not used by STS so it's not mocked. - */ - create: function(notificationId, options, opt_callback) { - this.options_ = options; - - // Call the test listener. - this.callback_ && this.callback_(options); - }, - - /** - * Stub onButtonClicked. - */ - onButtonClicked: { - addListener: function(callback) { - // Unimplemented - }, - }, - - /** - * For testing, not part of API. - * @param {function(NotificationOptions)} A callback for the set options. - */ - onNotificationCreated: function(callback) { - this.callback_ = callback; - }, - - /** - * For testing, not part of API. - * @return {NotificationOptions} The most recently set notification options. - */ - getOptions: function() { - return this.options_; - }, -}; \ No newline at end of file
diff --git a/chrome/browser/resources/chromeos/select_to_speak/prefs_manager.js b/chrome/browser/resources/chromeos/select_to_speak/prefs_manager.js index aae33a1..2720b7b4 100644 --- a/chrome/browser/resources/chromeos/select_to_speak/prefs_manager.js +++ b/chrome/browser/resources/chromeos/select_to_speak/prefs_manager.js
@@ -155,8 +155,8 @@ globalPitch != PrefsManager.DEFAULT_PITCH; let optionsEqual = stsRate == globalRate && stsPitch == globalPitch; if (optionsEqual) { - // No need to write global prefs or do an alert if all the prefs - // are the same as defaults. Just remove STS rate and pitch. + // No need to write global prefs if all the prefs are the same + // as defaults. Just remove STS rate and pitch. this.onTtsSettingsMigrationSuccess_(); return; } @@ -187,11 +187,7 @@ })); Promise.all(setPrefsPromises) .then( - () => { - this.onTtsSettingsMigrationSuccess_( - chrome.i18n.getMessage( - 'select_to_speak_tts_migrated_to_global')); - }, + this.onTtsSettingsMigrationSuccess_.bind(this), (error) => { console.log(error); this.migrationInProgress_ = false; @@ -199,8 +195,7 @@ } else if (globalOptionsModified) { // Global options were already modified, so STS will use global // settings regardless of whether STS was modified yet or not. - this.onTtsSettingsMigrationSuccess_(chrome.i18n.getMessage( - 'select_to_speak_tts_not_migrated_to_global')); + this.onTtsSettingsMigrationSuccess_(); } }, (error) => { @@ -211,37 +206,13 @@ /** * When TTS settings are successfully migrated, removes rate and pitch from - * chrome.storage.sync and may notify the user. - * @param {string=} opt_message The message to show to the user on migration - * success. If not included, no notification will be shown. + * chrome.storage.sync. * @private */ -PrefsManager.prototype.onTtsSettingsMigrationSuccess_ = function(opt_message) { +PrefsManager.prototype.onTtsSettingsMigrationSuccess_ = function() { chrome.storage.sync.remove('rate'); chrome.storage.sync.remove('pitch'); this.migrationInProgress_ = false; - if (opt_message === undefined) - return; - let notificationId = 'sts_tts_migration'; - chrome.notifications.create(notificationId, { - type: 'basic', - iconUrl: 'select_to_speak-2x.svg', - title: chrome.i18n.getMessage('select_to_speak_tts_migration_title'), - requireInteraction: true, // Do not time out for a11y. - message: opt_message, - buttons: [{ - title: chrome.i18n.getMessage( - 'select_to_speak_options_text_to_speech_settings_link') - }] - }); - chrome.notifications.onButtonClicked.addListener((id, index) => { - if (id !== notificationId) - return; - // TODO(katie): Should we dismiss the notification when a button is - // clicked? Check with UX. - let url = 'chrome://settings/manageAccessibility/tts'; - chrome.tabs.create({url: url}); - }); }; /** @@ -270,7 +241,7 @@ } if (prefs['rate'] && prefs['pitch']) { // Removes 'rate' and 'pitch' prefs after migrating data to global - // TTS settings if appropriate, and notifying the user if needed. + // TTS settings if appropriate. this.migrateToGlobalTtsSettings_(prefs['rate'], prefs['pitch']); } });
diff --git a/chrome/browser/resources/chromeos/select_to_speak/select_to_speak_prefs_test.extjs b/chrome/browser/resources/chromeos/select_to_speak/select_to_speak_prefs_test.extjs index 32f0319..89fd404 100644 --- a/chrome/browser/resources/chromeos/select_to_speak/select_to_speak_prefs_test.extjs +++ b/chrome/browser/resources/chromeos/select_to_speak/select_to_speak_prefs_test.extjs
@@ -6,7 +6,6 @@ GEN_INCLUDE(['../../../../../ui/webui/resources/js/cr.js']); GEN_INCLUDE(['../../../../test/data/webui/fake_chrome_event.js']); GEN_INCLUDE(['../../../../test/data/webui/settings/fake_settings_private.js']); -GEN_INCLUDE(['mock_notifications.js']); GEN_INCLUDE(['mock_storage.js']); /** @@ -21,9 +20,6 @@ this.mockStorage_ = MockStorage; chrome.storage = this.mockStorage_; - this.mockNotifications_ = new MockNotifications(); - chrome.notifications = this.mockNotifications_; - this.mockSettingsPrivate_ = new settings.FakeSettingsPrivate([ {type: 'number', key: 'settings.tts.speech_rate', value: 1.0}, {type: 'number', key: 'settings.tts.speech_pitch', value: 1.0} @@ -112,9 +108,6 @@ this.mockStorage_.updatePrefs(); this.ensurePrefsRemovedAndGlobalSetTo(2.0, 2.5); - this.mockNotifications_.onNotificationCreated(this.newCallback((options) => { - assertEquals(options.message, 'select_to_speak_tts_migrated_to_global'); - })); }); TEST_F('SelectToSpeakPrefsTest', @@ -124,10 +117,6 @@ this.mockStorage_.updatePrefs(); this.ensurePrefsRemovedAndGlobalSetTo(1.0, 1.5); - this.mockNotifications_.onNotificationCreated(this.newCallback((options) => { - assertEquals(options.message, - 'select_to_speak_tts_not_migrated_to_global'); - })); }); TEST_F('SelectToSpeakPrefsTest', 'DoesNotSaveStsPrefsToGlobalIfGlobalChanged', @@ -137,8 +126,4 @@ this.mockStorage_.updatePrefs(); this.ensurePrefsRemovedAndGlobalSetTo(2.0, 1.0); - this.mockNotifications_.onNotificationCreated(this.newCallback((options) => { - assertEquals(options.message, - 'select_to_speak_tts_not_migrated_to_global'); - })); }); \ No newline at end of file
diff --git a/chrome/browser/resources/chromeos/select_to_speak/strings/select_to_speak_strings.grd b/chrome/browser/resources/chromeos/select_to_speak/strings/select_to_speak_strings.grd index b1f41da7..cc90b3e 100644 --- a/chrome/browser/resources/chromeos/select_to_speak/strings/select_to_speak_strings.grd +++ b/chrome/browser/resources/chromeos/select_to_speak/strings/select_to_speak_strings.grd
@@ -168,15 +168,6 @@ <message desc="Link to the Text-to-Speech settings page." name="IDS_SELECT_TO_SPEAK_OPTIONS_TEXT_TO_SPEECH_SETTINGS_LINK"> Text-to-Speech settings </message> - <message desc="Title for a notification shown to the user when Select-to-Speak migrates Text-to-Speech settings to the global Text-to-Speech settings page." name="IDS_SELECT_TO_SPEAK_TTS_MIGRATION_TITLE"> - Select-to-Speak speech settings updated - </message> - <message desc="Message shown to the user when Select-to-Speak's Text-to-Speech settings have been copied into the global Text-to-Speech settings." name="IDS_SELECT_TO_SPEAK_TTS_MIGRATED_TO_GLOBAL"> - Your Select-to-Speak Text-to-Speech settings were migrated to global Text-to-Speech settings. - </message> - <message desc="Message shown to the user when Select-to-Speak's Text-to-Speech settings were overwritten by the global Text-to-Speech settings." name="IDS_SELECT_TO_SPEAK_TTS_NOT_MIGRATED_TO_GLOBAL"> - Select to speak now uses global Text-to-Speech settings. - </message> <message desc="Voice name for the system default Text-to-Speech voice" name="IDS_SELECT_TO_SPEAK_SYSTEM_VOICE"> System Text-to-Speech voice </message>
diff --git a/chrome/browser/resources/chromeos/select_to_speak/strings/select_to_speak_strings_am.xtb b/chrome/browser/resources/chromeos/select_to_speak/strings/select_to_speak_strings_am.xtb index 284b142..b060a63e 100644 --- a/chrome/browser/resources/chromeos/select_to_speak/strings/select_to_speak_strings_am.xtb +++ b/chrome/browser/resources/chromeos/select_to_speak/strings/select_to_speak_strings_am.xtb
@@ -1,10 +1,8 @@ <?xml version="1.0" ?> <!DOCTYPE translationbundle> <translationbundle lang="am"> -<translation id="111880247472081232">የእርስዎ ለመናገር-ይምረጡ የጽሑፍ-ወደ-ንግግር ቅንብሮች ወደ ሁለገቡ የጽሑፍ-ወደ-ንግግር ቅንብሮች ተሸጋግሯል።</translation> <translation id="1197088940767939838">ብርቱካናማ</translation> <translation id="1273314450961659276">የጽሑፍ ወደ ንግግር ቅንብሮች</translation> -<translation id="1498542103351704084">የለመናገር-ይምረጡ ቅንብሮች ተዘምነዋል</translation> <translation id="1555130319947370107">ሰማያዊ</translation> <translation id="1666326070478924810">ለመናገር ቅንብሮችን ይምረጡ</translation> <translation id="1966649499058910679">እያንዳንዱ ቃል ሲነገር ማድመቅ</translation> @@ -12,7 +10,6 @@ <translation id="2714180132046334502">ጨለማ ጀርባ</translation> <translation id="27349076983469322">ፈዛዝ ያለ ጀርባ</translation> <translation id="335581015389089642">ንግግር</translation> -<translation id="3784184786832188702">አሁን ለመናገር ይምረጡ ሁለገብ የጽሑፍ-ወደ-ንግግር ቅንብሮችን ነው የሚጠቀመው።</translation> <translation id="5901630391730855834">ቢጫ</translation> <translation id="6017514345406065928">አረንጓዴ</translation> <translation id="6475604559827479857">የቃል ድምቀቶች ቀለም፦</translation>
diff --git a/chrome/browser/resources/chromeos/select_to_speak/strings/select_to_speak_strings_ar.xtb b/chrome/browser/resources/chromeos/select_to_speak/strings/select_to_speak_strings_ar.xtb index cf155a1a..10b499c 100644 --- a/chrome/browser/resources/chromeos/select_to_speak/strings/select_to_speak_strings_ar.xtb +++ b/chrome/browser/resources/chromeos/select_to_speak/strings/select_to_speak_strings_ar.xtb
@@ -1,10 +1,8 @@ <?xml version="1.0" ?> <!DOCTYPE translationbundle> <translationbundle lang="ar"> -<translation id="111880247472081232">تمّ ترحيل إعدادات "تحويل النص إلى كلام" الخاصة بخدمة "سماع الاختيار" إلى الإعدادات العامة لميزة "تحويل النص إلى كلام".</translation> <translation id="1197088940767939838">برتقالي</translation> <translation id="1273314450961659276">إعدادات ميزة "تحويل النص إلى كلام"</translation> -<translation id="1498542103351704084">تم تحديث إعدادات الكلام لخدمة "سماع الاختيار"</translation> <translation id="1555130319947370107">أزرق</translation> <translation id="1666326070478924810">إعدادات "سماع الاختيار"</translation> <translation id="1966649499058910679">تحديد كل كلمة أثناء نطقها</translation> @@ -12,7 +10,6 @@ <translation id="2714180132046334502">خلفية معتمة</translation> <translation id="27349076983469322">خلفية فاتحة</translation> <translation id="335581015389089642">الحديث</translation> -<translation id="3784184786832188702">تستخدم الآن خدمة "سماع الاختيار" الإعدادات العامة لميزة "تحويل النص إلى كلام".</translation> <translation id="5901630391730855834">أصفر</translation> <translation id="6017514345406065928">أخضر</translation> <translation id="6475604559827479857">لون لتمييز الكلمة:</translation>
diff --git a/chrome/browser/resources/chromeos/select_to_speak/strings/select_to_speak_strings_bg.xtb b/chrome/browser/resources/chromeos/select_to_speak/strings/select_to_speak_strings_bg.xtb index 0a9e914..065e740 100644 --- a/chrome/browser/resources/chromeos/select_to_speak/strings/select_to_speak_strings_bg.xtb +++ b/chrome/browser/resources/chromeos/select_to_speak/strings/select_to_speak_strings_bg.xtb
@@ -1,10 +1,8 @@ <?xml version="1.0" ?> <!DOCTYPE translationbundle> <translationbundle lang="bg"> -<translation id="111880247472081232">Настройките ви за синтезиран говор за функцията Прочитане на глас бяха зададени и като глобални настройки за синтезиран говор.</translation> <translation id="1197088940767939838">оранжево</translation> <translation id="1273314450961659276">Настройки за синтезиран говор</translation> -<translation id="1498542103351704084">Настройките за говора за функцията Прочитане на глас са актуализирани</translation> <translation id="1555130319947370107">синьо</translation> <translation id="1666326070478924810">Настройки на функцията Прочитане на глас</translation> <translation id="1966649499058910679">Открояване на всяка дума, докато се изговаря</translation> @@ -12,7 +10,6 @@ <translation id="2714180132046334502">Тъмен фон</translation> <translation id="27349076983469322">Светъл фон</translation> <translation id="335581015389089642">Speech</translation> -<translation id="3784184786832188702">За функцията Прочитане на глас вече се използват глобалните настройки за синтезиран говор.</translation> <translation id="5901630391730855834">жълто</translation> <translation id="6017514345406065928">зелено</translation> <translation id="6475604559827479857">Цвят за открояване на думи:</translation>
diff --git a/chrome/browser/resources/chromeos/select_to_speak/strings/select_to_speak_strings_bn.xtb b/chrome/browser/resources/chromeos/select_to_speak/strings/select_to_speak_strings_bn.xtb index d533a20..5f26956 100644 --- a/chrome/browser/resources/chromeos/select_to_speak/strings/select_to_speak_strings_bn.xtb +++ b/chrome/browser/resources/chromeos/select_to_speak/strings/select_to_speak_strings_bn.xtb
@@ -1,10 +1,8 @@ <?xml version="1.0" ?> <!DOCTYPE translationbundle> <translationbundle lang="bn"> -<translation id="111880247472081232">আপনার বাছুন ও শুনুন টেক্সট-টু-স্পিচ সেটিংস গ্লোবাল টেক্সট-টু-স্পিচ সেটিংসে স্থানান্তরিত হয়েছে।</translation> <translation id="1197088940767939838">কমলা</translation> <translation id="1273314450961659276">টেক্সট টু স্পিচ সেটিংস</translation> -<translation id="1498542103351704084">বাছুন ও শুনুন স্পিচ সেটিংস আপডেট করা হয়েছে</translation> <translation id="1555130319947370107">নীল</translation> <translation id="1666326070478924810">'বাছুন ও শুনুন'-এর সেটিংস</translation> <translation id="1966649499058910679">প্রতিটি শব্দ যেভাবে উচ্চারণ করা হয় সেইভাবে হাইলাইট করুন</translation> @@ -12,7 +10,6 @@ <translation id="2714180132046334502">গাঢ় ব্যাকগ্রাউন্ড</translation> <translation id="27349076983469322">হালকা ব্যাকগ্রাউন্ড</translation> <translation id="335581015389089642">স্পিচ</translation> -<translation id="3784184786832188702">বাছুন ও শুনুন এখন গ্লোবাল টেক্সট টু স্পিচ সেটিংস ব্যবহার করে।</translation> <translation id="5901630391730855834">হলুদ</translation> <translation id="6017514345406065928">সবুজ</translation> <translation id="6475604559827479857">শব্দ হাইলাইট করার জন্য রং:</translation>
diff --git a/chrome/browser/resources/chromeos/select_to_speak/strings/select_to_speak_strings_ca.xtb b/chrome/browser/resources/chromeos/select_to_speak/strings/select_to_speak_strings_ca.xtb index ea85552..5a376a65 100644 --- a/chrome/browser/resources/chromeos/select_to_speak/strings/select_to_speak_strings_ca.xtb +++ b/chrome/browser/resources/chromeos/select_to_speak/strings/select_to_speak_strings_ca.xtb
@@ -1,10 +1,8 @@ <?xml version="1.0" ?> <!DOCTYPE translationbundle> <translationbundle lang="ca"> -<translation id="111880247472081232">La configuració de síntesi de veu del servei Escolta la selecció s'ha migrat a la configuració global de síntesi de veu.</translation> <translation id="1197088940767939838">Taronja</translation> <translation id="1273314450961659276">Configuració de síntesi de veu</translation> -<translation id="1498542103351704084">S'ha actualitzat la configuració de veu del servei Escolta la selecció</translation> <translation id="1555130319947370107">Blau</translation> <translation id="1666326070478924810">Configuració d'Escolta la selecció</translation> <translation id="1966649499058910679">Destaca cada paraula a mesura que es digui</translation> @@ -12,7 +10,6 @@ <translation id="2714180132046334502">Fons fosc</translation> <translation id="27349076983469322">Fons clar</translation> <translation id="335581015389089642">Veu</translation> -<translation id="3784184786832188702">Ara el servei Escolta la selecció utilitza la configuració global de síntesi de veu.</translation> <translation id="5901630391730855834">Groc</translation> <translation id="6017514345406065928">Verd</translation> <translation id="6475604559827479857">Color per destacar paraules:</translation>
diff --git a/chrome/browser/resources/chromeos/select_to_speak/strings/select_to_speak_strings_cs.xtb b/chrome/browser/resources/chromeos/select_to_speak/strings/select_to_speak_strings_cs.xtb index 9da1e38d..33391f604 100644 --- a/chrome/browser/resources/chromeos/select_to_speak/strings/select_to_speak_strings_cs.xtb +++ b/chrome/browser/resources/chromeos/select_to_speak/strings/select_to_speak_strings_cs.xtb
@@ -1,10 +1,8 @@ <?xml version="1.0" ?> <!DOCTYPE translationbundle> <translationbundle lang="cs"> -<translation id="111880247472081232">Nastavení převodu textu na řeč pro poslech vybraného textu byla převedena do globálních nastavení převodu textu na řeč.</translation> <translation id="1197088940767939838">Oranžová</translation> <translation id="1273314450961659276">Nastavení převodu textu na řeč</translation> -<translation id="1498542103351704084">Byla aktualizována nastavení převodu textu na řeč pro poslech vybraného textu</translation> <translation id="1555130319947370107">Modrá</translation> <translation id="1666326070478924810">Nastavení poslechu vybraného textu</translation> <translation id="1966649499058910679">Zvýrazňovat jednotlivá vyslovená slova</translation> @@ -12,7 +10,6 @@ <translation id="2714180132046334502">Tmavé pozadí</translation> <translation id="27349076983469322">Světlé pozadí</translation> <translation id="335581015389089642">Řeč</translation> -<translation id="3784184786832188702">Pro poslech vybraného textu se teď používají globální nastavení převodu textu na řeč.</translation> <translation id="5901630391730855834">Žlutá</translation> <translation id="6017514345406065928">Zelená</translation> <translation id="6475604559827479857">Barva zvýraznění slov:</translation>
diff --git a/chrome/browser/resources/chromeos/select_to_speak/strings/select_to_speak_strings_da.xtb b/chrome/browser/resources/chromeos/select_to_speak/strings/select_to_speak_strings_da.xtb index f8ce96f..b4b3d02 100644 --- a/chrome/browser/resources/chromeos/select_to_speak/strings/select_to_speak_strings_da.xtb +++ b/chrome/browser/resources/chromeos/select_to_speak/strings/select_to_speak_strings_da.xtb
@@ -1,10 +1,8 @@ <?xml version="1.0" ?> <!DOCTYPE translationbundle> <translationbundle lang="da"> -<translation id="111880247472081232">Dine indstillinger for tekstoplæsning blev migreret til globale indstillinger for oplæsning.</translation> <translation id="1197088940767939838">Orange</translation> <translation id="1273314450961659276">Indstillinger for oplæsning</translation> -<translation id="1498542103351704084">Indstillinger for tekstoplæsning er opdateret</translation> <translation id="1555130319947370107">Blå</translation> <translation id="1666326070478924810">Indstillinger for Tekstoplæsning</translation> <translation id="1966649499058910679">Fremhæv hvert ord, når det siges</translation> @@ -12,7 +10,6 @@ <translation id="2714180132046334502">Mørk baggrund</translation> <translation id="27349076983469322">Lys baggrund</translation> <translation id="335581015389089642">Tale</translation> -<translation id="3784184786832188702">Tekstoplæsning bruger nu de globale indstillinger for oplæsning.</translation> <translation id="5901630391730855834">Gul</translation> <translation id="6017514345406065928">Grøn</translation> <translation id="6475604559827479857">Farve til markering af ord:</translation>
diff --git a/chrome/browser/resources/chromeos/select_to_speak/strings/select_to_speak_strings_de.xtb b/chrome/browser/resources/chromeos/select_to_speak/strings/select_to_speak_strings_de.xtb index 718571d..0784e596 100644 --- a/chrome/browser/resources/chromeos/select_to_speak/strings/select_to_speak_strings_de.xtb +++ b/chrome/browser/resources/chromeos/select_to_speak/strings/select_to_speak_strings_de.xtb
@@ -1,10 +1,8 @@ <?xml version="1.0" ?> <!DOCTYPE translationbundle> <translationbundle lang="de"> -<translation id="111880247472081232">Ihre Sprachausgabe-Einstellungen für die Funktion "Vorlesen" wurden zu den globalen Sprachausgabe-Einstellungen migriert.</translation> <translation id="1197088940767939838">Orange</translation> <translation id="1273314450961659276">Einstellungen für Sprachausgabe</translation> -<translation id="1498542103351704084">Spracheinstellungen für die Funktion "Vorlesen" wurden aktualisiert</translation> <translation id="1555130319947370107">Blau</translation> <translation id="1666326070478924810">Einstellungen für "Vorlesen"</translation> <translation id="1966649499058910679">Jedes Wort hervorheben, das gerade gesprochen wird</translation> @@ -12,7 +10,6 @@ <translation id="2714180132046334502">Dunkler Hintergrund</translation> <translation id="27349076983469322">Heller Hintergrund</translation> <translation id="335581015389089642">Sprachausgabe</translation> -<translation id="3784184786832188702">Für die Funktion "Vorlesen" werden jetzt globale Sprachausgabe-Einstellungen verwendet.</translation> <translation id="5901630391730855834">Gelb</translation> <translation id="6017514345406065928">Grün</translation> <translation id="6475604559827479857">Farbe zum Hervorheben von Wörtern:</translation>
diff --git a/chrome/browser/resources/chromeos/select_to_speak/strings/select_to_speak_strings_el.xtb b/chrome/browser/resources/chromeos/select_to_speak/strings/select_to_speak_strings_el.xtb index f622b86291..bb3e299b 100644 --- a/chrome/browser/resources/chromeos/select_to_speak/strings/select_to_speak_strings_el.xtb +++ b/chrome/browser/resources/chromeos/select_to_speak/strings/select_to_speak_strings_el.xtb
@@ -1,10 +1,8 @@ <?xml version="1.0" ?> <!DOCTYPE translationbundle> <translationbundle lang="el"> -<translation id="111880247472081232">Οι ρυθμίσεις μετατροπής κειμένου σε ομιλία της λειτουργίας "Επιλέξτε για αυτόματη ανάγνωση" μεταφέρθηκαν στις καθολικές ρυθμίσεις μετατροπής κειμένου σε ομιλία.</translation> <translation id="1197088940767939838">Πορτοκαλί</translation> <translation id="1273314450961659276">Ρυθμίσεις μετατροπής κειμένου σε ομιλία</translation> -<translation id="1498542103351704084">Οι ρυθμίσεις της λειτουργίας "Επιλέξτε για αυτόματη ανάγνωση" ενημερώθηκαν</translation> <translation id="1555130319947370107">Μπλε</translation> <translation id="1666326070478924810">Ρυθμίσεις υπηρεσίας "Επιλέξτε για εκφώνηση"</translation> <translation id="1966649499058910679">Επισημάνετε κάθε λέξη καθώς εκφωνείται</translation> @@ -12,7 +10,6 @@ <translation id="2714180132046334502">Σκούρο φόντο</translation> <translation id="27349076983469322">Ανοιχτόχρωμο φόντο</translation> <translation id="335581015389089642">Ομιλία</translation> -<translation id="3784184786832188702">Η λειτουργία "Επιλέξτε για αυτόματη ανάγνωση" χρησιμοποιεί πλέον καθολικές ρυθμίσεις μετατροπής κειμένου σε ομιλία.</translation> <translation id="5901630391730855834">Κίτρινο</translation> <translation id="6017514345406065928">Πράσινο</translation> <translation id="6475604559827479857">Χρώμα επισήμανσης λέξεων:</translation>
diff --git a/chrome/browser/resources/chromeos/select_to_speak/strings/select_to_speak_strings_en-GB.xtb b/chrome/browser/resources/chromeos/select_to_speak/strings/select_to_speak_strings_en-GB.xtb index 6bb1a041..08ebcb1 100644 --- a/chrome/browser/resources/chromeos/select_to_speak/strings/select_to_speak_strings_en-GB.xtb +++ b/chrome/browser/resources/chromeos/select_to_speak/strings/select_to_speak_strings_en-GB.xtb
@@ -1,10 +1,8 @@ <?xml version="1.0" ?> <!DOCTYPE translationbundle> <translationbundle lang="en-GB"> -<translation id="111880247472081232">Your Select-to-Speak Text-to-Speech settings were migrated to global Text-to-Speech settings.</translation> <translation id="1197088940767939838">Orange</translation> <translation id="1273314450961659276">Text-to-Speech settings</translation> -<translation id="1498542103351704084">Select-to-Speak speech settings updated</translation> <translation id="1555130319947370107">Blue</translation> <translation id="1666326070478924810">Select to Speak settings</translation> <translation id="1966649499058910679">Highlight each word as it is spoken</translation> @@ -12,7 +10,6 @@ <translation id="2714180132046334502">Dark background</translation> <translation id="27349076983469322">Light background</translation> <translation id="335581015389089642">Speech</translation> -<translation id="3784184786832188702">Select-to-Speak now uses global Text-to-Speech settings.</translation> <translation id="5901630391730855834">Yellow</translation> <translation id="6017514345406065928">Green</translation> <translation id="6475604559827479857">Colour for word highlights:</translation>
diff --git a/chrome/browser/resources/chromeos/select_to_speak/strings/select_to_speak_strings_es-419.xtb b/chrome/browser/resources/chromeos/select_to_speak/strings/select_to_speak_strings_es-419.xtb index 9157e4a..156e906a0 100644 --- a/chrome/browser/resources/chromeos/select_to_speak/strings/select_to_speak_strings_es-419.xtb +++ b/chrome/browser/resources/chromeos/select_to_speak/strings/select_to_speak_strings_es-419.xtb
@@ -1,10 +1,8 @@ <?xml version="1.0" ?> <!DOCTYPE translationbundle> <translationbundle lang="es-419"> -<translation id="111880247472081232">Tus opciones de configuración de Seleccionar para pronunciar texto a voz migraron a la configuración de texto a voz global.</translation> <translation id="1197088940767939838">Naranja</translation> <translation id="1273314450961659276">Configuración de texto a voz</translation> -<translation id="1498542103351704084">Se actualizó la configuración de Seleccionar para pronunciar</translation> <translation id="1555130319947370107">Azul</translation> <translation id="1666326070478924810">Configuración de Seleccionar para pronunciar</translation> <translation id="1966649499058910679">Destaca cada palabra a medida que se pronuncia</translation> @@ -12,7 +10,6 @@ <translation id="2714180132046334502">Fondo oscuro</translation> <translation id="27349076983469322">Fondo claro</translation> <translation id="335581015389089642">Voz</translation> -<translation id="3784184786832188702">Seleccionar para pronunciar ahora usa la configuración global de texto a voz.</translation> <translation id="5901630391730855834">Amarillo</translation> <translation id="6017514345406065928">Verde</translation> <translation id="6475604559827479857">Color para destacar palabras:</translation>
diff --git a/chrome/browser/resources/chromeos/select_to_speak/strings/select_to_speak_strings_es.xtb b/chrome/browser/resources/chromeos/select_to_speak/strings/select_to_speak_strings_es.xtb index c734d0b2..73d76841 100644 --- a/chrome/browser/resources/chromeos/select_to_speak/strings/select_to_speak_strings_es.xtb +++ b/chrome/browser/resources/chromeos/select_to_speak/strings/select_to_speak_strings_es.xtb
@@ -1,10 +1,8 @@ <?xml version="1.0" ?> <!DOCTYPE translationbundle> <translationbundle lang="es"> -<translation id="111880247472081232">La configuración de síntesis de voz de Enunciar Selección se ha migrado a la configuración de síntesis de voz global.</translation> <translation id="1197088940767939838">Naranja</translation> <translation id="1273314450961659276">Configuración de síntesis de voz</translation> -<translation id="1498542103351704084">La configuración de síntesis de voz de Enunciar Selección se ha actualizado</translation> <translation id="1555130319947370107">Azul</translation> <translation id="1666326070478924810">Configuración de Enunciar Selección</translation> <translation id="1966649499058910679">Destacar cada palabra cuando se pronuncia</translation> @@ -12,7 +10,6 @@ <translation id="2714180132046334502">Fondo oscuro</translation> <translation id="27349076983469322">Fondo claro</translation> <translation id="335581015389089642">Voz</translation> -<translation id="3784184786832188702">Enunciar Selección ahora utiliza la configuración de síntesis de voz global.</translation> <translation id="5901630391730855834">Amarillo</translation> <translation id="6017514345406065928">Verde</translation> <translation id="6475604559827479857">Color para destacar palabras:</translation>
diff --git a/chrome/browser/resources/chromeos/select_to_speak/strings/select_to_speak_strings_et.xtb b/chrome/browser/resources/chromeos/select_to_speak/strings/select_to_speak_strings_et.xtb index 38b19ba..e282cabe 100644 --- a/chrome/browser/resources/chromeos/select_to_speak/strings/select_to_speak_strings_et.xtb +++ b/chrome/browser/resources/chromeos/select_to_speak/strings/select_to_speak_strings_et.xtb
@@ -1,10 +1,8 @@ <?xml version="1.0" ?> <!DOCTYPE translationbundle> <translationbundle lang="et"> -<translation id="111880247472081232">Teie funktsiooni Vali ja kuula kõnesünteesi seaded teisaldati kõnesünteesi üldseadete jaotisesse.</translation> <translation id="1197088940767939838">Oranž</translation> <translation id="1273314450961659276">Kõnesünteesi seaded</translation> -<translation id="1498542103351704084">Funktsiooni Vali ja kuula kõneseadeid värskendati</translation> <translation id="1555130319947370107">Sinine</translation> <translation id="1666326070478924810">Funktsiooni Vali ja kuula seaded</translation> <translation id="1966649499058910679">Tõsta iga sõna selle kõnelemisel esile</translation> @@ -12,7 +10,6 @@ <translation id="2714180132046334502">Tume taust</translation> <translation id="27349076983469322">Hele taust</translation> <translation id="335581015389089642">Kõne</translation> -<translation id="3784184786832188702">Funktsioon Vali ja kuula kasutab nüüd kõnesünteesi üldseadeid.</translation> <translation id="5901630391730855834">Kollane</translation> <translation id="6017514345406065928">Roheline</translation> <translation id="6475604559827479857">Sõna esiletõstude värv:</translation>
diff --git a/chrome/browser/resources/chromeos/select_to_speak/strings/select_to_speak_strings_fa.xtb b/chrome/browser/resources/chromeos/select_to_speak/strings/select_to_speak_strings_fa.xtb index 06ed98d..b02c3c928 100644 --- a/chrome/browser/resources/chromeos/select_to_speak/strings/select_to_speak_strings_fa.xtb +++ b/chrome/browser/resources/chromeos/select_to_speak/strings/select_to_speak_strings_fa.xtb
@@ -1,10 +1,8 @@ <?xml version="1.0" ?> <!DOCTYPE translationbundle> <translationbundle lang="fa"> -<translation id="111880247472081232">تنظیمات «انتخاب برای شنیدن» «نوشتار به گفتار» در تنظیمات کلی «نوشتار به گفتار» ادغام شدهاند.</translation> <translation id="1197088940767939838">نارنجی</translation> <translation id="1273314450961659276">تنظیمات نوشتار به گفتار</translation> -<translation id="1498542103351704084">تنظیمات گفتار «انتخاب برای شنیدن» بهروزرسانی شد</translation> <translation id="1555130319947370107">آبی</translation> <translation id="1666326070478924810">تنظیمات «انتخاب برای شنیدن»</translation> <translation id="1966649499058910679">وقتی کلمهای گفته میشود، برجسته شود</translation> @@ -12,7 +10,6 @@ <translation id="2714180132046334502">پسزمینه تیره</translation> <translation id="27349076983469322">پسزمینه روشن</translation> <translation id="335581015389089642">صدا</translation> -<translation id="3784184786832188702">اکنون «انتخاب برای شنیدن» از تنظیمات کلی «نوشتار به گفتار» استفاده میکند.</translation> <translation id="5901630391730855834">زرد</translation> <translation id="6017514345406065928">سبز</translation> <translation id="6475604559827479857">رنگ برای برجسته کردن کلمه:</translation>
diff --git a/chrome/browser/resources/chromeos/select_to_speak/strings/select_to_speak_strings_fi.xtb b/chrome/browser/resources/chromeos/select_to_speak/strings/select_to_speak_strings_fi.xtb index d686a70..34c893f 100644 --- a/chrome/browser/resources/chromeos/select_to_speak/strings/select_to_speak_strings_fi.xtb +++ b/chrome/browser/resources/chromeos/select_to_speak/strings/select_to_speak_strings_fi.xtb
@@ -1,10 +1,8 @@ <?xml version="1.0" ?> <!DOCTYPE translationbundle> <translationbundle lang="fi"> -<translation id="111880247472081232">Teksti puhuttuna- ja Tekstistä puheeksi ‑asetuksesi yhdistettiin yleisiksi Tekstistä puheeksi ‑asetuksiksi.</translation> <translation id="1197088940767939838">Oranssi</translation> <translation id="1273314450961659276">Tekstistä puheeksi ‑asetukset</translation> -<translation id="1498542103351704084">Teksti puhuttuna ‑asetukset päivitetty</translation> <translation id="1555130319947370107">Sininen</translation> <translation id="1666326070478924810">Teksti puhuttuna ‑asetukset</translation> <translation id="1966649499058910679">Korosta jokainen sana kun se lausutaan</translation> @@ -12,7 +10,6 @@ <translation id="2714180132046334502">Tumma tausta</translation> <translation id="27349076983469322">Vaalea tausta</translation> <translation id="335581015389089642">Puhe</translation> -<translation id="3784184786832188702">Teksti puhuttuna käyttää nyt yleisiä Tekstistä puheeksi ‑asetuksia.</translation> <translation id="5901630391730855834">Keltainen</translation> <translation id="6017514345406065928">Vihreä</translation> <translation id="6475604559827479857">Sanojen korostusväri:</translation>
diff --git a/chrome/browser/resources/chromeos/select_to_speak/strings/select_to_speak_strings_fil.xtb b/chrome/browser/resources/chromeos/select_to_speak/strings/select_to_speak_strings_fil.xtb index 93ab886..39ff559e 100644 --- a/chrome/browser/resources/chromeos/select_to_speak/strings/select_to_speak_strings_fil.xtb +++ b/chrome/browser/resources/chromeos/select_to_speak/strings/select_to_speak_strings_fil.xtb
@@ -1,10 +1,8 @@ <?xml version="1.0" ?> <!DOCTYPE translationbundle> <translationbundle lang="fil"> -<translation id="111880247472081232">Na-migrate ang iyong mga setting ng Select-to-Speak Text-to-Speech sa mga pangkalahatang setting ng Text-to-Speech.</translation> <translation id="1197088940767939838">Orange</translation> <translation id="1273314450961659276">Mga setting ng Text-to-Speech</translation> -<translation id="1498542103351704084">Na-update ang mga setting ng Select-to-Speak speech</translation> <translation id="1555130319947370107">Asul</translation> <translation id="1666326070478924810">Mga Setting ng Select to Speak</translation> <translation id="1966649499058910679">I-highlight ang bawat salita habang binibigkas ito</translation> @@ -12,7 +10,6 @@ <translation id="2714180132046334502">Madilim na background</translation> <translation id="27349076983469322">Maliwanag na background</translation> <translation id="335581015389089642">Pananalita</translation> -<translation id="3784184786832188702">Gumagamit na ng mga pandaigdigang setting ng Text-to-Speech ang Select to speak.</translation> <translation id="5901630391730855834">Dilaw</translation> <translation id="6017514345406065928">Berde</translation> <translation id="6475604559827479857">Kulay para sa mga pag-highlight ng salita:</translation>
diff --git a/chrome/browser/resources/chromeos/select_to_speak/strings/select_to_speak_strings_fr.xtb b/chrome/browser/resources/chromeos/select_to_speak/strings/select_to_speak_strings_fr.xtb index 52aa1a6..83996ea 100644 --- a/chrome/browser/resources/chromeos/select_to_speak/strings/select_to_speak_strings_fr.xtb +++ b/chrome/browser/resources/chromeos/select_to_speak/strings/select_to_speak_strings_fr.xtb
@@ -1,10 +1,8 @@ <?xml version="1.0" ?> <!DOCTYPE translationbundle> <translationbundle lang="fr"> -<translation id="111880247472081232">Les paramètres de synthèse vocale du service Sélectionner pour prononcer se trouvent désormais dans les paramètres de synthèse vocale généraux.</translation> <translation id="1197088940767939838">Orange</translation> <translation id="1273314450961659276">Paramètres de synthèse vocale</translation> -<translation id="1498542103351704084">Paramètres de synthèse vocale du service Sélectionner pour prononcer mis à jour</translation> <translation id="1555130319947370107">Bleu</translation> <translation id="1666326070478924810">Paramètres de "Sélectionner pour prononcer"</translation> <translation id="1966649499058910679">Mettre en évidence les mots à mesure qu'ils sont énoncés</translation> @@ -12,7 +10,6 @@ <translation id="2714180132046334502">Arrière-plan sombre</translation> <translation id="27349076983469322">Arrière-plan clair</translation> <translation id="335581015389089642">Voix</translation> -<translation id="3784184786832188702">Le service Sélectionner pour prononcer utilise désormais les paramètres de synthèse vocale généraux.</translation> <translation id="5901630391730855834">Jaune</translation> <translation id="6017514345406065928">Vert</translation> <translation id="6475604559827479857">Couleur pour la mise en surbrillance des mots :</translation>
diff --git a/chrome/browser/resources/chromeos/select_to_speak/strings/select_to_speak_strings_gu.xtb b/chrome/browser/resources/chromeos/select_to_speak/strings/select_to_speak_strings_gu.xtb index f964e939..7fc55818 100644 --- a/chrome/browser/resources/chromeos/select_to_speak/strings/select_to_speak_strings_gu.xtb +++ b/chrome/browser/resources/chromeos/select_to_speak/strings/select_to_speak_strings_gu.xtb
@@ -1,10 +1,8 @@ <?xml version="1.0" ?> <!DOCTYPE translationbundle> <translationbundle lang="gu"> -<translation id="111880247472081232">તમારી 'ટેક્સ્ટ-ટૂ-સ્પીચ' 'સાંભળવા માટે પસંદ કરો' સેટિંગને વૈશ્વિક 'ટેક્સ્ટ-ટૂ-સ્પીચ' સેટિંગ પર સ્થાનાંતર કરવામાં આવી છે.</translation> <translation id="1197088940767939838">નારંગી</translation> <translation id="1273314450961659276">'ટેક્સ્ટ-ટૂ-સ્પીચ' સેટિંગ</translation> -<translation id="1498542103351704084">'સાંભળવા માટે પસંદ કરો' વાણી સેટિંગ અપડેટ કરવામાં આવી</translation> <translation id="1555130319947370107">વાદળી</translation> <translation id="1666326070478924810">સાંભળવા માટે પસંદ કરોના સેટિંગ</translation> <translation id="1966649499058910679">દરેક શબ્દને બોલવાની રીત પ્રમાણે હાઇલાઇટ કરો</translation> @@ -12,7 +10,6 @@ <translation id="2714180132046334502">ઘાટું બૅકગ્રાઉન્ડ</translation> <translation id="27349076983469322">આછું બૅકગ્રાઉન્ડ</translation> <translation id="335581015389089642">ભાષા</translation> -<translation id="3784184786832188702">'સાંભળવા માટે પસંદ કરો' હવે વૈશ્વિક 'ટેક્સ્ટ-ટૂ-સ્પીચ' સેટિંગનો ઉપયોગ કરે છે.</translation> <translation id="5901630391730855834">પીળો</translation> <translation id="6017514345406065928">લીલો</translation> <translation id="6475604559827479857">શબ્દ હાઇલાઇટ કરવા માટેનો રંગ:</translation>
diff --git a/chrome/browser/resources/chromeos/select_to_speak/strings/select_to_speak_strings_hi.xtb b/chrome/browser/resources/chromeos/select_to_speak/strings/select_to_speak_strings_hi.xtb index 2f562f4..2378c24 100644 --- a/chrome/browser/resources/chromeos/select_to_speak/strings/select_to_speak_strings_hi.xtb +++ b/chrome/browser/resources/chromeos/select_to_speak/strings/select_to_speak_strings_hi.xtb
@@ -1,10 +1,8 @@ <?xml version="1.0" ?> <!DOCTYPE translationbundle> <translationbundle lang="hi"> -<translation id="111880247472081232">आपकी 'चुनें और सुनें' सेवा की लिखाई को बोली में बदलने की सेटिंग, लिखाई को बोली में बदलने की वैश्विक सेटिंग में माइग्रेट की गई हैं.</translation> <translation id="1197088940767939838">नारंगी</translation> <translation id="1273314450961659276">लिखाई को बोली में बदलने की सेटिंग</translation> -<translation id="1498542103351704084">'चुनें और सुनें' सेवा की बोली सेटिंग अपडेट की गईं</translation> <translation id="1555130319947370107">नीला</translation> <translation id="1666326070478924810">चुनें और सुनें सेटिंग</translation> <translation id="1966649499058910679">जैसे-जैसे हर शब्द बोला जाए, उसे हाइलाइट करें</translation> @@ -12,7 +10,6 @@ <translation id="2714180132046334502">गहरा बैकग्राउंड</translation> <translation id="27349076983469322">हल्का बैकग्राउंड</translation> <translation id="335581015389089642">बोली</translation> -<translation id="3784184786832188702">'चुनें और सुनें' सेवा अब लिखाई को बोली में बदलने की वैश्विक सेटिंग का इस्तेमाल करती है.</translation> <translation id="5901630391730855834">पीला</translation> <translation id="6017514345406065928">हरा</translation> <translation id="6475604559827479857">शब्द हाइलाइट करने का रंग:</translation>
diff --git a/chrome/browser/resources/chromeos/select_to_speak/strings/select_to_speak_strings_hr.xtb b/chrome/browser/resources/chromeos/select_to_speak/strings/select_to_speak_strings_hr.xtb index a6a73df..ece8d857 100644 --- a/chrome/browser/resources/chromeos/select_to_speak/strings/select_to_speak_strings_hr.xtb +++ b/chrome/browser/resources/chromeos/select_to_speak/strings/select_to_speak_strings_hr.xtb
@@ -1,10 +1,8 @@ <?xml version="1.0" ?> <!DOCTYPE translationbundle> <translationbundle lang="hr"> -<translation id="111880247472081232">Vaše postavke pretvaranja teksta u govor za značajku Odabir za govor premještene su u globalne postavke pretvaranja teksta u govor.</translation> <translation id="1197088940767939838">Narančasta</translation> <translation id="1273314450961659276">Postavke pretvaranja teksta u govor</translation> -<translation id="1498542103351704084">Ažurirane su postavke govora značajke Odabir za govor</translation> <translation id="1555130319947370107">Plava</translation> <translation id="1666326070478924810">Postavke Odabira za govor</translation> <translation id="1966649499058910679">Istakni svaku riječ dok se izgovara</translation> @@ -12,7 +10,6 @@ <translation id="2714180132046334502">Tamna pozadina</translation> <translation id="27349076983469322">Svijetla pozadina</translation> <translation id="335581015389089642">Govor</translation> -<translation id="3784184786832188702">Odabir za govor sada upotrebljava globalne postavke pretvaranja teksta u govor.</translation> <translation id="5901630391730855834">Žuta</translation> <translation id="6017514345406065928">Zelena</translation> <translation id="6475604559827479857">Boja za isticanja riječi:</translation>
diff --git a/chrome/browser/resources/chromeos/select_to_speak/strings/select_to_speak_strings_hu.xtb b/chrome/browser/resources/chromeos/select_to_speak/strings/select_to_speak_strings_hu.xtb index 240ae3c..dbf66ea 100644 --- a/chrome/browser/resources/chromeos/select_to_speak/strings/select_to_speak_strings_hu.xtb +++ b/chrome/browser/resources/chromeos/select_to_speak/strings/select_to_speak_strings_hu.xtb
@@ -1,10 +1,8 @@ <?xml version="1.0" ?> <!DOCTYPE translationbundle> <translationbundle lang="hu"> -<translation id="111880247472081232">A Felolvasás szövegfelolvasó funkciójához tartozó beállításokat a szövegfelolvasó globális beállításai közé migráltuk.</translation> <translation id="1197088940767939838">Narancssárga</translation> <translation id="1273314450961659276">A szövegfelolvasó beállításai</translation> -<translation id="1498542103351704084">A Felolvasáshoz tartozó beszédbeállítások frissítése megtörtént</translation> <translation id="1555130319947370107">Kék</translation> <translation id="1666326070478924810">Felolvasási beállítások</translation> <translation id="1966649499058910679">Szavak kiemelése a beszédtempóval egyező ütemben</translation> @@ -12,7 +10,6 @@ <translation id="2714180132046334502">Sötét háttér</translation> <translation id="27349076983469322">Világos háttér</translation> <translation id="335581015389089642">Beszéd</translation> -<translation id="3784184786832188702">A felolvasás mostantól a szövegfelolvasó globális beállításait használja.</translation> <translation id="5901630391730855834">Sárga</translation> <translation id="6017514345406065928">Zöld</translation> <translation id="6475604559827479857">Szókiemeléshez tartozó szín:</translation>
diff --git a/chrome/browser/resources/chromeos/select_to_speak/strings/select_to_speak_strings_id.xtb b/chrome/browser/resources/chromeos/select_to_speak/strings/select_to_speak_strings_id.xtb index 5840be4..e054a172 100644 --- a/chrome/browser/resources/chromeos/select_to_speak/strings/select_to_speak_strings_id.xtb +++ b/chrome/browser/resources/chromeos/select_to_speak/strings/select_to_speak_strings_id.xtb
@@ -1,10 +1,8 @@ <?xml version="1.0" ?> <!DOCTYPE translationbundle> <translationbundle lang="id"> -<translation id="111880247472081232">Setelan Text-to-Speech Klik untuk Diucapkan dimigrasikan ke setelan Text-to-Speech global.</translation> <translation id="1197088940767939838">Oranye</translation> <translation id="1273314450961659276">Setelan Text-to-Speech</translation> -<translation id="1498542103351704084">Setelan ucapan Klik untuk Diucapkan diupdate</translation> <translation id="1555130319947370107">Biru</translation> <translation id="1666326070478924810">Setelan Klik untuk Diucapkan</translation> <translation id="1966649499058910679">Soroti setiap kata saat kata tersebut diucapkan</translation> @@ -12,7 +10,6 @@ <translation id="2714180132046334502">Latar belakang gelap</translation> <translation id="27349076983469322">Latar belakang terang</translation> <translation id="335581015389089642">Ucapan</translation> -<translation id="3784184786832188702">Fitur Klik untuk Diucapkan kini menggunakan setelan Text-to-Speech global.</translation> <translation id="5901630391730855834">Kuning</translation> <translation id="6017514345406065928">Hijau</translation> <translation id="6475604559827479857">Warna untuk highlight kata:</translation>
diff --git a/chrome/browser/resources/chromeos/select_to_speak/strings/select_to_speak_strings_it.xtb b/chrome/browser/resources/chromeos/select_to_speak/strings/select_to_speak_strings_it.xtb index 1baeaa6..b323f42 100644 --- a/chrome/browser/resources/chromeos/select_to_speak/strings/select_to_speak_strings_it.xtb +++ b/chrome/browser/resources/chromeos/select_to_speak/strings/select_to_speak_strings_it.xtb
@@ -1,10 +1,8 @@ <?xml version="1.0" ?> <!DOCTYPE translationbundle> <translationbundle lang="it"> -<translation id="111880247472081232">È stata eseguita la migrazione delle tue impostazioni dei servizi Seleziona per ascoltare e Sintesi vocale alle impostazioni globali di sintesi vocale.</translation> <translation id="1197088940767939838">Arancione</translation> <translation id="1273314450961659276">Impostazioni di sintesi vocale</translation> -<translation id="1498542103351704084">Impostazioni di sintesi vocale aggiornate</translation> <translation id="1555130319947370107">Blu</translation> <translation id="1666326070478924810">Impostazioni Seleziona per ascoltare</translation> <translation id="1966649499058910679">Evidenzia ogni parola mentre viene pronunciata</translation> @@ -12,7 +10,6 @@ <translation id="2714180132046334502">Sfondo scuro</translation> <translation id="27349076983469322">Sfondo chiaro</translation> <translation id="335581015389089642">Voce</translation> -<translation id="3784184786832188702">La sintesi vocale ora utilizza impostazioni globali di sintesi vocale.</translation> <translation id="5901630391730855834">Giallo</translation> <translation id="6017514345406065928">Verde</translation> <translation id="6475604559827479857">Colore di evidenziazione delle parole</translation>
diff --git a/chrome/browser/resources/chromeos/select_to_speak/strings/select_to_speak_strings_iw.xtb b/chrome/browser/resources/chromeos/select_to_speak/strings/select_to_speak_strings_iw.xtb index 5ec99e6..5ea44d6a0 100644 --- a/chrome/browser/resources/chromeos/select_to_speak/strings/select_to_speak_strings_iw.xtb +++ b/chrome/browser/resources/chromeos/select_to_speak/strings/select_to_speak_strings_iw.xtb
@@ -1,10 +1,8 @@ <?xml version="1.0" ?> <!DOCTYPE translationbundle> <translationbundle lang="iw"> -<translation id="111880247472081232">ההגדרות של המרת טקסט לדיבור הקשורות להקראה הועברו להגדרות הכלליות של המרת טקסט לדיבור.</translation> <translation id="1197088940767939838">כתום</translation> <translation id="1273314450961659276">ההגדרות של המרת טקסט לדיבור</translation> -<translation id="1498542103351704084">המערכת עדכנה את הגדרות הדיבור של ההקראה</translation> <translation id="1555130319947370107">כחול</translation> <translation id="1666326070478924810">הגדרות הקראה</translation> <translation id="1966649499058910679">הדגשה של כל מילה בזמן שהן נאמרות</translation> @@ -12,7 +10,6 @@ <translation id="2714180132046334502">רקע כהה</translation> <translation id="27349076983469322">רקע בהיר</translation> <translation id="335581015389089642">דיבור</translation> -<translation id="3784184786832188702">תכונת ההקראה משתמשת עכשיו בהגדרות הכלליות של המרת טקסט לדיבור.</translation> <translation id="5901630391730855834">צהוב</translation> <translation id="6017514345406065928">ירוק</translation> <translation id="6475604559827479857">הצבע של הדגשת המילים:</translation>
diff --git a/chrome/browser/resources/chromeos/select_to_speak/strings/select_to_speak_strings_ja.xtb b/chrome/browser/resources/chromeos/select_to_speak/strings/select_to_speak_strings_ja.xtb index c77ddf28..5fa8ddf4 100644 --- a/chrome/browser/resources/chromeos/select_to_speak/strings/select_to_speak_strings_ja.xtb +++ b/chrome/browser/resources/chromeos/select_to_speak/strings/select_to_speak_strings_ja.xtb
@@ -1,10 +1,8 @@ <?xml version="1.0" ?> <!DOCTYPE translationbundle> <translationbundle lang="ja"> -<translation id="111880247472081232">「選択して読み上げ」機能のテキスト読み上げの設定は、全般設定のテキスト読み上げの設定に統合されました。</translation> <translation id="1197088940767939838">オレンジ</translation> <translation id="1273314450961659276">テキスト読み上げの設定</translation> -<translation id="1498542103351704084">「選択して読み上げ」の設定が更新されました</translation> <translation id="1555130319947370107">青</translation> <translation id="1666326070478924810">「選択して読み上げ」の設定</translation> <translation id="1966649499058910679">話されている単語を強調表示する</translation> @@ -12,7 +10,6 @@ <translation id="2714180132046334502">暗い背景</translation> <translation id="27349076983469322">明るい背景</translation> <translation id="335581015389089642">スピーチ</translation> -<translation id="3784184786832188702">「選択して読み上げ」機能で、全般設定のテキスト読み上げの設定が使用されるようになりました。</translation> <translation id="5901630391730855834">黄</translation> <translation id="6017514345406065928">緑</translation> <translation id="6475604559827479857">次の色で単語をハイライト表示:</translation>
diff --git a/chrome/browser/resources/chromeos/select_to_speak/strings/select_to_speak_strings_kn.xtb b/chrome/browser/resources/chromeos/select_to_speak/strings/select_to_speak_strings_kn.xtb index 201c285..1aba4bf 100644 --- a/chrome/browser/resources/chromeos/select_to_speak/strings/select_to_speak_strings_kn.xtb +++ b/chrome/browser/resources/chromeos/select_to_speak/strings/select_to_speak_strings_kn.xtb
@@ -1,10 +1,8 @@ <?xml version="1.0" ?> <!DOCTYPE translationbundle> <translationbundle lang="kn"> -<translation id="111880247472081232">"ಧ್ವನಿ ಆಯ್ಕೆ ಮಾಡಿ" ವೈಶಿಷ್ಟ್ಯದಲ್ಲಿ "ಪಠ್ಯದಿಂದ ಧ್ವನಿ" ಸೆಟ್ಟಿಂಗ್ಗಳನ್ನು ಜಾಗತಿಕ "ಪಠ್ಯದಿಂದ ಧ್ವನಿ" ಸೆಟ್ಟಿಂಗ್ಗಳಿಗೆ ಸ್ಥಳಾಂತರಗೊಳಿಸಲಾಗಿದೆ.</translation> <translation id="1197088940767939838">ಕಿತ್ತಳೆ</translation> <translation id="1273314450961659276">ಪಠ್ಯದಿಂದ ಧ್ವನಿ ಸೆಟ್ಟಿಂಗ್ಗಳು</translation> -<translation id="1498542103351704084">ಧ್ವನಿ ಆಯ್ಕೆ ಮಾಡಿ ವೈಶಿಷ್ಟ್ಯದ ಧ್ವನಿ ಸೆಟ್ಟಿಂಗ್ಗಳನ್ನು ಅಪ್ಡೇಟ್ ಮಾಡಲಾಗಿದೆ</translation> <translation id="1555130319947370107">ನೀಲಿ</translation> <translation id="1666326070478924810">ಧ್ವನಿ ಆಯ್ಕೆ ಮಾಡಿ ಸೆಟ್ಟಿಂಗ್ಗಳು</translation> <translation id="1966649499058910679">ಪ್ರತಿ ಪದವನ್ನು ಮಾತನಾಡುವ ರೀತಿಯಲ್ಲೇ ಹೈಲೈಟ್ ಮಾಡಿ</translation> @@ -12,7 +10,6 @@ <translation id="2714180132046334502">ದಟ್ಟ ಬೆಳಕಿನ ಹಿನ್ನೆಲೆ</translation> <translation id="27349076983469322">ಮಂದ ಬೆಳಕಿನ ಹಿನ್ನೆಲೆ</translation> <translation id="335581015389089642">ಧ್ವನಿ</translation> -<translation id="3784184786832188702">ಧ್ವನಿ ಆಯ್ಕೆ ಮಾಡಿ ವೈಶಿಷ್ಟ್ಯವು ಈಗ ಪಠ್ಯದಿಂದ ಧ್ವನಿಯ ಜಾಗತಿಕ ಸೆಟ್ಟಿಂಗ್ಗಳನ್ನು ಬಳಸುತ್ತದೆ.</translation> <translation id="5901630391730855834">ಹಳದಿ</translation> <translation id="6017514345406065928">ಹಸಿರು</translation> <translation id="6475604559827479857">ಪದಗಳ ಹೈಲೈಟ್ಗಳಿಗಾಗಿ ಬಣ್ಣ:</translation>
diff --git a/chrome/browser/resources/chromeos/select_to_speak/strings/select_to_speak_strings_ko.xtb b/chrome/browser/resources/chromeos/select_to_speak/strings/select_to_speak_strings_ko.xtb index 10c56c2..4a2f6fc 100644 --- a/chrome/browser/resources/chromeos/select_to_speak/strings/select_to_speak_strings_ko.xtb +++ b/chrome/browser/resources/chromeos/select_to_speak/strings/select_to_speak_strings_ko.xtb
@@ -1,10 +1,8 @@ <?xml version="1.0" ?> <!DOCTYPE translationbundle> <translationbundle lang="ko"> -<translation id="111880247472081232">텍스트 읽어주기 TTS(텍스트 음성 변환) 설정이 전체 TTS 설정으로 이전되었습니다.</translation> <translation id="1197088940767939838">오렌지색</translation> <translation id="1273314450961659276">TTS(텍스트 음성 변환) 설정</translation> -<translation id="1498542103351704084">텍스트 읽어주기 음성 설정이 업데이트됨</translation> <translation id="1555130319947370107">파란색</translation> <translation id="1666326070478924810">텍스트 읽어주기 설정</translation> <translation id="1966649499058910679">각 단어를 읽을 때 강조표시</translation> @@ -12,7 +10,6 @@ <translation id="2714180132046334502">어두운 배경</translation> <translation id="27349076983469322">밝은 배경</translation> <translation id="335581015389089642">음성</translation> -<translation id="3784184786832188702">이제 텍스트 읽어주기에서 전체 TTS(텍스트 음성 변환) 설정을 사용합니다.</translation> <translation id="5901630391730855834">노란색</translation> <translation id="6017514345406065928">녹색</translation> <translation id="6475604559827479857">단어 하이라이트 색상:</translation>
diff --git a/chrome/browser/resources/chromeos/select_to_speak/strings/select_to_speak_strings_lt.xtb b/chrome/browser/resources/chromeos/select_to_speak/strings/select_to_speak_strings_lt.xtb index 109d978..067f5ba 100644 --- a/chrome/browser/resources/chromeos/select_to_speak/strings/select_to_speak_strings_lt.xtb +++ b/chrome/browser/resources/chromeos/select_to_speak/strings/select_to_speak_strings_lt.xtb
@@ -1,10 +1,8 @@ <?xml version="1.0" ?> <!DOCTYPE translationbundle> <translationbundle lang="lt"> -<translation id="111880247472081232">„Teksto ištarimo“ funkcijos teksto į kalbą nustatymai perkelti į visuotinius teksto į kalbą nustatymus.</translation> <translation id="1197088940767939838">Oranžinė</translation> <translation id="1273314450961659276">Teksto į kalbą nustatymai</translation> -<translation id="1498542103351704084">Atnaujinti „Teksto ištarimo“ funkcijos kalbos nustatymai</translation> <translation id="1555130319947370107">Mėlyna</translation> <translation id="1666326070478924810">Funkcijos „Teksto ištarimas“ nustatymai</translation> <translation id="1966649499058910679">Paryškinti kiekvieną sakomą žodį</translation> @@ -12,7 +10,6 @@ <translation id="2714180132046334502">Tamsus fonas</translation> <translation id="27349076983469322">Šviesus fonas</translation> <translation id="335581015389089642">Kalba</translation> -<translation id="3784184786832188702">„Teksto ištarimo“ funkcijai dabar naudojami visuotiniai teksto į kalbą nustatymai.</translation> <translation id="5901630391730855834">Geltona</translation> <translation id="6017514345406065928">Žalia</translation> <translation id="6475604559827479857">Žodžių paryškinimo spalva:</translation>
diff --git a/chrome/browser/resources/chromeos/select_to_speak/strings/select_to_speak_strings_lv.xtb b/chrome/browser/resources/chromeos/select_to_speak/strings/select_to_speak_strings_lv.xtb index b72c20a..dfad979 100644 --- a/chrome/browser/resources/chromeos/select_to_speak/strings/select_to_speak_strings_lv.xtb +++ b/chrome/browser/resources/chromeos/select_to_speak/strings/select_to_speak_strings_lv.xtb
@@ -1,10 +1,8 @@ <?xml version="1.0" ?> <!DOCTYPE translationbundle> <translationbundle lang="lv"> -<translation id="111880247472081232">Pakalpojumu Atlasīt, lai izrunātu un Teksta pārvēršana runā iestatījumi tika migrēti uz globālajiem pakalpojuma Teksta pārvēršana runā iestatījumiem.</translation> <translation id="1197088940767939838">Oranža</translation> <translation id="1273314450961659276">Pakalpojuma Teksta pārvēršana runā iestatījumi</translation> -<translation id="1498542103351704084">Pakalpojuma Atlasīt, lai izrunātu runas iestatījumi ir atjaunināti</translation> <translation id="1555130319947370107">Zila</translation> <translation id="1666326070478924810">Funkcijas “Atlasīt, lai izrunātu” iestatījumi</translation> <translation id="1966649499058910679">Iezīmēt katru vārdu, kad tas tiek izrunāts</translation> @@ -12,7 +10,6 @@ <translation id="2714180132046334502">Tumšs fons</translation> <translation id="27349076983469322">Gaišs fons</translation> <translation id="335581015389089642">Runa</translation> -<translation id="3784184786832188702">Pakalpojums Atlasīt, lai izrunātu tagad izmanto globālos pakalpojuma Teksta pārvēršana runā iestatījumus.</translation> <translation id="5901630391730855834">Dzeltena</translation> <translation id="6017514345406065928">Zaļa</translation> <translation id="6475604559827479857">Krāsa vārdu izcelšanai:</translation>
diff --git a/chrome/browser/resources/chromeos/select_to_speak/strings/select_to_speak_strings_ml.xtb b/chrome/browser/resources/chromeos/select_to_speak/strings/select_to_speak_strings_ml.xtb index d5d98c1e..ee938f3a 100644 --- a/chrome/browser/resources/chromeos/select_to_speak/strings/select_to_speak_strings_ml.xtb +++ b/chrome/browser/resources/chromeos/select_to_speak/strings/select_to_speak_strings_ml.xtb
@@ -1,10 +1,8 @@ <?xml version="1.0" ?> <!DOCTYPE translationbundle> <translationbundle lang="ml"> -<translation id="111880247472081232">നിങ്ങളുടെ 'വായിച്ചുകേൾക്കാൻ തിരഞ്ഞെടുക്കുക', ടെക്സ്റ്റ്-ടു-സ്പീച്ച് ക്രമീകരണം എന്നിവ ആഗോള ടെക്സ്റ്റ്-ടു-സ്പീച്ച് ക്രമീകരണത്തിലേക്ക് മൈഗ്രേറ്റ് ചെയ്തു.</translation> <translation id="1197088940767939838">ഓറഞ്ച്</translation> <translation id="1273314450961659276">ടെക്സ്റ്റ്-ടു-സ്പീച്ച് ക്രമീകരണം</translation> -<translation id="1498542103351704084">'വായിച്ചുകേൾക്കാൻ തിരഞ്ഞെടുക്കുക' സംഭാഷണ ക്രമീകരണം അപ്ഡേറ്റ് ചെയ്തു</translation> <translation id="1555130319947370107">നീല</translation> <translation id="1666326070478924810">'വായിച്ചുകേൾക്കാൻ തിരഞ്ഞെടുക്കുക' ക്രമീകരണം</translation> <translation id="1966649499058910679">ഓരോ വാക്കും പറഞ്ഞത് പോലെ ഹൈലൈറ്റ് ചെയ്യുക</translation> @@ -12,7 +10,6 @@ <translation id="2714180132046334502">ഇരുണ്ട പശ്ചാത്തലം</translation> <translation id="27349076983469322">ലൈറ്റ് പശ്ചാത്തലം</translation> <translation id="335581015389089642">സംഭാഷണം</translation> -<translation id="3784184786832188702">'വായിച്ചുകേൾക്കാൻ തിരഞ്ഞെടുക്കുക' ഇപ്പോൾ ആഗോള ടെക്സ്റ്റ്-ടു-സ്പീച്ച് ക്രമീകരണം ഉപയോഗിക്കുന്നു.</translation> <translation id="5901630391730855834">മഞ്ഞ</translation> <translation id="6017514345406065928">പച്ച</translation> <translation id="6475604559827479857">പദ ഹൈലൈറ്റുകളുടെ നിറം:</translation>
diff --git a/chrome/browser/resources/chromeos/select_to_speak/strings/select_to_speak_strings_mr.xtb b/chrome/browser/resources/chromeos/select_to_speak/strings/select_to_speak_strings_mr.xtb index f963f16..06762236 100644 --- a/chrome/browser/resources/chromeos/select_to_speak/strings/select_to_speak_strings_mr.xtb +++ b/chrome/browser/resources/chromeos/select_to_speak/strings/select_to_speak_strings_mr.xtb
@@ -1,10 +1,8 @@ <?xml version="1.0" ?> <!DOCTYPE translationbundle> <translationbundle lang="mr"> -<translation id="111880247472081232">तुमचे बोलण्यासाठी निवडा टेक्स्ट टू स्पीच सेटिंग्ज जागतिक टेक्स्ट टू स्पीच सेटिंग्जवर हलवले गेले.</translation> <translation id="1197088940767939838">नारिंगी</translation> <translation id="1273314450961659276">टेक्स्ट टू स्पीच सेटिंग्ज</translation> -<translation id="1498542103351704084">बोलण्यासाठी निवडा स्पीच सेटिंग्ज अपडेट झाले</translation> <translation id="1555130319947370107">निळा</translation> <translation id="1666326070478924810">बोलण्यासाठी निवडा सेटिंग्ज</translation> <translation id="1966649499058910679">प्रत्येक शब्द तो बोलला जात असताना हायलाइट करा</translation> @@ -12,7 +10,6 @@ <translation id="2714180132046334502">गडद बॅकग्राउंड</translation> <translation id="27349076983469322">फिकट बॅकग्राउंड</translation> <translation id="335581015389089642">भाषण</translation> -<translation id="3784184786832188702">बोलण्यासाठी निवडा आता जागतिक टेक्स्ट टू स्पीच सेटिंग्ज वापरते.</translation> <translation id="5901630391730855834">पिवळा</translation> <translation id="6017514345406065928">हिरवा</translation> <translation id="6475604559827479857">शब्द हायलाइट करण्यासाठी रंग:</translation>
diff --git a/chrome/browser/resources/chromeos/select_to_speak/strings/select_to_speak_strings_ms.xtb b/chrome/browser/resources/chromeos/select_to_speak/strings/select_to_speak_strings_ms.xtb index e63e0c9..efa61b0 100644 --- a/chrome/browser/resources/chromeos/select_to_speak/strings/select_to_speak_strings_ms.xtb +++ b/chrome/browser/resources/chromeos/select_to_speak/strings/select_to_speak_strings_ms.xtb
@@ -1,10 +1,8 @@ <?xml version="1.0" ?> <!DOCTYPE translationbundle> <translationbundle lang="ms"> -<translation id="111880247472081232">Tetapan Teks ke Pertuturan Pilih untuk Bercakap telah dipindahkan ke tetapan Teks ke Pertuturan global.</translation> <translation id="1197088940767939838">Oren</translation> <translation id="1273314450961659276">Tetapan Teks ke Pertuturan</translation> -<translation id="1498542103351704084">Tetapan pertuturan Pilih untuk Bercakap dikemas kini</translation> <translation id="1555130319947370107">Biru</translation> <translation id="1666326070478924810">Tetapan Pilih untuk bercakap</translation> <translation id="1966649499058910679">Serlahkan setiap perkataan seperti yang dituturkan</translation> @@ -12,7 +10,6 @@ <translation id="2714180132046334502">Latar belakang gelap</translation> <translation id="27349076983469322">Latar belakang cerah</translation> <translation id="335581015389089642">Pertuturan</translation> -<translation id="3784184786832188702">Kini Pilih untuk bercakap menggunakan tetapan Teks ke Pertuturan global.</translation> <translation id="5901630391730855834">Kuning</translation> <translation id="6017514345406065928">Hijau</translation> <translation id="6475604559827479857">Warna untuk serlahan perkataan:</translation>
diff --git a/chrome/browser/resources/chromeos/select_to_speak/strings/select_to_speak_strings_nl.xtb b/chrome/browser/resources/chromeos/select_to_speak/strings/select_to_speak_strings_nl.xtb index b33dc5c..7dfdc7d 100644 --- a/chrome/browser/resources/chromeos/select_to_speak/strings/select_to_speak_strings_nl.xtb +++ b/chrome/browser/resources/chromeos/select_to_speak/strings/select_to_speak_strings_nl.xtb
@@ -1,10 +1,8 @@ <?xml version="1.0" ?> <!DOCTYPE translationbundle> <translationbundle lang="nl"> -<translation id="111880247472081232">Je tekst-naar-spraak-instellingen voor 'Selecteer om uitgesproken te worden' zijn gemigreerd naar algemene tekst-naar-spraak-instellingen.</translation> <translation id="1197088940767939838">Oranje</translation> <translation id="1273314450961659276">Tekst-naar-spraak-instellingen</translation> -<translation id="1498542103351704084">Spraakinstellingen voor 'Selecteer om uitgesproken te worden' geüpdatet</translation> <translation id="1555130319947370107">Blauw</translation> <translation id="1666326070478924810">Instellingen voor 'Selecteer om uitgesproken te worden'</translation> <translation id="1966649499058910679">Markeer elk woord terwijl het wordt uitgesproken</translation> @@ -12,7 +10,6 @@ <translation id="2714180132046334502">Donkere achtergrond</translation> <translation id="27349076983469322">Lichte achtergrond</translation> <translation id="335581015389089642">Spraak</translation> -<translation id="3784184786832188702">'Selecteer om uitgesproken te worden' maakt nu gebruik van algemene tekst-naar-spraak-instellingen.</translation> <translation id="5901630391730855834">Geel</translation> <translation id="6017514345406065928">Groen</translation> <translation id="6475604559827479857">Kleur voor woordmarkeringen:</translation>
diff --git a/chrome/browser/resources/chromeos/select_to_speak/strings/select_to_speak_strings_no.xtb b/chrome/browser/resources/chromeos/select_to_speak/strings/select_to_speak_strings_no.xtb index 7b94a94..b5adf3f7 100644 --- a/chrome/browser/resources/chromeos/select_to_speak/strings/select_to_speak_strings_no.xtb +++ b/chrome/browser/resources/chromeos/select_to_speak/strings/select_to_speak_strings_no.xtb
@@ -1,10 +1,8 @@ <?xml version="1.0" ?> <!DOCTYPE translationbundle> <translationbundle lang="no"> -<translation id="111880247472081232">Tekst-til-tale-innstillingene for tekstopplesning og er overført til de globale tekst-til-tale-innstillingene.</translation> <translation id="1197088940767939838">Oransje</translation> <translation id="1273314450961659276">Innstillinger for tekst til tale</translation> -<translation id="1498542103351704084">Innstillingene for tekstopplesing er oppdatert</translation> <translation id="1555130319947370107">Blå</translation> <translation id="1666326070478924810">Innstillinger for Tekstopplesing</translation> <translation id="1966649499058910679">Fremhev enkeltord når de uttales</translation> @@ -12,7 +10,6 @@ <translation id="2714180132046334502">Mørk bakgrunn</translation> <translation id="27349076983469322">Lys bakgrunn</translation> <translation id="335581015389089642">Tale</translation> -<translation id="3784184786832188702">Tekstopplesing bruker nå de globale tekst-til-tale-innstillingene.</translation> <translation id="5901630391730855834">Gul</translation> <translation id="6017514345406065928">Grønn</translation> <translation id="6475604559827479857">Farge for fremheving av ord:</translation>
diff --git a/chrome/browser/resources/chromeos/select_to_speak/strings/select_to_speak_strings_pl.xtb b/chrome/browser/resources/chromeos/select_to_speak/strings/select_to_speak_strings_pl.xtb index 04171eb..7549880 100644 --- a/chrome/browser/resources/chromeos/select_to_speak/strings/select_to_speak_strings_pl.xtb +++ b/chrome/browser/resources/chromeos/select_to_speak/strings/select_to_speak_strings_pl.xtb
@@ -1,10 +1,8 @@ <?xml version="1.0" ?> <!DOCTYPE translationbundle> <translationbundle lang="pl"> -<translation id="111880247472081232">Twoje ustawienia zamiany tekstu na mowę w Przeczytaj na głos zostały przeniesione do globalnych ustawień zamiany tekstu na mowę.</translation> <translation id="1197088940767939838">Pomarańczowy</translation> <translation id="1273314450961659276">Ustawienia zamiany tekstu na mowę</translation> -<translation id="1498542103351704084">Ustawienia zamiany tekstu na mowę w Przeczytaj na głos zostały zaktualizowane</translation> <translation id="1555130319947370107">Niebieski</translation> <translation id="1666326070478924810">Ustawienia funkcji Przeczytaj na głos</translation> <translation id="1966649499058910679">Zaznacz słowo, gdy jest wymawiane</translation> @@ -12,7 +10,6 @@ <translation id="2714180132046334502">Ciemne tło</translation> <translation id="27349076983469322">Jasne tło</translation> <translation id="335581015389089642">Mowa</translation> -<translation id="3784184786832188702">Przeczytaj na głos używa teraz globalnych ustawień zamiany tekstu na mowę.</translation> <translation id="5901630391730855834">Żółty</translation> <translation id="6017514345406065928">Zielony</translation> <translation id="6475604559827479857">Kolor zaznaczenia słów:</translation>
diff --git a/chrome/browser/resources/chromeos/select_to_speak/strings/select_to_speak_strings_pt-BR.xtb b/chrome/browser/resources/chromeos/select_to_speak/strings/select_to_speak_strings_pt-BR.xtb index 7149867..2f7c9bdd 100644 --- a/chrome/browser/resources/chromeos/select_to_speak/strings/select_to_speak_strings_pt-BR.xtb +++ b/chrome/browser/resources/chromeos/select_to_speak/strings/select_to_speak_strings_pt-BR.xtb
@@ -1,10 +1,8 @@ <?xml version="1.0" ?> <!DOCTYPE translationbundle> <translationbundle lang="pt-BR"> -<translation id="111880247472081232">Suas configurações de conversão de texto em voz do Selecionar para ouvir foram migradas para as configurações globais da conversão de texto em voz.</translation> <translation id="1197088940767939838">Laranja</translation> <translation id="1273314450961659276">Configurações da conversão de texto em voz</translation> -<translation id="1498542103351704084">Configurações de fala do "Selecionar para ouvir" atualizadas</translation> <translation id="1555130319947370107">Azul</translation> <translation id="1666326070478924810">Configurações de Selecionar para ouvir</translation> <translation id="1966649499058910679">Destaque cada palavra à medida que for falada</translation> @@ -12,7 +10,6 @@ <translation id="2714180132046334502">Plano de fundo escuro</translation> <translation id="27349076983469322">Plano de fundo claro</translation> <translation id="335581015389089642">Voz</translation> -<translation id="3784184786832188702">Agora, o Selecionar para ouvir usa configurações globais da conversão de texto em voz.</translation> <translation id="5901630391730855834">Amarelo</translation> <translation id="6017514345406065928">Verde</translation> <translation id="6475604559827479857">Cor para destaque de palavras:</translation>
diff --git a/chrome/browser/resources/chromeos/select_to_speak/strings/select_to_speak_strings_pt-PT.xtb b/chrome/browser/resources/chromeos/select_to_speak/strings/select_to_speak_strings_pt-PT.xtb index 220b54e..d9a2392 100644 --- a/chrome/browser/resources/chromeos/select_to_speak/strings/select_to_speak_strings_pt-PT.xtb +++ b/chrome/browser/resources/chromeos/select_to_speak/strings/select_to_speak_strings_pt-PT.xtb
@@ -1,10 +1,8 @@ <?xml version="1.0" ?> <!DOCTYPE translationbundle> <translationbundle lang="pt-PT"> -<translation id="111880247472081232">As definições da síntese de voz de Selecionar para falar foram migradas para as definições globais da síntese de voz.</translation> <translation id="1197088940767939838">Laranja</translation> <translation id="1273314450961659276">Definições da síntese de voz</translation> -<translation id="1498542103351704084">Definições de voz de Selecionar para falar atualizadas</translation> <translation id="1555130319947370107">Azul</translation> <translation id="1666326070478924810">Definições de Selecionar para ativar voz</translation> <translation id="1966649499058910679">Realçar cada palavra conforme é falada</translation> @@ -12,7 +10,6 @@ <translation id="2714180132046334502">Fundo escuro</translation> <translation id="27349076983469322">Fundo claro</translation> <translation id="335581015389089642">Voz</translation> -<translation id="3784184786832188702">Selecionar para falar utiliza agora as definições globais da síntese de voz.</translation> <translation id="5901630391730855834">Amarelo</translation> <translation id="6017514345406065928">Verde</translation> <translation id="6475604559827479857">Cor para os realces das palavras:</translation>
diff --git a/chrome/browser/resources/chromeos/select_to_speak/strings/select_to_speak_strings_ro.xtb b/chrome/browser/resources/chromeos/select_to_speak/strings/select_to_speak_strings_ro.xtb index 4af2056b..1dc221c 100644 --- a/chrome/browser/resources/chromeos/select_to_speak/strings/select_to_speak_strings_ro.xtb +++ b/chrome/browser/resources/chromeos/select_to_speak/strings/select_to_speak_strings_ro.xtb
@@ -1,10 +1,8 @@ <?xml version="1.0" ?> <!DOCTYPE translationbundle> <translationbundle lang="ro"> -<translation id="111880247472081232">Setările redării vocale a textului pentru Selectați și ascultați au fost migrate la setările globale pentru redarea vocală a textului.</translation> <translation id="1197088940767939838">Portocaliu</translation> <translation id="1273314450961659276">Setări pentru redarea vocală a textului</translation> -<translation id="1498542103351704084">Setările de vorbire pentru Selectați și ascultați au fost actualizate</translation> <translation id="1555130319947370107">Albastru</translation> <translation id="1666326070478924810">Setări „Selectează și ascultă”</translation> <translation id="1966649499058910679">Evidențiază fiecare cuvânt când este rostit</translation> @@ -12,7 +10,6 @@ <translation id="2714180132046334502">Fundal întunecat</translation> <translation id="27349076983469322">Fundal deschis</translation> <translation id="335581015389089642">Voce</translation> -<translation id="3784184786832188702">Selectați și ascultați folosește acum setările globale pentru redarea vocală a textului.</translation> <translation id="5901630391730855834">Galben</translation> <translation id="6017514345406065928">Verde</translation> <translation id="6475604559827479857">Culoare pentru evidențierea cuvintelor:</translation>
diff --git a/chrome/browser/resources/chromeos/select_to_speak/strings/select_to_speak_strings_ru.xtb b/chrome/browser/resources/chromeos/select_to_speak/strings/select_to_speak_strings_ru.xtb index 28b9da0..4b858c3 100644 --- a/chrome/browser/resources/chromeos/select_to_speak/strings/select_to_speak_strings_ru.xtb +++ b/chrome/browser/resources/chromeos/select_to_speak/strings/select_to_speak_strings_ru.xtb
@@ -1,10 +1,8 @@ <?xml version="1.0" ?> <!DOCTYPE translationbundle> <translationbundle lang="ru"> -<translation id="111880247472081232">Настройки озвучивания при нажатии были перенесены в общие настройки озвучивания текста.</translation> <translation id="1197088940767939838">Оранжевый</translation> <translation id="1273314450961659276">Настройки озвучивания текста</translation> -<translation id="1498542103351704084">Настройки озвучивания при нажатии изменены</translation> <translation id="1555130319947370107">Синий</translation> <translation id="1666326070478924810">Настройки озвучивания при нажатии</translation> <translation id="1966649499058910679">Выделять слова по мере озвучивания</translation> @@ -12,7 +10,6 @@ <translation id="2714180132046334502">Темный фон</translation> <translation id="27349076983469322">Светлый фон</translation> <translation id="335581015389089642">Озвучить</translation> -<translation id="3784184786832188702">Для озвучивания при нажатии теперь используются общие настройки озвучивания текста.</translation> <translation id="5901630391730855834">Желтый</translation> <translation id="6017514345406065928">Зеленый</translation> <translation id="6475604559827479857">Цвет, которым будут выделяться слова:</translation>
diff --git a/chrome/browser/resources/chromeos/select_to_speak/strings/select_to_speak_strings_sk.xtb b/chrome/browser/resources/chromeos/select_to_speak/strings/select_to_speak_strings_sk.xtb index 0e61dcd3..609dab6 100644 --- a/chrome/browser/resources/chromeos/select_to_speak/strings/select_to_speak_strings_sk.xtb +++ b/chrome/browser/resources/chromeos/select_to_speak/strings/select_to_speak_strings_sk.xtb
@@ -1,10 +1,8 @@ <?xml version="1.0" ?> <!DOCTYPE translationbundle> <translationbundle lang="sk"> -<translation id="111880247472081232">Vaše nastavenia počúvania vybraného textu a prevodu textu na reč boli migrované na globálne nastavenia prevodu textu na reč.</translation> <translation id="1197088940767939838">Oranžová</translation> <translation id="1273314450961659276">Nastavenia prevodu textu na reč</translation> -<translation id="1498542103351704084">Boli aktualizované nastavenia reči v rámci prevodu textu na reč</translation> <translation id="1555130319947370107">Modrá</translation> <translation id="1666326070478924810">Nastavenia počúvania vybraného textu</translation> <translation id="1966649499058910679">Zvýrazňovať jednotivé vyslovené slová</translation> @@ -12,7 +10,6 @@ <translation id="2714180132046334502">Tmavé pozadie</translation> <translation id="27349076983469322">Svetlé pozadie</translation> <translation id="335581015389089642">Reč</translation> -<translation id="3784184786832188702">Počúvanie vybraného textu teraz používa globálne nastavenia prevodu textu na reč.</translation> <translation id="5901630391730855834">Žltá</translation> <translation id="6017514345406065928">Zelená</translation> <translation id="6475604559827479857">Farba zvýrazňovania slov:</translation>
diff --git a/chrome/browser/resources/chromeos/select_to_speak/strings/select_to_speak_strings_sl.xtb b/chrome/browser/resources/chromeos/select_to_speak/strings/select_to_speak_strings_sl.xtb index afbfcf9..7f68ebd3 100644 --- a/chrome/browser/resources/chromeos/select_to_speak/strings/select_to_speak_strings_sl.xtb +++ b/chrome/browser/resources/chromeos/select_to_speak/strings/select_to_speak_strings_sl.xtb
@@ -1,10 +1,8 @@ <?xml version="1.0" ?> <!DOCTYPE translationbundle> <translationbundle lang="sl"> -<translation id="111880247472081232">Nastavitve pretvorbe besedila v govor v storitvi Izberite in poslušajte so bile premaknjene v globalne nastavitve pretvorbe besedila v govor.</translation> <translation id="1197088940767939838">Oranžna</translation> <translation id="1273314450961659276">Nastavitve pretvorbe besedila v govor</translation> -<translation id="1498542103351704084">Posodobljene nastavitve storitve Izberite in poslušajte</translation> <translation id="1555130319947370107">Modra</translation> <translation id="1666326070478924810">Nastavitve storitve Izberite in poslušajte</translation> <translation id="1966649499058910679">Označite vsako besedo, ko je izgovorjena</translation> @@ -12,7 +10,6 @@ <translation id="2714180132046334502">Temno ozadje</translation> <translation id="27349076983469322">Svetlo ozadje</translation> <translation id="335581015389089642">Speech</translation> -<translation id="3784184786832188702">Storitev Izberite in poslušajte zdaj uporablja globalne nastavitve pretvorbe besedila v govor.</translation> <translation id="5901630391730855834">Rumena</translation> <translation id="6017514345406065928">Zelena</translation> <translation id="6475604559827479857">Barva za označevanje besed:</translation>
diff --git a/chrome/browser/resources/chromeos/select_to_speak/strings/select_to_speak_strings_sr.xtb b/chrome/browser/resources/chromeos/select_to_speak/strings/select_to_speak_strings_sr.xtb index 17d41adb..ce9d56a 100644 --- a/chrome/browser/resources/chromeos/select_to_speak/strings/select_to_speak_strings_sr.xtb +++ b/chrome/browser/resources/chromeos/select_to_speak/strings/select_to_speak_strings_sr.xtb
@@ -1,10 +1,8 @@ <?xml version="1.0" ?> <!DOCTYPE translationbundle> <translationbundle lang="sr"> -<translation id="111880247472081232">Подешавања претварања текста у говор за функцију Изаберите за говор премештене су у глобална подешавања претварања текста у говор.</translation> <translation id="1197088940767939838">Наранџаста</translation> <translation id="1273314450961659276">Подешавања претварања текста у говор</translation> -<translation id="1498542103351704084">Подешавања говора функције Изаберите за говор су ажурирана</translation> <translation id="1555130319947370107">Плава</translation> <translation id="1666326070478924810">Подешавања услуге Изаберите за говор</translation> <translation id="1966649499058910679">Истакните сваку реч док се изгововара</translation> @@ -12,7 +10,6 @@ <translation id="2714180132046334502">Тамна позадина</translation> <translation id="27349076983469322">Светла позадина</translation> <translation id="335581015389089642">Говор</translation> -<translation id="3784184786832188702">Функција Изаберите за говор сада користи глобална подешавања претварања текста у говор.</translation> <translation id="5901630391730855834">Жута</translation> <translation id="6017514345406065928">Зелена</translation> <translation id="6475604559827479857">Боја за истицање речи:</translation>
diff --git a/chrome/browser/resources/chromeos/select_to_speak/strings/select_to_speak_strings_sv.xtb b/chrome/browser/resources/chromeos/select_to_speak/strings/select_to_speak_strings_sv.xtb index a53ce53..86e2fe9 100644 --- a/chrome/browser/resources/chromeos/select_to_speak/strings/select_to_speak_strings_sv.xtb +++ b/chrome/browser/resources/chromeos/select_to_speak/strings/select_to_speak_strings_sv.xtb
@@ -1,10 +1,8 @@ <?xml version="1.0" ?> <!DOCTYPE translationbundle> <translationbundle lang="sv"> -<translation id="111880247472081232">Inställningarna för text-till-tal under Textuppläsning har migrerats till de övergripande inställningarna för text till tal.</translation> <translation id="1197088940767939838">Orange</translation> <translation id="1273314450961659276">Inställningar för text till tal</translation> -<translation id="1498542103351704084">Talinställningarna för Textuppläsning har uppdaterats</translation> <translation id="1555130319947370107">Blå</translation> <translation id="1666326070478924810">Inställningar för Textuppläsning</translation> <translation id="1966649499058910679">Markera orden allt eftersom de läses upp</translation> @@ -12,7 +10,6 @@ <translation id="2714180132046334502">Mörk bakgrund</translation> <translation id="27349076983469322">Ljus bakgrund</translation> <translation id="335581015389089642">Tal</translation> -<translation id="3784184786832188702">Nu används de övergripande inställningarna för text till tal med Textuppläsning.</translation> <translation id="5901630391730855834">Gul</translation> <translation id="6017514345406065928">Grön</translation> <translation id="6475604559827479857">Markera ord med färgen:</translation>
diff --git a/chrome/browser/resources/chromeos/select_to_speak/strings/select_to_speak_strings_sw.xtb b/chrome/browser/resources/chromeos/select_to_speak/strings/select_to_speak_strings_sw.xtb index f373e097..48d1b9a 100644 --- a/chrome/browser/resources/chromeos/select_to_speak/strings/select_to_speak_strings_sw.xtb +++ b/chrome/browser/resources/chromeos/select_to_speak/strings/select_to_speak_strings_sw.xtb
@@ -1,10 +1,8 @@ <?xml version="1.0" ?> <!DOCTYPE translationbundle> <translationbundle lang="sw"> -<translation id="111880247472081232">Mipangilio yako ya Chagua ili Izungumze ya Ubadilishaji wa Maandishi kwenda Usemi imehamishiwa kwenye mipangilio ya jumla ya Ubadilishaji wa Maandishi kwenda Usemi.</translation> <translation id="1197088940767939838">Rangi ya machungwa</translation> <translation id="1273314450961659276">Mipangilio ya Ubadilishaji wa Maandishi kwenda Usemi</translation> -<translation id="1498542103351704084">Imesasisha mipangilio ya kipengele cha Chagua ili Izungumze</translation> <translation id="1555130319947370107">Samawati</translation> <translation id="1666326070478924810">Mipangilio ya Chagua ili Izungumze</translation> <translation id="1966649499058910679">Angazia kila neno wakati linatamkwa</translation> @@ -12,7 +10,6 @@ <translation id="2714180132046334502">Mandhari-nyuma meusi</translation> <translation id="27349076983469322">Mandhari-nyuma meupe</translation> <translation id="335581015389089642">Usemi</translation> -<translation id="3784184786832188702">Sasa kipengele cha Chagua ili Izungumze kinatumia mipangilio ya jumla ya Ubadilishaji wa Maandishi kwenda Usemi.</translation> <translation id="5901630391730855834">Manjano</translation> <translation id="6017514345406065928">Kijani</translation> <translation id="6475604559827479857">Rangi ya maneno yanayoangaziwa:</translation>
diff --git a/chrome/browser/resources/chromeos/select_to_speak/strings/select_to_speak_strings_ta.xtb b/chrome/browser/resources/chromeos/select_to_speak/strings/select_to_speak_strings_ta.xtb index e408494..0d855574 100644 --- a/chrome/browser/resources/chromeos/select_to_speak/strings/select_to_speak_strings_ta.xtb +++ b/chrome/browser/resources/chromeos/select_to_speak/strings/select_to_speak_strings_ta.xtb
@@ -1,10 +1,8 @@ <?xml version="1.0" ?> <!DOCTYPE translationbundle> <translationbundle lang="ta"> -<translation id="111880247472081232">உங்கள் ‘பேசும் திரை' அம்சத்தின் ‘உரையிலிருந்து பேச்சு' அமைப்புகள், பொதுவான ‘உரையிலிருந்து பேச்சு' அமைப்புகளுக்கு மாற்றப்பட்டன.</translation> <translation id="1197088940767939838">ஆரஞ்சு</translation> <translation id="1273314450961659276">’உரையிலிருந்து பேச்சு' அமைப்புகள்</translation> -<translation id="1498542103351704084">‘பேசும் திரை’ அம்சத்தின் பேச்சு அமைப்புகள் புதுப்பிக்கப்பட்டன</translation> <translation id="1555130319947370107">நீலம்</translation> <translation id="1666326070478924810">பேசும் திரை அமைப்புகள்</translation> <translation id="1966649499058910679">ஒவ்வொரு சொல்லையும் கூறும்போது தனிப்படுத்திக் காட்டு</translation> @@ -12,7 +10,6 @@ <translation id="2714180132046334502">அடர்த்தியான பின்புலம்</translation> <translation id="27349076983469322">வெளிர் பின்புலம்</translation> <translation id="335581015389089642">பேச்சு</translation> -<translation id="3784184786832188702">‘பேசும் திரை' அம்சம் இப்போது பொதுவான ‘உரையிலிருந்து பேச்சு’ அமைப்புகளைப் பயன்படுத்துகிறது.</translation> <translation id="5901630391730855834">மஞ்சள்</translation> <translation id="6017514345406065928">பச்சை</translation> <translation id="6475604559827479857">சொல்லைத் தனிப்படுத்திக் காட்டுவதற்கான வண்ணம்:</translation>
diff --git a/chrome/browser/resources/chromeos/select_to_speak/strings/select_to_speak_strings_te.xtb b/chrome/browser/resources/chromeos/select_to_speak/strings/select_to_speak_strings_te.xtb index 0690ca8a..8532415 100644 --- a/chrome/browser/resources/chromeos/select_to_speak/strings/select_to_speak_strings_te.xtb +++ b/chrome/browser/resources/chromeos/select_to_speak/strings/select_to_speak_strings_te.xtb
@@ -1,10 +1,8 @@ <?xml version="1.0" ?> <!DOCTYPE translationbundle> <translationbundle lang="te"> -<translation id="111880247472081232">మీ వినడానికి ఎంచుకోండి వచనం నుండి ప్రసంగం సెట్టింగ్లు అంతర్జాతీయ వచనం నుండి ప్రసంగం సెట్టింగ్లకు తరలించబడ్డాయి.</translation> <translation id="1197088940767939838">నారింజ రంగు</translation> <translation id="1273314450961659276">వచనం నుండి ప్రసంగం సెట్టింగ్లు</translation> -<translation id="1498542103351704084">వినడానికి ఎంచుకోండి ప్రసంగం సెట్టింగ్లు అప్డేట్ చేయబడ్డాయి</translation> <translation id="1555130319947370107">నీలం</translation> <translation id="1666326070478924810">వినడానికి-ఎంచుకోండి సెట్టింగ్లు</translation> <translation id="1966649499058910679">ప్రతి పదాన్ని చదివినప్పుడు దానిని హైలైట్ చేయి</translation> @@ -12,7 +10,6 @@ <translation id="2714180132046334502">ముదురు నేపథ్యం</translation> <translation id="27349076983469322">తేలికపాటి నేపథ్యం</translation> <translation id="335581015389089642">ప్రసంగం</translation> -<translation id="3784184786832188702">వినడానికి ఎంచుకోండి ఇప్పుడు అంతర్జాతీయ వచనం నుండి ప్రసంగం సెట్టింగ్లను ఉపయోగిస్తుంది.</translation> <translation id="5901630391730855834">పసుపు</translation> <translation id="6017514345406065928">ఆకుపచ్చ</translation> <translation id="6475604559827479857">పదం హైలైట్ల కోసం రంగు:</translation>
diff --git a/chrome/browser/resources/chromeos/select_to_speak/strings/select_to_speak_strings_th.xtb b/chrome/browser/resources/chromeos/select_to_speak/strings/select_to_speak_strings_th.xtb index 8a0373f..2a18b77 100644 --- a/chrome/browser/resources/chromeos/select_to_speak/strings/select_to_speak_strings_th.xtb +++ b/chrome/browser/resources/chromeos/select_to_speak/strings/select_to_speak_strings_th.xtb
@@ -1,10 +1,8 @@ <?xml version="1.0" ?> <!DOCTYPE translationbundle> <translationbundle lang="th"> -<translation id="111880247472081232">การตั้งค่าการอ่านออกเสียงข้อความของ "เลือกเพื่อให้อ่าน" ได้ย้ายไปอยู่ที่การตั้งค่าการอ่านออกเสียงข้อความส่วนกลางแล้ว</translation> <translation id="1197088940767939838">สีส้ม</translation> <translation id="1273314450961659276">การตั้งค่าการอ่านออกเสียงข้อความ</translation> -<translation id="1498542103351704084">อัปเดตการตั้งค่าการอ่านออกเสียงข้อความของ "เลือกเพื่อให้อ่าน" แล้ว</translation> <translation id="1555130319947370107">สีน้ำเงิน</translation> <translation id="1666326070478924810">การตั้งค่าการเลือกเพื่อให้อ่าน</translation> <translation id="1966649499058910679">ไฮไลต์แต่ละคำในขณะที่พูด</translation> @@ -12,7 +10,6 @@ <translation id="2714180132046334502">พื้นหลังสีเข้ม</translation> <translation id="27349076983469322">พื้นหลังสีสว่าง</translation> <translation id="335581015389089642">คำพูด</translation> -<translation id="3784184786832188702">ตอนนี้คุณจะใช้การตั้งค่าการอ่านออกเสียงข้อความส่วนกลางแทน "เลือกเพื่อให้อ่าน"</translation> <translation id="5901630391730855834">สีเหลือง</translation> <translation id="6017514345406065928">สีเขียว</translation> <translation id="6475604559827479857">สีสำหรับการไฮไลต์คำ:</translation>
diff --git a/chrome/browser/resources/chromeos/select_to_speak/strings/select_to_speak_strings_tr.xtb b/chrome/browser/resources/chromeos/select_to_speak/strings/select_to_speak_strings_tr.xtb index 1eb4b620..5d413880 100644 --- a/chrome/browser/resources/chromeos/select_to_speak/strings/select_to_speak_strings_tr.xtb +++ b/chrome/browser/resources/chromeos/select_to_speak/strings/select_to_speak_strings_tr.xtb
@@ -1,10 +1,8 @@ <?xml version="1.0" ?> <!DOCTYPE translationbundle> <translationbundle lang="tr"> -<translation id="111880247472081232">Seç ve Dinle'deki Metin Okuma ayarlarınız genel Metin Okuma ayarlarına taşınmıştır.</translation> <translation id="1197088940767939838">Turuncu</translation> <translation id="1273314450961659276">Metin Okuma ayarları</translation> -<translation id="1498542103351704084">Seç ve Dinle konuşma ayarları güncellendi</translation> <translation id="1555130319947370107">Mavi</translation> <translation id="1666326070478924810">Seç ve Dinle Ayarları</translation> <translation id="1966649499058910679">Her kelimeyi söylenirken vurgula</translation> @@ -12,7 +10,6 @@ <translation id="2714180132046334502">Koyu renkli arka plan</translation> <translation id="27349076983469322">Açık renkli arka plan</translation> <translation id="335581015389089642">Konuşma</translation> -<translation id="3784184786832188702">Seç ve dinle artık genel Metin Okuma ayarlarını kullanıyor.</translation> <translation id="5901630391730855834">Sarı</translation> <translation id="6017514345406065928">Yeşil</translation> <translation id="6475604559827479857">Kelime vurgulama rengi:</translation>
diff --git a/chrome/browser/resources/chromeos/select_to_speak/strings/select_to_speak_strings_uk.xtb b/chrome/browser/resources/chromeos/select_to_speak/strings/select_to_speak_strings_uk.xtb index 342ebb7c..da8d626 100644 --- a/chrome/browser/resources/chromeos/select_to_speak/strings/select_to_speak_strings_uk.xtb +++ b/chrome/browser/resources/chromeos/select_to_speak/strings/select_to_speak_strings_uk.xtb
@@ -1,10 +1,8 @@ <?xml version="1.0" ?> <!DOCTYPE translationbundle> <translationbundle lang="uk"> -<translation id="111880247472081232">Ваші налаштування синтезу мовлення для функції читання з екрана перенесено до загальних налаштувань.</translation> <translation id="1197088940767939838">Оранжевий</translation> <translation id="1273314450961659276">Налаштування синтезу мовлення</translation> -<translation id="1498542103351704084">Налаштування синтезу мовлення оновлено</translation> <translation id="1555130319947370107">Синій</translation> <translation id="1666326070478924810">Налаштування служби Читання з екрана</translation> <translation id="1966649499058910679">Виділяти кожне слово, яке озвучується</translation> @@ -12,7 +10,6 @@ <translation id="2714180132046334502">Темний фон</translation> <translation id="27349076983469322">Світлий фон</translation> <translation id="335581015389089642">Speech</translation> -<translation id="3784184786832188702">Функція читання з екрана зараз використовує загальні налаштування синтезу мовлення.</translation> <translation id="5901630391730855834">Жовтий</translation> <translation id="6017514345406065928">Зелений</translation> <translation id="6475604559827479857">Колір виділеного слова:</translation>
diff --git a/chrome/browser/resources/chromeos/select_to_speak/strings/select_to_speak_strings_vi.xtb b/chrome/browser/resources/chromeos/select_to_speak/strings/select_to_speak_strings_vi.xtb index 03607d1..3d56c3c 100644 --- a/chrome/browser/resources/chromeos/select_to_speak/strings/select_to_speak_strings_vi.xtb +++ b/chrome/browser/resources/chromeos/select_to_speak/strings/select_to_speak_strings_vi.xtb
@@ -1,10 +1,8 @@ <?xml version="1.0" ?> <!DOCTYPE translationbundle> <translationbundle lang="vi"> -<translation id="111880247472081232">Tùy chọn cài đặt Văn bản sang lời nói của tính năng Chọn để nói đã được chuyển sang tùy chọn cài đặt Văn bản sang lời nói chung.</translation> <translation id="1197088940767939838">Màu cam</translation> <translation id="1273314450961659276">Cài đặt Văn bản sang lời nói</translation> -<translation id="1498542103351704084">Đã cập nhật tùy chọn cài đặt giọng nói của tính năng Chọn để nói</translation> <translation id="1555130319947370107">Xanh lam</translation> <translation id="1666326070478924810">Cài đặt chọn để nói</translation> <translation id="1966649499058910679">Đánh đấu từng từ khi từ được đọc</translation> @@ -12,7 +10,6 @@ <translation id="2714180132046334502">Nền tối</translation> <translation id="27349076983469322">Nền sáng</translation> <translation id="335581015389089642">Giọng nói</translation> -<translation id="3784184786832188702">Tính năng Chọn để nói hiện sử dụng tùy chọn cài đặt Văn bản sang lời nói chung.</translation> <translation id="5901630391730855834">Vàng</translation> <translation id="6017514345406065928">Xanh lục</translation> <translation id="6475604559827479857">Màu đánh dấu cho từ:</translation>
diff --git a/chrome/browser/resources/chromeos/select_to_speak/strings/select_to_speak_strings_zh-CN.xtb b/chrome/browser/resources/chromeos/select_to_speak/strings/select_to_speak_strings_zh-CN.xtb index cedc977..3fe619f8 100644 --- a/chrome/browser/resources/chromeos/select_to_speak/strings/select_to_speak_strings_zh-CN.xtb +++ b/chrome/browser/resources/chromeos/select_to_speak/strings/select_to_speak_strings_zh-CN.xtb
@@ -1,10 +1,8 @@ <?xml version="1.0" ?> <!DOCTYPE translationbundle> <translationbundle lang="zh-CN"> -<translation id="111880247472081232">您的随选朗读文字转语音设置已迁移至全局文字转语音设置。</translation> <translation id="1197088940767939838">橙色</translation> <translation id="1273314450961659276">文字转语音设置</translation> -<translation id="1498542103351704084">随选朗读语音设置已更新</translation> <translation id="1555130319947370107">蓝色</translation> <translation id="1666326070478924810">“随选朗读”设置</translation> <translation id="1966649499058910679">突出显示每个正被读出的字词</translation> @@ -12,7 +10,6 @@ <translation id="2714180132046334502">深色背景</translation> <translation id="27349076983469322">浅色背景</translation> <translation id="335581015389089642">语音</translation> -<translation id="3784184786832188702">随选朗读功能现在使用全局文字转语音设置。</translation> <translation id="5901630391730855834">黄色</translation> <translation id="6017514345406065928">绿色</translation> <translation id="6475604559827479857">字词的突出显示颜色:</translation>
diff --git a/chrome/browser/resources/chromeos/select_to_speak/strings/select_to_speak_strings_zh-TW.xtb b/chrome/browser/resources/chromeos/select_to_speak/strings/select_to_speak_strings_zh-TW.xtb index c308940..42c4653 100644 --- a/chrome/browser/resources/chromeos/select_to_speak/strings/select_to_speak_strings_zh-TW.xtb +++ b/chrome/browser/resources/chromeos/select_to_speak/strings/select_to_speak_strings_zh-TW.xtb
@@ -1,10 +1,8 @@ <?xml version="1.0" ?> <!DOCTYPE translationbundle> <translationbundle lang="zh-TW"> -<translation id="111880247472081232">你的隨選朗讀文字轉語音設定已轉移至全域文字轉語音設定。</translation> <translation id="1197088940767939838">橘色</translation> <translation id="1273314450961659276">文字轉語音設定</translation> -<translation id="1498542103351704084">隨選朗讀語音設定已更新</translation> <translation id="1555130319947370107">藍色</translation> <translation id="1666326070478924810">隨選朗讀設定</translation> <translation id="1966649499058910679">醒目顯示每個朗讀的字詞</translation> @@ -12,7 +10,6 @@ <translation id="2714180132046334502">深色背景</translation> <translation id="27349076983469322">淺色背景</translation> <translation id="335581015389089642">語音</translation> -<translation id="3784184786832188702">隨選朗讀功能現在使用全域文字轉語音設定。</translation> <translation id="5901630391730855834">黃色</translation> <translation id="6017514345406065928">綠色</translation> <translation id="6475604559827479857">文字醒目顯示顏色:</translation>
diff --git a/chrome/browser/resources/local_ntp/custom_backgrounds.css b/chrome/browser/resources/local_ntp/custom_backgrounds.css index 9092b67..154208af 100644 --- a/chrome/browser/resources/local_ntp/custom_backgrounds.css +++ b/chrome/browser/resources/local_ntp/custom_backgrounds.css
@@ -240,6 +240,7 @@ height: 51px; line-height: 52px; text-align: center; + user-select: none; } #bg-sel-back { @@ -330,28 +331,36 @@ height: 64px; padding-left: 0; position: absolute; + user-select: none; width: 100%; } .bg-sel-footer-button { + border: none; border-radius: 4px; bottom: 16px; font-family: 'Roboto', arial, sans-serif; - font-size: 13px; + font-size: 12px; font-weight: 500; + height: 32px; line-height: normal; + padding: 0 16px; position: absolute; text-align: center; + transition-duration: 200ms; + transition-property: background-color, color, box-shadow, border; + transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); vertical-align: middle; } +.bg-sel-footer-button:disabled { + transition: none; +} + #bg-sel-footer-done { background-color: rgb(241, 243, 244); color: rgb(128, 134, 139); - height: 24px; - padding-top: 9px; right: 16px; - width: 62px; } html[dir=rtl] #bg-sel-footer-done { @@ -360,14 +369,11 @@ } #bg-sel-footer-cancel { - background-color: #fff; + background-color: white; border: 1px solid rgb(218, 220, 224); color: rgb(26, 115, 232); - height: 23px; margin-right: 8px; - padding-top: 8px; right: 78px; - width: 66px; } html[dir=rtl] #bg-sel-footer-cancel { @@ -377,23 +383,31 @@ } #bg-sel-footer-cancel:hover { - background-color: rgb(154, 160, 166, 0.04); + background-color: rgba(66, 133, 244, 0.04); + border-color: rgb(210, 227, 252); } #bg-sel-footer-cancel:active { - background-color: #fff; - box-shadow: 0 1px 1px 0 rgba(60, 64, 67, 0.3), 0 1px 1px 1px rgba(60, 64, 67, 0.15); - outline: none; + background-color: white; + border-color: white; + box-shadow: 0 1px 2px 0 rgba(60, 64, 67, 0.3), + 0 3px 6px 2px rgba(60, 64, 67, 0.15); } #bg-sel-footer-done.done-available:active { - box-shadow: 0 1px 2px 0 rgba(60, 64, 67, 0.3), 0 2px 6px 2px rgba(60, 64, 67, 0.15); - outline: none; + box-shadow: 0 1px 2px 0 rgba(66, 133, 244, 0.3), + 0 3px 6px 2px rgba(66, 133, 244, 0.15); +} + +#bg-sel-footer-done.done-available:hover { + background-color: rgb(41, 123, 231); + box-shadow: 0 1px 2px 0 rgba(66, 133, 244, 0.3), + 0 1px 3px 1px rgba(66, 133, 244, 0.15); } #bg-sel-footer-done.done-available { background-color: rgb(26, 115, 232); - color: #FFF; + color: white; } #bg-sel-footer-toggle-text {
diff --git a/chrome/browser/resources/local_ntp/custom_backgrounds.js b/chrome/browser/resources/local_ntp/custom_backgrounds.js index e8d8861..20c56886 100644 --- a/chrome/browser/resources/local_ntp/custom_backgrounds.js +++ b/chrome/browser/resources/local_ntp/custom_backgrounds.js
@@ -38,8 +38,8 @@ NTP_CUSTOMIZE_CHROME_BACKGROUND_SELECT_IMAGE: 48, // 'Cancel' was clicked in the 'Chrome backgrounds' dialog. NTP_CUSTOMIZE_CHROME_BACKGROUND_CANCEL: 49, - // 'Done' was clicked in the 'Chrome backgrounds' dialog. - NTP_CUSTOMIZE_CHROME_BACKGROUND_DONE: 50, + // NOTE: NTP_CUSTOMIZE_CHROME_BACKGROUND_DONE (50) is logged on the backend + // when the selected image is saved. // 'Cancel' was clicked in the 'Upload an image' dialog. NTP_CUSTOMIZE_LOCAL_IMAGE_CANCEL: 51, // 'Done' was clicked in the 'Upload an image' dialog. @@ -296,8 +296,6 @@ customBackgrounds.closeCollectionDialog($(customBackgrounds.IDS.MENU)); window.chrome.embeddedSearch.newTabPage.setBackgroundURLWithAttributions( url, attributionLine1, attributionLine2, attributionActionUrl); - ntpApiHandle.logEvent( - BACKGROUND_CUSTOMIZATION_LOG_TYPE.NTP_CUSTOMIZE_CHROME_BACKGROUND_DONE); }; /** @@ -421,6 +419,8 @@ tile.id = 'coll_tile_' + i; tile.dataset.tile_num = i; tile.tabIndex = -1; + // Accessibility support for screen readers. + tile.setAttribute('role', 'button'); var title = document.createElement('div'); title.classList.add(customBackgrounds.CLASSES.COLLECTION_TITLE); @@ -578,6 +578,8 @@ for (var i = 0; i < imageData.length; ++i) { var tile = document.createElement('div'); tile.classList.add(customBackgrounds.CLASSES.COLLECTION_TILE); + // Accessibility support for screen readers. + tile.setAttribute('role', 'button'); // Set the background image, the name of the source variable differs // depending on if it's coming from Chrome Backgrounds or Google Photos. @@ -643,7 +645,8 @@ tile.onclick = function(event) { let clickCount = event.detail; - if (clickCount == 1) { + // Control + option + space will fire the onclick event with 0 clickCount. + if (clickCount <= 1) { tileInteraction(event); } else if (clickCount == 2 && customBackgrounds.selectedTile == this) { customBackgrounds.setBackground(this.dataset.url, @@ -772,8 +775,6 @@ // Edit gear icon interaction events. let editBackgroundInteraction = function() { editDialog.showModal(); - ntpApiHandle.logEvent(BACKGROUND_CUSTOMIZATION_LOG_TYPE - .NTP_CUSTOMIZE_CHROME_BACKGROUNDS_CLICKED); }; $(customBackgrounds.IDS.EDIT_BG).onclick = function(event) { editDialog.classList.add(customBackgrounds.CLASSES.MOUSE_NAV); @@ -977,6 +978,8 @@ customBackgrounds.handleError(coll_errors); } }; + ntpApiHandle.logEvent(BACKGROUND_CUSTOMIZATION_LOG_TYPE + .NTP_CUSTOMIZE_CHROME_BACKGROUNDS_CLICKED); }; $(customBackgrounds.IDS.DEFAULT_WALLPAPERS).onclick = function() { $(customBackgrounds.IDS.MENU)
diff --git a/chrome/browser/resources/local_ntp/local_ntp.html b/chrome/browser/resources/local_ntp/local_ntp.html index 9768fc6..489280c 100644 --- a/chrome/browser/resources/local_ntp/local_ntp.html +++ b/chrome/browser/resources/local_ntp/local_ntp.html
@@ -128,8 +128,8 @@ <span class="toggle"></span> </label> <div id="bg-sel-refresh-text"></div> - <div id="bg-sel-footer-cancel" class="bg-sel-footer-button ripple" tabindex="0"></div> - <div id="bg-sel-footer-done" class="bg-sel-footer-button ripple" tabindex="-1"></div> + <button id="bg-sel-footer-cancel" class="bg-sel-footer-button ripple" tabindex="0"></button> + <button id="bg-sel-footer-done" class="bg-sel-footer-button ripple" tabindex="-1"></button> </div> </dialog>
diff --git a/chrome/browser/resources/local_ntp/local_ntp.js b/chrome/browser/resources/local_ntp/local_ntp.js index 2ae9ce02..04c9623 100644 --- a/chrome/browser/resources/local_ntp/local_ntp.js +++ b/chrome/browser/resources/local_ntp/local_ntp.js
@@ -175,21 +175,10 @@ // The One Google Bar was shown. NTP_ONE_GOOGLE_BAR_SHOWN: 37, - // The background has been customized. - NTP_BACKGROUND_CUSTOMIZED: 38, - // Shortcuts have been customized. - NTP_SHORTCUT_CUSTOMIZED: 39, - // 'Remove' was clicked in the 'Edit shortcut' dialog. - NTP_CUSTOMIZE_SHORTCUT_REMOVE: 53, // 'Cancel' was clicked in the 'Edit shortcut' dialog. - NTP_CUSTOMIZE_SHORTCUT_CANCEL: 54, // 'Done' was clicked in the 'Edit shortcut' dialog. NTP_CUSTOMIZE_SHORTCUT_DONE: 55, - // 'Undo' was clicked in the message pop-up. - NTP_CUSTOMIZE_SHORTCUT_UNDO: 56, - // 'Restore default shortcuts' was clicked in the message pop-up. - NTP_CUSTOMIZE_SHORTCUT_RESTORE_ALL: 57, }; @@ -338,7 +327,6 @@ setCustomThemeStyle(info); if (info.customBackgroundConfigured) { - ntpApiHandle.logEvent(LOG_TYPE.NTP_BACKGROUND_CUSTOMIZED); var imageWithOverlay = [ customBackgrounds.CUSTOM_BACKGROUND_OVERLAY, 'url(' + info.imageUrl + ')' ].join(',').trim(); @@ -575,7 +563,6 @@ */ function onUpdateCustomLinkDone(success) { showNotification(configData.translatedStrings.linkEditedMsg); - ntpApiHandle.logEvent(LOG_TYPE.NTP_CUSTOMIZE_SHORTCUT_DONE); } @@ -587,7 +574,6 @@ */ function onDeleteCustomLinkDone(success) { showNotification(configData.translatedStrings.linkRemovedMsg); - ntpApiHandle.logEvent(LOG_TYPE.NTP_CUSTOMIZE_SHORTCUT_REMOVE); } @@ -656,7 +642,6 @@ hideNotification(); if (configData.isCustomLinksEnabled) { ntpApiHandle.undoCustomLinkAction(); - ntpApiHandle.logEvent(LOG_TYPE.NTP_CUSTOMIZE_SHORTCUT_UNDO); } else if (lastBlacklistedTile != null) { ntpApiHandle.undoMostVisitedDeletion(lastBlacklistedTile); } @@ -671,7 +656,6 @@ hideNotification(); if (configData.isCustomLinksEnabled) { ntpApiHandle.resetCustomLinks(); - ntpApiHandle.logEvent(LOG_TYPE.NTP_CUSTOMIZE_SHORTCUT_RESTORE_ALL); } else { ntpApiHandle.undoAllMostVisitedDeletions(); } @@ -777,9 +761,6 @@ }; } if (configData.isCustomLinksEnabled) { - if (args.showRestoreDefault) { - ntpApiHandle.logEvent(LOG_TYPE.NTP_SHORTCUT_CUSTOMIZED); - } $(customBackgrounds.IDS.CUSTOM_LINKS_RESTORE_DEFAULT) .classList.toggle( customBackgrounds.CLASSES.OPTION_DISABLED,
diff --git a/chrome/browser/resources/local_ntp/most_visited_single.js b/chrome/browser/resources/local_ntp/most_visited_single.js index 4100061..72886ff 100644 --- a/chrome/browser/resources/local_ntp/most_visited_single.js +++ b/chrome/browser/resources/local_ntp/most_visited_single.js
@@ -61,6 +61,8 @@ // images). NTP_ALL_TILES_RECEIVED: 12, + // Shortcuts have been customized. + NTP_SHORTCUT_CUSTOMIZED: 39, // The 'Add shortcut' link was clicked. NTP_CUSTOMIZE_ADD_SHORTCUT_CLICKED: 44, // The 'Edit shortcut' link was clicked. @@ -211,6 +213,12 @@ if (loadedCounter <= 0) { swapInNewTiles(); logEvent(LOG_TYPE.NTP_ALL_TILES_LOADED); + // Note that it's easiest to capture this when all custom links are loaded, + // rather than when the impression for each link is logged. + if (isCustomLinksEnabled && tilesAreCustomLinks) { + chrome.embeddedSearch.newTabPage.logEvent( + LOG_TYPE.NTP_SHORTCUT_CUSTOMIZED); + } // Tell the parent page whether to show the restore default shortcuts option // in the menu. window.parent.postMessage(
diff --git a/chrome/browser/resources/settings/multidevice_page/multidevice_feature_item.html b/chrome/browser/resources/settings/multidevice_page/multidevice_feature_item.html index 3a79427..a72239e 100644 --- a/chrome/browser/resources/settings/multidevice_page/multidevice_feature_item.html +++ b/chrome/browser/resources/settings/multidevice_page/multidevice_feature_item.html
@@ -7,16 +7,19 @@ <link rel="import" href="../icons.html"> <link rel="import" href="../route.html"> <link rel="import" href="../settings_shared_css.html"> +<link rel="import" href="../settings_vars_css.html"> <dom-module id="settings-multidevice-feature-item"> <template> <style include="settings-shared"> - iron-icon { - padding: 2px; + #card { + border-top: var(--settings-separator-line); + border-top-style: var(--feature-item-border-top-style, solid); + padding: 0; } - #item-text-container { - padding-inline-start: 18px; + iron-icon { + padding: 2px; } </style> <div id="card" @@ -33,8 +36,8 @@ </div> <template is="dom-if" if="[[hasSubpageClickHandler_(subpageRoute)]]"> <paper-icon-button-light class="subpage-arrow"> - <button aria-label="[[featureName]]" - aria-describedby="featureSecondary"></button> + <button aria-label="[[featureName]]" + aria-describedby="featureSecondary"></button> </paper-icon-button-light> <div class="separator"></div> </template>
diff --git a/chrome/browser/resources/settings/multidevice_page/multidevice_page.html b/chrome/browser/resources/settings/multidevice_page/multidevice_page.html index 53b49fa..cb2e46d 100644 --- a/chrome/browser/resources/settings/multidevice_page/multidevice_page.html +++ b/chrome/browser/resources/settings/multidevice_page/multidevice_page.html
@@ -38,8 +38,8 @@ <template is="dom-if" if="[[doesClickOpenSubpage_(pageContentData)]]"> <paper-icon-button-light class="subpage-arrow"> - <button aria-label="[[getLabelText_(pageContentData)]]" - aria-describedby="mutltideviceSubLabel"></button> + <button aria-label="[[getLabelText_(pageContentData)]]" + aria-describedby="mutltideviceSubLabel"></button> </paper-icon-button-light> </template> <div class="separator"></div>
diff --git a/chrome/browser/resources/settings/multidevice_page/multidevice_subpage.html b/chrome/browser/resources/settings/multidevice_page/multidevice_subpage.html index 79e86fc..c777e1aa 100644 --- a/chrome/browser/resources/settings/multidevice_page/multidevice_subpage.html +++ b/chrome/browser/resources/settings/multidevice_page/multidevice_subpage.html
@@ -3,6 +3,7 @@ <link rel="import" href="chrome://resources/html/cr.html"> <link rel="import" href="chrome://resources/html/i18n_behavior.html"> <link rel="import" href="chrome://resources/polymer/v1_0/paper-button/paper-button.html"> +<link rel="import" href="chrome://resources/polymer/v1_0/paper-icon-button/paper-icon-button-light.html"> <link rel="import" href="../i18n_setup.html"> <link rel="import" href="../prefs/prefs_behavior.html"> <link rel="import" href="../route.html"> @@ -15,13 +16,25 @@ <dom-module id="settings-multidevice-subpage"> <template> <style include="settings-shared iron-flex"> + settings-multidevice-feature-item:first-of-type { + --feature-item-border-top-style: none; + } + #status-text-container[enabled] { color: var(--google-green-500); } - .feature-item-container { - margin-inline-end: var(--settings-box-row-padding); - margin-inline-start: var(--settings-box-row-indent); + #feature-items-container, + #forget-device-container { + @apply(--settings-list-frame-padding); + } + + #forget-device-container { + border-top: var(--settings-separator-line); + } + + #forget-device { + padding: 0; } </style> <div class="settings-box first"> @@ -36,13 +49,13 @@ <template is="dom-if" if="[[shouldShowIndividualFeatures_(pageContentData)]]" restamp> - <div class="feature-item-container"> + <div id="feature-items-container"> <settings-multidevice-feature-item id="smart-lock-item" icon-name="settings:smart-lock" subpage-route="[[routes.LOCK_SCREEN]]" feature-name="$i18n{multideviceSmartLockItemTitle}" feature-summary-html="$i18n{multideviceSmartLockItemSummary}"> - <div slot="feature-contoller"> + <div slot="feature-controller"> <!-- TODO (jordynass): Change the pref property to the pref controlling Easy Unlock and make sure it's effectively password protected. --> @@ -74,6 +87,23 @@ </settings-multidevice-feature-item> </div> </template> + <div id="forget-device-container"> + <div id="forget-device" + class="settings-box two-line first" + on-click="handleForgetDeviceClick_" + actionable> + <div class="start"> + $i18n{multideviceForgetDevice} + <div class="secondary" id="multideviceForgetDeviceSummary"> + $i18n{multideviceForgetDeviceSummary} + </div> + </div> + <paper-icon-button-light class="subpage-arrow"> + <button aria-label="$i18n{multideviceForgetDevice}" + aria-describedby="multideviceForgetDeviceSummary"></button> + </paper-icon-button-light> + </div> + </div> </template> <script src="multidevice_subpage.js"></script> </dom-module>
diff --git a/chrome/browser/resources/settings/multidevice_page/multidevice_subpage.js b/chrome/browser/resources/settings/multidevice_page/multidevice_subpage.js index f0d55143..41ed5b21 100644 --- a/chrome/browser/resources/settings/multidevice_page/multidevice_subpage.js +++ b/chrome/browser/resources/settings/multidevice_page/multidevice_subpage.js
@@ -53,6 +53,12 @@ settings.MultiDeviceSettingsMode.HOST_SET_VERIFIED; }, + /** @private */ + handleForgetDeviceClick_: function() { + // TODO(jordynass): Have this navigate to the route for dialog once it is + // built. + }, + /** * @return {string} * @private
diff --git a/chrome/browser/resources/settings/printing_page/cups_edit_printer_dialog.html b/chrome/browser/resources/settings/printing_page/cups_edit_printer_dialog.html index 6ac1df6..4c88679 100644 --- a/chrome/browser/resources/settings/printing_page/cups_edit_printer_dialog.html +++ b/chrome/browser/resources/settings/printing_page/cups_edit_printer_dialog.html
@@ -2,6 +2,7 @@ <link rel="import" href="chrome://resources/cr_elements/cr_input/cr_input.html"> <link rel="import" href="chrome://resources/cr_elements/cr_scrollable_behavior.html"> +<link rel="import" href="chrome://resources/cr_elements/cr_searchable_drop_down/cr_searchable_drop_down.html"> <link rel="import" href="chrome://resources/polymer/v1_0/paper-button/paper-button.html"> <link rel="import" href="cups_add_printer_dialog_util.html"> <link rel="import" href="cups_printer_shared_css.html"> @@ -82,16 +83,16 @@ </cr-input> </div> <div class="settings-box two-line"> - <drop-down-search-box items="[[manufacturerList]]" + <cr-searchable-drop-down items="[[manufacturerList]]" label="$i18n{printerManufacturer}" value="{{activePrinter.ppdManufacturer}}"> - </drop-down-search-box> + </cr-searchable-drop-down> </div> <div class="settings-box two-line"> - <drop-down-search-box items="[[modelList]]" + <cr-searchable-drop-down items="[[modelList]]" label="$i18n{printerModel}" value="{{activePrinter.ppdModel}}"> - </drop-down-search-box> + </cr-searchable-drop-down> </div> <div class="settings-box two-line last"> <cr-input class="browse-file-input" readonly tabindex="-1"
diff --git a/chrome/browser/resources/webauthn/2x/ble.png b/chrome/browser/resources/webauthn/2x/ble.png new file mode 100644 index 0000000..0e85c0b7 --- /dev/null +++ b/chrome/browser/resources/webauthn/2x/ble.png Binary files differ
diff --git a/chrome/browser/resources/webauthn/2x/ble_name.png b/chrome/browser/resources/webauthn/2x/ble_name.png new file mode 100644 index 0000000..3942c4f --- /dev/null +++ b/chrome/browser/resources/webauthn/2x/ble_name.png Binary files differ
diff --git a/chrome/browser/resources/webauthn/2x/ble_pin.png b/chrome/browser/resources/webauthn/2x/ble_pin.png new file mode 100644 index 0000000..0e33f0c51 --- /dev/null +++ b/chrome/browser/resources/webauthn/2x/ble_pin.png Binary files differ
diff --git a/chrome/browser/resources/webauthn/2x/ble_tap.png b/chrome/browser/resources/webauthn/2x/ble_tap.png new file mode 100644 index 0000000..303a78c2 --- /dev/null +++ b/chrome/browser/resources/webauthn/2x/ble_tap.png Binary files differ
diff --git a/chrome/browser/resources/webauthn/2x/error_bt.png b/chrome/browser/resources/webauthn/2x/error_bt.png new file mode 100644 index 0000000..3ac7082 --- /dev/null +++ b/chrome/browser/resources/webauthn/2x/error_bt.png Binary files differ
diff --git a/chrome/browser/resources/webauthn/2x/error_timeout.png b/chrome/browser/resources/webauthn/2x/error_timeout.png new file mode 100644 index 0000000..62efe55 --- /dev/null +++ b/chrome/browser/resources/webauthn/2x/error_timeout.png Binary files differ
diff --git a/chrome/browser/resources/webauthn/2x/phone.png b/chrome/browser/resources/webauthn/2x/phone.png new file mode 100644 index 0000000..d25b97d --- /dev/null +++ b/chrome/browser/resources/webauthn/2x/phone.png Binary files differ
diff --git a/chrome/browser/resources/webauthn/2x/touchid.png b/chrome/browser/resources/webauthn/2x/touchid.png new file mode 100644 index 0000000..853073e --- /dev/null +++ b/chrome/browser/resources/webauthn/2x/touchid.png Binary files differ
diff --git a/chrome/browser/resources/webauthn/2x/usb.png b/chrome/browser/resources/webauthn/2x/usb.png new file mode 100644 index 0000000..025ff90 --- /dev/null +++ b/chrome/browser/resources/webauthn/2x/usb.png Binary files differ
diff --git a/chrome/browser/resources/webauthn/2x/welcome.png b/chrome/browser/resources/webauthn/2x/welcome.png new file mode 100644 index 0000000..b897bf5 --- /dev/null +++ b/chrome/browser/resources/webauthn/2x/welcome.png Binary files differ
diff --git a/chrome/browser/resources/webauthn/OWNERS b/chrome/browser/resources/webauthn/OWNERS new file mode 100644 index 0000000..58e400a --- /dev/null +++ b/chrome/browser/resources/webauthn/OWNERS
@@ -0,0 +1,6 @@ +engedy@chromium.org +hongjunchoi@chromium.org +kpaulhamus@chromium.org + +# Component: Blink>WebAuthentication +# TEAM: identity-dev@chromium.org
diff --git a/chrome/browser/resources/webauthn/ble.png b/chrome/browser/resources/webauthn/ble.png new file mode 100644 index 0000000..f12917d5 --- /dev/null +++ b/chrome/browser/resources/webauthn/ble.png Binary files differ
diff --git a/chrome/browser/resources/webauthn/ble_name.png b/chrome/browser/resources/webauthn/ble_name.png new file mode 100644 index 0000000..079806d9 --- /dev/null +++ b/chrome/browser/resources/webauthn/ble_name.png Binary files differ
diff --git a/chrome/browser/resources/webauthn/ble_pin.png b/chrome/browser/resources/webauthn/ble_pin.png new file mode 100644 index 0000000..3a395aa --- /dev/null +++ b/chrome/browser/resources/webauthn/ble_pin.png Binary files differ
diff --git a/chrome/browser/resources/webauthn/ble_tap.png b/chrome/browser/resources/webauthn/ble_tap.png new file mode 100644 index 0000000..52b94d4 --- /dev/null +++ b/chrome/browser/resources/webauthn/ble_tap.png Binary files differ
diff --git a/chrome/browser/resources/webauthn/error_bt.png b/chrome/browser/resources/webauthn/error_bt.png new file mode 100644 index 0000000..0956502 --- /dev/null +++ b/chrome/browser/resources/webauthn/error_bt.png Binary files differ
diff --git a/chrome/browser/resources/webauthn/error_timeout.png b/chrome/browser/resources/webauthn/error_timeout.png new file mode 100644 index 0000000..20f2907 --- /dev/null +++ b/chrome/browser/resources/webauthn/error_timeout.png Binary files differ
diff --git a/chrome/browser/resources/webauthn/phone.png b/chrome/browser/resources/webauthn/phone.png new file mode 100644 index 0000000..89a6243 --- /dev/null +++ b/chrome/browser/resources/webauthn/phone.png Binary files differ
diff --git a/chrome/browser/resources/webauthn/touchid.png b/chrome/browser/resources/webauthn/touchid.png new file mode 100644 index 0000000..97ec88e7 --- /dev/null +++ b/chrome/browser/resources/webauthn/touchid.png Binary files differ
diff --git a/chrome/browser/resources/webauthn/usb.png b/chrome/browser/resources/webauthn/usb.png new file mode 100644 index 0000000..7c905e0c0 --- /dev/null +++ b/chrome/browser/resources/webauthn/usb.png Binary files differ
diff --git a/chrome/browser/resources/webauthn/welcome.png b/chrome/browser/resources/webauthn/welcome.png new file mode 100644 index 0000000..cd4c9b3 --- /dev/null +++ b/chrome/browser/resources/webauthn/welcome.png Binary files differ
diff --git a/chrome/browser/rlz/chrome_rlz_tracker_delegate.cc b/chrome/browser/rlz/chrome_rlz_tracker_delegate.cc index 78d7336..e0c0610 100644 --- a/chrome/browser/rlz/chrome_rlz_tracker_delegate.cc +++ b/chrome/browser/rlz/chrome_rlz_tracker_delegate.cc
@@ -31,6 +31,7 @@ #include "content/public/browser/notification_source.h" #include "content/public/common/content_switches.h" #include "rlz/buildflags/buildflags.h" +#include "services/network/public/cpp/shared_url_loader_factory.h" #if defined(OS_WIN) #include "chrome/installer/util/google_update_settings.h" @@ -115,8 +116,9 @@ return content::BrowserThread::CurrentlyOn(content::BrowserThread::UI); } -net::URLRequestContextGetter* ChromeRLZTrackerDelegate::GetRequestContext() { - return g_browser_process->system_request_context(); +scoped_refptr<network::SharedURLLoaderFactory> +ChromeRLZTrackerDelegate::GetURLLoaderFactory() { + return g_browser_process->shared_url_loader_factory(); } bool ChromeRLZTrackerDelegate::GetBrand(std::string* brand) {
diff --git a/chrome/browser/rlz/chrome_rlz_tracker_delegate.h b/chrome/browser/rlz/chrome_rlz_tracker_delegate.h index 172d5d4..f1774e7 100644 --- a/chrome/browser/rlz/chrome_rlz_tracker_delegate.h +++ b/chrome/browser/rlz/chrome_rlz_tracker_delegate.h
@@ -36,7 +36,7 @@ // RLZTrackerDelegate implementation. void Cleanup() override; bool IsOnUIThread() override; - net::URLRequestContextGetter* GetRequestContext() override; + scoped_refptr<network::SharedURLLoaderFactory> GetURLLoaderFactory() override; bool GetBrand(std::string* brand) override; bool IsBrandOrganic(const std::string& brand) override; bool GetReactivationBrand(std::string* brand) override;
diff --git a/chrome/browser/safe_browsing/client_side_detection_service_unittest.cc b/chrome/browser/safe_browsing/client_side_detection_service_unittest.cc index 6af3144..a692f70c 100644 --- a/chrome/browser/safe_browsing/client_side_detection_service_unittest.cc +++ b/chrome/browser/safe_browsing/client_side_detection_service_unittest.cc
@@ -30,6 +30,10 @@ #include "testing/gtest/include/gtest/gtest.h" #include "url/gurl.h" +#if defined(OS_CHROMEOS) +#include "chrome/browser/chromeos/settings/stub_install_attributes.h" +#endif + using ::testing::Invoke; using ::testing::Mock; using ::testing::StrictMock; @@ -240,6 +244,10 @@ network::TestURLLoaderFactory test_url_loader_factory_; scoped_refptr<network::SharedURLLoaderFactory> test_shared_loader_factory_; +#if defined(OS_CHROMEOS) + chromeos::ScopedStubInstallAttributes test_install_attributes_; +#endif + private: void SendRequestDone(base::OnceClosure continuation_callback, GURL phishing_url,
diff --git a/chrome/browser/safe_browsing/incident_reporting/extension_data_collection_unittest.cc b/chrome/browser/safe_browsing/incident_reporting/extension_data_collection_unittest.cc index 90e2a41..cd6bd57 100644 --- a/chrome/browser/safe_browsing/incident_reporting/extension_data_collection_unittest.cc +++ b/chrome/browser/safe_browsing/incident_reporting/extension_data_collection_unittest.cc
@@ -35,8 +35,7 @@ #if defined(OS_CHROMEOS) #include "chrome/browser/chromeos/login/users/scoped_test_user_manager.h" -#include "chrome/browser/chromeos/settings/cros_settings.h" -#include "chrome/browser/chromeos/settings/device_settings_service.h" +#include "chrome/browser/chromeos/settings/scoped_cros_settings_test_helper.h" #endif using ::testing::StrictMock; @@ -185,8 +184,7 @@ int profile_number_; #if defined OS_CHROMEOS - chromeos::ScopedTestDeviceSettingsService test_device_settings_service_; - chromeos::ScopedTestCrosSettings test_cros_settings_; + chromeos::ScopedCrosSettingsTestHelper cros_settings_test_helper_; std::unique_ptr<chromeos::ScopedTestUserManager> test_user_manager_; #endif };
diff --git a/chrome/browser/search/instant_service.cc b/chrome/browser/search/instant_service.cc index 73d8ea8..3266886 100644 --- a/chrome/browser/search/instant_service.cc +++ b/chrome/browser/search/instant_service.cc
@@ -226,16 +226,22 @@ return false; } -void InstantService::UndoCustomLinkAction() { - if (most_visited_sites_) { +bool InstantService::UndoCustomLinkAction() { + // Non-Google search providers are not supported. + if (most_visited_sites_ && search::DefaultSearchProviderIsGoogle(profile_)) { most_visited_sites_->UndoCustomLinkAction(); + return true; } + return false; } -void InstantService::ResetCustomLinks() { - if (most_visited_sites_) { +bool InstantService::ResetCustomLinks() { + // Non-Google search providers are not supported. + if (most_visited_sites_ && search::DefaultSearchProviderIsGoogle(profile_)) { most_visited_sites_->UninitializeCustomLinks(); + return true; } + return false; } void InstantService::UpdateThemeInfo() {
diff --git a/chrome/browser/search/instant_service.h b/chrome/browser/search/instant_service.h index 9f52232b..892d379 100644 --- a/chrome/browser/search/instant_service.h +++ b/chrome/browser/search/instant_service.h
@@ -89,11 +89,13 @@ // Invoked when the Instant page wants to delete a custom link. bool DeleteCustomLink(const GURL& url); // Invoked when the Instant page wants to undo the previous custom link - // action. - void UndoCustomLinkAction(); + // action. Returns false and does nothing if the profile is using a non-Google + // search provider. + bool UndoCustomLinkAction(); // Invoked when the Instant page wants to delete all custom links and use Most - // Visited sites instead. - void ResetCustomLinks(); + // Visited sites instead. Returns false and does nothing if the profile is + // using a non-Google search provider. + bool ResetCustomLinks(); // Invoked by the InstantController to update theme information for NTP. //
diff --git a/chrome/browser/search/instant_service_unittest.cc b/chrome/browser/search/instant_service_unittest.cc index c0d3224..858d8b7 100644 --- a/chrome/browser/search/instant_service_unittest.cc +++ b/chrome/browser/search/instant_service_unittest.cc
@@ -14,6 +14,7 @@ #include "chrome/common/chrome_paths.h" #include "chrome/common/search/instant_types.h" #include "chrome/common/url_constants.h" +#include "components/ntp_tiles/constants.h" #include "components/ntp_tiles/ntp_tile.h" #include "components/ntp_tiles/section_type.h" #include "testing/gtest/include/gtest/gtest.h" @@ -21,6 +22,19 @@ using InstantServiceTest = InstantUnitTestBase; +class InstantServiceTestCustomLinksEnabled : public InstantServiceTest { + public: + InstantServiceTestCustomLinksEnabled() { + scoped_feature_list_.InitAndEnableFeature(ntp_tiles::kNtpCustomLinks); + } + ~InstantServiceTestCustomLinksEnabled() override {} + + private: + base::test::ScopedFeatureList scoped_feature_list_; + + DISALLOW_COPY_AND_ASSIGN(InstantServiceTestCustomLinksEnabled); +}; + class InstantServiceTestCustomBackgroundsEnabled : public InstantServiceTest { public: InstantServiceTestCustomBackgroundsEnabled() { @@ -51,6 +65,24 @@ EXPECT_EQ(ntp_tiles::TileTitleSource::TITLE_TAG, items[0].title_source); } +TEST_F(InstantServiceTestCustomLinksEnabled, + DisableUndoCustomLinkActionForNonGoogleSearchProvider) { + SetUserSelectedDefaultSearchProvider("{google:baseURL}"); + EXPECT_TRUE(instant_service_->UndoCustomLinkAction()); + + SetUserSelectedDefaultSearchProvider("https://www.search.com"); + EXPECT_FALSE(instant_service_->UndoCustomLinkAction()); +} + +TEST_F(InstantServiceTestCustomLinksEnabled, + DisableResetCustomLinksForNonGoogleSearchProvider) { + SetUserSelectedDefaultSearchProvider("{google:baseURL}"); + EXPECT_TRUE(instant_service_->ResetCustomLinks()); + + SetUserSelectedDefaultSearchProvider("https://www.search.com"); + EXPECT_FALSE(instant_service_->ResetCustomLinks()); +} + TEST_F(InstantServiceTestCustomBackgroundsEnabled, SetCustomBackgroundURL) { const GURL kUrl("https://www.foo.com"); instant_service_->SetCustomBackgroundURL(kUrl);
diff --git a/chrome/browser/speech/extension_api/tts_engine_extension_api.cc b/chrome/browser/speech/extension_api/tts_engine_extension_api.cc index 3ce6ed9..8fd19fb 100644 --- a/chrome/browser/speech/extension_api/tts_engine_extension_api.cc +++ b/chrome/browser/speech/extension_api/tts_engine_extension_api.cc
@@ -9,7 +9,6 @@ #include <utility> #include "base/json/json_writer.h" -#include "base/metrics/histogram_macros.h" #include "base/strings/utf_string_conversions.h" #include "base/values.h" #include "build/build_config.h" @@ -297,8 +296,6 @@ } if (voice_data->HasKey(constants::kGenderKey)) voice_data->GetString(constants::kGenderKey, &voice.gender); - UMA_HISTOGRAM_BOOLEAN("TextToSpeechEngine.UpdateVoice.HasGender", - !voice.gender.empty()); if (voice_data->HasKey(constants::kRemoteKey)) voice_data->GetBoolean(constants::kRemoteKey, &voice.remote); if (voice_data->HasKey(constants::kExtensionIdKey)) {
diff --git a/chrome/browser/sync/chrome_sync_client.cc b/chrome/browser/sync/chrome_sync_client.cc index bd6bc5e..91b0492 100644 --- a/chrome/browser/sync/chrome_sync_client.cc +++ b/chrome/browser/sync/chrome_sync_client.cc
@@ -256,7 +256,8 @@ content::BrowserThread::GetTaskRunnerForThread( content::BrowserThread::UI), web_data_service_thread_, profile_web_data_service_, - account_web_data_service_, password_store_); + account_web_data_service_, password_store_, + BookmarkSyncServiceFactory::GetForProfile(profile_)); } } @@ -610,10 +611,6 @@ return ProfileSyncServiceFactory::GetForProfile(profile_) ->GetSessionSyncControllerDelegate(); } - case syncer::BOOKMARKS: { - return BookmarkSyncServiceFactory::GetForProfile(profile_) - ->GetBookmarkSyncControllerDelegate(); - } // We don't exercise this function for certain datatypes, because their // controllers get the delegate elsewhere. @@ -621,6 +618,7 @@ case syncer::AUTOFILL_PROFILE: case syncer::AUTOFILL_WALLET_DATA: case syncer::AUTOFILL_WALLET_METADATA: + case syncer::BOOKMARKS: case syncer::TYPED_URLS: NOTREACHED(); return base::WeakPtr<syncer::ModelTypeControllerDelegate>();
diff --git a/chrome/browser/sync/profile_sync_service_factory.cc b/chrome/browser/sync/profile_sync_service_factory.cc index 7b75fedf..f665d31 100644 --- a/chrome/browser/sync/profile_sync_service_factory.cc +++ b/chrome/browser/sync/profile_sync_service_factory.cc
@@ -17,6 +17,7 @@ #include "chrome/browser/consent_auditor/consent_auditor_factory.h" #include "chrome/browser/defaults.h" #include "chrome/browser/dom_distiller/dom_distiller_service_factory.h" +#include "chrome/browser/favicon/favicon_service_factory.h" #include "chrome/browser/gcm/gcm_profile_service_factory.h" #include "chrome/browser/history/history_service_factory.h" #include "chrome/browser/invalidation/profile_invalidation_provider_factory.h" @@ -31,6 +32,7 @@ #include "chrome/browser/signin/signin_manager_factory.h" #include "chrome/browser/signin/unified_consent_helper.h" #include "chrome/browser/spellchecker/spellcheck_factory.h" +#include "chrome/browser/sync/bookmark_sync_service_factory.h" #include "chrome/browser/sync/chrome_sync_client.h" #include "chrome/browser/sync/sessions/sync_sessions_web_contents_router_factory.h" #include "chrome/browser/sync/user_event_service_factory.h" @@ -130,10 +132,12 @@ DependsOn(autofill::PersonalDataManagerFactory::GetInstance()); DependsOn(BookmarkModelFactory::GetInstance()); DependsOn(BookmarkUndoServiceFactory::GetInstance()); + DependsOn(BookmarkSyncServiceFactory::GetInstance()); DependsOn(browser_sync::UserEventServiceFactory::GetInstance()); DependsOn(ChromeSigninClientFactory::GetInstance()); DependsOn(ConsentAuditorFactory::GetInstance()); DependsOn(dom_distiller::DomDistillerServiceFactory::GetInstance()); + DependsOn(FaviconServiceFactory::GetInstance()); DependsOn(GaiaCookieManagerServiceFactory::GetInstance()); DependsOn(gcm::GCMProfileServiceFactory::GetInstance()); #if !defined(OS_ANDROID) @@ -166,7 +170,6 @@ // BrowserContextDependencyManager is told to DestroyBrowserContextServices, // so they will be around when the ProfileSyncService is destroyed. - // DependsOn(FaviconServiceFactory::GetInstance()); } ProfileSyncServiceFactory::~ProfileSyncServiceFactory() {
diff --git a/chrome/browser/sync/test/integration/single_client_bookmarks_sync_test.cc b/chrome/browser/sync/test/integration/single_client_bookmarks_sync_test.cc index 9b26fd4..429c623 100644 --- a/chrome/browser/sync/test/integration/single_client_bookmarks_sync_test.cc +++ b/chrome/browser/sync/test/integration/single_client_bookmarks_sync_test.cc
@@ -103,7 +103,7 @@ : public UssSwitchToggler, public SingleClientBookmarksSyncTest { public: - SingleClientBookmarksSyncTestIncludingUssTests(){}; + SingleClientBookmarksSyncTestIncludingUssTests() {} ~SingleClientBookmarksSyncTestIncludingUssTests() override {} private: @@ -305,7 +305,7 @@ // Test that a client doesn't mutate the favicon data in the process // of storing the favicon data from sync to the database or in the process // of requesting data from the database for sync. -IN_PROC_BROWSER_TEST_F(SingleClientBookmarksSyncTest, +IN_PROC_BROWSER_TEST_P(SingleClientBookmarksSyncTestIncludingUssTests, SetFaviconHiDPIDifferentCodec) { // Set the supported scale factors to 1x and 2x such that // BookmarkModel::GetFavicon() requests both 1x and 2x. @@ -350,7 +350,8 @@ // Test that a client deletes favicons from sync when they have been removed // from the local database. -IN_PROC_BROWSER_TEST_F(SingleClientBookmarksSyncTest, DeleteFaviconFromSync) { +IN_PROC_BROWSER_TEST_P(SingleClientBookmarksSyncTestIncludingUssTests, + DeleteFaviconFromSync) { ASSERT_TRUE(SetupSync()) << "SetupSync() failed."; ASSERT_TRUE(ModelMatchesVerifier(kSingleProfileIndex));
diff --git a/chrome/browser/sync/test/integration/two_client_bookmarks_sync_test.cc b/chrome/browser/sync/test/integration/two_client_bookmarks_sync_test.cc index 27a6ba99..855a70d 100644 --- a/chrome/browser/sync/test/integration/two_client_bookmarks_sync_test.cc +++ b/chrome/browser/sync/test/integration/two_client_bookmarks_sync_test.cc
@@ -118,7 +118,7 @@ : public UssSwitchToggler, public TwoClientBookmarksSyncTest { public: - TwoClientBookmarksSyncTestIncludingUssTests(){}; + TwoClientBookmarksSyncTestIncludingUssTests() {} ~TwoClientBookmarksSyncTestIncludingUssTests() override {} private: @@ -205,7 +205,8 @@ ASSERT_TRUE(BookmarksMatchVerifierChecker().Wait()); } -IN_PROC_BROWSER_TEST_F(TwoClientBookmarksSyncTest, SC_AddFirstBMWithFavicon) { +IN_PROC_BROWSER_TEST_P(TwoClientBookmarksSyncTestIncludingUssTests, + SC_AddFirstBMWithFavicon) { ASSERT_TRUE(SetupSync()) << "SetupSync() failed."; ASSERT_TRUE(AllModelsMatchVerifier()); const GURL page_url(kGenericURL); @@ -224,7 +225,8 @@ // In particular, the synced 16x16 favicon bitmap should overwrite 16x16 // favicon bitmaps on all clients. (Though non-16x16 favicon bitmaps // are unchanged). -IN_PROC_BROWSER_TEST_F(TwoClientBookmarksSyncTest, SC_SetFaviconHiDPI) { +IN_PROC_BROWSER_TEST_P(TwoClientBookmarksSyncTestIncludingUssTests, + SC_SetFaviconHiDPI) { // Set the supported scale factors to include 2x such that CreateFavicon() // creates a favicon with hidpi representations and that methods in the // FaviconService request hidpi favicons. @@ -263,7 +265,7 @@ // favicon should be redownloaded when the web when the bookmark is visited. // If sync prevents the "last updated time" from expiring, the favicon is // never redownloaded from the web. (http://crbug.com/481414) -IN_PROC_BROWSER_TEST_F(TwoClientBookmarksSyncTest, +IN_PROC_BROWSER_TEST_P(TwoClientBookmarksSyncTestIncludingUssTests, SC_UpdatingTitleDoesNotUpdateFaviconLastUpdatedTime) { ASSERT_TRUE(SetupClients()) << "SetupClients() failed."; @@ -309,7 +311,7 @@ // ensures that sync has the most up to date data and prevents sync from // reverting the newly updated bookmark favicon back to the old favicon. // crbug.com/485657 -IN_PROC_BROWSER_TEST_F(TwoClientBookmarksSyncTest, +IN_PROC_BROWSER_TEST_P(TwoClientBookmarksSyncTestIncludingUssTests, SC_SetFaviconTwoBookmarksSameIconURL) { const GURL page_url1("http://www.google.com/a"); const GURL page_url2("http://www.google.com/b"); @@ -342,7 +344,8 @@ ASSERT_TRUE(BookmarksMatchVerifierChecker().Wait()); } -IN_PROC_BROWSER_TEST_F(TwoClientBookmarksSyncTest, SC_DeleteFavicon) { +IN_PROC_BROWSER_TEST_P(TwoClientBookmarksSyncTestIncludingUssTests, + SC_DeleteFavicon) { const GURL page_url("http://www.google.com/a"); const GURL icon_url("http://www.google.com/favicon.ico"); @@ -2050,7 +2053,8 @@ } // Verifies that managed bookmarks (installed by policy) don't get synced. -IN_PROC_BROWSER_TEST_F(TwoClientBookmarksSyncTest, ManagedBookmarks) { +IN_PROC_BROWSER_TEST_P(TwoClientBookmarksSyncTestIncludingUssTests, + ManagedBookmarks) { // Make sure the first Profile has an overridden policy provider. EXPECT_CALL(policy_provider_, IsInitializationComplete(testing::_)) .WillRepeatedly(testing::Return(true));
diff --git a/chrome/browser/sync/test/integration/two_client_passwords_sync_test.cc b/chrome/browser/sync/test/integration/two_client_passwords_sync_test.cc index 7722d55..06e78ec 100644 --- a/chrome/browser/sync/test/integration/two_client_passwords_sync_test.cc +++ b/chrome/browser/sync/test/integration/two_client_passwords_sync_test.cc
@@ -72,8 +72,14 @@ ASSERT_TRUE(SamePasswordFormsChecker().Wait()); } +// Disabled due to flakiness on Chrome OS: https://crbug.com/873494. +#if defined(OS_CHROMEOS) +#define MAYBE_SetPassphraseAndAddPassword DISABLED_SetPassphraseAndAddPassword +#else +#define MAYBE_SetPassphraseAndAddPassword SetPassphraseAndAddPassword +#endif IN_PROC_BROWSER_TEST_F(TwoClientPasswordsSyncTest, - E2E_ENABLED(SetPassphraseAndAddPassword)) { + E2E_ENABLED(MAYBE_SetPassphraseAndAddPassword)) { ASSERT_TRUE(SetupSync()) << "SetupSync() failed."; GetSyncService(0)->SetEncryptionPassphrase(
diff --git a/chrome/browser/sync/test/integration/two_client_preferences_sync_test.cc b/chrome/browser/sync/test/integration/two_client_preferences_sync_test.cc index 7318110..6552590 100644 --- a/chrome/browser/sync/test/integration/two_client_preferences_sync_test.cc +++ b/chrome/browser/sync/test/integration/two_client_preferences_sync_test.cc
@@ -7,6 +7,7 @@ #include "base/guid.h" #include "base/macros.h" #include "base/strings/stringprintf.h" +#include "build/build_config.h" #include "chrome/browser/sync/test/integration/preferences_helper.h" #include "chrome/browser/sync/test/integration/profile_sync_service_harness.h" #include "chrome/browser/sync/test/integration/sync_integration_test_util.h" @@ -121,8 +122,17 @@ ASSERT_TRUE(ListPrefMatchChecker(prefs::kURLsToRestoreOnStartup).Wait()); } -IN_PROC_BROWSER_TEST_F(TwoClientPreferencesSyncTest, - E2E_ENABLED(SingleClientEnabledEncryptionBothChanged)) { +// Disabled due to flakiness on Chrome OS: https://crbug.com/873902. +#if defined(OS_CHROMEOS) +#define MAYBE_SingleClientEnabledEncryptionBothChanged \ + DISABLED_SingleClientEnabledEncryptionBothChanged +#else +#define MAYBE_SingleClientEnabledEncryptionBothChanged \ + SingleClientEnabledEncryptionBothChanged +#endif +IN_PROC_BROWSER_TEST_F( + TwoClientPreferencesSyncTest, + E2E_ENABLED(MAYBE_SingleClientEnabledEncryptionBothChanged)) { ASSERT_TRUE(SetupSync()); ASSERT_TRUE(BooleanPrefMatchChecker(prefs::kHomePageIsNewTabPage).Wait()); ASSERT_TRUE(StringPrefMatchChecker(prefs::kHomePage).Wait());
diff --git a/chrome/browser/themes/browser_theme_pack.cc b/chrome/browser/themes/browser_theme_pack.cc index 73048845b..1e3f856 100644 --- a/chrome/browser/themes/browser_theme_pack.cc +++ b/chrome/browser/themes/browser_theme_pack.cc
@@ -776,22 +776,27 @@ bool BrowserThemePack::GetColor(int id, SkColor* color) const { static const base::NoDestructor< base::flat_set<ThemeProperties::OverwritableByUserThemeProperty>> - kOpaqueColors({ - // Background tabs must be opaque since the tabstrip expects to be - // able to render text opaquely atop them. - ThemeProperties::COLOR_BACKGROUND_TAB, - ThemeProperties::COLOR_BACKGROUND_TAB_INACTIVE, - ThemeProperties::COLOR_BACKGROUND_TAB_INCOGNITO, - ThemeProperties::COLOR_BACKGROUND_TAB_INCOGNITO_INACTIVE, - // The frame colors will be used for background tabs when not - // otherwise overridden and thus must be opaque as well. - ThemeProperties::COLOR_FRAME, ThemeProperties::COLOR_FRAME_INACTIVE, - ThemeProperties::COLOR_FRAME_INCOGNITO, - ThemeProperties::COLOR_FRAME_INCOGNITO_INACTIVE, - // The toolbar is used as the foreground tab color, so it must be - // opaque just like background tabs. - ThemeProperties::COLOR_TOOLBAR, - }); + kOpaqueColors( + // Explicitly creating a base::flat_set here is not strictly + // necessary according to C++, but we do so to work around + // https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84849. + base::flat_set<ThemeProperties::OverwritableByUserThemeProperty>({ + // Background tabs must be opaque since the tabstrip expects to be + // able to render text opaquely atop them. + ThemeProperties::COLOR_BACKGROUND_TAB, + ThemeProperties::COLOR_BACKGROUND_TAB_INACTIVE, + ThemeProperties::COLOR_BACKGROUND_TAB_INCOGNITO, + ThemeProperties::COLOR_BACKGROUND_TAB_INCOGNITO_INACTIVE, + // The frame colors will be used for background tabs when not + // otherwise overridden and thus must be opaque as well. + ThemeProperties::COLOR_FRAME, + ThemeProperties::COLOR_FRAME_INACTIVE, + ThemeProperties::COLOR_FRAME_INCOGNITO, + ThemeProperties::COLOR_FRAME_INCOGNITO_INACTIVE, + // The toolbar is used as the foreground tab color, so it must be + // opaque just like background tabs. + ThemeProperties::COLOR_TOOLBAR, + })); if (colors_) { for (size_t i = 0; i < kColorTableLength; ++i) {
diff --git a/chrome/browser/themes/theme_syncable_service_unittest.cc b/chrome/browser/themes/theme_syncable_service_unittest.cc index 479a625..b09eb9b 100644 --- a/chrome/browser/themes/theme_syncable_service_unittest.cc +++ b/chrome/browser/themes/theme_syncable_service_unittest.cc
@@ -39,8 +39,7 @@ #if defined(OS_CHROMEOS) #include "chrome/browser/chromeos/login/users/scoped_test_user_manager.h" -#include "chrome/browser/chromeos/settings/cros_settings.h" -#include "chrome/browser/chromeos/settings/device_settings_service.h" +#include "chrome/browser/chromeos/settings/scoped_cros_settings_test_helper.h" #endif using std::string; @@ -229,8 +228,7 @@ content::TestBrowserThreadBundle test_browser_thread_bundle_; #if defined OS_CHROMEOS - chromeos::ScopedTestDeviceSettingsService test_device_settings_service_; - chromeos::ScopedTestCrosSettings test_cros_settings_; + chromeos::ScopedCrosSettingsTestHelper cros_settings_test_helper_; chromeos::ScopedTestUserManager test_user_manager_; #endif
diff --git a/chrome/browser/ui/ash/assistant/web_contents_manager.cc b/chrome/browser/ui/ash/assistant/web_contents_manager.cc index ca8a20f3..51fa347 100644 --- a/chrome/browser/ui/ash/assistant/web_contents_manager.cc +++ b/chrome/browser/ui/ash/assistant/web_contents_manager.cc
@@ -25,26 +25,29 @@ // ManagedWebContents ---------------------------------------------------------- -class ManagedWebContents : public content::WebContentsDelegate { +class ManagedWebContents : public content::WebContentsDelegate, + public content::WebContentsObserver { public: ManagedWebContents( ash::mojom::ManagedWebContentsParamsPtr params, - ash::mojom::WebContentsManager::ManageWebContentsCallback callback) { + ash::mojom::WebContentsManager::ManageWebContentsCallback callback) + : callback_(std::move(callback)) { Profile* profile = chromeos::ProfileHelper::Get()->GetProfileByAccountId( params->account_id); if (!profile) { LOG(WARNING) << "Unable to retrieve profile for account_id."; - std::move(callback).Run(base::nullopt); + std::move(callback_).Run(base::nullopt); return; } InitWebContents(profile, std::move(params)); - HandleWebContents(profile, std::move(callback)); + HandleWebContents(profile); } ~ManagedWebContents() override { web_contents_->SetDelegate(nullptr); + Observe(nullptr); // When WebContents are rendered in the same process as ash, we need to // release the associated view registered in the @@ -72,6 +75,26 @@ return nullptr; } + // content::WebContentsObserver: + void DidStopLoading() override { + // After the first load has stopped, notify |callback_| that we're ready for + // embedding. We wait until load completion to reduce UI jank. + if (callback_) + std::move(callback_).Run(embed_token_); + } + + void NavigateBack( + ash::mojom::WebContentsManager::NavigateWebContentsBackCallback + callback) { + content::NavigationController& controller = web_contents_->GetController(); + if (controller.CanGoBack()) { + controller.GoBack(); + std::move(callback).Run(true); + } else { + std::move(callback).Run(false); + } + } + private: void InitWebContents(Profile* profile, ash::mojom::ManagedWebContentsParamsPtr params) { @@ -93,6 +116,7 @@ views::WebContentsSetBackgroundColor::CreateForWebContentsWithColor( web_contents_.get(), SK_ColorTRANSPARENT); + Observe(web_contents_.get()); web_contents_->SetDelegate(this); // Load the desired URL into the web contents. @@ -118,9 +142,7 @@ max_size_dip); } - void HandleWebContents( - Profile* profile, - ash::mojom::WebContentsManager::ManageWebContentsCallback callback) { + void HandleWebContents(Profile* profile) { // When rendering WebContents in the same process as ash, we register the // associated view with the AnswerCardContentsRegistry's token-to-view map. // The token returned from the registry will uniquely identify the view. @@ -132,14 +154,13 @@ embed_token_ = app_list::AnswerCardContentsRegistry::Get()->Register( web_view_.get()); - - std::move(callback).Run(embed_token_.value()); } else { // TODO(dmblack): Handle Mash case. https://crbug.com/854787. - std::move(callback).Run(base::nullopt); } } + ash::mojom::WebContentsManager::ManageWebContentsCallback callback_; + std::unique_ptr<content::WebContents> web_contents_; std::unique_ptr<views::WebView> web_view_; base::Optional<base::UnguessableToken> embed_token_; @@ -182,3 +203,9 @@ for (const base::UnguessableToken& id_token : id_tokens) managed_web_contents_map_.erase(id_token); } + +void WebContentsManager::NavigateWebContentsBack( + const base::UnguessableToken& id_token, + ash::mojom::WebContentsManager::NavigateWebContentsBackCallback callback) { + managed_web_contents_map_[id_token]->NavigateBack(std::move(callback)); +}
diff --git a/chrome/browser/ui/ash/assistant/web_contents_manager.h b/chrome/browser/ui/ash/assistant/web_contents_manager.h index 32514fe..f463e5c 100644 --- a/chrome/browser/ui/ash/assistant/web_contents_manager.h +++ b/chrome/browser/ui/ash/assistant/web_contents_manager.h
@@ -39,6 +39,10 @@ void ReleaseWebContents(const base::UnguessableToken& id_token) override; void ReleaseAllWebContents( const std::vector<base::UnguessableToken>& id_tokens) override; + void NavigateWebContentsBack( + const base::UnguessableToken& id_token, + ash::mojom::WebContentsManager::NavigateWebContentsBackCallback callback) + override; private: mojo::Binding<ash::mojom::WebContentsManager> binding_;
diff --git a/chrome/browser/ui/ash/ksv/keyboard_shortcut_viewer_metadata_unittest.cc b/chrome/browser/ui/ash/ksv/keyboard_shortcut_viewer_metadata_unittest.cc index c338583..64073d3e 100644 --- a/chrome/browser/ui/ash/ksv/keyboard_shortcut_viewer_metadata_unittest.cc +++ b/chrome/browser/ui/ash/ksv/keyboard_shortcut_viewer_metadata_unittest.cc
@@ -20,9 +20,9 @@ namespace { // The total number of Ash accelerators. -constexpr int kAshAcceleratorsTotalNum = 101; +constexpr int kAshAcceleratorsTotalNum = 100; // The hash of Ash accelerators. -constexpr char kAshAcceleratorsHash[] = "48e2af8115132ccec79dc16ebe7da7fb"; +constexpr char kAshAcceleratorsHash[] = "98969dc2242e5d4b01a8c6043f26e9dd"; #if defined(GOOGLE_CHROME_BUILD) // Internal builds add an extra accelerator for the Feedback app. // The total number of Chrome accelerators (available on Chrome OS). @@ -225,7 +225,7 @@ "Keyboard Shortcut Viewer shortcuts and the following value(s) on the " "top of this file:\n"; const int ash_accelerators_number = ash_accelerators.size(); - EXPECT_TRUE(ash_accelerators_number == kAshAcceleratorsTotalNum) + EXPECT_EQ(ash_accelerators_number, kAshAcceleratorsTotalNum) << kCommonMessage << "kAshAcceleratorsTotalNum=" << ash_accelerators_number << "\n"; @@ -233,12 +233,12 @@ AshAcceleratorDataCmp()); const std::string ash_accelerators_hash = HashAshAcceleratorData(ash_accelerators); - EXPECT_TRUE(ash_accelerators_hash == kAshAcceleratorsHash) + EXPECT_EQ(ash_accelerators_hash, kAshAcceleratorsHash) << kCommonMessage << "kAshAcceleratorsHash=\"" << ash_accelerators_hash << "\"\n"; const int chrome_accelerators_number = chrome_accelerators.size(); - EXPECT_TRUE(chrome_accelerators_number == kChromeAcceleratorsTotalNum) + EXPECT_EQ(chrome_accelerators_number, kChromeAcceleratorsTotalNum) << kCommonMessage << "kChromeAcceleratorsTotalNum=" << chrome_accelerators_number << "\n"; @@ -246,7 +246,7 @@ ChromeAcceleratorMappingCmp()); const std::string chrome_accelerators_hash = HashChromeAcceleratorMapping(chrome_accelerators); - EXPECT_TRUE(chrome_accelerators_hash == kChromeAcceleratorsHash) + EXPECT_EQ(chrome_accelerators_hash, kChromeAcceleratorsHash) << kCommonMessage << "kChromeAcceleratorsHash=\"" << chrome_accelerators_hash << "\"\n"; }
diff --git a/chrome/browser/ui/ash/launcher/arc_app_window_launcher_controller.cc b/chrome/browser/ui/ash/launcher/arc_app_window_launcher_controller.cc index d6f47de..5025179 100644 --- a/chrome/browser/ui/ash/launcher/arc_app_window_launcher_controller.cc +++ b/chrome/browser/ui/ash/launcher/arc_app_window_launcher_controller.cc
@@ -1,6 +1,7 @@ // Copyright 2016 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. + #include "chrome/browser/ui/ash/launcher/arc_app_window_launcher_controller.h" #include <string> @@ -431,9 +432,8 @@ } void ArcAppWindowLauncherController::StartObserving(Profile* profile) { - aura::Env* env = aura::Env::GetInstanceDontCreate(); - if (env) - env->AddObserver(this); + if (aura::Env::HasInstance()) + aura::Env::GetInstance()->AddObserver(this); ArcAppListPrefs* prefs = ArcAppListPrefs::Get(profile); DCHECK(prefs); prefs->AddObserver(this); @@ -444,9 +444,8 @@ window->RemoveObserver(this); ArcAppListPrefs* prefs = ArcAppListPrefs::Get(profile); prefs->RemoveObserver(this); - aura::Env* env = aura::Env::GetInstanceDontCreate(); - if (env) - env->RemoveObserver(this); + if (aura::Env::HasInstance()) + aura::Env::GetInstance()->RemoveObserver(this); } ArcAppWindowLauncherItemController*
diff --git a/chrome/browser/ui/ash/launcher/chrome_launcher_controller.cc b/chrome/browser/ui/ash/launcher/chrome_launcher_controller.cc index 07f94b4c..6ad1c95 100644 --- a/chrome/browser/ui/ash/launcher/chrome_launcher_controller.cc +++ b/chrome/browser/ui/ash/launcher/chrome_launcher_controller.cc
@@ -518,7 +518,8 @@ return ash::SHELF_ACTION_WINDOW_ACTIVATED; } - if (window->IsActive() && allow_minimize) { + if (window->IsActive() && allow_minimize && + !AppListClientImpl::GetInstance()->app_list_target_visibility()) { window->Minimize(); return ash::SHELF_ACTION_WINDOW_MINIMIZED; }
diff --git a/chrome/browser/ui/ash/launcher/crostini_app_window_shelf_controller.cc b/chrome/browser/ui/ash/launcher/crostini_app_window_shelf_controller.cc index 8cad43e6..6b4dedd 100644 --- a/chrome/browser/ui/ash/launcher/crostini_app_window_shelf_controller.cc +++ b/chrome/browser/ui/ash/launcher/crostini_app_window_shelf_controller.cc
@@ -63,17 +63,15 @@ CrostiniAppWindowShelfController::CrostiniAppWindowShelfController( ChromeLauncherController* owner) : AppWindowLauncherController(owner) { - aura::Env* env = aura::Env::GetInstanceDontCreate(); - if (env) - env->AddObserver(this); + if (aura::Env::HasInstance()) + aura::Env::GetInstance()->AddObserver(this); } CrostiniAppWindowShelfController::~CrostiniAppWindowShelfController() { for (auto* window : observed_windows_) window->RemoveObserver(this); - aura::Env* env = aura::Env::GetInstanceDontCreate(); - if (env) - env->RemoveObserver(this); + if (aura::Env::HasInstance()) + aura::Env::GetInstance()->RemoveObserver(this); } void CrostiniAppWindowShelfController::AddToShelf(aura::Window* window,
diff --git a/chrome/browser/ui/ash/launcher/internal_app_window_shelf_controller.cc b/chrome/browser/ui/ash/launcher/internal_app_window_shelf_controller.cc index d47bbb92..af88b94 100644 --- a/chrome/browser/ui/ash/launcher/internal_app_window_shelf_controller.cc +++ b/chrome/browser/ui/ash/launcher/internal_app_window_shelf_controller.cc
@@ -21,18 +21,16 @@ InternalAppWindowShelfController::InternalAppWindowShelfController( ChromeLauncherController* owner) : AppWindowLauncherController(owner) { - aura::Env* env = aura::Env::GetInstanceDontCreate(); - if (env) - env->AddObserver(this); + if (aura::Env::HasInstance()) + aura::Env::GetInstance()->AddObserver(this); } InternalAppWindowShelfController::~InternalAppWindowShelfController() { for (auto* window : observed_windows_) window->RemoveObserver(this); - aura::Env* env = aura::Env::GetInstanceDontCreate(); - if (env) - env->RemoveObserver(this); + if (aura::Env::HasInstance()) + aura::Env::GetInstance()->RemoveObserver(this); } void InternalAppWindowShelfController::OnWindowInitialized(
diff --git a/chrome/browser/ui/ash/multi_user/multi_user_window_manager_chromeos_unittest.cc b/chrome/browser/ui/ash/multi_user/multi_user_window_manager_chromeos_unittest.cc index e94245b..b09a5f0 100644 --- a/chrome/browser/ui/ash/multi_user/multi_user_window_manager_chromeos_unittest.cc +++ b/chrome/browser/ui/ash/multi_user/multi_user_window_manager_chromeos_unittest.cc
@@ -31,6 +31,7 @@ #include "chrome/browser/chromeos/profiles/profile_helper.h" #include "chrome/browser/chromeos/settings/cros_settings.h" #include "chrome/browser/chromeos/settings/device_settings_service.h" +#include "chrome/browser/chromeos/settings/stub_install_attributes.h" #include "chrome/browser/ui/ash/chrome_new_window_client.h" #include "chrome/browser/ui/ash/multi_user/multi_user_util.h" #include "chrome/browser/ui/ash/multi_user/multi_user_window_manager.h" @@ -247,6 +248,8 @@ } private: + chromeos::ScopedStubInstallAttributes test_install_attributes_; + // These get created for each session. aura::Window::Windows windows_;
diff --git a/chrome/browser/ui/ash/session_controller_client_unittest.cc b/chrome/browser/ui/ash/session_controller_client_unittest.cc index 0753405..105478c6 100644 --- a/chrome/browser/ui/ash/session_controller_client_unittest.cc +++ b/chrome/browser/ui/ash/session_controller_client_unittest.cc
@@ -20,8 +20,7 @@ #include "chrome/browser/chromeos/policy/policy_cert_service_factory.h" #include "chrome/browser/chromeos/policy/policy_cert_verifier.h" #include "chrome/browser/chromeos/profiles/profile_helper.h" -#include "chrome/browser/chromeos/settings/cros_settings.h" -#include "chrome/browser/chromeos/settings/device_settings_service.h" +#include "chrome/browser/chromeos/settings/scoped_cros_settings_test_helper.h" #include "chrome/browser/supervised_user/supervised_user_service.h" #include "chrome/browser/supervised_user/supervised_user_service_factory.h" #include "chrome/common/pref_names.h" @@ -192,9 +191,9 @@ profile_manager_.reset( new TestingProfileManager(TestingBrowserProcess::GetGlobal())); ASSERT_TRUE(profile_manager_->SetUp()); - test_device_settings_service_.reset( - new chromeos::ScopedTestDeviceSettingsService); - test_cros_settings_.reset(new chromeos::ScopedTestCrosSettings()); + + cros_settings_test_helper_ = + std::make_unique<chromeos::ScopedCrosSettingsTestHelper>(); } void TearDown() override { @@ -270,9 +269,8 @@ // Owned by |user_manager_enabler_|. TestChromeUserManager* user_manager_ = nullptr; - std::unique_ptr<chromeos::ScopedTestDeviceSettingsService> - test_device_settings_service_; - std::unique_ptr<chromeos::ScopedTestCrosSettings> test_cros_settings_; + std::unique_ptr<chromeos::ScopedCrosSettingsTestHelper> + cros_settings_test_helper_; DISALLOW_COPY_AND_ASSIGN(SessionControllerClientTest); };
diff --git a/chrome/browser/ui/ash/wallpaper_controller_client_unittest.cc b/chrome/browser/ui/ash/wallpaper_controller_client_unittest.cc index 3145497..f71e972 100644 --- a/chrome/browser/ui/ash/wallpaper_controller_client_unittest.cc +++ b/chrome/browser/ui/ash/wallpaper_controller_client_unittest.cc
@@ -5,8 +5,7 @@ #include "chrome/browser/ui/ash/wallpaper_controller_client.h" #include "base/test/scoped_task_environment.h" -#include "chrome/browser/chromeos/settings/cros_settings.h" -#include "chrome/browser/chromeos/settings/device_settings_service.h" +#include "chrome/browser/chromeos/settings/scoped_cros_settings_test_helper.h" #include "chrome/browser/ui/ash/test_wallpaper_controller.h" #include "testing/gtest/include/gtest/gtest.h" @@ -17,13 +16,8 @@ WallpaperControllerClientTest() = default; ~WallpaperControllerClientTest() override = default; - void SetUp() override { - testing::Test::SetUp(); - chromeos::DeviceSettingsService::Initialize(); - chromeos::CrosSettings::Initialize(); - } - private: + chromeos::ScopedCrosSettingsTestHelper cros_settings_test_helper_; base::test::ScopedTaskEnvironment scoped_task_environment_; DISALLOW_COPY_AND_ASSIGN(WallpaperControllerClientTest);
diff --git a/chrome/browser/ui/autofill/autofill_popup_layout_model.cc b/chrome/browser/ui/autofill/autofill_popup_layout_model.cc index 5e9ee54..c7c3ba6 100644 --- a/chrome/browser/ui/autofill/autofill_popup_layout_model.cc +++ b/chrome/browser/ui/autofill/autofill_popup_layout_model.cc
@@ -209,6 +209,9 @@ gfx::ImageSkia AutofillPopupLayoutModel::GetIconImage(size_t index) const { std::vector<autofill::Suggestion> suggestions = delegate_->GetSuggestions(); + if (!suggestions[index].custom_icon.IsEmpty()) + return suggestions[index].custom_icon.AsImageSkia(); + const base::string16& icon_str = suggestions[index].icon; if (icon_str.empty()) return gfx::ImageSkia(); @@ -225,6 +228,10 @@ return gfx::CreateVectorIcon(toolbar::kHttpsInvalidIcon, kIconSize, gfx::kGoogleRed700); } + if (icon_str == base::ASCIIToUTF16("keyIcon")) + return gfx::CreateVectorIcon(kKeyIcon, kIconSize, gfx::kChromeIconGrey); + if (icon_str == base::ASCIIToUTF16("globeIcon")) + return gfx::CreateVectorIcon(kGlobeIcon, kIconSize, gfx::kChromeIconGrey); // For other suggestion entries, get icon from PNG files. int icon_id = GetIconResourceID(icon_str);
diff --git a/chrome/browser/ui/autofill/save_card_bubble_controller_impl.cc b/chrome/browser/ui/autofill/save_card_bubble_controller_impl.cc index 879bcd6..50052faf 100644 --- a/chrome/browser/ui/autofill/save_card_bubble_controller_impl.cc +++ b/chrome/browser/ui/autofill/save_card_bubble_controller_impl.cc
@@ -5,6 +5,7 @@ #include "chrome/browser/ui/autofill/save_card_bubble_controller_impl.h" #include <stddef.h> +#include <utility> #include "base/strings/utf_string_conversions.h" #include "chrome/browser/profiles/profile.h" @@ -249,6 +250,10 @@ browser_sync::ProfileSyncService::DISABLE_REASON_USER_CHOICE); } +bool SaveCardBubbleControllerImpl::CanAnimate() const { + return can_animate_; +} + void SaveCardBubbleControllerImpl::OnSyncPromoAccepted( const AccountInfo& account, bool is_default_promo_account) { @@ -286,6 +291,11 @@ } case BubbleType::LOCAL_SAVE: DCHECK(!local_save_card_callback_.is_null()); + // Show an animated card saved confirmation message next time + // UpdateIcon() is called. + can_animate_ = base::FeatureList::IsEnabled( + features::kAutofillSaveCardSignInAfterLocalSave); + local_save_card_callback_.Run(); local_save_card_callback_.Reset(); break; @@ -301,16 +311,14 @@ const BubbleType previous_bubble_type = current_bubble_type_; current_bubble_type_ = BubbleType::INACTIVE; - // If user just saved a card locally, and we can show the sign in promo, - // then show the sign in promo. If we can't show the sign in promo - // then |current_bubble_type_| will be set to |MANAGE_CARDS|. + // If user just saved a card locally, the next bubble can either be a sign-in + // promo or a manage cards view. If we need to show a sign-in promo, that + // will be handled by OnAnimationEnded(), otherwise clicking the icon again + // will show the MANAGE_CARDS bubble, which is set here. if (previous_bubble_type == BubbleType::LOCAL_SAVE && base::FeatureList::IsEnabled( features::kAutofillSaveCardSignInAfterLocalSave)) { - if (ShouldShowSignInPromo()) - ShowBubbleForSignInPromo(); - else - current_bubble_type_ = BubbleType::MANAGE_CARDS; + current_bubble_type_ = BubbleType::MANAGE_CARDS; } if (previous_bubble_type == BubbleType::LOCAL_SAVE || @@ -383,6 +391,17 @@ UpdateIcon(); } +void SaveCardBubbleControllerImpl::OnAnimationEnded() { + // Do not repeat the animation next time UpdateIcon() is called, unless + // explicitly set somewhere else. + can_animate_ = false; + + // We do not want to show the promo if the user clicked on the icon and the + // manage cards bubble started to show. + if (!save_card_bubble_view_) + ShowBubbleForSignInPromo(); +} + const LegalMessageLines& SaveCardBubbleControllerImpl::GetLegalMessageLines() const { return legal_message_lines_;
diff --git a/chrome/browser/ui/autofill/save_card_bubble_controller_impl.h b/chrome/browser/ui/autofill/save_card_bubble_controller_impl.h index fac019e..cbeee76 100644 --- a/chrome/browser/ui/autofill/save_card_bubble_controller_impl.h +++ b/chrome/browser/ui/autofill/save_card_bubble_controller_impl.h
@@ -86,6 +86,7 @@ // to the server -- this should change. // TODO(crbug.com/864702): Don't show promo if user is a butter user. bool ShouldShowSignInPromo() const override; + bool CanAnimate() const override; void OnSyncPromoAccepted(const AccountInfo& account, bool is_default_promo_account) override; void OnSaveButton( @@ -94,6 +95,7 @@ void OnLegalMessageLinkClicked(const GURL& url) override; void OnManageCardsClicked() override; void OnBubbleClosed() override; + void OnAnimationEnded() override; const LegalMessageLines& GetLegalMessageLines() const override; bool IsUploadSave() const override; BubbleType GetBubbleType() const override; @@ -132,6 +134,9 @@ // The web_contents associated with this controller. content::WebContents* web_contents_; + // Is true only if the card saved animation can be shown. + bool can_animate_ = false; + // Weak reference. Will be nullptr if no bubble is currently shown. SaveCardBubbleView* save_card_bubble_view_ = nullptr;
diff --git a/chrome/browser/ui/autofill/save_card_bubble_controller_impl_unittest.cc b/chrome/browser/ui/autofill/save_card_bubble_controller_impl_unittest.cc index eb030af2..bceed539 100644 --- a/chrome/browser/ui/autofill/save_card_bubble_controller_impl_unittest.cc +++ b/chrome/browser/ui/autofill/save_card_bubble_controller_impl_unittest.cc
@@ -5,6 +5,7 @@ #include "chrome/browser/ui/autofill/save_card_bubble_controller_impl.h" #include <stddef.h> +#include <string> #include <utility> #include "base/json/json_reader.h" @@ -41,7 +42,8 @@ std::make_unique<TestSaveCardBubbleControllerImpl>(web_contents)); } - // Overriding because calling the original function causes unit test to crash. + // Overriding because parent function requires a browser window to redirect + // properly, which is not available in unit tests. void ShowPaymentsSettingsPage() override{}; explicit TestSaveCardBubbleControllerImpl(content::WebContents* web_contents) @@ -130,6 +132,12 @@ controller()->ReshowBubble(); } + void ClickSaveButton() { + controller()->OnSaveButton(); + if (controller()->CanAnimate()) + controller()->OnAnimationEnded(); + } + protected: TestSaveCardBubbleControllerImpl* controller() { return static_cast<TestSaveCardBubbleControllerImpl*>( @@ -264,7 +272,7 @@ ShowLocalBubble(); base::HistogramTester histogram_tester; - controller()->OnSaveButton(); + ClickSaveButton(); controller()->OnBubbleClosed(); histogram_tester.ExpectUniqueSample( @@ -277,7 +285,7 @@ CloseAndReshowBubble(); base::HistogramTester histogram_tester; - controller()->OnSaveButton(); + ClickSaveButton(); controller()->OnBubbleClosed(); histogram_tester.ExpectUniqueSample( @@ -290,7 +298,7 @@ ShowUploadBubble(/*should_request_name_from_user=*/true); base::HistogramTester histogram_tester; - controller()->OnSaveButton(); + ClickSaveButton(); controller()->OnBubbleClosed(); histogram_tester.ExpectUniqueSample( @@ -304,7 +312,7 @@ CloseAndReshowBubble(); base::HistogramTester histogram_tester; - controller()->OnSaveButton(); + ClickSaveButton(); controller()->OnBubbleClosed(); histogram_tester.ExpectUniqueSample( @@ -376,7 +384,7 @@ controller()->OnBubbleClosed(); ShowLocalBubble(); - controller()->OnSaveButton(); + ClickSaveButton(); controller()->OnBubbleClosed(); ShowLocalBubble(); @@ -415,7 +423,7 @@ controller()->OnBubbleClosed(); ShowUploadBubble(); - controller()->OnSaveButton(); + ClickSaveButton(); controller()->OnBubbleClosed(); ShowUploadBubble(); @@ -923,7 +931,7 @@ features::kAutofillSaveCardSignInAfterLocalSave); ShowLocalBubble(); - controller()->OnSaveButton(); + ClickSaveButton(); // Sign-in promo should be shown after accepting local save. EXPECT_EQ(BubbleType::SIGN_IN_PROMO, controller()->GetBubbleType()); @@ -935,7 +943,7 @@ features::kAutofillSaveCardSignInAfterLocalSave); ShowLocalBubble(); - controller()->OnSaveButton(); + ClickSaveButton(); // When this flag is disabled, no promo should appear and // the icon should go away. @@ -966,7 +974,7 @@ features::kAutofillSaveCardSignInAfterLocalSave); ShowLocalBubble(); - controller()->OnSaveButton(); + ClickSaveButton(); CloseAndReshowBubble(); // After closing the sign-in promo, clicking the icon should bring @@ -1018,7 +1026,7 @@ features::kAutofillSaveCardSignInAfterLocalSave); ShowLocalBubble(); - controller()->OnSaveButton(); + ClickSaveButton(); CloseAndReshowBubble(); controller()->OnBubbleClosed(); @@ -1108,7 +1116,7 @@ features::kAutofillSaveCardSignInAfterLocalSave); ShowUploadBubble(); - controller()->OnSaveButton(); + ClickSaveButton(); // Icon should disappear after an upload save, // even when this flag is enabled.
diff --git a/chrome/browser/ui/browser.cc b/chrome/browser/ui/browser.cc index a696cf3..46f4382 100644 --- a/chrome/browser/ui/browser.cc +++ b/chrome/browser/ui/browser.cc
@@ -408,12 +408,8 @@ CHECK(IncognitoModePrefs::CanOpenBrowser(profile_)); CHECK(!profile_->IsGuestSession() || profile_->IsOffTheRecord()) << "Only off the record browser may be opened in guest mode"; - DCHECK(!profile_->IsSystemProfile()) + CHECK(!profile_->IsSystemProfile()) << "The system profile should never have a real browser."; - // TODO(mlerman): After this hits stable channel, see if there are counts - // for this metric. If not, change the DCHECK above to a CHECK. - if (profile_->IsSystemProfile()) - base::RecordAction(base::UserMetricsAction("BrowserForSystemProfile")); // TODO(jeremy): Move to initializer list once flag is removed. if (IsFastTabUnloadEnabled())
diff --git a/chrome/browser/ui/browser_tab_strip_tracker.cc b/chrome/browser/ui/browser_tab_strip_tracker.cc index cfd10f82..bd5b2e1 100644 --- a/chrome/browser/ui/browser_tab_strip_tracker.cc +++ b/chrome/browser/ui/browser_tab_strip_tracker.cc
@@ -83,7 +83,8 @@ TabStripModelChange change(TabStripModelChange::kInserted, deltas); TabStripSelectionChange selection(tab_strip_model->GetActiveWebContents(), tab_strip_model->selection_model()); - tab_strip_model_observer_->OnTabStripModelChanged(change, selection); + tab_strip_model_observer_->OnTabStripModelChanged(tab_strip_model, change, + selection); } void BrowserTabStripTracker::OnBrowserAdded(Browser* browser) {
diff --git a/chrome/browser/ui/cocoa/bookmarks/bookmark_menu_bridge.mm b/chrome/browser/ui/cocoa/bookmarks/bookmark_menu_bridge.mm index f8b29b4..a15aa3a 100644 --- a/chrome/browser/ui/cocoa/bookmarks/bookmark_menu_bridge.mm +++ b/chrome/browser/ui/cocoa/bookmarks/bookmark_menu_bridge.mm
@@ -245,7 +245,7 @@ void BookmarkMenuBridge::AddNodeAsSubmenu(NSMenu* menu, const BookmarkNode* node, NSImage* image) { - NSString* title = base::SysUTF16ToNSString(node->GetTitle()); + NSString* title = [BookmarkMenuCocoaController menuTitleForNode:node]; base::scoped_nsobject<NSMenuItem> items( [[NSMenuItem alloc] initWithTitle:title action:nil keyEquivalent:@""]); [items setImage:image];
diff --git a/chrome/browser/ui/cocoa/bubble_anchor_helper_views.mm b/chrome/browser/ui/cocoa/bubble_anchor_helper_views.mm index 1f88895..3d950a2 100644 --- a/chrome/browser/ui/cocoa/bubble_anchor_helper_views.mm +++ b/chrome/browser/ui/cocoa/bubble_anchor_helper_views.mm
@@ -15,7 +15,7 @@ #import "chrome/browser/ui/cocoa/location_bar/manage_passwords_decoration.h" #import "chrome/browser/ui/cocoa/location_bar/page_info_bubble_decoration.h" #import "chrome/browser/ui/cocoa/location_bar/save_credit_card_decoration.h" -#include "ui/views/bubble/bubble_dialog_delegate.h" +#include "ui/views/bubble/bubble_dialog_delegate_view.h" #include "ui/views/widget/widget_observer.h" namespace {
diff --git a/chrome/browser/ui/cocoa/bubble_anchor_helper_views_unittest.mm b/chrome/browser/ui/cocoa/bubble_anchor_helper_views_unittest.mm index 8228d70..7e60124 100644 --- a/chrome/browser/ui/cocoa/bubble_anchor_helper_views_unittest.mm +++ b/chrome/browser/ui/cocoa/bubble_anchor_helper_views_unittest.mm
@@ -9,7 +9,7 @@ #include "base/test/scoped_feature_list.h" #include "testing/gtest/include/gtest/gtest.h" #include "ui/base/ui_base_features.h" -#include "ui/views/bubble/bubble_dialog_delegate.h" +#include "ui/views/bubble/bubble_dialog_delegate_view.h" #include "ui/views/test/views_test_base.h" #include "ui/views/widget/widget.h"
diff --git a/chrome/browser/ui/cocoa/download/download_shelf_controller.mm b/chrome/browser/ui/cocoa/download/download_shelf_controller.mm index 72f6d89..7074f4b 100644 --- a/chrome/browser/ui/cocoa/download/download_shelf_controller.mm +++ b/chrome/browser/ui/cocoa/download/download_shelf_controller.mm
@@ -334,17 +334,6 @@ if ([self isVisible] == show) return; - if (!show) { - int numInProgress = 0; - for (NSUInteger i = 0; i < [downloadItemControllers_ count]; ++i) { - DownloadItem* item = [[downloadItemControllers_ objectAtIndex:i]download]; - if (item->GetState() == DownloadItem::IN_PROGRESS) - ++numInProgress; - } - RecordDownloadShelfClose( - [downloadItemControllers_ count], numInProgress, !isUserAction); - } - // Animate the shelf out, but not in. // TODO(rohitrao): We do not animate on the way in because Cocoa is already // doing a lot of work to set up the download arrow animation. I've chosen to
diff --git a/chrome/browser/ui/cocoa/extensions/extension_popup_views_mac.mm b/chrome/browser/ui/cocoa/extensions/extension_popup_views_mac.mm index 1eb5c296..2383e89 100644 --- a/chrome/browser/ui/cocoa/extensions/extension_popup_views_mac.mm +++ b/chrome/browser/ui/cocoa/extensions/extension_popup_views_mac.mm
@@ -9,7 +9,7 @@ #include "chrome/browser/extensions/extension_view_host.h" #import "chrome/browser/ui/cocoa/bubble_anchor_helper_views.h" #include "ui/gfx/geometry/point.h" -#include "ui/views/bubble/bubble_dialog_delegate.h" +#include "ui/views/bubble/bubble_dialog_delegate_view.h" ExtensionPopupViewsMac::~ExtensionPopupViewsMac() { // ObjC id collides with views::View::id().
diff --git a/chrome/browser/ui/cocoa/page_info/page_info_bubble_views_mac_browsertest.mm b/chrome/browser/ui/cocoa/page_info/page_info_bubble_views_mac_browsertest.mm index 9fb583b..6080194 100644 --- a/chrome/browser/ui/cocoa/page_info/page_info_bubble_views_mac_browsertest.mm +++ b/chrome/browser/ui/cocoa/page_info/page_info_bubble_views_mac_browsertest.mm
@@ -21,7 +21,7 @@ #import "ui/base/test/scoped_fake_nswindow_fullscreen.h" #include "ui/base/ui_base_features.h" #include "ui/base/ui_base_switches.h" -#include "ui/views/bubble/bubble_dialog_delegate.h" +#include "ui/views/bubble/bubble_dialog_delegate_view.h" #include "ui/views/widget/widget.h" #include "url/url_constants.h"
diff --git a/chrome/browser/ui/cocoa/permission_bubble/chooser_bubble_ui_views_mac.mm b/chrome/browser/ui/cocoa/permission_bubble/chooser_bubble_ui_views_mac.mm index e8d1a46..fdfc486 100644 --- a/chrome/browser/ui/cocoa/permission_bubble/chooser_bubble_ui_views_mac.mm +++ b/chrome/browser/ui/cocoa/permission_bubble/chooser_bubble_ui_views_mac.mm
@@ -15,7 +15,7 @@ #import "chrome/browser/ui/cocoa/bubble_anchor_helper_views.h" #import "chrome/browser/ui/cocoa/permission_bubble/chooser_bubble_ui_cocoa.h" #include "chrome/browser/ui/permission_bubble/chooser_bubble_delegate.h" -#include "ui/views/bubble/bubble_dialog_delegate.h" +#include "ui/views/bubble/bubble_dialog_delegate_view.h" void ChooserBubbleUi::CreateAndShowCocoa(
diff --git a/chrome/browser/ui/cocoa/touchbar/text_suggestions_touch_bar_controller.h b/chrome/browser/ui/cocoa/touchbar/text_suggestions_touch_bar_controller.h index bc12baa4..9ed29bd 100644 --- a/chrome/browser/ui/cocoa/touchbar/text_suggestions_touch_bar_controller.h +++ b/chrome/browser/ui/cocoa/touchbar/text_suggestions_touch_bar_controller.h
@@ -45,7 +45,8 @@ API_AVAILABLE(macos(10.12.2)); - (void)updateTextSelection:(const base::string16&)text - range:(const gfx::Range&)range; + range:(const gfx::Range&)range + offset:(size_t)offset; // Returns a range from start to the end of the word that the cursor is // currently in. @@ -72,7 +73,7 @@ - (NSArray*)suggestions; - (WebTextfieldTouchBarController*)controller; - (void)setShouldIgnoreReplacementSelection:(BOOL)shouldIgnore; -- (void)setEditingWordRange:(const gfx::Range&)range; +- (void)setEditingWordRange:(const gfx::Range&)range offset:(size_t)offset; @end
diff --git a/chrome/browser/ui/cocoa/touchbar/text_suggestions_touch_bar_controller.mm b/chrome/browser/ui/cocoa/touchbar/text_suggestions_touch_bar_controller.mm index f67cf72..c4c3c22 100644 --- a/chrome/browser/ui/cocoa/touchbar/text_suggestions_touch_bar_controller.mm +++ b/chrome/browser/ui/cocoa/touchbar/text_suggestions_touch_bar_controller.mm
@@ -32,13 +32,14 @@ } void DidChangeTextSelection(const base::string16& text, - const gfx::Range& range) override { - [owner_ updateTextSelection:text range:range]; + const gfx::Range& range, + size_t offset) override { + [owner_ updateTextSelection:text range:range offset:offset]; } void DidFinishLoad(content::RenderFrameHost* render_frame_host, const GURL& validated_url) override { - [owner_ updateTextSelection:base::string16() range:gfx::Range()]; + [owner_ updateTextSelection:base::string16() range:gfx::Range() offset:0]; } private: @@ -73,6 +74,11 @@ // cursor. NSRange editingWordRange_; + // The location of |editingWordRange_| within the total text, which may be + // longer than the text received on text selection update. Used for checking + // when to ignore replacement text selections. + NSRange offsetEditingWordRange_; + // When YES, -updateTextSelection:range: should ignore a text selection that // is equal to the editing word range. Set to YES when // -replaceEditingWordWithSuggestion: modifies the current text selection. @@ -153,10 +159,11 @@ } - (void)updateTextSelection:(const base::string16&)text - range:(const gfx::Range&)range { + range:(const gfx::Range&)range + offset:(size_t)offset { if (@available(macOS 10.12.2, *)) { if (shouldIgnoreReplacementSelection_ && - range == gfx::Range(editingWordRange_)) { + range == gfx::Range(offsetEditingWordRange_)) { shouldIgnoreReplacementSelection_ = NO; return; } @@ -167,9 +174,13 @@ } text_.reset([base::SysUTF16ToNSString(text) retain]); - selectionRange_ = range.ToNSRange(); + selectionRange_ = + NSMakeRange(range.start() - offset, range.end() - range.start()); editingWordRange_ = - [self editingWordRangeFromText:text cursorPosition:range.start()]; + [self editingWordRangeFromText:text + cursorPosition:selectionRange_.location]; + offsetEditingWordRange_ = NSMakeRange(editingWordRange_.location + offset, + editingWordRange_.length); [self requestSuggestions]; } } @@ -255,10 +266,12 @@ webContents_->GetTopLevelRenderWidgetHostView()->GetSurroundingText(); const gfx::Range range = webContents_->GetTopLevelRenderWidgetHostView()->GetSelectedRange(); + const size_t offset = webContents_->GetTopLevelRenderWidgetHostView() + ->GetOffsetForSurroundingText(); if (range.IsValid()) - [self updateTextSelection:text range:range]; + [self updateTextSelection:text range:range offset:offset]; else - [self updateTextSelection:base::string16() range:gfx::Range()]; + [self updateTextSelection:base::string16() range:gfx::Range() offset:0]; } - (content::WebContents*)webContents { @@ -297,8 +310,10 @@ shouldIgnoreReplacementSelection_ = shouldIgnore; } -- (void)setEditingWordRange:(const gfx::Range&)range { +- (void)setEditingWordRange:(const gfx::Range&)range offset:(size_t)offset { editingWordRange_ = range.ToNSRange(); + offsetEditingWordRange_ = NSMakeRange(editingWordRange_.location + offset, + editingWordRange_.length); } @end
diff --git a/chrome/browser/ui/cocoa/touchbar/text_suggestions_touch_bar_controller_browsertest.mm b/chrome/browser/ui/cocoa/touchbar/text_suggestions_touch_bar_controller_browsertest.mm index a2d25b9..981ef4fd 100644 --- a/chrome/browser/ui/cocoa/touchbar/text_suggestions_touch_bar_controller_browsertest.mm +++ b/chrome/browser/ui/cocoa/touchbar/text_suggestions_touch_bar_controller_browsertest.mm
@@ -7,6 +7,7 @@ #include "base/mac/mac_util.h" #include "base/mac/scoped_nsobject.h" #include "base/strings/sys_string_conversions.h" +#include "base/strings/utf_string_conversions.h" #include "base/test/scoped_feature_list.h" #include "build/build_config.h" #include "chrome/browser/ui/browser.h" @@ -146,7 +147,8 @@ [web_textfield_controller_ resetNumInvalidations]; [touch_bar_controller_ updateTextSelection:base::SysNSStringToUTF16(kText) - range:kRange]; + range:kRange + offset:0]; EXPECT_STREQ(kEmptyText.UTF8String, [touch_bar_controller_ text].UTF8String); EXPECT_EQ(kEmptyRange, [touch_bar_controller_ selectionRange]); if (@available(macOS 10.12.2, *)) @@ -165,7 +167,8 @@ [web_textfield_controller_ resetNumInvalidations]; [touch_bar_controller_ updateTextSelection:base::SysNSStringToUTF16(kText) - range:kRange]; + range:kRange + offset:0]; if (@available(macOS 10.12.2, *)) { EXPECT_STREQ(kText.UTF8String, [touch_bar_controller_ text].UTF8String); EXPECT_EQ(kRange, [touch_bar_controller_ selectionRange]); @@ -223,16 +226,20 @@ // If ignoreReplacementSelection is YES and new selection range is equal to // editing word range, ignore text selection update. [touch_bar_controller_ setShouldIgnoreReplacementSelection:YES]; - [touch_bar_controller_ setEditingWordRange:kEmptyRange]; - [touch_bar_controller_ updateTextSelection:kEmptyText range:kEmptyRange]; + [touch_bar_controller_ setEditingWordRange:kEmptyRange offset:0]; + [touch_bar_controller_ updateTextSelection:kEmptyText + range:kEmptyRange + offset:0]; EXPECT_STREQ(kText.UTF8String, [touch_bar_controller_ text].UTF8String); EXPECT_EQ(kRange, [touch_bar_controller_ selectionRange]); // If ignoreReplacementSelection is YES but new selection range is not equal // to editing word range, do not ignore text selection update. [touch_bar_controller_ setShouldIgnoreReplacementSelection:YES]; - [touch_bar_controller_ setEditingWordRange:kRange]; - [touch_bar_controller_ updateTextSelection:kEmptyText range:kEmptyRange]; + [touch_bar_controller_ setEditingWordRange:kRange offset:0]; + [touch_bar_controller_ updateTextSelection:kEmptyText + range:kEmptyRange + offset:0]; if (@available(macOS 10.12.2, *)) { EXPECT_STREQ("", [touch_bar_controller_ text].UTF8String); EXPECT_EQ(gfx::Range(), [touch_bar_controller_ selectionRange]); @@ -247,8 +254,10 @@ // If ignoreReplacementSelection is NO and new selection range is equal to // editing word range, do not ignore text selection update. [touch_bar_controller_ setShouldIgnoreReplacementSelection:NO]; - [touch_bar_controller_ setEditingWordRange:kEmptyRange]; - [touch_bar_controller_ updateTextSelection:kEmptyText range:kEmptyRange]; + [touch_bar_controller_ setEditingWordRange:kEmptyRange offset:0]; + [touch_bar_controller_ updateTextSelection:kEmptyText + range:kEmptyRange + offset:0]; if (@available(macOS 10.12.2, *)) { EXPECT_STREQ("", [touch_bar_controller_ text].UTF8String); EXPECT_EQ(gfx::Range(), [touch_bar_controller_ selectionRange]); @@ -258,4 +267,35 @@ } } +// Tests that offsets are properly handled. +IN_PROC_BROWSER_TEST_F(TextSuggestionsTouchBarControllerTest, Offset) { + const base::string16 kText = + base::string16(base::ASCIIToUTF16("hello world")); + const gfx::Range kRange = gfx::Range(3, 3); + const size_t kOffset = 1; + const gfx::Range kOffsetRange = + gfx::Range(kRange.start() - kOffset, kRange.end() - kOffset); + + FocusTextfield(); + [touch_bar_controller_ setSelectionRange:gfx::Range()]; + + // |selectionRange_| should include offset. + [touch_bar_controller_ updateTextSelection:kText range:kRange offset:kOffset]; + if (@available(macOS 10.12.2, *)) + EXPECT_EQ(kOffsetRange, [touch_bar_controller_ selectionRange]); + else + EXPECT_EQ(gfx::Range(), [touch_bar_controller_ selectionRange]); + + // The check for ignoring text selection updates should still work with + // offsets. + [touch_bar_controller_ setShouldIgnoreReplacementSelection:YES]; + [touch_bar_controller_ updateTextSelection:kText + range:gfx::Range(1, 7) + offset:kOffset]; + if (@available(macOS 10.12.2, *)) + EXPECT_EQ(kOffsetRange, [touch_bar_controller_ selectionRange]); + else + EXPECT_EQ(gfx::Range(), [touch_bar_controller_ selectionRange]); +} + } // namespace \ No newline at end of file
diff --git a/chrome/browser/ui/interventions/OWNERS b/chrome/browser/ui/interventions/OWNERS index 95d4231..22809c7d 100644 --- a/chrome/browser/ui/interventions/OWNERS +++ b/chrome/browser/ui/interventions/OWNERS
@@ -1,3 +1,2 @@ bauerb@chromium.org -dgn@chromium.org mdjones@chromium.org
diff --git a/chrome/browser/ui/libgtkui/gtk_ui.cc b/chrome/browser/ui/libgtkui/gtk_ui.cc index ce8dc75..f6eec62 100644 --- a/chrome/browser/ui/libgtkui/gtk_ui.cc +++ b/chrome/browser/ui/libgtkui/gtk_ui.cc
@@ -46,6 +46,7 @@ #include "third_party/skia/include/core/SkCanvas.h" #include "third_party/skia/include/core/SkColor.h" #include "third_party/skia/include/core/SkShader.h" +#include "ui/base/material_design/material_design_controller.h" #include "ui/base/resource/resource_bundle.h" #include "ui/display/display.h" #include "ui/events/keycodes/dom/dom_code.h" @@ -1013,7 +1014,9 @@ colors_[ThemeProperties::COLOR_TAB_TEXT] = tab_text_color; colors_[ThemeProperties::COLOR_BOOKMARK_TEXT] = tab_text_color; colors_[ThemeProperties::COLOR_BACKGROUND_TAB_TEXT] = - color_utils::BlendTowardOppositeLuma(tab_text_color, 50); + ui::MaterialDesignController::IsRefreshUi() + ? GetFgColor(header_selector + " GtkLabel") + : color_utils::BlendTowardOppositeLuma(tab_text_color, 50); SkColor location_bar_border = GetBorderColor("GtkEntry#entry"); if (SkColorGetA(location_bar_border)) @@ -1041,12 +1044,18 @@ // These colors represent the border drawn around tabs and between // the tabstrip and toolbar. - SkColor toolbar_top_separator = GetToolbarTopSeparatorColor( - GetBorderColor(header_selector + " GtkButton#button"), frame_color, - tab_border, tab_color); - SkColor toolbar_top_separator_inactive = GetToolbarTopSeparatorColor( - GetBorderColor(header_selector + ":backdrop GtkButton#button"), - frame_color_inactive, tab_border, tab_color); + SkColor toolbar_top_separator = + GetBorderColor(header_selector + " GtkButton#button"); + SkColor toolbar_top_separator_inactive = + GetBorderColor(header_selector + ":backdrop GtkButton#button"); + if (!ui::MaterialDesignController::IsRefreshUi()) { + toolbar_top_separator = GetToolbarTopSeparatorColor( + toolbar_top_separator, frame_color, tab_border, tab_color); + toolbar_top_separator_inactive = GetToolbarTopSeparatorColor( + toolbar_top_separator_inactive, frame_color_inactive, tab_border, + tab_color); + } + // Unlike with toolbars, we always want a border around tabs, so let // ThemeService choose the border color if the theme doesn't provide one. if (SkColorGetA(toolbar_top_separator) && @@ -1069,10 +1078,16 @@ colors_[ThemeProperties::COLOR_TOOLBAR] = tab_color; colors_[ThemeProperties::COLOR_CONTROL_BACKGROUND] = tab_color; - colors_[ThemeProperties::COLOR_BACKGROUND_TAB] = - color_utils::HSLShift(tab_color, kDefaultTintBackgroundTab); - colors_[ThemeProperties::COLOR_BACKGROUND_TAB_INCOGNITO] = - color_utils::HSLShift(tab_color, kDefaultTintBackgroundTabIncognito); + if (ui::MaterialDesignController::IsRefreshUi()) { + colors_[ThemeProperties::COLOR_BACKGROUND_TAB] = SK_ColorTRANSPARENT; + colors_[ThemeProperties::COLOR_BACKGROUND_TAB_INCOGNITO] = + SK_ColorTRANSPARENT; + } else { + colors_[ThemeProperties::COLOR_BACKGROUND_TAB] = + color_utils::HSLShift(tab_color, kDefaultTintBackgroundTab); + colors_[ThemeProperties::COLOR_BACKGROUND_TAB_INCOGNITO] = + color_utils::HSLShift(tab_color, kDefaultTintBackgroundTabIncognito); + } colors_[ThemeProperties::COLOR_NTP_LINK] = native_theme_->GetSystemColor( ui::NativeTheme::kColorId_TextfieldSelectionBackgroundFocused);
diff --git a/chrome/browser/ui/omnibox/idn_navigation_observer.cc b/chrome/browser/ui/omnibox/idn_navigation_observer.cc index a4ce11c..4db973c 100644 --- a/chrome/browser/ui/omnibox/idn_navigation_observer.cc +++ b/chrome/browser/ui/omnibox/idn_navigation_observer.cc
@@ -49,8 +49,15 @@ void IdnNavigationObserver::NavigationEntryCommitted( const content::LoadCommittedDetails& load_details) { const GURL url = load_details.entry->GetVirtualURL(); - const base::StringPiece host = url.host_piece(); + // If the user has engaged with this site, don't show any lookalike + // navigation suggestions. + Profile* profile = + Profile::FromBrowserContext(web_contents()->GetBrowserContext()); + SiteEngagementService* service = SiteEngagementService::Get(profile); + if (service->IsEngagementAtLeast(url, blink::mojom::EngagementLevel::LOW)) + return; + const base::StringPiece host = url.host_piece(); url_formatter::IDNConversionResult result = url_formatter::IDNToUnicodeWithDetails(host); if (!result.has_idn_component) @@ -58,7 +65,7 @@ std::string matched_domain; if (result.matching_top_domain.empty()) { - matched_domain = GetMatchingSiteEngagementDomain(url); + matched_domain = GetMatchingSiteEngagementDomain(service, url); if (matched_domain.empty()) return; RecordEvent(NavigationSuggestionEvent::kMatchSiteEngagement); @@ -92,13 +99,8 @@ } std::string IdnNavigationObserver::GetMatchingSiteEngagementDomain( + SiteEngagementService* service, const GURL& url) { - Profile* profile = - Profile::FromBrowserContext(web_contents()->GetBrowserContext()); - SiteEngagementService* service = SiteEngagementService::Get(profile); - if (service->IsEngagementAtLeast(url, blink::mojom::EngagementLevel::LOW)) - return std::string(); - // Compute skeletons using eTLD+1. const std::string domain_and_registry = net::registry_controlled_domains::GetDomainAndRegistry( @@ -120,7 +122,8 @@ blink::mojom::EngagementLevel::LOW)) continue; - // If this is already an engaged site, don't suggest any alternatives. + // If the user has engaged with eTLD+1 of this site, don't show any + // lookalike navigation suggestions. const std::string engaged_domain_and_registry = net::registry_controlled_domains::GetDomainAndRegistry( detail.origin,
diff --git a/chrome/browser/ui/omnibox/idn_navigation_observer.h b/chrome/browser/ui/omnibox/idn_navigation_observer.h index 60ffce8..d17c24a 100644 --- a/chrome/browser/ui/omnibox/idn_navigation_observer.h +++ b/chrome/browser/ui/omnibox/idn_navigation_observer.h
@@ -8,6 +8,8 @@ #include "content/public/browser/web_contents_observer.h" #include "content/public/browser/web_contents_user_data.h" +class SiteEngagementService; + // Observes navigations and shows an infobar if an IDN hostname visually looks // like a top domain. class IdnNavigationObserver @@ -41,7 +43,8 @@ private: // Returns a site that the user has used before that |url| may be attempting // to spoof, based on skeleton comparison. - std::string GetMatchingSiteEngagementDomain(const GURL& url); + std::string GetMatchingSiteEngagementDomain(SiteEngagementService* service, + const GURL& url); }; #endif // CHROME_BROWSER_UI_OMNIBOX_IDN_NAVIGATION_OBSERVER_H_
diff --git a/chrome/browser/ui/omnibox/idn_navigation_observer_browsertest.cc b/chrome/browser/ui/omnibox/idn_navigation_observer_browsertest.cc index 06670198..0a67cf5 100644 --- a/chrome/browser/ui/omnibox/idn_navigation_observer_browsertest.cc +++ b/chrome/browser/ui/omnibox/idn_navigation_observer_browsertest.cc
@@ -45,6 +45,18 @@ ->ResetBaseScoreForURL(url, score); } + void TestInfobarNotShown(const GURL& navigated_url) { + content::WebContents* web_contents = + browser()->tab_strip_model()->GetActiveWebContents(); + InfoBarService* infobar_service = + InfoBarService::FromWebContents(web_contents); + + content::TestNavigationObserver navigation_observer(web_contents, 1); + ui_test_utils::NavigateToURL(browser(), navigated_url); + navigation_observer.Wait(); + EXPECT_EQ(0u, infobar_service->infobar_count()); + } + void TestInfobarShown(const GURL& navigated_url, const GURL& expected_suggested_url) { // Sanity check navigated_url. @@ -100,30 +112,16 @@ // Navigating to a non-IDN shouldn't show an infobar. IN_PROC_BROWSER_TEST_P(IdnNavigationObserverBrowserTest, NonIdn_NoInfobar) { - content::WebContents* web_contents = - browser()->tab_strip_model()->GetActiveWebContents(); - InfoBarService* infobar_service = - InfoBarService::FromWebContents(web_contents); - content::TestNavigationObserver navigation_observer(web_contents, 1); - ui_test_utils::NavigateToURL( - browser(), embedded_test_server()->GetURL("google.com", "/title1.html")); - navigation_observer.Wait(); - EXPECT_EQ(0u, infobar_service->infobar_count()); + TestInfobarNotShown( + embedded_test_server()->GetURL("google.com", "/title1.html")); } // Navigating to a domain whose visual representation does not look like a // top domain shouldn't show an infobar. IN_PROC_BROWSER_TEST_P(IdnNavigationObserverBrowserTest, NonTopDomainIdn_NoInfobar) { - content::WebContents* web_contents = - browser()->tab_strip_model()->GetActiveWebContents(); - InfoBarService* infobar_service = - InfoBarService::FromWebContents(web_contents); - - content::TestNavigationObserver navigation_observer(web_contents, 1); - ui_test_utils::NavigateToURL( - browser(), embedded_test_server()->GetURL("éxample.com", "/title1.html")); - EXPECT_EQ(0u, infobar_service->infobar_count()); + TestInfobarNotShown( + embedded_test_server()->GetURL("éxample.com", "/title1.html")); } // Navigating to a domain whose visual representation looks like a top domain @@ -151,6 +149,19 @@ IdnNavigationObserver::NavigationSuggestionEvent::kMatchTopSite, 1); } +// Same as TopDomainIdn_Infobar but the user has engaged with the domain before. +// Shouldn't show an infobar. +IN_PROC_BROWSER_TEST_P(IdnNavigationObserverBrowserTest, + TopDomainIdn_EngagedSite_NoInfobar) { + if (!IsFeatureEnabled()) + return; + + // If the user already engaged with the site, the infobar shouldn't be shown. + const GURL url = embedded_test_server()->GetURL("googlé.com", "/title1.html"); + SetSiteEngagementScore(url, 20); + TestInfobarNotShown(url); +} + // Navigating to a domain whose visual representation looks like a domain with a // site engagement score above a certain threshold should show a "Did you mean // to go to ..." infobar. @@ -204,16 +215,9 @@ // The infobar shouldn't be shown when the feature is disabled. IN_PROC_BROWSER_TEST_P(IdnNavigationObserverBrowserTest, TopDomainIdn_FeatureDisabled) { - if (GetParam()) + if (IsFeatureEnabled()) return; - content::WebContents* web_contents = - browser()->tab_strip_model()->GetActiveWebContents(); - InfoBarService* infobar_service = - InfoBarService::FromWebContents(web_contents); - - content::TestNavigationObserver navigation_observer(web_contents, 1); - ui_test_utils::NavigateToURL( - browser(), embedded_test_server()->GetURL("googlé.com", "/title1.html")); - EXPECT_EQ(0u, infobar_service->infobar_count()); + TestInfobarNotShown( + embedded_test_server()->GetURL("googlé.com", "/title1.html")); }
diff --git a/chrome/browser/ui/search/ntp_user_data_logger.cc b/chrome/browser/ui/search/ntp_user_data_logger.cc index 80205108..bea2a55 100644 --- a/chrome/browser/ui/search/ntp_user_data_logger.cc +++ b/chrome/browser/ui/search/ntp_user_data_logger.cc
@@ -15,8 +15,10 @@ #include "chrome/browser/themes/theme_service.h" #include "chrome/browser/themes/theme_service_factory.h" #include "chrome/browser/ui/search/ntp_user_data_types.h" +#include "chrome/common/pref_names.h" #include "chrome/common/url_constants.h" #include "components/ntp_tiles/metrics.h" +#include "components/prefs/pref_service.h" #include "content/public/browser/navigation_details.h" #include "content/public/browser/navigation_entry.h" #include "content/public/browser/web_contents.h" @@ -85,6 +87,10 @@ VOICE_ERROR_MAX }; +// Key used in prefs::kNtpCustomBackgroundDict to save a background image URL. +// TODO(crbug.com/873699): Refactor customization check for better testability. +const char* kNtpCustomBackgroundURL = "background_url"; + // Logs BackgroundCustomization availability on the NTP, void LogBackgroundCustomizationAvailability( BackgroundCustomization availability) { @@ -186,6 +192,10 @@ CustomizeShortcutAction LoggingEventToCustomizeShortcutAction( NTPLoggingEventType event) { switch (event) { + case NTP_CUSTOMIZE_SHORTCUT_ADD: + return CustomizeShortcutAction::CUSTOMIZE_SHORTCUT_ACTION_ADD; + case NTP_CUSTOMIZE_SHORTCUT_UPDATE: + return CustomizeShortcutAction::CUSTOMIZE_SHORTCUT_ACTION_UPDATE; case NTP_CUSTOMIZE_SHORTCUT_REMOVE: return CustomizeShortcutAction::CUSTOMIZE_SHORTCUT_ACTION_REMOVE; case NTP_CUSTOMIZE_SHORTCUT_CANCEL: @@ -321,12 +331,21 @@ void NTPUserDataLogger::LogEvent(NTPLoggingEventType event, base::TimeDelta time) { + if (event == NTP_ALL_TILES_LOADED) { + EmitNtpStatistics(time); + } + + // All other events can only be logged by the Google NTP + if (!DefaultSearchProviderIsGoogle()) { + return; + } + switch (event) { case NTP_ALL_TILES_RECEIVED: tiles_received_time_ = time; break; case NTP_ALL_TILES_LOADED: - EmitNtpStatistics(time); + // permitted above for non-Google search providers break; case NTP_VOICE_ACTION_ACTIVATE_FAKEBOX: case NTP_VOICE_ACTION_ACTIVATE_KEYBOARD: @@ -404,6 +423,8 @@ "NewTabPage.CustomizeLocalImageBackgroundAction", LoggingEventToCustomizeLocalImageBackgroundAction(event)); break; + case NTP_CUSTOMIZE_SHORTCUT_ADD: + case NTP_CUSTOMIZE_SHORTCUT_UPDATE: case NTP_CUSTOMIZE_SHORTCUT_REMOVE: case NTP_CUSTOMIZE_SHORTCUT_CANCEL: case NTP_CUSTOMIZE_SHORTCUT_DONE: @@ -468,6 +489,18 @@ return !theme_service->GetThemeID().empty(); } +bool NTPUserDataLogger::CustomBackgroundIsConfigured() const { + const base::DictionaryValue* background_info = + profile_->GetPrefs()->GetDictionary(prefs::kNtpCustomBackgroundDict); + const base::Value* background_url = + background_info->FindKey(kNtpCustomBackgroundURL); + if (!background_url) { + return false; + } + GURL custom_background_url(background_url->GetString()); + return custom_background_url.is_valid(); +} + void NTPUserDataLogger::EmitNtpStatistics(base::TimeDelta load_time) { // We only send statistics once per page. if (has_emitted_) { @@ -582,6 +615,11 @@ ShortcutCustomization::SHORTCUT_CUSTOMIZATION_UNAVAILABLE_FEATURE); } + if (CustomBackgroundIsConfigured()) { + UMA_HISTOGRAM_ENUMERATION( + "NewTabPage.Customized", + LoggingEventToCustomizedFeature(NTP_BACKGROUND_CUSTOMIZED)); + } has_emitted_ = true; during_startup_ = false; }
diff --git a/chrome/browser/ui/search/ntp_user_data_logger.h b/chrome/browser/ui/search/ntp_user_data_logger.h index 305e8b5..4f5068c 100644 --- a/chrome/browser/ui/search/ntp_user_data_logger.h +++ b/chrome/browser/ui/search/ntp_user_data_logger.h
@@ -43,7 +43,8 @@ // Called when an event occurs on the NTP that requires a counter to be // incremented. |time| is the delta time from navigation start until this - // event happened. + // event happened. The NTP_ALL_TILES_LOADED event may be logged from all NTPs; + // all others require Google as the default search provider. void LogEvent(NTPLoggingEventType event, base::TimeDelta time); // Logs an impression on one of the NTP tiles by given details. @@ -82,6 +83,9 @@ // Returns whether a theme is configured. Virtual for testing. virtual bool ThemeIsConfigured() const; + // Returns whether a custom background is configured. Virtual for testing. + virtual bool CustomBackgroundIsConfigured() const; + // Logs a number of statistics regarding the NTP. Called when an NTP tab is // about to be deactivated (be it by switching tabs, losing focus or closing // the tab/shutting down Chrome), or when the user navigates to a URL.
diff --git a/chrome/browser/ui/search/ntp_user_data_logger_unittest.cc b/chrome/browser/ui/search/ntp_user_data_logger_unittest.cc index 3a22ec71..a191095 100644 --- a/chrome/browser/ui/search/ntp_user_data_logger_unittest.cc +++ b/chrome/browser/ui/search/ntp_user_data_logger_unittest.cc
@@ -67,8 +67,13 @@ bool ThemeIsConfigured() const override { return is_theme_configured_; } + bool CustomBackgroundIsConfigured() const override { + return is_custom_background_configured_; + } + bool is_google_ = true; bool is_theme_configured_ = false; + bool is_custom_background_configured_ = false; }; class NTPUserDataLoggerTest : public testing::Test { @@ -939,3 +944,151 @@ BACKGROUND_CUSTOMIZATION_UNAVAILABLE_THEME), 1))); } + +TEST_F(NTPUserDataLoggerTest, ShouldRecordBackgroundCustomization) { + base::HistogramTester histogram_tester; + + TestNTPUserDataLogger logger((GURL(chrome::kChromeSearchLocalNtpUrl))); + logger.is_custom_background_configured_ = true; + + base::TimeDelta delta_tiles_received = base::TimeDelta::FromMilliseconds(10); + base::TimeDelta delta_tiles_loaded = base::TimeDelta::FromMilliseconds(100); + + // Send the ALL_TILES_RECEIVED event. + logger.LogEvent(NTP_ALL_TILES_RECEIVED, delta_tiles_received); + + // Send the ALL_TILES_LOADED event, this should trigger emitting histograms. + logger.LogEvent(NTP_ALL_TILES_LOADED, delta_tiles_loaded); + + EXPECT_THAT(histogram_tester.GetAllSamples("NewTabPage.LoadTime"), SizeIs(1)); + EXPECT_THAT(histogram_tester.GetAllSamples("NewTabPage.LoadTime.LocalNTP"), + SizeIs(1)); + EXPECT_THAT( + histogram_tester.GetAllSamples("NewTabPage.LoadTime.LocalNTP.Google"), + SizeIs(1)); + EXPECT_THAT( + histogram_tester.GetAllSamples("NewTabPage.LoadTime.LocalNTP.Other"), + IsEmpty()); + EXPECT_THAT(histogram_tester.GetAllSamples("NewTabPage.LoadTime.Web"), + IsEmpty()); + + histogram_tester.ExpectTimeBucketCount("NewTabPage.LoadTime", + delta_tiles_loaded, 1); + histogram_tester.ExpectTimeBucketCount("NewTabPage.LoadTime.LocalNTP", + delta_tiles_loaded, 1); + histogram_tester.ExpectTimeBucketCount("NewTabPage.LoadTime.LocalNTP.Google", + delta_tiles_loaded, 1); + + EXPECT_THAT( + histogram_tester.GetAllSamples( + "NewTabPage.CustomizationAvailability.Backgrounds"), + ElementsAre(Bucket( + static_cast<int>( + BackgroundCustomization::BACKGROUND_CUSTOMIZATION_AVAILABLE), + 1))); + + EXPECT_THAT( + histogram_tester.GetAllSamples("NewTabPage.Customized"), + ElementsAre(Bucket( + static_cast<int>(CustomizedFeature::CUSTOMIZED_FEATURE_BACKGROUND), + 1))); +} + +TEST_F(NTPUserDataLoggerTest, ShouldRecordCustomizationActionFromNTPGoogle) { + base::HistogramTester histogram_tester; + + TestNTPUserDataLogger logger(GURL("https://www.google.com/_/chrome/newtab")); + logger.is_google_ = true; + + base::TimeDelta delta_tiles_received = base::TimeDelta::FromMilliseconds(10); + base::TimeDelta delta_tiles_loaded = base::TimeDelta::FromMilliseconds(100); + + // Send the ALL_TILES_RECEIVED event. + logger.LogEvent(NTP_ALL_TILES_RECEIVED, delta_tiles_received); + + // Send the ALL_TILES_LOADED event, this should trigger emitting histograms. + logger.LogEvent(NTP_ALL_TILES_LOADED, delta_tiles_loaded); + + // Attempt to log an event that is only supported when the default search + // provider is Google. + logger.LogEvent(NTP_CUSTOMIZE_CHROME_BACKGROUNDS_CLICKED, delta_tiles_loaded); + + EXPECT_THAT(histogram_tester.GetAllSamples("NewTabPage.LoadTime"), SizeIs(1)); + EXPECT_THAT(histogram_tester.GetAllSamples("NewTabPage.LoadTime.LocalNTP"), + IsEmpty()); + EXPECT_THAT(histogram_tester.GetAllSamples("NewTabPage.LoadTime.Web"), + SizeIs(1)); + EXPECT_THAT(histogram_tester.GetAllSamples("NewTabPage.LoadTime.Web.Google"), + SizeIs(1)); + EXPECT_THAT(histogram_tester.GetAllSamples("NewTabPage.LoadTime.Web.Other"), + IsEmpty()); + + histogram_tester.ExpectTimeBucketCount("NewTabPage.LoadTime", + delta_tiles_loaded, 1); + histogram_tester.ExpectTimeBucketCount("NewTabPage.LoadTime.Web", + delta_tiles_loaded, 1); + histogram_tester.ExpectTimeBucketCount("NewTabPage.LoadTime.Web.Google", + delta_tiles_loaded, 1); + + EXPECT_THAT( + histogram_tester.GetAllSamples( + "NewTabPage.CustomizationAvailability.Backgrounds"), + ElementsAre(Bucket( + static_cast<int>( + BackgroundCustomization::BACKGROUND_CUSTOMIZATION_AVAILABLE), + 1))); + + EXPECT_THAT(histogram_tester.GetAllSamples("NewTabPage.CustomizeAction"), + ElementsAre(Bucket( + static_cast<int>( + CustomizeAction::CUSTOMIZE_ACTION_CHROME_BACKGROUNDS), + 1))); +} + +TEST_F(NTPUserDataLoggerTest, ShouldNotRecordCustomizationActionFromNTPOther) { + base::HistogramTester histogram_tester; + + TestNTPUserDataLogger logger(GURL("https://www.notgoogle.com/newtab")); + logger.is_google_ = false; + + base::TimeDelta delta_tiles_received = base::TimeDelta::FromMilliseconds(10); + base::TimeDelta delta_tiles_loaded = base::TimeDelta::FromMilliseconds(100); + + // Send the ALL_TILES_RECEIVED event. + logger.LogEvent(NTP_ALL_TILES_RECEIVED, delta_tiles_received); + + // Send the ALL_TILES_LOADED event, this should trigger emitting histograms. + logger.LogEvent(NTP_ALL_TILES_LOADED, delta_tiles_loaded); + + // Attempt to log an event that is only supported when the default search + // provider is Google. + logger.LogEvent(NTP_CUSTOMIZE_CHROME_BACKGROUNDS_CLICKED, delta_tiles_loaded); + + EXPECT_THAT(histogram_tester.GetAllSamples("NewTabPage.LoadTime"), SizeIs(1)); + EXPECT_THAT(histogram_tester.GetAllSamples("NewTabPage.LoadTime.LocalNTP"), + IsEmpty()); + EXPECT_THAT(histogram_tester.GetAllSamples("NewTabPage.LoadTime.Web"), + SizeIs(1)); + EXPECT_THAT(histogram_tester.GetAllSamples("NewTabPage.LoadTime.Web.Google"), + IsEmpty()); + EXPECT_THAT(histogram_tester.GetAllSamples("NewTabPage.LoadTime.Web.Other"), + SizeIs(1)); + + histogram_tester.ExpectTimeBucketCount("NewTabPage.LoadTime", + delta_tiles_loaded, 1); + histogram_tester.ExpectTimeBucketCount("NewTabPage.LoadTime.Web", + delta_tiles_loaded, 1); + histogram_tester.ExpectTimeBucketCount("NewTabPage.LoadTime.Web.Other", + delta_tiles_loaded, 1); + + EXPECT_THAT(histogram_tester.GetAllSamples( + "NewTabPage.CustomizationAvailability.Backgrounds"), + ElementsAre(Bucket( + static_cast<int>( + BackgroundCustomization:: + BACKGROUND_CUSTOMIZATION_UNAVAILABLE_SEARCH_PROVIDER), + 1))); + + EXPECT_THAT(histogram_tester.GetAllSamples("NewTabPage.CustomizeAction"), + IsEmpty()); +}
diff --git a/chrome/browser/ui/search/ntp_user_data_types.h b/chrome/browser/ui/search/ntp_user_data_types.h index 936e9d8..00a07fe 100644 --- a/chrome/browser/ui/search/ntp_user_data_types.h +++ b/chrome/browser/ui/search/ntp_user_data_types.h
@@ -6,8 +6,8 @@ #define CHROME_BROWSER_UI_SEARCH_NTP_USER_DATA_TYPES_H_ // This enum must match the numbering for NTPBackgroundCustomizationAvailability -// in enums.xml. Do not reorder or remove items, only add new items before -// BACKGROUND_CUSTOMIZATION_MAX. +// in enums.xml. Do not reorder or remove items, and update kMaxValue when new +// items are added. enum class BackgroundCustomization { BACKGROUND_CUSTOMIZATION_AVAILABLE = 0, BACKGROUND_CUSTOMIZATION_UNAVAILABLE_FEATURE = 1, @@ -18,8 +18,8 @@ }; // This enum must match the numbering for NTPShortcutCustomizationAvailability -// in enums.xml. Do not reorder or remove items, only add new items before -// SHORTCUT_CUSTOMIZATION_MAX. +// in enums.xml. Do not reorder or remove items, and update kMaxValue when new +// items are added. enum class ShortcutCustomization { SHORTCUT_CUSTOMIZATION_AVAILABLE = 0, SHORTCUT_CUSTOMIZATION_UNAVAILABLE_FEATURE = 1, @@ -29,8 +29,8 @@ }; // This enum must match the numbering for NTPCustomizedFeatures in -// enums.xml. Do not reorder or remove items, only add new items before -// CUSTOMIZED_FEATURE_MAX. +// enums.xml. Do not reorder or remove items, and update kMaxValue when new +// items are added. enum class CustomizedFeature { CUSTOMIZED_FEATURE_BACKGROUND = 0, CUSTOMIZED_FEATURE_SHORTCUT = 1, @@ -39,8 +39,8 @@ }; // This enum must match the numbering for NTPCustomizeAction in -// enums.xml. Do not reorder or remove items, and only add new items before -// CUSTOMIZE_ACTION_MAX. +// enums.xml. Do not reorder or remove items, and update kMaxValue when new +// items are added. enum class CustomizeAction { CUSTOMIZE_ACTION_CHROME_BACKGROUNDS = 0, CUSTOMIZE_ACTION_LOCAL_IMAGE = 1, @@ -54,8 +54,8 @@ }; // This enum must match the numbering for NTPCustomizeChromeBackgroundAction in -// enums.xml. Do not reorder or remove items, and only add new items before -// CUSTOMIZE_CHROME_BACKGROUND_ACTION_MAX. +// enums.xml. Do not reorder or remove items, and update kMaxValue when new +// items are added. enum class CustomizeChromeBackgroundAction { CUSTOMIZE_CHROME_BACKGROUND_ACTION_SELECT_COLLECTION = 0, CUSTOMIZE_CHROME_BACKGROUND_ACTION_SELECT_IMAGE = 1, @@ -66,8 +66,8 @@ }; // This enum must match the numbering for NTPCustomizeLocalImageBackgroundAction -// in enums.xml. Do not reorder or remove items, and only add new items before -// CUSTOMIZE_LOCAL_IMAGE_BACKGROUND_ACTION_MAX. +// in enums.xml. Do not reorder or remove items, and update kMaxValue when new +// items are added. enum class CustomizeLocalImageBackgroundAction { CUSTOMIZE_LOCAL_IMAGE_BACKGROUND_ACTION_CANCEL = 0, CUSTOMIZE_LOCAL_IMAGE_BACKGROUND_ACTION_DONE = 1, @@ -76,16 +76,18 @@ }; // This enum must match the numbering for NTPCustomizeShortcutAction in -// enums.xml. Do not reorder or remove items, and only add new items before -// CUSTOMIZE_SHORTCUT_ACTION_MAX. +// enums.xml. Do not reorder or remove items, and update kMaxValue when new +// items are added. enum class CustomizeShortcutAction { CUSTOMIZE_SHORTCUT_ACTION_REMOVE = 0, CUSTOMIZE_SHORTCUT_ACTION_CANCEL = 1, CUSTOMIZE_SHORTCUT_ACTION_DONE = 2, CUSTOMIZE_SHORTCUT_ACTION_UNDO = 3, CUSTOMIZE_SHORTCUT_ACTION_RESTORE_ALL = 4, + CUSTOMIZE_SHORTCUT_ACTION_ADD = 5, + CUSTOMIZE_SHORTCUT_ACTION_UPDATE = 6, - kMaxValue = CUSTOMIZE_SHORTCUT_ACTION_RESTORE_ALL + kMaxValue = CUSTOMIZE_SHORTCUT_ACTION_UPDATE }; #endif // CHROME_BROWSER_UI_SEARCH_NTP_USER_DATA_TYPES_H_
diff --git a/chrome/browser/ui/search/search_tab_helper.h b/chrome/browser/ui/search/search_tab_helper.h index 85b2294..4dae6ab 100644 --- a/chrome/browser/ui/search/search_tab_helper.h +++ b/chrome/browser/ui/search/search_tab_helper.h
@@ -79,6 +79,8 @@ ChromeIdentityCheckSignedOutMismatch); FRIEND_TEST_ALL_PREFIXES(SearchTabHelperTest, HistorySyncCheckSyncing); FRIEND_TEST_ALL_PREFIXES(SearchTabHelperTest, HistorySyncCheckNotSyncing); + FRIEND_TEST_ALL_PREFIXES(SearchTabHelperTest, + FileSelectedUpdatesLastSelectedDirectory); explicit SearchTabHelper(content::WebContents* web_contents);
diff --git a/chrome/browser/ui/search/search_tab_helper_unittest.cc b/chrome/browser/ui/search/search_tab_helper_unittest.cc index 0284994c..af96d02b 100644 --- a/chrome/browser/ui/search/search_tab_helper_unittest.cc +++ b/chrome/browser/ui/search/search_tab_helper_unittest.cc
@@ -234,6 +234,19 @@ EXPECT_FALSE(search_tab_helper->HistorySyncCheck()); } +TEST_F(SearchTabHelperTest, FileSelectedUpdatesLastSelectedDirectory) { + NavigateAndCommit(GURL(chrome::kChromeUINewTabURL)); + SearchTabHelper* search_tab_helper = + SearchTabHelper::FromWebContents(web_contents()); + ASSERT_NE(nullptr, search_tab_helper); + + base::FilePath filePath = + base::FilePath::FromUTF8Unsafe("a/b/c/Picture/kitten.png"); + search_tab_helper->FileSelected(filePath, 0, {}); + Profile* profile = search_tab_helper->profile(); + EXPECT_EQ(filePath.DirName(), profile->last_selected_directory()); +} + TEST_F(SearchTabHelperTest, TitleIsSetForNTP) { NavigateAndCommit(GURL(chrome::kChromeUINewTabURL)); EXPECT_EQ(l10n_util::GetStringUTF16(IDS_NEW_TAB_TITLE),
diff --git a/chrome/browser/ui/sync/profile_signin_confirmation_helper_unittest.cc b/chrome/browser/ui/sync/profile_signin_confirmation_helper_unittest.cc index 0a117caf..dcf4f446 100644 --- a/chrome/browser/ui/sync/profile_signin_confirmation_helper_unittest.cc +++ b/chrome/browser/ui/sync/profile_signin_confirmation_helper_unittest.cc
@@ -38,8 +38,7 @@ #if defined(OS_CHROMEOS) #include "chrome/browser/chromeos/login/users/scoped_test_user_manager.h" -#include "chrome/browser/chromeos/settings/cros_settings.h" -#include "chrome/browser/chromeos/settings/device_settings_service.h" +#include "chrome/browser/chromeos/settings/scoped_cros_settings_test_helper.h" #endif #if BUILDFLAG(ENABLE_EXTENSIONS) @@ -174,8 +173,7 @@ BookmarkModel* model_; #if defined OS_CHROMEOS - chromeos::ScopedTestDeviceSettingsService test_device_settings_service_; - chromeos::ScopedTestCrosSettings test_cros_settings_; + chromeos::ScopedCrosSettingsTestHelper cros_settings_test_helper_; chromeos::ScopedTestUserManager test_user_manager_; #endif };
diff --git a/chrome/browser/ui/tabs/tab_strip_model.cc b/chrome/browser/ui/tabs/tab_strip_model.cc index 31dced9..3df80d7 100644 --- a/chrome/browser/ui/tabs/tab_strip_model.cc +++ b/chrome/browser/ui/tabs/tab_strip_model.cc
@@ -358,7 +358,7 @@ TabStripModelChange::kInserted, TabStripModelChange::CreateInsertDelta(raw_contents, index)); for (auto& observer : observers_) - observer.OnTabStripModelChanged(change, selection); + observer.OnTabStripModelChanged(this, change, selection); } std::unique_ptr<content::WebContents> TabStripModel::ReplaceWebContentsAt( @@ -395,7 +395,7 @@ TabStripModelChange::CreateReplaceDelta( old_contents.get(), raw_new_contents, index)); for (auto& observer : observers_) - observer.OnTabStripModelChanged(change, selection); + observer.OnTabStripModelChanged(this, change, selection); return old_contents; } @@ -514,6 +514,10 @@ selection.new_model = selection_model_; selection.reason = TabStripModelObserver::CHANGE_REASON_NONE; + TabStripModelChange change(TabStripModelChange::kRemoved, deltas); + for (auto& observer : observers_) + observer.OnTabStripModelChanged(this, change, selection); + for (auto& dwc : notifications->detached_web_contents) { if (notifications->selection_model.IsSelected( dwc->index_before_any_removals)) { @@ -547,10 +551,6 @@ for (auto& observer : observers_) observer.TabStripEmpty(); } - - TabStripModelChange change(TabStripModelChange::kRemoved, deltas); - for (auto& observer : observers_) - observer.OnTabStripModelChanged(change, selection); } void TabStripModel::ActivateTabAt(int index, bool user_gesture) { @@ -1529,7 +1529,7 @@ (selection.active_tab_changed() || selection.selection_changed())) { TabStripModelChange change; for (auto& observer : observers_) - observer.OnTabStripModelChanged(change, selection); + observer.OnTabStripModelChanged(this, change, selection); } return selection; @@ -1575,7 +1575,7 @@ TabStripModelChange::kMoved, TabStripModelChange::CreateMoveDelta(web_contents, index, to_position)); for (auto& observer : observers_) - observer.OnTabStripModelChanged(change, selection); + observer.OnTabStripModelChanged(this, change, selection); } void TabStripModel::MoveSelectedTabsToImpl(int index,
diff --git a/chrome/browser/ui/tabs/tab_strip_model_observer.cc b/chrome/browser/ui/tabs/tab_strip_model_observer.cc index 9e45343..832934e 100644 --- a/chrome/browser/ui/tabs/tab_strip_model_observer.cc +++ b/chrome/browser/ui/tabs/tab_strip_model_observer.cc
@@ -74,6 +74,7 @@ } void TabStripModelObserver::OnTabStripModelChanged( + TabStripModel* tab_strip_model, const TabStripModelChange& change, const TabStripSelectionChange& selection) {}
diff --git a/chrome/browser/ui/tabs/tab_strip_model_observer.h b/chrome/browser/ui/tabs/tab_strip_model_observer.h index 42fa5e0e..e63d965 100644 --- a/chrome/browser/ui/tabs/tab_strip_model_observer.h +++ b/chrome/browser/ui/tabs/tab_strip_model_observer.h
@@ -173,7 +173,8 @@ // TabStripModel before the |change| and after the |change| are applied. // When only selection/activation was changed without any change about // WebContents, |change| can be empty. - virtual void OnTabStripModelChanged(const TabStripModelChange& change, + virtual void OnTabStripModelChanged(TabStripModel* tab_strip_model, + const TabStripModelChange& change, const TabStripSelectionChange& selection); // A new WebContents was inserted into the TabStripModel at the
diff --git a/chrome/browser/ui/tabs/tab_strip_model_unittest.cc b/chrome/browser/ui/tabs/tab_strip_model_unittest.cc index f401c3c..326a02f8 100644 --- a/chrome/browser/ui/tabs/tab_strip_model_unittest.cc +++ b/chrome/browser/ui/tabs/tab_strip_model_unittest.cc
@@ -377,6 +377,7 @@ // TabStripModelObserver implementation: void OnTabStripModelChanged( + TabStripModel* tab_strip_model, const TabStripModelChange& change, const TabStripSelectionChange& selection) override { switch (change.type()) {
diff --git a/chrome/browser/ui/views/accessibility/invert_bubble_view.cc b/chrome/browser/ui/views/accessibility/invert_bubble_view.cc index e6f87657e..8d0d838 100644 --- a/chrome/browser/ui/views/accessibility/invert_bubble_view.cc +++ b/chrome/browser/ui/views/accessibility/invert_bubble_view.cc
@@ -23,7 +23,7 @@ #include "ui/base/resource/resource_bundle.h" #include "ui/base/window_open_disposition.h" #include "ui/gfx/color_utils.h" -#include "ui/views/bubble/bubble_dialog_delegate.h" +#include "ui/views/bubble/bubble_dialog_delegate_view.h" #include "ui/views/controls/button/image_button.h" #include "ui/views/controls/button/image_button_factory.h" #include "ui/views/controls/button/menu_button.h"
diff --git a/chrome/browser/ui/views/autofill/autofill_popup_view_native_views.cc b/chrome/browser/ui/views/autofill/autofill_popup_view_native_views.cc index 44dd509..3e2e27a6 100644 --- a/chrome/browser/ui/views/autofill/autofill_popup_view_native_views.cc +++ b/chrome/browser/ui/views/autofill/autofill_popup_view_native_views.cc
@@ -69,6 +69,25 @@ namespace { +// Describes the possible layouts which can be applied to the rows in the popup. +enum class PopupItemLayoutType { + kLeadingIcon, // Icon (if any) shown on the leading (left in LTR) side. + kTrailingIcon // Icon (if any) shown on the trailing (right in LTR) side. +}; + +// Returns the icon alignment for the drop down of type |frontend_id|. See +// PopupItemId for allowed values. +PopupItemLayoutType GetLayoutType(int frontend_id) { + switch (frontend_id) { + case autofill::PopupItemId::POPUP_ITEM_ID_USERNAME_ENTRY: + case autofill::PopupItemId::POPUP_ITEM_ID_PASSWORD_ENTRY: + case autofill::PopupItemId::POPUP_ITEM_ID_GENERATE_PASSWORD_ENTRY: + return PopupItemLayoutType::kLeadingIcon; + default: + return PopupItemLayoutType::kTrailingIcon; + } +} + // Container view that holds one child view and limits its width to the // specified maximum. class ConstrainedWidthView : public views::View { @@ -122,7 +141,6 @@ void CreateContent() override; void RefreshStyle() override; - protected: virtual int GetPrimaryTextStyle() = 0; virtual views::View* CreateValueLabel(); // The description view can be nullptr. @@ -132,6 +150,7 @@ views::Label* CreateDescriptionLabelInternal() const; private: + void AddIcon(gfx::ImageSkia icon); void AddSpacerWithSize(int spacer_width, bool resize, views::BoxLayout* layout); @@ -333,6 +352,17 @@ layout->set_minimum_cross_axis_size( views::MenuConfig::instance().touchable_menu_height + extra_height_); + const gfx::ImageSkia icon = + controller->layout_model().GetIconImage(line_number_); + int frontend_id = controller->GetSuggestionAt(line_number_).frontend_id; + + if (!icon.isNull() && + GetLayoutType(frontend_id) == PopupItemLayoutType::kLeadingIcon) { + AddIcon(icon); + AddSpacerWithSize(views::MenuConfig::instance().item_horizontal_padding, + /*resize=*/false, layout); + } + AddChildView(CreateValueLabel()); AddSpacerWithSize(views::MenuConfig::instance().item_horizontal_padding, @@ -342,16 +372,11 @@ if (description_label) AddChildView(description_label); - const gfx::ImageSkia icon = - controller->layout_model().GetIconImage(line_number_); - if (!icon.isNull()) { + if (!icon.isNull() && + GetLayoutType(frontend_id) == PopupItemLayoutType::kTrailingIcon) { AddSpacerWithSize(views::MenuConfig::instance().item_horizontal_padding, /*resize=*/false, layout); - - auto* image_view = new views::ImageView(); - image_view->SetImage(icon); - - AddChildView(image_view); + AddIcon(icon); } } @@ -393,6 +418,12 @@ return nullptr; } +void AutofillPopupItemView::AddIcon(gfx::ImageSkia icon) { + auto* image_view = new views::ImageView(); + image_view->SetImage(icon); + AddChildView(image_view); +} + void AutofillPopupItemView::AddSpacerWithSize(int spacer_width, bool resize, views::BoxLayout* layout) {
diff --git a/chrome/browser/ui/views/autofill/card_unmask_prompt_views.h b/chrome/browser/ui/views/autofill/card_unmask_prompt_views.h index c9a92a7..aca808e 100644 --- a/chrome/browser/ui/views/autofill/card_unmask_prompt_views.h +++ b/chrome/browser/ui/views/autofill/card_unmask_prompt_views.h
@@ -10,7 +10,7 @@ #include "base/macros.h" #include "chrome/browser/ui/autofill/autofill_dialog_models.h" #include "components/autofill/core/browser/ui/card_unmask_prompt_view.h" -#include "ui/views/bubble/bubble_dialog_delegate.h" +#include "ui/views/bubble/bubble_dialog_delegate_view.h" #include "ui/views/controls/combobox/combobox_listener.h" #include "ui/views/controls/link_listener.h" #include "ui/views/controls/textfield/textfield_controller.h"
diff --git a/chrome/browser/ui/views/autofill/save_card_icon_view.cc b/chrome/browser/ui/views/autofill/save_card_icon_view.cc index a992808e..1c6329f 100644 --- a/chrome/browser/ui/views/autofill/save_card_icon_view.cc +++ b/chrome/browser/ui/views/autofill/save_card_icon_view.cc
@@ -13,19 +13,24 @@ #include "chrome/browser/ui/view_ids.h" #include "chrome/browser/ui/views/autofill/save_card_bubble_views.h" #include "chrome/grit/generated_resources.h" +#include "components/strings/grit/components_strings.h" #include "ui/base/l10n/l10n_util.h" namespace autofill { SaveCardIconView::SaveCardIconView(CommandUpdater* command_updater, Browser* browser, - PageActionIconView::Delegate* delegate) + PageActionIconView::Delegate* delegate, + const gfx::FontList& font_list) : PageActionIconView(command_updater, IDC_SAVE_CREDIT_CARD_FOR_PAGE, - delegate), + delegate, + font_list), browser_(browser) { DCHECK(delegate); set_id(VIEW_ID_SAVE_CREDIT_CARD_BUTTON); + + SetUpForInOutAnimation(); } SaveCardIconView::~SaveCardIconView() {} @@ -51,6 +56,11 @@ enabled &= SetCommandEnabled(enabled); SetVisible(enabled); + + AnimateInkDrop(views::InkDropState::HIDDEN, nullptr); + if (enabled && controller->CanAnimate()) + AnimateIn(IDS_AUTOFILL_CARD_SAVED); + return was_visible != visible(); } @@ -75,4 +85,17 @@ return autofill::SaveCardBubbleControllerImpl::FromWebContents(web_contents); } +bool SaveCardIconView::ShouldShowSeparator() const { + return false; +} + +void SaveCardIconView::AnimationEnded(const gfx::Animation* animation) { + IconLabelBubbleView::AnimationEnded(animation); + + // |controller| may be nullptr due to lazy initialization. + SaveCardBubbleControllerImpl* controller = GetController(); + if (controller) + controller->OnAnimationEnded(); +} + } // namespace autofill
diff --git a/chrome/browser/ui/views/autofill/save_card_icon_view.h b/chrome/browser/ui/views/autofill/save_card_icon_view.h index add0eb2..409d85ed 100644 --- a/chrome/browser/ui/views/autofill/save_card_icon_view.h +++ b/chrome/browser/ui/views/autofill/save_card_icon_view.h
@@ -22,13 +22,15 @@ public: SaveCardIconView(CommandUpdater* command_updater, Browser* browser, - PageActionIconView::Delegate* delegate); + PageActionIconView::Delegate* delegate, + const gfx::FontList& font_list); ~SaveCardIconView() override; // PageActionIconView: views::BubbleDialogDelegateView* GetBubble() const override; bool Update() override; base::string16 GetTextForTooltipAndAccessibleName() const override; + bool ShouldShowSeparator() const override; protected: // PageActionIconView: @@ -38,6 +40,9 @@ private: SaveCardBubbleControllerImpl* GetController() const; + // gfx::AnimationDelegate: + void AnimationEnded(const gfx::Animation* animation) override; + // May be nullptr. Browser* const browser_;
diff --git a/chrome/browser/ui/views/chrome_browser_main_extra_parts_views.cc b/chrome/browser/ui/views/chrome_browser_main_extra_parts_views.cc index 5d731de..1732df8 100644 --- a/chrome/browser/ui/views/chrome_browser_main_extra_parts_views.cc +++ b/chrome/browser/ui/views/chrome_browser_main_extra_parts_views.cc
@@ -14,6 +14,7 @@ #include "chrome/browser/ui/views/relaunch_notification/relaunch_notification_controller.h" #include "components/constrained_window/constrained_window_views.h" #include "services/service_manager/sandbox/switches.h" +#include "ui/base/material_design/material_design_controller.h" #if defined(USE_AURA) #include "base/run_loop.h" @@ -71,6 +72,11 @@ SetConstrainedWindowViewsClient(CreateChromeConstrainedWindowViewsClient()); + // The MaterialDesignController needs to look at command line flags, which + // are not available until this point. Now that they are, proceed with + // initializing the MaterialDesignController. + ui::MaterialDesignController::Initialize(); + #if defined(USE_AURA) wm_state_.reset(new wm::WMState); #endif
diff --git a/chrome/browser/ui/views/close_bubble_on_tab_activation_helper.cc b/chrome/browser/ui/views/close_bubble_on_tab_activation_helper.cc index 5d545c06..3d62c27 100644 --- a/chrome/browser/ui/views/close_bubble_on_tab_activation_helper.cc +++ b/chrome/browser/ui/views/close_bubble_on_tab_activation_helper.cc
@@ -5,7 +5,7 @@ #include "chrome/browser/ui/views/close_bubble_on_tab_activation_helper.h" #include "chrome/browser/ui/browser.h" -#include "ui/views/bubble/bubble_dialog_delegate.h" +#include "ui/views/bubble/bubble_dialog_delegate_view.h" #include "ui/views/widget/widget.h" CloseBubbleOnTabActivationHelper::CloseBubbleOnTabActivationHelper(
diff --git a/chrome/browser/ui/views/content_setting_bubble_contents.cc b/chrome/browser/ui/views/content_setting_bubble_contents.cc index e05d728..0dcfb9f 100644 --- a/chrome/browser/ui/views/content_setting_bubble_contents.cc +++ b/chrome/browser/ui/views/content_setting_bubble_contents.cc
@@ -47,18 +47,6 @@ namespace { -// If we don't clamp the maximum width, then very long URLs and titles can make -// the bubble arbitrarily wide. -const int kMaxContentsWidth = 500; - -// The new default width for the content settings bubble. The review process to -// the width on per-bubble basis is tracked with https://crbug.com/649650. -const int kMaxDefaultContentsWidth = 320; - -// When we have multiline labels, we should set a minimum width lest we get very -// narrow bubbles with lots of line-wrapping. -const int kMinMultiLineContentsWidth = 250; - // Display a maximum of 4 visible items in a list before scrolling. const int kMaxVisibleListItems = 4; @@ -402,33 +390,10 @@ } gfx::Size ContentSettingBubbleContents::CalculatePreferredSize() const { - gfx::Size preferred_size(views::View::CalculatePreferredSize()); - int preferred_width = - (!content_setting_bubble_model_->bubble_content().domain_lists.empty() && - (kMinMultiLineContentsWidth > preferred_size.width())) - ? kMinMultiLineContentsWidth - : preferred_size.width(); - if (content_setting_bubble_model_->AsSubresourceFilterBubbleModel()) { - preferred_size.set_width(std::min(preferred_width, - kMaxDefaultContentsWidth)); - } else { - preferred_size.set_width(std::min(preferred_width, kMaxContentsWidth)); - } - - // These bubbles should all be the "small" dialog width, but only when in - // Harmony mode. - ChromeLayoutProvider* provider = ChromeLayoutProvider::Get(); - if (provider->IsHarmonyMode()) { - // Subtract out this dialog's margins. The margins are imposed by - // DialogClientView around this view, so this view's width plus the width of - // these margins must equal the desired width, which is - // GetSnappedDialogWidth(0). - preferred_size.set_width(provider->GetSnappedDialogWidth(0) - - margins().width()); - preferred_size.set_height(GetHeightForWidth(preferred_size.width())); - } - - return preferred_size; + const int width = ChromeLayoutProvider::Get()->GetDistanceMetric( + DISTANCE_BUBBLE_PREFERRED_WIDTH) - + margins().width(); + return gfx::Size(width, GetHeightForWidth(width)); } void ContentSettingBubbleContents::OnListItemAdded( @@ -466,7 +431,7 @@ } bool ContentSettingBubbleContents::ShouldShowCloseButton() const { - return ChromeLayoutProvider::Get()->IsHarmonyMode(); + return true; } void ContentSettingBubbleContents::Init() {
diff --git a/chrome/browser/ui/views/content_setting_bubble_contents.h b/chrome/browser/ui/views/content_setting_bubble_contents.h index cc5f588..3cd1659 100644 --- a/chrome/browser/ui/views/content_setting_bubble_contents.h +++ b/chrome/browser/ui/views/content_setting_bubble_contents.h
@@ -13,7 +13,7 @@ #include "chrome/browser/ui/content_settings/content_setting_bubble_model.h" #include "components/content_settings/core/common/content_settings_types.h" #include "content/public/browser/web_contents_observer.h" -#include "ui/views/bubble/bubble_dialog_delegate.h" +#include "ui/views/bubble/bubble_dialog_delegate_view.h" #include "ui/views/controls/button/button.h" #include "ui/views/controls/button/checkbox.h" #include "ui/views/controls/button/radio_button.h"
diff --git a/chrome/browser/ui/views/critical_notification_bubble_view.h b/chrome/browser/ui/views/critical_notification_bubble_view.h index badc0cf..b2efec7 100644 --- a/chrome/browser/ui/views/critical_notification_bubble_view.h +++ b/chrome/browser/ui/views/critical_notification_bubble_view.h
@@ -7,7 +7,7 @@ #include "base/macros.h" #include "base/timer/timer.h" -#include "ui/views/bubble/bubble_dialog_delegate.h" +#include "ui/views/bubble/bubble_dialog_delegate_view.h" class CriticalNotificationBubbleView : public views::BubbleDialogDelegateView { public:
diff --git a/chrome/browser/ui/views/download/download_shelf_view.cc b/chrome/browser/ui/views/download/download_shelf_view.cc index 3eeb9a6..99584956 100644 --- a/chrome/browser/ui/views/download/download_shelf_view.cc +++ b/chrome/browser/ui/views/download/download_shelf_view.cc
@@ -10,7 +10,6 @@ #include "base/logging.h" #include "base/strings/utf_string_conversions.h" #include "chrome/browser/download/download_item_model.h" -#include "chrome/browser/download/download_stats.h" #include "chrome/browser/themes/theme_properties.h" #include "chrome/browser/themes/theme_service.h" #include "chrome/browser/themes/theme_service_factory.h" @@ -351,13 +350,6 @@ } void DownloadShelfView::DoClose(CloseReason reason) { - int num_in_progress = 0; - for (size_t i = 0; i < download_views_.size(); ++i) { - if (download_views_[i]->download()->GetState() == DownloadItem::IN_PROGRESS) - ++num_in_progress; - } - RecordDownloadShelfClose( - download_views_.size(), num_in_progress, reason == AUTOMATIC); parent_->SetDownloadShelfVisible(false); shelf_animation_.Hide(); }
diff --git a/chrome/browser/ui/views/extensions/bookmark_app_confirmation_view.cc b/chrome/browser/ui/views/extensions/bookmark_app_confirmation_view.cc index 8e9e0667..e4b69a23 100644 --- a/chrome/browser/ui/views/extensions/bookmark_app_confirmation_view.cc +++ b/chrome/browser/ui/views/extensions/bookmark_app_confirmation_view.cc
@@ -59,13 +59,12 @@ views::GridLayout::kFixedSize, views::GridLayout::FIXED, textfield_width, 0); - const int icon_size = layout_provider->IsHarmonyMode() - ? extension_misc::EXTENSION_ICON_SMALL - : extension_misc::EXTENSION_ICON_MEDIUM; views::ImageView* icon_image_view = new views::ImageView(); - gfx::Size image_size(icon_size, icon_size); + gfx::Size image_size(extension_misc::EXTENSION_ICON_SMALL, + extension_misc::EXTENSION_ICON_SMALL); gfx::ImageSkia image( - std::make_unique<WebAppInfoImageSource>(icon_size, web_app_info_.icons), + std::make_unique<WebAppInfoImageSource>( + extension_misc::EXTENSION_ICON_SMALL, web_app_info_.icons), image_size); icon_image_view->SetImageSize(image_size); icon_image_view->SetImage(image);
diff --git a/chrome/browser/ui/views/extensions/extension_install_dialog_view.cc b/chrome/browser/ui/views/extensions/extension_install_dialog_view.cc index f4c9af87..7745e1a 100644 --- a/chrome/browser/ui/views/extensions/extension_install_dialog_view.cc +++ b/chrome/browser/ui/views/extensions/extension_install_dialog_view.cc
@@ -342,21 +342,14 @@ prompt_->rating_count()); prompt_->AppendRatingStars(AddResourceIcon, rating.get()); rating_container->AddChildView(rating.release()); - int rating_text_context, user_count_text_context; - if (provider->IsHarmonyMode()) { - rating_text_context = CONTEXT_BODY_TEXT_LARGE; - user_count_text_context = CONTEXT_BODY_TEXT_SMALL; - } else { - rating_text_context = user_count_text_context = CONTEXT_DEPRECATED_SMALL; - } auto rating_count = std::make_unique<RatingLabel>(prompt_->GetRatingCount(), - rating_text_context); + CONTEXT_BODY_TEXT_LARGE); rating_count->SetHorizontalAlignment(gfx::ALIGN_LEFT); rating_container->AddChildView(rating_count.release()); webstore_data_container->AddChildView(rating_container.release()); auto user_count = std::make_unique<views::Label>( - prompt_->GetUserCount(), user_count_text_context, STYLE_SECONDARY); + prompt_->GetUserCount(), CONTEXT_BODY_TEXT_SMALL, STYLE_SECONDARY); user_count->SetAutoColorReadabilityEnabled(false); user_count->SetEnabledColor(SK_ColorGRAY); user_count->SetHorizontalAlignment(gfx::ALIGN_LEFT);
diff --git a/chrome/browser/ui/views/extensions/extension_installed_bubble_view.cc b/chrome/browser/ui/views/extensions/extension_installed_bubble_view.cc index cd49fa9..db373161 100644 --- a/chrome/browser/ui/views/extensions/extension_installed_bubble_view.cc +++ b/chrome/browser/ui/views/extensions/extension_installed_bubble_view.cc
@@ -38,7 +38,7 @@ #include "ui/base/ui_features.h" #include "ui/gfx/geometry/insets.h" #include "ui/gfx/image/image_skia_operations.h" -#include "ui/views/bubble/bubble_dialog_delegate.h" +#include "ui/views/bubble/bubble_dialog_delegate_view.h" #include "ui/views/controls/label.h" #include "ui/views/controls/link.h" #include "ui/views/controls/link_listener.h"
diff --git a/chrome/browser/ui/views/extensions/extension_message_bubble_view_browsertest.cc b/chrome/browser/ui/views/extensions/extension_message_bubble_view_browsertest.cc index 30cdc07..09c0068c 100644 --- a/chrome/browser/ui/views/extensions/extension_message_bubble_view_browsertest.cc +++ b/chrome/browser/ui/views/extensions/extension_message_bubble_view_browsertest.cc
@@ -11,7 +11,7 @@ #include "chrome/browser/ui/views/toolbar/toolbar_actions_bar_bubble_views.h" #include "ui/accessibility/ax_node_data.h" #include "ui/events/base_event_utils.h" -#include "ui/views/bubble/bubble_dialog_delegate.h" +#include "ui/views/bubble/bubble_dialog_delegate_view.h" #include "ui/views/controls/button/image_button.h" #include "ui/views/window/dialog_client_view.h"
diff --git a/chrome/browser/ui/views/extensions/extension_message_bubble_view_browsertest_views.cc b/chrome/browser/ui/views/extensions/extension_message_bubble_view_browsertest_views.cc index 7ebd94e..9c28f77 100644 --- a/chrome/browser/ui/views/extensions/extension_message_bubble_view_browsertest_views.cc +++ b/chrome/browser/ui/views/extensions/extension_message_bubble_view_browsertest_views.cc
@@ -11,7 +11,7 @@ #include "chrome/browser/ui/views/toolbar/toolbar_view.h" #include "chrome/browser/ui/views_mode_controller.h" #include "ui/base/ui_base_features.h" -#include "ui/views/bubble/bubble_dialog_delegate.h" +#include "ui/views/bubble/bubble_dialog_delegate_view.h" namespace {
diff --git a/chrome/browser/ui/views/extensions/extension_popup.h b/chrome/browser/ui/views/extensions/extension_popup.h index aebc83c..41d6f997 100644 --- a/chrome/browser/ui/views/extensions/extension_popup.h +++ b/chrome/browser/ui/views/extensions/extension_popup.h
@@ -13,7 +13,7 @@ #include "content/public/browser/devtools_agent_host_observer.h" #include "content/public/browser/notification_observer.h" #include "content/public/browser/notification_registrar.h" -#include "ui/views/bubble/bubble_dialog_delegate.h" +#include "ui/views/bubble/bubble_dialog_delegate_view.h" #include "url/gurl.h" class ExtensionViewViews;
diff --git a/chrome/browser/ui/views/extensions/extension_uninstall_dialog_view.cc b/chrome/browser/ui/views/extensions/extension_uninstall_dialog_view.cc index 02e2329..09e52fb 100644 --- a/chrome/browser/ui/views/extensions/extension_uninstall_dialog_view.cc +++ b/chrome/browser/ui/views/extensions/extension_uninstall_dialog_view.cc
@@ -27,7 +27,7 @@ #include "ui/compositor/layer.h" #include "ui/gfx/geometry/insets.h" #include "ui/gfx/image/image_skia_operations.h" -#include "ui/views/bubble/bubble_dialog_delegate.h" +#include "ui/views/bubble/bubble_dialog_delegate_view.h" #include "ui/views/controls/button/checkbox.h" #include "ui/views/controls/image_view.h" #include "ui/views/controls/label.h"
diff --git a/chrome/browser/ui/views/feature_promos/feature_promo_bubble_view.h b/chrome/browser/ui/views/feature_promos/feature_promo_bubble_view.h index 88e7f91..2a6fd6b 100644 --- a/chrome/browser/ui/views/feature_promos/feature_promo_bubble_view.h +++ b/chrome/browser/ui/views/feature_promos/feature_promo_bubble_view.h
@@ -8,7 +8,7 @@ #include "base/macros.h" #include "base/timer/timer.h" #include "ui/gfx/geometry/rect.h" -#include "ui/views/bubble/bubble_dialog_delegate.h" +#include "ui/views/bubble/bubble_dialog_delegate_view.h" namespace gfx { class Rect;
diff --git a/chrome/browser/ui/views/frame/browser_non_client_frame_view.cc b/chrome/browser/ui/views/frame/browser_non_client_frame_view.cc index f34eb83..e046dcf0 100644 --- a/chrome/browser/ui/views/frame/browser_non_client_frame_view.cc +++ b/chrome/browser/ui/views/frame/browser_non_client_frame_view.cc
@@ -126,7 +126,7 @@ // Background tab shapes are visible iff the tab color differs from the frame // color. - return GetTabBackgroundColor(TAB_INACTIVE) != GetFrameColor(); + return GetTabBackgroundColor(TAB_INACTIVE, true) != GetFrameColor(); } gfx::ImageSkia BrowserNonClientFrameView::GetIncognitoAvatarIcon() const { @@ -144,7 +144,15 @@ ShouldPaintAsActive() ? ThemeProperties::COLOR_TOOLBAR_TOP_SEPARATOR : ThemeProperties::COLOR_TOOLBAR_TOP_SEPARATOR_INACTIVE; - return GetThemeOrDefaultColor(color_id); + + SkColor paint_color = GetThemeOrDefaultColor(color_id); + + // In refresh, the vertical tab separator might show through the stroke if the + // stroke color is translucent. To prevent this, always use an opaque stroke + // color. + return MD::IsRefreshUi() + ? color_utils::GetResultingPaintColor(paint_color, GetFrameColor()) + : paint_color; } SkColor BrowserNonClientFrameView::GetTabSeparatorColor() const { @@ -154,13 +162,14 @@ // 1.84 contrast ratio, whichever is larger" (and make sure the blend is large // enough in the default theme to not need adjusting). constexpr SkAlpha kTabSeparatorAlpha = 0x4D; // 30% - const SkColor tab_color = GetTabBackgroundColor(TAB_INACTIVE); + const SkColor tab_color = GetTabBackgroundColor(TAB_INACTIVE, true); const SkColor base_color = color_utils::BlendTowardOppositeLuma(tab_color, SK_AlphaOPAQUE); return color_utils::AlphaBlend(base_color, tab_color, kTabSeparatorAlpha); } -SkColor BrowserNonClientFrameView::GetTabBackgroundColor(TabState state) const { +SkColor BrowserNonClientFrameView::GetTabBackgroundColor(TabState state, + bool opaque) const { if (state == TAB_ACTIVE) return GetThemeOrDefaultColor(ThemeProperties::COLOR_TOOLBAR); @@ -171,11 +180,16 @@ // When the background tab color has not been customized, use the actual frame // color instead of COLOR_BACKGROUND_TAB; these will differ for single-tab // mode and custom window frame colors. - return (MD::IsRefreshUi() && !tp->HasCustomColor(color_id)) - ? color_utils::HSLShift( - GetFrameColor(), - tp->GetTint(ThemeProperties::TINT_BACKGROUND_TAB)) - : GetThemeOrDefaultColor(color_id); + const SkColor background = + (MD::IsRefreshUi() && !tp->HasCustomColor(color_id)) + ? color_utils::HSLShift( + GetFrameColor(), + tp->GetTint(ThemeProperties::TINT_BACKGROUND_TAB)) + : GetThemeOrDefaultColor(color_id); + + return opaque + ? color_utils::GetResultingPaintColor(background, GetFrameColor()) + : background; } SkColor BrowserNonClientFrameView::GetTabForegroundColor(TabState state) const { @@ -187,7 +201,7 @@ ? ThemeProperties::COLOR_BACKGROUND_TAB_TEXT : ThemeProperties::COLOR_BACKGROUND_TAB_TEXT_INACTIVE; if (MD::IsRefreshUi() && !GetThemeProvider()->HasCustomColor(color_id)) { - const SkColor background_color = GetTabBackgroundColor(TAB_INACTIVE); + const SkColor background_color = GetTabBackgroundColor(TAB_INACTIVE, true); const SkColor default_color = color_utils::IsDark(background_color) ? gfx::kGoogleGrey500 : gfx::kGoogleGrey700; @@ -282,7 +296,7 @@ // fall back to a stroke. Always compute the contrast ratio against the // active frame color, to avoid toggling the stroke on and off as the window // activation state changes. - return color_utils::GetContrastRatio(GetTabBackgroundColor(TAB_ACTIVE), + return color_utils::GetContrastRatio(GetTabBackgroundColor(TAB_ACTIVE, true), GetFrameColor(true)) < 1.3; }
diff --git a/chrome/browser/ui/views/frame/browser_non_client_frame_view.h b/chrome/browser/ui/views/frame/browser_non_client_frame_view.h index ef4aaff..fda9586 100644 --- a/chrome/browser/ui/views/frame/browser_non_client_frame_view.h +++ b/chrome/browser/ui/views/frame/browser_non_client_frame_view.h
@@ -97,8 +97,9 @@ SkColor GetTabSeparatorColor() const; // Returns the tab background color based on both the |state| of the tab and - // the activation state of the window. - SkColor GetTabBackgroundColor(TabState state) const; + // the activation state of the window. If |opaque| is true, the resulting + // color after drawing the tab background on the frame will be returned. + SkColor GetTabBackgroundColor(TabState state, bool opaque) const; // Returns the tab foreground color of the for the text based on both the // |state| of the tab and the activation state of the window.
diff --git a/chrome/browser/ui/views/global_error_bubble_view.h b/chrome/browser/ui/views/global_error_bubble_view.h index 3a00bba..ad0dfb9 100644 --- a/chrome/browser/ui/views/global_error_bubble_view.h +++ b/chrome/browser/ui/views/global_error_bubble_view.h
@@ -8,7 +8,7 @@ #include "base/macros.h" #include "base/memory/weak_ptr.h" #include "chrome/browser/ui/global_error/global_error_bubble_view_base.h" -#include "ui/views/bubble/bubble_dialog_delegate.h" +#include "ui/views/bubble/bubble_dialog_delegate_view.h" #include "ui/views/controls/button/button.h" class Browser;
diff --git a/chrome/browser/ui/views/harmony/chrome_layout_provider.cc b/chrome/browser/ui/views/harmony/chrome_layout_provider.cc index 1e0ef0c..81f8516 100644 --- a/chrome/browser/ui/views/harmony/chrome_layout_provider.cc +++ b/chrome/browser/ui/views/harmony/chrome_layout_provider.cc
@@ -118,7 +118,3 @@ bool ChromeLayoutProvider::ShouldShowWindowIcon() const { return true; } - -bool ChromeLayoutProvider::IsHarmonyMode() const { - return false; -}
diff --git a/chrome/browser/ui/views/harmony/chrome_layout_provider.h b/chrome/browser/ui/views/harmony/chrome_layout_provider.h index 6a3c2ac1..b0ab5dd 100644 --- a/chrome/browser/ui/views/harmony/chrome_layout_provider.h +++ b/chrome/browser/ui/views/harmony/chrome_layout_provider.h
@@ -91,14 +91,6 @@ // Returns whether to show the icon next to the title text on a dialog. virtual bool ShouldShowWindowIcon() const; - // DEPRECATED. Returns whether Harmony mode is enabled. - // - // Instead of using this, create a generic solution that works for all UI - // types, e.g. by adding a new LayoutDistance value that means what you need. - // - // TODO(pkasting): Fix callers and remove this. - virtual bool IsHarmonyMode() const; - private: DISALLOW_COPY_AND_ASSIGN(ChromeLayoutProvider); };
diff --git a/chrome/browser/ui/views/harmony/chrome_typography.cc b/chrome/browser/ui/views/harmony/chrome_typography.cc index 5595b3b..229fbd13 100644 --- a/chrome/browser/ui/views/harmony/chrome_typography.cc +++ b/chrome/browser/ui/views/harmony/chrome_typography.cc
@@ -128,9 +128,6 @@ case CONTEXT_BODY_TEXT_SMALL: size_delta = ui::kLabelFontSizeDelta; break; - case CONTEXT_DEPRECATED_SMALL: - size_delta = ui::ResourceBundle::kSmallFontDelta; - break; } switch (style) {
diff --git a/chrome/browser/ui/views/harmony/chrome_typography.h b/chrome/browser/ui/views/harmony/chrome_typography.h index a4b00179..0574b56f 100644 --- a/chrome/browser/ui/views/harmony/chrome_typography.h +++ b/chrome/browser/ui/views/harmony/chrome_typography.h
@@ -44,11 +44,6 @@ // mimic the native Windows 10 look and feel. CONTEXT_WINDOWS10_NATIVE, - // ui::ResourceBundle::SmallFont (11 pt). There is no equivalent in the - // Harmony spec, so new code should not be using this. It is only provided to - // avoid changing existing UI and it will eventually be removed. - CONTEXT_DEPRECATED_SMALL, - // ToolbarButton label CONTEXT_TOOLBAR_BUTTON, };
diff --git a/chrome/browser/ui/views/harmony/harmony_layout_provider.cc b/chrome/browser/ui/views/harmony/harmony_layout_provider.cc index deb7b1e..f5326712 100644 --- a/chrome/browser/ui/views/harmony/harmony_layout_provider.cc +++ b/chrome/browser/ui/views/harmony/harmony_layout_provider.cc
@@ -131,10 +131,6 @@ return false; } -bool HarmonyLayoutProvider::IsHarmonyMode() const { - return true; -} - int HarmonyLayoutProvider::GetSnappedDialogWidth(int min_width) const { for (int snap_point : {kSmallSnapPoint, kMediumSnapPoint, kLargeSnapPoint}) { if (min_width <= snap_point)
diff --git a/chrome/browser/ui/views/harmony/harmony_layout_provider.h b/chrome/browser/ui/views/harmony/harmony_layout_provider.h index 4db4e62e..04a06f31 100644 --- a/chrome/browser/ui/views/harmony/harmony_layout_provider.h +++ b/chrome/browser/ui/views/harmony/harmony_layout_provider.h
@@ -22,7 +22,6 @@ views::GridLayout::Alignment GetControlLabelGridAlignment() const override; bool UseExtraDialogPadding() const override; bool ShouldShowWindowIcon() const override; - bool IsHarmonyMode() const override; const views::TypographyProvider& GetTypographyProvider() const override; int GetSnappedDialogWidth(int min_width) const override;
diff --git a/chrome/browser/ui/views/harmony/layout_provider_unittest.cc b/chrome/browser/ui/views/harmony/layout_provider_unittest.cc index 6c8cf8e..078de17 100644 --- a/chrome/browser/ui/views/harmony/layout_provider_unittest.cc +++ b/chrome/browser/ui/views/harmony/layout_provider_unittest.cc
@@ -244,11 +244,10 @@ constexpr int kStyle = views::style::STYLE_PRIMARY; - // Typography described in chrome_typography.h requires a - // ChromeLayoutProvider. - ChromeLayoutProvider layout_provider; + std::unique_ptr<views::LayoutProvider> layout_provider = + ChromeLayoutProvider::CreateLayoutProvider(); -// Legacy code measures everything relative to a default-constructed FontList. +// Everything's measured relative to a default-constructed FontList. // On Mac, subtract one since that is 13pt instead of 12pt. #if defined(OS_MACOSX) const int twelve = gfx::FontList().GetFontSize() - 1; @@ -263,24 +262,12 @@ EXPECT_EQ(twelve, GetFont(views::style::CONTEXT_BUTTON, kStyle).GetFontSize()); -#if defined(OS_MACOSX) - // We never exposed UI on Mac using these constants so it doesn't matter that - // they are different. They only need to match under Harmony. - EXPECT_EQ(twelve + 9, GetFont(CONTEXT_HEADLINE, kStyle).GetFontSize()); - EXPECT_EQ(twelve + 2, - GetFont(views::style::CONTEXT_DIALOG_TITLE, kStyle).GetFontSize()); - EXPECT_EQ(twelve + 2, GetFont(CONTEXT_BODY_TEXT_LARGE, kStyle).GetFontSize()); - EXPECT_EQ(twelve, GetFont(CONTEXT_DEPRECATED_SMALL, kStyle).GetFontSize()); -#else // E.g. Headline should give a 20pt font. EXPECT_EQ(twelve + 8, GetFont(CONTEXT_HEADLINE, kStyle).GetFontSize()); // Titles should be 15pt. Etc. EXPECT_EQ(twelve + 3, GetFont(views::style::CONTEXT_DIALOG_TITLE, kStyle).GetFontSize()); EXPECT_EQ(twelve + 1, GetFont(CONTEXT_BODY_TEXT_LARGE, kStyle).GetFontSize()); - EXPECT_EQ(twelve - 1, - GetFont(CONTEXT_DEPRECATED_SMALL, kStyle).GetFontSize()); -#endif } // Ensure that line height can be overridden by Chrome's TypographyProvider for
diff --git a/chrome/browser/ui/views/ime/ime_warning_bubble_view.h b/chrome/browser/ui/views/ime/ime_warning_bubble_view.h index f1155db3..0341143 100644 --- a/chrome/browser/ui/views/ime/ime_warning_bubble_view.h +++ b/chrome/browser/ui/views/ime/ime_warning_bubble_view.h
@@ -8,7 +8,7 @@ #include "base/macros.h" #include "chrome/browser/ui/browser_list_observer.h" #include "chrome/browser/ui/toolbar/toolbar_actions_bar_observer.h" -#include "ui/views/bubble/bubble_dialog_delegate.h" +#include "ui/views/bubble/bubble_dialog_delegate_view.h" class BrowserActionsContainer; class BrowserView;
diff --git a/chrome/browser/ui/views/location_bar/content_setting_image_view.cc b/chrome/browser/ui/views/location_bar/content_setting_image_view.cc index adef8f4c..bdb1093d 100644 --- a/chrome/browser/ui/views/location_bar/content_setting_image_view.cc +++ b/chrome/browser/ui/views/location_bar/content_setting_image_view.cc
@@ -4,6 +4,8 @@ #include "chrome/browser/ui/views/location_bar/content_setting_image_view.h" +#include <utility> + #include "base/strings/utf_string_conversions.h" #include "chrome/browser/profiles/profile.h" #include "chrome/browser/themes/theme_properties.h" @@ -21,15 +23,6 @@ #include "ui/views/controls/label.h" #include "ui/views/widget/widget.h" -namespace { -// Time spent with animation fully open. -const int kStayOpenTimeMS = 3200; -} - -// static -const int ContentSettingImageView::kAnimationDurationMS = - (IconLabelBubbleView::kOpenTimeMS * 2) + kStayOpenTimeMS; - ContentSettingImageView::ContentSettingImageView( std::unique_ptr<ContentSettingImageModel> image_model, Delegate* delegate, @@ -37,19 +30,9 @@ : IconLabelBubbleView(font_list), delegate_(delegate), content_setting_image_model_(std::move(image_model)), - slide_animator_(this), - pause_animation_(false), - pause_animation_state_(0.0), bubble_view_(nullptr) { DCHECK(delegate_); - SetInkDropMode(InkDropMode::ON); - SetFocusBehavior(FocusBehavior::ACCESSIBLE_ONLY); - image()->EnableCanvasFlippingForRTLUI(true); - label()->SetElideBehavior(gfx::NO_ELIDE); - label()->SetVisible(false); - - slide_animator_.SetSlideDuration(kAnimationDurationMS); - slide_animator_.SetTweenType(gfx::Tween::LINEAR); + SetUpForInOutAnimation(); } ContentSettingImageView::~ContentSettingImageView() { @@ -83,12 +66,9 @@ // the user. If this becomes a problem, we could design some sort of queueing // mechanism to show one after the other, but it doesn't seem important now. int string_id = content_setting_image_model_->explanatory_string_id(); - AnimateInkDrop(views::InkDropState::HIDDEN, nullptr /* event */); - if (string_id && !label()->visible()) { - SetLabel(l10n_util::GetStringUTF16(string_id)); - label()->SetVisible(true); - AnimateIn(); - } + AnimateInkDrop(views::InkDropState::HIDDEN, nullptr); + if (string_id) + AnimateIn(string_id); content_setting_image_model_->SetAnimationHasRun(web_contents); } @@ -127,56 +107,12 @@ ui::NativeTheme::kColorId_TextfieldDefaultColor); } -bool ContentSettingImageView::ShouldShowLabel() const { - return (!IsShrinking() || (width() > image()->GetPreferredSize().width())) && - (slide_animator_.is_animating() || pause_animation_); -} - bool ContentSettingImageView::ShouldShowSeparator() const { return false; } -double ContentSettingImageView::WidthMultiplier() const { - double state = pause_animation_ ? pause_animation_state_ - : slide_animator_.GetCurrentValue(); - // The fraction of the animation we'll spend animating the string into view, - // which is also the fraction we'll spend animating it closed; total - // animation (slide out, show, then slide in) is 1.0. - const double kOpenFraction = - static_cast<double>(kOpenTimeMS) / kAnimationDurationMS; - double size_fraction = 1.0; - if (state < kOpenFraction) - size_fraction = state / kOpenFraction; - if (state > (1.0 - kOpenFraction)) - size_fraction = (1.0 - state) / kOpenFraction; - return size_fraction; -} - -bool ContentSettingImageView::IsShrinking() const { - const double kOpenFraction = - static_cast<double>(kOpenTimeMS) / kAnimationDurationMS; - return (!pause_animation_ && slide_animator_.is_animating() && - slide_animator_.GetCurrentValue() > (1.0 - kOpenFraction)); -} - bool ContentSettingImageView::ShowBubble(const ui::Event& event) { - if (slide_animator_.is_animating()) { - // If the user clicks while we're animating, the bubble arrow will be - // pointing to the image, and if we allow the animation to keep running, the - // image will move away from the arrow (or we'll have to move the bubble, - // which is even worse). So we want to stop the animation. We have two - // choices: jump to the final post-animation state (no label visible), or - // pause the animation where we are and continue running after the bubble - // closes. The former looks more jerky, so we avoid it unless the animation - // hasn't even fully exposed the image yet, in which case pausing with half - // an image visible will look broken. - if (!pause_animation_ && ShouldShowLabel()) { - pause_animation_ = true; - pause_animation_state_ = slide_animator_.GetCurrentValue(); - } - slide_animator_.Reset(); - } - + PauseAnimation(); content::WebContents* web_contents = delegate_->GetContentSettingWebContents(); if (web_contents && !bubble_view_) { @@ -194,7 +130,7 @@ // bubble doesn't need an arrow. If the user clicks during an animation, // the animation simply pauses and no other visible state change occurs, so // show the arrow in this case. - if (!pause_animation_) { + if (!is_animation_paused()) { AnimateInkDrop(views::InkDropState::ACTIVATED, ui::LocatedEvent::FromIfValid(&event)); } @@ -220,42 +156,12 @@ : IconLabelBubbleView::GetInkDropBaseColor(); } -void ContentSettingImageView::AnimationEnded(const gfx::Animation* animation) { - slide_animator_.Reset(); - if (!pause_animation_) { - label()->SetVisible(false); - parent()->Layout(); - parent()->SchedulePaint(); - } - - GetInkDrop()->SetShowHighlightOnHover(true); - GetInkDrop()->SetShowHighlightOnFocus(true); -} - -void ContentSettingImageView::AnimationProgressed( - const gfx::Animation* animation) { - if (!pause_animation_) { - parent()->Layout(); - parent()->SchedulePaint(); - } -} - -void ContentSettingImageView::AnimationCanceled( - const gfx::Animation* animation) { - AnimationEnded(animation); -} - void ContentSettingImageView::OnWidgetDestroying(views::Widget* widget) { DCHECK(bubble_view_); DCHECK_EQ(bubble_view_->GetWidget(), widget); widget->RemoveObserver(this); bubble_view_ = nullptr; - - if (pause_animation_) { - slide_animator_.Reset(pause_animation_state_); - pause_animation_ = false; - AnimateIn(); - } + UnpauseAnimation(); } void ContentSettingImageView::OnWidgetVisibilityChanged(views::Widget* widget, @@ -272,9 +178,3 @@ GetTextColor())) .AsImageSkia()); } - -void ContentSettingImageView::AnimateIn() { - slide_animator_.Show(); - GetInkDrop()->SetShowHighlightOnHover(false); - GetInkDrop()->SetShowHighlightOnFocus(false); -}
diff --git a/chrome/browser/ui/views/location_bar/content_setting_image_view.h b/chrome/browser/ui/views/location_bar/content_setting_image_view.h index 1d9a605..c94cbce4 100644 --- a/chrome/browser/ui/views/location_bar/content_setting_image_view.h +++ b/chrome/browser/ui/views/location_bar/content_setting_image_view.h
@@ -74,25 +74,13 @@ void OnNativeThemeChanged(const ui::NativeTheme* native_theme) override; SkColor GetInkDropBaseColor() const override; SkColor GetTextColor() const override; - bool ShouldShowLabel() const override; bool ShouldShowSeparator() const override; - double WidthMultiplier() const override; - bool IsShrinking() const override; bool ShowBubble(const ui::Event& event) override; bool IsBubbleShowing() const override; ContentSettingImageModel::ImageType GetTypeForTesting() const; private: - // The total animation time, including open and close as well as an - // intervening "stay open" period. - static const int kAnimationDurationMS; - - // gfx::AnimationDelegate: - void AnimationEnded(const gfx::Animation* animation) override; - void AnimationProgressed(const gfx::Animation* animation) override; - void AnimationCanceled(const gfx::Animation* animation) override; - // views::WidgetObserver: void OnWidgetDestroying(views::Widget* widget) override; void OnWidgetVisibilityChanged(views::Widget* widget, bool visible) override; @@ -100,17 +88,8 @@ // Updates the image and tooltip to match the current model state. void UpdateImage(); - // Animates the view in and disables highlighting for hover and focus. - // TODO(bruthig): See crbug.com/669253. Since the ink drop highlight currently - // cannot handle host resizes, the highlight needs to be disabled when the - // animation is running. - void AnimateIn(); - Delegate* delegate_; // Weak. std::unique_ptr<ContentSettingImageModel> content_setting_image_model_; - gfx::SlideAnimation slide_animator_; - bool pause_animation_; - double pause_animation_state_; views::BubbleDialogDelegateView* bubble_view_; base::Optional<SkColor> icon_color_;
diff --git a/chrome/browser/ui/views/location_bar/icon_label_bubble_view.cc b/chrome/browser/ui/views/location_bar/icon_label_bubble_view.cc index 62dc813..693f04b 100644 --- a/chrome/browser/ui/views/location_bar/icon_label_bubble_view.cc +++ b/chrome/browser/ui/views/location_bar/icon_label_bubble_view.cc
@@ -4,13 +4,16 @@ #include "chrome/browser/ui/views/location_bar/icon_label_bubble_view.h" +#include <algorithm> #include <memory> +#include <utility> #include "chrome/browser/ui/layout_constants.h" #include "chrome/browser/ui/omnibox/omnibox_theme.h" #include "chrome/browser/ui/views/location_bar/background_with_1_px_border.h" #include "chrome/browser/ui/views/location_bar/location_bar_view.h" #include "ui/accessibility/ax_node_data.h" +#include "ui/base/l10n/l10n_util.h" #include "ui/base/material_design/material_design_controller.h" #include "ui/compositor/layer_animator.h" #include "ui/compositor/scoped_layer_animation_settings.h" @@ -41,6 +44,18 @@ constexpr int kIconLabelBubbleFadeInDurationMs = 250; constexpr int kIconLabelBubbleFadeOutDurationMs = 175; +// The type of tweening for the animation. +const gfx::Tween::Type kTweenType = gfx::Tween::EASE_IN_OUT; + +// The time for the text to animate out, as well as in. +constexpr int kSlideTimeMS = 600; + +// The total time for the in and out text animation. +constexpr int kAnimationDurationMS = 3000; + +// The fraction of time taken for the text to animate out, as well as in. +const double kOpenTimeFraction = + static_cast<double>(kSlideTimeMS) / kAnimationDurationMS; } // namespace ////////////////////////////////////////////////////////////////// @@ -112,8 +127,7 @@ image_(new views::ImageView()), label_(new views::Label(base::string16(), {font_list})), ink_drop_container_(new views::InkDropContainerView()), - separator_view_(new SeparatorView(this)), - suppress_button_release_(false) { + separator_view_(new SeparatorView(this)) { // Disable separate hit testing for |image_|. This prevents views treating // |image_| as a separate mouse hover region from |this|. image_->set_can_process_events_within_subtree(false); @@ -158,6 +172,8 @@ views::InkDropState state) {} bool IconLabelBubbleView::ShouldShowLabel() const { + if (slide_animation_.is_animating() || is_animation_paused_) + return !IsShrinking() || (width() > image()->GetPreferredSize().width()); return label_->visible() && !label_->text().empty(); } @@ -183,11 +199,22 @@ } double IconLabelBubbleView::WidthMultiplier() const { - return 1.0; + if (!slide_animation_.is_animating() && !is_animation_paused_) + return 1.0; + + double state = is_animation_paused_ ? pause_animation_state_ + : slide_animation_.GetCurrentValue(); + double size_fraction = 1.0; + if (state < open_state_fraction_) + size_fraction = state / open_state_fraction_; + if (state > (1.0 - open_state_fraction_)) + size_fraction = (1.0 - state) / open_state_fraction_; + return size_fraction; } bool IconLabelBubbleView::IsShrinking() const { - return false; + return slide_animation_.is_animating() && !is_animation_paused_ && + slide_animation_.GetCurrentValue() > (1.0 - open_state_fraction_); } bool IconLabelBubbleView::ShowBubble(const ui::Event& event) { @@ -381,6 +408,32 @@ Button::OnBlur(); } +void IconLabelBubbleView::AnimationEnded(const gfx::Animation* animation) { + slide_animation_.Reset(); + if (!is_animation_paused_) { + // If there is no separator to show, then that means we want the text to + // disappear after animating. + if (!ShouldShowSeparator()) + label()->SetVisible(false); + parent()->Layout(); + parent()->SchedulePaint(); + } + + GetInkDrop()->SetShowHighlightOnHover(true); + GetInkDrop()->SetShowHighlightOnFocus(true); +} + +void IconLabelBubbleView::AnimationProgressed(const gfx::Animation* animation) { + if (!is_animation_paused_) { + parent()->Layout(); + parent()->SchedulePaint(); + } +} + +void IconLabelBubbleView::AnimationCanceled(const gfx::Animation* animation) { + AnimationEnded(animation); +} + void IconLabelBubbleView::OnWidgetDestroying(views::Widget* widget) { widget->RemoveObserver(this); } @@ -478,3 +531,57 @@ const char* IconLabelBubbleView::GetClassName() const { return "IconLabelBubbleView"; } + +void IconLabelBubbleView::SetUpForInOutAnimation() { + SetInkDropMode(InkDropMode::ON); + SetFocusBehavior(FocusBehavior::ACCESSIBLE_ONLY); + image_->EnableCanvasFlippingForRTLUI(true); + label_->SetElideBehavior(gfx::NO_ELIDE); + label_->SetVisible(false); + + slide_animation_.SetSlideDuration(kAnimationDurationMS); + slide_animation_.SetTweenType(kTweenType); + open_state_fraction_ = + gfx::Tween::CalculateValue(kTweenType, kOpenTimeFraction); +} + +void IconLabelBubbleView::AnimateIn(int string_id) { + if (!label()->visible()) { + SetLabel(l10n_util::GetStringUTF16(string_id)); + label()->SetVisible(true); + ShowAnimation(); + } +} + +void IconLabelBubbleView::PauseAnimation() { + if (slide_animation_.is_animating()) { + // If the user clicks while we're animating, the bubble arrow will be + // pointing to the image, and if we allow the animation to keep running, the + // image will move away from the arrow (or we'll have to move the bubble, + // which is even worse). So we want to stop the animation. We have two + // choices: jump to the final post-animation state (no label visible), or + // pause the animation where we are and continue running after the bubble + // closes. The former looks more jerky, so we avoid it unless the animation + // hasn't even fully exposed the image yet, in which case pausing with half + // an image visible will look broken. + if (!is_animation_paused_ && ShouldShowLabel()) { + is_animation_paused_ = true; + pause_animation_state_ = slide_animation_.GetCurrentValue(); + } + slide_animation_.Reset(); + } +} + +void IconLabelBubbleView::UnpauseAnimation() { + if (is_animation_paused_) { + slide_animation_.Reset(pause_animation_state_); + is_animation_paused_ = false; + ShowAnimation(); + } +} + +void IconLabelBubbleView::ShowAnimation() { + slide_animation_.Show(); + GetInkDrop()->SetShowHighlightOnHover(false); + GetInkDrop()->SetShowHighlightOnFocus(false); +}
diff --git a/chrome/browser/ui/views/location_bar/icon_label_bubble_view.h b/chrome/browser/ui/views/location_bar/icon_label_bubble_view.h index 1192d0c..d70884e 100644 --- a/chrome/browser/ui/views/location_bar/icon_label_bubble_view.h +++ b/chrome/browser/ui/views/location_bar/icon_label_bubble_view.h
@@ -5,6 +5,7 @@ #ifndef CHROME_BROWSER_UI_VIEWS_LOCATION_BAR_ICON_LABEL_BUBBLE_VIEW_H_ #define CHROME_BROWSER_UI_VIEWS_LOCATION_BAR_ICON_LABEL_BUBBLE_VIEW_H_ +#include <memory> #include <string> #include "base/macros.h" @@ -145,6 +146,9 @@ void NotifyClick(const ui::Event& event) override; void OnFocus() override; void OnBlur() override; + void AnimationEnded(const gfx::Animation* animation) override; + void AnimationProgressed(const gfx::Animation* animation) override; + void AnimationCanceled(const gfx::Animation* animation) override; // views::WidgetObserver: void OnWidgetDestroying(views::Widget* widget) override; @@ -161,6 +165,21 @@ // this returns 0. int GetPrefixedSeparatorWidth() const; + // Set up for icons that animate their labels in and then out. + void SetUpForInOutAnimation(); + + // Animates the view in and disables highlighting for hover and focus. + // TODO(bruthig): See https://crbug.com/669253. Since the ink drop highlight + // currently cannot handle host resizes, the highlight needs to be disabled + // when the animation is running. + void AnimateIn(int string_id); + void PauseAnimation(); + void UnpauseAnimation(); + + // Returns true iff the slide animation has started, has not ended and is + // currently paused. + bool is_animation_paused() const { return is_animation_paused_; } + private: // Spacing between the image and the label. int GetInternalSpacing() const; @@ -180,6 +199,8 @@ // views::View: const char* GetClassName() const override; + void ShowAnimation(); + // The contents of the bubble. views::ImageView* image_; views::Label* label_; @@ -195,7 +216,15 @@ // event. If this is true then IsTriggerableEvent() will return false to // prevent the bubble from reshowing. This flag is necessary because the // bubble gets dismissed before the button handles the mouse release event. - bool suppress_button_release_; + bool suppress_button_release_ = false; + + // Slide animation for label. + gfx::SlideAnimation slide_animation_{this}; + + // Parameters for the slide animation. + bool is_animation_paused_ = false; + double pause_animation_state_ = 0.0; + double open_state_fraction_ = 0.0; DISALLOW_COPY_AND_ASSIGN(IconLabelBubbleView); };
diff --git a/chrome/browser/ui/views/location_bar/location_bar_bubble_delegate_view.h b/chrome/browser/ui/views/location_bar/location_bar_bubble_delegate_view.h index 9f87c7a..712868c 100644 --- a/chrome/browser/ui/views/location_bar/location_bar_bubble_delegate_view.h +++ b/chrome/browser/ui/views/location_bar/location_bar_bubble_delegate_view.h
@@ -9,7 +9,7 @@ #include "content/public/browser/notification_observer.h" #include "content/public/browser/notification_registrar.h" #include "content/public/browser/web_contents_observer.h" -#include "ui/views/bubble/bubble_dialog_delegate.h" +#include "ui/views/bubble/bubble_dialog_delegate_view.h" #include "ui/views/event_monitor.h" namespace content {
diff --git a/chrome/browser/ui/views/location_bar/location_bar_view.cc b/chrome/browser/ui/views/location_bar/location_bar_view.cc index 1379ec7..a974517 100644 --- a/chrome/browser/ui/views/location_bar/location_bar_view.cc +++ b/chrome/browser/ui/views/location_bar/location_bar_view.cc
@@ -7,6 +7,7 @@ #include <algorithm> #include <map> #include <memory> +#include <utility> #include "base/feature_list.h" #include "base/i18n/rtl.h" @@ -237,8 +238,8 @@ page_action_icons_.push_back(manage_passwords_icon_view_); if (browser_) { - save_credit_card_icon_view_ = - new autofill::SaveCardIconView(command_updater(), browser_, this); + save_credit_card_icon_view_ = new autofill::SaveCardIconView( + command_updater(), browser_, this, font_list); page_action_icons_.push_back(save_credit_card_icon_view_); } translate_icon_view_ = new TranslateIconView(command_updater(), this);
diff --git a/chrome/browser/ui/views/media_router/cast_dialog_view.h b/chrome/browser/ui/views/media_router/cast_dialog_view.h index a2dfa45..2d87c302 100644 --- a/chrome/browser/ui/views/media_router/cast_dialog_view.h +++ b/chrome/browser/ui/views/media_router/cast_dialog_view.h
@@ -13,7 +13,7 @@ #include "chrome/browser/ui/views/media_router/cast_dialog_metrics.h" #include "ui/base/models/simple_menu_model.h" #include "ui/views/bubble/bubble_border.h" -#include "ui/views/bubble/bubble_dialog_delegate.h" +#include "ui/views/bubble/bubble_dialog_delegate_view.h" #include "ui/views/controls/button/button.h" #include "ui/views/controls/menu/menu_runner.h"
diff --git a/chrome/browser/ui/views/media_router/cloud_services_dialog_view.h b/chrome/browser/ui/views/media_router/cloud_services_dialog_view.h index 63760ad..45f2417 100644 --- a/chrome/browser/ui/views/media_router/cloud_services_dialog_view.h +++ b/chrome/browser/ui/views/media_router/cloud_services_dialog_view.h
@@ -6,7 +6,7 @@ #define CHROME_BROWSER_UI_VIEWS_MEDIA_ROUTER_CLOUD_SERVICES_DIALOG_VIEW_H_ #include "base/strings/string16.h" -#include "ui/views/bubble/bubble_dialog_delegate.h" +#include "ui/views/bubble/bubble_dialog_delegate_view.h" #include "ui/views/controls/styled_label_listener.h" class Browser;
diff --git a/chrome/browser/ui/views/media_router/media_remoting_dialog_view.h b/chrome/browser/ui/views/media_router/media_remoting_dialog_view.h index f09348e..dd2f39c 100644 --- a/chrome/browser/ui/views/media_router/media_remoting_dialog_view.h +++ b/chrome/browser/ui/views/media_router/media_remoting_dialog_view.h
@@ -5,7 +5,7 @@ #ifndef CHROME_BROWSER_UI_VIEWS_MEDIA_ROUTER_MEDIA_REMOTING_DIALOG_VIEW_H_ #define CHROME_BROWSER_UI_VIEWS_MEDIA_ROUTER_MEDIA_REMOTING_DIALOG_VIEW_H_ -#include "ui/views/bubble/bubble_dialog_delegate.h" +#include "ui/views/bubble/bubble_dialog_delegate_view.h" class PrefService;
diff --git a/chrome/browser/ui/views/network_profile_bubble_view.cc b/chrome/browser/ui/views/network_profile_bubble_view.cc index b780e1de2..033a16d9 100644 --- a/chrome/browser/ui/views/network_profile_bubble_view.cc +++ b/chrome/browser/ui/views/network_profile_bubble_view.cc
@@ -17,7 +17,7 @@ #include "components/prefs/pref_service.h" #include "components/strings/grit/components_strings.h" #include "ui/base/l10n/l10n_util.h" -#include "ui/views/bubble/bubble_dialog_delegate.h" +#include "ui/views/bubble/bubble_dialog_delegate_view.h" #include "ui/views/controls/label.h" #include "ui/views/controls/link.h" #include "ui/views/controls/link_listener.h"
diff --git a/chrome/browser/ui/views/outdated_upgrade_bubble_view.h b/chrome/browser/ui/views/outdated_upgrade_bubble_view.h index 01b1cc6f..19831dca 100644 --- a/chrome/browser/ui/views/outdated_upgrade_bubble_view.h +++ b/chrome/browser/ui/views/outdated_upgrade_bubble_view.h
@@ -6,7 +6,7 @@ #define CHROME_BROWSER_UI_VIEWS_OUTDATED_UPGRADE_BUBBLE_VIEW_H_ #include "base/macros.h" -#include "ui/views/bubble/bubble_dialog_delegate.h" +#include "ui/views/bubble/bubble_dialog_delegate_view.h" namespace content { class PageNavigator;
diff --git a/chrome/browser/ui/views/page_action/page_action_icon_view.cc b/chrome/browser/ui/views/page_action/page_action_icon_view.cc index b74ab37d..232c83f 100644 --- a/chrome/browser/ui/views/page_action/page_action_icon_view.cc +++ b/chrome/browser/ui/views/page_action/page_action_icon_view.cc
@@ -21,7 +21,7 @@ #include "ui/views/animation/ink_drop_highlight.h" #include "ui/views/animation/ink_drop_impl.h" #include "ui/views/animation/ink_drop_mask.h" -#include "ui/views/bubble/bubble_dialog_delegate.h" +#include "ui/views/bubble/bubble_dialog_delegate_view.h" #include "ui/views/controls/focus_ring.h" #include "ui/views/style/platform_style.h"
diff --git a/chrome/browser/ui/views/page_info/page_info_bubble_view_base.h b/chrome/browser/ui/views/page_info/page_info_bubble_view_base.h index 1c73809..b3cccfc 100644 --- a/chrome/browser/ui/views/page_info/page_info_bubble_view_base.h +++ b/chrome/browser/ui/views/page_info/page_info_bubble_view_base.h
@@ -7,7 +7,7 @@ #include "content/public/browser/web_contents_observer.h" #include "ui/gfx/native_widget_types.h" -#include "ui/views/bubble/bubble_dialog_delegate.h" +#include "ui/views/bubble/bubble_dialog_delegate_view.h" namespace content { class WebContents;
diff --git a/chrome/browser/ui/views/passwords/account_chooser_dialog_view.h b/chrome/browser/ui/views/passwords/account_chooser_dialog_view.h index a5691a9..c986f61 100644 --- a/chrome/browser/ui/views/passwords/account_chooser_dialog_view.h +++ b/chrome/browser/ui/views/passwords/account_chooser_dialog_view.h
@@ -7,7 +7,7 @@ #include "base/macros.h" #include "chrome/browser/ui/passwords/password_dialog_prompts.h" -#include "ui/views/bubble/bubble_dialog_delegate.h" +#include "ui/views/bubble/bubble_dialog_delegate_view.h" #include "ui/views/controls/button/button.h" #include "ui/views/controls/styled_label_listener.h"
diff --git a/chrome/browser/ui/views/passwords/credentials_item_view.cc b/chrome/browser/ui/views/passwords/credentials_item_view.cc index 9d89c0b7..ff3f9c1 100644 --- a/chrome/browser/ui/views/passwords/credentials_item_view.cc +++ b/chrome/browser/ui/views/passwords/credentials_item_view.cc
@@ -90,9 +90,7 @@ // TODO(tapted): Check these (and the STYLE_ values below) against the spec on // http://crbug.com/651681. - const int kLabelContext = ChromeLayoutProvider::Get()->IsHarmonyMode() - ? CONTEXT_BODY_TEXT_SMALL - : CONTEXT_DEPRECATED_SMALL; + const int kLabelContext = CONTEXT_BODY_TEXT_SMALL; if (!upper_text.empty()) { upper_label_ = new views::Label(upper_text, kLabelContext,
diff --git a/chrome/browser/ui/views/passwords/password_auto_sign_in_view.cc b/chrome/browser/ui/views/passwords/password_auto_sign_in_view.cc index 512a63d..76fe5b9 100644 --- a/chrome/browser/ui/views/passwords/password_auto_sign_in_view.cc +++ b/chrome/browser/ui/views/passwords/password_auto_sign_in_view.cc
@@ -33,20 +33,14 @@ : PasswordBubbleViewBase(web_contents, anchor_view, anchor_point, reason) { SetLayoutManager(std::make_unique<views::FillLayout>()); const autofill::PasswordForm& form = model()->pending_password(); - base::string16 upper_text, lower_text = form.username_value; set_margins( ChromeLayoutProvider::Get()->GetInsetsMetric(views::INSETS_DIALOG)); - if (ChromeLayoutProvider::Get()->IsHarmonyMode()) { - upper_text = - l10n_util::GetStringUTF16(IDS_MANAGE_PASSWORDS_AUTO_SIGNIN_TITLE_MD); - } else { - lower_text = l10n_util::GetStringFUTF16( - IDS_MANAGE_PASSWORDS_AUTO_SIGNIN_TITLE, lower_text); - } CredentialsItemView* credential = new CredentialsItemView( - this, upper_text, lower_text, kButtonHoverColor, &form, + this, + l10n_util::GetStringUTF16(IDS_MANAGE_PASSWORDS_AUTO_SIGNIN_TITLE_MD), + form.username_value, kButtonHoverColor, &form, content::BrowserContext::GetDefaultStoragePartition(model()->GetProfile()) ->GetURLLoaderFactoryForBrowserProcess() .get());
diff --git a/chrome/browser/ui/views/payments/editor_view_controller.cc b/chrome/browser/ui/views/payments/editor_view_controller.cc index 61b9c68..fc95487 100644 --- a/chrome/browser/ui/views/payments/editor_view_controller.cc +++ b/chrome/browser/ui/views/payments/editor_view_controller.cc
@@ -59,7 +59,7 @@ view->SetLayoutManager(std::move(layout)); std::unique_ptr<views::Label> error_label = - std::make_unique<views::Label>(error, CONTEXT_DEPRECATED_SMALL); + std::make_unique<views::Label>(error, CONTEXT_BODY_TEXT_SMALL); error_label->set_id(static_cast<int>(DialogViewID::ERROR_LABEL_OFFSET) + type); error_label->SetEnabledColor(error_label->GetNativeTheme()->GetSystemColor(
diff --git a/chrome/browser/ui/views/payments/payment_handler_web_flow_view_controller.cc b/chrome/browser/ui/views/payments/payment_handler_web_flow_view_controller.cc index 3ba1d26..0024cb5 100644 --- a/chrome/browser/ui/views/payments/payment_handler_web_flow_view_controller.cc +++ b/chrome/browser/ui/views/payments/payment_handler_web_flow_view_controller.cc
@@ -265,11 +265,12 @@ const gfx::Rect& initial_rect, bool user_gesture, bool* was_blocked) { - // Open new foreground tab triggered by user activation in payment handler - // window in browser. + // Open new foreground tab or popup triggered by user activation in payment + // handler window in browser. Browser* browser = chrome::FindLastActiveWithProfile(profile_); if (browser && user_gesture && - disposition == WindowOpenDisposition::NEW_FOREGROUND_TAB) { + (disposition == WindowOpenDisposition::NEW_FOREGROUND_TAB || + disposition == WindowOpenDisposition::NEW_POPUP)) { chrome::AddWebContents(browser, source, std::move(new_contents), disposition, initial_rect); }
diff --git a/chrome/browser/ui/views/payments/payment_method_view_controller.cc b/chrome/browser/ui/views/payments/payment_method_view_controller.cc index 17795d52..450b38f3 100644 --- a/chrome/browser/ui/views/payments/payment_method_view_controller.cc +++ b/chrome/browser/ui/views/payments/payment_method_view_controller.cc
@@ -128,8 +128,8 @@ base::string16 missing_info; if (!instrument_->IsCompleteForPayment()) { missing_info = instrument_->GetMissingInfoLabel(); - auto missing_info_label = std::make_unique<views::Label>( - missing_info, CONTEXT_DEPRECATED_SMALL); + auto missing_info_label = + std::make_unique<views::Label>(missing_info, CONTEXT_BODY_TEXT_SMALL); missing_info_label->SetEnabledColor( missing_info_label->GetNativeTheme()->GetSystemColor( ui::NativeTheme::kColorId_LinkEnabled));
diff --git a/chrome/browser/ui/views/payments/payment_request_views_util.cc b/chrome/browser/ui/views/payments/payment_request_views_util.cc index 8dc1ca6..ed4fa70 100644 --- a/chrome/browser/ui/views/payments/payment_request_views_util.cc +++ b/chrome/browser/ui/views/payments/payment_request_views_util.cc
@@ -139,7 +139,7 @@ std::unique_ptr<views::Label> GetLabelForMissingInformation( const base::string16& missing_info) { std::unique_ptr<views::Label> label = - std::make_unique<views::Label>(missing_info, CONTEXT_DEPRECATED_SMALL); + std::make_unique<views::Label>(missing_info, CONTEXT_BODY_TEXT_SMALL); label->set_id(static_cast<int>(DialogViewID::PROFILE_LABEL_ERROR)); // Missing information typically has a nice shade of blue. label->SetEnabledColor(label->GetNativeTheme()->GetSystemColor(
diff --git a/chrome/browser/ui/views/permission_bubble/chooser_bubble_ui.cc b/chrome/browser/ui/views/permission_bubble/chooser_bubble_ui.cc index 7f73dca4..a30a079 100644 --- a/chrome/browser/ui/views/permission_bubble/chooser_bubble_ui.cc +++ b/chrome/browser/ui/views/permission_bubble/chooser_bubble_ui.cc
@@ -11,7 +11,7 @@ #include "chrome/browser/ui/views/bubble_anchor_util_views.h" #include "chrome/browser/ui/views/device_chooser_content_view.h" #include "components/bubble/bubble_controller.h" -#include "ui/views/bubble/bubble_dialog_delegate.h" +#include "ui/views/bubble/bubble_dialog_delegate_view.h" #include "ui/views/controls/button/label_button.h" #include "ui/views/controls/styled_label.h" #include "ui/views/controls/table/table_view_observer.h"
diff --git a/chrome/browser/ui/views/permission_bubble/chooser_bubble_ui_views.cc b/chrome/browser/ui/views/permission_bubble/chooser_bubble_ui_views.cc index 1e5f080..01f6cf51 100644 --- a/chrome/browser/ui/views/permission_bubble/chooser_bubble_ui_views.cc +++ b/chrome/browser/ui/views/permission_bubble/chooser_bubble_ui_views.cc
@@ -13,7 +13,7 @@ #include "chrome/browser/ui/browser_window.h" #include "chrome/browser/ui/permission_bubble/chooser_bubble_delegate.h" #include "chrome/browser/ui/views_mode_controller.h" -#include "ui/views/bubble/bubble_dialog_delegate.h" +#include "ui/views/bubble/bubble_dialog_delegate_view.h" #include "ui/views/widget/widget.h" // The Views browser implementation of ChooserBubbleUi's anchor methods.
diff --git a/chrome/browser/ui/views/permission_bubble/permission_prompt_impl.cc b/chrome/browser/ui/views/permission_bubble/permission_prompt_impl.cc index 37c25dc..6e602b9c 100644 --- a/chrome/browser/ui/views/permission_bubble/permission_prompt_impl.cc +++ b/chrome/browser/ui/views/permission_bubble/permission_prompt_impl.cc
@@ -28,7 +28,7 @@ #include "ui/gfx/geometry/insets.h" #include "ui/gfx/paint_vector_icon.h" #include "ui/gfx/text_constants.h" -#include "ui/views/bubble/bubble_dialog_delegate.h" +#include "ui/views/bubble/bubble_dialog_delegate_view.h" #include "ui/views/bubble/bubble_frame_view.h" #include "ui/views/controls/image_view.h" #include "ui/views/controls/label.h"
diff --git a/chrome/browser/ui/views/profiles/profile_chooser_view.cc b/chrome/browser/ui/views/profiles/profile_chooser_view.cc index 51d35fb..228e99b 100644 --- a/chrome/browser/ui/views/profiles/profile_chooser_view.cc +++ b/chrome/browser/ui/views/profiles/profile_chooser_view.cc
@@ -123,10 +123,8 @@ constexpr int kMenuEdgeMargin = 16; // If the bubble is too large to fit on the screen, it still needs to be at -// least this tall to show the default items. The default items is what a signed -// in user with 1 profile sees: account name, autofill home and 3 profile -// actions. -constexpr int kMinimumScrollableContentHeight = 340; +// least this tall to show one row. +constexpr int kMinimumScrollableContentHeight = 40; constexpr int kVerticalSpacing = 16; @@ -1361,7 +1359,7 @@ kMenuEdgeMargin, horizontal_margin)); views::Label* disclaimer = new views::Label( - avatar_menu_->GetSupervisedUserInformation(), CONTEXT_DEPRECATED_SMALL); + avatar_menu_->GetSupervisedUserInformation(), CONTEXT_BODY_TEXT_SMALL); disclaimer->SetMultiLine(true); disclaimer->SetAllowCharacterBreak(true); disclaimer->SetHorizontalAlignment(gfx::ALIGN_LEFT); @@ -1555,12 +1553,12 @@ primary_account_removal_label->AddStyleRange( gfx::Range(offsets[1], offsets[1] + settings_text.size()), views::StyledLabel::RangeStyleInfo::CreateForLink()); - primary_account_removal_label->SetTextContext(CONTEXT_DEPRECATED_SMALL); + primary_account_removal_label->SetTextContext(CONTEXT_BODY_TEXT_SMALL); layout->AddView(primary_account_removal_label); } else { views::Label* content_label = new views::Label( l10n_util::GetStringUTF16(IDS_PROFILES_ACCOUNT_REMOVAL_TEXT), - CONTEXT_DEPRECATED_SMALL); + CONTEXT_BODY_TEXT_SMALL); content_label->SetMultiLine(true); content_label->SetHorizontalAlignment(gfx::ALIGN_LEFT); layout->AddView(content_label);
diff --git a/chrome/browser/ui/views/profiles/profile_chooser_view.h b/chrome/browser/ui/views/profiles/profile_chooser_view.h index 644d9410..d921462 100644 --- a/chrome/browser/ui/views/profiles/profile_chooser_view.h +++ b/chrome/browser/ui/views/profiles/profile_chooser_view.h
@@ -22,7 +22,7 @@ #include "components/signin/core/browser/signin_header_helper.h" #include "content/public/browser/web_contents_delegate.h" #include "google_apis/gaia/oauth2_token_service.h" -#include "ui/views/bubble/bubble_dialog_delegate.h" +#include "ui/views/bubble/bubble_dialog_delegate_view.h" #include "ui/views/controls/button/button.h" #include "ui/views/controls/link_listener.h" #include "ui/views/controls/styled_label_listener.h"
diff --git a/chrome/browser/ui/views/proximity_auth/proximity_auth_error_bubble_view.h b/chrome/browser/ui/views/proximity_auth/proximity_auth_error_bubble_view.h index f703755..3712fd3 100644 --- a/chrome/browser/ui/views/proximity_auth/proximity_auth_error_bubble_view.h +++ b/chrome/browser/ui/views/proximity_auth/proximity_auth_error_bubble_view.h
@@ -10,7 +10,7 @@ #include "base/strings/string16.h" #include "content/public/browser/web_contents_observer.h" #include "ui/gfx/range/range.h" -#include "ui/views/bubble/bubble_dialog_delegate.h" +#include "ui/views/bubble/bubble_dialog_delegate_view.h" #include "ui/views/controls/styled_label_listener.h" #include "url/gurl.h"
diff --git a/chrome/browser/ui/views/relaunch_notification/relaunch_recommended_bubble_view.cc b/chrome/browser/ui/views/relaunch_notification/relaunch_recommended_bubble_view.cc index dfed0f97..16ab625 100644 --- a/chrome/browser/ui/views/relaunch_notification/relaunch_recommended_bubble_view.cc +++ b/chrome/browser/ui/views/relaunch_notification/relaunch_recommended_bubble_view.cc
@@ -27,7 +27,7 @@ #include "ui/gfx/paint_vector_icon.h" #include "ui/gfx/text_constants.h" #include "ui/views/bubble/bubble_border.h" -#include "ui/views/bubble/bubble_dialog_delegate.h" +#include "ui/views/bubble/bubble_dialog_delegate_view.h" #include "ui/views/bubble/bubble_frame_view.h" #include "ui/views/controls/button/button.h" #include "ui/views/controls/label.h"
diff --git a/chrome/browser/ui/views/session_crashed_bubble_view.h b/chrome/browser/ui/views/session_crashed_bubble_view.h index 3232336f..1b42855 100644 --- a/chrome/browser/ui/views/session_crashed_bubble_view.h +++ b/chrome/browser/ui/views/session_crashed_bubble_view.h
@@ -9,7 +9,7 @@ #include "base/macros.h" #include "chrome/browser/ui/session_crashed_bubble.h" -#include "ui/views/bubble/bubble_dialog_delegate.h" +#include "ui/views/bubble/bubble_dialog_delegate_view.h" #include "ui/views/controls/styled_label_listener.h" namespace views {
diff --git a/chrome/browser/ui/views/tabs/browser_tab_strip_controller.cc b/chrome/browser/ui/views/tabs/browser_tab_strip_controller.cc index 3f5f33e..8e8c02f 100644 --- a/chrome/browser/ui/views/tabs/browser_tab_strip_controller.cc +++ b/chrome/browser/ui/views/tabs/browser_tab_strip_controller.cc
@@ -402,8 +402,9 @@ return GetFrameView()->GetTabSeparatorColor(); } -SkColor BrowserTabStripController::GetTabBackgroundColor(TabState state) const { - return GetFrameView()->GetTabBackgroundColor(state); +SkColor BrowserTabStripController::GetTabBackgroundColor(TabState state, + bool opaque) const { + return GetFrameView()->GetTabBackgroundColor(state, opaque); } SkColor BrowserTabStripController::GetTabForegroundColor(TabState state) const {
diff --git a/chrome/browser/ui/views/tabs/browser_tab_strip_controller.h b/chrome/browser/ui/views/tabs/browser_tab_strip_controller.h index db4e708..60f63a5 100644 --- a/chrome/browser/ui/views/tabs/browser_tab_strip_controller.h +++ b/chrome/browser/ui/views/tabs/browser_tab_strip_controller.h
@@ -80,7 +80,7 @@ SkColor GetFrameColor() const override; SkColor GetToolbarTopSeparatorColor() const override; SkColor GetTabSeparatorColor() const override; - SkColor GetTabBackgroundColor(TabState active) const override; + SkColor GetTabBackgroundColor(TabState active, bool opaque) const override; SkColor GetTabForegroundColor(TabState state) const override; int GetTabBackgroundResourceId(bool* has_custom_image) const override; base::string16 GetAccessibleTabName(const Tab* tab) const override;
diff --git a/chrome/browser/ui/views/tabs/fake_base_tab_strip_controller.cc b/chrome/browser/ui/views/tabs/fake_base_tab_strip_controller.cc index d1c60e2..f3ccb7482 100644 --- a/chrome/browser/ui/views/tabs/fake_base_tab_strip_controller.cc +++ b/chrome/browser/ui/views/tabs/fake_base_tab_strip_controller.cc
@@ -166,8 +166,8 @@ return gfx::kPlaceholderColor; } -SkColor FakeBaseTabStripController::GetTabBackgroundColor( - TabState state) const { +SkColor FakeBaseTabStripController::GetTabBackgroundColor(TabState state, + bool opaque) const { return gfx::kPlaceholderColor; }
diff --git a/chrome/browser/ui/views/tabs/fake_base_tab_strip_controller.h b/chrome/browser/ui/views/tabs/fake_base_tab_strip_controller.h index 305dcdc0..7e70d3a 100644 --- a/chrome/browser/ui/views/tabs/fake_base_tab_strip_controller.h +++ b/chrome/browser/ui/views/tabs/fake_base_tab_strip_controller.h
@@ -56,7 +56,7 @@ SkColor GetFrameColor() const override; SkColor GetToolbarTopSeparatorColor() const override; SkColor GetTabSeparatorColor() const override; - SkColor GetTabBackgroundColor(TabState state) const override; + SkColor GetTabBackgroundColor(TabState state, bool opaque) const override; SkColor GetTabForegroundColor(TabState state) const override; int GetTabBackgroundResourceId(bool* has_custom_image) const override; base::string16 GetAccessibleTabName(const Tab* tab) const override;
diff --git a/chrome/browser/ui/views/tabs/new_tab_button.cc b/chrome/browser/ui/views/tabs/new_tab_button.cc index 40ce088..ebb5680d1 100644 --- a/chrome/browser/ui/views/tabs/new_tab_button.cc +++ b/chrome/browser/ui/views/tabs/new_tab_button.cc
@@ -478,7 +478,7 @@ SkShader::kRepeat_TileMode, &flags); DCHECK(succeeded); } else { - flags.setColor(GetButtonFillColor()); + flags.setColor(GetButtonFillColor(false)); } cc::PaintFlags shadow_flags = flags; @@ -541,13 +541,13 @@ paint_flags); } -SkColor NewTabButton::GetButtonFillColor() const { +SkColor NewTabButton::GetButtonFillColor(bool opaque) const { if (new_tab_promo_observer_.IsObservingSources()) { return GetNativeTheme()->GetSystemColor( ui::NativeTheme::kColorId_ProminentButtonColor); } - return tab_strip_->GetTabBackgroundColor(TAB_INACTIVE); + return tab_strip_->GetTabBackgroundColor(TAB_INACTIVE, opaque); } SkColor NewTabButton::GetIconColor() const { @@ -657,5 +657,5 @@ DCHECK(MD::IsNewerMaterialUi()); set_ink_drop_base_color(color_utils::BlendTowardOppositeLuma( - GetButtonFillColor(), SK_AlphaOPAQUE)); + GetButtonFillColor(true), SK_AlphaOPAQUE)); }
diff --git a/chrome/browser/ui/views/tabs/new_tab_button.h b/chrome/browser/ui/views/tabs/new_tab_button.h index f4326ea8..ee402113 100644 --- a/chrome/browser/ui/views/tabs/new_tab_button.h +++ b/chrome/browser/ui/views/tabs/new_tab_button.h
@@ -109,7 +109,7 @@ // Paints a properly sized plus (+) icon into the center of the button. void PaintPlusIcon(gfx::Canvas* canvas, int offset, int size); - SkColor GetButtonFillColor() const; + SkColor GetButtonFillColor(bool opaque) const; SkColor GetIconColor() const; // In the touch-optimized UI, initializes the incognito button icon.
diff --git a/chrome/browser/ui/views/tabs/tab.cc b/chrome/browser/ui/views/tabs/tab.cc index 58759cc..d1bebe67 100644 --- a/chrome/browser/ui/views/tabs/tab.cc +++ b/chrome/browser/ui/views/tabs/tab.cc
@@ -220,23 +220,26 @@ // The refresh-specific implementation of GetInteriorPath() (see below). gfx::Path GetRefreshInteriorPath(float scale, float stroke_thickness, + float bottom_offset, const gfx::Rect& bounds, const gfx::InsetsF& insets) { const gfx::RectF aligned_bounds = ScaleAndAlignBounds(bounds, scale, stroke_thickness); stroke_thickness *= scale; + bottom_offset *= scale; - const float outer_radius = GetTopCornerRadiusForWidth(bounds.width()) * scale; - const float inner_radius = std::max(outer_radius - stroke_thickness, 0.f); + const float radius = GetTopCornerRadiusForWidth(bounds.width()) * scale; + const float bottom_radius = radius - bottom_offset; + const float top_radius = std::max(radius - stroke_thickness, 0.f); // Compute |extension| as the width outside the separators. This is a fixed // value equal to the normal corner radius. const float extension = Tab::GetCornerRadius() * scale; - // When the radius shrinks, it leaves a gap between the bottom (outer) corners - // and the edge of the tab. - const float corner_gap = extension - outer_radius; + // When the radius shrinks, it leaves a gap between the bottom corners and the + // edge of the tab. + const float corner_gap = extension - bottom_radius; const float left = aligned_bounds.x() + stroke_thickness; const float top = aligned_bounds.y() + stroke_thickness; @@ -244,7 +247,7 @@ const float extended_bottom = aligned_bounds.bottom(); const float bottom_extension = GetLayoutConstant(TABSTRIP_TOOLBAR_OVERLAP) * scale; - const float bottom = extended_bottom - bottom_extension; + const float bottom = extended_bottom - bottom_extension - bottom_offset; // Construct the interior path by intersecting paths representing the left // and right halves of the tab. Compared to computing the full path at once, @@ -253,19 +256,16 @@ // Bottom right. gfx::Path right_path; - right_path.moveTo(right - corner_gap, extended_bottom); - right_path.rLineTo(0, -bottom_extension); - right_path.arcTo(outer_radius, outer_radius, 0, SkPath::kSmall_ArcSize, - SkPath::kCW_Direction, right - extension, - bottom - outer_radius); + right_path.moveTo(right - corner_gap, bottom); + right_path.rArcTo(bottom_radius, bottom_radius, 0, SkPath::kSmall_ArcSize, + SkPath::kCW_Direction, -bottom_radius, -bottom_radius); // Right vertical. - right_path.lineTo(right - extension, top + inner_radius); + right_path.lineTo(right - extension, top + top_radius); // Top right. - right_path.arcTo(inner_radius, inner_radius, 0, SkPath::kSmall_ArcSize, - SkPath::kCCW_Direction, right - extension - inner_radius, - top); + right_path.rArcTo(top_radius, top_radius, 0, SkPath::kSmall_ArcSize, + SkPath::kCCW_Direction, -top_radius, -top_radius); // Top/bottom edges of right side. right_path.lineTo(left, top); @@ -274,16 +274,16 @@ // Top left. gfx::Path left_path; - left_path.moveTo(left + extension + inner_radius, top); - left_path.arcTo(inner_radius, inner_radius, 0, SkPath::kSmall_ArcSize, - SkPath::kCCW_Direction, left + extension, top + inner_radius); + left_path.moveTo(left + extension + top_radius, top); + left_path.rArcTo(top_radius, top_radius, 0, SkPath::kSmall_ArcSize, + SkPath::kCCW_Direction, -top_radius, top_radius); // Left vertical. - left_path.lineTo(left + extension, bottom - outer_radius); + left_path.lineTo(left + extension, bottom - bottom_radius); // Bottom left. - left_path.arcTo(outer_radius, outer_radius, 0, SkPath::kSmall_ArcSize, - SkPath::kCW_Direction, left + corner_gap, bottom); + left_path.rArcTo(bottom_radius, bottom_radius, 0, SkPath::kSmall_ArcSize, + SkPath::kCW_Direction, -bottom_radius, bottom_radius); left_path.lineTo(left + corner_gap, extended_bottom); // Bottom/top edges of left side. @@ -306,10 +306,12 @@ // edge. gfx::Path GetInteriorPath(float scale, float stroke_thickness, + float bottom_offset, const gfx::Rect& bounds, const gfx::InsetsF& insets = gfx::InsetsF()) { if (MD::IsRefreshUi()) - return GetRefreshInteriorPath(scale, stroke_thickness, bounds, insets); + return GetRefreshInteriorPath(scale, stroke_thickness, bottom_offset, + bounds, insets); const float right = bounds.width() * scale; // The bottom of the tab needs to be pixel-aligned or else when we call @@ -351,18 +353,21 @@ gfx::Path GetRefreshBorderPath(const gfx::Rect& bounds, bool extend_to_top, float scale, - float stroke_thickness) { + float stroke_thickness, + float bottom_offset) { const gfx::RectF aligned_bounds = ScaleAndAlignBounds(bounds, scale, stroke_thickness); stroke_thickness *= scale; + bottom_offset *= scale; - const float outer_radius = GetTopCornerRadiusForWidth(bounds.width()) * scale; - const float inner_radius = std::max(outer_radius - stroke_thickness, 0.f); + const float top_radius = GetTopCornerRadiusForWidth(bounds.width()) * scale; + const float bottom_radius = + std::max(top_radius - stroke_thickness, 0.f) - bottom_offset; // See comments in GetRefreshInteriorPath(). const float extension = Tab::GetCornerRadius() * scale; - const float corner_gap = extension - outer_radius; + const float corner_gap = extension - bottom_radius; const float left = aligned_bounds.x(); const float top = aligned_bounds.y(); @@ -370,17 +375,15 @@ const float extended_bottom = aligned_bounds.bottom(); const float bottom_extension = GetLayoutConstant(TABSTRIP_TOOLBAR_OVERLAP) * scale; - const float bottom = extended_bottom - bottom_extension; + const float bottom = extended_bottom - bottom_extension - bottom_offset; // Bottom left. gfx::Path path; path.moveTo(left, extended_bottom); - path.rLineTo(0, -bottom_extension); - path.rLineTo(0, -stroke_thickness); + path.lineTo(left, bottom - stroke_thickness); path.rLineTo(corner_gap, 0); - path.arcTo(inner_radius, inner_radius, 0, SkPath::kSmall_ArcSize, - SkPath::kCCW_Direction, left + extension, - bottom - stroke_thickness - inner_radius); + path.rArcTo(bottom_radius, bottom_radius, 0, SkPath::kSmall_ArcSize, + SkPath::kCCW_Direction, bottom_radius, -bottom_radius); if (extend_to_top) { // Left vertical. @@ -390,26 +393,26 @@ path.lineTo(right - extension, top); } else { // Left vertical. - path.lineTo(left + extension, top + outer_radius); + path.lineTo(left + extension, top + top_radius); // Top left. - path.arcTo(outer_radius, outer_radius, 0, SkPath::kSmall_ArcSize, - SkPath::kCW_Direction, left + extension + outer_radius, top); + path.rArcTo(top_radius, top_radius, 0, SkPath::kSmall_ArcSize, + SkPath::kCW_Direction, top_radius, -top_radius); // Top edge. - path.lineTo(right - extension - outer_radius, top); + path.lineTo(right - extension - top_radius, top); // Top right. - path.arcTo(outer_radius, outer_radius, 0, SkPath::kSmall_ArcSize, - SkPath::kCW_Direction, right - extension, top + outer_radius); + path.rArcTo(top_radius, top_radius, 0, SkPath::kSmall_ArcSize, + SkPath::kCW_Direction, top_radius, top_radius); } // Right vertical. - path.lineTo(right - extension, bottom - stroke_thickness - inner_radius); + path.lineTo(right - extension, bottom - stroke_thickness - bottom_radius); // Bottom right. - path.arcTo(inner_radius, inner_radius, 0, SkPath::kSmall_ArcSize, - SkPath::kCCW_Direction, right, bottom - stroke_thickness); + path.rArcTo(bottom_radius, bottom_radius, 0, SkPath::kSmall_ArcSize, + SkPath::kCCW_Direction, bottom_radius, bottom_radius); path.rLineTo(corner_gap, 0); path.rLineTo(0, stroke_thickness); path.rLineTo(0, bottom_extension); @@ -433,12 +436,14 @@ // maximized/fullscreen mode. gfx::Path GetBorderPath(float scale, float stroke_thickness, + float bottom_offset, bool unscale_at_end, bool extend_to_top, const gfx::Rect& bounds) { gfx::Path path; if (MD::IsRefreshUi()) { - path = GetRefreshBorderPath(bounds, extend_to_top, scale, stroke_thickness); + path = GetRefreshBorderPath(bounds, extend_to_top, scale, stroke_thickness, + bottom_offset); } else { const float top = scale - stroke_thickness; const float right = bounds.width() * scale; @@ -603,8 +608,8 @@ const views::Widget* widget = GetWidget(); *mask = GetBorderPath( GetWidget()->GetCompositor()->device_scale_factor(), GetStrokeThickness(), - true, widget && (widget->IsMaximized() || widget->IsFullscreen()), - bounds()); + IsActive() ? 0 : controller_->GetStrokeThickness(), true, + widget && (widget->IsMaximized() || widget->IsFullscreen()), bounds()); return true; } @@ -940,7 +945,7 @@ kChildClipPadding + opacities.right); clip_recorder.ClipPathWithAntiAliasing(GetInteriorPath( paint_recording_scale, paint_recording_scale * GetStrokeThickness(), - bounds(), padding)); + IsActive() ? 0 : controller_->GetStrokeThickness(), bounds(), padding)); View::PaintChildren(info); } @@ -953,8 +958,9 @@ gfx::Path clip; if (!controller_->ShouldPaintTab( this, - base::BindRepeating(&GetBorderPath, canvas->image_scale(), - GetStrokeThickness(), true, false), + base::BindRepeating( + &GetBorderPath, canvas->image_scale(), GetStrokeThickness(), + IsActive() ? 0 : controller_->GetStrokeThickness(), true, false), &clip)) return; @@ -1291,9 +1297,10 @@ // |y_inset| is only set when |fill_id| is being used. DCHECK(!y_inset || fill_id); - const SkColor active_color = controller_->GetTabBackgroundColor(TAB_ACTIVE); + const SkColor active_color = + controller_->GetTabBackgroundColor(TAB_ACTIVE, false); const SkColor inactive_color = - controller_->GetTabBackgroundColor(TAB_INACTIVE); + controller_->GetTabBackgroundColor(TAB_INACTIVE, false); const SkColor stroke_color = controller_->GetToolbarTopSeparatorColor(); const bool paint_hover_effect = !active && hover_controller_.ShouldDraw(); @@ -1311,18 +1318,29 @@ // rect (see ScaleAndAlignBounds()). const float scale = canvas->image_scale(); const float stroke_thickness = GetStrokeThickness(active); + const float bottom_offset = active ? 0 : controller_->GetStrokeThickness(); if (fill_id || paint_hover_effect || (MD::IsRefreshUi() && (std::trunc(scale) != scale))) { - gfx::Path fill_path = GetInteriorPath(scale, stroke_thickness, bounds()); + // When there's a border, we want the stroke to cover up the edge of the + // fill path (https://crbug.com/873003), so set the fill path halfway + // between the inner path and the border paths. When there's no stroke, + // |stroke_thickness| is 0 and the fill, inner, and stroke paths are all + // identical. Avoid doing this on pre-refresh since strokes may be + // transparent. + gfx::Path fill_path = GetInteriorPath( + scale, MD::IsRefreshUi() ? stroke_thickness / 2 : stroke_thickness, + bottom_offset, bounds()); PaintTabBackgroundFill(canvas, fill_path, active, paint_hover_effect, active_color, inactive_color, fill_id, y_inset); if (stroke_thickness > 0) { - gfx::Path stroke_path = - GetBorderPath(scale, stroke_thickness, false, false, bounds()); + gfx::Path interior_path = + GetInteriorPath(scale, stroke_thickness, bottom_offset, bounds()); + gfx::Path outer_path = GetBorderPath( + scale, stroke_thickness, bottom_offset, false, false, bounds()); gfx::ScopedCanvas scoped_canvas(clip ? canvas : nullptr); if (clip) canvas->sk_canvas()->clipPath(*clip, SkClipOp::kDifference, true); - PaintTabBackgroundStroke(canvas, fill_path, stroke_path, active, + PaintTabBackgroundStroke(canvas, interior_path, outer_path, active, stroke_color); } } else { @@ -1330,9 +1348,11 @@ active ? background_active_cache_ : background_inactive_cache_; if (!cache.CacheKeyMatches(scale, size(), active_color, inactive_color, stroke_color, stroke_thickness)) { - gfx::Path fill_path = GetInteriorPath(scale, stroke_thickness, bounds()); - gfx::Path stroke_path = - GetBorderPath(scale, stroke_thickness, false, false, bounds()); + // See the comment in the non-caching case above for why we divide + // |stroke_thickness| by 2 on refresh. + gfx::Path fill_path = GetInteriorPath( + scale, MD::IsRefreshUi() ? stroke_thickness / 2 : stroke_thickness, + bottom_offset, bounds()); cc::PaintRecorder recorder; { @@ -1344,10 +1364,14 @@ cache.fill_record = recorder.finishRecordingAsPicture(); } if (stroke_thickness > 0) { + gfx::Path interior_path = + GetInteriorPath(scale, stroke_thickness, bottom_offset, bounds()); + gfx::Path border_path = GetBorderPath( + scale, stroke_thickness, bottom_offset, false, false, bounds()); gfx::Canvas cache_canvas( recorder.beginRecording(size().width(), size().height()), scale); - PaintTabBackgroundStroke(&cache_canvas, fill_path, stroke_path, active, - stroke_color); + PaintTabBackgroundStroke(&cache_canvas, interior_path, border_path, + active, stroke_color); cache.stroke_record = recorder.finishRecordingAsPicture(); } @@ -1726,7 +1750,7 @@ title_->SetEnabledColor(title_color); const SkColor tab_bg_color = controller_->GetTabBackgroundColor( - IsActive() ? TAB_ACTIVE : TAB_INACTIVE); + IsActive() ? TAB_ACTIVE : TAB_INACTIVE, true); const SkColor base_icon_color = MD::GetMode() == ui::MaterialDesignController::MATERIAL_TOUCH_OPTIMIZED ? GetCloseTabButtonColor(views::Button::STATE_NORMAL)
diff --git a/chrome/browser/ui/views/tabs/tab_close_button.cc b/chrome/browser/ui/views/tabs/tab_close_button.cc index ded9d87..ae6b9330 100644 --- a/chrome/browser/ui/views/tabs/tab_close_button.cc +++ b/chrome/browser/ui/views/tabs/tab_close_button.cc
@@ -119,6 +119,14 @@ } } +gfx::Size TabCloseButton::CalculatePreferredSize() const { + int width = GetWidth(); + gfx::Size size(width, width); + gfx::Insets insets = GetInsets(); + size.Enlarge(insets.width(), insets.height()); + return size; +} + void TabCloseButton::PaintButtonContents(gfx::Canvas* canvas) { canvas->SaveLayerAlpha(GetOpacity()); ButtonState button_state = state();
diff --git a/chrome/browser/ui/views/tabs/tab_close_button.h b/chrome/browser/ui/views/tabs/tab_close_button.h index 499e7cd..6a0ff207 100644 --- a/chrome/browser/ui/views/tabs/tab_close_button.h +++ b/chrome/browser/ui/views/tabs/tab_close_button.h
@@ -49,6 +49,7 @@ void OnGestureEvent(ui::GestureEvent* event) override; const char* GetClassName() const override; void Layout() override; + gfx::Size CalculatePreferredSize() const override; protected: void PaintButtonContents(gfx::Canvas* canvas) override;
diff --git a/chrome/browser/ui/views/tabs/tab_controller.h b/chrome/browser/ui/views/tabs/tab_controller.h index 0c0721d9..bfca545 100644 --- a/chrome/browser/ui/views/tabs/tab_controller.h +++ b/chrome/browser/ui/views/tabs/tab_controller.h
@@ -149,8 +149,9 @@ virtual SkColor GetTabSeparatorColor() const = 0; // Returns the tab background color based on both the |state| of the tab and - // the activation state of the window. - virtual SkColor GetTabBackgroundColor(TabState state) const = 0; + // the activation state of the window. If |opaque| is true, the resulting + // color after drawing the tab background on the frame will be returned. + virtual SkColor GetTabBackgroundColor(TabState state, bool opaque) const = 0; // Returns the tab foreground color of the the text based on both the |state| // of the tab and the activation state of the window.
diff --git a/chrome/browser/ui/views/tabs/tab_strip.cc b/chrome/browser/ui/views/tabs/tab_strip.cc index efb69739..b592f6c0 100644 --- a/chrome/browser/ui/views/tabs/tab_strip.cc +++ b/chrome/browser/ui/views/tabs/tab_strip.cc
@@ -1147,8 +1147,8 @@ return controller_->GetTabSeparatorColor(); } -SkColor TabStrip::GetTabBackgroundColor(TabState state) const { - return controller_->GetTabBackgroundColor(state); +SkColor TabStrip::GetTabBackgroundColor(TabState state, bool opaque) const { + return controller_->GetTabBackgroundColor(state, opaque); } SkColor TabStrip::GetTabForegroundColor(TabState state) const { @@ -2081,8 +2081,9 @@ // opacity of 0.45. constexpr float kDesiredContrastRadialGradient = 1.13728f; - const SkColor active_tab_bg_color = GetTabBackgroundColor(TAB_ACTIVE); - const SkColor inactive_tab_bg_color = GetTabBackgroundColor(TAB_INACTIVE); + const SkColor active_tab_bg_color = GetTabBackgroundColor(TAB_ACTIVE, true); + const SkColor inactive_tab_bg_color = + GetTabBackgroundColor(TAB_INACTIVE, true); const SkAlpha hover_base_alpha_wide = color_utils::GetBlendValueWithMinimumContrast(
diff --git a/chrome/browser/ui/views/tabs/tab_strip.h b/chrome/browser/ui/views/tabs/tab_strip.h index fe46944..c1fcebe2 100644 --- a/chrome/browser/ui/views/tabs/tab_strip.h +++ b/chrome/browser/ui/views/tabs/tab_strip.h
@@ -257,7 +257,7 @@ bool CanPaintThrobberToLayer() const override; SkColor GetToolbarTopSeparatorColor() const override; SkColor GetTabSeparatorColor() const override; - SkColor GetTabBackgroundColor(TabState state) const override; + SkColor GetTabBackgroundColor(TabState state, bool opaque) const override; SkColor GetTabForegroundColor(TabState state) const override; base::string16 GetAccessibleTabName(const Tab* tab) const override; int GetBackgroundResourceId(bool* has_custom_image) const override;
diff --git a/chrome/browser/ui/views/tabs/tab_strip_controller.h b/chrome/browser/ui/views/tabs/tab_strip_controller.h index 586cf72..840e4cd 100644 --- a/chrome/browser/ui/views/tabs/tab_strip_controller.h +++ b/chrome/browser/ui/views/tabs/tab_strip_controller.h
@@ -135,8 +135,9 @@ virtual SkColor GetTabSeparatorColor() const = 0; // Returns the tab background color based on both the |state| of the tab and - // the activation state of the window. - virtual SkColor GetTabBackgroundColor(TabState state) const = 0; + // the activation state of the window. If |opaque| is true, the resulting + // color after drawing the tab background on the frame will be returned. + virtual SkColor GetTabBackgroundColor(TabState state, bool opaque) const = 0; // Returns the tab foreground color of the the text based on both the |state| // of the tab and the activation state of the window.
diff --git a/chrome/browser/ui/views/tabs/tab_strip_unittest.cc b/chrome/browser/ui/views/tabs/tab_strip_unittest.cc index 835f41c9..c5cb4a77 100644 --- a/chrome/browser/ui/views/tabs/tab_strip_unittest.cc +++ b/chrome/browser/ui/views/tabs/tab_strip_unittest.cc
@@ -431,7 +431,7 @@ return; } - tab_strip_->SetBounds(0, 0, 320, 20); + tab_strip_->SetBounds(0, 0, 360, 20); controller_->AddTab(0, false); controller_->AddTab(1, true); controller_->AddTab(2, false); @@ -507,7 +507,7 @@ // Set the tab strip width to be wide enough for three tabs to show all // three icons, but not enough for five tabs to show all three icons. - tab_strip_->SetBounds(0, 0, 320, 20); + tab_strip_->SetBounds(0, 0, 360, 20); controller_->AddTab(0, false); controller_->AddTab(1, true); controller_->AddTab(2, false);
diff --git a/chrome/browser/ui/views/tabs/tab_unittest.cc b/chrome/browser/ui/views/tabs/tab_unittest.cc index bdc135e2..b71a822 100644 --- a/chrome/browser/ui/views/tabs/tab_unittest.cc +++ b/chrome/browser/ui/views/tabs/tab_unittest.cc
@@ -86,7 +86,7 @@ } SkColor GetToolbarTopSeparatorColor() const override { return SK_ColorBLACK; } SkColor GetTabSeparatorColor() const override { return SK_ColorBLACK; } - SkColor GetTabBackgroundColor(TabState state) const override { + SkColor GetTabBackgroundColor(TabState state, bool opaque) const override { return gfx::kPlaceholderColor; } SkColor GetTabForegroundColor(TabState state) const override { @@ -683,11 +683,12 @@ tab.SetData(data); tab.SetBounds(0, 0, 200, 50); + EXPECT_TRUE(GetTabIcon(tab)->visible()); const views::View* close = GetCloseButton(tab); const views::View* alert = GetAlertIndicator(tab); const int original_spacing = close->x() - alert->bounds().right(); - tab.SetBounds(0, 0, 60, 50); + tab.SetBounds(0, 0, 70, 50); EXPECT_FALSE(GetTabIcon(tab)->visible()); EXPECT_TRUE(close->visible()); EXPECT_TRUE(alert->visible());
diff --git a/chrome/browser/ui/views/toolbar/browser_actions_container.cc b/chrome/browser/ui/views/toolbar/browser_actions_container.cc index 83ce1a6..a74392f 100644 --- a/chrome/browser/ui/views/toolbar/browser_actions_container.cc +++ b/chrome/browser/ui/views/toolbar/browser_actions_container.cc
@@ -37,7 +37,7 @@ #include "ui/gfx/canvas.h" #include "ui/gfx/color_utils.h" #include "ui/gfx/geometry/rect.h" -#include "ui/views/bubble/bubble_dialog_delegate.h" +#include "ui/views/bubble/bubble_dialog_delegate_view.h" #include "ui/views/controls/resize_area.h" #include "ui/views/controls/separator.h" #include "ui/views/widget/widget.h"
diff --git a/chrome/browser/ui/views/toolbar/home_button.cc b/chrome/browser/ui/views/toolbar/home_button.cc index bc4aeafe..555bd92 100644 --- a/chrome/browser/ui/views/toolbar/home_button.cc +++ b/chrome/browser/ui/views/toolbar/home_button.cc
@@ -17,7 +17,7 @@ #include "components/user_prefs/user_prefs.h" #include "ui/base/l10n/l10n_util.h" #include "ui/base/models/menu_model.h" -#include "ui/views/bubble/bubble_dialog_delegate.h" +#include "ui/views/bubble/bubble_dialog_delegate_view.h" #include "ui/views/controls/styled_label.h" #include "ui/views/controls/styled_label_listener.h" #include "ui/views/layout/fill_layout.h"
diff --git a/chrome/browser/ui/views/toolbar/toolbar_actions_bar_bubble_views.h b/chrome/browser/ui/views/toolbar/toolbar_actions_bar_bubble_views.h index 4621130..cb82009 100644 --- a/chrome/browser/ui/views/toolbar/toolbar_actions_bar_bubble_views.h +++ b/chrome/browser/ui/views/toolbar/toolbar_actions_bar_bubble_views.h
@@ -9,7 +9,7 @@ #include "base/macros.h" #include "chrome/browser/ui/toolbar/toolbar_actions_bar_bubble_delegate.h" -#include "ui/views/bubble/bubble_dialog_delegate.h" +#include "ui/views/bubble/bubble_dialog_delegate_view.h" #include "ui/views/controls/button/button.h" class ToolbarActionsBarBubbleViewsTest;
diff --git a/chrome/browser/ui/views/webauthn/authenticator_dialog_view_browsertest.cc b/chrome/browser/ui/views/webauthn/authenticator_dialog_view_browsertest.cc index ffec356..54afd54 100644 --- a/chrome/browser/ui/views/webauthn/authenticator_dialog_view_browsertest.cc +++ b/chrome/browser/ui/views/webauthn/authenticator_dialog_view_browsertest.cc
@@ -46,6 +46,8 @@ return base::ASCIIToUTF16("Test OK"); } + gfx::ImageSkia* GetStepIllustration() const override { return nullptr; } + base::string16 GetStepTitle() const override { return base::ASCIIToUTF16("Test Title"); }
diff --git a/chrome/browser/ui/views/webauthn/authenticator_request_dialog_view.cc b/chrome/browser/ui/views/webauthn/authenticator_request_dialog_view.cc index 0d4e04e..2680355 100644 --- a/chrome/browser/ui/views/webauthn/authenticator_request_dialog_view.cc +++ b/chrome/browser/ui/views/webauthn/authenticator_request_dialog_view.cc
@@ -19,6 +19,7 @@ #include "ui/base/l10n/l10n_util.h" #include "ui/views/border.h" #include "ui/views/layout/fill_layout.h" +#include "ui/views/window/dialog_client_view.h" // static void ShowAuthenticatorRequestDialog( @@ -182,11 +183,17 @@ // sheet likely wants to provide a new configuration. DialogModelChanged(); - // The accessibility title is also sourced from the |sheet_|'s step title, so - // update it unless the widget is not yet shown or already being torn down. + // If the widget is not yet shown or already being torn down, we are done. In + // the former case, sizing/layout will happen once the dialog is visible. if (!GetWidget()) return; + // Force re-layout of the entire dialog client view, which includes the sheet + // content as well as the button row on the bottom. + DCHECK(GetDialogClientView()); + GetDialogClientView()->Layout(); + + // The accessibility title is also sourced from the |sheet_|'s step title. GetWidget()->UpdateWindowTitle(); // TODO(https://crbug.com/849323): Investigate how a web-modal dialog's
diff --git a/chrome/browser/ui/views/webauthn/authenticator_request_sheet_view.cc b/chrome/browser/ui/views/webauthn/authenticator_request_sheet_view.cc index 1ef31c0..32edc622 100644 --- a/chrome/browser/ui/views/webauthn/authenticator_request_sheet_view.cc +++ b/chrome/browser/ui/views/webauthn/authenticator_request_sheet_view.cc
@@ -15,8 +15,10 @@ #include "ui/gfx/paint_vector_icon.h" #include "ui/views/controls/button/image_button.h" #include "ui/views/controls/button/image_button_factory.h" +#include "ui/views/controls/image_view.h" #include "ui/views/controls/label.h" #include "ui/views/layout/box_layout.h" +#include "ui/views/layout/fill_layout.h" using views::BoxLayout; @@ -32,8 +34,14 @@ views::LayoutProvider::Get()->GetDistanceMetric( views::DISTANCE_UNRELATED_CONTROL_VERTICAL))); - std::unique_ptr<views::View> header_row = CreateHeaderRow(); - AddChildView(header_row.release()); + std::unique_ptr<views::View> upper_half = CreateIllustrationWithOverlays(); + AddChildView(upper_half.release()); + + auto title_label = std::make_unique<views::Label>( + model()->GetStepTitle(), views::style::CONTEXT_DIALOG_TITLE, + views::style::STYLE_PRIMARY); + title_label->SetHorizontalAlignment(gfx::ALIGN_LEFT); + AddChildView(title_label.release()); auto description_label = std::make_unique<views::Label>( model()->GetStepDescription(), CONTEXT_BODY_TEXT_LARGE, @@ -61,31 +69,37 @@ model()->OnBack(); } -std::unique_ptr<views::View> AuthenticatorRequestSheetView::CreateHeaderRow() { - auto header_row = std::make_unique<views::View>(); - header_row->SetLayoutManager(std::make_unique<BoxLayout>( - BoxLayout::kHorizontal, gfx::Insets(), - views::LayoutProvider::Get()->GetDistanceMetric( - views::DISTANCE_RELATED_CONTROL_HORIZONTAL))); +std::unique_ptr<views::View> +AuthenticatorRequestSheetView::CreateIllustrationWithOverlays() { + auto image_with_overlays = std::make_unique<views::View>(); + image_with_overlays->SetLayoutManager(std::make_unique<views::FillLayout>()); - auto title_label = std::make_unique<views::Label>( - model()->GetStepTitle(), views::style::CONTEXT_DIALOG_TITLE, - views::style::STYLE_PRIMARY); - title_label->SetHorizontalAlignment(gfx::ALIGN_LEFT); + auto image_view = std::make_unique<views::ImageView>(); + image_view->SetImage(model()->GetStepIllustration()); + image_with_overlays->AddChildView(image_view.release()); if (model()->IsBackButtonVisible()) { std::unique_ptr<views::ImageButton> back_arrow( views::CreateVectorImageButton(this)); back_arrow->SetFocusForPlatform(); back_arrow->SetAccessibleName(l10n_util::GetStringUTF16(IDS_BACK_BUTTON)); + + auto color_reference = std::make_unique<views::Label>( + base::string16(), views::style::CONTEXT_DIALOG_TITLE, + views::style::STYLE_PRIMARY); views::SetImageFromVectorIcon( back_arrow.get(), vector_icons::kBackArrowIcon, - color_utils::DeriveDefaultIconColor(title_label->enabled_color())); + color_utils::DeriveDefaultIconColor(color_reference->enabled_color())); + back_arrow->SizeToPreferredSize(); back_arrow_button_ = back_arrow.get(); - header_row->AddChildView(back_arrow.release()); + + // The |overlaly_container| will be stretched to fill |image_with_overlays| + // while allowing |back_arrow| to be absolutely positioned inside it, and + // rendered on top of the image due to being higher in the z-order. + auto overlay_container = std::make_unique<views::View>(); + overlay_container->AddChildView(back_arrow.release()); + image_with_overlays->AddChildView(overlay_container.release()); } - header_row->AddChildView(title_label.release()); - - return header_row; + return image_with_overlays; }
diff --git a/chrome/browser/ui/views/webauthn/authenticator_request_sheet_view.h b/chrome/browser/ui/views/webauthn/authenticator_request_sheet_view.h index 9581614..e27d581 100644 --- a/chrome/browser/ui/views/webauthn/authenticator_request_sheet_view.h +++ b/chrome/browser/ui/views/webauthn/authenticator_request_sheet_view.h
@@ -18,13 +18,19 @@ // dialog. Each sheet corresponds to a given step of the authentication flow, // and encapsulates the controls above the Ok/Cancel buttons, namely: // -- an optional `back icon`, +// -- a pretty illustration in the top half of the dialog, // -- the title of the current step, // -- the description of the current step, and // -- an optional view with step-specific content, added by subclasses, filling // the rest of the space. // // +-------------------------------------------------+ -// | (<-) Title of the current step | +// | (<-) . . . . . . . . . . . . . . . . . . . . | +// | . . . . . . . . . . . . . . . . . . . . . . . | +// | . . . I L L U S T R A T I O N H E R E . . . | +// | . . . . . . . . . . . . . . . . . . . . . . . | +// | | +// | Title of the current step | // | | // | Description text explaining to the user what | // | this step is all about. | @@ -63,9 +69,9 @@ void ButtonPressed(views::Button* sender, const ui::Event& event) override; private: - // Creates the header row of the sheet, containing an optional back arrow, - // followed by the title of the sheet. - std::unique_ptr<views::View> CreateHeaderRow(); + // Creates the upper half of the sheet, consisting of a pretty illustration + // overlayed with absolutely positioned controls rendered on top. + std::unique_ptr<views::View> CreateIllustrationWithOverlays(); std::unique_ptr<AuthenticatorRequestSheetModel> model_; views::Button* back_arrow_button_ = nullptr;
diff --git a/chrome/browser/ui/views/webauthn/sheet_view_factory.cc b/chrome/browser/ui/views/webauthn/sheet_view_factory.cc index a14ddae0..b02567c2 100644 --- a/chrome/browser/ui/views/webauthn/sheet_view_factory.cc +++ b/chrome/browser/ui/views/webauthn/sheet_view_factory.cc
@@ -19,6 +19,7 @@ private: // AuthenticatorSheetModelBase: + gfx::ImageSkia* GetStepIllustration() const override { return nullptr; } base::string16 GetStepTitle() const override { return base::string16(); } base::string16 GetStepDescription() const override { return base::string16();
diff --git a/chrome/browser/ui/webauthn/authenticator_request_sheet_model.h b/chrome/browser/ui/webauthn/authenticator_request_sheet_model.h index 9002dac..59f367f4 100644 --- a/chrome/browser/ui/webauthn/authenticator_request_sheet_model.h +++ b/chrome/browser/ui/webauthn/authenticator_request_sheet_model.h
@@ -9,6 +9,10 @@ #include "base/strings/string16.h" +namespace gfx { +class ImageSkia; +} + // The basic interface of models backing a given UI sheet shown in the WebAuthn // request dialog; where each sheet, in turn, corresponds to one of `steps` // defined by AuthenticatorRequestDialogModel. @@ -41,6 +45,7 @@ virtual bool IsAcceptButtonEnabled() const = 0; virtual base::string16 GetAcceptButtonLabel() const = 0; + virtual gfx::ImageSkia* GetStepIllustration() const = 0; virtual base::string16 GetStepTitle() const = 0; virtual base::string16 GetStepDescription() const = 0;
diff --git a/chrome/browser/ui/webauthn/sheet_models.cc b/chrome/browser/ui/webauthn/sheet_models.cc index 01964327..ee3b277 100644 --- a/chrome/browser/ui/webauthn/sheet_models.cc +++ b/chrome/browser/ui/webauthn/sheet_models.cc
@@ -8,9 +8,11 @@ #include "base/logging.h" #include "base/strings/utf_string_conversions.h" +#include "chrome/grit/browser_resources.h" #include "chrome/grit/generated_resources.h" #include "components/strings/grit/components_strings.h" #include "ui/base/l10n/l10n_util.h" +#include "ui/base/resource/resource_bundle.h" // AuthenticatorSheetModelBase ------------------------------------------------ @@ -28,6 +30,11 @@ } } +// static +gfx::ImageSkia* AuthenticatorSheetModelBase::GetImage(int resource_id) { + return ui::ResourceBundle::GetSharedInstance().GetImageSkiaNamed(resource_id); +} + bool AuthenticatorSheetModelBase::IsBackButtonVisible() const { return true; } @@ -74,6 +81,10 @@ // AuthenticatorInitialSheetModel --------------------------------------------- +gfx::ImageSkia* AuthenticatorInitialSheetModel::GetStepIllustration() const { + return GetImage(IDR_WEBAUTHN_ILLUSTRATION_WELCOME_1X); +} + base::string16 AuthenticatorInitialSheetModel::GetStepTitle() const { // TODO(hongjunchoi): Insert actual domain name from model to // |application_name|. @@ -107,6 +118,11 @@ // AuthenticatorTransportSelectorSheetModel ----------------------------------- +gfx::ImageSkia* AuthenticatorTransportSelectorSheetModel::GetStepIllustration() + const { + return GetImage(IDR_WEBAUTHN_ILLUSTRATION_WELCOME_1X); +} + base::string16 AuthenticatorTransportSelectorSheetModel::GetStepTitle() const { // TODO(hongjunchoi): Insert actual domain name from model to // |application_name|. @@ -128,6 +144,12 @@ // AuthenticatorInsertAndActivateUsbOnRegisterSheetModel ---------------------- +gfx::ImageSkia* +AuthenticatorInsertAndActivateUsbOnRegisterSheetModel::GetStepIllustration() + const { + return GetImage(IDR_WEBAUTHN_ILLUSTRATION_USB_1X); +} + base::string16 AuthenticatorInsertAndActivateUsbOnRegisterSheetModel::GetStepTitle() const { return l10n_util::GetStringUTF16(IDS_WEBAUTHN_USB_TITLE_ON_REGISTER); @@ -141,6 +163,11 @@ // AuthenticatorInsertAndActivateUsbOnSignSheetModel ---------------------- +gfx::ImageSkia* +AuthenticatorInsertAndActivateUsbOnSignSheetModel::GetStepIllustration() const { + return GetImage(IDR_WEBAUTHN_ILLUSTRATION_USB_1X); +} + base::string16 AuthenticatorInsertAndActivateUsbOnSignSheetModel::GetStepTitle() const { // TODO(hongjunchoi): Insert actual domain name from model to @@ -157,6 +184,10 @@ // AuthenticatorTimeoutErrorModel --------------------------------------------- +gfx::ImageSkia* AuthenticatorTimeoutErrorModel::GetStepIllustration() const { + return GetImage(IDR_WEBAUTHN_ILLUSTRATION_ERROR_TIMEOUT_1X); +} + base::string16 AuthenticatorTimeoutErrorModel::GetStepTitle() const { return l10n_util::GetStringUTF16(IDS_WEBAUTHN_TIMEOUT_TITLE); } @@ -167,6 +198,11 @@ // AuthenticatorBlePowerOnManualSheetModel ------------------------------------ +gfx::ImageSkia* AuthenticatorBlePowerOnManualSheetModel::GetStepIllustration() + const { + return GetImage(IDR_WEBAUTHN_ILLUSTRATION_ERROR_BLUETOOTH_1X); +} + base::string16 AuthenticatorBlePowerOnManualSheetModel::GetStepTitle() const { return l10n_util::GetStringUTF16(IDS_WEBAUTHN_BLE_POWER_ON_MANUAL_TITLE); } @@ -192,6 +228,11 @@ // AuthenticatorBlePairingBeginSheetModel ------------------------------------- +gfx::ImageSkia* AuthenticatorBlePairingBeginSheetModel::GetStepIllustration() + const { + return GetImage(IDR_WEBAUTHN_ILLUSTRATION_BLE_1X); +} + base::string16 AuthenticatorBlePairingBeginSheetModel::GetStepTitle() const { return l10n_util::GetStringUTF16(IDS_WEBAUTHN_BLE_PAIRING_BEGIN_TITLE); } @@ -216,6 +257,11 @@ // AuthenticatorBleEnterPairingModeSheetModel --------------------------------- +gfx::ImageSkia* +AuthenticatorBleEnterPairingModeSheetModel::GetStepIllustration() const { + return GetImage(IDR_WEBAUTHN_ILLUSTRATION_BLE_1X); +} + base::string16 AuthenticatorBleEnterPairingModeSheetModel::GetStepTitle() const { return l10n_util::GetStringUTF16(IDS_WEBAUTHN_BLE_ENTER_PAIRING_MODE_TITLE); @@ -229,6 +275,11 @@ // AuthenticatorBleDeviceSelectionSheetModel ---------------------------------- +gfx::ImageSkia* AuthenticatorBleDeviceSelectionSheetModel::GetStepIllustration() + const { + return GetImage(IDR_WEBAUTHN_ILLUSTRATION_BLE_NAME_1X); +} + base::string16 AuthenticatorBleDeviceSelectionSheetModel::GetStepTitle() const { return l10n_util::GetStringUTF16(IDS_WEBAUTHN_BLE_DEVICE_SELECTION_TITLE); } @@ -241,6 +292,11 @@ // AuthenticatorBlePinEntrySheetModel ----------------------------------------- +gfx::ImageSkia* AuthenticatorBlePinEntrySheetModel::GetStepIllustration() + const { + return GetImage(IDR_WEBAUTHN_ILLUSTRATION_BLE_PIN_1X); +} + base::string16 AuthenticatorBlePinEntrySheetModel::GetStepTitle() const { // TODO(hongjunchoi): Insert actual device name from model to |device_name|. base::string16 device_name = base::UTF8ToUTF16("VHGSHSSN"); @@ -267,6 +323,11 @@ // AuthenticatorBleVerifyingSheetModel ---------------------------------------- +gfx::ImageSkia* AuthenticatorBleVerifyingSheetModel::GetStepIllustration() + const { + return GetImage(IDR_WEBAUTHN_ILLUSTRATION_BLE_1X); +} + base::string16 AuthenticatorBleVerifyingSheetModel::GetStepTitle() const { return l10n_util::GetStringUTF16(IDS_WEBAUTHN_BLE_VERIFYING_TITLE); } @@ -277,6 +338,11 @@ // AuthenticatorBleActivateSheetModel ----------------------------------------- +gfx::ImageSkia* AuthenticatorBleActivateSheetModel::GetStepIllustration() + const { + return GetImage(IDR_WEBAUTHN_ILLUSTRATION_BLE_TAP_1X); +} + base::string16 AuthenticatorBleActivateSheetModel::GetStepTitle() const { // TODO(hongjunchoi): Insert actual domain name from model to // |application_name|.
diff --git a/chrome/browser/ui/webauthn/sheet_models.h b/chrome/browser/ui/webauthn/sheet_models.h index 3940b679..59073d6 100644 --- a/chrome/browser/ui/webauthn/sheet_models.h +++ b/chrome/browser/ui/webauthn/sheet_models.h
@@ -25,6 +25,10 @@ } protected: + // Pulls the image with the given |resource_id| from the resource bundle and + // loads it in Skia format. + static gfx::ImageSkia* GetImage(int resource_id); + // AuthenticatorRequestSheetModel: bool IsBackButtonVisible() const override; bool IsCancelButtonVisible() const override; @@ -52,6 +56,7 @@ private: // AuthenticatorSheetModelBase: + gfx::ImageSkia* GetStepIllustration() const override; base::string16 GetStepTitle() const override; base::string16 GetStepDescription() const override; bool IsAcceptButtonVisible() const override; @@ -73,6 +78,7 @@ private: // AuthenticatorSheetModelBase: + gfx::ImageSkia* GetStepIllustration() const override; base::string16 GetStepTitle() const override; base::string16 GetStepDescription() const override; }; @@ -84,6 +90,7 @@ private: // AuthenticatorSheetModelBase: + gfx::ImageSkia* GetStepIllustration() const override; base::string16 GetStepTitle() const override; base::string16 GetStepDescription() const override; }; @@ -95,6 +102,7 @@ private: // AuthenticatorSheetModelBase: + gfx::ImageSkia* GetStepIllustration() const override; base::string16 GetStepTitle() const override; base::string16 GetStepDescription() const override; }; @@ -105,6 +113,7 @@ private: // AuthenticatorSheetModelBase: + gfx::ImageSkia* GetStepIllustration() const override; base::string16 GetStepTitle() const override; base::string16 GetStepDescription() const override; }; @@ -116,6 +125,7 @@ private: // AuthenticatorSheetModelBase: + gfx::ImageSkia* GetStepIllustration() const override; base::string16 GetStepTitle() const override; base::string16 GetStepDescription() const override; bool IsAcceptButtonVisible() const override; @@ -130,6 +140,7 @@ private: // AuthenticatorSheetModelBase: + gfx::ImageSkia* GetStepIllustration() const override; base::string16 GetStepTitle() const override; base::string16 GetStepDescription() const override; bool IsAcceptButtonVisible() const override; @@ -144,6 +155,7 @@ private: // AuthenticatorSheetModelBase: + gfx::ImageSkia* GetStepIllustration() const override; base::string16 GetStepTitle() const override; base::string16 GetStepDescription() const override; }; @@ -155,6 +167,7 @@ private: // AuthenticatorSheetModelBase: + gfx::ImageSkia* GetStepIllustration() const override; base::string16 GetStepTitle() const override; base::string16 GetStepDescription() const override; }; @@ -165,6 +178,7 @@ private: // AuthenticatorSheetModelBase: + gfx::ImageSkia* GetStepIllustration() const override; base::string16 GetStepTitle() const override; base::string16 GetStepDescription() const override; bool IsAcceptButtonVisible() const override; @@ -178,6 +192,7 @@ private: // AuthenticatorSheetModelBase: + gfx::ImageSkia* GetStepIllustration() const override; base::string16 GetStepTitle() const override; base::string16 GetStepDescription() const override; }; @@ -188,6 +203,7 @@ private: // AuthenticatorSheetModelBase: + gfx::ImageSkia* GetStepIllustration() const override; base::string16 GetStepTitle() const override; base::string16 GetStepDescription() const override; };
diff --git a/chrome/browser/ui/webui/chromeos/first_run/first_run_handler.cc b/chrome/browser/ui/webui/chromeos/first_run/first_run_handler.cc index 5b5c071..97562f8 100644 --- a/chrome/browser/ui/webui/chromeos/first_run/first_run_handler.cc +++ b/chrome/browser/ui/webui/chromeos/first_run/first_run_handler.cc
@@ -4,6 +4,7 @@ #include "chrome/browser/ui/webui/chromeos/first_run/first_run_handler.h" +#include "ash/public/cpp/ash_features.h" #include "base/bind.h" #include "base/values.h" #include "chromeos/chromeos_switches.h" @@ -50,6 +51,8 @@ step_params.SetKey( "voiceInteractionEnabled", base::Value(chromeos::switches::IsVoiceInteractionEnabled())); + step_params.SetKey("unifiedSystemTrayEnabled", + base::Value(ash::features::IsSystemTrayUnifiedEnabled())); web_ui()->CallJavascriptFunctionUnsafe("cr.FirstRun.showStep", step_params); }
diff --git a/chrome/browser/ui/webui/chromeos/login/signin_userlist_unittest.cc b/chrome/browser/ui/webui/chromeos/login/signin_userlist_unittest.cc index 230adca..825a45b 100644 --- a/chrome/browser/ui/webui/chromeos/login/signin_userlist_unittest.cc +++ b/chrome/browser/ui/webui/chromeos/login/signin_userlist_unittest.cc
@@ -12,8 +12,7 @@ #include "chrome/browser/chromeos/login/users/fake_chrome_user_manager.h" #include "chrome/browser/chromeos/login/users/multi_profile_user_controller.h" #include "chrome/browser/chromeos/login/users/multi_profile_user_controller_delegate.h" -#include "chrome/browser/chromeos/settings/cros_settings.h" -#include "chrome/browser/chromeos/settings/device_settings_service.h" +#include "chrome/browser/chromeos/settings/scoped_cros_settings_test_helper.h" #include "chrome/test/base/testing_browser_process.h" #include "chrome/test/base/testing_profile_manager.h" #include "chromeos/components/proximity_auth/screenlock_bridge.h" @@ -64,9 +63,6 @@ fake_user_manager_->AddUser(AccountId::FromUserEmail(kUsers[i])); fake_user_manager_->set_owner_id(AccountId::FromUserEmail(kOwner)); - - chromeos::DeviceSettingsService::Initialize(); - chromeos::CrosSettings::Initialize(); } void TearDown() override { @@ -78,6 +74,7 @@ // MultiProfileUserControllerDelegate overrides: void OnUserNotAllowed(const std::string& user_email) override {} + ScopedCrosSettingsTestHelper cros_settings_test_helper_; FakeChromeUserManager* fake_user_manager_; user_manager::ScopedUserManager user_manager_enabler_; std::unique_ptr<TestingProfileManager> profile_manager_;
diff --git a/chrome/browser/ui/webui/conflicts/conflicts_handler.cc b/chrome/browser/ui/webui/conflicts/conflicts_handler.cc index fe468d3..f74894a 100644 --- a/chrome/browser/ui/webui/conflicts/conflicts_handler.cc +++ b/chrome/browser/ui/webui/conflicts/conflicts_handler.cc
@@ -11,6 +11,7 @@ #include "base/feature_list.h" #include "base/strings/string16.h" #include "base/strings/string_number_conversions.h" +#include "base/strings/string_piece.h" #include "base/values.h" #include "base/win/windows_version.h" #include "chrome/browser/conflicts/module_database_win.h" @@ -28,95 +29,156 @@ namespace { #if defined(GOOGLE_CHROME_BUILD) + +// Strings used twice. +constexpr char kNotLoaded[] = "Not loaded"; +constexpr char kAllowedInputMethodEditor[] = "Allowed - Input method editor"; +constexpr char kAllowedMatchingCertificate[] = "Allowed - Matching certificate"; +constexpr char kAllowedSameDirectory[] = + "Allowed - In executable directory (dev builds only)"; +constexpr char kAllowedMicrosoftModule[] = "Allowed - Microsoft module"; +constexpr char kAllowedWhitelisted[] = "Allowed - Whitelisted"; + +void AppendString(base::StringPiece input, std::string* output) { + if (!output->empty()) + *output += ", "; + input.AppendToString(output); +} + +// Returns a string describing the current module blocking status: loaded or +// not, blocked or not, was in blacklist cache or not, bypassed blocking or not. +std::string GetBlockingStatusString( + const ModuleBlacklistCacheUpdater::ModuleBlockingState& blocking_state) { + std::string status; + + // Output status regarding the blacklist cache, current blocking, and + // load status. + if (blocking_state.was_blocked) + status = "Blocked"; + if (!blocking_state.was_loaded) + AppendString(kNotLoaded, &status); + else if (blocking_state.was_in_blacklist_cache) + AppendString("Bypassed blocking", &status); + if (blocking_state.was_in_blacklist_cache) + AppendString("In blacklist cache", &status); + + return status; +} + +// Returns a string describing the blocking decision related to a module. This +// returns the empty string to indicate that the warning decision description +// should be used instead. +std::string GetBlockingDecisionString( + const ModuleBlacklistCacheUpdater::ModuleBlockingState& blocking_state, + IncompatibleApplicationsUpdater* incompatible_applications_updater) { + using BlockingDecision = ModuleBlacklistCacheUpdater::ModuleBlockingDecision; + + // Append status regarding the logic that will be applied during the next + // startup. + switch (blocking_state.blocking_decision) { + case BlockingDecision::kUnknown: + NOTREACHED(); + break; + case BlockingDecision::kAllowedIME: + return kAllowedInputMethodEditor; + case BlockingDecision::kAllowedSameCertificate: + return kAllowedMatchingCertificate; + case BlockingDecision::kAllowedSameDirectory: + return kAllowedSameDirectory; + case BlockingDecision::kAllowedMicrosoft: + return kAllowedMicrosoftModule; + case BlockingDecision::kAllowedWhitelisted: + return kAllowedWhitelisted; + case BlockingDecision::kTolerated: + // This is a module explicitly allowed to load by the Module List + // component. But it is still valid for a potential warning, and so the + // warning status is used instead. + if (incompatible_applications_updater) + break; + return "Tolerated - Will be blocked in the future"; + case BlockingDecision::kDisallowedExplicit: + return "Disallowed - Explicitly blacklisted"; + case BlockingDecision::kDisallowedImplicit: + return "Disallowed - Implicitly blacklisted"; + } + + // Returning an empty string indicates that the warning status should be used. + return std::string(); +} + +// Returns a string describing the warning decision that was made regarding a +// module. +std::string GetModuleWarningDecisionString( + const ModuleInfoKey& module_key, + IncompatibleApplicationsUpdater* incompatible_applications_updater) { + using WarningDecision = + IncompatibleApplicationsUpdater::ModuleWarningDecision; + + WarningDecision warning_decision = + incompatible_applications_updater->GetModuleWarningDecision(module_key); + + switch (warning_decision) { + case WarningDecision::kNotLoaded: + return kNotLoaded; + case WarningDecision::kAllowedIME: + return kAllowedInputMethodEditor; + case WarningDecision::kAllowedShellExtension: + return "Tolerated - Shell extension"; + case WarningDecision::kAllowedSameCertificate: + return kAllowedMatchingCertificate; + case WarningDecision::kAllowedSameDirectory: + return kAllowedSameDirectory; + case WarningDecision::kAllowedMicrosoft: + return kAllowedMicrosoftModule; + case WarningDecision::kAllowedWhitelisted: + return kAllowedWhitelisted; + case WarningDecision::kNoTiedApplication: + return "Tolerated - Could not tie to an installed application"; + case WarningDecision::kIncompatible: + return "Incompatible"; + case WarningDecision::kAddedToBlacklist: + case WarningDecision::kUnknown: + NOTREACHED(); + break; + } + + return std::string(); +} + std::string GetModuleStatusString( const ModuleInfoKey& module_key, IncompatibleApplicationsUpdater* incompatible_applications_updater, ModuleBlacklistCacheUpdater* module_blacklist_cache_updater) { - DCHECK(incompatible_applications_updater || module_blacklist_cache_updater); + if (!incompatible_applications_updater && !module_blacklist_cache_updater) + return std::string(); - // Strings used twice. - constexpr char kNotLoaded[] = "Not loaded"; - constexpr char kAllowedInputMethodEditor[] = "Allowed - Input method editor"; - constexpr char kAllowedMatchingCertificate[] = - "Allowed - Matching certificate"; - constexpr char kAllowedSameDirectory[] = "Allowed - In executable directory"; - constexpr char kAllowedMicrosoftModule[] = "Allowed - Microsoft module"; - constexpr char kAllowedWhitelisted[] = "Allowed - Whitelisted"; + std::string status; // The blocking status is shown over the warning status. if (module_blacklist_cache_updater) { - using BlockingDecision = - ModuleBlacklistCacheUpdater::ModuleBlockingDecision; + const ModuleBlacklistCacheUpdater::ModuleBlockingState& blocking_state = + module_blacklist_cache_updater->GetModuleBlockingState(module_key); - BlockingDecision blocking_decision = - module_blacklist_cache_updater->GetModuleBlockingDecision(module_key); + status = GetBlockingStatusString(blocking_state); - switch (blocking_decision) { - case BlockingDecision::kNotLoaded: - return kNotLoaded; - case BlockingDecision::kAllowedIME: - return kAllowedInputMethodEditor; - case BlockingDecision::kAllowedSameCertificate: - return kAllowedMatchingCertificate; - case BlockingDecision::kAllowedSameDirectory: - return kAllowedSameDirectory; - case BlockingDecision::kAllowedMicrosoft: - return kAllowedMicrosoftModule; - case BlockingDecision::kAllowedWhitelisted: - return kAllowedWhitelisted; - case BlockingDecision::kTolerated: - // This is a module explicitely allowed to load by the Module List - // component. But it is still valid for a potential warning, and so the - // warning status is used instead. - if (incompatible_applications_updater) - break; - return "Tolerated - Will be blocked in the future"; - case BlockingDecision::kBlacklisted: - return "Disallowed - Added to the blacklist"; - case BlockingDecision::kBlocked: - return "Disallowed - Blocked"; - case BlockingDecision::kBypassedBlocking: - return "Disallowed - Bypassed blocking"; - case BlockingDecision::kUnknown: - NOTREACHED(); - break; + std::string blocking_string = GetBlockingDecisionString( + blocking_state, incompatible_applications_updater); + if (!blocking_string.empty()) { + AppendString(blocking_string, &status); + return status; } + + // An empty |blocking_string| indicates that a warning decision string + // should be used instead. } if (incompatible_applications_updater) { - using WarningDecision = - IncompatibleApplicationsUpdater::ModuleWarningDecision; - - WarningDecision warning_decision = - incompatible_applications_updater->GetModuleWarningDecision(module_key); - - switch (warning_decision) { - case WarningDecision::kNotLoaded: - return kNotLoaded; - case WarningDecision::kAllowedIME: - return kAllowedInputMethodEditor; - case WarningDecision::kAllowedShellExtension: - return "Tolerated - Shell extension"; - case WarningDecision::kAllowedSameCertificate: - return kAllowedMatchingCertificate; - case WarningDecision::kAllowedSameDirectory: - return kAllowedSameDirectory; - case WarningDecision::kAllowedMicrosoft: - return kAllowedMicrosoftModule; - case WarningDecision::kAllowedWhitelisted: - return kAllowedWhitelisted; - case WarningDecision::kNoTiedApplication: - return "Tolerated - Could not tie to an installed application"; - case WarningDecision::kIncompatible: - return "Incompatible"; - case WarningDecision::kAddedToBlacklist: - case WarningDecision::kUnknown: - NOTREACHED(); - break; - } + AppendString(GetModuleWarningDecisionString( + module_key, incompatible_applications_updater), + &status); } - return std::string(); + return status; } #endif // defined(GOOGLE_CHROME_BUILD) @@ -164,11 +226,6 @@ std::string type_string; if (module_data.module_properties & ModuleInfoData::kPropertyShellExtension) type_string = "Shell extension"; - if (module_data.module_properties & ModuleInfoData::kPropertyBlocked) { - if (!type_string.empty()) - type_string += ", "; - type_string += "blocked"; - } data->SetString("type_description", type_string); const auto& inspection_result = *module_data.inspection_result;
diff --git a/chrome/browser/ui/webui/help/version_updater_chromeos_unittest.cc b/chrome/browser/ui/webui/help/version_updater_chromeos_unittest.cc index 587ec32..4127290 100644 --- a/chrome/browser/ui/webui/help/version_updater_chromeos_unittest.cc +++ b/chrome/browser/ui/webui/help/version_updater_chromeos_unittest.cc
@@ -12,8 +12,7 @@ #include "base/memory/ptr_util.h" #include "base/run_loop.h" #include "chrome/browser/chromeos/login/users/mock_user_manager.h" -#include "chrome/browser/chromeos/settings/cros_settings.h" -#include "chrome/browser/chromeos/settings/device_settings_service.h" +#include "chrome/browser/chromeos/settings/scoped_cros_settings_test_helper.h" #include "chromeos/dbus/dbus_thread_manager.h" #include "chromeos/dbus/fake_update_engine_client.h" #include "chromeos/dbus/shill_service_client.h" @@ -61,9 +60,6 @@ .WillRepeatedly(Return(false)); EXPECT_CALL(*mock_user_manager_, Shutdown()).Times(AtLeast(0)); - DeviceSettingsService::Initialize(); - CrosSettings::Initialize(); - NetworkHandler::Initialize(); base::RunLoop().RunUntilIdle(); } @@ -92,9 +88,6 @@ void TearDown() override { NetworkHandler::Shutdown(); - - CrosSettings::Shutdown(); - DeviceSettingsService::Shutdown(); } content::TestBrowserThreadBundle thread_bundle_; @@ -103,6 +96,7 @@ MockUserManager* mock_user_manager_; // Not owned. user_manager::ScopedUserManager user_manager_enabler_; + ScopedCrosSettingsTestHelper cros_settings_test_helper_; DISALLOW_COPY_AND_ASSIGN(VersionUpdaterCrosTest); };
diff --git a/chrome/browser/ui/webui/print_preview/print_preview_handler.cc b/chrome/browser/ui/webui/print_preview/print_preview_handler.cc index c576997..c3e8138 100644 --- a/chrome/browser/ui/webui/print_preview/print_preview_handler.cc +++ b/chrome/browser/ui/webui/print_preview/print_preview_handler.cc
@@ -608,6 +608,7 @@ // this is necessary for refresh or navigation from the chrome://print page. weak_factory_.InvalidateWeakPtrs(); preview_callbacks_.clear(); + preview_failures_.clear(); UnregisterForGaiaCookieChanges(); } @@ -1192,6 +1193,10 @@ reported_failed_preview_ = true; ReportUserActionHistogram(PREVIEW_FAILED); } + + // Keep track of failures. + bool inserted = preview_failures_.insert(request_id).second; + DCHECK(inserted); RejectJavascriptCallback(base::Value(callback_id), base::Value("PREVIEW_FAILED")); } @@ -1239,12 +1244,19 @@ void PrintPreviewHandler::SendPagePreviewReady(int page_index, int preview_uid, - int preview_response_id) { - if (!ShouldReceiveRendererMessage(preview_response_id)) + int preview_request_id) { + // With print compositing, by the time compositing finishes and this method + // gets called, the print preview may have failed. Since the failure message + // may have arrived first, check for this case and bail out instead of + // thinking this may be a bad IPC message. + if (base::ContainsKey(preview_failures_, preview_request_id)) + return; + + if (!ShouldReceiveRendererMessage(preview_request_id)) return; FireWebUIListener("page-preview-ready", base::Value(page_index), - base::Value(preview_uid), base::Value(preview_response_id)); + base::Value(preview_uid), base::Value(preview_request_id)); } void PrintPreviewHandler::OnPrintPreviewCancelled(int request_id) {
diff --git a/chrome/browser/ui/webui/print_preview/print_preview_handler.h b/chrome/browser/ui/webui/print_preview/print_preview_handler.h index aed9afb3..dbca9ab 100644 --- a/chrome/browser/ui/webui/print_preview/print_preview_handler.h +++ b/chrome/browser/ui/webui/print_preview/print_preview_handler.h
@@ -7,6 +7,7 @@ #include <map> #include <memory> +#include <set> #include <string> #include "base/files/file_path.h" @@ -103,7 +104,7 @@ // Notify the WebUI that the page preview is ready. void SendPagePreviewReady(int page_index, int preview_uid, - int preview_response_id); + int preview_request_id); int regenerate_preview_request_count() const { return regenerate_preview_request_count_; @@ -355,6 +356,9 @@ // Maps preview request ids to callbacks. std::map<int, std::string> preview_callbacks_; + // Set of preview request ids for failed previews. + std::set<int> preview_failures_; + base::WeakPtrFactory<PrintPreviewHandler> weak_factory_; DISALLOW_COPY_AND_ASSIGN(PrintPreviewHandler);
diff --git a/chrome/browser/ui/webui/settings/md_settings_localized_strings_provider.cc b/chrome/browser/ui/webui/settings/md_settings_localized_strings_provider.cc index 44870c148..b73feef8b 100644 --- a/chrome/browser/ui/webui/settings/md_settings_localized_strings_provider.cc +++ b/chrome/browser/ui/webui/settings/md_settings_localized_strings_provider.cc
@@ -1384,11 +1384,9 @@ {"googlePayments", IDS_SETTINGS_GOOGLE_PAYMENTS}, {"googlePaymentsCached", IDS_SETTINGS_GOOGLE_PAYMENTS_CACHED}, {"autofillFormsLabel", IDS_SETTINGS_AUTOFILL_TOGGLE_LABEL}, - {"enableProfilesLabel", - IDS_SETTINGS_AUTOFILL_ENABLE_PROFILES_TOGGLE_LABEL}, - {"enableCreditCardsLabel", - IDS_SETTINGS_AUTOFILL_ENABLE_CREDIT_CARDS_TOGGLE_LABEL}, - {"addresses", IDS_SETTINGS_AUTOFILL_ADDRESSES_HEADING}, + {"enableProfilesLabel", IDS_AUTOFILL_ENABLE_PROFILES_TOGGLE_LABEL}, + {"enableCreditCardsLabel", IDS_AUTOFILL_ENABLE_CREDIT_CARDS_TOGGLE_LABEL}, + {"addresses", IDS_AUTOFILL_ADDRESSES}, {"addAddressTitle", IDS_SETTINGS_AUTOFILL_ADDRESSES_ADD_TITLE}, {"editAddressTitle", IDS_SETTINGS_AUTOFILL_ADDRESSES_EDIT_TITLE}, {"addressCountry", IDS_SETTINGS_AUTOFILL_ADDRESSES_COUNTRY}, @@ -1460,7 +1458,7 @@ html_source->AddLocalizedString("passwords", IDS_SETTINGS_PASSWORDS_AUTOFILL_HOME); html_source->AddLocalizedString("creditCards", - IDS_SETTINGS_AUTOFILL_PAYMENT_METHODS); + IDS_AUTOFILL_PAYMENT_METHODS); html_source->AddLocalizedString("noCreditCardsFound", IDS_SETTINGS_PAYMENT_METHODS_NONE); } else {
diff --git a/chrome/browser/ui/webui/settings/settings_manage_profile_handler.cc b/chrome/browser/ui/webui/settings/settings_manage_profile_handler.cc index 721518a..1ea3791 100644 --- a/chrome/browser/ui/webui/settings/settings_manage_profile_handler.cc +++ b/chrome/browser/ui/webui/settings/settings_manage_profile_handler.cc
@@ -192,6 +192,7 @@ PrefService* pref_service = profile_->GetPrefs(); pref_service->SetInteger(prefs::kProfileAvatarIndex, new_icon_index); + pref_service->SetInteger(prefs::kProfileLocalAvatarIndex, new_icon_index); pref_service->SetBoolean(prefs::kProfileUsingDefaultAvatar, false); pref_service->SetBoolean(prefs::kProfileUsingGAIAAvatar, false);
diff --git a/chrome/browser/ui/webui/sync_internals_message_handler.cc b/chrome/browser/ui/webui/sync_internals_message_handler.cc index 814a413..60a61e11 100644 --- a/chrome/browser/ui/webui/sync_internals_message_handler.cc +++ b/chrome/browser/ui/webui/sync_internals_message_handler.cc
@@ -64,6 +64,13 @@ return false; } +// Returns the initial state of the "include specifics" flag, based on whether +// or not the corresponding command-line switch is set. +bool GetIncludeSpecificsInitialState() { + return base::CommandLine::ForCurrentProcess()->HasSwitch( + switches::kSyncIncludeSpecificsInProtocolLog); +} + } // namespace SyncInternalsMessageHandler::SyncInternalsMessageHandler() @@ -72,7 +79,8 @@ SyncInternalsMessageHandler::SyncInternalsMessageHandler( AboutSyncDataDelegate about_sync_data_delegate) - : about_sync_data_delegate_(std::move(about_sync_data_delegate)), + : include_specifics_(GetIncludeSpecificsInitialState()), + about_sync_data_delegate_(std::move(about_sync_data_delegate)), weak_ptr_factory_(this) {} SyncInternalsMessageHandler::~SyncInternalsMessageHandler() { @@ -115,6 +123,12 @@ base::Unretained(this))); web_ui()->RegisterMessageCallback( + syncer::sync_ui_util::kRequestIncludeSpecificsInitialState, + base::BindRepeating(&SyncInternalsMessageHandler:: + HandleRequestIncludeSpecificsInitialState, + base::Unretained(this))); + + web_ui()->RegisterMessageCallback( syncer::sync_ui_util::kRequestUserEventsVisibility, base::BindRepeating( &SyncInternalsMessageHandler::HandleRequestUserEventsVisibility, @@ -212,6 +226,19 @@ DispatchEvent(syncer::sync_ui_util::kOnReceivedListOfTypes, event_details); } +void SyncInternalsMessageHandler::HandleRequestIncludeSpecificsInitialState( + const ListValue* args) { + DCHECK(args->empty()); + AllowJavascript(); + + DictionaryValue value; + value.SetBoolean(syncer::sync_ui_util::kIncludeSpecifics, + GetIncludeSpecificsInitialState()); + + DispatchEvent(syncer::sync_ui_util::kOnReceivedIncludeSpecificsInitialState, + value); +} + void SyncInternalsMessageHandler::HandleGetAllNodes(const ListValue* args) { DCHECK_EQ(1U, args->GetSize()); AllowJavascript();
diff --git a/chrome/browser/ui/webui/sync_internals_message_handler.h b/chrome/browser/ui/webui/sync_internals_message_handler.h index 6d721993..1ba4fc3 100644 --- a/chrome/browser/ui/webui/sync_internals_message_handler.h +++ b/chrome/browser/ui/webui/sync_internals_message_handler.h
@@ -52,9 +52,12 @@ // Fires an event to send updated info back to the page. void HandleRequestUpdatedAboutInfo(const base::ListValue* args); - // Fires and event to send the list of types back to the page. + // Fires an event to send the list of types back to the page. void HandleRequestListOfTypes(const base::ListValue* args); + // Fires an event to send the initial state of the "include specifics" flag. + void HandleRequestIncludeSpecificsInitialState(const base::ListValue* args); + // Handler for getAllNodes message. Needs a |request_id| argument. void HandleGetAllNodes(const base::ListValue* args);
diff --git a/chrome/browser/unified_consent/unified_consent_service_factory.cc b/chrome/browser/unified_consent/unified_consent_service_factory.cc index c4c50fc..2ceada45 100644 --- a/chrome/browser/unified_consent/unified_consent_service_factory.cc +++ b/chrome/browser/unified_consent/unified_consent_service_factory.cc
@@ -48,6 +48,8 @@ Profile* profile = Profile::FromBrowserContext(context); syncer::SyncService* sync_service = ProfileSyncServiceFactory::GetSyncServiceForBrowserContext(profile); + if (!sync_service) + return nullptr; if (!IsUnifiedConsentEnabled(profile)) { unified_consent::UnifiedConsentService::RollbackIfNeeded(
diff --git a/chrome/browser/usb/web_usb_service_impl.cc b/chrome/browser/usb/web_usb_service_impl.cc index ba3756d..84e08f7 100644 --- a/chrome/browser/usb/web_usb_service_impl.cc +++ b/chrome/browser/usb/web_usb_service_impl.cc
@@ -54,7 +54,12 @@ void WebUsbServiceImpl::GetDevice( const std::string& guid, device::mojom::UsbDeviceRequest device_request) { - device_manager_->GetDevice(guid, std::move(device_request)); + // Try to bind with the new device to be created for DeviceOpened/Closed + // events. + device::mojom::UsbDeviceClientPtr device_client; + device_client_bindings_.AddBinding(this, mojo::MakeRequest(&device_client)); + device_manager_->GetDevice(guid, std::move(device_request), + std::move(device_client)); } void WebUsbServiceImpl::SetClient( @@ -77,6 +82,17 @@ } } +// device::mojom::UsbDeviceClient implementation: +void WebUsbServiceImpl::OnDeviceOpened() { + if (permission_provider_) + permission_provider_->IncrementConnectionCount(); +} + +void WebUsbServiceImpl::OnDeviceClosed() { + if (permission_provider_) + permission_provider_->DecrementConnectionCount(); +} + void WebUsbServiceImpl::OnConnectionError() { device_manager_.reset();
diff --git a/chrome/browser/usb/web_usb_service_impl.h b/chrome/browser/usb/web_usb_service_impl.h index 85fa74d..5bff68a 100644 --- a/chrome/browser/usb/web_usb_service_impl.h +++ b/chrome/browser/usb/web_usb_service_impl.h
@@ -14,6 +14,7 @@ #include "device/usb/public/mojom/device.mojom.h" #include "device/usb/public/mojom/device_manager.mojom.h" #include "device/usb/usb_service.h" +#include "mojo/public/cpp/bindings/binding_set.h" #include "mojo/public/cpp/bindings/strong_binding.h" #include "third_party/blink/public/mojom/usb/web_usb_service.mojom.h" @@ -25,7 +26,8 @@ // another UsbDeviceManager instance and checking requests with the provided // device::usb::PermissionProvider. class WebUsbServiceImpl : public blink::mojom::WebUsbService, - public device::UsbService::Observer { + public device::UsbService::Observer, + public device::mojom::UsbDeviceClient { public: static void Create( base::WeakPtr<device::usb::PermissionProvider> permission_provider, @@ -46,6 +48,11 @@ // device::UsbService::Observer implementation: void OnDeviceAdded(scoped_refptr<device::UsbDevice> device) override; void OnDeviceRemoved(scoped_refptr<device::UsbDevice> device) override; + + // device::mojom::UsbDeviceClient implementation: + void OnDeviceOpened() override; + void OnDeviceClosed() override; + void WillDestroyUsbService() override; void OnConnectionError(); @@ -56,6 +63,9 @@ mojo::StrongBindingPtr<blink::mojom::WebUsbService> binding_; device::mojom::UsbDeviceManagerClientPtr client_; + // Binding used to connect with USB devices for opened/closed events. + mojo::BindingSet<device::mojom::UsbDeviceClient> device_client_bindings_; + device::mojom::UsbDeviceManagerPtr device_manager_; ScopedObserver<device::UsbService, device::UsbService::Observer> observer_;
diff --git a/chrome/browser/vr/BUILD.gn b/chrome/browser/vr/BUILD.gn index 40c22874..1f84e5c 100644 --- a/chrome/browser/vr/BUILD.gn +++ b/chrome/browser/vr/BUILD.gn
@@ -130,15 +130,12 @@ "elements/vector_icon_button.h", "elements/viewport_aware_root.cc", "elements/viewport_aware_root.h", - "exit_vr_prompt_choice.h", "font_fallback.cc", "font_fallback.h", "frame_lifecycle.cc", "frame_lifecycle.h", "ganesh_surface_provider.cc", "ganesh_surface_provider.h", - "keyboard_delegate.h", - "keyboard_ui_interface.h", "macros.h", "mode.h", "model/color_scheme.cc", @@ -159,12 +156,12 @@ "renderers/external_textured_quad_renderer.h", "renderers/radial_gradient_quad_renderer.cc", "renderers/radial_gradient_quad_renderer.h", + "renderers/texture_copy_renderer.cc", + "renderers/texture_copy_renderer.h", "renderers/textured_quad_renderer.cc", "renderers/textured_quad_renderer.h", "renderers/transparent_quad_renderer.cc", "renderers/transparent_quad_renderer.h", - "renderers/web_vr_renderer.cc", - "renderers/web_vr_renderer.h", "sequence.cc", "sequence.h", "target_property.cc", @@ -173,12 +170,10 @@ "transition.h", "ui.cc", "ui.h", - "ui_browser_interface.h", "ui_element_renderer.cc", "ui_element_renderer.h", "ui_input_manager.cc", "ui_input_manager.h", - "ui_interface.h", "ui_renderer.cc", "ui_renderer.h", "ui_scene.cc", @@ -187,9 +182,6 @@ "ui_scene_creator.h", "ui_support.cc", "ui_support.h", - "ui_test_input.cc", - "ui_test_input.h", - "ui_unsupported_mode.h", "vr_ui_export.h", ] @@ -267,7 +259,6 @@ "toolbar_helper.h", "ui_factory.cc", "ui_factory.h", - "ui_interface.h", "vr_export.h", ] @@ -323,8 +314,12 @@ "assets_load_status.h", "assets_loader.cc", "assets_loader.h", + "exit_vr_prompt_choice.h", + "gl_texture_location.h", "input_event.cc", "input_event.h", + "keyboard_delegate.h", + "keyboard_ui_interface.h", "metrics/metrics_helper.cc", "metrics/metrics_helper.h", "metrics/session_metrics_helper.cc", @@ -344,10 +339,15 @@ "platform_ui_input_delegate.h", "pose_util.cc", "pose_util.h", + "render_info.h", "text_edit_action.cc", "text_edit_action.h", + "ui_browser_interface.h", "ui_initial_state.cc", "ui_initial_state.h", + "ui_interface.h", + "ui_test_input.h", + "ui_unsupported_mode.h", "vr_base_export.h", "vr_geometry_util.cc", "vr_geometry_util.h",
diff --git a/chrome/browser/vr/controller_delegate_for_testing.cc b/chrome/browser/vr/controller_delegate_for_testing.cc index 6a25e30..0a74fd6c 100644 --- a/chrome/browser/vr/controller_delegate_for_testing.cc +++ b/chrome/browser/vr/controller_delegate_for_testing.cc
@@ -5,24 +5,26 @@ #include "chrome/browser/vr/controller_delegate_for_testing.h" #include "chrome/browser/vr/input_event.h" -#include "chrome/browser/vr/test/constants.h" #include "chrome/browser/vr/ui_interface.h" #include "chrome/browser/vr/ui_scene_constants.h" #include "chrome/browser/vr/ui_test_input.h" +#include "ui/gfx/geometry/quaternion.h" namespace { // Laser origin relative to the center of the controller. constexpr gfx::Point3F kLaserOriginOffset = {0.0f, 0.0f, -0.05f}; +constexpr gfx::Vector3dF kForwardVector(0.0f, 0.0f, -1.0f); +constexpr gfx::Vector3dF kStartControllerPosition(0.3, -0.3, -0.3); // We position the controller in a fixed position (no arm model). // The location constants are approximations that allow us to have the // controller and the laser visible on the screenshots. void SetOriginAndTransform(vr::ControllerModel* model) { gfx::Transform mat; - mat.Translate3d(vr::kStartControllerPosition); - mat.PreconcatTransform(gfx::Transform( - gfx::Quaternion(vr::kForwardVector, model->laser_direction))); + mat.Translate3d(kStartControllerPosition); + mat.PreconcatTransform( + gfx::Transform(gfx::Quaternion(kForwardVector, model->laser_direction))); model->transform = mat; model->laser_origin = kLaserOriginOffset; mat.TransformPoint(&model->laser_origin);
diff --git a/chrome/browser/vr/elements/content_element.cc b/chrome/browser/vr/elements/content_element.cc index bcb9f130..1ea50fa 100644 --- a/chrome/browser/vr/elements/content_element.cc +++ b/chrome/browser/vr/elements/content_element.cc
@@ -7,6 +7,7 @@ #include "chrome/browser/vr/content_input_delegate.h" #include "chrome/browser/vr/model/text_input_info.h" #include "chrome/browser/vr/text_input_delegate.h" +#include "chrome/browser/vr/ui_element_renderer.h" #include "chrome/browser/vr/ui_scene_constants.h" #include "chrome/browser/vr/vr_geometry_util.h" #include "ui/gfx/geometry/rect_f.h" @@ -90,8 +91,7 @@ overlay_texture_id_ = texture_id; } -void ContentElement::SetOverlayTextureLocation( - UiElementRenderer::TextureLocation location) { +void ContentElement::SetOverlayTextureLocation(GlTextureLocation location) { overlay_texture_location_ = location; }
diff --git a/chrome/browser/vr/elements/content_element.h b/chrome/browser/vr/elements/content_element.h index 6a0874c..39d175f 100644 --- a/chrome/browser/vr/elements/content_element.h +++ b/chrome/browser/vr/elements/content_element.h
@@ -7,7 +7,6 @@ #include "base/macros.h" #include "chrome/browser/vr/elements/platform_ui_element.h" -#include "chrome/browser/vr/ui_element_renderer.h" #include "chrome/browser/vr/vr_ui_export.h" namespace vr { @@ -45,7 +44,7 @@ cc::KeyframeModel* animation) override; void SetOverlayTextureId(unsigned int texture_id); - void SetOverlayTextureLocation(UiElementRenderer::TextureLocation location); + void SetOverlayTextureLocation(GlTextureLocation location); void SetOverlayTextureEmpty(bool empty); bool GetOverlayTextureEmpty(); void SetProjectionMatrix(const gfx::Transform& matrix); @@ -62,8 +61,7 @@ ScreenBoundsChangedCallback bounds_changed_callback_; unsigned int overlay_texture_id_ = 0; bool overlay_texture_non_empty_ = false; - UiElementRenderer::TextureLocation overlay_texture_location_ = - UiElementRenderer::kTextureLocationExternal; + GlTextureLocation overlay_texture_location_ = kGlTextureLocationExternal; gfx::SizeF last_content_screen_bounds_; float last_content_aspect_ratio_ = 0.0f; gfx::Transform projection_matrix_;
diff --git a/chrome/browser/vr/elements/platform_ui_element.cc b/chrome/browser/vr/elements/platform_ui_element.cc index 19dd704b..5b548289 100644 --- a/chrome/browser/vr/elements/platform_ui_element.cc +++ b/chrome/browser/vr/elements/platform_ui_element.cc
@@ -5,6 +5,7 @@ #include "chrome/browser/vr/elements/content_element.h" #include "chrome/browser/vr/platform_ui_input_delegate.h" +#include "chrome/browser/vr/ui_element_renderer.h" #include "ui/gfx/geometry/rect_f.h" namespace vr { @@ -88,8 +89,7 @@ texture_id_ = texture_id; } -void PlatformUiElement::SetTextureLocation( - UiElementRenderer::TextureLocation location) { +void PlatformUiElement::SetTextureLocation(GlTextureLocation location) { texture_location_ = location; }
diff --git a/chrome/browser/vr/elements/platform_ui_element.h b/chrome/browser/vr/elements/platform_ui_element.h index 62d24140..16161a5 100644 --- a/chrome/browser/vr/elements/platform_ui_element.h +++ b/chrome/browser/vr/elements/platform_ui_element.h
@@ -7,7 +7,7 @@ #include "base/macros.h" #include "chrome/browser/vr/elements/ui_element.h" -#include "chrome/browser/vr/ui_element_renderer.h" +#include "chrome/browser/vr/gl_texture_location.h" namespace vr { @@ -46,22 +46,19 @@ const CameraModel& model) const override; void SetTextureId(unsigned int texture_id); - void SetTextureLocation(UiElementRenderer::TextureLocation location); + void SetTextureLocation(GlTextureLocation location); void SetDelegate(PlatformUiInputDelegate* delegate); protected: PlatformUiInputDelegate* delegate() const { return delegate_; } unsigned int texture_id() const { return texture_id_; } - UiElementRenderer::TextureLocation texture_location() const { - return texture_location_; - } + GlTextureLocation texture_location() const { return texture_location_; } private: PlatformUiInputDelegate* delegate_ = nullptr; unsigned int texture_id_ = 0; - UiElementRenderer::TextureLocation texture_location_ = - UiElementRenderer::kTextureLocationExternal; + GlTextureLocation texture_location_ = kGlTextureLocationExternal; DISALLOW_COPY_AND_ASSIGN(PlatformUiElement); };
diff --git a/chrome/browser/vr/elements/textured_element.cc b/chrome/browser/vr/elements/textured_element.cc index 989636b..b7cd8c0 100644 --- a/chrome/browser/vr/elements/textured_element.cc +++ b/chrome/browser/vr/elements/textured_element.cc
@@ -86,10 +86,10 @@ if (texture_handle_ <= 0) return; - renderer->DrawTexturedQuad( - texture_handle_, 0, UiElementRenderer::kTextureLocationLocal, - model.view_proj_matrix * world_space_transform(), GetClipRect(), - computed_opacity(), size(), corner_radius(), true /* blend */); + renderer->DrawTexturedQuad(texture_handle_, 0, kGlTextureLocationLocal, + model.view_proj_matrix * world_space_transform(), + GetClipRect(), computed_opacity(), size(), + corner_radius(), true /* blend */); } } // namespace vr
diff --git a/chrome/browser/vr/gl_texture_location.h b/chrome/browser/vr/gl_texture_location.h new file mode 100644 index 0000000..e468003 --- /dev/null +++ b/chrome/browser/vr/gl_texture_location.h
@@ -0,0 +1,17 @@ +// 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_VR_GL_TEXTURE_LOCATION_H_ +#define CHROME_BROWSER_VR_GL_TEXTURE_LOCATION_H_ + +namespace vr { + +enum GlTextureLocation { + kGlTextureLocationLocal, + kGlTextureLocationExternal, +}; + +} // namespace vr + +#endif // CHROME_BROWSER_VR_GL_TEXTURE_LOCATION_H_
diff --git a/chrome/browser/vr/keyboard_delegate.h b/chrome/browser/vr/keyboard_delegate.h index ba8ccb4..c0ed40a0 100644 --- a/chrome/browser/vr/keyboard_delegate.h +++ b/chrome/browser/vr/keyboard_delegate.h
@@ -6,6 +6,7 @@ #define CHROME_BROWSER_VR_KEYBOARD_DELEGATE_H_ #include "base/memory/weak_ptr.h" +#include "chrome/browser/vr/vr_base_export.h" namespace gfx { class Point3F; @@ -17,7 +18,7 @@ struct CameraModel; -class KeyboardDelegate { +class VR_BASE_EXPORT KeyboardDelegate { public: virtual ~KeyboardDelegate() {}
diff --git a/chrome/browser/vr/keyboard_ui_interface.h b/chrome/browser/vr/keyboard_ui_interface.h index 76fa5c4..2837f4d 100644 --- a/chrome/browser/vr/keyboard_ui_interface.h +++ b/chrome/browser/vr/keyboard_ui_interface.h
@@ -6,6 +6,7 @@ #define CHROME_BROWSER_VR_KEYBOARD_UI_INTERFACE_H_ #include "chrome/browser/vr/model/text_input_info.h" +#include "chrome/browser/vr/vr_base_export.h" namespace vr { @@ -13,7 +14,7 @@ // that we have this interface to restrict the UI API to keyboard-specific // callback functions because the keyboard delegate doesn't need access to all // of the UI. -class KeyboardUiInterface { +class VR_BASE_EXPORT KeyboardUiInterface { public: virtual ~KeyboardUiInterface() {} virtual void OnInputEdited(const EditedText& info) = 0;
diff --git a/chrome/browser/vr/model/model.h b/chrome/browser/vr/model/model.h index ff89833..9b59dca 100644 --- a/chrome/browser/vr/model/model.h +++ b/chrome/browser/vr/model/model.h
@@ -7,6 +7,7 @@ #include <memory> +#include "chrome/browser/vr/gl_texture_location.h" #include "chrome/browser/vr/model/capturing_state_model.h" #include "chrome/browser/vr/model/color_scheme.h" #include "chrome/browser/vr/model/controller_model.h" @@ -21,7 +22,6 @@ #include "chrome/browser/vr/model/toolbar_state.h" #include "chrome/browser/vr/model/ui_mode.h" #include "chrome/browser/vr/model/web_vr_model.h" -#include "chrome/browser/vr/ui_element_renderer.h" #include "chrome/browser/vr/vr_ui_export.h" #include "ui/gfx/transform.h" @@ -46,10 +46,8 @@ unsigned int content_texture_id = 0; unsigned int content_overlay_texture_id = 0; bool content_overlay_texture_non_empty = false; - UiElementRenderer::TextureLocation content_location = - UiElementRenderer::kTextureLocationLocal; - UiElementRenderer::TextureLocation content_overlay_location = - UiElementRenderer::kTextureLocationLocal; + GlTextureLocation content_location = kGlTextureLocationLocal; + GlTextureLocation content_overlay_location = kGlTextureLocationLocal; bool waiting_for_background = false; bool background_loaded = false; bool supports_selection = true;
diff --git a/chrome/browser/vr/render_info.h b/chrome/browser/vr/render_info.h new file mode 100644 index 0000000..6dac178 --- /dev/null +++ b/chrome/browser/vr/render_info.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 CHROME_BROWSER_VR_RENDER_INFO_H_ +#define CHROME_BROWSER_VR_RENDER_INFO_H_ + +#include "chrome/browser/vr/model/camera_model.h" +#include "chrome/browser/vr/vr_base_export.h" +#include "ui/gfx/transform.h" + +namespace vr { + +// Provides information for rendering such as the viewport and view/projection +// matrix. +struct VR_BASE_EXPORT RenderInfo { + gfx::Transform head_pose; + CameraModel left_eye_model; + CameraModel right_eye_model; +}; + +} // namespace vr + +#endif // CHROME_BROWSER_VR_RENDER_INFO_H_
diff --git a/chrome/browser/vr/render_loop.cc b/chrome/browser/vr/render_loop.cc index 7b92b58..f748f20 100644 --- a/chrome/browser/vr/render_loop.cc +++ b/chrome/browser/vr/render_loop.cc
@@ -12,9 +12,10 @@ #include "chrome/browser/vr/graphics_delegate.h" #include "chrome/browser/vr/input_event.h" #include "chrome/browser/vr/model/controller_model.h" +#include "chrome/browser/vr/model/reticle_model.h" +#include "chrome/browser/vr/render_info.h" #include "chrome/browser/vr/render_loop_browser_interface.h" #include "chrome/browser/vr/ui_interface.h" -#include "chrome/browser/vr/ui_renderer.h" #include "chrome/browser/vr/ui_test_input.h" namespace vr {
diff --git a/chrome/browser/vr/renderers/web_vr_renderer.cc b/chrome/browser/vr/renderers/texture_copy_renderer.cc similarity index 88% rename from chrome/browser/vr/renderers/web_vr_renderer.cc rename to chrome/browser/vr/renderers/texture_copy_renderer.cc index 4b5c1fd6..8e01a174 100644 --- a/chrome/browser/vr/renderers/web_vr_renderer.cc +++ b/chrome/browser/vr/renderers/texture_copy_renderer.cc
@@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "chrome/browser/vr/renderers/web_vr_renderer.h" +#include "chrome/browser/vr/renderers/texture_copy_renderer.h" #include "chrome/browser/vr/vr_gl_util.h" @@ -47,7 +47,7 @@ } // namespace -WebVrRenderer::WebVrRenderer() +TextureCopyRenderer::TextureCopyRenderer() : BaseQuadRenderer(kWebVrVertexShader, kWebVrFragmentShader) { texture_handle_ = glGetUniformLocation(program_handle_, "u_Texture"); uv_transform_ = glGetUniformLocation(program_handle_, "u_UvTransform"); @@ -56,10 +56,10 @@ } // Draw the stereo WebVR frame -void WebVrRenderer::Draw(int texture_handle, - const float (&uv_transform)[16], - float xborder, - float yborder) { +void TextureCopyRenderer::Draw(int texture_handle, + const float (&uv_transform)[16], + float xborder, + float yborder) { glUseProgram(program_handle_); // Bind vertex attributes @@ -93,6 +93,6 @@ // Note that we don't explicitly delete gl objects here, they're deleted // automatically when we call ShutdownGL, and deleting them here leads to // segfaults. -WebVrRenderer::~WebVrRenderer() = default; +TextureCopyRenderer::~TextureCopyRenderer() = default; } // namespace vr
diff --git a/chrome/browser/vr/renderers/web_vr_renderer.h b/chrome/browser/vr/renderers/texture_copy_renderer.h similarity index 63% rename from chrome/browser/vr/renderers/web_vr_renderer.h rename to chrome/browser/vr/renderers/texture_copy_renderer.h index 6f93a4d..9486406 100644 --- a/chrome/browser/vr/renderers/web_vr_renderer.h +++ b/chrome/browser/vr/renderers/texture_copy_renderer.h
@@ -2,8 +2,8 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#ifndef CHROME_BROWSER_VR_RENDERERS_WEB_VR_RENDERER_H_ -#define CHROME_BROWSER_VR_RENDERERS_WEB_VR_RENDERER_H_ +#ifndef CHROME_BROWSER_VR_RENDERERS_TEXTURE_COPY_RENDERER_H_ +#define CHROME_BROWSER_VR_RENDERERS_TEXTURE_COPY_RENDERER_H_ #include "base/macros.h" #include "chrome/browser/vr/renderers/base_quad_renderer.h" @@ -12,10 +12,10 @@ namespace vr { // Renders a page-generated stereo VR view. -class VR_UI_EXPORT WebVrRenderer : public BaseQuadRenderer { +class VR_UI_EXPORT TextureCopyRenderer : public BaseQuadRenderer { public: - WebVrRenderer(); - ~WebVrRenderer() override; + TextureCopyRenderer(); + ~TextureCopyRenderer() override; void Draw(int texture_handle, const float (&uv_transform)[16], @@ -28,9 +28,9 @@ GLuint x_border_handle_; GLuint y_border_handle_; - DISALLOW_COPY_AND_ASSIGN(WebVrRenderer); + DISALLOW_COPY_AND_ASSIGN(TextureCopyRenderer); }; } // namespace vr -#endif // CHROME_BROWSER_VR_RENDERERS_WEB_VR_RENDERER_H_ +#endif // CHROME_BROWSER_VR_RENDERERS_TEXTURE_COPY_RENDERER_H_
diff --git a/chrome/browser/vr/test/ui_pixel_test.cc b/chrome/browser/vr/test/ui_pixel_test.cc index 46ac9d52..10be4bb 100644 --- a/chrome/browser/vr/test/ui_pixel_test.cc +++ b/chrome/browser/vr/test/ui_pixel_test.cc
@@ -5,7 +5,9 @@ #include "chrome/browser/vr/test/ui_pixel_test.h" #include "build/build_config.h" +#include "chrome/browser/vr/gl_texture_location.h" #include "chrome/browser/vr/model/model.h" +#include "chrome/browser/vr/render_info.h" #include "chrome/browser/vr/test/animation_utils.h" #include "chrome/browser/vr/test/constants.h" #include "third_party/skia/include/core/SkImageEncoder.h" @@ -53,10 +55,8 @@ const ToolbarState& toolbar_state) { ui_ = std::make_unique<Ui>(browser_.get(), nullptr, nullptr, nullptr, nullptr, ui_initial_state); - ui_->OnGlInitialized(content_texture_, - vr::UiElementRenderer::kTextureLocationLocal, - content_overlay_texture_, - vr::UiElementRenderer::kTextureLocationLocal, 0); + ui_->OnGlInitialized(content_texture_, kGlTextureLocationLocal, + content_overlay_texture_, kGlTextureLocationLocal, 0); ui_->GetBrowserUiWeakPtr()->SetToolbarState(toolbar_state); }
diff --git a/chrome/browser/vr/test/ui_test.cc b/chrome/browser/vr/test/ui_test.cc index 0b8edcf1..c51576b 100644 --- a/chrome/browser/vr/test/ui_test.cc +++ b/chrome/browser/vr/test/ui_test.cc
@@ -6,10 +6,10 @@ #include "chrome/browser/vr/elements/rect.h" #include "chrome/browser/vr/model/model.h" +#include "chrome/browser/vr/render_info.h" #include "chrome/browser/vr/test/animation_utils.h" #include "chrome/browser/vr/test/constants.h" #include "chrome/browser/vr/ui.h" -#include "chrome/browser/vr/ui_renderer.h" #include "chrome/browser/vr/ui_scene.h" #include "chrome/browser/vr/ui_scene_creator.h" #include "ui/gfx/geometry/vector3d_f.h"
diff --git a/chrome/browser/vr/testapp/test_keyboard_renderer.cc b/chrome/browser/vr/testapp/test_keyboard_renderer.cc index 2233ae3..5687920 100644 --- a/chrome/browser/vr/testapp/test_keyboard_renderer.cc +++ b/chrome/browser/vr/testapp/test_keyboard_renderer.cc
@@ -7,6 +7,7 @@ #include "base/files/file_util.h" #include "base/path_service.h" #include "base/strings/utf_string_conversion_utils.h" +#include "chrome/browser/vr/gl_texture_location.h" #include "chrome/browser/vr/skia_surface_provider.h" #include "chrome/browser/vr/ui_element_renderer.h" #include "third_party/skia/include/core/SkCanvas.h" @@ -50,7 +51,7 @@ void TestKeyboardRenderer::Draw(const CameraModel& model, const gfx::Transform& world_space_transform) { renderer_->DrawTexturedQuad( - texture_handle_, 0, UiElementRenderer::kTextureLocationLocal, + texture_handle_, 0, kGlTextureLocationLocal, model.view_proj_matrix * world_space_transform, gfx::RectF(0, 0, 1, 1), 1, {drawn_size_.width(), drawn_size_.height()}, 0, true /* blend */); }
diff --git a/chrome/browser/vr/testapp/vr_test_context.cc b/chrome/browser/vr/testapp/vr_test_context.cc index d422b3d..abee7e5 100644 --- a/chrome/browser/vr/testapp/vr_test_context.cc +++ b/chrome/browser/vr/testapp/vr_test_context.cc
@@ -13,11 +13,13 @@ #include "base/strings/utf_string_conversions.h" #include "base/version.h" #include "chrome/browser/vr/assets_load_status.h" +#include "chrome/browser/vr/gl_texture_location.h" #include "chrome/browser/vr/graphics_delegate.h" #include "chrome/browser/vr/model/assets.h" #include "chrome/browser/vr/model/model.h" #include "chrome/browser/vr/model/omnibox_suggestions.h" #include "chrome/browser/vr/model/toolbar_state.h" +#include "chrome/browser/vr/render_info.h" #include "chrome/browser/vr/speech_recognizer.h" #include "chrome/browser/vr/test/constants.h" #include "chrome/browser/vr/testapp/assets_component_version.h" @@ -457,10 +459,9 @@ unsigned int content_texture_id = CreateTexture(0xFF000080); unsigned int ui_texture_id = CreateTexture(0xFF008000); - ui_->OnGlInitialized(content_texture_id, - UiElementRenderer::kTextureLocationLocal, - content_texture_id, - UiElementRenderer::kTextureLocationLocal, ui_texture_id); + ui_->OnGlInitialized(content_texture_id, kGlTextureLocationLocal, + content_texture_id, kGlTextureLocationLocal, + ui_texture_id); keyboard_delegate_->Initialize( ui_instance_->scene()->SurfaceProviderForTesting(),
diff --git a/chrome/browser/vr/testapp/vr_test_context.h b/chrome/browser/vr/testapp/vr_test_context.h index 1f4a42a..3b009709 100644 --- a/chrome/browser/vr/testapp/vr_test_context.h +++ b/chrome/browser/vr/testapp/vr_test_context.h
@@ -15,7 +15,6 @@ #include "chrome/browser/vr/model/controller_model.h" #include "chrome/browser/vr/ui_browser_interface.h" #include "chrome/browser/vr/ui_interface.h" -#include "chrome/browser/vr/ui_renderer.h" #include "third_party/skia/include/core/SkColor.h" #include "ui/gfx/transform.h"
diff --git a/chrome/browser/vr/ui.cc b/chrome/browser/vr/ui.cc index 65d20f0..e0fb1c92 100644 --- a/chrome/browser/vr/ui.cc +++ b/chrome/browser/vr/ui.cc
@@ -2,13 +2,17 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#include <algorithm> #include <iomanip> #include <queue> #include <sstream> +#include <string> +#include <utility> #include "chrome/browser/vr/ui.h" #include "base/numerics/math_constants.h" +#include "base/numerics/ranges.h" #include "base/strings/string16.h" #include "base/threading/thread_task_runner_handle.h" #include "chrome/browser/vr/content_input_delegate.h" @@ -38,12 +42,37 @@ namespace { -float Clamp(float value, float min, float max) { - return std::max(min, std::min(value, max)); -} - constexpr float kMargin = 1.f * base::kPiFloat / 180; +UiElementName UserFriendlyElementNameToUiElementName( + UserFriendlyElementName name) { + switch (name) { + case UserFriendlyElementName::kUrl: + return kUrlBarOriginRegion; + case UserFriendlyElementName::kBackButton: + return kUrlBarBackButton; + case UserFriendlyElementName::kForwardButton: + return kOverflowMenuForwardButton; + case UserFriendlyElementName::kReloadButton: + return kOverflowMenuReloadButton; + case UserFriendlyElementName::kOverflowMenu: + return kUrlBarOverflowButton; + case UserFriendlyElementName::kPageInfoButton: + return kUrlBarSecurityButton; + case UserFriendlyElementName::kBrowsingDialog: + return k2dBrowsingHostedUiContent; + case UserFriendlyElementName::kContentQuad: + return kContentQuad; + case UserFriendlyElementName::kNewIncognitoTab: + return kOverflowMenuNewIncognitoTabItem; + case UserFriendlyElementName::kCloseIncognitoTabs: + return kOverflowMenuCloseAllIncognitoTabsItem; + default: + NOTREACHED(); + return kNone; + } +} + } // namespace Ui::Ui(UiBrowserInterface* browser, @@ -338,12 +367,11 @@ return model_->web_vr.presenting_web_vr(); } -void Ui::OnGlInitialized( - unsigned int content_texture_id, - UiElementRenderer::TextureLocation content_location, - unsigned int content_overlay_texture_id, - UiElementRenderer::TextureLocation content_overlay_location, - unsigned int ui_texture_id) { +void Ui::OnGlInitialized(unsigned int content_texture_id, + GlTextureLocation content_location, + unsigned int content_overlay_texture_id, + GlTextureLocation content_overlay_location, + unsigned int ui_texture_id) { ui_element_renderer_ = std::make_unique<UiElementRenderer>(); ui_renderer_ = std::make_unique<UiRenderer>(scene_.get(), ui_element_renderer_.get()); @@ -590,10 +618,6 @@ return GetContentElement()->IsVisibleAndOpaque(); } -bool Ui::IsContentOverlayTextureEmpty() { - return GetContentElement()->GetOverlayTextureEmpty(); -} - void Ui::SetContentUsesQuadLayer(bool uses_quad_layer) { return GetContentElement()->SetUsesQuadLayer(uses_quad_layer); } @@ -625,20 +649,32 @@ ui_renderer_->Draw(info); } -void Ui::DrawWebVr(int texture_data_handle, - const float (&uv_transform)[16], - float xborder, - float yborder) { - ui_element_renderer_->DrawWebVr(texture_data_handle, uv_transform, xborder, - yborder); +void Ui::DrawContent(const float (&uv_transform)[16], + float xborder, + float yborder) { + if (!model_->content_texture_id || !model_->content_overlay_texture_id) + return; + ui_element_renderer_->DrawTextureCopy(model_->content_texture_id, + uv_transform, xborder, yborder); + if (!GetContentElement()->GetOverlayTextureEmpty()) { + glEnable(GL_BLEND); + glBlendFunc(GL_ONE, GL_ONE_MINUS_SRC_ALPHA); + ui_element_renderer_->DrawTextureCopy(model_->content_overlay_texture_id, + uv_transform, xborder, yborder); + } +} + +void Ui::DrawWebXr(int texture_data_handle, const float (&uv_transform)[16]) { + ui_element_renderer_->DrawTextureCopy(texture_data_handle, uv_transform, 0, + 0); } void Ui::DrawWebVrOverlayForeground(const vr::RenderInfo& info) { ui_renderer_->DrawWebVrOverlayForeground(info); } -UiScene::Elements Ui::GetWebVrOverlayElementsToDraw() { - return scene_->GetWebVrOverlayElementsToDraw(); +bool Ui::HasWebXrOverlayElementsToDraw() { + return scene_->HasWebXrOverlayElementsToDraw(); } void Ui::HandleInput(base::TimeTicks current_time, @@ -679,6 +715,18 @@ } } +std::pair<UiInterface::FovRectangle, UiInterface::FovRectangle> +Ui::GetMinimalFovForWebXrOverlayElements( + const gfx::Transform& left_view, + const FovRectangle& fov_recommended_left, + const gfx::Transform& right_view, + const FovRectangle& fov_recommended_right, + float z_near) { + auto elements = scene_->GetWebVrOverlayElementsToDraw(); + return {GetMinimalFov(left_view, elements, fov_recommended_left, z_near), + GetMinimalFov(right_view, elements, fov_recommended_right, z_near)}; +} + Ui::FovRectangle Ui::GetMinimalFov( const gfx::Transform& view_matrix, const std::vector<const UiElement*>& elements, @@ -740,10 +788,11 @@ } // Clamp to Z near plane's boundary. - bounds_left = Clamp(bounds_left, z_near_left, z_near_right); - bounds_right = Clamp(bounds_right, z_near_left, z_near_right); - bounds_bottom = Clamp(bounds_bottom, z_near_bottom, z_near_top); - bounds_top = Clamp(bounds_top, z_near_bottom, z_near_top); + bounds_left = base::ClampToRange(bounds_left, z_near_left, z_near_right); + bounds_right = base::ClampToRange(bounds_right, z_near_left, z_near_right); + bounds_bottom = + base::ClampToRange(bounds_bottom, z_near_bottom, z_near_top); + bounds_top = base::ClampToRange(bounds_top, z_near_bottom, z_near_top); left = std::min(bounds_left, left); right = std::max(bounds_right, right);
diff --git a/chrome/browser/vr/ui.h b/chrome/browser/vr/ui.h index bd9755a0..768c58c0 100644 --- a/chrome/browser/vr/ui.h +++ b/chrome/browser/vr/ui.h
@@ -137,12 +137,11 @@ void ShowPlatformToast(const base::string16& text) override; void CancelPlatformToast() override; bool ShouldRenderWebVr() override; - void OnGlInitialized( - unsigned int content_texture_id, - UiElementRenderer::TextureLocation content_location, - unsigned int content_overlay_texture_id, - UiElementRenderer::TextureLocation content_overlay_location, - unsigned int ui_texture_id) override; + void OnGlInitialized(unsigned int content_texture_id, + GlTextureLocation content_location, + unsigned int content_overlay_texture_id, + GlTextureLocation content_overlay_location, + unsigned int ui_texture_id) override; void OnPause() override; void OnControllerUpdated(const ControllerModel& controller_model, @@ -160,7 +159,6 @@ gfx::Point3F GetTargetPointForTesting(UserFriendlyElementName element_name, const gfx::PointF& position) override; bool IsContentVisibleAndOpaque() override; - bool IsContentOverlayTextureEmpty() override; void SetContentUsesQuadLayer(bool uses_quad_buffers) override; gfx::Transform GetContentWorldSpaceTransform() override; @@ -168,12 +166,13 @@ bool SceneHasDirtyTextures() const override; void UpdateSceneTextures() override; void Draw(const RenderInfo& render_info) override; - void DrawWebVr(int texture_data_handle, - const float (&uv_transform)[16], - float xborder, - float yborder) override; + void DrawContent(const float (&uv_transform)[16], + float xborder, + float yborder) override; + void DrawWebXr(int texture_data_handle, + const float (&uv_transform)[16]) override; void DrawWebVrOverlayForeground(const RenderInfo& render_info) override; - UiScene::Elements GetWebVrOverlayElementsToDraw() override; + bool HasWebXrOverlayElementsToDraw() override; void HandleInput(base::TimeTicks current_time, const RenderInfo& render_info, @@ -183,10 +182,12 @@ void HandleMenuButtonEvents(InputEventList* input_event_list) override; - FovRectangle GetMinimalFov(const gfx::Transform& view_matrix, - const std::vector<const UiElement*>& elements, - const FovRectangle& fov_recommended, - float z_near) override; + std::pair<FovRectangle, FovRectangle> GetMinimalFovForWebXrOverlayElements( + const gfx::Transform& left_view, + const FovRectangle& fov_recommended_left, + const gfx::Transform& right_view, + const FovRectangle& fov_recommended_right, + float z_near) override; void RequestFocus(int element_id) override; void RequestUnfocus(int element_id) override; @@ -203,6 +204,10 @@ UiBrowserInterface* browser_; ContentElement* GetContentElement(); std::vector<TabModel>::iterator FindTab(int id, std::vector<TabModel>* tabs); + FovRectangle GetMinimalFov(const gfx::Transform& view_matrix, + const std::vector<const UiElement*>& elements, + const FovRectangle& fov_recommended, + float z_near); // This state may be further abstracted into a SkiaUi object. std::unique_ptr<UiScene> scene_;
diff --git a/chrome/browser/vr/ui_browser_interface.h b/chrome/browser/vr/ui_browser_interface.h index 907ff1d..2bf35c41 100644 --- a/chrome/browser/vr/ui_browser_interface.h +++ b/chrome/browser/vr/ui_browser_interface.h
@@ -8,6 +8,7 @@ #include "chrome/browser/vr/exit_vr_prompt_choice.h" #include "chrome/browser/vr/model/omnibox_suggestions.h" #include "chrome/browser/vr/ui_unsupported_mode.h" +#include "chrome/browser/vr/vr_base_export.h" #include "ui/gfx/geometry/size_f.h" #include "url/gurl.h" @@ -22,7 +23,7 @@ // An interface for the VR UI to communicate with VrShell. Many of the functions // in this interface are proxies to methods on VrShell. -class UiBrowserInterface { +class VR_BASE_EXPORT UiBrowserInterface { public: virtual ~UiBrowserInterface() = default;
diff --git a/chrome/browser/vr/ui_element_renderer.cc b/chrome/browser/vr/ui_element_renderer.cc index 388e24bb..0fabe0a 100644 --- a/chrome/browser/vr/ui_element_renderer.cc +++ b/chrome/browser/vr/ui_element_renderer.cc
@@ -14,9 +14,9 @@ #include "chrome/browser/vr/renderers/base_renderer.h" #include "chrome/browser/vr/renderers/external_textured_quad_renderer.h" #include "chrome/browser/vr/renderers/radial_gradient_quad_renderer.h" +#include "chrome/browser/vr/renderers/texture_copy_renderer.h" #include "chrome/browser/vr/renderers/textured_quad_renderer.h" #include "chrome/browser/vr/renderers/transparent_quad_renderer.h" -#include "chrome/browser/vr/renderers/web_vr_renderer.h" #include "chrome/browser/vr/vr_gl_util.h" #include "ui/gfx/geometry/point3_f.h" #include "ui/gfx/geometry/vector3d_f.h" @@ -43,7 +43,7 @@ textured_quad_renderer_ = std::make_unique<TexturedQuadRenderer>(); radial_gradient_quad_renderer_ = std::make_unique<RadialGradientQuadRenderer>(); - webvr_renderer_ = std::make_unique<WebVrRenderer>(); + texture_copy_renderer_ = std::make_unique<TextureCopyRenderer>(); reticle_renderer_ = std::make_unique<Reticle::Renderer>(); laser_renderer_ = std::make_unique<Laser::Renderer>(); controller_renderer_ = std::make_unique<Controller::Renderer>(); @@ -57,7 +57,7 @@ void UiElementRenderer::DrawTexturedQuad( int texture_data_handle, int overlay_texture_data_handle, - TextureLocation texture_location, + GlTextureLocation texture_location, const gfx::Transform& model_view_proj_matrix, const gfx::RectF& clip_rect, float opacity, @@ -70,9 +70,10 @@ corner_radius * 2.0 > element_size.height()) { return; } - TexturedQuadRenderer* renderer = texture_location == kTextureLocationExternal - ? external_textured_quad_renderer_.get() - : textured_quad_renderer_.get(); + TexturedQuadRenderer* renderer = + texture_location == kGlTextureLocationExternal + ? external_textured_quad_renderer_.get() + : textured_quad_renderer_.get(); if (!texture_data_handle && !overlay_texture_data_handle) { // If we're blending, why are we even drawing a transparent quad? DCHECK(!blend); @@ -134,12 +135,13 @@ reticle_renderer_->Draw(opacity, model_view_proj_matrix); } -void UiElementRenderer::DrawWebVr(int texture_data_handle, - const float (&uv_transform)[16], - float xborder, - float yborder) { - FlushIfNecessary(webvr_renderer_.get()); - webvr_renderer_->Draw(texture_data_handle, uv_transform, xborder, yborder); +void UiElementRenderer::DrawTextureCopy(int texture_data_handle, + const float (&uv_transform)[16], + float xborder, + float yborder) { + FlushIfNecessary(texture_copy_renderer_.get()); + texture_copy_renderer_->Draw(texture_data_handle, uv_transform, xborder, + yborder); } void UiElementRenderer::DrawShadow(const gfx::Transform& model_view_proj_matrix,
diff --git a/chrome/browser/vr/ui_element_renderer.h b/chrome/browser/vr/ui_element_renderer.h index 536384a..1ccb1b8 100644 --- a/chrome/browser/vr/ui_element_renderer.h +++ b/chrome/browser/vr/ui_element_renderer.h
@@ -17,8 +17,8 @@ #include "chrome/browser/vr/elements/laser.h" #include "chrome/browser/vr/elements/reticle.h" #include "chrome/browser/vr/elements/shadow.h" +#include "chrome/browser/vr/gl_texture_location.h" #include "chrome/browser/vr/macros.h" -#include "chrome/browser/vr/ui_element_renderer.h" #include "third_party/skia/include/core/SkColor.h" #include "ui/gfx/geometry/rect_f.h" #include "ui/gfx/geometry/size.h" @@ -37,9 +37,9 @@ class BaseRenderer; class ExternalTexturedQuadRenderer; class RadialGradientQuadRenderer; +class TextureCopyRenderer; class TexturedQuadRenderer; class TransparentQuadRenderer; -class WebVrRenderer; // An instance of this class is passed to UiElements by the UiRenderer in order // to issue the GL commands for drawing the frame. In some ways, this class is a @@ -51,18 +51,13 @@ // loss/recreation. class UiElementRenderer { public: - enum TextureLocation { - kTextureLocationLocal, - kTextureLocationExternal, - }; - UiElementRenderer(); VIRTUAL_FOR_MOCKS ~UiElementRenderer(); VIRTUAL_FOR_MOCKS void DrawTexturedQuad( int texture_data_handle, int overlay_texture_data_handle, - TextureLocation texture_location, + GlTextureLocation texture_location, const gfx::Transform& model_view_proj_matrix, const gfx::RectF& clip_rect, float opacity, @@ -95,10 +90,10 @@ float opacity, const gfx::Transform& model_view_proj_matrix); - VIRTUAL_FOR_MOCKS void DrawWebVr(int texture_data_handle, - const float (&uv_transform)[16], - float xborder, - float yborder); + VIRTUAL_FOR_MOCKS void DrawTextureCopy(int texture_data_handle, + const float (&uv_transform)[16], + float xborder, + float yborder); VIRTUAL_FOR_MOCKS void DrawShadow( const gfx::Transform& model_view_proj_matrix, @@ -143,7 +138,7 @@ std::unique_ptr<TransparentQuadRenderer> transparent_quad_renderer_; std::unique_ptr<TexturedQuadRenderer> textured_quad_renderer_; std::unique_ptr<RadialGradientQuadRenderer> radial_gradient_quad_renderer_; - std::unique_ptr<WebVrRenderer> webvr_renderer_; + std::unique_ptr<TextureCopyRenderer> texture_copy_renderer_; std::unique_ptr<Reticle::Renderer> reticle_renderer_; std::unique_ptr<Laser::Renderer> laser_renderer_; std::unique_ptr<Controller::Renderer> controller_renderer_;
diff --git a/chrome/browser/vr/ui_input_manager.cc b/chrome/browser/vr/ui_input_manager.cc index d2b7c32..7769eaba 100644 --- a/chrome/browser/vr/ui_input_manager.cc +++ b/chrome/browser/vr/ui_input_manager.cc
@@ -14,6 +14,7 @@ #include "chrome/browser/vr/model/controller_model.h" #include "chrome/browser/vr/model/reticle_model.h" #include "chrome/browser/vr/model/text_input_info.h" +#include "chrome/browser/vr/render_info.h" #include "chrome/browser/vr/ui_renderer.h" #include "chrome/browser/vr/ui_scene.h"
diff --git a/chrome/browser/vr/ui_input_manager_unittest.cc b/chrome/browser/vr/ui_input_manager_unittest.cc index 3600e7f5e..0b9679a 100644 --- a/chrome/browser/vr/ui_input_manager_unittest.cc +++ b/chrome/browser/vr/ui_input_manager_unittest.cc
@@ -15,11 +15,11 @@ #include "chrome/browser/vr/elements/ui_element.h" #include "chrome/browser/vr/input_event.h" #include "chrome/browser/vr/model/model.h" +#include "chrome/browser/vr/render_info.h" #include "chrome/browser/vr/test/animation_utils.h" #include "chrome/browser/vr/test/constants.h" #include "chrome/browser/vr/test/mock_content_input_delegate.h" #include "chrome/browser/vr/test/ui_test.h" -#include "chrome/browser/vr/ui_renderer.h" #include "chrome/browser/vr/ui_scene.h" #include "chrome/browser/vr/ui_scene_constants.h" #include "chrome/browser/vr/ui_scene_creator.h"
diff --git a/chrome/browser/vr/ui_interface.h b/chrome/browser/vr/ui_interface.h index 2f17e12..3054191 100644 --- a/chrome/browser/vr/ui_interface.h +++ b/chrome/browser/vr/ui_interface.h
@@ -7,29 +7,32 @@ #include <memory> #include <queue> +#include <utility> #include <vector> #include "base/memory/weak_ptr.h" #include "chrome/browser/vr/browser_ui_interface.h" +#include "chrome/browser/vr/gl_texture_location.h" #include "chrome/browser/vr/keyboard_ui_interface.h" -#include "chrome/browser/vr/platform_controller.h" -#include "chrome/browser/vr/ui_element_renderer.h" -#include "chrome/browser/vr/ui_input_manager.h" -#include "chrome/browser/vr/ui_scene.h" namespace gfx { class Point3F; +class PointF; +class Transform; } namespace vr { class BrowserUiInterface; +class InputEvent; class PlatformUiInputDelegate; struct ControllerModel; struct RenderInfo; struct ReticleModel; enum class UserFriendlyElementName; +using InputEventList = std::vector<std::unique_ptr<InputEvent>>; + // This interface represents the methods that should be called by its owner, and // also serves to make all such methods virtual for the sake of separating a UI // feature module. @@ -62,12 +65,11 @@ virtual void ShowPlatformToast(const base::string16& text) = 0; virtual void CancelPlatformToast() = 0; virtual bool ShouldRenderWebVr() = 0; - virtual void OnGlInitialized( - unsigned int content_texture_id, - UiElementRenderer::TextureLocation content_location, - unsigned int content_overlay_texture_id, - UiElementRenderer::TextureLocation content_overlay_location, - unsigned int ui_texture_id) = 0; + virtual void OnGlInitialized(unsigned int content_texture_id, + GlTextureLocation content_location, + unsigned int content_overlay_texture_id, + GlTextureLocation content_overlay_location, + unsigned int ui_texture_id) = 0; virtual void OnPause() = 0; virtual void OnControllerUpdated(const ControllerModel& controller_model, const ReticleModel& reticle_model) = 0; @@ -84,19 +86,19 @@ UserFriendlyElementName element_name, const gfx::PointF& position) = 0; virtual bool IsContentVisibleAndOpaque() = 0; - virtual bool IsContentOverlayTextureEmpty() = 0; virtual void SetContentUsesQuadLayer(bool uses_quad_buffers) = 0; virtual gfx::Transform GetContentWorldSpaceTransform() = 0; virtual bool OnBeginFrame(const base::TimeTicks&, const gfx::Transform&) = 0; virtual bool SceneHasDirtyTextures() const = 0; virtual void UpdateSceneTextures() = 0; virtual void Draw(const RenderInfo&) = 0; - virtual void DrawWebVr(int texture_data_handle, - const float (&uv_transform)[16], - float xborder, - float yborder) = 0; + virtual void DrawContent(const float (&uv_transform)[16], + float xborder, + float yborder) = 0; + virtual void DrawWebXr(int texture_data_handle, + const float (&uv_transform)[16]) = 0; virtual void DrawWebVrOverlayForeground(const RenderInfo&) = 0; - virtual UiScene::Elements GetWebVrOverlayElementsToDraw() = 0; + virtual bool HasWebXrOverlayElementsToDraw() = 0; virtual void HandleInput(base::TimeTicks current_time, const RenderInfo& render_info, const ControllerModel& controller_model, @@ -107,14 +109,14 @@ virtual void RequestUnfocus(int element_id) = 0; // This function calculates the minimal FOV (in degrees) which covers all - // visible |elements| as if it was viewing from fov_recommended. For example, - // if fov_recommended is {20.f, 20.f, 20.f, 20.f}. And all elements appear on - // screen within a FOV of {-11.f, 19.f, 9.f, 9.f} if we use fov_recommended. - // Ideally, the calculated minimal FOV should be the same. In practice, the - // elements might get clipped near the edge sometimes due to float precison. - // To fix this, we add a small margin (1 degree) to all directions. So the - // |out_fov| set by this function should be {-10.f, 20.f, 10.f, 10.f} in the - // example case. + // visible overflow elements as if it was viewing from fov_recommended. For + // example, if fov_recommended is {20.f, 20.f, 20.f, 20.f}. And all elements + // appear on screen within a FOV of {-11.f, 19.f, 9.f, 9.f} if we use + // fov_recommended. Ideally, the calculated minimal FOV should be the same. In + // practice, the elements might get clipped near the edge sometimes due to + // float precision. To fix this, we add a small margin (1 degree) to all + // directions. So the |out_fov| set by this function should be {-10.f, 20.f, + // 10.f, 10.f} in the example case. // Using a smaller FOV could improve the performance a lot while we are // showing UIs on top of WebVR content. struct FovRectangle { @@ -123,10 +125,12 @@ float bottom; float top; }; - virtual FovRectangle GetMinimalFov( - const gfx::Transform& view_matrix, - const std::vector<const UiElement*>& elements, - const FovRectangle& fov_recommended, + virtual std::pair<FovRectangle, FovRectangle> + GetMinimalFovForWebXrOverlayElements( + const gfx::Transform& left_view, + const FovRectangle& fov_recommended_left, + const gfx::Transform& right_view, + const FovRectangle& fov_recommended_right, float z_near) = 0; };
diff --git a/chrome/browser/vr/ui_renderer.cc b/chrome/browser/vr/ui_renderer.cc index c7db67b..e82fed8 100644 --- a/chrome/browser/vr/ui_renderer.cc +++ b/chrome/browser/vr/ui_renderer.cc
@@ -6,6 +6,7 @@ #include "base/trace_event/trace_event.h" #include "chrome/browser/vr/elements/ui_element.h" +#include "chrome/browser/vr/render_info.h" #include "chrome/browser/vr/ui_element_renderer.h" #include "chrome/browser/vr/ui_scene.h" #include "ui/gl/gl_bindings.h"
diff --git a/chrome/browser/vr/ui_renderer.h b/chrome/browser/vr/ui_renderer.h index af6a260..15e47e2 100644 --- a/chrome/browser/vr/ui_renderer.h +++ b/chrome/browser/vr/ui_renderer.h
@@ -5,11 +5,9 @@ #ifndef CHROME_BROWSER_VR_UI_RENDERER_H_ #define CHROME_BROWSER_VR_UI_RENDERER_H_ -#include "chrome/browser/vr/model/camera_model.h" #include "chrome/browser/vr/ui_input_manager.h" #include "chrome/browser/vr/vr_ui_export.h" #include "ui/gfx/geometry/rect_f.h" -#include "ui/gfx/transform.h" namespace vr { @@ -17,14 +15,8 @@ class UiScene; class UiElement; class UiElementRenderer; - -// Provides information for rendering such as the viewport and view/projection -// matrix. -struct RenderInfo { - gfx::Transform head_pose; - CameraModel left_eye_model; - CameraModel right_eye_model; -}; +struct CameraModel; +struct RenderInfo; // Renders a UI scene. class VR_UI_EXPORT UiRenderer {
diff --git a/chrome/browser/vr/ui_scene.cc b/chrome/browser/vr/ui_scene.cc index a416b1b1..64501f6f 100644 --- a/chrome/browser/vr/ui_scene.cc +++ b/chrome/browser/vr/ui_scene.cc
@@ -262,6 +262,14 @@ }); } +bool UiScene::HasWebXrOverlayElementsToDraw() { + auto* webvr_root = GetUiElementByName(kWebVrRoot); + return AnyVisibleElementSatisfiesPredicate( + webvr_root, [](UiElement* element) { + return element->draw_phase() == kPhaseOverlayForeground; + }); +} + UiScene::Elements UiScene::GetWebVrOverlayElementsToDraw() { auto* webvr_root = GetUiElementByName(kWebVrRoot); return GetVisibleElementsWithPredicate(webvr_root, [](UiElement* element) {
diff --git a/chrome/browser/vr/ui_scene.h b/chrome/browser/vr/ui_scene.h index e25b150e..77b4248 100644 --- a/chrome/browser/vr/ui_scene.h +++ b/chrome/browser/vr/ui_scene.h
@@ -66,6 +66,7 @@ std::vector<UiElement*>& GetAllElements(); Elements GetElementsToHitTest(); Elements GetElementsToDraw(); + bool HasWebXrOverlayElementsToDraw(); Elements GetWebVrOverlayElementsToDraw(); float background_distance() const { return background_distance_; }
diff --git a/chrome/browser/vr/ui_scene_creator.cc b/chrome/browser/vr/ui_scene_creator.cc index 1e9a9c1e..c92674e 100644 --- a/chrome/browser/vr/ui_scene_creator.cc +++ b/chrome/browser/vr/ui_scene_creator.cc
@@ -829,9 +829,9 @@ hosted_ui->AddBinding(VR_BIND_FUNC( unsigned int, Model, model, model->hosted_platform_ui.texture_id, PlatformUiElement, hosted_ui.get(), SetTextureId)); - hosted_ui->AddBinding(VR_BIND_FUNC( - UiElementRenderer::TextureLocation, Model, model, model->content_location, - PlatformUiElement, hosted_ui.get(), SetTextureLocation)); + hosted_ui->AddBinding(VR_BIND_FUNC(GlTextureLocation, Model, model, + model->content_location, PlatformUiElement, + hosted_ui.get(), SetTextureLocation)); hosted_ui->AddBinding(std::make_unique<Binding<bool>>( VR_BIND_LAMBDA( [](Model* m) { return m->hosted_platform_ui.hosted_ui_enabled; }, @@ -1435,17 +1435,15 @@ main_content->AddBinding( VR_BIND_FUNC(unsigned int, Model, model_, model->content_texture_id, ContentElement, main_content.get(), SetTextureId)); - main_content->AddBinding(VR_BIND_FUNC(UiElementRenderer::TextureLocation, - Model, model_, model->content_location, - ContentElement, main_content.get(), - SetTextureLocation)); + main_content->AddBinding( + VR_BIND_FUNC(GlTextureLocation, Model, model_, model->content_location, + ContentElement, main_content.get(), SetTextureLocation)); main_content->AddBinding(VR_BIND_FUNC( unsigned int, Model, model_, model->content_overlay_texture_id, ContentElement, main_content.get(), SetOverlayTextureId)); - main_content->AddBinding( - VR_BIND_FUNC(UiElementRenderer::TextureLocation, Model, model_, - model->content_overlay_location, ContentElement, - main_content.get(), SetOverlayTextureLocation)); + main_content->AddBinding(VR_BIND_FUNC( + GlTextureLocation, Model, model_, model->content_overlay_location, + ContentElement, main_content.get(), SetOverlayTextureLocation)); main_content->AddBinding(VR_BIND_FUNC( bool, Model, model_, !model->content_overlay_texture_non_empty, ContentElement, main_content.get(), SetOverlayTextureEmpty));
diff --git a/chrome/browser/vr/ui_test_input.cc b/chrome/browser/vr/ui_test_input.cc deleted file mode 100644 index 9a5808e6..0000000 --- a/chrome/browser/vr/ui_test_input.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/vr/ui_test_input.h" - -#include "base/logging.h" -#include "base/macros.h" -#include "chrome/browser/vr/elements/ui_element_name.h" - -namespace vr { - -UiElementName UserFriendlyElementNameToUiElementName( - UserFriendlyElementName name) { - switch (name) { - case UserFriendlyElementName::kUrl: - return kUrlBarOriginRegion; - case UserFriendlyElementName::kBackButton: - return kUrlBarBackButton; - case UserFriendlyElementName::kForwardButton: - return kOverflowMenuForwardButton; - case UserFriendlyElementName::kReloadButton: - return kOverflowMenuReloadButton; - case UserFriendlyElementName::kOverflowMenu: - return kUrlBarOverflowButton; - case UserFriendlyElementName::kPageInfoButton: - return kUrlBarSecurityButton; - case UserFriendlyElementName::kBrowsingDialog: - return k2dBrowsingHostedUiContent; - case UserFriendlyElementName::kContentQuad: - return kContentQuad; - case UserFriendlyElementName::kNewIncognitoTab: - return kOverflowMenuNewIncognitoTabItem; - case UserFriendlyElementName::kCloseIncognitoTabs: - return kOverflowMenuCloseAllIncognitoTabsItem; - default: - NOTREACHED(); - return kNone; - } -} - -} // namespace vr
diff --git a/chrome/browser/vr/ui_test_input.h b/chrome/browser/vr/ui_test_input.h index 03f1c35d..30462436 100644 --- a/chrome/browser/vr/ui_test_input.h +++ b/chrome/browser/vr/ui_test_input.h
@@ -75,9 +75,6 @@ base::TimeTicks start_time = base::TimeTicks::Now(); }; -UiElementName UserFriendlyElementNameToUiElementName( - UserFriendlyElementName name); - } // namespace vr #endif // CHROME_BROWSER_VR_UI_TEST_INPUT_H_
diff --git a/chrome/browser/web_applications/components/web_app_icon_generator_unittest.cc b/chrome/browser/web_applications/components/web_app_icon_generator_unittest.cc index 8f3fc40..b19a1948 100644 --- a/chrome/browser/web_applications/components/web_app_icon_generator_unittest.cc +++ b/chrome/browser/web_applications/components/web_app_icon_generator_unittest.cc
@@ -27,35 +27,11 @@ const int kIconSizeSmallBetweenMediumAndLarge = 63; const int kIconSizeLargeBetweenMediumAndLarge = 96; -SkBitmap CreateSquareBitmapWithColor(int size, SkColor color) { +BitmapAndSource CreateSquareIcon(const GURL& gurl, int size, SkColor color) { SkBitmap bitmap; bitmap.allocN32Pixels(size, size); bitmap.eraseColor(color); - return bitmap; -} - -web_app::BitmapAndSource CreateSquareBitmapAndSourceWithColor(int size, - SkColor color) { - return web_app::BitmapAndSource(GURL(), - CreateSquareBitmapWithColor(size, color)); -} - -struct IconInfo { - IconInfo() : width(0), height(0) {} - ~IconInfo() = default; - - GURL url; - int width; - int height; - SkBitmap data; -}; - -IconInfo CreateIconInfoWithBitmap(int size, SkColor color) { - IconInfo icon_info; - icon_info.width = size; - icon_info.height = size; - icon_info.data = CreateSquareBitmapWithColor(size, color); - return icon_info; + return BitmapAndSource(gurl, bitmap); } std::set<int> TestSizesToGenerate() { @@ -67,18 +43,18 @@ } void ValidateAllIconsWithURLsArePresent( - const std::vector<IconInfo>& icons_to_check, + const std::vector<BitmapAndSource>& icons_to_check, const std::map<int, BitmapAndSource>& size_map) { EXPECT_EQ(icons_to_check.size(), size_map.size()); // Check that every icon with URL has a mapped icon. for (const auto& icon : icons_to_check) { - if (!icon.url.is_empty()) { + if (!icon.source_url.is_empty()) { bool found = false; - if (base::ContainsKey(size_map, icon.width)) { - const BitmapAndSource& mapped_icon = size_map.at(icon.width); - if (mapped_icon.source_url == icon.url && - mapped_icon.bitmap.width() == icon.width) { + if (base::ContainsKey(size_map, icon.bitmap.width())) { + const BitmapAndSource& mapped_icon = size_map.at(icon.bitmap.width()); + if (mapped_icon.source_url == icon.source_url && + mapped_icon.bitmap.width() == icon.bitmap.width()) { found = true; } } @@ -87,14 +63,11 @@ } } -std::vector<web_app::BitmapAndSource>::const_iterator -FindLargestBitmapAndSourceVector( - const std::vector<web_app::BitmapAndSource>& bitmap_vector) { +std::vector<BitmapAndSource>::const_iterator FindLargestBitmapAndSourceVector( + const std::vector<BitmapAndSource>& bitmap_vector) { auto result = bitmap_vector.end(); int largest = -1; - for (std::vector<web_app::BitmapAndSource>::const_iterator it = - bitmap_vector.begin(); - it != bitmap_vector.end(); ++it) { + for (auto it = bitmap_vector.begin(); it != bitmap_vector.end(); ++it) { if (it->bitmap.width() > largest) { result = it; } @@ -102,13 +75,10 @@ return result; } -std::vector<web_app::BitmapAndSource>::const_iterator -FindMatchingBitmapAndSourceVector( - const std::vector<web_app::BitmapAndSource>& bitmap_vector, +std::vector<BitmapAndSource>::const_iterator FindMatchingBitmapAndSourceVector( + const std::vector<BitmapAndSource>& bitmap_vector, int size) { - for (std::vector<web_app::BitmapAndSource>::const_iterator it = - bitmap_vector.begin(); - it != bitmap_vector.end(); ++it) { + for (auto it = bitmap_vector.begin(); it != bitmap_vector.end(); ++it) { if (it->bitmap.width() == size) { return it; } @@ -116,13 +86,11 @@ return bitmap_vector.end(); } -std::vector<web_app::BitmapAndSource>::const_iterator +std::vector<BitmapAndSource>::const_iterator FindEqualOrLargerBitmapAndSourceVector( - const std::vector<web_app::BitmapAndSource>& bitmap_vector, + const std::vector<BitmapAndSource>& bitmap_vector, int size) { - for (std::vector<web_app::BitmapAndSource>::const_iterator it = - bitmap_vector.begin(); - it != bitmap_vector.end(); ++it) { + for (auto it = bitmap_vector.begin(); it != bitmap_vector.end(); ++it) { if (it->bitmap.width() >= size) { return it; } @@ -131,8 +99,8 @@ } void ValidateIconsGeneratedAndResizedCorrectly( - std::vector<web_app::BitmapAndSource> downloaded, - std::map<int, web_app::BitmapAndSource> size_map, + std::vector<BitmapAndSource> downloaded, + std::map<int, BitmapAndSource> size_map, std::set<int> sizes_to_generate, int expected_generated, int expected_resized) { @@ -196,15 +164,13 @@ std::vector<BitmapAndSource> downloaded; // Add an icon with a URL and bitmap. 'Download' it. - IconInfo icon_info = CreateIconInfoWithBitmap(icon_size, SK_ColorRED); - icon_info.url = GURL(kAppIconURL1); - downloaded.push_back(BitmapAndSource(icon_info.url, icon_info.data)); + downloaded.push_back( + CreateSquareIcon(GURL(kAppIconURL1), icon_size, SK_ColorRED)); // Now run the resizing/generation and validation. SkColor generated_icon_color = SK_ColorTRANSPARENT; - std::map<int, web_app::BitmapAndSource> size_map = - ResizeIconsAndGenerateMissing(downloaded, TestSizesToGenerate(), GURL(), - &generated_icon_color); + auto size_map = ResizeIconsAndGenerateMissing( + downloaded, TestSizesToGenerate(), GURL(), &generated_icon_color); ValidateIconsGeneratedAndResizedCorrectly( downloaded, size_map, TestSizesToGenerate(), expected_generated, @@ -223,14 +189,13 @@ desired_sizes.insert(256); { - std::vector<web_app::BitmapAndSource> bitmaps; - bitmaps.push_back(CreateSquareBitmapAndSourceWithColor(16, SK_ColorRED)); - bitmaps.push_back(CreateSquareBitmapAndSourceWithColor(32, SK_ColorGREEN)); - bitmaps.push_back( - CreateSquareBitmapAndSourceWithColor(144, SK_ColorYELLOW)); + std::vector<BitmapAndSource> bitmaps; + bitmaps.push_back(CreateSquareIcon(GURL(), 16, SK_ColorRED)); + bitmaps.push_back(CreateSquareIcon(GURL(), 32, SK_ColorGREEN)); + bitmaps.push_back(CreateSquareIcon(GURL(), 144, SK_ColorYELLOW)); - std::map<int, web_app::BitmapAndSource> results( - ConstrainBitmapsToSizes(bitmaps, desired_sizes)); + std::map<int, BitmapAndSource> results = + ConstrainBitmapsToSizes(bitmaps, desired_sizes); EXPECT_EQ(6u, results.size()); ValidateBitmapSizeAndColor(results[16].bitmap, 16, SK_ColorRED); @@ -241,14 +206,14 @@ ValidateBitmapSizeAndColor(results[256].bitmap, 256, SK_ColorYELLOW); } { - std::vector<web_app::BitmapAndSource> bitmaps; - bitmaps.push_back(CreateSquareBitmapAndSourceWithColor(512, SK_ColorRED)); - bitmaps.push_back(CreateSquareBitmapAndSourceWithColor(18, SK_ColorGREEN)); - bitmaps.push_back(CreateSquareBitmapAndSourceWithColor(33, SK_ColorBLUE)); - bitmaps.push_back(CreateSquareBitmapAndSourceWithColor(17, SK_ColorYELLOW)); + std::vector<BitmapAndSource> bitmaps; + bitmaps.push_back(CreateSquareIcon(GURL(), 512, SK_ColorRED)); + bitmaps.push_back(CreateSquareIcon(GURL(), 18, SK_ColorGREEN)); + bitmaps.push_back(CreateSquareIcon(GURL(), 33, SK_ColorBLUE)); + bitmaps.push_back(CreateSquareIcon(GURL(), 17, SK_ColorYELLOW)); - std::map<int, web_app::BitmapAndSource> results( - ConstrainBitmapsToSizes(bitmaps, desired_sizes)); + std::map<int, BitmapAndSource> results = + ConstrainBitmapsToSizes(bitmaps, desired_sizes); EXPECT_EQ(6u, results.size()); ValidateBitmapSizeAndColor(results[16].bitmap, 16, SK_ColorYELLOW); @@ -261,62 +226,48 @@ } TEST(WebAppIconGeneratorTest, LinkedAppIconsAreNotChanged) { - std::vector<IconInfo> icons_info; + std::vector<BitmapAndSource> icons; - IconInfo icon_info; - icon_info.url = GURL(kAppIconURL3); + const GURL url = GURL(kAppIconURL3); + const SkColor color = SK_ColorBLACK; - icon_info.width = kIconSizeMedium; - icons_info.push_back(icon_info); - - icon_info.width = kIconSizeSmall; - icons_info.push_back(icon_info); - - icon_info.width = kIconSizeLarge; - icons_info.push_back(icon_info); + icons.push_back(CreateSquareIcon(url, kIconSizeMedium, color)); + icons.push_back(CreateSquareIcon(url, kIconSizeSmall, color)); + icons.push_back(CreateSquareIcon(url, kIconSizeLarge, color)); // 'Download' one of the icons without a size or bitmap. std::vector<BitmapAndSource> downloaded; - downloaded.push_back(BitmapAndSource( - GURL(kAppIconURL3), - CreateSquareBitmapWithColor(kIconSizeLarge, SK_ColorBLACK))); + downloaded.push_back(CreateSquareIcon(url, kIconSizeLarge, color)); const auto& sizes = TestSizesToGenerate(); // Now run the resizing and generation into a new web icons info. SkColor generated_icon_color = SK_ColorTRANSPARENT; - std::map<int, web_app::BitmapAndSource> size_map = - ResizeIconsAndGenerateMissing(downloaded, sizes, GURL(), - &generated_icon_color); + std::map<int, BitmapAndSource> size_map = ResizeIconsAndGenerateMissing( + downloaded, sizes, GURL(), &generated_icon_color); EXPECT_EQ(sizes.size(), size_map.size()); // Now check that the linked app icons (i.e. those with URLs) are matching. - ValidateAllIconsWithURLsArePresent(icons_info, size_map); + ValidateAllIconsWithURLsArePresent(icons, size_map); } TEST(WebAppIconGeneratorTest, IconsResizedFromOddSizes) { std::vector<BitmapAndSource> downloaded; + const SkColor color = SK_ColorRED; + // Add three icons with a URL and bitmap. 'Download' each of them. - IconInfo icon_info = CreateIconInfoWithBitmap(kIconSizeSmall, SK_ColorRED); - icon_info.url = GURL(kAppIconURL1); - downloaded.push_back(web_app::BitmapAndSource(icon_info.url, icon_info.data)); - - icon_info = CreateIconInfoWithBitmap(kIconSizeSmallBetweenMediumAndLarge, - SK_ColorRED); - icon_info.url = GURL(kAppIconURL2); - downloaded.push_back(web_app::BitmapAndSource(icon_info.url, icon_info.data)); - - icon_info = CreateIconInfoWithBitmap(kIconSizeLargeBetweenMediumAndLarge, - SK_ColorRED); - icon_info.url = GURL(kAppIconURL3); - downloaded.push_back(web_app::BitmapAndSource(icon_info.url, icon_info.data)); + downloaded.push_back( + CreateSquareIcon(GURL(kAppIconURL1), kIconSizeSmall, color)); + downloaded.push_back(CreateSquareIcon( + GURL(kAppIconURL2), kIconSizeSmallBetweenMediumAndLarge, color)); + downloaded.push_back(CreateSquareIcon( + GURL(kAppIconURL3), kIconSizeLargeBetweenMediumAndLarge, color)); // Now run the resizing and generation. SkColor generated_icon_color = SK_ColorTRANSPARENT; - std::map<int, web_app::BitmapAndSource> size_map = - ResizeIconsAndGenerateMissing(downloaded, TestSizesToGenerate(), GURL(), - &generated_icon_color); + std::map<int, BitmapAndSource> size_map = ResizeIconsAndGenerateMissing( + downloaded, TestSizesToGenerate(), GURL(), &generated_icon_color); // No icons should be generated. The LARGE and MEDIUM sizes should be resized. ValidateIconsGeneratedAndResizedCorrectly(downloaded, size_map, @@ -324,26 +275,19 @@ } TEST(WebAppIconGeneratorTest, IconsResizedFromLarger) { - std::vector<web_app::BitmapAndSource> downloaded; + std::vector<BitmapAndSource> downloaded; // Add three icons with a URL and bitmap. 'Download' two of them and pretend // the third failed to download. - IconInfo icon_info = CreateIconInfoWithBitmap(kIconSizeSmall, SK_ColorRED); - icon_info.url = GURL(kAppIconURL1); - downloaded.push_back(web_app::BitmapAndSource(icon_info.url, icon_info.data)); - - icon_info = CreateIconInfoWithBitmap(kIconSizeLarge, SK_ColorBLUE); - icon_info.url = GURL(kAppIconURL2); - - icon_info = CreateIconInfoWithBitmap(kIconSizeGigantor, SK_ColorBLACK); - icon_info.url = GURL(kAppIconURL3); - downloaded.push_back(web_app::BitmapAndSource(icon_info.url, icon_info.data)); + downloaded.push_back( + CreateSquareIcon(GURL(kAppIconURL1), kIconSizeSmall, SK_ColorRED)); + downloaded.push_back( + CreateSquareIcon(GURL(kAppIconURL3), kIconSizeGigantor, SK_ColorBLACK)); // Now run the resizing and generation. SkColor generated_icon_color = SK_ColorTRANSPARENT; - std::map<int, web_app::BitmapAndSource> size_map = - ResizeIconsAndGenerateMissing(downloaded, TestSizesToGenerate(), GURL(), - &generated_icon_color); + std::map<int, BitmapAndSource> size_map = ResizeIconsAndGenerateMissing( + downloaded, TestSizesToGenerate(), GURL(), &generated_icon_color); // Expect icon for MEDIUM and LARGE to be resized from the gigantor icon // as it was not downloaded. @@ -352,23 +296,13 @@ } TEST(WebAppIconGeneratorTest, AllIconsGeneratedWhenNotDownloaded) { - std::vector<web_app::BitmapAndSource> downloaded; - // Add three icons with a URL and bitmap. 'Download' none of them. - IconInfo icon_info = CreateIconInfoWithBitmap(kIconSizeSmall, SK_ColorRED); - icon_info.url = GURL(kAppIconURL1); - - icon_info = CreateIconInfoWithBitmap(kIconSizeLarge, SK_ColorBLUE); - icon_info.url = GURL(kAppIconURL2); - - icon_info = CreateIconInfoWithBitmap(kIconSizeGigantor, SK_ColorBLACK); - icon_info.url = GURL(kAppIconURL3); + std::vector<BitmapAndSource> downloaded; // Now run the resizing and generation. SkColor generated_icon_color = SK_ColorTRANSPARENT; - std::map<int, web_app::BitmapAndSource> size_map = - ResizeIconsAndGenerateMissing(downloaded, TestSizesToGenerate(), GURL(), - &generated_icon_color); + std::map<int, BitmapAndSource> size_map = ResizeIconsAndGenerateMissing( + downloaded, TestSizesToGenerate(), GURL(), &generated_icon_color); // Expect all icons to be generated. ValidateIconsGeneratedAndResizedCorrectly(downloaded, size_map, @@ -376,25 +310,18 @@ } TEST(WebAppIconGeneratorTest, IconResizedFromLargerAndSmaller) { - std::vector<web_app::BitmapAndSource> downloaded; + std::vector<BitmapAndSource> downloaded; // Pretend the huge icon wasn't downloaded but two smaller ones were. - IconInfo icon_info = CreateIconInfoWithBitmap(kIconSizeTiny, SK_ColorRED); - icon_info.url = GURL(kAppIconURL1); - downloaded.push_back(web_app::BitmapAndSource(icon_info.url, icon_info.data)); - - icon_info = CreateIconInfoWithBitmap(kIconSizeMedium, SK_ColorBLUE); - icon_info.url = GURL(kAppIconURL2); - downloaded.push_back(web_app::BitmapAndSource(icon_info.url, icon_info.data)); - - icon_info = CreateIconInfoWithBitmap(kIconSizeGigantor, SK_ColorBLACK); - icon_info.url = GURL(kAppIconURL3); + downloaded.push_back( + CreateSquareIcon(GURL(kAppIconURL1), kIconSizeTiny, SK_ColorRED)); + downloaded.push_back( + CreateSquareIcon(GURL(kAppIconURL2), kIconSizeMedium, SK_ColorBLUE)); // Now run the resizing and generation. SkColor generated_icon_color = SK_ColorTRANSPARENT; - std::map<int, web_app::BitmapAndSource> size_map = - ResizeIconsAndGenerateMissing(downloaded, TestSizesToGenerate(), GURL(), - &generated_icon_color); + std::map<int, BitmapAndSource> size_map = ResizeIconsAndGenerateMissing( + downloaded, TestSizesToGenerate(), GURL(), &generated_icon_color); // Expect no icons to be generated, but the LARGE and SMALL icons to be // resized from the MEDIUM icon.
diff --git a/chrome/browser/web_applications/extensions/pending_bookmark_app_manager.cc b/chrome/browser/web_applications/extensions/pending_bookmark_app_manager.cc index 7fbb915..67f1fea 100644 --- a/chrome/browser/web_applications/extensions/pending_bookmark_app_manager.cc +++ b/chrome/browser/web_applications/extensions/pending_bookmark_app_manager.cc
@@ -9,10 +9,11 @@ #include <utility> #include <vector> +#include "base/threading/thread_task_runner_handle.h" #include "chrome/browser/profiles/profile.h" #include "chrome/browser/web_applications/extensions/bookmark_app_shortcut_installation_task.h" -#include "content/public/browser/web_contents.h" #include "content/public/browser/navigation_controller.h" +#include "content/public/browser/web_contents.h" namespace extensions { @@ -33,6 +34,15 @@ } // namespace +struct PendingBookmarkAppManager::Installation { + Installation(AppInfo info, InstallCallback callback) + : info(std::move(info)), callback(std::move(callback)) {} + ~Installation() = default; + + AppInfo info; + InstallCallback callback; +}; + PendingBookmarkAppManager::PendingBookmarkAppManager(Profile* profile) : profile_(profile), web_contents_factory_(base::BindRepeating(&WebContentsCreateWrapper)), @@ -42,22 +52,25 @@ void PendingBookmarkAppManager::Install(AppInfo app_to_install, InstallCallback callback) { - // The app is already being installed. - if (current_install_info_ && *current_install_info_ == app_to_install) { + // Check that we are not already installing the same app. + if (current_installation_ && current_installation_->info == app_to_install) { std::move(callback).Run(std::string()); return; } + for (const auto& installation : installation_queue_) { + if (installation->info == app_to_install) { + std::move(callback).Run(std::string()); + return; + } + } - current_install_info_ = std::make_unique<AppInfo>(std::move(app_to_install)); - current_install_callback_ = std::move(callback); + installation_queue_.push_back(std::make_unique<Installation>( + std::move(app_to_install), std::move(callback))); - CreateWebContentsIfNecessary(); - Observe(web_contents_.get()); - - content::NavigationController::LoadURLParams load_params( - current_install_info_->url); - load_params.transition_type = ui::PAGE_TRANSITION_GENERATED; - web_contents_->GetController().LoadURLWithParams(load_params); + base::ThreadTaskRunnerHandle::Get()->PostTask( + FROM_HERE, + base::BindOnce(&PendingBookmarkAppManager::MaybeStartNextInstallation, + weak_ptr_factory_.GetWeakPtr())); } void PendingBookmarkAppManager::ProcessAppOperations( @@ -70,11 +83,53 @@ task_factory_ = std::move(task_factory); } +void PendingBookmarkAppManager::MaybeStartNextInstallation() { + if (current_installation_) + return; + + if (installation_queue_.empty()) { + web_contents_.reset(); + return; + } + + current_installation_ = std::move(installation_queue_.front()); + installation_queue_.pop_front(); + + CreateWebContentsIfNecessary(); + Observe(web_contents_.get()); + + content::NavigationController::LoadURLParams load_params( + current_installation_->info.url); + load_params.transition_type = ui::PAGE_TRANSITION_GENERATED; + web_contents_->GetController().LoadURLWithParams(load_params); +} + void PendingBookmarkAppManager::CreateWebContentsIfNecessary() { if (!web_contents_) web_contents_ = web_contents_factory_.Run(profile_); } +void PendingBookmarkAppManager::OnInstalled( + BookmarkAppInstallationTask::Result result) { + CurrentInstallationFinished(result.app_id); +} + +void PendingBookmarkAppManager::CurrentInstallationFinished( + const std::string& app_id) { + // Post a task to avoid reentrancy issues e.g. adding a WebContentsObserver + // while a previous observer call is being executed. Post a task before + // running the callback in case the callback tries to install another + // app. + base::ThreadTaskRunnerHandle::Get()->PostTask( + FROM_HERE, + base::BindOnce(&PendingBookmarkAppManager::MaybeStartNextInstallation, + weak_ptr_factory_.GetWeakPtr())); + + std::unique_ptr<Installation> installation; + installation.swap(current_installation_); + std::move(installation->callback).Run(app_id); +} + void PendingBookmarkAppManager::DidFinishLoad( content::RenderFrameHost* render_frame_host, const GURL& validated_url) { @@ -82,8 +137,8 @@ return; } - if (validated_url != current_install_info_->url) { - std::move(current_install_callback_).Run(std::string()); + if (validated_url != current_installation_->info.url) { + CurrentInstallationFinished(std::string()); return; } @@ -110,21 +165,7 @@ } Observe(nullptr); - // TODO(crbug.com/864904): Only destroy the WebContents if there are no - // queued installation requests. - web_contents_.reset(); - current_install_info_.reset(); - - std::move(current_install_callback_).Run(std::string()); -} - -void PendingBookmarkAppManager::OnInstalled( - BookmarkAppInstallationTask::Result result) { - // TODO(crbug.com/864904): Only destroy the WebContents if there are no - // queued installation requests. - web_contents_.reset(); - current_install_info_.reset(); - std::move(current_install_callback_).Run(result.app_id); + CurrentInstallationFinished(std::string()); } } // namespace extensions
diff --git a/chrome/browser/web_applications/extensions/pending_bookmark_app_manager.h b/chrome/browser/web_applications/extensions/pending_bookmark_app_manager.h index a0b00f0..ca2b1be 100644 --- a/chrome/browser/web_applications/extensions/pending_bookmark_app_manager.h +++ b/chrome/browser/web_applications/extensions/pending_bookmark_app_manager.h
@@ -5,11 +5,14 @@ #ifndef CHROME_BROWSER_WEB_APPLICATIONS_EXTENSIONS_PENDING_BOOKMARK_APP_MANAGER_H_ #define CHROME_BROWSER_WEB_APPLICATIONS_EXTENSIONS_PENDING_BOOKMARK_APP_MANAGER_H_ +#include <deque> #include <memory> +#include <string> #include <vector> #include "base/callback.h" #include "base/macros.h" +#include "base/memory/weak_ptr.h" #include "chrome/browser/web_applications/components/pending_app_manager.h" #include "chrome/browser/web_applications/extensions/bookmark_app_installation_task.h" #include "content/public/browser/web_contents_observer.h" @@ -50,6 +53,16 @@ TaskFactory task_factory); private: + struct Installation; + + void MaybeStartNextInstallation(); + + void CreateWebContentsIfNecessary(); + + void OnInstalled(BookmarkAppInstallationTask::Result result); + + void CurrentInstallationFinished(const std::string& app_id); + // WebContentsObserver void DidFinishLoad(content::RenderFrameHost* render_frame_host, const GURL& validated_url) override; @@ -58,10 +71,6 @@ int error_code, const base::string16& error_description) override; - void OnInstalled(BookmarkAppInstallationTask::Result result); - - void CreateWebContentsIfNecessary(); - Profile* profile_; WebContentsFactory web_contents_factory_; @@ -69,10 +78,13 @@ std::unique_ptr<content::WebContents> web_contents_; - InstallCallback current_install_callback_; - std::unique_ptr<AppInfo> current_install_info_; + std::unique_ptr<Installation> current_installation_; std::unique_ptr<BookmarkAppInstallationTask> current_installation_task_; + std::deque<std::unique_ptr<Installation>> installation_queue_; + + base::WeakPtrFactory<PendingBookmarkAppManager> weak_ptr_factory_{this}; + DISALLOW_COPY_AND_ASSIGN(PendingBookmarkAppManager); };
diff --git a/chrome/browser/web_applications/extensions/pending_bookmark_app_manager_unittest.cc b/chrome/browser/web_applications/extensions/pending_bookmark_app_manager_unittest.cc index b808e8f..9333981 100644 --- a/chrome/browser/web_applications/extensions/pending_bookmark_app_manager_unittest.cc +++ b/chrome/browser/web_applications/extensions/pending_bookmark_app_manager_unittest.cc
@@ -12,6 +12,7 @@ #include "base/callback.h" #include "base/macros.h" #include "base/optional.h" +#include "base/test/bind_test_util.h" #include "chrome/browser/extensions/test_extension_system.h" #include "chrome/browser/web_applications/components/pending_app_manager.h" #include "chrome/browser/web_applications/extensions/bookmark_app_shortcut_installation_task.h" @@ -24,8 +25,21 @@ namespace { -const char kWebAppUrl[] = "https://foo.example"; -const char kWrongUrl[] = "https://bar.example"; +const char kFooWebAppUrl[] = "https://foo.example"; +const char kBarWebAppUrl[] = "https://bar.example"; + +const char kWrongUrl[] = "https://foobar.example"; + +web_app::PendingAppManager::AppInfo GetFooAppInfo() { + return web_app::PendingAppManager::AppInfo( + GURL(kFooWebAppUrl), web_app::PendingAppManager::LaunchContainer::kTab); +} + +web_app::PendingAppManager::AppInfo GetBarAppInfo() { + return web_app::PendingAppManager::AppInfo( + GURL(kBarWebAppUrl), + web_app::PendingAppManager::LaunchContainer::kWindow); +} } // namespace @@ -56,7 +70,17 @@ class PendingBookmarkAppManagerTest : public ChromeRenderViewHostTestHarness { public: - PendingBookmarkAppManagerTest() = default; + PendingBookmarkAppManagerTest() + : test_web_contents_creator_(base::BindRepeating( + &PendingBookmarkAppManagerTest::CreateTestWebContents, + base::Unretained(this))), + successful_installation_task_creator_(base::BindRepeating( + &PendingBookmarkAppManagerTest::CreateSuccessfulInstallationTask, + base::Unretained(this))), + failing_installation_task_creator_(base::BindRepeating( + &PendingBookmarkAppManagerTest::CreateFailingInstallationTask, + base::Unretained(this))) {} + ~PendingBookmarkAppManagerTest() override = default; void SetUp() override { @@ -97,6 +121,21 @@ protected: void ResetResults() { install_succeeded_ = base::nullopt; } + const PendingBookmarkAppManager::WebContentsFactory& + test_web_contents_creator() { + return test_web_contents_creator_; + } + + const PendingBookmarkAppManager::TaskFactory& + successful_installation_task_creator() { + return successful_installation_task_creator_; + } + + const PendingBookmarkAppManager::TaskFactory& + failing_installation_task_creator() { + return failing_installation_task_creator_; + } + content::WebContentsTester* web_contents_tester() { return web_contents_tester_; } @@ -107,75 +146,152 @@ content::WebContentsTester* web_contents_tester_ = nullptr; base::Optional<bool> install_succeeded_; + PendingBookmarkAppManager::WebContentsFactory test_web_contents_creator_; + PendingBookmarkAppManager::TaskFactory successful_installation_task_creator_; + PendingBookmarkAppManager::TaskFactory failing_installation_task_creator_; + DISALLOW_COPY_AND_ASSIGN(PendingBookmarkAppManagerTest); }; TEST_F(PendingBookmarkAppManagerTest, Install_Succeeds) { PendingBookmarkAppManager pending_app_manager(profile()); pending_app_manager.SetFactoriesForTesting( - base::BindRepeating(&PendingBookmarkAppManagerTest::CreateTestWebContents, - base::Unretained(this)), - base::BindRepeating( - &PendingBookmarkAppManagerTest::CreateSuccessfulInstallationTask, - base::Unretained(this))); + test_web_contents_creator(), successful_installation_task_creator()); pending_app_manager.Install( - web_app::PendingAppManager::AppInfo( - GURL(kWebAppUrl), web_app::PendingAppManager::LaunchContainer::kTab), + GetFooAppInfo(), base::BindOnce(&PendingBookmarkAppManagerTest::InstallCallback, base::Unretained(this))); - web_contents_tester()->NavigateAndCommit(GURL(kWebAppUrl)); - web_contents_tester()->TestDidFinishLoad(GURL(kWebAppUrl)); + + base::RunLoop().RunUntilIdle(); + web_contents_tester()->NavigateAndCommit(GURL(kFooWebAppUrl)); + web_contents_tester()->TestDidFinishLoad(GURL(kFooWebAppUrl)); EXPECT_TRUE(install_succeeded()); } TEST_F(PendingBookmarkAppManagerTest, Install_SucceedsTwice) { PendingBookmarkAppManager pending_app_manager(profile()); pending_app_manager.SetFactoriesForTesting( - base::BindRepeating(&PendingBookmarkAppManagerTest::CreateTestWebContents, - base::Unretained(this)), - base::BindRepeating( - &PendingBookmarkAppManagerTest::CreateSuccessfulInstallationTask, - base::Unretained(this))); + test_web_contents_creator(), successful_installation_task_creator()); pending_app_manager.Install( - web_app::PendingAppManager::AppInfo( - GURL(kWebAppUrl), web_app::PendingAppManager::LaunchContainer::kTab), + GetFooAppInfo(), base::BindOnce(&PendingBookmarkAppManagerTest::InstallCallback, base::Unretained(this))); - web_contents_tester()->NavigateAndCommit(GURL(kWebAppUrl)); - web_contents_tester()->TestDidFinishLoad(GURL(kWebAppUrl)); + + base::RunLoop().RunUntilIdle(); + web_contents_tester()->NavigateAndCommit(GURL(kFooWebAppUrl)); + web_contents_tester()->TestDidFinishLoad(GURL(kFooWebAppUrl)); EXPECT_TRUE(install_succeeded()); ResetResults(); pending_app_manager.Install( - web_app::PendingAppManager::AppInfo( - GURL(kWebAppUrl), web_app::PendingAppManager::LaunchContainer::kTab), + GetBarAppInfo(), base::BindOnce(&PendingBookmarkAppManagerTest::InstallCallback, base::Unretained(this))); - web_contents_tester()->NavigateAndCommit(GURL(kWebAppUrl)); - web_contents_tester()->TestDidFinishLoad(GURL(kWebAppUrl)); + + base::RunLoop().RunUntilIdle(); + web_contents_tester()->NavigateAndCommit(GURL(kBarWebAppUrl)); + web_contents_tester()->TestDidFinishLoad(GURL(kBarWebAppUrl)); + EXPECT_TRUE(install_succeeded()); +} + +TEST_F(PendingBookmarkAppManagerTest, Install_PendingSuccessfulTask) { + PendingBookmarkAppManager pending_app_manager(profile()); + pending_app_manager.SetFactoriesForTesting( + test_web_contents_creator(), successful_installation_task_creator()); + + pending_app_manager.Install( + GetFooAppInfo(), + base::BindOnce(&PendingBookmarkAppManagerTest::InstallCallback, + base::Unretained(this))); + pending_app_manager.Install( + GetBarAppInfo(), + base::BindOnce(&PendingBookmarkAppManagerTest::InstallCallback, + base::Unretained(this))); + + // Finish the first install. + base::RunLoop().RunUntilIdle(); + web_contents_tester()->NavigateAndCommit(GURL(kFooWebAppUrl)); + web_contents_tester()->TestDidFinishLoad(GURL(kFooWebAppUrl)); + EXPECT_TRUE(install_succeeded()); + ResetResults(); + + // Finish the second install. + base::RunLoop().RunUntilIdle(); + web_contents_tester()->NavigateAndCommit(GURL(kBarWebAppUrl)); + web_contents_tester()->TestDidFinishLoad(GURL(kBarWebAppUrl)); + EXPECT_TRUE(install_succeeded()); +} + +TEST_F(PendingBookmarkAppManagerTest, Install_PendingFailingTask) { + PendingBookmarkAppManager pending_app_manager(profile()); + pending_app_manager.SetFactoriesForTesting( + test_web_contents_creator(), successful_installation_task_creator()); + + pending_app_manager.Install( + GetFooAppInfo(), + base::BindOnce(&PendingBookmarkAppManagerTest::InstallCallback, + base::Unretained(this))); + pending_app_manager.Install( + GetBarAppInfo(), + base::BindOnce(&PendingBookmarkAppManagerTest::InstallCallback, + base::Unretained(this))); + + // Fail the first install. + base::RunLoop().RunUntilIdle(); + web_contents_tester()->NavigateAndCommit(GURL(kBarWebAppUrl)); + web_contents_tester()->TestDidFinishLoad(GURL(kBarWebAppUrl)); + EXPECT_FALSE(install_succeeded()); + ResetResults(); + + // Finish the second install. + base::RunLoop().RunUntilIdle(); + web_contents_tester()->NavigateAndCommit(GURL(kBarWebAppUrl)); + web_contents_tester()->TestDidFinishLoad(GURL(kBarWebAppUrl)); + EXPECT_TRUE(install_succeeded()); +} + +TEST_F(PendingBookmarkAppManagerTest, Install_ReentrantCallback) { + PendingBookmarkAppManager pending_app_manager(profile()); + pending_app_manager.SetFactoriesForTesting( + test_web_contents_creator(), successful_installation_task_creator()); + + // Call install with a callback that tries to install another app. + pending_app_manager.Install( + GetFooAppInfo(), + base::BindLambdaForTesting([&](const std::string& app_id) { + InstallCallback(app_id); + pending_app_manager.Install( + GetBarAppInfo(), + base::BindOnce(&PendingBookmarkAppManagerTest::InstallCallback, + base::Unretained(this))); + })); + // Finish the first install. + base::RunLoop().RunUntilIdle(); + web_contents_tester()->NavigateAndCommit(GURL(kFooWebAppUrl)); + web_contents_tester()->TestDidFinishLoad(GURL(kFooWebAppUrl)); + EXPECT_TRUE(install_succeeded()); + ResetResults(); + + base::RunLoop().RunUntilIdle(); + web_contents_tester()->NavigateAndCommit(GURL(kBarWebAppUrl)); + web_contents_tester()->TestDidFinishLoad(GURL(kBarWebAppUrl)); EXPECT_TRUE(install_succeeded()); } TEST_F(PendingBookmarkAppManagerTest, Install_FailsSameInstallPending) { PendingBookmarkAppManager pending_app_manager(profile()); pending_app_manager.SetFactoriesForTesting( - base::BindRepeating(&PendingBookmarkAppManagerTest::CreateTestWebContents, - base::Unretained(this)), - base::BindRepeating( - &PendingBookmarkAppManagerTest::CreateSuccessfulInstallationTask, - base::Unretained(this))); + test_web_contents_creator(), successful_installation_task_creator()); pending_app_manager.Install( - web_app::PendingAppManager::AppInfo( - GURL(kWebAppUrl), web_app::PendingAppManager::LaunchContainer::kTab), + GetFooAppInfo(), base::BindOnce(&PendingBookmarkAppManagerTest::InstallCallback, base::Unretained(this))); pending_app_manager.Install( - web_app::PendingAppManager::AppInfo( - GURL(kWebAppUrl), web_app::PendingAppManager::LaunchContainer::kTab), + GetFooAppInfo(), base::BindOnce(&PendingBookmarkAppManagerTest::InstallCallback, base::Unretained(this))); @@ -184,26 +300,23 @@ ResetResults(); // The original install should still be able to succeed. - web_contents_tester()->NavigateAndCommit(GURL(kWebAppUrl)); - web_contents_tester()->TestDidFinishLoad(GURL(kWebAppUrl)); + base::RunLoop().RunUntilIdle(); + web_contents_tester()->NavigateAndCommit(GURL(kFooWebAppUrl)); + web_contents_tester()->TestDidFinishLoad(GURL(kFooWebAppUrl)); EXPECT_TRUE(install_succeeded()); } TEST_F(PendingBookmarkAppManagerTest, Install_FailsLoadIncorrectURL) { PendingBookmarkAppManager pending_app_manager(profile()); pending_app_manager.SetFactoriesForTesting( - base::BindRepeating(&PendingBookmarkAppManagerTest::CreateTestWebContents, - base::Unretained(this)), - base::BindRepeating( - &PendingBookmarkAppManagerTest::CreateSuccessfulInstallationTask, - base::Unretained(this))); + test_web_contents_creator(), successful_installation_task_creator()); pending_app_manager.Install( - web_app::PendingAppManager::AppInfo( - GURL(kWebAppUrl), web_app::PendingAppManager::LaunchContainer::kTab), + GetFooAppInfo(), base::BindOnce(&PendingBookmarkAppManagerTest::InstallCallback, base::Unretained(this))); + base::RunLoop().RunUntilIdle(); web_contents_tester()->NavigateAndCommit(GURL(kWrongUrl)); web_contents_tester()->TestDidFinishLoad(GURL(kWrongUrl)); EXPECT_FALSE(install_succeeded());
diff --git a/chrome/browser/webauthn/authenticator_request_dialog_model.cc b/chrome/browser/webauthn/authenticator_request_dialog_model.cc index 4db12b9..ae64ce49 100644 --- a/chrome/browser/webauthn/authenticator_request_dialog_model.cc +++ b/chrome/browser/webauthn/authenticator_request_dialog_model.cc
@@ -73,11 +73,17 @@ DCHECK_EQ(current_step(), Step::kUsbInsertAndActivateOnRegister); } -void AuthenticatorRequestDialogModel::Cancel() {} +void AuthenticatorRequestDialogModel::Cancel() { + for (auto& observer : observers_) + observer.OnCancelRequest(); +} void AuthenticatorRequestDialogModel::Back() { - // For now, return to the initial step all the time. - SetCurrentStep(Step::kInitial); + if (current_step() == Step::kInitial) { + Cancel(); + } else { + SetCurrentStep(Step::kInitial); + } } void AuthenticatorRequestDialogModel::AddObserver(Observer* observer) {
diff --git a/chrome/browser/webauthn/authenticator_request_dialog_model.h b/chrome/browser/webauthn/authenticator_request_dialog_model.h index dfc02cf..fbc545d 100644 --- a/chrome/browser/webauthn/authenticator_request_dialog_model.h +++ b/chrome/browser/webauthn/authenticator_request_dialog_model.h
@@ -71,6 +71,10 @@ // Called when the UX flow has navigated to a different step, so the UI // should update. virtual void OnStepTransition() {} + + // Called when the user cancelled WebAuthN request by clicking the + // "cancel" button or the back arrow in the UI dialog. + virtual void OnCancelRequest() {} }; AuthenticatorRequestDialogModel();
diff --git a/chrome/browser/webauthn/chrome_authenticator_request_delegate.cc b/chrome/browser/webauthn/chrome_authenticator_request_delegate.cc index 65c82ef..7e873ca 100644 --- a/chrome/browser/webauthn/chrome_authenticator_request_delegate.cc +++ b/chrome/browser/webauthn/chrome_authenticator_request_delegate.cc
@@ -123,6 +123,14 @@ } } +base::Optional<device::FidoTransportProtocol> +ChromeAuthenticatorRequestDelegate::GetLastTransportUsed() const { + PrefService* prefs = + Profile::FromBrowserContext(browser_context())->GetPrefs(); + return device::ConvertToFidoTransportProtocol( + prefs->GetString(kWebAuthnLastTransportUsedPrefName)); +} + base::WeakPtr<ChromeAuthenticatorRequestDelegate> ChromeAuthenticatorRequestDelegate::AsWeakPtr() { return weak_ptr_factory_.GetWeakPtr(); @@ -134,7 +142,8 @@ ->GetBrowserContext(); } -void ChromeAuthenticatorRequestDelegate::DidStartRequest() { +void ChromeAuthenticatorRequestDelegate::DidStartRequest( + base::OnceClosure cancel_callback) { #if !defined(OS_ANDROID) if (!IsWebAuthnUiEnabled()) return; @@ -143,6 +152,7 @@ weak_dialog_model_ = dialog_model.get(); SetInitialUiModelBasedOnPreviouslyUsedTransport(weak_dialog_model_, GetLastTransportUsed()); + cancel_callback_ = std::move(cancel_callback); weak_dialog_model_->AddObserver(this); ShowAuthenticatorRequestDialog( @@ -248,21 +258,12 @@ } #endif -base::Optional<device::FidoTransportProtocol> -ChromeAuthenticatorRequestDelegate::GetLastTransportUsed() const { +void ChromeAuthenticatorRequestDelegate::UpdateLastTransportUsed( + device::FidoTransportProtocol transport) { PrefService* prefs = Profile::FromBrowserContext(browser_context())->GetPrefs(); - return device::ConvertToFidoTransportProtocol( - prefs->GetString(kWebAuthnLastTransportUsedPrefName)); -} - -void ChromeAuthenticatorRequestDelegate::BluetoothAdapterIsAvailable() { - if (!IsWebAuthnUiEnabled()) - return; - - DCHECK(weak_dialog_model_); - weak_dialog_model_->transport_list_model()->AppendTransport( - AuthenticatorTransport::kBluetoothLowEnergy); + prefs->SetString(kWebAuthnLastTransportUsedPrefName, + device::ToString(transport)); } void ChromeAuthenticatorRequestDelegate::FidoAuthenticatorAdded( @@ -271,19 +272,8 @@ return; DCHECK(weak_dialog_model_); - - // We are only caching device information for BLE and platform authenticators. - const auto transport = authenticator.AuthenticatorTransport(); - if (transport == device::FidoTransportProtocol::kInternal || - transport == device::FidoTransportProtocol::kBluetoothLowEnergy) { - if (transport == device::FidoTransportProtocol::kInternal) { - weak_dialog_model_->transport_list_model()->AppendTransport( - AuthenticatorTransport::kInternal); - } - - weak_dialog_model_->saved_authenticators().emplace_back( - authenticator.GetId(), authenticator.AuthenticatorTransport()); - } + weak_dialog_model_->saved_authenticators().emplace_back( + authenticator.GetId(), authenticator.AuthenticatorTransport()); } void ChromeAuthenticatorRequestDelegate::FidoAuthenticatorRemoved( @@ -294,25 +284,21 @@ DCHECK(weak_dialog_model_); auto& saved_authenticators = weak_dialog_model_->saved_authenticators(); saved_authenticators.erase( - std::remove_if( - saved_authenticators.begin(), saved_authenticators.end(), - [device_id](const auto& authenticator_reference) { - return authenticator_reference.transport == - device::FidoTransportProtocol::kBluetoothLowEnergy && - authenticator_reference.device_id == device_id; - }), + std::remove_if(saved_authenticators.begin(), saved_authenticators.end(), + [device_id](const auto& authenticator_reference) { + return authenticator_reference.device_id == device_id; + }), saved_authenticators.end()); } -void ChromeAuthenticatorRequestDelegate::UpdateLastTransportUsed( - device::FidoTransportProtocol transport) { - PrefService* prefs = - Profile::FromBrowserContext(browser_context())->GetPrefs(); - prefs->SetString(kWebAuthnLastTransportUsedPrefName, - device::ToString(transport)); -} - void ChromeAuthenticatorRequestDelegate::OnModelDestroyed() { DCHECK(weak_dialog_model_); weak_dialog_model_ = nullptr; } + +void ChromeAuthenticatorRequestDelegate::OnCancelRequest() { + // |cancel_callback_| must be invoked at most once as invocation of + // |cancel_callback_| will destroy |this|. + DCHECK(cancel_callback_); + std::move(cancel_callback_).Run(); +}
diff --git a/chrome/browser/webauthn/chrome_authenticator_request_delegate.h b/chrome/browser/webauthn/chrome_authenticator_request_delegate.h index 962da65..c16d8db3 100644 --- a/chrome/browser/webauthn/chrome_authenticator_request_delegate.h +++ b/chrome/browser/webauthn/chrome_authenticator_request_delegate.h
@@ -7,6 +7,7 @@ #include <string> +#include "base/callback.h" #include "base/gtest_prod_util.h" #include "base/memory/weak_ptr.h" #include "base/optional.h" @@ -62,25 +63,28 @@ content::BrowserContext* browser_context() const; // content::AuthenticatorRequestClientDelegate: - void DidStartRequest() override; + void DidStartRequest(base::OnceClosure cancel_callback) override; bool ShouldPermitIndividualAttestation( const std::string& relying_party_id) override; void ShouldReturnAttestation( const std::string& relying_party_id, base::OnceCallback<void(bool)> callback) override; bool IsFocused() override; - void BluetoothAdapterIsAvailable() override; - void FidoAuthenticatorAdded( - const device::FidoAuthenticator& authenticator) override; - void FidoAuthenticatorRemoved(base::StringPiece device_id) override; void UpdateLastTransportUsed( device::FidoTransportProtocol transport) override; + // device::FidoRequestHandlerBase::TransportAvailabilityObserver: + void FidoAuthenticatorAdded( + const device::FidoAuthenticator& authenticator) override; + void FidoAuthenticatorRemoved(base::StringPiece device_id) override; + // AuthenticatorRequestDialogModel::Observer: void OnModelDestroyed() override; + void OnCancelRequest() override; content::RenderFrameHost* const render_frame_host_; AuthenticatorRequestDialogModel* weak_dialog_model_ = nullptr; + base::OnceClosure cancel_callback_; base::WeakPtrFactory<ChromeAuthenticatorRequestDelegate> weak_ptr_factory_;
diff --git a/chrome/chrome_cleaner/test/resources/BUILD.gn b/chrome/chrome_cleaner/test/resources/BUILD.gn index f363a360..bb3b6660 100644 --- a/chrome/chrome_cleaner/test/resources/BUILD.gn +++ b/chrome/chrome_cleaner/test/resources/BUILD.gn
@@ -46,7 +46,7 @@ grit_flags = [ "-E", - "generated_resources_dir=" + rebase_path(target_gen_dir), + "generated_resources_dir=" + rebase_path(target_gen_dir, root_build_dir), ] deps = [
diff --git a/chrome/chrome_repack_locales.gni b/chrome/chrome_repack_locales.gni index d2a02989..edc5f97d 100644 --- a/chrome/chrome_repack_locales.gni +++ b/chrome/chrome_repack_locales.gni
@@ -30,6 +30,7 @@ "${root_gen_dir}/components/strings/components_strings_", "${root_gen_dir}/content/app/strings/content_strings_", "${root_gen_dir}/device/bluetooth/strings/bluetooth_strings_", + "${root_gen_dir}/device/fido/strings/fido_strings_", "${root_gen_dir}/third_party/libaddressinput/address_input_strings_", "${root_gen_dir}/ui/strings/app_locale_settings_", "${root_gen_dir}/ui/strings/ui_strings_", @@ -45,6 +46,7 @@ "//components/strings:components_strings", "//content/app/strings", "//device/bluetooth/strings", + "//device/fido/strings", "//third_party/libaddressinput:strings", "//ui/strings:app_locale_settings", "//ui/strings:ui_strings",
diff --git a/chrome/common/extensions/api/automation.idl b/chrome/common/extensions/api/automation.idl index b2051bc..e06bd4d6 100644 --- a/chrome/common/extensions/api/automation.idl +++ b/chrome/common/extensions/api/automation.idl
@@ -854,6 +854,9 @@ // 'false' | 'true' | 'mixed' DOMString? checked; + // The inner html of this element. Only populated for math content. + DOMString? innerHtml; + // The RGBA foreground color of this subtree, as an integer. long? color;
diff --git a/chrome/common/extensions/api/speech/tts_engine_manifest_handler.cc b/chrome/common/extensions/api/speech/tts_engine_manifest_handler.cc index ba0bf6a..2ab20f0 100644 --- a/chrome/common/extensions/api/speech/tts_engine_manifest_handler.cc +++ b/chrome/common/extensions/api/speech/tts_engine_manifest_handler.cc
@@ -8,7 +8,6 @@ #include <memory> -#include "base/metrics/histogram_macros.h" #include "base/strings/string_number_conversions.h" #include "base/strings/utf_string_conversions.h" #include "base/values.h" @@ -68,8 +67,6 @@ return false; } } - UMA_HISTOGRAM_BOOLEAN("TextToSpeechEngine.ParseVoice.HasGender", - !voice_data.gender.empty()); if (one_tts_voice->HasKey(keys::kTtsVoicesRemote)) { if (!one_tts_voice->GetBoolean( keys::kTtsVoicesRemote, &voice_data.remote)) {
diff --git a/chrome/common/pref_names.cc b/chrome/common/pref_names.cc index 968214d5..6f6c9e10 100644 --- a/chrome/common/pref_names.cc +++ b/chrome/common/pref_names.cc
@@ -1082,6 +1082,7 @@ // Profile avatar and name const char kProfileAvatarIndex[] = "profile.avatar_index"; +const char kProfileLocalAvatarIndex[] = "profile.local_avatar_index"; const char kProfileName[] = "profile.name"; // Whether a profile is using a default avatar name (eg. Pickles or Person 1) // because it was randomly assigned at profile creation time.
diff --git a/chrome/common/pref_names.h b/chrome/common/pref_names.h index 77c2961..1071b02 100644 --- a/chrome/common/pref_names.h +++ b/chrome/common/pref_names.h
@@ -360,6 +360,7 @@ extern const char kImportDialogSearchEngine[]; extern const char kProfileAvatarIndex[]; +extern const char kProfileLocalAvatarIndex[]; extern const char kProfileUsingDefaultName[]; extern const char kProfileName[]; extern const char kProfileUsingDefaultAvatar[];
diff --git a/chrome/common/search/ntp_logging_events.h b/chrome/common/search/ntp_logging_events.h index 15c98fa..198ec3d 100644 --- a/chrome/common/search/ntp_logging_events.h +++ b/chrome/common/search/ntp_logging_events.h
@@ -113,18 +113,22 @@ // 'Done' was clicked in the 'Upload an image' dialog. NTP_CUSTOMIZE_LOCAL_IMAGE_DONE = 52, - // 'Remove' was clicked in the 'Edit shortcut' dialog. + // A custom shortcut was removed. NTP_CUSTOMIZE_SHORTCUT_REMOVE = 53, // 'Cancel' was clicked in the 'Edit shortcut' dialog. NTP_CUSTOMIZE_SHORTCUT_CANCEL = 54, // 'Done' was clicked in the 'Edit shortcut' dialog. NTP_CUSTOMIZE_SHORTCUT_DONE = 55, - // 'Undo' was clicked in the message pop-up. + // A custom shortcut action was undone. NTP_CUSTOMIZE_SHORTCUT_UNDO = 56, - // 'Restore default shortcuts' was clicked in the message pop-up. + // All custom shortcuts were restored. NTP_CUSTOMIZE_SHORTCUT_RESTORE_ALL = 57, + // A custom shortcut was added. + NTP_CUSTOMIZE_SHORTCUT_ADD = 58, + // A custom shortcut was updated. + NTP_CUSTOMIZE_SHORTCUT_UPDATE = 59, - NTP_EVENT_TYPE_LAST = NTP_CUSTOMIZE_SHORTCUT_RESTORE_ALL + NTP_EVENT_TYPE_LAST = NTP_CUSTOMIZE_SHORTCUT_UPDATE }; #endif // CHROME_COMMON_SEARCH_NTP_LOGGING_EVENTS_H_
diff --git a/chrome/renderer/extensions/file_browser_handler_custom_bindings.cc b/chrome/renderer/extensions/file_browser_handler_custom_bindings.cc index d69a814..960ebbe 100644 --- a/chrome/renderer/extensions/file_browser_handler_custom_bindings.cc +++ b/chrome/renderer/extensions/file_browser_handler_custom_bindings.cc
@@ -35,7 +35,7 @@ #if defined(OS_CHROMEOS) CHECK(args.Length() == 1); CHECK(args[0]->IsObject()); - v8::Local<v8::Object> file_def = args[0]->ToObject(); + v8::Local<v8::Object> file_def = args[0].As<v8::Object>(); v8::Isolate* isolate = args.GetIsolate(); std::string file_system_name(*v8::String::Utf8Value( isolate, @@ -48,8 +48,8 @@ file_def->Get(v8::String::NewFromUtf8(isolate, "fileFullPath")))); bool is_directory = file_def->Get(v8::String::NewFromUtf8(isolate, "fileIsDirectory")) - ->ToBoolean() - ->Value(); + ->BooleanValue(context->v8_context()) + .FromMaybe(false); blink::WebDOMFileSystem::EntryType entry_type = is_directory ? blink::WebDOMFileSystem::kEntryTypeDirectory : blink::WebDOMFileSystem::kEntryTypeFile;
diff --git a/chrome/renderer/resources/extensions/automation/automation_node.js b/chrome/renderer/resources/extensions/automation/automation_node.js index f8f3cbd6..d0823677 100644 --- a/chrome/renderer/resources/extensions/automation/automation_node.js +++ b/chrome/renderer/resources/extensions/automation/automation_node.js
@@ -946,6 +946,7 @@ 'display', 'htmlTag', 'imageDataUrl', + 'innerHtml', 'language', 'liveRelevant', 'liveStatus',
diff --git a/chrome/renderer/searchbox/searchbox_extension.cc b/chrome/renderer/searchbox/searchbox_extension.cc index 02b274a..df876cc 100644 --- a/chrome/renderer/searchbox/searchbox_extension.cc +++ b/chrome/renderer/searchbox/searchbox_extension.cc
@@ -790,6 +790,7 @@ if (ntp_tiles::IsCustomLinksEnabled() && HasOrigin(GURL(chrome::kChromeSearchMostVisitedUrl))) { search_box->DeleteCustomLink(*rid); + search_box->LogEvent(NTPLoggingEventType::NTP_CUSTOMIZE_SHORTCUT_REMOVE); } else { search_box->DeleteMostVisitedItem(*rid); } @@ -853,11 +854,13 @@ if (!gurl.is_valid() || title.empty()) return; search_box->AddCustomLink(gurl, title); + search_box->LogEvent(NTPLoggingEventType::NTP_CUSTOMIZE_SHORTCUT_ADD); } else { // Check that the URL, if provided, is valid. if (!url.empty() && !gurl.is_valid()) return; search_box->UpdateCustomLink(rid, gurl, title); + search_box->LogEvent(NTPLoggingEventType::NTP_CUSTOMIZE_SHORTCUT_UPDATE); } } @@ -866,11 +869,10 @@ if (!ntp_tiles::IsCustomLinksEnabled()) return; SearchBox* search_box = GetSearchBoxForCurrentContext(); - if (!search_box || !(HasOrigin(GURL(chrome::kChromeSearchMostVisitedUrl)) || - HasOrigin(GURL(chrome::kChromeSearchLocalNtpUrl)))) { + if (!search_box) return; - } search_box->UndoCustomLinkAction(); + search_box->LogEvent(NTPLoggingEventType::NTP_CUSTOMIZE_SHORTCUT_UNDO); } // static @@ -878,18 +880,16 @@ if (!ntp_tiles::IsCustomLinksEnabled()) return; SearchBox* search_box = GetSearchBoxForCurrentContext(); - if (!search_box || !(HasOrigin(GURL(chrome::kChromeSearchMostVisitedUrl)) || - HasOrigin(GURL(chrome::kChromeSearchLocalNtpUrl)))) { + if (!search_box) return; - } search_box->ResetCustomLinks(); + search_box->LogEvent(NTPLoggingEventType::NTP_CUSTOMIZE_SHORTCUT_RESTORE_ALL); } // static void NewTabPageBindings::LogEvent(int event) { SearchBox* search_box = GetSearchBoxForCurrentContext(); - if (!search_box || !(HasOrigin(GURL(chrome::kChromeSearchMostVisitedUrl)) || - HasOrigin(GURL(chrome::kChromeSearchLocalNtpUrl)))) { + if (!search_box) { return; } if (event <= NTP_EVENT_TYPE_LAST) @@ -964,6 +964,9 @@ search_box->SetCustomBackgroundURLWithAttributions( GURL(background_url), attribution_line_1, attribution_line_2, GURL(attribution_action_url)); + // Captures saving the background by double-clicking, or clicking 'Done'. + search_box->LogEvent( + NTPLoggingEventType::NTP_CUSTOMIZE_CHROME_BACKGROUND_DONE); } // static
diff --git a/chrome/test/BUILD.gn b/chrome/test/BUILD.gn index 5d47920..e9539bc 100644 --- a/chrome/test/BUILD.gn +++ b/chrome/test/BUILD.gn
@@ -1064,7 +1064,7 @@ "//ppapi:power_saver_test_plugin", "//remoting/webapp:browser_test_resources", "//remoting/webapp:unit_tests", - "//third_party/mesa:osmesa", + "//third_party/mesa_headers", "//third_party/widevine/cdm:widevine_test_license_server", ] @@ -3018,6 +3018,7 @@ "../browser/media/router/discovery/discovery_network_monitor_metric_observer_unittest.cc", "../browser/media/router/discovery/discovery_network_monitor_unittest.cc", "../browser/media/unified_autoplay_config_unittest.cc", + "../browser/media/webrtc/display_media_access_handler_unittest.cc", "../browser/media/webrtc/tab_desktop_media_list_unittest.cc", "../browser/media/webrtc/webrtc_event_log_manager_common_unittest.cc", "../browser/media/webrtc/webrtc_event_log_manager_unittest.cc", @@ -4913,7 +4914,7 @@ # Runtime dependencies data_deps = [ "//ppapi:ppapi_tests", - "//third_party/mesa:osmesa", + "//third_party/mesa_headers", ] if (use_aura) { @@ -5542,7 +5543,7 @@ ] data_deps = [ - "//third_party/mesa:osmesa", + "//third_party/mesa_headers", ] if (is_mac) {
diff --git a/chrome/test/android/cast_emulator/OWNERS b/chrome/test/android/cast_emulator/OWNERS deleted file mode 100644 index 42175cf1..0000000 --- a/chrome/test/android/cast_emulator/OWNERS +++ /dev/null
@@ -1,2 +0,0 @@ -aberent@chromium.org -dgn@chromium.org
diff --git a/chrome/test/base/browser_with_test_window_test.h b/chrome/test/base/browser_with_test_window_test.h index df0bf09..30256c3 100644 --- a/chrome/test/base/browser_with_test_window_test.h +++ b/chrome/test/base/browser_with_test_window_test.h
@@ -20,8 +20,7 @@ #include "ash/test/ash_test_helper.h" #include "ash/test/ash_test_views_delegate.h" #include "chrome/browser/chromeos/login/users/scoped_test_user_manager.h" -#include "chrome/browser/chromeos/settings/cros_settings.h" -#include "chrome/browser/chromeos/settings/device_settings_service.h" +#include "chrome/browser/chromeos/settings/scoped_cros_settings_test_helper.h" #else #include "ui/views/test/scoped_views_test_helper.h" #endif @@ -188,8 +187,7 @@ base::ShadowingAtExitManager at_exit_manager_; #if defined(OS_CHROMEOS) - chromeos::ScopedTestDeviceSettingsService test_device_settings_service_; - chromeos::ScopedTestCrosSettings test_cros_settings_; + chromeos::ScopedCrosSettingsTestHelper cros_settings_test_helper_; chromeos::ScopedTestUserManager test_user_manager_; #endif
diff --git a/chrome/test/base/chrome_unit_test_suite.cc b/chrome/test/base/chrome_unit_test_suite.cc index cdc9273e..ea3546d 100644 --- a/chrome/test/base/chrome_unit_test_suite.cc +++ b/chrome/test/base/chrome_unit_test_suite.cc
@@ -144,10 +144,6 @@ gl::GLSurfaceTestSupport::InitializeOneOff(); -#if defined(OS_MACOSX) - gpu::ImageTransportSurface::SetAllowOSMesaForTesting(true); -#endif - update_client::UpdateQueryParams::SetDelegate( ChromeUpdateQueryParamsDelegate::GetInstance()); }
diff --git a/chrome/test/base/interactive_ui_tests_main.cc b/chrome/test/base/interactive_ui_tests_main.cc index 69347bf..9dc1964 100644 --- a/chrome/test/base/interactive_ui_tests_main.cc +++ b/chrome/test/base/interactive_ui_tests_main.cc
@@ -39,10 +39,6 @@ void Initialize() override { ChromeTestSuite::Initialize(); -#if defined(OS_MACOSX) - gpu::ImageTransportSurface::SetAllowOSMesaForTesting(true); -#endif - // Only allow ui_controls to be used in interactive_ui_tests, since they // depend on focus and can't be sharded. ui_controls::EnableUIControls();
diff --git a/chrome/test/base/testing_profile.cc b/chrome/test/base/testing_profile.cc index 743e40d..ccdd38ae 100644 --- a/chrome/test/base/testing_profile.cc +++ b/chrome/test/base/testing_profile.cc
@@ -900,6 +900,13 @@ last_selected_directory_ = path; } +#if defined(OS_CHROMEOS) +chromeos::ScopedCrosSettingsTestHelper* +TestingProfile::ScopedCrosSettingsTestHelper() { + return scoped_cros_settings_test_helper_.get(); +} +#endif + void TestingProfile::BlockUntilHistoryProcessesPendingRequests() { history::HistoryService* history_service = HistoryServiceFactory::GetForProfile(this,
diff --git a/chrome/test/base/testing_profile.h b/chrome/test/base/testing_profile.h index 51267aa..44d0b656 100644 --- a/chrome/test/base/testing_profile.h +++ b/chrome/test/base/testing_profile.h
@@ -336,10 +336,12 @@ void SetExitType(ExitType exit_type) override {} ExitType GetLastSessionExitType() override; network::mojom::NetworkContextPtr CreateMainNetworkContext() override; + #if defined(OS_CHROMEOS) void ChangeAppLocale(const std::string&, AppLocaleChangedVia) override {} void OnLogin() override {} void InitChromeOSPreferences() override {} + chromeos::ScopedCrosSettingsTestHelper* ScopedCrosSettingsTestHelper(); #endif // defined(OS_CHROMEOS) // Schedules a task on the history backend and runs a nested loop until the
diff --git a/chrome/test/chromedriver/chrome/chrome_android_impl.cc b/chrome/test/chromedriver/chrome/chrome_android_impl.cc index e1c6bda..0a6b969 100644 --- a/chrome/test/chromedriver/chrome/chrome_android_impl.cc +++ b/chrome/test/chromedriver/chrome/chrome_android_impl.cc
@@ -64,11 +64,7 @@ } bool ChromeAndroidImpl::HasTouchScreen() const { - const BrowserInfo* browser_info = GetBrowserInfo(); - if (browser_info->browser_name == "webview") - return browser_info->major_version >= 44; - else - return browser_info->build_no >= 2388; + return true; } Status ChromeAndroidImpl::QuitImpl() {
diff --git a/chrome/test/chromedriver/chrome/frame_tracker.cc b/chrome/test/chromedriver/chrome/frame_tracker.cc index 26739627..68609da 100644 --- a/chrome/test/chromedriver/chrome/frame_tracker.cc +++ b/chrome/test/chromedriver/chrome/frame_tracker.cc
@@ -16,7 +16,7 @@ FrameTracker::FrameTracker(DevToolsClient* client, WebView* web_view, const BrowserInfo* browser_info) - : web_view_(web_view), browser_info_(browser_info) { + : web_view_(web_view) { client->AddListener(this); } @@ -60,24 +60,15 @@ frame_to_context_map_.clear(); frame_to_target_map_.clear(); // Enable target events to allow tracking iframe targets creation. - if (browser_info_->major_version == 65) { - base::DictionaryValue params; - params.SetBoolean("value", true); - Status status = client->SendCommand("Target.setAttachToFrames", params); - if (status.IsError()) - return status; - } - if (browser_info_->major_version >= 65) { - base::DictionaryValue params; - params.SetBoolean("autoAttach", true); - params.SetBoolean("waitForDebuggerOnStart", false); - Status status = client->SendCommand("Target.setAutoAttach", params); - if (status.IsError()) - return status; - } - // Enable runtime events to allow tracking execution context creation. base::DictionaryValue params; - Status status = client->SendCommand("Runtime.enable", params); + params.SetBoolean("autoAttach", true); + params.SetBoolean("waitForDebuggerOnStart", false); + Status status = client->SendCommand("Target.setAutoAttach", params); + if (status.IsError()) + return status; + // Enable runtime events to allow tracking execution context creation. + params.Clear(); + status = client->SendCommand("Runtime.enable", params); if (status.IsError()) return status; return client->SendCommand("Page.enable", params);
diff --git a/chrome/test/chromedriver/chrome/frame_tracker.h b/chrome/test/chromedriver/chrome/frame_tracker.h index 0b11843..8de025ca 100644 --- a/chrome/test/chromedriver/chrome/frame_tracker.h +++ b/chrome/test/chromedriver/chrome/frame_tracker.h
@@ -43,7 +43,6 @@ std::map<std::string, int> frame_to_context_map_; std::map<std::string, std::unique_ptr<WebView>> frame_to_target_map_; WebView* web_view_; - const BrowserInfo* browser_info_; DISALLOW_COPY_AND_ASSIGN(FrameTracker); };
diff --git a/chrome/test/chromedriver/chrome/javascript_dialog_manager.cc b/chrome/test/chromedriver/chrome/javascript_dialog_manager.cc index dce0853e..4737acc 100644 --- a/chrome/test/chromedriver/chrome/javascript_dialog_manager.cc +++ b/chrome/test/chromedriver/chrome/javascript_dialog_manager.cc
@@ -12,7 +12,7 @@ JavaScriptDialogManager::JavaScriptDialogManager( DevToolsClient* client, const BrowserInfo* browser_info) - : client_(client), browser_info_(browser_info) { + : client_(client) { client_->AddListener(this); } @@ -47,7 +47,7 @@ params.SetBoolean("accept", accept); if (text) params.SetString("promptText", *text); - else if (browser_info_->build_no >= 3175) + else params.SetString("promptText", prompt_text_); Status status = client_->SendCommand("Page.handleJavaScriptDialog", params); if (status.IsError()) { @@ -92,12 +92,9 @@ dialog_type_queue_.push_back(type); - if (browser_info_->build_no >= 3175) { - if (!params.GetString("defaultPrompt", &prompt_text_)) - return Status(kUnknownError, - "dialog event missing or invalid 'defaultPrompt'"); - } - + if (!params.GetString("defaultPrompt", &prompt_text_)) + return Status(kUnknownError, + "dialog event missing or invalid 'defaultPrompt'"); } else if (method == "Page.javascriptDialogClosed") { // Inspector only sends this event when all dialogs have been closed. // Clear the unhandled queue in case the user closed a dialog manually.
diff --git a/chrome/test/chromedriver/chrome/javascript_dialog_manager.h b/chrome/test/chromedriver/chrome/javascript_dialog_manager.h index 90d867c..2a2b95ae 100644 --- a/chrome/test/chromedriver/chrome/javascript_dialog_manager.h +++ b/chrome/test/chromedriver/chrome/javascript_dialog_manager.h
@@ -25,6 +25,7 @@ public: explicit JavaScriptDialogManager(DevToolsClient* client, const BrowserInfo* browser_info); + ~JavaScriptDialogManager() override; bool IsDialogOpen() const; @@ -43,8 +44,6 @@ private: DevToolsClient* client_; - const BrowserInfo* browser_info_; - // The queue of unhandled dialogs. This may be greater than 1 in rare // cases. E.g., if the page shows an alert but before the manager received // the event, a script was injected via Inspector that triggered an alert.
diff --git a/chrome/test/chromedriver/chrome/log.cc b/chrome/test/chromedriver/chrome/log.cc index 7977d8a..7ea41db 100644 --- a/chrome/test/chromedriver/chrome/log.cc +++ b/chrome/test/chromedriver/chrome/log.cc
@@ -25,9 +25,10 @@ AddEntryTimestamped(base::Time::Now(), level, source, message); } -namespace { +bool Log::truncate_logged_params = true; +IsVLogOnFunc Log::is_vlog_on_func = NULL; -IsVLogOnFunc g_is_vlog_on_func = NULL; +namespace { void TruncateString(std::string* data) { const size_t kMaxLength = 200; @@ -78,14 +79,10 @@ } // namespace -void InitLogging(IsVLogOnFunc is_vlog_on_func) { - g_is_vlog_on_func = is_vlog_on_func; -} - bool IsVLogOn(int vlog_level) { - if (!g_is_vlog_on_func) + if (!Log::is_vlog_on_func) return false; - return g_is_vlog_on_func(vlog_level); + return Log::is_vlog_on_func(vlog_level); } std::string PrettyPrintValue(const base::Value& value) { @@ -102,8 +99,8 @@ } std::string FormatValueForDisplay(const base::Value& value) { - std::unique_ptr<base::Value> copy(SmartDeepCopy(&value)); - return PrettyPrintValue(*copy); + return PrettyPrintValue(Log::truncate_logged_params ? *SmartDeepCopy(&value) + : value); } std::string FormatJsonForDisplay(const std::string& json) {
diff --git a/chrome/test/chromedriver/chrome/log.h b/chrome/test/chromedriver/chrome/log.h index 6bb9269..10b7cb29 100644 --- a/chrome/test/chromedriver/chrome/log.h +++ b/chrome/test/chromedriver/chrome/log.h
@@ -14,6 +14,8 @@ class Value; } +typedef bool (*IsVLogOnFunc)(int vlog_level); + // Abstract class for logging entries with a level, timestamp, string message. class Log { public: @@ -27,6 +29,9 @@ kOff }; + static bool truncate_logged_params; + static IsVLogOnFunc is_vlog_on_func; + virtual ~Log() {} // Adds an entry to the log. @@ -46,11 +51,9 @@ void AddEntry(Level level, const std::string& message); }; -typedef bool (*IsVLogOnFunc)(int vlog_level); -void InitLogging(IsVLogOnFunc is_vlog_on_func); - // Returns whether the given VLOG level is on. bool IsVLogOn(int vlog_level); +bool TruncateLoggedParams(); std::string PrettyPrintValue(const base::Value& value);
diff --git a/chrome/test/chromedriver/chrome/navigation_tracker.cc b/chrome/test/chromedriver/chrome/navigation_tracker.cc index b4c5b00..230423d 100644 --- a/chrome/test/chromedriver/chrome/navigation_tracker.cc +++ b/chrome/test/chromedriver/chrome/navigation_tracker.cc
@@ -41,7 +41,6 @@ const JavaScriptDialogManager* dialog_manager) : client_(client), loading_state_(kUnknown), - browser_info_(browser_info), dialog_manager_(dialog_manager), dummy_execution_context_id_(0), load_event_fired_(true), @@ -56,7 +55,6 @@ const JavaScriptDialogManager* dialog_manager) : client_(client), loading_state_(known_state), - browser_info_(browser_info), dialog_manager_(dialog_manager), dummy_execution_context_id_(0), load_event_fired_(true), @@ -215,25 +213,6 @@ return Status(kUnknownError, "missing or invalid 'frameId'"); pending_frame_set_.insert(frame_id); loading_state_ = kLoading; - - if (browser_info_->major_version >= 63 && - browser_info_->major_version < 67) { - // Check if the document is really loading. - base::DictionaryValue params; - params.SetString("expression", "document.readyState"); - std::unique_ptr<base::DictionaryValue> result; - Status status = - client_->SendCommandAndGetResult("Runtime.evaluate", params, &result); - std::string value; - if (status.IsError() || !result->GetString("result.value", &value)) { - LOG(ERROR) << "Unable to retrieve document state " << status.message(); - return status; - } - if (value == "complete") { - pending_frame_set_.erase(frame_id); - loading_state_ = kNotLoading; - } - } } else if (method == "Page.frameStoppedLoading") { std::string frame_id; if (!params.GetString("frameId", &frame_id))
diff --git a/chrome/test/chromedriver/chrome/navigation_tracker.h b/chrome/test/chromedriver/chrome/navigation_tracker.h index 2d2cb1f..0e52b44 100644 --- a/chrome/test/chromedriver/chrome/navigation_tracker.h +++ b/chrome/test/chromedriver/chrome/navigation_tracker.h
@@ -64,7 +64,6 @@ private: DevToolsClient* client_; LoadingState loading_state_; - const BrowserInfo* browser_info_; const JavaScriptDialogManager* dialog_manager_; std::set<std::string> pending_frame_set_; std::set<std::string> scheduled_frame_set_;
diff --git a/chrome/test/chromedriver/chrome/web_view_impl.cc b/chrome/test/chromedriver/chrome/web_view_impl.cc index 0a87d75a..5213ebf 100644 --- a/chrome/test/chromedriver/chrome/web_view_impl.cc +++ b/chrome/test/chromedriver/chrome/web_view_impl.cc
@@ -213,8 +213,7 @@ return Status(kUnknownError, "unsupported protocol"); base::DictionaryValue params; params.SetString("url", url); - if (browser_info_->major_version >= 63 && - navigation_tracker_->IsNonBlocking()) { + if (navigation_tracker_->IsNonBlocking()) { // With non-bloakcing navigation tracker, the previous navigation might // still be in progress, and this can cause the new navigate command to be // ignored on Chrome v63 and above. Stop previous navigation first. @@ -404,33 +403,7 @@ Status WebViewImpl::DispatchMouseEvents(const std::list<MouseEvent>& events, const std::string& frame) { - WebViewImpl* target = GetTargetForFrame(this, frame); - bool needs_special_oopif_handling = browser_info_->major_version <= 65; - if (needs_special_oopif_handling && target != nullptr && target != this) { - if (target->IsDetached()) - return Status(kTargetDetached); - WebViewImplHolder target_holder(target); - return target->DispatchMouseEvents(events, frame); - } - double page_scale_factor = 1.0; - if (browser_info_->build_no >= 2358 && browser_info_->build_no <= 2430 && - (browser_info_->is_android || - mobile_emulation_override_manager_->IsEmulatingTouch())) { - // As of crrev.com/323900, on Android and under mobile emulation, - // Input.dispatchMouseEvent fails to apply the page scale factor to the - // mouse event coordinates. This leads to the MouseEvent being triggered on - // the wrong location on the page. This was fixed on the browser side in - // crrev.com/333979. - // TODO(samuong): remove once we stop supporting M45. - std::unique_ptr<base::Value> value; - Status status = EvaluateScript( - std::string(), "window.screen.width / window.innerWidth;", &value); - if (status.IsError()) - return status; - if (!value->GetAsDouble(&page_scale_factor)) - return Status(kUnknownError, "unable to determine page scale factor"); - } for (std::list<MouseEvent>::const_iterator it = events.begin(); it != events.end(); ++it) { base::DictionaryValue params; @@ -499,8 +472,7 @@ base::DictionaryValue params; std::unique_ptr<base::DictionaryValue> result; - if (browser_info_->build_no >= 3029 && - browser_info_->browser_name != "webview") { + if (browser_info_->browser_name != "webview") { base::ListValue url_list; url_list.AppendString(current_page_url); params.SetKey("urls", url_list.Clone()); @@ -529,16 +501,10 @@ base::DictionaryValue params; params.SetString("url", url); std::string command; - if (browser_info_->build_no >= 3189) { - params.SetString("name", name); - params.SetString("domain", domain); - params.SetString("path", path); - command = "Network.deleteCookies"; - } else { - params.SetString("cookieName", name); - command = "Page.deleteCookie"; - } - + params.SetString("name", name); + params.SetString("domain", domain); + params.SetString("path", path); + command = "Network.deleteCookies"; return client_->SendCommand(command, params); } @@ -581,12 +547,7 @@ if (status.code() == kTimeout && stop_load_on_timeout) { VLOG(0) << "Timed out. Stopping navigation..."; navigation_tracker_->set_timed_out(true); - if (browser_info_->major_version >= 63) { - client_->SendCommand("Page.stopLoading", base::DictionaryValue()); - } else { - std::unique_ptr<base::Value> unused_value; - EvaluateScript(std::string(), "window.stop();", &unused_value); - } + client_->SendCommand("Page.stopLoading", base::DictionaryValue()); // We don't consider |timeout| here to make sure the navigation actually // stops and we cleanup properly after a command that caused a navigation // that timed out. Otherwise we might have to wait for that before
diff --git a/chrome/test/chromedriver/chrome_launcher.cc b/chrome/test/chromedriver/chrome_launcher.cc index 74787b8..5551d37 100644 --- a/chrome/test/chromedriver/chrome_launcher.cc +++ b/chrome/test/chromedriver/chrome_launcher.cc
@@ -223,19 +223,11 @@ const BrowserInfo* browser_info = client->browser_info(); if (browser_info->is_android && - browser_info->android_package != capabilities->android_package) { - // DevTools from Chrome 30 and earlier did not provide an Android-Package - // key, so skip the package check for WebView on KitKat and older. - // TODO(samuong): Make this unconditional once we stop supporting Android - // KitKat WebView apps. - if (!(browser_info->browser_name == "webview" && - browser_info->major_version <= 30 && - browser_info->android_package.empty())) { - return Status( - kSessionNotCreatedException, - base::StringPrintf("please close '%s' and try again", - browser_info->android_package.c_str())); - } + browser_info->android_package != capabilities->android_package) { + return Status( + kSessionNotCreatedException, + base::StringPrintf("please close '%s' and try again", + browser_info->android_package.c_str())); } base::CommandLine* cmd_line = base::CommandLine::ForCurrentProcess();
diff --git a/chrome/test/chromedriver/commands.cc b/chrome/test/chromedriver/commands.cc index 414bdc0..553ef3d 100644 --- a/chrome/test/chromedriver/commands.cc +++ b/chrome/test/chromedriver/commands.cc
@@ -207,6 +207,7 @@ const CommandCallback& callback_on_cmd, const base::Closure& terminate_on_cmd) { Session* session = GetThreadLocalSession(); + if (!session) { cmd_task_runner->PostTask( FROM_HERE, @@ -219,7 +220,8 @@ if (IsVLogOn(0)) { if (!session->driver_log || session->driver_log->min_level() != Log::Level::kOff) { - VLOG(0) << "COMMAND " << command_name << " " + VLOG(0) << "[" << session->id << "] " + << "COMMAND " << command_name << " " << FormatValueForDisplay(*params); } } @@ -269,13 +271,14 @@ if (IsVLogOn(0)) { std::string result; if (status.IsError()) { - result = status.message(); + result = "ERROR " + status.message(); } else if (value) { result = FormatValueForDisplay(*value); } if (!session->driver_log || session->driver_log->min_level() != Log::Level::kOff) { - VLOG(0) << "RESPONSE " << command_name + VLOG(0) << "[" << session->id << "] " + << "RESPONSE " << command_name << (result.length() ? " " + result : ""); } }
diff --git a/chrome/test/chromedriver/log_replay/client_replay.py b/chrome/test/chromedriver/log_replay/client_replay.py new file mode 100755 index 0000000..fed487fc8 --- /dev/null +++ b/chrome/test/chromedriver/log_replay/client_replay.py
@@ -0,0 +1,923 @@ +#!/usr/bin/env python +# 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. + +"""Re-runs the ChromeDriver's client-side commands, given a log file. + +Takes a ChromeDriver log file that was created with the --replayable=true +command-line flag for the ChromeDriver binary (or with the same flag for +the run_py_tests.py). + +To replay a log file, just run this script with the log file specified +in the --input-log-path flag. Alternatively, construct a CommandSequence +instance and iterate over it to access the logged commands one-by-one. +Notice that for the iteration approach, you must call +CommandSequence.ingestRealResponse with each response. + +Implementation: +The CommandSequence class is the core of the implementation here. At a +basic level, it opens the given log file, looks for the next command and +response pair, and returns them (along with their parameters/payload) on +NextCommand, next, or __iter__. + +To get effective replay, there are a few deviations from simply verbatim +repeating the logged commands and parameters: + 1. Session, window, and element IDs in the log are identified with the + corresponding ID in the new session and substituted in each command + returned. + 2. When a response is an error, we need to infer other parts of the + original response that would have been returned along with the + error. + 3. If GetSessions is called while there are multiple sessions open, + the log will show more calls than actually occurred (one per open + session, even if it was only called once), so we absorb all of + these calls back into one. +""" +import collections +import json +import optparse +import os +import re +import sys + +_THIS_DIR = os.path.abspath(os.path.dirname(__file__)) +_PARENT_DIR = os.path.join(_THIS_DIR, os.pardir) +_CLIENT_DIR = os.path.join(_PARENT_DIR, "client") +_SERVER_DIR = os.path.join(_PARENT_DIR, "server") + +# pylint: disable=g-import-not-at-top +sys.path.insert(1, _CLIENT_DIR) +import command_executor +sys.path.remove(_CLIENT_DIR) + +sys.path.insert(1, _SERVER_DIR) +import server +sys.path.remove(_SERVER_DIR) + +sys.path.insert(1, _PARENT_DIR) +import util +sys.path.remove(_PARENT_DIR) +# pylint: enable=g-import-not-at-top + + +class Method(object): + GET = "GET" + POST = "POST" + DELETE = "DELETE" + +# TODO(crbug/chromedriver/2511) there should be a single source of truth for +# this data throughout chromedriver code (see e.g. http_handler.cc) +_COMMANDS = { + "AcceptAlert": (Method.POST, "/session/:sessionId/alert/accept"), + "Activate": (Method.POST, "/session/:sessionId/ime/activate"), + "Activated": (Method.GET, "/session/:sessionId/ime/activated"), + "AddCookie": (Method.POST, "/session/:sessionId/cookie"), + "ClearElement": (Method.POST, "/session/:sessionId/element/:id/clear"), + "ClearLocalStorage": (Method.DELETE, "/session/:sessionId/local_storage"), + "ClearSessionStorage": + (Method.DELETE, "/session/:sessionId/session_storage"), + "Click": (Method.POST, "/session/:sessionId/click"), + "ClickElement": (Method.POST, "/session/:sessionId/element/:id/click"), + "CloseWindow": (Method.DELETE, "/session/:sessionId/window"), + "Deactivate": (Method.POST, "/session/:sessionId/ime/deactivate"), + "DeleteActions": (Method.DELETE, "/session/:sessionId/actions"), + "DeleteAllCookies": (Method.DELETE, "/session/:sessionId/cookie"), + "DeleteCookie": (Method.DELETE, "/session/:sessionId/cookie/:name"), + "DeleteNetworkConditions": + (Method.DELETE, "/session/:sessionId/chromium/network_conditions"), + "DeleteScreenOrientation": + (Method.DELETE, "/session/:sessionId/orientation"), + "DismissAlert": (Method.POST, "/session/:sessionId/dismiss_alert"), + "DoubleClick": (Method.POST, "/session/:sessionId/doubleclick"), + "Drag": (Method.POST, "/session/:sessionId/element/:id/drag"), + "ExecuteAsyncScript": (Method.POST, "/session/:sessionId/execute_async"), + "ExecuteCDP": (Method.POST, "/session/:sessionId/goog/cdp/execute"), + "ExecuteScript": (Method.POST, "/session/:sessionId/execute/sync"), + "ExecuteSql": (Method.POST, "/session/:sessionId/execute_sql"), + "FindChildElement": + (Method.POST, "/session/:sessionId/element/:id/element"), + "FindChildElements": + (Method.POST, "/session/:sessionId/element/:id/elements"), + "FindElement": (Method.POST, "/session/:sessionId/element"), + "FindElements": (Method.POST, "/session/:sessionId/elements"), + "Freeze": (Method.POST, "/session/:sessionId/goog/page/freeze"), + "FullscreenWindow": (Method.POST, "/session/:sessionId/window/fullscreen"), + "GetActiveElement": (Method.POST, "/session/:sessionId/element/active"), + "GetActiveEngine": (Method.GET, "/session/:sessionId/ime/active_engine"), + "GetAlertMessage": (Method.GET, "/session/:sessionId/alert_text"), + "GetAvailableEngines": + (Method.GET, "/session/:sessionId/ime/available_engines"), + "GetBrowserConnection": + (Method.GET, "/session/:sessionId/browser_connection"), + "GetCookies": (Method.GET, "/session/:sessionId/cookie"), + "GetElementAttribute": + (Method.GET, "/session/:sessionId/element/:id/attribute/:name"), + "GetElementCSSProperty": + (Method.GET, "/session/:sessionId/element/:id/css/:propertyName"), + "GetElementLocation": + (Method.GET, "/session/:sessionId/element/:id/location"), + "GetElementLocationInView": + (Method.GET, "/session/:sessionId/element/:id/location_in_view"), + "GetElementRect": (Method.GET, "/session/:sessionId/element/:id/rect"), + "GetElementSize": (Method.GET, "/session/:sessionId/element/:id/size"), + "GetElementTagName": (Method.GET, "/session/:sessionId/element/:id/name"), + "GetElementText": (Method.GET, "/session/:sessionId/element/:id/text"), + "GetElementValue": (Method.GET, "/session/:sessionId/element/:id/value"), + "GetGeolocation": (Method.GET, "/session/:sessionId/location"), + "GetLocalStorageItem": + (Method.GET, "/session/:sessionId/local_storage/key/:key"), + "GetLocalStorageKeys": + (Method.GET, "/session/:sessionId/local_storage"), + "GetLocalStorageSize": + (Method.GET, "/session/:sessionId/local_storage/size"), + "GetLog": (Method.POST, "/session/:sessionId/log"), + "GetLogTypes": (Method.GET, "/session/:sessionId/log/types"), + "GetNamedCookie": (Method.GET, "/session/:sessionId/cookie/:name"), + "GetNetworkConditions": + (Method.GET, "/session/:sessionId/chromium/network_conditions"), + "GetNetworkConnection": + (Method.GET, "/session/:sessionId/network_connection"), + "GetScreenOrientation": (Method.GET, "/session/:sessionId/orientation"), + "GetSessionCapabilities": (Method.GET, "/session/:sessionId"), + "GetSessionStorageItem": + (Method.GET, "/session/:sessionId/session_storage/key/:key"), + "GetSessionStorageKeys": + (Method.GET, "/session/:sessionId/session_storage"), + "GetSessionStorageSize": + (Method.GET, "/session/:sessionId/session_storage/size"), + "GetSessions": (Method.GET, "/sessions"), + "GetSource": (Method.GET, "/session/:sessionId/source"), + "GetStatus": (Method.GET, "status"), + "GetTimeouts": (Method.GET, "/session/:sessionId/timeouts"), + "GetTitle": (Method.GET, "/session/:sessionId/title"), + "GetUrl": (Method.GET, "/session/:sessionId/url"), + "GetWindow": (Method.GET, "/session/:sessionId/window_handle"), + "GetWindowPosition": + (Method.GET, "/session/:sessionId/window/:windowHandle/position"), + "GetWindowRect": + (Method.GET, "/session/:sessionId/window/rect"), + "GetWindowSize": + (Method.GET, "/session/:sessionId/window/:windowHandle/size"), + "GetWindows": (Method.GET, "/session/:sessionId/window_handles"), + "GoBack": (Method.POST, "/session/:sessionId/back"), + "GoForward": (Method.POST, "/session/:sessionId/forward"), + "HeapSnapshot": (Method.GET, "/session/:sessionId/chromium/heap_snapshot"), + "HoverElement": (Method.POST, "/session/:sessionId/element/:id/hover"), + "InitSession": (Method.POST, "/session"), + "IsAlertOpen": (Method.GET, "/session/:sessionId/alert"), + "IsAutoReporting": (Method.GET, "/session/:sessionId/autoreport"), + "IsElementDisplayed": + (Method.GET, "/session/:sessionId/element/:id/displayed"), + "IsElementEnabled": (Method.GET, "/session/:sessionId/element/:id/enabled"), + "IsElementEqual": + (Method.GET, "/session/:sessionId/element/:id/equals/:other"), + "IsElementSelected": + (Method.GET, "/session/:sessionId/element/:id/selected"), + "IsLoading": (Method.GET, "/session/:sessionId/is_loading"), + "LaunchApp": (Method.POST, "/session/:sessionId/chromium/launch_app"), + "Logs": (Method.POST, "Logs"), + "MaximizeWindow": (Method.POST, "/session/:sessionId/window/maximize"), + "MinimizeWindow": (Method.POST, "/session/:sessionId/window/minimize"), + "MouseDown": (Method.POST, "/session/:sessionId/buttondown"), + "MouseMove": (Method.POST, "/session/:sessionId/moveto"), + "MouseUp": (Method.POST, "/session/:sessionId/buttonup"), + "Navigate": (Method.POST, "/session/:sessionId/url"), + "PerformActions": (Method.POST, "/session/:sessionId/actions"), + "Quit": (Method.DELETE, "/session/:sessionId"), + "Refresh": (Method.POST, "/session/:sessionId/refresh"), + "RemoveLocalStorageItem": + (Method.DELETE, "/session/:sessionId/local_storage/key/:key"), + "RemoveSessionStorageItem": + (Method.DELETE, "/session/:sessionId/session_storage/key/:key"), + "Resume": (Method.POST, "/session/:sessionId/goog/page/resume"), + "Screenshot": (Method.GET, "/session/:sessionId/screenshot"), + "SendCommand": (Method.POST, "/session/:sessionId/chromium/send_command"), + "SendCommandAndGetResult": + (Method.POST, "/session/:sessionId/chromium/send_command_and_get_result"), + "SetAlertPrompt": (Method.POST, "/session/:sessionId/alert_text"), + "SetAutoReporting": (Method.POST, "/session/:sessionId/autoreport"), + "SetBrowserConnection": + (Method.POST, "/session/:sessionId/browser_connection"), + "SetGeolocation": (Method.POST, "/session/:sessionId/location"), + "SetImplicitWait": + (Method.POST, "/session/:sessionId/timeouts/implicit_wait"), + "SetLocalStorageKeys": (Method.POST, "/session/:sessionId/local_storage"), + "SetNetworkConditions": + (Method.POST, "/session/:sessionId/chromium/network_conditions"), + "SetNetworkConnection": + (Method.POST, "/session/:sessionId/network_connection"), + "SetScreenOrientation": (Method.POST, "/session/:sessionId/orientation"), + "SetScriptTimeout": + (Method.POST, "/session/:sessionId/timeouts/async_script"), + "SetSessionStorageItem": + (Method.POST, "/session/:sessionId/session_storage"), + "SetTimeouts": (Method.POST, "/session/:sessionId/timeouts"), + "SetWindowPosition": + (Method.POST, "/session/:sessionId/window/:windowHandle/position"), + "SetWindowRect": (Method.POST, "/session/:sessionId/window/rect"), + "SetWindowSize": + (Method.POST, "/session/:sessionId/window/:windowHandle/size"), + "SubmitElement": (Method.POST, "/session/:sessionId/element/:id/submit"), + "SwitchToFrame": (Method.POST, "/session/:sessionId/frame"), + "SwitchToParentFrame": (Method.POST, "/session/:sessionId/frame/parent"), + "SwitchToWindow": (Method.POST, "/session/:sessionId/window"), + "Tap": (Method.POST, "/session/:sessionId/touch/click"), + "TouchDoubleTap": (Method.POST, "/session/:sessionId/touch/doubleclick"), + "TouchDown": (Method.POST, "/session/:sessionId/touch/down"), + "TouchFlick": (Method.POST, "/session/:sessionId/touch/flick"), + "TouchLongPress": (Method.POST, "/session/:sessionId/touch/longclick"), + "TouchMove": (Method.POST, "/session/:sessionId/touch/move"), + "TouchPinch": (Method.POST, "/session/:sessionId/touch/pinch"), + "TouchScroll": (Method.POST, "/session/:sessionId/touch/scroll"), + "TouchUp": (Method.POST, "/session/:sessionId/touch/up"), + "Type": (Method.POST, "/session/:sessionId/keys"), + "TypeElement": (Method.POST, "/session/:sessionId/element/:id/value"), + "UploadFile": (Method.POST, "/session/:sessionId/file"), + "Visible": (Method.POST, "/session/:sessionId/visible") +} + +MULTI_SESSION_COMMANDS = ["GetSessions"] + + +class ReplayException(Exception): + """Thrown for irrecoverable problems in parsing the log file.""" + + +def _CountChar(line, opening_char, closing_char): + """Count (number of opening_char) - (number of closing_char) in |line|. + + Used to check for the end of JSON parameters. Ignores characters inside of + non-escaped quotes. + + Args: + line: line to count characters in + opening_char: "+1" character, { or [ + closing_char: "-1" character, ] or } + Returns: + (number of opening_char) - (number of closing_char) + """ + in_quote = False + total = 0 + for i, c in enumerate(line): + if not in_quote and c is opening_char: + total += 1 + if not in_quote and c is closing_char: + total -= 1 + if c == '"' and (i == 0 or line[i-1] != "\\"): + in_quote = not in_quote + + return total + + +def _GetCommandName(header_line): + """Return the command name from the logged header line.""" + return header_line.split()[3] + + +def _GetEntryType(header_line): + return header_line.split()[2] + + +def _GetSessionId(header_line): + """Return the session ID from the logged header line.""" + return header_line.split()[1][1:-1] + + +# TODO(cwinstanley): Might just want to literally dump these to strings and +# search using regexes. All the ids have distinctive formats +# and this would allow getting even ids returned from scripts. +# TODO(cwinstanley): W3C element compliance +def _GetAnyElementIds(payload): + """Looks for any element, session, or window IDs, and returns them. + + Payload should be passed as a dict or list. + + Args: + payload: payload to check for IDs, as a python list or dict. + Returns: + list of ID strings, in order, in this payload + """ + if isinstance(payload, dict): + if "ELEMENT" in payload: + return [payload["ELEMENT"]] + elif isinstance(payload, list): + elements = [item["ELEMENT"] for item in payload if "ELEMENT" in item] + windows = [item for item in payload if "CDwindow" in item] + if not elements and not windows: + return None + + return elements + windows + + return None + + +def _ReplaceWindowAndElementIds(payload, id_map): + """Replace the window, session, and element IDs in |payload| using |id_map|. + + Checks |payload| for window, element, and session IDs that are in |id_map|, + and replaces them. + + Args: + payload: payload in which to replace IDs. This is edited in-place. + id_map: mapping from old to new IDs that should be replaced. + """ + if isinstance(payload, dict): + for key, value in payload.iteritems(): + if isinstance(value, basestring) and value in id_map: + payload[key] = id_map[value] + else: + _ReplaceWindowAndElementIds(payload[key], id_map) + elif isinstance(payload, list): + for i, value in enumerate(payload): + if isinstance(value, basestring) and value in id_map: + payload[i] = id_map[value] + else: + _ReplaceWindowAndElementIds(payload[i], id_map) + + +def _ReplaceUrl(payload, base_url): + """Swap out the base URL (starting with protocol) in this payload. + + Useful when switching ports or URLs. + + Args: + payload: payload in which to do the url replacement + base_url: url to replace any applicable urls in |payload| with. + """ + if base_url and "url" in payload: + payload["url"] = re.sub(r"^https?://((?!/).)*/", + base_url + "/", payload["url"]) + + +def _ReplaceBinary(payload, binary): + """Replace the binary path in |payload| with the one in |binary|. + + If |binary| exists but there is no binary in |payload|, it is added at the + appropriate location. Operates in-place. + + Args: + payload: InitSession payload as a dictionary to replace binary in + binary: new binary to replace in payload. If binary is not truthy, but + there is a binary path in |payload|, we remove the binary path, which will + trigger ChromeDriver's mechanism for locating the Chrome binary. + """ + if ("desiredCapabilities" in payload + and "chromeOptions" in payload["desiredCapabilities"]): + if binary: + (payload["desiredCapabilities"]["chromeOptions"] + ["binary"]) = binary + elif "binary" in payload["desiredCapabilities"]["chromeOptions"]: + del payload["desiredCapabilities"]["chromeOptions"]["binary"] + + elif binary: + if "desiredCapabilities" not in payload: + payload["desiredCapabilities"] = { + "chromeOptions": { + "binary": binary + } + } + elif "chromeOptions" not in payload["desiredCapabilities"]: + payload["desiredCapabilities"]["chromeOptions"] = { + "binary": binary + } + + +def _ReplaceSessionId(payload, id_map): + """Update session IDs in this payload to match the current session. + + Operates in-place. + + Args: + payload: payload in which to replace session IDs. + id_map: mapping from logged IDs to IDs in the current session + """ + if "sessionId" in payload and payload["sessionId"] in id_map: + payload["sessionId"] = id_map[payload["sessionId"]] + + +class _Payload(object): + """Object containing a payload, which usually belongs to a LogEntry.""" + + def __init__(self, payload_string): + """Initialize the payload object. + + Parses the payload, represented as a string, into a Python object. + + Payloads appear in the log as a multi-line (usually) JSON string starting + on the header line, like the following, where the payload starts after the + word InitSession: + [1532467931.153][INFO]: [<session_id>] COMMAND InitSession { + "desiredCapabilities": { + "chromeOptions": { + "args": [ "no-sandbox", "disable-gpu" ], + "binary": "<binary_path>" + } + } + } + + Payloads can also be "singular" entries, like "1", "false", be an error + string (signified by the payload starting with "ERROR") or be totally + nonexistent for a given command. + + Args: + payload_string: payload represented as a string. + """ + self.is_empty = not payload_string + self.is_error = not self.is_empty and payload_string[:5] == "ERROR" + if self.is_error or self.is_empty: + self.payload_raw = payload_string + else: + self.payload_raw = json.loads(payload_string) + + def AddSessionId(self, session_id): + """Adds a session ID into this payload. + + Args: + session_id: session ID to add. + """ + self.payload_raw["sessionId"] = session_id + + def SubstituteIds(self, id_map, binary, base_url="", init_session=False): + """Replace old IDs in the given payload with ones for the current session. + + Args: + id_map: mapping from logged IDs to current-session ones + binary: binary to add into this command, if |init_session| is True + base_url: base url to replace in the payload for navigation commands + init_session: whether this payload belongs to an InitSession command. + """ + if self.is_error or self.is_empty: + return + + _ReplaceWindowAndElementIds(self.payload_raw, id_map) + _ReplaceSessionId(self.payload_raw, id_map) + + if init_session: + _ReplaceBinary(self.payload_raw, binary) + + _ReplaceUrl(self.payload_raw, base_url) + + def GetAnyElementIds(self): + return _GetAnyElementIds(self.payload_raw) + + +class _GetSessionsResponseEntry(object): + """Special LogEntry object for GetSessions commands. + + We need a separate class for GetSessions because we need to manually build + the payload from separate log entries in CommandSequence._HandleGetSessions. + This means that we cannot use the payload object that we use for other + commands. There is also no canonical session ID for GetSessions. + """ + + def __init__(self, payload): + """Initialize the _GetSessionsResponseEntry. + + Args: + payload: python dict of the payload for this GetSessions response + """ + self._payload = payload + self.name = "GetSessions" + self.session_id = "" + + def GetPayloadPrimitive(self): + """Get the payload for this entry.""" + return self._payload + + +class LogEntry(object): + """A helper class that can store a command or a response. + + Public attributes: + name: name of the command, like InitSession. + session_id: session ID for this command, let as "" for GetSessions. + payload: parameters for a command or the payload returned with a response. + """ + + _COMMAND = "COMMAND" + _RESPONSE = "RESPONSE" + + def __init__(self, header_line, payload_string): + """Initialize the LogEntry. + + Args: + header_line: the line from the log that has the header of this entry. + This also sometimes has part or all of the payload in it. + + Header lines look like the following: + [1532467931.153][INFO]: [<session_id>] <COMMAND or RESPONSE> <command> + payload_string: string representing the payload (usually a JSON dict, but + occasionally a string, bool, or int). + """ + self.name = _GetCommandName(header_line) + self._type = _GetEntryType(header_line) + self.session_id = _GetSessionId(header_line) + self.payload = _Payload(payload_string) + + def IsResponse(self): + """Returns whether this instance is a response.""" + return self._type == self._RESPONSE + + def IsCommand(self): + """Returns whether this instance is a command.""" + return self._type == self._COMMAND + + def UpdatePayloadForReplaySession(self, + id_map=None, + binary="", + base_url=None): + """Processes IDs in the payload to match the current session. + + This replaces old window, element, and session IDs in the payload to match + the ones in the current session as defined in |id_map|. It also replaces + the binary and the url if appropriate. + + Args: + id_map: + dict matching element, session, and window IDs in the logged session + with the ones from the current (replaying) session. + binary: + Chrome binary to replace if this is an InitSession call. The binary + will be removed if this is not set. This will cause ChromeDriver to + use it's own algorithm to find an appropriate Chrome binary. + base_url: + Url to replace the ones in the log with in Navigate commands. + """ + self.payload.AddSessionId(self.session_id) + self.payload.SubstituteIds( + id_map, binary, base_url, self.name == "InitSession") + + def GetPayloadPrimitive(self): + """Returns the payload associated with this LogEntry as a primitive.""" + return self.payload.payload_raw + + +class _ParserWithUndo(object): + def __init__(self, log_file): + """Wrapper around _Parser that implements a UndoGetNext function. + + Args: + log_file: file that we wish to open as the log. This should be a + Python file object, or something else with readline capability. + """ + self._parser = _Parser(log_file) + self._saved_log_entry = None + + def GetNext(self): + """Get the next client command or response in the log. + + Returns: + LogEntry object representing the next command or response in the log. + """ + if self._saved_log_entry is not None: + log_entry = self._saved_log_entry + self._saved_log_entry = None + return log_entry + return self._parser.GetNext() + + def UndoGetNext(self, log_entry): + """Undo the most recent GetNext call that returned |log_entry|. + + Simulates going backwards in the log file by storing |log_entry| and + returning that on the next GetNext call. + + Args: + entry: the returned entry from the GetNext that we wish to "undo" + Raises: + ReplayException: if this is called multiple times in a row, which will + cause the object to lose the previously undone entry. + """ + if self._saved_log_entry is not None: + raise RuntimeError('Cannot undo multiple times in a row.') + self._saved_log_entry = log_entry + + +class _Parser(object): + """Class responsible for parsing (and not interpreting) the log file.""" + + # Matches headers for client commands/responses only (not DevTools events) + _CLIENT_PREAMBLE_REGEX = re.compile( + r"^\[[0-9]{10}\.[0-9]{3}\]\[INFO\]: \[[a-f0-9]*\]") + + def __init__(self, log_file): + """Initialize the _Parser instance. + + Args: + log_file: file that we wish to open as the log. This should be a + Python file object, or something else with readline capability. + """ + self._log_file = log_file + + def GetNext(self): + """Get the next client command or response in the log. + + Returns: + LogEntry object representing the next command or response in the log. + Returns None if at the end of the log + """ + header = self._GetNextClientHeaderLine() + if not header: + return None + payload_string = self._GetPayloadString(header) + return LogEntry(header, payload_string) + + def _GetNextClientHeaderLine(self): + """Get the next line that is a command or response for the client. + + Returns: + String containing the header of the next client command/response, or + an empty string if we're at the end of the log file. + """ + while True: + next_line = self._log_file.readline() + if not next_line: # empty string indicates end of the log file. + return None + if re.match(self._CLIENT_PREAMBLE_REGEX, next_line): + return next_line + + def _GetPayloadString(self, header_line): + """Gets the payload for the current command in self._logfile. + + Parses the given header line, along with any additional lines as + applicable, to get a complete JSON payload object from the current + command in the log file. Note that the payload can be JSON, and error + (just a string), or something else like an int or a boolean. + + Args: + header_line: the first line of this command + Raises: + ReplayException: if the JSON appears to be incomplete in the log + Returns: + payload of the command as a string + """ + header_segments = header_line.split() + if len(header_segments) < 5: + return None + payload = " ".join(header_segments[4:]) + opening_char = header_segments[4] + if opening_char == "{": + closing_char = "}" + elif opening_char == "[": + closing_char = "]" + else: + return payload # payload is singular, like "1", "false", or an error + + opening_char_count = (payload.count(opening_char) + - payload.count(closing_char)) + + while opening_char_count > 0: + next_line = self._log_file.readline() + if not next_line: + # It'd be quite surprising that the log is truncated in the middle of + # a JSON; far more likely that the parsing failed for some reason. + raise ReplayException( + "Reached end of file without reaching end of JSON payload") + payload += next_line + opening_char_count += _CountChar(next_line, opening_char, + closing_char) + + return payload + + +class CommandSequence(object): + """Interface to the sequence of commands in a log file.""" + + def __init__(self, log_path="", base_url=None, chrome_binary=None): + """Initialize the CommandSequence. + + Args: + log_path: file to read logs from (usually opened with with) + base_url: url to replace the base of logged urls with, if + applicable. Replaces port number as well. + chrome_binary: use this Chrome binary instead of the one in the log, + if not None. + """ + self._base_url = base_url + self._binary = chrome_binary + self._id_map = {} + self._parser = _ParserWithUndo(log_path) + self._staged_logged_ids = None + self._staged_logged_session_id = None + + def NextCommand(self, previous_response): + """Get the next command in the log file. + + Gets start of next command, returning the command and response, + ready to be executed directly in the new session. + + Args: + previous_response: the response payload from running the previous command + outputted by this function; None if this is the first command, or + element, session, and window ID substitution is not desired (i.e. + use the logged IDs). This provides the IDs that are then mapped + back onto the ones in the log to formulate future commands correctly. + Raises: + ReplayException: there is a problem with the log making it not + parseable. + Returns: + None if there are no remaining logs. + Otherwise, |command|, a LogEntry object with the following fields: + name: command name (e.g. InitSession) + type: either LogEntry.COMMAND or LogEntry.RESPONSE + payload: parameters passed with the command + session_id: intended session ID for the command, or "" if the + command is GetSessions. + """ + if previous_response: + self._IngestRealResponse(previous_response) + + command = self._parser.GetNext() + if not command: # Reached end of log file + return None + if not command.IsCommand(): + raise ReplayException("Command and Response unexpectedly out of order.") + + if command.name == "GetSessions": + return self._HandleGetSessions(command) + + command.UpdatePayloadForReplaySession( + self._id_map, self._binary, self._base_url) + + response = self._parser.GetNext() + if not response.IsResponse(): + raise ReplayException("Command and Response unexpectedly out of order.") + self._IngestLoggedResponse(response) + return command + + def _IngestRealResponse(self, response): + """Process the actual response from the previously issued command. + + Ingests the given response that came from calling the last command on + the running ChromeDriver replay instance. This is the step where the + session and element IDs are matched between |response| and the logged + response. + + Args: + response: Python dict of the real response to be analyzed for IDs. + """ + if "value" in response and self._staged_logged_ids: + real_ids = _GetAnyElementIds(response["value"]) + if real_ids and self._staged_logged_ids: + for id_old, id_new in zip(self._staged_logged_ids, real_ids): + self._id_map[id_old] = id_new + self._staged_logged_ids = None + + if "sessionId" in response and self._staged_logged_session_id: + self._id_map[self._staged_logged_session_id] = response["sessionId"] + self._staged_logged_session_id = None + + def _IngestLoggedResponse(self, response): + """Reads the response at the current position in the log file. + + Also matches IDs between the logged and new sessions. + + Args: + response: the response from the log (from _parser.GetNext) + """ + self._last_response = response # store for testing purposes + + self._staged_logged_ids = response.payload.GetAnyElementIds() + if response.name == "InitSession": + self._staged_logged_session_id = response.session_id + + def _HandleGetSessions(self, first_command): + """Special case handler for the GetSessions command. + + Since it is dispatched to each session thread, GetSessions doesn't guarantee + command-response-command-response ordering in the log. This happens with + getSessions, which is broadcast to and logged by each of the active sessions + in the ChromeDriver instance. This simply consumes all the necessary logs + resulting from that command until it reaches the next command in the log. + + This results in one returned |overall_response|, which is a list of the + responses from each GetSessions sub-call. This is not the same as what is + in the log file, but it is what ChromeDriver returns in real life. + + Args: + first_command: The first GetSessions command from the log + + Returns: + first_command: the command that triggered all of the calls absorbed by + this function + """ + + command_response_pairs = collections.defaultdict(dict) + command_response_pairs[first_command.session_id] = ( + {"command": first_command}) + + while True: + next_entry = self._parser.GetNext() + if not next_entry: + self._parser.UndoGetNext(next_entry) + break + if next_entry.IsResponse(): + command_response_pairs[next_entry.session_id]["response"] = next_entry + elif next_entry.IsCommand(): + if (next_entry.name != first_command.name + or next_entry.session_id in command_response_pairs): + self._parser.UndoGetNext(next_entry) + break + command_response_pairs[next_entry.session_id]["command"] = next_entry + + response = [ + {u"id": key, u"capabilities": val["response"].GetPayloadPrimitive()} + for key, val in command_response_pairs.iteritems() + ] + self._last_response = _GetSessionsResponseEntry(response) + + return first_command + + +class Replayer(object): + """Replays the commands in the log file, using CommandSequence internally. + + This class provides the command-line functionality for this file. + """ + + def __init__(self, logfile, server, chrome_binary, base_url=None): + """Initialize the Replayer instance. + + Args: + logfile: log file handle object to replay from. + options: command-line options; see below. Needs at least + options.chromedriver for the ChromeDriver binary. + base_url: string, base of the url to replace in the logged urls (useful + for when ports change). If any value is passed here, it overrides any + base url passed in options. + """ + + + # TODO(cwinstanley) Add Android support and perhaps support for other + # chromedriver command line options. + self.executor = command_executor.CommandExecutor(server.GetUrl()) + self.command_sequence = CommandSequence(logfile, base_url=base_url, + chrome_binary=chrome_binary) + + def Run(self): + """Runs the replay.""" + real_response = None + while True: + command = self.command_sequence.NextCommand(real_response) + if not command: + break + real_response = self.executor.Execute(_COMMANDS[command.name], + command.GetPayloadPrimitive()) + + +def StartChromeDriverServer(chromedriver_binary, options): + chromedriver = util.GetAbsolutePathOfUserPath(chromedriver_binary) + if (not os.path.exists(chromedriver) and + util.GetPlatformName() == "win" and + not chromedriver.lower().endswith(".exe")): + chromedriver = chromedriver + ".exe" + if options.output_log_path: + options.output_log_path = util.GetAbsolutePathOfUserPath( + options.output_log_path) + + chromedriver_server = server.Server(chromedriver_binary, + log_path=options.output_log_path) + + return chromedriver_server + + +def _GetCommandLineOptions(): + """Get, parse, and error check command line options for this file.""" + usage = "usage: %prog <chromedriver binary> <input log path> [options]" + parser = optparse.OptionParser(usage=usage) + parser.add_option( + "", "--output-log-path", + help="Output verbose server logs to this file") + parser.add_option( + "", "--chrome", help="Path to a build of the chrome binary. If not\n" + "specified, uses ChromeDriver's own algorithm to find Chrome.") + parser.add_option( + "", "--base_url", help="Base url to replace logged urls (in " + "navigate, getUrl, and similar commands/responses).") + + options, args = parser.parse_args() + if not os.path.exists(args[0]): + parser.error("Path given by --chromedriver is invalid.\n" + 'Please run "%s --help" for help' % __file__) + if options.chrome and not os.path.exists(options.chrome): + parser.error("Path given by --chrome is invalid.\n" + 'Please run "%s --help" for help' % __file__) + + return options, args + + +def main(): + options, args = _GetCommandLineOptions() + server = StartChromeDriverServer(args[0], options) + input_log_path = util.GetAbsolutePathOfUserPath(args[1]) + chrome_binary = (util.GetAbsolutePathOfUserPath(options.chrome) + if options.chrome else None) + + with open(input_log_path) as logfile: + Replayer(logfile, server, chrome_binary, options.base_url).Run() + + server.Kill() + + +if __name__ == "__main__": + main()
diff --git a/chrome/test/chromedriver/log_replay/client_replay_test.py b/chrome/test/chromedriver/log_replay/client_replay_test.py new file mode 100755 index 0000000..d27a463 --- /dev/null +++ b/chrome/test/chromedriver/log_replay/client_replay_test.py
@@ -0,0 +1,230 @@ +#!/usr/bin/env python +# 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. + +"""Tests for the client_replay.py script. + +To run tests, just call this script with the intended chrome, chromedriver +binaries and an optional test filter. This file interfaces with the +client_replay mainly using the CommandSequence class. +""" +# pylint: disable=g-import-not-at-top, g-bad-import-order +import json +import optparse +import os +import re +import sys +import unittest +import client_replay + +_THIS_DIR = os.path.abspath(os.path.dirname(__file__)) +_PARENT_DIR = os.path.join(_THIS_DIR, os.pardir) +_TEST_DIR = os.path.join(_PARENT_DIR, "test") + +sys.path.insert(1, _PARENT_DIR) +import chrome_paths +import util +sys.path.remove(_PARENT_DIR) + +sys.path.insert(1, _TEST_DIR) +import unittest_util +import webserver +sys.path.remove(_TEST_DIR) +# pylint: enable=g-import-not-at-top, g-bad-import-order + + +def SubstituteVariableEntries(s): + """Identifies and removes items that can legitimately vary between runs.""" + white_list = r'(("(id|userDataDir|frameId|version|ELEMENT|message|timestamp' \ + r'|expiry|chromedriverVersion)": ' \ + r'("[0-9]\.[0-9]*(\.[0-9]*)? \([a-f0-9]*\)"|[^\s},]*))' \ + r'|CDwindow-[A-F0-9]*|cd_frame_id_="[a-f0-9]*")' + + return re.sub(white_list, "<variable_item>", s) + + +def ClearPort(s): + """Removes port numbers from urls in the given string.""" + s = re.sub(r":([0-9]){5}/", "<port>", s) + return re.sub(r"localhost:([0-9]){5}", "localhost:<port>", s) + + +class ChromeDriverClientReplayTest(unittest.TestCase): + """Base class for test cases.""" + + def __init__(self, *args, **kwargs): + super(ChromeDriverClientReplayTest, self).__init__(*args, **kwargs) + + @classmethod + def setUpClass(cls): + """Starts the server for the necessary pages for testing.""" + cls.http_server = webserver.WebServer(chrome_paths.GetTestData()) + cls.server_url = cls.http_server.GetUrl() + + @classmethod + def tearDownClass(cls): + """Tears down the server.""" + cls.http_server.Shutdown() + + def CheckResponsesMatch(self, real, logged): + """Asserts that the given pair of responses match. + + These are usually the replay response and the logged response. + Checks that they match, up to differences in session, window, element + IDs, timestamps, etc. + + Args: + real: actual response from running the command + logged: logged response, taken from the log file + """ + if not real and not logged: + return + + if isinstance(real, dict) and "message" in real: + real = "ERROR " + real["message"].split("\n")[0] + + # pylint: disable=unidiomatic-typecheck + self.assertTrue(type(logged) == type(real) + or (isinstance(real, basestring) + and isinstance(logged, basestring))) + # pylint: enable=unidiomatic-typecheck + + if isinstance(real, basestring) \ + and (real[:14] == "<!DOCTYPE html" or real[:5] == "<html"): + real = "".join(real.split()) + logged = "".join(logged.split()) + + if not isinstance(real, basestring): + real = json.dumps(real) + logged = json.dumps(logged) + + real = ClearPort(real) + logged = ClearPort(logged) + real = SubstituteVariableEntries(real) + logged = SubstituteVariableEntries(logged) + + self.assertEqual(real, logged) + + def runTest(self, log_file_relative_path): + """Runs the test. + + Args: + log_file_relative_path: relative path (from this the directory this file + is in) to the log file for this test as a string. + """ + log_file = os.path.join(_THIS_DIR, log_file_relative_path) + with open(log_file) as lf: + server = client_replay.StartChromeDriverServer(_CHROMEDRIVER, _OPTIONS) + chrome_binary = (util.GetAbsolutePathOfUserPath(_OPTIONS.chrome) + if _OPTIONS.chrome else None) + + replayer = client_replay.Replayer(lf, server, chrome_binary, + self.server_url) + real_response = None + while True: + command = replayer.command_sequence.NextCommand(real_response) + logged_response = replayer.command_sequence._last_response + if not command: + break + real_response = replayer.executor.Execute( + client_replay._COMMANDS[command.name], + command.GetPayloadPrimitive()) + + self.CheckResponsesMatch(real_response["value"], + logged_response.GetPayloadPrimitive()) + server.Kill() + + def testGetPageSource(self): + self.runTest("test_data/testPageSource.log") + + def testCloseWindow(self): + self.runTest("test_data/testCloseWindow.log") + + def testConsoleLogSources(self): + self.runTest("test_data/testConsoleLogSources.log") + + def testIFrameWithExtensionsSource(self): + self.runTest("test_data/testIFrameWithExtensionsSource.log") + + def testSendingTabKeyMovesToNextInputElement(self): + self.runTest("test_data/testSendingTabKeyMovesToNextInputElement.log") + + def testUnexpectedalertBehavior(self): + self.runTest("test_data/testUnexpectedAlertBehavior.log") + + def testDownload(self): + self.runTest("test_data/testDownload.log") + + def testCanSwitchToPrintPreviewDialog(self): + self.runTest("test_data/testCanSwitchToPrintPreviewDialog.log") + + def testClearElement(self): + self.runTest("test_data/testClearElement.log") + + def testEmulateNetwork(self): + self.runTest("test_data/testEmulateNetwork.log") + + def testSwitchTo(self): + self.runTest("test_data/testSwitchTo.log") + + def testEvaluateScript(self): + self.runTest("test_data/testEvaluateScript.log") + + def testEvaluateInvalidScript(self): + self.runTest("test_data/testEvaluateInvalidScript.log") + + def testGetTitle(self): + self.runTest("test_data/testGetTitle.log") + + def testSendCommand(self): + self.runTest("test_data/testSendCommand.log") + + def testSessionHandling(self): + self.runTest("test_data/testSessionHandling.log") + + def testRunMethod(self): + """Check the Replayer.run method, which the other tests bypass.""" + log_path = os.path.join(_THIS_DIR, "test_data/testGetTitle.log") + with open(log_path) as lf: + server = client_replay.StartChromeDriverServer(_CHROMEDRIVER, _OPTIONS) + chrome_binary = (util.GetAbsolutePathOfUserPath(_OPTIONS.chrome) + if _OPTIONS.chrome else None) + + client_replay.Replayer(lf, server, chrome_binary, self.server_url).Run() + server.Kill() + + def testChromeBinary(self): + self.runTest("test_data/testChromeBinary.log") + +def main(): + usage = "usage: %prog <chromedriver binary> [options]" + parser = optparse.OptionParser(usage=usage) + parser.add_option( + "", "--output-log-path", + help="Output verbose server logs to this file") + parser.add_option( + "", "--chrome", help="Path to the desired Chrome binary.") + parser.add_option( + "", "--filter", type="string", default="*", + help="Filter for specifying what tests to run, \"*\" will run all. E.g., " + "*testRunMethod") + + global _OPTIONS, _CHROMEDRIVER + _OPTIONS, args = parser.parse_args() + _CHROMEDRIVER = util.GetAbsolutePathOfUserPath(args[0]) + if not os.path.exists(_CHROMEDRIVER): + parser.error("Path given by --chromedriver is invalid.\n" + 'Please run "%s --help" for help' % __file__) + if _OPTIONS.chrome and not os.path.exists(_OPTIONS.chrome): + parser.error("Path given by --chrome is invalid.\n" + 'Please run "%s --help" for help' % __file__) + + all_tests_suite = unittest.defaultTestLoader.loadTestsFromModule( + sys.modules[__name__]) + tests = unittest_util.FilterTestSuite(all_tests_suite, _OPTIONS.filter) + result = unittest.TextTestRunner(stream=sys.stdout, verbosity=2).run(tests) + sys.exit(len(result.failures) + len(result.errors)) + +if __name__ == "__main__": + main() \ No newline at end of file
diff --git a/chrome/test/chromedriver/log_replay/client_replay_unittest.py b/chrome/test/chromedriver/log_replay/client_replay_unittest.py new file mode 100755 index 0000000..ee78f14 --- /dev/null +++ b/chrome/test/chromedriver/log_replay/client_replay_unittest.py
@@ -0,0 +1,330 @@ +#!/usr/bin/env python +# 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. + +"""Unit tests for the client_replay.CommandSequence class.""" + +import optparse +import os +import StringIO +import sys +import unittest + +import client_replay + +_THIS_DIR = os.path.abspath(os.path.dirname(__file__)) +_TEST_DIR = os.path.join(_THIS_DIR, os.pardir, "test") +# pylint: disable=g-import-not-at-top +sys.path.insert(1, _TEST_DIR) +import unittest_util +sys.path.remove(_TEST_DIR) +# pylint: enable=g-import-not-at-top + +_SESSION_ID = "b15232d5497ec0d8300a5a1ea56f33ce" +_SESSION_ID_ALT = "a81dc5521092a5ba132b9c0b6cf6e84f" + +_NO_PARAMS = ("[1531428669.535][INFO]: [b15232d5497ec0d8300a5a1ea56f33ce] " + "COMMAND GetTitle {\n\n}\n" + "[1531428670.535][INFO]: [b15232d5497ec0d8300a5a1ea56f33ce] " + "RESPONSE GetTitle\n") +_WITH_PARAMS = ('[1531428669.535][INFO]: [b15232d5497ec0d8300a5a1ea56f33ce] ' + 'COMMAND GetTitle {\n"param1": 7\n}\n' + '[1531428670.535][INFO]: [b15232d5497ec0d8300a5a1ea56f33ce] ' + 'RESPONSE GetTitle {\n"param2": 42\n}\n') +_COMMAND_ONLY = ('[1531428670.535][INFO]: [b15232d5497ec0d8300a5a1ea56f33ce] ' + 'COMMAND GetTitle {\n"param1": 7\n}\n') +_RESPONSE_ONLY = ('[1531428670.535][INFO]: [b15232d5497ec0d8300a5a1ea56f33ce] ' + 'RESPONSE GetTitle {\n"param2": 42\n}\n') +_PAYLOAD_SCRIPT = ('[1531428670.535][INFO]: [b15232d5497ec0d8300a5a1ea56f33ce]' + ' RESPONSE GetTitle {\n"param2": "function(){func()}"\n}\n') +_BAD_SCRIPT = ('[1531428670.535][INFO]: [b15232d5497ec0d8300a5a1ea56f33ce]' + ' RESPONSE GetTitle {\n"param2": "))}\\})}/{)}({(})}"\n}\n') +_MULTI_SESSION = ('[1531428669.535][INFO]: [b15232d5497ec0d8300a5a1ea56f33ce] ' + 'COMMAND GetSessions {\n\n}\n' + '[1531428669.535][INFO]: [a81dc5521092a5ba132b9c0b6cf6e84f] ' + 'COMMAND GetSessions {\n\n}\n' + '[1531428670.535][INFO]: [b15232d5497ec0d8300a5a1ea56f33ce] ' + 'RESPONSE GetSessions {\n"param2": 42\n}\n' + '[1531428670.535][INFO]: [a81dc5521092a5ba132b9c0b6cf6e84f] ' + 'RESPONSE GetSessions {\n"param2": 42\n}\n' + _COMMAND_ONLY) + +_WINDOW_IDS = ["CDwindow-00", "CDwindow-98", "other thing"] +_ELEMENT_ID = {"ELEMENT": "0.87-1"} +_ELEMENT_IDS = [{"ELEMENT": "0.87-1"}, {"ELEMENT": "0.87-2"}] + + +class ChromeDriverClientReplayUnitTest(unittest.TestCase): + """base class for test cases""" + + def __init__(self, *args, **kwargs): + super(ChromeDriverClientReplayUnitTest, self).__init__(*args, **kwargs) + + def testNextCommandEmptyParams(self): + string_buffer = StringIO.StringIO(_NO_PARAMS) + command_sequence = client_replay.CommandSequence() + command_sequence._parser = client_replay._Parser(string_buffer) + command = command_sequence.NextCommand(None) + response = command_sequence._last_response + + self.assertEqual(command.name, "GetTitle") + self.assertEqual(command.GetPayloadPrimitive(), {"sessionId": _SESSION_ID}) + self.assertEqual(command.session_id, _SESSION_ID) + + self.assertEqual(response.name, "GetTitle") + self.assertEqual(response.GetPayloadPrimitive(), None) + self.assertEqual(response.session_id, _SESSION_ID) + + def testNextCommandWithParams(self): + string_buffer = StringIO.StringIO(_WITH_PARAMS) + command_sequence = client_replay.CommandSequence() + command_sequence._parser = client_replay._Parser(string_buffer) + command = command_sequence.NextCommand(None) + response = command_sequence._last_response + + self.assertEqual(command.name, "GetTitle") + self.assertEqual(command.GetPayloadPrimitive(), {"param1": 7, + "sessionId": _SESSION_ID}) + self.assertEqual(command.session_id, _SESSION_ID) + + self.assertEqual(response.name, "GetTitle") + self.assertEqual(response.GetPayloadPrimitive(), {"param2": 42}) + self.assertEqual(response.session_id, _SESSION_ID) + + def testParserGetNext(self): + string_buffer = StringIO.StringIO(_WITH_PARAMS) + command_sequence = client_replay.CommandSequence() + command_sequence._parser = client_replay._Parser(string_buffer) + command = command_sequence._parser.GetNext() + + self.assertEqual(command.name, "GetTitle") + self.assertEqual(command.GetPayloadPrimitive(), {"param1": 7}) + self.assertEqual(command.session_id, _SESSION_ID) + + def testIngestLoggedResponse(self): + string_buffer = StringIO.StringIO(_RESPONSE_ONLY) + command_sequence = client_replay.CommandSequence() + command_sequence._parser = client_replay._Parser(string_buffer) + response = command_sequence._parser.GetNext() + + self.assertEqual(response.name, "GetTitle") + self.assertEqual(response.GetPayloadPrimitive(), {"param2": 42}) + self.assertEqual(response.session_id, _SESSION_ID) + + def testGetPayload_simple(self): + string_buffer = StringIO.StringIO(_RESPONSE_ONLY) + header = string_buffer.readline() + command_sequence = client_replay.CommandSequence() + command_sequence._parser = client_replay._Parser(string_buffer) + payload_string = command_sequence._parser._GetPayloadString(header) + self.assertEqual(payload_string, '{"param2": 42\n}\n') + + def testGetPayload_script(self): + string_buffer = StringIO.StringIO(_PAYLOAD_SCRIPT) + header = string_buffer.readline() + command_sequence = client_replay.CommandSequence() + command_sequence._parser = client_replay._Parser(string_buffer) + payload_string = command_sequence._parser._GetPayloadString(header) + self.assertEqual(payload_string, '{"param2": "function(){func()}"\n}\n') + + def testGetPayload_badscript(self): + string_buffer = StringIO.StringIO(_BAD_SCRIPT) + header = string_buffer.readline() + command_sequence = client_replay.CommandSequence() + command_sequence._parser = client_replay._Parser(string_buffer) + payload_string = command_sequence._parser._GetPayloadString(header) + self.assertEqual(payload_string, '{"param2": "))}\\})}/{)}({(})}"\n}\n') + + def testSubstitutePayloadIds_element(self): + id_map = {"0.78-1": "0.00-0", "0.78-2": "0.00-1"} + substituted = {"ELEMENT": "0.78-1"} + client_replay._ReplaceWindowAndElementIds(substituted, id_map) + self.assertEqual(substituted, {"ELEMENT": "0.00-0"}) + + def testSubstitutePayloadIds_elements(self): + id_map = {"0.78-1": "0.00-0", "0.78-2": "0.00-1"} + substituted = [{"ELEMENT": "0.78-1"}, {"ELEMENT": "0.78-2"}] + client_replay._ReplaceWindowAndElementIds(substituted, id_map) + self.assertEqual(substituted, + [{"ELEMENT": "0.00-0"}, {"ELEMENT": "0.00-1"}]) + + def testSubstitutePayloadIds_windows(self): + id_map = {"CDwindow-98": "CDwindow-00"} + substituted = ["CDwindow-98"] + client_replay._ReplaceWindowAndElementIds(substituted, id_map) + self.assertEqual(substituted, ["CDwindow-00"]) + + def testSubstitutePayloadIds_recursion(self): + id_map = {"0.78-1": "0.00-0", "0.78-2": "0.00-1"} + substituted = {"args": [{"1": "0.78-1", "2": "0.78-2"}]} + client_replay._ReplaceWindowAndElementIds(substituted, id_map) + self.assertEqual(substituted, {"args": [{"1": "0.00-0", "2": "0.00-1"}]}) + + def testGetAnyElementids_window(self): + ids = client_replay._GetAnyElementIds(_WINDOW_IDS) + self.assertEqual(ids, ["CDwindow-00", "CDwindow-98"]) + + def testGetAnyElementids_element(self): + ids = client_replay._GetAnyElementIds(_ELEMENT_ID) + self.assertEqual(ids, ["0.87-1"]) + + def testGetAnyElementids_elements(self): + ids = client_replay._GetAnyElementIds(_ELEMENT_IDS) + self.assertEqual(ids, ["0.87-1", "0.87-2"]) + + def testGetAnyElementids_string(self): + ids = client_replay._GetAnyElementIds("true") + self.assertEqual(ids, None) + + def testGetAnyElementids_invalid(self): + ids = client_replay._GetAnyElementIds("[ gibberish ]") + self.assertEqual(ids, None) + + def testCountChar_positive(self): + self.assertEqual(client_replay._CountChar("{;{;{)]", "{", "}"), 3) + + def testCountChar_onebrace(self): + self.assertEqual(client_replay._CountChar("{", "{", "}"), 1) + + def testCountChar_nothing(self): + self.assertEqual(client_replay._CountChar("", "{", "}"), 0) + + def testCountChar_negative(self): + self.assertEqual(client_replay._CountChar("}){((}{(/)}=}", "{", "}"), -2) + + def testCountChar_quotes(self): + self.assertEqual( + client_replay._CountChar('[[][]"[[]]]]]"[[]', "[", "]"), 2) + + def testReplaceUrl_simple(self): + base_url = "https://base.url.test.com:0000" + payload = {"url": "https://localhost:12345/"} + client_replay._ReplaceUrl(payload, base_url) + self.assertEqual(payload, {"url": "https://base.url.test.com:0000/"}) + + def testReplaceUrl_nothing(self): + payload = {"url": "https://localhost:12345/"} + client_replay._ReplaceUrl(payload, None) + self.assertEqual(payload, {"url": "https://localhost:12345/"}) + + def testReplaceBinary(self): + payload_dict = { + "desiredCapabilities": { + "chromeOptions": { + "binary": "/path/to/logged binary/with spaces/" + }, + "other_things": ["some", "uninteresting", "strings"] + } + } + payload_replaced = { + "desiredCapabilities": { + "chromeOptions": { + "binary": "replacement_binary" + }, + "other_things": ["some", "uninteresting", "strings"] + } + } + client_replay._ReplaceBinary(payload_dict, "replacement_binary") + self.assertEqual(payload_replaced, payload_dict) + + def testReplaceBinary_none(self): + payload_dict = { + "desiredCapabilities": { + "chromeOptions": { + "binary": "/path/to/logged binary/with spaces/" + }, + "other_things": ["some", "uninteresting", "strings"] + } + } + payload_replaced = { + "desiredCapabilities": { + "chromeOptions": {}, + "other_things": ["some", "uninteresting", "strings"] + } + } + client_replay._ReplaceBinary(payload_dict, None) + self.assertEqual(payload_replaced, payload_dict) + + def testReplaceBinary_nocapabilities(self): + payload_dict = {"desiredCapabilities": {}} + payload_replaced = { + "desiredCapabilities": { + "chromeOptions": { + "binary": "replacement_binary" + } + } + } + client_replay._ReplaceBinary(payload_dict, "replacement_binary") + self.assertEqual(payload_replaced, payload_dict) + + def testGetCommandName(self): + self.assertEqual(client_replay._GetCommandName(_PAYLOAD_SCRIPT), "GetTitle") + + def testGetSessionId(self): + self.assertEqual(client_replay._GetSessionId(_PAYLOAD_SCRIPT), + _SESSION_ID) + + def testParseCommand_true(self): + string_buffer = StringIO.StringIO(_COMMAND_ONLY) + command_sequence = client_replay.CommandSequence() + command_sequence._parser = client_replay._Parser(string_buffer) + self.assertTrue(command_sequence._parser.GetNext().IsCommand()) + + def testParseCommand_false(self): + string_buffer = StringIO.StringIO(_RESPONSE_ONLY) + command_sequence = client_replay.CommandSequence() + command_sequence._parser = client_replay._Parser(string_buffer) + self.assertFalse(command_sequence._parser.GetNext().IsCommand()) + + def testParseResponse_true(self): + string_buffer = StringIO.StringIO(_RESPONSE_ONLY) + command_sequence = client_replay.CommandSequence() + command_sequence._parser = client_replay._Parser(string_buffer) + self.assertTrue(command_sequence._parser.GetNext().IsResponse()) + + def testParseResponse_false(self): + string_buffer = StringIO.StringIO(_COMMAND_ONLY) + command_sequence = client_replay.CommandSequence() + command_sequence._parser = client_replay._Parser(string_buffer) + self.assertFalse(command_sequence._parser.GetNext().IsResponse()) + + def testHandleGetSessions(self): + string_buffer = StringIO.StringIO(_MULTI_SESSION) + command_sequence = client_replay.CommandSequence(string_buffer) + first_command = command_sequence._parser.GetNext() + command = command_sequence._HandleGetSessions( + first_command) + responses = command_sequence._last_response + + self.assertEqual(command.name, "GetSessions") + self.assertEqual(command.GetPayloadPrimitive(), {}) + self.assertEqual(command.session_id, _SESSION_ID) + + self.assertEqual(responses.name, "GetSessions") + self.assertEqual(responses.GetPayloadPrimitive(), [ + { + "capabilities": {"param2": 42}, + "id": _SESSION_ID + }, { + "capabilities": {"param2": 42}, + "id": _SESSION_ID_ALT + } + ]) + self.assertEqual(responses.session_id, "") + self.assertEqual(command_sequence._parser._saved_log_entry.name, "GetTitle") + + +if __name__ == "__main__": + parser = optparse.OptionParser() + parser.add_option( + "", "--filter", type="string", default="*", + help=('Filter for specifying what tests to run, "*" will run all. E.g., ' + "*testReplaceUrl_nothing")) + + options, _ = parser.parse_args() + + all_tests_suite = unittest.defaultTestLoader.loadTestsFromModule( + sys.modules[__name__]) + tests = unittest_util.FilterTestSuite(all_tests_suite, options.filter) + result = unittest.TextTestRunner(stream=sys.stdout, verbosity=2).run(tests) + sys.exit(len(result.failures) + len(result.errors))
diff --git a/chrome/test/chromedriver/log_replay/test_data/testCanSwitchToPrintPreviewDialog.log b/chrome/test/chromedriver/log_replay/test_data/testCanSwitchToPrintPreviewDialog.log new file mode 100644 index 0000000..adaa5168 --- /dev/null +++ b/chrome/test/chromedriver/log_replay/test_data/testCanSwitchToPrintPreviewDialog.log
@@ -0,0 +1,962 @@ +[1532465687.788][INFO]: [34030c426d7b7daf5749d665c50002b4] COMMAND InitSession { + "desiredCapabilities": { + "chromeOptions": { + "args": [ "no-sandbox", "disable-gpu" ], + "binary": "/usr/local/google/home/cwinstanley/chromium/src/out/Default/chrome" + }, + "goog:testName": "__main__.ChromeDriverTest.testCanSwitchToPrintPreviewDialog", + "loggingPrefs": { + + } + } +} +[1532465687.789][INFO]: Populating Preferences file: { + "alternate_error_pages": { + "enabled": false + }, + "autofill": { + "enabled": false + }, + "browser": { + "check_default_browser": false + }, + "distribution": { + "import_bookmarks": false, + "import_history": false, + "import_search_engine": false, + "make_chrome_default_for_user": false, + "skip_first_run_ui": true + }, + "dns_prefetching": { + "enabled": false + }, + "profile": { + "content_settings": { + "pattern_pairs": { + "https://*,*": { + "media-stream": { + "audio": "Default", + "video": "Default" + } + } + } + }, + "default_content_setting_values": { + "geolocation": 1 + }, + "default_content_settings": { + "geolocation": 1, + "mouselock": 1, + "notifications": 1, + "popups": 1, + "ppapi-broker": 1 + }, + "password_manager_enabled": false + }, + "safebrowsing": { + "enabled": false + }, + "search": { + "suggest_enabled": false + }, + "translate": { + "enabled": false + } +} +[1532465687.789][INFO]: Populating Local State file: { + "background_mode": { + "enabled": false + }, + "ssl": { + "rev_checking": { + "enabled": false + } + } +} +[1532465687.791][INFO]: Launching chrome: /usr/local/google/home/cwinstanley/chromium/src/out/Default/chrome --disable-background-networking --disable-client-side-phishing-detection --disable-default-apps --disable-gpu --disable-hang-monitor --disable-popup-blocking --disable-prompt-on-repost --disable-sync --disable-web-resources --enable-automation --enable-logging --force-fieldtrials=SiteIsolationExtensions/Control --ignore-certificate-errors --load-extension=/tmp/.org.chromium.Chromium.5kZuq5/internal --log-level=0 --metrics-recording-only --no-first-run --no-sandbox --password-store=basic --remote-debugging-port=0 --test-type=webdriver --use-mock-keychain --user-data-dir=/tmp/.org.chromium.Chromium.G34iMA data:, +[244620:244620:0724/135449.689459:ERROR:gpu_process_transport_factory.cc(642)] Switching to software compositing. +[244620:244620:0724/135449.689526:ERROR:gpu_process_transport_factory.cc(1007)] Lost UI shared context. +[244620:244620:0724/135449.766536:WARNING:account_consistency_mode_manager.cc(290)] Desktop Identity Consistency cannot be enabled as no OAuth client ID and client secret have been configured. +[244620:244620:0724/135449.766676:WARNING:account_consistency_mode_manager.cc(290)] Desktop Identity Consistency cannot be enabled as no OAuth client ID and client secret have been configured. +[244620:244620:0724/135449.766735:WARNING:account_consistency_mode_manager.cc(290)] Desktop Identity Consistency cannot be enabled as no OAuth client ID and client secret have been configured. +[244620:244620:0724/135449.766781:WARNING:account_consistency_mode_manager.cc(290)] Desktop Identity Consistency cannot be enabled as no OAuth client ID and client secret have been configured. +[244620:244620:0724/135449.767778:WARNING:account_consistency_mode_manager.cc(290)] Desktop Identity Consistency cannot be enabled as no OAuth client ID and client secret have been configured. +[244620:244620:0724/135449.774644:WARNING:account_consistency_mode_manager.cc(290)] Desktop Identity Consistency cannot be enabled as no OAuth client ID and client secret have been configured. +[244620:244620:0724/135449.817988:WARNING:account_consistency_mode_manager.cc(290)] Desktop Identity Consistency cannot be enabled as no OAuth client ID and client secret have been configured. +[244620:244620:0724/135449.851316:WARNING:account_consistency_mode_manager.cc(290)] Desktop Identity Consistency cannot be enabled as no OAuth client ID and client secret have been configured. +[244620:244620:0724/135449.851398:WARNING:account_consistency_mode_manager.cc(290)] Desktop Identity Consistency cannot be enabled as no OAuth client ID and client secret have been configured. + +DevTools listening on ws://127.0.0.1:46037/devtools/browser/8d156d15-98bc-4f9f-9fd1-1cf9996b4db8 +[1532465689.883][DEBUG]: DevTools request: http://localhost:46037/json/version +[244620:244620:0724/135449.994659:WARNING:password_store_factory.cc(253)] Using basic (unencrypted) store for password storage. See https://chromium.googlesource.com/chromium/src/+/master/docs/linux_password_storage.md for more information about password storage options. +[244620:244620:0724/135449.998320:WARNING:account_consistency_mode_manager.cc(290)] Desktop Identity Consistency cannot be enabled as no OAuth client ID and client secret have been configured. +[1532465690.212][DEBUG]: DevTools response: { + "Browser": "Chrome/69.0.3491.0", + "Protocol-Version": "1.3", + "User-Agent": "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/69.0.3491.0 Safari/537.36", + "V8-Version": "6.9.389", + "WebKit-Version": "537.36 (@410f2c4912d46a5fae2fe6c0b2e24d9eb6359761)", + "webSocketDebuggerUrl": "ws://localhost:46037/devtools/browser/8d156d15-98bc-4f9f-9fd1-1cf9996b4db8" +} + +[1532465690.247][DEBUG]: DevTools request: http://localhost:46037/json +[1532465690.261][DEBUG]: DevTools response: [ { + "description": "", + "devtoolsFrontendUrl": "/devtools/inspector.html?ws=localhost:46037/devtools/page/BC3EFA586FCFF9B465F014DB477688A0", + "id": "BC3EFA586FCFF9B465F014DB477688A0", + "title": "Chrome Automation Extension", + "type": "background_page", + "url": "chrome-extension://aapnijgdinlhnhlmodcfapnahmbfebeb/_generated_background_page.html", + "webSocketDebuggerUrl": "ws://localhost:46037/devtools/page/BC3EFA586FCFF9B465F014DB477688A0" +}, { + "description": "", + "devtoolsFrontendUrl": "/devtools/inspector.html?ws=localhost:46037/devtools/page/5C8367BC91409B81F30373EC8CCDB897", + "id": "5C8367BC91409B81F30373EC8CCDB897", + "title": "", + "type": "page", + "url": "data:,", + "webSocketDebuggerUrl": "ws://localhost:46037/devtools/page/5C8367BC91409B81F30373EC8CCDB897" +} ] + +[1532465690.261][DEBUG]: DevTools request: http://localhost:46037/json +[1532465690.297][DEBUG]: DevTools response: [ { + "description": "", + "devtoolsFrontendUrl": "/devtools/inspector.html?ws=localhost:46037/devtools/page/BC3EFA586FCFF9B465F014DB477688A0", + "id": "BC3EFA586FCFF9B465F014DB477688A0", + "title": "Chrome Automation Extension", + "type": "background_page", + "url": "chrome-extension://aapnijgdinlhnhlmodcfapnahmbfebeb/_generated_background_page.html", + "webSocketDebuggerUrl": "ws://localhost:46037/devtools/page/BC3EFA586FCFF9B465F014DB477688A0" +}, { + "description": "", + "devtoolsFrontendUrl": "/devtools/inspector.html?ws=localhost:46037/devtools/page/5C8367BC91409B81F30373EC8CCDB897", + "id": "5C8367BC91409B81F30373EC8CCDB897", + "title": "", + "type": "page", + "url": "data:,", + "webSocketDebuggerUrl": "ws://localhost:46037/devtools/page/5C8367BC91409B81F30373EC8CCDB897" +} ] + +[1532465690.299][INFO]: resolved localhost to ["::1","127.0.0.1"] +[1532465690.302][DEBUG]: DEVTOOLS COMMAND Log.enable (id=1) { + +} +[1532465690.302][DEBUG]: DEVTOOLS COMMAND DOM.getDocument (id=2) { + +} +[1532465690.303][DEBUG]: DEVTOOLS COMMAND Target.setAutoAttach (id=3) { + "autoAttach": true, + "waitForDebuggerOnStart": false +} +[1532465690.303][DEBUG]: DEVTOOLS COMMAND Page.enable (id=4) { + +} +[1532465690.303][DEBUG]: DEVTOOLS COMMAND Page.enable (id=5) { + +} +[1532465690.336][DEBUG]: DEVTOOLS RESPONSE Log.enable (id=1) { + +} +[1532465690.337][DEBUG]: DEVTOOLS RESPONSE DOM.getDocument (id=2) { + "root": { + "backendNodeId": 1, + "baseURL": "about:blank", + "childNodeCount": 1, + "children": [ { + "attributes": [ ], + "backendNodeId": 2, + "childNodeCount": 2, + "children": [ { + "attributes": [ ], + "backendNodeId": 3, + "childNodeCount": 0, + "localName": "head", + "nodeId": 3, + "nodeName": "HEAD", + "nodeType": 1, + "nodeValue": "", + "parentId": 2 + }, { + "attributes": [ ], + "backendNodeId": 4, + "childNodeCount": 0, + "localName": "body", + "nodeId": 4, + "nodeName": "BODY", + "nodeType": 1, + "nodeValue": "", + "parentId": 2 + } ], + "frameId": "5C8367BC91409B81F30373EC8CCDB897", + "localName": "html", + "nodeId": 2, + "nodeName": "HTML", + "nodeType": 1, + "nodeValue": "", + "parentId": 1 + } ], + "documentURL": "", + "localName": "", + "nodeId": 1, + "nodeName": "#document", + "nodeType": 9, + "nodeValue": "", + "xmlVersion": "" + } +} +[1532465690.337][DEBUG]: DEVTOOLS RESPONSE Target.setAutoAttach (id=3) { + +} +[1532465690.337][DEBUG]: DEVTOOLS RESPONSE Page.enable (id=4) { + +} +[1532465690.337][DEBUG]: DEVTOOLS RESPONSE Page.enable (id=5) { + +} +[1532465690.337][DEBUG]: DEVTOOLS COMMAND Runtime.enable (id=6) { + +} +[1532465690.419][DEBUG]: DEVTOOLS EVENT Page.frameNavigated { + "frame": { + "id": "5C8367BC91409B81F30373EC8CCDB897", + "loaderId": "9389AC358D2553F9E69F2D86B2733C63", + "mimeType": "text/plain", + "securityOrigin": "://", + "url": "data:," + } +} +[1532465690.419][DEBUG]: DEVTOOLS EVENT DOM.documentUpdated { + +} +[1532465690.419][DEBUG]: DEVTOOLS COMMAND DOM.getDocument (id=7) { + +} +[1532465690.420][DEBUG]: DEVTOOLS EVENT Page.loadEventFired { + "timestamp": 78374.700041 +} +[1532465690.420][DEBUG]: DEVTOOLS EVENT Page.frameStoppedLoading { + "frameId": "5C8367BC91409B81F30373EC8CCDB897" +} +[1532465690.420][DEBUG]: DEVTOOLS EVENT DOM.documentUpdated { + +} +[1532465690.420][DEBUG]: DEVTOOLS COMMAND DOM.getDocument (id=8) { + +} +[1532465690.420][DEBUG]: DEVTOOLS EVENT Page.domContentEventFired { + "timestamp": 78374.703013 +} +[1532465690.433][DEBUG]: DEVTOOLS EVENT Runtime.executionContextCreated { + "context": { + "auxData": { + "frameId": "5C8367BC91409B81F30373EC8CCDB897", + "isDefault": true + }, + "id": 1, + "name": "", + "origin": "://" + } +} +[1532465690.433][DEBUG]: DEVTOOLS RESPONSE Runtime.enable (id=6) { + +} +[1532465690.433][DEBUG]: DEVTOOLS EVENT Page.frameResized { + +} +[1532465690.439][DEBUG]: DEVTOOLS RESPONSE DOM.getDocument (id=7) { + "root": { + "backendNodeId": 5, + "baseURL": "data:,", + "childNodeCount": 1, + "children": [ { + "attributes": [ ], + "backendNodeId": 6, + "childNodeCount": 2, + "children": [ { + "attributes": [ ], + "backendNodeId": 7, + "childNodeCount": 0, + "localName": "head", + "nodeId": 7, + "nodeName": "HEAD", + "nodeType": 1, + "nodeValue": "", + "parentId": 6 + }, { + "attributes": [ ], + "backendNodeId": 8, + "childNodeCount": 0, + "localName": "body", + "nodeId": 8, + "nodeName": "BODY", + "nodeType": 1, + "nodeValue": "", + "parentId": 6 + } ], + "frameId": "5C8367BC91409B81F30373EC8CCDB897", + "localName": "html", + "nodeId": 6, + "nodeName": "HTML", + "nodeType": 1, + "nodeValue": "", + "parentId": 5 + } ], + "documentURL": "data:,", + "localName": "", + "nodeId": 5, + "nodeName": "#document", + "nodeType": 9, + "nodeValue": "", + "xmlVersion": "" + } +} +[1532465690.440][DEBUG]: DEVTOOLS RESPONSE DOM.getDocument (id=8) { + "root": { + "backendNodeId": 5, + "baseURL": "data:,", + "childNodeCount": 1, + "children": [ { + "attributes": [ ], + "backendNodeId": 6, + "childNodeCount": 2, + "children": [ { + "attributes": [ ], + "backendNodeId": 7, + "childNodeCount": 0, + "localName": "head", + "nodeId": 11, + "nodeName": "HEAD", + "nodeType": 1, + "nodeValue": "", + "parentId": 10 + }, { + "attributes": [ ], + "backendNodeId": 8, + "childNodeCount": 0, + "localName": "body", + "nodeId": 12, + "nodeName": "BODY", + "nodeType": 1, + "nodeValue": "", + "parentId": 10 + } ], + "frameId": "5C8367BC91409B81F30373EC8CCDB897", + "localName": "html", + "nodeId": 10, + "nodeName": "HTML", + "nodeType": 1, + "nodeValue": "", + "parentId": 9 + } ], + "documentURL": "data:,", + "localName": "", + "nodeId": 9, + "nodeName": "#document", + "nodeType": 9, + "nodeValue": "", + "xmlVersion": "" + } +} +[1532465690.441][DEBUG]: DEVTOOLS COMMAND Page.enable (id=9) { + +} +[1532465690.462][DEBUG]: DEVTOOLS RESPONSE Page.enable (id=9) { + +} +[1532465690.462][DEBUG]: DEVTOOLS COMMAND Runtime.enable (id=10) { + +} +[1532465690.474][DEBUG]: DEVTOOLS RESPONSE Runtime.enable (id=10) { + +} +[1532465690.475][DEBUG]: DEVTOOLS COMMAND Runtime.evaluate (id=11) { + "expression": "(function() { // Copyright (c) 2012 The Chromium Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style license that can be\n// found in the LICENSE file.\n\n/**\n * Enum f...", + "returnByValue": true +} +[1532465690.496][DEBUG]: DEVTOOLS RESPONSE Runtime.evaluate (id=11) { + "result": { + "type": "object", + "value": { + "status": 0, + "value": 1 + } + } +} +[1532465690.497][INFO]: [34030c426d7b7daf5749d665c50002b4] RESPONSE InitSession { + "acceptInsecureCerts": false, + "acceptSslCerts": false, + "applicationCacheEnabled": false, + "browserConnectionEnabled": false, + "browserName": "chrome", + "chrome": { + "chromedriverVersion": "2.40 (1ba6d2ec0853ea1d507bccc09f540f5ea1db0394)", + "userDataDir": "/tmp/.org.chromium.Chromium.G34iMA" + }, + "cssSelectorsEnabled": true, + "databaseEnabled": false, + "goog:chromeOptions": { + "debuggerAddress": "localhost:46037" + }, + "handlesAlerts": true, + "hasTouchScreen": false, + "javascriptEnabled": true, + "locationContextEnabled": true, + "mobileEmulationEnabled": false, + "nativeEvents": true, + "networkConnectionEnabled": false, + "pageLoadStrategy": "normal", + "platform": "Linux", + "rotatable": false, + "setWindowRect": true, + "takesHeapSnapshot": true, + "takesScreenshot": true, + "unexpectedAlertBehaviour": "", + "version": "69.0.3491.0", + "webStorageEnabled": true +} +[1532465690.498][INFO]: [34030c426d7b7daf5749d665c50002b4] COMMAND GetWindows { + +} +[1532465690.498][DEBUG]: DevTools request: http://localhost:46037/json +[1532465690.503][DEBUG]: DevTools response: [ { + "description": "", + "devtoolsFrontendUrl": "/devtools/inspector.html?ws=localhost:46037/devtools/page/BC3EFA586FCFF9B465F014DB477688A0", + "id": "BC3EFA586FCFF9B465F014DB477688A0", + "title": "Chrome Automation Extension", + "type": "background_page", + "url": "chrome-extension://aapnijgdinlhnhlmodcfapnahmbfebeb/_generated_background_page.html", + "webSocketDebuggerUrl": "ws://localhost:46037/devtools/page/BC3EFA586FCFF9B465F014DB477688A0" +}, { + "description": "", + "devtoolsFrontendUrl": "/devtools/inspector.html?ws=localhost:46037/devtools/page/5C8367BC91409B81F30373EC8CCDB897", + "id": "5C8367BC91409B81F30373EC8CCDB897", + "title": "data:,", + "type": "page", + "url": "data:,", + "webSocketDebuggerUrl": "ws://localhost:46037/devtools/page/5C8367BC91409B81F30373EC8CCDB897" +} ] + +[1532465690.503][INFO]: [34030c426d7b7daf5749d665c50002b4] RESPONSE GetWindows [ "CDwindow-5C8367BC91409B81F30373EC8CCDB897" ] +[1532465690.505][INFO]: [34030c426d7b7daf5749d665c50002b4] COMMAND ExecuteScript { + "args": [ ], + "script": "setTimeout(function(){window.print();}, 0);" +} +[1532465690.505][INFO]: Waiting for pending navigations... +[1532465690.505][DEBUG]: DEVTOOLS COMMAND Runtime.evaluate (id=12) { + "expression": "1" +} +[1532465690.508][DEBUG]: DEVTOOLS RESPONSE Runtime.evaluate (id=12) { + "result": { + "description": "1", + "type": "number", + "value": 1 + } +} +[1532465690.508][INFO]: Done waiting for pending navigations. Status: ok +[1532465690.509][DEBUG]: DEVTOOLS COMMAND Runtime.evaluate (id=13) { + "expression": "(function() { // Copyright (c) 2012 The Chromium Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style license that can be\n// found in the LICENSE file.\n\n/**\n * Enum f...", + "returnByValue": true +} +[1532465690.520][DEBUG]: DEVTOOLS RESPONSE Runtime.evaluate (id=13) { + "result": { + "type": "object", + "value": { + "status": 0 + } + } +} +[1532465690.521][INFO]: Waiting for pending navigations... +[1532465690.521][DEBUG]: DEVTOOLS COMMAND Runtime.evaluate (id=14) { + "expression": "1" +} +[1532465690.571][DEBUG]: DEVTOOLS RESPONSE Runtime.evaluate (id=14) { + "result": { + "description": "1", + "type": "number", + "value": 1 + } +} +[1532465690.572][INFO]: Done waiting for pending navigations. Status: ok +[1532465690.572][INFO]: [34030c426d7b7daf5749d665c50002b4] RESPONSE ExecuteScript +[1532465690.573][INFO]: [34030c426d7b7daf5749d665c50002b4] COMMAND GetWindows { + +} +[1532465690.573][DEBUG]: DevTools request: http://localhost:46037/json +[1532465690.575][DEBUG]: DevTools response: [ { + "description": "", + "devtoolsFrontendUrl": "/devtools/inspector.html?ws=localhost:46037/devtools/page/336FDBF833C7472DBC17C4050248E417", + "id": "336FDBF833C7472DBC17C4050248E417", + "title": "", + "type": "other", + "url": "chrome://print/", + "webSocketDebuggerUrl": "ws://localhost:46037/devtools/page/336FDBF833C7472DBC17C4050248E417" +}, { + "description": "", + "devtoolsFrontendUrl": "/devtools/inspector.html?ws=localhost:46037/devtools/page/BC3EFA586FCFF9B465F014DB477688A0", + "id": "BC3EFA586FCFF9B465F014DB477688A0", + "title": "Chrome Automation Extension", + "type": "background_page", + "url": "chrome-extension://aapnijgdinlhnhlmodcfapnahmbfebeb/_generated_background_page.html", + "webSocketDebuggerUrl": "ws://localhost:46037/devtools/page/BC3EFA586FCFF9B465F014DB477688A0" +}, { + "description": "", + "devtoolsFrontendUrl": "/devtools/inspector.html?ws=localhost:46037/devtools/page/5C8367BC91409B81F30373EC8CCDB897", + "id": "5C8367BC91409B81F30373EC8CCDB897", + "title": "data:,", + "type": "page", + "url": "data:,", + "webSocketDebuggerUrl": "ws://localhost:46037/devtools/page/5C8367BC91409B81F30373EC8CCDB897" +} ] + +[1532465690.576][INFO]: [34030c426d7b7daf5749d665c50002b4] RESPONSE GetWindows [ "CDwindow-5C8367BC91409B81F30373EC8CCDB897", "CDwindow-336FDBF833C7472DBC17C4050248E417" ] +[1532465690.578][INFO]: [34030c426d7b7daf5749d665c50002b4] COMMAND SwitchToWindow { + "name": "CDwindow-336FDBF833C7472DBC17C4050248E417" +} +[1532465690.578][DEBUG]: DevTools request: http://localhost:46037/json +[1532465690.579][DEBUG]: DevTools response: [ { + "description": "", + "devtoolsFrontendUrl": "/devtools/inspector.html?ws=localhost:46037/devtools/page/336FDBF833C7472DBC17C4050248E417", + "id": "336FDBF833C7472DBC17C4050248E417", + "title": "", + "type": "other", + "url": "chrome://print/", + "webSocketDebuggerUrl": "ws://localhost:46037/devtools/page/336FDBF833C7472DBC17C4050248E417" +}, { + "description": "", + "devtoolsFrontendUrl": "/devtools/inspector.html?ws=localhost:46037/devtools/page/BC3EFA586FCFF9B465F014DB477688A0", + "id": "BC3EFA586FCFF9B465F014DB477688A0", + "title": "Chrome Automation Extension", + "type": "background_page", + "url": "chrome-extension://aapnijgdinlhnhlmodcfapnahmbfebeb/_generated_background_page.html", + "webSocketDebuggerUrl": "ws://localhost:46037/devtools/page/BC3EFA586FCFF9B465F014DB477688A0" +}, { + "description": "", + "devtoolsFrontendUrl": "/devtools/inspector.html?ws=localhost:46037/devtools/page/5C8367BC91409B81F30373EC8CCDB897", + "id": "5C8367BC91409B81F30373EC8CCDB897", + "title": "data:,", + "type": "page", + "url": "data:,", + "webSocketDebuggerUrl": "ws://localhost:46037/devtools/page/5C8367BC91409B81F30373EC8CCDB897" +} ] + +[1532465690.580][DEBUG]: DevTools request: http://localhost:46037/json/activate/336FDBF833C7472DBC17C4050248E417 +[1532465690.581][DEBUG]: DevTools response: Target activated +[1532465690.581][INFO]: [34030c426d7b7daf5749d665c50002b4] RESPONSE SwitchToWindow +[1532465690.582][INFO]: [34030c426d7b7daf5749d665c50002b4] COMMAND GetUrl { + +} +[1532465690.583][INFO]: resolved localhost to ["::1","127.0.0.1"] +[1532465690.584][DEBUG]: DEVTOOLS COMMAND Log.enable (id=1) { + +} +[1532465690.584][DEBUG]: DEVTOOLS COMMAND DOM.getDocument (id=2) { + +} +[1532465690.585][DEBUG]: DEVTOOLS COMMAND Target.setAutoAttach (id=3) { + "autoAttach": true, + "waitForDebuggerOnStart": false +} +[1532465690.585][DEBUG]: DEVTOOLS COMMAND Page.enable (id=4) { + +} +[1532465690.585][DEBUG]: DEVTOOLS COMMAND Page.enable (id=5) { + +} +[1532465690.678][DEBUG]: DEVTOOLS RESPONSE Log.enable (id=1) { + +} +[1532465690.679][DEBUG]: DEVTOOLS RESPONSE DOM.getDocument (id=2) { + "root": { + "backendNodeId": 1, + "baseURL": "about:blank", + "childNodeCount": 1, + "children": [ { + "attributes": [ ], + "backendNodeId": 2, + "childNodeCount": 2, + "children": [ { + "attributes": [ ], + "backendNodeId": 3, + "childNodeCount": 0, + "localName": "head", + "nodeId": 3, + "nodeName": "HEAD", + "nodeType": 1, + "nodeValue": "", + "parentId": 2 + }, { + "attributes": [ ], + "backendNodeId": 4, + "childNodeCount": 0, + "localName": "body", + "nodeId": 4, + "nodeName": "BODY", + "nodeType": 1, + "nodeValue": "", + "parentId": 2 + } ], + "frameId": "336FDBF833C7472DBC17C4050248E417", + "localName": "html", + "nodeId": 2, + "nodeName": "HTML", + "nodeType": 1, + "nodeValue": "", + "parentId": 1 + } ], + "documentURL": "", + "localName": "", + "nodeId": 1, + "nodeName": "#document", + "nodeType": 9, + "nodeValue": "", + "xmlVersion": "" + } +} +[1532465690.680][DEBUG]: DEVTOOLS RESPONSE Target.setAutoAttach (id=3) { + +} +[1532465690.680][DEBUG]: DEVTOOLS RESPONSE Page.enable (id=4) { + +} +[1532465690.680][DEBUG]: DEVTOOLS RESPONSE Page.enable (id=5) { + +} +[1532465690.680][DEBUG]: DEVTOOLS COMMAND Runtime.enable (id=6) { + +} +[1532465690.831][DEBUG]: DEVTOOLS EVENT Page.frameNavigated { + "frame": { + "id": "336FDBF833C7472DBC17C4050248E417", + "loaderId": "6917444EFA0CB39CAD7230DF5C7CD794", + "mimeType": "text/html", + "securityOrigin": "chrome://print", + "url": "chrome://print/" + } +} +[1532465690.832][DEBUG]: DEVTOOLS EVENT DOM.documentUpdated { + +} +[1532465690.832][DEBUG]: DEVTOOLS COMMAND DOM.getDocument (id=7) { + +} +[1532465690.832][DEBUG]: DEVTOOLS EVENT Runtime.executionContextCreated { + "context": { + "auxData": { + "frameId": "336FDBF833C7472DBC17C4050248E417", + "isDefault": true + }, + "id": 1, + "name": "", + "origin": "chrome://print" + } +} +[1532465690.832][DEBUG]: DEVTOOLS RESPONSE Runtime.enable (id=6) { + +} +[1532465690.865][DEBUG]: DEVTOOLS RESPONSE DOM.getDocument (id=7) { + "root": { + "backendNodeId": 5, + "baseURL": "chrome://print/", + "childNodeCount": 2, + "children": [ { + "backendNodeId": 6, + "localName": "", + "nodeId": 6, + "nodeName": "html", + "nodeType": 10, + "nodeValue": "", + "parentId": 5, + "publicId": "", + "systemId": "" + }, { + "attributes": [ "id", "print-preview", "class", "focus-outline-visible", "i18n-values", "dir:textdirection;lang:language" ], + "backendNodeId": 7, + "childNodeCount": 1, + "children": [ { + "attributes": [ ], + "backendNodeId": 8, + "childNodeCount": 30, + "localName": "head", + "nodeId": 8, + "nodeName": "HEAD", + "nodeType": 1, + "nodeValue": "", + "parentId": 7 + } ], + "frameId": "336FDBF833C7472DBC17C4050248E417", + "localName": "html", + "nodeId": 7, + "nodeName": "HTML", + "nodeType": 1, + "nodeValue": "", + "parentId": 5 + } ], + "documentURL": "chrome://print/", + "localName": "", + "nodeId": 5, + "nodeName": "#document", + "nodeType": 9, + "nodeValue": "", + "xmlVersion": "" + } +} +[1532465690.865][DEBUG]: DEVTOOLS COMMAND Page.enable (id=8) { + +} +[1532465690.981][DEBUG]: DEVTOOLS EVENT DOM.childNodeCountUpdated { + "childNodeCount": 31, + "nodeId": 8 +} +[1532465690.981][DEBUG]: DEVTOOLS EVENT DOM.childNodeCountUpdated { + "childNodeCount": 32, + "nodeId": 8 +} +[1532465690.981][DEBUG]: DEVTOOLS EVENT DOM.childNodeCountUpdated { + "childNodeCount": 33, + "nodeId": 8 +} +[1532465690.981][DEBUG]: DEVTOOLS EVENT DOM.childNodeCountUpdated { + "childNodeCount": 34, + "nodeId": 8 +} +[1532465690.981][DEBUG]: DEVTOOLS EVENT DOM.childNodeCountUpdated { + "childNodeCount": 35, + "nodeId": 8 +} +[1532465690.981][DEBUG]: DEVTOOLS EVENT DOM.childNodeCountUpdated { + "childNodeCount": 36, + "nodeId": 8 +} +[1532465690.981][DEBUG]: DEVTOOLS EVENT DOM.childNodeCountUpdated { + "childNodeCount": 37, + "nodeId": 8 +} +[1532465690.982][DEBUG]: DEVTOOLS EVENT DOM.childNodeCountUpdated { + "childNodeCount": 38, + "nodeId": 8 +} +[1532465690.982][DEBUG]: DEVTOOLS EVENT DOM.childNodeCountUpdated { + "childNodeCount": 39, + "nodeId": 8 +} +[1532465690.982][DEBUG]: DEVTOOLS EVENT DOM.childNodeCountUpdated { + "childNodeCount": 40, + "nodeId": 8 +} +[1532465690.982][DEBUG]: DEVTOOLS EVENT DOM.childNodeCountUpdated { + "childNodeCount": 41, + "nodeId": 8 +} +[1532465690.982][DEBUG]: DEVTOOLS EVENT DOM.childNodeCountUpdated { + "childNodeCount": 42, + "nodeId": 8 +} +[1532465691.011][DEBUG]: DEVTOOLS EVENT DOM.childNodeCountUpdated { + "childNodeCount": 43, + "nodeId": 8 +} +[1532465691.011][DEBUG]: DEVTOOLS EVENT DOM.childNodeInserted { + "node": { + "attributes": [ ], + "backendNodeId": 9, + "childNodeCount": 0, + "localName": "body", + "nodeId": 9, + "nodeName": "BODY", + "nodeType": 1, + "nodeValue": "" + }, + "parentNodeId": 7, + "previousNodeId": 8 +} +[1532465691.012][DEBUG]: DEVTOOLS EVENT DOM.childNodeCountUpdated { + "childNodeCount": 1, + "nodeId": 9 +} +[1532465691.012][DEBUG]: DEVTOOLS EVENT DOM.childNodeCountUpdated { + "childNodeCount": 2, + "nodeId": 9 +} +[1532465691.012][DEBUG]: DEVTOOLS EVENT DOM.childNodeCountUpdated { + "childNodeCount": 3, + "nodeId": 9 +} +[1532465691.012][DEBUG]: DEVTOOLS EVENT DOM.childNodeCountUpdated { + "childNodeCount": 4, + "nodeId": 9 +} +[1532465691.012][DEBUG]: DEVTOOLS EVENT DOM.childNodeCountUpdated { + "childNodeCount": 5, + "nodeId": 9 +} +[1532465691.012][DEBUG]: DEVTOOLS EVENT DOM.childNodeCountUpdated { + "childNodeCount": 6, + "nodeId": 9 +} +[1532465691.013][DEBUG]: DEVTOOLS EVENT DOM.childNodeCountUpdated { + "childNodeCount": 7, + "nodeId": 9 +} +[1532465691.013][DEBUG]: DEVTOOLS EVENT DOM.childNodeCountUpdated { + "childNodeCount": 8, + "nodeId": 9 +} +[1532465691.013][DEBUG]: DEVTOOLS EVENT DOM.childNodeCountUpdated { + "childNodeCount": 9, + "nodeId": 9 +} +[1532465691.013][DEBUG]: DEVTOOLS EVENT DOM.childNodeCountUpdated { + "childNodeCount": 10, + "nodeId": 9 +} +[1532465691.013][DEBUG]: DEVTOOLS EVENT DOM.childNodeCountUpdated { + "childNodeCount": 11, + "nodeId": 9 +} +[244620:244620:0724/135451.247801:WARNING:account_consistency_mode_manager.cc(290)] Desktop Identity Consistency cannot be enabled as no OAuth client ID and client secret have been configured. +[1532465691.263][DEBUG]: DEVTOOLS EVENT DOM.childNodeCountUpdated { + "childNodeCount": 12, + "nodeId": 9 +} +[1532465691.263][DEBUG]: DEVTOOLS EVENT DOM.attributeModified { + "name": "dir", + "nodeId": 7, + "value": "ltr" +} +[1532465691.263][DEBUG]: DEVTOOLS EVENT DOM.attributeModified { + "name": "lang", + "nodeId": 7, + "value": "en" +} +[1532465691.264][DEBUG]: DEVTOOLS EVENT DOM.attributeModified { + "name": "i18n-processed", + "nodeId": 7, + "value": "" +} +[1532465691.264][DEBUG]: DEVTOOLS EVENT DOM.documentUpdated { + +} +[1532465691.264][DEBUG]: DEVTOOLS COMMAND DOM.getDocument (id=9) { + +} +[1532465691.264][DEBUG]: DEVTOOLS EVENT Page.domContentEventFired { + "timestamp": 78375.604406 +} +[1532465691.264][DEBUG]: DEVTOOLS RESPONSE Page.enable (id=8) { + +} +[1532465691.322][DEBUG]: DEVTOOLS EVENT Page.loadEventFired { + "timestamp": 78375.638976 +} +[1532465691.323][DEBUG]: DEVTOOLS EVENT Page.frameStoppedLoading { + "frameId": "336FDBF833C7472DBC17C4050248E417" +} +[1532465691.324][DEBUG]: DEVTOOLS RESPONSE DOM.getDocument (id=9) { + "root": { + "backendNodeId": 5, + "baseURL": "chrome://print/", + "childNodeCount": 2, + "children": [ { + "backendNodeId": 6, + "localName": "", + "nodeId": 11, + "nodeName": "html", + "nodeType": 10, + "nodeValue": "", + "parentId": 10, + "publicId": "", + "systemId": "" + }, { + "attributes": [ "id", "print-preview", "class", "focus-outline-visible", "i18n-values", "dir:textdirection;lang:language", "dir", "ltr", "lang", "en", "i18n-processed", "" ], + "backendNodeId": 7, + "childNodeCount": 2, + "children": [ { + "attributes": [ ], + "backendNodeId": 8, + "childNodeCount": 43, + "localName": "head", + "nodeId": 13, + "nodeName": "HEAD", + "nodeType": 1, + "nodeValue": "", + "parentId": 12 + }, { + "attributes": [ ], + "backendNodeId": 9, + "childNodeCount": 12, + "localName": "body", + "nodeId": 14, + "nodeName": "BODY", + "nodeType": 1, + "nodeValue": "", + "parentId": 12 + } ], + "frameId": "336FDBF833C7472DBC17C4050248E417", + "localName": "html", + "nodeId": 12, + "nodeName": "HTML", + "nodeType": 1, + "nodeValue": "", + "parentId": 10 + } ], + "documentURL": "chrome://print/", + "localName": "", + "nodeId": 10, + "nodeName": "#document", + "nodeType": 9, + "nodeValue": "", + "xmlVersion": "" + } +} +[1532465691.324][DEBUG]: DEVTOOLS COMMAND Runtime.enable (id=10) { + +} +[1532465691.347][DEBUG]: DEVTOOLS RESPONSE Runtime.enable (id=10) { + +} +[1532465691.348][INFO]: Waiting for pending navigations... +[1532465691.348][DEBUG]: DEVTOOLS COMMAND Runtime.evaluate (id=11) { + "expression": "1" +} +[1532465691.363][DEBUG]: DEVTOOLS RESPONSE Runtime.evaluate (id=11) { + "result": { + "description": "1", + "type": "number", + "value": 1 + } +} +[1532465691.363][INFO]: Done waiting for pending navigations. Status: ok +[1532465691.365][DEBUG]: DEVTOOLS COMMAND Runtime.evaluate (id=12) { + "expression": "(function() { // Copyright (c) 2012 The Chromium Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style license that can be\n// found in the LICENSE file.\n\n/**\n * Enum f...", + "returnByValue": true +} +[1532465691.373][DEBUG]: DEVTOOLS RESPONSE Runtime.evaluate (id=12) { + "result": { + "type": "object", + "value": { + "status": 0, + "value": "chrome://print/" + } + } +} +[1532465691.373][INFO]: Waiting for pending navigations... +[1532465691.373][DEBUG]: DEVTOOLS COMMAND Runtime.evaluate (id=13) { + "expression": "1" +} +[1532465691.376][DEBUG]: DEVTOOLS RESPONSE Runtime.evaluate (id=13) { + "result": { + "description": "1", + "type": "number", + "value": 1 + } +} +[1532465691.376][INFO]: Done waiting for pending navigations. Status: ok +[1532465691.376][INFO]: [34030c426d7b7daf5749d665c50002b4] RESPONSE GetUrl "chrome://print/" +[1532465691.377][INFO]: [34030c426d7b7daf5749d665c50002b4] COMMAND Quit { + +} +[0724/135451.394913:ERROR:nacl_helper_linux.cc(310)] NaCl helper process running without a sandbox! +Most likely you need to configure your SUID sandbox correctly +[1532465691.433][INFO]: [34030c426d7b7daf5749d665c50002b4] RESPONSE Quit +[1532465691.433][DEBUG]: Log type 'driver' lost 0 entries on destruction +[1532465691.433][DEBUG]: Log type 'browser' lost 0 entries on destruction
diff --git a/chrome/test/chromedriver/log_replay/test_data/testChromeBinary.log b/chrome/test/chromedriver/log_replay/test_data/testChromeBinary.log new file mode 100644 index 0000000..0bd28beb --- /dev/null +++ b/chrome/test/chromedriver/log_replay/test_data/testChromeBinary.log
@@ -0,0 +1,840 @@ +[1532467514.174][INFO]: [4c84aeb5c8b77a0220514d73c3563371] COMMAND InitSession { + "desiredCapabilities": { + "chromeOptions": { + "args": [ "no-sandbox", "disable-gpu" ], + "binary": "invalid binary name" + }, + "goog:testName": "__main__.ChromeDriverTest.testClearElement", + "loggingPrefs": { + + } + } +} +[1532467514.175][INFO]: Populating Preferences file: { + "alternate_error_pages": { + "enabled": false + }, + "autofill": { + "enabled": false + }, + "browser": { + "check_default_browser": false + }, + "distribution": { + "import_bookmarks": false, + "import_history": false, + "import_search_engine": false, + "make_chrome_default_for_user": false, + "skip_first_run_ui": true + }, + "dns_prefetching": { + "enabled": false + }, + "profile": { + "content_settings": { + "pattern_pairs": { + "https://*,*": { + "media-stream": { + "audio": "Default", + "video": "Default" + } + } + } + }, + "default_content_setting_values": { + "geolocation": 1 + }, + "default_content_settings": { + "geolocation": 1, + "mouselock": 1, + "notifications": 1, + "popups": 1, + "ppapi-broker": 1 + }, + "password_manager_enabled": false + }, + "safebrowsing": { + "enabled": false + }, + "search": { + "suggest_enabled": false + }, + "translate": { + "enabled": false + } +} +[1532467514.175][INFO]: Populating Local State file: { + "background_mode": { + "enabled": false + }, + "ssl": { + "rev_checking": { + "enabled": false + } + } +} +[1532467514.177][INFO]: Launching chrome: /usr/local/google/home/cwinstanley/chromium/src/out/Default/chrome --disable-background-networking --disable-client-side-phishing-detection --disable-default-apps --disable-gpu --disable-hang-monitor --disable-popup-blocking --disable-prompt-on-repost --disable-sync --disable-web-resources --enable-automation --enable-logging --force-fieldtrials=SiteIsolationExtensions/Control --ignore-certificate-errors --load-extension=/tmp/.org.chromium.Chromium.vLlc2l/internal --log-level=0 --metrics-recording-only --no-first-run --no-sandbox --password-store=basic --remote-debugging-port=0 --test-type=webdriver --use-mock-keychain --user-data-dir=/tmp/.org.chromium.Chromium.dP1R0m data:, +[260194:260194:0724/142516.059146:ERROR:gpu_process_transport_factory.cc(642)] Switching to software compositing. +[260194:260194:0724/142516.059228:ERROR:gpu_process_transport_factory.cc(1007)] Lost UI shared context. +[260194:260194:0724/142516.148312:WARNING:account_consistency_mode_manager.cc(290)] Desktop Identity Consistency cannot be enabled as no OAuth client ID and client secret have been configured. +[260194:260194:0724/142516.148442:WARNING:account_consistency_mode_manager.cc(290)] Desktop Identity Consistency cannot be enabled as no OAuth client ID and client secret have been configured. +[260194:260194:0724/142516.148491:WARNING:account_consistency_mode_manager.cc(290)] Desktop Identity Consistency cannot be enabled as no OAuth client ID and client secret have been configured. +[260194:260194:0724/142516.148537:WARNING:account_consistency_mode_manager.cc(290)] Desktop Identity Consistency cannot be enabled as no OAuth client ID and client secret have been configured. +[260194:260194:0724/142516.149773:WARNING:account_consistency_mode_manager.cc(290)] Desktop Identity Consistency cannot be enabled as no OAuth client ID and client secret have been configured. +[260194:260194:0724/142516.156638:WARNING:account_consistency_mode_manager.cc(290)] Desktop Identity Consistency cannot be enabled as no OAuth client ID and client secret have been configured. +[260194:260194:0724/142516.201599:WARNING:account_consistency_mode_manager.cc(290)] Desktop Identity Consistency cannot be enabled as no OAuth client ID and client secret have been configured. +[260194:260194:0724/142516.230901:WARNING:account_consistency_mode_manager.cc(290)] Desktop Identity Consistency cannot be enabled as no OAuth client ID and client secret have been configured. +[260194:260194:0724/142516.230978:WARNING:account_consistency_mode_manager.cc(290)] Desktop Identity Consistency cannot be enabled as no OAuth client ID and client secret have been configured. + +DevTools listening on ws://127.0.0.1:39015/devtools/browser/e6cd7d21-fbf3-4a23-a1c3-18160fd89cf6 +[1532467516.274][DEBUG]: DevTools request: http://localhost:39015/json/version +[260194:260194:0724/142516.377326:WARNING:password_store_factory.cc(253)] Using basic (unencrypted) store for password storage. See https://chromium.googlesource.com/chromium/src/+/master/docs/linux_password_storage.md for more information about password storage options. +[260194:260194:0724/142516.379855:WARNING:account_consistency_mode_manager.cc(290)] Desktop Identity Consistency cannot be enabled as no OAuth client ID and client secret have been configured. +[1532467516.584][DEBUG]: DevTools response: { + "Browser": "Chrome/69.0.3491.0", + "Protocol-Version": "1.3", + "User-Agent": "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/69.0.3491.0 Safari/537.36", + "V8-Version": "6.9.389", + "WebKit-Version": "537.36 (@410f2c4912d46a5fae2fe6c0b2e24d9eb6359761)", + "webSocketDebuggerUrl": "ws://localhost:39015/devtools/browser/e6cd7d21-fbf3-4a23-a1c3-18160fd89cf6" +} + +[1532467516.619][DEBUG]: DevTools request: http://localhost:39015/json +[1532467516.663][DEBUG]: DevTools response: [ { + "description": "", + "devtoolsFrontendUrl": "/devtools/inspector.html?ws=localhost:39015/devtools/page/D47987CC1516AAD6D4087BFDD382DFDD", + "id": "D47987CC1516AAD6D4087BFDD382DFDD", + "title": "Chrome Automation Extension", + "type": "background_page", + "url": "chrome-extension://aapnijgdinlhnhlmodcfapnahmbfebeb/_generated_background_page.html", + "webSocketDebuggerUrl": "ws://localhost:39015/devtools/page/D47987CC1516AAD6D4087BFDD382DFDD" +}, { + "description": "", + "devtoolsFrontendUrl": "/devtools/inspector.html?ws=localhost:39015/devtools/page/2F7220661C1838D1590BBDAF69B5EA6E", + "id": "2F7220661C1838D1590BBDAF69B5EA6E", + "title": "", + "type": "page", + "url": "data:,", + "webSocketDebuggerUrl": "ws://localhost:39015/devtools/page/2F7220661C1838D1590BBDAF69B5EA6E" +} ] + +[1532467516.664][DEBUG]: DevTools request: http://localhost:39015/json +[1532467516.672][DEBUG]: DevTools response: [ { + "description": "", + "devtoolsFrontendUrl": "/devtools/inspector.html?ws=localhost:39015/devtools/page/D47987CC1516AAD6D4087BFDD382DFDD", + "id": "D47987CC1516AAD6D4087BFDD382DFDD", + "title": "Chrome Automation Extension", + "type": "background_page", + "url": "chrome-extension://aapnijgdinlhnhlmodcfapnahmbfebeb/_generated_background_page.html", + "webSocketDebuggerUrl": "ws://localhost:39015/devtools/page/D47987CC1516AAD6D4087BFDD382DFDD" +}, { + "description": "", + "devtoolsFrontendUrl": "/devtools/inspector.html?ws=localhost:39015/devtools/page/2F7220661C1838D1590BBDAF69B5EA6E", + "id": "2F7220661C1838D1590BBDAF69B5EA6E", + "title": "", + "type": "page", + "url": "data:,", + "webSocketDebuggerUrl": "ws://localhost:39015/devtools/page/2F7220661C1838D1590BBDAF69B5EA6E" +} ] + +[1532467516.673][INFO]: resolved localhost to ["::1","127.0.0.1"] +[1532467516.675][DEBUG]: DEVTOOLS COMMAND Log.enable (id=1) { + +} +[1532467516.676][DEBUG]: DEVTOOLS COMMAND DOM.getDocument (id=2) { + +} +[1532467516.676][DEBUG]: DEVTOOLS COMMAND Target.setAutoAttach (id=3) { + "autoAttach": true, + "waitForDebuggerOnStart": false +} +[1532467516.676][DEBUG]: DEVTOOLS COMMAND Page.enable (id=4) { + +} +[1532467516.676][DEBUG]: DEVTOOLS COMMAND Page.enable (id=5) { + +} +[1532467516.722][DEBUG]: DEVTOOLS RESPONSE Log.enable (id=1) { + +} +[1532467516.722][DEBUG]: DEVTOOLS RESPONSE DOM.getDocument (id=2) { + "root": { + "backendNodeId": 1, + "baseURL": "about:blank", + "childNodeCount": 1, + "children": [ { + "attributes": [ ], + "backendNodeId": 2, + "childNodeCount": 2, + "children": [ { + "attributes": [ ], + "backendNodeId": 3, + "childNodeCount": 0, + "localName": "head", + "nodeId": 3, + "nodeName": "HEAD", + "nodeType": 1, + "nodeValue": "", + "parentId": 2 + }, { + "attributes": [ ], + "backendNodeId": 4, + "childNodeCount": 0, + "localName": "body", + "nodeId": 4, + "nodeName": "BODY", + "nodeType": 1, + "nodeValue": "", + "parentId": 2 + } ], + "frameId": "2F7220661C1838D1590BBDAF69B5EA6E", + "localName": "html", + "nodeId": 2, + "nodeName": "HTML", + "nodeType": 1, + "nodeValue": "", + "parentId": 1 + } ], + "documentURL": "", + "localName": "", + "nodeId": 1, + "nodeName": "#document", + "nodeType": 9, + "nodeValue": "", + "xmlVersion": "" + } +} +[1532467516.723][DEBUG]: DEVTOOLS RESPONSE Target.setAutoAttach (id=3) { + +} +[1532467516.723][DEBUG]: DEVTOOLS RESPONSE Page.enable (id=4) { + +} +[1532467516.723][DEBUG]: DEVTOOLS RESPONSE Page.enable (id=5) { + +} +[1532467516.723][DEBUG]: DEVTOOLS COMMAND Runtime.enable (id=6) { + +} +[1532467516.778][DEBUG]: DEVTOOLS EVENT Page.frameNavigated { + "frame": { + "id": "2F7220661C1838D1590BBDAF69B5EA6E", + "loaderId": "79911BD6E15F33B0D819FA7100CD5476", + "mimeType": "text/plain", + "securityOrigin": "://", + "url": "data:," + } +} +[1532467516.778][DEBUG]: DEVTOOLS EVENT DOM.documentUpdated { + +} +[1532467516.778][DEBUG]: DEVTOOLS COMMAND DOM.getDocument (id=7) { + +} +[1532467516.778][DEBUG]: DEVTOOLS EVENT Page.loadEventFired { + "timestamp": 80201.065014 +} +[1532467516.778][DEBUG]: DEVTOOLS EVENT Page.frameStoppedLoading { + "frameId": "2F7220661C1838D1590BBDAF69B5EA6E" +} +[1532467516.778][DEBUG]: DEVTOOLS EVENT DOM.documentUpdated { + +} +[1532467516.779][DEBUG]: DEVTOOLS COMMAND DOM.getDocument (id=8) { + +} +[1532467516.779][DEBUG]: DEVTOOLS EVENT Page.domContentEventFired { + "timestamp": 80201.067806 +} +[1532467516.781][DEBUG]: DEVTOOLS EVENT Page.frameResized { + +} +[1532467516.793][DEBUG]: DEVTOOLS EVENT Runtime.executionContextCreated { + "context": { + "auxData": { + "frameId": "2F7220661C1838D1590BBDAF69B5EA6E", + "isDefault": true + }, + "id": 1, + "name": "", + "origin": "://" + } +} +[1532467516.793][DEBUG]: DEVTOOLS RESPONSE Runtime.enable (id=6) { + +} +[1532467516.796][DEBUG]: DEVTOOLS RESPONSE DOM.getDocument (id=7) { + "root": { + "backendNodeId": 5, + "baseURL": "data:,", + "childNodeCount": 1, + "children": [ { + "attributes": [ ], + "backendNodeId": 6, + "childNodeCount": 2, + "children": [ { + "attributes": [ ], + "backendNodeId": 7, + "childNodeCount": 0, + "localName": "head", + "nodeId": 7, + "nodeName": "HEAD", + "nodeType": 1, + "nodeValue": "", + "parentId": 6 + }, { + "attributes": [ ], + "backendNodeId": 8, + "childNodeCount": 0, + "localName": "body", + "nodeId": 8, + "nodeName": "BODY", + "nodeType": 1, + "nodeValue": "", + "parentId": 6 + } ], + "frameId": "2F7220661C1838D1590BBDAF69B5EA6E", + "localName": "html", + "nodeId": 6, + "nodeName": "HTML", + "nodeType": 1, + "nodeValue": "", + "parentId": 5 + } ], + "documentURL": "data:,", + "localName": "", + "nodeId": 5, + "nodeName": "#document", + "nodeType": 9, + "nodeValue": "", + "xmlVersion": "" + } +} +[1532467516.797][DEBUG]: DEVTOOLS RESPONSE DOM.getDocument (id=8) { + "root": { + "backendNodeId": 5, + "baseURL": "data:,", + "childNodeCount": 1, + "children": [ { + "attributes": [ ], + "backendNodeId": 6, + "childNodeCount": 2, + "children": [ { + "attributes": [ ], + "backendNodeId": 7, + "childNodeCount": 0, + "localName": "head", + "nodeId": 11, + "nodeName": "HEAD", + "nodeType": 1, + "nodeValue": "", + "parentId": 10 + }, { + "attributes": [ ], + "backendNodeId": 8, + "childNodeCount": 0, + "localName": "body", + "nodeId": 12, + "nodeName": "BODY", + "nodeType": 1, + "nodeValue": "", + "parentId": 10 + } ], + "frameId": "2F7220661C1838D1590BBDAF69B5EA6E", + "localName": "html", + "nodeId": 10, + "nodeName": "HTML", + "nodeType": 1, + "nodeValue": "", + "parentId": 9 + } ], + "documentURL": "data:,", + "localName": "", + "nodeId": 9, + "nodeName": "#document", + "nodeType": 9, + "nodeValue": "", + "xmlVersion": "" + } +} +[1532467516.797][DEBUG]: DEVTOOLS COMMAND Page.enable (id=9) { + +} +[1532467516.835][DEBUG]: DEVTOOLS RESPONSE Page.enable (id=9) { + +} +[1532467516.835][DEBUG]: DEVTOOLS COMMAND Runtime.enable (id=10) { + +} +[1532467516.838][DEBUG]: DEVTOOLS RESPONSE Runtime.enable (id=10) { + +} +[1532467516.840][DEBUG]: DEVTOOLS COMMAND Runtime.evaluate (id=11) { + "expression": "(function() { // Copyright (c) 2012 The Chromium Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style license that can be\n// found in the LICENSE file.\n\n/**\n * Enum f...", + "returnByValue": true +} +[1532467516.876][DEBUG]: DEVTOOLS RESPONSE Runtime.evaluate (id=11) { + "result": { + "type": "object", + "value": { + "status": 0, + "value": 1 + } + } +} +[1532467516.876][INFO]: [4c84aeb5c8b77a0220514d73c3563371] RESPONSE InitSession { + "acceptInsecureCerts": false, + "acceptSslCerts": false, + "applicationCacheEnabled": false, + "browserConnectionEnabled": false, + "browserName": "chrome", + "chrome": { + "chromedriverVersion": "2.40 (1ba6d2ec0853ea1d507bccc09f540f5ea1db0394)", + "userDataDir": "/tmp/.org.chromium.Chromium.dP1R0m" + }, + "cssSelectorsEnabled": true, + "databaseEnabled": false, + "goog:chromeOptions": { + "debuggerAddress": "localhost:39015" + }, + "handlesAlerts": true, + "hasTouchScreen": false, + "javascriptEnabled": true, + "locationContextEnabled": true, + "mobileEmulationEnabled": false, + "nativeEvents": true, + "networkConnectionEnabled": false, + "pageLoadStrategy": "normal", + "platform": "Linux", + "rotatable": false, + "setWindowRect": true, + "takesHeapSnapshot": true, + "takesScreenshot": true, + "unexpectedAlertBehaviour": "", + "version": "69.0.3491.0", + "webStorageEnabled": true +} +[1532467516.878][INFO]: [4c84aeb5c8b77a0220514d73c3563371] COMMAND Navigate { + "url": "http://127.0.0.1:43971/chromedriver/empty.html" +} +[1532467516.878][INFO]: Waiting for pending navigations... +[1532467516.878][DEBUG]: DEVTOOLS COMMAND Runtime.evaluate (id=12) { + "expression": "1" +} +[1532467516.884][DEBUG]: DEVTOOLS RESPONSE Runtime.evaluate (id=12) { + "result": { + "description": "1", + "type": "number", + "value": 1 + } +} +[1532467516.884][INFO]: Done waiting for pending navigations. Status: ok +[1532467516.884][DEBUG]: DEVTOOLS COMMAND Page.navigate (id=13) { + "url": "http://127.0.0.1:43971/chromedriver/empty.html" +} +[1532467517.189][DEBUG]: DEVTOOLS RESPONSE Page.navigate (id=13) { + "frameId": "2F7220661C1838D1590BBDAF69B5EA6E", + "loaderId": "7DDCA7884CF7EE615366C66FDB32F7F6" +} +[1532467517.189][DEBUG]: DEVTOOLS COMMAND Runtime.evaluate (id=14) { + "expression": "document.URL" +} +[1532467517.193][DEBUG]: DEVTOOLS EVENT Runtime.executionContextsCleared { + +} +[1532467517.204][DEBUG]: DEVTOOLS EVENT Page.frameStartedLoading { + "frameId": "2F7220661C1838D1590BBDAF69B5EA6E" +} +[1532467517.255][DEBUG]: DEVTOOLS EVENT Runtime.executionContextsCleared { + +} +[1532467517.256][DEBUG]: DEVTOOLS EVENT Page.frameNavigated { + "frame": { + "id": "2F7220661C1838D1590BBDAF69B5EA6E", + "loaderId": "7DDCA7884CF7EE615366C66FDB32F7F6", + "mimeType": "text/html", + "securityOrigin": "http://127.0.0.1:43971", + "url": "http://127.0.0.1:43971/chromedriver/empty.html" + } +} +[1532467517.256][DEBUG]: DEVTOOLS EVENT Runtime.executionContextCreated { + "context": { + "auxData": { + "frameId": "2F7220661C1838D1590BBDAF69B5EA6E", + "isDefault": true + }, + "id": 1, + "name": "", + "origin": "http://127.0.0.1:43971" + } +} +[1532467517.256][DEBUG]: DEVTOOLS EVENT DOM.documentUpdated { + +} +[1532467517.256][DEBUG]: DEVTOOLS COMMAND DOM.getDocument (id=15) { + +} +[260237:260237:0724/142517.262240:ERROR:render_process_impl.cc(208)] WebFrame LEAKED 1 TIMES +[1532467517.301][DEBUG]: DEVTOOLS EVENT Page.loadEventFired { + "timestamp": 80201.586469 +} +[1532467517.301][DEBUG]: DEVTOOLS EVENT Page.frameStoppedLoading { + "frameId": "2F7220661C1838D1590BBDAF69B5EA6E" +} +[1532467517.301][DEBUG]: DEVTOOLS EVENT DOM.documentUpdated { + +} +[1532467517.301][DEBUG]: DEVTOOLS COMMAND DOM.getDocument (id=16) { + +} +[1532467517.314][DEBUG]: DEVTOOLS EVENT Page.domContentEventFired { + "timestamp": 80201.588607 +} +[1532467517.314][DEBUG]: DEVTOOLS RESPONSE Runtime.evaluate (id=14) { + "result": { + "type": "string", + "value": "http://127.0.0.1:43971/chromedriver/empty.html" + } +} +[1532467517.324][DEBUG]: DEVTOOLS RESPONSE DOM.getDocument (id=15) { + "root": { + "backendNodeId": 1, + "baseURL": "http://127.0.0.1:43971/chromedriver/empty.html", + "childNodeCount": 1, + "children": [ { + "attributes": [ ], + "backendNodeId": 2, + "childNodeCount": 2, + "children": [ { + "attributes": [ ], + "backendNodeId": 3, + "childNodeCount": 0, + "localName": "head", + "nodeId": 3, + "nodeName": "HEAD", + "nodeType": 1, + "nodeValue": "", + "parentId": 2 + }, { + "attributes": [ ], + "backendNodeId": 4, + "childNodeCount": 0, + "children": [ { + "backendNodeId": 5, + "localName": "", + "nodeId": 5, + "nodeName": "#text", + "nodeType": 3, + "nodeValue": "\n", + "parentId": 4 + } ], + "localName": "body", + "nodeId": 4, + "nodeName": "BODY", + "nodeType": 1, + "nodeValue": "", + "parentId": 2 + } ], + "frameId": "2F7220661C1838D1590BBDAF69B5EA6E", + "localName": "html", + "nodeId": 2, + "nodeName": "HTML", + "nodeType": 1, + "nodeValue": "", + "parentId": 1 + } ], + "documentURL": "http://127.0.0.1:43971/chromedriver/empty.html", + "localName": "", + "nodeId": 1, + "nodeName": "#document", + "nodeType": 9, + "nodeValue": "", + "xmlVersion": "" + } +} +[1532467517.327][DEBUG]: DEVTOOLS RESPONSE DOM.getDocument (id=16) { + "root": { + "backendNodeId": 1, + "baseURL": "http://127.0.0.1:43971/chromedriver/empty.html", + "childNodeCount": 1, + "children": [ { + "attributes": [ ], + "backendNodeId": 2, + "childNodeCount": 2, + "children": [ { + "attributes": [ ], + "backendNodeId": 3, + "childNodeCount": 0, + "localName": "head", + "nodeId": 8, + "nodeName": "HEAD", + "nodeType": 1, + "nodeValue": "", + "parentId": 7 + }, { + "attributes": [ ], + "backendNodeId": 4, + "childNodeCount": 0, + "children": [ { + "backendNodeId": 5, + "localName": "", + "nodeId": 10, + "nodeName": "#text", + "nodeType": 3, + "nodeValue": "\n", + "parentId": 9 + } ], + "localName": "body", + "nodeId": 9, + "nodeName": "BODY", + "nodeType": 1, + "nodeValue": "", + "parentId": 7 + } ], + "frameId": "2F7220661C1838D1590BBDAF69B5EA6E", + "localName": "html", + "nodeId": 7, + "nodeName": "HTML", + "nodeType": 1, + "nodeValue": "", + "parentId": 6 + } ], + "documentURL": "http://127.0.0.1:43971/chromedriver/empty.html", + "localName": "", + "nodeId": 6, + "nodeName": "#document", + "nodeType": 9, + "nodeValue": "", + "xmlVersion": "" + } +} +[1532467517.327][INFO]: Waiting for pending navigations... +[1532467517.327][DEBUG]: DEVTOOLS COMMAND Runtime.evaluate (id=17) { + "expression": "1" +} +[1532467517.332][DEBUG]: DEVTOOLS RESPONSE Runtime.evaluate (id=17) { + "result": { + "description": "1", + "type": "number", + "value": 1 + } +} +[1532467517.332][INFO]: Done waiting for pending navigations. Status: ok +[1532467517.332][INFO]: [4c84aeb5c8b77a0220514d73c3563371] RESPONSE Navigate +[1532467517.334][INFO]: [4c84aeb5c8b77a0220514d73c3563371] COMMAND ExecuteScript { + "args": [ ], + "script": "document.body.innerHTML = '\u003Cinput type=\"text\" value=\"abc\">';return document.getElementsByTagName(\"input\")[0];" +} +[1532467517.334][INFO]: Waiting for pending navigations... +[1532467517.334][DEBUG]: DEVTOOLS COMMAND Runtime.evaluate (id=18) { + "expression": "1" +} +[1532467517.336][DEBUG]: DEVTOOLS EVENT Log.entryAdded { + "entry": { + "level": "error", + "networkRequestId": "1000260274.2", + "source": "network", + "text": "Failed to load resource: the server responded with a status of 404 (Not Found)", + "timestamp": 1532467517332.76, + "url": "http://127.0.0.1:43971/favicon.ico" + } +} +[1532467517.338][DEBUG]: DEVTOOLS RESPONSE Runtime.evaluate (id=18) { + "result": { + "description": "1", + "type": "number", + "value": 1 + } +} +[1532467517.338][INFO]: Done waiting for pending navigations. Status: ok +[1532467517.338][DEBUG]: DEVTOOLS COMMAND Runtime.evaluate (id=19) { + "expression": "(function() { // Copyright (c) 2012 The Chromium Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style license that can be\n// found in the LICENSE file.\n\n/**\n * Enum f...", + "returnByValue": true +} +[1532467517.363][DEBUG]: DEVTOOLS EVENT DOM.childNodeInserted { + "node": { + "attributes": [ "type", "text", "value", "abc" ], + "backendNodeId": 6, + "childNodeCount": 0, + "children": [ ], + "localName": "input", + "nodeId": 11, + "nodeName": "INPUT", + "nodeType": 1, + "nodeValue": "", + "shadowRoots": [ { + "backendNodeId": 7, + "childNodeCount": 1, + "localName": "", + "nodeId": 12, + "nodeName": "#document-fragment", + "nodeType": 11, + "nodeValue": "", + "shadowRootType": "user-agent" + } ] + }, + "parentNodeId": 9, + "previousNodeId": 0 +} +[1532467517.363][DEBUG]: DEVTOOLS RESPONSE Runtime.evaluate (id=19) { + "result": { + "type": "object", + "value": { + "status": 0, + "value": { + "ELEMENT": "0.03848420174396461-1" + } + } + } +} +[1532467517.363][INFO]: Waiting for pending navigations... +[1532467517.363][DEBUG]: DEVTOOLS COMMAND Runtime.evaluate (id=20) { + "expression": "1" +} +[1532467517.395][DEBUG]: DEVTOOLS RESPONSE Runtime.evaluate (id=20) { + "result": { + "description": "1", + "type": "number", + "value": 1 + } +} +[1532467517.395][INFO]: Done waiting for pending navigations. Status: ok +[1532467517.395][INFO]: [4c84aeb5c8b77a0220514d73c3563371] RESPONSE ExecuteScript { + "ELEMENT": "0.03848420174396461-1" +} +[1532467517.396][INFO]: [4c84aeb5c8b77a0220514d73c3563371] COMMAND ExecuteScript { + "args": [ { + "ELEMENT": "0.03848420174396461-1" + } ], + "script": "return arguments[0].value;" +} +[1532467517.397][INFO]: Waiting for pending navigations... +[1532467517.397][DEBUG]: DEVTOOLS COMMAND Runtime.evaluate (id=21) { + "expression": "1" +} +[1532467517.410][DEBUG]: DEVTOOLS RESPONSE Runtime.evaluate (id=21) { + "result": { + "description": "1", + "type": "number", + "value": 1 + } +} +[1532467517.410][INFO]: Done waiting for pending navigations. Status: ok +[1532467517.412][DEBUG]: DEVTOOLS COMMAND Runtime.evaluate (id=22) { + "expression": "(function() { // Copyright (c) 2012 The Chromium Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style license that can be\n// found in the LICENSE file.\n\n/**\n * Enum f...", + "returnByValue": true +} +[1532467517.417][DEBUG]: DEVTOOLS RESPONSE Runtime.evaluate (id=22) { + "result": { + "type": "object", + "value": { + "status": 0, + "value": "abc" + } + } +} +[1532467517.417][INFO]: Waiting for pending navigations... +[1532467517.417][DEBUG]: DEVTOOLS COMMAND Runtime.evaluate (id=23) { + "expression": "1" +} +[1532467517.429][DEBUG]: DEVTOOLS RESPONSE Runtime.evaluate (id=23) { + "result": { + "description": "1", + "type": "number", + "value": 1 + } +} +[1532467517.429][INFO]: Done waiting for pending navigations. Status: ok +[1532467517.429][INFO]: [4c84aeb5c8b77a0220514d73c3563371] RESPONSE ExecuteScript "abc" +[1532467517.431][INFO]: [4c84aeb5c8b77a0220514d73c3563371] COMMAND ClearElement { + "id": "0.03848420174396461-1" +} +[1532467517.431][INFO]: Waiting for pending navigations... +[1532467517.431][DEBUG]: DEVTOOLS COMMAND Runtime.evaluate (id=24) { + "expression": "1" +} +[1532467517.432][DEBUG]: DEVTOOLS RESPONSE Runtime.evaluate (id=24) { + "result": { + "description": "1", + "type": "number", + "value": 1 + } +} +[1532467517.432][INFO]: Done waiting for pending navigations. Status: ok +[1532467517.436][DEBUG]: DEVTOOLS COMMAND Runtime.evaluate (id=25) { + "expression": "(function() { // Copyright (c) 2012 The Chromium Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style license that can be\n// found in the LICENSE file.\n\n/**\n * Enum f...", + "returnByValue": true +} +[1532467517.483][DEBUG]: DEVTOOLS RESPONSE Runtime.evaluate (id=25) { + "result": { + "type": "object", + "value": { + "status": 0 + } + } +} +[1532467517.483][INFO]: Waiting for pending navigations... +[1532467517.483][DEBUG]: DEVTOOLS COMMAND Runtime.evaluate (id=26) { + "expression": "1" +} +[1532467517.488][DEBUG]: DEVTOOLS RESPONSE Runtime.evaluate (id=26) { + "result": { + "description": "1", + "type": "number", + "value": 1 + } +} +[1532467517.488][INFO]: Done waiting for pending navigations. Status: ok +[1532467517.488][INFO]: [4c84aeb5c8b77a0220514d73c3563371] RESPONSE ClearElement +[1532467517.490][INFO]: [4c84aeb5c8b77a0220514d73c3563371] COMMAND ExecuteScript { + "args": [ { + "ELEMENT": "0.03848420174396461-1" + } ], + "script": "return arguments[0].value;" +} +[1532467517.490][INFO]: Waiting for pending navigations... +[1532467517.490][DEBUG]: DEVTOOLS COMMAND Runtime.evaluate (id=27) { + "expression": "1" +} +[1532467517.492][DEBUG]: DEVTOOLS RESPONSE Runtime.evaluate (id=27) { + "result": { + "description": "1", + "type": "number", + "value": 1 + } +} +[1532467517.492][INFO]: Done waiting for pending navigations. Status: ok +[1532467517.493][DEBUG]: DEVTOOLS COMMAND Runtime.evaluate (id=28) { + "expression": "(function() { // Copyright (c) 2012 The Chromium Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style license that can be\n// found in the LICENSE file.\n\n/**\n * Enum f...", + "returnByValue": true +} +[1532467517.498][DEBUG]: DEVTOOLS RESPONSE Runtime.evaluate (id=28) { + "result": { + "type": "object", + "value": { + "status": 0, + "value": "" + } + } +} +[1532467517.498][INFO]: Waiting for pending navigations... +[1532467517.498][DEBUG]: DEVTOOLS COMMAND Runtime.evaluate (id=29) { + "expression": "1" +} +[1532467517.499][DEBUG]: DEVTOOLS RESPONSE Runtime.evaluate (id=29) { + "result": { + "description": "1", + "type": "number", + "value": 1 + } +} +[1532467517.499][INFO]: Done waiting for pending navigations. Status: ok +[1532467517.499][INFO]: [4c84aeb5c8b77a0220514d73c3563371] RESPONSE ExecuteScript "" +[1532467517.501][INFO]: [4c84aeb5c8b77a0220514d73c3563371] COMMAND Quit { + +} +[0724/142517.513856:ERROR:nacl_helper_linux.cc(310)] NaCl helper process running without a sandbox! +Most likely you need to configure your SUID sandbox correctly +[1532467517.552][INFO]: [4c84aeb5c8b77a0220514d73c3563371] RESPONSE Quit +[1532467517.552][DEBUG]: Log type 'driver' lost 0 entries on destruction +[1532467517.552][DEBUG]: Log type 'browser' lost 1 entries on destruction
diff --git a/chrome/test/chromedriver/log_replay/test_data/testClearElement.log b/chrome/test/chromedriver/log_replay/test_data/testClearElement.log new file mode 100644 index 0000000..6998c723 --- /dev/null +++ b/chrome/test/chromedriver/log_replay/test_data/testClearElement.log
@@ -0,0 +1,840 @@ +[1532715851.089][INFO]: [c3681035a5e0990f0e117e8f7299f793] COMMAND InitSession { + "desiredCapabilities": { + "chromeOptions": { + "args": [ "no-sandbox", "disable-gpu" ], + "binary": "/usr/local/google/home/cwinstanley/chromium/src/out/Default/chrome" + }, + "goog:testName": "__main__.ChromeDriverTest.testClearElement", + "loggingPrefs": { + + } + } +} +[1532715851.091][INFO]: Populating Preferences file: { + "alternate_error_pages": { + "enabled": false + }, + "autofill": { + "enabled": false + }, + "browser": { + "check_default_browser": false + }, + "distribution": { + "import_bookmarks": false, + "import_history": false, + "import_search_engine": false, + "make_chrome_default_for_user": false, + "skip_first_run_ui": true + }, + "dns_prefetching": { + "enabled": false + }, + "profile": { + "content_settings": { + "pattern_pairs": { + "https://*,*": { + "media-stream": { + "audio": "Default", + "video": "Default" + } + } + } + }, + "default_content_setting_values": { + "geolocation": 1 + }, + "default_content_settings": { + "geolocation": 1, + "mouselock": 1, + "notifications": 1, + "popups": 1, + "ppapi-broker": 1 + }, + "password_manager_enabled": false + }, + "safebrowsing": { + "enabled": false + }, + "search": { + "suggest_enabled": false + }, + "translate": { + "enabled": false + } +} +[1532715851.091][INFO]: Populating Local State file: { + "background_mode": { + "enabled": false + }, + "ssl": { + "rev_checking": { + "enabled": false + } + } +} +[1532715851.093][INFO]: Launching chrome: /usr/local/google/home/cwinstanley/chromium/src/out/Default/chrome --disable-background-networking --disable-client-side-phishing-detection --disable-default-apps --disable-gpu --disable-hang-monitor --disable-popup-blocking --disable-prompt-on-repost --disable-sync --disable-web-resources --enable-automation --enable-logging --force-fieldtrials=SiteIsolationExtensions/Control --ignore-certificate-errors --load-extension=/tmp/.org.chromium.Chromium.dSDYJV/internal --log-level=0 --metrics-recording-only --no-first-run --no-sandbox --password-store=basic --remote-debugging-port=0 --test-type=webdriver --use-mock-keychain --user-data-dir=/tmp/.org.chromium.Chromium.sNKRlA data:, +[177326:177326:0727/112412.906746:ERROR:gpu_process_transport_factory.cc(642)] Switching to software compositing. +[177326:177326:0727/112412.906816:ERROR:gpu_process_transport_factory.cc(1007)] Lost UI shared context. +[177326:177326:0727/112412.979987:WARNING:account_consistency_mode_manager.cc(290)] Desktop Identity Consistency cannot be enabled as no OAuth client ID and client secret have been configured. +[177326:177326:0727/112412.980088:WARNING:account_consistency_mode_manager.cc(290)] Desktop Identity Consistency cannot be enabled as no OAuth client ID and client secret have been configured. +[177326:177326:0727/112412.980136:WARNING:account_consistency_mode_manager.cc(290)] Desktop Identity Consistency cannot be enabled as no OAuth client ID and client secret have been configured. +[177326:177326:0727/112412.980187:WARNING:account_consistency_mode_manager.cc(290)] Desktop Identity Consistency cannot be enabled as no OAuth client ID and client secret have been configured. +[177326:177326:0727/112412.981120:WARNING:account_consistency_mode_manager.cc(290)] Desktop Identity Consistency cannot be enabled as no OAuth client ID and client secret have been configured. +[177326:177326:0727/112412.987219:WARNING:account_consistency_mode_manager.cc(290)] Desktop Identity Consistency cannot be enabled as no OAuth client ID and client secret have been configured. +[177326:177326:0727/112413.029745:WARNING:account_consistency_mode_manager.cc(290)] Desktop Identity Consistency cannot be enabled as no OAuth client ID and client secret have been configured. +[177326:177326:0727/112413.058116:WARNING:account_consistency_mode_manager.cc(290)] Desktop Identity Consistency cannot be enabled as no OAuth client ID and client secret have been configured. +[177326:177326:0727/112413.058189:WARNING:account_consistency_mode_manager.cc(290)] Desktop Identity Consistency cannot be enabled as no OAuth client ID and client secret have been configured. + +DevTools listening on ws://127.0.0.1:42389/devtools/browser/c1db1762-008c-4b83-9084-8136bbf371bc +[1532715853.120][DEBUG]: DevTools request: http://localhost:42389/json/version +[177326:177326:0727/112413.276097:WARNING:password_store_factory.cc(253)] Using basic (unencrypted) store for password storage. See https://chromium.googlesource.com/chromium/src/+/master/docs/linux_password_storage.md for more information about password storage options. +[177326:177326:0727/112413.279021:WARNING:account_consistency_mode_manager.cc(290)] Desktop Identity Consistency cannot be enabled as no OAuth client ID and client secret have been configured. +[1532715853.554][DEBUG]: DevTools response: { + "Browser": "Chrome/69.0.3491.0", + "Protocol-Version": "1.3", + "User-Agent": "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/69.0.3491.0 Safari/537.36", + "V8-Version": "6.9.389", + "WebKit-Version": "537.36 (@410f2c4912d46a5fae2fe6c0b2e24d9eb6359761)", + "webSocketDebuggerUrl": "ws://localhost:42389/devtools/browser/c1db1762-008c-4b83-9084-8136bbf371bc" +} + +[1532715853.604][DEBUG]: DevTools request: http://localhost:42389/json +[1532715853.631][DEBUG]: DevTools response: [ { + "description": "", + "devtoolsFrontendUrl": "/devtools/inspector.html?ws=localhost:42389/devtools/page/08D69CE97DC6528F9911C005A6E83DC0", + "id": "08D69CE97DC6528F9911C005A6E83DC0", + "title": "Chrome Automation Extension", + "type": "background_page", + "url": "chrome-extension://aapnijgdinlhnhlmodcfapnahmbfebeb/_generated_background_page.html", + "webSocketDebuggerUrl": "ws://localhost:42389/devtools/page/08D69CE97DC6528F9911C005A6E83DC0" +}, { + "description": "", + "devtoolsFrontendUrl": "/devtools/inspector.html?ws=localhost:42389/devtools/page/2BD057A9A54060B8A7969DB92D36643F", + "id": "2BD057A9A54060B8A7969DB92D36643F", + "title": "", + "type": "page", + "url": "data:,", + "webSocketDebuggerUrl": "ws://localhost:42389/devtools/page/2BD057A9A54060B8A7969DB92D36643F" +} ] + +[1532715853.631][DEBUG]: DevTools request: http://localhost:42389/json +[1532715853.634][DEBUG]: DevTools response: [ { + "description": "", + "devtoolsFrontendUrl": "/devtools/inspector.html?ws=localhost:42389/devtools/page/08D69CE97DC6528F9911C005A6E83DC0", + "id": "08D69CE97DC6528F9911C005A6E83DC0", + "title": "Chrome Automation Extension", + "type": "background_page", + "url": "chrome-extension://aapnijgdinlhnhlmodcfapnahmbfebeb/_generated_background_page.html", + "webSocketDebuggerUrl": "ws://localhost:42389/devtools/page/08D69CE97DC6528F9911C005A6E83DC0" +}, { + "description": "", + "devtoolsFrontendUrl": "/devtools/inspector.html?ws=localhost:42389/devtools/page/2BD057A9A54060B8A7969DB92D36643F", + "id": "2BD057A9A54060B8A7969DB92D36643F", + "title": "", + "type": "page", + "url": "data:,", + "webSocketDebuggerUrl": "ws://localhost:42389/devtools/page/2BD057A9A54060B8A7969DB92D36643F" +} ] + +[1532715853.635][INFO]: resolved localhost to ["::1","127.0.0.1"] +[1532715853.637][DEBUG]: DEVTOOLS COMMAND Log.enable (id=1) { + +} +[1532715853.638][DEBUG]: DEVTOOLS COMMAND DOM.getDocument (id=2) { + +} +[1532715853.638][DEBUG]: DEVTOOLS COMMAND Target.setAutoAttach (id=3) { + "autoAttach": true, + "waitForDebuggerOnStart": false +} +[1532715853.638][DEBUG]: DEVTOOLS COMMAND Page.enable (id=4) { + +} +[1532715853.638][DEBUG]: DEVTOOLS COMMAND Page.enable (id=5) { + +} +[1532715853.683][DEBUG]: DEVTOOLS RESPONSE Log.enable (id=1) { + +} +[1532715853.684][DEBUG]: DEVTOOLS RESPONSE DOM.getDocument (id=2) { + "root": { + "backendNodeId": 1, + "baseURL": "about:blank", + "childNodeCount": 1, + "children": [ { + "attributes": [ ], + "backendNodeId": 2, + "childNodeCount": 2, + "children": [ { + "attributes": [ ], + "backendNodeId": 3, + "childNodeCount": 0, + "localName": "head", + "nodeId": 3, + "nodeName": "HEAD", + "nodeType": 1, + "nodeValue": "", + "parentId": 2 + }, { + "attributes": [ ], + "backendNodeId": 4, + "childNodeCount": 0, + "localName": "body", + "nodeId": 4, + "nodeName": "BODY", + "nodeType": 1, + "nodeValue": "", + "parentId": 2 + } ], + "frameId": "2BD057A9A54060B8A7969DB92D36643F", + "localName": "html", + "nodeId": 2, + "nodeName": "HTML", + "nodeType": 1, + "nodeValue": "", + "parentId": 1 + } ], + "documentURL": "", + "localName": "", + "nodeId": 1, + "nodeName": "#document", + "nodeType": 9, + "nodeValue": "", + "xmlVersion": "" + } +} +[1532715853.684][DEBUG]: DEVTOOLS RESPONSE Target.setAutoAttach (id=3) { + +} +[1532715853.684][DEBUG]: DEVTOOLS RESPONSE Page.enable (id=4) { + +} +[1532715853.684][DEBUG]: DEVTOOLS RESPONSE Page.enable (id=5) { + +} +[1532715853.684][DEBUG]: DEVTOOLS COMMAND Runtime.enable (id=6) { + +} +[1532715853.762][DEBUG]: DEVTOOLS EVENT Page.frameNavigated { + "frame": { + "id": "2BD057A9A54060B8A7969DB92D36643F", + "loaderId": "308D732787153987EE4D2B0CAB8965B0", + "mimeType": "text/plain", + "securityOrigin": "://", + "url": "data:," + } +} +[1532715853.762][DEBUG]: DEVTOOLS EVENT DOM.documentUpdated { + +} +[1532715853.762][DEBUG]: DEVTOOLS COMMAND DOM.getDocument (id=7) { + +} +[1532715853.762][DEBUG]: DEVTOOLS EVENT Page.loadEventFired { + "timestamp": 328538.03996 +} +[1532715853.762][DEBUG]: DEVTOOLS EVENT Page.frameStoppedLoading { + "frameId": "2BD057A9A54060B8A7969DB92D36643F" +} +[1532715853.762][DEBUG]: DEVTOOLS EVENT DOM.documentUpdated { + +} +[1532715853.762][DEBUG]: DEVTOOLS COMMAND DOM.getDocument (id=8) { + +} +[1532715853.763][DEBUG]: DEVTOOLS EVENT Page.domContentEventFired { + "timestamp": 328538.042859 +} +[1532715853.780][DEBUG]: DEVTOOLS EVENT Runtime.executionContextCreated { + "context": { + "auxData": { + "frameId": "2BD057A9A54060B8A7969DB92D36643F", + "isDefault": true + }, + "id": 1, + "name": "", + "origin": "://" + } +} +[1532715853.780][DEBUG]: DEVTOOLS RESPONSE Runtime.enable (id=6) { + +} +[1532715853.781][DEBUG]: DEVTOOLS EVENT Page.frameResized { + +} +[1532715853.790][DEBUG]: DEVTOOLS RESPONSE DOM.getDocument (id=7) { + "root": { + "backendNodeId": 5, + "baseURL": "data:,", + "childNodeCount": 1, + "children": [ { + "attributes": [ ], + "backendNodeId": 6, + "childNodeCount": 2, + "children": [ { + "attributes": [ ], + "backendNodeId": 7, + "childNodeCount": 0, + "localName": "head", + "nodeId": 7, + "nodeName": "HEAD", + "nodeType": 1, + "nodeValue": "", + "parentId": 6 + }, { + "attributes": [ ], + "backendNodeId": 8, + "childNodeCount": 0, + "localName": "body", + "nodeId": 8, + "nodeName": "BODY", + "nodeType": 1, + "nodeValue": "", + "parentId": 6 + } ], + "frameId": "2BD057A9A54060B8A7969DB92D36643F", + "localName": "html", + "nodeId": 6, + "nodeName": "HTML", + "nodeType": 1, + "nodeValue": "", + "parentId": 5 + } ], + "documentURL": "data:,", + "localName": "", + "nodeId": 5, + "nodeName": "#document", + "nodeType": 9, + "nodeValue": "", + "xmlVersion": "" + } +} +[1532715853.791][DEBUG]: DEVTOOLS RESPONSE DOM.getDocument (id=8) { + "root": { + "backendNodeId": 5, + "baseURL": "data:,", + "childNodeCount": 1, + "children": [ { + "attributes": [ ], + "backendNodeId": 6, + "childNodeCount": 2, + "children": [ { + "attributes": [ ], + "backendNodeId": 7, + "childNodeCount": 0, + "localName": "head", + "nodeId": 11, + "nodeName": "HEAD", + "nodeType": 1, + "nodeValue": "", + "parentId": 10 + }, { + "attributes": [ ], + "backendNodeId": 8, + "childNodeCount": 0, + "localName": "body", + "nodeId": 12, + "nodeName": "BODY", + "nodeType": 1, + "nodeValue": "", + "parentId": 10 + } ], + "frameId": "2BD057A9A54060B8A7969DB92D36643F", + "localName": "html", + "nodeId": 10, + "nodeName": "HTML", + "nodeType": 1, + "nodeValue": "", + "parentId": 9 + } ], + "documentURL": "data:,", + "localName": "", + "nodeId": 9, + "nodeName": "#document", + "nodeType": 9, + "nodeValue": "", + "xmlVersion": "" + } +} +[1532715853.791][DEBUG]: DEVTOOLS COMMAND Page.enable (id=9) { + +} +[1532715853.835][DEBUG]: DEVTOOLS RESPONSE Page.enable (id=9) { + +} +[1532715853.835][DEBUG]: DEVTOOLS COMMAND Runtime.enable (id=10) { + +} +[1532715853.843][DEBUG]: DEVTOOLS RESPONSE Runtime.enable (id=10) { + +} +[1532715853.844][DEBUG]: DEVTOOLS COMMAND Runtime.evaluate (id=11) { + "expression": "(function() { // Copyright (c) 2012 The Chromium Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style license that can be\n// found in the LICENSE file.\n\n/**\n * Enum for WebDriver status codes.\n * @enum {number}\n */\nvar StatusCode = {\n STALE_ELEMENT_REFERENCE: 10,\n UNKNOWN_ERROR: 13,\n};\n\n/**\n * Enum for node types.\n * @enum {number}\n */\nvar NodeType = {\n ELEMENT: 1,\n DOCUMENT: 9,\n};\n\n/**\n * Dictionary key to use for holding an element ID.\n * @const\n * @type {string}\n */\nvar ELEMENT_KEY = 'ELEMENT';\n\n/**\n * True if using W3C Element references.\n * @const\n * @type {boolean}\n */\nvar w3cEnabled = false;\n\n/**\n * True if shadow dom is enabled.\n * @const\n * @type {boolean}\n */\nvar SHADOW_DOM_ENABLED = typeof ShadowRoot === 'function';\n\n/**\n * Generates a unique ID to identify an element.\n * @void\n * @return {string} Randomly generated ID.\n */\nfunction generateUUID() {\n var array = new Uint8Array(16);\n window.crypto.getRandomValues(array);\n array[6] = 0x40 | (array[6] & 0x0f);\n array[8] = 0x80 | (array[8] & 0x3f);\n\n var UUID = \"\";\n for (var i = 0; i \u003C 16; i++) {\n var temp = array[i].toString(16);\n if (temp.length \u003C 2)\n temp = \"0\" + temp;\n UUID += temp;\n if (i == 3 || i == 5 || i == 7 || i == 9)\n UUID += \"-\";\n }\n return UUID;\n};\n\n/**\n * A cache which maps IDs \u003C-> cached objects for the purpose of identifying\n * a script object remotely. Uses UUIDs for identification.\n * @constructor\n */\nfunction CacheWithUUID() {\n this.cache_ = {};\n}\n\nCacheWithUUID.prototype = {\n /**\n * Stores a given item in the cache and returns a unique UUID.\n *\n * @param {!Object} item The item to store in the cache.\n * @return {number} The UUID for the cached item.\n */\n storeItem: function(item) {\n for (var i in this.cache_) {\n if (item == this.cache_[i])\n return i;\n }\n var id = generateUUID();\n this.cache_[id] = item;\n return id;\n },\n\n /**\n * Retrieves the cached object for the given ID.\n *\n * @param {number} id The ID for the cached item to retrieve.\n * @return {!Object} The retrieved item.\n */\n retrieveItem: function(id) {\n var item = this.cache_[id];\n if (item)\n return item;\n var error = new Error('not in cache');\n error.code = StatusCode.STALE_ELEMENT_REFERENCE;\n error.message = 'element is not attached to the page document';\n throw error;\n },\n\n /**\n * Clears stale items from the cache.\n */\n clearStale: function() {\n for (var id in this.cache_) {\n var node = this.cache_[id];\n if (!this.isNodeReachable_(node))\n delete this.cache_[id];\n }\n },\n\n /**\n * @private\n * @param {!Node} node The node to check.\n * @return {boolean} If the nodes is reachable.\n */\n isNodeReachable_: function(node) {\n var nodeRoot = getNodeRootThroughAnyShadows(node);\n return (nodeRoot == document);\n }\n\n\n};\n\n/**\n * A cache which maps IDs \u003C-> cached objects for the purpose of identifying\n * a script object remotely.\n * @constructor\n */\nfunction Cache() {\n this.cache_ = {};\n this.nextId_ = 1;\n this.idPrefix_ = Math.random().toString();\n}\n\nCache.prototype = {\n\n /**\n * Stores a given item in the cache and returns a unique ID.\n *\n * @param {!Object} item The item to store in the cache.\n * @return {number} The ID for the cached item.\n */\n storeItem: function(item) {\n for (var i in this.cache_) {\n if (item == this.cache_[i])\n return i;\n }\n var id = this.idPrefix_ + '-' + this.nextId_;\n this.cache_[id] = item;\n this.nextId_++;\n return id;\n },\n\n /**\n * Retrieves the cached object for the given ID.\n *\n * @param {number} id The ID for the cached item to retrieve.\n * @return {!Object} The retrieved item.\n */\n retrieveItem: function(id) {\n var item = this.cache_[id];\n if (item)\n return item;\n var error = new Error('not in cache');\n error.code = StatusCode.STALE_ELEMENT_REFERENCE;\n error.message = 'element is not attached to the page document';\n throw error;\n },\n\n /**\n * Clears stale items from the cache.\n */\n clearStale: function() {\n for (var id in this.cache_) {\n var node = this.cache_[id];\n if (!this.isNodeReachable_(node))\n delete this.cache_[id];\n }\n },\n\n /**\n * @private\n * @param {!Node} node The node to check.\n * @return {boolean} If the nodes is reachable.\n */\n isNodeReachable_: function(node) {\n var nodeRoot = getNodeRootThroughAnyShadows(node);\n return (nodeRoot == document);\n }\n};\n\n/**\n * Returns the root element of the node. Found by traversing parentNodes until\n * a node with no parent is found. This node is considered the root.\n * @param {?Node} node The node to find the root element for.\n * @return {?Node} The root node.\n */\nfunction getNodeRoot(node) {\n while (node && node.parentNode) {\n node = node.parentNode;\n }\n return node;\n}\n\n/**\n * Returns the root element of the node, jumping up through shadow roots if\n * any are found.\n */\nfunction getNodeRootThroughAnyShadows(node) {\n var root = getNodeRoot(node);\n while (SHADOW_DOM_ENABLED && root instanceof ShadowRoot) {\n root = getNodeRoot(root.host);\n }\n return root;\n}\n\n/**\n * Returns the global object cache for the page.\n * @param {Document=} opt_doc The document whose cache to retrieve. Defaults to\n * the current document.\n * @return {!Cache} The page's object cache.\n */\nfunction getPageCache(opt_doc, opt_w3c) {\n var doc = opt_doc || document;\n var w3c = opt_w3c || false;\n var key = '$cdc_asdjflasutopfhvcZLmcfl_';\n if (w3c) {\n if (!(key in doc))\n doc[key] = new CacheWithUUID();\n return doc[key];\n } else {\n if (!(key in doc))\n doc[key] = new Cache();\n return doc[key];\n }\n}\n\n/**\n * Wraps the given value to be transmitted remotely by converting\n * appropriate objects to cached object IDs.\n *\n * @param {*} value The value to wrap.\n * @return {*} The wrapped value.\n */\nfunction wrap(value) {\n // As of crrev.com/1316933002, typeof() for some elements will return\n // 'function', not 'object'. So we need to check for both non-null objects, as\n // well Elements that also happen to be callable functions (e.g. \u003Cembed> and\n // \u003Cobject> elements). Note that we can not use |value instanceof Object| here\n // since this does not work with frames/iframes, for example\n // frames[0].document.body instanceof Object == false even though\n // typeof(frames[0].document.body) == 'object'.\n if ((typeof(value) == 'object' && value != null) ||\n (typeof(value) == 'function' && value.nodeName &&\n value.nodeType == NodeType.ELEMENT)) {\n var nodeType = value['nodeType'];\n if (nodeType == NodeType.ELEMENT || nodeType == NodeType.DOCUMENT\n || (SHADOW_DOM_ENABLED && value instanceof ShadowRoot)) {\n var wrapped = {};\n var root = getNodeRootThroughAnyShadows(value);\n wrapped[ELEMENT_KEY] = getPageCache(root, w3cEnabled).storeItem(value);\n return wrapped;\n }\n\n var obj;\n if (typeof(value.length) == 'number') {\n obj = [];\n for (var i = 0; i \u003C value.length; i++)\n obj[i] = wrap(value[i]);\n } else {\n obj = {};\n for (var prop in value)\n obj[prop] = wrap(value[prop]);\n }\n return obj;\n }\n return value;\n}\n\n/**\n * Unwraps the given value by converting from object IDs to the cached\n * objects.\n *\n * @param {*} value The value to unwrap.\n * @param {Cache} cache The cache to retrieve wrapped elements from.\n * @return {*} The unwrapped value.\n */\nfunction unwrap(value, cache) {\n if (typeof(value) == 'object' && value != null) {\n if (ELEMENT_KEY in value)\n return cache.retrieveItem(value[ELEMENT_KEY]);\n\n var obj;\n if (typeof(value.length) == 'number') {\n obj = [];\n for (var i = 0; i \u003C value.length; i++)\n obj[i] = unwrap(value[i], cache);\n } else {\n obj = {};\n for (var prop in value)\n obj[prop] = unwrap(value[prop], cache);\n }\n return obj;\n }\n return value;\n}\n\n/**\n * Calls a given function and returns its value.\n *\n * The inputs to and outputs of the function will be unwrapped and wrapped\n * respectively, unless otherwise specified. This wrapping involves converting\n * between cached object reference IDs and actual JS objects. The cache will\n * automatically be pruned each call to remove stale references.\n *\n * @param {Array\u003Cstring>} shadowHostIds The host ids of the nested shadow\n * DOMs the function should be executed in the context of.\n * @param {function(...[*]) : *} func The function to invoke.\n * @param {!Array\u003C*>} args The array of arguments to supply to the function,\n * which will be unwrapped before invoking the function.\n * @param {boolean} w3c Whether to return a W3C compliant element reference.\n * @param {boolean=} opt_unwrappedReturn Whether the function's return value\n * should be left unwrapped.\n * @return {*} An object containing a status and value property, where status\n * is a WebDriver status code and value is the wrapped value. If an\n * unwrapped return was specified, this will be the function's pure return\n * value.\n */\nfunction callFunction(shadowHostIds, func, args, w3c, opt_unwrappedReturn) {\n if (w3c) {\n w3cEnabled = true;\n ELEMENT_KEY = 'element-6066-11e4-a52e-4f735466cecf';\n\n }\n var cache = getPageCache(null, w3cEnabled);\n cache.clearStale();\n if (shadowHostIds && SHADOW_DOM_ENABLED) {\n for (var i = 0; i \u003C shadowHostIds.length; i++) {\n var host = cache.retrieveItem(shadowHostIds[i]);\n // TODO(zachconrad): Use the olderShadowRoot API when available to check\n // all of the shadow roots.\n cache = getPageCache(host.webkitShadowRoot, w3cEnabled);\n cache.clearStale();\n }\n }\n\n if (opt_unwrappedReturn)\n return func.apply(null, unwrap(args, cache));\n\n var status = 0;\n try {\n var returnValue = wrap(func.apply(null, unwrap(args, cache)));\n } catch (error) {\n status = error.code || StatusCode.UNKNOWN_ERROR;\n var returnValue = error.message;\n }\n return {\n status: status,\n value: returnValue\n }\n}\n; return callFunction.apply(null, arguments) }\n).apply(null, [null, function(s) { return 1; }, [], false])", + "returnByValue": true +} +[1532715853.875][DEBUG]: DEVTOOLS RESPONSE Runtime.evaluate (id=11) { + "result": { + "type": "object", + "value": { + "status": 0, + "value": 1 + } + } +} +[1532715853.876][INFO]: [c3681035a5e0990f0e117e8f7299f793] RESPONSE InitSession { + "acceptInsecureCerts": false, + "acceptSslCerts": false, + "applicationCacheEnabled": false, + "browserConnectionEnabled": false, + "browserName": "chrome", + "chrome": { + "chromedriverVersion": "2.40 (8486fd6e5eb99bf7d30a4ee2c2937d229d06e595)", + "userDataDir": "/tmp/.org.chromium.Chromium.sNKRlA" + }, + "cssSelectorsEnabled": true, + "databaseEnabled": false, + "goog:chromeOptions": { + "debuggerAddress": "localhost:42389" + }, + "handlesAlerts": true, + "hasTouchScreen": false, + "javascriptEnabled": true, + "locationContextEnabled": true, + "mobileEmulationEnabled": false, + "nativeEvents": true, + "networkConnectionEnabled": false, + "pageLoadStrategy": "normal", + "platform": "Linux", + "rotatable": false, + "setWindowRect": true, + "takesHeapSnapshot": true, + "takesScreenshot": true, + "unexpectedAlertBehaviour": "", + "version": "69.0.3491.0", + "webStorageEnabled": true +} +[1532715853.877][INFO]: [c3681035a5e0990f0e117e8f7299f793] COMMAND Navigate { + "url": "http://127.0.0.1:34537/chromedriver/empty.html" +} +[1532715853.877][INFO]: Waiting for pending navigations... +[1532715853.877][DEBUG]: DEVTOOLS COMMAND Runtime.evaluate (id=12) { + "expression": "1" +} +[1532715853.880][DEBUG]: DEVTOOLS RESPONSE Runtime.evaluate (id=12) { + "result": { + "description": "1", + "type": "number", + "value": 1 + } +} +[1532715853.880][INFO]: Done waiting for pending navigations. Status: ok +[1532715853.880][DEBUG]: DEVTOOLS COMMAND Page.navigate (id=13) { + "url": "http://127.0.0.1:34537/chromedriver/empty.html" +} +[1532715854.170][DEBUG]: DEVTOOLS RESPONSE Page.navigate (id=13) { + "frameId": "2BD057A9A54060B8A7969DB92D36643F", + "loaderId": "CFC45975294A7B1707735281585563E8" +} +[1532715854.170][DEBUG]: DEVTOOLS COMMAND Runtime.evaluate (id=14) { + "expression": "document.URL" +} +[1532715854.180][DEBUG]: DEVTOOLS EVENT Runtime.executionContextsCleared { + +} +[1532715854.198][DEBUG]: DEVTOOLS EVENT Page.frameStartedLoading { + "frameId": "2BD057A9A54060B8A7969DB92D36643F" +} +[177373:177373:0727/112414.261698:ERROR:render_process_impl.cc(208)] WebFrame LEAKED 1 TIMES +[1532715854.276][DEBUG]: DEVTOOLS EVENT Runtime.executionContextsCleared { + +} +[1532715854.276][DEBUG]: DEVTOOLS EVENT Page.frameNavigated { + "frame": { + "id": "2BD057A9A54060B8A7969DB92D36643F", + "loaderId": "CFC45975294A7B1707735281585563E8", + "mimeType": "text/html", + "securityOrigin": "http://127.0.0.1:34537", + "url": "http://127.0.0.1:34537/chromedriver/empty.html" + } +} +[1532715854.276][DEBUG]: DEVTOOLS EVENT Runtime.executionContextCreated { + "context": { + "auxData": { + "frameId": "2BD057A9A54060B8A7969DB92D36643F", + "isDefault": true + }, + "id": 1, + "name": "", + "origin": "http://127.0.0.1:34537" + } +} +[1532715854.276][DEBUG]: DEVTOOLS EVENT DOM.documentUpdated { + +} +[1532715854.276][DEBUG]: DEVTOOLS COMMAND DOM.getDocument (id=15) { + +} +[1532715854.307][DEBUG]: DEVTOOLS EVENT Page.loadEventFired { + "timestamp": 328538.58037 +} +[1532715854.307][DEBUG]: DEVTOOLS EVENT Page.frameStoppedLoading { + "frameId": "2BD057A9A54060B8A7969DB92D36643F" +} +[1532715854.307][DEBUG]: DEVTOOLS EVENT DOM.documentUpdated { + +} +[1532715854.307][DEBUG]: DEVTOOLS COMMAND DOM.getDocument (id=16) { + +} +[1532715854.307][DEBUG]: DEVTOOLS EVENT Page.domContentEventFired { + "timestamp": 328538.582574 +} +[1532715854.307][DEBUG]: DEVTOOLS RESPONSE Runtime.evaluate (id=14) { + "result": { + "type": "string", + "value": "http://127.0.0.1:34537/chromedriver/empty.html" + } +} +[1532715854.313][DEBUG]: DEVTOOLS RESPONSE DOM.getDocument (id=15) { + "root": { + "backendNodeId": 1, + "baseURL": "http://127.0.0.1:34537/chromedriver/empty.html", + "childNodeCount": 1, + "children": [ { + "attributes": [ ], + "backendNodeId": 2, + "childNodeCount": 2, + "children": [ { + "attributes": [ ], + "backendNodeId": 3, + "childNodeCount": 0, + "localName": "head", + "nodeId": 3, + "nodeName": "HEAD", + "nodeType": 1, + "nodeValue": "", + "parentId": 2 + }, { + "attributes": [ ], + "backendNodeId": 4, + "childNodeCount": 0, + "children": [ { + "backendNodeId": 5, + "localName": "", + "nodeId": 5, + "nodeName": "#text", + "nodeType": 3, + "nodeValue": "\n", + "parentId": 4 + } ], + "localName": "body", + "nodeId": 4, + "nodeName": "BODY", + "nodeType": 1, + "nodeValue": "", + "parentId": 2 + } ], + "frameId": "2BD057A9A54060B8A7969DB92D36643F", + "localName": "html", + "nodeId": 2, + "nodeName": "HTML", + "nodeType": 1, + "nodeValue": "", + "parentId": 1 + } ], + "documentURL": "http://127.0.0.1:34537/chromedriver/empty.html", + "localName": "", + "nodeId": 1, + "nodeName": "#document", + "nodeType": 9, + "nodeValue": "", + "xmlVersion": "" + } +} +[1532715854.318][DEBUG]: DEVTOOLS RESPONSE DOM.getDocument (id=16) { + "root": { + "backendNodeId": 1, + "baseURL": "http://127.0.0.1:34537/chromedriver/empty.html", + "childNodeCount": 1, + "children": [ { + "attributes": [ ], + "backendNodeId": 2, + "childNodeCount": 2, + "children": [ { + "attributes": [ ], + "backendNodeId": 3, + "childNodeCount": 0, + "localName": "head", + "nodeId": 8, + "nodeName": "HEAD", + "nodeType": 1, + "nodeValue": "", + "parentId": 7 + }, { + "attributes": [ ], + "backendNodeId": 4, + "childNodeCount": 0, + "children": [ { + "backendNodeId": 5, + "localName": "", + "nodeId": 10, + "nodeName": "#text", + "nodeType": 3, + "nodeValue": "\n", + "parentId": 9 + } ], + "localName": "body", + "nodeId": 9, + "nodeName": "BODY", + "nodeType": 1, + "nodeValue": "", + "parentId": 7 + } ], + "frameId": "2BD057A9A54060B8A7969DB92D36643F", + "localName": "html", + "nodeId": 7, + "nodeName": "HTML", + "nodeType": 1, + "nodeValue": "", + "parentId": 6 + } ], + "documentURL": "http://127.0.0.1:34537/chromedriver/empty.html", + "localName": "", + "nodeId": 6, + "nodeName": "#document", + "nodeType": 9, + "nodeValue": "", + "xmlVersion": "" + } +} +[1532715854.319][INFO]: Waiting for pending navigations... +[1532715854.319][DEBUG]: DEVTOOLS COMMAND Runtime.evaluate (id=17) { + "expression": "1" +} +[1532715854.322][DEBUG]: DEVTOOLS EVENT Log.entryAdded { + "entry": { + "level": "error", + "networkRequestId": "1000177411.2", + "source": "network", + "text": "Failed to load resource: the server responded with a status of 404 (Not Found)", + "timestamp": 1532715854319.89, + "url": "http://127.0.0.1:34537/favicon.ico" + } +} +[1532715854.324][DEBUG]: DEVTOOLS RESPONSE Runtime.evaluate (id=17) { + "result": { + "description": "1", + "type": "number", + "value": 1 + } +} +[1532715854.324][INFO]: Done waiting for pending navigations. Status: ok +[1532715854.324][INFO]: [c3681035a5e0990f0e117e8f7299f793] RESPONSE Navigate +[1532715854.325][INFO]: [c3681035a5e0990f0e117e8f7299f793] COMMAND ExecuteScript { + "args": [ ], + "script": "document.body.innerHTML = '\u003Cinput type=\"text\" value=\"abc\">';return document.getElementsByTagName(\"input\")[0];" +} +[1532715854.325][INFO]: Waiting for pending navigations... +[1532715854.325][DEBUG]: DEVTOOLS COMMAND Runtime.evaluate (id=18) { + "expression": "1" +} +[1532715854.327][DEBUG]: DEVTOOLS RESPONSE Runtime.evaluate (id=18) { + "result": { + "description": "1", + "type": "number", + "value": 1 + } +} +[1532715854.327][INFO]: Done waiting for pending navigations. Status: ok +[1532715854.329][DEBUG]: DEVTOOLS COMMAND Runtime.evaluate (id=19) { + "expression": "(function() { // Copyright (c) 2012 The Chromium Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style license that can be\n// found in the LICENSE file.\n\n/**\n * Enum for WebDriver status codes.\n * @enum {number}\n */\nvar StatusCode = {\n STALE_ELEMENT_REFERENCE: 10,\n UNKNOWN_ERROR: 13,\n};\n\n/**\n * Enum for node types.\n * @enum {number}\n */\nvar NodeType = {\n ELEMENT: 1,\n DOCUMENT: 9,\n};\n\n/**\n * Dictionary key to use for holding an element ID.\n * @const\n * @type {string}\n */\nvar ELEMENT_KEY = 'ELEMENT';\n\n/**\n * True if using W3C Element references.\n * @const\n * @type {boolean}\n */\nvar w3cEnabled = false;\n\n/**\n * True if shadow dom is enabled.\n * @const\n * @type {boolean}\n */\nvar SHADOW_DOM_ENABLED = typeof ShadowRoot === 'function';\n\n/**\n * Generates a unique ID to identify an element.\n * @void\n * @return {string} Randomly generated ID.\n */\nfunction generateUUID() {\n var array = new Uint8Array(16);\n window.crypto.getRandomValues(array);\n array[6] = 0x40 | (array[6] & 0x0f);\n array[8] = 0x80 | (array[8] & 0x3f);\n\n var UUID = \"\";\n for (var i = 0; i \u003C 16; i++) {\n var temp = array[i].toString(16);\n if (temp.length \u003C 2)\n temp = \"0\" + temp;\n UUID += temp;\n if (i == 3 || i == 5 || i == 7 || i == 9)\n UUID += \"-\";\n }\n return UUID;\n};\n\n/**\n * A cache which maps IDs \u003C-> cached objects for the purpose of identifying\n * a script object remotely. Uses UUIDs for identification.\n * @constructor\n */\nfunction CacheWithUUID() {\n this.cache_ = {};\n}\n\nCacheWithUUID.prototype = {\n /**\n * Stores a given item in the cache and returns a unique UUID.\n *\n * @param {!Object} item The item to store in the cache.\n * @return {number} The UUID for the cached item.\n */\n storeItem: function(item) {\n for (var i in this.cache_) {\n if (item == this.cache_[i])\n return i;\n }\n var id = generateUUID();\n this.cache_[id] = item;\n return id;\n },\n\n /**\n * Retrieves the cached object for the given ID.\n *\n * @param {number} id The ID for the cached item to retrieve.\n * @return {!Object} The retrieved item.\n */\n retrieveItem: function(id) {\n var item = this.cache_[id];\n if (item)\n return item;\n var error = new Error('not in cache');\n error.code = StatusCode.STALE_ELEMENT_REFERENCE;\n error.message = 'element is not attached to the page document';\n throw error;\n },\n\n /**\n * Clears stale items from the cache.\n */\n clearStale: function() {\n for (var id in this.cache_) {\n var node = this.cache_[id];\n if (!this.isNodeReachable_(node))\n delete this.cache_[id];\n }\n },\n\n /**\n * @private\n * @param {!Node} node The node to check.\n * @return {boolean} If the nodes is reachable.\n */\n isNodeReachable_: function(node) {\n var nodeRoot = getNodeRootThroughAnyShadows(node);\n return (nodeRoot == document);\n }\n\n\n};\n\n/**\n * A cache which maps IDs \u003C-> cached objects for the purpose of identifying\n * a script object remotely.\n * @constructor\n */\nfunction Cache() {\n this.cache_ = {};\n this.nextId_ = 1;\n this.idPrefix_ = Math.random().toString();\n}\n\nCache.prototype = {\n\n /**\n * Stores a given item in the cache and returns a unique ID.\n *\n * @param {!Object} item The item to store in the cache.\n * @return {number} The ID for the cached item.\n */\n storeItem: function(item) {\n for (var i in this.cache_) {\n if (item == this.cache_[i])\n return i;\n }\n var id = this.idPrefix_ + '-' + this.nextId_;\n this.cache_[id] = item;\n this.nextId_++;\n return id;\n },\n\n /**\n * Retrieves the cached object for the given ID.\n *\n * @param {number} id The ID for the cached item to retrieve.\n * @return {!Object} The retrieved item.\n */\n retrieveItem: function(id) {\n var item = this.cache_[id];\n if (item)\n return item;\n var error = new Error('not in cache');\n error.code = StatusCode.STALE_ELEMENT_REFERENCE;\n error.message = 'element is not attached to the page document';\n throw error;\n },\n\n /**\n * Clears stale items from the cache.\n */\n clearStale: function() {\n for (var id in this.cache_) {\n var node = this.cache_[id];\n if (!this.isNodeReachable_(node))\n delete this.cache_[id];\n }\n },\n\n /**\n * @private\n * @param {!Node} node The node to check.\n * @return {boolean} If the nodes is reachable.\n */\n isNodeReachable_: function(node) {\n var nodeRoot = getNodeRootThroughAnyShadows(node);\n return (nodeRoot == document);\n }\n};\n\n/**\n * Returns the root element of the node. Found by traversing parentNodes until\n * a node with no parent is found. This node is considered the root.\n * @param {?Node} node The node to find the root element for.\n * @return {?Node} The root node.\n */\nfunction getNodeRoot(node) {\n while (node && node.parentNode) {\n node = node.parentNode;\n }\n return node;\n}\n\n/**\n * Returns the root element of the node, jumping up through shadow roots if\n * any are found.\n */\nfunction getNodeRootThroughAnyShadows(node) {\n var root = getNodeRoot(node);\n while (SHADOW_DOM_ENABLED && root instanceof ShadowRoot) {\n root = getNodeRoot(root.host);\n }\n return root;\n}\n\n/**\n * Returns the global object cache for the page.\n * @param {Document=} opt_doc The document whose cache to retrieve. Defaults to\n * the current document.\n * @return {!Cache} The page's object cache.\n */\nfunction getPageCache(opt_doc, opt_w3c) {\n var doc = opt_doc || document;\n var w3c = opt_w3c || false;\n var key = '$cdc_asdjflasutopfhvcZLmcfl_';\n if (w3c) {\n if (!(key in doc))\n doc[key] = new CacheWithUUID();\n return doc[key];\n } else {\n if (!(key in doc))\n doc[key] = new Cache();\n return doc[key];\n }\n}\n\n/**\n * Wraps the given value to be transmitted remotely by converting\n * appropriate objects to cached object IDs.\n *\n * @param {*} value The value to wrap.\n * @return {*} The wrapped value.\n */\nfunction wrap(value) {\n // As of crrev.com/1316933002, typeof() for some elements will return\n // 'function', not 'object'. So we need to check for both non-null objects, as\n // well Elements that also happen to be callable functions (e.g. \u003Cembed> and\n // \u003Cobject> elements). Note that we can not use |value instanceof Object| here\n // since this does not work with frames/iframes, for example\n // frames[0].document.body instanceof Object == false even though\n // typeof(frames[0].document.body) == 'object'.\n if ((typeof(value) == 'object' && value != null) ||\n (typeof(value) == 'function' && value.nodeName &&\n value.nodeType == NodeType.ELEMENT)) {\n var nodeType = value['nodeType'];\n if (nodeType == NodeType.ELEMENT || nodeType == NodeType.DOCUMENT\n || (SHADOW_DOM_ENABLED && value instanceof ShadowRoot)) {\n var wrapped = {};\n var root = getNodeRootThroughAnyShadows(value);\n wrapped[ELEMENT_KEY] = getPageCache(root, w3cEnabled).storeItem(value);\n return wrapped;\n }\n\n var obj;\n if (typeof(value.length) == 'number') {\n obj = [];\n for (var i = 0; i \u003C value.length; i++)\n obj[i] = wrap(value[i]);\n } else {\n obj = {};\n for (var prop in value)\n obj[prop] = wrap(value[prop]);\n }\n return obj;\n }\n return value;\n}\n\n/**\n * Unwraps the given value by converting from object IDs to the cached\n * objects.\n *\n * @param {*} value The value to unwrap.\n * @param {Cache} cache The cache to retrieve wrapped elements from.\n * @return {*} The unwrapped value.\n */\nfunction unwrap(value, cache) {\n if (typeof(value) == 'object' && value != null) {\n if (ELEMENT_KEY in value)\n return cache.retrieveItem(value[ELEMENT_KEY]);\n\n var obj;\n if (typeof(value.length) == 'number') {\n obj = [];\n for (var i = 0; i \u003C value.length; i++)\n obj[i] = unwrap(value[i], cache);\n } else {\n obj = {};\n for (var prop in value)\n obj[prop] = unwrap(value[prop], cache);\n }\n return obj;\n }\n return value;\n}\n\n/**\n * Calls a given function and returns its value.\n *\n * The inputs to and outputs of the function will be unwrapped and wrapped\n * respectively, unless otherwise specified. This wrapping involves converting\n * between cached object reference IDs and actual JS objects. The cache will\n * automatically be pruned each call to remove stale references.\n *\n * @param {Array\u003Cstring>} shadowHostIds The host ids of the nested shadow\n * DOMs the function should be executed in the context of.\n * @param {function(...[*]) : *} func The function to invoke.\n * @param {!Array\u003C*>} args The array of arguments to supply to the function,\n * which will be unwrapped before invoking the function.\n * @param {boolean} w3c Whether to return a W3C compliant element reference.\n * @param {boolean=} opt_unwrappedReturn Whether the function's return value\n * should be left unwrapped.\n * @return {*} An object containing a status and value property, where status\n * is a WebDriver status code and value is the wrapped value. If an\n * unwrapped return was specified, this will be the function's pure return\n * value.\n */\nfunction callFunction(shadowHostIds, func, args, w3c, opt_unwrappedReturn) {\n if (w3c) {\n w3cEnabled = true;\n ELEMENT_KEY = 'element-6066-11e4-a52e-4f735466cecf';\n\n }\n var cache = getPageCache(null, w3cEnabled);\n cache.clearStale();\n if (shadowHostIds && SHADOW_DOM_ENABLED) {\n for (var i = 0; i \u003C shadowHostIds.length; i++) {\n var host = cache.retrieveItem(shadowHostIds[i]);\n // TODO(zachconrad): Use the olderShadowRoot API when available to check\n // all of the shadow roots.\n cache = getPageCache(host.webkitShadowRoot, w3cEnabled);\n cache.clearStale();\n }\n }\n\n if (opt_unwrappedReturn)\n return func.apply(null, unwrap(args, cache));\n\n var status = 0;\n try {\n var returnValue = wrap(func.apply(null, unwrap(args, cache)));\n } catch (error) {\n status = error.code || StatusCode.UNKNOWN_ERROR;\n var returnValue = error.message;\n }\n return {\n status: status,\n value: returnValue\n }\n}\n; return callFunction.apply(null, arguments) }\n).apply(null, [null, function(){document.body.innerHTML = '\u003Cinput type=\"text\" value=\"abc\">';return document.getElementsByTagName(\"input\")[0];}, [], false])", + "returnByValue": true +} +[1532715854.359][DEBUG]: DEVTOOLS EVENT DOM.childNodeInserted { + "node": { + "attributes": [ "type", "text", "value", "abc" ], + "backendNodeId": 6, + "childNodeCount": 0, + "children": [ ], + "localName": "input", + "nodeId": 11, + "nodeName": "INPUT", + "nodeType": 1, + "nodeValue": "", + "shadowRoots": [ { + "backendNodeId": 7, + "childNodeCount": 1, + "localName": "", + "nodeId": 12, + "nodeName": "#document-fragment", + "nodeType": 11, + "nodeValue": "", + "shadowRootType": "user-agent" + } ] + }, + "parentNodeId": 9, + "previousNodeId": 0 +} +[1532715854.360][DEBUG]: DEVTOOLS RESPONSE Runtime.evaluate (id=19) { + "result": { + "type": "object", + "value": { + "status": 0, + "value": { + "ELEMENT": "0.47435541797315195-1" + } + } + } +} +[1532715854.360][INFO]: Waiting for pending navigations... +[1532715854.360][DEBUG]: DEVTOOLS COMMAND Runtime.evaluate (id=20) { + "expression": "1" +} +[1532715854.409][DEBUG]: DEVTOOLS RESPONSE Runtime.evaluate (id=20) { + "result": { + "description": "1", + "type": "number", + "value": 1 + } +} +[1532715854.409][INFO]: Done waiting for pending navigations. Status: ok +[1532715854.409][INFO]: [c3681035a5e0990f0e117e8f7299f793] RESPONSE ExecuteScript { + "ELEMENT": "0.47435541797315195-1" +} +[1532715854.411][INFO]: [c3681035a5e0990f0e117e8f7299f793] COMMAND ExecuteScript { + "args": [ { + "ELEMENT": "0.47435541797315195-1" + } ], + "script": "return arguments[0].value;" +} +[1532715854.411][INFO]: Waiting for pending navigations... +[1532715854.411][DEBUG]: DEVTOOLS COMMAND Runtime.evaluate (id=21) { + "expression": "1" +} +[1532715854.428][DEBUG]: DEVTOOLS RESPONSE Runtime.evaluate (id=21) { + "result": { + "description": "1", + "type": "number", + "value": 1 + } +} +[1532715854.428][INFO]: Done waiting for pending navigations. Status: ok +[1532715854.429][DEBUG]: DEVTOOLS COMMAND Runtime.evaluate (id=22) { + "expression": "(function() { // Copyright (c) 2012 The Chromium Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style license that can be\n// found in the LICENSE file.\n\n/**\n * Enum for WebDriver status codes.\n * @enum {number}\n */\nvar StatusCode = {\n STALE_ELEMENT_REFERENCE: 10,\n UNKNOWN_ERROR: 13,\n};\n\n/**\n * Enum for node types.\n * @enum {number}\n */\nvar NodeType = {\n ELEMENT: 1,\n DOCUMENT: 9,\n};\n\n/**\n * Dictionary key to use for holding an element ID.\n * @const\n * @type {string}\n */\nvar ELEMENT_KEY = 'ELEMENT';\n\n/**\n * True if using W3C Element references.\n * @const\n * @type {boolean}\n */\nvar w3cEnabled = false;\n\n/**\n * True if shadow dom is enabled.\n * @const\n * @type {boolean}\n */\nvar SHADOW_DOM_ENABLED = typeof ShadowRoot === 'function';\n\n/**\n * Generates a unique ID to identify an element.\n * @void\n * @return {string} Randomly generated ID.\n */\nfunction generateUUID() {\n var array = new Uint8Array(16);\n window.crypto.getRandomValues(array);\n array[6] = 0x40 | (array[6] & 0x0f);\n array[8] = 0x80 | (array[8] & 0x3f);\n\n var UUID = \"\";\n for (var i = 0; i \u003C 16; i++) {\n var temp = array[i].toString(16);\n if (temp.length \u003C 2)\n temp = \"0\" + temp;\n UUID += temp;\n if (i == 3 || i == 5 || i == 7 || i == 9)\n UUID += \"-\";\n }\n return UUID;\n};\n\n/**\n * A cache which maps IDs \u003C-> cached objects for the purpose of identifying\n * a script object remotely. Uses UUIDs for identification.\n * @constructor\n */\nfunction CacheWithUUID() {\n this.cache_ = {};\n}\n\nCacheWithUUID.prototype = {\n /**\n * Stores a given item in the cache and returns a unique UUID.\n *\n * @param {!Object} item The item to store in the cache.\n * @return {number} The UUID for the cached item.\n */\n storeItem: function(item) {\n for (var i in this.cache_) {\n if (item == this.cache_[i])\n return i;\n }\n var id = generateUUID();\n this.cache_[id] = item;\n return id;\n },\n\n /**\n * Retrieves the cached object for the given ID.\n *\n * @param {number} id The ID for the cached item to retrieve.\n * @return {!Object} The retrieved item.\n */\n retrieveItem: function(id) {\n var item = this.cache_[id];\n if (item)\n return item;\n var error = new Error('not in cache');\n error.code = StatusCode.STALE_ELEMENT_REFERENCE;\n error.message = 'element is not attached to the page document';\n throw error;\n },\n\n /**\n * Clears stale items from the cache.\n */\n clearStale: function() {\n for (var id in this.cache_) {\n var node = this.cache_[id];\n if (!this.isNodeReachable_(node))\n delete this.cache_[id];\n }\n },\n\n /**\n * @private\n * @param {!Node} node The node to check.\n * @return {boolean} If the nodes is reachable.\n */\n isNodeReachable_: function(node) {\n var nodeRoot = getNodeRootThroughAnyShadows(node);\n return (nodeRoot == document);\n }\n\n\n};\n\n/**\n * A cache which maps IDs \u003C-> cached objects for the purpose of identifying\n * a script object remotely.\n * @constructor\n */\nfunction Cache() {\n this.cache_ = {};\n this.nextId_ = 1;\n this.idPrefix_ = Math.random().toString();\n}\n\nCache.prototype = {\n\n /**\n * Stores a given item in the cache and returns a unique ID.\n *\n * @param {!Object} item The item to store in the cache.\n * @return {number} The ID for the cached item.\n */\n storeItem: function(item) {\n for (var i in this.cache_) {\n if (item == this.cache_[i])\n return i;\n }\n var id = this.idPrefix_ + '-' + this.nextId_;\n this.cache_[id] = item;\n this.nextId_++;\n return id;\n },\n\n /**\n * Retrieves the cached object for the given ID.\n *\n * @param {number} id The ID for the cached item to retrieve.\n * @return {!Object} The retrieved item.\n */\n retrieveItem: function(id) {\n var item = this.cache_[id];\n if (item)\n return item;\n var error = new Error('not in cache');\n error.code = StatusCode.STALE_ELEMENT_REFERENCE;\n error.message = 'element is not attached to the page document';\n throw error;\n },\n\n /**\n * Clears stale items from the cache.\n */\n clearStale: function() {\n for (var id in this.cache_) {\n var node = this.cache_[id];\n if (!this.isNodeReachable_(node))\n delete this.cache_[id];\n }\n },\n\n /**\n * @private\n * @param {!Node} node The node to check.\n * @return {boolean} If the nodes is reachable.\n */\n isNodeReachable_: function(node) {\n var nodeRoot = getNodeRootThroughAnyShadows(node);\n return (nodeRoot == document);\n }\n};\n\n/**\n * Returns the root element of the node. Found by traversing parentNodes until\n * a node with no parent is found. This node is considered the root.\n * @param {?Node} node The node to find the root element for.\n * @return {?Node} The root node.\n */\nfunction getNodeRoot(node) {\n while (node && node.parentNode) {\n node = node.parentNode;\n }\n return node;\n}\n\n/**\n * Returns the root element of the node, jumping up through shadow roots if\n * any are found.\n */\nfunction getNodeRootThroughAnyShadows(node) {\n var root = getNodeRoot(node);\n while (SHADOW_DOM_ENABLED && root instanceof ShadowRoot) {\n root = getNodeRoot(root.host);\n }\n return root;\n}\n\n/**\n * Returns the global object cache for the page.\n * @param {Document=} opt_doc The document whose cache to retrieve. Defaults to\n * the current document.\n * @return {!Cache} The page's object cache.\n */\nfunction getPageCache(opt_doc, opt_w3c) {\n var doc = opt_doc || document;\n var w3c = opt_w3c || false;\n var key = '$cdc_asdjflasutopfhvcZLmcfl_';\n if (w3c) {\n if (!(key in doc))\n doc[key] = new CacheWithUUID();\n return doc[key];\n } else {\n if (!(key in doc))\n doc[key] = new Cache();\n return doc[key];\n }\n}\n\n/**\n * Wraps the given value to be transmitted remotely by converting\n * appropriate objects to cached object IDs.\n *\n * @param {*} value The value to wrap.\n * @return {*} The wrapped value.\n */\nfunction wrap(value) {\n // As of crrev.com/1316933002, typeof() for some elements will return\n // 'function', not 'object'. So we need to check for both non-null objects, as\n // well Elements that also happen to be callable functions (e.g. \u003Cembed> and\n // \u003Cobject> elements). Note that we can not use |value instanceof Object| here\n // since this does not work with frames/iframes, for example\n // frames[0].document.body instanceof Object == false even though\n // typeof(frames[0].document.body) == 'object'.\n if ((typeof(value) == 'object' && value != null) ||\n (typeof(value) == 'function' && value.nodeName &&\n value.nodeType == NodeType.ELEMENT)) {\n var nodeType = value['nodeType'];\n if (nodeType == NodeType.ELEMENT || nodeType == NodeType.DOCUMENT\n || (SHADOW_DOM_ENABLED && value instanceof ShadowRoot)) {\n var wrapped = {};\n var root = getNodeRootThroughAnyShadows(value);\n wrapped[ELEMENT_KEY] = getPageCache(root, w3cEnabled).storeItem(value);\n return wrapped;\n }\n\n var obj;\n if (typeof(value.length) == 'number') {\n obj = [];\n for (var i = 0; i \u003C value.length; i++)\n obj[i] = wrap(value[i]);\n } else {\n obj = {};\n for (var prop in value)\n obj[prop] = wrap(value[prop]);\n }\n return obj;\n }\n return value;\n}\n\n/**\n * Unwraps the given value by converting from object IDs to the cached\n * objects.\n *\n * @param {*} value The value to unwrap.\n * @param {Cache} cache The cache to retrieve wrapped elements from.\n * @return {*} The unwrapped value.\n */\nfunction unwrap(value, cache) {\n if (typeof(value) == 'object' && value != null) {\n if (ELEMENT_KEY in value)\n return cache.retrieveItem(value[ELEMENT_KEY]);\n\n var obj;\n if (typeof(value.length) == 'number') {\n obj = [];\n for (var i = 0; i \u003C value.length; i++)\n obj[i] = unwrap(value[i], cache);\n } else {\n obj = {};\n for (var prop in value)\n obj[prop] = unwrap(value[prop], cache);\n }\n return obj;\n }\n return value;\n}\n\n/**\n * Calls a given function and returns its value.\n *\n * The inputs to and outputs of the function will be unwrapped and wrapped\n * respectively, unless otherwise specified. This wrapping involves converting\n * between cached object reference IDs and actual JS objects. The cache will\n * automatically be pruned each call to remove stale references.\n *\n * @param {Array\u003Cstring>} shadowHostIds The host ids of the nested shadow\n * DOMs the function should be executed in the context of.\n * @param {function(...[*]) : *} func The function to invoke.\n * @param {!Array\u003C*>} args The array of arguments to supply to the function,\n * which will be unwrapped before invoking the function.\n * @param {boolean} w3c Whether to return a W3C compliant element reference.\n * @param {boolean=} opt_unwrappedReturn Whether the function's return value\n * should be left unwrapped.\n * @return {*} An object containing a status and value property, where status\n * is a WebDriver status code and value is the wrapped value. If an\n * unwrapped return was specified, this will be the function's pure return\n * value.\n */\nfunction callFunction(shadowHostIds, func, args, w3c, opt_unwrappedReturn) {\n if (w3c) {\n w3cEnabled = true;\n ELEMENT_KEY = 'element-6066-11e4-a52e-4f735466cecf';\n\n }\n var cache = getPageCache(null, w3cEnabled);\n cache.clearStale();\n if (shadowHostIds && SHADOW_DOM_ENABLED) {\n for (var i = 0; i \u003C shadowHostIds.length; i++) {\n var host = cache.retrieveItem(shadowHostIds[i]);\n // TODO(zachconrad): Use the olderShadowRoot API when available to check\n // all of the shadow roots.\n cache = getPageCache(host.webkitShadowRoot, w3cEnabled);\n cache.clearStale();\n }\n }\n\n if (opt_unwrappedReturn)\n return func.apply(null, unwrap(args, cache));\n\n var status = 0;\n try {\n var returnValue = wrap(func.apply(null, unwrap(args, cache)));\n } catch (error) {\n status = error.code || StatusCode.UNKNOWN_ERROR;\n var returnValue = error.message;\n }\n return {\n status: status,\n value: returnValue\n }\n}\n; return callFunction.apply(null, arguments) }\n).apply(null, [null, function(){return arguments[0].value;}, [{\"ELEMENT\":\"0.47435541797315195-1\"}], false])", + "returnByValue": true +} +[1532715854.434][DEBUG]: DEVTOOLS RESPONSE Runtime.evaluate (id=22) { + "result": { + "type": "object", + "value": { + "status": 0, + "value": "abc" + } + } +} +[1532715854.435][INFO]: Waiting for pending navigations... +[1532715854.435][DEBUG]: DEVTOOLS COMMAND Runtime.evaluate (id=23) { + "expression": "1" +} +[1532715854.436][DEBUG]: DEVTOOLS RESPONSE Runtime.evaluate (id=23) { + "result": { + "description": "1", + "type": "number", + "value": 1 + } +} +[1532715854.436][INFO]: Done waiting for pending navigations. Status: ok +[1532715854.436][INFO]: [c3681035a5e0990f0e117e8f7299f793] RESPONSE ExecuteScript "abc" +[1532715854.438][INFO]: [c3681035a5e0990f0e117e8f7299f793] COMMAND ClearElement { + "id": "0.47435541797315195-1" +} +[1532715854.438][INFO]: Waiting for pending navigations... +[1532715854.438][DEBUG]: DEVTOOLS COMMAND Runtime.evaluate (id=24) { + "expression": "1" +} +[1532715854.445][DEBUG]: DEVTOOLS RESPONSE Runtime.evaluate (id=24) { + "result": { + "description": "1", + "type": "number", + "value": 1 + } +} +[1532715854.445][INFO]: Done waiting for pending navigations. Status: ok +[1532715854.451][DEBUG]: DEVTOOLS COMMAND Runtime.evaluate (id=25) { + "expression": "(function() { // Copyright (c) 2012 The Chromium Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style license that can be\n// found in the LICENSE file.\n\n/**\n * Enum for WebDriver status codes.\n * @enum {number}\n */\nvar StatusCode = {\n STALE_ELEMENT_REFERENCE: 10,\n UNKNOWN_ERROR: 13,\n};\n\n/**\n * Enum for node types.\n * @enum {number}\n */\nvar NodeType = {\n ELEMENT: 1,\n DOCUMENT: 9,\n};\n\n/**\n * Dictionary key to use for holding an element ID.\n * @const\n * @type {string}\n */\nvar ELEMENT_KEY = 'ELEMENT';\n\n/**\n * True if using W3C Element references.\n * @const\n * @type {boolean}\n */\nvar w3cEnabled = false;\n\n/**\n * True if shadow dom is enabled.\n * @const\n * @type {boolean}\n */\nvar SHADOW_DOM_ENABLED = typeof ShadowRoot === 'function';\n\n/**\n * Generates a unique ID to identify an element.\n * @void\n * @return {string} Randomly generated ID.\n */\nfunction generateUUID() {\n var array = new Uint8Array(16);\n window.crypto.getRandomValues(array);\n array[6] = 0x40 | (array[6] & 0x0f);\n array[8] = 0x80 | (array[8] & 0x3f);\n\n var UUID = \"\";\n for (var i = 0; i \u003C 16; i++) {\n var temp = array[i].toString(16);\n if (temp.length \u003C 2)\n temp = \"0\" + temp;\n UUID += temp;\n if (i == 3 || i == 5 || i == 7 || i == 9)\n UUID += \"-\";\n }\n return UUID;\n};\n\n/**\n * A cache which maps IDs \u003C-> cached objects for the purpose of identifying\n * a script object remotely. Uses UUIDs for identification.\n * @constructor\n */\nfunction CacheWithUUID() {\n this.cache_ = {};\n}\n\nCacheWithUUID.prototype = {\n /**\n * Stores a given item in the cache and returns a unique UUID.\n *\n * @param {!Object} item The item to store in the cache.\n * @return {number} The UUID for the cached item.\n */\n storeItem: function(item) {\n for (var i in this.cache_) {\n if (item == this.cache_[i])\n return i;\n }\n var id = generateUUID();\n this.cache_[id] = item;\n return id;\n },\n\n /**\n * Retrieves the cached object for the given ID.\n *\n * @param {number} id The ID for the cached item to retrieve.\n * @return {!Object} The retrieved item.\n */\n retrieveItem: function(id) {\n var item = this.cache_[id];\n if (item)\n return item;\n var error = new Error('not in cache');\n error.code = StatusCode.STALE_ELEMENT_REFERENCE;\n error.message = 'element is not attached to the page document';\n throw error;\n },\n\n /**\n * Clears stale items from the cache.\n */\n clearStale: function() {\n for (var id in this.cache_) {\n var node = this.cache_[id];\n if (!this.isNodeReachable_(node))\n delete this.cache_[id];\n }\n },\n\n /**\n * @private\n * @param {!Node} node The node to check.\n * @return {boolean} If the nodes is reachable.\n */\n isNodeReachable_: function(node) {\n var nodeRoot = getNodeRootThroughAnyShadows(node);\n return (nodeRoot == document);\n }\n\n\n};\n\n/**\n * A cache which maps IDs \u003C-> cached objects for the purpose of identifying\n * a script object remotely.\n * @constructor\n */\nfunction Cache() {\n this.cache_ = {};\n this.nextId_ = 1;\n this.idPrefix_ = Math.random().toString();\n}\n\nCache.prototype = {\n\n /**\n * Stores a given item in the cache and returns a unique ID.\n *\n * @param {!Object} item The item to store in the cache.\n * @return {number} The ID for the cached item.\n */\n storeItem: function(item) {\n for (var i in this.cache_) {\n if (item == this.cache_[i])\n return i;\n }\n var id = this.idPrefix_ + '-' + this.nextId_;\n this.cache_[id] = item;\n this.nextId_++;\n return id;\n },\n\n /**\n * Retrieves the cached object for the given ID.\n *\n * @param {number} id The ID for the cached item to retrieve.\n * @return {!Object} The retrieved item.\n */\n retrieveItem: function(id) {\n var item = this.cache_[id];\n if (item)\n return item;\n var error = new Error('not in cache');\n error.code = StatusCode.STALE_ELEMENT_REFERENCE;\n error.message = 'element is not attached to the page document';\n throw error;\n },\n\n /**\n * Clears stale items from the cache.\n */\n clearStale: function() {\n for (var id in this.cache_) {\n var node = this.cache_[id];\n if (!this.isNodeReachable_(node))\n delete this.cache_[id];\n }\n },\n\n /**\n * @private\n * @param {!Node} node The node to check.\n * @return {boolean} If the nodes is reachable.\n */\n isNodeReachable_: function(node) {\n var nodeRoot = getNodeRootThroughAnyShadows(node);\n return (nodeRoot == document);\n }\n};\n\n/**\n * Returns the root element of the node. Found by traversing parentNodes until\n * a node with no parent is found. This node is considered the root.\n * @param {?Node} node The node to find the root element for.\n * @return {?Node} The root node.\n */\nfunction getNodeRoot(node) {\n while (node && node.parentNode) {\n node = node.parentNode;\n }\n return node;\n}\n\n/**\n * Returns the root element of the node, jumping up through shadow roots if\n * any are found.\n */\nfunction getNodeRootThroughAnyShadows(node) {\n var root = getNodeRoot(node);\n while (SHADOW_DOM_ENABLED && root instanceof ShadowRoot) {\n root = getNodeRoot(root.host);\n }\n return root;\n}\n\n/**\n * Returns the global object cache for the page.\n * @param {Document=} opt_doc The document whose cache to retrieve. Defaults to\n * the current document.\n * @return {!Cache} The page's object cache.\n */\nfunction getPageCache(opt_doc, opt_w3c) {\n var doc = opt_doc || document;\n var w3c = opt_w3c || false;\n var key = '$cdc_asdjflasutopfhvcZLmcfl_';\n if (w3c) {\n if (!(key in doc))\n doc[key] = new CacheWithUUID();\n return doc[key];\n } else {\n if (!(key in doc))\n doc[key] = new Cache();\n return doc[key];\n }\n}\n\n/**\n * Wraps the given value to be transmitted remotely by converting\n * appropriate objects to cached object IDs.\n *\n * @param {*} value The value to wrap.\n * @return {*} The wrapped value.\n */\nfunction wrap(value) {\n // As of crrev.com/1316933002, typeof() for some elements will return\n // 'function', not 'object'. So we need to check for both non-null objects, as\n // well Elements that also happen to be callable functions (e.g. \u003Cembed> and\n // \u003Cobject> elements). Note that we can not use |value instanceof Object| here\n // since this does not work with frames/iframes, for example\n // frames[0].document.body instanceof Object == false even though\n // typeof(frames[0].document.body) == 'object'.\n if ((typeof(value) == 'object' && value != null) ||\n (typeof(value) == 'function' && value.nodeName &&\n value.nodeType == NodeType.ELEMENT)) {\n var nodeType = value['nodeType'];\n if (nodeType == NodeType.ELEMENT || nodeType == NodeType.DOCUMENT\n || (SHADOW_DOM_ENABLED && value instanceof ShadowRoot)) {\n var wrapped = {};\n var root = getNodeRootThroughAnyShadows(value);\n wrapped[ELEMENT_KEY] = getPageCache(root, w3cEnabled).storeItem(value);\n return wrapped;\n }\n\n var obj;\n if (typeof(value.length) == 'number') {\n obj = [];\n for (var i = 0; i \u003C value.length; i++)\n obj[i] = wrap(value[i]);\n } else {\n obj = {};\n for (var prop in value)\n obj[prop] = wrap(value[prop]);\n }\n return obj;\n }\n return value;\n}\n\n/**\n * Unwraps the given value by converting from object IDs to the cached\n * objects.\n *\n * @param {*} value The value to unwrap.\n * @param {Cache} cache The cache to retrieve wrapped elements from.\n * @return {*} The unwrapped value.\n */\nfunction unwrap(value, cache) {\n if (typeof(value) == 'object' && value != null) {\n if (ELEMENT_KEY in value)\n return cache.retrieveItem(value[ELEMENT_KEY]);\n\n var obj;\n if (typeof(value.length) == 'number') {\n obj = [];\n for (var i = 0; i \u003C value.length; i++)\n obj[i] = unwrap(value[i], cache);\n } else {\n obj = {};\n for (var prop in value)\n obj[prop] = unwrap(value[prop], cache);\n }\n return obj;\n }\n return value;\n}\n\n/**\n * Calls a given function and returns its value.\n *\n * The inputs to and outputs of the function will be unwrapped and wrapped\n * respectively, unless otherwise specified. This wrapping involves converting\n * between cached object reference IDs and actual JS objects. The cache will\n * automatically be pruned each call to remove stale references.\n *\n * @param {Array\u003Cstring>} shadowHostIds The host ids of the nested shadow\n * DOMs the function should be executed in the context of.\n * @param {function(...[*]) : *} func The function to invoke.\n * @param {!Array\u003C*>} args The array of arguments to supply to the function,\n * which will be unwrapped before invoking the function.\n * @param {boolean} w3c Whether to return a W3C compliant element reference.\n * @param {boolean=} opt_unwrappedReturn Whether the function's return value\n * should be left unwrapped.\n * @return {*} An object containing a status and value property, where status\n * is a WebDriver status code and value is the wrapped value. If an\n * unwrapped return was specified, this will be the function's pure return\n * value.\n */\nfunction callFunction(shadowHostIds, func, args, w3c, opt_unwrappedReturn) {\n if (w3c) {\n w3cEnabled = true;\n ELEMENT_KEY = 'element-6066-11e4-a52e-4f735466cecf';\n\n }\n var cache = getPageCache(null, w3cEnabled);\n cache.clearStale();\n if (shadowHostIds && SHADOW_DOM_ENABLED) {\n for (var i = 0; i \u003C shadowHostIds.length; i++) {\n var host = cache.retrieveItem(shadowHostIds[i]);\n // TODO(zachconrad): Use the olderShadowRoot API when available to check\n // all of the shadow roots.\n cache = getPageCache(host.webkitShadowRoot, w3cEnabled);\n cache.clearStale();\n }\n }\n\n if (opt_unwrappedReturn)\n return func.apply(null, unwrap(args, cache));\n\n var status = 0;\n try {\n var returnValue = wrap(func.apply(null, unwrap(args, cache)));\n } catch (error) {\n status = error.code || StatusCode.UNKNOWN_ERROR;\n var returnValue = error.message;\n }\n return {\n status: status,\n value: returnValue\n }\n}\n; return callFunction.apply(null, arguments) }\n).apply(null, [null, function(){return function(){var g,aa=this;function k(a){return void 0!==a}function l(a){return\"string\"==typeof a}function n(a){return\"number\"==typeof a}function ba(a,b){a=a.split(\".\");var c=aa;a[0]in c||!c.execScript||c.execScript(\"var \"+a[0]);for(var d;a.length&&(d=a.shift());)!a.length&&k(b)?c[d]=b:c=c[d]&&c[d]!==Object.prototype[d]?c[d]:c[d]={}}\nfunction ca(a){var b=typeof a;if(\"object\"==b)if(a){if(a instanceof Array)return\"array\";if(a instanceof Object)return b;var c=Object.prototype.toString.call(a);if(\"[object Window]\"==c)return\"object\";if(\"[object Array]\"==c||\"number\"==typeof a.length&&\"undefined\"!=typeof a.splice&&\"undefined\"!=typeof a.propertyIsEnumerable&&!a.propertyIsEnumerable(\"splice\"))return\"array\";if(\"[object Function]\"==c||\"undefined\"!=typeof a.call&&\"undefined\"!=typeof a.propertyIsEnumerable&&!a.propertyIsEnumerable(\"call\"))return\"function\"}else return\"null\";\nelse if(\"function\"==b&&\"undefined\"==typeof a.call)return\"object\";return b}function da(a){var b=ca(a);return\"array\"==b||\"object\"==b&&\"number\"==typeof a.length}function ea(a){return\"function\"==ca(a)}function fa(a){var b=typeof a;return\"object\"==b&&null!=a||\"function\"==b}function ga(a,b,c){return a.call.apply(a.bind,arguments)}\nfunction ha(a,b,c){if(!a)throw Error();if(2\u003Carguments.length){var d=Array.prototype.slice.call(arguments,2);return function(){var c=Array.prototype.slice.call(arguments);Array.prototype.unshift.apply(c,d);return a.apply(b,c)}}return function(){return a.apply(b,arguments)}}function ia(a,b,c){ia=Function.prototype.bind&&-1!=Function.prototype.bind.toString().indexOf(\"native code\")?ga:ha;return ia.apply(null,arguments)}\nfunction ja(a,b){var c=Array.prototype.slice.call(arguments,1);return function(){var b=c.slice();b.push.apply(b,arguments);return a.apply(this,b)}}function p(a,b){function c(){}c.prototype=b.prototype;a.Da=b.prototype;a.prototype=new c;a.prototype.constructor=a;a.Ba=function(a,c,f){for(var d=Array(arguments.length-2),e=2;e\u003Carguments.length;e++)d[e-2]=arguments[e];return b.prototype[c].apply(a,d)}};var ka=window;var la=String.prototype.trim?function(a){return a.trim()}:function(a){return a.replace(/^[\\s\\xa0]+|[\\s\\xa0]+$/g,\"\")};function ma(a,b){return a\u003Cb?-1:a>b?1:0}function na(a){return String(a).replace(/\\-([a-z])/g,function(a,c){return c.toUpperCase()})};function oa(a,b){if(l(a))return l(b)&&1==b.length?a.indexOf(b,0):-1;for(var c=0;c\u003Ca.length;c++)if(c in a&&a[c]===b)return c;return-1}function q(a,b){for(var c=a.length,d=l(a)?a.split(\"\"):a,e=0;e\u003Cc;e++)e in d&&b.call(void 0,d[e],e,a)}function r(a,b,c){var d=c;q(a,function(c,f){d=b.call(void 0,d,c,f,a)});return d}function u(a,b){for(var c=a.length,d=l(a)?a.split(\"\"):a,e=0;e\u003Cc;e++)if(e in d&&b.call(void 0,d[e],e,a))return!0;return!1}\nfunction pa(a,b){for(var c=a.length,d=l(a)?a.split(\"\"):a,e=0;e\u003Cc;e++)if(e in d&&!b.call(void 0,d[e],e,a))return!1;return!0}function qa(a){return Array.prototype.concat.apply([],arguments)}function ra(a){var b=a.length;if(0\u003Cb){for(var c=Array(b),d=0;d\u003Cb;d++)c[d]=a[d];return c}return[]}function sa(a,b,c){return 2>=arguments.length?Array.prototype.slice.call(a,b):Array.prototype.slice.call(a,b,c)};var ta={aliceblue:\"#f0f8ff\",antiquewhite:\"#faebd7\",aqua:\"#00ffff\",aquamarine:\"#7fffd4\",azure:\"#f0ffff\",beige:\"#f5f5dc\",bisque:\"#ffe4c4\",black:\"#000000\",blanchedalmond:\"#ffebcd\",blue:\"#0000ff\",blueviolet:\"#8a2be2\",brown:\"#a52a2a\",burlywood:\"#deb887\",cadetblue:\"#5f9ea0\",chartreuse:\"#7fff00\",chocolate:\"#d2691e\",coral:\"#ff7f50\",cornflowerblue:\"#6495ed\",cornsilk:\"#fff8dc\",crimson:\"#dc143c\",cyan:\"#00ffff\",darkblue:\"#00008b\",darkcyan:\"#008b8b\",darkgoldenrod:\"#b8860b\",darkgray:\"#a9a9a9\",darkgreen:\"#006400\",\ndarkgrey:\"#a9a9a9\",darkkhaki:\"#bdb76b\",darkmagenta:\"#8b008b\",darkolivegreen:\"#556b2f\",darkorange:\"#ff8c00\",darkorchid:\"#9932cc\",darkred:\"#8b0000\",darksalmon:\"#e9967a\",darkseagreen:\"#8fbc8f\",darkslateblue:\"#483d8b\",darkslategray:\"#2f4f4f\",darkslategrey:\"#2f4f4f\",darkturquoise:\"#00ced1\",darkviolet:\"#9400d3\",deeppink:\"#ff1493\",deepskyblue:\"#00bfff\",dimgray:\"#696969\",dimgrey:\"#696969\",dodgerblue:\"#1e90ff\",firebrick:\"#b22222\",floralwhite:\"#fffaf0\",forestgreen:\"#228b22\",fuchsia:\"#ff00ff\",gainsboro:\"#dcdcdc\",\nghostwhite:\"#f8f8ff\",gold:\"#ffd700\",goldenrod:\"#daa520\",gray:\"#808080\",green:\"#008000\",greenyellow:\"#adff2f\",grey:\"#808080\",honeydew:\"#f0fff0\",hotpink:\"#ff69b4\",indianred:\"#cd5c5c\",indigo:\"#4b0082\",ivory:\"#fffff0\",khaki:\"#f0e68c\",lavender:\"#e6e6fa\",lavenderblush:\"#fff0f5\",lawngreen:\"#7cfc00\",lemonchiffon:\"#fffacd\",lightblue:\"#add8e6\",lightcoral:\"#f08080\",lightcyan:\"#e0ffff\",lightgoldenrodyellow:\"#fafad2\",lightgray:\"#d3d3d3\",lightgreen:\"#90ee90\",lightgrey:\"#d3d3d3\",lightpink:\"#ffb6c1\",lightsalmon:\"#ffa07a\",\nlightseagreen:\"#20b2aa\",lightskyblue:\"#87cefa\",lightslategray:\"#778899\",lightslategrey:\"#778899\",lightsteelblue:\"#b0c4de\",lightyellow:\"#ffffe0\",lime:\"#00ff00\",limegreen:\"#32cd32\",linen:\"#faf0e6\",magenta:\"#ff00ff\",maroon:\"#800000\",mediumaquamarine:\"#66cdaa\",mediumblue:\"#0000cd\",mediumorchid:\"#ba55d3\",mediumpurple:\"#9370db\",mediumseagreen:\"#3cb371\",mediumslateblue:\"#7b68ee\",mediumspringgreen:\"#00fa9a\",mediumturquoise:\"#48d1cc\",mediumvioletred:\"#c71585\",midnightblue:\"#191970\",mintcream:\"#f5fffa\",mistyrose:\"#ffe4e1\",\nmoccasin:\"#ffe4b5\",navajowhite:\"#ffdead\",navy:\"#000080\",oldlace:\"#fdf5e6\",olive:\"#808000\",olivedrab:\"#6b8e23\",orange:\"#ffa500\",orangered:\"#ff4500\",orchid:\"#da70d6\",palegoldenrod:\"#eee8aa\",palegreen:\"#98fb98\",paleturquoise:\"#afeeee\",palevioletred:\"#db7093\",papayawhip:\"#ffefd5\",peachpuff:\"#ffdab9\",peru:\"#cd853f\",pink:\"#ffc0cb\",plum:\"#dda0dd\",powderblue:\"#b0e0e6\",purple:\"#800080\",red:\"#ff0000\",rosybrown:\"#bc8f8f\",royalblue:\"#4169e1\",saddlebrown:\"#8b4513\",salmon:\"#fa8072\",sandybrown:\"#f4a460\",seagreen:\"#2e8b57\",\nseashell:\"#fff5ee\",sienna:\"#a0522d\",silver:\"#c0c0c0\",skyblue:\"#87ceeb\",slateblue:\"#6a5acd\",slategray:\"#708090\",slategrey:\"#708090\",snow:\"#fffafa\",springgreen:\"#00ff7f\",steelblue:\"#4682b4\",tan:\"#d2b48c\",teal:\"#008080\",thistle:\"#d8bfd8\",tomato:\"#ff6347\",turquoise:\"#40e0d0\",violet:\"#ee82ee\",wheat:\"#f5deb3\",white:\"#ffffff\",whitesmoke:\"#f5f5f5\",yellow:\"#ffff00\",yellowgreen:\"#9acd32\"};var ua=\"backgroundColor borderTopColor borderRightColor borderBottomColor borderLeftColor color outlineColor\".split(\" \"),va=/#([0-9a-fA-F])([0-9a-fA-F])([0-9a-fA-F])/,wa=/^#(?:[0-9a-f]{3}){1,2}$/i,xa=/^(?:rgba)?\\((\\d{1,3}),\\s?(\\d{1,3}),\\s?(\\d{1,3}),\\s?(0|1|0\\.\\d*)\\)$/i,ya=/^(?:rgb)?\\((0|[1-9]\\d{0,2}),\\s?(0|[1-9]\\d{0,2}),\\s?(0|[1-9]\\d{0,2})\\)$/i;function v(a,b){this.code=a;this.state=w[a]||za;this.message=b||\"\";a=this.state.replace(/((?:^|\\s+)[a-z])/g,function(a){return a.toUpperCase().replace(/^[\\s\\xa0]+/g,\"\")});b=a.length-5;if(0>b||a.indexOf(\"Error\",b)!=b)a+=\"Error\";this.name=a;a=Error(this.message);a.name=this.name;this.stack=a.stack||\"\"}p(v,Error);var za=\"unknown error\",w={15:\"element not selectable\",11:\"element not visible\"};w[31]=za;w[30]=za;w[24]=\"invalid cookie domain\";w[29]=\"invalid element coordinates\";w[12]=\"invalid element state\";\nw[32]=\"invalid selector\";w[51]=\"invalid selector\";w[52]=\"invalid selector\";w[17]=\"javascript error\";w[405]=\"unsupported operation\";w[34]=\"move target out of bounds\";w[27]=\"no such alert\";w[7]=\"no such element\";w[8]=\"no such frame\";w[23]=\"no such window\";w[28]=\"script timeout\";w[33]=\"session not created\";w[10]=\"stale element reference\";w[21]=\"timeout\";w[25]=\"unable to set cookie\";w[26]=\"unexpected alert open\";w[13]=za;w[9]=\"unknown command\";v.prototype.toString=function(){return this.name+\": \"+this.message};var Aa;a:{var Ba=aa.navigator;if(Ba){var Ca=Ba.userAgent;if(Ca){Aa=Ca;break a}}Aa=\"\"};function Ea(a){var b=Fa;Object.prototype.hasOwnProperty.call(b,\"528\")||(b[\"528\"]=a(\"528\"))};var Ga=-1!=Aa.indexOf(\"Macintosh\"),Ha=-1!=Aa.indexOf(\"Windows\"),Ia,Ja=\"\",Ka=/WebKit\\/(\\S+)/.exec(Aa);Ka&&(Ja=Ka?Ka[1]:\"\");Ia=Ja;var Fa={};\nfunction La(){Ea(function(){for(var a=0,b=la(String(Ia)).split(\".\"),c=la(\"528\").split(\".\"),d=Math.max(b.length,c.length),e=0;0==a&&e\u003Cd;e++){var f=b[e]||\"\",h=c[e]||\"\";do{f=/(\\d*)(\\D*)(.*)/.exec(f)||[\"\",\"\",\"\",\"\"];h=/(\\d*)(\\D*)(.*)/.exec(h)||[\"\",\"\",\"\",\"\"];if(0==f[0].length&&0==h[0].length)break;a=ma(0==f[1].length?0:parseInt(f[1],10),0==h[1].length?0:parseInt(h[1],10))||ma(0==f[2].length,0==h[2].length)||ma(f[2],h[2]);f=f[3];h=h[3]}while(0==a)}return 0\u003C=a})};function x(a,b){this.x=k(a)?a:0;this.y=k(b)?b:0}g=x.prototype;g.clone=function(){return new x(this.x,this.y)};g.toString=function(){return\"(\"+this.x+\", \"+this.y+\")\"};g.ceil=function(){this.x=Math.ceil(this.x);this.y=Math.ceil(this.y);return this};g.floor=function(){this.x=Math.floor(this.x);this.y=Math.floor(this.y);return this};g.round=function(){this.x=Math.round(this.x);this.y=Math.round(this.y);return this};\ng.translate=function(a,b){a instanceof x?(this.x+=a.x,this.y+=a.y):(this.x+=Number(a),n(b)&&(this.y+=b));return this};g.scale=function(a,b){b=n(b)?b:a;this.x*=a;this.y*=b;return this};function Ma(a,b){this.width=a;this.height=b}g=Ma.prototype;g.clone=function(){return new Ma(this.width,this.height)};g.toString=function(){return\"(\"+this.width+\" x \"+this.height+\")\"};g.ceil=function(){this.width=Math.ceil(this.width);this.height=Math.ceil(this.height);return this};g.floor=function(){this.width=Math.floor(this.width);this.height=Math.floor(this.height);return this};g.round=function(){this.width=Math.round(this.width);this.height=Math.round(this.height);return this};\ng.scale=function(a,b){b=n(b)?b:a;this.width*=a;this.height*=b;return this};function Na(a,b,c){function d(c){c&&b.appendChild(l(c)?a.createTextNode(c):c)}for(var e=1;e\u003Cc.length;e++){var f=c[e];!da(f)||fa(f)&&0\u003Cf.nodeType?d(f):q(Oa(f)?ra(f):f,d)}}function Pa(a){for(;a&&1!=a.nodeType;)a=a.previousSibling;return a}function Qa(a,b){if(!a||!b)return!1;if(a.contains&&1==b.nodeType)return a==b||a.contains(b);if(\"undefined\"!=typeof a.compareDocumentPosition)return a==b||!!(a.compareDocumentPosition(b)&16);for(;b&&a!=b;)b=b.parentNode;return b==a}\nfunction Ra(a,b){if(a==b)return 0;if(a.compareDocumentPosition)return a.compareDocumentPosition(b)&2?1:-1;if(\"sourceIndex\"in a||a.parentNode&&\"sourceIndex\"in a.parentNode){var c=1==a.nodeType,d=1==b.nodeType;if(c&&d)return a.sourceIndex-b.sourceIndex;var e=a.parentNode,f=b.parentNode;return e==f?Sa(a,b):!c&&Qa(e,b)?-1*Ta(a,b):!d&&Qa(f,a)?Ta(b,a):(c?a.sourceIndex:e.sourceIndex)-(d?b.sourceIndex:f.sourceIndex)}d=A(a);c=d.createRange();c.selectNode(a);c.collapse(!0);a=d.createRange();a.selectNode(b);\na.collapse(!0);return c.compareBoundaryPoints(aa.Range.START_TO_END,a)}function Ta(a,b){var c=a.parentNode;if(c==b)return-1;for(;b.parentNode!=c;)b=b.parentNode;return Sa(b,a)}function Sa(a,b){for(;b=b.previousSibling;)if(b==a)return-1;return 1}function A(a){return 9==a.nodeType?a:a.ownerDocument||a.document}function Oa(a){if(a&&\"number\"==typeof a.length){if(fa(a))return\"function\"==typeof a.item||\"string\"==typeof a.item;if(ea(a))return\"function\"==typeof a.item}return!1}\nfunction Ua(a,b,c){a&&!c&&(a=a.parentNode);for(c=0;a;){if(b(a))return a;a=a.parentNode;c++}return null}function Va(a){try{return a&&a.activeElement}catch(b){}return null}function Wa(a){this.M=a||aa.document||document}g=Wa.prototype;g.getElementsByTagName=function(a,b){return(b||this.M).getElementsByTagName(String(a))};g.createElement=function(a){return this.M.createElement(String(a))};g.createTextNode=function(a){return this.M.createTextNode(String(a))};g.appendChild=function(a,b){a.appendChild(b)};\ng.append=function(a,b){Na(A(a),a,arguments)};g.canHaveChildren=function(a){if(1!=a.nodeType)return!1;switch(a.tagName){case \"APPLET\":case \"AREA\":case \"BASE\":case \"BR\":case \"COL\":case \"COMMAND\":case \"EMBED\":case \"FRAME\":case \"HR\":case \"IMG\":case \"INPUT\":case \"IFRAME\":case \"ISINDEX\":case \"KEYGEN\":case \"LINK\":case \"NOFRAMES\":case \"NOSCRIPT\":case \"META\":case \"OBJECT\":case \"PARAM\":case \"SCRIPT\":case \"SOURCE\":case \"STYLE\":case \"TRACK\":case \"WBR\":return!1}return!0};\ng.removeNode=function(a){return a&&a.parentNode?a.parentNode.removeChild(a):null};g.contains=Qa;function Xa(a){var b=\"tabindex\";return\"style\"==b?Ya(a.style.cssText):(a=a.getAttributeNode(b))&&a.specified?a.value:null}var Za=/[;]+(?=(?:(?:[^\"]*\"){2})*[^\"]*$)(?=(?:(?:[^']*'){2})*[^']*$)(?=(?:[^()]*\\([^()]*\\))*[^()]*$)/;function Ya(a){var b=[];q(a.split(Za),function(a){var c=a.indexOf(\":\");0\u003Cc&&(a=[a.slice(0,c),a.slice(c+1)],2==a.length&&b.push(a[0].toLowerCase(),\":\",a[1],\";\"))});b=b.join(\"\");return b=\";\"==b.charAt(b.length-1)?b:b+\";\"}\nfunction B(a,b){b&&\"string\"!==typeof b&&(b=b.toString());return!!a&&1==a.nodeType&&(!b||a.tagName.toUpperCase()==b)};/*\n\n The MIT License\n\n Copyright (c) 2007 Cybozu Labs, Inc.\n Copyright (c) 2012 Google Inc.\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated documentation files (the \"Software\"), to\n deal in the Software without restriction, including without limitation the\n rights to use, copy, modify, merge, publish, distribute, sublicense, and/or\n sell copies of the Software, and to permit persons to whom the Software is\n furnished to do so, subject to the following conditions:\n\n The above copyright notice and this permission notice shall be included in\n all copies or substantial portions of the Software.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS\n IN THE SOFTWARE.\n*/\nfunction $a(a,b,c){this.s=a;this.ya=b||1;this.o=c||1};function ab(a){this.$=a;this.P=0}function bb(a){a=a.match(cb);for(var b=0;b\u003Ca.length;b++)db.test(a[b])&&a.splice(b,1);return new ab(a)}var cb=/\\$?(?:(?![0-9-\\.])(?:\\*|[\\w-\\.]+):)?(?![0-9-\\.])(?:\\*|[\\w-\\.]+)|\\/\\/|\\.\\.|::|\\d+(?:\\.\\d*)?|\\.\\d+|\"[^\"]*\"|'[^']*'|[!\u003C>]=|\\s+|./g,db=/^\\s/;function C(a,b){return a.$[a.P+(b||0)]}ab.prototype.next=function(){return this.$[this.P++]};ab.prototype.back=function(){this.P--};ab.prototype.empty=function(){return this.$.length\u003C=this.P};function D(a){var b=null,c=a.nodeType;1==c&&(b=a.textContent,b=void 0==b||null==b?a.innerText:b,b=void 0==b||null==b?\"\":b);if(\"string\"!=typeof b)if(9==c||1==c){a=9==c?a.documentElement:a.firstChild;for(var c=0,d=[],b=\"\";a;){do 1!=a.nodeType&&(b+=a.nodeValue),d[c++]=a;while(a=a.firstChild);for(;c&&!(a=d[--c].nextSibling););}}else b=a.nodeValue;return\"\"+b}\nfunction eb(a,b,c){if(null===b)return!0;try{if(!a.getAttribute)return!1}catch(d){return!1}return null==c?!!a.getAttribute(b):a.getAttribute(b,2)==c}function fb(a,b,c,d,e){return gb.call(null,a,b,l(c)?c:null,l(d)?d:null,e||new E)}\nfunction gb(a,b,c,d,e){b.getElementsByName&&d&&\"name\"==c?(b=b.getElementsByName(d),q(b,function(b){a.matches(b)&&e.add(b)})):b.getElementsByClassName&&d&&\"class\"==c?(b=b.getElementsByClassName(d),q(b,function(b){b.className==d&&a.matches(b)&&e.add(b)})):a instanceof F?hb(a,b,c,d,e):b.getElementsByTagName&&(b=b.getElementsByTagName(a.getName()),q(b,function(a){eb(a,c,d)&&e.add(a)}));return e}\nfunction hb(a,b,c,d,e){for(b=b.firstChild;b;b=b.nextSibling)eb(b,c,d)&&a.matches(b)&&e.add(b),hb(a,b,c,d,e)};function E(){this.o=this.j=null;this.J=0}function ib(a){this.node=a;this.next=this.F=null}function jb(a,b){if(!a.j)return b;if(!b.j)return a;var c=a.j;b=b.j;for(var d=null,e,f=0;c&&b;)c.node==b.node?(e=c,c=c.next,b=b.next):0\u003CRa(c.node,b.node)?(e=b,b=b.next):(e=c,c=c.next),(e.F=d)?d.next=e:a.j=e,d=e,f++;for(e=c||b;e;)e.F=d,d=d.next=e,f++,e=e.next;a.o=d;a.J=f;return a}E.prototype.unshift=function(a){a=new ib(a);a.next=this.j;this.o?this.j.F=a:this.j=this.o=a;this.j=a;this.J++};\nE.prototype.add=function(a){a=new ib(a);a.F=this.o;this.j?this.o.next=a:this.j=this.o=a;this.o=a;this.J++};function kb(a){return(a=a.j)?a.node:null}E.prototype.v=function(){return this.J};function lb(a){return(a=kb(a))?D(a):\"\"}E.prototype.iterator=function(a){return new mb(this,!!a)};function mb(a,b){this.ua=a;this.ca=(this.H=b)?a.o:a.j;this.X=null}mb.prototype.next=function(){var a=this.ca;if(null==a)return null;var b=this.X=a;this.ca=this.H?a.F:a.next;return b.node};\nmb.prototype.remove=function(){var a=this.ua,b=this.X;if(!b)throw Error(\"Next must be called at least once before remove.\");var c=b.F,b=b.next;c?c.next=b:a.j=b;b?b.F=c:a.o=c;a.J--;this.X=null};function G(a){this.i=a;this.l=this.A=!1;this.K=null}function I(a){return\"\\n \"+a.toString().split(\"\\n\").join(\"\\n \")}G.prototype.h=function(){return this.A};function nb(a,b){a.A=b}function ob(a,b){a.l=b}G.prototype.D=function(){return this.K};function J(a,b){a=a.evaluate(b);return a instanceof E?+lb(a):+a}function K(a,b){a=a.evaluate(b);return a instanceof E?lb(a):\"\"+a}function pb(a,b){a=a.evaluate(b);return a instanceof E?!!a.v():!!a};function qb(a,b,c){G.call(this,a.i);this.Z=a;this.ga=b;this.la=c;this.A=b.h()||c.h();this.l=b.l||c.l;this.Z==rb&&(c.l||c.h()||4==c.i||0==c.i||!b.D()?b.l||b.h()||4==b.i||0==b.i||!c.D()||(this.K={name:c.D().name,I:b}):this.K={name:b.D().name,I:c})}p(qb,G);\nfunction sb(a,b,c,d,e){b=b.evaluate(d);c=c.evaluate(d);var f;if(b instanceof E&&c instanceof E){b=b.iterator();for(d=b.next();d;d=b.next())for(e=c.iterator(),f=e.next();f;f=e.next())if(a(D(d),D(f)))return!0;return!1}if(b instanceof E||c instanceof E){b instanceof E?(e=b,d=c):(e=c,d=b);f=e.iterator();for(var h=typeof d,m=f.next();m;m=f.next()){switch(h){case \"number\":m=+D(m);break;case \"boolean\":m=!!D(m);break;case \"string\":m=D(m);break;default:throw Error(\"Illegal primitive type for comparison.\");\n}if(e==b&&a(m,d)||e==c&&a(d,m))return!0}return!1}return e?\"boolean\"==typeof b||\"boolean\"==typeof c?a(!!b,!!c):\"number\"==typeof b||\"number\"==typeof c?a(+b,+c):a(b,c):a(+b,+c)}qb.prototype.evaluate=function(a){return this.Z.u(this.ga,this.la,a)};qb.prototype.toString=function(){var a=\"Binary Expression: \"+this.Z,a=a+I(this.ga);return a+=I(this.la)};function tb(a,b,c,d){this.xa=a;this.ja=b;this.i=c;this.u=d}tb.prototype.toString=function(){return this.xa};var ub={};\nfunction L(a,b,c,d){if(ub.hasOwnProperty(a))throw Error(\"Binary operator already created: \"+a);a=new tb(a,b,c,d);return ub[a.toString()]=a}L(\"div\",6,1,function(a,b,c){return J(a,c)/J(b,c)});L(\"mod\",6,1,function(a,b,c){return J(a,c)%J(b,c)});L(\"*\",6,1,function(a,b,c){return J(a,c)*J(b,c)});L(\"+\",5,1,function(a,b,c){return J(a,c)+J(b,c)});L(\"-\",5,1,function(a,b,c){return J(a,c)-J(b,c)});L(\"\u003C\",4,2,function(a,b,c){return sb(function(a,b){return a\u003Cb},a,b,c)});\nL(\">\",4,2,function(a,b,c){return sb(function(a,b){return a>b},a,b,c)});L(\"\u003C=\",4,2,function(a,b,c){return sb(function(a,b){return a\u003C=b},a,b,c)});L(\">=\",4,2,function(a,b,c){return sb(function(a,b){return a>=b},a,b,c)});var rb=L(\"=\",3,2,function(a,b,c){return sb(function(a,b){return a==b},a,b,c,!0)});L(\"!=\",3,2,function(a,b,c){return sb(function(a,b){return a!=b},a,b,c,!0)});L(\"and\",2,2,function(a,b,c){return pb(a,c)&&pb(b,c)});L(\"or\",1,2,function(a,b,c){return pb(a,c)||pb(b,c)});function vb(a,b){if(b.v()&&4!=a.i)throw Error(\"Primary expression must evaluate to nodeset if filter has predicate(s).\");G.call(this,a.i);this.ka=a;this.f=b;this.A=a.h();this.l=a.l}p(vb,G);vb.prototype.evaluate=function(a){a=this.ka.evaluate(a);return wb(this.f,a)};vb.prototype.toString=function(){var a=\"Filter:\"+I(this.ka);return a+=I(this.f)};function xb(a,b){if(b.length\u003Ca.ia)throw Error(\"Function \"+a.m+\" expects at least\"+a.ia+\" arguments, \"+b.length+\" given\");if(null!==a.Y&&b.length>a.Y)throw Error(\"Function \"+a.m+\" expects at most \"+a.Y+\" arguments, \"+b.length+\" given\");a.va&&q(b,function(b,d){if(4!=b.i)throw Error(\"Argument \"+d+\" to function \"+a.m+\" is not of type Nodeset: \"+b);});G.call(this,a.i);this.O=a;this.U=b;nb(this,a.A||u(b,function(a){return a.h()}));ob(this,a.ta&&!b.length||a.sa&&!!b.length||u(b,function(a){return a.l}))}\np(xb,G);xb.prototype.evaluate=function(a){return this.O.u.apply(null,qa(a,this.U))};xb.prototype.toString=function(){var a=\"Function: \"+this.O;if(this.U.length)var b=r(this.U,function(a,b){return a+I(b)},\"Arguments:\"),a=a+I(b);return a};function yb(a,b,c,d,e,f,h,m,y){this.m=a;this.i=b;this.A=c;this.ta=d;this.sa=e;this.u=f;this.ia=h;this.Y=k(m)?m:h;this.va=!!y}yb.prototype.toString=function(){return this.m};var zb={};\nfunction N(a,b,c,d,e,f,h,m){if(zb.hasOwnProperty(a))throw Error(\"Function already created: \"+a+\".\");zb[a]=new yb(a,b,c,d,!1,e,f,h,m)}N(\"boolean\",2,!1,!1,function(a,b){return pb(b,a)},1);N(\"ceiling\",1,!1,!1,function(a,b){return Math.ceil(J(b,a))},1);N(\"concat\",3,!1,!1,function(a,b){return r(sa(arguments,1),function(b,d){return b+K(d,a)},\"\")},2,null);N(\"contains\",2,!1,!1,function(a,b,c){b=K(b,a);a=K(c,a);return-1!=b.indexOf(a)},2);N(\"count\",1,!1,!1,function(a,b){return b.evaluate(a).v()},1,1,!0);\nN(\"false\",2,!1,!1,function(){return!1},0);N(\"floor\",1,!1,!1,function(a,b){return Math.floor(J(b,a))},1);N(\"id\",4,!1,!1,function(a,b){var c=a.s,d=9==c.nodeType?c:c.ownerDocument;a=K(b,a).split(/\\s+/);var e=[];q(a,function(a){a=d.getElementById(a);!a||0\u003C=oa(e,a)||e.push(a)});e.sort(Ra);var f=new E;q(e,function(a){f.add(a)});return f},1);N(\"lang\",2,!1,!1,function(){return!1},1);N(\"last\",1,!0,!1,function(a){if(1!=arguments.length)throw Error(\"Function last expects ()\");return a.o},0);\nN(\"local-name\",3,!1,!0,function(a,b){return(a=b?kb(b.evaluate(a)):a.s)?a.localName||a.nodeName.toLowerCase():\"\"},0,1,!0);N(\"name\",3,!1,!0,function(a,b){return(a=b?kb(b.evaluate(a)):a.s)?a.nodeName.toLowerCase():\"\"},0,1,!0);N(\"namespace-uri\",3,!0,!1,function(){return\"\"},0,1,!0);N(\"normalize-space\",3,!1,!0,function(a,b){return(b?K(b,a):D(a.s)).replace(/[\\s\\xa0]+/g,\" \").replace(/^\\s+|\\s+$/g,\"\")},0,1);N(\"not\",2,!1,!1,function(a,b){return!pb(b,a)},1);\nN(\"number\",1,!1,!0,function(a,b){return b?J(b,a):+D(a.s)},0,1);N(\"position\",1,!0,!1,function(a){return a.ya},0);N(\"round\",1,!1,!1,function(a,b){return Math.round(J(b,a))},1);N(\"starts-with\",2,!1,!1,function(a,b,c){b=K(b,a);a=K(c,a);return 0==b.lastIndexOf(a,0)},2);N(\"string\",3,!1,!0,function(a,b){return b?K(b,a):D(a.s)},0,1);N(\"string-length\",1,!1,!0,function(a,b){return(b?K(b,a):D(a.s)).length},0,1);\nN(\"substring\",3,!1,!1,function(a,b,c,d){c=J(c,a);if(isNaN(c)||Infinity==c||-Infinity==c)return\"\";d=d?J(d,a):Infinity;if(isNaN(d)||-Infinity===d)return\"\";c=Math.round(c)-1;var e=Math.max(c,0);a=K(b,a);return Infinity==d?a.substring(e):a.substring(e,c+Math.round(d))},2,3);N(\"substring-after\",3,!1,!1,function(a,b,c){b=K(b,a);a=K(c,a);c=b.indexOf(a);return-1==c?\"\":b.substring(c+a.length)},2);\nN(\"substring-before\",3,!1,!1,function(a,b,c){b=K(b,a);a=K(c,a);a=b.indexOf(a);return-1==a?\"\":b.substring(0,a)},2);N(\"sum\",1,!1,!1,function(a,b){a=b.evaluate(a).iterator();b=0;for(var c=a.next();c;c=a.next())b+=+D(c);return b},1,1,!0);N(\"translate\",3,!1,!1,function(a,b,c,d){b=K(b,a);c=K(c,a);var e=K(d,a);d={};for(var f=0;f\u003Cc.length;f++)a=c.charAt(f),a in d||(d[a]=e.charAt(f));c=\"\";for(f=0;f\u003Cb.length;f++)a=b.charAt(f),c+=a in d?d[a]:a;return c},3);N(\"true\",2,!1,!1,function(){return!0},0);function F(a,b){this.na=a;this.ha=k(b)?b:null;this.B=null;switch(a){case \"comment\":this.B=8;break;case \"text\":this.B=3;break;case \"processing-instruction\":this.B=7;break;case \"node\":break;default:throw Error(\"Unexpected argument\");}}function Ab(a){return\"comment\"==a||\"text\"==a||\"processing-instruction\"==a||\"node\"==a}F.prototype.matches=function(a){return null===this.B||this.B==a.nodeType};F.prototype.getName=function(){return this.na};\nF.prototype.toString=function(){var a=\"Kind Test: \"+this.na;null===this.ha||(a+=I(this.ha));return a};function Bb(a){G.call(this,3);this.ma=a.substring(1,a.length-1)}p(Bb,G);Bb.prototype.evaluate=function(){return this.ma};Bb.prototype.toString=function(){return\"Literal: \"+this.ma};function Cb(a,b){this.m=a.toLowerCase();a=\"*\"==this.m?\"*\":\"http://www.w3.org/1999/xhtml\";this.R=b?b.toLowerCase():a}Cb.prototype.matches=function(a){var b=a.nodeType;if(1!=b&&2!=b)return!1;b=k(a.localName)?a.localName:a.nodeName;return\"*\"!=this.m&&this.m!=b.toLowerCase()?!1:\"*\"==this.R?!0:this.R==(a.namespaceURI?a.namespaceURI.toLowerCase():\"http://www.w3.org/1999/xhtml\")};Cb.prototype.getName=function(){return this.m};\nCb.prototype.toString=function(){return\"Name Test: \"+(\"http://www.w3.org/1999/xhtml\"==this.R?\"\":this.R+\":\")+this.m};function Db(a){G.call(this,1);this.oa=a}p(Db,G);Db.prototype.evaluate=function(){return this.oa};Db.prototype.toString=function(){return\"Number: \"+this.oa};function Eb(a,b){G.call(this,a.i);this.ea=a;this.L=b;this.A=a.h();this.l=a.l;1==this.L.length&&(a=this.L[0],a.V||a.C!=Fb||(a=a.T,\"*\"!=a.getName()&&(this.K={name:a.getName(),I:null})))}p(Eb,G);function Gb(){G.call(this,4)}p(Gb,G);Gb.prototype.evaluate=function(a){var b=new E;a=a.s;9==a.nodeType?b.add(a):b.add(a.ownerDocument);return b};Gb.prototype.toString=function(){return\"Root Helper Expression\"};function Hb(){G.call(this,4)}p(Hb,G);Hb.prototype.evaluate=function(a){var b=new E;b.add(a.s);return b};\nHb.prototype.toString=function(){return\"Context Helper Expression\"};function Ib(a){return\"/\"==a||\"//\"==a}\nEb.prototype.evaluate=function(a){var b=this.ea.evaluate(a);if(!(b instanceof E))throw Error(\"Filter expression must evaluate to nodeset.\");a=this.L;for(var c=0,d=a.length;c\u003Cd&&b.v();c++){var e=a[c],f=b.iterator(e.C.H);if(e.h()||e.C!=Jb)if(e.h()||e.C!=Kb){var h=f.next();for(b=e.evaluate(new $a(h));null!=(h=f.next());)h=e.evaluate(new $a(h)),b=jb(b,h)}else h=f.next(),b=e.evaluate(new $a(h));else{for(h=f.next();(b=f.next())&&(!h.contains||h.contains(b))&&b.compareDocumentPosition(h)&8;h=b);b=e.evaluate(new $a(h))}}return b};\nEb.prototype.toString=function(){var a=\"Path Expression:\"+I(this.ea);if(this.L.length){var b=r(this.L,function(a,b){return a+I(b)},\"Steps:\");a+=I(b)}return a};function O(a,b){this.f=a;this.H=!!b}function wb(a,b,c){for(c=c||0;c\u003Ca.f.length;c++)for(var d=a.f[c],e=b.iterator(),f=b.v(),h,m=0;h=e.next();m++){var y=a.H?f-m:m+1;h=d.evaluate(new $a(h,y,f));if(\"number\"==typeof h)y=y==h;else if(\"string\"==typeof h||\"boolean\"==typeof h)y=!!h;else if(h instanceof E)y=0\u003Ch.v();else throw Error(\"Predicate.evaluate returned an unexpected type.\");y||e.remove()}return b}O.prototype.D=function(){return 0\u003Cthis.f.length?this.f[0].D():null};\nO.prototype.h=function(){for(var a=0;a\u003Cthis.f.length;a++){var b=this.f[a];if(b.h()||1==b.i||0==b.i)return!0}return!1};O.prototype.v=function(){return this.f.length};O.prototype.toString=function(){return r(this.f,function(a,b){return a+I(b)},\"Predicates:\")};function P(a,b,c,d){G.call(this,4);this.C=a;this.T=b;this.f=c||new O([]);this.V=!!d;b=this.f.D();a.Aa&&b&&(this.K={name:b.name,I:b.I});this.A=this.f.h()}p(P,G);\nP.prototype.evaluate=function(a){var b=a.s,c=this.D(),d=null,e=null,f=0;c&&(d=c.name,e=c.I?K(c.I,a):null,f=1);if(this.V)if(this.h()||this.C!=Lb)if(b=(new P(Mb,new F(\"node\"))).evaluate(a).iterator(),c=b.next())for(a=this.u(c,d,e,f);null!=(c=b.next());)a=jb(a,this.u(c,d,e,f));else a=new E;else a=fb(this.T,b,d,e),a=wb(this.f,a,f);else a=this.u(a.s,d,e,f);return a};P.prototype.u=function(a,b,c,d){a=this.C.O(this.T,a,b,c);return a=wb(this.f,a,d)};\nP.prototype.toString=function(){var a=\"Step:\"+I(\"Operator: \"+(this.V?\"//\":\"/\"));this.C.m&&(a+=I(\"Axis: \"+this.C));a+=I(this.T);if(this.f.v()){var b=r(this.f.f,function(a,b){return a+I(b)},\"Predicates:\");a+=I(b)}return a};function Nb(a,b,c,d){this.m=a;this.O=b;this.H=c;this.Aa=d}Nb.prototype.toString=function(){return this.m};var Ob={};function Q(a,b,c,d){if(Ob.hasOwnProperty(a))throw Error(\"Axis already created: \"+a);b=new Nb(a,b,c,!!d);return Ob[a]=b}\nQ(\"ancestor\",function(a,b){for(var c=new E;b=b.parentNode;)a.matches(b)&&c.unshift(b);return c},!0);Q(\"ancestor-or-self\",function(a,b){var c=new E;do a.matches(b)&&c.unshift(b);while(b=b.parentNode);return c},!0);\nvar Fb=Q(\"attribute\",function(a,b){var c=new E,d=a.getName();if(b=b.attributes)if(a instanceof F&&null===a.B||\"*\"==d)for(d=0;a=b[d];d++)c.add(a);else(a=b.getNamedItem(d))&&c.add(a);return c},!1),Lb=Q(\"child\",function(a,b,c,d,e){c=l(c)?c:null;d=l(d)?d:null;e=e||new E;for(b=b.firstChild;b;b=b.nextSibling)eb(b,c,d)&&a.matches(b)&&e.add(b);return e},!1,!0);Q(\"descendant\",fb,!1,!0);\nvar Mb=Q(\"descendant-or-self\",function(a,b,c,d){var e=new E;eb(b,c,d)&&a.matches(b)&&e.add(b);return fb(a,b,c,d,e)},!1,!0),Jb=Q(\"following\",function(a,b,c,d){var e=new E;do for(var f=b;f=f.nextSibling;)eb(f,c,d)&&a.matches(f)&&e.add(f),e=fb(a,f,c,d,e);while(b=b.parentNode);return e},!1,!0);Q(\"following-sibling\",function(a,b){for(var c=new E;b=b.nextSibling;)a.matches(b)&&c.add(b);return c},!1);Q(\"namespace\",function(){return new E},!1);\nvar Pb=Q(\"parent\",function(a,b){var c=new E;if(9==b.nodeType)return c;if(2==b.nodeType)return c.add(b.ownerElement),c;b=b.parentNode;a.matches(b)&&c.add(b);return c},!1),Kb=Q(\"preceding\",function(a,b,c,d){var e=new E,f=[];do f.unshift(b);while(b=b.parentNode);for(var h=1,m=f.length;h\u003Cm;h++){var y=[];for(b=f[h];b=b.previousSibling;)y.unshift(b);for(var H=0,t=y.length;H\u003Ct;H++)b=y[H],eb(b,c,d)&&a.matches(b)&&e.add(b),e=fb(a,b,c,d,e)}return e},!0,!0);\nQ(\"preceding-sibling\",function(a,b){for(var c=new E;b=b.previousSibling;)a.matches(b)&&c.unshift(b);return c},!0);var Qb=Q(\"self\",function(a,b){var c=new E;a.matches(b)&&c.add(b);return c},!1);function Rb(a){G.call(this,1);this.da=a;this.A=a.h();this.l=a.l}p(Rb,G);Rb.prototype.evaluate=function(a){return-J(this.da,a)};Rb.prototype.toString=function(){return\"Unary Expression: -\"+I(this.da)};function Sb(a){G.call(this,4);this.S=a;nb(this,u(this.S,function(a){return a.h()}));ob(this,u(this.S,function(a){return a.l}))}p(Sb,G);Sb.prototype.evaluate=function(a){var b=new E;q(this.S,function(c){c=c.evaluate(a);if(!(c instanceof E))throw Error(\"Path expression must evaluate to NodeSet.\");b=jb(b,c)});return b};Sb.prototype.toString=function(){return r(this.S,function(a,b){return a+I(b)},\"Union Expression:\")};function Tb(a,b){this.a=a;this.wa=b}function Ub(a){for(var b,c=[];;){R(a,\"Missing right hand side of binary expression.\");b=Vb(a);var d=a.a.next();if(!d)break;var e=(d=ub[d]||null)&&d.ja;if(!e){a.a.back();break}for(;c.length&&e\u003C=c[c.length-1].ja;)b=new qb(c.pop(),c.pop(),b);c.push(b,d)}for(;c.length;)b=new qb(c.pop(),c.pop(),b);return b}function R(a,b){if(a.a.empty())throw Error(b);}function Wb(a,b){a=a.a.next();if(a!=b)throw Error(\"Bad token, expected: \"+b+\" got: \"+a);}\nfunction Xb(a){a=a.a.next();if(\")\"!=a)throw Error(\"Bad token: \"+a);}function Yb(a){a=a.a.next();if(2>a.length)throw Error(\"Unclosed literal string\");return new Bb(a)}\nfunction Zb(a){var b=[];if(Ib(C(a.a))){var c=a.a.next();var d=C(a.a);if(\"/\"==c&&(a.a.empty()||\".\"!=d&&\"..\"!=d&&\"@\"!=d&&\"*\"!=d&&!/(?![0-9])[\\w]/.test(d)))return new Gb;d=new Gb;R(a,\"Missing next location step.\");c=$b(a,c);b.push(c)}else{a:{c=C(a.a);d=c.charAt(0);switch(d){case \"$\":throw Error(\"Variable reference not allowed in HTML XPath\");case \"(\":a.a.next();c=Ub(a);R(a,'unclosed \"(\"');Wb(a,\")\");break;case '\"':case \"'\":c=Yb(a);break;default:if(isNaN(+c))if(!Ab(c)&&/(?![0-9])[\\w]/.test(d)&&\"(\"==C(a.a,\n1)){c=a.a.next();c=zb[c]||null;a.a.next();for(d=[];\")\"!=C(a.a);){R(a,\"Missing function argument list.\");d.push(Ub(a));if(\",\"!=C(a.a))break;a.a.next()}R(a,\"Unclosed function argument list.\");Xb(a);c=new xb(c,d)}else{c=null;break a}else c=new Db(+a.a.next())}\"[\"==C(a.a)&&(d=new O(ac(a)),c=new vb(c,d))}if(c)if(Ib(C(a.a)))d=c;else return c;else c=$b(a,\"/\"),d=new Hb,b.push(c)}for(;Ib(C(a.a));)c=a.a.next(),R(a,\"Missing next location step.\"),c=$b(a,c),b.push(c);return new Eb(d,b)}\nfunction $b(a,b){if(\"/\"!=b&&\"//\"!=b)throw Error('Step op should be \"/\" or \"//\"');if(\".\"==C(a.a)){var c=new P(Qb,new F(\"node\"));a.a.next();return c}if(\"..\"==C(a.a))return c=new P(Pb,new F(\"node\")),a.a.next(),c;if(\"@\"==C(a.a)){var d=Fb;a.a.next();R(a,\"Missing attribute name\")}else if(\"::\"==C(a.a,1)){if(!/(?![0-9])[\\w]/.test(C(a.a).charAt(0)))throw Error(\"Bad token: \"+a.a.next());var e=a.a.next();d=Ob[e]||null;if(!d)throw Error(\"No axis with name: \"+e);a.a.next();R(a,\"Missing node name\")}else d=Lb;e=\nC(a.a);if(/(?![0-9])[\\w\\*]/.test(e.charAt(0)))if(\"(\"==C(a.a,1)){if(!Ab(e))throw Error(\"Invalid node type: \"+e);e=a.a.next();if(!Ab(e))throw Error(\"Invalid type name: \"+e);Wb(a,\"(\");R(a,\"Bad nodetype\");var f=C(a.a).charAt(0),h=null;if('\"'==f||\"'\"==f)h=Yb(a);R(a,\"Bad nodetype\");Xb(a);e=new F(e,h)}else if(e=a.a.next(),f=e.indexOf(\":\"),-1==f)e=new Cb(e);else{var h=e.substring(0,f);if(\"*\"==h)var m=\"*\";else if(m=a.wa(h),!m)throw Error(\"Namespace prefix not declared: \"+h);e=e.substr(f+1);e=new Cb(e,m)}else throw Error(\"Bad token: \"+\na.a.next());a=new O(ac(a),d.H);return c||new P(d,e,a,\"//\"==b)}function ac(a){for(var b=[];\"[\"==C(a.a);){a.a.next();R(a,\"Missing predicate expression.\");var c=Ub(a);b.push(c);R(a,\"Unclosed predicate expression.\");Wb(a,\"]\")}return b}function Vb(a){if(\"-\"==C(a.a))return a.a.next(),new Rb(Vb(a));var b=Zb(a);if(\"|\"!=C(a.a))a=b;else{for(b=[b];\"|\"==a.a.next();)R(a,\"Missing next union location path.\"),b.push(Zb(a));a.a.back();a=new Sb(b)}return a};function bc(a){switch(a.nodeType){case 1:return ja(cc,a);case 9:return bc(a.documentElement);case 11:case 10:case 6:case 12:return dc;default:return a.parentNode?bc(a.parentNode):dc}}function dc(){return null}function cc(a,b){if(a.prefix==b)return a.namespaceURI||\"http://www.w3.org/1999/xhtml\";var c=a.getAttributeNode(\"xmlns:\"+b);return c&&c.specified?c.value||null:a.parentNode&&9!=a.parentNode.nodeType?cc(a.parentNode,b):null};function ec(a,b){if(!a.length)throw Error(\"Empty XPath expression.\");a=bb(a);if(a.empty())throw Error(\"Invalid XPath expression.\");b?ea(b)||(b=ia(b.lookupNamespaceURI,b)):b=function(){return null};var c=Ub(new Tb(a,b));if(!a.empty())throw Error(\"Bad token: \"+a.next());this.evaluate=function(a,b){a=c.evaluate(new $a(a));return new S(a,b)}}\nfunction S(a,b){if(0==b)if(a instanceof E)b=4;else if(\"string\"==typeof a)b=2;else if(\"number\"==typeof a)b=1;else if(\"boolean\"==typeof a)b=3;else throw Error(\"Unexpected evaluation result.\");if(2!=b&&1!=b&&3!=b&&!(a instanceof E))throw Error(\"value could not be converted to the specified type\");this.resultType=b;switch(b){case 2:this.stringValue=a instanceof E?lb(a):\"\"+a;break;case 1:this.numberValue=a instanceof E?+lb(a):+a;break;case 3:this.booleanValue=a instanceof E?0\u003Ca.v():!!a;break;case 4:case 5:case 6:case 7:var c=\na.iterator();var d=[];for(var e=c.next();e;e=c.next())d.push(e);this.snapshotLength=a.v();this.invalidIteratorState=!1;break;case 8:case 9:this.singleNodeValue=kb(a);break;default:throw Error(\"Unknown XPathResult type.\");}var f=0;this.iterateNext=function(){if(4!=b&&5!=b)throw Error(\"iterateNext called with wrong result type\");return f>=d.length?null:d[f++]};this.snapshotItem=function(a){if(6!=b&&7!=b)throw Error(\"snapshotItem called with wrong result type\");return a>=d.length||0>a?null:d[a]}}\nS.ANY_TYPE=0;S.NUMBER_TYPE=1;S.STRING_TYPE=2;S.BOOLEAN_TYPE=3;S.UNORDERED_NODE_ITERATOR_TYPE=4;S.ORDERED_NODE_ITERATOR_TYPE=5;S.UNORDERED_NODE_SNAPSHOT_TYPE=6;S.ORDERED_NODE_SNAPSHOT_TYPE=7;S.ANY_UNORDERED_NODE_TYPE=8;S.FIRST_ORDERED_NODE_TYPE=9;function fc(a){this.lookupNamespaceURI=bc(a)}\nba(\"wgxpath.install\",function(a,b){a=a||aa;var c=a.Document&&a.Document.prototype||a.document;if(!c.evaluate||b)a.XPathResult=S,c.evaluate=function(a,b,c,h){return(new ec(a,c)).evaluate(b,h)},c.createExpression=function(a,b){return new ec(a,b)},c.createNSResolver=function(a){return new fc(a)}});var U={};U.aa=function(){var a={Ea:\"http://www.w3.org/2000/svg\"};return function(b){return a[b]||null}}();\nU.u=function(a,b,c){var d=A(a);if(!d.documentElement)return null;try{for(var e=d.createNSResolver?d.createNSResolver(d.documentElement):U.aa,f={},h=d.getElementsByTagName(\"*\"),m=0;m\u003Ch.length;++m){var y=h[m],H=y.namespaceURI;if(H&&!f[H]){var t=y.lookupPrefix(H);if(!t)var z=H.match(\".*/(\\\\w+)/?$\"),t=z?z[1]:\"xhtml\";f[H]=t}}var M={},T;for(T in f)M[f[T]]=T;e=function(a){return M[a]||null};try{return d.evaluate(b,a,e,c,null)}catch(Da){if(\"TypeError\"===Da.name)return e=d.createNSResolver?d.createNSResolver(d.documentElement):\nU.aa,d.evaluate(b,a,e,c,null);throw Da;}}catch(Da){throw new v(32,\"Unable to locate an element with the xpath expression \"+b+\" because of the following error:\\n\"+Da);}};U.ba=function(a,b){if(!a||1!=a.nodeType)throw new v(32,'The result of the xpath expression \"'+b+'\" is: '+a+\". It should be an element.\");};\nU.za=function(a,b){var c=function(){var c=U.u(b,a,9);return c?c.singleNodeValue||null:b.selectSingleNode?(c=A(b),c.setProperty&&c.setProperty(\"SelectionLanguage\",\"XPath\"),b.selectSingleNode(a)):null}();null===c||U.ba(c,a);return c};\nU.Ca=function(a,b){var c=function(){var c=U.u(b,a,7);if(c){for(var e=c.snapshotLength,f=[],h=0;h\u003Ce;++h)f.push(c.snapshotItem(h));return f}return b.selectNodes?(c=A(b),c.setProperty&&c.setProperty(\"SelectionLanguage\",\"XPath\"),b.selectNodes(a)):[]}();q(c,function(b){U.ba(b,a)});return c};function gc(a,b,c,d){this.top=a;this.right=b;this.bottom=c;this.left=d}g=gc.prototype;g.clone=function(){return new gc(this.top,this.right,this.bottom,this.left)};g.toString=function(){return\"(\"+this.top+\"t, \"+this.right+\"r, \"+this.bottom+\"b, \"+this.left+\"l)\"};g.contains=function(a){return this&&a?a instanceof gc?a.left>=this.left&&a.right\u003C=this.right&&a.top>=this.top&&a.bottom\u003C=this.bottom:a.x>=this.left&&a.x\u003C=this.right&&a.y>=this.top&&a.y\u003C=this.bottom:!1};\ng.expand=function(a,b,c,d){fa(a)?(this.top-=a.top,this.right+=a.right,this.bottom+=a.bottom,this.left-=a.left):(this.top-=a,this.right+=Number(b),this.bottom+=Number(c),this.left-=Number(d));return this};g.ceil=function(){this.top=Math.ceil(this.top);this.right=Math.ceil(this.right);this.bottom=Math.ceil(this.bottom);this.left=Math.ceil(this.left);return this};\ng.floor=function(){this.top=Math.floor(this.top);this.right=Math.floor(this.right);this.bottom=Math.floor(this.bottom);this.left=Math.floor(this.left);return this};g.round=function(){this.top=Math.round(this.top);this.right=Math.round(this.right);this.bottom=Math.round(this.bottom);this.left=Math.round(this.left);return this};g.translate=function(a,b){a instanceof x?(this.left+=a.x,this.right+=a.x,this.top+=a.y,this.bottom+=a.y):(this.left+=a,this.right+=a,n(b)&&(this.top+=b,this.bottom+=b));return this};\ng.scale=function(a,b){b=n(b)?b:a;this.left*=a;this.right*=a;this.top*=b;this.bottom*=b;return this};function V(a,b,c,d){this.left=a;this.top=b;this.width=c;this.height=d}g=V.prototype;g.clone=function(){return new V(this.left,this.top,this.width,this.height)};g.toString=function(){return\"(\"+this.left+\", \"+this.top+\" - \"+this.width+\"w x \"+this.height+\"h)\"};g.contains=function(a){return a instanceof x?a.x>=this.left&&a.x\u003C=this.left+this.width&&a.y>=this.top&&a.y\u003C=this.top+this.height:this.left\u003C=a.left&&this.left+this.width>=a.left+a.width&&this.top\u003C=a.top&&this.top+this.height>=a.top+a.height};\ng.ceil=function(){this.left=Math.ceil(this.left);this.top=Math.ceil(this.top);this.width=Math.ceil(this.width);this.height=Math.ceil(this.height);return this};g.floor=function(){this.left=Math.floor(this.left);this.top=Math.floor(this.top);this.width=Math.floor(this.width);this.height=Math.floor(this.height);return this};g.round=function(){this.left=Math.round(this.left);this.top=Math.round(this.top);this.width=Math.round(this.width);this.height=Math.round(this.height);return this};\ng.translate=function(a,b){a instanceof x?(this.left+=a.x,this.top+=a.y):(this.left+=a,n(b)&&(this.top+=b));return this};g.scale=function(a,b){b=n(b)?b:a;this.left*=a;this.width*=a;this.top*=b;this.height*=b;return this};var hc=\"function\"===typeof ShadowRoot,ic=\"A AREA BUTTON INPUT LABEL SELECT TEXTAREA\".split(\" \");function jc(a){return u(ic,function(b){return B(a,b)})||null!=Xa(a)&&0\u003C=Number(a.tabIndex)||(kc(a)||(B(a,\"INPUT\")?\"file\"==a.type.toLowerCase():!1))&&!a.readOnly}var lc=\"BUTTON INPUT OPTGROUP OPTION SELECT TEXTAREA\".split(\" \");\nfunction mc(a){return u(lc,function(b){return B(a,b)})?a.disabled?!1:a.parentNode&&1==a.parentNode.nodeType&&B(a,\"OPTGROUP\")||B(a,\"OPTION\")?mc(a.parentNode):!Ua(a,function(a){var b=a.parentNode;if(b&&B(b,\"FIELDSET\")&&b.disabled){if(!B(a,\"LEGEND\"))return!0;for(;a=k(a.previousElementSibling)?a.previousElementSibling:Pa(a.previousSibling);)if(B(a,\"LEGEND\"))return!0}return!1},!0):!0}var nc=\"text search tel url email password number\".split(\" \");\nfunction kc(a){return B(a,\"TEXTAREA\")?!0:B(a,\"INPUT\")?0\u003C=oa(nc,a.type.toLowerCase()):oc(a)?!0:!1}function oc(a){function b(a){return\"inherit\"==a.contentEditable?(a=pc(a))?b(a):!1:\"true\"==a.contentEditable}return k(a.contentEditable)?k(a.isContentEditable)?a.isContentEditable:b(a):!1}function pc(a){for(a=a.parentNode;a&&1!=a.nodeType&&9!=a.nodeType&&11!=a.nodeType;)a=a.parentNode;return B(a)?a:null}\nfunction W(a,b){b=na(b);if(\"float\"==b||\"cssFloat\"==b||\"styleFloat\"==b)b=\"cssFloat\";a:{var c=b;var d=A(a);if(d.defaultView&&d.defaultView.getComputedStyle&&(d=d.defaultView.getComputedStyle(a,null))){c=d[c]||d.getPropertyValue(c)||\"\";break a}c=\"\"}a=c||qc(a,b);if(null===a)a=null;else if(0\u003C=oa(ua,b)){b:{var e=a.match(xa);if(e&&(b=Number(e[1]),c=Number(e[2]),d=Number(e[3]),e=Number(e[4]),0\u003C=b&&255>=b&&0\u003C=c&&255>=c&&0\u003C=d&&255>=d&&0\u003C=e&&1>=e)){b=[b,c,d,e];break b}b=null}if(!b)b:{if(d=a.match(ya))if(b=Number(d[1]),\nc=Number(d[2]),d=Number(d[3]),0\u003C=b&&255>=b&&0\u003C=c&&255>=c&&0\u003C=d&&255>=d){b=[b,c,d,1];break b}b=null}if(!b)b:{b=a.toLowerCase();c=ta[b.toLowerCase()];if(!c&&(c=\"#\"==b.charAt(0)?b:\"#\"+b,4==c.length&&(c=c.replace(va,\"#$1$1$2$2$3$3\")),!wa.test(c))){b=null;break b}b=[parseInt(c.substr(1,2),16),parseInt(c.substr(3,2),16),parseInt(c.substr(5,2),16),1]}a=b?\"rgba(\"+b.join(\", \")+\")\":a}return a}\nfunction qc(a,b){var c=a.currentStyle||a.style,d=c[b];!k(d)&&ea(c.getPropertyValue)&&(d=c.getPropertyValue(b));return\"inherit\"!=d?k(d)?d:null:(a=pc(a))?qc(a,b):null}\nfunction rc(a,b,c){function d(a){var b=sc(a);return 0\u003Cb.height&&0\u003Cb.width?!0:B(a,\"PATH\")&&(0\u003Cb.height||0\u003Cb.width)?(a=W(a,\"stroke-width\"),!!a&&0\u003CparseInt(a,10)):\"hidden\"!=W(a,\"overflow\")&&u(a.childNodes,function(a){return 3==a.nodeType||B(a)&&d(a)})}function e(a){return tc(a)==X&&pa(a.childNodes,function(a){return!B(a)||e(a)||!d(a)})}if(!B(a))throw Error(\"Argument to isShown must be of type Element\");if(B(a,\"BODY\"))return!0;if(B(a,\"OPTION\")||B(a,\"OPTGROUP\"))return a=Ua(a,function(a){return B(a,\"SELECT\")}),\n!!a&&rc(a,!0,c);var f=uc(a);if(f)return!!f.fa&&0\u003Cf.rect.width&&0\u003Cf.rect.height&&rc(f.fa,b,c);if(B(a,\"INPUT\")&&\"hidden\"==a.type.toLowerCase()||B(a,\"NOSCRIPT\"))return!1;f=W(a,\"visibility\");return\"collapse\"!=f&&\"hidden\"!=f&&c(a)&&(b||0!=vc(a))&&d(a)?!e(a):!1}\nfunction wc(a){var b=hc?function(c){if(\"none\"==W(c,\"display\"))return!1;do{var d=c.parentNode;if(c.getDestinationInsertionPoints){var e=c.getDestinationInsertionPoints();0\u003Ce.length&&(d=e[e.length-1])}if(d instanceof ShadowRoot)return!0;!d||9!=d.nodeType&&11!=d.nodeType||(d=null)}while(a&&1!=a.nodeType);return!d||b(d)}:function(a){if(\"none\"==W(a,\"display\"))return!1;a=pc(a);return!a||b(a)};return rc(a,!0,b)}var X=\"hidden\";\nfunction tc(a){function b(a){function b(a){return a==h?!0:0==W(a,\"display\").lastIndexOf(\"inline\",0)||\"absolute\"==c&&\"static\"==W(a,\"position\")?!1:!0}var c=W(a,\"position\");if(\"fixed\"==c)return H=!0,a==h?null:h;for(a=pc(a);a&&!b(a);)a=pc(a);return a}function c(a){var b=a;if(\"visible\"==y)if(a==h&&m)b=m;else if(a==m)return{x:\"visible\",y:\"visible\"};b={x:W(b,\"overflow-x\"),y:W(b,\"overflow-y\")};a==h&&(b.x=\"visible\"==b.x?\"auto\":b.x,b.y=\"visible\"==b.y?\"auto\":b.y);return b}function d(a){if(a==h){var b=(new Wa(f)).M;\na=b.scrollingElement?b.scrollingElement:b.body||b.documentElement;b=b.parentWindow||b.defaultView;a=new x(b.pageXOffset||a.scrollLeft,b.pageYOffset||a.scrollTop)}else a=new x(a.scrollLeft,a.scrollTop);return a}var e=xc(a);var f=A(a),h=f.documentElement,m=f.body,y=W(h,\"overflow\"),H;for(a=b(a);a;a=b(a)){var t=c(a);if(\"visible\"!=t.x||\"visible\"!=t.y){var z=sc(a);if(0==z.width||0==z.height)return X;var M=e.right\u003Cz.left,T=e.bottom\u003Cz.top;if(M&&\"hidden\"==t.x||T&&\"hidden\"==t.y)return X;if(M&&\"visible\"!=t.x||\nT&&\"visible\"!=t.y){M=d(a);T=e.bottom\u003Cz.top-M.y;if(e.right\u003Cz.left-M.x&&\"visible\"!=t.x||T&&\"visible\"!=t.x)return X;e=tc(a);return e==X?X:\"scroll\"}M=e.left>=z.left+z.width;z=e.top>=z.top+z.height;if(M&&\"hidden\"==t.x||z&&\"hidden\"==t.y)return X;if(M&&\"visible\"!=t.x||z&&\"visible\"!=t.y){if(H&&(t=d(a),e.left>=h.scrollWidth-t.x||e.right>=h.scrollHeight-t.y))return X;e=tc(a);return e==X?X:\"scroll\"}}}return\"none\"}\nfunction sc(a){var b=uc(a);if(b)return b.rect;if(B(a,\"HTML\"))return a=A(a),a=((a?a.parentWindow||a.defaultView:window)||window).document,a=\"CSS1Compat\"==a.compatMode?a.documentElement:a.body,a=new Ma(a.clientWidth,a.clientHeight),new V(0,0,a.width,a.height);try{var c=a.getBoundingClientRect()}catch(d){return new V(0,0,0,0)}return new V(c.left,c.top,c.right-c.left,c.bottom-c.top)}\nfunction uc(a){var b=B(a,\"MAP\");if(!b&&!B(a,\"AREA\"))return null;var c=b?a:B(a.parentNode,\"MAP\")?a.parentNode:null,d=null,e=null;c&&c.name&&(d=U.za('/descendant::*[@usemap = \"#'+c.name+'\"]',A(c)))&&(e=sc(d),b||\"default\"==a.shape.toLowerCase()||(a=yc(a),b=Math.min(Math.max(a.left,0),e.width),c=Math.min(Math.max(a.top,0),e.height),e=new V(b+e.left,c+e.top,Math.min(a.width,e.width-b),Math.min(a.height,e.height-c))));return{fa:d,rect:e||new V(0,0,0,0)}}\nfunction yc(a){var b=a.shape.toLowerCase();a=a.coords.split(\",\");if(\"rect\"==b&&4==a.length){var b=a[0],c=a[1];return new V(b,c,a[2]-b,a[3]-c)}if(\"circle\"==b&&3==a.length)return b=a[2],new V(a[0]-b,a[1]-b,2*b,2*b);if(\"poly\"==b&&2\u003Ca.length){for(var b=a[0],c=a[1],d=b,e=c,f=2;f+1\u003Ca.length;f+=2)b=Math.min(b,a[f]),d=Math.max(d,a[f]),c=Math.min(c,a[f+1]),e=Math.max(e,a[f+1]);return new V(b,c,d-b,e-c)}return new V(0,0,0,0)}function xc(a){a=sc(a);return new gc(a.top,a.left+a.width,a.top+a.height,a.left)}\nfunction vc(a){var b=1,c=W(a,\"opacity\");c&&(b=Number(c));(a=pc(a))&&(b*=vc(a));return b};function zc(){this.N=ka.document.documentElement;var a=Va(A(this.N));a&&Ac(this,a)}function Ac(a,b){a.N=b;B(b,\"OPTION\")&&Ua(b,function(a){return B(a,\"SELECT\")})}function Bc(a){var b=Ua(a.N,function(a){return!!a&&B(a)&&jc(a)},!0),b=b||a.N;a=Va(A(b));if(b!=a){if(a&&ea(a.blur)&&!B(a,\"BODY\"))try{a.blur()}catch(c){throw c;}ea(b.focus)&&b.focus()}};La();La();function Cc(a,b,c){this.B=a;this.pa=b;this.qa=c}Cc.prototype.create=function(a){a=A(a).createEvent(\"HTMLEvents\");a.initEvent(this.B,this.pa,this.qa);return a};Cc.prototype.toString=function(){return this.B};var Dc=new Cc(\"change\",!0,!1);function Ec(a,b){this.w={};this.g=[];this.G=0;var c=arguments.length;if(1\u003Cc){if(c%2)throw Error(\"Uneven number of arguments\");for(var d=0;d\u003Cc;d+=2)this.set(arguments[d],arguments[d+1])}else a&&this.addAll(a)}function Fc(a){Gc(a);return a.g.concat()}g=Ec.prototype;g.clear=function(){this.w={};this.G=this.g.length=0};g.remove=function(a){return Object.prototype.hasOwnProperty.call(this.w,a)?(delete this.w[a],this.G--,this.g.length>2*this.G&&Gc(this),!0):!1};\nfunction Gc(a){var b,c;if(a.G!=a.g.length){for(b=c=0;c\u003Ca.g.length;){var d=a.g[c];Object.prototype.hasOwnProperty.call(a.w,d)&&(a.g[b++]=d);c++}a.g.length=b}if(a.G!=a.g.length){var e={};for(b=c=0;c\u003Ca.g.length;)d=a.g[c],Object.prototype.hasOwnProperty.call(e,d)||(a.g[b++]=d,e[d]=1),c++;a.g.length=b}}g.get=function(a,b){return Object.prototype.hasOwnProperty.call(this.w,a)?this.w[a]:b};g.set=function(a,b){Object.prototype.hasOwnProperty.call(this.w,a)||(this.G++,this.g.push(a));this.w[a]=b};\ng.addAll=function(a){if(a instanceof Ec){var b=Fc(a);Gc(a);for(var c=[],d=0;d\u003Ca.g.length;d++)c.push(a.w[a.g[d]]);a=c}else{b=[];var d=0;for(e in a)b[d++]=e;d=[];var e=0;for(c in a)d[e++]=a[c];a=d}for(c=0;c\u003Cb.length;c++)this.set(b[c],a[c])};g.forEach=function(a,b){for(var c=Fc(this),d=0;d\u003Cc.length;d++){var e=c[d],f=this.get(e);a.call(b,f,e,this)}};g.clone=function(){return new Ec(this)};var Hc={};function Y(a,b,c){fa(a)&&(a=a.b);a=new Ic(a);!b||b in Hc&&!c||(Hc[b]={key:a,shift:!1},c&&(Hc[c]={key:a,shift:!0}));return a}function Ic(a){this.code=a}Y(8);Y(9);Y(13);var Jc=Y(16),Kc=Y(17),Lc=Y(18);Y(19);Y(20);Y(27);Y(32,\" \");Y(33);Y(34);Y(35);Y(36);Y(37);Y(38);Y(39);Y(40);Y(44);Y(45);Y(46);Y(48,\"0\",\")\");Y(49,\"1\",\"!\");Y(50,\"2\",\"@\");Y(51,\"3\",\"#\");Y(52,\"4\",\"$\");Y(53,\"5\",\"%\");Y(54,\"6\",\"^\");Y(55,\"7\",\"&\");Y(56,\"8\",\"*\");Y(57,\"9\",\"(\");Y(65,\"a\",\"A\");Y(66,\"b\",\"B\");Y(67,\"c\",\"C\");Y(68,\"d\",\"D\");\nY(69,\"e\",\"E\");Y(70,\"f\",\"F\");Y(71,\"g\",\"G\");Y(72,\"h\",\"H\");Y(73,\"i\",\"I\");Y(74,\"j\",\"J\");Y(75,\"k\",\"K\");Y(76,\"l\",\"L\");Y(77,\"m\",\"M\");Y(78,\"n\",\"N\");Y(79,\"o\",\"O\");Y(80,\"p\",\"P\");Y(81,\"q\",\"Q\");Y(82,\"r\",\"R\");Y(83,\"s\",\"S\");Y(84,\"t\",\"T\");Y(85,\"u\",\"U\");Y(86,\"v\",\"V\");Y(87,\"w\",\"W\");Y(88,\"x\",\"X\");Y(89,\"y\",\"Y\");Y(90,\"z\",\"Z\");var Mc=Y(Ha?{c:91,b:91}:Ga?{c:224,b:91}:{c:0,b:91});Y(Ha?{c:92,b:92}:Ga?{c:224,b:93}:{c:0,b:92});Y(Ha?{c:93,b:93}:Ga?{c:0,b:0}:{c:93,b:null});Y({c:96,b:96},\"0\");Y({c:97,b:97},\"1\");\nY({c:98,b:98},\"2\");Y({c:99,b:99},\"3\");Y({c:100,b:100},\"4\");Y({c:101,b:101},\"5\");Y({c:102,b:102},\"6\");Y({c:103,b:103},\"7\");Y({c:104,b:104},\"8\");Y({c:105,b:105},\"9\");Y({c:106,b:106},\"*\");Y({c:107,b:107},\"+\");Y({c:109,b:109},\"-\");Y({c:110,b:110},\".\");Y({c:111,b:111},\"/\");Y(144);Y(112);Y(113);Y(114);Y(115);Y(116);Y(117);Y(118);Y(119);Y(120);Y(121);Y(122);Y(123);Y({c:107,b:187},\"=\",\"+\");Y(108,\",\");Y({c:109,b:189},\"-\",\"_\");Y(188,\",\",\"\u003C\");Y(190,\".\",\">\");Y(191,\"/\",\"?\");Y(192,\"`\",\"~\");Y(219,\"[\",\"{\");\nY(220,\"\\\\\",\"|\");Y(221,\"]\",\"}\");Y({c:59,b:186},\";\",\":\");Y(222,\"'\",'\"');var Nc=new Ec;Nc.set(1,Jc);Nc.set(2,Kc);Nc.set(4,Lc);Nc.set(8,Mc);(function(a){var b=new Ec;q(Fc(a),function(c){b.set(a.get(c).code,c)});return b})(Nc);function Z(){zc.call(this)}p(Z,zc);Z.W=void 0;Z.ra=function(){return Z.W?Z.W:Z.W=new Z};ba(\"_\",function(a){if(!wc(a)||!mc(a)||\"none\"==W(a,\"pointer-events\"))throw new v(12,\"Element is not currently interactable and may not be manipulated\");if(!(kc(a)||B(a,\"INPUT\")&&\"file\"==a.type.toLowerCase())||a.readOnly)throw new v(12,\"Element must be user-editable in order to clear it.\");var b=Z.ra();Ac(b,a);Bc(b);a.value?(a.value=\"\",b=Dc.create(a,void 0),\"isTrusted\"in b||(b.isTrusted=!1),a.dispatchEvent(b)):B(a,\"INPUT\")&&a.getAttribute(\"type\")&&\"number\"==a.getAttribute(\"type\").toLowerCase()&&(a.value=\n\"\");oc(a)&&(a.innerHTML=\" \")});; return this._.apply(null,arguments);}.apply({navigator:typeof window!='undefined'?window.navigator:null,document:typeof window!='undefined'?window.document:null}, arguments);}, [{\"ELEMENT\":\"0.47435541797315195-1\"}], false])", + "returnByValue": true +} +[1532715854.493][DEBUG]: DEVTOOLS RESPONSE Runtime.evaluate (id=25) { + "result": { + "type": "object", + "value": { + "status": 0 + } + } +} +[1532715854.493][INFO]: Waiting for pending navigations... +[1532715854.493][DEBUG]: DEVTOOLS COMMAND Runtime.evaluate (id=26) { + "expression": "1" +} +[1532715854.498][DEBUG]: DEVTOOLS RESPONSE Runtime.evaluate (id=26) { + "result": { + "description": "1", + "type": "number", + "value": 1 + } +} +[1532715854.498][INFO]: Done waiting for pending navigations. Status: ok +[1532715854.498][INFO]: [c3681035a5e0990f0e117e8f7299f793] RESPONSE ClearElement +[1532715854.499][INFO]: [c3681035a5e0990f0e117e8f7299f793] COMMAND ExecuteScript { + "args": [ { + "ELEMENT": "0.47435541797315195-1" + } ], + "script": "return arguments[0].value;" +} +[1532715854.499][INFO]: Waiting for pending navigations... +[1532715854.499][DEBUG]: DEVTOOLS COMMAND Runtime.evaluate (id=27) { + "expression": "1" +} +[1532715854.501][DEBUG]: DEVTOOLS RESPONSE Runtime.evaluate (id=27) { + "result": { + "description": "1", + "type": "number", + "value": 1 + } +} +[1532715854.501][INFO]: Done waiting for pending navigations. Status: ok +[1532715854.502][DEBUG]: DEVTOOLS COMMAND Runtime.evaluate (id=28) { + "expression": "(function() { // Copyright (c) 2012 The Chromium Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style license that can be\n// found in the LICENSE file.\n\n/**\n * Enum for WebDriver status codes.\n * @enum {number}\n */\nvar StatusCode = {\n STALE_ELEMENT_REFERENCE: 10,\n UNKNOWN_ERROR: 13,\n};\n\n/**\n * Enum for node types.\n * @enum {number}\n */\nvar NodeType = {\n ELEMENT: 1,\n DOCUMENT: 9,\n};\n\n/**\n * Dictionary key to use for holding an element ID.\n * @const\n * @type {string}\n */\nvar ELEMENT_KEY = 'ELEMENT';\n\n/**\n * True if using W3C Element references.\n * @const\n * @type {boolean}\n */\nvar w3cEnabled = false;\n\n/**\n * True if shadow dom is enabled.\n * @const\n * @type {boolean}\n */\nvar SHADOW_DOM_ENABLED = typeof ShadowRoot === 'function';\n\n/**\n * Generates a unique ID to identify an element.\n * @void\n * @return {string} Randomly generated ID.\n */\nfunction generateUUID() {\n var array = new Uint8Array(16);\n window.crypto.getRandomValues(array);\n array[6] = 0x40 | (array[6] & 0x0f);\n array[8] = 0x80 | (array[8] & 0x3f);\n\n var UUID = \"\";\n for (var i = 0; i \u003C 16; i++) {\n var temp = array[i].toString(16);\n if (temp.length \u003C 2)\n temp = \"0\" + temp;\n UUID += temp;\n if (i == 3 || i == 5 || i == 7 || i == 9)\n UUID += \"-\";\n }\n return UUID;\n};\n\n/**\n * A cache which maps IDs \u003C-> cached objects for the purpose of identifying\n * a script object remotely. Uses UUIDs for identification.\n * @constructor\n */\nfunction CacheWithUUID() {\n this.cache_ = {};\n}\n\nCacheWithUUID.prototype = {\n /**\n * Stores a given item in the cache and returns a unique UUID.\n *\n * @param {!Object} item The item to store in the cache.\n * @return {number} The UUID for the cached item.\n */\n storeItem: function(item) {\n for (var i in this.cache_) {\n if (item == this.cache_[i])\n return i;\n }\n var id = generateUUID();\n this.cache_[id] = item;\n return id;\n },\n\n /**\n * Retrieves the cached object for the given ID.\n *\n * @param {number} id The ID for the cached item to retrieve.\n * @return {!Object} The retrieved item.\n */\n retrieveItem: function(id) {\n var item = this.cache_[id];\n if (item)\n return item;\n var error = new Error('not in cache');\n error.code = StatusCode.STALE_ELEMENT_REFERENCE;\n error.message = 'element is not attached to the page document';\n throw error;\n },\n\n /**\n * Clears stale items from the cache.\n */\n clearStale: function() {\n for (var id in this.cache_) {\n var node = this.cache_[id];\n if (!this.isNodeReachable_(node))\n delete this.cache_[id];\n }\n },\n\n /**\n * @private\n * @param {!Node} node The node to check.\n * @return {boolean} If the nodes is reachable.\n */\n isNodeReachable_: function(node) {\n var nodeRoot = getNodeRootThroughAnyShadows(node);\n return (nodeRoot == document);\n }\n\n\n};\n\n/**\n * A cache which maps IDs \u003C-> cached objects for the purpose of identifying\n * a script object remotely.\n * @constructor\n */\nfunction Cache() {\n this.cache_ = {};\n this.nextId_ = 1;\n this.idPrefix_ = Math.random().toString();\n}\n\nCache.prototype = {\n\n /**\n * Stores a given item in the cache and returns a unique ID.\n *\n * @param {!Object} item The item to store in the cache.\n * @return {number} The ID for the cached item.\n */\n storeItem: function(item) {\n for (var i in this.cache_) {\n if (item == this.cache_[i])\n return i;\n }\n var id = this.idPrefix_ + '-' + this.nextId_;\n this.cache_[id] = item;\n this.nextId_++;\n return id;\n },\n\n /**\n * Retrieves the cached object for the given ID.\n *\n * @param {number} id The ID for the cached item to retrieve.\n * @return {!Object} The retrieved item.\n */\n retrieveItem: function(id) {\n var item = this.cache_[id];\n if (item)\n return item;\n var error = new Error('not in cache');\n error.code = StatusCode.STALE_ELEMENT_REFERENCE;\n error.message = 'element is not attached to the page document';\n throw error;\n },\n\n /**\n * Clears stale items from the cache.\n */\n clearStale: function() {\n for (var id in this.cache_) {\n var node = this.cache_[id];\n if (!this.isNodeReachable_(node))\n delete this.cache_[id];\n }\n },\n\n /**\n * @private\n * @param {!Node} node The node to check.\n * @return {boolean} If the nodes is reachable.\n */\n isNodeReachable_: function(node) {\n var nodeRoot = getNodeRootThroughAnyShadows(node);\n return (nodeRoot == document);\n }\n};\n\n/**\n * Returns the root element of the node. Found by traversing parentNodes until\n * a node with no parent is found. This node is considered the root.\n * @param {?Node} node The node to find the root element for.\n * @return {?Node} The root node.\n */\nfunction getNodeRoot(node) {\n while (node && node.parentNode) {\n node = node.parentNode;\n }\n return node;\n}\n\n/**\n * Returns the root element of the node, jumping up through shadow roots if\n * any are found.\n */\nfunction getNodeRootThroughAnyShadows(node) {\n var root = getNodeRoot(node);\n while (SHADOW_DOM_ENABLED && root instanceof ShadowRoot) {\n root = getNodeRoot(root.host);\n }\n return root;\n}\n\n/**\n * Returns the global object cache for the page.\n * @param {Document=} opt_doc The document whose cache to retrieve. Defaults to\n * the current document.\n * @return {!Cache} The page's object cache.\n */\nfunction getPageCache(opt_doc, opt_w3c) {\n var doc = opt_doc || document;\n var w3c = opt_w3c || false;\n var key = '$cdc_asdjflasutopfhvcZLmcfl_';\n if (w3c) {\n if (!(key in doc))\n doc[key] = new CacheWithUUID();\n return doc[key];\n } else {\n if (!(key in doc))\n doc[key] = new Cache();\n return doc[key];\n }\n}\n\n/**\n * Wraps the given value to be transmitted remotely by converting\n * appropriate objects to cached object IDs.\n *\n * @param {*} value The value to wrap.\n * @return {*} The wrapped value.\n */\nfunction wrap(value) {\n // As of crrev.com/1316933002, typeof() for some elements will return\n // 'function', not 'object'. So we need to check for both non-null objects, as\n // well Elements that also happen to be callable functions (e.g. \u003Cembed> and\n // \u003Cobject> elements). Note that we can not use |value instanceof Object| here\n // since this does not work with frames/iframes, for example\n // frames[0].document.body instanceof Object == false even though\n // typeof(frames[0].document.body) == 'object'.\n if ((typeof(value) == 'object' && value != null) ||\n (typeof(value) == 'function' && value.nodeName &&\n value.nodeType == NodeType.ELEMENT)) {\n var nodeType = value['nodeType'];\n if (nodeType == NodeType.ELEMENT || nodeType == NodeType.DOCUMENT\n || (SHADOW_DOM_ENABLED && value instanceof ShadowRoot)) {\n var wrapped = {};\n var root = getNodeRootThroughAnyShadows(value);\n wrapped[ELEMENT_KEY] = getPageCache(root, w3cEnabled).storeItem(value);\n return wrapped;\n }\n\n var obj;\n if (typeof(value.length) == 'number') {\n obj = [];\n for (var i = 0; i \u003C value.length; i++)\n obj[i] = wrap(value[i]);\n } else {\n obj = {};\n for (var prop in value)\n obj[prop] = wrap(value[prop]);\n }\n return obj;\n }\n return value;\n}\n\n/**\n * Unwraps the given value by converting from object IDs to the cached\n * objects.\n *\n * @param {*} value The value to unwrap.\n * @param {Cache} cache The cache to retrieve wrapped elements from.\n * @return {*} The unwrapped value.\n */\nfunction unwrap(value, cache) {\n if (typeof(value) == 'object' && value != null) {\n if (ELEMENT_KEY in value)\n return cache.retrieveItem(value[ELEMENT_KEY]);\n\n var obj;\n if (typeof(value.length) == 'number') {\n obj = [];\n for (var i = 0; i \u003C value.length; i++)\n obj[i] = unwrap(value[i], cache);\n } else {\n obj = {};\n for (var prop in value)\n obj[prop] = unwrap(value[prop], cache);\n }\n return obj;\n }\n return value;\n}\n\n/**\n * Calls a given function and returns its value.\n *\n * The inputs to and outputs of the function will be unwrapped and wrapped\n * respectively, unless otherwise specified. This wrapping involves converting\n * between cached object reference IDs and actual JS objects. The cache will\n * automatically be pruned each call to remove stale references.\n *\n * @param {Array\u003Cstring>} shadowHostIds The host ids of the nested shadow\n * DOMs the function should be executed in the context of.\n * @param {function(...[*]) : *} func The function to invoke.\n * @param {!Array\u003C*>} args The array of arguments to supply to the function,\n * which will be unwrapped before invoking the function.\n * @param {boolean} w3c Whether to return a W3C compliant element reference.\n * @param {boolean=} opt_unwrappedReturn Whether the function's return value\n * should be left unwrapped.\n * @return {*} An object containing a status and value property, where status\n * is a WebDriver status code and value is the wrapped value. If an\n * unwrapped return was specified, this will be the function's pure return\n * value.\n */\nfunction callFunction(shadowHostIds, func, args, w3c, opt_unwrappedReturn) {\n if (w3c) {\n w3cEnabled = true;\n ELEMENT_KEY = 'element-6066-11e4-a52e-4f735466cecf';\n\n }\n var cache = getPageCache(null, w3cEnabled);\n cache.clearStale();\n if (shadowHostIds && SHADOW_DOM_ENABLED) {\n for (var i = 0; i \u003C shadowHostIds.length; i++) {\n var host = cache.retrieveItem(shadowHostIds[i]);\n // TODO(zachconrad): Use the olderShadowRoot API when available to check\n // all of the shadow roots.\n cache = getPageCache(host.webkitShadowRoot, w3cEnabled);\n cache.clearStale();\n }\n }\n\n if (opt_unwrappedReturn)\n return func.apply(null, unwrap(args, cache));\n\n var status = 0;\n try {\n var returnValue = wrap(func.apply(null, unwrap(args, cache)));\n } catch (error) {\n status = error.code || StatusCode.UNKNOWN_ERROR;\n var returnValue = error.message;\n }\n return {\n status: status,\n value: returnValue\n }\n}\n; return callFunction.apply(null, arguments) }\n).apply(null, [null, function(){return arguments[0].value;}, [{\"ELEMENT\":\"0.47435541797315195-1\"}], false])", + "returnByValue": true +} +[1532715854.506][DEBUG]: DEVTOOLS RESPONSE Runtime.evaluate (id=28) { + "result": { + "type": "object", + "value": { + "status": 0, + "value": "" + } + } +} +[1532715854.506][INFO]: Waiting for pending navigations... +[1532715854.506][DEBUG]: DEVTOOLS COMMAND Runtime.evaluate (id=29) { + "expression": "1" +} +[1532715854.507][DEBUG]: DEVTOOLS RESPONSE Runtime.evaluate (id=29) { + "result": { + "description": "1", + "type": "number", + "value": 1 + } +} +[1532715854.507][INFO]: Done waiting for pending navigations. Status: ok +[1532715854.507][INFO]: [c3681035a5e0990f0e117e8f7299f793] RESPONSE ExecuteScript "" +[1532715854.509][INFO]: [c3681035a5e0990f0e117e8f7299f793] COMMAND Quit { + +} +[0727/112414.522983:ERROR:nacl_helper_linux.cc(310)] NaCl helper process running without a sandbox! +Most likely you need to configure your SUID sandbox correctly +[1532715854.559][INFO]: [c3681035a5e0990f0e117e8f7299f793] RESPONSE Quit +[1532715854.559][DEBUG]: Log type 'driver' lost 0 entries on destruction +[1532715854.559][DEBUG]: Log type 'browser' lost 1 entries on destruction
diff --git a/chrome/test/chromedriver/log_replay/test_data/testCloseWindow.log b/chrome/test/chromedriver/log_replay/test_data/testCloseWindow.log new file mode 100644 index 0000000..751116d --- /dev/null +++ b/chrome/test/chromedriver/log_replay/test_data/testCloseWindow.log
@@ -0,0 +1,2797 @@ +[1532467538.119][INFO]: [2eb1535d1fd6d728cac89031b4094ab7] COMMAND InitSession { + "desiredCapabilities": { + "chromeOptions": { + "args": [ "no-sandbox", "disable-gpu" ], + "binary": "/usr/local/google/home/cwinstanley/chromium/src/out/Default/chrome" + }, + "goog:testName": "__main__.ChromeDriverTest.testCloseWindow", + "loggingPrefs": { + + } + } +} +[1532467538.121][INFO]: Populating Preferences file: { + "alternate_error_pages": { + "enabled": false + }, + "autofill": { + "enabled": false + }, + "browser": { + "check_default_browser": false + }, + "distribution": { + "import_bookmarks": false, + "import_history": false, + "import_search_engine": false, + "make_chrome_default_for_user": false, + "skip_first_run_ui": true + }, + "dns_prefetching": { + "enabled": false + }, + "profile": { + "content_settings": { + "pattern_pairs": { + "https://*,*": { + "media-stream": { + "audio": "Default", + "video": "Default" + } + } + } + }, + "default_content_setting_values": { + "geolocation": 1 + }, + "default_content_settings": { + "geolocation": 1, + "mouselock": 1, + "notifications": 1, + "popups": 1, + "ppapi-broker": 1 + }, + "password_manager_enabled": false + }, + "safebrowsing": { + "enabled": false + }, + "search": { + "suggest_enabled": false + }, + "translate": { + "enabled": false + } +} +[1532467538.121][INFO]: Populating Local State file: { + "background_mode": { + "enabled": false + }, + "ssl": { + "rev_checking": { + "enabled": false + } + } +} +[1532467538.123][INFO]: Launching chrome: /usr/local/google/home/cwinstanley/chromium/src/out/Default/chrome --disable-background-networking --disable-client-side-phishing-detection --disable-default-apps --disable-gpu --disable-hang-monitor --disable-popup-blocking --disable-prompt-on-repost --disable-sync --disable-web-resources --enable-automation --enable-logging --force-fieldtrials=SiteIsolationExtensions/Control --ignore-certificate-errors --load-extension=/tmp/.org.chromium.Chromium.Ej7k9g/internal --log-level=0 --metrics-recording-only --no-first-run --no-sandbox --password-store=basic --remote-debugging-port=0 --test-type=webdriver --use-mock-keychain --user-data-dir=/tmp/.org.chromium.Chromium.GtPufM data:, +[260347:260347:0724/142540.003162:ERROR:gpu_process_transport_factory.cc(642)] Switching to software compositing. +[260347:260347:0724/142540.003228:ERROR:gpu_process_transport_factory.cc(1007)] Lost UI shared context. +[260347:260347:0724/142540.079069:WARNING:account_consistency_mode_manager.cc(290)] Desktop Identity Consistency cannot be enabled as no OAuth client ID and client secret have been configured. +[260347:260347:0724/142540.079169:WARNING:account_consistency_mode_manager.cc(290)] Desktop Identity Consistency cannot be enabled as no OAuth client ID and client secret have been configured. +[260347:260347:0724/142540.079213:WARNING:account_consistency_mode_manager.cc(290)] Desktop Identity Consistency cannot be enabled as no OAuth client ID and client secret have been configured. +[260347:260347:0724/142540.079259:WARNING:account_consistency_mode_manager.cc(290)] Desktop Identity Consistency cannot be enabled as no OAuth client ID and client secret have been configured. +[260347:260347:0724/142540.080147:WARNING:account_consistency_mode_manager.cc(290)] Desktop Identity Consistency cannot be enabled as no OAuth client ID and client secret have been configured. +[260347:260347:0724/142540.086655:WARNING:account_consistency_mode_manager.cc(290)] Desktop Identity Consistency cannot be enabled as no OAuth client ID and client secret have been configured. +[260347:260347:0724/142540.128423:WARNING:account_consistency_mode_manager.cc(290)] Desktop Identity Consistency cannot be enabled as no OAuth client ID and client secret have been configured. +[260347:260347:0724/142540.155996:WARNING:account_consistency_mode_manager.cc(290)] Desktop Identity Consistency cannot be enabled as no OAuth client ID and client secret have been configured. +[260347:260347:0724/142540.156083:WARNING:account_consistency_mode_manager.cc(290)] Desktop Identity Consistency cannot be enabled as no OAuth client ID and client secret have been configured. + +DevTools listening on ws://127.0.0.1:43221/devtools/browser/bb13c7ce-4d46-4fa4-a601-26534c7b19d9 +[1532467540.221][DEBUG]: DevTools request: http://localhost:43221/json/version +[260347:260347:0724/142540.327734:WARNING:password_store_factory.cc(253)] Using basic (unencrypted) store for password storage. See https://chromium.googlesource.com/chromium/src/+/master/docs/linux_password_storage.md for more information about password storage options. +[260347:260347:0724/142540.331077:WARNING:account_consistency_mode_manager.cc(290)] Desktop Identity Consistency cannot be enabled as no OAuth client ID and client secret have been configured. +[1532467540.634][DEBUG]: DevTools response: { + "Browser": "Chrome/69.0.3491.0", + "Protocol-Version": "1.3", + "User-Agent": "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/69.0.3491.0 Safari/537.36", + "V8-Version": "6.9.389", + "WebKit-Version": "537.36 (@410f2c4912d46a5fae2fe6c0b2e24d9eb6359761)", + "webSocketDebuggerUrl": "ws://localhost:43221/devtools/browser/bb13c7ce-4d46-4fa4-a601-26534c7b19d9" +} + +[1532467540.681][DEBUG]: DevTools request: http://localhost:43221/json +[1532467540.728][DEBUG]: DevTools response: [ { + "description": "", + "devtoolsFrontendUrl": "/devtools/inspector.html?ws=localhost:43221/devtools/page/A2A7F36945178A7478F210B1A3949B3D", + "id": "A2A7F36945178A7478F210B1A3949B3D", + "title": "Chrome Automation Extension", + "type": "background_page", + "url": "chrome-extension://aapnijgdinlhnhlmodcfapnahmbfebeb/_generated_background_page.html", + "webSocketDebuggerUrl": "ws://localhost:43221/devtools/page/A2A7F36945178A7478F210B1A3949B3D" +}, { + "description": "", + "devtoolsFrontendUrl": "/devtools/inspector.html?ws=localhost:43221/devtools/page/2165BBB228590EF9526B591281D561FA", + "id": "2165BBB228590EF9526B591281D561FA", + "title": "", + "type": "page", + "url": "data:,", + "webSocketDebuggerUrl": "ws://localhost:43221/devtools/page/2165BBB228590EF9526B591281D561FA" +} ] + +[1532467540.728][DEBUG]: DevTools request: http://localhost:43221/json +[1532467540.731][DEBUG]: DevTools response: [ { + "description": "", + "devtoolsFrontendUrl": "/devtools/inspector.html?ws=localhost:43221/devtools/page/A2A7F36945178A7478F210B1A3949B3D", + "id": "A2A7F36945178A7478F210B1A3949B3D", + "title": "Chrome Automation Extension", + "type": "background_page", + "url": "chrome-extension://aapnijgdinlhnhlmodcfapnahmbfebeb/_generated_background_page.html", + "webSocketDebuggerUrl": "ws://localhost:43221/devtools/page/A2A7F36945178A7478F210B1A3949B3D" +}, { + "description": "", + "devtoolsFrontendUrl": "/devtools/inspector.html?ws=localhost:43221/devtools/page/2165BBB228590EF9526B591281D561FA", + "id": "2165BBB228590EF9526B591281D561FA", + "title": "", + "type": "page", + "url": "data:,", + "webSocketDebuggerUrl": "ws://localhost:43221/devtools/page/2165BBB228590EF9526B591281D561FA" +} ] + +[1532467540.732][INFO]: resolved localhost to ["::1","127.0.0.1"] +[1532467540.735][DEBUG]: DEVTOOLS COMMAND Log.enable (id=1) { + +} +[1532467540.735][DEBUG]: DEVTOOLS COMMAND DOM.getDocument (id=2) { + +} +[1532467540.736][DEBUG]: DEVTOOLS COMMAND Target.setAutoAttach (id=3) { + "autoAttach": true, + "waitForDebuggerOnStart": false +} +[1532467540.736][DEBUG]: DEVTOOLS COMMAND Page.enable (id=4) { + +} +[1532467540.736][DEBUG]: DEVTOOLS COMMAND Page.enable (id=5) { + +} +[1532467540.784][DEBUG]: DEVTOOLS RESPONSE Log.enable (id=1) { + +} +[1532467540.785][DEBUG]: DEVTOOLS RESPONSE DOM.getDocument (id=2) { + "root": { + "backendNodeId": 1, + "baseURL": "about:blank", + "childNodeCount": 1, + "children": [ { + "attributes": [ ], + "backendNodeId": 2, + "childNodeCount": 2, + "children": [ { + "attributes": [ ], + "backendNodeId": 3, + "childNodeCount": 0, + "localName": "head", + "nodeId": 3, + "nodeName": "HEAD", + "nodeType": 1, + "nodeValue": "", + "parentId": 2 + }, { + "attributes": [ ], + "backendNodeId": 4, + "childNodeCount": 0, + "localName": "body", + "nodeId": 4, + "nodeName": "BODY", + "nodeType": 1, + "nodeValue": "", + "parentId": 2 + } ], + "frameId": "2165BBB228590EF9526B591281D561FA", + "localName": "html", + "nodeId": 2, + "nodeName": "HTML", + "nodeType": 1, + "nodeValue": "", + "parentId": 1 + } ], + "documentURL": "", + "localName": "", + "nodeId": 1, + "nodeName": "#document", + "nodeType": 9, + "nodeValue": "", + "xmlVersion": "" + } +} +[1532467540.785][DEBUG]: DEVTOOLS RESPONSE Target.setAutoAttach (id=3) { + +} +[1532467540.785][DEBUG]: DEVTOOLS RESPONSE Page.enable (id=4) { + +} +[1532467540.838][DEBUG]: DEVTOOLS EVENT Page.frameNavigated { + "frame": { + "id": "2165BBB228590EF9526B591281D561FA", + "loaderId": "87357A59CEFC5E3BF6B290BFDB83E9DC", + "mimeType": "text/plain", + "securityOrigin": "://", + "url": "data:," + } +} +[1532467540.839][DEBUG]: DEVTOOLS EVENT DOM.documentUpdated { + +} +[1532467540.839][DEBUG]: DEVTOOLS COMMAND DOM.getDocument (id=6) { + +} +[1532467540.839][DEBUG]: DEVTOOLS EVENT Page.loadEventFired { + "timestamp": 80225.121145 +} +[1532467540.839][DEBUG]: DEVTOOLS EVENT Page.frameStoppedLoading { + "frameId": "2165BBB228590EF9526B591281D561FA" +} +[1532467540.839][DEBUG]: DEVTOOLS EVENT DOM.documentUpdated { + +} +[1532467540.839][DEBUG]: DEVTOOLS COMMAND DOM.getDocument (id=7) { + +} +[1532467540.840][DEBUG]: DEVTOOLS EVENT Page.domContentEventFired { + "timestamp": 80225.124179 +} +[1532467540.843][DEBUG]: DEVTOOLS RESPONSE Page.enable (id=5) { + +} +[1532467540.849][DEBUG]: DEVTOOLS EVENT Page.frameResized { + +} +[1532467540.857][DEBUG]: DEVTOOLS RESPONSE DOM.getDocument (id=6) { + "root": { + "backendNodeId": 5, + "baseURL": "data:,", + "childNodeCount": 1, + "children": [ { + "attributes": [ ], + "backendNodeId": 6, + "childNodeCount": 2, + "children": [ { + "attributes": [ ], + "backendNodeId": 7, + "childNodeCount": 0, + "localName": "head", + "nodeId": 7, + "nodeName": "HEAD", + "nodeType": 1, + "nodeValue": "", + "parentId": 6 + }, { + "attributes": [ ], + "backendNodeId": 8, + "childNodeCount": 0, + "localName": "body", + "nodeId": 8, + "nodeName": "BODY", + "nodeType": 1, + "nodeValue": "", + "parentId": 6 + } ], + "frameId": "2165BBB228590EF9526B591281D561FA", + "localName": "html", + "nodeId": 6, + "nodeName": "HTML", + "nodeType": 1, + "nodeValue": "", + "parentId": 5 + } ], + "documentURL": "data:,", + "localName": "", + "nodeId": 5, + "nodeName": "#document", + "nodeType": 9, + "nodeValue": "", + "xmlVersion": "" + } +} +[1532467540.858][DEBUG]: DEVTOOLS RESPONSE DOM.getDocument (id=7) { + "root": { + "backendNodeId": 5, + "baseURL": "data:,", + "childNodeCount": 1, + "children": [ { + "attributes": [ ], + "backendNodeId": 6, + "childNodeCount": 2, + "children": [ { + "attributes": [ ], + "backendNodeId": 7, + "childNodeCount": 0, + "localName": "head", + "nodeId": 11, + "nodeName": "HEAD", + "nodeType": 1, + "nodeValue": "", + "parentId": 10 + }, { + "attributes": [ ], + "backendNodeId": 8, + "childNodeCount": 0, + "localName": "body", + "nodeId": 12, + "nodeName": "BODY", + "nodeType": 1, + "nodeValue": "", + "parentId": 10 + } ], + "frameId": "2165BBB228590EF9526B591281D561FA", + "localName": "html", + "nodeId": 10, + "nodeName": "HTML", + "nodeType": 1, + "nodeValue": "", + "parentId": 9 + } ], + "documentURL": "data:,", + "localName": "", + "nodeId": 9, + "nodeName": "#document", + "nodeType": 9, + "nodeValue": "", + "xmlVersion": "" + } +} +[1532467540.858][DEBUG]: DEVTOOLS COMMAND Runtime.enable (id=8) { + +} +[1532467540.898][DEBUG]: DEVTOOLS EVENT Runtime.executionContextCreated { + "context": { + "auxData": { + "frameId": "2165BBB228590EF9526B591281D561FA", + "isDefault": true + }, + "id": 1, + "name": "", + "origin": "://" + } +} +[1532467540.898][DEBUG]: DEVTOOLS RESPONSE Runtime.enable (id=8) { + +} +[1532467540.898][DEBUG]: DEVTOOLS COMMAND Page.enable (id=9) { + +} +[1532467540.927][DEBUG]: DEVTOOLS RESPONSE Page.enable (id=9) { + +} +[1532467540.927][DEBUG]: DEVTOOLS COMMAND Runtime.enable (id=10) { + +} +[1532467540.929][DEBUG]: DEVTOOLS RESPONSE Runtime.enable (id=10) { + +} +[1532467540.930][DEBUG]: DEVTOOLS COMMAND Runtime.evaluate (id=11) { + "expression": "(function() { // Copyright (c) 2012 The Chromium Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style license that can be\n// found in the LICENSE file.\n\n/**\n * Enum f...", + "returnByValue": true +} +[1532467540.948][DEBUG]: DEVTOOLS RESPONSE Runtime.evaluate (id=11) { + "result": { + "type": "object", + "value": { + "status": 0, + "value": 1 + } + } +} +[1532467540.948][INFO]: [2eb1535d1fd6d728cac89031b4094ab7] RESPONSE InitSession { + "acceptInsecureCerts": false, + "acceptSslCerts": false, + "applicationCacheEnabled": false, + "browserConnectionEnabled": false, + "browserName": "chrome", + "chrome": { + "chromedriverVersion": "2.40 (1ba6d2ec0853ea1d507bccc09f540f5ea1db0394)", + "userDataDir": "/tmp/.org.chromium.Chromium.GtPufM" + }, + "cssSelectorsEnabled": true, + "databaseEnabled": false, + "goog:chromeOptions": { + "debuggerAddress": "localhost:43221" + }, + "handlesAlerts": true, + "hasTouchScreen": false, + "javascriptEnabled": true, + "locationContextEnabled": true, + "mobileEmulationEnabled": false, + "nativeEvents": true, + "networkConnectionEnabled": false, + "pageLoadStrategy": "normal", + "platform": "Linux", + "rotatable": false, + "setWindowRect": true, + "takesHeapSnapshot": true, + "takesScreenshot": true, + "unexpectedAlertBehaviour": "", + "version": "69.0.3491.0", + "webStorageEnabled": true +} +[1532467540.950][INFO]: [2eb1535d1fd6d728cac89031b4094ab7] COMMAND Navigate { + "url": "http://127.0.0.1:43121/chromedriver/page_test.html" +} +[1532467540.950][INFO]: Waiting for pending navigations... +[1532467540.950][DEBUG]: DEVTOOLS COMMAND Runtime.evaluate (id=12) { + "expression": "1" +} +[1532467540.961][DEBUG]: DEVTOOLS RESPONSE Runtime.evaluate (id=12) { + "result": { + "description": "1", + "type": "number", + "value": 1 + } +} +[1532467540.962][INFO]: Done waiting for pending navigations. Status: ok +[1532467540.962][DEBUG]: DEVTOOLS COMMAND Page.navigate (id=13) { + "url": "http://127.0.0.1:43121/chromedriver/page_test.html" +} +[1532467541.270][DEBUG]: DEVTOOLS RESPONSE Page.navigate (id=13) { + "frameId": "2165BBB228590EF9526B591281D561FA", + "loaderId": "C2CC89F045EA33A697A57AD43F923173" +} +[1532467541.271][DEBUG]: DEVTOOLS COMMAND Runtime.evaluate (id=14) { + "expression": "document.URL" +} +[1532467541.281][DEBUG]: DEVTOOLS EVENT Runtime.executionContextsCleared { + +} +[1532467541.298][DEBUG]: DEVTOOLS EVENT Page.frameStartedLoading { + "frameId": "2165BBB228590EF9526B591281D561FA" +} +[260390:260390:0724/142541.341743:ERROR:render_process_impl.cc(208)] WebFrame LEAKED 1 TIMES +[1532467541.354][DEBUG]: DEVTOOLS EVENT Runtime.executionContextsCleared { + +} +[1532467541.355][DEBUG]: DEVTOOLS EVENT Page.frameNavigated { + "frame": { + "id": "2165BBB228590EF9526B591281D561FA", + "loaderId": "C2CC89F045EA33A697A57AD43F923173", + "mimeType": "text/html", + "securityOrigin": "http://127.0.0.1:43121", + "url": "http://127.0.0.1:43121/chromedriver/page_test.html" + } +} +[1532467541.355][DEBUG]: DEVTOOLS EVENT Runtime.executionContextCreated { + "context": { + "auxData": { + "frameId": "2165BBB228590EF9526B591281D561FA", + "isDefault": true + }, + "id": 1, + "name": "", + "origin": "http://127.0.0.1:43121" + } +} +[1532467541.355][DEBUG]: DEVTOOLS EVENT DOM.documentUpdated { + +} +[1532467541.355][DEBUG]: DEVTOOLS COMMAND DOM.getDocument (id=15) { + +} +[1532467541.412][DEBUG]: DEVTOOLS EVENT Page.loadEventFired { + "timestamp": 80225.679446 +} +[1532467541.412][DEBUG]: DEVTOOLS EVENT Page.frameStoppedLoading { + "frameId": "2165BBB228590EF9526B591281D561FA" +} +[1532467541.412][DEBUG]: DEVTOOLS EVENT DOM.documentUpdated { + +} +[1532467541.412][DEBUG]: DEVTOOLS COMMAND DOM.getDocument (id=16) { + +} +[1532467541.413][DEBUG]: DEVTOOLS EVENT Page.domContentEventFired { + "timestamp": 80225.703702 +} +[1532467541.413][DEBUG]: DEVTOOLS RESPONSE Runtime.evaluate (id=14) { + "result": { + "type": "string", + "value": "http://127.0.0.1:43121/chromedriver/page_test.html" + } +} +[1532467541.420][DEBUG]: DEVTOOLS RESPONSE DOM.getDocument (id=15) { + "root": { + "backendNodeId": 1, + "baseURL": "http://127.0.0.1:43121/chromedriver/page_test.html", + "childNodeCount": 1, + "children": [ { + "attributes": [ ], + "backendNodeId": 2, + "childNodeCount": 2, + "children": [ { + "attributes": [ ], + "backendNodeId": 3, + "childNodeCount": 2, + "localName": "head", + "nodeId": 3, + "nodeName": "HEAD", + "nodeType": 1, + "nodeValue": "", + "parentId": 2 + }, { + "attributes": [ ], + "backendNodeId": 4, + "childNodeCount": 1, + "localName": "body", + "nodeId": 4, + "nodeName": "BODY", + "nodeType": 1, + "nodeValue": "", + "parentId": 2 + } ], + "frameId": "2165BBB228590EF9526B591281D561FA", + "localName": "html", + "nodeId": 2, + "nodeName": "HTML", + "nodeType": 1, + "nodeValue": "", + "parentId": 1 + } ], + "documentURL": "http://127.0.0.1:43121/chromedriver/page_test.html", + "localName": "", + "nodeId": 1, + "nodeName": "#document", + "nodeType": 9, + "nodeValue": "", + "xmlVersion": "" + } +} +[1532467541.439][DEBUG]: DEVTOOLS RESPONSE DOM.getDocument (id=16) { + "root": { + "backendNodeId": 1, + "baseURL": "http://127.0.0.1:43121/chromedriver/page_test.html", + "childNodeCount": 1, + "children": [ { + "attributes": [ ], + "backendNodeId": 2, + "childNodeCount": 2, + "children": [ { + "attributes": [ ], + "backendNodeId": 3, + "childNodeCount": 2, + "localName": "head", + "nodeId": 7, + "nodeName": "HEAD", + "nodeType": 1, + "nodeValue": "", + "parentId": 6 + }, { + "attributes": [ ], + "backendNodeId": 4, + "childNodeCount": 1, + "localName": "body", + "nodeId": 8, + "nodeName": "BODY", + "nodeType": 1, + "nodeValue": "", + "parentId": 6 + } ], + "frameId": "2165BBB228590EF9526B591281D561FA", + "localName": "html", + "nodeId": 6, + "nodeName": "HTML", + "nodeType": 1, + "nodeValue": "", + "parentId": 5 + } ], + "documentURL": "http://127.0.0.1:43121/chromedriver/page_test.html", + "localName": "", + "nodeId": 5, + "nodeName": "#document", + "nodeType": 9, + "nodeValue": "", + "xmlVersion": "" + } +} +[1532467541.439][INFO]: Waiting for pending navigations... +[1532467541.439][DEBUG]: DEVTOOLS EVENT Log.entryAdded { + "entry": { + "level": "error", + "networkRequestId": "1000260427.2", + "source": "network", + "text": "Failed to load resource: the server responded with a status of 404 (Not Found)", + "timestamp": 1532467541429.19, + "url": "http://127.0.0.1:43121/favicon.ico" + } +} +[1532467541.439][DEBUG]: DEVTOOLS COMMAND Runtime.evaluate (id=17) { + "expression": "1" +} +[1532467541.451][DEBUG]: DEVTOOLS RESPONSE Runtime.evaluate (id=17) { + "result": { + "description": "1", + "type": "number", + "value": 1 + } +} +[1532467541.451][INFO]: Done waiting for pending navigations. Status: ok +[1532467541.451][INFO]: [2eb1535d1fd6d728cac89031b4094ab7] RESPONSE Navigate +[1532467541.452][INFO]: [2eb1535d1fd6d728cac89031b4094ab7] COMMAND GetWindows { + +} +[1532467541.452][DEBUG]: DevTools request: http://localhost:43221/json +[1532467541.454][DEBUG]: DevTools response: [ { + "description": "", + "devtoolsFrontendUrl": "/devtools/inspector.html?ws=localhost:43221/devtools/page/A2A7F36945178A7478F210B1A3949B3D", + "id": "A2A7F36945178A7478F210B1A3949B3D", + "title": "Chrome Automation Extension", + "type": "background_page", + "url": "chrome-extension://aapnijgdinlhnhlmodcfapnahmbfebeb/_generated_background_page.html", + "webSocketDebuggerUrl": "ws://localhost:43221/devtools/page/A2A7F36945178A7478F210B1A3949B3D" +}, { + "description": "", + "devtoolsFrontendUrl": "/devtools/inspector.html?ws=localhost:43221/devtools/page/2165BBB228590EF9526B591281D561FA", + "id": "2165BBB228590EF9526B591281D561FA", + "title": "page test", + "type": "page", + "url": "http://127.0.0.1:43121/chromedriver/page_test.html", + "webSocketDebuggerUrl": "ws://localhost:43221/devtools/page/2165BBB228590EF9526B591281D561FA" +} ] + +[1532467541.455][INFO]: [2eb1535d1fd6d728cac89031b4094ab7] RESPONSE GetWindows [ "CDwindow-2165BBB228590EF9526B591281D561FA" ] +[1532467541.456][INFO]: [2eb1535d1fd6d728cac89031b4094ab7] COMMAND FindElement { + "using": "id", + "value": "link" +} +[1532467541.456][INFO]: Waiting for pending navigations... +[1532467541.456][DEBUG]: DEVTOOLS COMMAND Runtime.evaluate (id=18) { + "expression": "1" +} +[1532467541.471][DEBUG]: DEVTOOLS RESPONSE Runtime.evaluate (id=18) { + "result": { + "description": "1", + "type": "number", + "value": 1 + } +} +[1532467541.471][INFO]: Done waiting for pending navigations. Status: ok +[1532467541.475][DEBUG]: DEVTOOLS COMMAND Runtime.evaluate (id=19) { + "expression": "(function() { // Copyright (c) 2012 The Chromium Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style license that can be\n// found in the LICENSE file.\n\n/**\n * Enum f...", + "returnByValue": true +} +[1532467541.509][DEBUG]: DEVTOOLS RESPONSE Runtime.evaluate (id=19) { + "result": { + "type": "object", + "value": { + "status": 0, + "value": { + "ELEMENT": "0.32238395126217667-1" + } + } + } +} +[1532467541.509][INFO]: Waiting for pending navigations... +[1532467541.509][DEBUG]: DEVTOOLS COMMAND Runtime.evaluate (id=20) { + "expression": "1" +} +[1532467541.521][DEBUG]: DEVTOOLS RESPONSE Runtime.evaluate (id=20) { + "result": { + "description": "1", + "type": "number", + "value": 1 + } +} +[1532467541.521][INFO]: Done waiting for pending navigations. Status: ok +[1532467541.521][INFO]: [2eb1535d1fd6d728cac89031b4094ab7] RESPONSE FindElement { + "ELEMENT": "0.32238395126217667-1" +} +[1532467541.523][INFO]: [2eb1535d1fd6d728cac89031b4094ab7] COMMAND ClickElement { + "id": "0.32238395126217667-1" +} +[1532467541.523][INFO]: Waiting for pending navigations... +[1532467541.523][DEBUG]: DEVTOOLS COMMAND Runtime.evaluate (id=21) { + "expression": "1" +} +[1532467541.524][DEBUG]: DEVTOOLS RESPONSE Runtime.evaluate (id=21) { + "result": { + "description": "1", + "type": "number", + "value": 1 + } +} +[1532467541.524][INFO]: Done waiting for pending navigations. Status: ok +[1532467541.525][DEBUG]: DEVTOOLS COMMAND Runtime.evaluate (id=22) { + "expression": "(function() { // Copyright (c) 2012 The Chromium Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style license that can be\n// found in the LICENSE file.\n\n/**\n * Enum f...", + "returnByValue": true +} +[1532467541.530][DEBUG]: DEVTOOLS RESPONSE Runtime.evaluate (id=22) { + "result": { + "type": "object", + "value": { + "status": 0, + "value": "a" + } + } +} +[1532467541.531][DEBUG]: DEVTOOLS COMMAND Runtime.evaluate (id=23) { + "expression": "(function() { // Copyright (c) 2012 The Chromium Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style license that can be\n// found in the LICENSE file.\n\n/**\n * Enum f...", + "returnByValue": true +} +[1532467541.534][DEBUG]: DEVTOOLS RESPONSE Runtime.evaluate (id=23) { + "result": { + "type": "object", + "value": { + "status": 0, + "value": "a" + } + } +} +[1532467541.538][DEBUG]: DEVTOOLS COMMAND Runtime.evaluate (id=24) { + "expression": "(function() { // Copyright (c) 2012 The Chromium Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style license that can be\n// found in the LICENSE file.\n\n/**\n * Enum f...", + "returnByValue": true +} +[1532467541.567][DEBUG]: DEVTOOLS RESPONSE Runtime.evaluate (id=24) { + "result": { + "type": "object", + "value": { + "status": 0, + "value": true + } + } +} +[1532467541.568][DEBUG]: DEVTOOLS COMMAND Runtime.evaluate (id=25) { + "expression": "(function() { // Copyright (c) 2012 The Chromium Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style license that can be\n// found in the LICENSE file.\n\n/**\n * Enum f...", + "returnByValue": true +} +[1532467541.575][DEBUG]: DEVTOOLS RESPONSE Runtime.evaluate (id=25) { + "result": { + "type": "object", + "value": { + "status": 0, + "value": { + "height": 17, + "left": 0, + "top": 0, + "width": 122.953125 + } + } + } +} +[1532467541.578][DEBUG]: DEVTOOLS COMMAND Runtime.evaluate (id=26) { + "expression": "(function() { // Copyright (c) 2012 The Chromium Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style license that can be\n// found in the LICENSE file.\n\n/**\n * Enum f...", + "returnByValue": true +} +[1532467541.600][DEBUG]: DEVTOOLS RESPONSE Runtime.evaluate (id=26) { + "result": { + "type": "object", + "value": { + "status": 0, + "value": { + "ceil": { + + }, + "clone": { + + }, + "floor": { + + }, + "round": { + + }, + "scale": { + + }, + "toString": { + + }, + "translate": { + + }, + "x": 8, + "y": 8 + } + } + } +} +[1532467541.603][DEBUG]: DEVTOOLS COMMAND Runtime.evaluate (id=27) { + "expression": "(function() { // Copyright (c) 2012 The Chromium Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style license that can be\n// found in the LICENSE file.\n\n/**\n * Enum f...", + "returnByValue": true +} +[1532467541.620][DEBUG]: DEVTOOLS RESPONSE Runtime.evaluate (id=27) { + "result": { + "type": "object", + "value": { + "status": 0, + "value": { + "clickable": true + } + } + } +} +[1532467541.620][DEBUG]: DEVTOOLS COMMAND Input.dispatchMouseEvent (id=28) { + "button": "none", + "clickCount": 0, + "modifiers": 0, + "type": "mouseMoved", + "x": 69, + "y": 16 +} +[1532467541.626][DEBUG]: DEVTOOLS RESPONSE Input.dispatchMouseEvent (id=28) { + +} +[1532467541.626][DEBUG]: DEVTOOLS COMMAND Input.dispatchMouseEvent (id=29) { + "button": "left", + "clickCount": 1, + "modifiers": 0, + "type": "mousePressed", + "x": 69, + "y": 16 +} +[1532467541.634][DEBUG]: DEVTOOLS RESPONSE Input.dispatchMouseEvent (id=29) { + +} +[1532467541.634][DEBUG]: DEVTOOLS COMMAND Input.dispatchMouseEvent (id=30) { + "button": "left", + "clickCount": 1, + "modifiers": 0, + "type": "mouseReleased", + "x": 69, + "y": 16 +} +[1532467541.741][DEBUG]: DEVTOOLS RESPONSE Input.dispatchMouseEvent (id=30) { + +} +[1532467541.741][INFO]: Waiting for pending navigations... +[1532467541.741][DEBUG]: DEVTOOLS COMMAND Runtime.evaluate (id=31) { + "expression": "1" +} +[1532467541.743][DEBUG]: DEVTOOLS EVENT Page.windowOpen { + "url": "http://127.0.0.1:43121/chromedriver/empty.html", + "userGesture": true, + "windowFeatures": [ "menubar", "toolbar", "status", "scrollbars", "resizable" ], + "windowName": "_blank" +} +[1532467541.756][DEBUG]: DEVTOOLS RESPONSE Runtime.evaluate (id=31) { + "result": { + "description": "1", + "type": "number", + "value": 1 + } +} +[1532467541.756][INFO]: Done waiting for pending navigations. Status: ok +[1532467541.756][INFO]: [2eb1535d1fd6d728cac89031b4094ab7] RESPONSE ClickElement +[1532467541.758][INFO]: [2eb1535d1fd6d728cac89031b4094ab7] COMMAND GetWindows { + +} +[1532467541.758][DEBUG]: DevTools request: http://localhost:43221/json +[1532467541.760][DEBUG]: DevTools response: [ { + "description": "", + "devtoolsFrontendUrl": "/devtools/inspector.html?ws=localhost:43221/devtools/page/46E7CDA7D8FC22984F402412B5E42C39", + "id": "46E7CDA7D8FC22984F402412B5E42C39", + "title": "", + "type": "page", + "url": "http://127.0.0.1:43121/chromedriver/empty.html", + "webSocketDebuggerUrl": "ws://localhost:43221/devtools/page/46E7CDA7D8FC22984F402412B5E42C39" +}, { + "description": "", + "devtoolsFrontendUrl": "/devtools/inspector.html?ws=localhost:43221/devtools/page/A2A7F36945178A7478F210B1A3949B3D", + "id": "A2A7F36945178A7478F210B1A3949B3D", + "title": "Chrome Automation Extension", + "type": "background_page", + "url": "chrome-extension://aapnijgdinlhnhlmodcfapnahmbfebeb/_generated_background_page.html", + "webSocketDebuggerUrl": "ws://localhost:43221/devtools/page/A2A7F36945178A7478F210B1A3949B3D" +}, { + "description": "", + "devtoolsFrontendUrl": "/devtools/inspector.html?ws=localhost:43221/devtools/page/2165BBB228590EF9526B591281D561FA", + "id": "2165BBB228590EF9526B591281D561FA", + "title": "page test", + "type": "page", + "url": "http://127.0.0.1:43121/chromedriver/page_test.html", + "webSocketDebuggerUrl": "ws://localhost:43221/devtools/page/2165BBB228590EF9526B591281D561FA" +} ] + +[1532467541.760][INFO]: [2eb1535d1fd6d728cac89031b4094ab7] RESPONSE GetWindows [ "CDwindow-2165BBB228590EF9526B591281D561FA", "CDwindow-46E7CDA7D8FC22984F402412B5E42C39" ] +[1532467541.762][INFO]: [2eb1535d1fd6d728cac89031b4094ab7] COMMAND SwitchToWindow { + "name": "CDwindow-46E7CDA7D8FC22984F402412B5E42C39" +} +[1532467541.762][DEBUG]: DevTools request: http://localhost:43221/json +[1532467541.765][DEBUG]: DevTools response: [ { + "description": "", + "devtoolsFrontendUrl": "/devtools/inspector.html?ws=localhost:43221/devtools/page/46E7CDA7D8FC22984F402412B5E42C39", + "id": "46E7CDA7D8FC22984F402412B5E42C39", + "title": "", + "type": "page", + "url": "http://127.0.0.1:43121/chromedriver/empty.html", + "webSocketDebuggerUrl": "ws://localhost:43221/devtools/page/46E7CDA7D8FC22984F402412B5E42C39" +}, { + "description": "", + "devtoolsFrontendUrl": "/devtools/inspector.html?ws=localhost:43221/devtools/page/A2A7F36945178A7478F210B1A3949B3D", + "id": "A2A7F36945178A7478F210B1A3949B3D", + "title": "Chrome Automation Extension", + "type": "background_page", + "url": "chrome-extension://aapnijgdinlhnhlmodcfapnahmbfebeb/_generated_background_page.html", + "webSocketDebuggerUrl": "ws://localhost:43221/devtools/page/A2A7F36945178A7478F210B1A3949B3D" +}, { + "description": "", + "devtoolsFrontendUrl": "/devtools/inspector.html?ws=localhost:43221/devtools/page/2165BBB228590EF9526B591281D561FA", + "id": "2165BBB228590EF9526B591281D561FA", + "title": "page test", + "type": "page", + "url": "http://127.0.0.1:43121/chromedriver/page_test.html", + "webSocketDebuggerUrl": "ws://localhost:43221/devtools/page/2165BBB228590EF9526B591281D561FA" +} ] + +[1532467541.766][DEBUG]: DevTools request: http://localhost:43221/json/activate/46E7CDA7D8FC22984F402412B5E42C39 +[1532467541.803][DEBUG]: DevTools response: Target activated +[1532467541.803][INFO]: [2eb1535d1fd6d728cac89031b4094ab7] RESPONSE SwitchToWindow +[1532467541.804][INFO]: [2eb1535d1fd6d728cac89031b4094ab7] COMMAND GetWindow { + +} +[1532467541.804][INFO]: [2eb1535d1fd6d728cac89031b4094ab7] RESPONSE GetWindow "CDwindow-46E7CDA7D8FC22984F402412B5E42C39" +[1532467541.805][INFO]: [2eb1535d1fd6d728cac89031b4094ab7] COMMAND FindElement { + "using": "id", + "value": "link" +} +[1532467541.806][INFO]: resolved localhost to ["::1","127.0.0.1"] +[1532467541.841][DEBUG]: DEVTOOLS COMMAND Log.enable (id=1) { + +} +[1532467541.842][DEBUG]: DEVTOOLS COMMAND DOM.getDocument (id=2) { + +} +[1532467541.842][DEBUG]: DEVTOOLS COMMAND Target.setAutoAttach (id=3) { + "autoAttach": true, + "waitForDebuggerOnStart": false +} +[1532467541.842][DEBUG]: DEVTOOLS COMMAND Page.enable (id=4) { + +} +[1532467541.842][DEBUG]: DEVTOOLS COMMAND Page.enable (id=5) { + +} +[1532467541.846][DEBUG]: DEVTOOLS RESPONSE Log.enable (id=1) { + +} +[1532467541.847][DEBUG]: DEVTOOLS RESPONSE DOM.getDocument (id=2) { + "root": { + "backendNodeId": 6, + "baseURL": "http://127.0.0.1:43121/chromedriver/empty.html", + "childNodeCount": 1, + "children": [ { + "attributes": [ ], + "backendNodeId": 7, + "childNodeCount": 2, + "children": [ { + "attributes": [ ], + "backendNodeId": 8, + "childNodeCount": 0, + "localName": "head", + "nodeId": 3, + "nodeName": "HEAD", + "nodeType": 1, + "nodeValue": "", + "parentId": 2 + }, { + "attributes": [ ], + "backendNodeId": 9, + "childNodeCount": 0, + "children": [ { + "backendNodeId": 10, + "localName": "", + "nodeId": 5, + "nodeName": "#text", + "nodeType": 3, + "nodeValue": "\n", + "parentId": 4 + } ], + "localName": "body", + "nodeId": 4, + "nodeName": "BODY", + "nodeType": 1, + "nodeValue": "", + "parentId": 2 + } ], + "frameId": "46E7CDA7D8FC22984F402412B5E42C39", + "localName": "html", + "nodeId": 2, + "nodeName": "HTML", + "nodeType": 1, + "nodeValue": "", + "parentId": 1 + } ], + "documentURL": "http://127.0.0.1:43121/chromedriver/empty.html", + "localName": "", + "nodeId": 1, + "nodeName": "#document", + "nodeType": 9, + "nodeValue": "", + "xmlVersion": "" + } +} +[1532467541.860][DEBUG]: DEVTOOLS RESPONSE Target.setAutoAttach (id=3) { + +} +[1532467541.861][DEBUG]: DEVTOOLS RESPONSE Page.enable (id=4) { + +} +[1532467541.861][DEBUG]: DEVTOOLS RESPONSE Page.enable (id=5) { + +} +[1532467541.861][DEBUG]: DEVTOOLS COMMAND Runtime.enable (id=6) { + +} +[1532467541.896][DEBUG]: DEVTOOLS EVENT Runtime.executionContextCreated { + "context": { + "auxData": { + "frameId": "46E7CDA7D8FC22984F402412B5E42C39", + "isDefault": true + }, + "id": 2, + "name": "", + "origin": "http://127.0.0.1:43121" + } +} +[1532467541.897][DEBUG]: DEVTOOLS RESPONSE Runtime.enable (id=6) { + +} +[1532467541.897][DEBUG]: DEVTOOLS COMMAND Page.enable (id=7) { + +} +[1532467541.906][DEBUG]: DEVTOOLS RESPONSE Page.enable (id=7) { + +} +[1532467541.906][DEBUG]: DEVTOOLS COMMAND Runtime.enable (id=8) { + +} +[1532467541.907][DEBUG]: DEVTOOLS RESPONSE Runtime.enable (id=8) { + +} +[1532467541.907][INFO]: Waiting for pending navigations... +[1532467541.907][DEBUG]: DEVTOOLS COMMAND Runtime.evaluate (id=9) { + "expression": "1" +} +[1532467541.910][DEBUG]: DEVTOOLS RESPONSE Runtime.evaluate (id=9) { + "result": { + "description": "1", + "type": "number", + "value": 1 + } +} +[1532467541.910][DEBUG]: DEVTOOLS COMMAND DOM.getDocument (id=10) { + +} +[1532467541.915][DEBUG]: DEVTOOLS RESPONSE DOM.getDocument (id=10) { + "root": { + "backendNodeId": 6, + "baseURL": "http://127.0.0.1:43121/chromedriver/empty.html", + "childNodeCount": 1, + "children": [ { + "attributes": [ ], + "backendNodeId": 7, + "childNodeCount": 2, + "children": [ { + "attributes": [ ], + "backendNodeId": 8, + "childNodeCount": 0, + "localName": "head", + "nodeId": 8, + "nodeName": "HEAD", + "nodeType": 1, + "nodeValue": "", + "parentId": 7 + }, { + "attributes": [ ], + "backendNodeId": 9, + "childNodeCount": 0, + "children": [ { + "backendNodeId": 10, + "localName": "", + "nodeId": 10, + "nodeName": "#text", + "nodeType": 3, + "nodeValue": "\n", + "parentId": 9 + } ], + "localName": "body", + "nodeId": 9, + "nodeName": "BODY", + "nodeType": 1, + "nodeValue": "", + "parentId": 7 + } ], + "frameId": "46E7CDA7D8FC22984F402412B5E42C39", + "localName": "html", + "nodeId": 7, + "nodeName": "HTML", + "nodeType": 1, + "nodeValue": "", + "parentId": 6 + } ], + "documentURL": "http://127.0.0.1:43121/chromedriver/empty.html", + "localName": "", + "nodeId": 6, + "nodeName": "#document", + "nodeType": 9, + "nodeValue": "", + "xmlVersion": "" + } +} +[1532467541.915][DEBUG]: DEVTOOLS COMMAND Runtime.evaluate (id=11) { + "expression": "var frame = document.createElement('iframe');frame.name = 'chromedriver dummy frame';frame.src = 'about:blank';document.body.appendChild(frame);window.setTimeout(function() { document.body.removeC..." +} +[1532467541.924][DEBUG]: DEVTOOLS EVENT DOM.childNodeInserted { + "node": { + "attributes": [ "name", "chromedriver dummy frame", "src", "about:blank" ], + "backendNodeId": 11, + "childNodeCount": 0, + "localName": "iframe", + "nodeId": 11, + "nodeName": "IFRAME", + "nodeType": 1, + "nodeValue": "" + }, + "parentNodeId": 9, + "previousNodeId": 0 +} +[1532467541.925][DEBUG]: DEVTOOLS EVENT Page.frameAttached { + "frameId": "97822749DD79632E66D09E6083EA250C", + "parentFrameId": "46E7CDA7D8FC22984F402412B5E42C39", + "stack": { + "callFrames": [ { + "columnNumber": 125, + "functionName": "", + "lineNumber": 0, + "scriptId": "26", + "url": "" + } ] + } +} +[1532467541.950][DEBUG]: DEVTOOLS EVENT Page.frameStartedLoading { + "frameId": "97822749DD79632E66D09E6083EA250C" +} +[1532467541.951][DEBUG]: DEVTOOLS EVENT Page.frameNavigated { + "frame": { + "id": "97822749DD79632E66D09E6083EA250C", + "loaderId": "6335990D6F6E01C965932D2DBB45A868", + "mimeType": "text/html", + "name": "chromedriver dummy frame", + "parentId": "46E7CDA7D8FC22984F402412B5E42C39", + "securityOrigin": "://", + "url": "about:blank" + } +} +[1532467541.951][DEBUG]: DEVTOOLS EVENT DOM.childNodeRemoved { + "nodeId": 11, + "parentNodeId": 9 +} +[1532467541.951][DEBUG]: DEVTOOLS EVENT DOM.childNodeInserted { + "node": { + "attributes": [ "name", "chromedriver dummy frame", "src", "about:blank" ], + "backendNodeId": 11, + "childNodeCount": 0, + "contentDocument": { + "backendNodeId": 12, + "baseURL": "http://127.0.0.1:43121/chromedriver/empty.html", + "childNodeCount": 0, + "documentURL": "about:blank", + "localName": "", + "nodeId": 13, + "nodeName": "#document", + "nodeType": 9, + "nodeValue": "", + "xmlVersion": "" + }, + "frameId": "97822749DD79632E66D09E6083EA250C", + "localName": "iframe", + "nodeId": 12, + "nodeName": "IFRAME", + "nodeType": 1, + "nodeValue": "" + }, + "parentNodeId": 9, + "previousNodeId": 0 +} +[1532467541.951][DEBUG]: DEVTOOLS EVENT Runtime.executionContextCreated { + "context": { + "auxData": { + "frameId": "97822749DD79632E66D09E6083EA250C", + "isDefault": true + }, + "id": 3, + "name": "", + "origin": "http://127.0.0.1:43121" + } +} +[1532467541.951][DEBUG]: DEVTOOLS EVENT DOM.childNodeCountUpdated { + "childNodeCount": 1, + "nodeId": 13 +} +[1532467541.952][DEBUG]: DEVTOOLS EVENT Page.frameStoppedLoading { + "frameId": "97822749DD79632E66D09E6083EA250C" +} +[1532467541.952][DEBUG]: DEVTOOLS RESPONSE Runtime.evaluate (id=11) { + "result": { + "description": "1", + "type": "number", + "value": 1 + } +} +[1532467541.952][INFO]: Done waiting for pending navigations. Status: ok +[1532467541.955][DEBUG]: DEVTOOLS COMMAND Runtime.evaluate (id=12) { + "expression": "(function() { // Copyright (c) 2012 The Chromium Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style license that can be\n// found in the LICENSE file.\n\n/**\n * Enum f...", + "returnByValue": true +} +[1532467541.981][DEBUG]: DEVTOOLS EVENT DOM.childNodeRemoved { + "nodeId": 12, + "parentNodeId": 9 +} +[1532467541.981][DEBUG]: DEVTOOLS EVENT Runtime.executionContextDestroyed { + "executionContextId": 3 +} +[1532467541.981][DEBUG]: DEVTOOLS EVENT Page.frameDetached { + "frameId": "97822749DD79632E66D09E6083EA250C" +} +[1532467541.984][DEBUG]: DEVTOOLS RESPONSE Runtime.evaluate (id=12) { + "result": { + "type": "object", + "value": { + "status": 0, + "value": null + } + } +} +[1532467542.016][DEBUG]: DEVTOOLS COMMAND Runtime.evaluate (id=13) { + "expression": "1" +} +[1532467542.019][DEBUG]: DEVTOOLS RESPONSE Runtime.evaluate (id=13) { + "result": { + "description": "1", + "type": "number", + "value": 1 + } +} +[1532467542.019][INFO]: Waiting for pending navigations... +[1532467542.019][DEBUG]: DEVTOOLS COMMAND Runtime.evaluate (id=14) { + "expression": "1" +} +[1532467542.020][DEBUG]: DEVTOOLS RESPONSE Runtime.evaluate (id=14) { + "result": { + "description": "1", + "type": "number", + "value": 1 + } +} +[1532467542.020][INFO]: Done waiting for pending navigations. Status: ok +[1532467542.020][INFO]: [2eb1535d1fd6d728cac89031b4094ab7] RESPONSE FindElement ERROR no such element: Unable to locate element: {"method":"id","selector":"link"} + (Session info: chrome=69.0.3491.0) +[1532467542.022][INFO]: [2eb1535d1fd6d728cac89031b4094ab7] COMMAND CloseWindow { + +} +[1532467542.022][DEBUG]: DevTools request: http://localhost:43221/json +[1532467542.023][DEBUG]: DevTools response: [ { + "description": "", + "devtoolsFrontendUrl": "/devtools/inspector.html?ws=localhost:43221/devtools/page/46E7CDA7D8FC22984F402412B5E42C39", + "id": "46E7CDA7D8FC22984F402412B5E42C39", + "title": "127.0.0.1:43121/chromedriver/empty.html", + "type": "page", + "url": "http://127.0.0.1:43121/chromedriver/empty.html", + "webSocketDebuggerUrl": "ws://localhost:43221/devtools/page/46E7CDA7D8FC22984F402412B5E42C39" +}, { + "description": "", + "devtoolsFrontendUrl": "/devtools/inspector.html?ws=localhost:43221/devtools/page/A2A7F36945178A7478F210B1A3949B3D", + "id": "A2A7F36945178A7478F210B1A3949B3D", + "title": "Chrome Automation Extension", + "type": "background_page", + "url": "chrome-extension://aapnijgdinlhnhlmodcfapnahmbfebeb/_generated_background_page.html", + "webSocketDebuggerUrl": "ws://localhost:43221/devtools/page/A2A7F36945178A7478F210B1A3949B3D" +}, { + "description": "", + "devtoolsFrontendUrl": "/devtools/inspector.html?ws=localhost:43221/devtools/page/2165BBB228590EF9526B591281D561FA", + "id": "2165BBB228590EF9526B591281D561FA", + "title": "page test", + "type": "page", + "url": "http://127.0.0.1:43121/chromedriver/page_test.html", + "webSocketDebuggerUrl": "ws://localhost:43221/devtools/page/2165BBB228590EF9526B591281D561FA" +} ] + +[1532467542.024][DEBUG]: DevTools request: http://localhost:43221/json/close/46E7CDA7D8FC22984F402412B5E42C39 +[1532467542.025][DEBUG]: DevTools response: Target is closing +[1532467542.025][DEBUG]: DevTools request: http://localhost:43221/json +[1532467542.078][DEBUG]: DevTools response: [ { + "description": "", + "devtoolsFrontendUrl": "/devtools/inspector.html?ws=localhost:43221/devtools/page/2165BBB228590EF9526B591281D561FA", + "id": "2165BBB228590EF9526B591281D561FA", + "title": "page test", + "type": "page", + "url": "http://127.0.0.1:43121/chromedriver/page_test.html", + "webSocketDebuggerUrl": "ws://localhost:43221/devtools/page/2165BBB228590EF9526B591281D561FA" +}, { + "description": "", + "devtoolsFrontendUrl": "/devtools/inspector.html?ws=localhost:43221/devtools/page/A2A7F36945178A7478F210B1A3949B3D", + "id": "A2A7F36945178A7478F210B1A3949B3D", + "title": "Chrome Automation Extension", + "type": "background_page", + "url": "chrome-extension://aapnijgdinlhnhlmodcfapnahmbfebeb/_generated_background_page.html", + "webSocketDebuggerUrl": "ws://localhost:43221/devtools/page/A2A7F36945178A7478F210B1A3949B3D" +} ] + +[1532467542.078][DEBUG]: DevTools request: http://localhost:43221/json +[1532467542.093][DEBUG]: DevTools response: [ { + "description": "", + "devtoolsFrontendUrl": "/devtools/inspector.html?ws=localhost:43221/devtools/page/2165BBB228590EF9526B591281D561FA", + "id": "2165BBB228590EF9526B591281D561FA", + "title": "page test", + "type": "page", + "url": "http://127.0.0.1:43121/chromedriver/page_test.html", + "webSocketDebuggerUrl": "ws://localhost:43221/devtools/page/2165BBB228590EF9526B591281D561FA" +}, { + "description": "", + "devtoolsFrontendUrl": "/devtools/inspector.html?ws=localhost:43221/devtools/page/A2A7F36945178A7478F210B1A3949B3D", + "id": "A2A7F36945178A7478F210B1A3949B3D", + "title": "Chrome Automation Extension", + "type": "background_page", + "url": "chrome-extension://aapnijgdinlhnhlmodcfapnahmbfebeb/_generated_background_page.html", + "webSocketDebuggerUrl": "ws://localhost:43221/devtools/page/A2A7F36945178A7478F210B1A3949B3D" +} ] + +[1532467542.094][INFO]: [2eb1535d1fd6d728cac89031b4094ab7] RESPONSE CloseWindow [ "CDwindow-2165BBB228590EF9526B591281D561FA" ] +[1532467542.095][INFO]: [2eb1535d1fd6d728cac89031b4094ab7] COMMAND GetWindow { + +} +[1532467542.135][INFO]: [2eb1535d1fd6d728cac89031b4094ab7] RESPONSE GetWindow ERROR no such window: target window already closed +from unknown error: web view not found + (Session info: chrome=69.0.3491.0) +[1532467542.136][INFO]: [2eb1535d1fd6d728cac89031b4094ab7] COMMAND GetWindows { + +} +[1532467542.136][DEBUG]: DevTools request: http://localhost:43221/json +[1532467542.144][DEBUG]: DevTools response: [ { + "description": "", + "devtoolsFrontendUrl": "/devtools/inspector.html?ws=localhost:43221/devtools/page/2165BBB228590EF9526B591281D561FA", + "id": "2165BBB228590EF9526B591281D561FA", + "title": "page test", + "type": "page", + "url": "http://127.0.0.1:43121/chromedriver/page_test.html", + "webSocketDebuggerUrl": "ws://localhost:43221/devtools/page/2165BBB228590EF9526B591281D561FA" +}, { + "description": "", + "devtoolsFrontendUrl": "/devtools/inspector.html?ws=localhost:43221/devtools/page/A2A7F36945178A7478F210B1A3949B3D", + "id": "A2A7F36945178A7478F210B1A3949B3D", + "title": "Chrome Automation Extension", + "type": "background_page", + "url": "chrome-extension://aapnijgdinlhnhlmodcfapnahmbfebeb/_generated_background_page.html", + "webSocketDebuggerUrl": "ws://localhost:43221/devtools/page/A2A7F36945178A7478F210B1A3949B3D" +} ] + +[1532467542.144][INFO]: [2eb1535d1fd6d728cac89031b4094ab7] RESPONSE GetWindows [ "CDwindow-2165BBB228590EF9526B591281D561FA" ] +[1532467542.146][INFO]: [2eb1535d1fd6d728cac89031b4094ab7] COMMAND SwitchToWindow { + "name": "CDwindow-2165BBB228590EF9526B591281D561FA" +} +[1532467542.146][DEBUG]: DevTools request: http://localhost:43221/json +[1532467542.147][DEBUG]: DevTools response: [ { + "description": "", + "devtoolsFrontendUrl": "/devtools/inspector.html?ws=localhost:43221/devtools/page/2165BBB228590EF9526B591281D561FA", + "id": "2165BBB228590EF9526B591281D561FA", + "title": "page test", + "type": "page", + "url": "http://127.0.0.1:43121/chromedriver/page_test.html", + "webSocketDebuggerUrl": "ws://localhost:43221/devtools/page/2165BBB228590EF9526B591281D561FA" +}, { + "description": "", + "devtoolsFrontendUrl": "/devtools/inspector.html?ws=localhost:43221/devtools/page/A2A7F36945178A7478F210B1A3949B3D", + "id": "A2A7F36945178A7478F210B1A3949B3D", + "title": "Chrome Automation Extension", + "type": "background_page", + "url": "chrome-extension://aapnijgdinlhnhlmodcfapnahmbfebeb/_generated_background_page.html", + "webSocketDebuggerUrl": "ws://localhost:43221/devtools/page/A2A7F36945178A7478F210B1A3949B3D" +} ] + +[1532467542.147][DEBUG]: DevTools request: http://localhost:43221/json/activate/2165BBB228590EF9526B591281D561FA +[1532467542.151][DEBUG]: DevTools response: Target activated +[1532467542.151][INFO]: [2eb1535d1fd6d728cac89031b4094ab7] RESPONSE SwitchToWindow +[1532467542.152][INFO]: [2eb1535d1fd6d728cac89031b4094ab7] COMMAND GetWindow { + +} +[1532467542.152][INFO]: [2eb1535d1fd6d728cac89031b4094ab7] RESPONSE GetWindow "CDwindow-2165BBB228590EF9526B591281D561FA" +[1532467542.153][INFO]: [2eb1535d1fd6d728cac89031b4094ab7] COMMAND CloseWindow { + +} +[1532467542.153][DEBUG]: DevTools request: http://localhost:43221/json +[1532467542.162][DEBUG]: DevTools response: [ { + "description": "", + "devtoolsFrontendUrl": "/devtools/inspector.html?ws=localhost:43221/devtools/page/2165BBB228590EF9526B591281D561FA", + "id": "2165BBB228590EF9526B591281D561FA", + "title": "page test", + "type": "page", + "url": "http://127.0.0.1:43121/chromedriver/page_test.html", + "webSocketDebuggerUrl": "ws://localhost:43221/devtools/page/2165BBB228590EF9526B591281D561FA" +}, { + "description": "", + "devtoolsFrontendUrl": "/devtools/inspector.html?ws=localhost:43221/devtools/page/A2A7F36945178A7478F210B1A3949B3D", + "id": "A2A7F36945178A7478F210B1A3949B3D", + "title": "Chrome Automation Extension", + "type": "background_page", + "url": "chrome-extension://aapnijgdinlhnhlmodcfapnahmbfebeb/_generated_background_page.html", + "webSocketDebuggerUrl": "ws://localhost:43221/devtools/page/A2A7F36945178A7478F210B1A3949B3D" +} ] + +[1532467542.163][DEBUG]: DevTools request: http://localhost:43221/json/close/2165BBB228590EF9526B591281D561FA +[1532467542.164][DEBUG]: DevTools response: Target is closing +[1532467542.164][DEBUG]: DevTools request: http://localhost:43221/json +[1532467542.203][DEBUG]: DevTools response: [ { + "description": "", + "devtoolsFrontendUrl": "/devtools/inspector.html?ws=localhost:43221/devtools/page/A2A7F36945178A7478F210B1A3949B3D", + "id": "A2A7F36945178A7478F210B1A3949B3D", + "title": "Chrome Automation Extension", + "type": "background_page", + "url": "chrome-extension://aapnijgdinlhnhlmodcfapnahmbfebeb/_generated_background_page.html", + "webSocketDebuggerUrl": "ws://localhost:43221/devtools/page/A2A7F36945178A7478F210B1A3949B3D" +} ] + +[1532467542.203][DEBUG]: DevTools request: http://localhost:43221/json +[1532467542.207][DEBUG]: DevTools response: [ { + "description": "", + "devtoolsFrontendUrl": "/devtools/inspector.html?ws=localhost:43221/devtools/page/A2A7F36945178A7478F210B1A3949B3D", + "id": "A2A7F36945178A7478F210B1A3949B3D", + "title": "Chrome Automation Extension", + "type": "background_page", + "url": "chrome-extension://aapnijgdinlhnhlmodcfapnahmbfebeb/_generated_background_page.html", + "webSocketDebuggerUrl": "ws://localhost:43221/devtools/page/A2A7F36945178A7478F210B1A3949B3D" +} ] + +[0724/142542.219631:ERROR:nacl_helper_linux.cc(310)] NaCl helper process running without a sandbox! +Most likely you need to configure your SUID sandbox correctly +[1532467542.257][INFO]: [2eb1535d1fd6d728cac89031b4094ab7] RESPONSE CloseWindow [ ] +[1532467542.258][DEBUG]: Log type 'driver' lost 0 entries on destruction +[1532467542.258][DEBUG]: Log type 'browser' lost 1 entries on destruction +[1532467542.263][INFO]: [04368105d2a3db3149125be3ff9616af] COMMAND InitSession { + "desiredCapabilities": { + "chromeOptions": { + "args": [ "no-sandbox", "disable-gpu" ], + "binary": "/usr/local/google/home/cwinstanley/chromium/src/out/Default/chrome" + }, + "goog:testName": "__main__.ChromeDriverTest.testCloseWindowUsingJavascript", + "loggingPrefs": { + + } + } +} +[1532467542.264][INFO]: Populating Preferences file: { + "alternate_error_pages": { + "enabled": false + }, + "autofill": { + "enabled": false + }, + "browser": { + "check_default_browser": false + }, + "distribution": { + "import_bookmarks": false, + "import_history": false, + "import_search_engine": false, + "make_chrome_default_for_user": false, + "skip_first_run_ui": true + }, + "dns_prefetching": { + "enabled": false + }, + "profile": { + "content_settings": { + "pattern_pairs": { + "https://*,*": { + "media-stream": { + "audio": "Default", + "video": "Default" + } + } + } + }, + "default_content_setting_values": { + "geolocation": 1 + }, + "default_content_settings": { + "geolocation": 1, + "mouselock": 1, + "notifications": 1, + "popups": 1, + "ppapi-broker": 1 + }, + "password_manager_enabled": false + }, + "safebrowsing": { + "enabled": false + }, + "search": { + "suggest_enabled": false + }, + "translate": { + "enabled": false + } +} +[1532467542.264][INFO]: Populating Local State file: { + "background_mode": { + "enabled": false + }, + "ssl": { + "rev_checking": { + "enabled": false + } + } +} +[1532467542.265][INFO]: Launching chrome: /usr/local/google/home/cwinstanley/chromium/src/out/Default/chrome --disable-background-networking --disable-client-side-phishing-detection --disable-default-apps --disable-gpu --disable-hang-monitor --disable-popup-blocking --disable-prompt-on-repost --disable-sync --disable-web-resources --enable-automation --enable-logging --force-fieldtrials=SiteIsolationExtensions/Control --ignore-certificate-errors --load-extension=/tmp/.org.chromium.Chromium.kTQOqN/internal --log-level=0 --metrics-recording-only --no-first-run --no-sandbox --password-store=basic --remote-debugging-port=0 --test-type=webdriver --use-mock-keychain --user-data-dir=/tmp/.org.chromium.Chromium.qx2Yh2 data:, +[260458:260458:0724/142544.068104:ERROR:gpu_process_transport_factory.cc(642)] Switching to software compositing. +[260458:260458:0724/142544.068169:ERROR:gpu_process_transport_factory.cc(1007)] Lost UI shared context. +[260458:260458:0724/142544.140253:WARNING:account_consistency_mode_manager.cc(290)] Desktop Identity Consistency cannot be enabled as no OAuth client ID and client secret have been configured. +[260458:260458:0724/142544.140356:WARNING:account_consistency_mode_manager.cc(290)] Desktop Identity Consistency cannot be enabled as no OAuth client ID and client secret have been configured. +[260458:260458:0724/142544.140407:WARNING:account_consistency_mode_manager.cc(290)] Desktop Identity Consistency cannot be enabled as no OAuth client ID and client secret have been configured. +[260458:260458:0724/142544.140456:WARNING:account_consistency_mode_manager.cc(290)] Desktop Identity Consistency cannot be enabled as no OAuth client ID and client secret have been configured. +[260458:260458:0724/142544.141316:WARNING:account_consistency_mode_manager.cc(290)] Desktop Identity Consistency cannot be enabled as no OAuth client ID and client secret have been configured. +[260458:260458:0724/142544.147458:WARNING:account_consistency_mode_manager.cc(290)] Desktop Identity Consistency cannot be enabled as no OAuth client ID and client secret have been configured. +[260458:260458:0724/142544.190646:WARNING:account_consistency_mode_manager.cc(290)] Desktop Identity Consistency cannot be enabled as no OAuth client ID and client secret have been configured. +[260458:260458:0724/142544.219958:WARNING:account_consistency_mode_manager.cc(290)] Desktop Identity Consistency cannot be enabled as no OAuth client ID and client secret have been configured. +[260458:260458:0724/142544.220030:WARNING:account_consistency_mode_manager.cc(290)] Desktop Identity Consistency cannot be enabled as no OAuth client ID and client secret have been configured. + +DevTools listening on ws://127.0.0.1:46063/devtools/browser/c4b05bb3-c053-4c49-89a3-6ec5cc08f8e1 +[1532467544.305][DEBUG]: DevTools request: http://localhost:46063/json/version +[260458:260458:0724/142544.360876:WARNING:password_store_factory.cc(253)] Using basic (unencrypted) store for password storage. See https://chromium.googlesource.com/chromium/src/+/master/docs/linux_password_storage.md for more information about password storage options. +[260458:260458:0724/142544.364139:WARNING:account_consistency_mode_manager.cc(290)] Desktop Identity Consistency cannot be enabled as no OAuth client ID and client secret have been configured. +[1532467544.579][DEBUG]: DevTools response: { + "Browser": "Chrome/69.0.3491.0", + "Protocol-Version": "1.3", + "User-Agent": "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/69.0.3491.0 Safari/537.36", + "V8-Version": "6.9.389", + "WebKit-Version": "537.36 (@410f2c4912d46a5fae2fe6c0b2e24d9eb6359761)", + "webSocketDebuggerUrl": "ws://localhost:46063/devtools/browser/c4b05bb3-c053-4c49-89a3-6ec5cc08f8e1" +} + +[1532467544.628][DEBUG]: DevTools request: http://localhost:46063/json +[1532467544.650][DEBUG]: DevTools response: [ { + "description": "", + "devtoolsFrontendUrl": "/devtools/inspector.html?ws=localhost:46063/devtools/page/706F3C74774058CC5D95ECD262C149E7", + "id": "706F3C74774058CC5D95ECD262C149E7", + "title": "Chrome Automation Extension", + "type": "background_page", + "url": "chrome-extension://aapnijgdinlhnhlmodcfapnahmbfebeb/_generated_background_page.html", + "webSocketDebuggerUrl": "ws://localhost:46063/devtools/page/706F3C74774058CC5D95ECD262C149E7" +}, { + "description": "", + "devtoolsFrontendUrl": "/devtools/inspector.html?ws=localhost:46063/devtools/page/D755C393B7662179550B4CB2B2619F89", + "id": "D755C393B7662179550B4CB2B2619F89", + "title": "", + "type": "page", + "url": "data:,", + "webSocketDebuggerUrl": "ws://localhost:46063/devtools/page/D755C393B7662179550B4CB2B2619F89" +} ] + +[1532467544.650][DEBUG]: DevTools request: http://localhost:46063/json +[1532467544.655][DEBUG]: DevTools response: [ { + "description": "", + "devtoolsFrontendUrl": "/devtools/inspector.html?ws=localhost:46063/devtools/page/706F3C74774058CC5D95ECD262C149E7", + "id": "706F3C74774058CC5D95ECD262C149E7", + "title": "Chrome Automation Extension", + "type": "background_page", + "url": "chrome-extension://aapnijgdinlhnhlmodcfapnahmbfebeb/_generated_background_page.html", + "webSocketDebuggerUrl": "ws://localhost:46063/devtools/page/706F3C74774058CC5D95ECD262C149E7" +}, { + "description": "", + "devtoolsFrontendUrl": "/devtools/inspector.html?ws=localhost:46063/devtools/page/D755C393B7662179550B4CB2B2619F89", + "id": "D755C393B7662179550B4CB2B2619F89", + "title": "", + "type": "page", + "url": "data:,", + "webSocketDebuggerUrl": "ws://localhost:46063/devtools/page/D755C393B7662179550B4CB2B2619F89" +} ] + +[1532467544.656][INFO]: resolved localhost to ["::1","127.0.0.1"] +[1532467544.658][DEBUG]: DEVTOOLS COMMAND Log.enable (id=1) { + +} +[1532467544.659][DEBUG]: DEVTOOLS COMMAND DOM.getDocument (id=2) { + +} +[1532467544.659][DEBUG]: DEVTOOLS COMMAND Target.setAutoAttach (id=3) { + "autoAttach": true, + "waitForDebuggerOnStart": false +} +[1532467544.659][DEBUG]: DEVTOOLS COMMAND Page.enable (id=4) { + +} +[1532467544.661][DEBUG]: DEVTOOLS COMMAND Page.enable (id=5) { + +} +[1532467544.718][DEBUG]: DEVTOOLS RESPONSE Log.enable (id=1) { + +} +[1532467544.719][DEBUG]: DEVTOOLS RESPONSE DOM.getDocument (id=2) { + "root": { + "backendNodeId": 1, + "baseURL": "about:blank", + "childNodeCount": 1, + "children": [ { + "attributes": [ ], + "backendNodeId": 2, + "childNodeCount": 2, + "children": [ { + "attributes": [ ], + "backendNodeId": 3, + "childNodeCount": 0, + "localName": "head", + "nodeId": 3, + "nodeName": "HEAD", + "nodeType": 1, + "nodeValue": "", + "parentId": 2 + }, { + "attributes": [ ], + "backendNodeId": 4, + "childNodeCount": 0, + "localName": "body", + "nodeId": 4, + "nodeName": "BODY", + "nodeType": 1, + "nodeValue": "", + "parentId": 2 + } ], + "frameId": "D755C393B7662179550B4CB2B2619F89", + "localName": "html", + "nodeId": 2, + "nodeName": "HTML", + "nodeType": 1, + "nodeValue": "", + "parentId": 1 + } ], + "documentURL": "", + "localName": "", + "nodeId": 1, + "nodeName": "#document", + "nodeType": 9, + "nodeValue": "", + "xmlVersion": "" + } +} +[1532467544.719][DEBUG]: DEVTOOLS RESPONSE Target.setAutoAttach (id=3) { + +} +[1532467544.719][DEBUG]: DEVTOOLS RESPONSE Page.enable (id=4) { + +} +[1532467544.719][DEBUG]: DEVTOOLS RESPONSE Page.enable (id=5) { + +} +[1532467544.719][DEBUG]: DEVTOOLS COMMAND Runtime.enable (id=6) { + +} +[1532467544.795][DEBUG]: DEVTOOLS EVENT Page.frameNavigated { + "frame": { + "id": "D755C393B7662179550B4CB2B2619F89", + "loaderId": "125F6C89CD5D630BADA6B2E9DD9BD095", + "mimeType": "text/plain", + "securityOrigin": "://", + "url": "data:," + } +} +[1532467544.795][DEBUG]: DEVTOOLS EVENT DOM.documentUpdated { + +} +[1532467544.795][DEBUG]: DEVTOOLS COMMAND DOM.getDocument (id=7) { + +} +[1532467544.795][DEBUG]: DEVTOOLS EVENT Page.loadEventFired { + "timestamp": 80229.062801 +} +[1532467544.795][DEBUG]: DEVTOOLS EVENT Page.frameStoppedLoading { + "frameId": "D755C393B7662179550B4CB2B2619F89" +} +[1532467544.795][DEBUG]: DEVTOOLS EVENT DOM.documentUpdated { + +} +[1532467544.795][DEBUG]: DEVTOOLS COMMAND DOM.getDocument (id=8) { + +} +[1532467544.796][DEBUG]: DEVTOOLS EVENT Page.domContentEventFired { + "timestamp": 80229.065484 +} +[1532467544.810][DEBUG]: DEVTOOLS EVENT Page.frameResized { + +} +[1532467544.812][DEBUG]: DEVTOOLS EVENT Runtime.executionContextCreated { + "context": { + "auxData": { + "frameId": "D755C393B7662179550B4CB2B2619F89", + "isDefault": true + }, + "id": 1, + "name": "", + "origin": "://" + } +} +[1532467544.812][DEBUG]: DEVTOOLS RESPONSE Runtime.enable (id=6) { + +} +[1532467544.819][DEBUG]: DEVTOOLS RESPONSE DOM.getDocument (id=7) { + "root": { + "backendNodeId": 5, + "baseURL": "data:,", + "childNodeCount": 1, + "children": [ { + "attributes": [ ], + "backendNodeId": 6, + "childNodeCount": 2, + "children": [ { + "attributes": [ ], + "backendNodeId": 7, + "childNodeCount": 0, + "localName": "head", + "nodeId": 7, + "nodeName": "HEAD", + "nodeType": 1, + "nodeValue": "", + "parentId": 6 + }, { + "attributes": [ ], + "backendNodeId": 8, + "childNodeCount": 0, + "localName": "body", + "nodeId": 8, + "nodeName": "BODY", + "nodeType": 1, + "nodeValue": "", + "parentId": 6 + } ], + "frameId": "D755C393B7662179550B4CB2B2619F89", + "localName": "html", + "nodeId": 6, + "nodeName": "HTML", + "nodeType": 1, + "nodeValue": "", + "parentId": 5 + } ], + "documentURL": "data:,", + "localName": "", + "nodeId": 5, + "nodeName": "#document", + "nodeType": 9, + "nodeValue": "", + "xmlVersion": "" + } +} +[1532467544.819][DEBUG]: DEVTOOLS RESPONSE DOM.getDocument (id=8) { + "root": { + "backendNodeId": 5, + "baseURL": "data:,", + "childNodeCount": 1, + "children": [ { + "attributes": [ ], + "backendNodeId": 6, + "childNodeCount": 2, + "children": [ { + "attributes": [ ], + "backendNodeId": 7, + "childNodeCount": 0, + "localName": "head", + "nodeId": 11, + "nodeName": "HEAD", + "nodeType": 1, + "nodeValue": "", + "parentId": 10 + }, { + "attributes": [ ], + "backendNodeId": 8, + "childNodeCount": 0, + "localName": "body", + "nodeId": 12, + "nodeName": "BODY", + "nodeType": 1, + "nodeValue": "", + "parentId": 10 + } ], + "frameId": "D755C393B7662179550B4CB2B2619F89", + "localName": "html", + "nodeId": 10, + "nodeName": "HTML", + "nodeType": 1, + "nodeValue": "", + "parentId": 9 + } ], + "documentURL": "data:,", + "localName": "", + "nodeId": 9, + "nodeName": "#document", + "nodeType": 9, + "nodeValue": "", + "xmlVersion": "" + } +} +[1532467544.820][DEBUG]: DEVTOOLS COMMAND Page.enable (id=9) { + +} +[1532467544.851][DEBUG]: DEVTOOLS RESPONSE Page.enable (id=9) { + +} +[1532467544.851][DEBUG]: DEVTOOLS COMMAND Runtime.enable (id=10) { + +} +[1532467544.852][DEBUG]: DEVTOOLS RESPONSE Runtime.enable (id=10) { + +} +[1532467544.853][DEBUG]: DEVTOOLS COMMAND Runtime.evaluate (id=11) { + "expression": "(function() { // Copyright (c) 2012 The Chromium Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style license that can be\n// found in the LICENSE file.\n\n/**\n * Enum f...", + "returnByValue": true +} +[1532467544.875][DEBUG]: DEVTOOLS RESPONSE Runtime.evaluate (id=11) { + "result": { + "type": "object", + "value": { + "status": 0, + "value": 1 + } + } +} +[1532467544.875][INFO]: [04368105d2a3db3149125be3ff9616af] RESPONSE InitSession { + "acceptInsecureCerts": false, + "acceptSslCerts": false, + "applicationCacheEnabled": false, + "browserConnectionEnabled": false, + "browserName": "chrome", + "chrome": { + "chromedriverVersion": "2.40 (1ba6d2ec0853ea1d507bccc09f540f5ea1db0394)", + "userDataDir": "/tmp/.org.chromium.Chromium.qx2Yh2" + }, + "cssSelectorsEnabled": true, + "databaseEnabled": false, + "goog:chromeOptions": { + "debuggerAddress": "localhost:46063" + }, + "handlesAlerts": true, + "hasTouchScreen": false, + "javascriptEnabled": true, + "locationContextEnabled": true, + "mobileEmulationEnabled": false, + "nativeEvents": true, + "networkConnectionEnabled": false, + "pageLoadStrategy": "normal", + "platform": "Linux", + "rotatable": false, + "setWindowRect": true, + "takesHeapSnapshot": true, + "takesScreenshot": true, + "unexpectedAlertBehaviour": "", + "version": "69.0.3491.0", + "webStorageEnabled": true +} +[1532467544.877][INFO]: [04368105d2a3db3149125be3ff9616af] COMMAND Navigate { + "url": "http://127.0.0.1:43121/chromedriver/page_test.html" +} +[1532467544.877][INFO]: Waiting for pending navigations... +[1532467544.877][DEBUG]: DEVTOOLS COMMAND Runtime.evaluate (id=12) { + "expression": "1" +} +[1532467544.884][DEBUG]: DEVTOOLS RESPONSE Runtime.evaluate (id=12) { + "result": { + "description": "1", + "type": "number", + "value": 1 + } +} +[1532467544.884][INFO]: Done waiting for pending navigations. Status: ok +[1532467544.884][DEBUG]: DEVTOOLS COMMAND Page.navigate (id=13) { + "url": "http://127.0.0.1:43121/chromedriver/page_test.html" +} +[1532467545.157][DEBUG]: DEVTOOLS RESPONSE Page.navigate (id=13) { + "frameId": "D755C393B7662179550B4CB2B2619F89", + "loaderId": "1BDBE1EDFED69639DFEF138E51A49494" +} +[1532467545.157][DEBUG]: DEVTOOLS COMMAND Runtime.evaluate (id=14) { + "expression": "document.URL" +} +[1532467545.167][DEBUG]: DEVTOOLS EVENT Runtime.executionContextsCleared { + +} +[1532467545.182][DEBUG]: DEVTOOLS EVENT Page.frameStartedLoading { + "frameId": "D755C393B7662179550B4CB2B2619F89" +} +[260523:260523:0724/142545.228088:ERROR:render_process_impl.cc(208)] WebFrame LEAKED 1 TIMES +[1532467545.255][DEBUG]: DEVTOOLS EVENT Runtime.executionContextsCleared { + +} +[1532467545.256][DEBUG]: DEVTOOLS EVENT Page.frameNavigated { + "frame": { + "id": "D755C393B7662179550B4CB2B2619F89", + "loaderId": "1BDBE1EDFED69639DFEF138E51A49494", + "mimeType": "text/html", + "securityOrigin": "http://127.0.0.1:43121", + "url": "http://127.0.0.1:43121/chromedriver/page_test.html" + } +} +[1532467545.256][DEBUG]: DEVTOOLS EVENT Runtime.executionContextCreated { + "context": { + "auxData": { + "frameId": "D755C393B7662179550B4CB2B2619F89", + "isDefault": true + }, + "id": 1, + "name": "", + "origin": "http://127.0.0.1:43121" + } +} +[1532467545.256][DEBUG]: DEVTOOLS EVENT DOM.documentUpdated { + +} +[1532467545.256][DEBUG]: DEVTOOLS COMMAND DOM.getDocument (id=15) { + +} +[1532467545.257][DEBUG]: DEVTOOLS RESPONSE Runtime.evaluate (id=14) { + "result": { + "type": "string", + "value": "http://127.0.0.1:43121/chromedriver/page_test.html" + } +} +[1532467545.289][DEBUG]: DEVTOOLS EVENT Page.loadEventFired { + "timestamp": 80229.576232 +} +[1532467545.289][DEBUG]: DEVTOOLS EVENT Page.frameStoppedLoading { + "frameId": "D755C393B7662179550B4CB2B2619F89" +} +[1532467545.289][DEBUG]: DEVTOOLS EVENT DOM.documentUpdated { + +} +[1532467545.289][DEBUG]: DEVTOOLS COMMAND DOM.getDocument (id=16) { + +} +[1532467545.290][DEBUG]: DEVTOOLS EVENT Page.domContentEventFired { + "timestamp": 80229.600382 +} +[1532467545.294][DEBUG]: DEVTOOLS RESPONSE DOM.getDocument (id=15) { + "root": { + "backendNodeId": 1, + "baseURL": "http://127.0.0.1:43121/chromedriver/page_test.html", + "childNodeCount": 1, + "children": [ { + "attributes": [ ], + "backendNodeId": 2, + "childNodeCount": 2, + "children": [ { + "attributes": [ ], + "backendNodeId": 3, + "childNodeCount": 2, + "localName": "head", + "nodeId": 3, + "nodeName": "HEAD", + "nodeType": 1, + "nodeValue": "", + "parentId": 2 + }, { + "attributes": [ ], + "backendNodeId": 4, + "childNodeCount": 1, + "localName": "body", + "nodeId": 4, + "nodeName": "BODY", + "nodeType": 1, + "nodeValue": "", + "parentId": 2 + } ], + "frameId": "D755C393B7662179550B4CB2B2619F89", + "localName": "html", + "nodeId": 2, + "nodeName": "HTML", + "nodeType": 1, + "nodeValue": "", + "parentId": 1 + } ], + "documentURL": "http://127.0.0.1:43121/chromedriver/page_test.html", + "localName": "", + "nodeId": 1, + "nodeName": "#document", + "nodeType": 9, + "nodeValue": "", + "xmlVersion": "" + } +} +[1532467545.316][DEBUG]: DEVTOOLS RESPONSE DOM.getDocument (id=16) { + "root": { + "backendNodeId": 1, + "baseURL": "http://127.0.0.1:43121/chromedriver/page_test.html", + "childNodeCount": 1, + "children": [ { + "attributes": [ ], + "backendNodeId": 2, + "childNodeCount": 2, + "children": [ { + "attributes": [ ], + "backendNodeId": 3, + "childNodeCount": 2, + "localName": "head", + "nodeId": 7, + "nodeName": "HEAD", + "nodeType": 1, + "nodeValue": "", + "parentId": 6 + }, { + "attributes": [ ], + "backendNodeId": 4, + "childNodeCount": 1, + "localName": "body", + "nodeId": 8, + "nodeName": "BODY", + "nodeType": 1, + "nodeValue": "", + "parentId": 6 + } ], + "frameId": "D755C393B7662179550B4CB2B2619F89", + "localName": "html", + "nodeId": 6, + "nodeName": "HTML", + "nodeType": 1, + "nodeValue": "", + "parentId": 5 + } ], + "documentURL": "http://127.0.0.1:43121/chromedriver/page_test.html", + "localName": "", + "nodeId": 5, + "nodeName": "#document", + "nodeType": 9, + "nodeValue": "", + "xmlVersion": "" + } +} +[1532467545.317][INFO]: Waiting for pending navigations... +[1532467545.317][DEBUG]: DEVTOOLS COMMAND Runtime.evaluate (id=17) { + "expression": "1" +} +[1532467545.317][DEBUG]: DEVTOOLS EVENT Log.entryAdded { + "entry": { + "level": "error", + "networkRequestId": "1000260570.2", + "source": "network", + "text": "Failed to load resource: the server responded with a status of 404 (Not Found)", + "timestamp": 1532467545304.4, + "url": "http://127.0.0.1:43121/favicon.ico" + } +} +[1532467545.329][DEBUG]: DEVTOOLS RESPONSE Runtime.evaluate (id=17) { + "result": { + "description": "1", + "type": "number", + "value": 1 + } +} +[1532467545.329][INFO]: Done waiting for pending navigations. Status: ok +[1532467545.329][INFO]: [04368105d2a3db3149125be3ff9616af] RESPONSE Navigate +[1532467545.330][INFO]: [04368105d2a3db3149125be3ff9616af] COMMAND GetWindows { + +} +[1532467545.330][DEBUG]: DevTools request: http://localhost:46063/json +[1532467545.332][DEBUG]: DevTools response: [ { + "description": "", + "devtoolsFrontendUrl": "/devtools/inspector.html?ws=localhost:46063/devtools/page/706F3C74774058CC5D95ECD262C149E7", + "id": "706F3C74774058CC5D95ECD262C149E7", + "title": "Chrome Automation Extension", + "type": "background_page", + "url": "chrome-extension://aapnijgdinlhnhlmodcfapnahmbfebeb/_generated_background_page.html", + "webSocketDebuggerUrl": "ws://localhost:46063/devtools/page/706F3C74774058CC5D95ECD262C149E7" +}, { + "description": "", + "devtoolsFrontendUrl": "/devtools/inspector.html?ws=localhost:46063/devtools/page/D755C393B7662179550B4CB2B2619F89", + "id": "D755C393B7662179550B4CB2B2619F89", + "title": "page test", + "type": "page", + "url": "http://127.0.0.1:43121/chromedriver/page_test.html", + "webSocketDebuggerUrl": "ws://localhost:46063/devtools/page/D755C393B7662179550B4CB2B2619F89" +} ] + +[1532467545.332][INFO]: [04368105d2a3db3149125be3ff9616af] RESPONSE GetWindows [ "CDwindow-D755C393B7662179550B4CB2B2619F89" ] +[1532467545.334][INFO]: [04368105d2a3db3149125be3ff9616af] COMMAND FindElement { + "using": "id", + "value": "link" +} +[1532467545.334][INFO]: Waiting for pending navigations... +[1532467545.334][DEBUG]: DEVTOOLS COMMAND Runtime.evaluate (id=18) { + "expression": "1" +} +[1532467545.349][DEBUG]: DEVTOOLS RESPONSE Runtime.evaluate (id=18) { + "result": { + "description": "1", + "type": "number", + "value": 1 + } +} +[1532467545.349][INFO]: Done waiting for pending navigations. Status: ok +[1532467545.353][DEBUG]: DEVTOOLS COMMAND Runtime.evaluate (id=19) { + "expression": "(function() { // Copyright (c) 2012 The Chromium Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style license that can be\n// found in the LICENSE file.\n\n/**\n * Enum f...", + "returnByValue": true +} +[1532467545.387][DEBUG]: DEVTOOLS RESPONSE Runtime.evaluate (id=19) { + "result": { + "type": "object", + "value": { + "status": 0, + "value": { + "ELEMENT": "0.26698853305017334-1" + } + } + } +} +[1532467545.387][INFO]: Waiting for pending navigations... +[1532467545.387][DEBUG]: DEVTOOLS COMMAND Runtime.evaluate (id=20) { + "expression": "1" +} +[1532467545.399][DEBUG]: DEVTOOLS RESPONSE Runtime.evaluate (id=20) { + "result": { + "description": "1", + "type": "number", + "value": 1 + } +} +[1532467545.399][INFO]: Done waiting for pending navigations. Status: ok +[1532467545.399][INFO]: [04368105d2a3db3149125be3ff9616af] RESPONSE FindElement { + "ELEMENT": "0.26698853305017334-1" +} +[1532467545.400][INFO]: [04368105d2a3db3149125be3ff9616af] COMMAND ClickElement { + "id": "0.26698853305017334-1" +} +[1532467545.401][INFO]: Waiting for pending navigations... +[1532467545.401][DEBUG]: DEVTOOLS COMMAND Runtime.evaluate (id=21) { + "expression": "1" +} +[1532467545.402][DEBUG]: DEVTOOLS RESPONSE Runtime.evaluate (id=21) { + "result": { + "description": "1", + "type": "number", + "value": 1 + } +} +[1532467545.402][INFO]: Done waiting for pending navigations. Status: ok +[1532467545.403][DEBUG]: DEVTOOLS COMMAND Runtime.evaluate (id=22) { + "expression": "(function() { // Copyright (c) 2012 The Chromium Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style license that can be\n// found in the LICENSE file.\n\n/**\n * Enum f...", + "returnByValue": true +} +[1532467545.408][DEBUG]: DEVTOOLS RESPONSE Runtime.evaluate (id=22) { + "result": { + "type": "object", + "value": { + "status": 0, + "value": "a" + } + } +} +[1532467545.409][DEBUG]: DEVTOOLS COMMAND Runtime.evaluate (id=23) { + "expression": "(function() { // Copyright (c) 2012 The Chromium Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style license that can be\n// found in the LICENSE file.\n\n/**\n * Enum f...", + "returnByValue": true +} +[1532467545.412][DEBUG]: DEVTOOLS RESPONSE Runtime.evaluate (id=23) { + "result": { + "type": "object", + "value": { + "status": 0, + "value": "a" + } + } +} +[1532467545.415][DEBUG]: DEVTOOLS COMMAND Runtime.evaluate (id=24) { + "expression": "(function() { // Copyright (c) 2012 The Chromium Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style license that can be\n// found in the LICENSE file.\n\n/**\n * Enum f...", + "returnByValue": true +} +[1532467545.445][DEBUG]: DEVTOOLS RESPONSE Runtime.evaluate (id=24) { + "result": { + "type": "object", + "value": { + "status": 0, + "value": true + } + } +} +[1532467545.447][DEBUG]: DEVTOOLS COMMAND Runtime.evaluate (id=25) { + "expression": "(function() { // Copyright (c) 2012 The Chromium Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style license that can be\n// found in the LICENSE file.\n\n/**\n * Enum f...", + "returnByValue": true +} +[1532467545.457][DEBUG]: DEVTOOLS RESPONSE Runtime.evaluate (id=25) { + "result": { + "type": "object", + "value": { + "status": 0, + "value": { + "height": 17, + "left": 0, + "top": 0, + "width": 122.953125 + } + } + } +} +[1532467545.461][DEBUG]: DEVTOOLS COMMAND Runtime.evaluate (id=26) { + "expression": "(function() { // Copyright (c) 2012 The Chromium Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style license that can be\n// found in the LICENSE file.\n\n/**\n * Enum f...", + "returnByValue": true +} +[1532467545.484][DEBUG]: DEVTOOLS RESPONSE Runtime.evaluate (id=26) { + "result": { + "type": "object", + "value": { + "status": 0, + "value": { + "ceil": { + + }, + "clone": { + + }, + "floor": { + + }, + "round": { + + }, + "scale": { + + }, + "toString": { + + }, + "translate": { + + }, + "x": 8, + "y": 8 + } + } + } +} +[1532467545.487][DEBUG]: DEVTOOLS COMMAND Runtime.evaluate (id=27) { + "expression": "(function() { // Copyright (c) 2012 The Chromium Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style license that can be\n// found in the LICENSE file.\n\n/**\n * Enum f...", + "returnByValue": true +} +[1532467545.505][DEBUG]: DEVTOOLS RESPONSE Runtime.evaluate (id=27) { + "result": { + "type": "object", + "value": { + "status": 0, + "value": { + "clickable": true + } + } + } +} +[1532467545.506][DEBUG]: DEVTOOLS COMMAND Input.dispatchMouseEvent (id=28) { + "button": "none", + "clickCount": 0, + "modifiers": 0, + "type": "mouseMoved", + "x": 69, + "y": 16 +} +[1532467545.510][DEBUG]: DEVTOOLS RESPONSE Input.dispatchMouseEvent (id=28) { + +} +[1532467545.510][DEBUG]: DEVTOOLS COMMAND Input.dispatchMouseEvent (id=29) { + "button": "left", + "clickCount": 1, + "modifiers": 0, + "type": "mousePressed", + "x": 69, + "y": 16 +} +[1532467545.517][DEBUG]: DEVTOOLS RESPONSE Input.dispatchMouseEvent (id=29) { + +} +[1532467545.517][DEBUG]: DEVTOOLS COMMAND Input.dispatchMouseEvent (id=30) { + "button": "left", + "clickCount": 1, + "modifiers": 0, + "type": "mouseReleased", + "x": 69, + "y": 16 +} +[1532467545.616][DEBUG]: DEVTOOLS RESPONSE Input.dispatchMouseEvent (id=30) { + +} +[1532467545.617][INFO]: Waiting for pending navigations... +[1532467545.617][DEBUG]: DEVTOOLS COMMAND Runtime.evaluate (id=31) { + "expression": "1" +} +[1532467545.617][DEBUG]: DEVTOOLS EVENT Page.windowOpen { + "url": "http://127.0.0.1:43121/chromedriver/empty.html", + "userGesture": true, + "windowFeatures": [ "menubar", "toolbar", "status", "scrollbars", "resizable" ], + "windowName": "_blank" +} +[1532467545.628][DEBUG]: DEVTOOLS RESPONSE Runtime.evaluate (id=31) { + "result": { + "description": "1", + "type": "number", + "value": 1 + } +} +[1532467545.628][INFO]: Done waiting for pending navigations. Status: ok +[1532467545.628][INFO]: [04368105d2a3db3149125be3ff9616af] RESPONSE ClickElement +[1532467545.630][INFO]: [04368105d2a3db3149125be3ff9616af] COMMAND GetWindows { + +} +[1532467545.630][DEBUG]: DevTools request: http://localhost:46063/json +[1532467545.631][DEBUG]: DevTools response: [ { + "description": "", + "devtoolsFrontendUrl": "/devtools/inspector.html?ws=localhost:46063/devtools/page/A43A3F8FC603FE4E4D9D15180058E9E9", + "id": "A43A3F8FC603FE4E4D9D15180058E9E9", + "title": "", + "type": "page", + "url": "http://127.0.0.1:43121/chromedriver/empty.html", + "webSocketDebuggerUrl": "ws://localhost:46063/devtools/page/A43A3F8FC603FE4E4D9D15180058E9E9" +}, { + "description": "", + "devtoolsFrontendUrl": "/devtools/inspector.html?ws=localhost:46063/devtools/page/706F3C74774058CC5D95ECD262C149E7", + "id": "706F3C74774058CC5D95ECD262C149E7", + "title": "Chrome Automation Extension", + "type": "background_page", + "url": "chrome-extension://aapnijgdinlhnhlmodcfapnahmbfebeb/_generated_background_page.html", + "webSocketDebuggerUrl": "ws://localhost:46063/devtools/page/706F3C74774058CC5D95ECD262C149E7" +}, { + "description": "", + "devtoolsFrontendUrl": "/devtools/inspector.html?ws=localhost:46063/devtools/page/D755C393B7662179550B4CB2B2619F89", + "id": "D755C393B7662179550B4CB2B2619F89", + "title": "page test", + "type": "page", + "url": "http://127.0.0.1:43121/chromedriver/page_test.html", + "webSocketDebuggerUrl": "ws://localhost:46063/devtools/page/D755C393B7662179550B4CB2B2619F89" +} ] + +[1532467545.632][INFO]: [04368105d2a3db3149125be3ff9616af] RESPONSE GetWindows [ "CDwindow-D755C393B7662179550B4CB2B2619F89", "CDwindow-A43A3F8FC603FE4E4D9D15180058E9E9" ] +[1532467545.634][INFO]: [04368105d2a3db3149125be3ff9616af] COMMAND SwitchToWindow { + "name": "CDwindow-A43A3F8FC603FE4E4D9D15180058E9E9" +} +[1532467545.634][DEBUG]: DevTools request: http://localhost:46063/json +[1532467545.648][DEBUG]: DevTools response: [ { + "description": "", + "devtoolsFrontendUrl": "/devtools/inspector.html?ws=localhost:46063/devtools/page/A43A3F8FC603FE4E4D9D15180058E9E9", + "id": "A43A3F8FC603FE4E4D9D15180058E9E9", + "title": "", + "type": "page", + "url": "http://127.0.0.1:43121/chromedriver/empty.html", + "webSocketDebuggerUrl": "ws://localhost:46063/devtools/page/A43A3F8FC603FE4E4D9D15180058E9E9" +}, { + "description": "", + "devtoolsFrontendUrl": "/devtools/inspector.html?ws=localhost:46063/devtools/page/706F3C74774058CC5D95ECD262C149E7", + "id": "706F3C74774058CC5D95ECD262C149E7", + "title": "Chrome Automation Extension", + "type": "background_page", + "url": "chrome-extension://aapnijgdinlhnhlmodcfapnahmbfebeb/_generated_background_page.html", + "webSocketDebuggerUrl": "ws://localhost:46063/devtools/page/706F3C74774058CC5D95ECD262C149E7" +}, { + "description": "", + "devtoolsFrontendUrl": "/devtools/inspector.html?ws=localhost:46063/devtools/page/D755C393B7662179550B4CB2B2619F89", + "id": "D755C393B7662179550B4CB2B2619F89", + "title": "page test", + "type": "page", + "url": "http://127.0.0.1:43121/chromedriver/page_test.html", + "webSocketDebuggerUrl": "ws://localhost:46063/devtools/page/D755C393B7662179550B4CB2B2619F89" +} ] + +[1532467545.648][DEBUG]: DevTools request: http://localhost:46063/json/activate/A43A3F8FC603FE4E4D9D15180058E9E9 +[1532467545.692][DEBUG]: DevTools response: Target activated +[1532467545.692][INFO]: [04368105d2a3db3149125be3ff9616af] RESPONSE SwitchToWindow +[1532467545.693][INFO]: [04368105d2a3db3149125be3ff9616af] COMMAND GetWindow { + +} +[1532467545.693][INFO]: [04368105d2a3db3149125be3ff9616af] RESPONSE GetWindow "CDwindow-A43A3F8FC603FE4E4D9D15180058E9E9" +[1532467545.694][INFO]: [04368105d2a3db3149125be3ff9616af] COMMAND FindElement { + "using": "id", + "value": "link" +} +[1532467545.695][INFO]: resolved localhost to ["::1","127.0.0.1"] +[1532467545.699][DEBUG]: DEVTOOLS COMMAND Log.enable (id=1) { + +} +[1532467545.699][DEBUG]: DEVTOOLS COMMAND DOM.getDocument (id=2) { + +} +[1532467545.700][DEBUG]: DEVTOOLS COMMAND Target.setAutoAttach (id=3) { + "autoAttach": true, + "waitForDebuggerOnStart": false +} +[1532467545.700][DEBUG]: DEVTOOLS COMMAND Page.enable (id=4) { + +} +[1532467545.700][DEBUG]: DEVTOOLS COMMAND Page.enable (id=5) { + +} +[1532467545.720][DEBUG]: DEVTOOLS RESPONSE Log.enable (id=1) { + +} +[1532467545.721][DEBUG]: DEVTOOLS RESPONSE DOM.getDocument (id=2) { + "root": { + "backendNodeId": 6, + "baseURL": "http://127.0.0.1:43121/chromedriver/empty.html", + "childNodeCount": 1, + "children": [ { + "attributes": [ ], + "backendNodeId": 7, + "childNodeCount": 2, + "children": [ { + "attributes": [ ], + "backendNodeId": 8, + "childNodeCount": 0, + "localName": "head", + "nodeId": 3, + "nodeName": "HEAD", + "nodeType": 1, + "nodeValue": "", + "parentId": 2 + }, { + "attributes": [ ], + "backendNodeId": 9, + "childNodeCount": 0, + "children": [ { + "backendNodeId": 10, + "localName": "", + "nodeId": 5, + "nodeName": "#text", + "nodeType": 3, + "nodeValue": "\n", + "parentId": 4 + } ], + "localName": "body", + "nodeId": 4, + "nodeName": "BODY", + "nodeType": 1, + "nodeValue": "", + "parentId": 2 + } ], + "frameId": "A43A3F8FC603FE4E4D9D15180058E9E9", + "localName": "html", + "nodeId": 2, + "nodeName": "HTML", + "nodeType": 1, + "nodeValue": "", + "parentId": 1 + } ], + "documentURL": "http://127.0.0.1:43121/chromedriver/empty.html", + "localName": "", + "nodeId": 1, + "nodeName": "#document", + "nodeType": 9, + "nodeValue": "", + "xmlVersion": "" + } +} +[1532467545.721][DEBUG]: DEVTOOLS RESPONSE Target.setAutoAttach (id=3) { + +} +[1532467545.721][DEBUG]: DEVTOOLS RESPONSE Page.enable (id=4) { + +} +[1532467545.721][DEBUG]: DEVTOOLS RESPONSE Page.enable (id=5) { + +} +[1532467545.721][DEBUG]: DEVTOOLS COMMAND Runtime.enable (id=6) { + +} +[1532467545.757][DEBUG]: DEVTOOLS EVENT Runtime.executionContextCreated { + "context": { + "auxData": { + "frameId": "A43A3F8FC603FE4E4D9D15180058E9E9", + "isDefault": true + }, + "id": 2, + "name": "", + "origin": "http://127.0.0.1:43121" + } +} +[1532467545.757][DEBUG]: DEVTOOLS RESPONSE Runtime.enable (id=6) { + +} +[1532467545.757][DEBUG]: DEVTOOLS COMMAND Page.enable (id=7) { + +} +[1532467545.767][DEBUG]: DEVTOOLS RESPONSE Page.enable (id=7) { + +} +[1532467545.767][DEBUG]: DEVTOOLS COMMAND Runtime.enable (id=8) { + +} +[1532467545.768][DEBUG]: DEVTOOLS RESPONSE Runtime.enable (id=8) { + +} +[1532467545.768][INFO]: Waiting for pending navigations... +[1532467545.768][DEBUG]: DEVTOOLS COMMAND Runtime.evaluate (id=9) { + "expression": "1" +} +[1532467545.771][DEBUG]: DEVTOOLS RESPONSE Runtime.evaluate (id=9) { + "result": { + "description": "1", + "type": "number", + "value": 1 + } +} +[1532467545.771][DEBUG]: DEVTOOLS COMMAND DOM.getDocument (id=10) { + +} +[1532467545.776][DEBUG]: DEVTOOLS RESPONSE DOM.getDocument (id=10) { + "root": { + "backendNodeId": 6, + "baseURL": "http://127.0.0.1:43121/chromedriver/empty.html", + "childNodeCount": 1, + "children": [ { + "attributes": [ ], + "backendNodeId": 7, + "childNodeCount": 2, + "children": [ { + "attributes": [ ], + "backendNodeId": 8, + "childNodeCount": 0, + "localName": "head", + "nodeId": 8, + "nodeName": "HEAD", + "nodeType": 1, + "nodeValue": "", + "parentId": 7 + }, { + "attributes": [ ], + "backendNodeId": 9, + "childNodeCount": 0, + "children": [ { + "backendNodeId": 10, + "localName": "", + "nodeId": 10, + "nodeName": "#text", + "nodeType": 3, + "nodeValue": "\n", + "parentId": 9 + } ], + "localName": "body", + "nodeId": 9, + "nodeName": "BODY", + "nodeType": 1, + "nodeValue": "", + "parentId": 7 + } ], + "frameId": "A43A3F8FC603FE4E4D9D15180058E9E9", + "localName": "html", + "nodeId": 7, + "nodeName": "HTML", + "nodeType": 1, + "nodeValue": "", + "parentId": 6 + } ], + "documentURL": "http://127.0.0.1:43121/chromedriver/empty.html", + "localName": "", + "nodeId": 6, + "nodeName": "#document", + "nodeType": 9, + "nodeValue": "", + "xmlVersion": "" + } +} +[1532467545.776][DEBUG]: DEVTOOLS COMMAND Runtime.evaluate (id=11) { + "expression": "var frame = document.createElement('iframe');frame.name = 'chromedriver dummy frame';frame.src = 'about:blank';document.body.appendChild(frame);window.setTimeout(function() { document.body.removeC..." +} +[1532467545.787][DEBUG]: DEVTOOLS EVENT DOM.childNodeInserted { + "node": { + "attributes": [ "name", "chromedriver dummy frame", "src", "about:blank" ], + "backendNodeId": 11, + "childNodeCount": 0, + "localName": "iframe", + "nodeId": 11, + "nodeName": "IFRAME", + "nodeType": 1, + "nodeValue": "" + }, + "parentNodeId": 9, + "previousNodeId": 0 +} +[1532467545.787][DEBUG]: DEVTOOLS EVENT Page.frameAttached { + "frameId": "5DE80CA0CAFD46BDE221BBFE3EE70D0F", + "parentFrameId": "A43A3F8FC603FE4E4D9D15180058E9E9", + "stack": { + "callFrames": [ { + "columnNumber": 125, + "functionName": "", + "lineNumber": 0, + "scriptId": "26", + "url": "" + } ] + } +} +[1532467545.811][DEBUG]: DEVTOOLS EVENT Page.frameStartedLoading { + "frameId": "5DE80CA0CAFD46BDE221BBFE3EE70D0F" +} +[1532467545.812][DEBUG]: DEVTOOLS EVENT Page.frameNavigated { + "frame": { + "id": "5DE80CA0CAFD46BDE221BBFE3EE70D0F", + "loaderId": "365F81EE66136485A5B13DB0EC5E5FC6", + "mimeType": "text/html", + "name": "chromedriver dummy frame", + "parentId": "A43A3F8FC603FE4E4D9D15180058E9E9", + "securityOrigin": "://", + "url": "about:blank" + } +} +[1532467545.812][DEBUG]: DEVTOOLS EVENT DOM.childNodeRemoved { + "nodeId": 11, + "parentNodeId": 9 +} +[1532467545.812][DEBUG]: DEVTOOLS EVENT DOM.childNodeInserted { + "node": { + "attributes": [ "name", "chromedriver dummy frame", "src", "about:blank" ], + "backendNodeId": 11, + "childNodeCount": 0, + "contentDocument": { + "backendNodeId": 12, + "baseURL": "http://127.0.0.1:43121/chromedriver/empty.html", + "childNodeCount": 0, + "documentURL": "about:blank", + "localName": "", + "nodeId": 13, + "nodeName": "#document", + "nodeType": 9, + "nodeValue": "", + "xmlVersion": "" + }, + "frameId": "5DE80CA0CAFD46BDE221BBFE3EE70D0F", + "localName": "iframe", + "nodeId": 12, + "nodeName": "IFRAME", + "nodeType": 1, + "nodeValue": "" + }, + "parentNodeId": 9, + "previousNodeId": 0 +} +[1532467545.813][DEBUG]: DEVTOOLS EVENT Runtime.executionContextCreated { + "context": { + "auxData": { + "frameId": "5DE80CA0CAFD46BDE221BBFE3EE70D0F", + "isDefault": true + }, + "id": 3, + "name": "", + "origin": "http://127.0.0.1:43121" + } +} +[1532467545.813][DEBUG]: DEVTOOLS EVENT DOM.childNodeCountUpdated { + "childNodeCount": 1, + "nodeId": 13 +} +[1532467545.813][DEBUG]: DEVTOOLS EVENT Page.frameStoppedLoading { + "frameId": "5DE80CA0CAFD46BDE221BBFE3EE70D0F" +} +[1532467545.813][DEBUG]: DEVTOOLS RESPONSE Runtime.evaluate (id=11) { + "result": { + "description": "1", + "type": "number", + "value": 1 + } +} +[1532467545.813][INFO]: Done waiting for pending navigations. Status: ok +[1532467545.819][DEBUG]: DEVTOOLS COMMAND Runtime.evaluate (id=12) { + "expression": "(function() { // Copyright (c) 2012 The Chromium Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style license that can be\n// found in the LICENSE file.\n\n/**\n * Enum f...", + "returnByValue": true +} +[1532467545.843][DEBUG]: DEVTOOLS EVENT DOM.childNodeRemoved { + "nodeId": 12, + "parentNodeId": 9 +} +[1532467545.843][DEBUG]: DEVTOOLS EVENT Runtime.executionContextDestroyed { + "executionContextId": 3 +} +[1532467545.843][DEBUG]: DEVTOOLS EVENT Page.frameDetached { + "frameId": "5DE80CA0CAFD46BDE221BBFE3EE70D0F" +} +[1532467545.847][DEBUG]: DEVTOOLS RESPONSE Runtime.evaluate (id=12) { + "result": { + "type": "object", + "value": { + "status": 0, + "value": null + } + } +} +[1532467545.881][DEBUG]: DEVTOOLS COMMAND Runtime.evaluate (id=13) { + "expression": "1" +} +[1532467545.883][DEBUG]: DEVTOOLS RESPONSE Runtime.evaluate (id=13) { + "result": { + "description": "1", + "type": "number", + "value": 1 + } +} +[1532467545.884][INFO]: Waiting for pending navigations... +[1532467545.884][DEBUG]: DEVTOOLS COMMAND Runtime.evaluate (id=14) { + "expression": "1" +} +[1532467545.885][DEBUG]: DEVTOOLS RESPONSE Runtime.evaluate (id=14) { + "result": { + "description": "1", + "type": "number", + "value": 1 + } +} +[1532467545.885][INFO]: Done waiting for pending navigations. Status: ok +[1532467545.885][INFO]: [04368105d2a3db3149125be3ff9616af] RESPONSE FindElement ERROR no such element: Unable to locate element: {"method":"id","selector":"link"} + (Session info: chrome=69.0.3491.0) +[1532467545.887][INFO]: [04368105d2a3db3149125be3ff9616af] COMMAND ExecuteScript { + "args": [ ], + "script": "window.close()" +} +[1532467545.887][INFO]: Waiting for pending navigations... +[1532467545.887][DEBUG]: DEVTOOLS COMMAND Runtime.evaluate (id=15) { + "expression": "1" +} +[1532467545.888][DEBUG]: DEVTOOLS RESPONSE Runtime.evaluate (id=15) { + "result": { + "description": "1", + "type": "number", + "value": 1 + } +} +[1532467545.889][INFO]: Done waiting for pending navigations. Status: ok +[1532467545.889][DEBUG]: DEVTOOLS COMMAND Runtime.evaluate (id=16) { + "expression": "(function() { // Copyright (c) 2012 The Chromium Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style license that can be\n// found in the LICENSE file.\n\n/**\n * Enum f...", + "returnByValue": true +} +[1532467545.896][DEBUG]: DEVTOOLS RESPONSE Runtime.evaluate (id=16) { + "result": { + "type": "object", + "value": { + "status": 0 + } + } +} +[1532467545.896][INFO]: Waiting for pending navigations... +[1532467545.896][DEBUG]: DEVTOOLS COMMAND Runtime.evaluate (id=17) { + "expression": "1" +} +[1532467545.958][DEBUG]: DEVTOOLS EVENT Inspector.detached { + "reason": "target_closed" +} +[1532467545.995][INFO]: Done waiting for pending navigations. Status: ok +[1532467545.995][INFO]: [04368105d2a3db3149125be3ff9616af] RESPONSE ExecuteScript +[1532467545.996][INFO]: [04368105d2a3db3149125be3ff9616af] COMMAND GetTitle { + +} +[1532467545.996][INFO]: resolved localhost to ["::1","127.0.0.1"] +[1532467545.997][DEBUG]: DevTools request: http://localhost:46063/json +[1532467545.998][DEBUG]: DevTools response: [ { + "description": "", + "devtoolsFrontendUrl": "/devtools/inspector.html?ws=localhost:46063/devtools/page/D755C393B7662179550B4CB2B2619F89", + "id": "D755C393B7662179550B4CB2B2619F89", + "title": "page test", + "type": "page", + "url": "http://127.0.0.1:43121/chromedriver/page_test.html", + "webSocketDebuggerUrl": "ws://localhost:46063/devtools/page/D755C393B7662179550B4CB2B2619F89" +}, { + "description": "", + "devtoolsFrontendUrl": "/devtools/inspector.html?ws=localhost:46063/devtools/page/706F3C74774058CC5D95ECD262C149E7", + "id": "706F3C74774058CC5D95ECD262C149E7", + "title": "Chrome Automation Extension", + "type": "background_page", + "url": "chrome-extension://aapnijgdinlhnhlmodcfapnahmbfebeb/_generated_background_page.html", + "webSocketDebuggerUrl": "ws://localhost:46063/devtools/page/706F3C74774058CC5D95ECD262C149E7" +} ] + +[1532467545.998][DEBUG]: DevTools request: http://localhost:46063/json +[1532467546.001][DEBUG]: DevTools response: [ { + "description": "", + "devtoolsFrontendUrl": "/devtools/inspector.html?ws=localhost:46063/devtools/page/D755C393B7662179550B4CB2B2619F89", + "id": "D755C393B7662179550B4CB2B2619F89", + "title": "page test", + "type": "page", + "url": "http://127.0.0.1:43121/chromedriver/page_test.html", + "webSocketDebuggerUrl": "ws://localhost:46063/devtools/page/D755C393B7662179550B4CB2B2619F89" +}, { + "description": "", + "devtoolsFrontendUrl": "/devtools/inspector.html?ws=localhost:46063/devtools/page/706F3C74774058CC5D95ECD262C149E7", + "id": "706F3C74774058CC5D95ECD262C149E7", + "title": "Chrome Automation Extension", + "type": "background_page", + "url": "chrome-extension://aapnijgdinlhnhlmodcfapnahmbfebeb/_generated_background_page.html", + "webSocketDebuggerUrl": "ws://localhost:46063/devtools/page/706F3C74774058CC5D95ECD262C149E7" +} ] + +[1532467546.036][INFO]: [04368105d2a3db3149125be3ff9616af] RESPONSE GetTitle ERROR no such window: window was already closed + (Session info: chrome=69.0.3491.0) +[1532467546.037][INFO]: [04368105d2a3db3149125be3ff9616af] COMMAND Quit { + +} +[0724/142546.049205:ERROR:nacl_helper_linux.cc(310)] NaCl helper process running without a sandbox! +Most likely you need to configure your SUID sandbox correctly +[1532467546.087][INFO]: [04368105d2a3db3149125be3ff9616af] RESPONSE Quit +[1532467546.087][DEBUG]: Log type 'driver' lost 0 entries on destruction +[1532467546.087][DEBUG]: Log type 'browser' lost 1 entries on destruction
diff --git a/chrome/test/chromedriver/log_replay/test_data/testConsoleLogSources.log b/chrome/test/chromedriver/log_replay/test_data/testConsoleLogSources.log new file mode 100644 index 0000000..f39f4574 --- /dev/null +++ b/chrome/test/chromedriver/log_replay/test_data/testConsoleLogSources.log
@@ -0,0 +1,726 @@ +[1532467687.866][INFO]: [9e6cd63b5801df2e42c9c4179a2a2828] COMMAND InitSession { + "desiredCapabilities": { + "chromeOptions": { + "args": [ "no-sandbox", "disable-gpu" ], + "binary": "/usr/local/google/home/cwinstanley/chromium/src/out/Default/chrome" + }, + "goog:testName": "__main__.ChromeDriverTest.testConsoleLogSources", + "loggingPrefs": { + + } + } +} +[1532467687.868][INFO]: Populating Preferences file: { + "alternate_error_pages": { + "enabled": false + }, + "autofill": { + "enabled": false + }, + "browser": { + "check_default_browser": false + }, + "distribution": { + "import_bookmarks": false, + "import_history": false, + "import_search_engine": false, + "make_chrome_default_for_user": false, + "skip_first_run_ui": true + }, + "dns_prefetching": { + "enabled": false + }, + "profile": { + "content_settings": { + "pattern_pairs": { + "https://*,*": { + "media-stream": { + "audio": "Default", + "video": "Default" + } + } + } + }, + "default_content_setting_values": { + "geolocation": 1 + }, + "default_content_settings": { + "geolocation": 1, + "mouselock": 1, + "notifications": 1, + "popups": 1, + "ppapi-broker": 1 + }, + "password_manager_enabled": false + }, + "safebrowsing": { + "enabled": false + }, + "search": { + "suggest_enabled": false + }, + "translate": { + "enabled": false + } +} +[1532467687.868][INFO]: Populating Local State file: { + "background_mode": { + "enabled": false + }, + "ssl": { + "rev_checking": { + "enabled": false + } + } +} +[1532467687.870][INFO]: Launching chrome: /usr/local/google/home/cwinstanley/chromium/src/out/Default/chrome --disable-background-networking --disable-client-side-phishing-detection --disable-default-apps --disable-gpu --disable-hang-monitor --disable-popup-blocking --disable-prompt-on-repost --disable-sync --disable-web-resources --enable-automation --enable-logging --force-fieldtrials=SiteIsolationExtensions/Control --ignore-certificate-errors --load-extension=/tmp/.org.chromium.Chromium.Qgc6S6/internal --log-level=0 --metrics-recording-only --no-first-run --no-sandbox --password-store=basic --remote-debugging-port=0 --test-type=webdriver --use-mock-keychain --user-data-dir=/tmp/.org.chromium.Chromium.aYnWT8 data:, +[260784:260784:0724/142809.801008:ERROR:gpu_process_transport_factory.cc(642)] Switching to software compositing. +[260784:260784:0724/142809.801079:ERROR:gpu_process_transport_factory.cc(1007)] Lost UI shared context. +[260784:260784:0724/142809.884522:WARNING:account_consistency_mode_manager.cc(290)] Desktop Identity Consistency cannot be enabled as no OAuth client ID and client secret have been configured. +[260784:260784:0724/142809.884651:WARNING:account_consistency_mode_manager.cc(290)] Desktop Identity Consistency cannot be enabled as no OAuth client ID and client secret have been configured. +[260784:260784:0724/142809.884725:WARNING:account_consistency_mode_manager.cc(290)] Desktop Identity Consistency cannot be enabled as no OAuth client ID and client secret have been configured. +[260784:260784:0724/142809.884778:WARNING:account_consistency_mode_manager.cc(290)] Desktop Identity Consistency cannot be enabled as no OAuth client ID and client secret have been configured. +[260784:260784:0724/142809.885736:WARNING:account_consistency_mode_manager.cc(290)] Desktop Identity Consistency cannot be enabled as no OAuth client ID and client secret have been configured. +[260784:260784:0724/142809.892312:WARNING:account_consistency_mode_manager.cc(290)] Desktop Identity Consistency cannot be enabled as no OAuth client ID and client secret have been configured. +[260784:260784:0724/142809.936456:WARNING:account_consistency_mode_manager.cc(290)] Desktop Identity Consistency cannot be enabled as no OAuth client ID and client secret have been configured. +[260784:260784:0724/142809.967329:WARNING:account_consistency_mode_manager.cc(290)] Desktop Identity Consistency cannot be enabled as no OAuth client ID and client secret have been configured. +[260784:260784:0724/142809.967408:WARNING:account_consistency_mode_manager.cc(290)] Desktop Identity Consistency cannot be enabled as no OAuth client ID and client secret have been configured. + +DevTools listening on ws://127.0.0.1:34937/devtools/browser/e4d7e538-1a4f-4c3d-b1cb-3bdbbea4f101 +[1532467690.005][DEBUG]: DevTools request: http://localhost:34937/json/version +[260784:260784:0724/142810.109770:WARNING:password_store_factory.cc(253)] Using basic (unencrypted) store for password storage. See https://chromium.googlesource.com/chromium/src/+/master/docs/linux_password_storage.md for more information about password storage options. +[260784:260784:0724/142810.112417:WARNING:account_consistency_mode_manager.cc(290)] Desktop Identity Consistency cannot be enabled as no OAuth client ID and client secret have been configured. +[1532467690.342][DEBUG]: DevTools response: { + "Browser": "Chrome/69.0.3491.0", + "Protocol-Version": "1.3", + "User-Agent": "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/69.0.3491.0 Safari/537.36", + "V8-Version": "6.9.389", + "WebKit-Version": "537.36 (@410f2c4912d46a5fae2fe6c0b2e24d9eb6359761)", + "webSocketDebuggerUrl": "ws://localhost:34937/devtools/browser/e4d7e538-1a4f-4c3d-b1cb-3bdbbea4f101" +} + +[1532467690.393][DEBUG]: DevTools request: http://localhost:34937/json +[1532467690.418][DEBUG]: DevTools response: [ { + "description": "", + "devtoolsFrontendUrl": "/devtools/inspector.html?ws=localhost:34937/devtools/page/EE3C8630F63D2A45C0C46D6C0935E5B6", + "id": "EE3C8630F63D2A45C0C46D6C0935E5B6", + "title": "Chrome Automation Extension", + "type": "background_page", + "url": "chrome-extension://aapnijgdinlhnhlmodcfapnahmbfebeb/_generated_background_page.html", + "webSocketDebuggerUrl": "ws://localhost:34937/devtools/page/EE3C8630F63D2A45C0C46D6C0935E5B6" +}, { + "description": "", + "devtoolsFrontendUrl": "/devtools/inspector.html?ws=localhost:34937/devtools/page/BB0A76AFCB158F70A95289BD434E449D", + "id": "BB0A76AFCB158F70A95289BD434E449D", + "title": "", + "type": "page", + "url": "data:,", + "webSocketDebuggerUrl": "ws://localhost:34937/devtools/page/BB0A76AFCB158F70A95289BD434E449D" +} ] + +[1532467690.419][DEBUG]: DevTools request: http://localhost:34937/json +[1532467690.421][DEBUG]: DevTools response: [ { + "description": "", + "devtoolsFrontendUrl": "/devtools/inspector.html?ws=localhost:34937/devtools/page/EE3C8630F63D2A45C0C46D6C0935E5B6", + "id": "EE3C8630F63D2A45C0C46D6C0935E5B6", + "title": "Chrome Automation Extension", + "type": "background_page", + "url": "chrome-extension://aapnijgdinlhnhlmodcfapnahmbfebeb/_generated_background_page.html", + "webSocketDebuggerUrl": "ws://localhost:34937/devtools/page/EE3C8630F63D2A45C0C46D6C0935E5B6" +}, { + "description": "", + "devtoolsFrontendUrl": "/devtools/inspector.html?ws=localhost:34937/devtools/page/BB0A76AFCB158F70A95289BD434E449D", + "id": "BB0A76AFCB158F70A95289BD434E449D", + "title": "", + "type": "page", + "url": "data:,", + "webSocketDebuggerUrl": "ws://localhost:34937/devtools/page/BB0A76AFCB158F70A95289BD434E449D" +} ] + +[1532467690.423][INFO]: resolved localhost to ["::1","127.0.0.1"] +[1532467690.425][DEBUG]: DEVTOOLS COMMAND Log.enable (id=1) { + +} +[1532467690.425][DEBUG]: DEVTOOLS COMMAND DOM.getDocument (id=2) { + +} +[1532467690.425][DEBUG]: DEVTOOLS COMMAND Target.setAutoAttach (id=3) { + "autoAttach": true, + "waitForDebuggerOnStart": false +} +[1532467690.425][DEBUG]: DEVTOOLS COMMAND Page.enable (id=4) { + +} +[1532467690.426][DEBUG]: DEVTOOLS COMMAND Page.enable (id=5) { + +} +[1532467690.441][DEBUG]: DEVTOOLS RESPONSE Log.enable (id=1) { + +} +[1532467690.443][DEBUG]: DEVTOOLS RESPONSE DOM.getDocument (id=2) { + "root": { + "backendNodeId": 1, + "baseURL": "about:blank", + "childNodeCount": 1, + "children": [ { + "attributes": [ ], + "backendNodeId": 2, + "childNodeCount": 2, + "children": [ { + "attributes": [ ], + "backendNodeId": 3, + "childNodeCount": 0, + "localName": "head", + "nodeId": 3, + "nodeName": "HEAD", + "nodeType": 1, + "nodeValue": "", + "parentId": 2 + }, { + "attributes": [ ], + "backendNodeId": 4, + "childNodeCount": 0, + "localName": "body", + "nodeId": 4, + "nodeName": "BODY", + "nodeType": 1, + "nodeValue": "", + "parentId": 2 + } ], + "frameId": "BB0A76AFCB158F70A95289BD434E449D", + "localName": "html", + "nodeId": 2, + "nodeName": "HTML", + "nodeType": 1, + "nodeValue": "", + "parentId": 1 + } ], + "documentURL": "", + "localName": "", + "nodeId": 1, + "nodeName": "#document", + "nodeType": 9, + "nodeValue": "", + "xmlVersion": "" + } +} +[1532467690.444][DEBUG]: DEVTOOLS RESPONSE Target.setAutoAttach (id=3) { + +} +[1532467690.444][DEBUG]: DEVTOOLS RESPONSE Page.enable (id=4) { + +} +[1532467690.516][DEBUG]: DEVTOOLS EVENT Page.frameNavigated { + "frame": { + "id": "BB0A76AFCB158F70A95289BD434E449D", + "loaderId": "821B7DA5FDD599302F6118A0DB66BB61", + "mimeType": "text/plain", + "securityOrigin": "://", + "url": "data:," + } +} +[1532467690.516][DEBUG]: DEVTOOLS EVENT DOM.documentUpdated { + +} +[1532467690.516][DEBUG]: DEVTOOLS COMMAND DOM.getDocument (id=6) { + +} +[1532467690.516][DEBUG]: DEVTOOLS EVENT Page.loadEventFired { + "timestamp": 80374.799136 +} +[1532467690.516][DEBUG]: DEVTOOLS EVENT Page.frameStoppedLoading { + "frameId": "BB0A76AFCB158F70A95289BD434E449D" +} +[1532467690.517][DEBUG]: DEVTOOLS EVENT DOM.documentUpdated { + +} +[1532467690.517][DEBUG]: DEVTOOLS COMMAND DOM.getDocument (id=7) { + +} +[1532467690.517][DEBUG]: DEVTOOLS EVENT Page.domContentEventFired { + "timestamp": 80374.802614 +} +[1532467690.517][DEBUG]: DEVTOOLS RESPONSE Page.enable (id=5) { + +} +[1532467690.534][DEBUG]: DEVTOOLS EVENT Page.frameResized { + +} +[1532467690.546][DEBUG]: DEVTOOLS RESPONSE DOM.getDocument (id=6) { + "root": { + "backendNodeId": 5, + "baseURL": "data:,", + "childNodeCount": 1, + "children": [ { + "attributes": [ ], + "backendNodeId": 6, + "childNodeCount": 2, + "children": [ { + "attributes": [ ], + "backendNodeId": 7, + "childNodeCount": 0, + "localName": "head", + "nodeId": 7, + "nodeName": "HEAD", + "nodeType": 1, + "nodeValue": "", + "parentId": 6 + }, { + "attributes": [ ], + "backendNodeId": 8, + "childNodeCount": 0, + "localName": "body", + "nodeId": 8, + "nodeName": "BODY", + "nodeType": 1, + "nodeValue": "", + "parentId": 6 + } ], + "frameId": "BB0A76AFCB158F70A95289BD434E449D", + "localName": "html", + "nodeId": 6, + "nodeName": "HTML", + "nodeType": 1, + "nodeValue": "", + "parentId": 5 + } ], + "documentURL": "data:,", + "localName": "", + "nodeId": 5, + "nodeName": "#document", + "nodeType": 9, + "nodeValue": "", + "xmlVersion": "" + } +} +[1532467690.547][DEBUG]: DEVTOOLS RESPONSE DOM.getDocument (id=7) { + "root": { + "backendNodeId": 5, + "baseURL": "data:,", + "childNodeCount": 1, + "children": [ { + "attributes": [ ], + "backendNodeId": 6, + "childNodeCount": 2, + "children": [ { + "attributes": [ ], + "backendNodeId": 7, + "childNodeCount": 0, + "localName": "head", + "nodeId": 11, + "nodeName": "HEAD", + "nodeType": 1, + "nodeValue": "", + "parentId": 10 + }, { + "attributes": [ ], + "backendNodeId": 8, + "childNodeCount": 0, + "localName": "body", + "nodeId": 12, + "nodeName": "BODY", + "nodeType": 1, + "nodeValue": "", + "parentId": 10 + } ], + "frameId": "BB0A76AFCB158F70A95289BD434E449D", + "localName": "html", + "nodeId": 10, + "nodeName": "HTML", + "nodeType": 1, + "nodeValue": "", + "parentId": 9 + } ], + "documentURL": "data:,", + "localName": "", + "nodeId": 9, + "nodeName": "#document", + "nodeType": 9, + "nodeValue": "", + "xmlVersion": "" + } +} +[1532467690.548][DEBUG]: DEVTOOLS COMMAND Runtime.enable (id=8) { + +} +[1532467690.573][DEBUG]: DEVTOOLS EVENT Runtime.executionContextCreated { + "context": { + "auxData": { + "frameId": "BB0A76AFCB158F70A95289BD434E449D", + "isDefault": true + }, + "id": 1, + "name": "", + "origin": "://" + } +} +[1532467690.573][DEBUG]: DEVTOOLS RESPONSE Runtime.enable (id=8) { + +} +[1532467690.573][DEBUG]: DEVTOOLS COMMAND Page.enable (id=9) { + +} +[1532467690.574][DEBUG]: DEVTOOLS RESPONSE Page.enable (id=9) { + +} +[1532467690.575][DEBUG]: DEVTOOLS COMMAND Runtime.enable (id=10) { + +} +[1532467690.591][DEBUG]: DEVTOOLS RESPONSE Runtime.enable (id=10) { + +} +[1532467690.593][DEBUG]: DEVTOOLS COMMAND Runtime.evaluate (id=11) { + "expression": "(function() { // Copyright (c) 2012 The Chromium Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style license that can be\n// found in the LICENSE file.\n\n/**\n * Enum f...", + "returnByValue": true +} +[1532467690.617][DEBUG]: DEVTOOLS RESPONSE Runtime.evaluate (id=11) { + "result": { + "type": "object", + "value": { + "status": 0, + "value": 1 + } + } +} +[1532467690.617][INFO]: [9e6cd63b5801df2e42c9c4179a2a2828] RESPONSE InitSession { + "acceptInsecureCerts": false, + "acceptSslCerts": false, + "applicationCacheEnabled": false, + "browserConnectionEnabled": false, + "browserName": "chrome", + "chrome": { + "chromedriverVersion": "2.40 (1ba6d2ec0853ea1d507bccc09f540f5ea1db0394)", + "userDataDir": "/tmp/.org.chromium.Chromium.aYnWT8" + }, + "cssSelectorsEnabled": true, + "databaseEnabled": false, + "goog:chromeOptions": { + "debuggerAddress": "localhost:34937" + }, + "handlesAlerts": true, + "hasTouchScreen": false, + "javascriptEnabled": true, + "locationContextEnabled": true, + "mobileEmulationEnabled": false, + "nativeEvents": true, + "networkConnectionEnabled": false, + "pageLoadStrategy": "normal", + "platform": "Linux", + "rotatable": false, + "setWindowRect": true, + "takesHeapSnapshot": true, + "takesScreenshot": true, + "unexpectedAlertBehaviour": "", + "version": "69.0.3491.0", + "webStorageEnabled": true +} +[1532467690.618][INFO]: [9e6cd63b5801df2e42c9c4179a2a2828] COMMAND Navigate { + "url": "http://127.0.0.1:36113/chromedriver/console_log.html" +} +[1532467690.619][INFO]: Waiting for pending navigations... +[1532467690.619][DEBUG]: DEVTOOLS COMMAND Runtime.evaluate (id=12) { + "expression": "1" +} +[1532467690.623][DEBUG]: DEVTOOLS RESPONSE Runtime.evaluate (id=12) { + "result": { + "description": "1", + "type": "number", + "value": 1 + } +} +[1532467690.623][INFO]: Done waiting for pending navigations. Status: ok +[1532467690.623][DEBUG]: DEVTOOLS COMMAND Page.navigate (id=13) { + "url": "http://127.0.0.1:36113/chromedriver/console_log.html" +} +[1532467690.931][DEBUG]: DEVTOOLS RESPONSE Page.navigate (id=13) { + "frameId": "BB0A76AFCB158F70A95289BD434E449D", + "loaderId": "4B878F7658DCFE48821D50FAAFBC971B" +} +[1532467690.931][DEBUG]: DEVTOOLS COMMAND Runtime.evaluate (id=14) { + "expression": "document.URL" +} +[1532467690.935][DEBUG]: DEVTOOLS EVENT Runtime.executionContextsCleared { + +} +[1532467690.953][DEBUG]: DEVTOOLS EVENT Page.frameStartedLoading { + "frameId": "BB0A76AFCB158F70A95289BD434E449D" +} +[1532467691.003][DEBUG]: DEVTOOLS EVENT Runtime.executionContextsCleared { + +} +[260828:260828:0724/142811.002914:ERROR:render_process_impl.cc(208)] WebFrame LEAKED 1 TIMES +[1532467691.003][DEBUG]: DEVTOOLS EVENT Page.frameNavigated { + "frame": { + "id": "BB0A76AFCB158F70A95289BD434E449D", + "loaderId": "4B878F7658DCFE48821D50FAAFBC971B", + "mimeType": "text/html", + "securityOrigin": "http://127.0.0.1:36113", + "url": "http://127.0.0.1:36113/chromedriver/console_log.html" + } +} +[1532467691.003][DEBUG]: DEVTOOLS EVENT Runtime.executionContextCreated { + "context": { + "auxData": { + "frameId": "BB0A76AFCB158F70A95289BD434E449D", + "isDefault": true + }, + "id": 1, + "name": "", + "origin": "http://127.0.0.1:36113" + } +} +[1532467691.004][DEBUG]: DEVTOOLS EVENT DOM.documentUpdated { + +} +[1532467691.004][DEBUG]: DEVTOOLS COMMAND DOM.getDocument (id=15) { + +} +[260784:260784:0724/142811.030906:INFO:CONSOLE(5)] "Uncaught TypeError: Cannot read property 'y' of undefined", source: http://127.0.0.1:36113/chromedriver/console_log.html (5) +[1532467691.035][DEBUG]: DEVTOOLS EVENT Runtime.exceptionThrown { + "exceptionDetails": { + "columnNumber": 35, + "exception": { + "className": "TypeError", + "description": "TypeError: Cannot read property 'y' of undefined\n at http://127.0.0.1:36113/chromedriver/console_log.html:5:36", + "objectId": "{\"injectedScriptId\":1,\"id\":1}", + "preview": { + "description": "TypeError: Cannot read property 'y' of undefined\n at http://127.0.0.1:36113/chromedriver/console_log.html:5:36", + "overflow": false, + "properties": [ { + "name": "stack", + "type": "string", + "value": "TypeError: Cannot read property 'y' of undefined\n …27.0.0.1:36113/chromedriver/console_log.html:5:36" + }, { + "name": "message", + "type": "string", + "value": "Cannot read property 'y' of undefined" + } ], + "subtype": "error", + "type": "object" + }, + "subtype": "error", + "type": "object" + }, + "exceptionId": 1, + "executionContextId": 1, + "lineNumber": 4, + "stackTrace": { + "callFrames": [ { + "columnNumber": 35, + "functionName": "", + "lineNumber": 4, + "scriptId": "17", + "url": "http://127.0.0.1:36113/chromedriver/console_log.html" + } ] + }, + "text": "Uncaught", + "url": "http://127.0.0.1:36113/chromedriver/console_log.html" + }, + "timestamp": 1532467690994.812 +} +[1532467691.037][DEBUG]: DEVTOOLS EVENT DOM.documentUpdated { + +} +[1532467691.037][DEBUG]: DEVTOOLS COMMAND DOM.getDocument (id=16) { + +} +[1532467691.038][DEBUG]: DEVTOOLS EVENT Page.domContentEventFired { + "timestamp": 80375.353963 +} +[1532467691.038][DEBUG]: DEVTOOLS RESPONSE Runtime.evaluate (id=14) { + "result": { + "type": "string", + "value": "http://127.0.0.1:36113/chromedriver/console_log.html" + } +} +[1532467691.038][DEBUG]: DEVTOOLS EVENT Log.entryAdded { + "entry": { + "level": "error", + "networkRequestId": "1000260865.2", + "source": "network", + "text": "Failed to load resource: the server responded with a status of 404 (Not Found)", + "timestamp": 1532467691013.88, + "url": "http://127.0.0.1:36113/chromedriver/nonexistent.png" + } +} +[1532467691.068][DEBUG]: DEVTOOLS EVENT Page.loadEventFired { + "timestamp": 80375.361013 +} +[1532467691.068][DEBUG]: DEVTOOLS EVENT Page.frameStoppedLoading { + "frameId": "BB0A76AFCB158F70A95289BD434E449D" +} +[1532467691.072][DEBUG]: DEVTOOLS RESPONSE DOM.getDocument (id=15) { + "root": { + "backendNodeId": 1, + "baseURL": "http://127.0.0.1:36113/chromedriver/console_log.html", + "childNodeCount": 2, + "children": [ { + "backendNodeId": 2, + "localName": "", + "nodeId": 2, + "nodeName": "html", + "nodeType": 10, + "nodeValue": "", + "parentId": 1, + "publicId": "", + "systemId": "" + }, { + "attributes": [ ], + "backendNodeId": 3, + "childNodeCount": 2, + "children": [ { + "attributes": [ ], + "backendNodeId": 4, + "childNodeCount": 0, + "localName": "head", + "nodeId": 4, + "nodeName": "HEAD", + "nodeType": 1, + "nodeValue": "", + "parentId": 3 + }, { + "attributes": [ ], + "backendNodeId": 5, + "childNodeCount": 2, + "localName": "body", + "nodeId": 5, + "nodeName": "BODY", + "nodeType": 1, + "nodeValue": "", + "parentId": 3 + } ], + "frameId": "BB0A76AFCB158F70A95289BD434E449D", + "localName": "html", + "nodeId": 3, + "nodeName": "HTML", + "nodeType": 1, + "nodeValue": "", + "parentId": 1 + } ], + "documentURL": "http://127.0.0.1:36113/chromedriver/console_log.html", + "localName": "", + "nodeId": 1, + "nodeName": "#document", + "nodeType": 9, + "nodeValue": "", + "xmlVersion": "" + } +} +[1532467691.073][DEBUG]: DEVTOOLS RESPONSE DOM.getDocument (id=16) { + "root": { + "backendNodeId": 1, + "baseURL": "http://127.0.0.1:36113/chromedriver/console_log.html", + "childNodeCount": 2, + "children": [ { + "backendNodeId": 2, + "localName": "", + "nodeId": 7, + "nodeName": "html", + "nodeType": 10, + "nodeValue": "", + "parentId": 6, + "publicId": "", + "systemId": "" + }, { + "attributes": [ ], + "backendNodeId": 3, + "childNodeCount": 2, + "children": [ { + "attributes": [ ], + "backendNodeId": 4, + "childNodeCount": 0, + "localName": "head", + "nodeId": 9, + "nodeName": "HEAD", + "nodeType": 1, + "nodeValue": "", + "parentId": 8 + }, { + "attributes": [ ], + "backendNodeId": 5, + "childNodeCount": 2, + "localName": "body", + "nodeId": 10, + "nodeName": "BODY", + "nodeType": 1, + "nodeValue": "", + "parentId": 8 + } ], + "frameId": "BB0A76AFCB158F70A95289BD434E449D", + "localName": "html", + "nodeId": 8, + "nodeName": "HTML", + "nodeType": 1, + "nodeValue": "", + "parentId": 6 + } ], + "documentURL": "http://127.0.0.1:36113/chromedriver/console_log.html", + "localName": "", + "nodeId": 6, + "nodeName": "#document", + "nodeType": 9, + "nodeValue": "", + "xmlVersion": "" + } +} +[1532467691.073][INFO]: Waiting for pending navigations... +[1532467691.074][DEBUG]: DEVTOOLS COMMAND Runtime.evaluate (id=17) { + "expression": "1" +} +[1532467691.093][DEBUG]: DEVTOOLS EVENT Log.entryAdded { + "entry": { + "level": "error", + "networkRequestId": "1000260865.4", + "source": "network", + "text": "Failed to load resource: the server responded with a status of 404 (Not Found)", + "timestamp": 1532467691075.33, + "url": "http://127.0.0.1:36113/favicon.ico" + } +} +[1532467691.094][DEBUG]: DEVTOOLS RESPONSE Runtime.evaluate (id=17) { + "result": { + "description": "1", + "type": "number", + "value": 1 + } +} +[1532467691.094][INFO]: Done waiting for pending navigations. Status: ok +[1532467691.094][INFO]: [9e6cd63b5801df2e42c9c4179a2a2828] RESPONSE Navigate +[1532467691.096][INFO]: [9e6cd63b5801df2e42c9c4179a2a2828] COMMAND GetLog { + "type": "browser" +} +[1532467691.096][DEBUG]: DEVTOOLS COMMAND Runtime.evaluate (id=18) { + "expression": "1", + "returnByValue": true +} +[1532467691.105][DEBUG]: DEVTOOLS RESPONSE Runtime.evaluate (id=18) { + "result": { + "description": "1", + "type": "number", + "value": 1 + } +} +[1532467691.105][INFO]: [9e6cd63b5801df2e42c9c4179a2a2828] RESPONSE GetLog [ { + "level": "SEVERE", + "message": "http://127.0.0.1:36113/chromedriver/console_log.html 4:35 Uncaught TypeError: Cannot read property 'y' of undefined", + "source": "javascript", + "timestamp": 1532467691035.0 +}, { + "level": "SEVERE", + "message": "http://127.0.0.1:36113/chromedriver/nonexistent.png - Failed to load resource: the server responded with a status of 404 (Not Found)", + "source": "network", + "timestamp": 1532467691038.0 +}, { + "level": "SEVERE", + "message": "http://127.0.0.1:36113/favicon.ico - Failed to load resource: the server responded with a status of 404 (Not Found)", + "source": "network", + "timestamp": 1532467691093.0 +} ] +[1532467691.107][INFO]: [9e6cd63b5801df2e42c9c4179a2a2828] COMMAND Quit { + +} +[0724/142811.120269:ERROR:nacl_helper_linux.cc(310)] NaCl helper process running without a sandbox! +Most likely you need to configure your SUID sandbox correctly +[1532467691.157][INFO]: [9e6cd63b5801df2e42c9c4179a2a2828] RESPONSE Quit +[1532467691.157][DEBUG]: Log type 'driver' lost 0 entries on destruction +[1532467691.157][DEBUG]: Log type 'browser' lost 0 entries on destruction
diff --git a/chrome/test/chromedriver/log_replay/test_data/testDownload.log b/chrome/test/chromedriver/log_replay/test_data/testDownload.log new file mode 100644 index 0000000..47c9424f --- /dev/null +++ b/chrome/test/chromedriver/log_replay/test_data/testDownload.log
@@ -0,0 +1,888 @@ +[1532469351.412][INFO]: [bfac83d4b0555990954e5d16c491ce5a] COMMAND InitSession { + "desiredCapabilities": { + "chromeOptions": { + "args": [ "no-sandbox", "disable-gpu" ], + "binary": "/usr/local/google/home/cwinstanley/chromium/src/out/Default/chrome", + "prefs": { + "download": { + "default_directory": "/tmp/tmpXEOgN7" + } + } + }, + "goog:testName": "__main__.ChromeDownloadDirTest.testFileDownloadWithClick", + "loggingPrefs": { + + } + } +} +[1532469351.413][INFO]: Populating Preferences file: { + "alternate_error_pages": { + "enabled": false + }, + "autofill": { + "enabled": false + }, + "browser": { + "check_default_browser": false + }, + "distribution": { + "import_bookmarks": false, + "import_history": false, + "import_search_engine": false, + "make_chrome_default_for_user": false, + "skip_first_run_ui": true + }, + "dns_prefetching": { + "enabled": false + }, + "download": { + "default_directory": "/tmp/tmpXEOgN7" + }, + "profile": { + "content_settings": { + "pattern_pairs": { + "https://*,*": { + "media-stream": { + "audio": "Default", + "video": "Default" + } + } + } + }, + "default_content_setting_values": { + "geolocation": 1 + }, + "default_content_settings": { + "geolocation": 1, + "mouselock": 1, + "notifications": 1, + "popups": 1, + "ppapi-broker": 1 + }, + "password_manager_enabled": false + }, + "safebrowsing": { + "enabled": false + }, + "search": { + "suggest_enabled": false + }, + "translate": { + "enabled": false + } +} +[1532469351.413][INFO]: Populating Local State file: { + "background_mode": { + "enabled": false + }, + "ssl": { + "rev_checking": { + "enabled": false + } + } +} +[1532469351.414][INFO]: Launching chrome: /usr/local/google/home/cwinstanley/chromium/src/out/Default/chrome --disable-background-networking --disable-client-side-phishing-detection --disable-default-apps --disable-gpu --disable-hang-monitor --disable-popup-blocking --disable-prompt-on-repost --disable-sync --disable-web-resources --enable-automation --enable-logging --force-fieldtrials=SiteIsolationExtensions/Control --ignore-certificate-errors --load-extension=/tmp/.org.chromium.Chromium.VihwuW/internal --log-level=0 --metrics-recording-only --no-first-run --no-sandbox --password-store=basic --remote-debugging-port=0 --test-type=webdriver --use-mock-keychain --user-data-dir=/tmp/.org.chromium.Chromium.rp2nyM data:, +[26497:26497:0724/145553.372931:ERROR:gpu_process_transport_factory.cc(642)] Switching to software compositing. +[26497:26497:0724/145553.372999:ERROR:gpu_process_transport_factory.cc(1007)] Lost UI shared context. +[26497:26497:0724/145553.452871:WARNING:account_consistency_mode_manager.cc(290)] Desktop Identity Consistency cannot be enabled as no OAuth client ID and client secret have been configured. +[26497:26497:0724/145553.453019:WARNING:account_consistency_mode_manager.cc(290)] Desktop Identity Consistency cannot be enabled as no OAuth client ID and client secret have been configured. +[26497:26497:0724/145553.453068:WARNING:account_consistency_mode_manager.cc(290)] Desktop Identity Consistency cannot be enabled as no OAuth client ID and client secret have been configured. +[26497:26497:0724/145553.453115:WARNING:account_consistency_mode_manager.cc(290)] Desktop Identity Consistency cannot be enabled as no OAuth client ID and client secret have been configured. +[26497:26497:0724/145553.454130:WARNING:account_consistency_mode_manager.cc(290)] Desktop Identity Consistency cannot be enabled as no OAuth client ID and client secret have been configured. +[26497:26497:0724/145553.460569:WARNING:account_consistency_mode_manager.cc(290)] Desktop Identity Consistency cannot be enabled as no OAuth client ID and client secret have been configured. +[26497:26497:0724/145553.512225:WARNING:account_consistency_mode_manager.cc(290)] Desktop Identity Consistency cannot be enabled as no OAuth client ID and client secret have been configured. +[26497:26497:0724/145553.541295:WARNING:account_consistency_mode_manager.cc(290)] Desktop Identity Consistency cannot be enabled as no OAuth client ID and client secret have been configured. +[26497:26497:0724/145553.541368:WARNING:account_consistency_mode_manager.cc(290)] Desktop Identity Consistency cannot be enabled as no OAuth client ID and client secret have been configured. + +DevTools listening on ws://127.0.0.1:44351/devtools/browser/04a6974e-d5b7-41f8-bae5-26817e91e862 +[1532469353.560][DEBUG]: DevTools request: http://localhost:44351/json/version +[26497:26497:0724/145553.689429:WARNING:password_store_factory.cc(253)] Using basic (unencrypted) store for password storage. See https://chromium.googlesource.com/chromium/src/+/master/docs/linux_password_storage.md for more information about password storage options. +[26497:26497:0724/145553.693267:WARNING:account_consistency_mode_manager.cc(290)] Desktop Identity Consistency cannot be enabled as no OAuth client ID and client secret have been configured. +[1532469353.917][DEBUG]: DevTools response: { + "Browser": "Chrome/69.0.3491.0", + "Protocol-Version": "1.3", + "User-Agent": "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/69.0.3491.0 Safari/537.36", + "V8-Version": "6.9.389", + "WebKit-Version": "537.36 (@410f2c4912d46a5fae2fe6c0b2e24d9eb6359761)", + "webSocketDebuggerUrl": "ws://localhost:44351/devtools/browser/04a6974e-d5b7-41f8-bae5-26817e91e862" +} + +[1532469353.964][DEBUG]: DevTools request: http://localhost:44351/json +[1532469353.995][DEBUG]: DevTools response: [ { + "description": "", + "devtoolsFrontendUrl": "/devtools/inspector.html?ws=localhost:44351/devtools/page/3E74375F8DCBE2243E457F6D45B5B6A2", + "id": "3E74375F8DCBE2243E457F6D45B5B6A2", + "title": "Chrome Automation Extension", + "type": "background_page", + "url": "chrome-extension://aapnijgdinlhnhlmodcfapnahmbfebeb/_generated_background_page.html", + "webSocketDebuggerUrl": "ws://localhost:44351/devtools/page/3E74375F8DCBE2243E457F6D45B5B6A2" +}, { + "description": "", + "devtoolsFrontendUrl": "/devtools/inspector.html?ws=localhost:44351/devtools/page/DB46C1E8D5345FD079FE480792CEC367", + "id": "DB46C1E8D5345FD079FE480792CEC367", + "title": "", + "type": "page", + "url": "data:,", + "webSocketDebuggerUrl": "ws://localhost:44351/devtools/page/DB46C1E8D5345FD079FE480792CEC367" +} ] + +[1532469353.995][DEBUG]: DevTools request: http://localhost:44351/json +[1532469354.000][DEBUG]: DevTools response: [ { + "description": "", + "devtoolsFrontendUrl": "/devtools/inspector.html?ws=localhost:44351/devtools/page/3E74375F8DCBE2243E457F6D45B5B6A2", + "id": "3E74375F8DCBE2243E457F6D45B5B6A2", + "title": "Chrome Automation Extension", + "type": "background_page", + "url": "chrome-extension://aapnijgdinlhnhlmodcfapnahmbfebeb/_generated_background_page.html", + "webSocketDebuggerUrl": "ws://localhost:44351/devtools/page/3E74375F8DCBE2243E457F6D45B5B6A2" +}, { + "description": "", + "devtoolsFrontendUrl": "/devtools/inspector.html?ws=localhost:44351/devtools/page/DB46C1E8D5345FD079FE480792CEC367", + "id": "DB46C1E8D5345FD079FE480792CEC367", + "title": "", + "type": "page", + "url": "data:,", + "webSocketDebuggerUrl": "ws://localhost:44351/devtools/page/DB46C1E8D5345FD079FE480792CEC367" +} ] + +[1532469354.001][INFO]: resolved localhost to ["::1","127.0.0.1"] +[1532469354.003][DEBUG]: DEVTOOLS COMMAND Log.enable (id=1) { + +} +[1532469354.004][DEBUG]: DEVTOOLS COMMAND DOM.getDocument (id=2) { + +} +[1532469354.004][DEBUG]: DEVTOOLS COMMAND Target.setAutoAttach (id=3) { + "autoAttach": true, + "waitForDebuggerOnStart": false +} +[1532469354.004][DEBUG]: DEVTOOLS COMMAND Page.enable (id=4) { + +} +[1532469354.005][DEBUG]: DEVTOOLS COMMAND Page.enable (id=5) { + +} +[1532469354.017][DEBUG]: DEVTOOLS RESPONSE Log.enable (id=1) { + +} +[1532469354.019][DEBUG]: DEVTOOLS RESPONSE DOM.getDocument (id=2) { + "root": { + "backendNodeId": 1, + "baseURL": "about:blank", + "childNodeCount": 1, + "children": [ { + "attributes": [ ], + "backendNodeId": 2, + "childNodeCount": 2, + "children": [ { + "attributes": [ ], + "backendNodeId": 3, + "childNodeCount": 0, + "localName": "head", + "nodeId": 3, + "nodeName": "HEAD", + "nodeType": 1, + "nodeValue": "", + "parentId": 2 + }, { + "attributes": [ ], + "backendNodeId": 4, + "childNodeCount": 0, + "localName": "body", + "nodeId": 4, + "nodeName": "BODY", + "nodeType": 1, + "nodeValue": "", + "parentId": 2 + } ], + "frameId": "DB46C1E8D5345FD079FE480792CEC367", + "localName": "html", + "nodeId": 2, + "nodeName": "HTML", + "nodeType": 1, + "nodeValue": "", + "parentId": 1 + } ], + "documentURL": "", + "localName": "", + "nodeId": 1, + "nodeName": "#document", + "nodeType": 9, + "nodeValue": "", + "xmlVersion": "" + } +} +[1532469354.020][DEBUG]: DEVTOOLS RESPONSE Target.setAutoAttach (id=3) { + +} +[1532469354.020][DEBUG]: DEVTOOLS RESPONSE Page.enable (id=4) { + +} +[1532469354.020][DEBUG]: DEVTOOLS RESPONSE Page.enable (id=5) { + +} +[1532469354.021][DEBUG]: DEVTOOLS COMMAND Runtime.enable (id=6) { + +} +[1532469354.112][DEBUG]: DEVTOOLS EVENT Page.frameNavigated { + "frame": { + "id": "DB46C1E8D5345FD079FE480792CEC367", + "loaderId": "B8BA3E40DDE3C73A6BCEEA88C668E1AE", + "mimeType": "text/plain", + "securityOrigin": "://", + "url": "data:," + } +} +[1532469354.112][DEBUG]: DEVTOOLS EVENT DOM.documentUpdated { + +} +[1532469354.112][DEBUG]: DEVTOOLS COMMAND DOM.getDocument (id=7) { + +} +[1532469354.112][DEBUG]: DEVTOOLS EVENT Page.loadEventFired { + "timestamp": 82038.382129 +} +[1532469354.113][DEBUG]: DEVTOOLS EVENT Page.frameStoppedLoading { + "frameId": "DB46C1E8D5345FD079FE480792CEC367" +} +[1532469354.113][DEBUG]: DEVTOOLS EVENT DOM.documentUpdated { + +} +[1532469354.113][DEBUG]: DEVTOOLS COMMAND DOM.getDocument (id=8) { + +} +[1532469354.113][DEBUG]: DEVTOOLS EVENT Page.domContentEventFired { + "timestamp": 82038.385163 +} +[1532469354.133][DEBUG]: DEVTOOLS EVENT Runtime.executionContextCreated { + "context": { + "auxData": { + "frameId": "DB46C1E8D5345FD079FE480792CEC367", + "isDefault": true + }, + "id": 1, + "name": "", + "origin": "://" + } +} +[1532469354.133][DEBUG]: DEVTOOLS RESPONSE Runtime.enable (id=6) { + +} +[1532469354.135][DEBUG]: DEVTOOLS EVENT Page.frameResized { + +} +[1532469354.155][DEBUG]: DEVTOOLS RESPONSE DOM.getDocument (id=7) { + "root": { + "backendNodeId": 5, + "baseURL": "data:,", + "childNodeCount": 1, + "children": [ { + "attributes": [ ], + "backendNodeId": 6, + "childNodeCount": 2, + "children": [ { + "attributes": [ ], + "backendNodeId": 7, + "childNodeCount": 0, + "localName": "head", + "nodeId": 7, + "nodeName": "HEAD", + "nodeType": 1, + "nodeValue": "", + "parentId": 6 + }, { + "attributes": [ ], + "backendNodeId": 8, + "childNodeCount": 0, + "localName": "body", + "nodeId": 8, + "nodeName": "BODY", + "nodeType": 1, + "nodeValue": "", + "parentId": 6 + } ], + "frameId": "DB46C1E8D5345FD079FE480792CEC367", + "localName": "html", + "nodeId": 6, + "nodeName": "HTML", + "nodeType": 1, + "nodeValue": "", + "parentId": 5 + } ], + "documentURL": "data:,", + "localName": "", + "nodeId": 5, + "nodeName": "#document", + "nodeType": 9, + "nodeValue": "", + "xmlVersion": "" + } +} +[1532469354.156][DEBUG]: DEVTOOLS RESPONSE DOM.getDocument (id=8) { + "root": { + "backendNodeId": 5, + "baseURL": "data:,", + "childNodeCount": 1, + "children": [ { + "attributes": [ ], + "backendNodeId": 6, + "childNodeCount": 2, + "children": [ { + "attributes": [ ], + "backendNodeId": 7, + "childNodeCount": 0, + "localName": "head", + "nodeId": 11, + "nodeName": "HEAD", + "nodeType": 1, + "nodeValue": "", + "parentId": 10 + }, { + "attributes": [ ], + "backendNodeId": 8, + "childNodeCount": 0, + "localName": "body", + "nodeId": 12, + "nodeName": "BODY", + "nodeType": 1, + "nodeValue": "", + "parentId": 10 + } ], + "frameId": "DB46C1E8D5345FD079FE480792CEC367", + "localName": "html", + "nodeId": 10, + "nodeName": "HTML", + "nodeType": 1, + "nodeValue": "", + "parentId": 9 + } ], + "documentURL": "data:,", + "localName": "", + "nodeId": 9, + "nodeName": "#document", + "nodeType": 9, + "nodeValue": "", + "xmlVersion": "" + } +} +[1532469354.156][DEBUG]: DEVTOOLS COMMAND Page.enable (id=9) { + +} +[1532469354.201][DEBUG]: DEVTOOLS RESPONSE Page.enable (id=9) { + +} +[1532469354.201][DEBUG]: DEVTOOLS COMMAND Runtime.enable (id=10) { + +} +[1532469354.213][DEBUG]: DEVTOOLS RESPONSE Runtime.enable (id=10) { + +} +[1532469354.215][DEBUG]: DEVTOOLS COMMAND Runtime.evaluate (id=11) { + "expression": "(function() { // Copyright (c) 2012 The Chromium Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style license that can be\n// found in the LICENSE file.\n\n/**\n * Enum f...", + "returnByValue": true +} +[1532469354.233][DEBUG]: DEVTOOLS RESPONSE Runtime.evaluate (id=11) { + "result": { + "type": "object", + "value": { + "status": 0, + "value": 1 + } + } +} +[1532469354.233][INFO]: [bfac83d4b0555990954e5d16c491ce5a] RESPONSE InitSession { + "acceptInsecureCerts": false, + "acceptSslCerts": false, + "applicationCacheEnabled": false, + "browserConnectionEnabled": false, + "browserName": "chrome", + "chrome": { + "chromedriverVersion": "2.40 (1ba6d2ec0853ea1d507bccc09f540f5ea1db0394)", + "userDataDir": "/tmp/.org.chromium.Chromium.rp2nyM" + }, + "cssSelectorsEnabled": true, + "databaseEnabled": false, + "goog:chromeOptions": { + "debuggerAddress": "localhost:44351" + }, + "handlesAlerts": true, + "hasTouchScreen": false, + "javascriptEnabled": true, + "locationContextEnabled": true, + "mobileEmulationEnabled": false, + "nativeEvents": true, + "networkConnectionEnabled": false, + "pageLoadStrategy": "normal", + "platform": "Linux", + "rotatable": false, + "setWindowRect": true, + "takesHeapSnapshot": true, + "takesScreenshot": true, + "unexpectedAlertBehaviour": "", + "version": "69.0.3491.0", + "webStorageEnabled": true +} +[1532469354.235][INFO]: [bfac83d4b0555990954e5d16c491ce5a] COMMAND Navigate { + "url": "http://127.0.0.1:40171/chromedriver/download.html" +} +[1532469354.235][INFO]: Waiting for pending navigations... +[1532469354.235][DEBUG]: DEVTOOLS COMMAND Runtime.evaluate (id=12) { + "expression": "1" +} +[1532469354.240][DEBUG]: DEVTOOLS RESPONSE Runtime.evaluate (id=12) { + "result": { + "description": "1", + "type": "number", + "value": 1 + } +} +[1532469354.241][INFO]: Done waiting for pending navigations. Status: ok +[1532469354.241][DEBUG]: DEVTOOLS COMMAND Page.navigate (id=13) { + "url": "http://127.0.0.1:40171/chromedriver/download.html" +} +[1532469354.490][DEBUG]: DEVTOOLS RESPONSE Page.navigate (id=13) { + "frameId": "DB46C1E8D5345FD079FE480792CEC367", + "loaderId": "C3D993E77A1C23FC4FCE28F660A9F2F2" +} +[1532469354.490][DEBUG]: DEVTOOLS COMMAND Runtime.evaluate (id=14) { + "expression": "document.URL" +} +[1532469354.499][DEBUG]: DEVTOOLS EVENT Runtime.executionContextsCleared { + +} +[1532469354.519][DEBUG]: DEVTOOLS EVENT Page.frameStartedLoading { + "frameId": "DB46C1E8D5345FD079FE480792CEC367" +} +[26543:26543:0724/145554.579530:ERROR:render_process_impl.cc(208)] WebFrame LEAKED 1 TIMES +[1532469354.595][DEBUG]: DEVTOOLS EVENT Runtime.executionContextsCleared { + +} +[1532469354.595][DEBUG]: DEVTOOLS EVENT Page.frameNavigated { + "frame": { + "id": "DB46C1E8D5345FD079FE480792CEC367", + "loaderId": "C3D993E77A1C23FC4FCE28F660A9F2F2", + "mimeType": "text/html", + "securityOrigin": "http://127.0.0.1:40171", + "url": "http://127.0.0.1:40171/chromedriver/download.html" + } +} +[1532469354.596][DEBUG]: DEVTOOLS EVENT Runtime.executionContextCreated { + "context": { + "auxData": { + "frameId": "DB46C1E8D5345FD079FE480792CEC367", + "isDefault": true + }, + "id": 1, + "name": "", + "origin": "http://127.0.0.1:40171" + } +} +[1532469354.596][DEBUG]: DEVTOOLS EVENT DOM.documentUpdated { + +} +[1532469354.596][DEBUG]: DEVTOOLS COMMAND DOM.getDocument (id=15) { + +} +[1532469354.597][DEBUG]: DEVTOOLS RESPONSE Runtime.evaluate (id=14) { + "result": { + "type": "string", + "value": "http://127.0.0.1:40171/chromedriver/download.html" + } +} +[1532469354.630][DEBUG]: DEVTOOLS EVENT Page.loadEventFired { + "timestamp": 82038.915277 +} +[1532469354.630][DEBUG]: DEVTOOLS EVENT Page.frameStoppedLoading { + "frameId": "DB46C1E8D5345FD079FE480792CEC367" +} +[1532469354.630][DEBUG]: DEVTOOLS EVENT DOM.documentUpdated { + +} +[1532469354.631][DEBUG]: DEVTOOLS COMMAND DOM.getDocument (id=16) { + +} +[1532469354.631][DEBUG]: DEVTOOLS EVENT Page.domContentEventFired { + "timestamp": 82038.949088 +} +[1532469354.634][DEBUG]: DEVTOOLS RESPONSE DOM.getDocument (id=15) { + "root": { + "backendNodeId": 1, + "baseURL": "http://127.0.0.1:40171/chromedriver/download.html", + "childNodeCount": 1, + "children": [ { + "attributes": [ ], + "backendNodeId": 2, + "childNodeCount": 2, + "children": [ { + "attributes": [ ], + "backendNodeId": 3, + "childNodeCount": 1, + "localName": "head", + "nodeId": 3, + "nodeName": "HEAD", + "nodeType": 1, + "nodeValue": "", + "parentId": 2 + }, { + "attributes": [ ], + "backendNodeId": 4, + "childNodeCount": 1, + "localName": "body", + "nodeId": 4, + "nodeName": "BODY", + "nodeType": 1, + "nodeValue": "", + "parentId": 2 + } ], + "frameId": "DB46C1E8D5345FD079FE480792CEC367", + "localName": "html", + "nodeId": 2, + "nodeName": "HTML", + "nodeType": 1, + "nodeValue": "", + "parentId": 1 + } ], + "documentURL": "http://127.0.0.1:40171/chromedriver/download.html", + "localName": "", + "nodeId": 1, + "nodeName": "#document", + "nodeType": 9, + "nodeValue": "", + "xmlVersion": "" + } +} +[1532469354.655][DEBUG]: DEVTOOLS RESPONSE DOM.getDocument (id=16) { + "root": { + "backendNodeId": 1, + "baseURL": "http://127.0.0.1:40171/chromedriver/download.html", + "childNodeCount": 1, + "children": [ { + "attributes": [ ], + "backendNodeId": 2, + "childNodeCount": 2, + "children": [ { + "attributes": [ ], + "backendNodeId": 3, + "childNodeCount": 1, + "localName": "head", + "nodeId": 7, + "nodeName": "HEAD", + "nodeType": 1, + "nodeValue": "", + "parentId": 6 + }, { + "attributes": [ ], + "backendNodeId": 4, + "childNodeCount": 1, + "localName": "body", + "nodeId": 8, + "nodeName": "BODY", + "nodeType": 1, + "nodeValue": "", + "parentId": 6 + } ], + "frameId": "DB46C1E8D5345FD079FE480792CEC367", + "localName": "html", + "nodeId": 6, + "nodeName": "HTML", + "nodeType": 1, + "nodeValue": "", + "parentId": 5 + } ], + "documentURL": "http://127.0.0.1:40171/chromedriver/download.html", + "localName": "", + "nodeId": 5, + "nodeName": "#document", + "nodeType": 9, + "nodeValue": "", + "xmlVersion": "" + } +} +[1532469354.656][INFO]: Waiting for pending navigations... +[1532469354.656][DEBUG]: DEVTOOLS EVENT Log.entryAdded { + "entry": { + "level": "error", + "networkRequestId": "1000026580.2", + "source": "network", + "text": "Failed to load resource: the server responded with a status of 404 (Not Found)", + "timestamp": 1532469354639.63, + "url": "http://127.0.0.1:40171/favicon.ico" + } +} +[1532469354.656][DEBUG]: DEVTOOLS COMMAND Runtime.evaluate (id=17) { + "expression": "1" +} +[1532469354.671][DEBUG]: DEVTOOLS RESPONSE Runtime.evaluate (id=17) { + "result": { + "description": "1", + "type": "number", + "value": 1 + } +} +[1532469354.671][INFO]: Done waiting for pending navigations. Status: ok +[1532469354.671][INFO]: [bfac83d4b0555990954e5d16c491ce5a] RESPONSE Navigate +[1532469354.673][INFO]: [bfac83d4b0555990954e5d16c491ce5a] COMMAND FindElement { + "using": "id", + "value": "red-dot" +} +[1532469354.673][INFO]: Waiting for pending navigations... +[1532469354.673][DEBUG]: DEVTOOLS COMMAND Runtime.evaluate (id=18) { + "expression": "1" +} +[1532469354.675][DEBUG]: DEVTOOLS RESPONSE Runtime.evaluate (id=18) { + "result": { + "description": "1", + "type": "number", + "value": 1 + } +} +[1532469354.675][INFO]: Done waiting for pending navigations. Status: ok +[1532469354.679][DEBUG]: DEVTOOLS COMMAND Runtime.evaluate (id=19) { + "expression": "(function() { // Copyright (c) 2012 The Chromium Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style license that can be\n// found in the LICENSE file.\n\n/**\n * Enum f...", + "returnByValue": true +} +[1532469354.714][DEBUG]: DEVTOOLS RESPONSE Runtime.evaluate (id=19) { + "result": { + "type": "object", + "value": { + "status": 0, + "value": { + "ELEMENT": "0.011172723541057694-1" + } + } + } +} +[1532469354.714][INFO]: Waiting for pending navigations... +[1532469354.714][DEBUG]: DEVTOOLS COMMAND Runtime.evaluate (id=20) { + "expression": "1" +} +[1532469354.726][DEBUG]: DEVTOOLS RESPONSE Runtime.evaluate (id=20) { + "result": { + "description": "1", + "type": "number", + "value": 1 + } +} +[1532469354.726][INFO]: Done waiting for pending navigations. Status: ok +[1532469354.726][INFO]: [bfac83d4b0555990954e5d16c491ce5a] RESPONSE FindElement { + "ELEMENT": "0.011172723541057694-1" +} +[1532469354.728][INFO]: [bfac83d4b0555990954e5d16c491ce5a] COMMAND ClickElement { + "id": "0.011172723541057694-1" +} +[1532469354.728][INFO]: Waiting for pending navigations... +[1532469354.729][DEBUG]: DEVTOOLS COMMAND Runtime.evaluate (id=21) { + "expression": "1" +} +[1532469354.730][DEBUG]: DEVTOOLS RESPONSE Runtime.evaluate (id=21) { + "result": { + "description": "1", + "type": "number", + "value": 1 + } +} +[1532469354.730][INFO]: Done waiting for pending navigations. Status: ok +[1532469354.731][DEBUG]: DEVTOOLS COMMAND Runtime.evaluate (id=22) { + "expression": "(function() { // Copyright (c) 2012 The Chromium Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style license that can be\n// found in the LICENSE file.\n\n/**\n * Enum f...", + "returnByValue": true +} +[1532469354.736][DEBUG]: DEVTOOLS RESPONSE Runtime.evaluate (id=22) { + "result": { + "type": "object", + "value": { + "status": 0, + "value": "a" + } + } +} +[1532469354.737][DEBUG]: DEVTOOLS COMMAND Runtime.evaluate (id=23) { + "expression": "(function() { // Copyright (c) 2012 The Chromium Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style license that can be\n// found in the LICENSE file.\n\n/**\n * Enum f...", + "returnByValue": true +} +[1532469354.740][DEBUG]: DEVTOOLS RESPONSE Runtime.evaluate (id=23) { + "result": { + "type": "object", + "value": { + "status": 0, + "value": "a" + } + } +} +[1532469354.744][DEBUG]: DEVTOOLS COMMAND Runtime.evaluate (id=24) { + "expression": "(function() { // Copyright (c) 2012 The Chromium Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style license that can be\n// found in the LICENSE file.\n\n/**\n * Enum f...", + "returnByValue": true +} +[1532469354.774][DEBUG]: DEVTOOLS RESPONSE Runtime.evaluate (id=24) { + "result": { + "type": "object", + "value": { + "status": 0, + "value": true + } + } +} +[1532469354.775][DEBUG]: DEVTOOLS COMMAND Runtime.evaluate (id=25) { + "expression": "(function() { // Copyright (c) 2012 The Chromium Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style license that can be\n// found in the LICENSE file.\n\n/**\n * Enum f...", + "returnByValue": true +} +[1532469354.786][DEBUG]: DEVTOOLS RESPONSE Runtime.evaluate (id=25) { + "result": { + "type": "object", + "value": { + "status": 0, + "value": { + "height": 17, + "left": 0, + "top": 0, + "width": 129.75 + } + } + } +} +[1532469354.788][DEBUG]: DEVTOOLS COMMAND Runtime.evaluate (id=26) { + "expression": "(function() { // Copyright (c) 2012 The Chromium Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style license that can be\n// found in the LICENSE file.\n\n/**\n * Enum f...", + "returnByValue": true +} +[1532469354.811][DEBUG]: DEVTOOLS RESPONSE Runtime.evaluate (id=26) { + "result": { + "type": "object", + "value": { + "status": 0, + "value": { + "ceil": { + + }, + "clone": { + + }, + "floor": { + + }, + "round": { + + }, + "scale": { + + }, + "toString": { + + }, + "translate": { + + }, + "x": 8, + "y": 8 + } + } + } +} +[1532469354.814][DEBUG]: DEVTOOLS COMMAND Runtime.evaluate (id=27) { + "expression": "(function() { // Copyright (c) 2012 The Chromium Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style license that can be\n// found in the LICENSE file.\n\n/**\n * Enum f...", + "returnByValue": true +} +[1532469354.831][DEBUG]: DEVTOOLS RESPONSE Runtime.evaluate (id=27) { + "result": { + "type": "object", + "value": { + "status": 0, + "value": { + "clickable": true + } + } + } +} +[1532469354.832][DEBUG]: DEVTOOLS COMMAND Input.dispatchMouseEvent (id=28) { + "button": "none", + "clickCount": 0, + "modifiers": 0, + "type": "mouseMoved", + "x": 72, + "y": 16 +} +[1532469354.838][DEBUG]: DEVTOOLS RESPONSE Input.dispatchMouseEvent (id=28) { + +} +[1532469354.838][DEBUG]: DEVTOOLS COMMAND Input.dispatchMouseEvent (id=29) { + "button": "left", + "clickCount": 1, + "modifiers": 0, + "type": "mousePressed", + "x": 72, + "y": 16 +} +[1532469354.846][DEBUG]: DEVTOOLS RESPONSE Input.dispatchMouseEvent (id=29) { + +} +[1532469354.846][DEBUG]: DEVTOOLS COMMAND Input.dispatchMouseEvent (id=30) { + "button": "left", + "clickCount": 1, + "modifiers": 0, + "type": "mouseReleased", + "x": 72, + "y": 16 +} +[1532469354.850][DEBUG]: DEVTOOLS RESPONSE Input.dispatchMouseEvent (id=30) { + +} +[1532469354.850][INFO]: Waiting for pending navigations... +[1532469354.850][DEBUG]: DEVTOOLS COMMAND Runtime.evaluate (id=31) { + "expression": "1" +} +[1532469354.858][DEBUG]: DEVTOOLS RESPONSE Runtime.evaluate (id=31) { + "result": { + "description": "1", + "type": "number", + "value": 1 + } +} +[1532469354.858][INFO]: Done waiting for pending navigations. Status: ok +[1532469354.858][INFO]: [bfac83d4b0555990954e5d16c491ce5a] RESPONSE ClickElement +[1532469354.960][INFO]: [bfac83d4b0555990954e5d16c491ce5a] COMMAND GetUrl { + +} +[1532469354.960][INFO]: Waiting for pending navigations... +[1532469354.960][DEBUG]: DEVTOOLS COMMAND Runtime.evaluate (id=32) { + "expression": "1" +} +[1532469354.962][DEBUG]: DEVTOOLS RESPONSE Runtime.evaluate (id=32) { + "result": { + "description": "1", + "type": "number", + "value": 1 + } +} +[1532469354.962][INFO]: Done waiting for pending navigations. Status: ok +[1532469354.963][DEBUG]: DEVTOOLS COMMAND Runtime.evaluate (id=33) { + "expression": "(function() { // Copyright (c) 2012 The Chromium Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style license that can be\n// found in the LICENSE file.\n\n/**\n * Enum f...", + "returnByValue": true +} +[1532469354.968][DEBUG]: DEVTOOLS RESPONSE Runtime.evaluate (id=33) { + "result": { + "type": "object", + "value": { + "status": 0, + "value": "http://127.0.0.1:40171/chromedriver/download.html" + } + } +} +[1532469354.968][INFO]: Waiting for pending navigations... +[1532469354.968][DEBUG]: DEVTOOLS COMMAND Runtime.evaluate (id=34) { + "expression": "1" +} +[1532469354.974][DEBUG]: DEVTOOLS RESPONSE Runtime.evaluate (id=34) { + "result": { + "description": "1", + "type": "number", + "value": 1 + } +} +[1532469354.974][INFO]: Done waiting for pending navigations. Status: ok +[1532469354.974][INFO]: [bfac83d4b0555990954e5d16c491ce5a] RESPONSE GetUrl "http://127.0.0.1:40171/chromedriver/download.html" +[1532469354.975][INFO]: [bfac83d4b0555990954e5d16c491ce5a] COMMAND Quit { + +} +[0724/145554.989573:ERROR:nacl_helper_linux.cc(310)] NaCl helper process running without a sandbox! +Most likely you need to configure your SUID sandbox correctly +[1532469355.026][INFO]: [bfac83d4b0555990954e5d16c491ce5a] RESPONSE Quit +[1532469355.026][DEBUG]: Log type 'driver' lost 0 entries on destruction +[1532469355.026][DEBUG]: Log type 'browser' lost 1 entries on destruction
diff --git a/chrome/test/chromedriver/log_replay/test_data/testEmulateNetwork.log b/chrome/test/chromedriver/log_replay/test_data/testEmulateNetwork.log new file mode 100644 index 0000000..612d706 --- /dev/null +++ b/chrome/test/chromedriver/log_replay/test_data/testEmulateNetwork.log
@@ -0,0 +1,546 @@ +[1532467907.543][INFO]: [072a3bc4ef0a403370cbf2994959c16f] COMMAND InitSession { + "desiredCapabilities": { + "chromeOptions": { + "args": [ "no-sandbox", "disable-gpu" ], + "binary": "/usr/local/google/home/cwinstanley/chromium/src/out/Default/chrome" + }, + "goog:testName": "__main__.ChromeDriverTest.testEmulateNetworkConditions", + "loggingPrefs": { + + } + } +} +[1532467907.544][INFO]: Populating Preferences file: { + "alternate_error_pages": { + "enabled": false + }, + "autofill": { + "enabled": false + }, + "browser": { + "check_default_browser": false + }, + "distribution": { + "import_bookmarks": false, + "import_history": false, + "import_search_engine": false, + "make_chrome_default_for_user": false, + "skip_first_run_ui": true + }, + "dns_prefetching": { + "enabled": false + }, + "profile": { + "content_settings": { + "pattern_pairs": { + "https://*,*": { + "media-stream": { + "audio": "Default", + "video": "Default" + } + } + } + }, + "default_content_setting_values": { + "geolocation": 1 + }, + "default_content_settings": { + "geolocation": 1, + "mouselock": 1, + "notifications": 1, + "popups": 1, + "ppapi-broker": 1 + }, + "password_manager_enabled": false + }, + "safebrowsing": { + "enabled": false + }, + "search": { + "suggest_enabled": false + }, + "translate": { + "enabled": false + } +} +[1532467907.544][INFO]: Populating Local State file: { + "background_mode": { + "enabled": false + }, + "ssl": { + "rev_checking": { + "enabled": false + } + } +} +[1532467907.546][INFO]: Launching chrome: /usr/local/google/home/cwinstanley/chromium/src/out/Default/chrome --disable-background-networking --disable-client-side-phishing-detection --disable-default-apps --disable-gpu --disable-hang-monitor --disable-popup-blocking --disable-prompt-on-repost --disable-sync --disable-web-resources --enable-automation --enable-logging --force-fieldtrials=SiteIsolationExtensions/Control --ignore-certificate-errors --load-extension=/tmp/.org.chromium.Chromium.NlAmsu/internal --log-level=0 --metrics-recording-only --no-first-run --no-sandbox --password-store=basic --remote-debugging-port=0 --test-type=webdriver --use-mock-keychain --user-data-dir=/tmp/.org.chromium.Chromium.CnN7dD data:, +[862:862:0724/143149.418555:ERROR:gpu_process_transport_factory.cc(642)] Switching to software compositing. +[862:862:0724/143149.418626:ERROR:gpu_process_transport_factory.cc(1007)] Lost UI shared context. +[862:862:0724/143149.496727:WARNING:account_consistency_mode_manager.cc(290)] Desktop Identity Consistency cannot be enabled as no OAuth client ID and client secret have been configured. +[862:862:0724/143149.496839:WARNING:account_consistency_mode_manager.cc(290)] Desktop Identity Consistency cannot be enabled as no OAuth client ID and client secret have been configured. +[862:862:0724/143149.496887:WARNING:account_consistency_mode_manager.cc(290)] Desktop Identity Consistency cannot be enabled as no OAuth client ID and client secret have been configured. +[862:862:0724/143149.496936:WARNING:account_consistency_mode_manager.cc(290)] Desktop Identity Consistency cannot be enabled as no OAuth client ID and client secret have been configured. +[862:862:0724/143149.497957:WARNING:account_consistency_mode_manager.cc(290)] Desktop Identity Consistency cannot be enabled as no OAuth client ID and client secret have been configured. +[862:862:0724/143149.505000:WARNING:account_consistency_mode_manager.cc(290)] Desktop Identity Consistency cannot be enabled as no OAuth client ID and client secret have been configured. +[862:862:0724/143149.560813:WARNING:account_consistency_mode_manager.cc(290)] Desktop Identity Consistency cannot be enabled as no OAuth client ID and client secret have been configured. +[862:862:0724/143149.590742:WARNING:account_consistency_mode_manager.cc(290)] Desktop Identity Consistency cannot be enabled as no OAuth client ID and client secret have been configured. +[862:862:0724/143149.590817:WARNING:account_consistency_mode_manager.cc(290)] Desktop Identity Consistency cannot be enabled as no OAuth client ID and client secret have been configured. + +DevTools listening on ws://127.0.0.1:39357/devtools/browser/49e28985-2281-43a8-9f66-2fd558fd4850 +[1532467909.643][DEBUG]: DevTools request: http://localhost:39357/json/version +[862:862:0724/143149.729576:WARNING:password_store_factory.cc(253)] Using basic (unencrypted) store for password storage. See https://chromium.googlesource.com/chromium/src/+/master/docs/linux_password_storage.md for more information about password storage options. +[862:862:0724/143149.733103:WARNING:account_consistency_mode_manager.cc(290)] Desktop Identity Consistency cannot be enabled as no OAuth client ID and client secret have been configured. +[1532467909.940][DEBUG]: DevTools response: { + "Browser": "Chrome/69.0.3491.0", + "Protocol-Version": "1.3", + "User-Agent": "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/69.0.3491.0 Safari/537.36", + "V8-Version": "6.9.389", + "WebKit-Version": "537.36 (@410f2c4912d46a5fae2fe6c0b2e24d9eb6359761)", + "webSocketDebuggerUrl": "ws://localhost:39357/devtools/browser/49e28985-2281-43a8-9f66-2fd558fd4850" +} + +[1532467909.985][DEBUG]: DevTools request: http://localhost:39357/json +[1532467910.016][DEBUG]: DevTools response: [ { + "description": "", + "devtoolsFrontendUrl": "/devtools/inspector.html?ws=localhost:39357/devtools/page/1891941015D96E5F0BF15E4377D6F8D8", + "id": "1891941015D96E5F0BF15E4377D6F8D8", + "title": "Chrome Automation Extension", + "type": "background_page", + "url": "chrome-extension://aapnijgdinlhnhlmodcfapnahmbfebeb/_generated_background_page.html", + "webSocketDebuggerUrl": "ws://localhost:39357/devtools/page/1891941015D96E5F0BF15E4377D6F8D8" +}, { + "description": "", + "devtoolsFrontendUrl": "/devtools/inspector.html?ws=localhost:39357/devtools/page/C29400EE1CD9BE03CE0DAD38C2E8B81D", + "id": "C29400EE1CD9BE03CE0DAD38C2E8B81D", + "title": "", + "type": "page", + "url": "data:,", + "webSocketDebuggerUrl": "ws://localhost:39357/devtools/page/C29400EE1CD9BE03CE0DAD38C2E8B81D" +} ] + +[1532467910.017][DEBUG]: DevTools request: http://localhost:39357/json +[1532467910.021][DEBUG]: DevTools response: [ { + "description": "", + "devtoolsFrontendUrl": "/devtools/inspector.html?ws=localhost:39357/devtools/page/1891941015D96E5F0BF15E4377D6F8D8", + "id": "1891941015D96E5F0BF15E4377D6F8D8", + "title": "Chrome Automation Extension", + "type": "background_page", + "url": "chrome-extension://aapnijgdinlhnhlmodcfapnahmbfebeb/_generated_background_page.html", + "webSocketDebuggerUrl": "ws://localhost:39357/devtools/page/1891941015D96E5F0BF15E4377D6F8D8" +}, { + "description": "", + "devtoolsFrontendUrl": "/devtools/inspector.html?ws=localhost:39357/devtools/page/C29400EE1CD9BE03CE0DAD38C2E8B81D", + "id": "C29400EE1CD9BE03CE0DAD38C2E8B81D", + "title": "", + "type": "page", + "url": "data:,", + "webSocketDebuggerUrl": "ws://localhost:39357/devtools/page/C29400EE1CD9BE03CE0DAD38C2E8B81D" +} ] + +[1532467910.023][INFO]: resolved localhost to ["::1","127.0.0.1"] +[1532467910.026][DEBUG]: DEVTOOLS COMMAND Log.enable (id=1) { + +} +[1532467910.027][DEBUG]: DEVTOOLS COMMAND DOM.getDocument (id=2) { + +} +[1532467910.027][DEBUG]: DEVTOOLS COMMAND Target.setAutoAttach (id=3) { + "autoAttach": true, + "waitForDebuggerOnStart": false +} +[1532467910.027][DEBUG]: DEVTOOLS COMMAND Page.enable (id=4) { + +} +[1532467910.030][DEBUG]: DEVTOOLS COMMAND Page.enable (id=5) { + +} +[1532467910.060][DEBUG]: DEVTOOLS RESPONSE Log.enable (id=1) { + +} +[1532467910.061][DEBUG]: DEVTOOLS RESPONSE DOM.getDocument (id=2) { + "root": { + "backendNodeId": 1, + "baseURL": "about:blank", + "childNodeCount": 1, + "children": [ { + "attributes": [ ], + "backendNodeId": 2, + "childNodeCount": 2, + "children": [ { + "attributes": [ ], + "backendNodeId": 3, + "childNodeCount": 0, + "localName": "head", + "nodeId": 3, + "nodeName": "HEAD", + "nodeType": 1, + "nodeValue": "", + "parentId": 2 + }, { + "attributes": [ ], + "backendNodeId": 4, + "childNodeCount": 0, + "localName": "body", + "nodeId": 4, + "nodeName": "BODY", + "nodeType": 1, + "nodeValue": "", + "parentId": 2 + } ], + "frameId": "C29400EE1CD9BE03CE0DAD38C2E8B81D", + "localName": "html", + "nodeId": 2, + "nodeName": "HTML", + "nodeType": 1, + "nodeValue": "", + "parentId": 1 + } ], + "documentURL": "", + "localName": "", + "nodeId": 1, + "nodeName": "#document", + "nodeType": 9, + "nodeValue": "", + "xmlVersion": "" + } +} +[1532467910.062][DEBUG]: DEVTOOLS RESPONSE Target.setAutoAttach (id=3) { + +} +[1532467910.062][DEBUG]: DEVTOOLS RESPONSE Page.enable (id=4) { + +} +[1532467910.123][DEBUG]: DEVTOOLS EVENT Page.frameNavigated { + "frame": { + "id": "C29400EE1CD9BE03CE0DAD38C2E8B81D", + "loaderId": "FC1C54642150179CD6FF1E8379192FC3", + "mimeType": "text/plain", + "securityOrigin": "://", + "url": "data:," + } +} +[1532467910.123][DEBUG]: DEVTOOLS EVENT DOM.documentUpdated { + +} +[1532467910.123][DEBUG]: DEVTOOLS COMMAND DOM.getDocument (id=6) { + +} +[1532467910.123][DEBUG]: DEVTOOLS EVENT Page.loadEventFired { + "timestamp": 80594.416967 +} +[1532467910.123][DEBUG]: DEVTOOLS EVENT Page.frameStoppedLoading { + "frameId": "C29400EE1CD9BE03CE0DAD38C2E8B81D" +} +[1532467910.123][DEBUG]: DEVTOOLS EVENT DOM.documentUpdated { + +} +[1532467910.123][DEBUG]: DEVTOOLS COMMAND DOM.getDocument (id=7) { + +} +[1532467910.124][DEBUG]: DEVTOOLS EVENT Page.domContentEventFired { + "timestamp": 80594.419712 +} +[1532467910.125][DEBUG]: DEVTOOLS RESPONSE Page.enable (id=5) { + +} +[1532467910.128][DEBUG]: DEVTOOLS EVENT Page.frameResized { + +} +[1532467910.151][DEBUG]: DEVTOOLS RESPONSE DOM.getDocument (id=6) { + "root": { + "backendNodeId": 5, + "baseURL": "data:,", + "childNodeCount": 1, + "children": [ { + "attributes": [ ], + "backendNodeId": 6, + "childNodeCount": 2, + "children": [ { + "attributes": [ ], + "backendNodeId": 7, + "childNodeCount": 0, + "localName": "head", + "nodeId": 7, + "nodeName": "HEAD", + "nodeType": 1, + "nodeValue": "", + "parentId": 6 + }, { + "attributes": [ ], + "backendNodeId": 8, + "childNodeCount": 0, + "localName": "body", + "nodeId": 8, + "nodeName": "BODY", + "nodeType": 1, + "nodeValue": "", + "parentId": 6 + } ], + "frameId": "C29400EE1CD9BE03CE0DAD38C2E8B81D", + "localName": "html", + "nodeId": 6, + "nodeName": "HTML", + "nodeType": 1, + "nodeValue": "", + "parentId": 5 + } ], + "documentURL": "data:,", + "localName": "", + "nodeId": 5, + "nodeName": "#document", + "nodeType": 9, + "nodeValue": "", + "xmlVersion": "" + } +} +[1532467910.152][DEBUG]: DEVTOOLS RESPONSE DOM.getDocument (id=7) { + "root": { + "backendNodeId": 5, + "baseURL": "data:,", + "childNodeCount": 1, + "children": [ { + "attributes": [ ], + "backendNodeId": 6, + "childNodeCount": 2, + "children": [ { + "attributes": [ ], + "backendNodeId": 7, + "childNodeCount": 0, + "localName": "head", + "nodeId": 11, + "nodeName": "HEAD", + "nodeType": 1, + "nodeValue": "", + "parentId": 10 + }, { + "attributes": [ ], + "backendNodeId": 8, + "childNodeCount": 0, + "localName": "body", + "nodeId": 12, + "nodeName": "BODY", + "nodeType": 1, + "nodeValue": "", + "parentId": 10 + } ], + "frameId": "C29400EE1CD9BE03CE0DAD38C2E8B81D", + "localName": "html", + "nodeId": 10, + "nodeName": "HTML", + "nodeType": 1, + "nodeValue": "", + "parentId": 9 + } ], + "documentURL": "data:,", + "localName": "", + "nodeId": 9, + "nodeName": "#document", + "nodeType": 9, + "nodeValue": "", + "xmlVersion": "" + } +} +[1532467910.152][DEBUG]: DEVTOOLS COMMAND Runtime.enable (id=8) { + +} +[1532467910.195][DEBUG]: DEVTOOLS EVENT Runtime.executionContextCreated { + "context": { + "auxData": { + "frameId": "C29400EE1CD9BE03CE0DAD38C2E8B81D", + "isDefault": true + }, + "id": 1, + "name": "", + "origin": "://" + } +} +[1532467910.195][DEBUG]: DEVTOOLS RESPONSE Runtime.enable (id=8) { + +} +[1532467910.195][DEBUG]: DEVTOOLS COMMAND Page.enable (id=9) { + +} +[1532467910.198][DEBUG]: DEVTOOLS RESPONSE Page.enable (id=9) { + +} +[1532467910.198][DEBUG]: DEVTOOLS COMMAND Runtime.enable (id=10) { + +} +[1532467910.202][DEBUG]: DEVTOOLS RESPONSE Runtime.enable (id=10) { + +} +[1532467910.203][DEBUG]: DEVTOOLS COMMAND Runtime.evaluate (id=11) { + "expression": "(function() { // Copyright (c) 2012 The Chromium Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style license that can be\n// found in the LICENSE file.\n\n/**\n * Enum f...", + "returnByValue": true +} +[1532467910.239][DEBUG]: DEVTOOLS RESPONSE Runtime.evaluate (id=11) { + "result": { + "type": "object", + "value": { + "status": 0, + "value": 1 + } + } +} +[1532467910.240][INFO]: [072a3bc4ef0a403370cbf2994959c16f] RESPONSE InitSession { + "acceptInsecureCerts": false, + "acceptSslCerts": false, + "applicationCacheEnabled": false, + "browserConnectionEnabled": false, + "browserName": "chrome", + "chrome": { + "chromedriverVersion": "2.40 (1ba6d2ec0853ea1d507bccc09f540f5ea1db0394)", + "userDataDir": "/tmp/.org.chromium.Chromium.CnN7dD" + }, + "cssSelectorsEnabled": true, + "databaseEnabled": false, + "goog:chromeOptions": { + "debuggerAddress": "localhost:39357" + }, + "handlesAlerts": true, + "hasTouchScreen": false, + "javascriptEnabled": true, + "locationContextEnabled": true, + "mobileEmulationEnabled": false, + "nativeEvents": true, + "networkConnectionEnabled": false, + "pageLoadStrategy": "normal", + "platform": "Linux", + "rotatable": false, + "setWindowRect": true, + "takesHeapSnapshot": true, + "takesScreenshot": true, + "unexpectedAlertBehaviour": "", + "version": "69.0.3491.0", + "webStorageEnabled": true +} +[1532467910.242][INFO]: [072a3bc4ef0a403370cbf2994959c16f] COMMAND GetNetworkConditions { + +} +[1532467910.290][INFO]: [072a3bc4ef0a403370cbf2994959c16f] RESPONSE GetNetworkConditions ERROR unknown error: network conditions must be set before it can be retrieved + (Session info: chrome=69.0.3491.0) +[1532467910.292][INFO]: [072a3bc4ef0a403370cbf2994959c16f] COMMAND SetNetworkConditions { + "network_conditions": { + "download_throughput": 2097152, + "latency": 5, + "offline": false, + "upload_throughput": 2097152 + } +} +[1532467910.292][INFO]: Waiting for pending navigations... +[1532467910.292][DEBUG]: DEVTOOLS COMMAND Runtime.evaluate (id=12) { + "expression": "1" +} +[1532467910.295][DEBUG]: DEVTOOLS RESPONSE Runtime.evaluate (id=12) { + "result": { + "description": "1", + "type": "number", + "value": 1 + } +} +[1532467910.295][INFO]: Done waiting for pending navigations. Status: ok +[1532467910.295][DEBUG]: DEVTOOLS COMMAND Network.enable (id=13) { + +} +[1532467910.296][DEBUG]: DEVTOOLS RESPONSE Network.enable (id=13) { + +} +[1532467910.296][DEBUG]: DEVTOOLS COMMAND Network.canEmulateNetworkConditions (id=14) { + +} +[1532467910.297][DEBUG]: DEVTOOLS RESPONSE Network.canEmulateNetworkConditions (id=14) { + "result": true +} +[1532467910.297][DEBUG]: DEVTOOLS COMMAND Network.emulateNetworkConditions (id=15) { + "downloadThroughput": 2097152.0, + "latency": 5.0, + "offline": false, + "uploadThroughput": 2097152.0 +} +[1532467910.298][DEBUG]: DEVTOOLS RESPONSE Network.emulateNetworkConditions (id=15) { + +} +[1532467910.298][INFO]: Waiting for pending navigations... +[1532467910.299][DEBUG]: DEVTOOLS COMMAND Runtime.evaluate (id=16) { + "expression": "1" +} +[1532467910.300][DEBUG]: DEVTOOLS RESPONSE Runtime.evaluate (id=16) { + "result": { + "description": "1", + "type": "number", + "value": 1 + } +} +[1532467910.300][INFO]: Done waiting for pending navigations. Status: ok +[1532467910.300][INFO]: [072a3bc4ef0a403370cbf2994959c16f] RESPONSE SetNetworkConditions +[1532467910.302][INFO]: [072a3bc4ef0a403370cbf2994959c16f] COMMAND GetNetworkConditions { + +} +[1532467910.302][INFO]: [072a3bc4ef0a403370cbf2994959c16f] RESPONSE GetNetworkConditions { + "download_throughput": 2097152, + "latency": 5, + "offline": false, + "upload_throughput": 2097152 +} +[1532467910.303][INFO]: [072a3bc4ef0a403370cbf2994959c16f] COMMAND DeleteNetworkConditions { + +} +[1532467910.303][INFO]: Waiting for pending navigations... +[1532467910.304][DEBUG]: DEVTOOLS COMMAND Runtime.evaluate (id=17) { + "expression": "1" +} +[1532467910.305][DEBUG]: DEVTOOLS RESPONSE Runtime.evaluate (id=17) { + "result": { + "description": "1", + "type": "number", + "value": 1 + } +} +[1532467910.305][INFO]: Done waiting for pending navigations. Status: ok +[1532467910.306][DEBUG]: DEVTOOLS COMMAND Network.enable (id=18) { + +} +[1532467910.307][DEBUG]: DEVTOOLS RESPONSE Network.enable (id=18) { + +} +[1532467910.307][DEBUG]: DEVTOOLS COMMAND Network.canEmulateNetworkConditions (id=19) { + +} +[1532467910.307][DEBUG]: DEVTOOLS RESPONSE Network.canEmulateNetworkConditions (id=19) { + "result": true +} +[1532467910.307][DEBUG]: DEVTOOLS COMMAND Network.emulateNetworkConditions (id=20) { + "downloadThroughput": -1024.0, + "latency": 0.0, + "offline": false, + "uploadThroughput": -1024.0 +} +[1532467910.309][DEBUG]: DEVTOOLS RESPONSE Network.emulateNetworkConditions (id=20) { + +} +[1532467910.309][INFO]: Waiting for pending navigations... +[1532467910.309][DEBUG]: DEVTOOLS COMMAND Runtime.evaluate (id=21) { + "expression": "1" +} +[1532467910.311][DEBUG]: DEVTOOLS RESPONSE Runtime.evaluate (id=21) { + "result": { + "description": "1", + "type": "number", + "value": 1 + } +} +[1532467910.311][INFO]: Done waiting for pending navigations. Status: ok +[1532467910.311][INFO]: [072a3bc4ef0a403370cbf2994959c16f] RESPONSE DeleteNetworkConditions +[1532467910.313][INFO]: [072a3bc4ef0a403370cbf2994959c16f] COMMAND GetNetworkConditions { + +} +[1532467910.359][INFO]: [072a3bc4ef0a403370cbf2994959c16f] RESPONSE GetNetworkConditions ERROR unknown error: network conditions must be set before it can be retrieved + (Session info: chrome=69.0.3491.0) +[1532467910.360][INFO]: [072a3bc4ef0a403370cbf2994959c16f] COMMAND Quit { + +} +[0724/143150.372514:ERROR:nacl_helper_linux.cc(310)] NaCl helper process running without a sandbox! +Most likely you need to configure your SUID sandbox correctly +[1532467910.411][INFO]: [072a3bc4ef0a403370cbf2994959c16f] RESPONSE Quit +[1532467910.412][DEBUG]: Log type 'driver' lost 0 entries on destruction +[1532467910.412][DEBUG]: Log type 'browser' lost 0 entries on destruction
diff --git a/chrome/test/chromedriver/log_replay/test_data/testEvaluateInvalidScript.log b/chrome/test/chromedriver/log_replay/test_data/testEvaluateInvalidScript.log new file mode 100644 index 0000000..3128c7a --- /dev/null +++ b/chrome/test/chromedriver/log_replay/test_data/testEvaluateInvalidScript.log
@@ -0,0 +1,479 @@ +[1532467931.153][INFO]: [a8011b6cf1a40b0af7895360e54d7a14] COMMAND InitSession { + "desiredCapabilities": { + "chromeOptions": { + "args": [ "no-sandbox", "disable-gpu" ], + "binary": "/usr/local/google/home/cwinstanley/chromium/src/out/Default/chrome" + }, + "goog:testName": "__main__.ChromeDriverTest.testEvaluateInvalidScript", + "loggingPrefs": { + + } + } +} +[1532467931.154][INFO]: Populating Preferences file: { + "alternate_error_pages": { + "enabled": false + }, + "autofill": { + "enabled": false + }, + "browser": { + "check_default_browser": false + }, + "distribution": { + "import_bookmarks": false, + "import_history": false, + "import_search_engine": false, + "make_chrome_default_for_user": false, + "skip_first_run_ui": true + }, + "dns_prefetching": { + "enabled": false + }, + "profile": { + "content_settings": { + "pattern_pairs": { + "https://*,*": { + "media-stream": { + "audio": "Default", + "video": "Default" + } + } + } + }, + "default_content_setting_values": { + "geolocation": 1 + }, + "default_content_settings": { + "geolocation": 1, + "mouselock": 1, + "notifications": 1, + "popups": 1, + "ppapi-broker": 1 + }, + "password_manager_enabled": false + }, + "safebrowsing": { + "enabled": false + }, + "search": { + "suggest_enabled": false + }, + "translate": { + "enabled": false + } +} +[1532467931.154][INFO]: Populating Local State file: { + "background_mode": { + "enabled": false + }, + "ssl": { + "rev_checking": { + "enabled": false + } + } +} +[1532467931.155][INFO]: Launching chrome: /usr/local/google/home/cwinstanley/chromium/src/out/Default/chrome --disable-background-networking --disable-client-side-phishing-detection --disable-default-apps --disable-gpu --disable-hang-monitor --disable-popup-blocking --disable-prompt-on-repost --disable-sync --disable-web-resources --enable-automation --enable-logging --force-fieldtrials=SiteIsolationExtensions/Control --ignore-certificate-errors --load-extension=/tmp/.org.chromium.Chromium.r7tdo1/internal --log-level=0 --metrics-recording-only --no-first-run --no-sandbox --password-store=basic --remote-debugging-port=0 --test-type=webdriver --use-mock-keychain --user-data-dir=/tmp/.org.chromium.Chromium.dcC7AF data:, +[1023:1023:0724/143213.165563:ERROR:gpu_process_transport_factory.cc(642)] Switching to software compositing. +[1023:1023:0724/143213.165634:ERROR:gpu_process_transport_factory.cc(1007)] Lost UI shared context. +[1023:1023:0724/143213.239914:WARNING:account_consistency_mode_manager.cc(290)] Desktop Identity Consistency cannot be enabled as no OAuth client ID and client secret have been configured. +[1023:1023:0724/143213.240028:WARNING:account_consistency_mode_manager.cc(290)] Desktop Identity Consistency cannot be enabled as no OAuth client ID and client secret have been configured. +[1023:1023:0724/143213.240073:WARNING:account_consistency_mode_manager.cc(290)] Desktop Identity Consistency cannot be enabled as no OAuth client ID and client secret have been configured. +[1023:1023:0724/143213.240120:WARNING:account_consistency_mode_manager.cc(290)] Desktop Identity Consistency cannot be enabled as no OAuth client ID and client secret have been configured. +[1023:1023:0724/143213.241006:WARNING:account_consistency_mode_manager.cc(290)] Desktop Identity Consistency cannot be enabled as no OAuth client ID and client secret have been configured. +[1023:1023:0724/143213.248794:WARNING:account_consistency_mode_manager.cc(290)] Desktop Identity Consistency cannot be enabled as no OAuth client ID and client secret have been configured. +[1023:1023:0724/143213.295599:WARNING:account_consistency_mode_manager.cc(290)] Desktop Identity Consistency cannot be enabled as no OAuth client ID and client secret have been configured. +[1023:1023:0724/143213.326930:WARNING:account_consistency_mode_manager.cc(290)] Desktop Identity Consistency cannot be enabled as no OAuth client ID and client secret have been configured. +[1023:1023:0724/143213.327003:WARNING:account_consistency_mode_manager.cc(290)] Desktop Identity Consistency cannot be enabled as no OAuth client ID and client secret have been configured. + +DevTools listening on ws://127.0.0.1:34475/devtools/browser/a327acb1-7520-47be-8abb-d3379cdb6d14 +[1532467933.412][DEBUG]: DevTools request: http://localhost:34475/json/version +[1023:1023:0724/143213.472566:WARNING:password_store_factory.cc(253)] Using basic (unencrypted) store for password storage. See https://chromium.googlesource.com/chromium/src/+/master/docs/linux_password_storage.md for more information about password storage options. +[1023:1023:0724/143213.475399:WARNING:account_consistency_mode_manager.cc(290)] Desktop Identity Consistency cannot be enabled as no OAuth client ID and client secret have been configured. +[1532467933.799][DEBUG]: DevTools response: { + "Browser": "Chrome/69.0.3491.0", + "Protocol-Version": "1.3", + "User-Agent": "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/69.0.3491.0 Safari/537.36", + "V8-Version": "6.9.389", + "WebKit-Version": "537.36 (@410f2c4912d46a5fae2fe6c0b2e24d9eb6359761)", + "webSocketDebuggerUrl": "ws://localhost:34475/devtools/browser/a327acb1-7520-47be-8abb-d3379cdb6d14" +} + +[1532467933.842][DEBUG]: DevTools request: http://localhost:34475/json +[1532467933.889][DEBUG]: DevTools response: [ { + "description": "", + "devtoolsFrontendUrl": "/devtools/inspector.html?ws=localhost:34475/devtools/page/8A3DBCE8C0137849051A3EF293D596CF", + "id": "8A3DBCE8C0137849051A3EF293D596CF", + "title": "Chrome Automation Extension", + "type": "background_page", + "url": "chrome-extension://aapnijgdinlhnhlmodcfapnahmbfebeb/_generated_background_page.html", + "webSocketDebuggerUrl": "ws://localhost:34475/devtools/page/8A3DBCE8C0137849051A3EF293D596CF" +}, { + "description": "", + "devtoolsFrontendUrl": "/devtools/inspector.html?ws=localhost:34475/devtools/page/EB80E4FD2939C52CC67D245760C3269B", + "id": "EB80E4FD2939C52CC67D245760C3269B", + "title": "", + "type": "page", + "url": "data:,", + "webSocketDebuggerUrl": "ws://localhost:34475/devtools/page/EB80E4FD2939C52CC67D245760C3269B" +} ] + +[1532467933.890][DEBUG]: DevTools request: http://localhost:34475/json +[1532467933.925][DEBUG]: DevTools response: [ { + "description": "", + "devtoolsFrontendUrl": "/devtools/inspector.html?ws=localhost:34475/devtools/page/8A3DBCE8C0137849051A3EF293D596CF", + "id": "8A3DBCE8C0137849051A3EF293D596CF", + "title": "Chrome Automation Extension", + "type": "background_page", + "url": "chrome-extension://aapnijgdinlhnhlmodcfapnahmbfebeb/_generated_background_page.html", + "webSocketDebuggerUrl": "ws://localhost:34475/devtools/page/8A3DBCE8C0137849051A3EF293D596CF" +}, { + "description": "", + "devtoolsFrontendUrl": "/devtools/inspector.html?ws=localhost:34475/devtools/page/EB80E4FD2939C52CC67D245760C3269B", + "id": "EB80E4FD2939C52CC67D245760C3269B", + "title": "data:,", + "type": "page", + "url": "data:,", + "webSocketDebuggerUrl": "ws://localhost:34475/devtools/page/EB80E4FD2939C52CC67D245760C3269B" +} ] + +[1532467933.926][INFO]: resolved localhost to ["::1","127.0.0.1"] +[1532467933.968][DEBUG]: DEVTOOLS COMMAND Log.enable (id=1) { + +} +[1532467933.968][DEBUG]: DEVTOOLS COMMAND DOM.getDocument (id=2) { + +} +[1532467933.969][DEBUG]: DEVTOOLS COMMAND Target.setAutoAttach (id=3) { + "autoAttach": true, + "waitForDebuggerOnStart": false +} +[1532467933.969][DEBUG]: DEVTOOLS COMMAND Page.enable (id=4) { + +} +[1532467933.969][DEBUG]: DEVTOOLS COMMAND Page.enable (id=5) { + +} +[1532467934.006][DEBUG]: DEVTOOLS RESPONSE Log.enable (id=1) { + +} +[1532467934.009][DEBUG]: DEVTOOLS RESPONSE DOM.getDocument (id=2) { + "root": { + "backendNodeId": 2, + "baseURL": "data:,", + "childNodeCount": 1, + "children": [ { + "attributes": [ ], + "backendNodeId": 3, + "childNodeCount": 2, + "children": [ { + "attributes": [ ], + "backendNodeId": 4, + "childNodeCount": 0, + "localName": "head", + "nodeId": 3, + "nodeName": "HEAD", + "nodeType": 1, + "nodeValue": "", + "parentId": 2 + }, { + "attributes": [ ], + "backendNodeId": 5, + "childNodeCount": 0, + "localName": "body", + "nodeId": 4, + "nodeName": "BODY", + "nodeType": 1, + "nodeValue": "", + "parentId": 2 + } ], + "frameId": "EB80E4FD2939C52CC67D245760C3269B", + "localName": "html", + "nodeId": 2, + "nodeName": "HTML", + "nodeType": 1, + "nodeValue": "", + "parentId": 1 + } ], + "documentURL": "data:,", + "localName": "", + "nodeId": 1, + "nodeName": "#document", + "nodeType": 9, + "nodeValue": "", + "xmlVersion": "" + } +} +[1532467934.009][DEBUG]: DEVTOOLS RESPONSE Target.setAutoAttach (id=3) { + +} +[1532467934.009][DEBUG]: DEVTOOLS RESPONSE Page.enable (id=4) { + +} +[1532467934.009][DEBUG]: DEVTOOLS RESPONSE Page.enable (id=5) { + +} +[1532467934.009][DEBUG]: DEVTOOLS COMMAND Runtime.enable (id=6) { + +} +[1532467934.066][DEBUG]: DEVTOOLS EVENT Runtime.executionContextCreated { + "context": { + "auxData": { + "frameId": "EB80E4FD2939C52CC67D245760C3269B", + "isDefault": true + }, + "id": 1, + "name": "", + "origin": "://" + } +} +[1532467934.066][DEBUG]: DEVTOOLS RESPONSE Runtime.enable (id=6) { + +} +[1532467934.066][DEBUG]: DEVTOOLS COMMAND Page.enable (id=7) { + +} +[1532467934.072][DEBUG]: DEVTOOLS RESPONSE Page.enable (id=7) { + +} +[1532467934.072][DEBUG]: DEVTOOLS COMMAND Runtime.enable (id=8) { + +} +[1532467934.074][DEBUG]: DEVTOOLS RESPONSE Runtime.enable (id=8) { + +} +[1532467934.075][DEBUG]: DEVTOOLS COMMAND Runtime.evaluate (id=9) { + "expression": "(function() { // Copyright (c) 2012 The Chromium Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style license that can be\n// found in the LICENSE file.\n\n/**\n * Enum f...", + "returnByValue": true +} +[1532467934.086][DEBUG]: DEVTOOLS RESPONSE Runtime.evaluate (id=9) { + "result": { + "type": "object", + "value": { + "status": 0, + "value": 1 + } + } +} +[1532467934.086][INFO]: [a8011b6cf1a40b0af7895360e54d7a14] RESPONSE InitSession { + "acceptInsecureCerts": false, + "acceptSslCerts": false, + "applicationCacheEnabled": false, + "browserConnectionEnabled": false, + "browserName": "chrome", + "chrome": { + "chromedriverVersion": "2.40 (1ba6d2ec0853ea1d507bccc09f540f5ea1db0394)", + "userDataDir": "/tmp/.org.chromium.Chromium.dcC7AF" + }, + "cssSelectorsEnabled": true, + "databaseEnabled": false, + "goog:chromeOptions": { + "debuggerAddress": "localhost:34475" + }, + "handlesAlerts": true, + "hasTouchScreen": false, + "javascriptEnabled": true, + "locationContextEnabled": true, + "mobileEmulationEnabled": false, + "nativeEvents": true, + "networkConnectionEnabled": false, + "pageLoadStrategy": "normal", + "platform": "Linux", + "rotatable": false, + "setWindowRect": true, + "takesHeapSnapshot": true, + "takesScreenshot": true, + "unexpectedAlertBehaviour": "", + "version": "69.0.3491.0", + "webStorageEnabled": true +} +[1532467934.088][INFO]: [a8011b6cf1a40b0af7895360e54d7a14] COMMAND ExecuteScript { + "args": [ ], + "script": "{{{" +} +[1532467934.088][INFO]: Waiting for pending navigations... +[1532467934.088][DEBUG]: DEVTOOLS COMMAND Runtime.evaluate (id=10) { + "expression": "1" +} +[1532467934.091][DEBUG]: DEVTOOLS RESPONSE Runtime.evaluate (id=10) { + "result": { + "description": "1", + "type": "number", + "value": 1 + } +} +[1532467934.091][DEBUG]: DEVTOOLS COMMAND DOM.getDocument (id=11) { + +} +[1532467934.093][DEBUG]: DEVTOOLS RESPONSE DOM.getDocument (id=11) { + "root": { + "backendNodeId": 2, + "baseURL": "data:,", + "childNodeCount": 1, + "children": [ { + "attributes": [ ], + "backendNodeId": 3, + "childNodeCount": 2, + "children": [ { + "attributes": [ ], + "backendNodeId": 4, + "childNodeCount": 0, + "localName": "head", + "nodeId": 7, + "nodeName": "HEAD", + "nodeType": 1, + "nodeValue": "", + "parentId": 6 + }, { + "attributes": [ ], + "backendNodeId": 5, + "childNodeCount": 0, + "localName": "body", + "nodeId": 8, + "nodeName": "BODY", + "nodeType": 1, + "nodeValue": "", + "parentId": 6 + } ], + "frameId": "EB80E4FD2939C52CC67D245760C3269B", + "localName": "html", + "nodeId": 6, + "nodeName": "HTML", + "nodeType": 1, + "nodeValue": "", + "parentId": 5 + } ], + "documentURL": "data:,", + "localName": "", + "nodeId": 5, + "nodeName": "#document", + "nodeType": 9, + "nodeValue": "", + "xmlVersion": "" + } +} +[1532467934.093][DEBUG]: DEVTOOLS COMMAND Runtime.evaluate (id=12) { + "expression": "var frame = document.createElement('iframe');frame.name = 'chromedriver dummy frame';frame.src = 'about:blank';document.body.appendChild(frame);window.setTimeout(function() { document.body.removeC..." +} +[1532467934.105][DEBUG]: DEVTOOLS EVENT DOM.childNodeCountUpdated { + "childNodeCount": 1, + "nodeId": 8 +} +[1532467934.106][DEBUG]: DEVTOOLS EVENT Page.frameAttached { + "frameId": "FC866279DFCE446E0DB8C18EB7FF344D", + "parentFrameId": "EB80E4FD2939C52CC67D245760C3269B", + "stack": { + "callFrames": [ { + "columnNumber": 125, + "functionName": "", + "lineNumber": 0, + "scriptId": "20", + "url": "" + } ] + } +} +[1532467934.137][DEBUG]: DEVTOOLS EVENT Page.frameStartedLoading { + "frameId": "FC866279DFCE446E0DB8C18EB7FF344D" +} +[1532467934.137][DEBUG]: DEVTOOLS EVENT Page.frameNavigated { + "frame": { + "id": "FC866279DFCE446E0DB8C18EB7FF344D", + "loaderId": "42B8E3CFCB0C58BAD826272166CCD8DA", + "mimeType": "text/html", + "name": "chromedriver dummy frame", + "parentId": "EB80E4FD2939C52CC67D245760C3269B", + "securityOrigin": "://", + "url": "about:blank" + } +} +[1532467934.137][DEBUG]: DEVTOOLS EVENT Runtime.executionContextCreated { + "context": { + "auxData": { + "frameId": "FC866279DFCE446E0DB8C18EB7FF344D", + "isDefault": true + }, + "id": 2, + "name": "", + "origin": "://" + } +} +[1532467934.138][DEBUG]: DEVTOOLS EVENT Page.frameStoppedLoading { + "frameId": "FC866279DFCE446E0DB8C18EB7FF344D" +} +[1532467934.138][DEBUG]: DEVTOOLS RESPONSE Runtime.evaluate (id=12) { + "result": { + "description": "1", + "type": "number", + "value": 1 + } +} +[1532467934.138][INFO]: Done waiting for pending navigations. Status: ok +[1532467934.139][DEBUG]: DEVTOOLS COMMAND Runtime.evaluate (id=13) { + "expression": "(function() { // Copyright (c) 2012 The Chromium Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style license that can be\n// found in the LICENSE file.\n\n/**\n * Enum f...", + "returnByValue": true +} +[1532467934.299][DEBUG]: DEVTOOLS EVENT DOM.childNodeCountUpdated { + "childNodeCount": 0, + "nodeId": 8 +} +[1532467934.300][DEBUG]: DEVTOOLS EVENT Runtime.executionContextDestroyed { + "executionContextId": 2 +} +[1532467934.300][DEBUG]: DEVTOOLS EVENT Page.frameDetached { + "frameId": "FC866279DFCE446E0DB8C18EB7FF344D" +} +[1532467934.300][DEBUG]: DEVTOOLS RESPONSE Runtime.evaluate (id=13) { + "exceptionDetails": { + "columnNumber": 36, + "exception": { + "className": "SyntaxError", + "description": "SyntaxError: Unexpected token ,", + "objectId": "{\"injectedScriptId\":1,\"id\":2}", + "subtype": "error", + "type": "object" + }, + "exceptionId": 1, + "lineNumber": 371, + "scriptId": "21", + "text": "Uncaught" + }, + "result": { + "className": "SyntaxError", + "description": "SyntaxError: Unexpected token ,", + "objectId": "{\"injectedScriptId\":1,\"id\":1}", + "subtype": "error", + "type": "object" + } +} +[1532467934.348][DEBUG]: DEVTOOLS COMMAND Runtime.evaluate (id=14) { + "expression": "1" +} +[1532467934.350][DEBUG]: DEVTOOLS RESPONSE Runtime.evaluate (id=14) { + "result": { + "description": "1", + "type": "number", + "value": 1 + } +} +[1532467934.350][INFO]: Waiting for pending navigations... +[1532467934.350][DEBUG]: DEVTOOLS COMMAND Runtime.evaluate (id=15) { + "expression": "1" +} +[1532467934.352][DEBUG]: DEVTOOLS RESPONSE Runtime.evaluate (id=15) { + "result": { + "description": "1", + "type": "number", + "value": 1 + } +} +[1532467934.352][INFO]: Done waiting for pending navigations. Status: ok +[1532467934.352][INFO]: [a8011b6cf1a40b0af7895360e54d7a14] RESPONSE ExecuteScript ERROR unknown error: Runtime.evaluate threw exception: SyntaxError: Unexpected token , + (Session info: chrome=69.0.3491.0) +[1532467934.353][INFO]: [a8011b6cf1a40b0af7895360e54d7a14] COMMAND Quit { + +} +[0724/143214.365951:ERROR:nacl_helper_linux.cc(310)] NaCl helper process running without a sandbox! +Most likely you need to configure your SUID sandbox correctly +[1532467934.404][INFO]: [a8011b6cf1a40b0af7895360e54d7a14] RESPONSE Quit +[1532467934.404][DEBUG]: Log type 'driver' lost 0 entries on destruction +[1532467934.404][DEBUG]: Log type 'browser' lost 0 entries on destruction
diff --git a/chrome/test/chromedriver/log_replay/test_data/testEvaluateScript.log b/chrome/test/chromedriver/log_replay/test_data/testEvaluateScript.log new file mode 100644 index 0000000..384ca0f --- /dev/null +++ b/chrome/test/chromedriver/log_replay/test_data/testEvaluateScript.log
@@ -0,0 +1,498 @@ +[1532467948.694][INFO]: [72839e50ab82864159b02ad3f022fcdd] COMMAND InitSession { + "desiredCapabilities": { + "chromeOptions": { + "args": [ "no-sandbox", "disable-gpu" ], + "binary": "/usr/local/google/home/cwinstanley/chromium/src/out/Default/chrome" + }, + "goog:testName": "__main__.ChromeDriverTest.testEvaluateScript", + "loggingPrefs": { + + } + } +} +[1532467948.695][INFO]: Populating Preferences file: { + "alternate_error_pages": { + "enabled": false + }, + "autofill": { + "enabled": false + }, + "browser": { + "check_default_browser": false + }, + "distribution": { + "import_bookmarks": false, + "import_history": false, + "import_search_engine": false, + "make_chrome_default_for_user": false, + "skip_first_run_ui": true + }, + "dns_prefetching": { + "enabled": false + }, + "profile": { + "content_settings": { + "pattern_pairs": { + "https://*,*": { + "media-stream": { + "audio": "Default", + "video": "Default" + } + } + } + }, + "default_content_setting_values": { + "geolocation": 1 + }, + "default_content_settings": { + "geolocation": 1, + "mouselock": 1, + "notifications": 1, + "popups": 1, + "ppapi-broker": 1 + }, + "password_manager_enabled": false + }, + "safebrowsing": { + "enabled": false + }, + "search": { + "suggest_enabled": false + }, + "translate": { + "enabled": false + } +} +[1532467948.695][INFO]: Populating Local State file: { + "background_mode": { + "enabled": false + }, + "ssl": { + "rev_checking": { + "enabled": false + } + } +} +[1532467948.697][INFO]: Launching chrome: /usr/local/google/home/cwinstanley/chromium/src/out/Default/chrome --disable-background-networking --disable-client-side-phishing-detection --disable-default-apps --disable-gpu --disable-hang-monitor --disable-popup-blocking --disable-prompt-on-repost --disable-sync --disable-web-resources --enable-automation --enable-logging --force-fieldtrials=SiteIsolationExtensions/Control --ignore-certificate-errors --load-extension=/tmp/.org.chromium.Chromium.yLVVUT/internal --log-level=0 --metrics-recording-only --no-first-run --no-sandbox --password-store=basic --remote-debugging-port=0 --test-type=webdriver --use-mock-keychain --user-data-dir=/tmp/.org.chromium.Chromium.1730lr data:, +[1220:1220:0724/143230.581293:ERROR:gpu_process_transport_factory.cc(642)] Switching to software compositing. +[1220:1220:0724/143230.581381:ERROR:gpu_process_transport_factory.cc(1007)] Lost UI shared context. +[1220:1220:0724/143230.662749:WARNING:account_consistency_mode_manager.cc(290)] Desktop Identity Consistency cannot be enabled as no OAuth client ID and client secret have been configured. +[1220:1220:0724/143230.662864:WARNING:account_consistency_mode_manager.cc(290)] Desktop Identity Consistency cannot be enabled as no OAuth client ID and client secret have been configured. +[1220:1220:0724/143230.662915:WARNING:account_consistency_mode_manager.cc(290)] Desktop Identity Consistency cannot be enabled as no OAuth client ID and client secret have been configured. +[1220:1220:0724/143230.662963:WARNING:account_consistency_mode_manager.cc(290)] Desktop Identity Consistency cannot be enabled as no OAuth client ID and client secret have been configured. +[1220:1220:0724/143230.663912:WARNING:account_consistency_mode_manager.cc(290)] Desktop Identity Consistency cannot be enabled as no OAuth client ID and client secret have been configured. +[1220:1220:0724/143230.670259:WARNING:account_consistency_mode_manager.cc(290)] Desktop Identity Consistency cannot be enabled as no OAuth client ID and client secret have been configured. +[1220:1220:0724/143230.713939:WARNING:account_consistency_mode_manager.cc(290)] Desktop Identity Consistency cannot be enabled as no OAuth client ID and client secret have been configured. +[1220:1220:0724/143230.744824:WARNING:account_consistency_mode_manager.cc(290)] Desktop Identity Consistency cannot be enabled as no OAuth client ID and client secret have been configured. +[1220:1220:0724/143230.744902:WARNING:account_consistency_mode_manager.cc(290)] Desktop Identity Consistency cannot be enabled as no OAuth client ID and client secret have been configured. + +DevTools listening on ws://127.0.0.1:45731/devtools/browser/8385582f-b424-43d8-8b02-8d3025edf658 +[1532467950.782][DEBUG]: DevTools request: http://localhost:45731/json/version +[1220:1220:0724/143230.891958:WARNING:password_store_factory.cc(253)] Using basic (unencrypted) store for password storage. See https://chromium.googlesource.com/chromium/src/+/master/docs/linux_password_storage.md for more information about password storage options. +[1220:1220:0724/143230.894719:WARNING:account_consistency_mode_manager.cc(290)] Desktop Identity Consistency cannot be enabled as no OAuth client ID and client secret have been configured. +[1532467951.129][DEBUG]: DevTools response: { + "Browser": "Chrome/69.0.3491.0", + "Protocol-Version": "1.3", + "User-Agent": "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/69.0.3491.0 Safari/537.36", + "V8-Version": "6.9.389", + "WebKit-Version": "537.36 (@410f2c4912d46a5fae2fe6c0b2e24d9eb6359761)", + "webSocketDebuggerUrl": "ws://localhost:45731/devtools/browser/8385582f-b424-43d8-8b02-8d3025edf658" +} + +[1532467951.168][DEBUG]: DevTools request: http://localhost:45731/json +[1532467951.217][DEBUG]: DevTools response: [ { + "description": "", + "devtoolsFrontendUrl": "/devtools/inspector.html?ws=localhost:45731/devtools/page/7193CBE1EAFA5091389DE9B5DA87C3F9", + "id": "7193CBE1EAFA5091389DE9B5DA87C3F9", + "title": "Chrome Automation Extension", + "type": "background_page", + "url": "chrome-extension://aapnijgdinlhnhlmodcfapnahmbfebeb/_generated_background_page.html", + "webSocketDebuggerUrl": "ws://localhost:45731/devtools/page/7193CBE1EAFA5091389DE9B5DA87C3F9" +}, { + "description": "", + "devtoolsFrontendUrl": "/devtools/inspector.html?ws=localhost:45731/devtools/page/BC654CC38099C1E4448B89464CEE46FF", + "id": "BC654CC38099C1E4448B89464CEE46FF", + "title": "", + "type": "page", + "url": "data:,", + "webSocketDebuggerUrl": "ws://localhost:45731/devtools/page/BC654CC38099C1E4448B89464CEE46FF" +} ] + +[1532467951.217][DEBUG]: DevTools request: http://localhost:45731/json +[1532467951.222][DEBUG]: DevTools response: [ { + "description": "", + "devtoolsFrontendUrl": "/devtools/inspector.html?ws=localhost:45731/devtools/page/7193CBE1EAFA5091389DE9B5DA87C3F9", + "id": "7193CBE1EAFA5091389DE9B5DA87C3F9", + "title": "Chrome Automation Extension", + "type": "background_page", + "url": "chrome-extension://aapnijgdinlhnhlmodcfapnahmbfebeb/_generated_background_page.html", + "webSocketDebuggerUrl": "ws://localhost:45731/devtools/page/7193CBE1EAFA5091389DE9B5DA87C3F9" +}, { + "description": "", + "devtoolsFrontendUrl": "/devtools/inspector.html?ws=localhost:45731/devtools/page/BC654CC38099C1E4448B89464CEE46FF", + "id": "BC654CC38099C1E4448B89464CEE46FF", + "title": "", + "type": "page", + "url": "data:,", + "webSocketDebuggerUrl": "ws://localhost:45731/devtools/page/BC654CC38099C1E4448B89464CEE46FF" +} ] + +[1532467951.223][INFO]: resolved localhost to ["::1","127.0.0.1"] +[1532467951.228][DEBUG]: DEVTOOLS COMMAND Log.enable (id=1) { + +} +[1532467951.228][DEBUG]: DEVTOOLS COMMAND DOM.getDocument (id=2) { + +} +[1532467951.229][DEBUG]: DEVTOOLS COMMAND Target.setAutoAttach (id=3) { + "autoAttach": true, + "waitForDebuggerOnStart": false +} +[1532467951.229][DEBUG]: DEVTOOLS COMMAND Page.enable (id=4) { + +} +[1532467951.229][DEBUG]: DEVTOOLS COMMAND Page.enable (id=5) { + +} +[1532467951.313][DEBUG]: DEVTOOLS RESPONSE Log.enable (id=1) { + +} +[1532467951.314][DEBUG]: DEVTOOLS RESPONSE DOM.getDocument (id=2) { + "root": { + "backendNodeId": 2, + "baseURL": "data:,", + "childNodeCount": 1, + "children": [ { + "attributes": [ ], + "backendNodeId": 3, + "childNodeCount": 2, + "children": [ { + "attributes": [ ], + "backendNodeId": 4, + "childNodeCount": 0, + "localName": "head", + "nodeId": 3, + "nodeName": "HEAD", + "nodeType": 1, + "nodeValue": "", + "parentId": 2 + }, { + "attributes": [ ], + "backendNodeId": 5, + "childNodeCount": 0, + "localName": "body", + "nodeId": 4, + "nodeName": "BODY", + "nodeType": 1, + "nodeValue": "", + "parentId": 2 + } ], + "frameId": "BC654CC38099C1E4448B89464CEE46FF", + "localName": "html", + "nodeId": 2, + "nodeName": "HTML", + "nodeType": 1, + "nodeValue": "", + "parentId": 1 + } ], + "documentURL": "data:,", + "localName": "", + "nodeId": 1, + "nodeName": "#document", + "nodeType": 9, + "nodeValue": "", + "xmlVersion": "" + } +} +[1532467951.315][DEBUG]: DEVTOOLS RESPONSE Target.setAutoAttach (id=3) { + +} +[1532467951.315][DEBUG]: DEVTOOLS RESPONSE Page.enable (id=4) { + +} +[1532467951.315][DEBUG]: DEVTOOLS RESPONSE Page.enable (id=5) { + +} +[1532467951.315][DEBUG]: DEVTOOLS COMMAND Runtime.enable (id=6) { + +} +[1532467951.323][DEBUG]: DEVTOOLS EVENT Page.frameResized { + +} +[1532467951.368][DEBUG]: DEVTOOLS EVENT Runtime.executionContextCreated { + "context": { + "auxData": { + "frameId": "BC654CC38099C1E4448B89464CEE46FF", + "isDefault": true + }, + "id": 1, + "name": "", + "origin": "://" + } +} +[1532467951.369][DEBUG]: DEVTOOLS RESPONSE Runtime.enable (id=6) { + +} +[1532467951.369][DEBUG]: DEVTOOLS COMMAND Page.enable (id=7) { + +} +[1532467951.381][DEBUG]: DEVTOOLS RESPONSE Page.enable (id=7) { + +} +[1532467951.382][DEBUG]: DEVTOOLS COMMAND Runtime.enable (id=8) { + +} +[1532467951.383][DEBUG]: DEVTOOLS RESPONSE Runtime.enable (id=8) { + +} +[1532467951.384][DEBUG]: DEVTOOLS COMMAND Runtime.evaluate (id=9) { + "expression": "(function() { // Copyright (c) 2012 The Chromium Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style license that can be\n// found in the LICENSE file.\n\n/**\n * Enum f...", + "returnByValue": true +} +[1532467951.405][DEBUG]: DEVTOOLS RESPONSE Runtime.evaluate (id=9) { + "result": { + "type": "object", + "value": { + "status": 0, + "value": 1 + } + } +} +[1532467951.405][INFO]: [72839e50ab82864159b02ad3f022fcdd] RESPONSE InitSession { + "acceptInsecureCerts": false, + "acceptSslCerts": false, + "applicationCacheEnabled": false, + "browserConnectionEnabled": false, + "browserName": "chrome", + "chrome": { + "chromedriverVersion": "2.40 (1ba6d2ec0853ea1d507bccc09f540f5ea1db0394)", + "userDataDir": "/tmp/.org.chromium.Chromium.1730lr" + }, + "cssSelectorsEnabled": true, + "databaseEnabled": false, + "goog:chromeOptions": { + "debuggerAddress": "localhost:45731" + }, + "handlesAlerts": true, + "hasTouchScreen": false, + "javascriptEnabled": true, + "locationContextEnabled": true, + "mobileEmulationEnabled": false, + "nativeEvents": true, + "networkConnectionEnabled": false, + "pageLoadStrategy": "normal", + "platform": "Linux", + "rotatable": false, + "setWindowRect": true, + "takesHeapSnapshot": true, + "takesScreenshot": true, + "unexpectedAlertBehaviour": "", + "version": "69.0.3491.0", + "webStorageEnabled": true +} +[1532467951.407][INFO]: [72839e50ab82864159b02ad3f022fcdd] COMMAND ExecuteScript { + "args": [ ], + "script": "return 1" +} +[1532467951.407][INFO]: Waiting for pending navigations... +[1532467951.407][DEBUG]: DEVTOOLS COMMAND Runtime.evaluate (id=10) { + "expression": "1" +} +[1532467951.412][DEBUG]: DEVTOOLS RESPONSE Runtime.evaluate (id=10) { + "result": { + "description": "1", + "type": "number", + "value": 1 + } +} +[1532467951.413][DEBUG]: DEVTOOLS COMMAND DOM.getDocument (id=11) { + +} +[1532467951.416][DEBUG]: DEVTOOLS RESPONSE DOM.getDocument (id=11) { + "root": { + "backendNodeId": 2, + "baseURL": "data:,", + "childNodeCount": 1, + "children": [ { + "attributes": [ ], + "backendNodeId": 3, + "childNodeCount": 2, + "children": [ { + "attributes": [ ], + "backendNodeId": 4, + "childNodeCount": 0, + "localName": "head", + "nodeId": 7, + "nodeName": "HEAD", + "nodeType": 1, + "nodeValue": "", + "parentId": 6 + }, { + "attributes": [ ], + "backendNodeId": 5, + "childNodeCount": 0, + "localName": "body", + "nodeId": 8, + "nodeName": "BODY", + "nodeType": 1, + "nodeValue": "", + "parentId": 6 + } ], + "frameId": "BC654CC38099C1E4448B89464CEE46FF", + "localName": "html", + "nodeId": 6, + "nodeName": "HTML", + "nodeType": 1, + "nodeValue": "", + "parentId": 5 + } ], + "documentURL": "data:,", + "localName": "", + "nodeId": 5, + "nodeName": "#document", + "nodeType": 9, + "nodeValue": "", + "xmlVersion": "" + } +} +[1532467951.416][DEBUG]: DEVTOOLS COMMAND Runtime.evaluate (id=12) { + "expression": "var frame = document.createElement('iframe');frame.name = 'chromedriver dummy frame';frame.src = 'about:blank';document.body.appendChild(frame);window.setTimeout(function() { document.body.removeC..." +} +[1532467951.427][DEBUG]: DEVTOOLS EVENT DOM.childNodeCountUpdated { + "childNodeCount": 1, + "nodeId": 8 +} +[1532467951.427][DEBUG]: DEVTOOLS EVENT Page.frameAttached { + "frameId": "1BAD9961A640A6D5A46E4E8DFF383805", + "parentFrameId": "BC654CC38099C1E4448B89464CEE46FF", + "stack": { + "callFrames": [ { + "columnNumber": 125, + "functionName": "", + "lineNumber": 0, + "scriptId": "20", + "url": "" + } ] + } +} +[1532467951.462][DEBUG]: DEVTOOLS EVENT Page.frameStartedLoading { + "frameId": "1BAD9961A640A6D5A46E4E8DFF383805" +} +[1532467951.463][DEBUG]: DEVTOOLS EVENT Page.frameNavigated { + "frame": { + "id": "1BAD9961A640A6D5A46E4E8DFF383805", + "loaderId": "3B9D53F2DC2A9948DC6D49B9E40EF407", + "mimeType": "text/html", + "name": "chromedriver dummy frame", + "parentId": "BC654CC38099C1E4448B89464CEE46FF", + "securityOrigin": "://", + "url": "about:blank" + } +} +[1532467951.463][DEBUG]: DEVTOOLS EVENT Runtime.executionContextCreated { + "context": { + "auxData": { + "frameId": "1BAD9961A640A6D5A46E4E8DFF383805", + "isDefault": true + }, + "id": 2, + "name": "", + "origin": "://" + } +} +[1532467951.463][DEBUG]: DEVTOOLS EVENT Page.frameStoppedLoading { + "frameId": "1BAD9961A640A6D5A46E4E8DFF383805" +} +[1532467951.463][DEBUG]: DEVTOOLS RESPONSE Runtime.evaluate (id=12) { + "result": { + "description": "1", + "type": "number", + "value": 1 + } +} +[1532467951.464][INFO]: Done waiting for pending navigations. Status: ok +[1532467951.465][DEBUG]: DEVTOOLS COMMAND Runtime.evaluate (id=13) { + "expression": "(function() { // Copyright (c) 2012 The Chromium Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style license that can be\n// found in the LICENSE file.\n\n/**\n * Enum f...", + "returnByValue": true +} +[1532467951.708][DEBUG]: DEVTOOLS EVENT DOM.childNodeCountUpdated { + "childNodeCount": 0, + "nodeId": 8 +} +[1532467951.708][DEBUG]: DEVTOOLS EVENT Runtime.executionContextDestroyed { + "executionContextId": 2 +} +[1532467951.708][DEBUG]: DEVTOOLS EVENT Page.frameDetached { + "frameId": "1BAD9961A640A6D5A46E4E8DFF383805" +} +[1532467951.708][DEBUG]: DEVTOOLS RESPONSE Runtime.evaluate (id=13) { + "result": { + "type": "object", + "value": { + "status": 0, + "value": 1 + } + } +} +[1532467951.708][INFO]: Waiting for pending navigations... +[1532467951.708][DEBUG]: DEVTOOLS COMMAND Runtime.evaluate (id=14) { + "expression": "1" +} +[1532467951.730][DEBUG]: DEVTOOLS RESPONSE Runtime.evaluate (id=14) { + "result": { + "description": "1", + "type": "number", + "value": 1 + } +} +[1532467951.730][INFO]: Done waiting for pending navigations. Status: ok +[1532467951.730][INFO]: [72839e50ab82864159b02ad3f022fcdd] RESPONSE ExecuteScript 1 +[1532467951.732][INFO]: [72839e50ab82864159b02ad3f022fcdd] COMMAND ExecuteScript { + "args": [ ], + "script": "" +} +[1532467951.732][INFO]: Waiting for pending navigations... +[1532467951.732][DEBUG]: DEVTOOLS COMMAND Runtime.evaluate (id=15) { + "expression": "1" +} +[1532467951.733][DEBUG]: DEVTOOLS RESPONSE Runtime.evaluate (id=15) { + "result": { + "description": "1", + "type": "number", + "value": 1 + } +} +[1532467951.733][INFO]: Done waiting for pending navigations. Status: ok +[1532467951.734][DEBUG]: DEVTOOLS COMMAND Runtime.evaluate (id=16) { + "expression": "(function() { // Copyright (c) 2012 The Chromium Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style license that can be\n// found in the LICENSE file.\n\n/**\n * Enum f...", + "returnByValue": true +} +[1532467951.743][DEBUG]: DEVTOOLS RESPONSE Runtime.evaluate (id=16) { + "result": { + "type": "object", + "value": { + "status": 0 + } + } +} +[1532467951.743][INFO]: Waiting for pending navigations... +[1532467951.743][DEBUG]: DEVTOOLS COMMAND Runtime.evaluate (id=17) { + "expression": "1" +} +[1532467951.744][DEBUG]: DEVTOOLS RESPONSE Runtime.evaluate (id=17) { + "result": { + "description": "1", + "type": "number", + "value": 1 + } +} +[1532467951.745][INFO]: Done waiting for pending navigations. Status: ok +[1532467951.745][INFO]: [72839e50ab82864159b02ad3f022fcdd] RESPONSE ExecuteScript +[1532467951.746][INFO]: [72839e50ab82864159b02ad3f022fcdd] COMMAND Quit { + +} +[0724/143231.758362:ERROR:nacl_helper_linux.cc(310)] NaCl helper process running without a sandbox! +Most likely you need to configure your SUID sandbox correctly +[1532467951.796][INFO]: [72839e50ab82864159b02ad3f022fcdd] RESPONSE Quit +[1532467951.796][DEBUG]: Log type 'driver' lost 0 entries on destruction +[1532467951.796][DEBUG]: Log type 'browser' lost 0 entries on destruction
diff --git a/chrome/test/chromedriver/log_replay/test_data/testGetTitle.log b/chrome/test/chromedriver/log_replay/test_data/testGetTitle.log new file mode 100644 index 0000000..38e25b84 --- /dev/null +++ b/chrome/test/chromedriver/log_replay/test_data/testGetTitle.log
@@ -0,0 +1,502 @@ +[1532467994.856][INFO]: [118f609a65335095ce088f14b355ab2b] COMMAND InitSession { + "desiredCapabilities": { + "chromeOptions": { + "args": [ "no-sandbox", "disable-gpu" ], + "binary": "/usr/local/google/home/cwinstanley/chromium/src/out/Default/chrome" + }, + "goog:testName": "__main__.ChromeDriverTest.testGetTitle", + "loggingPrefs": { + + } + } +} +[1532467994.858][INFO]: Populating Preferences file: { + "alternate_error_pages": { + "enabled": false + }, + "autofill": { + "enabled": false + }, + "browser": { + "check_default_browser": false + }, + "distribution": { + "import_bookmarks": false, + "import_history": false, + "import_search_engine": false, + "make_chrome_default_for_user": false, + "skip_first_run_ui": true + }, + "dns_prefetching": { + "enabled": false + }, + "profile": { + "content_settings": { + "pattern_pairs": { + "https://*,*": { + "media-stream": { + "audio": "Default", + "video": "Default" + } + } + } + }, + "default_content_setting_values": { + "geolocation": 1 + }, + "default_content_settings": { + "geolocation": 1, + "mouselock": 1, + "notifications": 1, + "popups": 1, + "ppapi-broker": 1 + }, + "password_manager_enabled": false + }, + "safebrowsing": { + "enabled": false + }, + "search": { + "suggest_enabled": false + }, + "translate": { + "enabled": false + } +} +[1532467994.858][INFO]: Populating Local State file: { + "background_mode": { + "enabled": false + }, + "ssl": { + "rev_checking": { + "enabled": false + } + } +} +[1532467994.860][INFO]: Launching chrome: /usr/local/google/home/cwinstanley/chromium/src/out/Default/chrome --disable-background-networking --disable-client-side-phishing-detection --disable-default-apps --disable-gpu --disable-hang-monitor --disable-popup-blocking --disable-prompt-on-repost --disable-sync --disable-web-resources --enable-automation --enable-logging --force-fieldtrials=SiteIsolationExtensions/Control --ignore-certificate-errors --load-extension=/tmp/.org.chromium.Chromium.7rN8vV/internal --log-level=0 --metrics-recording-only --no-first-run --no-sandbox --password-store=basic --remote-debugging-port=0 --test-type=webdriver --use-mock-keychain --user-data-dir=/tmp/.org.chromium.Chromium.jJxgYx data:, +[1881:1881:0724/143316.858249:ERROR:gpu_process_transport_factory.cc(642)] Switching to software compositing. +[1881:1881:0724/143316.858342:ERROR:gpu_process_transport_factory.cc(1007)] Lost UI shared context. +[1881:1881:0724/143316.930408:WARNING:account_consistency_mode_manager.cc(290)] Desktop Identity Consistency cannot be enabled as no OAuth client ID and client secret have been configured. +[1881:1881:0724/143316.930516:WARNING:account_consistency_mode_manager.cc(290)] Desktop Identity Consistency cannot be enabled as no OAuth client ID and client secret have been configured. +[1881:1881:0724/143316.930569:WARNING:account_consistency_mode_manager.cc(290)] Desktop Identity Consistency cannot be enabled as no OAuth client ID and client secret have been configured. +[1881:1881:0724/143316.930624:WARNING:account_consistency_mode_manager.cc(290)] Desktop Identity Consistency cannot be enabled as no OAuth client ID and client secret have been configured. +[1881:1881:0724/143316.931520:WARNING:account_consistency_mode_manager.cc(290)] Desktop Identity Consistency cannot be enabled as no OAuth client ID and client secret have been configured. +[1881:1881:0724/143316.939677:WARNING:account_consistency_mode_manager.cc(290)] Desktop Identity Consistency cannot be enabled as no OAuth client ID and client secret have been configured. +[1881:1881:0724/143316.985057:WARNING:account_consistency_mode_manager.cc(290)] Desktop Identity Consistency cannot be enabled as no OAuth client ID and client secret have been configured. +[1881:1881:0724/143317.012484:WARNING:account_consistency_mode_manager.cc(290)] Desktop Identity Consistency cannot be enabled as no OAuth client ID and client secret have been configured. +[1881:1881:0724/143317.012560:WARNING:account_consistency_mode_manager.cc(290)] Desktop Identity Consistency cannot be enabled as no OAuth client ID and client secret have been configured. + +DevTools listening on ws://127.0.0.1:38717/devtools/browser/cbf2fc24-318f-42f6-9614-08c96a2234a2 +[1532467997.074][DEBUG]: DevTools request: http://localhost:38717/json/version +[1881:1881:0724/143317.155848:WARNING:password_store_factory.cc(253)] Using basic (unencrypted) store for password storage. See https://chromium.googlesource.com/chromium/src/+/master/docs/linux_password_storage.md for more information about password storage options. +[1881:1881:0724/143317.158802:WARNING:account_consistency_mode_manager.cc(290)] Desktop Identity Consistency cannot be enabled as no OAuth client ID and client secret have been configured. +[1532467997.380][DEBUG]: DevTools response: { + "Browser": "Chrome/69.0.3491.0", + "Protocol-Version": "1.3", + "User-Agent": "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/69.0.3491.0 Safari/537.36", + "V8-Version": "6.9.389", + "WebKit-Version": "537.36 (@410f2c4912d46a5fae2fe6c0b2e24d9eb6359761)", + "webSocketDebuggerUrl": "ws://localhost:38717/devtools/browser/cbf2fc24-318f-42f6-9614-08c96a2234a2" +} + +[1532467997.428][DEBUG]: DevTools request: http://localhost:38717/json +[1532467997.460][DEBUG]: DevTools response: [ { + "description": "", + "devtoolsFrontendUrl": "/devtools/inspector.html?ws=localhost:38717/devtools/page/71D48A5DEAB087AE35F6E8EA4EFE781D", + "id": "71D48A5DEAB087AE35F6E8EA4EFE781D", + "title": "Chrome Automation Extension", + "type": "background_page", + "url": "chrome-extension://aapnijgdinlhnhlmodcfapnahmbfebeb/_generated_background_page.html", + "webSocketDebuggerUrl": "ws://localhost:38717/devtools/page/71D48A5DEAB087AE35F6E8EA4EFE781D" +}, { + "description": "", + "devtoolsFrontendUrl": "/devtools/inspector.html?ws=localhost:38717/devtools/page/E1E98305F55C8E126352AD3ED5618787", + "id": "E1E98305F55C8E126352AD3ED5618787", + "title": "", + "type": "page", + "url": "data:,", + "webSocketDebuggerUrl": "ws://localhost:38717/devtools/page/E1E98305F55C8E126352AD3ED5618787" +} ] + +[1532467997.461][DEBUG]: DevTools request: http://localhost:38717/json +[1532467997.463][DEBUG]: DevTools response: [ { + "description": "", + "devtoolsFrontendUrl": "/devtools/inspector.html?ws=localhost:38717/devtools/page/71D48A5DEAB087AE35F6E8EA4EFE781D", + "id": "71D48A5DEAB087AE35F6E8EA4EFE781D", + "title": "Chrome Automation Extension", + "type": "background_page", + "url": "chrome-extension://aapnijgdinlhnhlmodcfapnahmbfebeb/_generated_background_page.html", + "webSocketDebuggerUrl": "ws://localhost:38717/devtools/page/71D48A5DEAB087AE35F6E8EA4EFE781D" +}, { + "description": "", + "devtoolsFrontendUrl": "/devtools/inspector.html?ws=localhost:38717/devtools/page/E1E98305F55C8E126352AD3ED5618787", + "id": "E1E98305F55C8E126352AD3ED5618787", + "title": "", + "type": "page", + "url": "data:,", + "webSocketDebuggerUrl": "ws://localhost:38717/devtools/page/E1E98305F55C8E126352AD3ED5618787" +} ] + +[1532467997.465][INFO]: resolved localhost to ["::1","127.0.0.1"] +[1532467997.467][DEBUG]: DEVTOOLS COMMAND Log.enable (id=1) { + +} +[1532467997.467][DEBUG]: DEVTOOLS COMMAND DOM.getDocument (id=2) { + +} +[1532467997.467][DEBUG]: DEVTOOLS COMMAND Target.setAutoAttach (id=3) { + "autoAttach": true, + "waitForDebuggerOnStart": false +} +[1532467997.468][DEBUG]: DEVTOOLS COMMAND Page.enable (id=4) { + +} +[1532467997.468][DEBUG]: DEVTOOLS COMMAND Page.enable (id=5) { + +} +[1532467997.540][DEBUG]: DEVTOOLS RESPONSE Log.enable (id=1) { + +} +[1532467997.541][DEBUG]: DEVTOOLS RESPONSE DOM.getDocument (id=2) { + "root": { + "backendNodeId": 2, + "baseURL": "data:,", + "childNodeCount": 1, + "children": [ { + "attributes": [ ], + "backendNodeId": 3, + "childNodeCount": 2, + "children": [ { + "attributes": [ ], + "backendNodeId": 4, + "childNodeCount": 0, + "localName": "head", + "nodeId": 3, + "nodeName": "HEAD", + "nodeType": 1, + "nodeValue": "", + "parentId": 2 + }, { + "attributes": [ ], + "backendNodeId": 5, + "childNodeCount": 0, + "localName": "body", + "nodeId": 4, + "nodeName": "BODY", + "nodeType": 1, + "nodeValue": "", + "parentId": 2 + } ], + "frameId": "E1E98305F55C8E126352AD3ED5618787", + "localName": "html", + "nodeId": 2, + "nodeName": "HTML", + "nodeType": 1, + "nodeValue": "", + "parentId": 1 + } ], + "documentURL": "data:,", + "localName": "", + "nodeId": 1, + "nodeName": "#document", + "nodeType": 9, + "nodeValue": "", + "xmlVersion": "" + } +} +[1532467997.541][DEBUG]: DEVTOOLS RESPONSE Target.setAutoAttach (id=3) { + +} +[1532467997.541][DEBUG]: DEVTOOLS RESPONSE Page.enable (id=4) { + +} +[1532467997.541][DEBUG]: DEVTOOLS RESPONSE Page.enable (id=5) { + +} +[1532467997.541][DEBUG]: DEVTOOLS COMMAND Runtime.enable (id=6) { + +} +[1532467997.550][DEBUG]: DEVTOOLS EVENT Page.frameResized { + +} +[1532467997.586][DEBUG]: DEVTOOLS EVENT Runtime.executionContextCreated { + "context": { + "auxData": { + "frameId": "E1E98305F55C8E126352AD3ED5618787", + "isDefault": true + }, + "id": 1, + "name": "", + "origin": "://" + } +} +[1532467997.586][DEBUG]: DEVTOOLS RESPONSE Runtime.enable (id=6) { + +} +[1532467997.586][DEBUG]: DEVTOOLS COMMAND Page.enable (id=7) { + +} +[1532467997.633][DEBUG]: DEVTOOLS RESPONSE Page.enable (id=7) { + +} +[1532467997.633][DEBUG]: DEVTOOLS COMMAND Runtime.enable (id=8) { + +} +[1532467997.650][DEBUG]: DEVTOOLS RESPONSE Runtime.enable (id=8) { + +} +[1532467997.651][DEBUG]: DEVTOOLS COMMAND Runtime.evaluate (id=9) { + "expression": "(function() { // Copyright (c) 2012 The Chromium Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style license that can be\n// found in the LICENSE file.\n\n/**\n * Enum f...", + "returnByValue": true +} +[1532467997.667][DEBUG]: DEVTOOLS RESPONSE Runtime.evaluate (id=9) { + "result": { + "type": "object", + "value": { + "status": 0, + "value": 1 + } + } +} +[1532467997.667][INFO]: [118f609a65335095ce088f14b355ab2b] RESPONSE InitSession { + "acceptInsecureCerts": false, + "acceptSslCerts": false, + "applicationCacheEnabled": false, + "browserConnectionEnabled": false, + "browserName": "chrome", + "chrome": { + "chromedriverVersion": "2.40 (1ba6d2ec0853ea1d507bccc09f540f5ea1db0394)", + "userDataDir": "/tmp/.org.chromium.Chromium.jJxgYx" + }, + "cssSelectorsEnabled": true, + "databaseEnabled": false, + "goog:chromeOptions": { + "debuggerAddress": "localhost:38717" + }, + "handlesAlerts": true, + "hasTouchScreen": false, + "javascriptEnabled": true, + "locationContextEnabled": true, + "mobileEmulationEnabled": false, + "nativeEvents": true, + "networkConnectionEnabled": false, + "pageLoadStrategy": "normal", + "platform": "Linux", + "rotatable": false, + "setWindowRect": true, + "takesHeapSnapshot": true, + "takesScreenshot": true, + "unexpectedAlertBehaviour": "", + "version": "69.0.3491.0", + "webStorageEnabled": true +} +[1532467997.669][INFO]: [118f609a65335095ce088f14b355ab2b] COMMAND ExecuteScript { + "args": [ ], + "script": "document.title = \"title\"; return 1;" +} +[1532467997.669][INFO]: Waiting for pending navigations... +[1532467997.669][DEBUG]: DEVTOOLS COMMAND Runtime.evaluate (id=10) { + "expression": "1" +} +[1532467997.672][DEBUG]: DEVTOOLS RESPONSE Runtime.evaluate (id=10) { + "result": { + "description": "1", + "type": "number", + "value": 1 + } +} +[1532467997.672][DEBUG]: DEVTOOLS COMMAND DOM.getDocument (id=11) { + +} +[1532467997.674][DEBUG]: DEVTOOLS RESPONSE DOM.getDocument (id=11) { + "root": { + "backendNodeId": 2, + "baseURL": "data:,", + "childNodeCount": 1, + "children": [ { + "attributes": [ ], + "backendNodeId": 3, + "childNodeCount": 2, + "children": [ { + "attributes": [ ], + "backendNodeId": 4, + "childNodeCount": 0, + "localName": "head", + "nodeId": 7, + "nodeName": "HEAD", + "nodeType": 1, + "nodeValue": "", + "parentId": 6 + }, { + "attributes": [ ], + "backendNodeId": 5, + "childNodeCount": 0, + "localName": "body", + "nodeId": 8, + "nodeName": "BODY", + "nodeType": 1, + "nodeValue": "", + "parentId": 6 + } ], + "frameId": "E1E98305F55C8E126352AD3ED5618787", + "localName": "html", + "nodeId": 6, + "nodeName": "HTML", + "nodeType": 1, + "nodeValue": "", + "parentId": 5 + } ], + "documentURL": "data:,", + "localName": "", + "nodeId": 5, + "nodeName": "#document", + "nodeType": 9, + "nodeValue": "", + "xmlVersion": "" + } +} +[1532467997.674][DEBUG]: DEVTOOLS COMMAND Runtime.evaluate (id=12) { + "expression": "var frame = document.createElement('iframe');frame.name = 'chromedriver dummy frame';frame.src = 'about:blank';document.body.appendChild(frame);window.setTimeout(function() { document.body.removeC..." +} +[1532467997.685][DEBUG]: DEVTOOLS EVENT DOM.childNodeCountUpdated { + "childNodeCount": 1, + "nodeId": 8 +} +[1532467997.686][DEBUG]: DEVTOOLS EVENT Page.frameAttached { + "frameId": "0EABE529BAD218C47B6CBA5170A9478F", + "parentFrameId": "E1E98305F55C8E126352AD3ED5618787", + "stack": { + "callFrames": [ { + "columnNumber": 125, + "functionName": "", + "lineNumber": 0, + "scriptId": "20", + "url": "" + } ] + } +} +[1532467997.718][DEBUG]: DEVTOOLS EVENT Page.frameStartedLoading { + "frameId": "0EABE529BAD218C47B6CBA5170A9478F" +} +[1532467997.718][DEBUG]: DEVTOOLS EVENT Page.frameNavigated { + "frame": { + "id": "0EABE529BAD218C47B6CBA5170A9478F", + "loaderId": "8437B5B4A41275350C3657A3B8040C49", + "mimeType": "text/html", + "name": "chromedriver dummy frame", + "parentId": "E1E98305F55C8E126352AD3ED5618787", + "securityOrigin": "://", + "url": "about:blank" + } +} +[1532467997.718][DEBUG]: DEVTOOLS EVENT Runtime.executionContextCreated { + "context": { + "auxData": { + "frameId": "0EABE529BAD218C47B6CBA5170A9478F", + "isDefault": true + }, + "id": 2, + "name": "", + "origin": "://" + } +} +[1532467997.718][DEBUG]: DEVTOOLS EVENT Page.frameStoppedLoading { + "frameId": "0EABE529BAD218C47B6CBA5170A9478F" +} +[1532467997.718][DEBUG]: DEVTOOLS RESPONSE Runtime.evaluate (id=12) { + "result": { + "description": "1", + "type": "number", + "value": 1 + } +} +[1532467997.718][INFO]: Done waiting for pending navigations. Status: ok +[1532467997.719][DEBUG]: DEVTOOLS COMMAND Runtime.evaluate (id=13) { + "expression": "(function() { // Copyright (c) 2012 The Chromium Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style license that can be\n// found in the LICENSE file.\n\n/**\n * Enum f...", + "returnByValue": true +} +[1532467998.000][DEBUG]: DEVTOOLS EVENT DOM.childNodeCountUpdated { + "childNodeCount": 0, + "nodeId": 8 +} +[1532467998.000][DEBUG]: DEVTOOLS EVENT Runtime.executionContextDestroyed { + "executionContextId": 2 +} +[1532467998.000][DEBUG]: DEVTOOLS EVENT Page.frameDetached { + "frameId": "0EABE529BAD218C47B6CBA5170A9478F" +} +[1532467998.001][DEBUG]: DEVTOOLS EVENT DOM.childNodeCountUpdated { + "childNodeCount": 1, + "nodeId": 7 +} +[1532467998.001][DEBUG]: DEVTOOLS RESPONSE Runtime.evaluate (id=13) { + "result": { + "type": "object", + "value": { + "status": 0, + "value": 1 + } + } +} +[1532467998.001][INFO]: Waiting for pending navigations... +[1532467998.001][DEBUG]: DEVTOOLS COMMAND Runtime.evaluate (id=14) { + "expression": "1" +} +[1532467998.015][DEBUG]: DEVTOOLS RESPONSE Runtime.evaluate (id=14) { + "result": { + "description": "1", + "type": "number", + "value": 1 + } +} +[1532467998.015][INFO]: Done waiting for pending navigations. Status: ok +[1532467998.015][INFO]: [118f609a65335095ce088f14b355ab2b] RESPONSE ExecuteScript 1 +[1532467998.017][INFO]: [118f609a65335095ce088f14b355ab2b] COMMAND GetTitle { + +} +[1532467998.017][INFO]: Waiting for pending navigations... +[1532467998.017][DEBUG]: DEVTOOLS COMMAND Runtime.evaluate (id=15) { + "expression": "1" +} +[1532467998.026][DEBUG]: DEVTOOLS RESPONSE Runtime.evaluate (id=15) { + "result": { + "description": "1", + "type": "number", + "value": 1 + } +} +[1532467998.026][INFO]: Done waiting for pending navigations. Status: ok +[1532467998.027][DEBUG]: DEVTOOLS COMMAND Runtime.evaluate (id=16) { + "expression": "(function() { // Copyright (c) 2012 The Chromium Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style license that can be\n// found in the LICENSE file.\n\n/**\n * Enum f...", + "returnByValue": true +} +[1532467998.041][DEBUG]: DEVTOOLS RESPONSE Runtime.evaluate (id=16) { + "result": { + "type": "object", + "value": { + "status": 0, + "value": "title" + } + } +} +[1532467998.041][INFO]: Waiting for pending navigations... +[1532467998.041][DEBUG]: DEVTOOLS COMMAND Runtime.evaluate (id=17) { + "expression": "1" +} +[1532467998.043][DEBUG]: DEVTOOLS RESPONSE Runtime.evaluate (id=17) { + "result": { + "description": "1", + "type": "number", + "value": 1 + } +} +[1532467998.043][INFO]: Done waiting for pending navigations. Status: ok +[1532467998.043][INFO]: [118f609a65335095ce088f14b355ab2b] RESPONSE GetTitle "title" +[1532467998.044][INFO]: [118f609a65335095ce088f14b355ab2b] COMMAND Quit { + +} +[0724/143318.056694:ERROR:nacl_helper_linux.cc(310)] NaCl helper process running without a sandbox! +Most likely you need to configure your SUID sandbox correctly +[1532467998.095][INFO]: [118f609a65335095ce088f14b355ab2b] RESPONSE Quit +[1532467998.095][DEBUG]: Log type 'driver' lost 0 entries on destruction +[1532467998.095][DEBUG]: Log type 'browser' lost 0 entries on destruction
diff --git a/chrome/test/chromedriver/log_replay/test_data/testIFrameWithExtensionsSource.log b/chrome/test/chromedriver/log_replay/test_data/testIFrameWithExtensionsSource.log new file mode 100644 index 0000000..147881c --- /dev/null +++ b/chrome/test/chromedriver/log_replay/test_data/testIFrameWithExtensionsSource.log
@@ -0,0 +1,1290 @@ +[1532468050.546][INFO]: [2ae92ece5ebd4ab2601b7ce707066613] COMMAND InitSession { + "desiredCapabilities": { + "chromeOptions": { + "args": [ "no-sandbox", "disable-gpu" ], + "binary": "/usr/local/google/home/cwinstanley/chromium/src/out/Default/chrome", + "extensions": [ "Q3IyNAIAAAAmAQAAAAEAADCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAJ3M9w5pnPBV7y9/rX5xS5FlXhDYkvngm7uxED74uKHDJCmYdPgR+YJi6dZXq4WjXr19IXIwZmCTymKxrjxb0EgVd8VvamVbi0RtwrDvmwnoVmAaXuR18akYhFoRWV0nBoxmjSlveiodQuCBufTW/mp4EQjSrdkeBYH7WfHetzDs1hotNpCqLjUwfKlJnEgOtvEEMLR2OWer5MjJlbR4Wc2xQRZ4vA1oeUtU52ld07EMybpMKQi4zNXOwKkWJ3+uhL8iLPK/qHQWGWffli+UqWPQZwPZeDcF4mZAUS10Hik1h/7A6pucqIqk69R/q7kfqGYMJvK3hEbXpkxYQ+oA8TsCAwEAAQ2mNRrfJqyipZO8hxA+Ph10hN+PtKt2rNeES9ftKPE66XxsSJPhQa1pDEOI/Xg3/n/LfgSzzY8rMyrHo/5eTio2+iOxogWbLuI5X9oRB7zalOUqgmP+Xw8pcirpFBIZgnwMNqDRqh+Wdiy73sqXu3F9lnc/5kWdPtXQKKuYktYkaECxFk14L48Xfv9M77OxK0T+FkWaPZHrR3GyRPnBBlEIL9s9yQjWIlYipOatd5nwOAofVG8enKGmkxbDVeX4cG5IFGDJOi4KNu9IxqMwGEBmVJNcwVeyJCU7IS2IezrIpQD96eYGU06ynHWZA/l0k2o71rp3ooOcUjIq9vxIxWVQSwMEFAAACAgANn+ISXgSO7CNAAAAqQAAABEAAABkb2N1bWVudF9zdGFydC5qcx2MQQ6CMBBF95ziL3UhVRMPgMjCxLhBDwDtQJuUjum0JNze6vK/vPeVQsufLbrZJuz0Hufj6YKXJbQ28uLygiYny1FqNN7jLwoiCcWVTF0phbcQeEKyTiCcoyZoNoQyZ14pBjIYNwy49reDpM0TvNMUSpbskKCHgJF+TxPnYOBC4YTHve2efYfJeaqrL1BLAwQUAAAICAAGdrFKXH4Y3d8AAAC8AQAADQAAAG1hbmlmZXN0Lmpzb25lT81qwzAMvucphM4lbD2WMehlLzGGcV118XCcIMvroPTdJ9vZ0nUXgb5f6dIB4GijP1ES80mc/BRxB9tNIaIdSRfchwAvrEvCih8pOfazNC3uI9CXUCxeOHsZwIKboiICTQgyWAHOMYGPYDXudBO31uJj/9CwxW+aPyn3qjDApc56tLiBVqKCTxptMof0jAv4tvkxaLuxUkqOk8tjDRfLgr+Kj7u0v7pe6X+hpW95ZQfCmSpx7RYNzsSjT+W7NfvuyiY808FY50i1h0CGKU2Z3c1/ONt36gcZQzV11+4bUEsDBBQAAAgIAG53sUpI43jEVgAAAGcAAAAJAAAAcGFnZS5odG1ss1F08XcOiQxwVcgoyc2x47KBUAoKNkn5KZUgBpBZoJCZYqtUYKhk51lSrJCokFaUmJuqUJ5ZkqGQWlGSmlecmZ+nUJxfWpScaqNfANatD9Fuow8xDwBQSwECAAAUAAAICAA2f4hJeBI7sI0AAACpAAAAEQAAAAAAAAABAAAAAAAAAAAAZG9jdW1lbnRfc3RhcnQuanNQSwECAAAUAAAICAAGdrFKXH4Y3d8AAAC8AQAADQAAAAAAAAABAAAAAAC8AAAAbWFuaWZlc3QuanNvblBLAQIAABQAAAgIAG53sUpI43jEVgAAAGcAAAAJAAAAAAAAAAEAAAAAAMYBAABwYWdlLmh0bWxQSwUGAAAAAAMAAwCxAAAAQwIAAAAA" ] + }, + "goog:testName": "__main__.ChromeExtensionsCapabilityTest.testIFrameWithExtensionsSource", + "loggingPrefs": { + + } + } +} +[1532468050.548][INFO]: Populating Preferences file: { + "alternate_error_pages": { + "enabled": false + }, + "autofill": { + "enabled": false + }, + "browser": { + "check_default_browser": false + }, + "distribution": { + "import_bookmarks": false, + "import_history": false, + "import_search_engine": false, + "make_chrome_default_for_user": false, + "skip_first_run_ui": true + }, + "dns_prefetching": { + "enabled": false + }, + "profile": { + "content_settings": { + "pattern_pairs": { + "https://*,*": { + "media-stream": { + "audio": "Default", + "video": "Default" + } + } + } + }, + "default_content_setting_values": { + "geolocation": 1 + }, + "default_content_settings": { + "geolocation": 1, + "mouselock": 1, + "notifications": 1, + "popups": 1, + "ppapi-broker": 1 + }, + "password_manager_enabled": false + }, + "safebrowsing": { + "enabled": false + }, + "search": { + "suggest_enabled": false + }, + "translate": { + "enabled": false + } +} +[1532468050.548][INFO]: Populating Local State file: { + "background_mode": { + "enabled": false + }, + "ssl": { + "rev_checking": { + "enabled": false + } + } +} +[1532468050.551][INFO]: Launching chrome: /usr/local/google/home/cwinstanley/chromium/src/out/Default/chrome --disable-background-networking --disable-client-side-phishing-detection --disable-default-apps --disable-gpu --disable-hang-monitor --disable-popup-blocking --disable-prompt-on-repost --disable-sync --disable-web-resources --enable-automation --enable-logging --force-fieldtrials=SiteIsolationExtensions/Control --ignore-certificate-errors --load-extension=/tmp/.org.chromium.Chromium.I0B8tz/extension_imgnaknjpncihbkeihnbacmcoijbebgm,/tmp/.org.chromium.Chromium.I0B8tz/internal --log-level=0 --metrics-recording-only --no-first-run --no-sandbox --password-store=basic --remote-debugging-port=0 --test-type=webdriver --use-mock-keychain --user-data-dir=/tmp/.org.chromium.Chromium.CisDBF data:, +[2815:2815:0724/143412.316386:ERROR:gpu_process_transport_factory.cc(642)] Switching to software compositing. +[2815:2815:0724/143412.316452:ERROR:gpu_process_transport_factory.cc(1007)] Lost UI shared context. +[2815:2815:0724/143412.391171:WARNING:account_consistency_mode_manager.cc(290)] Desktop Identity Consistency cannot be enabled as no OAuth client ID and client secret have been configured. +[2815:2815:0724/143412.391279:WARNING:account_consistency_mode_manager.cc(290)] Desktop Identity Consistency cannot be enabled as no OAuth client ID and client secret have been configured. +[2815:2815:0724/143412.391322:WARNING:account_consistency_mode_manager.cc(290)] Desktop Identity Consistency cannot be enabled as no OAuth client ID and client secret have been configured. +[2815:2815:0724/143412.391375:WARNING:account_consistency_mode_manager.cc(290)] Desktop Identity Consistency cannot be enabled as no OAuth client ID and client secret have been configured. +[2815:2815:0724/143412.392239:WARNING:account_consistency_mode_manager.cc(290)] Desktop Identity Consistency cannot be enabled as no OAuth client ID and client secret have been configured. +[2815:2815:0724/143412.399073:WARNING:account_consistency_mode_manager.cc(290)] Desktop Identity Consistency cannot be enabled as no OAuth client ID and client secret have been configured. +[2815:2815:0724/143412.443320:WARNING:account_consistency_mode_manager.cc(290)] Desktop Identity Consistency cannot be enabled as no OAuth client ID and client secret have been configured. +[2815:2815:0724/143412.474911:WARNING:account_consistency_mode_manager.cc(290)] Desktop Identity Consistency cannot be enabled as no OAuth client ID and client secret have been configured. +[2815:2815:0724/143412.474983:WARNING:account_consistency_mode_manager.cc(290)] Desktop Identity Consistency cannot be enabled as no OAuth client ID and client secret have been configured. + +DevTools listening on ws://127.0.0.1:39623/devtools/browser/a3e40a37-bdcc-407a-8d3c-7418344221c0 +[1532468052.498][DEBUG]: DevTools request: http://localhost:39623/json/version +[2815:2815:0724/143412.614482:WARNING:password_store_factory.cc(253)] Using basic (unencrypted) store for password storage. See https://chromium.googlesource.com/chromium/src/+/master/docs/linux_password_storage.md for more information about password storage options. +[2815:2815:0724/143412.617059:WARNING:account_consistency_mode_manager.cc(290)] Desktop Identity Consistency cannot be enabled as no OAuth client ID and client secret have been configured. +[1532468052.841][DEBUG]: DevTools response: { + "Browser": "Chrome/69.0.3491.0", + "Protocol-Version": "1.3", + "User-Agent": "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/69.0.3491.0 Safari/537.36", + "V8-Version": "6.9.389", + "WebKit-Version": "537.36 (@410f2c4912d46a5fae2fe6c0b2e24d9eb6359761)", + "webSocketDebuggerUrl": "ws://localhost:39623/devtools/browser/a3e40a37-bdcc-407a-8d3c-7418344221c0" +} + +[1532468052.889][DEBUG]: DevTools request: http://localhost:39623/json +[1532468052.915][DEBUG]: DevTools response: [ { + "description": "", + "devtoolsFrontendUrl": "/devtools/inspector.html?ws=localhost:39623/devtools/page/1BAF7850EEE9C4B1CD6D9F9439359AF0", + "id": "1BAF7850EEE9C4B1CD6D9F9439359AF0", + "title": "Chrome Automation Extension", + "type": "background_page", + "url": "chrome-extension://aapnijgdinlhnhlmodcfapnahmbfebeb/_generated_background_page.html", + "webSocketDebuggerUrl": "ws://localhost:39623/devtools/page/1BAF7850EEE9C4B1CD6D9F9439359AF0" +}, { + "description": "", + "devtoolsFrontendUrl": "/devtools/inspector.html?ws=localhost:39623/devtools/page/B36707A6F5F03F12170F3CF991934BBB", + "id": "B36707A6F5F03F12170F3CF991934BBB", + "title": "", + "type": "page", + "url": "data:,", + "webSocketDebuggerUrl": "ws://localhost:39623/devtools/page/B36707A6F5F03F12170F3CF991934BBB" +} ] + +[1532468052.915][DEBUG]: DevTools request: http://localhost:39623/json +[1532468052.918][DEBUG]: DevTools response: [ { + "description": "", + "devtoolsFrontendUrl": "/devtools/inspector.html?ws=localhost:39623/devtools/page/1BAF7850EEE9C4B1CD6D9F9439359AF0", + "id": "1BAF7850EEE9C4B1CD6D9F9439359AF0", + "title": "Chrome Automation Extension", + "type": "background_page", + "url": "chrome-extension://aapnijgdinlhnhlmodcfapnahmbfebeb/_generated_background_page.html", + "webSocketDebuggerUrl": "ws://localhost:39623/devtools/page/1BAF7850EEE9C4B1CD6D9F9439359AF0" +}, { + "description": "", + "devtoolsFrontendUrl": "/devtools/inspector.html?ws=localhost:39623/devtools/page/B36707A6F5F03F12170F3CF991934BBB", + "id": "B36707A6F5F03F12170F3CF991934BBB", + "title": "", + "type": "page", + "url": "data:,", + "webSocketDebuggerUrl": "ws://localhost:39623/devtools/page/B36707A6F5F03F12170F3CF991934BBB" +} ] + +[1532468052.919][INFO]: resolved localhost to ["::1","127.0.0.1"] +[1532468052.921][DEBUG]: DEVTOOLS COMMAND Log.enable (id=1) { + +} +[1532468052.921][DEBUG]: DEVTOOLS COMMAND DOM.getDocument (id=2) { + +} +[1532468052.922][DEBUG]: DEVTOOLS COMMAND Target.setAutoAttach (id=3) { + "autoAttach": true, + "waitForDebuggerOnStart": false +} +[1532468052.922][DEBUG]: DEVTOOLS COMMAND Page.enable (id=4) { + +} +[1532468052.922][DEBUG]: DEVTOOLS COMMAND Page.enable (id=5) { + +} +[1532468052.978][DEBUG]: DEVTOOLS RESPONSE Log.enable (id=1) { + +} +[1532468052.979][DEBUG]: DEVTOOLS RESPONSE DOM.getDocument (id=2) { + "root": { + "backendNodeId": 1, + "baseURL": "about:blank", + "childNodeCount": 1, + "children": [ { + "attributes": [ ], + "backendNodeId": 2, + "childNodeCount": 2, + "children": [ { + "attributes": [ ], + "backendNodeId": 3, + "childNodeCount": 0, + "localName": "head", + "nodeId": 3, + "nodeName": "HEAD", + "nodeType": 1, + "nodeValue": "", + "parentId": 2 + }, { + "attributes": [ ], + "backendNodeId": 4, + "childNodeCount": 0, + "localName": "body", + "nodeId": 4, + "nodeName": "BODY", + "nodeType": 1, + "nodeValue": "", + "parentId": 2 + } ], + "frameId": "B36707A6F5F03F12170F3CF991934BBB", + "localName": "html", + "nodeId": 2, + "nodeName": "HTML", + "nodeType": 1, + "nodeValue": "", + "parentId": 1 + } ], + "documentURL": "", + "localName": "", + "nodeId": 1, + "nodeName": "#document", + "nodeType": 9, + "nodeValue": "", + "xmlVersion": "" + } +} +[1532468052.979][DEBUG]: DEVTOOLS RESPONSE Target.setAutoAttach (id=3) { + +} +[1532468052.979][DEBUG]: DEVTOOLS RESPONSE Page.enable (id=4) { + +} +[1532468052.980][DEBUG]: DEVTOOLS RESPONSE Page.enable (id=5) { + +} +[1532468052.980][DEBUG]: DEVTOOLS COMMAND Runtime.enable (id=6) { + +} +[1532468053.032][DEBUG]: DEVTOOLS EVENT Page.frameNavigated { + "frame": { + "id": "B36707A6F5F03F12170F3CF991934BBB", + "loaderId": "89C3FCF04486FC0B91860DAA4E6B3F87", + "mimeType": "text/plain", + "securityOrigin": "://", + "url": "data:," + } +} +[1532468053.032][DEBUG]: DEVTOOLS EVENT DOM.documentUpdated { + +} +[1532468053.032][DEBUG]: DEVTOOLS COMMAND DOM.getDocument (id=7) { + +} +[1532468053.033][DEBUG]: DEVTOOLS EVENT Page.loadEventFired { + "timestamp": 80737.318851 +} +[1532468053.033][DEBUG]: DEVTOOLS EVENT Page.frameStoppedLoading { + "frameId": "B36707A6F5F03F12170F3CF991934BBB" +} +[1532468053.033][DEBUG]: DEVTOOLS EVENT DOM.documentUpdated { + +} +[1532468053.033][DEBUG]: DEVTOOLS COMMAND DOM.getDocument (id=8) { + +} +[1532468053.033][DEBUG]: DEVTOOLS EVENT Page.domContentEventFired { + "timestamp": 80737.321588 +} +[1532468053.048][DEBUG]: DEVTOOLS EVENT Page.frameResized { + +} +[1532468053.058][DEBUG]: DEVTOOLS EVENT Runtime.executionContextCreated { + "context": { + "auxData": { + "frameId": "B36707A6F5F03F12170F3CF991934BBB", + "isDefault": true + }, + "id": 1, + "name": "", + "origin": "://" + } +} +[1532468053.058][DEBUG]: DEVTOOLS RESPONSE Runtime.enable (id=6) { + +} +[1532468053.083][DEBUG]: DEVTOOLS RESPONSE DOM.getDocument (id=7) { + "root": { + "backendNodeId": 5, + "baseURL": "data:,", + "childNodeCount": 1, + "children": [ { + "attributes": [ ], + "backendNodeId": 6, + "childNodeCount": 2, + "children": [ { + "attributes": [ ], + "backendNodeId": 7, + "childNodeCount": 0, + "localName": "head", + "nodeId": 7, + "nodeName": "HEAD", + "nodeType": 1, + "nodeValue": "", + "parentId": 6 + }, { + "attributes": [ ], + "backendNodeId": 8, + "childNodeCount": 0, + "localName": "body", + "nodeId": 8, + "nodeName": "BODY", + "nodeType": 1, + "nodeValue": "", + "parentId": 6 + } ], + "frameId": "B36707A6F5F03F12170F3CF991934BBB", + "localName": "html", + "nodeId": 6, + "nodeName": "HTML", + "nodeType": 1, + "nodeValue": "", + "parentId": 5 + } ], + "documentURL": "data:,", + "localName": "", + "nodeId": 5, + "nodeName": "#document", + "nodeType": 9, + "nodeValue": "", + "xmlVersion": "" + } +} +[1532468053.088][DEBUG]: DEVTOOLS RESPONSE DOM.getDocument (id=8) { + "root": { + "backendNodeId": 5, + "baseURL": "data:,", + "childNodeCount": 1, + "children": [ { + "attributes": [ ], + "backendNodeId": 6, + "childNodeCount": 2, + "children": [ { + "attributes": [ ], + "backendNodeId": 7, + "childNodeCount": 0, + "localName": "head", + "nodeId": 11, + "nodeName": "HEAD", + "nodeType": 1, + "nodeValue": "", + "parentId": 10 + }, { + "attributes": [ ], + "backendNodeId": 8, + "childNodeCount": 0, + "localName": "body", + "nodeId": 12, + "nodeName": "BODY", + "nodeType": 1, + "nodeValue": "", + "parentId": 10 + } ], + "frameId": "B36707A6F5F03F12170F3CF991934BBB", + "localName": "html", + "nodeId": 10, + "nodeName": "HTML", + "nodeType": 1, + "nodeValue": "", + "parentId": 9 + } ], + "documentURL": "data:,", + "localName": "", + "nodeId": 9, + "nodeName": "#document", + "nodeType": 9, + "nodeValue": "", + "xmlVersion": "" + } +} +[1532468053.089][DEBUG]: DEVTOOLS COMMAND Page.enable (id=9) { + +} +[1532468053.114][DEBUG]: DEVTOOLS RESPONSE Page.enable (id=9) { + +} +[1532468053.114][DEBUG]: DEVTOOLS COMMAND Runtime.enable (id=10) { + +} +[1532468053.137][DEBUG]: DEVTOOLS RESPONSE Runtime.enable (id=10) { + +} +[1532468053.138][DEBUG]: DEVTOOLS COMMAND Runtime.evaluate (id=11) { + "expression": "(function() { // Copyright (c) 2012 The Chromium Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style license that can be\n// found in the LICENSE file.\n\n/**\n * Enum f...", + "returnByValue": true +} +[1532468053.164][DEBUG]: DEVTOOLS RESPONSE Runtime.evaluate (id=11) { + "result": { + "type": "object", + "value": { + "status": 0, + "value": 1 + } + } +} +[1532468053.164][INFO]: [2ae92ece5ebd4ab2601b7ce707066613] RESPONSE InitSession { + "acceptInsecureCerts": false, + "acceptSslCerts": false, + "applicationCacheEnabled": false, + "browserConnectionEnabled": false, + "browserName": "chrome", + "chrome": { + "chromedriverVersion": "2.40 (1ba6d2ec0853ea1d507bccc09f540f5ea1db0394)", + "userDataDir": "/tmp/.org.chromium.Chromium.CisDBF" + }, + "cssSelectorsEnabled": true, + "databaseEnabled": false, + "goog:chromeOptions": { + "debuggerAddress": "localhost:39623" + }, + "handlesAlerts": true, + "hasTouchScreen": false, + "javascriptEnabled": true, + "locationContextEnabled": true, + "mobileEmulationEnabled": false, + "nativeEvents": true, + "networkConnectionEnabled": false, + "pageLoadStrategy": "normal", + "platform": "Linux", + "rotatable": false, + "setWindowRect": true, + "takesHeapSnapshot": true, + "takesScreenshot": true, + "unexpectedAlertBehaviour": "", + "version": "69.0.3491.0", + "webStorageEnabled": true +} +[1532468053.166][INFO]: [2ae92ece5ebd4ab2601b7ce707066613] COMMAND Navigate { + "url": "http://127.0.0.1:34567/chromedriver/iframe_extension.html" +} +[1532468053.166][INFO]: Waiting for pending navigations... +[1532468053.166][DEBUG]: DEVTOOLS COMMAND Runtime.evaluate (id=12) { + "expression": "1" +} +[1532468053.169][DEBUG]: DEVTOOLS RESPONSE Runtime.evaluate (id=12) { + "result": { + "description": "1", + "type": "number", + "value": 1 + } +} +[1532468053.169][INFO]: Done waiting for pending navigations. Status: ok +[1532468053.169][DEBUG]: DEVTOOLS COMMAND Page.navigate (id=13) { + "url": "http://127.0.0.1:34567/chromedriver/iframe_extension.html" +} +[1532468053.516][DEBUG]: DEVTOOLS RESPONSE Page.navigate (id=13) { + "frameId": "B36707A6F5F03F12170F3CF991934BBB", + "loaderId": "59FDD7F11B8F6AA4F12B5D7ECCC47CE8" +} +[1532468053.516][DEBUG]: DEVTOOLS COMMAND Runtime.evaluate (id=14) { + "expression": "document.URL" +} +[1532468053.521][DEBUG]: DEVTOOLS EVENT Runtime.executionContextsCleared { + +} +[1532468053.535][DEBUG]: DEVTOOLS EVENT Page.frameStartedLoading { + "frameId": "B36707A6F5F03F12170F3CF991934BBB" +} +[1532468053.581][DEBUG]: DEVTOOLS EVENT Runtime.executionContextsCleared { + +} +[1532468053.582][DEBUG]: DEVTOOLS EVENT Page.frameNavigated { + "frame": { + "id": "B36707A6F5F03F12170F3CF991934BBB", + "loaderId": "59FDD7F11B8F6AA4F12B5D7ECCC47CE8", + "mimeType": "text/html", + "securityOrigin": "http://127.0.0.1:34567", + "url": "http://127.0.0.1:34567/chromedriver/iframe_extension.html" + } +} +[1532468053.582][DEBUG]: DEVTOOLS EVENT Runtime.executionContextCreated { + "context": { + "auxData": { + "frameId": "B36707A6F5F03F12170F3CF991934BBB", + "isDefault": true + }, + "id": 1, + "name": "", + "origin": "http://127.0.0.1:34567" + } +} +[1532468053.582][DEBUG]: DEVTOOLS EVENT DOM.documentUpdated { + +} +[1532468053.582][DEBUG]: DEVTOOLS COMMAND DOM.getDocument (id=15) { + +} +[2864:2864:0724/143413.581903:ERROR:render_process_impl.cc(208)] WebFrame LEAKED 1 TIMES +[1532468053.617][DEBUG]: DEVTOOLS EVENT Runtime.executionContextCreated { + "context": { + "auxData": { + "frameId": "B36707A6F5F03F12170F3CF991934BBB", + "isDefault": false + }, + "id": 2, + "name": "All Frames", + "origin": "chrome-extension://imgnaknjpncihbkeihnbacmcoijbebgm" + } +} +[1532468053.617][DEBUG]: DEVTOOLS EVENT Page.frameAttached { + "frameId": "9D0276B3A5D80AC39E578D8FCFBADAE1", + "parentFrameId": "B36707A6F5F03F12170F3CF991934BBB" +} +[1532468053.635][DEBUG]: DEVTOOLS EVENT Page.frameStartedLoading { + "frameId": "9D0276B3A5D80AC39E578D8FCFBADAE1" +} +[1532468053.635][DEBUG]: DEVTOOLS EVENT DOM.documentUpdated { + +} +[1532468053.636][DEBUG]: DEVTOOLS COMMAND DOM.getDocument (id=16) { + +} +[1532468053.636][DEBUG]: DEVTOOLS EVENT Page.domContentEventFired { + "timestamp": 80737.939868 +} +[1532468053.636][DEBUG]: DEVTOOLS RESPONSE Runtime.evaluate (id=14) { + "result": { + "type": "string", + "value": "http://127.0.0.1:34567/chromedriver/iframe_extension.html" + } +} +[1532468053.638][DEBUG]: DEVTOOLS RESPONSE DOM.getDocument (id=15) { + "root": { + "backendNodeId": 1, + "baseURL": "http://127.0.0.1:34567/chromedriver/iframe_extension.html", + "childNodeCount": 2, + "children": [ { + "backendNodeId": 2, + "localName": "", + "nodeId": 2, + "nodeName": "html", + "nodeType": 10, + "nodeValue": "", + "parentId": 1, + "publicId": "", + "systemId": "" + }, { + "attributes": [ ], + "backendNodeId": 3, + "childNodeCount": 2, + "children": [ { + "attributes": [ ], + "backendNodeId": 4, + "childNodeCount": 1, + "localName": "head", + "nodeId": 4, + "nodeName": "HEAD", + "nodeType": 1, + "nodeValue": "", + "parentId": 3 + }, { + "attributes": [ ], + "backendNodeId": 5, + "childNodeCount": 1, + "localName": "body", + "nodeId": 5, + "nodeName": "BODY", + "nodeType": 1, + "nodeValue": "", + "parentId": 3 + } ], + "frameId": "B36707A6F5F03F12170F3CF991934BBB", + "localName": "html", + "nodeId": 3, + "nodeName": "HTML", + "nodeType": 1, + "nodeValue": "", + "parentId": 1 + } ], + "documentURL": "http://127.0.0.1:34567/chromedriver/iframe_extension.html", + "localName": "", + "nodeId": 1, + "nodeName": "#document", + "nodeType": 9, + "nodeValue": "", + "xmlVersion": "" + } +} +[1532468053.646][DEBUG]: DEVTOOLS EVENT Target.attachedToTarget { + "sessionId": "5C11129817022D44AA55CF55848B5570", + "targetInfo": { + "attached": true, + "browserContextId": "FF7103950A03701CEB6FDA8FC80EE318", + "targetId": "9D0276B3A5D80AC39E578D8FCFBADAE1", + "title": "", + "type": "iframe", + "url": "" + }, + "waitingForDebugger": false +} +[1532468053.646][DEBUG]: DEVTOOLS COMMAND DOM.getDocument (id=1) { + +} +[1532468053.646][DEBUG]: DEVTOOLS COMMAND Target.sendMessageToTarget (id=17) { + "message": "{\"id\":1,\"method\":\"DOM.getDocument\",\"params\":{}}", + "sessionId": "5C11129817022D44AA55CF55848B5570" +} +[1532468053.646][DEBUG]: DEVTOOLS COMMAND Target.setAutoAttach (id=2) { + "autoAttach": true, + "waitForDebuggerOnStart": false +} +[1532468053.647][DEBUG]: DEVTOOLS COMMAND Target.sendMessageToTarget (id=18) { + "message": "{\"id\":2,\"method\":\"Target.setAutoAttach\",\"params\":{\"autoAttach\":true,\"waitForDebuggerOnStart\":false}}", + "sessionId": "5C11129817022D44AA55CF55848B5570" +} +[1532468053.647][DEBUG]: DEVTOOLS COMMAND Page.enable (id=3) { + +} +[1532468053.647][DEBUG]: DEVTOOLS COMMAND Target.sendMessageToTarget (id=19) { + "message": "{\"id\":3,\"method\":\"Page.enable\",\"params\":{}}", + "sessionId": "5C11129817022D44AA55CF55848B5570" +} +[1532468053.647][DEBUG]: DEVTOOLS COMMAND Page.enable (id=4) { + +} +[1532468053.647][DEBUG]: DEVTOOLS COMMAND Target.sendMessageToTarget (id=20) { + "message": "{\"id\":4,\"method\":\"Page.enable\",\"params\":{}}", + "sessionId": "5C11129817022D44AA55CF55848B5570" +} +[1532468053.649][DEBUG]: DEVTOOLS RESPONSE Target.sendMessageToTarget (id=17) { + +} +[1532468053.649][DEBUG]: DEVTOOLS RESPONSE Target.sendMessageToTarget (id=18) { + +} +[1532468053.649][DEBUG]: DEVTOOLS RESPONSE Target.sendMessageToTarget (id=19) { + +} +[1532468053.650][DEBUG]: DEVTOOLS RESPONSE Target.sendMessageToTarget (id=20) { + +} +[1532468053.674][DEBUG]: DEVTOOLS RESPONSE DOM.getDocument (id=16) { + "root": { + "backendNodeId": 1, + "baseURL": "http://127.0.0.1:34567/chromedriver/iframe_extension.html", + "childNodeCount": 2, + "children": [ { + "backendNodeId": 2, + "localName": "", + "nodeId": 7, + "nodeName": "html", + "nodeType": 10, + "nodeValue": "", + "parentId": 6, + "publicId": "", + "systemId": "" + }, { + "attributes": [ ], + "backendNodeId": 3, + "childNodeCount": 2, + "children": [ { + "attributes": [ ], + "backendNodeId": 4, + "childNodeCount": 1, + "localName": "head", + "nodeId": 9, + "nodeName": "HEAD", + "nodeType": 1, + "nodeValue": "", + "parentId": 8 + }, { + "attributes": [ ], + "backendNodeId": 5, + "childNodeCount": 1, + "localName": "body", + "nodeId": 10, + "nodeName": "BODY", + "nodeType": 1, + "nodeValue": "", + "parentId": 8 + } ], + "frameId": "B36707A6F5F03F12170F3CF991934BBB", + "localName": "html", + "nodeId": 8, + "nodeName": "HTML", + "nodeType": 1, + "nodeValue": "", + "parentId": 6 + } ], + "documentURL": "http://127.0.0.1:34567/chromedriver/iframe_extension.html", + "localName": "", + "nodeId": 6, + "nodeName": "#document", + "nodeType": 9, + "nodeValue": "", + "xmlVersion": "" + } +} +[1532468053.740][DEBUG]: DEVTOOLS EVENT Page.frameResized { + +} +[1532468053.756][DEBUG]: DEVTOOLS EVENT Target.receivedMessageFromTarget { + "message": "{\"id\":1,\"result\":{\"root\":{\"nodeId\":1,\"backendNodeId\":1,\"nodeType\":9,\"nodeName\":\"#document\",\"localName\":\"\",\"nodeValue\":\"\",\"childNodeCount\":1,\"children\":[{\"nodeId\":2,\"parentId\":1,\"backendNodeId\":2,\"n...", + "sessionId": "5C11129817022D44AA55CF55848B5570", + "targetId": "9D0276B3A5D80AC39E578D8FCFBADAE1" +} +[1532468053.757][DEBUG]: DEVTOOLS RESPONSE DOM.getDocument (id=1) { + "root": { + "backendNodeId": 1, + "baseURL": "about:blank", + "childNodeCount": 1, + "children": [ { + "attributes": [ ], + "backendNodeId": 2, + "childNodeCount": 2, + "children": [ { + "attributes": [ ], + "backendNodeId": 3, + "childNodeCount": 0, + "localName": "head", + "nodeId": 3, + "nodeName": "HEAD", + "nodeType": 1, + "nodeValue": "", + "parentId": 2 + }, { + "attributes": [ ], + "backendNodeId": 4, + "childNodeCount": 0, + "localName": "body", + "nodeId": 4, + "nodeName": "BODY", + "nodeType": 1, + "nodeValue": "", + "parentId": 2 + } ], + "frameId": "9D0276B3A5D80AC39E578D8FCFBADAE1", + "localName": "html", + "nodeId": 2, + "nodeName": "HTML", + "nodeType": 1, + "nodeValue": "", + "parentId": 1 + } ], + "documentURL": "about:blank", + "localName": "", + "nodeId": 1, + "nodeName": "#document", + "nodeType": 9, + "nodeValue": "", + "xmlVersion": "" + } +} +[1532468053.757][DEBUG]: DEVTOOLS EVENT Target.receivedMessageFromTarget { + "message": "{\"id\":2,\"result\":{}}", + "sessionId": "5C11129817022D44AA55CF55848B5570", + "targetId": "9D0276B3A5D80AC39E578D8FCFBADAE1" +} +[1532468053.757][DEBUG]: DEVTOOLS RESPONSE Target.setAutoAttach (id=2) { + +} +[1532468053.757][DEBUG]: DEVTOOLS EVENT Target.receivedMessageFromTarget { + "message": "{\"id\":3,\"result\":{}}", + "sessionId": "5C11129817022D44AA55CF55848B5570", + "targetId": "9D0276B3A5D80AC39E578D8FCFBADAE1" +} +[1532468053.757][DEBUG]: DEVTOOLS RESPONSE Page.enable (id=3) { + +} +[1532468053.757][DEBUG]: DEVTOOLS EVENT Target.receivedMessageFromTarget { + "message": "{\"id\":4,\"result\":{}}", + "sessionId": "5C11129817022D44AA55CF55848B5570", + "targetId": "9D0276B3A5D80AC39E578D8FCFBADAE1" +} +[1532468053.757][DEBUG]: DEVTOOLS RESPONSE Page.enable (id=4) { + +} +[1532468053.757][DEBUG]: DEVTOOLS COMMAND Runtime.enable (id=5) { + +} +[1532468053.757][DEBUG]: DEVTOOLS COMMAND Target.sendMessageToTarget (id=21) { + "message": "{\"id\":5,\"method\":\"Runtime.enable\",\"params\":{}}", + "sessionId": "5C11129817022D44AA55CF55848B5570" +} +[1532468053.759][DEBUG]: DEVTOOLS RESPONSE Target.sendMessageToTarget (id=21) { + +} +[1532468053.760][DEBUG]: DEVTOOLS EVENT Page.frameResized { + +} +[1532468053.812][DEBUG]: DEVTOOLS EVENT Target.receivedMessageFromTarget { + "message": "{\"method\":\"Page.frameNavigated\",\"params\":{\"frame\":{\"id\":\"9D0276B3A5D80AC39E578D8FCFBADAE1\",\"parentId\":\"B36707A6F5F03F12170F3CF991934BBB\",\"loaderId\":\"04CB6AE07A872D54F440C87ACCC4B210\",\"name\":\"\",\"url...", + "sessionId": "5C11129817022D44AA55CF55848B5570", + "targetId": "9D0276B3A5D80AC39E578D8FCFBADAE1" +} +[1532468053.812][DEBUG]: DEVTOOLS EVENT Page.frameNavigated { + "frame": { + "id": "9D0276B3A5D80AC39E578D8FCFBADAE1", + "loaderId": "04CB6AE07A872D54F440C87ACCC4B210", + "mimeType": "text/html", + "name": "", + "parentId": "B36707A6F5F03F12170F3CF991934BBB", + "securityOrigin": "chrome-extension://imgnaknjpncihbkeihnbacmcoijbebgm", + "url": "chrome-extension://imgnaknjpncihbkeihnbacmcoijbebgm/page.html" + } +} +[1532468053.812][DEBUG]: DEVTOOLS EVENT Target.receivedMessageFromTarget { + "message": "{\"method\":\"DOM.documentUpdated\",\"params\":{}}", + "sessionId": "5C11129817022D44AA55CF55848B5570", + "targetId": "9D0276B3A5D80AC39E578D8FCFBADAE1" +} +[1532468053.813][DEBUG]: DEVTOOLS EVENT DOM.documentUpdated { + +} +[1532468053.813][DEBUG]: DEVTOOLS COMMAND DOM.getDocument (id=6) { + +} +[1532468053.813][DEBUG]: DEVTOOLS COMMAND Target.sendMessageToTarget (id=22) { + "message": "{\"id\":6,\"method\":\"DOM.getDocument\",\"params\":{}}", + "sessionId": "5C11129817022D44AA55CF55848B5570" +} +[1532468053.813][DEBUG]: DEVTOOLS EVENT Target.receivedMessageFromTarget { + "message": "{\"method\":\"Runtime.executionContextCreated\",\"params\":{\"context\":{\"id\":1,\"origin\":\"chrome-extension://imgnaknjpncihbkeihnbacmcoijbebgm\",\"name\":\"\",\"auxData\":{\"isDefault\":true,\"frameId\":\"9D0276B3A5D80...", + "sessionId": "5C11129817022D44AA55CF55848B5570", + "targetId": "9D0276B3A5D80AC39E578D8FCFBADAE1" +} +[1532468053.813][DEBUG]: DEVTOOLS EVENT Runtime.executionContextCreated { + "context": { + "auxData": { + "frameId": "9D0276B3A5D80AC39E578D8FCFBADAE1", + "isDefault": true + }, + "id": 1, + "name": "", + "origin": "chrome-extension://imgnaknjpncihbkeihnbacmcoijbebgm" + } +} +[1532468053.814][DEBUG]: DEVTOOLS EVENT Target.receivedMessageFromTarget { + "message": "{\"id\":5,\"result\":{}}", + "sessionId": "5C11129817022D44AA55CF55848B5570", + "targetId": "9D0276B3A5D80AC39E578D8FCFBADAE1" +} +[1532468053.814][DEBUG]: DEVTOOLS RESPONSE Runtime.enable (id=5) { + +} +[1532468053.820][DEBUG]: DEVTOOLS EVENT Page.frameStoppedLoading { + "frameId": "9D0276B3A5D80AC39E578D8FCFBADAE1" +} +[1532468053.820][DEBUG]: DEVTOOLS EVENT Page.frameDetached { + "frameId": "9D0276B3A5D80AC39E578D8FCFBADAE1" +} +[1532468053.821][DEBUG]: DEVTOOLS RESPONSE Target.sendMessageToTarget (id=22) { + +} +[1532468053.833][DEBUG]: DEVTOOLS EVENT Target.receivedMessageFromTarget { + "message": "{\"id\":6,\"result\":{\"root\":{\"nodeId\":5,\"backendNodeId\":5,\"nodeType\":9,\"nodeName\":\"#document\",\"localName\":\"\",\"nodeValue\":\"\",\"childNodeCount\":0,\"children\":[],\"documentURL\":\"chrome-extension://imgnaknjp...", + "sessionId": "5C11129817022D44AA55CF55848B5570", + "targetId": "9D0276B3A5D80AC39E578D8FCFBADAE1" +} +[1532468053.833][DEBUG]: DEVTOOLS RESPONSE DOM.getDocument (id=6) { + "root": { + "backendNodeId": 5, + "baseURL": "chrome-extension://imgnaknjpncihbkeihnbacmcoijbebgm/page.html", + "childNodeCount": 0, + "children": [ ], + "documentURL": "chrome-extension://imgnaknjpncihbkeihnbacmcoijbebgm/page.html", + "localName": "", + "nodeId": 5, + "nodeName": "#document", + "nodeType": 9, + "nodeValue": "", + "xmlVersion": "" + } +} +[1532468053.833][DEBUG]: DEVTOOLS COMMAND Page.enable (id=7) { + +} +[1532468053.834][DEBUG]: DEVTOOLS COMMAND Target.sendMessageToTarget (id=23) { + "message": "{\"id\":7,\"method\":\"Page.enable\",\"params\":{}}", + "sessionId": "5C11129817022D44AA55CF55848B5570" +} +[1532468053.834][DEBUG]: DEVTOOLS RESPONSE Target.sendMessageToTarget (id=23) { + +} +[1532468053.873][DEBUG]: DEVTOOLS EVENT Target.receivedMessageFromTarget { + "message": "{\"method\":\"DOM.childNodeInserted\",\"params\":{\"parentNodeId\":5,\"previousNodeId\":0,\"node\":{\"nodeId\":6,\"backendNodeId\":6,\"nodeType\":10,\"nodeName\":\"html\",\"localName\":\"\",\"nodeValue\":\"\",\"publicId\":\"\",\"sys...", + "sessionId": "5C11129817022D44AA55CF55848B5570", + "targetId": "9D0276B3A5D80AC39E578D8FCFBADAE1" +} +[1532468053.874][DEBUG]: DEVTOOLS EVENT DOM.childNodeInserted { + "node": { + "backendNodeId": 6, + "localName": "", + "nodeId": 6, + "nodeName": "html", + "nodeType": 10, + "nodeValue": "", + "publicId": "", + "systemId": "" + }, + "parentNodeId": 5, + "previousNodeId": 0 +} +[1532468053.874][DEBUG]: DEVTOOLS EVENT Target.receivedMessageFromTarget { + "message": "{\"method\":\"DOM.childNodeInserted\",\"params\":{\"parentNodeId\":5,\"previousNodeId\":6,\"node\":{\"nodeId\":7,\"backendNodeId\":7,\"nodeType\":1,\"nodeName\":\"HTML\",\"localName\":\"html\",\"nodeValue\":\"\",\"childNodeCount...", + "sessionId": "5C11129817022D44AA55CF55848B5570", + "targetId": "9D0276B3A5D80AC39E578D8FCFBADAE1" +} +[1532468053.874][DEBUG]: DEVTOOLS EVENT DOM.childNodeInserted { + "node": { + "attributes": [ ], + "backendNodeId": 7, + "childNodeCount": 0, + "frameId": "9D0276B3A5D80AC39E578D8FCFBADAE1", + "localName": "html", + "nodeId": 7, + "nodeName": "HTML", + "nodeType": 1, + "nodeValue": "" + }, + "parentNodeId": 5, + "previousNodeId": 6 +} +[1532468053.874][DEBUG]: DEVTOOLS EVENT Target.receivedMessageFromTarget { + "message": "{\"method\":\"DOM.childNodeCountUpdated\",\"params\":{\"nodeId\":7,\"childNodeCount\":1}}", + "sessionId": "5C11129817022D44AA55CF55848B5570", + "targetId": "9D0276B3A5D80AC39E578D8FCFBADAE1" +} +[1532468053.874][DEBUG]: DEVTOOLS EVENT DOM.childNodeCountUpdated { + "childNodeCount": 1, + "nodeId": 7 +} +[1532468053.875][DEBUG]: DEVTOOLS EVENT Target.receivedMessageFromTarget { + "message": "{\"method\":\"DOM.childNodeCountUpdated\",\"params\":{\"nodeId\":7,\"childNodeCount\":2}}", + "sessionId": "5C11129817022D44AA55CF55848B5570", + "targetId": "9D0276B3A5D80AC39E578D8FCFBADAE1" +} +[1532468053.875][DEBUG]: DEVTOOLS EVENT DOM.childNodeCountUpdated { + "childNodeCount": 2, + "nodeId": 7 +} +[1532468053.875][DEBUG]: DEVTOOLS EVENT Target.receivedMessageFromTarget { + "message": "{\"method\":\"Page.loadEventFired\",\"params\":{\"timestamp\":80738.188432}}", + "sessionId": "5C11129817022D44AA55CF55848B5570", + "targetId": "9D0276B3A5D80AC39E578D8FCFBADAE1" +} +[1532468053.875][DEBUG]: DEVTOOLS EVENT Page.loadEventFired { + "timestamp": 80738.188432 +} +[1532468053.875][DEBUG]: DEVTOOLS EVENT Target.receivedMessageFromTarget { + "message": "{\"method\":\"Page.frameStoppedLoading\",\"params\":{\"frameId\":\"9D0276B3A5D80AC39E578D8FCFBADAE1\"}}", + "sessionId": "5C11129817022D44AA55CF55848B5570", + "targetId": "9D0276B3A5D80AC39E578D8FCFBADAE1" +} +[1532468053.875][DEBUG]: DEVTOOLS EVENT Page.frameStoppedLoading { + "frameId": "9D0276B3A5D80AC39E578D8FCFBADAE1" +} +[1532468053.875][DEBUG]: DEVTOOLS EVENT Target.receivedMessageFromTarget { + "message": "{\"method\":\"DOM.documentUpdated\",\"params\":{}}", + "sessionId": "5C11129817022D44AA55CF55848B5570", + "targetId": "9D0276B3A5D80AC39E578D8FCFBADAE1" +} +[1532468053.875][DEBUG]: DEVTOOLS EVENT DOM.documentUpdated { + +} +[1532468053.876][DEBUG]: DEVTOOLS COMMAND DOM.getDocument (id=8) { + +} +[1532468053.876][DEBUG]: DEVTOOLS COMMAND Target.sendMessageToTarget (id=24) { + "message": "{\"id\":8,\"method\":\"DOM.getDocument\",\"params\":{}}", + "sessionId": "5C11129817022D44AA55CF55848B5570" +} +[1532468053.876][DEBUG]: DEVTOOLS EVENT Target.receivedMessageFromTarget { + "message": "{\"method\":\"Page.domContentEventFired\",\"params\":{\"timestamp\":80738.212473}}", + "sessionId": "5C11129817022D44AA55CF55848B5570", + "targetId": "9D0276B3A5D80AC39E578D8FCFBADAE1" +} +[1532468053.876][DEBUG]: DEVTOOLS EVENT Page.domContentEventFired { + "timestamp": 80738.212473 +} +[1532468053.876][DEBUG]: DEVTOOLS EVENT Target.receivedMessageFromTarget { + "message": "{\"id\":7,\"result\":{}}", + "sessionId": "5C11129817022D44AA55CF55848B5570", + "targetId": "9D0276B3A5D80AC39E578D8FCFBADAE1" +} +[1532468053.876][DEBUG]: DEVTOOLS RESPONSE Page.enable (id=7) { + +} +[1532468053.881][DEBUG]: DEVTOOLS RESPONSE Target.sendMessageToTarget (id=24) { + +} +[1532468053.890][DEBUG]: DEVTOOLS EVENT Page.loadEventFired { + "timestamp": 80738.217207 +} +[1532468053.890][DEBUG]: DEVTOOLS EVENT Page.frameStoppedLoading { + "frameId": "B36707A6F5F03F12170F3CF991934BBB" +} +[1532468053.893][DEBUG]: DEVTOOLS EVENT Target.receivedMessageFromTarget { + "message": "{\"id\":8,\"result\":{\"root\":{\"nodeId\":8,\"backendNodeId\":5,\"nodeType\":9,\"nodeName\":\"#document\",\"localName\":\"\",\"nodeValue\":\"\",\"childNodeCount\":2,\"children\":[{\"nodeId\":9,\"parentId\":8,\"backendNodeId\":6,\"n...", + "sessionId": "5C11129817022D44AA55CF55848B5570", + "targetId": "9D0276B3A5D80AC39E578D8FCFBADAE1" +} +[1532468053.894][DEBUG]: DEVTOOLS RESPONSE DOM.getDocument (id=8) { + "root": { + "backendNodeId": 5, + "baseURL": "chrome-extension://imgnaknjpncihbkeihnbacmcoijbebgm/page.html", + "childNodeCount": 2, + "children": [ { + "backendNodeId": 6, + "localName": "", + "nodeId": 9, + "nodeName": "html", + "nodeType": 10, + "nodeValue": "", + "parentId": 8, + "publicId": "", + "systemId": "" + }, { + "attributes": [ ], + "backendNodeId": 7, + "childNodeCount": 2, + "children": [ { + "attributes": [ ], + "backendNodeId": 8, + "childNodeCount": 0, + "localName": "head", + "nodeId": 11, + "nodeName": "HEAD", + "nodeType": 1, + "nodeValue": "", + "parentId": 10 + }, { + "attributes": [ ], + "backendNodeId": 9, + "childNodeCount": 1, + "localName": "body", + "nodeId": 12, + "nodeName": "BODY", + "nodeType": 1, + "nodeValue": "", + "parentId": 10 + } ], + "frameId": "9D0276B3A5D80AC39E578D8FCFBADAE1", + "localName": "html", + "nodeId": 10, + "nodeName": "HTML", + "nodeType": 1, + "nodeValue": "", + "parentId": 8 + } ], + "documentURL": "chrome-extension://imgnaknjpncihbkeihnbacmcoijbebgm/page.html", + "localName": "", + "nodeId": 8, + "nodeName": "#document", + "nodeType": 9, + "nodeValue": "", + "xmlVersion": "" + } +} +[1532468053.894][INFO]: Waiting for pending navigations... +[1532468053.894][DEBUG]: DEVTOOLS COMMAND Runtime.evaluate (id=25) { + "expression": "1" +} +[1532468053.903][DEBUG]: DEVTOOLS EVENT Log.entryAdded { + "entry": { + "level": "error", + "networkRequestId": "1000002903.2", + "source": "network", + "text": "Failed to load resource: the server responded with a status of 404 (Not Found)", + "timestamp": 1532468053900.08, + "url": "http://127.0.0.1:34567/favicon.ico" + } +} +[1532468053.908][DEBUG]: DEVTOOLS RESPONSE Runtime.evaluate (id=25) { + "result": { + "description": "1", + "type": "number", + "value": 1 + } +} +[1532468053.908][INFO]: Done waiting for pending navigations. Status: ok +[1532468053.908][INFO]: [2ae92ece5ebd4ab2601b7ce707066613] RESPONSE Navigate +[1532468053.909][INFO]: [2ae92ece5ebd4ab2601b7ce707066613] COMMAND SwitchToFrame { + "id": "testframe" +} +[1532468053.909][INFO]: Waiting for pending navigations... +[1532468053.909][DEBUG]: DEVTOOLS COMMAND Runtime.evaluate (id=26) { + "expression": "1" +} +[1532468053.923][DEBUG]: DEVTOOLS RESPONSE Runtime.evaluate (id=26) { + "result": { + "description": "1", + "type": "number", + "value": 1 + } +} +[1532468053.923][INFO]: Done waiting for pending navigations. Status: ok +[1532468053.924][DEBUG]: DEVTOOLS COMMAND Runtime.evaluate (id=27) { + "expression": "(function() { // Copyright (c) 2012 The Chromium Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style license that can be\n// found in the LICENSE file.\n\n/**\n * Enum f...", + "returnByValue": false +} +[1532468053.935][DEBUG]: DEVTOOLS RESPONSE Runtime.evaluate (id=27) { + "result": { + "className": "HTMLIFrameElement", + "description": "iframe#testframe", + "objectId": "{\"injectedScriptId\":1,\"id\":1}", + "subtype": "node", + "type": "object" + } +} +[1532468053.935][DEBUG]: DEVTOOLS COMMAND DOM.requestNode (id=28) { + "objectId": "{\"injectedScriptId\":1,\"id\":1}" +} +[1532468053.937][DEBUG]: DEVTOOLS EVENT DOM.setChildNodes { + "nodes": [ { + "attributes": [ "id", "testframe", "src", "chrome-extension://imgnaknjpncihbkeihnbacmcoijbebgm/page.html" ], + "backendNodeId": 6, + "childNodeCount": 0, + "children": [ { + "backendNodeId": 7, + "localName": "", + "nodeId": 12, + "nodeName": "#text", + "nodeType": 3, + "nodeValue": "\n ", + "parentId": 11 + } ], + "frameId": "9D0276B3A5D80AC39E578D8FCFBADAE1", + "localName": "iframe", + "nodeId": 11, + "nodeName": "IFRAME", + "nodeType": 1, + "nodeValue": "", + "parentId": 10 + } ], + "parentId": 10 +} +[1532468053.937][DEBUG]: DEVTOOLS RESPONSE DOM.requestNode (id=28) { + "nodeId": 11 +} +[1532468053.937][DEBUG]: DEVTOOLS COMMAND Runtime.releaseObject (id=29) { + "objectId": "{\"injectedScriptId\":1,\"id\":1}" +} +[1532468053.938][DEBUG]: DEVTOOLS RESPONSE Runtime.releaseObject (id=29) { + +} +[1532468053.939][DEBUG]: DEVTOOLS COMMAND Runtime.evaluate (id=30) { + "expression": "(function() { // Copyright (c) 2012 The Chromium Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style license that can be\n// found in the LICENSE file.\n\n/**\n * Enum f...", + "returnByValue": true +} +[1532468053.945][DEBUG]: DEVTOOLS RESPONSE Runtime.evaluate (id=30) { + "result": { + "type": "object", + "value": { + "status": 0, + "value": { + "ELEMENT": "0.4682500326158203-1" + } + } + } +} +[1532468053.946][DEBUG]: DEVTOOLS COMMAND Runtime.evaluate (id=31) { + "expression": "(function() { // Copyright (c) 2012 The Chromium Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style license that can be\n// found in the LICENSE file.\n\n/**\n * Enum f...", + "returnByValue": true +} +[1532468053.951][DEBUG]: DEVTOOLS EVENT DOM.attributeModified { + "name": "cd_frame_id_", + "nodeId": 11, + "value": "e153d468f4211bfe0abdccf85a2473c6" +} +[1532468053.951][DEBUG]: DEVTOOLS RESPONSE Runtime.evaluate (id=31) { + "result": { + "type": "object", + "value": { + "status": 0 + } + } +} +[1532468053.952][INFO]: Waiting for pending navigations... +[1532468053.952][DEBUG]: DEVTOOLS COMMAND Runtime.evaluate (id=32) { + "expression": "1" +} +[1532468053.953][DEBUG]: DEVTOOLS RESPONSE Runtime.evaluate (id=32) { + "result": { + "description": "1", + "type": "number", + "value": 1 + } +} +[1532468053.953][INFO]: Done waiting for pending navigations. Status: ok +[1532468053.953][INFO]: [2ae92ece5ebd4ab2601b7ce707066613] RESPONSE SwitchToFrame +[1532468053.954][INFO]: [2ae92ece5ebd4ab2601b7ce707066613] COMMAND FindElement { + "using": "id", + "value": "p1" +} +[1532468053.954][INFO]: Waiting for pending navigations... +[1532468053.955][DEBUG]: DEVTOOLS COMMAND Runtime.evaluate (id=33) { + "expression": "1" +} +[1532468053.956][DEBUG]: DEVTOOLS RESPONSE Runtime.evaluate (id=33) { + "result": { + "description": "1", + "type": "number", + "value": 1 + } +} +[1532468053.956][INFO]: Done waiting for pending navigations. Status: ok +[1532468053.960][DEBUG]: DEVTOOLS COMMAND Runtime.evaluate (id=9) { + "expression": "(function() { // Copyright (c) 2012 The Chromium Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style license that can be\n// found in the LICENSE file.\n\n/**\n * Enum f...", + "returnByValue": true +} +[1532468053.962][DEBUG]: DEVTOOLS COMMAND Target.sendMessageToTarget (id=34) { + "message": "{\"id\":9,\"method\":\"Runtime.evaluate\",\"params\":{\"expression\":\"(function() { // Copyright (c) 2012 The Chromium Authors. All rights reserved.\\n// Use of this source code is governed by a BSD-style lic...", + "sessionId": "5C11129817022D44AA55CF55848B5570" +} +[1532468053.980][DEBUG]: DEVTOOLS RESPONSE Target.sendMessageToTarget (id=34) { + +} +[1532468054.005][DEBUG]: DEVTOOLS EVENT Target.receivedMessageFromTarget { + "message": "{\"id\":9,\"result\":{\"result\":{\"type\":\"object\",\"value\":{\"status\":0,\"value\":{\"ELEMENT\":\"0.9369691944838394-1\"}}}}}", + "sessionId": "5C11129817022D44AA55CF55848B5570", + "targetId": "9D0276B3A5D80AC39E578D8FCFBADAE1" +} +[1532468054.005][DEBUG]: DEVTOOLS RESPONSE Runtime.evaluate (id=9) { + "result": { + "type": "object", + "value": { + "status": 0, + "value": { + "ELEMENT": "0.9369691944838394-1" + } + } + } +} +[1532468054.006][INFO]: Waiting for pending navigations... +[1532468054.006][DEBUG]: DEVTOOLS COMMAND Runtime.evaluate (id=35) { + "expression": "1" +} +[1532468054.007][DEBUG]: DEVTOOLS RESPONSE Runtime.evaluate (id=35) { + "result": { + "description": "1", + "type": "number", + "value": 1 + } +} +[1532468054.008][INFO]: Done waiting for pending navigations. Status: ok +[1532468054.008][INFO]: [2ae92ece5ebd4ab2601b7ce707066613] RESPONSE FindElement { + "ELEMENT": "0.9369691944838394-1" +} +[1532468054.009][INFO]: [2ae92ece5ebd4ab2601b7ce707066613] COMMAND GetElementText { + "id": "0.9369691944838394-1" +} +[1532468054.009][INFO]: Waiting for pending navigations... +[1532468054.009][DEBUG]: DEVTOOLS COMMAND Runtime.evaluate (id=36) { + "expression": "1" +} +[1532468054.011][DEBUG]: DEVTOOLS RESPONSE Runtime.evaluate (id=36) { + "result": { + "description": "1", + "type": "number", + "value": 1 + } +} +[1532468054.011][INFO]: Done waiting for pending navigations. Status: ok +[1532468054.015][DEBUG]: DEVTOOLS COMMAND Runtime.evaluate (id=10) { + "expression": "(function() { // Copyright (c) 2012 The Chromium Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style license that can be\n// found in the LICENSE file.\n\n/**\n * Enum f...", + "returnByValue": true +} +[1532468054.018][DEBUG]: DEVTOOLS COMMAND Target.sendMessageToTarget (id=37) { + "message": "{\"id\":10,\"method\":\"Runtime.evaluate\",\"params\":{\"expression\":\"(function() { // Copyright (c) 2012 The Chromium Authors. All rights reserved.\\n// Use of this source code is governed by a BSD-style li...", + "sessionId": "5C11129817022D44AA55CF55848B5570" +} +[1532468054.036][DEBUG]: DEVTOOLS RESPONSE Target.sendMessageToTarget (id=37) { + +} +[1532468054.068][DEBUG]: DEVTOOLS EVENT Target.receivedMessageFromTarget { + "message": "{\"id\":10,\"result\":{\"result\":{\"type\":\"object\",\"value\":{\"status\":0,\"value\":\"Its a frame with extension source\"}}}}", + "sessionId": "5C11129817022D44AA55CF55848B5570", + "targetId": "9D0276B3A5D80AC39E578D8FCFBADAE1" +} +[1532468054.068][DEBUG]: DEVTOOLS RESPONSE Runtime.evaluate (id=10) { + "result": { + "type": "object", + "value": { + "status": 0, + "value": "Its a frame with extension source" + } + } +} +[1532468054.068][INFO]: Waiting for pending navigations... +[1532468054.068][DEBUG]: DEVTOOLS COMMAND Runtime.evaluate (id=38) { + "expression": "1" +} +[1532468054.070][DEBUG]: DEVTOOLS RESPONSE Runtime.evaluate (id=38) { + "result": { + "description": "1", + "type": "number", + "value": 1 + } +} +[1532468054.070][INFO]: Done waiting for pending navigations. Status: ok +[1532468054.070][INFO]: [2ae92ece5ebd4ab2601b7ce707066613] RESPONSE GetElementText "Its a frame with extension source" +[1532468054.072][INFO]: [2ae92ece5ebd4ab2601b7ce707066613] COMMAND Quit { + +} +[0724/143414.084146:ERROR:nacl_helper_linux.cc(310)] NaCl helper process running without a sandbox! +Most likely you need to configure your SUID sandbox correctly +[1532468054.122][INFO]: [2ae92ece5ebd4ab2601b7ce707066613] RESPONSE Quit +[1532468054.122][DEBUG]: Log type 'driver' lost 0 entries on destruction +[1532468054.122][DEBUG]: Log type 'browser' lost 1 entries on destruction
diff --git a/chrome/test/chromedriver/log_replay/test_data/testPageSource.log b/chrome/test/chromedriver/log_replay/test_data/testPageSource.log new file mode 100644 index 0000000..c80bb9ab --- /dev/null +++ b/chrome/test/chromedriver/log_replay/test_data/testPageSource.log
@@ -0,0 +1,744 @@ +[1531857824.001][INFO]: [08867aba4fa489aeea6db3ecf4d49a44] COMMAND InitSession { + "desiredCapabilities": { + "chromeOptions": { + "args": [ "no-sandbox", "disable-gpu" ], + "binary": "/usr/local/google/home/cwinstanley/chromium/src/out/Default/chrome" + }, + "goog:testName": "__main__.ChromeDriverTest.testGetPageSource", + "loggingPrefs": { + + } + } +} +[1531857824.002][INFO]: Populating Preferences file: { + "alternate_error_pages": { + "enabled": false + }, + "autofill": { + "enabled": false + }, + "browser": { + "check_default_browser": false + }, + "distribution": { + "import_bookmarks": false, + "import_history": false, + "import_search_engine": false, + "make_chrome_default_for_user": false, + "skip_first_run_ui": true + }, + "dns_prefetching": { + "enabled": false + }, + "profile": { + "content_settings": { + "pattern_pairs": { + "https://*,*": { + "media-stream": { + "audio": "Default", + "video": "Default" + } + } + } + }, + "default_content_setting_values": { + "geolocation": 1 + }, + "default_content_settings": { + "geolocation": 1, + "mouselock": 1, + "notifications": 1, + "popups": 1, + "ppapi-broker": 1 + }, + "password_manager_enabled": false + }, + "safebrowsing": { + "enabled": false + }, + "search": { + "suggest_enabled": false + }, + "translate": { + "enabled": false + } +} +[1531857824.003][INFO]: Populating Local State file: { + "background_mode": { + "enabled": false + }, + "ssl": { + "rev_checking": { + "enabled": false + } + } +} +[1531857824.005][INFO]: Launching chrome: /usr/local/google/home/cwinstanley/chromium/src/out/Default/chrome --disable-background-networking --disable-client-side-phishing-detection --disable-default-apps --disable-gpu --disable-hang-monitor --disable-popup-blocking --disable-prompt-on-repost --disable-sync --disable-web-resources --enable-automation --enable-logging --force-fieldtrials=SiteIsolationExtensions/Control --ignore-certificate-errors --load-extension=/tmp/.org.chromium.Chromium.kHXwkK/internal --log-level=0 --metrics-recording-only --no-first-run --no-sandbox --password-store=basic --remote-debugging-port=0 --test-type=webdriver --use-mock-keychain --user-data-dir=/tmp/.org.chromium.Chromium.lLyv7X data:, +[142478:142478:0717/130345.839276:ERROR:gpu_process_transport_factory.cc(642)] Switching to software compositing. +[142478:142478:0717/130345.839344:ERROR:gpu_process_transport_factory.cc(1007)] Lost UI shared context. +[142478:142478:0717/130345.914043:WARNING:account_consistency_mode_manager.cc(290)] Desktop Identity Consistency cannot be enabled as no OAuth client ID and client secret have been configured. +[142478:142478:0717/130345.914142:WARNING:account_consistency_mode_manager.cc(290)] Desktop Identity Consistency cannot be enabled as no OAuth client ID and client secret have been configured. +[142478:142478:0717/130345.914188:WARNING:account_consistency_mode_manager.cc(290)] Desktop Identity Consistency cannot be enabled as no OAuth client ID and client secret have been configured. +[142478:142478:0717/130345.914237:WARNING:account_consistency_mode_manager.cc(290)] Desktop Identity Consistency cannot be enabled as no OAuth client ID and client secret have been configured. +[142478:142478:0717/130345.915163:WARNING:account_consistency_mode_manager.cc(290)] Desktop Identity Consistency cannot be enabled as no OAuth client ID and client secret have been configured. +[142478:142478:0717/130345.921222:WARNING:account_consistency_mode_manager.cc(290)] Desktop Identity Consistency cannot be enabled as no OAuth client ID and client secret have been configured. +[142478:142478:0717/130345.968572:WARNING:account_consistency_mode_manager.cc(290)] Desktop Identity Consistency cannot be enabled as no OAuth client ID and client secret have been configured. +[142478:142478:0717/130345.998164:WARNING:account_consistency_mode_manager.cc(290)] Desktop Identity Consistency cannot be enabled as no OAuth client ID and client secret have been configured. +[142478:142478:0717/130345.998238:WARNING:account_consistency_mode_manager.cc(290)] Desktop Identity Consistency cannot be enabled as no OAuth client ID and client secret have been configured. + +DevTools listening on ws://127.0.0.1:35629/devtools/browser/8377a928-afa0-427e-a82f-8bb5ee5d1dfc +[1531857826.070][DEBUG]: DevTools request: http://localhost:35629/json/version +[142478:142478:0717/130346.148470:WARNING:password_store_factory.cc(253)] Using basic (unencrypted) store for password storage. See https://chromium.googlesource.com/chromium/src/+/master/docs/linux_password_storage.md for more information about password storage options. +[142478:142478:0717/130346.151124:WARNING:account_consistency_mode_manager.cc(290)] Desktop Identity Consistency cannot be enabled as no OAuth client ID and client secret have been configured. +[1531857826.347][DEBUG]: DevTools response: { + "Browser": "Chrome/69.0.3491.0", + "Protocol-Version": "1.3", + "User-Agent": "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/69.0.3491.0 Safari/537.36", + "V8-Version": "6.9.389", + "WebKit-Version": "537.36 (@410f2c4912d46a5fae2fe6c0b2e24d9eb6359761)", + "webSocketDebuggerUrl": "ws://localhost:35629/devtools/browser/8377a928-afa0-427e-a82f-8bb5ee5d1dfc" +} + +[1531857826.394][DEBUG]: DevTools request: http://localhost:35629/json +[1531857826.415][DEBUG]: DevTools response: [ { + "description": "", + "devtoolsFrontendUrl": "/devtools/inspector.html?ws=localhost:35629/devtools/page/939F27E8C7FDB1C141EFE7F5FE0703DD", + "id": "939F27E8C7FDB1C141EFE7F5FE0703DD", + "title": "Chrome Automation Extension", + "type": "background_page", + "url": "chrome-extension://aapnijgdinlhnhlmodcfapnahmbfebeb/_generated_background_page.html", + "webSocketDebuggerUrl": "ws://localhost:35629/devtools/page/939F27E8C7FDB1C141EFE7F5FE0703DD" +}, { + "description": "", + "devtoolsFrontendUrl": "/devtools/inspector.html?ws=localhost:35629/devtools/page/B0871C672528B41CF59B281B62C060B6", + "id": "B0871C672528B41CF59B281B62C060B6", + "title": "", + "type": "page", + "url": "data:,", + "webSocketDebuggerUrl": "ws://localhost:35629/devtools/page/B0871C672528B41CF59B281B62C060B6" +} ] + +[1531857826.416][DEBUG]: DevTools request: http://localhost:35629/json +[1531857826.418][DEBUG]: DevTools response: [ { + "description": "", + "devtoolsFrontendUrl": "/devtools/inspector.html?ws=localhost:35629/devtools/page/939F27E8C7FDB1C141EFE7F5FE0703DD", + "id": "939F27E8C7FDB1C141EFE7F5FE0703DD", + "title": "Chrome Automation Extension", + "type": "background_page", + "url": "chrome-extension://aapnijgdinlhnhlmodcfapnahmbfebeb/_generated_background_page.html", + "webSocketDebuggerUrl": "ws://localhost:35629/devtools/page/939F27E8C7FDB1C141EFE7F5FE0703DD" +}, { + "description": "", + "devtoolsFrontendUrl": "/devtools/inspector.html?ws=localhost:35629/devtools/page/B0871C672528B41CF59B281B62C060B6", + "id": "B0871C672528B41CF59B281B62C060B6", + "title": "", + "type": "page", + "url": "data:,", + "webSocketDebuggerUrl": "ws://localhost:35629/devtools/page/B0871C672528B41CF59B281B62C060B6" +} ] + +[1531857826.419][INFO]: resolved localhost to ["::1","127.0.0.1"] +[1531857826.419][DEBUG]: WebSocket::Connect code=ERR_IO_PENDING +[1531857826.419][DEBUG]: WebSocket::OnSocketConnect code=OK +[1531857826.419][DEBUG]: WebSocket::OnSocketConnect handshake +GET /devtools/page/B0871C672528B41CF59B281B62C060B6 HTTP/1.1 +Host: localhost +Upgrade: websocket +Connection: Upgrade +Sec-WebSocket-Key: jPy9RJUyZOilxqnfxum3kw== +Sec-WebSocket-Version: 13 +Pragma: no-cache +Cache-Control: no-cache + + +[1531857826.421][DEBUG]: WebSocket::OnReadDuringHandshake +HTTP/1.1 101 WebSocket Protocol Handshake +Upgrade: WebSocket +Connection: Upgrade +Sec-WebSocket-Accept: vnMt7nMJ0NwQvSYd935n8e+QNXI= + + +[1531857826.421][DEBUG]: DEVTOOLS COMMAND Log.enable (id=1) { + +} +[1531857826.421][DEBUG]: WebSocket::Send {"id":1,"method":"Log.enable","params":{}} +[1531857826.421][DEBUG]: DEVTOOLS COMMAND DOM.getDocument (id=2) { + +} +[1531857826.421][DEBUG]: WebSocket::Send {"id":2,"method":"DOM.getDocument","params":{}} +[1531857826.421][DEBUG]: DEVTOOLS COMMAND Target.setAutoAttach (id=3) { + "autoAttach": true, + "waitForDebuggerOnStart": false +} +[1531857826.421][DEBUG]: WebSocket::Send {"id":3,"method":"Target.setAutoAttach","params":{"autoAttach":true,"waitForDebuggerOnStart":false}} +[1531857826.422][DEBUG]: DEVTOOLS COMMAND Page.enable (id=4) { + +} +[1531857826.422][DEBUG]: WebSocket::Send {"id":4,"method":"Page.enable","params":{}} +[1531857826.422][DEBUG]: DEVTOOLS COMMAND Page.enable (id=5) { + +} +[1531857826.422][DEBUG]: WebSocket::Send {"id":5,"method":"Page.enable","params":{}} +[1531857826.484][DEBUG]: WebSocket::OnReadDuringOpen {"id":1,"result":{}} +[1531857826.485][DEBUG]: WebSocket::OnReadDuringOpen {"id":2,"result":{"root":{"nodeId":1,"backendNodeId":1,"nodeType":9,"nodeName":"#document","localName":"","nodeValue":"","childNodeCount":1,"children":[{"nodeId":2,"parentId":1,"backendNodeId":2,"nodeType":1,"nodeName":"HTML","localName":"html","nodeValue":"","childNodeCount":2,"children":[{"nodeId":3,"parentId":2,"backendNodeId":3,"nodeType":1,"nodeName":"HEAD","localName":"head","nodeValue":"","childNodeCount":0,"attributes":[]},{"nodeId":4,"parentId":2,"backendNodeId":4,"nodeType":1,"nodeName":"BODY","localName":"body","nodeValue":"","childNodeCount":0,"attributes":[]}],"attributes":[],"frameId":"B0871C672528B41CF59B281B62C060B6"}],"documentURL":"","baseURL":"about:blank","xmlVersion":""}}} +[1531857826.485][DEBUG]: WebSocket::OnReadDuringOpen {"id":3,"result":{}} +[1531857826.485][DEBUG]: WebSocket::OnReadDuringOpen {"id":4,"result":{}} +[1531857826.485][DEBUG]: WebSocket::OnReadDuringOpen {"id":5,"result":{}} +[1531857826.485][DEBUG]: DEVTOOLS RESPONSE Log.enable (id=1) { + +} +[1531857826.486][DEBUG]: DEVTOOLS RESPONSE DOM.getDocument (id=2) { + "root": { + "backendNodeId": 1, + "baseURL": "about:blank", + "childNodeCount": 1, + "children": [ { + "attributes": [ ], + "backendNodeId": 2, + "childNodeCount": 2, + "children": [ { + "attributes": [ ], + "backendNodeId": 3, + "childNodeCount": 0, + "localName": "head", + "nodeId": 3, + "nodeName": "HEAD", + "nodeType": 1, + "nodeValue": "", + "parentId": 2 + }, { + "attributes": [ ], + "backendNodeId": 4, + "childNodeCount": 0, + "localName": "body", + "nodeId": 4, + "nodeName": "BODY", + "nodeType": 1, + "nodeValue": "", + "parentId": 2 + } ], + "frameId": "B0871C672528B41CF59B281B62C060B6", + "localName": "html", + "nodeId": 2, + "nodeName": "HTML", + "nodeType": 1, + "nodeValue": "", + "parentId": 1 + } ], + "documentURL": "", + "localName": "", + "nodeId": 1, + "nodeName": "#document", + "nodeType": 9, + "nodeValue": "", + "xmlVersion": "" + } +} +[1531857826.486][DEBUG]: DEVTOOLS RESPONSE Target.setAutoAttach (id=3) { + +} +[1531857826.486][DEBUG]: DEVTOOLS RESPONSE Page.enable (id=4) { + +} +[1531857826.486][DEBUG]: DEVTOOLS RESPONSE Page.enable (id=5) { + +} +[1531857826.486][DEBUG]: DEVTOOLS COMMAND Runtime.enable (id=6) { + +} +[1531857826.487][DEBUG]: WebSocket::Send {"id":6,"method":"Runtime.enable","params":{}} +[1531857826.531][DEBUG]: WebSocket::OnReadDuringOpen {"method":"Page.frameNavigated","params":{"frame":{"id":"B0871C672528B41CF59B281B62C060B6","loaderId":"6426028927D897FD44B705E6B95C4B19","url":"data:,","securityOrigin":"://","mimeType":"text/plain"}}} +[1531857826.532][DEBUG]: WebSocket::OnReadDuringOpen {"method":"DOM.documentUpdated","params":{}} +[1531857826.532][DEBUG]: WebSocket::OnReadDuringOpen {"method":"Page.loadEventFired","params":{"timestamp":699611.817718}} +[1531857826.532][DEBUG]: WebSocket::OnReadDuringOpen {"method":"Page.frameStoppedLoading","params":{"frameId":"B0871C672528B41CF59B281B62C060B6"}} +[1531857826.532][DEBUG]: DEVTOOLS EVENT Page.frameNavigated { + "frame": { + "id": "B0871C672528B41CF59B281B62C060B6", + "loaderId": "6426028927D897FD44B705E6B95C4B19", + "mimeType": "text/plain", + "securityOrigin": "://", + "url": "data:," + } +} +[1531857826.532][DEBUG]: WebSocket::OnReadDuringOpen {"method":"DOM.documentUpdated","params":{}} +[1531857826.532][DEBUG]: WebSocket::OnReadDuringOpen {"method":"Page.domContentEventFired","params":{"timestamp":699611.82044}} +[1531857826.532][DEBUG]: DEVTOOLS EVENT DOM.documentUpdated { + +} +[1531857826.532][DEBUG]: DEVTOOLS COMMAND DOM.getDocument (id=7) { + +} +[1531857826.532][DEBUG]: WebSocket::Send {"id":7,"method":"DOM.getDocument","params":{}} +[1531857826.532][DEBUG]: DEVTOOLS EVENT Page.loadEventFired { + "timestamp": 699611.817718 +} +[1531857826.532][DEBUG]: DEVTOOLS EVENT Page.frameStoppedLoading { + "frameId": "B0871C672528B41CF59B281B62C060B6" +} +[1531857826.533][DEBUG]: DEVTOOLS EVENT DOM.documentUpdated { + +} +[1531857826.533][DEBUG]: DEVTOOLS COMMAND DOM.getDocument (id=8) { + +} +[1531857826.533][DEBUG]: WebSocket::Send {"id":8,"method":"DOM.getDocument","params":{}} +[1531857826.533][DEBUG]: DEVTOOLS EVENT Page.domContentEventFired { + "timestamp": 699611.82044 +} +[1531857826.553][DEBUG]: WebSocket::OnReadDuringOpen {"method":"Page.frameResized","params":{}} +[1531857826.553][DEBUG]: DEVTOOLS EVENT Page.frameResized { + +} +[1531857826.562][DEBUG]: WebSocket::OnReadDuringOpen {"method":"Runtime.executionContextCreated","params":{"context":{"id":1,"origin":"://","name":"","auxData":{"isDefault":true,"frameId":"B0871C672528B41CF59B281B62C060B6"}}}} +[1531857826.562][DEBUG]: WebSocket::OnReadDuringOpen {"id":6,"result":{}} +[1531857826.562][DEBUG]: DEVTOOLS EVENT Runtime.executionContextCreated { + "context": { + "auxData": { + "frameId": "B0871C672528B41CF59B281B62C060B6", + "isDefault": true + }, + "id": 1, + "name": "", + "origin": "://" + } +} +[1531857826.563][DEBUG]: DEVTOOLS RESPONSE Runtime.enable (id=6) { + +} +[1531857826.563][DEBUG]: WebSocket::OnReadDuringOpen {"id":7,"result":{"root":{"nodeId":5,"backendNodeId":5,"nodeType":9,"nodeName":"#document","localName":"","nodeValue":"","childNodeCount":1,"children":[{"nodeId":6,"parentId":5,"backendNodeId":6,"nodeType":1,"nodeName":"HTML","localName":"html","nodeValue":"","childNodeCount":2,"children":[{"nodeId":7,"parentId":6,"backendNodeId":7,"nodeType":1,"nodeName":"HEAD","localName":"head","nodeValue":"","childNodeCount":0,"attributes":[]},{"nodeId":8,"parentId":6,"backendNodeId":8,"nodeType":1,"nodeName":"BODY","localName":"body","nodeValue":"","childNodeCount":0,"attributes":[]}],"attributes":[],"frameId":"B0871C672528B41CF59B281B62C060B6"}],"documentURL":"data:,","baseURL":"data:,","xmlVersion":""}}} +[1531857826.563][DEBUG]: WebSocket::OnReadDuringOpen {"id":8,"result":{"root":{"nodeId":9,"backendNodeId":5,"nodeType":9,"nodeName":"#document","localName":"","nodeValue":"","childNodeCount":1,"children":[{"nodeId":10,"parentId":9,"backendNodeId":6,"nodeType":1,"nodeName":"HTML","localName":"html","nodeValue":"","childNodeCount":2,"children":[{"nodeId":11,"parentId":10,"backendNodeId":7,"nodeType":1,"nodeName":"HEAD","localName":"head","nodeValue":"","childNodeCount":0,"attributes":[]},{"nodeId":12,"parentId":10,"backendNodeId":8,"nodeType":1,"nodeName":"BODY","localName":"body","nodeValue":"","childNodeCount":0,"attributes":[]}],"attributes":[],"frameId":"B0871C672528B41CF59B281B62C060B6"}],"documentURL":"data:,","baseURL":"data:,","xmlVersion":""}}} +[1531857826.563][DEBUG]: DEVTOOLS RESPONSE DOM.getDocument (id=7) { + "root": { + "backendNodeId": 5, + "baseURL": "data:,", + "childNodeCount": 1, + "children": [ { + "attributes": [ ], + "backendNodeId": 6, + "childNodeCount": 2, + "children": [ { + "attributes": [ ], + "backendNodeId": 7, + "childNodeCount": 0, + "localName": "head", + "nodeId": 7, + "nodeName": "HEAD", + "nodeType": 1, + "nodeValue": "", + "parentId": 6 + }, { + "attributes": [ ], + "backendNodeId": 8, + "childNodeCount": 0, + "localName": "body", + "nodeId": 8, + "nodeName": "BODY", + "nodeType": 1, + "nodeValue": "", + "parentId": 6 + } ], + "frameId": "B0871C672528B41CF59B281B62C060B6", + "localName": "html", + "nodeId": 6, + "nodeName": "HTML", + "nodeType": 1, + "nodeValue": "", + "parentId": 5 + } ], + "documentURL": "data:,", + "localName": "", + "nodeId": 5, + "nodeName": "#document", + "nodeType": 9, + "nodeValue": "", + "xmlVersion": "" + } +} +[1531857826.564][DEBUG]: DEVTOOLS RESPONSE DOM.getDocument (id=8) { + "root": { + "backendNodeId": 5, + "baseURL": "data:,", + "childNodeCount": 1, + "children": [ { + "attributes": [ ], + "backendNodeId": 6, + "childNodeCount": 2, + "children": [ { + "attributes": [ ], + "backendNodeId": 7, + "childNodeCount": 0, + "localName": "head", + "nodeId": 11, + "nodeName": "HEAD", + "nodeType": 1, + "nodeValue": "", + "parentId": 10 + }, { + "attributes": [ ], + "backendNodeId": 8, + "childNodeCount": 0, + "localName": "body", + "nodeId": 12, + "nodeName": "BODY", + "nodeType": 1, + "nodeValue": "", + "parentId": 10 + } ], + "frameId": "B0871C672528B41CF59B281B62C060B6", + "localName": "html", + "nodeId": 10, + "nodeName": "HTML", + "nodeType": 1, + "nodeValue": "", + "parentId": 9 + } ], + "documentURL": "data:,", + "localName": "", + "nodeId": 9, + "nodeName": "#document", + "nodeType": 9, + "nodeValue": "", + "xmlVersion": "" + } +} +[1531857826.565][DEBUG]: DEVTOOLS COMMAND Page.enable (id=9) { + +} +[1531857826.565][DEBUG]: WebSocket::Send {"id":9,"method":"Page.enable","params":{}} +[1531857826.595][DEBUG]: WebSocket::OnReadDuringOpen {"id":9,"result":{}} +[1531857826.595][DEBUG]: DEVTOOLS RESPONSE Page.enable (id=9) { + +} +[1531857826.595][DEBUG]: DEVTOOLS COMMAND Runtime.enable (id=10) { + +} +[1531857826.595][DEBUG]: WebSocket::Send {"id":10,"method":"Runtime.enable","params":{}} +[1531857826.597][DEBUG]: WebSocket::OnReadDuringOpen {"id":10,"result":{}} +[1531857826.597][DEBUG]: DEVTOOLS RESPONSE Runtime.enable (id=10) { + +} +[1531857826.598][DEBUG]: DEVTOOLS COMMAND Runtime.evaluate (id=11) { + "expression": "(function() { // Copyright (c) 2012 The Chromium Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style license that can be\n// found in the LICENSE file.\n\n/**\n * Enum f...", + "returnByValue": true +} +[1531857826.598][DEBUG]: WebSocket::Send {"id":11,"method":"Runtime.evaluate","params":{"expression":"(function() { // Copyright (c) 2012 The Chromium Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style license that can be\n// found in the LICENSE file.\n\n/**\n * Enum for WebDriver status codes.\n * @enum {number}\n */\nvar StatusCode = {\n STALE_ELEMENT_REFERENCE: 10,\n UNKNOWN_ERROR: 13,\n};\n\n/**\n * Enum for node types.\n * @enum {number}\n */\nvar NodeType = {\n ELEMENT: 1,\n DOCUMENT: 9,\n};\n\n/**\n * Dictionary key to use for holding an element ID.\n * @const\n * @type {string}\n */\nvar ELEMENT_KEY = 'ELEMENT';\n\n/**\n * True if using W3C Element references.\n * @const\n * @type {boolean}\n */\nvar w3cEnabled = false;\n\n/**\n * True if shadow dom is enabled.\n * @const\n * @type {boolean}\n */\nvar SHADOW_DOM_ENABLED = typeof ShadowRoot === 'function';\n\n/**\n * Generates a unique ID to identify an element.\n * @void\n * @return {string} Randomly generated ID.\n */\nfunction generateUUID() {\n var array = new Uint8Array(16);\n window.crypto.getRandomValues(array);\n array[6] = 0x40 | (array[6] & 0x0f);\n array[8] = 0x80 | (array[8] & 0x3f);\n\n var UUID = \"\";\n for (var i = 0; i \u003C 16; i++) {\n var temp = array[i].toString(16);\n if (temp.length \u003C 2)\n temp = \"0\" + temp;\n UUID += temp;\n if (i == 3 || i == 5 || i == 7 || i == 9)\n UUID += \"-\";\n }\n return UUID;\n};\n\n/**\n * A cache which maps IDs \u003C-> cached objects for the purpose of identifying\n * a script object remotely. Uses UUIDs for identification.\n * @constructor\n */\nfunction CacheWithUUID() {\n this.cache_ = {};\n}\n\nCacheWithUUID.prototype = {\n /**\n * Stores a given item in the cache and returns a unique UUID.\n *\n * @param {!Object} item The item to store in the cache.\n * @return {number} The UUID for the cached item.\n */\n storeItem: function(item) {\n for (var i in this.cache_) {\n if (item == this.cache_[i])\n return i;\n }\n var id = generateUUID();\n this.cache_[id] = item;\n return id;\n },\n\n /**\n * Retrieves the cached object for the given ID.\n *\n * @param {number} id The ID for the cached item to retrieve.\n * @return {!Object} The retrieved item.\n */\n retrieveItem: function(id) {\n var item = this.cache_[id];\n if (item)\n return item;\n var error = new Error('not in cache');\n error.code = StatusCode.STALE_ELEMENT_REFERENCE;\n error.message = 'element is not attached to the page document';\n throw error;\n },\n\n /**\n * Clears stale items from the cache.\n */\n clearStale: function() {\n for (var id in this.cache_) {\n var node = this.cache_[id];\n if (!this.isNodeReachable_(node))\n delete this.cache_[id];\n }\n },\n\n /**\n * @private\n * @param {!Node} node The node to check.\n * @return {boolean} If the nodes is reachable.\n */\n isNodeReachable_: function(node) {\n var nodeRoot = getNodeRootThroughAnyShadows(node);\n return (nodeRoot == document);\n }\n\n\n};\n\n/**\n * A cache which maps IDs \u003C-> cached objects for the purpose of identifying\n * a script object remotely.\n * @constructor\n */\nfunction Cache() {\n this.cache_ = {};\n this.nextId_ = 1;\n this.idPrefix_ = Math.random().toString();\n}\n\nCache.prototype = {\n\n /**\n * Stores a given item in the cache and returns a unique ID.\n *\n * @param {!Object} item The item to store in the cache.\n * @return {number} The ID for the cached item.\n */\n storeItem: function(item) {\n for (var i in this.cache_) {\n if (item == this.cache_[i])\n return i;\n }\n var id = this.idPrefix_ + '-' + this.nextId_;\n this.cache_[id] = item;\n this.nextId_++;\n return id;\n },\n\n /**\n * Retrieves the cached object for the given ID.\n *\n * @param {number} id The ID for the cached item to retrieve.\n * @return {!Object} The retrieved item.\n */\n retrieveItem: function(id) {\n var item = this.cache_[id];\n if (item)\n return item;\n var error = new Error('not in cache');\n error.code = StatusCode.STALE_ELEMENT_REFERENCE;\n error.message = 'element is not attached to the page document';\n throw error;\n },\n\n /**\n * Clears stale items from the cache.\n */\n clearStale: function() {\n for (var id in this.cache_) {\n var node = this.cache_[id];\n if (!this.isNodeReachable_(node))\n delete this.cache_[id];\n }\n },\n\n /**\n * @private\n * @param {!Node} node The node to check.\n * @return {boolean} If the nodes is reachable.\n */\n isNodeReachable_: function(node) {\n var nodeRoot = getNodeRootThroughAnyShadows(node);\n return (nodeRoot == document);\n }\n};\n\n/**\n * Returns the root element of the node. Found by traversing parentNodes until\n * a node with no parent is found. This node is considered the root.\n * @param {?Node} node The node to find the root element for.\n * @return {?Node} The root node.\n */\nfunction getNodeRoot(node) {\n while (node && node.parentNode) {\n node = node.parentNode;\n }\n return node;\n}\n\n/**\n * Returns the root element of the node, jumping up through shadow roots if\n * any are found.\n */\nfunction getNodeRootThroughAnyShadows(node) {\n var root = getNodeRoot(node);\n while (SHADOW_DOM_ENABLED && root instanceof ShadowRoot) {\n root = getNodeRoot(root.host);\n }\n return root;\n}\n\n/**\n * Returns the global object cache for the page.\n * @param {Document=} opt_doc The document whose cache to retrieve. Defaults to\n * the current document.\n * @return {!Cache} The page's object cache.\n */\nfunction getPageCache(opt_doc, opt_w3c) {\n var doc = opt_doc || document;\n var w3c = opt_w3c || false;\n var key = '$cdc_asdjflasutopfhvcZLmcfl_';\n if (w3c) {\n if (!(key in doc))\n doc[key] = new CacheWithUUID();\n return doc[key];\n } else {\n if (!(key in doc))\n doc[key] = new Cache();\n return doc[key];\n }\n}\n\n/**\n * Wraps the given value to be transmitted remotely by converting\n * appropriate objects to cached object IDs.\n *\n * @param {*} value The value to wrap.\n * @return {*} The wrapped value.\n */\nfunction wrap(value) {\n // As of crrev.com/1316933002, typeof() for some elements will return\n // 'function', not 'object'. So we need to check for both non-null objects, as\n // well Elements that also happen to be callable functions (e.g. \u003Cembed> and\n // \u003Cobject> elements). Note that we can not use |value instanceof Object| here\n // since this does not work with frames/iframes, for example\n // frames[0].document.body instanceof Object == false even though\n // typeof(frames[0].document.body) == 'object'.\n if ((typeof(value) == 'object' && value != null) ||\n (typeof(value) == 'function' && value.nodeName &&\n value.nodeType == NodeType.ELEMENT)) {\n var nodeType = value['nodeType'];\n if (nodeType == NodeType.ELEMENT || nodeType == NodeType.DOCUMENT\n || (SHADOW_DOM_ENABLED && value instanceof ShadowRoot)) {\n var wrapped = {};\n var root = getNodeRootThroughAnyShadows(value);\n wrapped[ELEMENT_KEY] = getPageCache(root, w3cEnabled).storeItem(value);\n return wrapped;\n }\n\n var obj;\n if (typeof(value.length) == 'number') {\n obj = [];\n for (var i = 0; i \u003C value.length; i++)\n obj[i] = wrap(value[i]);\n } else {\n obj = {};\n for (var prop in value)\n obj[prop] = wrap(value[prop]);\n }\n return obj;\n }\n return value;\n}\n\n/**\n * Unwraps the given value by converting from object IDs to the cached\n * objects.\n *\n * @param {*} value The value to unwrap.\n * @param {Cache} cache The cache to retrieve wrapped elements from.\n * @return {*} The unwrapped value.\n */\nfunction unwrap(value, cache) {\n if (typeof(value) == 'object' && value != null) {\n if (ELEMENT_KEY in value)\n return cache.retrieveItem(value[ELEMENT_KEY]);\n\n var obj;\n if (typeof(value.length) == 'number') {\n obj = [];\n for (var i = 0; i \u003C value.length; i++)\n obj[i] = unwrap(value[i], cache);\n } else {\n obj = {};\n for (var prop in value)\n obj[prop] = unwrap(value[prop], cache);\n }\n return obj;\n }\n return value;\n}\n\n/**\n * Calls a given function and returns its value.\n *\n * The inputs to and outputs of the function will be unwrapped and wrapped\n * respectively, unless otherwise specified. This wrapping involves converting\n * between cached object reference IDs and actual JS objects. The cache will\n * automatically be pruned each call to remove stale references.\n *\n * @param {Array\u003Cstring>} shadowHostIds The host ids of the nested shadow\n * DOMs the function should be executed in the context of.\n * @param {function(...[*]) : *} func The function to invoke.\n * @param {!Array\u003C*>} args The array of arguments to supply to the function,\n * which will be unwrapped before invoking the function.\n * @param {boolean} w3c Whether to return a W3C compliant element reference.\n * @param {boolean=} opt_unwrappedReturn Whether the function's return value\n * should be left unwrapped.\n * @return {*} An object containing a status and value property, where status\n * is a WebDriver status code and value is the wrapped value. If an\n * unwrapped return was specified, this will be the function's pure return\n * value.\n */\nfunction callFunction(shadowHostIds, func, args, w3c, opt_unwrappedReturn) {\n if (w3c) {\n w3cEnabled = true;\n ELEMENT_KEY = 'element-6066-11e4-a52e-4f735466cecf';\n\n }\n var cache = getPageCache(null, w3cEnabled);\n cache.clearStale();\n if (shadowHostIds && SHADOW_DOM_ENABLED) {\n for (var i = 0; i \u003C shadowHostIds.length; i++) {\n var host = cache.retrieveItem(shadowHostIds[i]);\n // TODO(zachconrad): Use the olderShadowRoot API when available to check\n // all of the shadow roots.\n cache = getPageCache(host.webkitShadowRoot, w3cEnabled);\n cache.clearStale();\n }\n }\n\n if (opt_unwrappedReturn)\n return func.apply(null, unwrap(args, cache));\n\n var status = 0;\n try {\n var returnValue = wrap(func.apply(null, unwrap(args, cache)));\n } catch (error) {\n status = error.code || StatusCode.UNKNOWN_ERROR;\n var returnValue = error.message;\n }\n return {\n status: status,\n value: returnValue\n }\n}\n; return callFunction.apply(null, arguments) }\n).apply(null, [null, function(s) { return 1; }, [], false])","returnByValue":true}} +[1531857826.624][DEBUG]: WebSocket::OnReadDuringOpen {"id":11,"result":{"result":{"type":"object","value":{"status":0,"value":1}}}} +[1531857826.625][DEBUG]: DEVTOOLS RESPONSE Runtime.evaluate (id=11) { + "result": { + "type": "object", + "value": { + "status": 0, + "value": 1 + } + } +} +[1531857826.625][INFO]: [08867aba4fa489aeea6db3ecf4d49a44] RESPONSE InitSession { + "acceptInsecureCerts": false, + "acceptSslCerts": false, + "applicationCacheEnabled": false, + "browserConnectionEnabled": false, + "browserName": "chrome", + "chrome": { + "chromedriverVersion": "2.40 (f4699e1107eca6e847cd7117cfe51619863b23e3)", + "userDataDir": "/tmp/.org.chromium.Chromium.lLyv7X" + }, + "cssSelectorsEnabled": true, + "databaseEnabled": false, + "goog:chromeOptions": { + "debuggerAddress": "localhost:35629" + }, + "handlesAlerts": true, + "hasTouchScreen": false, + "javascriptEnabled": true, + "locationContextEnabled": true, + "mobileEmulationEnabled": false, + "nativeEvents": true, + "networkConnectionEnabled": false, + "pageLoadStrategy": "normal", + "platform": "Linux", + "rotatable": false, + "setWindowRect": true, + "takesHeapSnapshot": true, + "takesScreenshot": true, + "unexpectedAlertBehaviour": "", + "version": "69.0.3491.0", + "webStorageEnabled": true +} +[1531857826.626][INFO]: [08867aba4fa489aeea6db3ecf4d49a44] COMMAND Navigate { + "url": "http://127.0.0.1:44447/chromedriver/page_test.html" +} +[1531857826.626][INFO]: Waiting for pending navigations... +[1531857826.627][DEBUG]: DEVTOOLS COMMAND Runtime.evaluate (id=12) { + "expression": "1" +} +[1531857826.627][DEBUG]: WebSocket::Send {"id":12,"method":"Runtime.evaluate","params":{"expression":"1"}} +[1531857826.637][DEBUG]: WebSocket::OnReadDuringOpen {"id":12,"result":{"result":{"type":"number","value":1,"description":"1"}}} +[1531857826.637][DEBUG]: DEVTOOLS RESPONSE Runtime.evaluate (id=12) { + "result": { + "description": "1", + "type": "number", + "value": 1 + } +} +[1531857826.637][INFO]: Done waiting for pending navigations. Status: ok +[1531857826.638][DEBUG]: DEVTOOLS COMMAND Page.navigate (id=13) { + "url": "http://127.0.0.1:44447/chromedriver/page_test.html" +} +[1531857826.638][DEBUG]: WebSocket::Send {"id":13,"method":"Page.navigate","params":{"url":"http://127.0.0.1:44447/chromedriver/page_test.html"}} +[1531857826.992][DEBUG]: WebSocket::OnReadDuringOpen {"id":13,"result":{"frameId":"B0871C672528B41CF59B281B62C060B6","loaderId":"CF24179D3294751180A3725C90931FB4"}} +[1531857826.992][DEBUG]: DEVTOOLS RESPONSE Page.navigate (id=13) { + "frameId": "B0871C672528B41CF59B281B62C060B6", + "loaderId": "CF24179D3294751180A3725C90931FB4" +} +[1531857826.992][DEBUG]: DEVTOOLS COMMAND Runtime.evaluate (id=14) { + "expression": "document.URL" +} +[1531857826.992][DEBUG]: WebSocket::Send {"id":14,"method":"Runtime.evaluate","params":{"expression":"document.URL"}} +[1531857826.997][DEBUG]: WebSocket::OnReadDuringOpen {"method":"Runtime.executionContextsCleared","params":{}} +[1531857826.997][DEBUG]: DEVTOOLS EVENT Runtime.executionContextsCleared { + +} +[1531857827.007][DEBUG]: WebSocket::OnReadDuringOpen {"method":"Page.frameStartedLoading","params":{"frameId":"B0871C672528B41CF59B281B62C060B6"}} +[1531857827.007][DEBUG]: DEVTOOLS EVENT Page.frameStartedLoading { + "frameId": "B0871C672528B41CF59B281B62C060B6" +} +[142526:142526:0717/130347.052794:ERROR:render_process_impl.cc(208)] WebFrame LEAKED 1 TIMES +[1531857827.079][DEBUG]: WebSocket::OnReadDuringOpen {"method":"Runtime.executionContextsCleared","params":{}} +[1531857827.079][DEBUG]: WebSocket::OnReadDuringOpen {"method":"Page.frameNavigated","params":{"frame":{"id":"B0871C672528B41CF59B281B62C060B6","loaderId":"CF24179D3294751180A3725C90931FB4","url":"http://127.0.0.1:44447/chromedriver/page_test.html","securityOrigin":"http://127.0.0.1:44447","mimeType":"text/html"}}} +[1531857827.079][DEBUG]: WebSocket::OnReadDuringOpen {"method":"Runtime.executionContextCreated","params":{"context":{"id":1,"origin":"http://127.0.0.1:44447","name":"","auxData":{"isDefault":true,"frameId":"B0871C672528B41CF59B281B62C060B6"}}}} +[1531857827.079][DEBUG]: DEVTOOLS EVENT Runtime.executionContextsCleared { + +} +[1531857827.079][DEBUG]: WebSocket::OnReadDuringOpen {"method":"DOM.documentUpdated","params":{}} +[1531857827.079][DEBUG]: DEVTOOLS EVENT Page.frameNavigated { + "frame": { + "id": "B0871C672528B41CF59B281B62C060B6", + "loaderId": "CF24179D3294751180A3725C90931FB4", + "mimeType": "text/html", + "securityOrigin": "http://127.0.0.1:44447", + "url": "http://127.0.0.1:44447/chromedriver/page_test.html" + } +} +[1531857827.080][DEBUG]: DEVTOOLS EVENT Runtime.executionContextCreated { + "context": { + "auxData": { + "frameId": "B0871C672528B41CF59B281B62C060B6", + "isDefault": true + }, + "id": 1, + "name": "", + "origin": "http://127.0.0.1:44447" + } +} +[1531857827.080][DEBUG]: DEVTOOLS EVENT DOM.documentUpdated { + +} +[1531857827.080][DEBUG]: DEVTOOLS COMMAND DOM.getDocument (id=15) { + +} +[1531857827.080][DEBUG]: WebSocket::Send {"id":15,"method":"DOM.getDocument","params":{}} +[1531857827.112][DEBUG]: WebSocket::OnReadDuringOpen {"method":"Page.loadEventFired","params":{"timestamp":699612.386997}} +[1531857827.112][DEBUG]: WebSocket::OnReadDuringOpen {"method":"Page.frameStoppedLoading","params":{"frameId":"B0871C672528B41CF59B281B62C060B6"}} +[1531857827.112][DEBUG]: WebSocket::OnReadDuringOpen {"method":"DOM.documentUpdated","params":{}} +[1531857827.112][DEBUG]: DEVTOOLS EVENT Page.loadEventFired { + "timestamp": 699612.386997 +} +[1531857827.112][DEBUG]: WebSocket::OnReadDuringOpen {"method":"Page.domContentEventFired","params":{"timestamp":699612.414508}} +[1531857827.112][DEBUG]: DEVTOOLS EVENT Page.frameStoppedLoading { + "frameId": "B0871C672528B41CF59B281B62C060B6" +} +[1531857827.112][DEBUG]: DEVTOOLS EVENT DOM.documentUpdated { + +} +[1531857827.112][DEBUG]: DEVTOOLS COMMAND DOM.getDocument (id=16) { + +} +[1531857827.113][DEBUG]: WebSocket::Send {"id":16,"method":"DOM.getDocument","params":{}} +[1531857827.113][DEBUG]: DEVTOOLS EVENT Page.domContentEventFired { + "timestamp": 699612.414508 +} +[1531857827.115][DEBUG]: WebSocket::OnReadDuringOpen {"id":14,"result":{"result":{"type":"string","value":"http://127.0.0.1:44447/chromedriver/page_test.html"}}} +[1531857827.115][DEBUG]: DEVTOOLS RESPONSE Runtime.evaluate (id=14) { + "result": { + "type": "string", + "value": "http://127.0.0.1:44447/chromedriver/page_test.html" + } +} +[1531857827.121][DEBUG]: WebSocket::OnReadDuringOpen {"id":15,"result":{"root":{"nodeId":1,"backendNodeId":1,"nodeType":9,"nodeName":"#document","localName":"","nodeValue":"","childNodeCount":1,"children":[{"nodeId":2,"parentId":1,"backendNodeId":2,"nodeType":1,"nodeName":"HTML","localName":"html","nodeValue":"","childNodeCount":2,"children":[{"nodeId":3,"parentId":2,"backendNodeId":3,"nodeType":1,"nodeName":"HEAD","localName":"head","nodeValue":"","childNodeCount":2,"attributes":[]},{"nodeId":4,"parentId":2,"backendNodeId":4,"nodeType":1,"nodeName":"BODY","localName":"body","nodeValue":"","childNodeCount":1,"attributes":[]}],"attributes":[],"frameId":"B0871C672528B41CF59B281B62C060B6"}],"documentURL":"http://127.0.0.1:44447/chromedriver/page_test.html","baseURL":"http://127.0.0.1:44447/chromedriver/page_test.html","xmlVersion":""}}} +[1531857827.122][DEBUG]: DEVTOOLS RESPONSE DOM.getDocument (id=15) { + "root": { + "backendNodeId": 1, + "baseURL": "http://127.0.0.1:44447/chromedriver/page_test.html", + "childNodeCount": 1, + "children": [ { + "attributes": [ ], + "backendNodeId": 2, + "childNodeCount": 2, + "children": [ { + "attributes": [ ], + "backendNodeId": 3, + "childNodeCount": 2, + "localName": "head", + "nodeId": 3, + "nodeName": "HEAD", + "nodeType": 1, + "nodeValue": "", + "parentId": 2 + }, { + "attributes": [ ], + "backendNodeId": 4, + "childNodeCount": 1, + "localName": "body", + "nodeId": 4, + "nodeName": "BODY", + "nodeType": 1, + "nodeValue": "", + "parentId": 2 + } ], + "frameId": "B0871C672528B41CF59B281B62C060B6", + "localName": "html", + "nodeId": 2, + "nodeName": "HTML", + "nodeType": 1, + "nodeValue": "", + "parentId": 1 + } ], + "documentURL": "http://127.0.0.1:44447/chromedriver/page_test.html", + "localName": "", + "nodeId": 1, + "nodeName": "#document", + "nodeType": 9, + "nodeValue": "", + "xmlVersion": "" + } +} +[1531857827.139][DEBUG]: WebSocket::OnReadDuringOpen {"id":16,"result":{"root":{"nodeId":5,"backendNodeId":1,"nodeType":9,"nodeName":"#document","localName":"","nodeValue":"","childNodeCount":1,"children":[{"nodeId":6,"parentId":5,"backendNodeId":2,"nodeType":1,"nodeName":"HTML","localName":"html","nodeValue":"","childNodeCount":2,"children":[{"nodeId":7,"parentId":6,"backendNodeId":3,"nodeType":1,"nodeName":"HEAD","localName":"head","nodeValue":"","childNodeCount":2,"attributes":[]},{"nodeId":8,"parentId":6,"backendNodeId":4,"nodeType":1,"nodeName":"BODY","localName":"body","nodeValue":"","childNodeCount":1,"attributes":[]}],"attributes":[],"frameId":"B0871C672528B41CF59B281B62C060B6"}],"documentURL":"http://127.0.0.1:44447/chromedriver/page_test.html","baseURL":"http://127.0.0.1:44447/chromedriver/page_test.html","xmlVersion":""}}} +[1531857827.140][DEBUG]: WebSocket::OnReadDuringOpen {"method":"Log.entryAdded","params":{"entry":{"source":"network","level":"error","text":"Failed to load resource: the server responded with a status of 404 (Not Found)","timestamp":1531857827125.89,"url":"http://127.0.0.1:44447/favicon.ico","networkRequestId":"1000142563.2"}}} +[1531857827.140][DEBUG]: DEVTOOLS RESPONSE DOM.getDocument (id=16) { + "root": { + "backendNodeId": 1, + "baseURL": "http://127.0.0.1:44447/chromedriver/page_test.html", + "childNodeCount": 1, + "children": [ { + "attributes": [ ], + "backendNodeId": 2, + "childNodeCount": 2, + "children": [ { + "attributes": [ ], + "backendNodeId": 3, + "childNodeCount": 2, + "localName": "head", + "nodeId": 7, + "nodeName": "HEAD", + "nodeType": 1, + "nodeValue": "", + "parentId": 6 + }, { + "attributes": [ ], + "backendNodeId": 4, + "childNodeCount": 1, + "localName": "body", + "nodeId": 8, + "nodeName": "BODY", + "nodeType": 1, + "nodeValue": "", + "parentId": 6 + } ], + "frameId": "B0871C672528B41CF59B281B62C060B6", + "localName": "html", + "nodeId": 6, + "nodeName": "HTML", + "nodeType": 1, + "nodeValue": "", + "parentId": 5 + } ], + "documentURL": "http://127.0.0.1:44447/chromedriver/page_test.html", + "localName": "", + "nodeId": 5, + "nodeName": "#document", + "nodeType": 9, + "nodeValue": "", + "xmlVersion": "" + } +} +[1531857827.141][INFO]: Waiting for pending navigations... +[1531857827.141][DEBUG]: DEVTOOLS EVENT Log.entryAdded { + "entry": { + "level": "error", + "networkRequestId": "1000142563.2", + "source": "network", + "text": "Failed to load resource: the server responded with a status of 404 (Not Found)", + "timestamp": 1531857827125.89, + "url": "http://127.0.0.1:44447/favicon.ico" + } +} +[1531857827.141][DEBUG]: DEVTOOLS COMMAND Runtime.evaluate (id=17) { + "expression": "1" +} +[1531857827.141][DEBUG]: WebSocket::Send {"id":17,"method":"Runtime.evaluate","params":{"expression":"1"}} +[1531857827.153][DEBUG]: WebSocket::OnReadDuringOpen {"id":17,"result":{"result":{"type":"number","value":1,"description":"1"}}} +[1531857827.153][DEBUG]: DEVTOOLS RESPONSE Runtime.evaluate (id=17) { + "result": { + "description": "1", + "type": "number", + "value": 1 + } +} +[1531857827.153][INFO]: Done waiting for pending navigations. Status: ok +[1531857827.153][INFO]: [08867aba4fa489aeea6db3ecf4d49a44] RESPONSE Navigate +[1531857827.154][INFO]: [08867aba4fa489aeea6db3ecf4d49a44] COMMAND GetSource { + +} +[1531857827.154][INFO]: Waiting for pending navigations... +[1531857827.154][DEBUG]: DEVTOOLS COMMAND Runtime.evaluate (id=18) { + "expression": "1" +} +[1531857827.154][DEBUG]: WebSocket::Send {"id":18,"method":"Runtime.evaluate","params":{"expression":"1"}} +[1531857827.156][DEBUG]: WebSocket::OnReadDuringOpen {"id":18,"result":{"result":{"type":"number","value":1,"description":"1"}}} +[1531857827.156][DEBUG]: DEVTOOLS RESPONSE Runtime.evaluate (id=18) { + "result": { + "description": "1", + "type": "number", + "value": 1 + } +} +[1531857827.156][INFO]: Done waiting for pending navigations. Status: ok +[1531857827.157][DEBUG]: DEVTOOLS COMMAND Runtime.evaluate (id=19) { + "expression": "(function() { // Copyright (c) 2012 The Chromium Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style license that can be\n// found in the LICENSE file.\n\n/**\n * Enum f...", + "returnByValue": true +} +[1531857827.157][DEBUG]: WebSocket::Send {"id":19,"method":"Runtime.evaluate","params":{"expression":"(function() { // Copyright (c) 2012 The Chromium Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style license that can be\n// found in the LICENSE file.\n\n/**\n * Enum for WebDriver status codes.\n * @enum {number}\n */\nvar StatusCode = {\n STALE_ELEMENT_REFERENCE: 10,\n UNKNOWN_ERROR: 13,\n};\n\n/**\n * Enum for node types.\n * @enum {number}\n */\nvar NodeType = {\n ELEMENT: 1,\n DOCUMENT: 9,\n};\n\n/**\n * Dictionary key to use for holding an element ID.\n * @const\n * @type {string}\n */\nvar ELEMENT_KEY = 'ELEMENT';\n\n/**\n * True if using W3C Element references.\n * @const\n * @type {boolean}\n */\nvar w3cEnabled = false;\n\n/**\n * True if shadow dom is enabled.\n * @const\n * @type {boolean}\n */\nvar SHADOW_DOM_ENABLED = typeof ShadowRoot === 'function';\n\n/**\n * Generates a unique ID to identify an element.\n * @void\n * @return {string} Randomly generated ID.\n */\nfunction generateUUID() {\n var array = new Uint8Array(16);\n window.crypto.getRandomValues(array);\n array[6] = 0x40 | (array[6] & 0x0f);\n array[8] = 0x80 | (array[8] & 0x3f);\n\n var UUID = \"\";\n for (var i = 0; i \u003C 16; i++) {\n var temp = array[i].toString(16);\n if (temp.length \u003C 2)\n temp = \"0\" + temp;\n UUID += temp;\n if (i == 3 || i == 5 || i == 7 || i == 9)\n UUID += \"-\";\n }\n return UUID;\n};\n\n/**\n * A cache which maps IDs \u003C-> cached objects for the purpose of identifying\n * a script object remotely. Uses UUIDs for identification.\n * @constructor\n */\nfunction CacheWithUUID() {\n this.cache_ = {};\n}\n\nCacheWithUUID.prototype = {\n /**\n * Stores a given item in the cache and returns a unique UUID.\n *\n * @param {!Object} item The item to store in the cache.\n * @return {number} The UUID for the cached item.\n */\n storeItem: function(item) {\n for (var i in this.cache_) {\n if (item == this.cache_[i])\n return i;\n }\n var id = generateUUID();\n this.cache_[id] = item;\n return id;\n },\n\n /**\n * Retrieves the cached object for the given ID.\n *\n * @param {number} id The ID for the cached item to retrieve.\n * @return {!Object} The retrieved item.\n */\n retrieveItem: function(id) {\n var item = this.cache_[id];\n if (item)\n return item;\n var error = new Error('not in cache');\n error.code = StatusCode.STALE_ELEMENT_REFERENCE;\n error.message = 'element is not attached to the page document';\n throw error;\n },\n\n /**\n * Clears stale items from the cache.\n */\n clearStale: function() {\n for (var id in this.cache_) {\n var node = this.cache_[id];\n if (!this.isNodeReachable_(node))\n delete this.cache_[id];\n }\n },\n\n /**\n * @private\n * @param {!Node} node The node to check.\n * @return {boolean} If the nodes is reachable.\n */\n isNodeReachable_: function(node) {\n var nodeRoot = getNodeRootThroughAnyShadows(node);\n return (nodeRoot == document);\n }\n\n\n};\n\n/**\n * A cache which maps IDs \u003C-> cached objects for the purpose of identifying\n * a script object remotely.\n * @constructor\n */\nfunction Cache() {\n this.cache_ = {};\n this.nextId_ = 1;\n this.idPrefix_ = Math.random().toString();\n}\n\nCache.prototype = {\n\n /**\n * Stores a given item in the cache and returns a unique ID.\n *\n * @param {!Object} item The item to store in the cache.\n * @return {number} The ID for the cached item.\n */\n storeItem: function(item) {\n for (var i in this.cache_) {\n if (item == this.cache_[i])\n return i;\n }\n var id = this.idPrefix_ + '-' + this.nextId_;\n this.cache_[id] = item;\n this.nextId_++;\n return id;\n },\n\n /**\n * Retrieves the cached object for the given ID.\n *\n * @param {number} id The ID for the cached item to retrieve.\n * @return {!Object} The retrieved item.\n */\n retrieveItem: function(id) {\n var item = this.cache_[id];\n if (item)\n return item;\n var error = new Error('not in cache');\n error.code = StatusCode.STALE_ELEMENT_REFERENCE;\n error.message = 'element is not attached to the page document';\n throw error;\n },\n\n /**\n * Clears stale items from the cache.\n */\n clearStale: function() {\n for (var id in this.cache_) {\n var node = this.cache_[id];\n if (!this.isNodeReachable_(node))\n delete this.cache_[id];\n }\n },\n\n /**\n * @private\n * @param {!Node} node The node to check.\n * @return {boolean} If the nodes is reachable.\n */\n isNodeReachable_: function(node) {\n var nodeRoot = getNodeRootThroughAnyShadows(node);\n return (nodeRoot == document);\n }\n};\n\n/**\n * Returns the root element of the node. Found by traversing parentNodes until\n * a node with no parent is found. This node is considered the root.\n * @param {?Node} node The node to find the root element for.\n * @return {?Node} The root node.\n */\nfunction getNodeRoot(node) {\n while (node && node.parentNode) {\n node = node.parentNode;\n }\n return node;\n}\n\n/**\n * Returns the root element of the node, jumping up through shadow roots if\n * any are found.\n */\nfunction getNodeRootThroughAnyShadows(node) {\n var root = getNodeRoot(node);\n while (SHADOW_DOM_ENABLED && root instanceof ShadowRoot) {\n root = getNodeRoot(root.host);\n }\n return root;\n}\n\n/**\n * Returns the global object cache for the page.\n * @param {Document=} opt_doc The document whose cache to retrieve. Defaults to\n * the current document.\n * @return {!Cache} The page's object cache.\n */\nfunction getPageCache(opt_doc, opt_w3c) {\n var doc = opt_doc || document;\n var w3c = opt_w3c || false;\n var key = '$cdc_asdjflasutopfhvcZLmcfl_';\n if (w3c) {\n if (!(key in doc))\n doc[key] = new CacheWithUUID();\n return doc[key];\n } else {\n if (!(key in doc))\n doc[key] = new Cache();\n return doc[key];\n }\n}\n\n/**\n * Wraps the given value to be transmitted remotely by converting\n * appropriate objects to cached object IDs.\n *\n * @param {*} value The value to wrap.\n * @return {*} The wrapped value.\n */\nfunction wrap(value) {\n // As of crrev.com/1316933002, typeof() for some elements will return\n // 'function', not 'object'. So we need to check for both non-null objects, as\n // well Elements that also happen to be callable functions (e.g. \u003Cembed> and\n // \u003Cobject> elements). Note that we can not use |value instanceof Object| here\n // since this does not work with frames/iframes, for example\n // frames[0].document.body instanceof Object == false even though\n // typeof(frames[0].document.body) == 'object'.\n if ((typeof(value) == 'object' && value != null) ||\n (typeof(value) == 'function' && value.nodeName &&\n value.nodeType == NodeType.ELEMENT)) {\n var nodeType = value['nodeType'];\n if (nodeType == NodeType.ELEMENT || nodeType == NodeType.DOCUMENT\n || (SHADOW_DOM_ENABLED && value instanceof ShadowRoot)) {\n var wrapped = {};\n var root = getNodeRootThroughAnyShadows(value);\n wrapped[ELEMENT_KEY] = getPageCache(root, w3cEnabled).storeItem(value);\n return wrapped;\n }\n\n var obj;\n if (typeof(value.length) == 'number') {\n obj = [];\n for (var i = 0; i \u003C value.length; i++)\n obj[i] = wrap(value[i]);\n } else {\n obj = {};\n for (var prop in value)\n obj[prop] = wrap(value[prop]);\n }\n return obj;\n }\n return value;\n}\n\n/**\n * Unwraps the given value by converting from object IDs to the cached\n * objects.\n *\n * @param {*} value The value to unwrap.\n * @param {Cache} cache The cache to retrieve wrapped elements from.\n * @return {*} The unwrapped value.\n */\nfunction unwrap(value, cache) {\n if (typeof(value) == 'object' && value != null) {\n if (ELEMENT_KEY in value)\n return cache.retrieveItem(value[ELEMENT_KEY]);\n\n var obj;\n if (typeof(value.length) == 'number') {\n obj = [];\n for (var i = 0; i \u003C value.length; i++)\n obj[i] = unwrap(value[i], cache);\n } else {\n obj = {};\n for (var prop in value)\n obj[prop] = unwrap(value[prop], cache);\n }\n return obj;\n }\n return value;\n}\n\n/**\n * Calls a given function and returns its value.\n *\n * The inputs to and outputs of the function will be unwrapped and wrapped\n * respectively, unless otherwise specified. This wrapping involves converting\n * between cached object reference IDs and actual JS objects. The cache will\n * automatically be pruned each call to remove stale references.\n *\n * @param {Array\u003Cstring>} shadowHostIds The host ids of the nested shadow\n * DOMs the function should be executed in the context of.\n * @param {function(...[*]) : *} func The function to invoke.\n * @param {!Array\u003C*>} args The array of arguments to supply to the function,\n * which will be unwrapped before invoking the function.\n * @param {boolean} w3c Whether to return a W3C compliant element reference.\n * @param {boolean=} opt_unwrappedReturn Whether the function's return value\n * should be left unwrapped.\n * @return {*} An object containing a status and value property, where status\n * is a WebDriver status code and value is the wrapped value. If an\n * unwrapped return was specified, this will be the function's pure return\n * value.\n */\nfunction callFunction(shadowHostIds, func, args, w3c, opt_unwrappedReturn) {\n if (w3c) {\n w3cEnabled = true;\n ELEMENT_KEY = 'element-6066-11e4-a52e-4f735466cecf';\n\n }\n var cache = getPageCache(null, w3cEnabled);\n cache.clearStale();\n if (shadowHostIds && SHADOW_DOM_ENABLED) {\n for (var i = 0; i \u003C shadowHostIds.length; i++) {\n var host = cache.retrieveItem(shadowHostIds[i]);\n // TODO(zachconrad): Use the olderShadowRoot API when available to check\n // all of the shadow roots.\n cache = getPageCache(host.webkitShadowRoot, w3cEnabled);\n cache.clearStale();\n }\n }\n\n if (opt_unwrappedReturn)\n return func.apply(null, unwrap(args, cache));\n\n var status = 0;\n try {\n var returnValue = wrap(func.apply(null, unwrap(args, cache)));\n } catch (error) {\n status = error.code || StatusCode.UNKNOWN_ERROR;\n var returnValue = error.message;\n }\n return {\n status: status,\n value: returnValue\n }\n}\n; return callFunction.apply(null, arguments) }\n).apply(null, [null, function() { return new XMLSerializer().serializeToString(document);}, [], false])","returnByValue":true}} +[1531857827.175][DEBUG]: WebSocket::OnReadDuringOpen {"id":19,"result":{"result":{"type":"object","value":{"status":0,"value":"<html xmlns=\"http://www.w3.org/1999/xhtml\"><head>\n<title>page test</title>\n<meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\" />\n</head>\n<body>\n<a id=\"link\" target=\"_blank\" href=\"empty.html\">Link to empty.html</a>\n\n\n</body></html>"}}}} +[1531857827.175][DEBUG]: DEVTOOLS RESPONSE Runtime.evaluate (id=19) { + "result": { + "type": "object", + "value": { + "status": 0, + "value": "\u003Chtml xmlns=\"http://www.w3.org/1999/xhtml\">\u003Chead>\n\u003Ctitle>page test\u003C/title>\n\u003Cmeta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\" />\n\u003C/head>\n\u003Cbody>\n\u003Ca id=\"link\" target=\"_blank\" href=\"em..." + } + } +} +[1531857827.175][INFO]: Waiting for pending navigations... +[1531857827.175][DEBUG]: DEVTOOLS COMMAND Runtime.evaluate (id=20) { + "expression": "1" +} +[1531857827.175][DEBUG]: WebSocket::Send {"id":20,"method":"Runtime.evaluate","params":{"expression":"1"}} +[1531857827.177][DEBUG]: WebSocket::OnReadDuringOpen {"id":20,"result":{"result":{"type":"number","value":1,"description":"1"}}} +[1531857827.177][DEBUG]: DEVTOOLS RESPONSE Runtime.evaluate (id=20) { + "result": { + "description": "1", + "type": "number", + "value": 1 + } +} +[1531857827.177][INFO]: Done waiting for pending navigations. Status: ok +[1531857827.177][INFO]: [08867aba4fa489aeea6db3ecf4d49a44] RESPONSE GetSource "\u003Chtml xmlns=\"http://www.w3.org/1999/xhtml\">\u003Chead>\n\u003Ctitle>page test\u003C/title>\n\u003Cmeta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\" />\n\u003C/head>\n\u003Cbody>\n\u003Ca id=\"link\" target=\"_blank\" href=\"empty.html\">Link to empty.html\u003C/a>\n\n\n\u003C/body>\u003C/html>" +[1531857827.178][INFO]: [08867aba4fa489aeea6db3ecf4d49a44] COMMAND Quit { + +} +[1531857827.188][DEBUG]: WebSocket::OnRead error OK +[0717/130347.192683:ERROR:nacl_helper_linux.cc(310)] NaCl helper process running without a sandbox! +Most likely you need to configure your SUID sandbox correctly +[1531857827.229][INFO]: [08867aba4fa489aeea6db3ecf4d49a44] RESPONSE Quit +[1531857827.229][DEBUG]: Log type 'driver' lost 0 entries on destruction +[1531857827.229][DEBUG]: Log type 'browser' lost 1 entries on destruction
diff --git a/chrome/test/chromedriver/log_replay/test_data/testSendCommand.log b/chrome/test/chromedriver/log_replay/test_data/testSendCommand.log new file mode 100644 index 0000000..a3fdc0a --- /dev/null +++ b/chrome/test/chromedriver/log_replay/test_data/testSendCommand.log
@@ -0,0 +1,1865 @@ +[1531863199.465][INFO]: [fabe88df10ea0dd60fdb549b7dd1488c] COMMAND InitSession { + "desiredCapabilities": { + "chromeOptions": { + "args": [ "no-sandbox", "disable-gpu" ], + "binary": "/usr/local/google/home/cwinstanley/chromium/src/out/Default/chrome" + }, + "goog:testName": "__main__.ChromeDriverTest.testSendCommand", + "loggingPrefs": { + + } + } +} +[1531863199.466][INFO]: Populating Preferences file: { + "alternate_error_pages": { + "enabled": false + }, + "autofill": { + "enabled": false + }, + "browser": { + "check_default_browser": false + }, + "distribution": { + "import_bookmarks": false, + "import_history": false, + "import_search_engine": false, + "make_chrome_default_for_user": false, + "skip_first_run_ui": true + }, + "dns_prefetching": { + "enabled": false + }, + "profile": { + "content_settings": { + "pattern_pairs": { + "https://*,*": { + "media-stream": { + "audio": "Default", + "video": "Default" + } + } + } + }, + "default_content_setting_values": { + "geolocation": 1 + }, + "default_content_settings": { + "geolocation": 1, + "mouselock": 1, + "notifications": 1, + "popups": 1, + "ppapi-broker": 1 + }, + "password_manager_enabled": false + }, + "safebrowsing": { + "enabled": false + }, + "search": { + "suggest_enabled": false + }, + "translate": { + "enabled": false + } +} +[1531863199.467][INFO]: Populating Local State file: { + "background_mode": { + "enabled": false + }, + "ssl": { + "rev_checking": { + "enabled": false + } + } +} +[1531863199.468][INFO]: Launching chrome: /usr/local/google/home/cwinstanley/chromium/src/out/Default/chrome --disable-background-networking --disable-client-side-phishing-detection --disable-default-apps --disable-gpu --disable-hang-monitor --disable-popup-blocking --disable-prompt-on-repost --disable-sync --disable-web-resources --enable-automation --enable-logging --force-fieldtrials=SiteIsolationExtensions/Control --ignore-certificate-errors --load-extension=/tmp/.org.chromium.Chromium.iMLkM5/internal --log-level=0 --metrics-recording-only --no-first-run --no-sandbox --password-store=basic --remote-debugging-port=0 --test-type=webdriver --use-mock-keychain --user-data-dir=/tmp/.org.chromium.Chromium.ETUdZo data:, +[187881:187881:0717/143321.361562:ERROR:gpu_process_transport_factory.cc(642)] Switching to software compositing. +[187881:187881:0717/143321.361635:ERROR:gpu_process_transport_factory.cc(1007)] Lost UI shared context. +[187881:187881:0717/143321.439269:WARNING:account_consistency_mode_manager.cc(290)] Desktop Identity Consistency cannot be enabled as no OAuth client ID and client secret have been configured. +[187881:187881:0717/143321.439380:WARNING:account_consistency_mode_manager.cc(290)] Desktop Identity Consistency cannot be enabled as no OAuth client ID and client secret have been configured. +[187881:187881:0717/143321.439432:WARNING:account_consistency_mode_manager.cc(290)] Desktop Identity Consistency cannot be enabled as no OAuth client ID and client secret have been configured. +[187881:187881:0717/143321.439481:WARNING:account_consistency_mode_manager.cc(290)] Desktop Identity Consistency cannot be enabled as no OAuth client ID and client secret have been configured. +[187881:187881:0717/143321.440339:WARNING:account_consistency_mode_manager.cc(290)] Desktop Identity Consistency cannot be enabled as no OAuth client ID and client secret have been configured. +[187881:187881:0717/143321.446788:WARNING:account_consistency_mode_manager.cc(290)] Desktop Identity Consistency cannot be enabled as no OAuth client ID and client secret have been configured. +[187881:187881:0717/143321.490662:WARNING:account_consistency_mode_manager.cc(290)] Desktop Identity Consistency cannot be enabled as no OAuth client ID and client secret have been configured. +[187881:187881:0717/143321.526059:WARNING:account_consistency_mode_manager.cc(290)] Desktop Identity Consistency cannot be enabled as no OAuth client ID and client secret have been configured. +[187881:187881:0717/143321.526134:WARNING:account_consistency_mode_manager.cc(290)] Desktop Identity Consistency cannot be enabled as no OAuth client ID and client secret have been configured. + +DevTools listening on ws://127.0.0.1:42621/devtools/browser/707a2a6a-70bd-49c8-8638-b9c5b3063805 +[1531863201.550][DEBUG]: DevTools request: http://localhost:42621/json/version +[187881:187881:0717/143321.681947:WARNING:password_store_factory.cc(253)] Using basic (unencrypted) store for password storage. See https://chromium.googlesource.com/chromium/src/+/master/docs/linux_password_storage.md for more information about password storage options. +[187881:187881:0717/143321.684734:WARNING:account_consistency_mode_manager.cc(290)] Desktop Identity Consistency cannot be enabled as no OAuth client ID and client secret have been configured. +[1531863201.906][DEBUG]: DevTools response: { + "Browser": "Chrome/69.0.3491.0", + "Protocol-Version": "1.3", + "User-Agent": "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/69.0.3491.0 Safari/537.36", + "V8-Version": "6.9.389", + "WebKit-Version": "537.36 (@410f2c4912d46a5fae2fe6c0b2e24d9eb6359761)", + "webSocketDebuggerUrl": "ws://localhost:42621/devtools/browser/707a2a6a-70bd-49c8-8638-b9c5b3063805" +} + +[1531863201.951][DEBUG]: DevTools request: http://localhost:42621/json +[1531863201.985][DEBUG]: DevTools response: [ { + "description": "", + "devtoolsFrontendUrl": "/devtools/inspector.html?ws=localhost:42621/devtools/page/B9F03C5D408D73A7B8199BFC71542C9E", + "id": "B9F03C5D408D73A7B8199BFC71542C9E", + "title": "Chrome Automation Extension", + "type": "background_page", + "url": "chrome-extension://aapnijgdinlhnhlmodcfapnahmbfebeb/_generated_background_page.html", + "webSocketDebuggerUrl": "ws://localhost:42621/devtools/page/B9F03C5D408D73A7B8199BFC71542C9E" +}, { + "description": "", + "devtoolsFrontendUrl": "/devtools/inspector.html?ws=localhost:42621/devtools/page/44A1E671E32C81FEE572C1069DD0EE29", + "id": "44A1E671E32C81FEE572C1069DD0EE29", + "title": "", + "type": "page", + "url": "data:,", + "webSocketDebuggerUrl": "ws://localhost:42621/devtools/page/44A1E671E32C81FEE572C1069DD0EE29" +} ] + +[1531863201.986][DEBUG]: DevTools request: http://localhost:42621/json +[1531863201.992][DEBUG]: DevTools response: [ { + "description": "", + "devtoolsFrontendUrl": "/devtools/inspector.html?ws=localhost:42621/devtools/page/B9F03C5D408D73A7B8199BFC71542C9E", + "id": "B9F03C5D408D73A7B8199BFC71542C9E", + "title": "Chrome Automation Extension", + "type": "background_page", + "url": "chrome-extension://aapnijgdinlhnhlmodcfapnahmbfebeb/_generated_background_page.html", + "webSocketDebuggerUrl": "ws://localhost:42621/devtools/page/B9F03C5D408D73A7B8199BFC71542C9E" +}, { + "description": "", + "devtoolsFrontendUrl": "/devtools/inspector.html?ws=localhost:42621/devtools/page/44A1E671E32C81FEE572C1069DD0EE29", + "id": "44A1E671E32C81FEE572C1069DD0EE29", + "title": "", + "type": "page", + "url": "data:,", + "webSocketDebuggerUrl": "ws://localhost:42621/devtools/page/44A1E671E32C81FEE572C1069DD0EE29" +} ] + +[1531863201.994][INFO]: resolved localhost to ["::1","127.0.0.1"] +[1531863201.994][DEBUG]: WebSocket::Connect code=ERR_IO_PENDING +[1531863201.994][DEBUG]: WebSocket::OnSocketConnect code=OK +[1531863201.994][DEBUG]: WebSocket::OnSocketConnect handshake +GET /devtools/page/44A1E671E32C81FEE572C1069DD0EE29 HTTP/1.1 +Host: localhost +Upgrade: websocket +Connection: Upgrade +Sec-WebSocket-Key: mi7wxb05BYlm4X5BWKdKSA== +Sec-WebSocket-Version: 13 +Pragma: no-cache +Cache-Control: no-cache + + +[1531863201.996][DEBUG]: WebSocket::OnReadDuringHandshake +HTTP/1.1 101 WebSocket Protocol Handshake +Upgrade: WebSocket +Connection: Upgrade +Sec-WebSocket-Accept: 0i5Tiv/4WPtorg7Dj/RDZCSH9i8= + + +[1531863201.996][DEBUG]: DEVTOOLS COMMAND Log.enable (id=1) { + +} +[1531863201.996][DEBUG]: WebSocket::Send {"id":1,"method":"Log.enable","params":{}} +[1531863201.997][DEBUG]: DEVTOOLS COMMAND DOM.getDocument (id=2) { + +} +[1531863201.997][DEBUG]: WebSocket::Send {"id":2,"method":"DOM.getDocument","params":{}} +[1531863201.997][DEBUG]: DEVTOOLS COMMAND Target.setAutoAttach (id=3) { + "autoAttach": true, + "waitForDebuggerOnStart": false +} +[1531863201.997][DEBUG]: WebSocket::Send {"id":3,"method":"Target.setAutoAttach","params":{"autoAttach":true,"waitForDebuggerOnStart":false}} +[1531863201.997][DEBUG]: DEVTOOLS COMMAND Page.enable (id=4) { + +} +[1531863201.997][DEBUG]: WebSocket::Send {"id":4,"method":"Page.enable","params":{}} +[1531863201.997][DEBUG]: DEVTOOLS COMMAND Page.enable (id=5) { + +} +[1531863201.997][DEBUG]: WebSocket::Send {"id":5,"method":"Page.enable","params":{}} +[1531863202.041][DEBUG]: WebSocket::OnReadDuringOpen {"id":1,"result":{}} +[1531863202.042][DEBUG]: DEVTOOLS RESPONSE Log.enable (id=1) { + +} +[1531863202.095][DEBUG]: WebSocket::OnReadDuringOpen {"id":2,"result":{"root":{"nodeId":1,"backendNodeId":2,"nodeType":9,"nodeName":"#document","localName":"","nodeValue":"","childNodeCount":1,"children":[{"nodeId":2,"parentId":1,"backendNodeId":3,"nodeType":1,"nodeName":"HTML","localName":"html","nodeValue":"","childNodeCount":2,"children":[{"nodeId":3,"parentId":2,"backendNodeId":4,"nodeType":1,"nodeName":"HEAD","localName":"head","nodeValue":"","childNodeCount":0,"attributes":[]},{"nodeId":4,"parentId":2,"backendNodeId":5,"nodeType":1,"nodeName":"BODY","localName":"body","nodeValue":"","childNodeCount":0,"attributes":[]}],"attributes":[],"frameId":"44A1E671E32C81FEE572C1069DD0EE29"}],"documentURL":"data:,","baseURL":"data:,","xmlVersion":""}}} +[1531863202.095][DEBUG]: WebSocket::OnReadDuringOpen {"id":3,"result":{}} +[1531863202.095][DEBUG]: DEVTOOLS RESPONSE DOM.getDocument (id=2) { + "root": { + "backendNodeId": 2, + "baseURL": "data:,", + "childNodeCount": 1, + "children": [ { + "attributes": [ ], + "backendNodeId": 3, + "childNodeCount": 2, + "children": [ { + "attributes": [ ], + "backendNodeId": 4, + "childNodeCount": 0, + "localName": "head", + "nodeId": 3, + "nodeName": "HEAD", + "nodeType": 1, + "nodeValue": "", + "parentId": 2 + }, { + "attributes": [ ], + "backendNodeId": 5, + "childNodeCount": 0, + "localName": "body", + "nodeId": 4, + "nodeName": "BODY", + "nodeType": 1, + "nodeValue": "", + "parentId": 2 + } ], + "frameId": "44A1E671E32C81FEE572C1069DD0EE29", + "localName": "html", + "nodeId": 2, + "nodeName": "HTML", + "nodeType": 1, + "nodeValue": "", + "parentId": 1 + } ], + "documentURL": "data:,", + "localName": "", + "nodeId": 1, + "nodeName": "#document", + "nodeType": 9, + "nodeValue": "", + "xmlVersion": "" + } +} +[1531863202.096][DEBUG]: DEVTOOLS RESPONSE Target.setAutoAttach (id=3) { + +} +[1531863202.096][DEBUG]: WebSocket::OnReadDuringOpen {"id":4,"result":{}} +[1531863202.096][DEBUG]: WebSocket::OnReadDuringOpen {"id":5,"result":{}} +[1531863202.096][DEBUG]: DEVTOOLS RESPONSE Page.enable (id=4) { + +} +[1531863202.096][DEBUG]: DEVTOOLS RESPONSE Page.enable (id=5) { + +} +[1531863202.096][DEBUG]: DEVTOOLS COMMAND Runtime.enable (id=6) { + +} +[1531863202.097][DEBUG]: WebSocket::Send {"id":6,"method":"Runtime.enable","params":{}} +[1531863202.109][DEBUG]: WebSocket::OnReadDuringOpen {"method":"Page.frameResized","params":{}} +[1531863202.109][DEBUG]: DEVTOOLS EVENT Page.frameResized { + +} +[1531863202.153][DEBUG]: WebSocket::OnReadDuringOpen {"method":"Runtime.executionContextCreated","params":{"context":{"id":1,"origin":"://","name":"","auxData":{"isDefault":true,"frameId":"44A1E671E32C81FEE572C1069DD0EE29"}}}} +[1531863202.153][DEBUG]: WebSocket::OnReadDuringOpen {"id":6,"result":{}} +[1531863202.154][DEBUG]: DEVTOOLS EVENT Runtime.executionContextCreated { + "context": { + "auxData": { + "frameId": "44A1E671E32C81FEE572C1069DD0EE29", + "isDefault": true + }, + "id": 1, + "name": "", + "origin": "://" + } +} +[1531863202.154][DEBUG]: DEVTOOLS RESPONSE Runtime.enable (id=6) { + +} +[1531863202.154][DEBUG]: DEVTOOLS COMMAND Page.enable (id=7) { + +} +[1531863202.154][DEBUG]: WebSocket::Send {"id":7,"method":"Page.enable","params":{}} +[1531863202.158][DEBUG]: WebSocket::OnReadDuringOpen {"id":7,"result":{}} +[1531863202.158][DEBUG]: DEVTOOLS RESPONSE Page.enable (id=7) { + +} +[1531863202.159][DEBUG]: DEVTOOLS COMMAND Runtime.enable (id=8) { + +} +[1531863202.159][DEBUG]: WebSocket::Send {"id":8,"method":"Runtime.enable","params":{}} +[1531863202.160][DEBUG]: WebSocket::OnReadDuringOpen {"id":8,"result":{}} +[1531863202.161][DEBUG]: DEVTOOLS RESPONSE Runtime.enable (id=8) { + +} +[1531863202.162][DEBUG]: DEVTOOLS COMMAND Runtime.evaluate (id=9) { + "expression": "(function() { // Copyright (c) 2012 The Chromium Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style license that can be\n// found in the LICENSE file.\n\n/**\n * Enum f...", + "returnByValue": true +} +[1531863202.162][DEBUG]: WebSocket::Send {"id":9,"method":"Runtime.evaluate","params":{"expression":"(function() { // Copyright (c) 2012 The Chromium Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style license that can be\n// found in the LICENSE file.\n\n/**\n * Enum for WebDriver status codes.\n * @enum {number}\n */\nvar StatusCode = {\n STALE_ELEMENT_REFERENCE: 10,\n UNKNOWN_ERROR: 13,\n};\n\n/**\n * Enum for node types.\n * @enum {number}\n */\nvar NodeType = {\n ELEMENT: 1,\n DOCUMENT: 9,\n};\n\n/**\n * Dictionary key to use for holding an element ID.\n * @const\n * @type {string}\n */\nvar ELEMENT_KEY = 'ELEMENT';\n\n/**\n * True if using W3C Element references.\n * @const\n * @type {boolean}\n */\nvar w3cEnabled = false;\n\n/**\n * True if shadow dom is enabled.\n * @const\n * @type {boolean}\n */\nvar SHADOW_DOM_ENABLED = typeof ShadowRoot === 'function';\n\n/**\n * Generates a unique ID to identify an element.\n * @void\n * @return {string} Randomly generated ID.\n */\nfunction generateUUID() {\n var array = new Uint8Array(16);\n window.crypto.getRandomValues(array);\n array[6] = 0x40 | (array[6] & 0x0f);\n array[8] = 0x80 | (array[8] & 0x3f);\n\n var UUID = \"\";\n for (var i = 0; i \u003C 16; i++) {\n var temp = array[i].toString(16);\n if (temp.length \u003C 2)\n temp = \"0\" + temp;\n UUID += temp;\n if (i == 3 || i == 5 || i == 7 || i == 9)\n UUID += \"-\";\n }\n return UUID;\n};\n\n/**\n * A cache which maps IDs \u003C-> cached objects for the purpose of identifying\n * a script object remotely. Uses UUIDs for identification.\n * @constructor\n */\nfunction CacheWithUUID() {\n this.cache_ = {};\n}\n\nCacheWithUUID.prototype = {\n /**\n * Stores a given item in the cache and returns a unique UUID.\n *\n * @param {!Object} item The item to store in the cache.\n * @return {number} The UUID for the cached item.\n */\n storeItem: function(item) {\n for (var i in this.cache_) {\n if (item == this.cache_[i])\n return i;\n }\n var id = generateUUID();\n this.cache_[id] = item;\n return id;\n },\n\n /**\n * Retrieves the cached object for the given ID.\n *\n * @param {number} id The ID for the cached item to retrieve.\n * @return {!Object} The retrieved item.\n */\n retrieveItem: function(id) {\n var item = this.cache_[id];\n if (item)\n return item;\n var error = new Error('not in cache');\n error.code = StatusCode.STALE_ELEMENT_REFERENCE;\n error.message = 'element is not attached to the page document';\n throw error;\n },\n\n /**\n * Clears stale items from the cache.\n */\n clearStale: function() {\n for (var id in this.cache_) {\n var node = this.cache_[id];\n if (!this.isNodeReachable_(node))\n delete this.cache_[id];\n }\n },\n\n /**\n * @private\n * @param {!Node} node The node to check.\n * @return {boolean} If the nodes is reachable.\n */\n isNodeReachable_: function(node) {\n var nodeRoot = getNodeRootThroughAnyShadows(node);\n return (nodeRoot == document);\n }\n\n\n};\n\n/**\n * A cache which maps IDs \u003C-> cached objects for the purpose of identifying\n * a script object remotely.\n * @constructor\n */\nfunction Cache() {\n this.cache_ = {};\n this.nextId_ = 1;\n this.idPrefix_ = Math.random().toString();\n}\n\nCache.prototype = {\n\n /**\n * Stores a given item in the cache and returns a unique ID.\n *\n * @param {!Object} item The item to store in the cache.\n * @return {number} The ID for the cached item.\n */\n storeItem: function(item) {\n for (var i in this.cache_) {\n if (item == this.cache_[i])\n return i;\n }\n var id = this.idPrefix_ + '-' + this.nextId_;\n this.cache_[id] = item;\n this.nextId_++;\n return id;\n },\n\n /**\n * Retrieves the cached object for the given ID.\n *\n * @param {number} id The ID for the cached item to retrieve.\n * @return {!Object} The retrieved item.\n */\n retrieveItem: function(id) {\n var item = this.cache_[id];\n if (item)\n return item;\n var error = new Error('not in cache');\n error.code = StatusCode.STALE_ELEMENT_REFERENCE;\n error.message = 'element is not attached to the page document';\n throw error;\n },\n\n /**\n * Clears stale items from the cache.\n */\n clearStale: function() {\n for (var id in this.cache_) {\n var node = this.cache_[id];\n if (!this.isNodeReachable_(node))\n delete this.cache_[id];\n }\n },\n\n /**\n * @private\n * @param {!Node} node The node to check.\n * @return {boolean} If the nodes is reachable.\n */\n isNodeReachable_: function(node) {\n var nodeRoot = getNodeRootThroughAnyShadows(node);\n return (nodeRoot == document);\n }\n};\n\n/**\n * Returns the root element of the node. Found by traversing parentNodes until\n * a node with no parent is found. This node is considered the root.\n * @param {?Node} node The node to find the root element for.\n * @return {?Node} The root node.\n */\nfunction getNodeRoot(node) {\n while (node && node.parentNode) {\n node = node.parentNode;\n }\n return node;\n}\n\n/**\n * Returns the root element of the node, jumping up through shadow roots if\n * any are found.\n */\nfunction getNodeRootThroughAnyShadows(node) {\n var root = getNodeRoot(node);\n while (SHADOW_DOM_ENABLED && root instanceof ShadowRoot) {\n root = getNodeRoot(root.host);\n }\n return root;\n}\n\n/**\n * Returns the global object cache for the page.\n * @param {Document=} opt_doc The document whose cache to retrieve. Defaults to\n * the current document.\n * @return {!Cache} The page's object cache.\n */\nfunction getPageCache(opt_doc, opt_w3c) {\n var doc = opt_doc || document;\n var w3c = opt_w3c || false;\n var key = '$cdc_asdjflasutopfhvcZLmcfl_';\n if (w3c) {\n if (!(key in doc))\n doc[key] = new CacheWithUUID();\n return doc[key];\n } else {\n if (!(key in doc))\n doc[key] = new Cache();\n return doc[key];\n }\n}\n\n/**\n * Wraps the given value to be transmitted remotely by converting\n * appropriate objects to cached object IDs.\n *\n * @param {*} value The value to wrap.\n * @return {*} The wrapped value.\n */\nfunction wrap(value) {\n // As of crrev.com/1316933002, typeof() for some elements will return\n // 'function', not 'object'. So we need to check for both non-null objects, as\n // well Elements that also happen to be callable functions (e.g. \u003Cembed> and\n // \u003Cobject> elements). Note that we can not use |value instanceof Object| here\n // since this does not work with frames/iframes, for example\n // frames[0].document.body instanceof Object == false even though\n // typeof(frames[0].document.body) == 'object'.\n if ((typeof(value) == 'object' && value != null) ||\n (typeof(value) == 'function' && value.nodeName &&\n value.nodeType == NodeType.ELEMENT)) {\n var nodeType = value['nodeType'];\n if (nodeType == NodeType.ELEMENT || nodeType == NodeType.DOCUMENT\n || (SHADOW_DOM_ENABLED && value instanceof ShadowRoot)) {\n var wrapped = {};\n var root = getNodeRootThroughAnyShadows(value);\n wrapped[ELEMENT_KEY] = getPageCache(root, w3cEnabled).storeItem(value);\n return wrapped;\n }\n\n var obj;\n if (typeof(value.length) == 'number') {\n obj = [];\n for (var i = 0; i \u003C value.length; i++)\n obj[i] = wrap(value[i]);\n } else {\n obj = {};\n for (var prop in value)\n obj[prop] = wrap(value[prop]);\n }\n return obj;\n }\n return value;\n}\n\n/**\n * Unwraps the given value by converting from object IDs to the cached\n * objects.\n *\n * @param {*} value The value to unwrap.\n * @param {Cache} cache The cache to retrieve wrapped elements from.\n * @return {*} The unwrapped value.\n */\nfunction unwrap(value, cache) {\n if (typeof(value) == 'object' && value != null) {\n if (ELEMENT_KEY in value)\n return cache.retrieveItem(value[ELEMENT_KEY]);\n\n var obj;\n if (typeof(value.length) == 'number') {\n obj = [];\n for (var i = 0; i \u003C value.length; i++)\n obj[i] = unwrap(value[i], cache);\n } else {\n obj = {};\n for (var prop in value)\n obj[prop] = unwrap(value[prop], cache);\n }\n return obj;\n }\n return value;\n}\n\n/**\n * Calls a given function and returns its value.\n *\n * The inputs to and outputs of the function will be unwrapped and wrapped\n * respectively, unless otherwise specified. This wrapping involves converting\n * between cached object reference IDs and actual JS objects. The cache will\n * automatically be pruned each call to remove stale references.\n *\n * @param {Array\u003Cstring>} shadowHostIds The host ids of the nested shadow\n * DOMs the function should be executed in the context of.\n * @param {function(...[*]) : *} func The function to invoke.\n * @param {!Array\u003C*>} args The array of arguments to supply to the function,\n * which will be unwrapped before invoking the function.\n * @param {boolean} w3c Whether to return a W3C compliant element reference.\n * @param {boolean=} opt_unwrappedReturn Whether the function's return value\n * should be left unwrapped.\n * @return {*} An object containing a status and value property, where status\n * is a WebDriver status code and value is the wrapped value. If an\n * unwrapped return was specified, this will be the function's pure return\n * value.\n */\nfunction callFunction(shadowHostIds, func, args, w3c, opt_unwrappedReturn) {\n if (w3c) {\n w3cEnabled = true;\n ELEMENT_KEY = 'element-6066-11e4-a52e-4f735466cecf';\n\n }\n var cache = getPageCache(null, w3cEnabled);\n cache.clearStale();\n if (shadowHostIds && SHADOW_DOM_ENABLED) {\n for (var i = 0; i \u003C shadowHostIds.length; i++) {\n var host = cache.retrieveItem(shadowHostIds[i]);\n // TODO(zachconrad): Use the olderShadowRoot API when available to check\n // all of the shadow roots.\n cache = getPageCache(host.webkitShadowRoot, w3cEnabled);\n cache.clearStale();\n }\n }\n\n if (opt_unwrappedReturn)\n return func.apply(null, unwrap(args, cache));\n\n var status = 0;\n try {\n var returnValue = wrap(func.apply(null, unwrap(args, cache)));\n } catch (error) {\n status = error.code || StatusCode.UNKNOWN_ERROR;\n var returnValue = error.message;\n }\n return {\n status: status,\n value: returnValue\n }\n}\n; return callFunction.apply(null, arguments) }\n).apply(null, [null, function(s) { return 1; }, [], false])","returnByValue":true}} +[1531863202.200][DEBUG]: WebSocket::OnReadDuringOpen {"id":9,"result":{"result":{"type":"object","value":{"status":0,"value":1}}}} +[1531863202.200][DEBUG]: DEVTOOLS RESPONSE Runtime.evaluate (id=9) { + "result": { + "type": "object", + "value": { + "status": 0, + "value": 1 + } + } +} +[1531863202.200][INFO]: [fabe88df10ea0dd60fdb549b7dd1488c] RESPONSE InitSession { + "acceptInsecureCerts": false, + "acceptSslCerts": false, + "applicationCacheEnabled": false, + "browserConnectionEnabled": false, + "browserName": "chrome", + "chrome": { + "chromedriverVersion": "2.40 (f4699e1107eca6e847cd7117cfe51619863b23e3)", + "userDataDir": "/tmp/.org.chromium.Chromium.ETUdZo" + }, + "cssSelectorsEnabled": true, + "databaseEnabled": false, + "goog:chromeOptions": { + "debuggerAddress": "localhost:42621" + }, + "handlesAlerts": true, + "hasTouchScreen": false, + "javascriptEnabled": true, + "locationContextEnabled": true, + "mobileEmulationEnabled": false, + "nativeEvents": true, + "networkConnectionEnabled": false, + "pageLoadStrategy": "normal", + "platform": "Linux", + "rotatable": false, + "setWindowRect": true, + "takesHeapSnapshot": true, + "takesScreenshot": true, + "unexpectedAlertBehaviour": "", + "version": "69.0.3491.0", + "webStorageEnabled": true +} +[1531863202.203][INFO]: [fabe88df10ea0dd60fdb549b7dd1488c] COMMAND SendCommandAndGetResult { + "cmd": "CSS.enable", + "params": { + + } +} +[1531863202.203][INFO]: Waiting for pending navigations... +[1531863202.203][DEBUG]: DEVTOOLS COMMAND Runtime.evaluate (id=10) { + "expression": "1" +} +[1531863202.203][DEBUG]: WebSocket::Send {"id":10,"method":"Runtime.evaluate","params":{"expression":"1"}} +[1531863202.205][DEBUG]: WebSocket::OnReadDuringOpen {"id":10,"result":{"result":{"type":"number","value":1,"description":"1"}}} +[1531863202.205][DEBUG]: DEVTOOLS RESPONSE Runtime.evaluate (id=10) { + "result": { + "description": "1", + "type": "number", + "value": 1 + } +} +[1531863202.206][DEBUG]: DEVTOOLS COMMAND DOM.getDocument (id=11) { + +} +[1531863202.206][DEBUG]: WebSocket::Send {"id":11,"method":"DOM.getDocument","params":{}} +[1531863202.207][DEBUG]: WebSocket::OnReadDuringOpen {"id":11,"result":{"root":{"nodeId":5,"backendNodeId":2,"nodeType":9,"nodeName":"#document","localName":"","nodeValue":"","childNodeCount":1,"children":[{"nodeId":6,"parentId":5,"backendNodeId":3,"nodeType":1,"nodeName":"HTML","localName":"html","nodeValue":"","childNodeCount":2,"children":[{"nodeId":7,"parentId":6,"backendNodeId":4,"nodeType":1,"nodeName":"HEAD","localName":"head","nodeValue":"","childNodeCount":0,"attributes":[]},{"nodeId":8,"parentId":6,"backendNodeId":5,"nodeType":1,"nodeName":"BODY","localName":"body","nodeValue":"","childNodeCount":0,"attributes":[]}],"attributes":[],"frameId":"44A1E671E32C81FEE572C1069DD0EE29"}],"documentURL":"data:,","baseURL":"data:,","xmlVersion":""}}} +[1531863202.208][DEBUG]: DEVTOOLS RESPONSE DOM.getDocument (id=11) { + "root": { + "backendNodeId": 2, + "baseURL": "data:,", + "childNodeCount": 1, + "children": [ { + "attributes": [ ], + "backendNodeId": 3, + "childNodeCount": 2, + "children": [ { + "attributes": [ ], + "backendNodeId": 4, + "childNodeCount": 0, + "localName": "head", + "nodeId": 7, + "nodeName": "HEAD", + "nodeType": 1, + "nodeValue": "", + "parentId": 6 + }, { + "attributes": [ ], + "backendNodeId": 5, + "childNodeCount": 0, + "localName": "body", + "nodeId": 8, + "nodeName": "BODY", + "nodeType": 1, + "nodeValue": "", + "parentId": 6 + } ], + "frameId": "44A1E671E32C81FEE572C1069DD0EE29", + "localName": "html", + "nodeId": 6, + "nodeName": "HTML", + "nodeType": 1, + "nodeValue": "", + "parentId": 5 + } ], + "documentURL": "data:,", + "localName": "", + "nodeId": 5, + "nodeName": "#document", + "nodeType": 9, + "nodeValue": "", + "xmlVersion": "" + } +} +[1531863202.208][DEBUG]: DEVTOOLS COMMAND Runtime.evaluate (id=12) { + "expression": "var frame = document.createElement('iframe');frame.name = 'chromedriver dummy frame';frame.src = 'about:blank';document.body.appendChild(frame);window.setTimeout(function() { document.body.removeC..." +} +[1531863202.208][DEBUG]: WebSocket::Send {"id":12,"method":"Runtime.evaluate","params":{"expression":"var frame = document.createElement('iframe');frame.name = 'chromedriver dummy frame';frame.src = 'about:blank';document.body.appendChild(frame);window.setTimeout(function() { document.body.removeChild(frame);}, 0);"}} +[1531863202.229][DEBUG]: WebSocket::OnReadDuringOpen {"method":"DOM.childNodeCountUpdated","params":{"nodeId":8,"childNodeCount":1}} +[1531863202.230][DEBUG]: WebSocket::OnReadDuringOpen {"method":"Page.frameAttached","params":{"frameId":"C481AF1F0CD041FFAF8D1E91E3AEB63F","parentFrameId":"44A1E671E32C81FEE572C1069DD0EE29","stack":{"callFrames":[{"functionName":"","scriptId":"20","url":"","lineNumber":0,"columnNumber":125}]}}} +[1531863202.230][DEBUG]: DEVTOOLS EVENT DOM.childNodeCountUpdated { + "childNodeCount": 1, + "nodeId": 8 +} +[1531863202.230][DEBUG]: DEVTOOLS EVENT Page.frameAttached { + "frameId": "C481AF1F0CD041FFAF8D1E91E3AEB63F", + "parentFrameId": "44A1E671E32C81FEE572C1069DD0EE29", + "stack": { + "callFrames": [ { + "columnNumber": 125, + "functionName": "", + "lineNumber": 0, + "scriptId": "20", + "url": "" + } ] + } +} +[1531863202.248][DEBUG]: WebSocket::OnReadDuringOpen {"method":"Page.frameStartedLoading","params":{"frameId":"C481AF1F0CD041FFAF8D1E91E3AEB63F"}} +[1531863202.249][DEBUG]: WebSocket::OnReadDuringOpen {"method":"Page.frameNavigated","params":{"frame":{"id":"C481AF1F0CD041FFAF8D1E91E3AEB63F","parentId":"44A1E671E32C81FEE572C1069DD0EE29","loaderId":"12EDD1BFE00B1942D71D4685FE483DA7","name":"chromedriver dummy frame","url":"about:blank","securityOrigin":"://","mimeType":"text/html"}}} +[1531863202.249][DEBUG]: DEVTOOLS EVENT Page.frameStartedLoading { + "frameId": "C481AF1F0CD041FFAF8D1E91E3AEB63F" +} +[1531863202.249][DEBUG]: WebSocket::OnReadDuringOpen {"method":"Runtime.executionContextCreated","params":{"context":{"id":2,"origin":"://","name":"","auxData":{"isDefault":true,"frameId":"C481AF1F0CD041FFAF8D1E91E3AEB63F"}}}} +[1531863202.249][DEBUG]: WebSocket::OnReadDuringOpen {"method":"Page.frameStoppedLoading","params":{"frameId":"C481AF1F0CD041FFAF8D1E91E3AEB63F"}} +[1531863202.249][DEBUG]: WebSocket::OnReadDuringOpen {"id":12,"result":{"result":{"type":"number","value":1,"description":"1"}}} +[1531863202.249][DEBUG]: DEVTOOLS EVENT Page.frameNavigated { + "frame": { + "id": "C481AF1F0CD041FFAF8D1E91E3AEB63F", + "loaderId": "12EDD1BFE00B1942D71D4685FE483DA7", + "mimeType": "text/html", + "name": "chromedriver dummy frame", + "parentId": "44A1E671E32C81FEE572C1069DD0EE29", + "securityOrigin": "://", + "url": "about:blank" + } +} +[1531863202.249][DEBUG]: DEVTOOLS EVENT Runtime.executionContextCreated { + "context": { + "auxData": { + "frameId": "C481AF1F0CD041FFAF8D1E91E3AEB63F", + "isDefault": true + }, + "id": 2, + "name": "", + "origin": "://" + } +} +[1531863202.249][DEBUG]: DEVTOOLS EVENT Page.frameStoppedLoading { + "frameId": "C481AF1F0CD041FFAF8D1E91E3AEB63F" +} +[1531863202.249][DEBUG]: DEVTOOLS RESPONSE Runtime.evaluate (id=12) { + "result": { + "description": "1", + "type": "number", + "value": 1 + } +} +[1531863202.249][INFO]: Done waiting for pending navigations. Status: ok +[1531863202.250][DEBUG]: DEVTOOLS COMMAND CSS.enable (id=13) { + +} +[1531863202.250][DEBUG]: WebSocket::Send {"id":13,"method":"CSS.enable","params":{}} +[1531863202.566][DEBUG]: WebSocket::OnReadDuringOpen {"method":"DOM.childNodeCountUpdated","params":{"nodeId":8,"childNodeCount":0}} +[1531863202.567][DEBUG]: WebSocket::OnReadDuringOpen {"method":"Runtime.executionContextDestroyed","params":{"executionContextId":2}} +[1531863202.567][DEBUG]: WebSocket::OnReadDuringOpen {"method":"Page.frameDetached","params":{"frameId":"C481AF1F0CD041FFAF8D1E91E3AEB63F"}} +[1531863202.567][DEBUG]: WebSocket::OnReadDuringOpen {"id":13,"result":{}} +[1531863202.567][DEBUG]: DEVTOOLS EVENT DOM.childNodeCountUpdated { + "childNodeCount": 0, + "nodeId": 8 +} +[1531863202.567][DEBUG]: DEVTOOLS EVENT Runtime.executionContextDestroyed { + "executionContextId": 2 +} +[1531863202.567][DEBUG]: DEVTOOLS EVENT Page.frameDetached { + "frameId": "C481AF1F0CD041FFAF8D1E91E3AEB63F" +} +[1531863202.567][DEBUG]: DEVTOOLS RESPONSE CSS.enable (id=13) { + +} +[1531863202.567][INFO]: Waiting for pending navigations... +[1531863202.567][DEBUG]: DEVTOOLS COMMAND Runtime.evaluate (id=14) { + "expression": "1" +} +[1531863202.567][DEBUG]: WebSocket::Send {"id":14,"method":"Runtime.evaluate","params":{"expression":"1"}} +[1531863202.580][DEBUG]: WebSocket::OnReadDuringOpen {"id":14,"result":{"result":{"type":"number","value":1,"description":"1"}}} +[1531863202.580][DEBUG]: DEVTOOLS RESPONSE Runtime.evaluate (id=14) { + "result": { + "description": "1", + "type": "number", + "value": 1 + } +} +[1531863202.581][INFO]: Done waiting for pending navigations. Status: ok +[1531863202.581][INFO]: [fabe88df10ea0dd60fdb549b7dd1488c] RESPONSE SendCommandAndGetResult { + +} +[1531863202.582][INFO]: [fabe88df10ea0dd60fdb549b7dd1488c] COMMAND Quit { + +} +[1531863202.591][DEBUG]: WebSocket::OnRead error OK +[0717/143322.595383:ERROR:nacl_helper_linux.cc(310)] NaCl helper process running without a sandbox! +Most likely you need to configure your SUID sandbox correctly +[1531863202.632][INFO]: [fabe88df10ea0dd60fdb549b7dd1488c] RESPONSE Quit +[1531863202.632][DEBUG]: Log type 'driver' lost 0 entries on destruction +[1531863202.632][DEBUG]: Log type 'browser' lost 0 entries on destruction +[1531863202.634][INFO]: [0f6b4c103433f5fcb203e99eda4df358] COMMAND InitSession { + "desiredCapabilities": { + "chromeOptions": { + "args": [ "no-sandbox", "disable-gpu" ], + "binary": "/usr/local/google/home/cwinstanley/chromium/src/out/Default/chrome" + }, + "goog:testName": "__main__.ChromeDriverTest.testSendCommandAndGetResult", + "loggingPrefs": { + + } + } +} +[1531863202.635][INFO]: Populating Preferences file: { + "alternate_error_pages": { + "enabled": false + }, + "autofill": { + "enabled": false + }, + "browser": { + "check_default_browser": false + }, + "distribution": { + "import_bookmarks": false, + "import_history": false, + "import_search_engine": false, + "make_chrome_default_for_user": false, + "skip_first_run_ui": true + }, + "dns_prefetching": { + "enabled": false + }, + "profile": { + "content_settings": { + "pattern_pairs": { + "https://*,*": { + "media-stream": { + "audio": "Default", + "video": "Default" + } + } + } + }, + "default_content_setting_values": { + "geolocation": 1 + }, + "default_content_settings": { + "geolocation": 1, + "mouselock": 1, + "notifications": 1, + "popups": 1, + "ppapi-broker": 1 + }, + "password_manager_enabled": false + }, + "safebrowsing": { + "enabled": false + }, + "search": { + "suggest_enabled": false + }, + "translate": { + "enabled": false + } +} +[1531863202.635][INFO]: Populating Local State file: { + "background_mode": { + "enabled": false + }, + "ssl": { + "rev_checking": { + "enabled": false + } + } +} +[1531863202.636][INFO]: Launching chrome: /usr/local/google/home/cwinstanley/chromium/src/out/Default/chrome --disable-background-networking --disable-client-side-phishing-detection --disable-default-apps --disable-gpu --disable-hang-monitor --disable-popup-blocking --disable-prompt-on-repost --disable-sync --disable-web-resources --enable-automation --enable-logging --force-fieldtrials=SiteIsolationExtensions/Control --ignore-certificate-errors --load-extension=/tmp/.org.chromium.Chromium.cXrCcS/internal --log-level=0 --metrics-recording-only --no-first-run --no-sandbox --password-store=basic --remote-debugging-port=0 --test-type=webdriver --use-mock-keychain --user-data-dir=/tmp/.org.chromium.Chromium.V87nZY data:, +[187979:187979:0717/143324.490691:ERROR:gpu_process_transport_factory.cc(642)] Switching to software compositing. +[187979:187979:0717/143324.490794:ERROR:gpu_process_transport_factory.cc(1007)] Lost UI shared context. +[187979:187979:0717/143324.580792:WARNING:account_consistency_mode_manager.cc(290)] Desktop Identity Consistency cannot be enabled as no OAuth client ID and client secret have been configured. +[187979:187979:0717/143324.580919:WARNING:account_consistency_mode_manager.cc(290)] Desktop Identity Consistency cannot be enabled as no OAuth client ID and client secret have been configured. +[187979:187979:0717/143324.580976:WARNING:account_consistency_mode_manager.cc(290)] Desktop Identity Consistency cannot be enabled as no OAuth client ID and client secret have been configured. +[187979:187979:0717/143324.581036:WARNING:account_consistency_mode_manager.cc(290)] Desktop Identity Consistency cannot be enabled as no OAuth client ID and client secret have been configured. +[187979:187979:0717/143324.582056:WARNING:account_consistency_mode_manager.cc(290)] Desktop Identity Consistency cannot be enabled as no OAuth client ID and client secret have been configured. +[187979:187979:0717/143324.589236:WARNING:account_consistency_mode_manager.cc(290)] Desktop Identity Consistency cannot be enabled as no OAuth client ID and client secret have been configured. +[187979:187979:0717/143324.633717:WARNING:account_consistency_mode_manager.cc(290)] Desktop Identity Consistency cannot be enabled as no OAuth client ID and client secret have been configured. +[187979:187979:0717/143324.664208:WARNING:account_consistency_mode_manager.cc(290)] Desktop Identity Consistency cannot be enabled as no OAuth client ID and client secret have been configured. +[187979:187979:0717/143324.664285:WARNING:account_consistency_mode_manager.cc(290)] Desktop Identity Consistency cannot be enabled as no OAuth client ID and client secret have been configured. + +DevTools listening on ws://127.0.0.1:33913/devtools/browser/f4889dc0-7fea-4459-894a-b8ea2c3edb50 +[1531863204.743][DEBUG]: DevTools request: http://localhost:33913/json/version +[187979:187979:0717/143324.811528:WARNING:password_store_factory.cc(253)] Using basic (unencrypted) store for password storage. See https://chromium.googlesource.com/chromium/src/+/master/docs/linux_password_storage.md for more information about password storage options. +[187979:187979:0717/143324.814360:WARNING:account_consistency_mode_manager.cc(290)] Desktop Identity Consistency cannot be enabled as no OAuth client ID and client secret have been configured. +[1531863205.032][DEBUG]: DevTools response: { + "Browser": "Chrome/69.0.3491.0", + "Protocol-Version": "1.3", + "User-Agent": "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/69.0.3491.0 Safari/537.36", + "V8-Version": "6.9.389", + "WebKit-Version": "537.36 (@410f2c4912d46a5fae2fe6c0b2e24d9eb6359761)", + "webSocketDebuggerUrl": "ws://localhost:33913/devtools/browser/f4889dc0-7fea-4459-894a-b8ea2c3edb50" +} + +[1531863205.085][DEBUG]: DevTools request: http://localhost:33913/json +[1531863205.115][DEBUG]: DevTools response: [ { + "description": "", + "devtoolsFrontendUrl": "/devtools/inspector.html?ws=localhost:33913/devtools/page/001DF2E5CD9BCD35E72B126A06C27132", + "id": "001DF2E5CD9BCD35E72B126A06C27132", + "title": "Chrome Automation Extension", + "type": "background_page", + "url": "chrome-extension://aapnijgdinlhnhlmodcfapnahmbfebeb/_generated_background_page.html", + "webSocketDebuggerUrl": "ws://localhost:33913/devtools/page/001DF2E5CD9BCD35E72B126A06C27132" +}, { + "description": "", + "devtoolsFrontendUrl": "/devtools/inspector.html?ws=localhost:33913/devtools/page/B964E93E0B286A4AE028430612945420", + "id": "B964E93E0B286A4AE028430612945420", + "title": "", + "type": "page", + "url": "data:,", + "webSocketDebuggerUrl": "ws://localhost:33913/devtools/page/B964E93E0B286A4AE028430612945420" +} ] + +[1531863205.116][DEBUG]: DevTools request: http://localhost:33913/json +[1531863205.125][DEBUG]: DevTools response: [ { + "description": "", + "devtoolsFrontendUrl": "/devtools/inspector.html?ws=localhost:33913/devtools/page/001DF2E5CD9BCD35E72B126A06C27132", + "id": "001DF2E5CD9BCD35E72B126A06C27132", + "title": "Chrome Automation Extension", + "type": "background_page", + "url": "chrome-extension://aapnijgdinlhnhlmodcfapnahmbfebeb/_generated_background_page.html", + "webSocketDebuggerUrl": "ws://localhost:33913/devtools/page/001DF2E5CD9BCD35E72B126A06C27132" +}, { + "description": "", + "devtoolsFrontendUrl": "/devtools/inspector.html?ws=localhost:33913/devtools/page/B964E93E0B286A4AE028430612945420", + "id": "B964E93E0B286A4AE028430612945420", + "title": "", + "type": "page", + "url": "data:,", + "webSocketDebuggerUrl": "ws://localhost:33913/devtools/page/B964E93E0B286A4AE028430612945420" +} ] + +[1531863205.126][INFO]: resolved localhost to ["::1","127.0.0.1"] +[1531863205.126][DEBUG]: WebSocket::Connect code=ERR_IO_PENDING +[1531863205.126][DEBUG]: WebSocket::OnSocketConnect code=OK +[1531863205.126][DEBUG]: WebSocket::OnSocketConnect handshake +GET /devtools/page/B964E93E0B286A4AE028430612945420 HTTP/1.1 +Host: localhost +Upgrade: websocket +Connection: Upgrade +Sec-WebSocket-Key: etd0364tmz3W+7wgAul6xA== +Sec-WebSocket-Version: 13 +Pragma: no-cache +Cache-Control: no-cache + + +[1531863205.128][DEBUG]: WebSocket::OnReadDuringHandshake +HTTP/1.1 101 WebSocket Protocol Handshake +Upgrade: WebSocket +Connection: Upgrade +Sec-WebSocket-Accept: Lqypd42/w3NW8xCf1aLV4F5Qyl4= + + +[1531863205.128][DEBUG]: DEVTOOLS COMMAND Log.enable (id=1) { + +} +[1531863205.128][DEBUG]: WebSocket::Send {"id":1,"method":"Log.enable","params":{}} +[1531863205.128][DEBUG]: DEVTOOLS COMMAND DOM.getDocument (id=2) { + +} +[1531863205.128][DEBUG]: WebSocket::Send {"id":2,"method":"DOM.getDocument","params":{}} +[1531863205.128][DEBUG]: DEVTOOLS COMMAND Target.setAutoAttach (id=3) { + "autoAttach": true, + "waitForDebuggerOnStart": false +} +[1531863205.129][DEBUG]: WebSocket::Send {"id":3,"method":"Target.setAutoAttach","params":{"autoAttach":true,"waitForDebuggerOnStart":false}} +[1531863205.129][DEBUG]: DEVTOOLS COMMAND Page.enable (id=4) { + +} +[1531863205.129][DEBUG]: WebSocket::Send {"id":4,"method":"Page.enable","params":{}} +[1531863205.129][DEBUG]: DEVTOOLS COMMAND Page.enable (id=5) { + +} +[1531863205.129][DEBUG]: WebSocket::Send {"id":5,"method":"Page.enable","params":{}} +[1531863205.172][DEBUG]: WebSocket::OnReadDuringOpen {"id":1,"result":{}} +[1531863205.173][DEBUG]: DEVTOOLS RESPONSE Log.enable (id=1) { + +} +[1531863205.173][DEBUG]: WebSocket::OnReadDuringOpen {"id":2,"result":{"root":{"nodeId":1,"backendNodeId":1,"nodeType":9,"nodeName":"#document","localName":"","nodeValue":"","childNodeCount":1,"children":[{"nodeId":2,"parentId":1,"backendNodeId":2,"nodeType":1,"nodeName":"HTML","localName":"html","nodeValue":"","childNodeCount":2,"children":[{"nodeId":3,"parentId":2,"backendNodeId":3,"nodeType":1,"nodeName":"HEAD","localName":"head","nodeValue":"","childNodeCount":0,"attributes":[]},{"nodeId":4,"parentId":2,"backendNodeId":4,"nodeType":1,"nodeName":"BODY","localName":"body","nodeValue":"","childNodeCount":0,"attributes":[]}],"attributes":[],"frameId":"B964E93E0B286A4AE028430612945420"}],"documentURL":"","baseURL":"about:blank","xmlVersion":""}}} +[1531863205.173][DEBUG]: WebSocket::OnReadDuringOpen {"id":3,"result":{}} +[1531863205.173][DEBUG]: WebSocket::OnReadDuringOpen {"id":4,"result":{}} +[1531863205.173][DEBUG]: WebSocket::OnReadDuringOpen {"id":5,"result":{}} +[1531863205.174][DEBUG]: DEVTOOLS RESPONSE DOM.getDocument (id=2) { + "root": { + "backendNodeId": 1, + "baseURL": "about:blank", + "childNodeCount": 1, + "children": [ { + "attributes": [ ], + "backendNodeId": 2, + "childNodeCount": 2, + "children": [ { + "attributes": [ ], + "backendNodeId": 3, + "childNodeCount": 0, + "localName": "head", + "nodeId": 3, + "nodeName": "HEAD", + "nodeType": 1, + "nodeValue": "", + "parentId": 2 + }, { + "attributes": [ ], + "backendNodeId": 4, + "childNodeCount": 0, + "localName": "body", + "nodeId": 4, + "nodeName": "BODY", + "nodeType": 1, + "nodeValue": "", + "parentId": 2 + } ], + "frameId": "B964E93E0B286A4AE028430612945420", + "localName": "html", + "nodeId": 2, + "nodeName": "HTML", + "nodeType": 1, + "nodeValue": "", + "parentId": 1 + } ], + "documentURL": "", + "localName": "", + "nodeId": 1, + "nodeName": "#document", + "nodeType": 9, + "nodeValue": "", + "xmlVersion": "" + } +} +[1531863205.174][DEBUG]: DEVTOOLS RESPONSE Target.setAutoAttach (id=3) { + +} +[1531863205.174][DEBUG]: DEVTOOLS RESPONSE Page.enable (id=4) { + +} +[1531863205.174][DEBUG]: DEVTOOLS RESPONSE Page.enable (id=5) { + +} +[1531863205.174][DEBUG]: DEVTOOLS COMMAND Runtime.enable (id=6) { + +} +[1531863205.174][DEBUG]: WebSocket::Send {"id":6,"method":"Runtime.enable","params":{}} +[1531863205.230][DEBUG]: WebSocket::OnReadDuringOpen {"method":"Page.frameNavigated","params":{"frame":{"id":"B964E93E0B286A4AE028430612945420","loaderId":"31089E9BDC5890B0B84C9E1F532E4C92","url":"data:,","securityOrigin":"://","mimeType":"text/plain"}}} +[1531863205.230][DEBUG]: WebSocket::OnReadDuringOpen {"method":"DOM.documentUpdated","params":{}} +[1531863205.231][DEBUG]: WebSocket::OnReadDuringOpen {"method":"Page.loadEventFired","params":{"timestamp":704990.515395}} +[1531863205.231][DEBUG]: WebSocket::OnReadDuringOpen {"method":"Page.frameStoppedLoading","params":{"frameId":"B964E93E0B286A4AE028430612945420"}} +[1531863205.231][DEBUG]: WebSocket::OnReadDuringOpen {"method":"DOM.documentUpdated","params":{}} +[1531863205.231][DEBUG]: WebSocket::OnReadDuringOpen {"method":"Page.domContentEventFired","params":{"timestamp":704990.518346}} +[1531863205.231][DEBUG]: DEVTOOLS EVENT Page.frameNavigated { + "frame": { + "id": "B964E93E0B286A4AE028430612945420", + "loaderId": "31089E9BDC5890B0B84C9E1F532E4C92", + "mimeType": "text/plain", + "securityOrigin": "://", + "url": "data:," + } +} +[1531863205.231][DEBUG]: DEVTOOLS EVENT DOM.documentUpdated { + +} +[1531863205.231][DEBUG]: DEVTOOLS COMMAND DOM.getDocument (id=7) { + +} +[1531863205.231][DEBUG]: WebSocket::Send {"id":7,"method":"DOM.getDocument","params":{}} +[1531863205.232][DEBUG]: DEVTOOLS EVENT Page.loadEventFired { + "timestamp": 704990.515395 +} +[1531863205.232][DEBUG]: DEVTOOLS EVENT Page.frameStoppedLoading { + "frameId": "B964E93E0B286A4AE028430612945420" +} +[1531863205.232][DEBUG]: DEVTOOLS EVENT DOM.documentUpdated { + +} +[1531863205.232][DEBUG]: DEVTOOLS COMMAND DOM.getDocument (id=8) { + +} +[1531863205.232][DEBUG]: WebSocket::Send {"id":8,"method":"DOM.getDocument","params":{}} +[1531863205.232][DEBUG]: DEVTOOLS EVENT Page.domContentEventFired { + "timestamp": 704990.518346 +} +[1531863205.246][DEBUG]: WebSocket::OnReadDuringOpen {"method":"Page.frameResized","params":{}} +[1531863205.246][DEBUG]: DEVTOOLS EVENT Page.frameResized { + +} +[1531863205.246][DEBUG]: WebSocket::OnReadDuringOpen {"method":"Runtime.executionContextCreated","params":{"context":{"id":1,"origin":"://","name":"","auxData":{"isDefault":true,"frameId":"B964E93E0B286A4AE028430612945420"}}}} +[1531863205.246][DEBUG]: WebSocket::OnReadDuringOpen {"id":6,"result":{}} +[1531863205.247][DEBUG]: DEVTOOLS EVENT Runtime.executionContextCreated { + "context": { + "auxData": { + "frameId": "B964E93E0B286A4AE028430612945420", + "isDefault": true + }, + "id": 1, + "name": "", + "origin": "://" + } +} +[1531863205.247][DEBUG]: DEVTOOLS RESPONSE Runtime.enable (id=6) { + +} +[1531863205.251][DEBUG]: WebSocket::OnReadDuringOpen {"id":7,"result":{"root":{"nodeId":5,"backendNodeId":5,"nodeType":9,"nodeName":"#document","localName":"","nodeValue":"","childNodeCount":1,"children":[{"nodeId":6,"parentId":5,"backendNodeId":6,"nodeType":1,"nodeName":"HTML","localName":"html","nodeValue":"","childNodeCount":2,"children":[{"nodeId":7,"parentId":6,"backendNodeId":7,"nodeType":1,"nodeName":"HEAD","localName":"head","nodeValue":"","childNodeCount":0,"attributes":[]},{"nodeId":8,"parentId":6,"backendNodeId":8,"nodeType":1,"nodeName":"BODY","localName":"body","nodeValue":"","childNodeCount":0,"attributes":[]}],"attributes":[],"frameId":"B964E93E0B286A4AE028430612945420"}],"documentURL":"data:,","baseURL":"data:,","xmlVersion":""}}} +[1531863205.252][DEBUG]: DEVTOOLS RESPONSE DOM.getDocument (id=7) { + "root": { + "backendNodeId": 5, + "baseURL": "data:,", + "childNodeCount": 1, + "children": [ { + "attributes": [ ], + "backendNodeId": 6, + "childNodeCount": 2, + "children": [ { + "attributes": [ ], + "backendNodeId": 7, + "childNodeCount": 0, + "localName": "head", + "nodeId": 7, + "nodeName": "HEAD", + "nodeType": 1, + "nodeValue": "", + "parentId": 6 + }, { + "attributes": [ ], + "backendNodeId": 8, + "childNodeCount": 0, + "localName": "body", + "nodeId": 8, + "nodeName": "BODY", + "nodeType": 1, + "nodeValue": "", + "parentId": 6 + } ], + "frameId": "B964E93E0B286A4AE028430612945420", + "localName": "html", + "nodeId": 6, + "nodeName": "HTML", + "nodeType": 1, + "nodeValue": "", + "parentId": 5 + } ], + "documentURL": "data:,", + "localName": "", + "nodeId": 5, + "nodeName": "#document", + "nodeType": 9, + "nodeValue": "", + "xmlVersion": "" + } +} +[1531863205.253][DEBUG]: WebSocket::OnReadDuringOpen {"id":8,"result":{"root":{"nodeId":9,"backendNodeId":5,"nodeType":9,"nodeName":"#document","localName":"","nodeValue":"","childNodeCount":1,"children":[{"nodeId":10,"parentId":9,"backendNodeId":6,"nodeType":1,"nodeName":"HTML","localName":"html","nodeValue":"","childNodeCount":2,"children":[{"nodeId":11,"parentId":10,"backendNodeId":7,"nodeType":1,"nodeName":"HEAD","localName":"head","nodeValue":"","childNodeCount":0,"attributes":[]},{"nodeId":12,"parentId":10,"backendNodeId":8,"nodeType":1,"nodeName":"BODY","localName":"body","nodeValue":"","childNodeCount":0,"attributes":[]}],"attributes":[],"frameId":"B964E93E0B286A4AE028430612945420"}],"documentURL":"data:,","baseURL":"data:,","xmlVersion":""}}} +[1531863205.254][DEBUG]: DEVTOOLS RESPONSE DOM.getDocument (id=8) { + "root": { + "backendNodeId": 5, + "baseURL": "data:,", + "childNodeCount": 1, + "children": [ { + "attributes": [ ], + "backendNodeId": 6, + "childNodeCount": 2, + "children": [ { + "attributes": [ ], + "backendNodeId": 7, + "childNodeCount": 0, + "localName": "head", + "nodeId": 11, + "nodeName": "HEAD", + "nodeType": 1, + "nodeValue": "", + "parentId": 10 + }, { + "attributes": [ ], + "backendNodeId": 8, + "childNodeCount": 0, + "localName": "body", + "nodeId": 12, + "nodeName": "BODY", + "nodeType": 1, + "nodeValue": "", + "parentId": 10 + } ], + "frameId": "B964E93E0B286A4AE028430612945420", + "localName": "html", + "nodeId": 10, + "nodeName": "HTML", + "nodeType": 1, + "nodeValue": "", + "parentId": 9 + } ], + "documentURL": "data:,", + "localName": "", + "nodeId": 9, + "nodeName": "#document", + "nodeType": 9, + "nodeValue": "", + "xmlVersion": "" + } +} +[1531863205.254][DEBUG]: DEVTOOLS COMMAND Page.enable (id=9) { + +} +[1531863205.254][DEBUG]: WebSocket::Send {"id":9,"method":"Page.enable","params":{}} +[1531863205.296][DEBUG]: WebSocket::OnReadDuringOpen {"id":9,"result":{}} +[1531863205.296][DEBUG]: DEVTOOLS RESPONSE Page.enable (id=9) { + +} +[1531863205.297][DEBUG]: DEVTOOLS COMMAND Runtime.enable (id=10) { + +} +[1531863205.297][DEBUG]: WebSocket::Send {"id":10,"method":"Runtime.enable","params":{}} +[1531863205.303][DEBUG]: WebSocket::OnReadDuringOpen {"id":10,"result":{}} +[1531863205.303][DEBUG]: DEVTOOLS RESPONSE Runtime.enable (id=10) { + +} +[1531863205.304][DEBUG]: DEVTOOLS COMMAND Runtime.evaluate (id=11) { + "expression": "(function() { // Copyright (c) 2012 The Chromium Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style license that can be\n// found in the LICENSE file.\n\n/**\n * Enum f...", + "returnByValue": true +} +[1531863205.304][DEBUG]: WebSocket::Send {"id":11,"method":"Runtime.evaluate","params":{"expression":"(function() { // Copyright (c) 2012 The Chromium Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style license that can be\n// found in the LICENSE file.\n\n/**\n * Enum for WebDriver status codes.\n * @enum {number}\n */\nvar StatusCode = {\n STALE_ELEMENT_REFERENCE: 10,\n UNKNOWN_ERROR: 13,\n};\n\n/**\n * Enum for node types.\n * @enum {number}\n */\nvar NodeType = {\n ELEMENT: 1,\n DOCUMENT: 9,\n};\n\n/**\n * Dictionary key to use for holding an element ID.\n * @const\n * @type {string}\n */\nvar ELEMENT_KEY = 'ELEMENT';\n\n/**\n * True if using W3C Element references.\n * @const\n * @type {boolean}\n */\nvar w3cEnabled = false;\n\n/**\n * True if shadow dom is enabled.\n * @const\n * @type {boolean}\n */\nvar SHADOW_DOM_ENABLED = typeof ShadowRoot === 'function';\n\n/**\n * Generates a unique ID to identify an element.\n * @void\n * @return {string} Randomly generated ID.\n */\nfunction generateUUID() {\n var array = new Uint8Array(16);\n window.crypto.getRandomValues(array);\n array[6] = 0x40 | (array[6] & 0x0f);\n array[8] = 0x80 | (array[8] & 0x3f);\n\n var UUID = \"\";\n for (var i = 0; i \u003C 16; i++) {\n var temp = array[i].toString(16);\n if (temp.length \u003C 2)\n temp = \"0\" + temp;\n UUID += temp;\n if (i == 3 || i == 5 || i == 7 || i == 9)\n UUID += \"-\";\n }\n return UUID;\n};\n\n/**\n * A cache which maps IDs \u003C-> cached objects for the purpose of identifying\n * a script object remotely. Uses UUIDs for identification.\n * @constructor\n */\nfunction CacheWithUUID() {\n this.cache_ = {};\n}\n\nCacheWithUUID.prototype = {\n /**\n * Stores a given item in the cache and returns a unique UUID.\n *\n * @param {!Object} item The item to store in the cache.\n * @return {number} The UUID for the cached item.\n */\n storeItem: function(item) {\n for (var i in this.cache_) {\n if (item == this.cache_[i])\n return i;\n }\n var id = generateUUID();\n this.cache_[id] = item;\n return id;\n },\n\n /**\n * Retrieves the cached object for the given ID.\n *\n * @param {number} id The ID for the cached item to retrieve.\n * @return {!Object} The retrieved item.\n */\n retrieveItem: function(id) {\n var item = this.cache_[id];\n if (item)\n return item;\n var error = new Error('not in cache');\n error.code = StatusCode.STALE_ELEMENT_REFERENCE;\n error.message = 'element is not attached to the page document';\n throw error;\n },\n\n /**\n * Clears stale items from the cache.\n */\n clearStale: function() {\n for (var id in this.cache_) {\n var node = this.cache_[id];\n if (!this.isNodeReachable_(node))\n delete this.cache_[id];\n }\n },\n\n /**\n * @private\n * @param {!Node} node The node to check.\n * @return {boolean} If the nodes is reachable.\n */\n isNodeReachable_: function(node) {\n var nodeRoot = getNodeRootThroughAnyShadows(node);\n return (nodeRoot == document);\n }\n\n\n};\n\n/**\n * A cache which maps IDs \u003C-> cached objects for the purpose of identifying\n * a script object remotely.\n * @constructor\n */\nfunction Cache() {\n this.cache_ = {};\n this.nextId_ = 1;\n this.idPrefix_ = Math.random().toString();\n}\n\nCache.prototype = {\n\n /**\n * Stores a given item in the cache and returns a unique ID.\n *\n * @param {!Object} item The item to store in the cache.\n * @return {number} The ID for the cached item.\n */\n storeItem: function(item) {\n for (var i in this.cache_) {\n if (item == this.cache_[i])\n return i;\n }\n var id = this.idPrefix_ + '-' + this.nextId_;\n this.cache_[id] = item;\n this.nextId_++;\n return id;\n },\n\n /**\n * Retrieves the cached object for the given ID.\n *\n * @param {number} id The ID for the cached item to retrieve.\n * @return {!Object} The retrieved item.\n */\n retrieveItem: function(id) {\n var item = this.cache_[id];\n if (item)\n return item;\n var error = new Error('not in cache');\n error.code = StatusCode.STALE_ELEMENT_REFERENCE;\n error.message = 'element is not attached to the page document';\n throw error;\n },\n\n /**\n * Clears stale items from the cache.\n */\n clearStale: function() {\n for (var id in this.cache_) {\n var node = this.cache_[id];\n if (!this.isNodeReachable_(node))\n delete this.cache_[id];\n }\n },\n\n /**\n * @private\n * @param {!Node} node The node to check.\n * @return {boolean} If the nodes is reachable.\n */\n isNodeReachable_: function(node) {\n var nodeRoot = getNodeRootThroughAnyShadows(node);\n return (nodeRoot == document);\n }\n};\n\n/**\n * Returns the root element of the node. Found by traversing parentNodes until\n * a node with no parent is found. This node is considered the root.\n * @param {?Node} node The node to find the root element for.\n * @return {?Node} The root node.\n */\nfunction getNodeRoot(node) {\n while (node && node.parentNode) {\n node = node.parentNode;\n }\n return node;\n}\n\n/**\n * Returns the root element of the node, jumping up through shadow roots if\n * any are found.\n */\nfunction getNodeRootThroughAnyShadows(node) {\n var root = getNodeRoot(node);\n while (SHADOW_DOM_ENABLED && root instanceof ShadowRoot) {\n root = getNodeRoot(root.host);\n }\n return root;\n}\n\n/**\n * Returns the global object cache for the page.\n * @param {Document=} opt_doc The document whose cache to retrieve. Defaults to\n * the current document.\n * @return {!Cache} The page's object cache.\n */\nfunction getPageCache(opt_doc, opt_w3c) {\n var doc = opt_doc || document;\n var w3c = opt_w3c || false;\n var key = '$cdc_asdjflasutopfhvcZLmcfl_';\n if (w3c) {\n if (!(key in doc))\n doc[key] = new CacheWithUUID();\n return doc[key];\n } else {\n if (!(key in doc))\n doc[key] = new Cache();\n return doc[key];\n }\n}\n\n/**\n * Wraps the given value to be transmitted remotely by converting\n * appropriate objects to cached object IDs.\n *\n * @param {*} value The value to wrap.\n * @return {*} The wrapped value.\n */\nfunction wrap(value) {\n // As of crrev.com/1316933002, typeof() for some elements will return\n // 'function', not 'object'. So we need to check for both non-null objects, as\n // well Elements that also happen to be callable functions (e.g. \u003Cembed> and\n // \u003Cobject> elements). Note that we can not use |value instanceof Object| here\n // since this does not work with frames/iframes, for example\n // frames[0].document.body instanceof Object == false even though\n // typeof(frames[0].document.body) == 'object'.\n if ((typeof(value) == 'object' && value != null) ||\n (typeof(value) == 'function' && value.nodeName &&\n value.nodeType == NodeType.ELEMENT)) {\n var nodeType = value['nodeType'];\n if (nodeType == NodeType.ELEMENT || nodeType == NodeType.DOCUMENT\n || (SHADOW_DOM_ENABLED && value instanceof ShadowRoot)) {\n var wrapped = {};\n var root = getNodeRootThroughAnyShadows(value);\n wrapped[ELEMENT_KEY] = getPageCache(root, w3cEnabled).storeItem(value);\n return wrapped;\n }\n\n var obj;\n if (typeof(value.length) == 'number') {\n obj = [];\n for (var i = 0; i \u003C value.length; i++)\n obj[i] = wrap(value[i]);\n } else {\n obj = {};\n for (var prop in value)\n obj[prop] = wrap(value[prop]);\n }\n return obj;\n }\n return value;\n}\n\n/**\n * Unwraps the given value by converting from object IDs to the cached\n * objects.\n *\n * @param {*} value The value to unwrap.\n * @param {Cache} cache The cache to retrieve wrapped elements from.\n * @return {*} The unwrapped value.\n */\nfunction unwrap(value, cache) {\n if (typeof(value) == 'object' && value != null) {\n if (ELEMENT_KEY in value)\n return cache.retrieveItem(value[ELEMENT_KEY]);\n\n var obj;\n if (typeof(value.length) == 'number') {\n obj = [];\n for (var i = 0; i \u003C value.length; i++)\n obj[i] = unwrap(value[i], cache);\n } else {\n obj = {};\n for (var prop in value)\n obj[prop] = unwrap(value[prop], cache);\n }\n return obj;\n }\n return value;\n}\n\n/**\n * Calls a given function and returns its value.\n *\n * The inputs to and outputs of the function will be unwrapped and wrapped\n * respectively, unless otherwise specified. This wrapping involves converting\n * between cached object reference IDs and actual JS objects. The cache will\n * automatically be pruned each call to remove stale references.\n *\n * @param {Array\u003Cstring>} shadowHostIds The host ids of the nested shadow\n * DOMs the function should be executed in the context of.\n * @param {function(...[*]) : *} func The function to invoke.\n * @param {!Array\u003C*>} args The array of arguments to supply to the function,\n * which will be unwrapped before invoking the function.\n * @param {boolean} w3c Whether to return a W3C compliant element reference.\n * @param {boolean=} opt_unwrappedReturn Whether the function's return value\n * should be left unwrapped.\n * @return {*} An object containing a status and value property, where status\n * is a WebDriver status code and value is the wrapped value. If an\n * unwrapped return was specified, this will be the function's pure return\n * value.\n */\nfunction callFunction(shadowHostIds, func, args, w3c, opt_unwrappedReturn) {\n if (w3c) {\n w3cEnabled = true;\n ELEMENT_KEY = 'element-6066-11e4-a52e-4f735466cecf';\n\n }\n var cache = getPageCache(null, w3cEnabled);\n cache.clearStale();\n if (shadowHostIds && SHADOW_DOM_ENABLED) {\n for (var i = 0; i \u003C shadowHostIds.length; i++) {\n var host = cache.retrieveItem(shadowHostIds[i]);\n // TODO(zachconrad): Use the olderShadowRoot API when available to check\n // all of the shadow roots.\n cache = getPageCache(host.webkitShadowRoot, w3cEnabled);\n cache.clearStale();\n }\n }\n\n if (opt_unwrappedReturn)\n return func.apply(null, unwrap(args, cache));\n\n var status = 0;\n try {\n var returnValue = wrap(func.apply(null, unwrap(args, cache)));\n } catch (error) {\n status = error.code || StatusCode.UNKNOWN_ERROR;\n var returnValue = error.message;\n }\n return {\n status: status,\n value: returnValue\n }\n}\n; return callFunction.apply(null, arguments) }\n).apply(null, [null, function(s) { return 1; }, [], false])","returnByValue":true}} +[1531863205.337][DEBUG]: WebSocket::OnReadDuringOpen {"id":11,"result":{"result":{"type":"object","value":{"status":0,"value":1}}}} +[1531863205.337][DEBUG]: DEVTOOLS RESPONSE Runtime.evaluate (id=11) { + "result": { + "type": "object", + "value": { + "status": 0, + "value": 1 + } + } +} +[1531863205.337][INFO]: [0f6b4c103433f5fcb203e99eda4df358] RESPONSE InitSession { + "acceptInsecureCerts": false, + "acceptSslCerts": false, + "applicationCacheEnabled": false, + "browserConnectionEnabled": false, + "browserName": "chrome", + "chrome": { + "chromedriverVersion": "2.40 (f4699e1107eca6e847cd7117cfe51619863b23e3)", + "userDataDir": "/tmp/.org.chromium.Chromium.V87nZY" + }, + "cssSelectorsEnabled": true, + "databaseEnabled": false, + "goog:chromeOptions": { + "debuggerAddress": "localhost:33913" + }, + "handlesAlerts": true, + "hasTouchScreen": false, + "javascriptEnabled": true, + "locationContextEnabled": true, + "mobileEmulationEnabled": false, + "nativeEvents": true, + "networkConnectionEnabled": false, + "pageLoadStrategy": "normal", + "platform": "Linux", + "rotatable": false, + "setWindowRect": true, + "takesHeapSnapshot": true, + "takesScreenshot": true, + "unexpectedAlertBehaviour": "", + "version": "69.0.3491.0", + "webStorageEnabled": true +} +[1531863205.339][INFO]: [0f6b4c103433f5fcb203e99eda4df358] COMMAND Navigate { + "url": "http://127.0.0.1:33535/chromedriver/page_test.html" +} +[1531863205.339][INFO]: Waiting for pending navigations... +[1531863205.339][DEBUG]: DEVTOOLS COMMAND Runtime.evaluate (id=12) { + "expression": "1" +} +[1531863205.339][DEBUG]: WebSocket::Send {"id":12,"method":"Runtime.evaluate","params":{"expression":"1"}} +[1531863205.341][DEBUG]: WebSocket::OnReadDuringOpen {"id":12,"result":{"result":{"type":"number","value":1,"description":"1"}}} +[1531863205.341][DEBUG]: DEVTOOLS RESPONSE Runtime.evaluate (id=12) { + "result": { + "description": "1", + "type": "number", + "value": 1 + } +} +[1531863205.341][INFO]: Done waiting for pending navigations. Status: ok +[1531863205.341][DEBUG]: DEVTOOLS COMMAND Page.navigate (id=13) { + "url": "http://127.0.0.1:33535/chromedriver/page_test.html" +} +[1531863205.341][DEBUG]: WebSocket::Send {"id":13,"method":"Page.navigate","params":{"url":"http://127.0.0.1:33535/chromedriver/page_test.html"}} +[1531863205.660][DEBUG]: WebSocket::OnReadDuringOpen {"id":13,"result":{"frameId":"B964E93E0B286A4AE028430612945420","loaderId":"69C61E868BE89B10BD586FD138460DD6"}} +[1531863205.661][DEBUG]: DEVTOOLS RESPONSE Page.navigate (id=13) { + "frameId": "B964E93E0B286A4AE028430612945420", + "loaderId": "69C61E868BE89B10BD586FD138460DD6" +} +[1531863205.661][DEBUG]: DEVTOOLS COMMAND Runtime.evaluate (id=14) { + "expression": "document.URL" +} +[1531863205.661][DEBUG]: WebSocket::Send {"id":14,"method":"Runtime.evaluate","params":{"expression":"document.URL"}} +[1531863205.667][DEBUG]: WebSocket::OnReadDuringOpen {"method":"Runtime.executionContextsCleared","params":{}} +[1531863205.667][DEBUG]: DEVTOOLS EVENT Runtime.executionContextsCleared { + +} +[1531863205.683][DEBUG]: WebSocket::OnReadDuringOpen {"method":"Page.frameStartedLoading","params":{"frameId":"B964E93E0B286A4AE028430612945420"}} +[1531863205.683][DEBUG]: DEVTOOLS EVENT Page.frameStartedLoading { + "frameId": "B964E93E0B286A4AE028430612945420" +} +[1531863205.729][DEBUG]: WebSocket::OnReadDuringOpen {"method":"Runtime.executionContextsCleared","params":{}} +[1531863205.729][DEBUG]: WebSocket::OnReadDuringOpen {"method":"Page.frameNavigated","params":{"frame":{"id":"B964E93E0B286A4AE028430612945420","loaderId":"69C61E868BE89B10BD586FD138460DD6","url":"http://127.0.0.1:33535/chromedriver/page_test.html","securityOrigin":"http://127.0.0.1:33535","mimeType":"text/html"}}} +[1531863205.729][DEBUG]: DEVTOOLS EVENT Runtime.executionContextsCleared { + +} +[1531863205.729][DEBUG]: WebSocket::OnReadDuringOpen {"method":"Runtime.executionContextCreated","params":{"context":{"id":1,"origin":"http://127.0.0.1:33535","name":"","auxData":{"isDefault":true,"frameId":"B964E93E0B286A4AE028430612945420"}}}} +[1531863205.729][DEBUG]: DEVTOOLS EVENT Page.frameNavigated { + "frame": { + "id": "B964E93E0B286A4AE028430612945420", + "loaderId": "69C61E868BE89B10BD586FD138460DD6", + "mimeType": "text/html", + "securityOrigin": "http://127.0.0.1:33535", + "url": "http://127.0.0.1:33535/chromedriver/page_test.html" + } +} +[1531863205.729][DEBUG]: WebSocket::OnReadDuringOpen {"method":"DOM.documentUpdated","params":{}} +[1531863205.730][DEBUG]: DEVTOOLS EVENT Runtime.executionContextCreated { + "context": { + "auxData": { + "frameId": "B964E93E0B286A4AE028430612945420", + "isDefault": true + }, + "id": 1, + "name": "", + "origin": "http://127.0.0.1:33535" + } +} +[1531863205.730][DEBUG]: DEVTOOLS EVENT DOM.documentUpdated { + +} +[1531863205.730][DEBUG]: DEVTOOLS COMMAND DOM.getDocument (id=15) { + +} +[1531863205.730][DEBUG]: WebSocket::Send {"id":15,"method":"DOM.getDocument","params":{}} +[188019:188019:0717/143325.732801:ERROR:render_process_impl.cc(208)] WebFrame LEAKED 1 TIMES +[1531863205.788][DEBUG]: WebSocket::OnReadDuringOpen {"method":"Page.loadEventFired","params":{"timestamp":704991.058432}} +[1531863205.789][DEBUG]: WebSocket::OnReadDuringOpen {"method":"Page.frameStoppedLoading","params":{"frameId":"B964E93E0B286A4AE028430612945420"}} +[1531863205.789][DEBUG]: DEVTOOLS EVENT Page.loadEventFired { + "timestamp": 704991.058432 +} +[1531863205.789][DEBUG]: WebSocket::OnReadDuringOpen {"method":"DOM.documentUpdated","params":{}} +[1531863205.789][DEBUG]: WebSocket::OnReadDuringOpen {"method":"Page.domContentEventFired","params":{"timestamp":704991.085351}} +[1531863205.789][DEBUG]: WebSocket::OnReadDuringOpen {"id":14,"result":{"result":{"type":"string","value":"http://127.0.0.1:33535/chromedriver/page_test.html"}}} +[1531863205.789][DEBUG]: DEVTOOLS EVENT Page.frameStoppedLoading { + "frameId": "B964E93E0B286A4AE028430612945420" +} +[1531863205.789][DEBUG]: DEVTOOLS EVENT DOM.documentUpdated { + +} +[1531863205.789][DEBUG]: DEVTOOLS COMMAND DOM.getDocument (id=16) { + +} +[1531863205.789][DEBUG]: WebSocket::Send {"id":16,"method":"DOM.getDocument","params":{}} +[1531863205.789][DEBUG]: DEVTOOLS EVENT Page.domContentEventFired { + "timestamp": 704991.085351 +} +[1531863205.789][DEBUG]: DEVTOOLS RESPONSE Runtime.evaluate (id=14) { + "result": { + "type": "string", + "value": "http://127.0.0.1:33535/chromedriver/page_test.html" + } +} +[1531863205.793][DEBUG]: WebSocket::OnReadDuringOpen {"id":15,"result":{"root":{"nodeId":1,"backendNodeId":1,"nodeType":9,"nodeName":"#document","localName":"","nodeValue":"","childNodeCount":1,"children":[{"nodeId":2,"parentId":1,"backendNodeId":2,"nodeType":1,"nodeName":"HTML","localName":"html","nodeValue":"","childNodeCount":2,"children":[{"nodeId":3,"parentId":2,"backendNodeId":3,"nodeType":1,"nodeName":"HEAD","localName":"head","nodeValue":"","childNodeCount":2,"attributes":[]},{"nodeId":4,"parentId":2,"backendNodeId":4,"nodeType":1,"nodeName":"BODY","localName":"body","nodeValue":"","childNodeCount":1,"attributes":[]}],"attributes":[],"frameId":"B964E93E0B286A4AE028430612945420"}],"documentURL":"http://127.0.0.1:33535/chromedriver/page_test.html","baseURL":"http://127.0.0.1:33535/chromedriver/page_test.html","xmlVersion":""}}} +[1531863205.793][DEBUG]: DEVTOOLS RESPONSE DOM.getDocument (id=15) { + "root": { + "backendNodeId": 1, + "baseURL": "http://127.0.0.1:33535/chromedriver/page_test.html", + "childNodeCount": 1, + "children": [ { + "attributes": [ ], + "backendNodeId": 2, + "childNodeCount": 2, + "children": [ { + "attributes": [ ], + "backendNodeId": 3, + "childNodeCount": 2, + "localName": "head", + "nodeId": 3, + "nodeName": "HEAD", + "nodeType": 1, + "nodeValue": "", + "parentId": 2 + }, { + "attributes": [ ], + "backendNodeId": 4, + "childNodeCount": 1, + "localName": "body", + "nodeId": 4, + "nodeName": "BODY", + "nodeType": 1, + "nodeValue": "", + "parentId": 2 + } ], + "frameId": "B964E93E0B286A4AE028430612945420", + "localName": "html", + "nodeId": 2, + "nodeName": "HTML", + "nodeType": 1, + "nodeValue": "", + "parentId": 1 + } ], + "documentURL": "http://127.0.0.1:33535/chromedriver/page_test.html", + "localName": "", + "nodeId": 1, + "nodeName": "#document", + "nodeType": 9, + "nodeValue": "", + "xmlVersion": "" + } +} +[1531863205.797][DEBUG]: WebSocket::OnReadDuringOpen {"id":16,"result":{"root":{"nodeId":5,"backendNodeId":1,"nodeType":9,"nodeName":"#document","localName":"","nodeValue":"","childNodeCount":1,"children":[{"nodeId":6,"parentId":5,"backendNodeId":2,"nodeType":1,"nodeName":"HTML","localName":"html","nodeValue":"","childNodeCount":2,"children":[{"nodeId":7,"parentId":6,"backendNodeId":3,"nodeType":1,"nodeName":"HEAD","localName":"head","nodeValue":"","childNodeCount":2,"attributes":[]},{"nodeId":8,"parentId":6,"backendNodeId":4,"nodeType":1,"nodeName":"BODY","localName":"body","nodeValue":"","childNodeCount":1,"attributes":[]}],"attributes":[],"frameId":"B964E93E0B286A4AE028430612945420"}],"documentURL":"http://127.0.0.1:33535/chromedriver/page_test.html","baseURL":"http://127.0.0.1:33535/chromedriver/page_test.html","xmlVersion":""}}} +[1531863205.797][DEBUG]: DEVTOOLS RESPONSE DOM.getDocument (id=16) { + "root": { + "backendNodeId": 1, + "baseURL": "http://127.0.0.1:33535/chromedriver/page_test.html", + "childNodeCount": 1, + "children": [ { + "attributes": [ ], + "backendNodeId": 2, + "childNodeCount": 2, + "children": [ { + "attributes": [ ], + "backendNodeId": 3, + "childNodeCount": 2, + "localName": "head", + "nodeId": 7, + "nodeName": "HEAD", + "nodeType": 1, + "nodeValue": "", + "parentId": 6 + }, { + "attributes": [ ], + "backendNodeId": 4, + "childNodeCount": 1, + "localName": "body", + "nodeId": 8, + "nodeName": "BODY", + "nodeType": 1, + "nodeValue": "", + "parentId": 6 + } ], + "frameId": "B964E93E0B286A4AE028430612945420", + "localName": "html", + "nodeId": 6, + "nodeName": "HTML", + "nodeType": 1, + "nodeValue": "", + "parentId": 5 + } ], + "documentURL": "http://127.0.0.1:33535/chromedriver/page_test.html", + "localName": "", + "nodeId": 5, + "nodeName": "#document", + "nodeType": 9, + "nodeValue": "", + "xmlVersion": "" + } +} +[1531863205.797][INFO]: Waiting for pending navigations... +[1531863205.798][DEBUG]: DEVTOOLS COMMAND Runtime.evaluate (id=17) { + "expression": "1" +} +[1531863205.798][DEBUG]: WebSocket::Send {"id":17,"method":"Runtime.evaluate","params":{"expression":"1"}} +[1531863205.800][DEBUG]: WebSocket::OnReadDuringOpen {"id":17,"result":{"result":{"type":"number","value":1,"description":"1"}}} +[1531863205.800][DEBUG]: DEVTOOLS RESPONSE Runtime.evaluate (id=17) { + "result": { + "description": "1", + "type": "number", + "value": 1 + } +} +[1531863205.800][INFO]: Done waiting for pending navigations. Status: ok +[1531863205.800][INFO]: [0f6b4c103433f5fcb203e99eda4df358] RESPONSE Navigate +[1531863205.803][DEBUG]: WebSocket::OnReadDuringOpen {"method":"Log.entryAdded","params":{"entry":{"source":"network","level":"error","text":"Failed to load resource: the server responded with a status of 404 (Not Found)","timestamp":1531863205800.79,"url":"http://127.0.0.1:33535/favicon.ico","networkRequestId":"1000188058.2"}}} +[1531863205.803][INFO]: [0f6b4c103433f5fcb203e99eda4df358] COMMAND SendCommandAndGetResult { + "cmd": "DOM.getDocument", + "params": { + + } +} +[1531863205.803][DEBUG]: DEVTOOLS EVENT Log.entryAdded { + "entry": { + "level": "error", + "networkRequestId": "1000188058.2", + "source": "network", + "text": "Failed to load resource: the server responded with a status of 404 (Not Found)", + "timestamp": 1531863205800.79, + "url": "http://127.0.0.1:33535/favicon.ico" + } +} +[1531863205.803][INFO]: Waiting for pending navigations... +[1531863205.803][DEBUG]: DEVTOOLS COMMAND Runtime.evaluate (id=18) { + "expression": "1" +} +[1531863205.803][DEBUG]: WebSocket::Send {"id":18,"method":"Runtime.evaluate","params":{"expression":"1"}} +[1531863205.805][DEBUG]: WebSocket::OnReadDuringOpen {"id":18,"result":{"result":{"type":"number","value":1,"description":"1"}}} +[1531863205.805][DEBUG]: DEVTOOLS RESPONSE Runtime.evaluate (id=18) { + "result": { + "description": "1", + "type": "number", + "value": 1 + } +} +[1531863205.805][INFO]: Done waiting for pending navigations. Status: ok +[1531863205.805][DEBUG]: DEVTOOLS COMMAND DOM.getDocument (id=19) { + +} +[1531863205.805][DEBUG]: WebSocket::Send {"id":19,"method":"DOM.getDocument","params":{}} +[1531863205.806][DEBUG]: WebSocket::OnReadDuringOpen {"id":19,"result":{"root":{"nodeId":9,"backendNodeId":1,"nodeType":9,"nodeName":"#document","localName":"","nodeValue":"","childNodeCount":1,"children":[{"nodeId":10,"parentId":9,"backendNodeId":2,"nodeType":1,"nodeName":"HTML","localName":"html","nodeValue":"","childNodeCount":2,"children":[{"nodeId":11,"parentId":10,"backendNodeId":3,"nodeType":1,"nodeName":"HEAD","localName":"head","nodeValue":"","childNodeCount":2,"attributes":[]},{"nodeId":12,"parentId":10,"backendNodeId":4,"nodeType":1,"nodeName":"BODY","localName":"body","nodeValue":"","childNodeCount":1,"attributes":[]}],"attributes":[],"frameId":"B964E93E0B286A4AE028430612945420"}],"documentURL":"http://127.0.0.1:33535/chromedriver/page_test.html","baseURL":"http://127.0.0.1:33535/chromedriver/page_test.html","xmlVersion":""}}} +[1531863205.807][DEBUG]: DEVTOOLS RESPONSE DOM.getDocument (id=19) { + "root": { + "backendNodeId": 1, + "baseURL": "http://127.0.0.1:33535/chromedriver/page_test.html", + "childNodeCount": 1, + "children": [ { + "attributes": [ ], + "backendNodeId": 2, + "childNodeCount": 2, + "children": [ { + "attributes": [ ], + "backendNodeId": 3, + "childNodeCount": 2, + "localName": "head", + "nodeId": 11, + "nodeName": "HEAD", + "nodeType": 1, + "nodeValue": "", + "parentId": 10 + }, { + "attributes": [ ], + "backendNodeId": 4, + "childNodeCount": 1, + "localName": "body", + "nodeId": 12, + "nodeName": "BODY", + "nodeType": 1, + "nodeValue": "", + "parentId": 10 + } ], + "frameId": "B964E93E0B286A4AE028430612945420", + "localName": "html", + "nodeId": 10, + "nodeName": "HTML", + "nodeType": 1, + "nodeValue": "", + "parentId": 9 + } ], + "documentURL": "http://127.0.0.1:33535/chromedriver/page_test.html", + "localName": "", + "nodeId": 9, + "nodeName": "#document", + "nodeType": 9, + "nodeValue": "", + "xmlVersion": "" + } +} +[1531863205.807][INFO]: Waiting for pending navigations... +[1531863205.807][DEBUG]: DEVTOOLS COMMAND Runtime.evaluate (id=20) { + "expression": "1" +} +[1531863205.807][DEBUG]: WebSocket::Send {"id":20,"method":"Runtime.evaluate","params":{"expression":"1"}} +[1531863205.833][DEBUG]: WebSocket::OnReadDuringOpen {"id":20,"result":{"result":{"type":"number","value":1,"description":"1"}}} +[1531863205.834][DEBUG]: DEVTOOLS RESPONSE Runtime.evaluate (id=20) { + "result": { + "description": "1", + "type": "number", + "value": 1 + } +} +[1531863205.834][INFO]: Done waiting for pending navigations. Status: ok +[1531863205.834][INFO]: [0f6b4c103433f5fcb203e99eda4df358] RESPONSE SendCommandAndGetResult { + "root": { + "backendNodeId": 1, + "baseURL": "http://127.0.0.1:33535/chromedriver/page_test.html", + "childNodeCount": 1, + "children": [ { + "attributes": [ ], + "backendNodeId": 2, + "childNodeCount": 2, + "children": [ { + "attributes": [ ], + "backendNodeId": 3, + "childNodeCount": 2, + "localName": "head", + "nodeId": 11, + "nodeName": "HEAD", + "nodeType": 1, + "nodeValue": "", + "parentId": 10 + }, { + "attributes": [ ], + "backendNodeId": 4, + "childNodeCount": 1, + "localName": "body", + "nodeId": 12, + "nodeName": "BODY", + "nodeType": 1, + "nodeValue": "", + "parentId": 10 + } ], + "frameId": "B964E93E0B286A4AE028430612945420", + "localName": "html", + "nodeId": 10, + "nodeName": "HTML", + "nodeType": 1, + "nodeValue": "", + "parentId": 9 + } ], + "documentURL": "http://127.0.0.1:33535/chromedriver/page_test.html", + "localName": "", + "nodeId": 9, + "nodeName": "#document", + "nodeType": 9, + "nodeValue": "", + "xmlVersion": "" + } +} +[1531863205.835][INFO]: [0f6b4c103433f5fcb203e99eda4df358] COMMAND Quit { + +} +[1531863205.845][DEBUG]: WebSocket::OnRead error OK +[0717/143325.850019:ERROR:nacl_helper_linux.cc(310)] NaCl helper process running without a sandbox! +Most likely you need to configure your SUID sandbox correctly +[1531863205.889][INFO]: [0f6b4c103433f5fcb203e99eda4df358] RESPONSE Quit +[1531863205.889][DEBUG]: Log type 'driver' lost 0 entries on destruction +[1531863205.889][DEBUG]: Log type 'browser' lost 1 entries on destruction +[1531863205.891][INFO]: [9bb38e74d3c9216918ea31596608f757] COMMAND InitSession { + "desiredCapabilities": { + "chromeOptions": { + "args": [ "no-sandbox", "disable-gpu" ], + "binary": "/usr/local/google/home/cwinstanley/chromium/src/out/Default/chrome" + }, + "goog:testName": "__main__.ChromeDriverTest.testSendCommandNoParams", + "loggingPrefs": { + + } + } +} +[1531863205.892][INFO]: Populating Preferences file: { + "alternate_error_pages": { + "enabled": false + }, + "autofill": { + "enabled": false + }, + "browser": { + "check_default_browser": false + }, + "distribution": { + "import_bookmarks": false, + "import_history": false, + "import_search_engine": false, + "make_chrome_default_for_user": false, + "skip_first_run_ui": true + }, + "dns_prefetching": { + "enabled": false + }, + "profile": { + "content_settings": { + "pattern_pairs": { + "https://*,*": { + "media-stream": { + "audio": "Default", + "video": "Default" + } + } + } + }, + "default_content_setting_values": { + "geolocation": 1 + }, + "default_content_settings": { + "geolocation": 1, + "mouselock": 1, + "notifications": 1, + "popups": 1, + "ppapi-broker": 1 + }, + "password_manager_enabled": false + }, + "safebrowsing": { + "enabled": false + }, + "search": { + "suggest_enabled": false + }, + "translate": { + "enabled": false + } +} +[1531863205.893][INFO]: Populating Local State file: { + "background_mode": { + "enabled": false + }, + "ssl": { + "rev_checking": { + "enabled": false + } + } +} +[1531863205.894][INFO]: Launching chrome: /usr/local/google/home/cwinstanley/chromium/src/out/Default/chrome --disable-background-networking --disable-client-side-phishing-detection --disable-default-apps --disable-gpu --disable-hang-monitor --disable-popup-blocking --disable-prompt-on-repost --disable-sync --disable-web-resources --enable-automation --enable-logging --force-fieldtrials=SiteIsolationExtensions/Control --ignore-certificate-errors --load-extension=/tmp/.org.chromium.Chromium.sRpya4/internal --log-level=0 --metrics-recording-only --no-first-run --no-sandbox --password-store=basic --remote-debugging-port=0 --test-type=webdriver --use-mock-keychain --user-data-dir=/tmp/.org.chromium.Chromium.GVvqbY data:, +[188089:188089:0717/143327.653007:ERROR:gpu_process_transport_factory.cc(642)] Switching to software compositing. +[188089:188089:0717/143327.653068:ERROR:gpu_process_transport_factory.cc(1007)] Lost UI shared context. +[188089:188089:0717/143327.726978:WARNING:account_consistency_mode_manager.cc(290)] Desktop Identity Consistency cannot be enabled as no OAuth client ID and client secret have been configured. +[188089:188089:0717/143327.727080:WARNING:account_consistency_mode_manager.cc(290)] Desktop Identity Consistency cannot be enabled as no OAuth client ID and client secret have been configured. +[188089:188089:0717/143327.727125:WARNING:account_consistency_mode_manager.cc(290)] Desktop Identity Consistency cannot be enabled as no OAuth client ID and client secret have been configured. +[188089:188089:0717/143327.727208:WARNING:account_consistency_mode_manager.cc(290)] Desktop Identity Consistency cannot be enabled as no OAuth client ID and client secret have been configured. +[188089:188089:0717/143327.728058:WARNING:account_consistency_mode_manager.cc(290)] Desktop Identity Consistency cannot be enabled as no OAuth client ID and client secret have been configured. +[188089:188089:0717/143327.734448:WARNING:account_consistency_mode_manager.cc(290)] Desktop Identity Consistency cannot be enabled as no OAuth client ID and client secret have been configured. +[188089:188089:0717/143327.779161:WARNING:account_consistency_mode_manager.cc(290)] Desktop Identity Consistency cannot be enabled as no OAuth client ID and client secret have been configured. +[188089:188089:0717/143327.810226:WARNING:account_consistency_mode_manager.cc(290)] Desktop Identity Consistency cannot be enabled as no OAuth client ID and client secret have been configured. +[188089:188089:0717/143327.810299:WARNING:account_consistency_mode_manager.cc(290)] Desktop Identity Consistency cannot be enabled as no OAuth client ID and client secret have been configured. + +DevTools listening on ws://127.0.0.1:46229/devtools/browser/99063c4e-24b4-45a2-8d10-18b0c7427e63 +[1531863207.857][DEBUG]: DevTools request: http://localhost:46229/json/version +[188089:188089:0717/143327.952695:WARNING:password_store_factory.cc(253)] Using basic (unencrypted) store for password storage. See https://chromium.googlesource.com/chromium/src/+/master/docs/linux_password_storage.md for more information about password storage options. +[188089:188089:0717/143327.955357:WARNING:account_consistency_mode_manager.cc(290)] Desktop Identity Consistency cannot be enabled as no OAuth client ID and client secret have been configured. +[1531863208.164][DEBUG]: DevTools response: { + "Browser": "Chrome/69.0.3491.0", + "Protocol-Version": "1.3", + "User-Agent": "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/69.0.3491.0 Safari/537.36", + "V8-Version": "6.9.389", + "WebKit-Version": "537.36 (@410f2c4912d46a5fae2fe6c0b2e24d9eb6359761)", + "webSocketDebuggerUrl": "ws://localhost:46229/devtools/browser/99063c4e-24b4-45a2-8d10-18b0c7427e63" +} + +[1531863208.222][DEBUG]: DevTools request: http://localhost:46229/json +[1531863208.249][DEBUG]: DevTools response: [ { + "description": "", + "devtoolsFrontendUrl": "/devtools/inspector.html?ws=localhost:46229/devtools/page/01B73166752F9101E17A93858A863C07", + "id": "01B73166752F9101E17A93858A863C07", + "title": "Chrome Automation Extension", + "type": "background_page", + "url": "chrome-extension://aapnijgdinlhnhlmodcfapnahmbfebeb/_generated_background_page.html", + "webSocketDebuggerUrl": "ws://localhost:46229/devtools/page/01B73166752F9101E17A93858A863C07" +}, { + "description": "", + "devtoolsFrontendUrl": "/devtools/inspector.html?ws=localhost:46229/devtools/page/D0ECF1006762992B9D81370276F4C62A", + "id": "D0ECF1006762992B9D81370276F4C62A", + "title": "", + "type": "page", + "url": "data:,", + "webSocketDebuggerUrl": "ws://localhost:46229/devtools/page/D0ECF1006762992B9D81370276F4C62A" +} ] + +[1531863208.250][DEBUG]: DevTools request: http://localhost:46229/json +[1531863208.252][DEBUG]: DevTools response: [ { + "description": "", + "devtoolsFrontendUrl": "/devtools/inspector.html?ws=localhost:46229/devtools/page/01B73166752F9101E17A93858A863C07", + "id": "01B73166752F9101E17A93858A863C07", + "title": "Chrome Automation Extension", + "type": "background_page", + "url": "chrome-extension://aapnijgdinlhnhlmodcfapnahmbfebeb/_generated_background_page.html", + "webSocketDebuggerUrl": "ws://localhost:46229/devtools/page/01B73166752F9101E17A93858A863C07" +}, { + "description": "", + "devtoolsFrontendUrl": "/devtools/inspector.html?ws=localhost:46229/devtools/page/D0ECF1006762992B9D81370276F4C62A", + "id": "D0ECF1006762992B9D81370276F4C62A", + "title": "", + "type": "page", + "url": "data:,", + "webSocketDebuggerUrl": "ws://localhost:46229/devtools/page/D0ECF1006762992B9D81370276F4C62A" +} ] + +[1531863208.253][INFO]: resolved localhost to ["::1","127.0.0.1"] +[1531863208.253][DEBUG]: WebSocket::Connect code=ERR_IO_PENDING +[1531863208.253][DEBUG]: WebSocket::OnSocketConnect code=OK +[1531863208.253][DEBUG]: WebSocket::OnSocketConnect handshake +GET /devtools/page/D0ECF1006762992B9D81370276F4C62A HTTP/1.1 +Host: localhost +Upgrade: websocket +Connection: Upgrade +Sec-WebSocket-Key: 1Dx0yRRfcKHPTeRiX0zIzQ== +Sec-WebSocket-Version: 13 +Pragma: no-cache +Cache-Control: no-cache + + +[1531863208.255][DEBUG]: WebSocket::OnReadDuringHandshake +HTTP/1.1 101 WebSocket Protocol Handshake +Upgrade: WebSocket +Connection: Upgrade +Sec-WebSocket-Accept: 1hOfv37TdZcKNMIBQyhiAYTKALE= + + +[1531863208.256][DEBUG]: DEVTOOLS COMMAND Log.enable (id=1) { + +} +[1531863208.256][DEBUG]: WebSocket::Send {"id":1,"method":"Log.enable","params":{}} +[1531863208.256][DEBUG]: DEVTOOLS COMMAND DOM.getDocument (id=2) { + +} +[1531863208.256][DEBUG]: WebSocket::Send {"id":2,"method":"DOM.getDocument","params":{}} +[1531863208.256][DEBUG]: DEVTOOLS COMMAND Target.setAutoAttach (id=3) { + "autoAttach": true, + "waitForDebuggerOnStart": false +} +[1531863208.256][DEBUG]: WebSocket::Send {"id":3,"method":"Target.setAutoAttach","params":{"autoAttach":true,"waitForDebuggerOnStart":false}} +[1531863208.257][DEBUG]: DEVTOOLS COMMAND Page.enable (id=4) { + +} +[1531863208.257][DEBUG]: WebSocket::Send {"id":4,"method":"Page.enable","params":{}} +[1531863208.257][DEBUG]: DEVTOOLS COMMAND Page.enable (id=5) { + +} +[1531863208.257][DEBUG]: WebSocket::Send {"id":5,"method":"Page.enable","params":{}} +[1531863208.304][DEBUG]: WebSocket::OnReadDuringOpen {"id":1,"result":{}} +[1531863208.304][DEBUG]: WebSocket::OnReadDuringOpen {"id":2,"result":{"root":{"nodeId":1,"backendNodeId":1,"nodeType":9,"nodeName":"#document","localName":"","nodeValue":"","childNodeCount":1,"children":[{"nodeId":2,"parentId":1,"backendNodeId":2,"nodeType":1,"nodeName":"HTML","localName":"html","nodeValue":"","childNodeCount":2,"children":[{"nodeId":3,"parentId":2,"backendNodeId":3,"nodeType":1,"nodeName":"HEAD","localName":"head","nodeValue":"","childNodeCount":0,"attributes":[]},{"nodeId":4,"parentId":2,"backendNodeId":4,"nodeType":1,"nodeName":"BODY","localName":"body","nodeValue":"","childNodeCount":0,"attributes":[]}],"attributes":[],"frameId":"D0ECF1006762992B9D81370276F4C62A"}],"documentURL":"","baseURL":"about:blank","xmlVersion":""}}} +[1531863208.304][DEBUG]: DEVTOOLS RESPONSE Log.enable (id=1) { + +} +[1531863208.304][DEBUG]: WebSocket::OnReadDuringOpen {"id":3,"result":{}} +[1531863208.305][DEBUG]: WebSocket::OnReadDuringOpen {"id":4,"result":{}} +[1531863208.305][DEBUG]: WebSocket::OnReadDuringOpen {"id":5,"result":{}} +[1531863208.305][DEBUG]: DEVTOOLS RESPONSE DOM.getDocument (id=2) { + "root": { + "backendNodeId": 1, + "baseURL": "about:blank", + "childNodeCount": 1, + "children": [ { + "attributes": [ ], + "backendNodeId": 2, + "childNodeCount": 2, + "children": [ { + "attributes": [ ], + "backendNodeId": 3, + "childNodeCount": 0, + "localName": "head", + "nodeId": 3, + "nodeName": "HEAD", + "nodeType": 1, + "nodeValue": "", + "parentId": 2 + }, { + "attributes": [ ], + "backendNodeId": 4, + "childNodeCount": 0, + "localName": "body", + "nodeId": 4, + "nodeName": "BODY", + "nodeType": 1, + "nodeValue": "", + "parentId": 2 + } ], + "frameId": "D0ECF1006762992B9D81370276F4C62A", + "localName": "html", + "nodeId": 2, + "nodeName": "HTML", + "nodeType": 1, + "nodeValue": "", + "parentId": 1 + } ], + "documentURL": "", + "localName": "", + "nodeId": 1, + "nodeName": "#document", + "nodeType": 9, + "nodeValue": "", + "xmlVersion": "" + } +} +[1531863208.306][DEBUG]: DEVTOOLS RESPONSE Target.setAutoAttach (id=3) { + +} +[1531863208.306][DEBUG]: DEVTOOLS RESPONSE Page.enable (id=4) { + +} +[1531863208.306][DEBUG]: DEVTOOLS RESPONSE Page.enable (id=5) { + +} +[1531863208.306][DEBUG]: DEVTOOLS COMMAND Runtime.enable (id=6) { + +} +[1531863208.306][DEBUG]: WebSocket::Send {"id":6,"method":"Runtime.enable","params":{}} +[1531863208.378][DEBUG]: WebSocket::OnReadDuringOpen {"method":"Page.frameNavigated","params":{"frame":{"id":"D0ECF1006762992B9D81370276F4C62A","loaderId":"7A5DC3494D348F02608F3CE48656BFCD","url":"data:,","securityOrigin":"://","mimeType":"text/plain"}}} +[1531863208.379][DEBUG]: DEVTOOLS EVENT Page.frameNavigated { + "frame": { + "id": "D0ECF1006762992B9D81370276F4C62A", + "loaderId": "7A5DC3494D348F02608F3CE48656BFCD", + "mimeType": "text/plain", + "securityOrigin": "://", + "url": "data:," + } +} +[1531863208.379][DEBUG]: WebSocket::OnReadDuringOpen {"method":"DOM.documentUpdated","params":{}} +[1531863208.379][DEBUG]: WebSocket::OnReadDuringOpen {"method":"Page.loadEventFired","params":{"timestamp":704993.643267}} +[1531863208.379][DEBUG]: DEVTOOLS EVENT DOM.documentUpdated { + +} +[1531863208.379][DEBUG]: WebSocket::OnReadDuringOpen {"method":"Page.frameStoppedLoading","params":{"frameId":"D0ECF1006762992B9D81370276F4C62A"}} +[1531863208.379][DEBUG]: DEVTOOLS COMMAND DOM.getDocument (id=7) { + +} +[1531863208.379][DEBUG]: WebSocket::OnReadDuringOpen {"method":"DOM.documentUpdated","params":{}} +[1531863208.379][DEBUG]: WebSocket::OnReadDuringOpen {"method":"Page.domContentEventFired","params":{"timestamp":704993.645754}} +[1531863208.379][DEBUG]: WebSocket::Send {"id":7,"method":"DOM.getDocument","params":{}} +[1531863208.379][DEBUG]: DEVTOOLS EVENT Page.loadEventFired { + "timestamp": 704993.643267 +} +[1531863208.380][DEBUG]: DEVTOOLS EVENT Page.frameStoppedLoading { + "frameId": "D0ECF1006762992B9D81370276F4C62A" +} +[1531863208.380][DEBUG]: DEVTOOLS EVENT DOM.documentUpdated { + +} +[1531863208.380][DEBUG]: DEVTOOLS COMMAND DOM.getDocument (id=8) { + +} +[1531863208.380][DEBUG]: WebSocket::Send {"id":8,"method":"DOM.getDocument","params":{}} +[1531863208.380][DEBUG]: DEVTOOLS EVENT Page.domContentEventFired { + "timestamp": 704993.645754 +} +[1531863208.392][DEBUG]: WebSocket::OnReadDuringOpen {"method":"Page.frameResized","params":{}} +[1531863208.392][DEBUG]: DEVTOOLS EVENT Page.frameResized { + +} +[1531863208.394][DEBUG]: WebSocket::OnReadDuringOpen {"method":"Runtime.executionContextCreated","params":{"context":{"id":1,"origin":"://","name":"","auxData":{"isDefault":true,"frameId":"D0ECF1006762992B9D81370276F4C62A"}}}} +[1531863208.394][DEBUG]: WebSocket::OnReadDuringOpen {"id":6,"result":{}} +[1531863208.394][DEBUG]: DEVTOOLS EVENT Runtime.executionContextCreated { + "context": { + "auxData": { + "frameId": "D0ECF1006762992B9D81370276F4C62A", + "isDefault": true + }, + "id": 1, + "name": "", + "origin": "://" + } +} +[1531863208.394][DEBUG]: DEVTOOLS RESPONSE Runtime.enable (id=6) { + +} +[1531863208.400][DEBUG]: WebSocket::OnReadDuringOpen {"id":7,"result":{"root":{"nodeId":5,"backendNodeId":5,"nodeType":9,"nodeName":"#document","localName":"","nodeValue":"","childNodeCount":1,"children":[{"nodeId":6,"parentId":5,"backendNodeId":6,"nodeType":1,"nodeName":"HTML","localName":"html","nodeValue":"","childNodeCount":2,"children":[{"nodeId":7,"parentId":6,"backendNodeId":7,"nodeType":1,"nodeName":"HEAD","localName":"head","nodeValue":"","childNodeCount":0,"attributes":[]},{"nodeId":8,"parentId":6,"backendNodeId":8,"nodeType":1,"nodeName":"BODY","localName":"body","nodeValue":"","childNodeCount":0,"attributes":[]}],"attributes":[],"frameId":"D0ECF1006762992B9D81370276F4C62A"}],"documentURL":"data:,","baseURL":"data:,","xmlVersion":""}}} +[1531863208.400][DEBUG]: WebSocket::OnReadDuringOpen {"id":8,"result":{"root":{"nodeId":9,"backendNodeId":5,"nodeType":9,"nodeName":"#document","localName":"","nodeValue":"","childNodeCount":1,"children":[{"nodeId":10,"parentId":9,"backendNodeId":6,"nodeType":1,"nodeName":"HTML","localName":"html","nodeValue":"","childNodeCount":2,"children":[{"nodeId":11,"parentId":10,"backendNodeId":7,"nodeType":1,"nodeName":"HEAD","localName":"head","nodeValue":"","childNodeCount":0,"attributes":[]},{"nodeId":12,"parentId":10,"backendNodeId":8,"nodeType":1,"nodeName":"BODY","localName":"body","nodeValue":"","childNodeCount":0,"attributes":[]}],"attributes":[],"frameId":"D0ECF1006762992B9D81370276F4C62A"}],"documentURL":"data:,","baseURL":"data:,","xmlVersion":""}}} +[1531863208.401][DEBUG]: DEVTOOLS RESPONSE DOM.getDocument (id=7) { + "root": { + "backendNodeId": 5, + "baseURL": "data:,", + "childNodeCount": 1, + "children": [ { + "attributes": [ ], + "backendNodeId": 6, + "childNodeCount": 2, + "children": [ { + "attributes": [ ], + "backendNodeId": 7, + "childNodeCount": 0, + "localName": "head", + "nodeId": 7, + "nodeName": "HEAD", + "nodeType": 1, + "nodeValue": "", + "parentId": 6 + }, { + "attributes": [ ], + "backendNodeId": 8, + "childNodeCount": 0, + "localName": "body", + "nodeId": 8, + "nodeName": "BODY", + "nodeType": 1, + "nodeValue": "", + "parentId": 6 + } ], + "frameId": "D0ECF1006762992B9D81370276F4C62A", + "localName": "html", + "nodeId": 6, + "nodeName": "HTML", + "nodeType": 1, + "nodeValue": "", + "parentId": 5 + } ], + "documentURL": "data:,", + "localName": "", + "nodeId": 5, + "nodeName": "#document", + "nodeType": 9, + "nodeValue": "", + "xmlVersion": "" + } +} +[1531863208.402][DEBUG]: DEVTOOLS RESPONSE DOM.getDocument (id=8) { + "root": { + "backendNodeId": 5, + "baseURL": "data:,", + "childNodeCount": 1, + "children": [ { + "attributes": [ ], + "backendNodeId": 6, + "childNodeCount": 2, + "children": [ { + "attributes": [ ], + "backendNodeId": 7, + "childNodeCount": 0, + "localName": "head", + "nodeId": 11, + "nodeName": "HEAD", + "nodeType": 1, + "nodeValue": "", + "parentId": 10 + }, { + "attributes": [ ], + "backendNodeId": 8, + "childNodeCount": 0, + "localName": "body", + "nodeId": 12, + "nodeName": "BODY", + "nodeType": 1, + "nodeValue": "", + "parentId": 10 + } ], + "frameId": "D0ECF1006762992B9D81370276F4C62A", + "localName": "html", + "nodeId": 10, + "nodeName": "HTML", + "nodeType": 1, + "nodeValue": "", + "parentId": 9 + } ], + "documentURL": "data:,", + "localName": "", + "nodeId": 9, + "nodeName": "#document", + "nodeType": 9, + "nodeValue": "", + "xmlVersion": "" + } +} +[1531863208.403][DEBUG]: DEVTOOLS COMMAND Page.enable (id=9) { + +} +[1531863208.403][DEBUG]: WebSocket::Send {"id":9,"method":"Page.enable","params":{}} +[1531863208.425][DEBUG]: WebSocket::OnReadDuringOpen {"id":9,"result":{}} +[1531863208.426][DEBUG]: DEVTOOLS RESPONSE Page.enable (id=9) { + +} +[1531863208.426][DEBUG]: DEVTOOLS COMMAND Runtime.enable (id=10) { + +} +[1531863208.426][DEBUG]: WebSocket::Send {"id":10,"method":"Runtime.enable","params":{}} +[1531863208.448][DEBUG]: WebSocket::OnReadDuringOpen {"id":10,"result":{}} +[1531863208.448][DEBUG]: DEVTOOLS RESPONSE Runtime.enable (id=10) { + +} +[1531863208.449][DEBUG]: DEVTOOLS COMMAND Runtime.evaluate (id=11) { + "expression": "(function() { // Copyright (c) 2012 The Chromium Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style license that can be\n// found in the LICENSE file.\n\n/**\n * Enum f...", + "returnByValue": true +} +[1531863208.449][DEBUG]: WebSocket::Send {"id":11,"method":"Runtime.evaluate","params":{"expression":"(function() { // Copyright (c) 2012 The Chromium Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style license that can be\n// found in the LICENSE file.\n\n/**\n * Enum for WebDriver status codes.\n * @enum {number}\n */\nvar StatusCode = {\n STALE_ELEMENT_REFERENCE: 10,\n UNKNOWN_ERROR: 13,\n};\n\n/**\n * Enum for node types.\n * @enum {number}\n */\nvar NodeType = {\n ELEMENT: 1,\n DOCUMENT: 9,\n};\n\n/**\n * Dictionary key to use for holding an element ID.\n * @const\n * @type {string}\n */\nvar ELEMENT_KEY = 'ELEMENT';\n\n/**\n * True if using W3C Element references.\n * @const\n * @type {boolean}\n */\nvar w3cEnabled = false;\n\n/**\n * True if shadow dom is enabled.\n * @const\n * @type {boolean}\n */\nvar SHADOW_DOM_ENABLED = typeof ShadowRoot === 'function';\n\n/**\n * Generates a unique ID to identify an element.\n * @void\n * @return {string} Randomly generated ID.\n */\nfunction generateUUID() {\n var array = new Uint8Array(16);\n window.crypto.getRandomValues(array);\n array[6] = 0x40 | (array[6] & 0x0f);\n array[8] = 0x80 | (array[8] & 0x3f);\n\n var UUID = \"\";\n for (var i = 0; i \u003C 16; i++) {\n var temp = array[i].toString(16);\n if (temp.length \u003C 2)\n temp = \"0\" + temp;\n UUID += temp;\n if (i == 3 || i == 5 || i == 7 || i == 9)\n UUID += \"-\";\n }\n return UUID;\n};\n\n/**\n * A cache which maps IDs \u003C-> cached objects for the purpose of identifying\n * a script object remotely. Uses UUIDs for identification.\n * @constructor\n */\nfunction CacheWithUUID() {\n this.cache_ = {};\n}\n\nCacheWithUUID.prototype = {\n /**\n * Stores a given item in the cache and returns a unique UUID.\n *\n * @param {!Object} item The item to store in the cache.\n * @return {number} The UUID for the cached item.\n */\n storeItem: function(item) {\n for (var i in this.cache_) {\n if (item == this.cache_[i])\n return i;\n }\n var id = generateUUID();\n this.cache_[id] = item;\n return id;\n },\n\n /**\n * Retrieves the cached object for the given ID.\n *\n * @param {number} id The ID for the cached item to retrieve.\n * @return {!Object} The retrieved item.\n */\n retrieveItem: function(id) {\n var item = this.cache_[id];\n if (item)\n return item;\n var error = new Error('not in cache');\n error.code = StatusCode.STALE_ELEMENT_REFERENCE;\n error.message = 'element is not attached to the page document';\n throw error;\n },\n\n /**\n * Clears stale items from the cache.\n */\n clearStale: function() {\n for (var id in this.cache_) {\n var node = this.cache_[id];\n if (!this.isNodeReachable_(node))\n delete this.cache_[id];\n }\n },\n\n /**\n * @private\n * @param {!Node} node The node to check.\n * @return {boolean} If the nodes is reachable.\n */\n isNodeReachable_: function(node) {\n var nodeRoot = getNodeRootThroughAnyShadows(node);\n return (nodeRoot == document);\n }\n\n\n};\n\n/**\n * A cache which maps IDs \u003C-> cached objects for the purpose of identifying\n * a script object remotely.\n * @constructor\n */\nfunction Cache() {\n this.cache_ = {};\n this.nextId_ = 1;\n this.idPrefix_ = Math.random().toString();\n}\n\nCache.prototype = {\n\n /**\n * Stores a given item in the cache and returns a unique ID.\n *\n * @param {!Object} item The item to store in the cache.\n * @return {number} The ID for the cached item.\n */\n storeItem: function(item) {\n for (var i in this.cache_) {\n if (item == this.cache_[i])\n return i;\n }\n var id = this.idPrefix_ + '-' + this.nextId_;\n this.cache_[id] = item;\n this.nextId_++;\n return id;\n },\n\n /**\n * Retrieves the cached object for the given ID.\n *\n * @param {number} id The ID for the cached item to retrieve.\n * @return {!Object} The retrieved item.\n */\n retrieveItem: function(id) {\n var item = this.cache_[id];\n if (item)\n return item;\n var error = new Error('not in cache');\n error.code = StatusCode.STALE_ELEMENT_REFERENCE;\n error.message = 'element is not attached to the page document';\n throw error;\n },\n\n /**\n * Clears stale items from the cache.\n */\n clearStale: function() {\n for (var id in this.cache_) {\n var node = this.cache_[id];\n if (!this.isNodeReachable_(node))\n delete this.cache_[id];\n }\n },\n\n /**\n * @private\n * @param {!Node} node The node to check.\n * @return {boolean} If the nodes is reachable.\n */\n isNodeReachable_: function(node) {\n var nodeRoot = getNodeRootThroughAnyShadows(node);\n return (nodeRoot == document);\n }\n};\n\n/**\n * Returns the root element of the node. Found by traversing parentNodes until\n * a node with no parent is found. This node is considered the root.\n * @param {?Node} node The node to find the root element for.\n * @return {?Node} The root node.\n */\nfunction getNodeRoot(node) {\n while (node && node.parentNode) {\n node = node.parentNode;\n }\n return node;\n}\n\n/**\n * Returns the root element of the node, jumping up through shadow roots if\n * any are found.\n */\nfunction getNodeRootThroughAnyShadows(node) {\n var root = getNodeRoot(node);\n while (SHADOW_DOM_ENABLED && root instanceof ShadowRoot) {\n root = getNodeRoot(root.host);\n }\n return root;\n}\n\n/**\n * Returns the global object cache for the page.\n * @param {Document=} opt_doc The document whose cache to retrieve. Defaults to\n * the current document.\n * @return {!Cache} The page's object cache.\n */\nfunction getPageCache(opt_doc, opt_w3c) {\n var doc = opt_doc || document;\n var w3c = opt_w3c || false;\n var key = '$cdc_asdjflasutopfhvcZLmcfl_';\n if (w3c) {\n if (!(key in doc))\n doc[key] = new CacheWithUUID();\n return doc[key];\n } else {\n if (!(key in doc))\n doc[key] = new Cache();\n return doc[key];\n }\n}\n\n/**\n * Wraps the given value to be transmitted remotely by converting\n * appropriate objects to cached object IDs.\n *\n * @param {*} value The value to wrap.\n * @return {*} The wrapped value.\n */\nfunction wrap(value) {\n // As of crrev.com/1316933002, typeof() for some elements will return\n // 'function', not 'object'. So we need to check for both non-null objects, as\n // well Elements that also happen to be callable functions (e.g. \u003Cembed> and\n // \u003Cobject> elements). Note that we can not use |value instanceof Object| here\n // since this does not work with frames/iframes, for example\n // frames[0].document.body instanceof Object == false even though\n // typeof(frames[0].document.body) == 'object'.\n if ((typeof(value) == 'object' && value != null) ||\n (typeof(value) == 'function' && value.nodeName &&\n value.nodeType == NodeType.ELEMENT)) {\n var nodeType = value['nodeType'];\n if (nodeType == NodeType.ELEMENT || nodeType == NodeType.DOCUMENT\n || (SHADOW_DOM_ENABLED && value instanceof ShadowRoot)) {\n var wrapped = {};\n var root = getNodeRootThroughAnyShadows(value);\n wrapped[ELEMENT_KEY] = getPageCache(root, w3cEnabled).storeItem(value);\n return wrapped;\n }\n\n var obj;\n if (typeof(value.length) == 'number') {\n obj = [];\n for (var i = 0; i \u003C value.length; i++)\n obj[i] = wrap(value[i]);\n } else {\n obj = {};\n for (var prop in value)\n obj[prop] = wrap(value[prop]);\n }\n return obj;\n }\n return value;\n}\n\n/**\n * Unwraps the given value by converting from object IDs to the cached\n * objects.\n *\n * @param {*} value The value to unwrap.\n * @param {Cache} cache The cache to retrieve wrapped elements from.\n * @return {*} The unwrapped value.\n */\nfunction unwrap(value, cache) {\n if (typeof(value) == 'object' && value != null) {\n if (ELEMENT_KEY in value)\n return cache.retrieveItem(value[ELEMENT_KEY]);\n\n var obj;\n if (typeof(value.length) == 'number') {\n obj = [];\n for (var i = 0; i \u003C value.length; i++)\n obj[i] = unwrap(value[i], cache);\n } else {\n obj = {};\n for (var prop in value)\n obj[prop] = unwrap(value[prop], cache);\n }\n return obj;\n }\n return value;\n}\n\n/**\n * Calls a given function and returns its value.\n *\n * The inputs to and outputs of the function will be unwrapped and wrapped\n * respectively, unless otherwise specified. This wrapping involves converting\n * between cached object reference IDs and actual JS objects. The cache will\n * automatically be pruned each call to remove stale references.\n *\n * @param {Array\u003Cstring>} shadowHostIds The host ids of the nested shadow\n * DOMs the function should be executed in the context of.\n * @param {function(...[*]) : *} func The function to invoke.\n * @param {!Array\u003C*>} args The array of arguments to supply to the function,\n * which will be unwrapped before invoking the function.\n * @param {boolean} w3c Whether to return a W3C compliant element reference.\n * @param {boolean=} opt_unwrappedReturn Whether the function's return value\n * should be left unwrapped.\n * @return {*} An object containing a status and value property, where status\n * is a WebDriver status code and value is the wrapped value. If an\n * unwrapped return was specified, this will be the function's pure return\n * value.\n */\nfunction callFunction(shadowHostIds, func, args, w3c, opt_unwrappedReturn) {\n if (w3c) {\n w3cEnabled = true;\n ELEMENT_KEY = 'element-6066-11e4-a52e-4f735466cecf';\n\n }\n var cache = getPageCache(null, w3cEnabled);\n cache.clearStale();\n if (shadowHostIds && SHADOW_DOM_ENABLED) {\n for (var i = 0; i \u003C shadowHostIds.length; i++) {\n var host = cache.retrieveItem(shadowHostIds[i]);\n // TODO(zachconrad): Use the olderShadowRoot API when available to check\n // all of the shadow roots.\n cache = getPageCache(host.webkitShadowRoot, w3cEnabled);\n cache.clearStale();\n }\n }\n\n if (opt_unwrappedReturn)\n return func.apply(null, unwrap(args, cache));\n\n var status = 0;\n try {\n var returnValue = wrap(func.apply(null, unwrap(args, cache)));\n } catch (error) {\n status = error.code || StatusCode.UNKNOWN_ERROR;\n var returnValue = error.message;\n }\n return {\n status: status,\n value: returnValue\n }\n}\n; return callFunction.apply(null, arguments) }\n).apply(null, [null, function(s) { return 1; }, [], false])","returnByValue":true}} +[1531863208.469][DEBUG]: WebSocket::OnReadDuringOpen {"id":11,"result":{"result":{"type":"object","value":{"status":0,"value":1}}}} +[1531863208.470][DEBUG]: DEVTOOLS RESPONSE Runtime.evaluate (id=11) { + "result": { + "type": "object", + "value": { + "status": 0, + "value": 1 + } + } +} +[1531863208.470][INFO]: [9bb38e74d3c9216918ea31596608f757] RESPONSE InitSession { + "acceptInsecureCerts": false, + "acceptSslCerts": false, + "applicationCacheEnabled": false, + "browserConnectionEnabled": false, + "browserName": "chrome", + "chrome": { + "chromedriverVersion": "2.40 (f4699e1107eca6e847cd7117cfe51619863b23e3)", + "userDataDir": "/tmp/.org.chromium.Chromium.GVvqbY" + }, + "cssSelectorsEnabled": true, + "databaseEnabled": false, + "goog:chromeOptions": { + "debuggerAddress": "localhost:46229" + }, + "handlesAlerts": true, + "hasTouchScreen": false, + "javascriptEnabled": true, + "locationContextEnabled": true, + "mobileEmulationEnabled": false, + "nativeEvents": true, + "networkConnectionEnabled": false, + "pageLoadStrategy": "normal", + "platform": "Linux", + "rotatable": false, + "setWindowRect": true, + "takesHeapSnapshot": true, + "takesScreenshot": true, + "unexpectedAlertBehaviour": "", + "version": "69.0.3491.0", + "webStorageEnabled": true +} +[1531863208.473][INFO]: [9bb38e74d3c9216918ea31596608f757] COMMAND SendCommandAndGetResult { + "cmd": "CSS.enable", + "params": null +} +[1531863208.473][INFO]: Waiting for pending navigations... +[1531863208.473][DEBUG]: DEVTOOLS COMMAND Runtime.evaluate (id=12) { + "expression": "1" +} +[1531863208.473][DEBUG]: WebSocket::Send {"id":12,"method":"Runtime.evaluate","params":{"expression":"1"}} +[1531863208.478][DEBUG]: WebSocket::OnReadDuringOpen {"id":12,"result":{"result":{"type":"number","value":1,"description":"1"}}} +[1531863208.478][DEBUG]: DEVTOOLS RESPONSE Runtime.evaluate (id=12) { + "result": { + "description": "1", + "type": "number", + "value": 1 + } +} +[1531863208.478][INFO]: Done waiting for pending navigations. Status: ok +[1531863208.513][DEBUG]: DEVTOOLS COMMAND Runtime.evaluate (id=13) { + "expression": "1" +} +[1531863208.513][DEBUG]: WebSocket::Send {"id":13,"method":"Runtime.evaluate","params":{"expression":"1"}} +[1531863208.515][DEBUG]: WebSocket::OnReadDuringOpen {"id":13,"result":{"result":{"type":"number","value":1,"description":"1"}}} +[1531863208.515][DEBUG]: DEVTOOLS RESPONSE Runtime.evaluate (id=13) { + "result": { + "description": "1", + "type": "number", + "value": 1 + } +} +[1531863208.515][INFO]: Waiting for pending navigations... +[1531863208.515][DEBUG]: DEVTOOLS COMMAND Runtime.evaluate (id=14) { + "expression": "1" +} +[1531863208.515][DEBUG]: WebSocket::Send {"id":14,"method":"Runtime.evaluate","params":{"expression":"1"}} +[1531863208.517][DEBUG]: WebSocket::OnReadDuringOpen {"id":14,"result":{"result":{"type":"number","value":1,"description":"1"}}} +[1531863208.517][DEBUG]: DEVTOOLS RESPONSE Runtime.evaluate (id=14) { + "result": { + "description": "1", + "type": "number", + "value": 1 + } +} +[1531863208.517][INFO]: Done waiting for pending navigations. Status: ok +[1531863208.517][INFO]: [9bb38e74d3c9216918ea31596608f757] RESPONSE SendCommandAndGetResult ERROR unknown error: params not passed + (Session info: chrome=69.0.3491.0) +[1531863208.518][INFO]: [9bb38e74d3c9216918ea31596608f757] COMMAND Quit { + +} +[1531863208.531][DEBUG]: WebSocket::OnRead error OK +[0717/143328.535499:ERROR:nacl_helper_linux.cc(310)] NaCl helper process running without a sandbox! +Most likely you need to configure your SUID sandbox correctly +[1531863208.569][INFO]: [9bb38e74d3c9216918ea31596608f757] RESPONSE Quit +[1531863208.569][DEBUG]: Log type 'driver' lost 0 entries on destruction +[1531863208.569][DEBUG]: Log type 'browser' lost 0 entries on destruction
diff --git a/chrome/test/chromedriver/log_replay/test_data/testSendingTabKeyMovesToNextInputElement.log b/chrome/test/chromedriver/log_replay/test_data/testSendingTabKeyMovesToNextInputElement.log new file mode 100644 index 0000000..19fe9f0c --- /dev/null +++ b/chrome/test/chromedriver/log_replay/test_data/testSendingTabKeyMovesToNextInputElement.log
@@ -0,0 +1,1761 @@ +[1532468099.296][INFO]: [6d5e45968d65d60b943ee611bcb23a83] COMMAND InitSession { + "desiredCapabilities": { + "chromeOptions": { + "args": [ "no-sandbox", "disable-gpu" ], + "binary": "/usr/local/google/home/cwinstanley/chromium/src/out/Default/chrome" + }, + "goog:testName": "__main__.ChromeDriverTest.testSendingTabKeyMovesToNextInputElement", + "loggingPrefs": { + + } + } +} +[1532468099.297][INFO]: Populating Preferences file: { + "alternate_error_pages": { + "enabled": false + }, + "autofill": { + "enabled": false + }, + "browser": { + "check_default_browser": false + }, + "distribution": { + "import_bookmarks": false, + "import_history": false, + "import_search_engine": false, + "make_chrome_default_for_user": false, + "skip_first_run_ui": true + }, + "dns_prefetching": { + "enabled": false + }, + "profile": { + "content_settings": { + "pattern_pairs": { + "https://*,*": { + "media-stream": { + "audio": "Default", + "video": "Default" + } + } + } + }, + "default_content_setting_values": { + "geolocation": 1 + }, + "default_content_settings": { + "geolocation": 1, + "mouselock": 1, + "notifications": 1, + "popups": 1, + "ppapi-broker": 1 + }, + "password_manager_enabled": false + }, + "safebrowsing": { + "enabled": false + }, + "search": { + "suggest_enabled": false + }, + "translate": { + "enabled": false + } +} +[1532468099.298][INFO]: Populating Local State file: { + "background_mode": { + "enabled": false + }, + "ssl": { + "rev_checking": { + "enabled": false + } + } +} +[1532468099.300][INFO]: Launching chrome: /usr/local/google/home/cwinstanley/chromium/src/out/Default/chrome --disable-background-networking --disable-client-side-phishing-detection --disable-default-apps --disable-gpu --disable-hang-monitor --disable-popup-blocking --disable-prompt-on-repost --disable-sync --disable-web-resources --enable-automation --enable-logging --force-fieldtrials=SiteIsolationExtensions/Control --ignore-certificate-errors --load-extension=/tmp/.org.chromium.Chromium.MnpHZu/internal --log-level=0 --metrics-recording-only --no-first-run --no-sandbox --password-store=basic --remote-debugging-port=0 --test-type=webdriver --use-mock-keychain --user-data-dir=/tmp/.org.chromium.Chromium.6wWxZv data:, +[3010:3010:0724/143501.248851:ERROR:gpu_process_transport_factory.cc(642)] Switching to software compositing. +[3010:3010:0724/143501.248924:ERROR:gpu_process_transport_factory.cc(1007)] Lost UI shared context. +[3010:3010:0724/143501.350557:WARNING:account_consistency_mode_manager.cc(290)] Desktop Identity Consistency cannot be enabled as no OAuth client ID and client secret have been configured. +[3010:3010:0724/143501.350718:WARNING:account_consistency_mode_manager.cc(290)] Desktop Identity Consistency cannot be enabled as no OAuth client ID and client secret have been configured. +[3010:3010:0724/143501.350795:WARNING:account_consistency_mode_manager.cc(290)] Desktop Identity Consistency cannot be enabled as no OAuth client ID and client secret have been configured. +[3010:3010:0724/143501.350872:WARNING:account_consistency_mode_manager.cc(290)] Desktop Identity Consistency cannot be enabled as no OAuth client ID and client secret have been configured. +[3010:3010:0724/143501.352332:WARNING:account_consistency_mode_manager.cc(290)] Desktop Identity Consistency cannot be enabled as no OAuth client ID and client secret have been configured. +[3010:3010:0724/143501.362506:WARNING:account_consistency_mode_manager.cc(290)] Desktop Identity Consistency cannot be enabled as no OAuth client ID and client secret have been configured. +[3010:3010:0724/143501.430910:WARNING:account_consistency_mode_manager.cc(290)] Desktop Identity Consistency cannot be enabled as no OAuth client ID and client secret have been configured. +[3010:3010:0724/143501.468627:WARNING:account_consistency_mode_manager.cc(290)] Desktop Identity Consistency cannot be enabled as no OAuth client ID and client secret have been configured. +[3010:3010:0724/143501.468718:WARNING:account_consistency_mode_manager.cc(290)] Desktop Identity Consistency cannot be enabled as no OAuth client ID and client secret have been configured. + +DevTools listening on ws://127.0.0.1:45089/devtools/browser/7fb3768b-0103-46ef-9306-96d2d4af3a24 +[1532468101.521][DEBUG]: DevTools request: http://localhost:45089/json/version +[3010:3010:0724/143501.620926:WARNING:password_store_factory.cc(253)] Using basic (unencrypted) store for password storage. See https://chromium.googlesource.com/chromium/src/+/master/docs/linux_password_storage.md for more information about password storage options. +[3010:3010:0724/143501.623537:WARNING:account_consistency_mode_manager.cc(290)] Desktop Identity Consistency cannot be enabled as no OAuth client ID and client secret have been configured. +[1532468101.846][DEBUG]: DevTools response: { + "Browser": "Chrome/69.0.3491.0", + "Protocol-Version": "1.3", + "User-Agent": "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/69.0.3491.0 Safari/537.36", + "V8-Version": "6.9.389", + "WebKit-Version": "537.36 (@410f2c4912d46a5fae2fe6c0b2e24d9eb6359761)", + "webSocketDebuggerUrl": "ws://localhost:45089/devtools/browser/7fb3768b-0103-46ef-9306-96d2d4af3a24" +} + +[1532468101.891][DEBUG]: DevTools request: http://localhost:45089/json +[1532468101.915][DEBUG]: DevTools response: [ { + "description": "", + "devtoolsFrontendUrl": "/devtools/inspector.html?ws=localhost:45089/devtools/page/89E9A249213168BD2C01209E2834FF42", + "id": "89E9A249213168BD2C01209E2834FF42", + "title": "Chrome Automation Extension", + "type": "background_page", + "url": "chrome-extension://aapnijgdinlhnhlmodcfapnahmbfebeb/_generated_background_page.html", + "webSocketDebuggerUrl": "ws://localhost:45089/devtools/page/89E9A249213168BD2C01209E2834FF42" +}, { + "description": "", + "devtoolsFrontendUrl": "/devtools/inspector.html?ws=localhost:45089/devtools/page/8A96A13FF5DB038E2DC89254A1AEE67D", + "id": "8A96A13FF5DB038E2DC89254A1AEE67D", + "title": "", + "type": "page", + "url": "data:,", + "webSocketDebuggerUrl": "ws://localhost:45089/devtools/page/8A96A13FF5DB038E2DC89254A1AEE67D" +} ] + +[1532468101.916][DEBUG]: DevTools request: http://localhost:45089/json +[1532468101.926][DEBUG]: DevTools response: [ { + "description": "", + "devtoolsFrontendUrl": "/devtools/inspector.html?ws=localhost:45089/devtools/page/89E9A249213168BD2C01209E2834FF42", + "id": "89E9A249213168BD2C01209E2834FF42", + "title": "Chrome Automation Extension", + "type": "background_page", + "url": "chrome-extension://aapnijgdinlhnhlmodcfapnahmbfebeb/_generated_background_page.html", + "webSocketDebuggerUrl": "ws://localhost:45089/devtools/page/89E9A249213168BD2C01209E2834FF42" +}, { + "description": "", + "devtoolsFrontendUrl": "/devtools/inspector.html?ws=localhost:45089/devtools/page/8A96A13FF5DB038E2DC89254A1AEE67D", + "id": "8A96A13FF5DB038E2DC89254A1AEE67D", + "title": "", + "type": "page", + "url": "data:,", + "webSocketDebuggerUrl": "ws://localhost:45089/devtools/page/8A96A13FF5DB038E2DC89254A1AEE67D" +} ] + +[1532468101.927][INFO]: resolved localhost to ["::1","127.0.0.1"] +[1532468101.931][DEBUG]: DEVTOOLS COMMAND Log.enable (id=1) { + +} +[1532468101.931][DEBUG]: DEVTOOLS COMMAND DOM.getDocument (id=2) { + +} +[1532468101.931][DEBUG]: DEVTOOLS COMMAND Target.setAutoAttach (id=3) { + "autoAttach": true, + "waitForDebuggerOnStart": false +} +[1532468101.932][DEBUG]: DEVTOOLS COMMAND Page.enable (id=4) { + +} +[1532468101.932][DEBUG]: DEVTOOLS COMMAND Page.enable (id=5) { + +} +[1532468101.983][DEBUG]: DEVTOOLS RESPONSE Log.enable (id=1) { + +} +[1532468101.984][DEBUG]: DEVTOOLS RESPONSE DOM.getDocument (id=2) { + "root": { + "backendNodeId": 1, + "baseURL": "about:blank", + "childNodeCount": 1, + "children": [ { + "attributes": [ ], + "backendNodeId": 2, + "childNodeCount": 2, + "children": [ { + "attributes": [ ], + "backendNodeId": 3, + "childNodeCount": 0, + "localName": "head", + "nodeId": 3, + "nodeName": "HEAD", + "nodeType": 1, + "nodeValue": "", + "parentId": 2 + }, { + "attributes": [ ], + "backendNodeId": 4, + "childNodeCount": 0, + "localName": "body", + "nodeId": 4, + "nodeName": "BODY", + "nodeType": 1, + "nodeValue": "", + "parentId": 2 + } ], + "frameId": "8A96A13FF5DB038E2DC89254A1AEE67D", + "localName": "html", + "nodeId": 2, + "nodeName": "HTML", + "nodeType": 1, + "nodeValue": "", + "parentId": 1 + } ], + "documentURL": "", + "localName": "", + "nodeId": 1, + "nodeName": "#document", + "nodeType": 9, + "nodeValue": "", + "xmlVersion": "" + } +} +[1532468101.984][DEBUG]: DEVTOOLS RESPONSE Target.setAutoAttach (id=3) { + +} +[1532468101.984][DEBUG]: DEVTOOLS RESPONSE Page.enable (id=4) { + +} +[1532468101.984][DEBUG]: DEVTOOLS RESPONSE Page.enable (id=5) { + +} +[1532468101.985][DEBUG]: DEVTOOLS COMMAND Runtime.enable (id=6) { + +} +[1532468102.028][DEBUG]: DEVTOOLS EVENT Page.frameNavigated { + "frame": { + "id": "8A96A13FF5DB038E2DC89254A1AEE67D", + "loaderId": "F43BCC24664D22BA158D77490D47D471", + "mimeType": "text/plain", + "securityOrigin": "://", + "url": "data:," + } +} +[1532468102.028][DEBUG]: DEVTOOLS EVENT DOM.documentUpdated { + +} +[1532468102.029][DEBUG]: DEVTOOLS COMMAND DOM.getDocument (id=7) { + +} +[1532468102.029][DEBUG]: DEVTOOLS EVENT Page.loadEventFired { + "timestamp": 80786.327099 +} +[1532468102.029][DEBUG]: DEVTOOLS EVENT Page.frameStoppedLoading { + "frameId": "8A96A13FF5DB038E2DC89254A1AEE67D" +} +[1532468102.029][DEBUG]: DEVTOOLS EVENT DOM.documentUpdated { + +} +[1532468102.029][DEBUG]: DEVTOOLS COMMAND DOM.getDocument (id=8) { + +} +[1532468102.029][DEBUG]: DEVTOOLS EVENT Page.domContentEventFired { + "timestamp": 80786.329922 +} +[1532468102.038][DEBUG]: DEVTOOLS EVENT Page.frameResized { + +} +[1532468102.040][DEBUG]: DEVTOOLS EVENT Runtime.executionContextCreated { + "context": { + "auxData": { + "frameId": "8A96A13FF5DB038E2DC89254A1AEE67D", + "isDefault": true + }, + "id": 1, + "name": "", + "origin": "://" + } +} +[1532468102.040][DEBUG]: DEVTOOLS RESPONSE Runtime.enable (id=6) { + +} +[1532468102.043][DEBUG]: DEVTOOLS RESPONSE DOM.getDocument (id=7) { + "root": { + "backendNodeId": 5, + "baseURL": "data:,", + "childNodeCount": 1, + "children": [ { + "attributes": [ ], + "backendNodeId": 6, + "childNodeCount": 2, + "children": [ { + "attributes": [ ], + "backendNodeId": 7, + "childNodeCount": 0, + "localName": "head", + "nodeId": 7, + "nodeName": "HEAD", + "nodeType": 1, + "nodeValue": "", + "parentId": 6 + }, { + "attributes": [ ], + "backendNodeId": 8, + "childNodeCount": 0, + "localName": "body", + "nodeId": 8, + "nodeName": "BODY", + "nodeType": 1, + "nodeValue": "", + "parentId": 6 + } ], + "frameId": "8A96A13FF5DB038E2DC89254A1AEE67D", + "localName": "html", + "nodeId": 6, + "nodeName": "HTML", + "nodeType": 1, + "nodeValue": "", + "parentId": 5 + } ], + "documentURL": "data:,", + "localName": "", + "nodeId": 5, + "nodeName": "#document", + "nodeType": 9, + "nodeValue": "", + "xmlVersion": "" + } +} +[1532468102.060][DEBUG]: DEVTOOLS RESPONSE DOM.getDocument (id=8) { + "root": { + "backendNodeId": 5, + "baseURL": "data:,", + "childNodeCount": 1, + "children": [ { + "attributes": [ ], + "backendNodeId": 6, + "childNodeCount": 2, + "children": [ { + "attributes": [ ], + "backendNodeId": 7, + "childNodeCount": 0, + "localName": "head", + "nodeId": 11, + "nodeName": "HEAD", + "nodeType": 1, + "nodeValue": "", + "parentId": 10 + }, { + "attributes": [ ], + "backendNodeId": 8, + "childNodeCount": 0, + "localName": "body", + "nodeId": 12, + "nodeName": "BODY", + "nodeType": 1, + "nodeValue": "", + "parentId": 10 + } ], + "frameId": "8A96A13FF5DB038E2DC89254A1AEE67D", + "localName": "html", + "nodeId": 10, + "nodeName": "HTML", + "nodeType": 1, + "nodeValue": "", + "parentId": 9 + } ], + "documentURL": "data:,", + "localName": "", + "nodeId": 9, + "nodeName": "#document", + "nodeType": 9, + "nodeValue": "", + "xmlVersion": "" + } +} +[1532468102.061][DEBUG]: DEVTOOLS COMMAND Page.enable (id=9) { + +} +[1532468102.092][DEBUG]: DEVTOOLS RESPONSE Page.enable (id=9) { + +} +[1532468102.092][DEBUG]: DEVTOOLS COMMAND Runtime.enable (id=10) { + +} +[1532468102.096][DEBUG]: DEVTOOLS RESPONSE Runtime.enable (id=10) { + +} +[1532468102.097][DEBUG]: DEVTOOLS COMMAND Runtime.evaluate (id=11) { + "expression": "(function() { // Copyright (c) 2012 The Chromium Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style license that can be\n// found in the LICENSE file.\n\n/**\n * Enum f...", + "returnByValue": true +} +[1532468102.132][DEBUG]: DEVTOOLS RESPONSE Runtime.evaluate (id=11) { + "result": { + "type": "object", + "value": { + "status": 0, + "value": 1 + } + } +} +[1532468102.133][INFO]: [6d5e45968d65d60b943ee611bcb23a83] RESPONSE InitSession { + "acceptInsecureCerts": false, + "acceptSslCerts": false, + "applicationCacheEnabled": false, + "browserConnectionEnabled": false, + "browserName": "chrome", + "chrome": { + "chromedriverVersion": "2.40 (1ba6d2ec0853ea1d507bccc09f540f5ea1db0394)", + "userDataDir": "/tmp/.org.chromium.Chromium.6wWxZv" + }, + "cssSelectorsEnabled": true, + "databaseEnabled": false, + "goog:chromeOptions": { + "debuggerAddress": "localhost:45089" + }, + "handlesAlerts": true, + "hasTouchScreen": false, + "javascriptEnabled": true, + "locationContextEnabled": true, + "mobileEmulationEnabled": false, + "nativeEvents": true, + "networkConnectionEnabled": false, + "pageLoadStrategy": "normal", + "platform": "Linux", + "rotatable": false, + "setWindowRect": true, + "takesHeapSnapshot": true, + "takesScreenshot": true, + "unexpectedAlertBehaviour": "", + "version": "69.0.3491.0", + "webStorageEnabled": true +} +[1532468102.134][INFO]: [6d5e45968d65d60b943ee611bcb23a83] COMMAND Navigate { + "url": "http://127.0.0.1:33567/chromedriver/two_inputs.html" +} +[1532468102.134][INFO]: Waiting for pending navigations... +[1532468102.134][DEBUG]: DEVTOOLS COMMAND Runtime.evaluate (id=12) { + "expression": "1" +} +[1532468102.159][DEBUG]: DEVTOOLS RESPONSE Runtime.evaluate (id=12) { + "result": { + "description": "1", + "type": "number", + "value": 1 + } +} +[1532468102.159][INFO]: Done waiting for pending navigations. Status: ok +[1532468102.159][DEBUG]: DEVTOOLS COMMAND Page.navigate (id=13) { + "url": "http://127.0.0.1:33567/chromedriver/two_inputs.html" +} +[1532468102.483][DEBUG]: DEVTOOLS RESPONSE Page.navigate (id=13) { + "frameId": "8A96A13FF5DB038E2DC89254A1AEE67D", + "loaderId": "F44FB5466F410D9820B0BF1C6BE2C43C" +} +[1532468102.483][DEBUG]: DEVTOOLS COMMAND Runtime.evaluate (id=14) { + "expression": "document.URL" +} +[1532468102.495][DEBUG]: DEVTOOLS EVENT Runtime.executionContextsCleared { + +} +[1532468102.507][DEBUG]: DEVTOOLS EVENT Page.frameStartedLoading { + "frameId": "8A96A13FF5DB038E2DC89254A1AEE67D" +} +[3057:3057:0724/143502.567686:ERROR:render_process_impl.cc(208)] WebFrame LEAKED 1 TIMES +[1532468102.581][DEBUG]: DEVTOOLS EVENT Runtime.executionContextsCleared { + +} +[1532468102.581][DEBUG]: DEVTOOLS EVENT Page.frameNavigated { + "frame": { + "id": "8A96A13FF5DB038E2DC89254A1AEE67D", + "loaderId": "F44FB5466F410D9820B0BF1C6BE2C43C", + "mimeType": "text/html", + "securityOrigin": "http://127.0.0.1:33567", + "url": "http://127.0.0.1:33567/chromedriver/two_inputs.html" + } +} +[1532468102.582][DEBUG]: DEVTOOLS EVENT Runtime.executionContextCreated { + "context": { + "auxData": { + "frameId": "8A96A13FF5DB038E2DC89254A1AEE67D", + "isDefault": true + }, + "id": 1, + "name": "", + "origin": "http://127.0.0.1:33567" + } +} +[1532468102.582][DEBUG]: DEVTOOLS EVENT DOM.documentUpdated { + +} +[1532468102.582][DEBUG]: DEVTOOLS COMMAND DOM.getDocument (id=15) { + +} +[1532468102.616][DEBUG]: DEVTOOLS EVENT Page.loadEventFired { + "timestamp": 80786.919505 +} +[1532468102.616][DEBUG]: DEVTOOLS EVENT Page.frameStoppedLoading { + "frameId": "8A96A13FF5DB038E2DC89254A1AEE67D" +} +[1532468102.616][DEBUG]: DEVTOOLS EVENT DOM.documentUpdated { + +} +[1532468102.616][DEBUG]: DEVTOOLS COMMAND DOM.getDocument (id=16) { + +} +[1532468102.617][DEBUG]: DEVTOOLS EVENT Page.domContentEventFired { + "timestamp": 80786.933961 +} +[1532468102.619][DEBUG]: DEVTOOLS RESPONSE Runtime.evaluate (id=14) { + "result": { + "type": "string", + "value": "http://127.0.0.1:33567/chromedriver/two_inputs.html" + } +} +[1532468102.620][DEBUG]: DEVTOOLS RESPONSE DOM.getDocument (id=15) { + "root": { + "backendNodeId": 1, + "baseURL": "http://127.0.0.1:33567/chromedriver/two_inputs.html", + "childNodeCount": 2, + "children": [ { + "backendNodeId": 2, + "localName": "", + "nodeId": 2, + "nodeName": "html", + "nodeType": 10, + "nodeValue": "", + "parentId": 1, + "publicId": "", + "systemId": "" + }, { + "attributes": [ ], + "backendNodeId": 3, + "childNodeCount": 2, + "children": [ { + "attributes": [ ], + "backendNodeId": 4, + "childNodeCount": 0, + "localName": "head", + "nodeId": 4, + "nodeName": "HEAD", + "nodeType": 1, + "nodeValue": "", + "parentId": 3 + }, { + "attributes": [ ], + "backendNodeId": 5, + "childNodeCount": 2, + "localName": "body", + "nodeId": 5, + "nodeName": "BODY", + "nodeType": 1, + "nodeValue": "", + "parentId": 3 + } ], + "frameId": "8A96A13FF5DB038E2DC89254A1AEE67D", + "localName": "html", + "nodeId": 3, + "nodeName": "HTML", + "nodeType": 1, + "nodeValue": "", + "parentId": 1 + } ], + "documentURL": "http://127.0.0.1:33567/chromedriver/two_inputs.html", + "localName": "", + "nodeId": 1, + "nodeName": "#document", + "nodeType": 9, + "nodeValue": "", + "xmlVersion": "" + } +} +[1532468102.638][DEBUG]: DEVTOOLS RESPONSE DOM.getDocument (id=16) { + "root": { + "backendNodeId": 1, + "baseURL": "http://127.0.0.1:33567/chromedriver/two_inputs.html", + "childNodeCount": 2, + "children": [ { + "backendNodeId": 2, + "localName": "", + "nodeId": 7, + "nodeName": "html", + "nodeType": 10, + "nodeValue": "", + "parentId": 6, + "publicId": "", + "systemId": "" + }, { + "attributes": [ ], + "backendNodeId": 3, + "childNodeCount": 2, + "children": [ { + "attributes": [ ], + "backendNodeId": 4, + "childNodeCount": 0, + "localName": "head", + "nodeId": 9, + "nodeName": "HEAD", + "nodeType": 1, + "nodeValue": "", + "parentId": 8 + }, { + "attributes": [ ], + "backendNodeId": 5, + "childNodeCount": 2, + "localName": "body", + "nodeId": 10, + "nodeName": "BODY", + "nodeType": 1, + "nodeValue": "", + "parentId": 8 + } ], + "frameId": "8A96A13FF5DB038E2DC89254A1AEE67D", + "localName": "html", + "nodeId": 8, + "nodeName": "HTML", + "nodeType": 1, + "nodeValue": "", + "parentId": 6 + } ], + "documentURL": "http://127.0.0.1:33567/chromedriver/two_inputs.html", + "localName": "", + "nodeId": 6, + "nodeName": "#document", + "nodeType": 9, + "nodeValue": "", + "xmlVersion": "" + } +} +[1532468102.638][INFO]: Waiting for pending navigations... +[1532468102.638][DEBUG]: DEVTOOLS COMMAND Runtime.evaluate (id=17) { + "expression": "1" +} +[1532468102.650][DEBUG]: DEVTOOLS EVENT Log.entryAdded { + "entry": { + "level": "error", + "networkRequestId": "1000003097.2", + "source": "network", + "text": "Failed to load resource: the server responded with a status of 404 (Not Found)", + "timestamp": 1532468102638.34, + "url": "http://127.0.0.1:33567/favicon.ico" + } +} +[1532468102.652][DEBUG]: DEVTOOLS RESPONSE Runtime.evaluate (id=17) { + "result": { + "description": "1", + "type": "number", + "value": 1 + } +} +[1532468102.652][INFO]: Done waiting for pending navigations. Status: ok +[1532468102.652][INFO]: [6d5e45968d65d60b943ee611bcb23a83] RESPONSE Navigate +[1532468102.654][INFO]: [6d5e45968d65d60b943ee611bcb23a83] COMMAND FindElement { + "using": "id", + "value": "first" +} +[1532468102.654][INFO]: Waiting for pending navigations... +[1532468102.654][DEBUG]: DEVTOOLS COMMAND Runtime.evaluate (id=18) { + "expression": "1" +} +[1532468102.655][DEBUG]: DEVTOOLS RESPONSE Runtime.evaluate (id=18) { + "result": { + "description": "1", + "type": "number", + "value": 1 + } +} +[1532468102.656][INFO]: Done waiting for pending navigations. Status: ok +[1532468102.662][DEBUG]: DEVTOOLS COMMAND Runtime.evaluate (id=19) { + "expression": "(function() { // Copyright (c) 2012 The Chromium Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style license that can be\n// found in the LICENSE file.\n\n/**\n * Enum f...", + "returnByValue": true +} +[1532468102.697][DEBUG]: DEVTOOLS RESPONSE Runtime.evaluate (id=19) { + "result": { + "type": "object", + "value": { + "status": 0, + "value": { + "ELEMENT": "0.3723424408638141-1" + } + } + } +} +[1532468102.697][INFO]: Waiting for pending navigations... +[1532468102.697][DEBUG]: DEVTOOLS COMMAND Runtime.evaluate (id=20) { + "expression": "1" +} +[1532468102.699][DEBUG]: DEVTOOLS RESPONSE Runtime.evaluate (id=20) { + "result": { + "description": "1", + "type": "number", + "value": 1 + } +} +[1532468102.699][INFO]: Done waiting for pending navigations. Status: ok +[1532468102.699][INFO]: [6d5e45968d65d60b943ee611bcb23a83] RESPONSE FindElement { + "ELEMENT": "0.3723424408638141-1" +} +[1532468102.700][INFO]: [6d5e45968d65d60b943ee611bcb23a83] COMMAND FindElement { + "using": "id", + "value": "second" +} +[1532468102.700][INFO]: Waiting for pending navigations... +[1532468102.700][DEBUG]: DEVTOOLS COMMAND Runtime.evaluate (id=21) { + "expression": "1" +} +[1532468102.702][DEBUG]: DEVTOOLS RESPONSE Runtime.evaluate (id=21) { + "result": { + "description": "1", + "type": "number", + "value": 1 + } +} +[1532468102.702][INFO]: Done waiting for pending navigations. Status: ok +[1532468102.706][DEBUG]: DEVTOOLS COMMAND Runtime.evaluate (id=22) { + "expression": "(function() { // Copyright (c) 2012 The Chromium Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style license that can be\n// found in the LICENSE file.\n\n/**\n * Enum f...", + "returnByValue": true +} +[1532468102.733][DEBUG]: DEVTOOLS RESPONSE Runtime.evaluate (id=22) { + "result": { + "type": "object", + "value": { + "status": 0, + "value": { + "ELEMENT": "0.3723424408638141-2" + } + } + } +} +[1532468102.733][INFO]: Waiting for pending navigations... +[1532468102.733][DEBUG]: DEVTOOLS COMMAND Runtime.evaluate (id=23) { + "expression": "1" +} +[1532468102.735][DEBUG]: DEVTOOLS RESPONSE Runtime.evaluate (id=23) { + "result": { + "description": "1", + "type": "number", + "value": 1 + } +} +[1532468102.735][INFO]: Done waiting for pending navigations. Status: ok +[1532468102.735][INFO]: [6d5e45968d65d60b943ee611bcb23a83] RESPONSE FindElement { + "ELEMENT": "0.3723424408638141-2" +} +[1532468102.737][INFO]: [6d5e45968d65d60b943ee611bcb23a83] COMMAND ClickElement { + "id": "0.3723424408638141-1" +} +[1532468102.737][INFO]: Waiting for pending navigations... +[1532468102.737][DEBUG]: DEVTOOLS COMMAND Runtime.evaluate (id=24) { + "expression": "1" +} +[1532468102.738][DEBUG]: DEVTOOLS RESPONSE Runtime.evaluate (id=24) { + "result": { + "description": "1", + "type": "number", + "value": 1 + } +} +[1532468102.739][INFO]: Done waiting for pending navigations. Status: ok +[1532468102.739][DEBUG]: DEVTOOLS COMMAND Runtime.evaluate (id=25) { + "expression": "(function() { // Copyright (c) 2012 The Chromium Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style license that can be\n// found in the LICENSE file.\n\n/**\n * Enum f...", + "returnByValue": true +} +[1532468102.744][DEBUG]: DEVTOOLS RESPONSE Runtime.evaluate (id=25) { + "result": { + "type": "object", + "value": { + "status": 0, + "value": "input" + } + } +} +[1532468102.745][DEBUG]: DEVTOOLS COMMAND Runtime.evaluate (id=26) { + "expression": "(function() { // Copyright (c) 2012 The Chromium Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style license that can be\n// found in the LICENSE file.\n\n/**\n * Enum f...", + "returnByValue": true +} +[1532468102.748][DEBUG]: DEVTOOLS RESPONSE Runtime.evaluate (id=26) { + "result": { + "type": "object", + "value": { + "status": 0, + "value": "input" + } + } +} +[1532468102.752][DEBUG]: DEVTOOLS COMMAND Runtime.evaluate (id=27) { + "expression": "(function() { // Copyright (c) 2012 The Chromium Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style license that can be\n// found in the LICENSE file.\n\n/**\n * Enum f...", + "returnByValue": true +} +[1532468102.780][DEBUG]: DEVTOOLS RESPONSE Runtime.evaluate (id=27) { + "result": { + "type": "object", + "value": { + "status": 0, + "value": true + } + } +} +[1532468102.782][DEBUG]: DEVTOOLS COMMAND Runtime.evaluate (id=28) { + "expression": "(function() { // Copyright (c) 2012 The Chromium Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style license that can be\n// found in the LICENSE file.\n\n/**\n * Enum f...", + "returnByValue": true +} +[1532468102.789][DEBUG]: DEVTOOLS RESPONSE Runtime.evaluate (id=28) { + "result": { + "type": "object", + "value": { + "status": 0, + "value": { + "height": 21, + "left": 0, + "top": 0, + "width": 154 + } + } + } +} +[1532468102.791][DEBUG]: DEVTOOLS COMMAND Runtime.evaluate (id=29) { + "expression": "(function() { // Copyright (c) 2012 The Chromium Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style license that can be\n// found in the LICENSE file.\n\n/**\n * Enum f...", + "returnByValue": true +} +[1532468102.814][DEBUG]: DEVTOOLS RESPONSE Runtime.evaluate (id=29) { + "result": { + "type": "object", + "value": { + "status": 0, + "value": { + "ceil": { + + }, + "clone": { + + }, + "floor": { + + }, + "round": { + + }, + "scale": { + + }, + "toString": { + + }, + "translate": { + + }, + "x": 8, + "y": 8 + } + } + } +} +[1532468102.816][DEBUG]: DEVTOOLS COMMAND Runtime.evaluate (id=30) { + "expression": "(function() { // Copyright (c) 2012 The Chromium Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style license that can be\n// found in the LICENSE file.\n\n/**\n * Enum f...", + "returnByValue": true +} +[1532468102.834][DEBUG]: DEVTOOLS RESPONSE Runtime.evaluate (id=30) { + "result": { + "type": "object", + "value": { + "status": 0, + "value": { + "clickable": true + } + } + } +} +[1532468102.834][DEBUG]: DEVTOOLS COMMAND Input.dispatchMouseEvent (id=31) { + "button": "none", + "clickCount": 0, + "modifiers": 0, + "type": "mouseMoved", + "x": 85, + "y": 18 +} +[1532468102.838][DEBUG]: DEVTOOLS RESPONSE Input.dispatchMouseEvent (id=31) { + +} +[1532468102.838][DEBUG]: DEVTOOLS COMMAND Input.dispatchMouseEvent (id=32) { + "button": "left", + "clickCount": 1, + "modifiers": 0, + "type": "mousePressed", + "x": 85, + "y": 18 +} +[1532468102.851][DEBUG]: DEVTOOLS RESPONSE Input.dispatchMouseEvent (id=32) { + +} +[1532468102.851][DEBUG]: DEVTOOLS COMMAND Input.dispatchMouseEvent (id=33) { + "button": "left", + "clickCount": 1, + "modifiers": 0, + "type": "mouseReleased", + "x": 85, + "y": 18 +} +[1532468102.856][DEBUG]: DEVTOOLS RESPONSE Input.dispatchMouseEvent (id=33) { + +} +[1532468102.856][INFO]: Waiting for pending navigations... +[1532468102.856][DEBUG]: DEVTOOLS COMMAND Runtime.evaluate (id=34) { + "expression": "1" +} +[1532468102.858][DEBUG]: DEVTOOLS RESPONSE Runtime.evaluate (id=34) { + "result": { + "description": "1", + "type": "number", + "value": 1 + } +} +[1532468102.858][INFO]: Done waiting for pending navigations. Status: ok +[1532468102.858][INFO]: [6d5e45968d65d60b943ee611bcb23a83] RESPONSE ClickElement +[1532468102.861][INFO]: [6d5e45968d65d60b943ee611bcb23a83] COMMAND Type { + "value": [ "s", "n", "o", "o", "p", "y" ] +} +[1532468102.861][INFO]: Waiting for pending navigations... +[1532468102.861][DEBUG]: DEVTOOLS COMMAND Runtime.evaluate (id=35) { + "expression": "1" +} +[1532468102.865][DEBUG]: DEVTOOLS RESPONSE Runtime.evaluate (id=35) { + "result": { + "description": "1", + "type": "number", + "value": 1 + } +} +[1532468102.865][INFO]: Done waiting for pending navigations. Status: ok +[1532468102.868][DEBUG]: DEVTOOLS COMMAND Input.dispatchKeyEvent (id=36) { + "code": "KeyS", + "key": "s", + "modifiers": 0, + "text": "s", + "type": "rawKeyDown", + "unmodifiedText": "s", + "windowsVirtualKeyCode": 83 +} +[1532468102.871][DEBUG]: DEVTOOLS RESPONSE Input.dispatchKeyEvent (id=36) { + +} +[1532468102.871][DEBUG]: DEVTOOLS COMMAND Input.dispatchKeyEvent (id=37) { + "code": "KeyS", + "key": "s", + "modifiers": 0, + "text": "s", + "type": "char", + "unmodifiedText": "s", + "windowsVirtualKeyCode": 83 +} +[1532468102.877][DEBUG]: DEVTOOLS RESPONSE Input.dispatchKeyEvent (id=37) { + +} +[1532468102.877][DEBUG]: DEVTOOLS COMMAND Input.dispatchKeyEvent (id=38) { + "code": "KeyS", + "key": "s", + "modifiers": 0, + "text": "s", + "type": "keyUp", + "unmodifiedText": "s", + "windowsVirtualKeyCode": 83 +} +[1532468102.883][DEBUG]: DEVTOOLS RESPONSE Input.dispatchKeyEvent (id=38) { + +} +[1532468102.883][DEBUG]: DEVTOOLS COMMAND Input.dispatchKeyEvent (id=39) { + "code": "KeyN", + "key": "n", + "modifiers": 0, + "text": "n", + "type": "rawKeyDown", + "unmodifiedText": "n", + "windowsVirtualKeyCode": 78 +} +[1532468102.886][DEBUG]: DEVTOOLS RESPONSE Input.dispatchKeyEvent (id=39) { + +} +[1532468102.886][DEBUG]: DEVTOOLS COMMAND Input.dispatchKeyEvent (id=40) { + "code": "KeyN", + "key": "n", + "modifiers": 0, + "text": "n", + "type": "char", + "unmodifiedText": "n", + "windowsVirtualKeyCode": 78 +} +[1532468102.892][DEBUG]: DEVTOOLS RESPONSE Input.dispatchKeyEvent (id=40) { + +} +[1532468102.893][DEBUG]: DEVTOOLS COMMAND Input.dispatchKeyEvent (id=41) { + "code": "KeyN", + "key": "n", + "modifiers": 0, + "text": "n", + "type": "keyUp", + "unmodifiedText": "n", + "windowsVirtualKeyCode": 78 +} +[1532468102.898][DEBUG]: DEVTOOLS RESPONSE Input.dispatchKeyEvent (id=41) { + +} +[1532468102.899][DEBUG]: DEVTOOLS COMMAND Input.dispatchKeyEvent (id=42) { + "code": "KeyO", + "key": "o", + "modifiers": 0, + "text": "o", + "type": "rawKeyDown", + "unmodifiedText": "o", + "windowsVirtualKeyCode": 79 +} +[1532468102.902][DEBUG]: DEVTOOLS RESPONSE Input.dispatchKeyEvent (id=42) { + +} +[1532468102.902][DEBUG]: DEVTOOLS COMMAND Input.dispatchKeyEvent (id=43) { + "code": "KeyO", + "key": "o", + "modifiers": 0, + "text": "o", + "type": "char", + "unmodifiedText": "o", + "windowsVirtualKeyCode": 79 +} +[1532468102.908][DEBUG]: DEVTOOLS RESPONSE Input.dispatchKeyEvent (id=43) { + +} +[1532468102.909][DEBUG]: DEVTOOLS COMMAND Input.dispatchKeyEvent (id=44) { + "code": "KeyO", + "key": "o", + "modifiers": 0, + "text": "o", + "type": "keyUp", + "unmodifiedText": "o", + "windowsVirtualKeyCode": 79 +} +[1532468102.915][DEBUG]: DEVTOOLS RESPONSE Input.dispatchKeyEvent (id=44) { + +} +[1532468102.916][DEBUG]: DEVTOOLS COMMAND Input.dispatchKeyEvent (id=45) { + "code": "KeyO", + "key": "o", + "modifiers": 0, + "text": "o", + "type": "rawKeyDown", + "unmodifiedText": "o", + "windowsVirtualKeyCode": 79 +} +[1532468102.924][DEBUG]: DEVTOOLS RESPONSE Input.dispatchKeyEvent (id=45) { + +} +[1532468102.924][DEBUG]: DEVTOOLS COMMAND Input.dispatchKeyEvent (id=46) { + "code": "KeyO", + "key": "o", + "modifiers": 0, + "text": "o", + "type": "char", + "unmodifiedText": "o", + "windowsVirtualKeyCode": 79 +} +[1532468102.930][DEBUG]: DEVTOOLS RESPONSE Input.dispatchKeyEvent (id=46) { + +} +[1532468102.931][DEBUG]: DEVTOOLS COMMAND Input.dispatchKeyEvent (id=47) { + "code": "KeyO", + "key": "o", + "modifiers": 0, + "text": "o", + "type": "keyUp", + "unmodifiedText": "o", + "windowsVirtualKeyCode": 79 +} +[1532468102.933][DEBUG]: DEVTOOLS RESPONSE Input.dispatchKeyEvent (id=47) { + +} +[1532468102.933][DEBUG]: DEVTOOLS COMMAND Input.dispatchKeyEvent (id=48) { + "code": "KeyP", + "key": "p", + "modifiers": 0, + "text": "p", + "type": "rawKeyDown", + "unmodifiedText": "p", + "windowsVirtualKeyCode": 80 +} +[1532468102.935][DEBUG]: DEVTOOLS RESPONSE Input.dispatchKeyEvent (id=48) { + +} +[1532468102.936][DEBUG]: DEVTOOLS COMMAND Input.dispatchKeyEvent (id=49) { + "code": "KeyP", + "key": "p", + "modifiers": 0, + "text": "p", + "type": "char", + "unmodifiedText": "p", + "windowsVirtualKeyCode": 80 +} +[1532468102.942][DEBUG]: DEVTOOLS RESPONSE Input.dispatchKeyEvent (id=49) { + +} +[1532468102.942][DEBUG]: DEVTOOLS COMMAND Input.dispatchKeyEvent (id=50) { + "code": "KeyP", + "key": "p", + "modifiers": 0, + "text": "p", + "type": "keyUp", + "unmodifiedText": "p", + "windowsVirtualKeyCode": 80 +} +[1532468102.944][DEBUG]: DEVTOOLS RESPONSE Input.dispatchKeyEvent (id=50) { + +} +[1532468102.944][DEBUG]: DEVTOOLS COMMAND Input.dispatchKeyEvent (id=51) { + "code": "KeyY", + "key": "y", + "modifiers": 0, + "text": "y", + "type": "rawKeyDown", + "unmodifiedText": "y", + "windowsVirtualKeyCode": 89 +} +[1532468102.948][DEBUG]: DEVTOOLS RESPONSE Input.dispatchKeyEvent (id=51) { + +} +[1532468102.949][DEBUG]: DEVTOOLS COMMAND Input.dispatchKeyEvent (id=52) { + "code": "KeyY", + "key": "y", + "modifiers": 0, + "text": "y", + "type": "char", + "unmodifiedText": "y", + "windowsVirtualKeyCode": 89 +} +[1532468102.959][DEBUG]: DEVTOOLS RESPONSE Input.dispatchKeyEvent (id=52) { + +} +[1532468102.959][DEBUG]: DEVTOOLS COMMAND Input.dispatchKeyEvent (id=53) { + "code": "KeyY", + "key": "y", + "modifiers": 0, + "text": "y", + "type": "keyUp", + "unmodifiedText": "y", + "windowsVirtualKeyCode": 89 +} +[1532468102.964][DEBUG]: DEVTOOLS RESPONSE Input.dispatchKeyEvent (id=53) { + +} +[1532468102.964][INFO]: Waiting for pending navigations... +[1532468102.964][DEBUG]: DEVTOOLS COMMAND Runtime.evaluate (id=54) { + "expression": "1" +} +[1532468102.965][DEBUG]: DEVTOOLS RESPONSE Runtime.evaluate (id=54) { + "result": { + "description": "1", + "type": "number", + "value": 1 + } +} +[1532468102.965][INFO]: Done waiting for pending navigations. Status: ok +[1532468102.966][INFO]: [6d5e45968d65d60b943ee611bcb23a83] RESPONSE Type +[1532468102.967][INFO]: [6d5e45968d65d60b943ee611bcb23a83] COMMAND Type { + "value": [ "" ] +} +[1532468102.967][INFO]: Waiting for pending navigations... +[1532468102.967][DEBUG]: DEVTOOLS COMMAND Runtime.evaluate (id=55) { + "expression": "1" +} +[1532468102.969][DEBUG]: DEVTOOLS RESPONSE Runtime.evaluate (id=55) { + "result": { + "description": "1", + "type": "number", + "value": 1 + } +} +[1532468102.969][INFO]: Done waiting for pending navigations. Status: ok +[1532468102.969][DEBUG]: DEVTOOLS COMMAND Input.dispatchKeyEvent (id=56) { + "code": "Tab", + "key": "Tab", + "modifiers": 0, + "text": "\t", + "type": "rawKeyDown", + "unmodifiedText": "\t", + "windowsVirtualKeyCode": 9 +} +[1532468102.977][DEBUG]: DEVTOOLS RESPONSE Input.dispatchKeyEvent (id=56) { + +} +[1532468102.977][DEBUG]: DEVTOOLS COMMAND Input.dispatchKeyEvent (id=57) { + "code": "Tab", + "key": "Tab", + "modifiers": 0, + "text": "\t", + "type": "char", + "unmodifiedText": "\t", + "windowsVirtualKeyCode": 9 +} +[1532468102.979][DEBUG]: DEVTOOLS RESPONSE Input.dispatchKeyEvent (id=57) { + +} +[1532468102.979][DEBUG]: DEVTOOLS COMMAND Input.dispatchKeyEvent (id=58) { + "code": "Tab", + "key": "Tab", + "modifiers": 0, + "text": "\t", + "type": "keyUp", + "unmodifiedText": "\t", + "windowsVirtualKeyCode": 9 +} +[1532468102.983][DEBUG]: DEVTOOLS RESPONSE Input.dispatchKeyEvent (id=58) { + +} +[1532468102.983][INFO]: Waiting for pending navigations... +[1532468102.983][DEBUG]: DEVTOOLS COMMAND Runtime.evaluate (id=59) { + "expression": "1" +} +[1532468102.985][DEBUG]: DEVTOOLS RESPONSE Runtime.evaluate (id=59) { + "result": { + "description": "1", + "type": "number", + "value": 1 + } +} +[1532468102.985][INFO]: Done waiting for pending navigations. Status: ok +[1532468102.985][INFO]: [6d5e45968d65d60b943ee611bcb23a83] RESPONSE Type +[1532468102.987][INFO]: [6d5e45968d65d60b943ee611bcb23a83] COMMAND Type { + "value": [ "p", "r", "i", "c", "k", "l", "y", " ", "p", "e", "t", "e" ] +} +[1532468102.987][INFO]: Waiting for pending navigations... +[1532468102.987][DEBUG]: DEVTOOLS COMMAND Runtime.evaluate (id=60) { + "expression": "1" +} +[1532468102.989][DEBUG]: DEVTOOLS RESPONSE Runtime.evaluate (id=60) { + "result": { + "description": "1", + "type": "number", + "value": 1 + } +} +[1532468102.989][INFO]: Done waiting for pending navigations. Status: ok +[1532468102.990][DEBUG]: DEVTOOLS COMMAND Input.dispatchKeyEvent (id=61) { + "code": "KeyP", + "key": "p", + "modifiers": 0, + "text": "p", + "type": "rawKeyDown", + "unmodifiedText": "p", + "windowsVirtualKeyCode": 80 +} +[1532468102.993][DEBUG]: DEVTOOLS RESPONSE Input.dispatchKeyEvent (id=61) { + +} +[1532468102.993][DEBUG]: DEVTOOLS COMMAND Input.dispatchKeyEvent (id=62) { + "code": "KeyP", + "key": "p", + "modifiers": 0, + "text": "p", + "type": "char", + "unmodifiedText": "p", + "windowsVirtualKeyCode": 80 +} +[1532468102.999][DEBUG]: DEVTOOLS RESPONSE Input.dispatchKeyEvent (id=62) { + +} +[1532468102.999][DEBUG]: DEVTOOLS COMMAND Input.dispatchKeyEvent (id=63) { + "code": "KeyP", + "key": "p", + "modifiers": 0, + "text": "p", + "type": "keyUp", + "unmodifiedText": "p", + "windowsVirtualKeyCode": 80 +} +[1532468103.009][DEBUG]: DEVTOOLS RESPONSE Input.dispatchKeyEvent (id=63) { + +} +[1532468103.009][DEBUG]: DEVTOOLS COMMAND Input.dispatchKeyEvent (id=64) { + "code": "KeyR", + "key": "r", + "modifiers": 0, + "text": "r", + "type": "rawKeyDown", + "unmodifiedText": "r", + "windowsVirtualKeyCode": 82 +} +[1532468103.012][DEBUG]: DEVTOOLS RESPONSE Input.dispatchKeyEvent (id=64) { + +} +[1532468103.012][DEBUG]: DEVTOOLS COMMAND Input.dispatchKeyEvent (id=65) { + "code": "KeyR", + "key": "r", + "modifiers": 0, + "text": "r", + "type": "char", + "unmodifiedText": "r", + "windowsVirtualKeyCode": 82 +} +[1532468103.018][DEBUG]: DEVTOOLS RESPONSE Input.dispatchKeyEvent (id=65) { + +} +[1532468103.018][DEBUG]: DEVTOOLS COMMAND Input.dispatchKeyEvent (id=66) { + "code": "KeyR", + "key": "r", + "modifiers": 0, + "text": "r", + "type": "keyUp", + "unmodifiedText": "r", + "windowsVirtualKeyCode": 82 +} +[1532468103.024][DEBUG]: DEVTOOLS RESPONSE Input.dispatchKeyEvent (id=66) { + +} +[1532468103.024][DEBUG]: DEVTOOLS COMMAND Input.dispatchKeyEvent (id=67) { + "code": "KeyI", + "key": "i", + "modifiers": 0, + "text": "i", + "type": "rawKeyDown", + "unmodifiedText": "i", + "windowsVirtualKeyCode": 73 +} +[1532468103.027][DEBUG]: DEVTOOLS RESPONSE Input.dispatchKeyEvent (id=67) { + +} +[1532468103.028][DEBUG]: DEVTOOLS COMMAND Input.dispatchKeyEvent (id=68) { + "code": "KeyI", + "key": "i", + "modifiers": 0, + "text": "i", + "type": "char", + "unmodifiedText": "i", + "windowsVirtualKeyCode": 73 +} +[1532468103.034][DEBUG]: DEVTOOLS RESPONSE Input.dispatchKeyEvent (id=68) { + +} +[1532468103.035][DEBUG]: DEVTOOLS COMMAND Input.dispatchKeyEvent (id=69) { + "code": "KeyI", + "key": "i", + "modifiers": 0, + "text": "i", + "type": "keyUp", + "unmodifiedText": "i", + "windowsVirtualKeyCode": 73 +} +[1532468103.045][DEBUG]: DEVTOOLS RESPONSE Input.dispatchKeyEvent (id=69) { + +} +[1532468103.045][DEBUG]: DEVTOOLS COMMAND Input.dispatchKeyEvent (id=70) { + "code": "KeyC", + "key": "c", + "modifiers": 0, + "text": "c", + "type": "rawKeyDown", + "unmodifiedText": "c", + "windowsVirtualKeyCode": 67 +} +[1532468103.048][DEBUG]: DEVTOOLS RESPONSE Input.dispatchKeyEvent (id=70) { + +} +[1532468103.048][DEBUG]: DEVTOOLS COMMAND Input.dispatchKeyEvent (id=71) { + "code": "KeyC", + "key": "c", + "modifiers": 0, + "text": "c", + "type": "char", + "unmodifiedText": "c", + "windowsVirtualKeyCode": 67 +} +[1532468103.054][DEBUG]: DEVTOOLS RESPONSE Input.dispatchKeyEvent (id=71) { + +} +[1532468103.054][DEBUG]: DEVTOOLS COMMAND Input.dispatchKeyEvent (id=72) { + "code": "KeyC", + "key": "c", + "modifiers": 0, + "text": "c", + "type": "keyUp", + "unmodifiedText": "c", + "windowsVirtualKeyCode": 67 +} +[1532468103.060][DEBUG]: DEVTOOLS RESPONSE Input.dispatchKeyEvent (id=72) { + +} +[1532468103.061][DEBUG]: DEVTOOLS COMMAND Input.dispatchKeyEvent (id=73) { + "code": "KeyK", + "key": "k", + "modifiers": 0, + "text": "k", + "type": "rawKeyDown", + "unmodifiedText": "k", + "windowsVirtualKeyCode": 75 +} +[1532468103.063][DEBUG]: DEVTOOLS RESPONSE Input.dispatchKeyEvent (id=73) { + +} +[1532468103.064][DEBUG]: DEVTOOLS COMMAND Input.dispatchKeyEvent (id=74) { + "code": "KeyK", + "key": "k", + "modifiers": 0, + "text": "k", + "type": "char", + "unmodifiedText": "k", + "windowsVirtualKeyCode": 75 +} +[1532468103.070][DEBUG]: DEVTOOLS RESPONSE Input.dispatchKeyEvent (id=74) { + +} +[1532468103.070][DEBUG]: DEVTOOLS COMMAND Input.dispatchKeyEvent (id=75) { + "code": "KeyK", + "key": "k", + "modifiers": 0, + "text": "k", + "type": "keyUp", + "unmodifiedText": "k", + "windowsVirtualKeyCode": 75 +} +[1532468103.078][DEBUG]: DEVTOOLS RESPONSE Input.dispatchKeyEvent (id=75) { + +} +[1532468103.078][DEBUG]: DEVTOOLS COMMAND Input.dispatchKeyEvent (id=76) { + "code": "KeyL", + "key": "l", + "modifiers": 0, + "text": "l", + "type": "rawKeyDown", + "unmodifiedText": "l", + "windowsVirtualKeyCode": 76 +} +[1532468103.082][DEBUG]: DEVTOOLS RESPONSE Input.dispatchKeyEvent (id=76) { + +} +[1532468103.082][DEBUG]: DEVTOOLS COMMAND Input.dispatchKeyEvent (id=77) { + "code": "KeyL", + "key": "l", + "modifiers": 0, + "text": "l", + "type": "char", + "unmodifiedText": "l", + "windowsVirtualKeyCode": 76 +} +[1532468103.088][DEBUG]: DEVTOOLS RESPONSE Input.dispatchKeyEvent (id=77) { + +} +[1532468103.088][DEBUG]: DEVTOOLS COMMAND Input.dispatchKeyEvent (id=78) { + "code": "KeyL", + "key": "l", + "modifiers": 0, + "text": "l", + "type": "keyUp", + "unmodifiedText": "l", + "windowsVirtualKeyCode": 76 +} +[1532468103.090][DEBUG]: DEVTOOLS RESPONSE Input.dispatchKeyEvent (id=78) { + +} +[1532468103.090][DEBUG]: DEVTOOLS COMMAND Input.dispatchKeyEvent (id=79) { + "code": "KeyY", + "key": "y", + "modifiers": 0, + "text": "y", + "type": "rawKeyDown", + "unmodifiedText": "y", + "windowsVirtualKeyCode": 89 +} +[1532468103.093][DEBUG]: DEVTOOLS RESPONSE Input.dispatchKeyEvent (id=79) { + +} +[1532468103.094][DEBUG]: DEVTOOLS COMMAND Input.dispatchKeyEvent (id=80) { + "code": "KeyY", + "key": "y", + "modifiers": 0, + "text": "y", + "type": "char", + "unmodifiedText": "y", + "windowsVirtualKeyCode": 89 +} +[1532468103.102][DEBUG]: DEVTOOLS RESPONSE Input.dispatchKeyEvent (id=80) { + +} +[1532468103.102][DEBUG]: DEVTOOLS COMMAND Input.dispatchKeyEvent (id=81) { + "code": "KeyY", + "key": "y", + "modifiers": 0, + "text": "y", + "type": "keyUp", + "unmodifiedText": "y", + "windowsVirtualKeyCode": 89 +} +[1532468103.105][DEBUG]: DEVTOOLS RESPONSE Input.dispatchKeyEvent (id=81) { + +} +[1532468103.105][DEBUG]: DEVTOOLS COMMAND Input.dispatchKeyEvent (id=82) { + "code": "Space", + "key": " ", + "modifiers": 0, + "text": " ", + "type": "rawKeyDown", + "unmodifiedText": " ", + "windowsVirtualKeyCode": 32 +} +[1532468103.108][DEBUG]: DEVTOOLS RESPONSE Input.dispatchKeyEvent (id=82) { + +} +[1532468103.108][DEBUG]: DEVTOOLS COMMAND Input.dispatchKeyEvent (id=83) { + "code": "Space", + "key": " ", + "modifiers": 0, + "text": " ", + "type": "char", + "unmodifiedText": " ", + "windowsVirtualKeyCode": 32 +} +[1532468103.114][DEBUG]: DEVTOOLS RESPONSE Input.dispatchKeyEvent (id=83) { + +} +[1532468103.115][DEBUG]: DEVTOOLS COMMAND Input.dispatchKeyEvent (id=84) { + "code": "Space", + "key": " ", + "modifiers": 0, + "text": " ", + "type": "keyUp", + "unmodifiedText": " ", + "windowsVirtualKeyCode": 32 +} +[1532468103.120][DEBUG]: DEVTOOLS RESPONSE Input.dispatchKeyEvent (id=84) { + +} +[1532468103.120][DEBUG]: DEVTOOLS COMMAND Input.dispatchKeyEvent (id=85) { + "code": "KeyP", + "key": "p", + "modifiers": 0, + "text": "p", + "type": "rawKeyDown", + "unmodifiedText": "p", + "windowsVirtualKeyCode": 80 +} +[1532468103.125][DEBUG]: DEVTOOLS RESPONSE Input.dispatchKeyEvent (id=85) { + +} +[1532468103.125][DEBUG]: DEVTOOLS COMMAND Input.dispatchKeyEvent (id=86) { + "code": "KeyP", + "key": "p", + "modifiers": 0, + "text": "p", + "type": "char", + "unmodifiedText": "p", + "windowsVirtualKeyCode": 80 +} +[1532468103.132][DEBUG]: DEVTOOLS RESPONSE Input.dispatchKeyEvent (id=86) { + +} +[1532468103.132][DEBUG]: DEVTOOLS COMMAND Input.dispatchKeyEvent (id=87) { + "code": "KeyP", + "key": "p", + "modifiers": 0, + "text": "p", + "type": "keyUp", + "unmodifiedText": "p", + "windowsVirtualKeyCode": 80 +} +[1532468103.141][DEBUG]: DEVTOOLS RESPONSE Input.dispatchKeyEvent (id=87) { + +} +[1532468103.141][DEBUG]: DEVTOOLS COMMAND Input.dispatchKeyEvent (id=88) { + "code": "KeyE", + "key": "e", + "modifiers": 0, + "text": "e", + "type": "rawKeyDown", + "unmodifiedText": "e", + "windowsVirtualKeyCode": 69 +} +[1532468103.144][DEBUG]: DEVTOOLS RESPONSE Input.dispatchKeyEvent (id=88) { + +} +[1532468103.144][DEBUG]: DEVTOOLS COMMAND Input.dispatchKeyEvent (id=89) { + "code": "KeyE", + "key": "e", + "modifiers": 0, + "text": "e", + "type": "char", + "unmodifiedText": "e", + "windowsVirtualKeyCode": 69 +} +[1532468103.151][DEBUG]: DEVTOOLS RESPONSE Input.dispatchKeyEvent (id=89) { + +} +[1532468103.151][DEBUG]: DEVTOOLS COMMAND Input.dispatchKeyEvent (id=90) { + "code": "KeyE", + "key": "e", + "modifiers": 0, + "text": "e", + "type": "keyUp", + "unmodifiedText": "e", + "windowsVirtualKeyCode": 69 +} +[1532468103.159][DEBUG]: DEVTOOLS RESPONSE Input.dispatchKeyEvent (id=90) { + +} +[1532468103.159][DEBUG]: DEVTOOLS COMMAND Input.dispatchKeyEvent (id=91) { + "code": "KeyT", + "key": "t", + "modifiers": 0, + "text": "t", + "type": "rawKeyDown", + "unmodifiedText": "t", + "windowsVirtualKeyCode": 84 +} +[1532468103.162][DEBUG]: DEVTOOLS RESPONSE Input.dispatchKeyEvent (id=91) { + +} +[1532468103.162][DEBUG]: DEVTOOLS COMMAND Input.dispatchKeyEvent (id=92) { + "code": "KeyT", + "key": "t", + "modifiers": 0, + "text": "t", + "type": "char", + "unmodifiedText": "t", + "windowsVirtualKeyCode": 84 +} +[1532468103.169][DEBUG]: DEVTOOLS RESPONSE Input.dispatchKeyEvent (id=92) { + +} +[1532468103.169][DEBUG]: DEVTOOLS COMMAND Input.dispatchKeyEvent (id=93) { + "code": "KeyT", + "key": "t", + "modifiers": 0, + "text": "t", + "type": "keyUp", + "unmodifiedText": "t", + "windowsVirtualKeyCode": 84 +} +[1532468103.175][DEBUG]: DEVTOOLS RESPONSE Input.dispatchKeyEvent (id=93) { + +} +[1532468103.176][DEBUG]: DEVTOOLS COMMAND Input.dispatchKeyEvent (id=94) { + "code": "KeyE", + "key": "e", + "modifiers": 0, + "text": "e", + "type": "rawKeyDown", + "unmodifiedText": "e", + "windowsVirtualKeyCode": 69 +} +[1532468103.178][DEBUG]: DEVTOOLS RESPONSE Input.dispatchKeyEvent (id=94) { + +} +[1532468103.179][DEBUG]: DEVTOOLS COMMAND Input.dispatchKeyEvent (id=95) { + "code": "KeyE", + "key": "e", + "modifiers": 0, + "text": "e", + "type": "char", + "unmodifiedText": "e", + "windowsVirtualKeyCode": 69 +} +[1532468103.184][DEBUG]: DEVTOOLS RESPONSE Input.dispatchKeyEvent (id=95) { + +} +[1532468103.185][DEBUG]: DEVTOOLS COMMAND Input.dispatchKeyEvent (id=96) { + "code": "KeyE", + "key": "e", + "modifiers": 0, + "text": "e", + "type": "keyUp", + "unmodifiedText": "e", + "windowsVirtualKeyCode": 69 +} +[1532468103.191][DEBUG]: DEVTOOLS RESPONSE Input.dispatchKeyEvent (id=96) { + +} +[1532468103.191][INFO]: Waiting for pending navigations... +[1532468103.191][DEBUG]: DEVTOOLS COMMAND Runtime.evaluate (id=97) { + "expression": "1" +} +[1532468103.193][DEBUG]: DEVTOOLS RESPONSE Runtime.evaluate (id=97) { + "result": { + "description": "1", + "type": "number", + "value": 1 + } +} +[1532468103.193][INFO]: Done waiting for pending navigations. Status: ok +[1532468103.193][INFO]: [6d5e45968d65d60b943ee611bcb23a83] RESPONSE Type +[1532468103.194][INFO]: [6d5e45968d65d60b943ee611bcb23a83] COMMAND ExecuteScript { + "args": [ { + "ELEMENT": "0.3723424408638141-1" + } ], + "script": "return arguments[0].value;" +} +[1532468103.194][INFO]: Waiting for pending navigations... +[1532468103.194][DEBUG]: DEVTOOLS COMMAND Runtime.evaluate (id=98) { + "expression": "1" +} +[1532468103.196][DEBUG]: DEVTOOLS RESPONSE Runtime.evaluate (id=98) { + "result": { + "description": "1", + "type": "number", + "value": 1 + } +} +[1532468103.196][INFO]: Done waiting for pending navigations. Status: ok +[1532468103.197][DEBUG]: DEVTOOLS COMMAND Runtime.evaluate (id=99) { + "expression": "(function() { // Copyright (c) 2012 The Chromium Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style license that can be\n// found in the LICENSE file.\n\n/**\n * Enum f...", + "returnByValue": true +} +[1532468103.204][DEBUG]: DEVTOOLS RESPONSE Runtime.evaluate (id=99) { + "result": { + "type": "object", + "value": { + "status": 0, + "value": "snoopy" + } + } +} +[1532468103.204][INFO]: Waiting for pending navigations... +[1532468103.204][DEBUG]: DEVTOOLS COMMAND Runtime.evaluate (id=100) { + "expression": "1" +} +[1532468103.206][DEBUG]: DEVTOOLS RESPONSE Runtime.evaluate (id=100) { + "result": { + "description": "1", + "type": "number", + "value": 1 + } +} +[1532468103.206][INFO]: Done waiting for pending navigations. Status: ok +[1532468103.206][INFO]: [6d5e45968d65d60b943ee611bcb23a83] RESPONSE ExecuteScript "snoopy" +[1532468103.208][INFO]: [6d5e45968d65d60b943ee611bcb23a83] COMMAND ExecuteScript { + "args": [ { + "ELEMENT": "0.3723424408638141-2" + } ], + "script": "return arguments[0].value;" +} +[1532468103.208][INFO]: Waiting for pending navigations... +[1532468103.208][DEBUG]: DEVTOOLS COMMAND Runtime.evaluate (id=101) { + "expression": "1" +} +[1532468103.217][DEBUG]: DEVTOOLS RESPONSE Runtime.evaluate (id=101) { + "result": { + "description": "1", + "type": "number", + "value": 1 + } +} +[1532468103.217][INFO]: Done waiting for pending navigations. Status: ok +[1532468103.218][DEBUG]: DEVTOOLS COMMAND Runtime.evaluate (id=102) { + "expression": "(function() { // Copyright (c) 2012 The Chromium Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style license that can be\n// found in the LICENSE file.\n\n/**\n * Enum f...", + "returnByValue": true +} +[1532468103.223][DEBUG]: DEVTOOLS RESPONSE Runtime.evaluate (id=102) { + "result": { + "type": "object", + "value": { + "status": 0, + "value": "prickly pete" + } + } +} +[1532468103.223][INFO]: Waiting for pending navigations... +[1532468103.223][DEBUG]: DEVTOOLS COMMAND Runtime.evaluate (id=103) { + "expression": "1" +} +[1532468103.224][DEBUG]: DEVTOOLS RESPONSE Runtime.evaluate (id=103) { + "result": { + "description": "1", + "type": "number", + "value": 1 + } +} +[1532468103.224][INFO]: Done waiting for pending navigations. Status: ok +[1532468103.224][INFO]: [6d5e45968d65d60b943ee611bcb23a83] RESPONSE ExecuteScript "prickly pete" +[1532468103.225][INFO]: [6d5e45968d65d60b943ee611bcb23a83] COMMAND Quit { + +} +[0724/143503.238812:ERROR:nacl_helper_linux.cc(310)] NaCl helper process running without a sandbox! +Most likely you need to configure your SUID sandbox correctly +[1532468103.276][INFO]: [6d5e45968d65d60b943ee611bcb23a83] RESPONSE Quit +[1532468103.276][DEBUG]: Log type 'driver' lost 0 entries on destruction +[1532468103.276][DEBUG]: Log type 'browser' lost 1 entries on destruction
diff --git a/chrome/test/chromedriver/log_replay/test_data/testSessionHandling.log b/chrome/test/chromedriver/log_replay/test_data/testSessionHandling.log new file mode 100644 index 0000000..ebf6cfc0 --- /dev/null +++ b/chrome/test/chromedriver/log_replay/test_data/testSessionHandling.log
@@ -0,0 +1,1126 @@ +[1532468143.519][INFO]: [b7919c08764a6be3a5edde34f8ffa097] COMMAND InitSession { + "desiredCapabilities": { + "chromeOptions": { + "args": [ "no-sandbox", "disable-gpu" ], + "binary": "/usr/local/google/home/cwinstanley/chromium/src/out/Default/chrome" + }, + "goog:testName": "__main__.SessionHandlingTest.testGetSessions", + "loggingPrefs": { + + } + } +} +[1532468143.520][INFO]: Populating Preferences file: { + "alternate_error_pages": { + "enabled": false + }, + "autofill": { + "enabled": false + }, + "browser": { + "check_default_browser": false + }, + "distribution": { + "import_bookmarks": false, + "import_history": false, + "import_search_engine": false, + "make_chrome_default_for_user": false, + "skip_first_run_ui": true + }, + "dns_prefetching": { + "enabled": false + }, + "profile": { + "content_settings": { + "pattern_pairs": { + "https://*,*": { + "media-stream": { + "audio": "Default", + "video": "Default" + } + } + } + }, + "default_content_setting_values": { + "geolocation": 1 + }, + "default_content_settings": { + "geolocation": 1, + "mouselock": 1, + "notifications": 1, + "popups": 1, + "ppapi-broker": 1 + }, + "password_manager_enabled": false + }, + "safebrowsing": { + "enabled": false + }, + "search": { + "suggest_enabled": false + }, + "translate": { + "enabled": false + } +} +[1532468143.521][INFO]: Populating Local State file: { + "background_mode": { + "enabled": false + }, + "ssl": { + "rev_checking": { + "enabled": false + } + } +} +[1532468143.522][INFO]: Launching chrome: /usr/local/google/home/cwinstanley/chromium/src/out/Default/chrome --disable-background-networking --disable-client-side-phishing-detection --disable-default-apps --disable-gpu --disable-hang-monitor --disable-popup-blocking --disable-prompt-on-repost --disable-sync --disable-web-resources --enable-automation --enable-logging --force-fieldtrials=SiteIsolationExtensions/Control --ignore-certificate-errors --load-extension=/tmp/.org.chromium.Chromium.nUfa4i/internal --log-level=0 --metrics-recording-only --no-first-run --no-sandbox --password-store=basic --remote-debugging-port=0 --test-type=webdriver --use-mock-keychain --user-data-dir=/tmp/.org.chromium.Chromium.c1hIGw data:, +[3507:3507:0724/143545.359252:ERROR:gpu_process_transport_factory.cc(642)] Switching to software compositing. +[3507:3507:0724/143545.359322:ERROR:gpu_process_transport_factory.cc(1007)] Lost UI shared context. +[3507:3507:0724/143545.435224:WARNING:account_consistency_mode_manager.cc(290)] Desktop Identity Consistency cannot be enabled as no OAuth client ID and client secret have been configured. +[3507:3507:0724/143545.435355:WARNING:account_consistency_mode_manager.cc(290)] Desktop Identity Consistency cannot be enabled as no OAuth client ID and client secret have been configured. +[3507:3507:0724/143545.435405:WARNING:account_consistency_mode_manager.cc(290)] Desktop Identity Consistency cannot be enabled as no OAuth client ID and client secret have been configured. +[3507:3507:0724/143545.435453:WARNING:account_consistency_mode_manager.cc(290)] Desktop Identity Consistency cannot be enabled as no OAuth client ID and client secret have been configured. +[3507:3507:0724/143545.436451:WARNING:account_consistency_mode_manager.cc(290)] Desktop Identity Consistency cannot be enabled as no OAuth client ID and client secret have been configured. +[3507:3507:0724/143545.443120:WARNING:account_consistency_mode_manager.cc(290)] Desktop Identity Consistency cannot be enabled as no OAuth client ID and client secret have been configured. +[3507:3507:0724/143545.487992:WARNING:account_consistency_mode_manager.cc(290)] Desktop Identity Consistency cannot be enabled as no OAuth client ID and client secret have been configured. +[3507:3507:0724/143545.523122:WARNING:account_consistency_mode_manager.cc(290)] Desktop Identity Consistency cannot be enabled as no OAuth client ID and client secret have been configured. +[3507:3507:0724/143545.523196:WARNING:account_consistency_mode_manager.cc(290)] Desktop Identity Consistency cannot be enabled as no OAuth client ID and client secret have been configured. + +DevTools listening on ws://127.0.0.1:33587/devtools/browser/c1d315dd-ed31-4be7-9345-c1b0d374d7e6 +[1532468145.574][DEBUG]: DevTools request: http://localhost:33587/json/version +[3507:3507:0724/143545.670461:WARNING:password_store_factory.cc(253)] Using basic (unencrypted) store for password storage. See https://chromium.googlesource.com/chromium/src/+/master/docs/linux_password_storage.md for more information about password storage options. +[3507:3507:0724/143545.673085:WARNING:account_consistency_mode_manager.cc(290)] Desktop Identity Consistency cannot be enabled as no OAuth client ID and client secret have been configured. +[1532468145.893][DEBUG]: DevTools response: { + "Browser": "Chrome/69.0.3491.0", + "Protocol-Version": "1.3", + "User-Agent": "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/69.0.3491.0 Safari/537.36", + "V8-Version": "6.9.389", + "WebKit-Version": "537.36 (@410f2c4912d46a5fae2fe6c0b2e24d9eb6359761)", + "webSocketDebuggerUrl": "ws://localhost:33587/devtools/browser/c1d315dd-ed31-4be7-9345-c1b0d374d7e6" +} + +[1532468145.932][DEBUG]: DevTools request: http://localhost:33587/json +[1532468145.973][DEBUG]: DevTools response: [ { + "description": "", + "devtoolsFrontendUrl": "/devtools/inspector.html?ws=localhost:33587/devtools/page/37FF0C676D00FD125FAC95855A116452", + "id": "37FF0C676D00FD125FAC95855A116452", + "title": "Chrome Automation Extension", + "type": "background_page", + "url": "chrome-extension://aapnijgdinlhnhlmodcfapnahmbfebeb/_generated_background_page.html", + "webSocketDebuggerUrl": "ws://localhost:33587/devtools/page/37FF0C676D00FD125FAC95855A116452" +}, { + "description": "", + "devtoolsFrontendUrl": "/devtools/inspector.html?ws=localhost:33587/devtools/page/842EF36C6EE636761FD2607954800C95", + "id": "842EF36C6EE636761FD2607954800C95", + "title": "", + "type": "page", + "url": "data:,", + "webSocketDebuggerUrl": "ws://localhost:33587/devtools/page/842EF36C6EE636761FD2607954800C95" +} ] + +[1532468145.974][DEBUG]: DevTools request: http://localhost:33587/json +[1532468145.984][DEBUG]: DevTools response: [ { + "description": "", + "devtoolsFrontendUrl": "/devtools/inspector.html?ws=localhost:33587/devtools/page/37FF0C676D00FD125FAC95855A116452", + "id": "37FF0C676D00FD125FAC95855A116452", + "title": "Chrome Automation Extension", + "type": "background_page", + "url": "chrome-extension://aapnijgdinlhnhlmodcfapnahmbfebeb/_generated_background_page.html", + "webSocketDebuggerUrl": "ws://localhost:33587/devtools/page/37FF0C676D00FD125FAC95855A116452" +}, { + "description": "", + "devtoolsFrontendUrl": "/devtools/inspector.html?ws=localhost:33587/devtools/page/842EF36C6EE636761FD2607954800C95", + "id": "842EF36C6EE636761FD2607954800C95", + "title": "", + "type": "page", + "url": "data:,", + "webSocketDebuggerUrl": "ws://localhost:33587/devtools/page/842EF36C6EE636761FD2607954800C95" +} ] + +[1532468145.986][INFO]: resolved localhost to ["::1","127.0.0.1"] +[1532468145.992][DEBUG]: DEVTOOLS COMMAND Log.enable (id=1) { + +} +[1532468145.993][DEBUG]: DEVTOOLS COMMAND DOM.getDocument (id=2) { + +} +[1532468145.993][DEBUG]: DEVTOOLS COMMAND Target.setAutoAttach (id=3) { + "autoAttach": true, + "waitForDebuggerOnStart": false +} +[1532468145.993][DEBUG]: DEVTOOLS COMMAND Page.enable (id=4) { + +} +[1532468145.993][DEBUG]: DEVTOOLS COMMAND Page.enable (id=5) { + +} +[1532468146.065][DEBUG]: DEVTOOLS RESPONSE Log.enable (id=1) { + +} +[1532468146.066][DEBUG]: DEVTOOLS RESPONSE DOM.getDocument (id=2) { + "root": { + "backendNodeId": 2, + "baseURL": "data:,", + "childNodeCount": 1, + "children": [ { + "attributes": [ ], + "backendNodeId": 3, + "childNodeCount": 2, + "children": [ { + "attributes": [ ], + "backendNodeId": 4, + "childNodeCount": 0, + "localName": "head", + "nodeId": 3, + "nodeName": "HEAD", + "nodeType": 1, + "nodeValue": "", + "parentId": 2 + }, { + "attributes": [ ], + "backendNodeId": 5, + "childNodeCount": 0, + "localName": "body", + "nodeId": 4, + "nodeName": "BODY", + "nodeType": 1, + "nodeValue": "", + "parentId": 2 + } ], + "frameId": "842EF36C6EE636761FD2607954800C95", + "localName": "html", + "nodeId": 2, + "nodeName": "HTML", + "nodeType": 1, + "nodeValue": "", + "parentId": 1 + } ], + "documentURL": "data:,", + "localName": "", + "nodeId": 1, + "nodeName": "#document", + "nodeType": 9, + "nodeValue": "", + "xmlVersion": "" + } +} +[1532468146.066][DEBUG]: DEVTOOLS RESPONSE Target.setAutoAttach (id=3) { + +} +[1532468146.066][DEBUG]: DEVTOOLS RESPONSE Page.enable (id=4) { + +} +[1532468146.066][DEBUG]: DEVTOOLS RESPONSE Page.enable (id=5) { + +} +[1532468146.067][DEBUG]: DEVTOOLS COMMAND Runtime.enable (id=6) { + +} +[1532468146.111][DEBUG]: DEVTOOLS EVENT Runtime.executionContextCreated { + "context": { + "auxData": { + "frameId": "842EF36C6EE636761FD2607954800C95", + "isDefault": true + }, + "id": 1, + "name": "", + "origin": "://" + } +} +[1532468146.111][DEBUG]: DEVTOOLS RESPONSE Runtime.enable (id=6) { + +} +[1532468146.111][DEBUG]: DEVTOOLS COMMAND Page.enable (id=7) { + +} +[1532468146.132][DEBUG]: DEVTOOLS RESPONSE Page.enable (id=7) { + +} +[1532468146.132][DEBUG]: DEVTOOLS COMMAND Runtime.enable (id=8) { + +} +[1532468146.134][DEBUG]: DEVTOOLS RESPONSE Runtime.enable (id=8) { + +} +[1532468146.135][DEBUG]: DEVTOOLS COMMAND Runtime.evaluate (id=9) { + "expression": "(function() { // Copyright (c) 2012 The Chromium Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style license that can be\n// found in the LICENSE file.\n\n/**\n * Enum f...", + "returnByValue": true +} +[1532468146.157][DEBUG]: DEVTOOLS RESPONSE Runtime.evaluate (id=9) { + "result": { + "type": "object", + "value": { + "status": 0, + "value": 1 + } + } +} +[1532468146.157][INFO]: [b7919c08764a6be3a5edde34f8ffa097] RESPONSE InitSession { + "acceptInsecureCerts": false, + "acceptSslCerts": false, + "applicationCacheEnabled": false, + "browserConnectionEnabled": false, + "browserName": "chrome", + "chrome": { + "chromedriverVersion": "2.40 (1ba6d2ec0853ea1d507bccc09f540f5ea1db0394)", + "userDataDir": "/tmp/.org.chromium.Chromium.c1hIGw" + }, + "cssSelectorsEnabled": true, + "databaseEnabled": false, + "goog:chromeOptions": { + "debuggerAddress": "localhost:33587" + }, + "handlesAlerts": true, + "hasTouchScreen": false, + "javascriptEnabled": true, + "locationContextEnabled": true, + "mobileEmulationEnabled": false, + "nativeEvents": true, + "networkConnectionEnabled": false, + "pageLoadStrategy": "normal", + "platform": "Linux", + "rotatable": false, + "setWindowRect": true, + "takesHeapSnapshot": true, + "takesScreenshot": true, + "unexpectedAlertBehaviour": "", + "version": "69.0.3491.0", + "webStorageEnabled": true +} +[1532468146.159][INFO]: [b7919c08764a6be3a5edde34f8ffa097] COMMAND GetSessions { + +} +[1532468146.159][INFO]: [b7919c08764a6be3a5edde34f8ffa097] RESPONSE GetSessions { + "acceptInsecureCerts": false, + "acceptSslCerts": false, + "applicationCacheEnabled": false, + "browserConnectionEnabled": false, + "browserName": "chrome", + "chrome": { + "chromedriverVersion": "2.40 (1ba6d2ec0853ea1d507bccc09f540f5ea1db0394)", + "userDataDir": "/tmp/.org.chromium.Chromium.c1hIGw" + }, + "cssSelectorsEnabled": true, + "databaseEnabled": false, + "goog:chromeOptions": { + "debuggerAddress": "localhost:33587" + }, + "handlesAlerts": true, + "hasTouchScreen": false, + "javascriptEnabled": true, + "locationContextEnabled": true, + "mobileEmulationEnabled": false, + "nativeEvents": true, + "networkConnectionEnabled": false, + "pageLoadStrategy": "normal", + "platform": "Linux", + "rotatable": false, + "setWindowRect": true, + "takesHeapSnapshot": true, + "takesScreenshot": true, + "unexpectedAlertBehaviour": "", + "version": "69.0.3491.0", + "webStorageEnabled": true +} +[1532468146.161][INFO]: [49361790d8d0e13379798515c44a56c5] COMMAND InitSession { + "desiredCapabilities": { + "chromeOptions": { + "args": [ "no-sandbox", "disable-gpu" ], + "binary": "/usr/local/google/home/cwinstanley/chromium/src/out/Default/chrome" + }, + "goog:testName": "__main__.SessionHandlingTest.testGetSessions", + "loggingPrefs": { + + } + } +} +[1532468146.161][INFO]: Populating Preferences file: { + "alternate_error_pages": { + "enabled": false + }, + "autofill": { + "enabled": false + }, + "browser": { + "check_default_browser": false + }, + "distribution": { + "import_bookmarks": false, + "import_history": false, + "import_search_engine": false, + "make_chrome_default_for_user": false, + "skip_first_run_ui": true + }, + "dns_prefetching": { + "enabled": false + }, + "profile": { + "content_settings": { + "pattern_pairs": { + "https://*,*": { + "media-stream": { + "audio": "Default", + "video": "Default" + } + } + } + }, + "default_content_setting_values": { + "geolocation": 1 + }, + "default_content_settings": { + "geolocation": 1, + "mouselock": 1, + "notifications": 1, + "popups": 1, + "ppapi-broker": 1 + }, + "password_manager_enabled": false + }, + "safebrowsing": { + "enabled": false + }, + "search": { + "suggest_enabled": false + }, + "translate": { + "enabled": false + } +} +[1532468146.162][INFO]: Populating Local State file: { + "background_mode": { + "enabled": false + }, + "ssl": { + "rev_checking": { + "enabled": false + } + } +} +[1532468146.162][INFO]: Launching chrome: /usr/local/google/home/cwinstanley/chromium/src/out/Default/chrome --disable-background-networking --disable-client-side-phishing-detection --disable-default-apps --disable-gpu --disable-hang-monitor --disable-popup-blocking --disable-prompt-on-repost --disable-sync --disable-web-resources --enable-automation --enable-logging --force-fieldtrials=SiteIsolationExtensions/Control --ignore-certificate-errors --load-extension=/tmp/.org.chromium.Chromium.DPQLwc/internal --log-level=0 --metrics-recording-only --no-first-run --no-sandbox --password-store=basic --remote-debugging-port=0 --test-type=webdriver --use-mock-keychain --user-data-dir=/tmp/.org.chromium.Chromium.wPBnNf data:, +[3588:3588:0724/143547.869544:ERROR:gpu_process_transport_factory.cc(642)] Switching to software compositing. +[3588:3588:0724/143547.869609:ERROR:gpu_process_transport_factory.cc(1007)] Lost UI shared context. +[3588:3588:0724/143547.943446:WARNING:account_consistency_mode_manager.cc(290)] Desktop Identity Consistency cannot be enabled as no OAuth client ID and client secret have been configured. +[3588:3588:0724/143547.943545:WARNING:account_consistency_mode_manager.cc(290)] Desktop Identity Consistency cannot be enabled as no OAuth client ID and client secret have been configured. +[3588:3588:0724/143547.943588:WARNING:account_consistency_mode_manager.cc(290)] Desktop Identity Consistency cannot be enabled as no OAuth client ID and client secret have been configured. +[3588:3588:0724/143547.943646:WARNING:account_consistency_mode_manager.cc(290)] Desktop Identity Consistency cannot be enabled as no OAuth client ID and client secret have been configured. +[3588:3588:0724/143547.944526:WARNING:account_consistency_mode_manager.cc(290)] Desktop Identity Consistency cannot be enabled as no OAuth client ID and client secret have been configured. +[3588:3588:0724/143547.951262:WARNING:account_consistency_mode_manager.cc(290)] Desktop Identity Consistency cannot be enabled as no OAuth client ID and client secret have been configured. +[3588:3588:0724/143547.995103:WARNING:account_consistency_mode_manager.cc(290)] Desktop Identity Consistency cannot be enabled as no OAuth client ID and client secret have been configured. +[3588:3588:0724/143548.026229:WARNING:account_consistency_mode_manager.cc(290)] Desktop Identity Consistency cannot be enabled as no OAuth client ID and client secret have been configured. +[3588:3588:0724/143548.026302:WARNING:account_consistency_mode_manager.cc(290)] Desktop Identity Consistency cannot be enabled as no OAuth client ID and client secret have been configured. + +DevTools listening on ws://127.0.0.1:41835/devtools/browser/0bc34805-2225-418b-87fa-ced82bcdd83e +[1532468148.055][DEBUG]: DevTools request: http://localhost:41835/json/version +[3588:3588:0724/143548.175228:WARNING:password_store_factory.cc(253)] Using basic (unencrypted) store for password storage. See https://chromium.googlesource.com/chromium/src/+/master/docs/linux_password_storage.md for more information about password storage options. +[3588:3588:0724/143548.178498:WARNING:account_consistency_mode_manager.cc(290)] Desktop Identity Consistency cannot be enabled as no OAuth client ID and client secret have been configured. +[1532468148.351][DEBUG]: DevTools response: { + "Browser": "Chrome/69.0.3491.0", + "Protocol-Version": "1.3", + "User-Agent": "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/69.0.3491.0 Safari/537.36", + "V8-Version": "6.9.389", + "WebKit-Version": "537.36 (@410f2c4912d46a5fae2fe6c0b2e24d9eb6359761)", + "webSocketDebuggerUrl": "ws://localhost:41835/devtools/browser/0bc34805-2225-418b-87fa-ced82bcdd83e" +} + +[1532468148.396][DEBUG]: DevTools request: http://localhost:41835/json +[1532468148.426][DEBUG]: DevTools response: [ { + "description": "", + "devtoolsFrontendUrl": "/devtools/inspector.html?ws=localhost:41835/devtools/page/A1171B4190447C1973AEAC3DFE0BF2F5", + "id": "A1171B4190447C1973AEAC3DFE0BF2F5", + "title": "Chrome Automation Extension", + "type": "background_page", + "url": "chrome-extension://aapnijgdinlhnhlmodcfapnahmbfebeb/_generated_background_page.html", + "webSocketDebuggerUrl": "ws://localhost:41835/devtools/page/A1171B4190447C1973AEAC3DFE0BF2F5" +}, { + "description": "", + "devtoolsFrontendUrl": "/devtools/inspector.html?ws=localhost:41835/devtools/page/D8B3F1675D01A709B514C4A044CCB6E1", + "id": "D8B3F1675D01A709B514C4A044CCB6E1", + "title": "", + "type": "page", + "url": "data:,", + "webSocketDebuggerUrl": "ws://localhost:41835/devtools/page/D8B3F1675D01A709B514C4A044CCB6E1" +} ] + +[1532468148.427][DEBUG]: DevTools request: http://localhost:41835/json +[1532468148.429][DEBUG]: DevTools response: [ { + "description": "", + "devtoolsFrontendUrl": "/devtools/inspector.html?ws=localhost:41835/devtools/page/A1171B4190447C1973AEAC3DFE0BF2F5", + "id": "A1171B4190447C1973AEAC3DFE0BF2F5", + "title": "Chrome Automation Extension", + "type": "background_page", + "url": "chrome-extension://aapnijgdinlhnhlmodcfapnahmbfebeb/_generated_background_page.html", + "webSocketDebuggerUrl": "ws://localhost:41835/devtools/page/A1171B4190447C1973AEAC3DFE0BF2F5" +}, { + "description": "", + "devtoolsFrontendUrl": "/devtools/inspector.html?ws=localhost:41835/devtools/page/D8B3F1675D01A709B514C4A044CCB6E1", + "id": "D8B3F1675D01A709B514C4A044CCB6E1", + "title": "", + "type": "page", + "url": "data:,", + "webSocketDebuggerUrl": "ws://localhost:41835/devtools/page/D8B3F1675D01A709B514C4A044CCB6E1" +} ] + +[1532468148.430][INFO]: resolved localhost to ["::1","127.0.0.1"] +[1532468148.433][DEBUG]: DEVTOOLS COMMAND Log.enable (id=1) { + +} +[1532468148.433][DEBUG]: DEVTOOLS COMMAND DOM.getDocument (id=2) { + +} +[1532468148.433][DEBUG]: DEVTOOLS COMMAND Target.setAutoAttach (id=3) { + "autoAttach": true, + "waitForDebuggerOnStart": false +} +[1532468148.433][DEBUG]: DEVTOOLS COMMAND Page.enable (id=4) { + +} +[1532468148.434][DEBUG]: DEVTOOLS COMMAND Page.enable (id=5) { + +} +[1532468148.446][DEBUG]: DEVTOOLS RESPONSE Log.enable (id=1) { + +} +[1532468148.447][DEBUG]: DEVTOOLS RESPONSE DOM.getDocument (id=2) { + "root": { + "backendNodeId": 1, + "baseURL": "about:blank", + "childNodeCount": 1, + "children": [ { + "attributes": [ ], + "backendNodeId": 2, + "childNodeCount": 2, + "children": [ { + "attributes": [ ], + "backendNodeId": 3, + "childNodeCount": 0, + "localName": "head", + "nodeId": 3, + "nodeName": "HEAD", + "nodeType": 1, + "nodeValue": "", + "parentId": 2 + }, { + "attributes": [ ], + "backendNodeId": 4, + "childNodeCount": 0, + "localName": "body", + "nodeId": 4, + "nodeName": "BODY", + "nodeType": 1, + "nodeValue": "", + "parentId": 2 + } ], + "frameId": "D8B3F1675D01A709B514C4A044CCB6E1", + "localName": "html", + "nodeId": 2, + "nodeName": "HTML", + "nodeType": 1, + "nodeValue": "", + "parentId": 1 + } ], + "documentURL": "", + "localName": "", + "nodeId": 1, + "nodeName": "#document", + "nodeType": 9, + "nodeValue": "", + "xmlVersion": "" + } +} +[1532468148.447][DEBUG]: DEVTOOLS RESPONSE Target.setAutoAttach (id=3) { + +} +[1532468148.447][DEBUG]: DEVTOOLS RESPONSE Page.enable (id=4) { + +} +[1532468148.447][DEBUG]: DEVTOOLS RESPONSE Page.enable (id=5) { + +} +[1532468148.447][DEBUG]: DEVTOOLS COMMAND Runtime.enable (id=6) { + +} +[1532468148.531][DEBUG]: DEVTOOLS EVENT Page.frameNavigated { + "frame": { + "id": "D8B3F1675D01A709B514C4A044CCB6E1", + "loaderId": "A0FAB082AAF1BED17ECEDE2C681A9A0F", + "mimeType": "text/plain", + "securityOrigin": "://", + "url": "data:," + } +} +[1532468148.531][DEBUG]: DEVTOOLS EVENT DOM.documentUpdated { + +} +[1532468148.531][DEBUG]: DEVTOOLS COMMAND DOM.getDocument (id=7) { + +} +[1532468148.532][DEBUG]: DEVTOOLS EVENT Page.loadEventFired { + "timestamp": 80832.803339 +} +[1532468148.532][DEBUG]: DEVTOOLS EVENT Page.frameStoppedLoading { + "frameId": "D8B3F1675D01A709B514C4A044CCB6E1" +} +[1532468148.532][DEBUG]: DEVTOOLS EVENT DOM.documentUpdated { + +} +[1532468148.532][DEBUG]: DEVTOOLS COMMAND DOM.getDocument (id=8) { + +} +[1532468148.532][DEBUG]: DEVTOOLS EVENT Page.domContentEventFired { + "timestamp": 80832.805975 +} +[1532468148.538][DEBUG]: DEVTOOLS EVENT Runtime.executionContextCreated { + "context": { + "auxData": { + "frameId": "D8B3F1675D01A709B514C4A044CCB6E1", + "isDefault": true + }, + "id": 1, + "name": "", + "origin": "://" + } +} +[1532468148.538][DEBUG]: DEVTOOLS RESPONSE Runtime.enable (id=6) { + +} +[1532468148.540][DEBUG]: DEVTOOLS EVENT Page.frameResized { + +} +[1532468148.562][DEBUG]: DEVTOOLS RESPONSE DOM.getDocument (id=7) { + "root": { + "backendNodeId": 5, + "baseURL": "data:,", + "childNodeCount": 1, + "children": [ { + "attributes": [ ], + "backendNodeId": 6, + "childNodeCount": 2, + "children": [ { + "attributes": [ ], + "backendNodeId": 7, + "childNodeCount": 0, + "localName": "head", + "nodeId": 7, + "nodeName": "HEAD", + "nodeType": 1, + "nodeValue": "", + "parentId": 6 + }, { + "attributes": [ ], + "backendNodeId": 8, + "childNodeCount": 0, + "localName": "body", + "nodeId": 8, + "nodeName": "BODY", + "nodeType": 1, + "nodeValue": "", + "parentId": 6 + } ], + "frameId": "D8B3F1675D01A709B514C4A044CCB6E1", + "localName": "html", + "nodeId": 6, + "nodeName": "HTML", + "nodeType": 1, + "nodeValue": "", + "parentId": 5 + } ], + "documentURL": "data:,", + "localName": "", + "nodeId": 5, + "nodeName": "#document", + "nodeType": 9, + "nodeValue": "", + "xmlVersion": "" + } +} +[1532468148.562][DEBUG]: DEVTOOLS RESPONSE DOM.getDocument (id=8) { + "root": { + "backendNodeId": 5, + "baseURL": "data:,", + "childNodeCount": 1, + "children": [ { + "attributes": [ ], + "backendNodeId": 6, + "childNodeCount": 2, + "children": [ { + "attributes": [ ], + "backendNodeId": 7, + "childNodeCount": 0, + "localName": "head", + "nodeId": 11, + "nodeName": "HEAD", + "nodeType": 1, + "nodeValue": "", + "parentId": 10 + }, { + "attributes": [ ], + "backendNodeId": 8, + "childNodeCount": 0, + "localName": "body", + "nodeId": 12, + "nodeName": "BODY", + "nodeType": 1, + "nodeValue": "", + "parentId": 10 + } ], + "frameId": "D8B3F1675D01A709B514C4A044CCB6E1", + "localName": "html", + "nodeId": 10, + "nodeName": "HTML", + "nodeType": 1, + "nodeValue": "", + "parentId": 9 + } ], + "documentURL": "data:,", + "localName": "", + "nodeId": 9, + "nodeName": "#document", + "nodeType": 9, + "nodeValue": "", + "xmlVersion": "" + } +} +[1532468148.563][DEBUG]: DEVTOOLS COMMAND Page.enable (id=9) { + +} +[1532468148.593][DEBUG]: DEVTOOLS RESPONSE Page.enable (id=9) { + +} +[1532468148.593][DEBUG]: DEVTOOLS COMMAND Runtime.enable (id=10) { + +} +[1532468148.614][DEBUG]: DEVTOOLS RESPONSE Runtime.enable (id=10) { + +} +[1532468148.615][DEBUG]: DEVTOOLS COMMAND Runtime.evaluate (id=11) { + "expression": "(function() { // Copyright (c) 2012 The Chromium Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style license that can be\n// found in the LICENSE file.\n\n/**\n * Enum f...", + "returnByValue": true +} +[1532468148.640][DEBUG]: DEVTOOLS RESPONSE Runtime.evaluate (id=11) { + "result": { + "type": "object", + "value": { + "status": 0, + "value": 1 + } + } +} +[1532468148.640][INFO]: [49361790d8d0e13379798515c44a56c5] RESPONSE InitSession { + "acceptInsecureCerts": false, + "acceptSslCerts": false, + "applicationCacheEnabled": false, + "browserConnectionEnabled": false, + "browserName": "chrome", + "chrome": { + "chromedriverVersion": "2.40 (1ba6d2ec0853ea1d507bccc09f540f5ea1db0394)", + "userDataDir": "/tmp/.org.chromium.Chromium.wPBnNf" + }, + "cssSelectorsEnabled": true, + "databaseEnabled": false, + "goog:chromeOptions": { + "debuggerAddress": "localhost:41835" + }, + "handlesAlerts": true, + "hasTouchScreen": false, + "javascriptEnabled": true, + "locationContextEnabled": true, + "mobileEmulationEnabled": false, + "nativeEvents": true, + "networkConnectionEnabled": false, + "pageLoadStrategy": "normal", + "platform": "Linux", + "rotatable": false, + "setWindowRect": true, + "takesHeapSnapshot": true, + "takesScreenshot": true, + "unexpectedAlertBehaviour": "", + "version": "69.0.3491.0", + "webStorageEnabled": true +} +[1532468148.642][INFO]: [49361790d8d0e13379798515c44a56c5] COMMAND GetSessions { + +} +[1532468148.642][INFO]: [b7919c08764a6be3a5edde34f8ffa097] COMMAND GetSessions { + +} +[1532468148.642][INFO]: [49361790d8d0e13379798515c44a56c5] RESPONSE GetSessions { + "acceptInsecureCerts": false, + "acceptSslCerts": false, + "applicationCacheEnabled": false, + "browserConnectionEnabled": false, + "browserName": "chrome", + "chrome": { + "chromedriverVersion": "2.40 (1ba6d2ec0853ea1d507bccc09f540f5ea1db0394)", + "userDataDir": "/tmp/.org.chromium.Chromium.wPBnNf" + }, + "cssSelectorsEnabled": true, + "databaseEnabled": false, + "goog:chromeOptions": { + "debuggerAddress": "localhost:41835" + }, + "handlesAlerts": true, + "hasTouchScreen": false, + "javascriptEnabled": true, + "locationContextEnabled": true, + "mobileEmulationEnabled": false, + "nativeEvents": true, + "networkConnectionEnabled": false, + "pageLoadStrategy": "normal", + "platform": "Linux", + "rotatable": false, + "setWindowRect": true, + "takesHeapSnapshot": true, + "takesScreenshot": true, + "unexpectedAlertBehaviour": "", + "version": "69.0.3491.0", + "webStorageEnabled": true +} +[1532468148.642][INFO]: [b7919c08764a6be3a5edde34f8ffa097] RESPONSE GetSessions { + "acceptInsecureCerts": false, + "acceptSslCerts": false, + "applicationCacheEnabled": false, + "browserConnectionEnabled": false, + "browserName": "chrome", + "chrome": { + "chromedriverVersion": "2.40 (1ba6d2ec0853ea1d507bccc09f540f5ea1db0394)", + "userDataDir": "/tmp/.org.chromium.Chromium.c1hIGw" + }, + "cssSelectorsEnabled": true, + "databaseEnabled": false, + "goog:chromeOptions": { + "debuggerAddress": "localhost:33587" + }, + "handlesAlerts": true, + "hasTouchScreen": false, + "javascriptEnabled": true, + "locationContextEnabled": true, + "mobileEmulationEnabled": false, + "nativeEvents": true, + "networkConnectionEnabled": false, + "pageLoadStrategy": "normal", + "platform": "Linux", + "rotatable": false, + "setWindowRect": true, + "takesHeapSnapshot": true, + "takesScreenshot": true, + "unexpectedAlertBehaviour": "", + "version": "69.0.3491.0", + "webStorageEnabled": true +} +[1532468148.644][INFO]: [b7919c08764a6be3a5edde34f8ffa097] COMMAND Quit { + +} +[0724/143548.660595:ERROR:nacl_helper_linux.cc(310)] NaCl helper process running without a sandbox! +Most likely you need to configure your SUID sandbox correctly +[1532468148.694][INFO]: [b7919c08764a6be3a5edde34f8ffa097] RESPONSE Quit +[1532468148.694][DEBUG]: Log type 'driver' lost 0 entries on destruction +[1532468148.694][DEBUG]: Log type 'browser' lost 0 entries on destruction +[1532468148.695][INFO]: [49361790d8d0e13379798515c44a56c5] COMMAND Quit { + +} +[0724/143548.710331:ERROR:nacl_helper_linux.cc(310)] NaCl helper process running without a sandbox! +Most likely you need to configure your SUID sandbox correctly +[1532468148.745][INFO]: [49361790d8d0e13379798515c44a56c5] RESPONSE Quit +[1532468148.745][DEBUG]: Log type 'driver' lost 0 entries on destruction +[1532468148.746][DEBUG]: Log type 'browser' lost 0 entries on destruction +[1532468148.747][INFO]: [c71ab77a013559201ad73727515fe795] COMMAND InitSession { + "desiredCapabilities": { + "chromeOptions": { + "args": [ "no-sandbox", "disable-gpu" ], + "binary": "/usr/local/google/home/cwinstanley/chromium/src/out/Default/chrome" + }, + "goog:testName": "__main__.SessionHandlingTest.testQuitASessionMoreThanOnce", + "loggingPrefs": { + + } + } +} +[1532468148.748][INFO]: Populating Preferences file: { + "alternate_error_pages": { + "enabled": false + }, + "autofill": { + "enabled": false + }, + "browser": { + "check_default_browser": false + }, + "distribution": { + "import_bookmarks": false, + "import_history": false, + "import_search_engine": false, + "make_chrome_default_for_user": false, + "skip_first_run_ui": true + }, + "dns_prefetching": { + "enabled": false + }, + "profile": { + "content_settings": { + "pattern_pairs": { + "https://*,*": { + "media-stream": { + "audio": "Default", + "video": "Default" + } + } + } + }, + "default_content_setting_values": { + "geolocation": 1 + }, + "default_content_settings": { + "geolocation": 1, + "mouselock": 1, + "notifications": 1, + "popups": 1, + "ppapi-broker": 1 + }, + "password_manager_enabled": false + }, + "safebrowsing": { + "enabled": false + }, + "search": { + "suggest_enabled": false + }, + "translate": { + "enabled": false + } +} +[1532468148.748][INFO]: Populating Local State file: { + "background_mode": { + "enabled": false + }, + "ssl": { + "rev_checking": { + "enabled": false + } + } +} +[1532468148.749][INFO]: Launching chrome: /usr/local/google/home/cwinstanley/chromium/src/out/Default/chrome --disable-background-networking --disable-client-side-phishing-detection --disable-default-apps --disable-gpu --disable-hang-monitor --disable-popup-blocking --disable-prompt-on-repost --disable-sync --disable-web-resources --enable-automation --enable-logging --force-fieldtrials=SiteIsolationExtensions/Control --ignore-certificate-errors --load-extension=/tmp/.org.chromium.Chromium.6sJKgq/internal --log-level=0 --metrics-recording-only --no-first-run --no-sandbox --password-store=basic --remote-debugging-port=0 --test-type=webdriver --use-mock-keychain --user-data-dir=/tmp/.org.chromium.Chromium.uB9Eoj data:, +[3685:3685:0724/143550.486869:ERROR:gpu_process_transport_factory.cc(642)] Switching to software compositing. +[3685:3685:0724/143550.486946:ERROR:gpu_process_transport_factory.cc(1007)] Lost UI shared context. +[3685:3685:0724/143550.575285:WARNING:account_consistency_mode_manager.cc(290)] Desktop Identity Consistency cannot be enabled as no OAuth client ID and client secret have been configured. +[3685:3685:0724/143550.575409:WARNING:account_consistency_mode_manager.cc(290)] Desktop Identity Consistency cannot be enabled as no OAuth client ID and client secret have been configured. +[3685:3685:0724/143550.575461:WARNING:account_consistency_mode_manager.cc(290)] Desktop Identity Consistency cannot be enabled as no OAuth client ID and client secret have been configured. +[3685:3685:0724/143550.575510:WARNING:account_consistency_mode_manager.cc(290)] Desktop Identity Consistency cannot be enabled as no OAuth client ID and client secret have been configured. +[3685:3685:0724/143550.576493:WARNING:account_consistency_mode_manager.cc(290)] Desktop Identity Consistency cannot be enabled as no OAuth client ID and client secret have been configured. +[3685:3685:0724/143550.583711:WARNING:account_consistency_mode_manager.cc(290)] Desktop Identity Consistency cannot be enabled as no OAuth client ID and client secret have been configured. +[3685:3685:0724/143550.629569:WARNING:account_consistency_mode_manager.cc(290)] Desktop Identity Consistency cannot be enabled as no OAuth client ID and client secret have been configured. +[3685:3685:0724/143550.660996:WARNING:account_consistency_mode_manager.cc(290)] Desktop Identity Consistency cannot be enabled as no OAuth client ID and client secret have been configured. +[3685:3685:0724/143550.661063:WARNING:account_consistency_mode_manager.cc(290)] Desktop Identity Consistency cannot be enabled as no OAuth client ID and client secret have been configured. + +DevTools listening on ws://127.0.0.1:41703/devtools/browser/47333ffa-87dd-4b65-8850-3e35c7247a2a +[1532468150.729][DEBUG]: DevTools request: http://localhost:41703/json/version +[3685:3685:0724/143550.801380:WARNING:password_store_factory.cc(253)] Using basic (unencrypted) store for password storage. See https://chromium.googlesource.com/chromium/src/+/master/docs/linux_password_storage.md for more information about password storage options. +[3685:3685:0724/143550.804098:WARNING:account_consistency_mode_manager.cc(290)] Desktop Identity Consistency cannot be enabled as no OAuth client ID and client secret have been configured. +[1532468151.008][DEBUG]: DevTools response: { + "Browser": "Chrome/69.0.3491.0", + "Protocol-Version": "1.3", + "User-Agent": "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/69.0.3491.0 Safari/537.36", + "V8-Version": "6.9.389", + "WebKit-Version": "537.36 (@410f2c4912d46a5fae2fe6c0b2e24d9eb6359761)", + "webSocketDebuggerUrl": "ws://localhost:41703/devtools/browser/47333ffa-87dd-4b65-8850-3e35c7247a2a" +} + +[1532468151.049][DEBUG]: DevTools request: http://localhost:41703/json +[1532468151.091][DEBUG]: DevTools response: [ { + "description": "", + "devtoolsFrontendUrl": "/devtools/inspector.html?ws=localhost:41703/devtools/page/7CE07F617781D2206375E2124CCDE4B5", + "id": "7CE07F617781D2206375E2124CCDE4B5", + "title": "Chrome Automation Extension", + "type": "background_page", + "url": "chrome-extension://aapnijgdinlhnhlmodcfapnahmbfebeb/_generated_background_page.html", + "webSocketDebuggerUrl": "ws://localhost:41703/devtools/page/7CE07F617781D2206375E2124CCDE4B5" +}, { + "description": "", + "devtoolsFrontendUrl": "/devtools/inspector.html?ws=localhost:41703/devtools/page/30C5F8843192AE63BA2A8741A0FA7B6D", + "id": "30C5F8843192AE63BA2A8741A0FA7B6D", + "title": "", + "type": "page", + "url": "data:,", + "webSocketDebuggerUrl": "ws://localhost:41703/devtools/page/30C5F8843192AE63BA2A8741A0FA7B6D" +} ] + +[1532468151.092][DEBUG]: DevTools request: http://localhost:41703/json +[1532468151.099][DEBUG]: DevTools response: [ { + "description": "", + "devtoolsFrontendUrl": "/devtools/inspector.html?ws=localhost:41703/devtools/page/7CE07F617781D2206375E2124CCDE4B5", + "id": "7CE07F617781D2206375E2124CCDE4B5", + "title": "Chrome Automation Extension", + "type": "background_page", + "url": "chrome-extension://aapnijgdinlhnhlmodcfapnahmbfebeb/_generated_background_page.html", + "webSocketDebuggerUrl": "ws://localhost:41703/devtools/page/7CE07F617781D2206375E2124CCDE4B5" +}, { + "description": "", + "devtoolsFrontendUrl": "/devtools/inspector.html?ws=localhost:41703/devtools/page/30C5F8843192AE63BA2A8741A0FA7B6D", + "id": "30C5F8843192AE63BA2A8741A0FA7B6D", + "title": "", + "type": "page", + "url": "data:,", + "webSocketDebuggerUrl": "ws://localhost:41703/devtools/page/30C5F8843192AE63BA2A8741A0FA7B6D" +} ] + +[1532468151.100][INFO]: resolved localhost to ["::1","127.0.0.1"] +[1532468151.107][DEBUG]: DEVTOOLS COMMAND Log.enable (id=1) { + +} +[1532468151.107][DEBUG]: DEVTOOLS COMMAND DOM.getDocument (id=2) { + +} +[1532468151.108][DEBUG]: DEVTOOLS COMMAND Target.setAutoAttach (id=3) { + "autoAttach": true, + "waitForDebuggerOnStart": false +} +[1532468151.108][DEBUG]: DEVTOOLS COMMAND Page.enable (id=4) { + +} +[1532468151.108][DEBUG]: DEVTOOLS COMMAND Page.enable (id=5) { + +} +[1532468151.189][DEBUG]: DEVTOOLS RESPONSE Log.enable (id=1) { + +} +[1532468151.190][DEBUG]: DEVTOOLS RESPONSE DOM.getDocument (id=2) { + "root": { + "backendNodeId": 2, + "baseURL": "data:,", + "childNodeCount": 1, + "children": [ { + "attributes": [ ], + "backendNodeId": 3, + "childNodeCount": 2, + "children": [ { + "attributes": [ ], + "backendNodeId": 4, + "childNodeCount": 0, + "localName": "head", + "nodeId": 3, + "nodeName": "HEAD", + "nodeType": 1, + "nodeValue": "", + "parentId": 2 + }, { + "attributes": [ ], + "backendNodeId": 5, + "childNodeCount": 0, + "localName": "body", + "nodeId": 4, + "nodeName": "BODY", + "nodeType": 1, + "nodeValue": "", + "parentId": 2 + } ], + "frameId": "30C5F8843192AE63BA2A8741A0FA7B6D", + "localName": "html", + "nodeId": 2, + "nodeName": "HTML", + "nodeType": 1, + "nodeValue": "", + "parentId": 1 + } ], + "documentURL": "data:,", + "localName": "", + "nodeId": 1, + "nodeName": "#document", + "nodeType": 9, + "nodeValue": "", + "xmlVersion": "" + } +} +[1532468151.190][DEBUG]: DEVTOOLS RESPONSE Target.setAutoAttach (id=3) { + +} +[1532468151.190][DEBUG]: DEVTOOLS RESPONSE Page.enable (id=4) { + +} +[1532468151.190][DEBUG]: DEVTOOLS RESPONSE Page.enable (id=5) { + +} +[1532468151.190][DEBUG]: DEVTOOLS COMMAND Runtime.enable (id=6) { + +} +[1532468151.191][DEBUG]: DEVTOOLS EVENT Page.frameResized { + +} +[1532468151.255][DEBUG]: DEVTOOLS EVENT Runtime.executionContextCreated { + "context": { + "auxData": { + "frameId": "30C5F8843192AE63BA2A8741A0FA7B6D", + "isDefault": true + }, + "id": 1, + "name": "", + "origin": "://" + } +} +[1532468151.255][DEBUG]: DEVTOOLS RESPONSE Runtime.enable (id=6) { + +} +[1532468151.255][DEBUG]: DEVTOOLS COMMAND Page.enable (id=7) { + +} +[1532468151.285][DEBUG]: DEVTOOLS RESPONSE Page.enable (id=7) { + +} +[1532468151.285][DEBUG]: DEVTOOLS COMMAND Runtime.enable (id=8) { + +} +[1532468151.288][DEBUG]: DEVTOOLS RESPONSE Runtime.enable (id=8) { + +} +[1532468151.288][DEBUG]: DEVTOOLS COMMAND Runtime.evaluate (id=9) { + "expression": "(function() { // Copyright (c) 2012 The Chromium Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style license that can be\n// found in the LICENSE file.\n\n/**\n * Enum f...", + "returnByValue": true +} +[1532468151.304][DEBUG]: DEVTOOLS RESPONSE Runtime.evaluate (id=9) { + "result": { + "type": "object", + "value": { + "status": 0, + "value": 1 + } + } +} +[1532468151.304][INFO]: [c71ab77a013559201ad73727515fe795] RESPONSE InitSession { + "acceptInsecureCerts": false, + "acceptSslCerts": false, + "applicationCacheEnabled": false, + "browserConnectionEnabled": false, + "browserName": "chrome", + "chrome": { + "chromedriverVersion": "2.40 (1ba6d2ec0853ea1d507bccc09f540f5ea1db0394)", + "userDataDir": "/tmp/.org.chromium.Chromium.uB9Eoj" + }, + "cssSelectorsEnabled": true, + "databaseEnabled": false, + "goog:chromeOptions": { + "debuggerAddress": "localhost:41703" + }, + "handlesAlerts": true, + "hasTouchScreen": false, + "javascriptEnabled": true, + "locationContextEnabled": true, + "mobileEmulationEnabled": false, + "nativeEvents": true, + "networkConnectionEnabled": false, + "pageLoadStrategy": "normal", + "platform": "Linux", + "rotatable": false, + "setWindowRect": true, + "takesHeapSnapshot": true, + "takesScreenshot": true, + "unexpectedAlertBehaviour": "", + "version": "69.0.3491.0", + "webStorageEnabled": true +} +[1532468151.305][INFO]: [c71ab77a013559201ad73727515fe795] COMMAND Quit { + +} +[0724/143551.318101:ERROR:nacl_helper_linux.cc(310)] NaCl helper process running without a sandbox! +Most likely you need to configure your SUID sandbox correctly +[1532468151.355][INFO]: [c71ab77a013559201ad73727515fe795] RESPONSE Quit +[1532468151.356][DEBUG]: Log type 'driver' lost 0 entries on destruction +[1532468151.356][DEBUG]: Log type 'browser' lost 0 entries on destruction
diff --git a/chrome/test/chromedriver/log_replay/test_data/testSwitchTo.log b/chrome/test/chromedriver/log_replay/test_data/testSwitchTo.log new file mode 100644 index 0000000..ba52771 --- /dev/null +++ b/chrome/test/chromedriver/log_replay/test_data/testSwitchTo.log
@@ -0,0 +1,1360 @@ +[1532470281.943][INFO]: [c83f56dde54cd19de625c51fbc60a303] COMMAND InitSession { + "desiredCapabilities": { + "chromeOptions": { + "args": [ "no-sandbox", "disable-gpu" ], + "binary": "/usr/local/google/home/cwinstanley/chromium/src/out/Default/chrome" + }, + "goog:testName": "__main__.ChromeDriverTest.testSwitchToWindow", + "loggingPrefs": { + + } + } +} +[1532470281.944][INFO]: Populating Preferences file: { + "alternate_error_pages": { + "enabled": false + }, + "autofill": { + "enabled": false + }, + "browser": { + "check_default_browser": false + }, + "distribution": { + "import_bookmarks": false, + "import_history": false, + "import_search_engine": false, + "make_chrome_default_for_user": false, + "skip_first_run_ui": true + }, + "dns_prefetching": { + "enabled": false + }, + "profile": { + "content_settings": { + "pattern_pairs": { + "https://*,*": { + "media-stream": { + "audio": "Default", + "video": "Default" + } + } + } + }, + "default_content_setting_values": { + "geolocation": 1 + }, + "default_content_settings": { + "geolocation": 1, + "mouselock": 1, + "notifications": 1, + "popups": 1, + "ppapi-broker": 1 + }, + "password_manager_enabled": false + }, + "safebrowsing": { + "enabled": false + }, + "search": { + "suggest_enabled": false + }, + "translate": { + "enabled": false + } +} +[1532470281.944][INFO]: Populating Local State file: { + "background_mode": { + "enabled": false + }, + "ssl": { + "rev_checking": { + "enabled": false + } + } +} +[1532470281.945][INFO]: Launching chrome: /usr/local/google/home/cwinstanley/chromium/src/out/Default/chrome --disable-background-networking --disable-client-side-phishing-detection --disable-default-apps --disable-gpu --disable-hang-monitor --disable-popup-blocking --disable-prompt-on-repost --disable-sync --disable-web-resources --enable-automation --enable-logging --force-fieldtrials=SiteIsolationExtensions/Control --ignore-certificate-errors --load-extension=/tmp/.org.chromium.Chromium.t8018e/internal --log-level=0 --metrics-recording-only --no-first-run --no-sandbox --password-store=basic --remote-debugging-port=0 --test-type=webdriver --use-mock-keychain --user-data-dir=/tmp/.org.chromium.Chromium.GlZW2e data:, +[33475:33475:0724/151123.909562:ERROR:gpu_process_transport_factory.cc(642)] Switching to software compositing. +[33475:33475:0724/151123.909639:ERROR:gpu_process_transport_factory.cc(1007)] Lost UI shared context. +[33475:33475:0724/151123.995554:WARNING:account_consistency_mode_manager.cc(290)] Desktop Identity Consistency cannot be enabled as no OAuth client ID and client secret have been configured. +[33475:33475:0724/151123.995700:WARNING:account_consistency_mode_manager.cc(290)] Desktop Identity Consistency cannot be enabled as no OAuth client ID and client secret have been configured. +[33475:33475:0724/151123.995767:WARNING:account_consistency_mode_manager.cc(290)] Desktop Identity Consistency cannot be enabled as no OAuth client ID and client secret have been configured. +[33475:33475:0724/151123.995838:WARNING:account_consistency_mode_manager.cc(290)] Desktop Identity Consistency cannot be enabled as no OAuth client ID and client secret have been configured. +[33475:33475:0724/151123.997216:WARNING:account_consistency_mode_manager.cc(290)] Desktop Identity Consistency cannot be enabled as no OAuth client ID and client secret have been configured. +[33475:33475:0724/151124.006469:WARNING:account_consistency_mode_manager.cc(290)] Desktop Identity Consistency cannot be enabled as no OAuth client ID and client secret have been configured. +[33475:33475:0724/151124.057727:WARNING:account_consistency_mode_manager.cc(290)] Desktop Identity Consistency cannot be enabled as no OAuth client ID and client secret have been configured. +[33475:33475:0724/151124.090578:WARNING:account_consistency_mode_manager.cc(290)] Desktop Identity Consistency cannot be enabled as no OAuth client ID and client secret have been configured. +[33475:33475:0724/151124.090658:WARNING:account_consistency_mode_manager.cc(290)] Desktop Identity Consistency cannot be enabled as no OAuth client ID and client secret have been configured. + +DevTools listening on ws://127.0.0.1:44377/devtools/browser/fe7cca28-28ad-44ce-8a83-0be00a5ee963 +[1532470284.152][DEBUG]: DevTools request: http://localhost:44377/json/version +[33475:33475:0724/151124.273735:WARNING:password_store_factory.cc(253)] Using basic (unencrypted) store for password storage. See https://chromium.googlesource.com/chromium/src/+/master/docs/linux_password_storage.md for more information about password storage options. +[33475:33475:0724/151124.277101:WARNING:account_consistency_mode_manager.cc(290)] Desktop Identity Consistency cannot be enabled as no OAuth client ID and client secret have been configured. +[1532470284.506][DEBUG]: DevTools response: { + "Browser": "Chrome/69.0.3491.0", + "Protocol-Version": "1.3", + "User-Agent": "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/69.0.3491.0 Safari/537.36", + "V8-Version": "6.9.389", + "WebKit-Version": "537.36 (@410f2c4912d46a5fae2fe6c0b2e24d9eb6359761)", + "webSocketDebuggerUrl": "ws://localhost:44377/devtools/browser/fe7cca28-28ad-44ce-8a83-0be00a5ee963" +} + +[1532470284.557][DEBUG]: DevTools request: http://localhost:44377/json +[1532470284.594][DEBUG]: DevTools response: [ { + "description": "", + "devtoolsFrontendUrl": "/devtools/inspector.html?ws=localhost:44377/devtools/page/1DEA8904090762B68A4D0A8308AC415C", + "id": "1DEA8904090762B68A4D0A8308AC415C", + "title": "Chrome Automation Extension", + "type": "background_page", + "url": "chrome-extension://aapnijgdinlhnhlmodcfapnahmbfebeb/_generated_background_page.html", + "webSocketDebuggerUrl": "ws://localhost:44377/devtools/page/1DEA8904090762B68A4D0A8308AC415C" +}, { + "description": "", + "devtoolsFrontendUrl": "/devtools/inspector.html?ws=localhost:44377/devtools/page/ECEC8A19658F82AF02724EFF2D238B77", + "id": "ECEC8A19658F82AF02724EFF2D238B77", + "title": "", + "type": "page", + "url": "data:,", + "webSocketDebuggerUrl": "ws://localhost:44377/devtools/page/ECEC8A19658F82AF02724EFF2D238B77" +} ] + +[1532470284.595][DEBUG]: DevTools request: http://localhost:44377/json +[1532470284.605][DEBUG]: DevTools response: [ { + "description": "", + "devtoolsFrontendUrl": "/devtools/inspector.html?ws=localhost:44377/devtools/page/1DEA8904090762B68A4D0A8308AC415C", + "id": "1DEA8904090762B68A4D0A8308AC415C", + "title": "Chrome Automation Extension", + "type": "background_page", + "url": "chrome-extension://aapnijgdinlhnhlmodcfapnahmbfebeb/_generated_background_page.html", + "webSocketDebuggerUrl": "ws://localhost:44377/devtools/page/1DEA8904090762B68A4D0A8308AC415C" +}, { + "description": "", + "devtoolsFrontendUrl": "/devtools/inspector.html?ws=localhost:44377/devtools/page/ECEC8A19658F82AF02724EFF2D238B77", + "id": "ECEC8A19658F82AF02724EFF2D238B77", + "title": "", + "type": "page", + "url": "data:,", + "webSocketDebuggerUrl": "ws://localhost:44377/devtools/page/ECEC8A19658F82AF02724EFF2D238B77" +} ] + +[1532470284.606][INFO]: resolved localhost to ["::1","127.0.0.1"] +[1532470284.609][DEBUG]: DEVTOOLS COMMAND Log.enable (id=1) { + +} +[1532470284.610][DEBUG]: DEVTOOLS COMMAND DOM.getDocument (id=2) { + +} +[1532470284.610][DEBUG]: DEVTOOLS COMMAND Target.setAutoAttach (id=3) { + "autoAttach": true, + "waitForDebuggerOnStart": false +} +[1532470284.610][DEBUG]: DEVTOOLS COMMAND Page.enable (id=4) { + +} +[1532470284.610][DEBUG]: DEVTOOLS COMMAND Page.enable (id=5) { + +} +[1532470284.700][DEBUG]: DEVTOOLS RESPONSE Log.enable (id=1) { + +} +[1532470284.700][DEBUG]: DEVTOOLS RESPONSE DOM.getDocument (id=2) { + "root": { + "backendNodeId": 2, + "baseURL": "data:,", + "childNodeCount": 1, + "children": [ { + "attributes": [ ], + "backendNodeId": 3, + "childNodeCount": 2, + "children": [ { + "attributes": [ ], + "backendNodeId": 4, + "childNodeCount": 0, + "localName": "head", + "nodeId": 3, + "nodeName": "HEAD", + "nodeType": 1, + "nodeValue": "", + "parentId": 2 + }, { + "attributes": [ ], + "backendNodeId": 5, + "childNodeCount": 0, + "localName": "body", + "nodeId": 4, + "nodeName": "BODY", + "nodeType": 1, + "nodeValue": "", + "parentId": 2 + } ], + "frameId": "ECEC8A19658F82AF02724EFF2D238B77", + "localName": "html", + "nodeId": 2, + "nodeName": "HTML", + "nodeType": 1, + "nodeValue": "", + "parentId": 1 + } ], + "documentURL": "data:,", + "localName": "", + "nodeId": 1, + "nodeName": "#document", + "nodeType": 9, + "nodeValue": "", + "xmlVersion": "" + } +} +[1532470284.701][DEBUG]: DEVTOOLS RESPONSE Target.setAutoAttach (id=3) { + +} +[1532470284.701][DEBUG]: DEVTOOLS RESPONSE Page.enable (id=4) { + +} +[1532470284.701][DEBUG]: DEVTOOLS RESPONSE Page.enable (id=5) { + +} +[1532470284.701][DEBUG]: DEVTOOLS COMMAND Runtime.enable (id=6) { + +} +[1532470284.706][DEBUG]: DEVTOOLS EVENT Page.frameResized { + +} +[1532470284.739][DEBUG]: DEVTOOLS EVENT Runtime.executionContextCreated { + "context": { + "auxData": { + "frameId": "ECEC8A19658F82AF02724EFF2D238B77", + "isDefault": true + }, + "id": 1, + "name": "", + "origin": "://" + } +} +[1532470284.739][DEBUG]: DEVTOOLS RESPONSE Runtime.enable (id=6) { + +} +[1532470284.739][DEBUG]: DEVTOOLS COMMAND Page.enable (id=7) { + +} +[1532470284.751][DEBUG]: DEVTOOLS RESPONSE Page.enable (id=7) { + +} +[1532470284.752][DEBUG]: DEVTOOLS COMMAND Runtime.enable (id=8) { + +} +[1532470284.780][DEBUG]: DEVTOOLS RESPONSE Runtime.enable (id=8) { + +} +[1532470284.781][DEBUG]: DEVTOOLS COMMAND Runtime.evaluate (id=9) { + "expression": "(function() { // Copyright (c) 2012 The Chromium Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style license that can be\n// found in the LICENSE file.\n\n/**\n * Enum f...", + "returnByValue": true +} +[1532470284.799][DEBUG]: DEVTOOLS RESPONSE Runtime.evaluate (id=9) { + "result": { + "type": "object", + "value": { + "status": 0, + "value": 1 + } + } +} +[1532470284.799][INFO]: [c83f56dde54cd19de625c51fbc60a303] RESPONSE InitSession { + "acceptInsecureCerts": false, + "acceptSslCerts": false, + "applicationCacheEnabled": false, + "browserConnectionEnabled": false, + "browserName": "chrome", + "chrome": { + "chromedriverVersion": "2.40 (1ba6d2ec0853ea1d507bccc09f540f5ea1db0394)", + "userDataDir": "/tmp/.org.chromium.Chromium.GlZW2e" + }, + "cssSelectorsEnabled": true, + "databaseEnabled": false, + "goog:chromeOptions": { + "debuggerAddress": "localhost:44377" + }, + "handlesAlerts": true, + "hasTouchScreen": false, + "javascriptEnabled": true, + "locationContextEnabled": true, + "mobileEmulationEnabled": false, + "nativeEvents": true, + "networkConnectionEnabled": false, + "pageLoadStrategy": "normal", + "platform": "Linux", + "rotatable": false, + "setWindowRect": true, + "takesHeapSnapshot": true, + "takesScreenshot": true, + "unexpectedAlertBehaviour": "", + "version": "69.0.3491.0", + "webStorageEnabled": true +} +[1532470284.801][INFO]: [c83f56dde54cd19de625c51fbc60a303] COMMAND Navigate { + "url": "http://127.0.0.1:46819/chromedriver/page_test.html" +} +[1532470284.801][INFO]: Waiting for pending navigations... +[1532470284.801][DEBUG]: DEVTOOLS COMMAND Runtime.evaluate (id=10) { + "expression": "1" +} +[1532470284.804][DEBUG]: DEVTOOLS RESPONSE Runtime.evaluate (id=10) { + "result": { + "description": "1", + "type": "number", + "value": 1 + } +} +[1532470284.804][DEBUG]: DEVTOOLS COMMAND DOM.getDocument (id=11) { + +} +[1532470284.815][DEBUG]: DEVTOOLS RESPONSE DOM.getDocument (id=11) { + "root": { + "backendNodeId": 2, + "baseURL": "data:,", + "childNodeCount": 1, + "children": [ { + "attributes": [ ], + "backendNodeId": 3, + "childNodeCount": 2, + "children": [ { + "attributes": [ ], + "backendNodeId": 4, + "childNodeCount": 0, + "localName": "head", + "nodeId": 7, + "nodeName": "HEAD", + "nodeType": 1, + "nodeValue": "", + "parentId": 6 + }, { + "attributes": [ ], + "backendNodeId": 5, + "childNodeCount": 0, + "localName": "body", + "nodeId": 8, + "nodeName": "BODY", + "nodeType": 1, + "nodeValue": "", + "parentId": 6 + } ], + "frameId": "ECEC8A19658F82AF02724EFF2D238B77", + "localName": "html", + "nodeId": 6, + "nodeName": "HTML", + "nodeType": 1, + "nodeValue": "", + "parentId": 5 + } ], + "documentURL": "data:,", + "localName": "", + "nodeId": 5, + "nodeName": "#document", + "nodeType": 9, + "nodeValue": "", + "xmlVersion": "" + } +} +[1532470284.815][DEBUG]: DEVTOOLS COMMAND Runtime.evaluate (id=12) { + "expression": "var frame = document.createElement('iframe');frame.name = 'chromedriver dummy frame';frame.src = 'about:blank';document.body.appendChild(frame);window.setTimeout(function() { document.body.removeC..." +} +[1532470284.828][DEBUG]: DEVTOOLS EVENT DOM.childNodeCountUpdated { + "childNodeCount": 1, + "nodeId": 8 +} +[1532470284.829][DEBUG]: DEVTOOLS EVENT Page.frameAttached { + "frameId": "C860110358EF27C09FA80DC2F6D13D61", + "parentFrameId": "ECEC8A19658F82AF02724EFF2D238B77", + "stack": { + "callFrames": [ { + "columnNumber": 125, + "functionName": "", + "lineNumber": 0, + "scriptId": "20", + "url": "" + } ] + } +} +[1532470284.859][DEBUG]: DEVTOOLS EVENT Page.frameStartedLoading { + "frameId": "C860110358EF27C09FA80DC2F6D13D61" +} +[1532470284.859][DEBUG]: DEVTOOLS EVENT Page.frameNavigated { + "frame": { + "id": "C860110358EF27C09FA80DC2F6D13D61", + "loaderId": "E691344CB93F74F10A1EA8778DFDECA5", + "mimeType": "text/html", + "name": "chromedriver dummy frame", + "parentId": "ECEC8A19658F82AF02724EFF2D238B77", + "securityOrigin": "://", + "url": "about:blank" + } +} +[1532470284.860][DEBUG]: DEVTOOLS EVENT Runtime.executionContextCreated { + "context": { + "auxData": { + "frameId": "C860110358EF27C09FA80DC2F6D13D61", + "isDefault": true + }, + "id": 2, + "name": "", + "origin": "://" + } +} +[1532470284.860][DEBUG]: DEVTOOLS EVENT Page.frameStoppedLoading { + "frameId": "C860110358EF27C09FA80DC2F6D13D61" +} +[1532470284.860][DEBUG]: DEVTOOLS RESPONSE Runtime.evaluate (id=12) { + "result": { + "description": "1", + "type": "number", + "value": 1 + } +} +[1532470284.860][INFO]: Done waiting for pending navigations. Status: ok +[1532470284.860][DEBUG]: DEVTOOLS COMMAND Page.navigate (id=13) { + "url": "http://127.0.0.1:46819/chromedriver/page_test.html" +} +[1532470285.159][DEBUG]: DEVTOOLS EVENT DOM.childNodeCountUpdated { + "childNodeCount": 0, + "nodeId": 8 +} +[1532470285.159][DEBUG]: DEVTOOLS EVENT Runtime.executionContextDestroyed { + "executionContextId": 2 +} +[1532470285.160][DEBUG]: DEVTOOLS EVENT Page.frameDetached { + "frameId": "C860110358EF27C09FA80DC2F6D13D61" +} +[1532470285.185][DEBUG]: DEVTOOLS RESPONSE Page.navigate (id=13) { + "frameId": "ECEC8A19658F82AF02724EFF2D238B77", + "loaderId": "CAAC2BA6D1FF0CBAB3C7B01A5A197D58" +} +[1532470285.185][DEBUG]: DEVTOOLS COMMAND Runtime.evaluate (id=14) { + "expression": "document.URL" +} +[1532470285.187][DEBUG]: DEVTOOLS EVENT Runtime.executionContextsCleared { + +} +[1532470285.198][DEBUG]: DEVTOOLS EVENT Page.frameStartedLoading { + "frameId": "ECEC8A19658F82AF02724EFF2D238B77" +} +[1532470285.248][DEBUG]: DEVTOOLS EVENT Runtime.executionContextsCleared { + +} +[33520:33520:0724/151125.247911:ERROR:render_process_impl.cc(208)] WebFrame LEAKED 2 TIMES +[1532470285.248][DEBUG]: DEVTOOLS EVENT Page.frameNavigated { + "frame": { + "id": "ECEC8A19658F82AF02724EFF2D238B77", + "loaderId": "CAAC2BA6D1FF0CBAB3C7B01A5A197D58", + "mimeType": "text/html", + "securityOrigin": "http://127.0.0.1:46819", + "url": "http://127.0.0.1:46819/chromedriver/page_test.html" + } +} +[1532470285.249][DEBUG]: DEVTOOLS EVENT Runtime.executionContextCreated { + "context": { + "auxData": { + "frameId": "ECEC8A19658F82AF02724EFF2D238B77", + "isDefault": true + }, + "id": 1, + "name": "", + "origin": "http://127.0.0.1:46819" + } +} +[1532470285.249][DEBUG]: DEVTOOLS EVENT DOM.documentUpdated { + +} +[1532470285.249][DEBUG]: DEVTOOLS COMMAND DOM.getDocument (id=15) { + +} +[1532470285.313][DEBUG]: DEVTOOLS EVENT Page.loadEventFired { + "timestamp": 82969.584462 +} +[1532470285.313][DEBUG]: DEVTOOLS EVENT Page.frameStoppedLoading { + "frameId": "ECEC8A19658F82AF02724EFF2D238B77" +} +[1532470285.313][DEBUG]: DEVTOOLS EVENT DOM.documentUpdated { + +} +[1532470285.313][DEBUG]: DEVTOOLS COMMAND DOM.getDocument (id=16) { + +} +[1532470285.313][DEBUG]: DEVTOOLS EVENT Page.domContentEventFired { + "timestamp": 82969.596332 +} +[1532470285.313][DEBUG]: DEVTOOLS RESPONSE Runtime.evaluate (id=14) { + "result": { + "type": "string", + "value": "http://127.0.0.1:46819/chromedriver/page_test.html" + } +} +[1532470285.319][DEBUG]: DEVTOOLS RESPONSE DOM.getDocument (id=15) { + "root": { + "backendNodeId": 1, + "baseURL": "http://127.0.0.1:46819/chromedriver/page_test.html", + "childNodeCount": 1, + "children": [ { + "attributes": [ ], + "backendNodeId": 2, + "childNodeCount": 2, + "children": [ { + "attributes": [ ], + "backendNodeId": 3, + "childNodeCount": 2, + "localName": "head", + "nodeId": 3, + "nodeName": "HEAD", + "nodeType": 1, + "nodeValue": "", + "parentId": 2 + }, { + "attributes": [ ], + "backendNodeId": 4, + "childNodeCount": 1, + "localName": "body", + "nodeId": 4, + "nodeName": "BODY", + "nodeType": 1, + "nodeValue": "", + "parentId": 2 + } ], + "frameId": "ECEC8A19658F82AF02724EFF2D238B77", + "localName": "html", + "nodeId": 2, + "nodeName": "HTML", + "nodeType": 1, + "nodeValue": "", + "parentId": 1 + } ], + "documentURL": "http://127.0.0.1:46819/chromedriver/page_test.html", + "localName": "", + "nodeId": 1, + "nodeName": "#document", + "nodeType": 9, + "nodeValue": "", + "xmlVersion": "" + } +} +[1532470285.324][DEBUG]: DEVTOOLS RESPONSE DOM.getDocument (id=16) { + "root": { + "backendNodeId": 1, + "baseURL": "http://127.0.0.1:46819/chromedriver/page_test.html", + "childNodeCount": 1, + "children": [ { + "attributes": [ ], + "backendNodeId": 2, + "childNodeCount": 2, + "children": [ { + "attributes": [ ], + "backendNodeId": 3, + "childNodeCount": 2, + "localName": "head", + "nodeId": 7, + "nodeName": "HEAD", + "nodeType": 1, + "nodeValue": "", + "parentId": 6 + }, { + "attributes": [ ], + "backendNodeId": 4, + "childNodeCount": 1, + "localName": "body", + "nodeId": 8, + "nodeName": "BODY", + "nodeType": 1, + "nodeValue": "", + "parentId": 6 + } ], + "frameId": "ECEC8A19658F82AF02724EFF2D238B77", + "localName": "html", + "nodeId": 6, + "nodeName": "HTML", + "nodeType": 1, + "nodeValue": "", + "parentId": 5 + } ], + "documentURL": "http://127.0.0.1:46819/chromedriver/page_test.html", + "localName": "", + "nodeId": 5, + "nodeName": "#document", + "nodeType": 9, + "nodeValue": "", + "xmlVersion": "" + } +} +[1532470285.324][INFO]: Waiting for pending navigations... +[1532470285.324][DEBUG]: DEVTOOLS COMMAND Runtime.evaluate (id=17) { + "expression": "1" +} +[1532470285.329][DEBUG]: DEVTOOLS RESPONSE Runtime.evaluate (id=17) { + "result": { + "description": "1", + "type": "number", + "value": 1 + } +} +[1532470285.329][INFO]: Done waiting for pending navigations. Status: ok +[1532470285.329][INFO]: [c83f56dde54cd19de625c51fbc60a303] RESPONSE Navigate +[1532470285.331][INFO]: [c83f56dde54cd19de625c51fbc60a303] COMMAND ExecuteScript { + "args": [ ], + "script": "window.name = \"oldWindow\"; return 1;" +} +[1532470285.331][DEBUG]: DEVTOOLS EVENT Log.entryAdded { + "entry": { + "level": "error", + "networkRequestId": "1000033557.2", + "source": "network", + "text": "Failed to load resource: the server responded with a status of 404 (Not Found)", + "timestamp": 1532470285326.91, + "url": "http://127.0.0.1:46819/favicon.ico" + } +} +[1532470285.331][INFO]: Waiting for pending navigations... +[1532470285.331][DEBUG]: DEVTOOLS COMMAND Runtime.evaluate (id=18) { + "expression": "1" +} +[1532470285.333][DEBUG]: DEVTOOLS RESPONSE Runtime.evaluate (id=18) { + "result": { + "description": "1", + "type": "number", + "value": 1 + } +} +[1532470285.333][INFO]: Done waiting for pending navigations. Status: ok +[1532470285.333][DEBUG]: DEVTOOLS COMMAND Runtime.evaluate (id=19) { + "expression": "(function() { // Copyright (c) 2012 The Chromium Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style license that can be\n// found in the LICENSE file.\n\n/**\n * Enum f...", + "returnByValue": true +} +[1532470285.363][DEBUG]: DEVTOOLS RESPONSE Runtime.evaluate (id=19) { + "result": { + "type": "object", + "value": { + "status": 0, + "value": 1 + } + } +} +[1532470285.363][INFO]: Waiting for pending navigations... +[1532470285.363][DEBUG]: DEVTOOLS COMMAND Runtime.evaluate (id=20) { + "expression": "1" +} +[1532470285.365][DEBUG]: DEVTOOLS RESPONSE Runtime.evaluate (id=20) { + "result": { + "description": "1", + "type": "number", + "value": 1 + } +} +[1532470285.365][INFO]: Done waiting for pending navigations. Status: ok +[1532470285.365][INFO]: [c83f56dde54cd19de625c51fbc60a303] RESPONSE ExecuteScript 1 +[1532470285.366][INFO]: [c83f56dde54cd19de625c51fbc60a303] COMMAND GetWindow { + +} +[1532470285.366][INFO]: [c83f56dde54cd19de625c51fbc60a303] RESPONSE GetWindow "CDwindow-ECEC8A19658F82AF02724EFF2D238B77" +[1532470285.368][INFO]: [c83f56dde54cd19de625c51fbc60a303] COMMAND GetWindows { + +} +[1532470285.368][DEBUG]: DevTools request: http://localhost:44377/json +[1532470285.383][DEBUG]: DevTools response: [ { + "description": "", + "devtoolsFrontendUrl": "/devtools/inspector.html?ws=localhost:44377/devtools/page/1DEA8904090762B68A4D0A8308AC415C", + "id": "1DEA8904090762B68A4D0A8308AC415C", + "title": "Chrome Automation Extension", + "type": "background_page", + "url": "chrome-extension://aapnijgdinlhnhlmodcfapnahmbfebeb/_generated_background_page.html", + "webSocketDebuggerUrl": "ws://localhost:44377/devtools/page/1DEA8904090762B68A4D0A8308AC415C" +}, { + "description": "", + "devtoolsFrontendUrl": "/devtools/inspector.html?ws=localhost:44377/devtools/page/ECEC8A19658F82AF02724EFF2D238B77", + "id": "ECEC8A19658F82AF02724EFF2D238B77", + "title": "page test", + "type": "page", + "url": "http://127.0.0.1:46819/chromedriver/page_test.html", + "webSocketDebuggerUrl": "ws://localhost:44377/devtools/page/ECEC8A19658F82AF02724EFF2D238B77" +} ] + +[1532470285.383][INFO]: [c83f56dde54cd19de625c51fbc60a303] RESPONSE GetWindows [ "CDwindow-ECEC8A19658F82AF02724EFF2D238B77" ] +[1532470285.385][INFO]: [c83f56dde54cd19de625c51fbc60a303] COMMAND FindElement { + "using": "id", + "value": "link" +} +[1532470285.385][INFO]: Waiting for pending navigations... +[1532470285.385][DEBUG]: DEVTOOLS COMMAND Runtime.evaluate (id=21) { + "expression": "1" +} +[1532470285.387][DEBUG]: DEVTOOLS RESPONSE Runtime.evaluate (id=21) { + "result": { + "description": "1", + "type": "number", + "value": 1 + } +} +[1532470285.387][INFO]: Done waiting for pending navigations. Status: ok +[1532470285.391][DEBUG]: DEVTOOLS COMMAND Runtime.evaluate (id=22) { + "expression": "(function() { // Copyright (c) 2012 The Chromium Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style license that can be\n// found in the LICENSE file.\n\n/**\n * Enum f...", + "returnByValue": true +} +[1532470285.424][DEBUG]: DEVTOOLS RESPONSE Runtime.evaluate (id=22) { + "result": { + "type": "object", + "value": { + "status": 0, + "value": { + "ELEMENT": "0.638853037752773-1" + } + } + } +} +[1532470285.424][INFO]: Waiting for pending navigations... +[1532470285.424][DEBUG]: DEVTOOLS COMMAND Runtime.evaluate (id=23) { + "expression": "1" +} +[1532470285.436][DEBUG]: DEVTOOLS RESPONSE Runtime.evaluate (id=23) { + "result": { + "description": "1", + "type": "number", + "value": 1 + } +} +[1532470285.436][INFO]: Done waiting for pending navigations. Status: ok +[1532470285.436][INFO]: [c83f56dde54cd19de625c51fbc60a303] RESPONSE FindElement { + "ELEMENT": "0.638853037752773-1" +} +[1532470285.437][INFO]: [c83f56dde54cd19de625c51fbc60a303] COMMAND ClickElement { + "id": "0.638853037752773-1" +} +[1532470285.437][INFO]: Waiting for pending navigations... +[1532470285.438][DEBUG]: DEVTOOLS COMMAND Runtime.evaluate (id=24) { + "expression": "1" +} +[1532470285.439][DEBUG]: DEVTOOLS RESPONSE Runtime.evaluate (id=24) { + "result": { + "description": "1", + "type": "number", + "value": 1 + } +} +[1532470285.439][INFO]: Done waiting for pending navigations. Status: ok +[1532470285.440][DEBUG]: DEVTOOLS COMMAND Runtime.evaluate (id=25) { + "expression": "(function() { // Copyright (c) 2012 The Chromium Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style license that can be\n// found in the LICENSE file.\n\n/**\n * Enum f...", + "returnByValue": true +} +[1532470285.452][DEBUG]: DEVTOOLS RESPONSE Runtime.evaluate (id=25) { + "result": { + "type": "object", + "value": { + "status": 0, + "value": "a" + } + } +} +[1532470285.453][DEBUG]: DEVTOOLS COMMAND Runtime.evaluate (id=26) { + "expression": "(function() { // Copyright (c) 2012 The Chromium Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style license that can be\n// found in the LICENSE file.\n\n/**\n * Enum f...", + "returnByValue": true +} +[1532470285.457][DEBUG]: DEVTOOLS RESPONSE Runtime.evaluate (id=26) { + "result": { + "type": "object", + "value": { + "status": 0, + "value": "a" + } + } +} +[1532470285.462][DEBUG]: DEVTOOLS COMMAND Runtime.evaluate (id=27) { + "expression": "(function() { // Copyright (c) 2012 The Chromium Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style license that can be\n// found in the LICENSE file.\n\n/**\n * Enum f...", + "returnByValue": true +} +[1532470285.492][DEBUG]: DEVTOOLS RESPONSE Runtime.evaluate (id=27) { + "result": { + "type": "object", + "value": { + "status": 0, + "value": true + } + } +} +[1532470285.494][DEBUG]: DEVTOOLS COMMAND Runtime.evaluate (id=28) { + "expression": "(function() { // Copyright (c) 2012 The Chromium Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style license that can be\n// found in the LICENSE file.\n\n/**\n * Enum f...", + "returnByValue": true +} +[1532470285.501][DEBUG]: DEVTOOLS RESPONSE Runtime.evaluate (id=28) { + "result": { + "type": "object", + "value": { + "status": 0, + "value": { + "height": 17, + "left": 0, + "top": 0, + "width": 122.953125 + } + } + } +} +[1532470285.504][DEBUG]: DEVTOOLS COMMAND Runtime.evaluate (id=29) { + "expression": "(function() { // Copyright (c) 2012 The Chromium Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style license that can be\n// found in the LICENSE file.\n\n/**\n * Enum f...", + "returnByValue": true +} +[1532470285.527][DEBUG]: DEVTOOLS RESPONSE Runtime.evaluate (id=29) { + "result": { + "type": "object", + "value": { + "status": 0, + "value": { + "ceil": { + + }, + "clone": { + + }, + "floor": { + + }, + "round": { + + }, + "scale": { + + }, + "toString": { + + }, + "translate": { + + }, + "x": 8, + "y": 8 + } + } + } +} +[1532470285.530][DEBUG]: DEVTOOLS COMMAND Runtime.evaluate (id=30) { + "expression": "(function() { // Copyright (c) 2012 The Chromium Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style license that can be\n// found in the LICENSE file.\n\n/**\n * Enum f...", + "returnByValue": true +} +[1532470285.548][DEBUG]: DEVTOOLS RESPONSE Runtime.evaluate (id=30) { + "result": { + "type": "object", + "value": { + "status": 0, + "value": { + "clickable": true + } + } + } +} +[1532470285.548][DEBUG]: DEVTOOLS COMMAND Input.dispatchMouseEvent (id=31) { + "button": "none", + "clickCount": 0, + "modifiers": 0, + "type": "mouseMoved", + "x": 69, + "y": 16 +} +[1532470285.553][DEBUG]: DEVTOOLS RESPONSE Input.dispatchMouseEvent (id=31) { + +} +[1532470285.554][DEBUG]: DEVTOOLS COMMAND Input.dispatchMouseEvent (id=32) { + "button": "left", + "clickCount": 1, + "modifiers": 0, + "type": "mousePressed", + "x": 69, + "y": 16 +} +[1532470285.564][DEBUG]: DEVTOOLS RESPONSE Input.dispatchMouseEvent (id=32) { + +} +[1532470285.565][DEBUG]: DEVTOOLS COMMAND Input.dispatchMouseEvent (id=33) { + "button": "left", + "clickCount": 1, + "modifiers": 0, + "type": "mouseReleased", + "x": 69, + "y": 16 +} +[1532470285.637][DEBUG]: DEVTOOLS RESPONSE Input.dispatchMouseEvent (id=33) { + +} +[1532470285.637][INFO]: Waiting for pending navigations... +[1532470285.638][DEBUG]: DEVTOOLS EVENT Page.windowOpen { + "url": "http://127.0.0.1:46819/chromedriver/empty.html", + "userGesture": true, + "windowFeatures": [ "menubar", "toolbar", "status", "scrollbars", "resizable" ], + "windowName": "_blank" +} +[1532470285.638][DEBUG]: DEVTOOLS COMMAND Runtime.evaluate (id=34) { + "expression": "1" +} +[1532470285.674][DEBUG]: DEVTOOLS RESPONSE Runtime.evaluate (id=34) { + "result": { + "description": "1", + "type": "number", + "value": 1 + } +} +[1532470285.674][INFO]: Done waiting for pending navigations. Status: ok +[1532470285.674][INFO]: [c83f56dde54cd19de625c51fbc60a303] RESPONSE ClickElement +[1532470285.676][INFO]: [c83f56dde54cd19de625c51fbc60a303] COMMAND GetWindows { + +} +[1532470285.676][DEBUG]: DevTools request: http://localhost:44377/json +[1532470285.691][DEBUG]: DevTools response: [ { + "description": "", + "devtoolsFrontendUrl": "/devtools/inspector.html?ws=localhost:44377/devtools/page/3017BF035629862A4728E9F6EF00D168", + "id": "3017BF035629862A4728E9F6EF00D168", + "title": "", + "type": "page", + "url": "http://127.0.0.1:46819/chromedriver/empty.html", + "webSocketDebuggerUrl": "ws://localhost:44377/devtools/page/3017BF035629862A4728E9F6EF00D168" +}, { + "description": "", + "devtoolsFrontendUrl": "/devtools/inspector.html?ws=localhost:44377/devtools/page/1DEA8904090762B68A4D0A8308AC415C", + "id": "1DEA8904090762B68A4D0A8308AC415C", + "title": "Chrome Automation Extension", + "type": "background_page", + "url": "chrome-extension://aapnijgdinlhnhlmodcfapnahmbfebeb/_generated_background_page.html", + "webSocketDebuggerUrl": "ws://localhost:44377/devtools/page/1DEA8904090762B68A4D0A8308AC415C" +}, { + "description": "", + "devtoolsFrontendUrl": "/devtools/inspector.html?ws=localhost:44377/devtools/page/ECEC8A19658F82AF02724EFF2D238B77", + "id": "ECEC8A19658F82AF02724EFF2D238B77", + "title": "page test", + "type": "page", + "url": "http://127.0.0.1:46819/chromedriver/page_test.html", + "webSocketDebuggerUrl": "ws://localhost:44377/devtools/page/ECEC8A19658F82AF02724EFF2D238B77" +} ] + +[1532470285.691][INFO]: [c83f56dde54cd19de625c51fbc60a303] RESPONSE GetWindows [ "CDwindow-ECEC8A19658F82AF02724EFF2D238B77", "CDwindow-3017BF035629862A4728E9F6EF00D168" ] +[1532470285.693][INFO]: [c83f56dde54cd19de625c51fbc60a303] COMMAND SwitchToWindow { + "name": "CDwindow-3017BF035629862A4728E9F6EF00D168" +} +[1532470285.693][DEBUG]: DevTools request: http://localhost:44377/json +[1532470285.718][DEBUG]: DevTools response: [ { + "description": "", + "devtoolsFrontendUrl": "/devtools/inspector.html?ws=localhost:44377/devtools/page/3017BF035629862A4728E9F6EF00D168", + "id": "3017BF035629862A4728E9F6EF00D168", + "title": "127.0.0.1:46819/chromedriver/empty.html", + "type": "page", + "url": "http://127.0.0.1:46819/chromedriver/empty.html", + "webSocketDebuggerUrl": "ws://localhost:44377/devtools/page/3017BF035629862A4728E9F6EF00D168" +}, { + "description": "", + "devtoolsFrontendUrl": "/devtools/inspector.html?ws=localhost:44377/devtools/page/1DEA8904090762B68A4D0A8308AC415C", + "id": "1DEA8904090762B68A4D0A8308AC415C", + "title": "Chrome Automation Extension", + "type": "background_page", + "url": "chrome-extension://aapnijgdinlhnhlmodcfapnahmbfebeb/_generated_background_page.html", + "webSocketDebuggerUrl": "ws://localhost:44377/devtools/page/1DEA8904090762B68A4D0A8308AC415C" +}, { + "description": "", + "devtoolsFrontendUrl": "/devtools/inspector.html?ws=localhost:44377/devtools/page/ECEC8A19658F82AF02724EFF2D238B77", + "id": "ECEC8A19658F82AF02724EFF2D238B77", + "title": "page test", + "type": "page", + "url": "http://127.0.0.1:46819/chromedriver/page_test.html", + "webSocketDebuggerUrl": "ws://localhost:44377/devtools/page/ECEC8A19658F82AF02724EFF2D238B77" +} ] + +[1532470285.719][DEBUG]: DevTools request: http://localhost:44377/json/activate/3017BF035629862A4728E9F6EF00D168 +[1532470285.744][DEBUG]: DevTools response: Target activated +[1532470285.744][INFO]: [c83f56dde54cd19de625c51fbc60a303] RESPONSE SwitchToWindow +[1532470285.745][INFO]: [c83f56dde54cd19de625c51fbc60a303] COMMAND GetWindow { + +} +[1532470285.745][INFO]: [c83f56dde54cd19de625c51fbc60a303] RESPONSE GetWindow "CDwindow-3017BF035629862A4728E9F6EF00D168" +[1532470285.747][INFO]: [c83f56dde54cd19de625c51fbc60a303] COMMAND FindElement { + "using": "id", + "value": "link" +} +[1532470285.748][INFO]: resolved localhost to ["::1","127.0.0.1"] +[1532470285.761][DEBUG]: DEVTOOLS COMMAND Log.enable (id=1) { + +} +[1532470285.761][DEBUG]: DEVTOOLS COMMAND DOM.getDocument (id=2) { + +} +[1532470285.762][DEBUG]: DEVTOOLS COMMAND Target.setAutoAttach (id=3) { + "autoAttach": true, + "waitForDebuggerOnStart": false +} +[1532470285.762][DEBUG]: DEVTOOLS COMMAND Page.enable (id=4) { + +} +[1532470285.762][DEBUG]: DEVTOOLS COMMAND Page.enable (id=5) { + +} +[1532470285.774][DEBUG]: DEVTOOLS RESPONSE Log.enable (id=1) { + +} +[1532470285.775][DEBUG]: DEVTOOLS RESPONSE DOM.getDocument (id=2) { + "root": { + "backendNodeId": 6, + "baseURL": "http://127.0.0.1:46819/chromedriver/empty.html", + "childNodeCount": 1, + "children": [ { + "attributes": [ ], + "backendNodeId": 7, + "childNodeCount": 2, + "children": [ { + "attributes": [ ], + "backendNodeId": 8, + "childNodeCount": 0, + "localName": "head", + "nodeId": 3, + "nodeName": "HEAD", + "nodeType": 1, + "nodeValue": "", + "parentId": 2 + }, { + "attributes": [ ], + "backendNodeId": 9, + "childNodeCount": 0, + "children": [ { + "backendNodeId": 10, + "localName": "", + "nodeId": 5, + "nodeName": "#text", + "nodeType": 3, + "nodeValue": "\n", + "parentId": 4 + } ], + "localName": "body", + "nodeId": 4, + "nodeName": "BODY", + "nodeType": 1, + "nodeValue": "", + "parentId": 2 + } ], + "frameId": "3017BF035629862A4728E9F6EF00D168", + "localName": "html", + "nodeId": 2, + "nodeName": "HTML", + "nodeType": 1, + "nodeValue": "", + "parentId": 1 + } ], + "documentURL": "http://127.0.0.1:46819/chromedriver/empty.html", + "localName": "", + "nodeId": 1, + "nodeName": "#document", + "nodeType": 9, + "nodeValue": "", + "xmlVersion": "" + } +} +[1532470285.776][DEBUG]: DEVTOOLS RESPONSE Target.setAutoAttach (id=3) { + +} +[1532470285.776][DEBUG]: DEVTOOLS RESPONSE Page.enable (id=4) { + +} +[1532470285.776][DEBUG]: DEVTOOLS RESPONSE Page.enable (id=5) { + +} +[1532470285.776][DEBUG]: DEVTOOLS COMMAND Runtime.enable (id=6) { + +} +[1532470285.801][DEBUG]: DEVTOOLS EVENT Runtime.executionContextCreated { + "context": { + "auxData": { + "frameId": "3017BF035629862A4728E9F6EF00D168", + "isDefault": true + }, + "id": 2, + "name": "", + "origin": "http://127.0.0.1:46819" + } +} +[1532470285.801][DEBUG]: DEVTOOLS RESPONSE Runtime.enable (id=6) { + +} +[1532470285.801][DEBUG]: DEVTOOLS COMMAND Page.enable (id=7) { + +} +[1532470285.810][DEBUG]: DEVTOOLS RESPONSE Page.enable (id=7) { + +} +[1532470285.811][DEBUG]: DEVTOOLS COMMAND Runtime.enable (id=8) { + +} +[1532470285.812][DEBUG]: DEVTOOLS RESPONSE Runtime.enable (id=8) { + +} +[1532470285.812][INFO]: Waiting for pending navigations... +[1532470285.812][DEBUG]: DEVTOOLS COMMAND Runtime.evaluate (id=9) { + "expression": "1" +} +[1532470285.817][DEBUG]: DEVTOOLS RESPONSE Runtime.evaluate (id=9) { + "result": { + "description": "1", + "type": "number", + "value": 1 + } +} +[1532470285.818][DEBUG]: DEVTOOLS COMMAND DOM.getDocument (id=10) { + +} +[1532470285.820][DEBUG]: DEVTOOLS RESPONSE DOM.getDocument (id=10) { + "root": { + "backendNodeId": 6, + "baseURL": "http://127.0.0.1:46819/chromedriver/empty.html", + "childNodeCount": 1, + "children": [ { + "attributes": [ ], + "backendNodeId": 7, + "childNodeCount": 2, + "children": [ { + "attributes": [ ], + "backendNodeId": 8, + "childNodeCount": 0, + "localName": "head", + "nodeId": 8, + "nodeName": "HEAD", + "nodeType": 1, + "nodeValue": "", + "parentId": 7 + }, { + "attributes": [ ], + "backendNodeId": 9, + "childNodeCount": 0, + "children": [ { + "backendNodeId": 10, + "localName": "", + "nodeId": 10, + "nodeName": "#text", + "nodeType": 3, + "nodeValue": "\n", + "parentId": 9 + } ], + "localName": "body", + "nodeId": 9, + "nodeName": "BODY", + "nodeType": 1, + "nodeValue": "", + "parentId": 7 + } ], + "frameId": "3017BF035629862A4728E9F6EF00D168", + "localName": "html", + "nodeId": 7, + "nodeName": "HTML", + "nodeType": 1, + "nodeValue": "", + "parentId": 6 + } ], + "documentURL": "http://127.0.0.1:46819/chromedriver/empty.html", + "localName": "", + "nodeId": 6, + "nodeName": "#document", + "nodeType": 9, + "nodeValue": "", + "xmlVersion": "" + } +} +[1532470285.820][DEBUG]: DEVTOOLS COMMAND Runtime.evaluate (id=11) { + "expression": "var frame = document.createElement('iframe');frame.name = 'chromedriver dummy frame';frame.src = 'about:blank';document.body.appendChild(frame);window.setTimeout(function() { document.body.removeC..." +} +[1532470285.831][DEBUG]: DEVTOOLS EVENT DOM.childNodeInserted { + "node": { + "attributes": [ "name", "chromedriver dummy frame", "src", "about:blank" ], + "backendNodeId": 11, + "childNodeCount": 0, + "localName": "iframe", + "nodeId": 11, + "nodeName": "IFRAME", + "nodeType": 1, + "nodeValue": "" + }, + "parentNodeId": 9, + "previousNodeId": 0 +} +[1532470285.831][DEBUG]: DEVTOOLS EVENT Page.frameAttached { + "frameId": "0A111622EE04D631EFBD5FE6B93B38EF", + "parentFrameId": "3017BF035629862A4728E9F6EF00D168", + "stack": { + "callFrames": [ { + "columnNumber": 125, + "functionName": "", + "lineNumber": 0, + "scriptId": "27", + "url": "" + } ] + } +} +[1532470285.856][DEBUG]: DEVTOOLS EVENT Page.frameStartedLoading { + "frameId": "0A111622EE04D631EFBD5FE6B93B38EF" +} +[1532470285.856][DEBUG]: DEVTOOLS EVENT Page.frameNavigated { + "frame": { + "id": "0A111622EE04D631EFBD5FE6B93B38EF", + "loaderId": "927C8AC9F8EE29D4C3B16B41CA06EE79", + "mimeType": "text/html", + "name": "chromedriver dummy frame", + "parentId": "3017BF035629862A4728E9F6EF00D168", + "securityOrigin": "://", + "url": "about:blank" + } +} +[1532470285.856][DEBUG]: DEVTOOLS EVENT DOM.childNodeRemoved { + "nodeId": 11, + "parentNodeId": 9 +} +[1532470285.857][DEBUG]: DEVTOOLS EVENT DOM.childNodeInserted { + "node": { + "attributes": [ "name", "chromedriver dummy frame", "src", "about:blank" ], + "backendNodeId": 11, + "childNodeCount": 0, + "contentDocument": { + "backendNodeId": 12, + "baseURL": "http://127.0.0.1:46819/chromedriver/empty.html", + "childNodeCount": 0, + "documentURL": "about:blank", + "localName": "", + "nodeId": 13, + "nodeName": "#document", + "nodeType": 9, + "nodeValue": "", + "xmlVersion": "" + }, + "frameId": "0A111622EE04D631EFBD5FE6B93B38EF", + "localName": "iframe", + "nodeId": 12, + "nodeName": "IFRAME", + "nodeType": 1, + "nodeValue": "" + }, + "parentNodeId": 9, + "previousNodeId": 0 +} +[1532470285.857][DEBUG]: DEVTOOLS EVENT Runtime.executionContextCreated { + "context": { + "auxData": { + "frameId": "0A111622EE04D631EFBD5FE6B93B38EF", + "isDefault": true + }, + "id": 3, + "name": "", + "origin": "http://127.0.0.1:46819" + } +} +[1532470285.857][DEBUG]: DEVTOOLS EVENT DOM.childNodeCountUpdated { + "childNodeCount": 1, + "nodeId": 13 +} +[1532470285.857][DEBUG]: DEVTOOLS EVENT Page.frameStoppedLoading { + "frameId": "0A111622EE04D631EFBD5FE6B93B38EF" +} +[1532470285.857][DEBUG]: DEVTOOLS RESPONSE Runtime.evaluate (id=11) { + "result": { + "description": "1", + "type": "number", + "value": 1 + } +} +[1532470285.857][INFO]: Done waiting for pending navigations. Status: ok +[1532470285.861][DEBUG]: DEVTOOLS COMMAND Runtime.evaluate (id=12) { + "expression": "(function() { // Copyright (c) 2012 The Chromium Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style license that can be\n// found in the LICENSE file.\n\n/**\n * Enum f...", + "returnByValue": true +} +[1532470285.887][DEBUG]: DEVTOOLS EVENT DOM.childNodeRemoved { + "nodeId": 12, + "parentNodeId": 9 +} +[1532470285.887][DEBUG]: DEVTOOLS EVENT Runtime.executionContextDestroyed { + "executionContextId": 3 +} +[1532470285.888][DEBUG]: DEVTOOLS EVENT Page.frameDetached { + "frameId": "0A111622EE04D631EFBD5FE6B93B38EF" +} +[1532470285.890][DEBUG]: DEVTOOLS RESPONSE Runtime.evaluate (id=12) { + "result": { + "type": "object", + "value": { + "status": 0, + "value": null + } + } +} +[1532470285.922][DEBUG]: DEVTOOLS COMMAND Runtime.evaluate (id=13) { + "expression": "1" +} +[1532470285.925][DEBUG]: DEVTOOLS RESPONSE Runtime.evaluate (id=13) { + "result": { + "description": "1", + "type": "number", + "value": 1 + } +} +[1532470285.925][INFO]: Waiting for pending navigations... +[1532470285.925][DEBUG]: DEVTOOLS COMMAND Runtime.evaluate (id=14) { + "expression": "1" +} +[1532470285.926][DEBUG]: DEVTOOLS RESPONSE Runtime.evaluate (id=14) { + "result": { + "description": "1", + "type": "number", + "value": 1 + } +} +[1532470285.926][INFO]: Done waiting for pending navigations. Status: ok +[1532470285.926][INFO]: [c83f56dde54cd19de625c51fbc60a303] RESPONSE FindElement ERROR no such element: Unable to locate element: {"method":"id","selector":"link"} + (Session info: chrome=69.0.3491.0) +[1532470285.928][INFO]: [c83f56dde54cd19de625c51fbc60a303] COMMAND SwitchToWindow { + "name": "oldWindow" +} +[1532470285.928][DEBUG]: DevTools request: http://localhost:44377/json +[1532470285.930][DEBUG]: DevTools response: [ { + "description": "", + "devtoolsFrontendUrl": "/devtools/inspector.html?ws=localhost:44377/devtools/page/3017BF035629862A4728E9F6EF00D168", + "id": "3017BF035629862A4728E9F6EF00D168", + "title": "127.0.0.1:46819/chromedriver/empty.html", + "type": "page", + "url": "http://127.0.0.1:46819/chromedriver/empty.html", + "webSocketDebuggerUrl": "ws://localhost:44377/devtools/page/3017BF035629862A4728E9F6EF00D168" +}, { + "description": "", + "devtoolsFrontendUrl": "/devtools/inspector.html?ws=localhost:44377/devtools/page/1DEA8904090762B68A4D0A8308AC415C", + "id": "1DEA8904090762B68A4D0A8308AC415C", + "title": "Chrome Automation Extension", + "type": "background_page", + "url": "chrome-extension://aapnijgdinlhnhlmodcfapnahmbfebeb/_generated_background_page.html", + "webSocketDebuggerUrl": "ws://localhost:44377/devtools/page/1DEA8904090762B68A4D0A8308AC415C" +}, { + "description": "", + "devtoolsFrontendUrl": "/devtools/inspector.html?ws=localhost:44377/devtools/page/ECEC8A19658F82AF02724EFF2D238B77", + "id": "ECEC8A19658F82AF02724EFF2D238B77", + "title": "page test", + "type": "page", + "url": "http://127.0.0.1:46819/chromedriver/page_test.html", + "webSocketDebuggerUrl": "ws://localhost:44377/devtools/page/ECEC8A19658F82AF02724EFF2D238B77" +} ] + +[1532470285.931][DEBUG]: DEVTOOLS COMMAND Runtime.evaluate (id=35) { + "expression": "(function() { // Copyright (c) 2012 The Chromium Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style license that can be\n// found in the LICENSE file.\n\n/**\n * Enum f...", + "returnByValue": true +} +[1532470285.937][DEBUG]: DEVTOOLS RESPONSE Runtime.evaluate (id=35) { + "result": { + "type": "object", + "value": { + "status": 0, + "value": "oldWindow" + } + } +} +[1532470285.937][DEBUG]: DevTools request: http://localhost:44377/json/activate/ECEC8A19658F82AF02724EFF2D238B77 +[1532470285.976][DEBUG]: DevTools response: Target activated +[1532470285.976][INFO]: [c83f56dde54cd19de625c51fbc60a303] RESPONSE SwitchToWindow +[1532470285.977][INFO]: [c83f56dde54cd19de625c51fbc60a303] COMMAND GetWindow { + +} +[1532470285.977][INFO]: [c83f56dde54cd19de625c51fbc60a303] RESPONSE GetWindow "CDwindow-ECEC8A19658F82AF02724EFF2D238B77" +[1532470285.978][INFO]: [c83f56dde54cd19de625c51fbc60a303] COMMAND Quit { + +} +[33557:33564:0100/000000.986939:ERROR:broker_posix.cc(40)] Recvmsg error: Connection reset by peer (104) +[0724/151125.991016:ERROR:nacl_helper_linux.cc(310)] NaCl helper process running without a sandbox! +Most likely you need to configure your SUID sandbox correctly +[1532470286.029][INFO]: [c83f56dde54cd19de625c51fbc60a303] RESPONSE Quit +[1532470286.029][DEBUG]: Log type 'driver' lost 0 entries on destruction +[1532470286.029][DEBUG]: Log type 'browser' lost 1 entries on destruction
diff --git a/chrome/test/chromedriver/log_replay/test_data/testUnexpectedAlertBehavior.log b/chrome/test/chromedriver/log_replay/test_data/testUnexpectedAlertBehavior.log new file mode 100644 index 0000000..709f7e4 --- /dev/null +++ b/chrome/test/chromedriver/log_replay/test_data/testUnexpectedAlertBehavior.log
@@ -0,0 +1,1182 @@ +[1532468288.794][INFO]: [3e9c20508b7ffb9d5669bc21fae07e6b] COMMAND InitSession { + "desiredCapabilities": { + "chromeOptions": { + "args": [ "no-sandbox", "disable-gpu" ], + "binary": "/usr/local/google/home/cwinstanley/chromium/src/out/Default/chrome" + }, + "goog:testName": "__main__.ChromeDesiredCapabilityTest.testUnexpectedAlertBehaviour", + "loggingPrefs": { + + }, + "unexpectedAlertBehaviour": "accept" + } +} +[1532468288.796][INFO]: Populating Preferences file: { + "alternate_error_pages": { + "enabled": false + }, + "autofill": { + "enabled": false + }, + "browser": { + "check_default_browser": false + }, + "distribution": { + "import_bookmarks": false, + "import_history": false, + "import_search_engine": false, + "make_chrome_default_for_user": false, + "skip_first_run_ui": true + }, + "dns_prefetching": { + "enabled": false + }, + "profile": { + "content_settings": { + "pattern_pairs": { + "https://*,*": { + "media-stream": { + "audio": "Default", + "video": "Default" + } + } + } + }, + "default_content_setting_values": { + "geolocation": 1 + }, + "default_content_settings": { + "geolocation": 1, + "mouselock": 1, + "notifications": 1, + "popups": 1, + "ppapi-broker": 1 + }, + "password_manager_enabled": false + }, + "safebrowsing": { + "enabled": false + }, + "search": { + "suggest_enabled": false + }, + "translate": { + "enabled": false + } +} +[1532468288.796][INFO]: Populating Local State file: { + "background_mode": { + "enabled": false + }, + "ssl": { + "rev_checking": { + "enabled": false + } + } +} +[1532468288.798][INFO]: Launching chrome: /usr/local/google/home/cwinstanley/chromium/src/out/Default/chrome --disable-background-networking --disable-client-side-phishing-detection --disable-default-apps --disable-gpu --disable-hang-monitor --disable-popup-blocking --disable-prompt-on-repost --disable-sync --disable-web-resources --enable-automation --enable-logging --force-fieldtrials=SiteIsolationExtensions/Control --ignore-certificate-errors --load-extension=/tmp/.org.chromium.Chromium.cSMKw1/internal --log-level=0 --metrics-recording-only --no-first-run --no-sandbox --password-store=basic --remote-debugging-port=0 --test-type=webdriver --use-mock-keychain --user-data-dir=/tmp/.org.chromium.Chromium.BqlWA3 data:, +[5696:5696:0724/143810.755850:ERROR:gpu_process_transport_factory.cc(642)] Switching to software compositing. +[5696:5696:0724/143810.755914:ERROR:gpu_process_transport_factory.cc(1007)] Lost UI shared context. +[5696:5696:0724/143810.825036:WARNING:account_consistency_mode_manager.cc(290)] Desktop Identity Consistency cannot be enabled as no OAuth client ID and client secret have been configured. +[5696:5696:0724/143810.825159:WARNING:account_consistency_mode_manager.cc(290)] Desktop Identity Consistency cannot be enabled as no OAuth client ID and client secret have been configured. +[5696:5696:0724/143810.825209:WARNING:account_consistency_mode_manager.cc(290)] Desktop Identity Consistency cannot be enabled as no OAuth client ID and client secret have been configured. +[5696:5696:0724/143810.825253:WARNING:account_consistency_mode_manager.cc(290)] Desktop Identity Consistency cannot be enabled as no OAuth client ID and client secret have been configured. +[5696:5696:0724/143810.826172:WARNING:account_consistency_mode_manager.cc(290)] Desktop Identity Consistency cannot be enabled as no OAuth client ID and client secret have been configured. +[5696:5696:0724/143810.832187:WARNING:account_consistency_mode_manager.cc(290)] Desktop Identity Consistency cannot be enabled as no OAuth client ID and client secret have been configured. +[5696:5696:0724/143810.877322:WARNING:account_consistency_mode_manager.cc(290)] Desktop Identity Consistency cannot be enabled as no OAuth client ID and client secret have been configured. +[5696:5696:0724/143810.905972:WARNING:account_consistency_mode_manager.cc(290)] Desktop Identity Consistency cannot be enabled as no OAuth client ID and client secret have been configured. +[5696:5696:0724/143810.906048:WARNING:account_consistency_mode_manager.cc(290)] Desktop Identity Consistency cannot be enabled as no OAuth client ID and client secret have been configured. + +DevTools listening on ws://127.0.0.1:34783/devtools/browser/47a8281a-e323-4e6f-96b1-26ed5e83511f +[1532468290.921][DEBUG]: DevTools request: http://localhost:34783/json/version +[5696:5696:0724/143811.098420:WARNING:password_store_factory.cc(253)] Using basic (unencrypted) store for password storage. See https://chromium.googlesource.com/chromium/src/+/master/docs/linux_password_storage.md for more information about password storage options. +[5696:5696:0724/143811.101341:WARNING:account_consistency_mode_manager.cc(290)] Desktop Identity Consistency cannot be enabled as no OAuth client ID and client secret have been configured. +[1532468291.325][DEBUG]: DevTools response: { + "Browser": "Chrome/69.0.3491.0", + "Protocol-Version": "1.3", + "User-Agent": "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/69.0.3491.0 Safari/537.36", + "V8-Version": "6.9.389", + "WebKit-Version": "537.36 (@410f2c4912d46a5fae2fe6c0b2e24d9eb6359761)", + "webSocketDebuggerUrl": "ws://localhost:34783/devtools/browser/47a8281a-e323-4e6f-96b1-26ed5e83511f" +} + +[1532468291.369][DEBUG]: DevTools request: http://localhost:34783/json +[1532468291.397][DEBUG]: DevTools response: [ { + "description": "", + "devtoolsFrontendUrl": "/devtools/inspector.html?ws=localhost:34783/devtools/page/D448CF21C4A1AEA7E3A4ABEE1FBC33D6", + "id": "D448CF21C4A1AEA7E3A4ABEE1FBC33D6", + "title": "Chrome Automation Extension", + "type": "background_page", + "url": "chrome-extension://aapnijgdinlhnhlmodcfapnahmbfebeb/_generated_background_page.html", + "webSocketDebuggerUrl": "ws://localhost:34783/devtools/page/D448CF21C4A1AEA7E3A4ABEE1FBC33D6" +}, { + "description": "", + "devtoolsFrontendUrl": "/devtools/inspector.html?ws=localhost:34783/devtools/page/80C0B711D284381885FB3C5713F0E77C", + "id": "80C0B711D284381885FB3C5713F0E77C", + "title": "", + "type": "page", + "url": "data:,", + "webSocketDebuggerUrl": "ws://localhost:34783/devtools/page/80C0B711D284381885FB3C5713F0E77C" +} ] + +[1532468291.398][DEBUG]: DevTools request: http://localhost:34783/json +[1532468291.400][DEBUG]: DevTools response: [ { + "description": "", + "devtoolsFrontendUrl": "/devtools/inspector.html?ws=localhost:34783/devtools/page/D448CF21C4A1AEA7E3A4ABEE1FBC33D6", + "id": "D448CF21C4A1AEA7E3A4ABEE1FBC33D6", + "title": "Chrome Automation Extension", + "type": "background_page", + "url": "chrome-extension://aapnijgdinlhnhlmodcfapnahmbfebeb/_generated_background_page.html", + "webSocketDebuggerUrl": "ws://localhost:34783/devtools/page/D448CF21C4A1AEA7E3A4ABEE1FBC33D6" +}, { + "description": "", + "devtoolsFrontendUrl": "/devtools/inspector.html?ws=localhost:34783/devtools/page/80C0B711D284381885FB3C5713F0E77C", + "id": "80C0B711D284381885FB3C5713F0E77C", + "title": "", + "type": "page", + "url": "data:,", + "webSocketDebuggerUrl": "ws://localhost:34783/devtools/page/80C0B711D284381885FB3C5713F0E77C" +} ] + +[1532468291.401][INFO]: resolved localhost to ["::1","127.0.0.1"] +[1532468291.404][DEBUG]: DEVTOOLS COMMAND Log.enable (id=1) { + +} +[1532468291.404][DEBUG]: DEVTOOLS COMMAND DOM.getDocument (id=2) { + +} +[1532468291.405][DEBUG]: DEVTOOLS COMMAND Target.setAutoAttach (id=3) { + "autoAttach": true, + "waitForDebuggerOnStart": false +} +[1532468291.405][DEBUG]: DEVTOOLS COMMAND Page.enable (id=4) { + +} +[1532468291.405][DEBUG]: DEVTOOLS COMMAND Page.enable (id=5) { + +} +[1532468291.462][DEBUG]: DEVTOOLS RESPONSE Log.enable (id=1) { + +} +[1532468291.463][DEBUG]: DEVTOOLS RESPONSE DOM.getDocument (id=2) { + "root": { + "backendNodeId": 1, + "baseURL": "about:blank", + "childNodeCount": 1, + "children": [ { + "attributes": [ ], + "backendNodeId": 2, + "childNodeCount": 2, + "children": [ { + "attributes": [ ], + "backendNodeId": 3, + "childNodeCount": 0, + "localName": "head", + "nodeId": 3, + "nodeName": "HEAD", + "nodeType": 1, + "nodeValue": "", + "parentId": 2 + }, { + "attributes": [ ], + "backendNodeId": 4, + "childNodeCount": 0, + "localName": "body", + "nodeId": 4, + "nodeName": "BODY", + "nodeType": 1, + "nodeValue": "", + "parentId": 2 + } ], + "frameId": "80C0B711D284381885FB3C5713F0E77C", + "localName": "html", + "nodeId": 2, + "nodeName": "HTML", + "nodeType": 1, + "nodeValue": "", + "parentId": 1 + } ], + "documentURL": "", + "localName": "", + "nodeId": 1, + "nodeName": "#document", + "nodeType": 9, + "nodeValue": "", + "xmlVersion": "" + } +} +[1532468291.463][DEBUG]: DEVTOOLS RESPONSE Target.setAutoAttach (id=3) { + +} +[1532468291.463][DEBUG]: DEVTOOLS RESPONSE Page.enable (id=4) { + +} +[1532468291.463][DEBUG]: DEVTOOLS RESPONSE Page.enable (id=5) { + +} +[1532468291.464][DEBUG]: DEVTOOLS COMMAND Runtime.enable (id=6) { + +} +[1532468291.518][DEBUG]: DEVTOOLS EVENT Page.frameNavigated { + "frame": { + "id": "80C0B711D284381885FB3C5713F0E77C", + "loaderId": "61920FA07551432E6C14D677C7C8CFCE", + "mimeType": "text/plain", + "securityOrigin": "://", + "url": "data:," + } +} +[1532468291.518][DEBUG]: DEVTOOLS EVENT DOM.documentUpdated { + +} +[1532468291.518][DEBUG]: DEVTOOLS COMMAND DOM.getDocument (id=7) { + +} +[1532468291.519][DEBUG]: DEVTOOLS EVENT Page.loadEventFired { + "timestamp": 80975.800798 +} +[1532468291.519][DEBUG]: DEVTOOLS EVENT Page.frameStoppedLoading { + "frameId": "80C0B711D284381885FB3C5713F0E77C" +} +[1532468291.519][DEBUG]: DEVTOOLS EVENT DOM.documentUpdated { + +} +[1532468291.519][DEBUG]: DEVTOOLS COMMAND DOM.getDocument (id=8) { + +} +[1532468291.519][DEBUG]: DEVTOOLS EVENT Page.domContentEventFired { + "timestamp": 80975.803616 +} +[1532468291.528][DEBUG]: DEVTOOLS EVENT Page.frameResized { + +} +[1532468291.570][DEBUG]: DEVTOOLS EVENT Runtime.executionContextCreated { + "context": { + "auxData": { + "frameId": "80C0B711D284381885FB3C5713F0E77C", + "isDefault": true + }, + "id": 1, + "name": "", + "origin": "://" + } +} +[1532468291.570][DEBUG]: DEVTOOLS RESPONSE Runtime.enable (id=6) { + +} +[1532468291.571][DEBUG]: DEVTOOLS RESPONSE DOM.getDocument (id=7) { + "root": { + "backendNodeId": 5, + "baseURL": "data:,", + "childNodeCount": 1, + "children": [ { + "attributes": [ ], + "backendNodeId": 6, + "childNodeCount": 2, + "children": [ { + "attributes": [ ], + "backendNodeId": 7, + "childNodeCount": 0, + "localName": "head", + "nodeId": 7, + "nodeName": "HEAD", + "nodeType": 1, + "nodeValue": "", + "parentId": 6 + }, { + "attributes": [ ], + "backendNodeId": 8, + "childNodeCount": 0, + "localName": "body", + "nodeId": 8, + "nodeName": "BODY", + "nodeType": 1, + "nodeValue": "", + "parentId": 6 + } ], + "frameId": "80C0B711D284381885FB3C5713F0E77C", + "localName": "html", + "nodeId": 6, + "nodeName": "HTML", + "nodeType": 1, + "nodeValue": "", + "parentId": 5 + } ], + "documentURL": "data:,", + "localName": "", + "nodeId": 5, + "nodeName": "#document", + "nodeType": 9, + "nodeValue": "", + "xmlVersion": "" + } +} +[1532468291.572][DEBUG]: DEVTOOLS RESPONSE DOM.getDocument (id=8) { + "root": { + "backendNodeId": 5, + "baseURL": "data:,", + "childNodeCount": 1, + "children": [ { + "attributes": [ ], + "backendNodeId": 6, + "childNodeCount": 2, + "children": [ { + "attributes": [ ], + "backendNodeId": 7, + "childNodeCount": 0, + "localName": "head", + "nodeId": 11, + "nodeName": "HEAD", + "nodeType": 1, + "nodeValue": "", + "parentId": 10 + }, { + "attributes": [ ], + "backendNodeId": 8, + "childNodeCount": 0, + "localName": "body", + "nodeId": 12, + "nodeName": "BODY", + "nodeType": 1, + "nodeValue": "", + "parentId": 10 + } ], + "frameId": "80C0B711D284381885FB3C5713F0E77C", + "localName": "html", + "nodeId": 10, + "nodeName": "HTML", + "nodeType": 1, + "nodeValue": "", + "parentId": 9 + } ], + "documentURL": "data:,", + "localName": "", + "nodeId": 9, + "nodeName": "#document", + "nodeType": 9, + "nodeValue": "", + "xmlVersion": "" + } +} +[1532468291.572][DEBUG]: DEVTOOLS COMMAND Page.enable (id=9) { + +} +[1532468291.626][DEBUG]: DEVTOOLS RESPONSE Page.enable (id=9) { + +} +[1532468291.626][DEBUG]: DEVTOOLS COMMAND Runtime.enable (id=10) { + +} +[1532468291.627][DEBUG]: DEVTOOLS RESPONSE Runtime.enable (id=10) { + +} +[1532468291.628][DEBUG]: DEVTOOLS COMMAND Runtime.evaluate (id=11) { + "expression": "(function() { // Copyright (c) 2012 The Chromium Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style license that can be\n// found in the LICENSE file.\n\n/**\n * Enum f...", + "returnByValue": true +} +[1532468291.639][DEBUG]: DEVTOOLS RESPONSE Runtime.evaluate (id=11) { + "result": { + "type": "object", + "value": { + "status": 0, + "value": 1 + } + } +} +[1532468291.639][INFO]: [3e9c20508b7ffb9d5669bc21fae07e6b] RESPONSE InitSession { + "acceptInsecureCerts": false, + "acceptSslCerts": false, + "applicationCacheEnabled": false, + "browserConnectionEnabled": false, + "browserName": "chrome", + "chrome": { + "chromedriverVersion": "2.40 (1ba6d2ec0853ea1d507bccc09f540f5ea1db0394)", + "userDataDir": "/tmp/.org.chromium.Chromium.BqlWA3" + }, + "cssSelectorsEnabled": true, + "databaseEnabled": false, + "goog:chromeOptions": { + "debuggerAddress": "localhost:34783" + }, + "handlesAlerts": true, + "hasTouchScreen": false, + "javascriptEnabled": true, + "locationContextEnabled": true, + "mobileEmulationEnabled": false, + "nativeEvents": true, + "networkConnectionEnabled": false, + "pageLoadStrategy": "normal", + "platform": "Linux", + "rotatable": false, + "setWindowRect": true, + "takesHeapSnapshot": true, + "takesScreenshot": true, + "unexpectedAlertBehaviour": "accept", + "version": "69.0.3491.0", + "webStorageEnabled": true +} +[1532468291.641][INFO]: [3e9c20508b7ffb9d5669bc21fae07e6b] COMMAND ExecuteScript { + "args": [ ], + "script": "alert(\"HI\");" +} +[1532468291.641][INFO]: Waiting for pending navigations... +[1532468291.641][DEBUG]: DEVTOOLS COMMAND Runtime.evaluate (id=12) { + "expression": "1" +} +[1532468291.643][DEBUG]: DEVTOOLS RESPONSE Runtime.evaluate (id=12) { + "result": { + "description": "1", + "type": "number", + "value": 1 + } +} +[1532468291.643][INFO]: Done waiting for pending navigations. Status: ok +[1532468291.644][DEBUG]: DEVTOOLS COMMAND Runtime.evaluate (id=13) { + "expression": "(function() { // Copyright (c) 2012 The Chromium Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style license that can be\n// found in the LICENSE file.\n\n/**\n * Enum f...", + "returnByValue": true +} +[1532468291.669][DEBUG]: DEVTOOLS EVENT Page.javascriptDialogOpening { + "defaultPrompt": "", + "hasBrowserHandler": true, + "message": "HI", + "type": "alert", + "url": "data:," +} +[1532468291.669][DEBUG]: DEVTOOLS COMMAND Inspector.enable (id=14) { + "purpose": "detect if alert blocked any cmds" +} +[1532468291.731][DEBUG]: DEVTOOLS RESPONSE Inspector.enable (id=14) { + +} +[1532468291.781][INFO]: Waiting for pending navigations... +[1532468291.829][INFO]: Done waiting for pending navigations. Status: unexpected alert open +[1532468291.829][INFO]: [3e9c20508b7ffb9d5669bc21fae07e6b] RESPONSE ExecuteScript +[1532468291.831][INFO]: [3e9c20508b7ffb9d5669bc21fae07e6b] COMMAND IsAlertOpen { + +} +[1532468291.831][INFO]: Waiting for pending navigations... +[1532468291.864][INFO]: Done waiting for pending navigations. Status: unexpected alert open +[1532468291.865][INFO]: [3e9c20508b7ffb9d5669bc21fae07e6b] RESPONSE IsAlertOpen true +[1532468291.866][INFO]: [3e9c20508b7ffb9d5669bc21fae07e6b] COMMAND FindElement { + "using": "tag name", + "value": "div" +} +[1532468291.866][DEBUG]: DEVTOOLS COMMAND Page.handleJavaScriptDialog (id=15) { + "accept": true, + "promptText": "" +} +[1532468291.867][DEBUG]: DEVTOOLS EVENT Page.javascriptDialogClosed { + "result": true, + "userInput": "" +} +[1532468291.873][DEBUG]: DEVTOOLS RESPONSE Page.handleJavaScriptDialog (id=15) { + +} +[1532468291.912][INFO]: [3e9c20508b7ffb9d5669bc21fae07e6b] RESPONSE FindElement ERROR unexpected alert open: {Alert text : HI} + (Session info: chrome=69.0.3491.0) +[1532468291.914][INFO]: [3e9c20508b7ffb9d5669bc21fae07e6b] COMMAND IsAlertOpen { + +} +[1532468291.914][DEBUG]: DEVTOOLS RESPONSE Runtime.evaluate (id=13) { + "result": { + "type": "object", + "value": { + "status": 0 + } + } +} +[1532468291.915][INFO]: Waiting for pending navigations... +[1532468291.915][DEBUG]: DEVTOOLS COMMAND Runtime.evaluate (id=16) { + "expression": "1" +} +[1532468291.927][DEBUG]: DEVTOOLS RESPONSE Runtime.evaluate (id=16) { + "result": { + "description": "1", + "type": "number", + "value": 1 + } +} +[1532468291.927][INFO]: Done waiting for pending navigations. Status: ok +[1532468291.927][INFO]: [3e9c20508b7ffb9d5669bc21fae07e6b] RESPONSE IsAlertOpen false +[1532468291.928][INFO]: [3e9c20508b7ffb9d5669bc21fae07e6b] COMMAND Quit { + +} +[0724/143811.940797:ERROR:nacl_helper_linux.cc(310)] NaCl helper process running without a sandbox! +Most likely you need to configure your SUID sandbox correctly +[1532468291.978][INFO]: [3e9c20508b7ffb9d5669bc21fae07e6b] RESPONSE Quit +[1532468291.979][DEBUG]: Log type 'driver' lost 0 entries on destruction +[1532468291.979][DEBUG]: Log type 'browser' lost 0 entries on destruction +[1532468291.980][INFO]: [fe6a59b5ff4d472bc67b18bdf8e629b1] COMMAND InitSession { + "desiredCapabilities": { + "chromeOptions": { + "args": [ "no-sandbox", "disable-gpu" ], + "binary": "/usr/local/google/home/cwinstanley/chromium/src/out/Default/chrome" + }, + "goog:testName": "__main__.ChromeDriverTest.testUnexpectedAlertOpenExceptionMessage", + "loggingPrefs": { + + } + } +} +[1532468291.981][INFO]: Populating Preferences file: { + "alternate_error_pages": { + "enabled": false + }, + "autofill": { + "enabled": false + }, + "browser": { + "check_default_browser": false + }, + "distribution": { + "import_bookmarks": false, + "import_history": false, + "import_search_engine": false, + "make_chrome_default_for_user": false, + "skip_first_run_ui": true + }, + "dns_prefetching": { + "enabled": false + }, + "profile": { + "content_settings": { + "pattern_pairs": { + "https://*,*": { + "media-stream": { + "audio": "Default", + "video": "Default" + } + } + } + }, + "default_content_setting_values": { + "geolocation": 1 + }, + "default_content_settings": { + "geolocation": 1, + "mouselock": 1, + "notifications": 1, + "popups": 1, + "ppapi-broker": 1 + }, + "password_manager_enabled": false + }, + "safebrowsing": { + "enabled": false + }, + "search": { + "suggest_enabled": false + }, + "translate": { + "enabled": false + } +} +[1532468291.981][INFO]: Populating Local State file: { + "background_mode": { + "enabled": false + }, + "ssl": { + "rev_checking": { + "enabled": false + } + } +} +[1532468291.982][INFO]: Launching chrome: /usr/local/google/home/cwinstanley/chromium/src/out/Default/chrome --disable-background-networking --disable-client-side-phishing-detection --disable-default-apps --disable-gpu --disable-hang-monitor --disable-popup-blocking --disable-prompt-on-repost --disable-sync --disable-web-resources --enable-automation --enable-logging --force-fieldtrials=SiteIsolationExtensions/Control --ignore-certificate-errors --load-extension=/tmp/.org.chromium.Chromium.OLLxmm/internal --log-level=0 --metrics-recording-only --no-first-run --no-sandbox --password-store=basic --remote-debugging-port=0 --test-type=webdriver --use-mock-keychain --user-data-dir=/tmp/.org.chromium.Chromium.NEQyWb data:, +[5794:5794:0724/143813.675296:ERROR:gpu_process_transport_factory.cc(642)] Switching to software compositing. +[5794:5794:0724/143813.675359:ERROR:gpu_process_transport_factory.cc(1007)] Lost UI shared context. +[5794:5794:0724/143813.749065:WARNING:account_consistency_mode_manager.cc(290)] Desktop Identity Consistency cannot be enabled as no OAuth client ID and client secret have been configured. +[5794:5794:0724/143813.749311:WARNING:account_consistency_mode_manager.cc(290)] Desktop Identity Consistency cannot be enabled as no OAuth client ID and client secret have been configured. +[5794:5794:0724/143813.749397:WARNING:account_consistency_mode_manager.cc(290)] Desktop Identity Consistency cannot be enabled as no OAuth client ID and client secret have been configured. +[5794:5794:0724/143813.749452:WARNING:account_consistency_mode_manager.cc(290)] Desktop Identity Consistency cannot be enabled as no OAuth client ID and client secret have been configured. +[5794:5794:0724/143813.750351:WARNING:account_consistency_mode_manager.cc(290)] Desktop Identity Consistency cannot be enabled as no OAuth client ID and client secret have been configured. +[5794:5794:0724/143813.756650:WARNING:account_consistency_mode_manager.cc(290)] Desktop Identity Consistency cannot be enabled as no OAuth client ID and client secret have been configured. +[5794:5794:0724/143813.799183:WARNING:account_consistency_mode_manager.cc(290)] Desktop Identity Consistency cannot be enabled as no OAuth client ID and client secret have been configured. +[5794:5794:0724/143813.833527:WARNING:account_consistency_mode_manager.cc(290)] Desktop Identity Consistency cannot be enabled as no OAuth client ID and client secret have been configured. +[5794:5794:0724/143813.833594:WARNING:account_consistency_mode_manager.cc(290)] Desktop Identity Consistency cannot be enabled as no OAuth client ID and client secret have been configured. + +DevTools listening on ws://127.0.0.1:36427/devtools/browser/8ea18a5e-27e4-4dee-86eb-239949abb5a6 +[1532468293.872][DEBUG]: DevTools request: http://localhost:36427/json/version +[5794:5794:0724/143813.973327:WARNING:password_store_factory.cc(253)] Using basic (unencrypted) store for password storage. See https://chromium.googlesource.com/chromium/src/+/master/docs/linux_password_storage.md for more information about password storage options. +[5794:5794:0724/143813.975821:WARNING:account_consistency_mode_manager.cc(290)] Desktop Identity Consistency cannot be enabled as no OAuth client ID and client secret have been configured. +[1532468294.153][DEBUG]: DevTools response: { + "Browser": "Chrome/69.0.3491.0", + "Protocol-Version": "1.3", + "User-Agent": "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/69.0.3491.0 Safari/537.36", + "V8-Version": "6.9.389", + "WebKit-Version": "537.36 (@410f2c4912d46a5fae2fe6c0b2e24d9eb6359761)", + "webSocketDebuggerUrl": "ws://localhost:36427/devtools/browser/8ea18a5e-27e4-4dee-86eb-239949abb5a6" +} + +[1532468294.198][DEBUG]: DevTools request: http://localhost:36427/json +[1532468294.243][DEBUG]: DevTools response: [ { + "description": "", + "devtoolsFrontendUrl": "/devtools/inspector.html?ws=localhost:36427/devtools/page/C82E6546C6EEEFFFB91E8E2CF7710D7D", + "id": "C82E6546C6EEEFFFB91E8E2CF7710D7D", + "title": "Chrome Automation Extension", + "type": "background_page", + "url": "chrome-extension://aapnijgdinlhnhlmodcfapnahmbfebeb/_generated_background_page.html", + "webSocketDebuggerUrl": "ws://localhost:36427/devtools/page/C82E6546C6EEEFFFB91E8E2CF7710D7D" +}, { + "description": "", + "devtoolsFrontendUrl": "/devtools/inspector.html?ws=localhost:36427/devtools/page/23D8F3375F45D86ED66A25699047C11F", + "id": "23D8F3375F45D86ED66A25699047C11F", + "title": "", + "type": "page", + "url": "data:,", + "webSocketDebuggerUrl": "ws://localhost:36427/devtools/page/23D8F3375F45D86ED66A25699047C11F" +} ] + +[1532468294.244][DEBUG]: DevTools request: http://localhost:36427/json +[1532468294.247][DEBUG]: DevTools response: [ { + "description": "", + "devtoolsFrontendUrl": "/devtools/inspector.html?ws=localhost:36427/devtools/page/C82E6546C6EEEFFFB91E8E2CF7710D7D", + "id": "C82E6546C6EEEFFFB91E8E2CF7710D7D", + "title": "Chrome Automation Extension", + "type": "background_page", + "url": "chrome-extension://aapnijgdinlhnhlmodcfapnahmbfebeb/_generated_background_page.html", + "webSocketDebuggerUrl": "ws://localhost:36427/devtools/page/C82E6546C6EEEFFFB91E8E2CF7710D7D" +}, { + "description": "", + "devtoolsFrontendUrl": "/devtools/inspector.html?ws=localhost:36427/devtools/page/23D8F3375F45D86ED66A25699047C11F", + "id": "23D8F3375F45D86ED66A25699047C11F", + "title": "", + "type": "page", + "url": "data:,", + "webSocketDebuggerUrl": "ws://localhost:36427/devtools/page/23D8F3375F45D86ED66A25699047C11F" +} ] + +[1532468294.248][INFO]: resolved localhost to ["::1","127.0.0.1"] +[1532468294.251][DEBUG]: DEVTOOLS COMMAND Log.enable (id=1) { + +} +[1532468294.252][DEBUG]: DEVTOOLS COMMAND DOM.getDocument (id=2) { + +} +[1532468294.252][DEBUG]: DEVTOOLS COMMAND Target.setAutoAttach (id=3) { + "autoAttach": true, + "waitForDebuggerOnStart": false +} +[1532468294.252][DEBUG]: DEVTOOLS COMMAND Page.enable (id=4) { + +} +[1532468294.253][DEBUG]: DEVTOOLS COMMAND Page.enable (id=5) { + +} +[1532468294.348][DEBUG]: DEVTOOLS RESPONSE Log.enable (id=1) { + +} +[1532468294.348][DEBUG]: DEVTOOLS RESPONSE DOM.getDocument (id=2) { + "root": { + "backendNodeId": 2, + "baseURL": "data:,", + "childNodeCount": 1, + "children": [ { + "attributes": [ ], + "backendNodeId": 3, + "childNodeCount": 2, + "children": [ { + "attributes": [ ], + "backendNodeId": 4, + "childNodeCount": 0, + "localName": "head", + "nodeId": 3, + "nodeName": "HEAD", + "nodeType": 1, + "nodeValue": "", + "parentId": 2 + }, { + "attributes": [ ], + "backendNodeId": 5, + "childNodeCount": 0, + "localName": "body", + "nodeId": 4, + "nodeName": "BODY", + "nodeType": 1, + "nodeValue": "", + "parentId": 2 + } ], + "frameId": "23D8F3375F45D86ED66A25699047C11F", + "localName": "html", + "nodeId": 2, + "nodeName": "HTML", + "nodeType": 1, + "nodeValue": "", + "parentId": 1 + } ], + "documentURL": "data:,", + "localName": "", + "nodeId": 1, + "nodeName": "#document", + "nodeType": 9, + "nodeValue": "", + "xmlVersion": "" + } +} +[1532468294.349][DEBUG]: DEVTOOLS RESPONSE Target.setAutoAttach (id=3) { + +} +[1532468294.349][DEBUG]: DEVTOOLS RESPONSE Page.enable (id=4) { + +} +[1532468294.349][DEBUG]: DEVTOOLS RESPONSE Page.enable (id=5) { + +} +[1532468294.349][DEBUG]: DEVTOOLS COMMAND Runtime.enable (id=6) { + +} +[1532468294.386][DEBUG]: DEVTOOLS EVENT Page.frameResized { + +} +[1532468294.437][DEBUG]: DEVTOOLS EVENT Runtime.executionContextCreated { + "context": { + "auxData": { + "frameId": "23D8F3375F45D86ED66A25699047C11F", + "isDefault": true + }, + "id": 1, + "name": "", + "origin": "://" + } +} +[1532468294.437][DEBUG]: DEVTOOLS RESPONSE Runtime.enable (id=6) { + +} +[1532468294.437][DEBUG]: DEVTOOLS COMMAND Page.enable (id=7) { + +} +[1532468294.440][DEBUG]: DEVTOOLS RESPONSE Page.enable (id=7) { + +} +[1532468294.441][DEBUG]: DEVTOOLS COMMAND Runtime.enable (id=8) { + +} +[1532468294.467][DEBUG]: DEVTOOLS RESPONSE Runtime.enable (id=8) { + +} +[1532468294.469][DEBUG]: DEVTOOLS COMMAND Runtime.evaluate (id=9) { + "expression": "(function() { // Copyright (c) 2012 The Chromium Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style license that can be\n// found in the LICENSE file.\n\n/**\n * Enum f...", + "returnByValue": true +} +[1532468294.485][DEBUG]: DEVTOOLS RESPONSE Runtime.evaluate (id=9) { + "result": { + "type": "object", + "value": { + "status": 0, + "value": 1 + } + } +} +[1532468294.485][INFO]: [fe6a59b5ff4d472bc67b18bdf8e629b1] RESPONSE InitSession { + "acceptInsecureCerts": false, + "acceptSslCerts": false, + "applicationCacheEnabled": false, + "browserConnectionEnabled": false, + "browserName": "chrome", + "chrome": { + "chromedriverVersion": "2.40 (1ba6d2ec0853ea1d507bccc09f540f5ea1db0394)", + "userDataDir": "/tmp/.org.chromium.Chromium.NEQyWb" + }, + "cssSelectorsEnabled": true, + "databaseEnabled": false, + "goog:chromeOptions": { + "debuggerAddress": "localhost:36427" + }, + "handlesAlerts": true, + "hasTouchScreen": false, + "javascriptEnabled": true, + "locationContextEnabled": true, + "mobileEmulationEnabled": false, + "nativeEvents": true, + "networkConnectionEnabled": false, + "pageLoadStrategy": "normal", + "platform": "Linux", + "rotatable": false, + "setWindowRect": true, + "takesHeapSnapshot": true, + "takesScreenshot": true, + "unexpectedAlertBehaviour": "", + "version": "69.0.3491.0", + "webStorageEnabled": true +} +[1532468294.486][INFO]: [fe6a59b5ff4d472bc67b18bdf8e629b1] COMMAND Navigate { + "url": "http://127.0.0.1:34727/chromedriver/empty.html" +} +[1532468294.486][INFO]: Waiting for pending navigations... +[1532468294.486][DEBUG]: DEVTOOLS COMMAND Runtime.evaluate (id=10) { + "expression": "1" +} +[1532468294.489][DEBUG]: DEVTOOLS RESPONSE Runtime.evaluate (id=10) { + "result": { + "description": "1", + "type": "number", + "value": 1 + } +} +[1532468294.489][DEBUG]: DEVTOOLS COMMAND DOM.getDocument (id=11) { + +} +[1532468294.492][DEBUG]: DEVTOOLS RESPONSE DOM.getDocument (id=11) { + "root": { + "backendNodeId": 2, + "baseURL": "data:,", + "childNodeCount": 1, + "children": [ { + "attributes": [ ], + "backendNodeId": 3, + "childNodeCount": 2, + "children": [ { + "attributes": [ ], + "backendNodeId": 4, + "childNodeCount": 0, + "localName": "head", + "nodeId": 7, + "nodeName": "HEAD", + "nodeType": 1, + "nodeValue": "", + "parentId": 6 + }, { + "attributes": [ ], + "backendNodeId": 5, + "childNodeCount": 0, + "localName": "body", + "nodeId": 8, + "nodeName": "BODY", + "nodeType": 1, + "nodeValue": "", + "parentId": 6 + } ], + "frameId": "23D8F3375F45D86ED66A25699047C11F", + "localName": "html", + "nodeId": 6, + "nodeName": "HTML", + "nodeType": 1, + "nodeValue": "", + "parentId": 5 + } ], + "documentURL": "data:,", + "localName": "", + "nodeId": 5, + "nodeName": "#document", + "nodeType": 9, + "nodeValue": "", + "xmlVersion": "" + } +} +[1532468294.492][DEBUG]: DEVTOOLS COMMAND Runtime.evaluate (id=12) { + "expression": "var frame = document.createElement('iframe');frame.name = 'chromedriver dummy frame';frame.src = 'about:blank';document.body.appendChild(frame);window.setTimeout(function() { document.body.removeC..." +} +[1532468294.503][DEBUG]: DEVTOOLS EVENT DOM.childNodeCountUpdated { + "childNodeCount": 1, + "nodeId": 8 +} +[1532468294.503][DEBUG]: DEVTOOLS EVENT Page.frameAttached { + "frameId": "CBA24EC92727CAC21B77F8513A82C44D", + "parentFrameId": "23D8F3375F45D86ED66A25699047C11F", + "stack": { + "callFrames": [ { + "columnNumber": 125, + "functionName": "", + "lineNumber": 0, + "scriptId": "20", + "url": "" + } ] + } +} +[1532468294.541][DEBUG]: DEVTOOLS EVENT Page.frameStartedLoading { + "frameId": "CBA24EC92727CAC21B77F8513A82C44D" +} +[1532468294.542][DEBUG]: DEVTOOLS EVENT Page.frameNavigated { + "frame": { + "id": "CBA24EC92727CAC21B77F8513A82C44D", + "loaderId": "C8888FE4A93D8EC66BCCD52F63125C1E", + "mimeType": "text/html", + "name": "chromedriver dummy frame", + "parentId": "23D8F3375F45D86ED66A25699047C11F", + "securityOrigin": "://", + "url": "about:blank" + } +} +[1532468294.542][DEBUG]: DEVTOOLS EVENT Runtime.executionContextCreated { + "context": { + "auxData": { + "frameId": "CBA24EC92727CAC21B77F8513A82C44D", + "isDefault": true + }, + "id": 2, + "name": "", + "origin": "://" + } +} +[1532468294.542][DEBUG]: DEVTOOLS EVENT Page.frameStoppedLoading { + "frameId": "CBA24EC92727CAC21B77F8513A82C44D" +} +[1532468294.543][DEBUG]: DEVTOOLS RESPONSE Runtime.evaluate (id=12) { + "result": { + "description": "1", + "type": "number", + "value": 1 + } +} +[1532468294.543][INFO]: Done waiting for pending navigations. Status: ok +[1532468294.543][DEBUG]: DEVTOOLS COMMAND Page.navigate (id=13) { + "url": "http://127.0.0.1:34727/chromedriver/empty.html" +} +[1532468294.815][DEBUG]: DEVTOOLS EVENT DOM.childNodeCountUpdated { + "childNodeCount": 0, + "nodeId": 8 +} +[1532468294.815][DEBUG]: DEVTOOLS EVENT Runtime.executionContextDestroyed { + "executionContextId": 2 +} +[1532468294.816][DEBUG]: DEVTOOLS EVENT Page.frameDetached { + "frameId": "CBA24EC92727CAC21B77F8513A82C44D" +} +[1532468294.830][DEBUG]: DEVTOOLS RESPONSE Page.navigate (id=13) { + "frameId": "23D8F3375F45D86ED66A25699047C11F", + "loaderId": "213201BC373E49DAE617A180DB254A5E" +} +[1532468294.830][DEBUG]: DEVTOOLS COMMAND Runtime.evaluate (id=14) { + "expression": "document.URL" +} +[1532468294.833][DEBUG]: DEVTOOLS EVENT Runtime.executionContextsCleared { + +} +[1532468294.839][DEBUG]: DEVTOOLS EVENT Page.frameStartedLoading { + "frameId": "23D8F3375F45D86ED66A25699047C11F" +} +[1532468294.894][DEBUG]: DEVTOOLS EVENT Runtime.executionContextsCleared { + +} +[1532468294.895][DEBUG]: DEVTOOLS EVENT Page.frameNavigated { + "frame": { + "id": "23D8F3375F45D86ED66A25699047C11F", + "loaderId": "213201BC373E49DAE617A180DB254A5E", + "mimeType": "text/html", + "securityOrigin": "http://127.0.0.1:34727", + "url": "http://127.0.0.1:34727/chromedriver/empty.html" + } +} +[1532468294.895][DEBUG]: DEVTOOLS EVENT Runtime.executionContextCreated { + "context": { + "auxData": { + "frameId": "23D8F3375F45D86ED66A25699047C11F", + "isDefault": true + }, + "id": 1, + "name": "", + "origin": "http://127.0.0.1:34727" + } +} +[1532468294.896][DEBUG]: DEVTOOLS EVENT DOM.documentUpdated { + +} +[1532468294.896][DEBUG]: DEVTOOLS COMMAND DOM.getDocument (id=15) { + +} +[5836:5836:0724/143814.897027:ERROR:render_process_impl.cc(208)] WebFrame LEAKED 2 TIMES +[1532468294.953][DEBUG]: DEVTOOLS EVENT Page.loadEventFired { + "timestamp": 80979.230614 +} +[1532468294.953][DEBUG]: DEVTOOLS EVENT Page.frameStoppedLoading { + "frameId": "23D8F3375F45D86ED66A25699047C11F" +} +[1532468294.954][DEBUG]: DEVTOOLS EVENT DOM.documentUpdated { + +} +[1532468294.954][DEBUG]: DEVTOOLS COMMAND DOM.getDocument (id=16) { + +} +[1532468294.954][DEBUG]: DEVTOOLS EVENT Page.domContentEventFired { + "timestamp": 80979.232712 +} +[1532468294.954][DEBUG]: DEVTOOLS RESPONSE Runtime.evaluate (id=14) { + "result": { + "type": "string", + "value": "http://127.0.0.1:34727/chromedriver/empty.html" + } +} +[1532468294.960][DEBUG]: DEVTOOLS RESPONSE DOM.getDocument (id=15) { + "root": { + "backendNodeId": 1, + "baseURL": "http://127.0.0.1:34727/chromedriver/empty.html", + "childNodeCount": 1, + "children": [ { + "attributes": [ ], + "backendNodeId": 2, + "childNodeCount": 2, + "children": [ { + "attributes": [ ], + "backendNodeId": 3, + "childNodeCount": 0, + "localName": "head", + "nodeId": 3, + "nodeName": "HEAD", + "nodeType": 1, + "nodeValue": "", + "parentId": 2 + }, { + "attributes": [ ], + "backendNodeId": 4, + "childNodeCount": 0, + "children": [ { + "backendNodeId": 5, + "localName": "", + "nodeId": 5, + "nodeName": "#text", + "nodeType": 3, + "nodeValue": "\n", + "parentId": 4 + } ], + "localName": "body", + "nodeId": 4, + "nodeName": "BODY", + "nodeType": 1, + "nodeValue": "", + "parentId": 2 + } ], + "frameId": "23D8F3375F45D86ED66A25699047C11F", + "localName": "html", + "nodeId": 2, + "nodeName": "HTML", + "nodeType": 1, + "nodeValue": "", + "parentId": 1 + } ], + "documentURL": "http://127.0.0.1:34727/chromedriver/empty.html", + "localName": "", + "nodeId": 1, + "nodeName": "#document", + "nodeType": 9, + "nodeValue": "", + "xmlVersion": "" + } +} +[1532468294.964][DEBUG]: DEVTOOLS RESPONSE DOM.getDocument (id=16) { + "root": { + "backendNodeId": 1, + "baseURL": "http://127.0.0.1:34727/chromedriver/empty.html", + "childNodeCount": 1, + "children": [ { + "attributes": [ ], + "backendNodeId": 2, + "childNodeCount": 2, + "children": [ { + "attributes": [ ], + "backendNodeId": 3, + "childNodeCount": 0, + "localName": "head", + "nodeId": 8, + "nodeName": "HEAD", + "nodeType": 1, + "nodeValue": "", + "parentId": 7 + }, { + "attributes": [ ], + "backendNodeId": 4, + "childNodeCount": 0, + "children": [ { + "backendNodeId": 5, + "localName": "", + "nodeId": 10, + "nodeName": "#text", + "nodeType": 3, + "nodeValue": "\n", + "parentId": 9 + } ], + "localName": "body", + "nodeId": 9, + "nodeName": "BODY", + "nodeType": 1, + "nodeValue": "", + "parentId": 7 + } ], + "frameId": "23D8F3375F45D86ED66A25699047C11F", + "localName": "html", + "nodeId": 7, + "nodeName": "HTML", + "nodeType": 1, + "nodeValue": "", + "parentId": 6 + } ], + "documentURL": "http://127.0.0.1:34727/chromedriver/empty.html", + "localName": "", + "nodeId": 6, + "nodeName": "#document", + "nodeType": 9, + "nodeValue": "", + "xmlVersion": "" + } +} +[1532468294.964][INFO]: Waiting for pending navigations... +[1532468294.964][DEBUG]: DEVTOOLS COMMAND Runtime.evaluate (id=17) { + "expression": "1" +} +[1532468294.982][DEBUG]: DEVTOOLS EVENT Log.entryAdded { + "entry": { + "level": "error", + "networkRequestId": "1000005875.2", + "source": "network", + "text": "Failed to load resource: the server responded with a status of 404 (Not Found)", + "timestamp": 1532468294967.73, + "url": "http://127.0.0.1:34727/favicon.ico" + } +} +[1532468294.992][DEBUG]: DEVTOOLS RESPONSE Runtime.evaluate (id=17) { + "result": { + "description": "1", + "type": "number", + "value": 1 + } +} +[1532468294.992][INFO]: Done waiting for pending navigations. Status: ok +[1532468294.992][INFO]: [fe6a59b5ff4d472bc67b18bdf8e629b1] RESPONSE Navigate +[1532468294.993][INFO]: [fe6a59b5ff4d472bc67b18bdf8e629b1] COMMAND ExecuteScript { + "args": [ ], + "script": "window.alert(\"Hi\");" +} +[1532468294.993][INFO]: Waiting for pending navigations... +[1532468294.994][DEBUG]: DEVTOOLS COMMAND Runtime.evaluate (id=18) { + "expression": "1" +} +[1532468294.995][DEBUG]: DEVTOOLS RESPONSE Runtime.evaluate (id=18) { + "result": { + "description": "1", + "type": "number", + "value": 1 + } +} +[1532468294.995][INFO]: Done waiting for pending navigations. Status: ok +[1532468294.996][DEBUG]: DEVTOOLS COMMAND Runtime.evaluate (id=19) { + "expression": "(function() { // Copyright (c) 2012 The Chromium Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style license that can be\n// found in the LICENSE file.\n\n/**\n * Enum f...", + "returnByValue": true +} +[1532468295.015][DEBUG]: DEVTOOLS EVENT Page.javascriptDialogOpening { + "defaultPrompt": "", + "hasBrowserHandler": true, + "message": "Hi", + "type": "alert", + "url": "http://127.0.0.1:34727/chromedriver/empty.html" +} +[1532468295.015][DEBUG]: DEVTOOLS COMMAND Inspector.enable (id=20) { + "purpose": "detect if alert blocked any cmds" +} +[1532468295.037][DEBUG]: DEVTOOLS RESPONSE Inspector.enable (id=20) { + +} +[1532468295.071][INFO]: Waiting for pending navigations... +[1532468295.104][INFO]: Done waiting for pending navigations. Status: unexpected alert open +[1532468295.104][INFO]: [fe6a59b5ff4d472bc67b18bdf8e629b1] RESPONSE ExecuteScript +[1532468295.106][INFO]: [fe6a59b5ff4d472bc67b18bdf8e629b1] COMMAND FindElement { + "using": "tag name", + "value": "divine" +} +[1532468295.137][INFO]: [fe6a59b5ff4d472bc67b18bdf8e629b1] RESPONSE FindElement ERROR unexpected alert open: {Alert text : Hi} + (Session info: chrome=69.0.3491.0) +[1532468295.139][INFO]: [fe6a59b5ff4d472bc67b18bdf8e629b1] COMMAND Quit { + +} +[0724/143815.154272:ERROR:nacl_helper_linux.cc(310)] NaCl helper process running without a sandbox! +Most likely you need to configure your SUID sandbox correctly +[1532468295.189][INFO]: [fe6a59b5ff4d472bc67b18bdf8e629b1] RESPONSE Quit +[1532468295.189][DEBUG]: Log type 'driver' lost 0 entries on destruction +[1532468295.189][DEBUG]: Log type 'browser' lost 1 entries on destruction
diff --git a/chrome/test/chromedriver/logging.cc b/chrome/test/chromedriver/logging.cc index 498df03..665a3a6b 100644 --- a/chrome/test/chromedriver/logging.cc +++ b/chrome/test/chromedriver/logging.cc
@@ -235,7 +235,6 @@ } bool InitLogging() { - InitLogging(&InternalIsVLogOn); g_start_time = base::TimeTicks::Now().ToInternalValue(); base::CommandLine* cmd_line = base::CommandLine::ForCurrentProcess(); @@ -253,6 +252,9 @@ } } + Log::truncate_logged_params = !cmd_line->HasSwitch("replayable"); + Log::is_vlog_on_func = &InternalIsVLogOn; + int num_level_switches = 0; if (cmd_line->HasSwitch("silent")) {
diff --git a/chrome/test/chromedriver/performance_logger.cc b/chrome/test/chromedriver/performance_logger.cc index b19c6d8..21700573 100644 --- a/chrome/test/chromedriver/performance_logger.cc +++ b/chrome/test/chromedriver/performance_logger.cc
@@ -252,22 +252,8 @@ "was not started"); } - // Prior to commit position 433389, DevTools did not return a response to - // Tracing.end commands, so we need to ignore it here to avoid a timeout. See - // https://bugs.chromium.org/p/chromedriver/issues/detail?id=1607 for details. - // TODO(samuong): remove this after we stop supporting Chrome 56. - bool wait_for_response = true; - if (session_->chrome) { - const BrowserInfo* browser_info = session_->chrome->GetBrowserInfo(); - if (browser_info->browser_name == "chrome" && browser_info->build_no < 2925) - wait_for_response = false; - } base::DictionaryValue params; - Status status(kOk); - if (wait_for_response) - status = browser_client_->SendCommand("Tracing.end", params); - else - status = browser_client_->SendAsyncCommand("Tracing.end", params); + Status status = browser_client_->SendCommand("Tracing.end", params); if (status.IsError()) { LOG(ERROR) << "error when stopping trace: " << status.message(); return status;
diff --git a/chrome/test/chromedriver/server/chromedriver_server.cc b/chrome/test/chromedriver/server/chromedriver_server.cc index 08cdf982..507bb7e 100644 --- a/chrome/test/chromedriver/server/chromedriver_server.cc +++ b/chrome/test/chromedriver/server/chromedriver_server.cc
@@ -319,18 +319,30 @@ if (cmd_line->HasSwitch("h") || cmd_line->HasSwitch("help")) { std::string options; const char* const kOptionAndDescriptions[] = { - "port=PORT", "port to listen on", - "adb-port=PORT", "adb server port", - "log-path=FILE", "write server log to file instead of stderr, " - "increases log level to INFO", - "log-level=LEVEL", "set log level: ALL, DEBUG, INFO, WARNING, " - "SEVERE, OFF", - "verbose", "log verbosely (equivalent to --log-level=ALL)", - "silent", "log nothing (equivalent to --log-level=OFF)", - "version", "print the version number and exit", - "url-base", "base URL path prefix for commands, e.g. wd/url", - "whitelisted-ips", "comma-separated whitelist of remote IPv4 addresses " - "which are allowed to connect to ChromeDriver", + "port=PORT", + "port to listen on", + "adb-port=PORT", + "adb server port", + "log-path=FILE", + "write server log to file instead of stderr, " + "increases log level to INFO", + "log-level=LEVEL", + "set log level: ALL, DEBUG, INFO, WARNING, " + "SEVERE, OFF", + "verbose", + "log verbosely (equivalent to --log-level=ALL)", + "silent", + "log nothing (equivalent to --log-level=OFF)", + "replayable", + "(experimental) log verbosely and don't truncate long " + "strings so that the log can be replayed.", + "version", + "print the version number and exit", + "url-base", + "base URL path prefix for commands, e.g. wd/url", + "whitelisted-ips", + "comma-separated whitelist of remote IPv4 addresses " + "which are allowed to connect to ChromeDriver", }; for (size_t i = 0; i < arraysize(kOptionAndDescriptions) - 1; i += 2) { options += base::StringPrintf(
diff --git a/chrome/test/chromedriver/server/server.py b/chrome/test/chromedriver/server/server.py index 51a1058..740d8db 100644 --- a/chrome/test/chromedriver/server/server.py +++ b/chrome/test/chromedriver/server/server.py
@@ -13,7 +13,7 @@ class Server(object): """A running ChromeDriver server.""" - def __init__(self, exe_path, log_path=None, verbose=True): + def __init__(self, exe_path, log_path=None, verbose=True, replayable=False): """Starts the ChromeDriver server and waits for it to be ready. Args: @@ -31,7 +31,10 @@ chromedriver_args.extend(['--log-path=%s' %log_path]) if verbose: chromedriver_args.extend(['--verbose', - '--vmodule=*/chrome/test/chromedriver/*=4']) + '--vmodule=*/chrome/test/chromedriver/*=3']) + if replayable: + chromedriver_args.extend(['--replayable']); + self._process = subprocess.Popen(chromedriver_args) self._url = 'http://127.0.0.1:%d' % port if self._process is None:
diff --git a/chrome/test/chromedriver/test/run_py_tests.py b/chrome/test/chromedriver/test/run_py_tests.py index 011ee67..4ed1bdba 100755 --- a/chrome/test/chromedriver/test/run_py_tests.py +++ b/chrome/test/chromedriver/test/run_py_tests.py
@@ -29,17 +29,29 @@ import uuid _THIS_DIR = os.path.abspath(os.path.dirname(__file__)) -sys.path.insert(1, os.path.join(_THIS_DIR, os.pardir)) -sys.path.insert(1, os.path.join(_THIS_DIR, os.pardir, 'client')) -sys.path.insert(1, os.path.join(_THIS_DIR, os.pardir, 'server')) +_PARENT_DIR = os.path.join(_THIS_DIR, os.pardir) +_CLIENT_DIR = os.path.join(_PARENT_DIR, "client") +_SERVER_DIR = os.path.join(_PARENT_DIR, "server") +_TEST_DIR = os.path.join(_PARENT_DIR, "test") +sys.path.insert(1, _PARENT_DIR) import chrome_paths -import chromedriver -import unittest_util import util +sys.path.remove(_PARENT_DIR) + +sys.path.insert(1, _CLIENT_DIR) +import chromedriver +import webelement +sys.path.remove(_CLIENT_DIR) + +sys.path.insert(1, _SERVER_DIR) import server -from webelement import WebElement +sys.path.remove(_SERVER_DIR) + +sys.path.insert(1, _TEST_DIR) +import unittest_util import webserver +sys.path.remove(_TEST_DIR) _TEST_DATA_DIR = os.path.join(chrome_paths.GetTestData(), 'chromedriver') @@ -586,7 +598,8 @@ self._driver.ExecuteScript( 'document.body.innerHTML = "<div>a</div><div>b</div>";') self.assertTrue( - isinstance(self._driver.FindElement('tag name', 'div'), WebElement)) + isinstance(self._driver.FindElement('tag name', 'div'), + webelement.WebElement)) def testNoSuchElementExceptionMessage(self): self._driver.Load(self.GetHttpUrlForFile('/chromedriver/empty.html')) @@ -614,7 +627,7 @@ self.assertTrue(isinstance(divs, list)) self.assertEquals(2, len(divs)) for div in divs: - self.assertTrue(isinstance(div, WebElement)) + self.assertTrue(isinstance(div, webelement.WebElement)) def testFindChildElement(self): self._driver.Load(self.GetHttpUrlForFile('/chromedriver/empty.html')) @@ -622,7 +635,8 @@ 'document.body.innerHTML = "<div><br><br></div><div><a></a></div>";') element = self._driver.FindElement('tag name', 'div') self.assertTrue( - isinstance(element.FindElement('tag name', 'br'), WebElement)) + isinstance(element.FindElement('tag name', 'br'), + webelement.WebElement)) def testFindChildElements(self): self._driver.Load(self.GetHttpUrlForFile('/chromedriver/empty.html')) @@ -633,7 +647,7 @@ self.assertTrue(isinstance(brs, list)) self.assertEquals(2, len(brs)) for br in brs: - self.assertTrue(isinstance(br, WebElement)) + self.assertTrue(isinstance(br, webelement.WebElement)) def testHoverOverElement(self): self._driver.Load(self.GetHttpUrlForFile('/chromedriver/empty.html')) @@ -2000,7 +2014,6 @@ ChromeDriverTest._http_server.SetCallbackForPath( '/abc.csv', self.RespondWithCsvFile) download_dir = self.CreateTempDir() - download_name = os.path.join(download_dir, 'abc.csv') driver = self.CreateDriver(download_dir=download_dir) original_url = driver.GetCurrentUrl() driver.Load(ChromeDriverTest.GetHttpUrlForFile('/abc.csv')) @@ -2873,6 +2886,10 @@ '', '--log-path', help='Output verbose server logs to this file') parser.add_option( + '', '--replayable', + help="Don't truncate long strings in the log so that the log can be " + "replayed.") + parser.add_option( '', '--reference-chromedriver', help='Path to the reference chromedriver server') parser.add_option( @@ -2910,6 +2927,9 @@ parser.error('Path given by --chromedriver is invalid.\n' + 'Please run "%s --help" for help' % __file__) + if options.replayable and not options.log_path: + parser.error('Need path specified when replayable log set to true.') + global _CHROMEDRIVER_BINARY _CHROMEDRIVER_BINARY = options.chromedriver @@ -2917,7 +2937,8 @@ options.android_package not in _ANDROID_NEGATIVE_FILTER): parser.error('Invalid --android-package') - chromedriver_server = server.Server(_CHROMEDRIVER_BINARY, options.log_path) + chromedriver_server = server.Server(_CHROMEDRIVER_BINARY, options.log_path, + replayable=options.replayable) global _CHROMEDRIVER_SERVER_URL _CHROMEDRIVER_SERVER_URL = chromedriver_server.GetUrl()
diff --git a/chrome/test/chromedriver/window_commands.cc b/chrome/test/chromedriver/window_commands.cc index 4e0c464..4a693f3 100644 --- a/chrome/test/chromedriver/window_commands.cc +++ b/chrome/test/chromedriver/window_commands.cc
@@ -502,18 +502,9 @@ return status; if (url == kUnreachableWebDataURL || url == kDeprecatedUnreachableWebDataURL) { - // https://bugs.chromium.org/p/chromedriver/issues/detail?id=1272 - const BrowserInfo* browser_info = session->chrome->GetBrowserInfo(); - bool is_kitkat_webview = browser_info->browser_name == "webview" && - browser_info->major_version <= 30 && - browser_info->is_android; - if (!is_kitkat_webview) { - // Page.getNavigationHistory isn't implemented in WebView for KitKat and - // older Android releases. - status = web_view->GetUrl(&url); - if (status.IsError()) - return status; - } + status = web_view->GetUrl(&url); + if (status.IsError()) + return status; } value->reset(new base::Value(url)); return Status(kOk); @@ -727,10 +718,6 @@ const base::DictionaryValue& params, std::unique_ptr<base::Value>* value, Timeout* timeout) { - if (session->chrome->GetBrowserInfo()->build_no < 2286) { - // TODO(samuong): remove this once we stop supporting M41. - return Status(kUnknownCommand, "Touch scroll action requires Chrome 42+"); - } WebPoint location = session->mouse_position; std::string element; if (params.GetString("element", &element)) { @@ -754,10 +741,6 @@ const base::DictionaryValue& params, std::unique_ptr<base::Value>* value, Timeout* timeout) { - if (session->chrome->GetBrowserInfo()->build_no < 2286) { - // TODO(samuong): remove this once we stop supporting M41. - return Status(kUnknownCommand, "Pinch action requires Chrome 42+"); - } WebPoint location; if (!params.GetInteger("x", &location.x)) return Status(kUnknownError, "'x' must be an integer");
diff --git a/chrome/test/data/background_fetch/background_fetch.js b/chrome/test/data/background_fetch/background_fetch.js index 3554db10..5586a31 100644 --- a/chrome/test/data/background_fetch/background_fetch.js +++ b/chrome/test/data/background_fetch/background_fetch.js
@@ -87,7 +87,7 @@ // Listens for a postMessage from sw.js and sends the result to the test. navigator.serviceWorker.addEventListener('message', (event) => { - if (['backgroundfetched', 'backgroundfetchfail'].includes(event.data)) + if (['backgroundfetchsuccess', 'backgroundfetchfail'].includes(event.data)) sendResultToTest(event.data); else sendErrorToTest(Error('Unexpected message received: ' + event.data));
diff --git a/chrome/test/data/background_fetch/sw.js b/chrome/test/data/background_fetch/sw.js index e6203c0..407f2c4 100644 --- a/chrome/test/data/background_fetch/sw.js +++ b/chrome/test/data/background_fetch/sw.js
@@ -14,7 +14,7 @@ } // Background Fetch event listeners. -self.addEventListener('backgroundfetched', e => { +self.addEventListener('backgroundfetchsuccess', e => { e.waitUntil(e.updateUI({title: 'New Fetched Title!'}).then( () => postToWindowClients(e.type))); });
diff --git a/chrome/test/data/extensions/api_test/tabs/basics/incognito.html b/chrome/test/data/extensions/api_test/tabs/basics/incognito.html new file mode 100644 index 0000000..cf93b63 --- /dev/null +++ b/chrome/test/data/extensions/api_test/tabs/basics/incognito.html
@@ -0,0 +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. +--> +<script src="tabs_util.js"></script> +<script src="incognito.js"></script>
diff --git a/chrome/test/data/extensions/api_test/tabs/basics/incognito.js b/chrome/test/data/extensions/api_test/tabs/basics/incognito.js new file mode 100644 index 0000000..43dafeb --- /dev/null +++ b/chrome/test/data/extensions/api_test/tabs/basics/incognito.js
@@ -0,0 +1,26 @@ +// 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. + +chrome.test.getConfig(function(config) { + let args = JSON.parse(config.customArg); + chrome.test.runTests([ + function queryTabs() { + chrome.tabs.query( + {windowId: args.windowId}, + pass(function(tabs) { + assertEq(tabs.length, args.isIncognito ? 1 : 0); + }) + ); + }, + + function createTab() { + chrome.tabs.create( + {windowId: args.windowId}, + args.isIncognito ? + pass(function(tab) {assertTrue(tab.incognito);}) : + fail('No window with id: ' + args.windowId + ".") + ); + }, + ]); +});
diff --git a/chrome/test/data/webui/print_preview/invalid_settings_browsertest.js b/chrome/test/data/webui/print_preview/invalid_settings_browsertest.js index ae76c187..e316b22f 100644 --- a/chrome/test/data/webui/print_preview/invalid_settings_browsertest.js +++ b/chrome/test/data/webui/print_preview/invalid_settings_browsertest.js
@@ -117,8 +117,8 @@ assertFalse(overlayEl.classList.contains('invisible')); // Make sure the correct text is shown. - const expectedMessageChromium = 'Chromium does not include the PDF ' + - 'viewer which is required for Print Preview to function.'; + const expectedMessageChromium = 'Chromium cannot show the print ' + + 'preview when the built-in PDF viewer is missing.'; const expectedMessageChrome = 'Google Chrome cannot show the print ' + 'preview when the built-in PDF viewer is missing.'; assertTrue(
diff --git a/chrome/test/data/webui/settings/multidevice_subpage_tests.js b/chrome/test/data/webui/settings/multidevice_subpage_tests.js index 31ef914..05e022d 100644 --- a/chrome/test/data/webui/settings/multidevice_subpage_tests.js +++ b/chrome/test/data/webui/settings/multidevice_subpage_tests.js
@@ -60,7 +60,8 @@ }); test('AndroidMessages item shows correct input control', function() { - const inputControl = multideviceSubpage.$$('[slot=feature-controller]'); + const inputControl = multideviceSubpage.$$( + '#android-messages-item > div[slot=feature-controller]'); multideviceSubpage.androidMessagesRequiresSetup_ = true; Polymer.dom.flush();
diff --git a/chrome/test/data/xr/e2e_test_files/html/test_controller_scrolling_iframe_outer.html b/chrome/test/data/xr/e2e_test_files/html/test_controller_scrolling_iframe_outer.html new file mode 100644 index 0000000..b6b76d7f --- /dev/null +++ b/chrome/test/data/xr/e2e_test_files/html/test_controller_scrolling_iframe_outer.html
@@ -0,0 +1,21 @@ +<!doctype html> +<html> + <head> + <style> + iframe { + position: fixed; + top: 0px; + bottom: 0px; + left: 0px; + right: 0px; + width: 100%; + height: 100%; + border: none; + margin: 0; + } + </style> + </head> + <body> + <iframe src="test_controller_scrolling.html" id="fs_iframe"></iframe> + </body> +</html>
diff --git a/chrome/test/data/xr/e2e_test_files/html/test_iframe_clicks_inner.html b/chrome/test/data/xr/e2e_test_files/html/test_iframe_clicks_inner.html new file mode 100644 index 0000000..fcec753 --- /dev/null +++ b/chrome/test/data/xr/e2e_test_files/html/test_iframe_clicks_inner.html
@@ -0,0 +1,27 @@ +<!doctype html> +<html> + <head> + <style> + body { + background-color: blue; + } + div { + display: block; + position: absolute; + top: 0; + left: 0; + width: 100%; + height: 100%; + background-color: red; + } + </style> + <script> + function navigate() { + window.location.href = "test_iframe_clicks_inner_nav.html"; + } + </script> + </head> + <body> + <div onclick="navigate()"></div> + </body> +</html>
diff --git a/chrome/test/data/xr/e2e_test_files/html/test_iframe_clicks_inner_nav.html b/chrome/test/data/xr/e2e_test_files/html/test_iframe_clicks_inner_nav.html new file mode 100644 index 0000000..0acc290 --- /dev/null +++ b/chrome/test/data/xr/e2e_test_files/html/test_iframe_clicks_inner_nav.html
@@ -0,0 +1,22 @@ +<!doctype html> +<html> + <head> + <style> + body { + background-color: blue; + } + div { + display: block; + position: absolute; + top: 0; + left: 0; + width: 100%; + height: 100%; + background-color: yellow; + } + </style> + </head> + <body> + <div></div> + </body> +</html>
diff --git a/chrome/test/data/xr/e2e_test_files/html/test_iframe_clicks_outer.html b/chrome/test/data/xr/e2e_test_files/html/test_iframe_clicks_outer.html new file mode 100644 index 0000000..37ebd04 --- /dev/null +++ b/chrome/test/data/xr/e2e_test_files/html/test_iframe_clicks_outer.html
@@ -0,0 +1,21 @@ +<!doctype html> +<html> + <head> + <style> + iframe { + position: fixed; + top: 0px; + bottom: 0px; + left: 0px; + right: 0px; + width: 100%; + height: 100%; + border: none; + margin: 0; + } + </style> + </head> + <body> + <iframe src="test_iframe_clicks_inner.html" id="fs_iframe"></iframe> + </body> +</html>
diff --git a/chrome/test/data/xr/e2e_test_files/html/test_web_input_editing_iframe_outer.html b/chrome/test/data/xr/e2e_test_files/html/test_web_input_editing_iframe_outer.html new file mode 100644 index 0000000..3c4f45b --- /dev/null +++ b/chrome/test/data/xr/e2e_test_files/html/test_web_input_editing_iframe_outer.html
@@ -0,0 +1,21 @@ +<!doctype html> +<html> + <head> + <style> + iframe { + position: fixed; + top: 0px; + bottom: 0px; + left: 0px; + right: 0px; + width: 100%; + height: 100%; + border: none; + margin: 0; + } + </style> + </head> + <body> + <iframe src="test_web_input_editing.html" id="fs_iframe"></iframe> + </body> +</html>
diff --git a/chrome/test/media_router/media_router_integration_ui_browsertest.cc b/chrome/test/media_router/media_router_integration_ui_browsertest.cc index 6e87923..f0dd6776 100644 --- a/chrome/test/media_router/media_router_integration_ui_browsertest.cc +++ b/chrome/test/media_router/media_router_integration_ui_browsertest.cc
@@ -6,6 +6,7 @@ #include "base/files/file_util.h" #include "base/strings/stringprintf.h" +#include "build/build_config.h" #include "chrome/browser/ui/tabs/tab_strip_model.h" #include "chrome/browser/ui/webui/media_router/media_router_dialog_controller_webui_impl.h" #include "chrome/common/pref_names.h" @@ -20,7 +21,13 @@ const char kTestSinkName[] = "test-sink-1"; } -IN_PROC_BROWSER_TEST_F(MediaRouterIntegrationBrowserTest, Dialog_Basic) { +// Disabled due to flakiness: https://crbug.com/873912. +#if defined(OS_CHROMEOS) && defined(MEMORY_SANITIZER) +#define MAYBE_Dialog_Basic DISABLED_Dialog_Basic +#else +#define MAYBE_Dialog_Basic Dialog_Basic +#endif +IN_PROC_BROWSER_TEST_F(MediaRouterIntegrationBrowserTest, MAYBE_Dialog_Basic) { OpenTestPage(FILE_PATH_LITERAL("basic_test.html")); content::WebContents* web_contents = browser()->tab_strip_model()->GetActiveWebContents();
diff --git a/chrome/test/views/chrome_test_views_delegate.cc b/chrome/test/views/chrome_test_views_delegate.cc index faec34c..76ece24 100644 --- a/chrome/test/views/chrome_test_views_delegate.cc +++ b/chrome/test/views/chrome_test_views_delegate.cc
@@ -9,7 +9,7 @@ ChromeTestViewsDelegate::ChromeTestViewsDelegate() : views::TestViewsDelegate() { // Overrides the LayoutProvider created by TestViewsDelegate. - set_layout_provider(std::make_unique<ChromeLayoutProvider>()); + set_layout_provider(ChromeLayoutProvider::CreateLayoutProvider()); } ChromeTestViewsDelegate::~ChromeTestViewsDelegate() {}
diff --git a/chrome_elf/nt_registry/nt_registry.h b/chrome_elf/nt_registry/nt_registry.h index c5d37a33..436362a 100644 --- a/chrome_elf/nt_registry/nt_registry.h +++ b/chrome_elf/nt_registry/nt_registry.h
@@ -24,6 +24,7 @@ #ifndef CHROME_ELF_NT_REGISTRY_NT_REGISTRY_H_ #define CHROME_ELF_NT_REGISTRY_NT_REGISTRY_H_ +#include <string> #include <vector> #include "sandbox/win/src/nt_internals.h" // NTSTATUS
diff --git a/chromecast/browser/accessibility/accessibility_manager.cc b/chromecast/browser/accessibility/accessibility_manager.cc index 760c359..1b7c4f12 100644 --- a/chromecast/browser/accessibility/accessibility_manager.cc +++ b/chromecast/browser/accessibility/accessibility_manager.cc
@@ -6,6 +6,7 @@ #include "chromecast/graphics/accessibility/focus_ring_controller.h" #include "chromecast/graphics/accessibility/fullscreen_magnification_controller.h" +#include "chromecast/graphics/cast_window_manager_aura.h" #include "ui/aura/window.h" #include "ui/aura/window_tree_host.h" #include "ui/wm/public/activation_client.h" @@ -14,11 +15,11 @@ namespace shell { AccessibilityManager::AccessibilityManager( - aura::WindowTreeHost* window_tree_host) - : window_tree_host_(window_tree_host), + CastWindowManagerAura* window_manager) + : window_tree_host_(window_manager->window_tree_host()), accessibility_sound_proxy_(std::make_unique<AccessibilitySoundPlayer>()) { - DCHECK(window_tree_host); - aura::Window* root_window = window_tree_host->window()->GetRootWindow(); + DCHECK(window_tree_host_); + aura::Window* root_window = window_tree_host_->window()->GetRootWindow(); wm::ActivationClient* activation_client = wm::GetActivationClient(root_window); focus_ring_controller_ = @@ -28,7 +29,8 @@ touch_exploration_manager_ = std::make_unique<TouchExplorationManager>( root_window, activation_client, accessibility_focus_ring_controller_.get(), - &accessibility_sound_proxy_); + &accessibility_sound_proxy_, + window_manager->GetGestureHandler()); triple_tap_detector_ = std::make_unique<TripleTapDetector>(root_window, this); magnification_controller_ = std::make_unique<FullscreenMagnificationController>(root_window);
diff --git a/chromecast/browser/accessibility/accessibility_manager.h b/chromecast/browser/accessibility/accessibility_manager.h index ad1de84..cb708276 100644 --- a/chromecast/browser/accessibility/accessibility_manager.h +++ b/chromecast/browser/accessibility/accessibility_manager.h
@@ -19,6 +19,7 @@ namespace chromecast { +class CastWindowManagerAura; class FocusRingController; class MagnificationController; @@ -28,7 +29,7 @@ // to the responsible party. class AccessibilityManager : public TripleTapDetectorDelegate { public: - explicit AccessibilityManager(aura::WindowTreeHost* window_tree_host); + explicit AccessibilityManager(CastWindowManagerAura* window_manager); ~AccessibilityManager() override; // Sets the focus ring color.
diff --git a/chromecast/browser/accessibility/touch_exploration_controller.cc b/chromecast/browser/accessibility/touch_exploration_controller.cc index 79f9b6d..fe5c078 100644 --- a/chromecast/browser/accessibility/touch_exploration_controller.cc +++ b/chromecast/browser/accessibility/touch_exploration_controller.cc
@@ -611,6 +611,8 @@ lift_activation_bounds_.Contains(location)) { accessibility_sound_player_->PlayTouchTypeEarcon(); SendSimulatedTap(); + } else { + delegate_->HandleTap(location); } }
diff --git a/chromecast/browser/accessibility/touch_exploration_controller.h b/chromecast/browser/accessibility/touch_exploration_controller.h index 652599ce..d6ca5b7 100644 --- a/chromecast/browser/accessibility/touch_exploration_controller.h +++ b/chromecast/browser/accessibility/touch_exploration_controller.h
@@ -43,6 +43,10 @@ // Called when the user performed an accessibility gesture while in touch // accessibility mode, that should be forwarded to ChromeVox. virtual void HandleAccessibilityGesture(ax::mojom::Gesture gesture) = 0; + + // Called when the user has performed a single tap, if it is not within + // lift activation bounds. + virtual void HandleTap(const gfx::Point touch_location) = 0; }; // TouchExplorationController is used in tandem with "Spoken Feedback" to
diff --git a/chromecast/browser/accessibility/touch_exploration_controller_unittest.cc b/chromecast/browser/accessibility/touch_exploration_controller_unittest.cc index 6e6efcf..9609035 100644 --- a/chromecast/browser/accessibility/touch_exploration_controller_unittest.cc +++ b/chromecast/browser/accessibility/touch_exploration_controller_unittest.cc
@@ -81,6 +81,9 @@ void HandleAccessibilityGesture(ax::mojom::Gesture gesture) override { last_gesture_ = gesture; } + void HandleTap(const gfx::Point touch_location) override { + last_tap_ = touch_location; + } const std::vector<float> VolumeChanges() const { return volume_changes_; } ax::mojom::Gesture GetLastGesture() const { return last_gesture_; } @@ -89,6 +92,7 @@ private: std::vector<float> volume_changes_; ax::mojom::Gesture last_gesture_ = ax::mojom::Gesture::kNone; + gfx::Point last_tap_; }; class MockAccessibilitySoundPlayer : public AccessibilitySoundPlayer {
diff --git a/chromecast/browser/accessibility/touch_exploration_manager.cc b/chromecast/browser/accessibility/touch_exploration_manager.cc index c3996ad..d3ae846 100644 --- a/chromecast/browser/accessibility/touch_exploration_manager.cc +++ b/chromecast/browser/accessibility/touch_exploration_manager.cc
@@ -11,6 +11,7 @@ #include "chromecast/browser/cast_browser_process.h" #include "chromecast/common/extensions_api/accessibility_private.h" #include "chromecast/graphics/cast_focus_client_aura.h" +#include "chromecast/graphics/cast_gesture_handler.h" #include "extensions/browser/event_router.h" #include "ui/accessibility/ax_enum_util.h" #include "ui/aura/client/aura_constants.h" @@ -24,12 +25,14 @@ aura::Window* root_window, wm::ActivationClient* activation_client, AccessibilityFocusRingController* accessibility_focus_ring_controller, - AccessibilitySoundPlayer* accessibility_sound_player) + AccessibilitySoundPlayer* accessibility_sound_player, + CastGestureHandler* cast_gesture_handler) : touch_exploration_enabled_(false), root_window_(root_window), activation_client_(activation_client), accessibility_focus_ring_controller_(accessibility_focus_ring_controller), - accessibility_sound_player_(accessibility_sound_player) { + accessibility_sound_player_(accessibility_sound_player), + cast_gesture_handler_(cast_gesture_handler) { DCHECK(root_window); root_window->GetHost()->GetEventSource()->AddEventRewriter(this); UpdateTouchExplorationState(); @@ -81,6 +84,11 @@ extension_misc::kChromeVoxExtensionId, std::move(event)); } +void TouchExplorationManager::HandleTap(const gfx::Point touch_location) { + cast_gesture_handler_->HandleTapDownGesture(touch_location); + cast_gesture_handler_->HandleTapGesture(touch_location); +} + void TouchExplorationManager::OnWindowActivated( ::wm::ActivationChangeObserver::ActivationReason reason, aura::Window* gained_active,
diff --git a/chromecast/browser/accessibility/touch_exploration_manager.h b/chromecast/browser/accessibility/touch_exploration_manager.h index 31f5c5b..7217e712 100644 --- a/chromecast/browser/accessibility/touch_exploration_manager.h +++ b/chromecast/browser/accessibility/touch_exploration_manager.h
@@ -16,6 +16,9 @@ #include "ui/wm/public/activation_client.h" namespace chromecast { + +class CastGestureHandler; + namespace shell { // Responsible for initializing TouchExplorationController when spoken feedback @@ -29,7 +32,8 @@ aura::Window* root_window, wm::ActivationClient* activation_client, AccessibilityFocusRingController* accessibility_focus_ring_controller, - AccessibilitySoundPlayer* accessibility_sound_player); + AccessibilitySoundPlayer* accessibility_sound_player, + CastGestureHandler* cast_gesture_handler); ~TouchExplorationManager() override; // Enable or disable touch exploration. @@ -46,6 +50,7 @@ // TouchExplorationControllerDelegate overrides: void HandleAccessibilityGesture(ax::mojom::Gesture gesture) override; + void HandleTap(const gfx::Point touch_location) override; // wm::ActivationChangeObserver overrides: void OnWindowActivated( @@ -68,6 +73,7 @@ wm::ActivationClient* activation_client_; AccessibilityFocusRingController* accessibility_focus_ring_controller_; AccessibilitySoundPlayer* accessibility_sound_player_; + CastGestureHandler* cast_gesture_handler_; DISALLOW_COPY_AND_ASSIGN(TouchExplorationManager); };
diff --git a/chromecast/browser/cast_browser_main_parts.cc b/chromecast/browser/cast_browser_main_parts.cc index 0cdddb1e..c368817 100644 --- a/chromecast/browser/cast_browser_main_parts.cc +++ b/chromecast/browser/cast_browser_main_parts.cc
@@ -264,7 +264,6 @@ {switches::kEnableUseZoomForDSF, "false"}, // TODO(halliwell): Revert after fix for b/63101386. {switches::kDisallowNonExactResourceReuse, ""}, - {switches::kEnableMediaSuspend, ""}, // Enable autoplay without requiring any user gesture. {switches::kAutoplayPolicy, switches::autoplay::kNoUserGestureRequiredPolicy}, @@ -536,8 +535,7 @@ #if BUILDFLAG(ENABLE_CHROMECAST_EXTENSIONS) cast_browser_process_->SetAccessibilityManager( - std::make_unique<AccessibilityManager>( - window_manager_->window_tree_host())); + std::make_unique<AccessibilityManager>(window_manager_.get())); #endif // BUILDFLAG(ENABLE_CHROMECAST_EXTENSIONS) #else // defined(USE_AURA)
diff --git a/chromecast/browser/cast_content_renderer_manifest_overlay.json b/chromecast/browser/cast_content_renderer_manifest_overlay.json index 041c56a..8194a7d 100644 --- a/chromecast/browser/cast_content_renderer_manifest_overlay.json +++ b/chromecast/browser/cast_content_renderer_manifest_overlay.json
@@ -4,7 +4,7 @@ "interface_provider_specs": { "navigation:frame": { "provides": { - "browser": ["chromecast.shell.mojom.MediaLoadDeferrer"] + "browser": ["chromecast.shell.mojom.MediaPlaybackOptions"] } } }
diff --git a/chromecast/build/tests/cast_test.gni b/chromecast/build/tests/cast_test.gni index 0621295..79a0aab 100644 --- a/chromecast/build/tests/cast_test.gni +++ b/chromecast/build/tests/cast_test.gni
@@ -236,7 +236,7 @@ args = [ "-o", - rebase_path("$_output_prefix.tests"), + rebase_path("$_output_prefix.tests", root_build_dir), "create_list", ] @@ -262,7 +262,7 @@ args = [ "-o", - rebase_path("$_output_prefix.filters"), + rebase_path("$_output_prefix.filters", root_build_dir), "create_list", ] @@ -395,9 +395,9 @@ args = [ "-o", - rebase_path(invoker.build_list_path), + rebase_path(invoker.build_list_path, root_build_dir), "-t", - rebase_path(_shared_dir), + rebase_path(_shared_dir, root_build_dir), "pack_build", ] @@ -422,11 +422,11 @@ args = [ "-o", - rebase_path(invoker.run_list_path), + rebase_path(invoker.run_list_path, root_build_dir), "-d", - rebase_path(invoker.runtime_deps_path), + rebase_path(invoker.runtime_deps_path, root_build_dir), "-t", - rebase_path(_shared_dir), + rebase_path(_shared_dir, root_build_dir), "pack_run", ]
diff --git a/chromecast/common/mojom/BUILD.gn b/chromecast/common/mojom/BUILD.gn index 7786b4b..8c1042f3 100644 --- a/chromecast/common/mojom/BUILD.gn +++ b/chromecast/common/mojom/BUILD.gn
@@ -9,7 +9,7 @@ "application_media_capabilities.mojom", "constants.mojom", "media_caps.mojom", - "media_load_deferrer.mojom", + "media_playback_options.mojom", "memory_pressure.mojom", "multiroom.mojom", ]
diff --git a/chromecast/common/mojom/media_load_deferrer.mojom b/chromecast/common/mojom/media_load_deferrer.mojom deleted file mode 100644 index 4c53c1a..0000000 --- a/chromecast/common/mojom/media_load_deferrer.mojom +++ /dev/null
@@ -1,12 +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. - -module chromecast.shell.mojom; - -// Receives messages from browser process to update -// media block state for a specific RenderFrame. -// Implemented by a RenderFrameObserver. -interface MediaLoadDeferrer { - UpdateMediaLoadStatus(bool blocked); -}; \ No newline at end of file
diff --git a/chromecast/common/mojom/media_playback_options.mojom b/chromecast/common/mojom/media_playback_options.mojom new file mode 100644 index 0000000..8b1e11d --- /dev/null +++ b/chromecast/common/mojom/media_playback_options.mojom
@@ -0,0 +1,14 @@ +// 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. + +module chromecast.shell.mojom; + +// Receives messages from browser process to control media playback options +// (block loading, background suspend) for a specific RenderFrame. +// Implemented by a RenderFrameObserver. +interface MediaPlaybackOptions { + SetMediaLoadingBlocked(bool blocked); + + SetBackgroundSuspendEnabled(bool enabled); +}; \ No newline at end of file
diff --git a/chromecast/graphics/BUILD.gn b/chromecast/graphics/BUILD.gn index f730e43..9a8cc597 100644 --- a/chromecast/graphics/BUILD.gn +++ b/chromecast/graphics/BUILD.gn
@@ -15,7 +15,6 @@ deps = [ "//base", - "//ui/events:events", "//ui/gfx", ]
diff --git a/chromecast/graphics/cast_gesture_handler.cc b/chromecast/graphics/cast_gesture_handler.cc index 1959af9..9ed7cb1 100644 --- a/chromecast/graphics/cast_gesture_handler.cc +++ b/chromecast/graphics/cast_gesture_handler.cc
@@ -10,8 +10,4 @@ return false; } -CastGestureHandler::Corner CastGestureHandler::HandledCornerHolds() const { - return NO_CORNERS; -} - } // namespace chromecast
diff --git a/chromecast/graphics/cast_gesture_handler.h b/chromecast/graphics/cast_gesture_handler.h index 0a1aec30..04a1af1 100644 --- a/chromecast/graphics/cast_gesture_handler.h +++ b/chromecast/graphics/cast_gesture_handler.h
@@ -5,8 +5,6 @@ #ifndef CHROMECAST_GRAPHICS_CAST_GESTURE_HANDLER_H_ #define CHROMECAST_GRAPHICS_CAST_GESTURE_HANDLER_H_ -#include "ui/events/event.h" - // TODO(rdaum): Move into chromecast/graphics/gestures, which will require some // cross-repo maneuvers. #include "base/macros.h" @@ -49,37 +47,6 @@ // followed by a release, within the tap timeout window virtual void HandleTapGesture(const gfx::Point& touch_location) {} - // Triggered when the finger enters a side margin from inside the screen. - // That is, the finger is leaving the screen. - virtual void HandleScreenExit(CastSideSwipeOrigin side, - const gfx::Point& touch_location) {} - - // Triggered when the finger enters a side margin from outside the screen. - // That is, the finger is entering the screen. - virtual void HandleScreenEnter(CastSideSwipeOrigin side, - const gfx::Point& touch_location) {} - - enum Corner { - NO_CORNERS = 0, - TOP_LEFT_CORNER = 1 << 0, - BOTTOM_LEFT_CORNER = 1 << 1, - TOP_RIGHT_CORNER = 1 << 2, - BOTTOM_RIGHT_CORNER = 1 << 3, - }; - - // Return a bitmask of the corners that this handler is interested in, if any. - virtual Corner HandledCornerHolds() const; - - // Triggered when the finger has been held inside the corner for longer - // than the corner hold threshold time. - virtual void HandleCornerHold(Corner corner_origin, - const ui::TouchEvent& touch_event) {} - - // Triggered when a corner hold is ended because the finger has left the - // corner or has been released. - virtual void HandleCornerHoldEnd(Corner corner_origin, - const ui::TouchEvent& touch_event) {} - private: DISALLOW_COPY_AND_ASSIGN(CastGestureHandler); };
diff --git a/chromecast/graphics/cast_window_manager_aura.cc b/chromecast/graphics/cast_window_manager_aura.cc index 5df943a5..0d704418 100644 --- a/chromecast/graphics/cast_window_manager_aura.cc +++ b/chromecast/graphics/cast_window_manager_aura.cc
@@ -324,4 +324,8 @@ window_tree_host_->window()->layer()->SetLayerInverted(enable); } +CastGestureHandler* CastWindowManagerAura::GetGestureHandler() const { + return system_gesture_dispatcher_.get(); +} + } // namespace chromecast
diff --git a/chromecast/graphics/cast_window_manager_aura.h b/chromecast/graphics/cast_window_manager_aura.h index 451d5b50..45319b0 100644 --- a/chromecast/graphics/cast_window_manager_aura.h +++ b/chromecast/graphics/cast_window_manager_aura.h
@@ -22,6 +22,7 @@ namespace chromecast { class CastFocusClientAura; +class CastGestureHandler; class CastSystemGestureEventHandler; class CastSystemGestureDispatcher; class SideSwipeDetector; @@ -72,6 +73,8 @@ CastWindowTreeHost* window_tree_host() const; + CastGestureHandler* GetGestureHandler() const; + private: const bool enable_input_; std::unique_ptr<CastWindowTreeHost> window_tree_host_;
diff --git a/chromecast/graphics/gestures/cast_system_gesture_dispatcher.cc b/chromecast/graphics/gestures/cast_system_gesture_dispatcher.cc index f36f75a..557e9db 100644 --- a/chromecast/graphics/gestures/cast_system_gesture_dispatcher.cc +++ b/chromecast/graphics/gestures/cast_system_gesture_dispatcher.cc
@@ -76,47 +76,4 @@ } } -void CastSystemGestureDispatcher::HandleScreenExit( - CastSideSwipeOrigin side, - const gfx::Point& touch_location) { - for (auto* gesture_handler : gesture_handlers_) { - gesture_handler->HandleScreenExit(side, touch_location); - } -} - -void CastSystemGestureDispatcher::HandleScreenEnter( - CastSideSwipeOrigin side, - const gfx::Point& touch_location) { - for (auto* gesture_handler : gesture_handlers_) { - gesture_handler->HandleScreenEnter(side, touch_location); - } -} - -CastGestureHandler::Corner CastSystemGestureDispatcher::HandledCornerHolds() - const { - int corner_hold_bitmask = CastGestureHandler::NO_CORNERS; - for (auto* gesture_handler : gesture_handlers_) { - corner_hold_bitmask |= gesture_handler->HandledCornerHolds(); - } - return static_cast<CastGestureHandler::Corner>(corner_hold_bitmask); -} - -void CastSystemGestureDispatcher::HandleCornerHold( - CastGestureHandler::Corner corner_origin, - const ui::TouchEvent& touch_event) { - for (auto* gesture_handler : gesture_handlers_) { - if (gesture_handler->HandledCornerHolds() & corner_origin) { - gesture_handler->HandleCornerHold(corner_origin, touch_event); - } - } -} -void CastSystemGestureDispatcher::HandleCornerHoldEnd( - CastGestureHandler::Corner corner_origin, - const ui::TouchEvent& touch_event) { - for (auto* gesture_handler : gesture_handlers_) { - if (gesture_handler->HandledCornerHolds() & corner_origin) { - gesture_handler->HandleCornerHoldEnd(corner_origin, touch_event); - } - } -} -} // namespace chromecast +} // namespace chromecast \ No newline at end of file
diff --git a/chromecast/graphics/gestures/cast_system_gesture_dispatcher.h b/chromecast/graphics/gestures/cast_system_gesture_dispatcher.h index b7a0c7d..46aca1b 100644 --- a/chromecast/graphics/gestures/cast_system_gesture_dispatcher.h +++ b/chromecast/graphics/gestures/cast_system_gesture_dispatcher.h
@@ -35,15 +35,6 @@ const gfx::Point& touch_location) override; void HandleTapDownGesture(const gfx::Point& touch_location) override; void HandleTapGesture(const gfx::Point& touch_location) override; - void HandleScreenExit(CastSideSwipeOrigin side, - const gfx::Point& touch_location) override; - void HandleScreenEnter(CastSideSwipeOrigin side, - const gfx::Point& touch_location) override; - Corner HandledCornerHolds() const override; - void HandleCornerHold(Corner corner_origin, - const ui::TouchEvent& touch_event) override; - void HandleCornerHoldEnd(Corner corner_origin, - const ui::TouchEvent& touch_event) override; private: base::flat_set<CastGestureHandler*> gesture_handlers_;
diff --git a/chromecast/graphics/gestures/side_swipe_detector.cc b/chromecast/graphics/gestures/side_swipe_detector.cc index ede8998..af14dc3 100644 --- a/chromecast/graphics/gestures/side_swipe_detector.cc +++ b/chromecast/graphics/gestures/side_swipe_detector.cc
@@ -13,6 +13,7 @@ #include "ui/aura/window_tree_host.h" #include "ui/display/display.h" #include "ui/display/screen.h" +#include "ui/events/event.h" #include "ui/events/event_rewriter.h" #include "ui/gfx/geometry/point.h" #include "ui/gfx/geometry/rect.h" @@ -56,11 +57,7 @@ bottom_gesture_start_height_(BottomGestureStartHeight()), gesture_handler_(gesture_handler), root_window_(root_window), - current_swipe_origin_(CastSideSwipeOrigin::NONE), - current_pointer_id_(ui::PointerDetails::kUnknownPointerId), - corner_hold_timer_(new base::OneShotTimer), - in_corner_hold_(false), - current_corner_origin_(CastGestureHandler::NO_CORNERS) { + current_swipe_(CastSideSwipeOrigin::NONE) { DCHECK(gesture_handler); DCHECK(root_window); root_window_->GetHost()->GetEventSource()->AddEventRewriter(this); @@ -70,74 +67,30 @@ root_window_->GetHost()->GetEventSource()->RemoveEventRewriter(this); } -bool SideSwipeDetector::GetMarginPosition( +CastSideSwipeOrigin SideSwipeDetector::GetDragPosition( const gfx::Point& point, - const gfx::Rect& screen_bounds, - CastSideSwipeOrigin* side, - CastGestureHandler::Corner* corner) const { - DCHECK(corner); - DCHECK(side); - *corner = CastGestureHandler::NO_CORNERS; - *side = CastSideSwipeOrigin::NONE; - - const int top_margin_limit = screen_bounds.y() + gesture_start_height_; - const int left_margin_limit = screen_bounds.x() + gesture_start_width_; - const int right_margin_limit = - screen_bounds.x() + screen_bounds.width() - gesture_start_width_; - const int bottom_margin_limit = - screen_bounds.y() + screen_bounds.height() - bottom_gesture_start_height_; - - // Find out if anybody is interested in corner events (hold or swipe). If not, - // we won't bother trying to check them, so that we can be sure that swipe - // events that happen in corners are treated as a side. - CastGestureHandler::Corner corners = gesture_handler_->HandledCornerHolds(); - - // Look for corners first if needed. - if (corners != CastGestureHandler::NO_CORNERS) { - if (corners && point.y() < top_margin_limit && - point.x() < left_margin_limit) { - *corner = CastGestureHandler::TOP_LEFT_CORNER; - return true; - } - if (point.y() < top_margin_limit && point.x() > right_margin_limit) { - *corner = CastGestureHandler::TOP_RIGHT_CORNER; - return true; - } - if (point.x() < left_margin_limit && point.y() > bottom_margin_limit) { - *corner = CastGestureHandler::BOTTOM_LEFT_CORNER; - return true; - } - if (point.x() > right_margin_limit && point.y() > bottom_margin_limit) { - *corner = CastGestureHandler::BOTTOM_RIGHT_CORNER; - return true; - } + const gfx::Rect& screen_bounds) const { + if (point.y() < (screen_bounds.y() + gesture_start_height_)) { + return CastSideSwipeOrigin::TOP; } - - // Then sides. - if (point.y() < top_margin_limit) { - *side = CastSideSwipeOrigin::TOP; - return true; + if (point.x() < (screen_bounds.x() + gesture_start_width_)) { + return CastSideSwipeOrigin::LEFT; } - if (point.x() < left_margin_limit) { - *side = CastSideSwipeOrigin::LEFT; - return true; + if (point.x() > + (screen_bounds.x() + screen_bounds.width() - gesture_start_width_)) { + return CastSideSwipeOrigin::RIGHT; } - if (point.x() > right_margin_limit) { - *side = CastSideSwipeOrigin::RIGHT; - return true; + if (point.y() > (screen_bounds.y() + screen_bounds.height() - + bottom_gesture_start_height_)) { + return CastSideSwipeOrigin::BOTTOM; } - if (point.y() > bottom_margin_limit) { - *side = CastSideSwipeOrigin::BOTTOM; - return true; - } - *side = CastSideSwipeOrigin::NONE; - return false; + return CastSideSwipeOrigin::NONE; } void SideSwipeDetector::StashEvent(const ui::TouchEvent& event) { // If the time since the gesture start is longer than our threshold, do not // stash the event (and clear the stashed events). - if (gesture_elapsed_timer_.Elapsed() > kGestureMarginEventsTimeLimit) { + if (current_swipe_time_.Elapsed() > kGestureMarginEventsTimeLimit) { stashed_events_.clear(); return; } @@ -151,6 +104,7 @@ if (!event.IsTouchEvent()) { return ui::EVENT_REWRITE_CONTINUE; } + const ui::TouchEvent* touch_event = event.AsTouchEvent(); // Touch events come through in screen pixels, but untransformed. This is the @@ -162,121 +116,69 @@ gfx::Rect screen_bounds = display::Screen::GetScreen() ->GetDisplayNearestPoint(touch_location) .bounds(); + CastSideSwipeOrigin side_swipe_origin = + GetDragPosition(touch_location, screen_bounds); - CastSideSwipeOrigin detected_side; - CastGestureHandler::Corner detected_corner; - bool is_margin_event = GetMarginPosition(touch_location, screen_bounds, - &detected_side, &detected_corner); - - // Gesture initiation is a press event inside a margin for a new pointer id. - if (touch_event->type() == ui::ET_TOUCH_PRESSED) { - if (!is_margin_event) { + // A located event has occurred inside the margin. It might be the start of + // our gesture, or a touch that we need to squash. + if (current_swipe_ == CastSideSwipeOrigin::NONE && + side_swipe_origin != CastSideSwipeOrigin::NONE) { + // Check to see if we have any potential consumers of events on this side. + // If not, we can continue on without consuming it. + if (!gesture_handler_->CanHandleSwipe(side_swipe_origin)) { return ui::EVENT_REWRITE_CONTINUE; } - // We're entering the screen, so notify the dispatcher of that before - // looking for a swipe. - gesture_handler_->HandleScreenEnter(detected_side, touch_event->location()); - - // There's already a finger down, so don't process any swipes or corners - // with the new one. - if (current_pointer_id_ != ui::PointerDetails::kUnknownPointerId) { + // Detect the beginning of a system gesture swipe. + if (touch_event->type() != ui::ET_TOUCH_PRESSED) { return ui::EVENT_REWRITE_CONTINUE; } - // Remember the finger. - current_pointer_id_ = touch_event->pointer_details().id; + current_swipe_ = side_swipe_origin; - // If we're in a corner (which means we're looking for that kind of thing), - // start the corner hold timer and move on. - in_corner_hold_ = false; - current_corner_origin_ = CastGestureHandler::NO_CORNERS; - if (detected_corner != CastGestureHandler::NO_CORNERS) { - current_corner_origin_ = detected_corner; - corner_hold_start_event_ = ui::Event::Clone(*touch_event); - corner_hold_timer_->Start( - FROM_HERE, gesture_detector_config_.longpress_timeout, this, - &SideSwipeDetector::OnCornerHoldTimerFired); - } else if (detected_side != CastSideSwipeOrigin::NONE && - gesture_handler_->CanHandleSwipe(detected_side)) { - current_swipe_origin_ = detected_side; + // Let the subscribers know about the gesture begin. + gesture_handler_->HandleSideSwipeBegin(side_swipe_origin, touch_location); - // Let the subscribers know about the gesture begin. - gesture_handler_->HandleSideSwipeBegin(detected_side, touch_location); + VLOG(1) << "side swipe gesture begin @ " << touch_location.ToString(); + current_swipe_time_ = base::ElapsedTimer(); - VLOG(1) << "side swipe gesture begin @ " << touch_location.ToString(); - } else { - return ui::EVENT_REWRITE_CONTINUE; - } - gesture_elapsed_timer_ = base::ElapsedTimer(); - - // Stash a copy of the event should we decide to reconstitute it later if - // we decide that this isn't in fact a side swipe or corner hold. + // Stash a copy of the event should we decide to reconstitute it later if we + // decide that this isn't in fact a side swipe. StashEvent(*touch_event); // Avoid corrupt gesture state caused by a missing kGestureScrollEnd event // as we potentially transition between web views. root_window_->CleanupGestureState(); + // And then stop the original event from propagating. return ui::EVENT_REWRITE_DISCARD; } - // If we're releasing on our way out of the screen, let the world know. - if (touch_event->type() == ui::ET_TOUCH_RELEASED && - detected_side != CastSideSwipeOrigin::NONE) { - gesture_handler_->HandleScreenExit(detected_side, touch_event->location()); - } - - // If we're not in a gesture of any kind, or the the non-press events we're - // getting are not for the same pointer id, we're not interested in them. - if ((current_corner_origin_ == CastGestureHandler::NO_CORNERS && - current_swipe_origin_ == CastSideSwipeOrigin::NONE) || - touch_event->pointer_details().id != current_pointer_id_) { + if (current_swipe_ == CastSideSwipeOrigin::NONE) { return ui::EVENT_REWRITE_CONTINUE; } - // While we're in a swipe, stash events for later playback. - if (in_corner_hold_ || current_swipe_origin_ != CastSideSwipeOrigin::NONE) { - StashEvent(*touch_event); - } + // A swipe is in progress, or has completed, so stop propagation of underlying + // gesture/touch events, after stashing a copy of the original event. + StashEvent(*touch_event); + // The finger has lifted, which means the end of the gesture, or if the finger + // hasn't travelled far enough, replay the original events. if (touch_event->type() == ui::ET_TOUCH_RELEASED) { - current_pointer_id_ = ui::PointerDetails::kUnknownPointerId; - - // If a corner event was in progress, we will need to either finish a hold - // or cancel it. - if (current_corner_origin_ != CastGestureHandler::NO_CORNERS) { - // If the corner was being held, notify consumers that it's over, - // clear events, and discard. - if (in_corner_hold_) { - EndCornerHold(*touch_event); - - stashed_events_.clear(); - return ui::EVENT_REWRITE_DISCARD; - } - - // Otherwise cancel and replay held events. - CancelCornerHoldCheck(); - - return StartNextDispatchStashedEvents(new_event); - } - - // If there was no side swipe in progress, we can just move on. - if (current_swipe_origin_ == CastSideSwipeOrigin::NONE) { - return ui::EVENT_REWRITE_CONTINUE; - } - - VLOG(1) << "gesture swipe release; time since press: " - << gesture_elapsed_timer_.Elapsed().InMilliseconds() << "ms @ " + VLOG(1) << "gesture release; time since press: " + << current_swipe_time_.Elapsed().InMilliseconds() << "ms @ " << touch_location.ToString(); - gesture_handler_->HandleSideSwipeEnd(current_swipe_origin_, touch_location); - current_swipe_origin_ = CastSideSwipeOrigin::NONE; + gesture_handler_->HandleSideSwipeEnd(current_swipe_, touch_location); + current_swipe_ = CastSideSwipeOrigin::NONE; // If the finger is still inside the touch margin at release, this is not // really a side swipe. Start streaming out events we stashed for later // retrieval. - if (detected_side != CastSideSwipeOrigin::NONE) { - return StartNextDispatchStashedEvents(new_event); + if (side_swipe_origin != CastSideSwipeOrigin::NONE && + !stashed_events_.empty()) { + *new_event = ui::Event::Clone(stashed_events_.front()); + stashed_events_.pop_front(); + return ui::EVENT_REWRITE_DISPATCH_ANOTHER; } // Otherwise, clear them. @@ -285,49 +187,15 @@ return ui::EVENT_REWRITE_DISCARD; } - // If we're looking for corner hold and the timer has not expired and we've - // left the corner, cancel the hold check now and replay the stashed events. - if (current_corner_origin_ != CastGestureHandler::NO_CORNERS && - detected_corner != current_corner_origin_ && - corner_hold_timer_->IsRunning()) { - CancelCornerHoldCheck(); - - return StartNextDispatchStashedEvents(new_event); - } - - // If a swipe is ongoing, let consumers know about it. - if (current_swipe_origin_ != CastSideSwipeOrigin::NONE) { - gesture_handler_->HandleSideSwipeContinue(current_swipe_origin_, - touch_location); - VLOG(1) << "gesture continue; time since press: " - << gesture_elapsed_timer_.Elapsed().InMilliseconds() << "ms @ " - << touch_location.ToString(); - } - - // If we're in corner hold and we've left the corner, that's an end. - if (in_corner_hold_ && detected_corner != current_corner_origin_) { - EndCornerHold(*touch_event); - - stashed_events_.clear(); - } + // The system gesture is ongoing... + gesture_handler_->HandleSideSwipeContinue(current_swipe_, touch_location); + VLOG(1) << "gesture continue; time since press: " + << current_swipe_time_.Elapsed().InMilliseconds() << "ms @ " + << touch_location.ToString(); return ui::EVENT_REWRITE_DISCARD; } -void SideSwipeDetector::CancelCornerHoldCheck() { - corner_hold_timer_->Stop(); - corner_hold_start_event_.reset(); - in_corner_hold_ = false; - current_corner_origin_ = CastGestureHandler::NO_CORNERS; -} - -void SideSwipeDetector::EndCornerHold(const ui::TouchEvent& event) { - gesture_handler_->HandleCornerHoldEnd(current_corner_origin_, event); - in_corner_hold_ = false; - current_corner_origin_ = CastGestureHandler::NO_CORNERS; - corner_hold_start_event_.reset(); -} - ui::EventRewriteStatus SideSwipeDetector::NextDispatchEvent( const ui::Event& last_event, std::unique_ptr<ui::Event>* new_event) { @@ -341,30 +209,4 @@ return ui::EVENT_REWRITE_DISPATCH_ANOTHER; } -void SideSwipeDetector::OnCornerHoldTimerFired() { - DCHECK(corner_hold_start_event_); - DCHECK(current_corner_origin_ != CastGestureHandler::NO_CORNERS); - DCHECK(!in_corner_hold_); - in_corner_hold_ = true; - gesture_handler_->HandleCornerHold(current_corner_origin_, - *corner_hold_start_event_->AsTouchEvent()); - corner_hold_start_event_.reset(); -} - -void SideSwipeDetector::SetTimerForTesting( - std::unique_ptr<base::OneShotTimer> timer) { - corner_hold_timer_ = std::move(timer); -} - -ui::EventRewriteStatus SideSwipeDetector::StartNextDispatchStashedEvents( - std::unique_ptr<ui::Event>* new_event) { - if (!stashed_events_.empty()) { - *new_event = ui::Event::Clone(stashed_events_.front()); - stashed_events_.pop_front(); - return ui::EVENT_REWRITE_DISPATCH_ANOTHER; - } - stashed_events_.clear(); - return ui::EVENT_REWRITE_DISCARD; -} - } // namespace chromecast
diff --git a/chromecast/graphics/gestures/side_swipe_detector.h b/chromecast/graphics/gestures/side_swipe_detector.h index 60ec0fb..7a23db7 100644 --- a/chromecast/graphics/gestures/side_swipe_detector.h +++ b/chromecast/graphics/gestures/side_swipe_detector.h
@@ -6,10 +6,8 @@ #define CHROMECAST_GRAPHICS_GESTURES_SIDE_SWIPE_DETECTOR_H_ #include "base/timer/elapsed_timer.h" -#include "base/timer/timer.h" #include "chromecast/graphics/cast_gesture_handler.h" #include "ui/events/event_rewriter.h" -#include "ui/events/gesture_detection/gesture_detector.h" namespace aura { class Window; @@ -17,10 +15,6 @@ namespace chromecast { -namespace test { -class SideSwipeDetectorTest; -} // namespace test - // An event rewriter for detecting system-wide gestures performed on the margins // of the root window. // Recognizes swipe gestures that originate from the top, left, bottom, and @@ -34,10 +28,8 @@ ~SideSwipeDetector() override; - bool GetMarginPosition(const gfx::Point& point, - const gfx::Rect& screen_bounds, - CastSideSwipeOrigin* side, - CastGestureHandler::Corner* corner) const; + CastSideSwipeOrigin GetDragPosition(const gfx::Point& point, + const gfx::Rect& screen_bounds) const; // Overridden from ui::EventRewriter ui::EventRewriteStatus RewriteEvent( @@ -48,16 +40,7 @@ std::unique_ptr<ui::Event>* new_event) override; private: - friend class test::SideSwipeDetectorTest; - void SetTimerForTesting(std::unique_ptr<base::OneShotTimer> mock_timer); - void StashEvent(const ui::TouchEvent& event); - void OnCornerHoldTimerFired(); - void EndCornerHold(const ui::TouchEvent& event); - void CancelCornerHoldCheck(); - - ui::EventRewriteStatus StartNextDispatchStashedEvents( - std::unique_ptr<ui::Event>* new_event); const int gesture_start_width_; const int gesture_start_height_; @@ -65,22 +48,14 @@ CastGestureHandler* gesture_handler_; aura::Window* root_window_; - CastSideSwipeOrigin current_swipe_origin_; - int current_pointer_id_; - base::ElapsedTimer gesture_elapsed_timer_; - std::deque<ui::TouchEvent> stashed_events_; + CastSideSwipeOrigin current_swipe_; + base::ElapsedTimer current_swipe_time_; - // A default gesture detector config, so we can share the same - // longpress timeout for corner hold. - ui::GestureDetector::Config gesture_detector_config_; - std::unique_ptr<base::OneShotTimer> corner_hold_timer_; - std::unique_ptr<ui::Event> corner_hold_start_event_; - bool in_corner_hold_; - CastGestureHandler::Corner current_corner_origin_; + std::deque<ui::TouchEvent> stashed_events_; DISALLOW_COPY_AND_ASSIGN(SideSwipeDetector); }; } // namespace chromecast -#endif // CHROMECAST_GRAPHICS_GESTURES_SIDE_SWIPE_DETECTOR_H_ +#endif // CHROMECAST_GRAPHICS_GESTURES_SIDE_SWIPE_DETECTOR_H_ \ No newline at end of file
diff --git a/chromecast/graphics/gestures/side_swipe_detector_test.cc b/chromecast/graphics/gestures/side_swipe_detector_test.cc index 0a8a0af0..c50c8581c 100644 --- a/chromecast/graphics/gestures/side_swipe_detector_test.cc +++ b/chromecast/graphics/gestures/side_swipe_detector_test.cc
@@ -6,25 +6,14 @@ #include <memory> -#include "base/message_loop/message_loop.h" #include "base/run_loop.h" -#include "base/test/simple_test_tick_clock.h" -#include "base/test/test_mock_time_task_runner.h" -#include "testing/gmock/include/gmock/gmock.h" #include "ui/aura/client/screen_position_client.h" #include "ui/aura/test/aura_test_base.h" #include "ui/aura/test/event_generator_delegate_aura.h" #include "ui/aura/window.h" -#include "ui/events/event_utils.h" #include "ui/events/test/event_generator.h" #include "ui/wm/core/default_screen_position_client.h" -// Gmock matchers and actions that we use below. -using testing::_; -using testing::AnyOf; -using testing::Eq; -using testing::Return; - namespace chromecast { namespace test { @@ -34,9 +23,6 @@ constexpr int kSwipeDistance = 50; constexpr int kNumSteps = 5; constexpr gfx::Point kZeroPoint{0, 0}; -constexpr base::TimeDelta kHoldCornerDelay = - base::TimeDelta::FromMilliseconds(3500); -constexpr gfx::Point kNWCorner{5, 5}; } // namespace @@ -63,9 +49,11 @@ DISALLOW_COPY_AND_ASSIGN(TestEventGeneratorDelegate); }; -// TODO(rdaum): Make this use gmock for all events instead of just for corners. class TestSideSwipeGestureHandler : public CastGestureHandler { public: + TestSideSwipeGestureHandler() + : begin_swipe_point_(kZeroPoint), end_swipe_point_(kZeroPoint) {} + ~TestSideSwipeGestureHandler() override = default; bool CanHandleSwipe(CastSideSwipeOrigin swipe_origin) override { @@ -94,21 +82,6 @@ CastSideSwipeOrigin end_swipe_origin() const { return end_swipe_origin_; } gfx::Point end_swipe_point() const { return end_swipe_point_; } - // Mocks. - MOCK_METHOD2(HandleScreenExit, - void(CastSideSwipeOrigin side, - const gfx::Point& touch_location)); - MOCK_METHOD2(HandleScreenEnter, - void(CastSideSwipeOrigin side, - const gfx::Point& touch_location)); - MOCK_CONST_METHOD0(HandledCornerHolds, CastGestureHandler::Corner()); - MOCK_METHOD2(HandleCornerHold, - void(CastGestureHandler::Corner corner_origin, - const ui::TouchEvent& touch_event)); - MOCK_METHOD2(HandleCornerHoldEnd, - void(CastGestureHandler::Corner corner_origin, - const ui::TouchEvent& touch_event)); - private: bool handle_swipe_ = true; @@ -151,17 +124,6 @@ gesture_handler_.get(), root_window()); test_event_handler_ = std::make_unique<TestEventHandler>(); root_window()->AddPostTargetHandler(test_event_handler_.get()); - - mock_task_runner_ = base::MakeRefCounted<base::TestMockTimeTaskRunner>( - base::Time::Now(), base::TimeTicks::Now()); - auto mock_timer = std::make_unique<base::OneShotTimer>( - mock_task_runner_->GetMockTickClock()); - mock_timer->SetTaskRunner(mock_task_runner_); - ui::SetEventTickClockForTesting(mock_task_runner_->GetMockTickClock()); - side_swipe_detector_->SetTimerForTesting(std::move(mock_timer)); - - EXPECT_CALL(test_gesture_handler(), HandledCornerHolds()) - .WillRepeatedly(Return(CastGestureHandler::NO_CORNERS)); } void TearDown() override { @@ -171,52 +133,6 @@ aura::test::AuraTestBase::TearDown(); } - // Simulate a tap-hold event in one place. - void Hold(const gfx::Point& tap_point, const base::TimeDelta& delta) { - ui::TouchEvent press( - ui::ET_TOUCH_PRESSED, tap_point, mock_clock()->NowTicks(), - ui::PointerDetails(ui::EventPointerType::POINTER_TYPE_TOUCH, - ui::PointerDetails::kUnknownPointerId)); - GetEventGenerator().Dispatch(&press); - mock_task_runner()->AdvanceMockTickClock(delta); - mock_task_runner()->FastForwardBy(delta); - ui::TouchEvent release( - ui::ET_TOUCH_RELEASED, tap_point, mock_clock()->NowTicks(), - ui::PointerDetails(ui::EventPointerType::POINTER_TYPE_TOUCH, - ui::PointerDetails::kUnknownPointerId)); - GetEventGenerator().Dispatch(&release); - } - - void Drag(const gfx::Point& start_point, - const base::TimeDelta& start_hold_time, - const base::TimeDelta& drag_time, - const gfx::Point& end_point, - bool end_release = true) { - ui::TouchEvent press( - ui::ET_TOUCH_PRESSED, start_point, mock_clock()->NowTicks(), - ui::PointerDetails(ui::EventPointerType::POINTER_TYPE_TOUCH, - ui::PointerDetails::kUnknownPointerId)); - GetEventGenerator().Dispatch(&press); - mock_task_runner()->AdvanceMockTickClock(start_hold_time); - mock_task_runner()->FastForwardBy(start_hold_time); - - ui::TouchEvent move( - ui::ET_TOUCH_MOVED, end_point, mock_clock()->NowTicks(), - ui::PointerDetails(ui::EventPointerType::POINTER_TYPE_TOUCH, - ui::PointerDetails::kUnknownPointerId)); - GetEventGenerator().Dispatch(&move); - mock_task_runner()->AdvanceMockTickClock(drag_time); - mock_task_runner()->FastForwardBy(drag_time); - - if (end_release) { - ui::TouchEvent release( - ui::ET_TOUCH_RELEASED, end_point, mock_clock()->NowTicks(), - ui::PointerDetails(ui::EventPointerType::POINTER_TYPE_TOUCH, - ui::PointerDetails::kUnknownPointerId)); - GetEventGenerator().Dispatch(&release); - } - } - ui::test::EventGenerator& GetEventGenerator() { if (!event_generator_) { event_generator_.reset(new ui::test::EventGenerator( @@ -231,14 +147,6 @@ TestEventHandler& test_event_handler() { return *test_event_handler_; } - base::TestMockTimeTaskRunner* mock_task_runner() const { - return mock_task_runner_.get(); - } - - const base::TickClock* mock_clock() const { - return mock_task_runner_->GetMockTickClock(); - } - private: std::unique_ptr<aura::client::ScreenPositionClient> screen_position_client_; std::unique_ptr<ui::test::EventGenerator> event_generator_; @@ -246,7 +154,6 @@ std::unique_ptr<SideSwipeDetector> side_swipe_detector_; std::unique_ptr<TestEventHandler> test_event_handler_; std::unique_ptr<TestSideSwipeGestureHandler> gesture_handler_; - scoped_refptr<base::TestMockTimeTaskRunner> mock_task_runner_; }; // Test that initialization works and initial state is clean. @@ -268,8 +175,8 @@ generator.GestureScrollSequence(drag_point, drag_point - gfx::Vector2d(0, kSwipeDistance), kTimeDelay, kNumSteps); - - base::RunLoop().RunUntilIdle(); + base::RunLoop run_loop; + run_loop.RunUntilIdle(); EXPECT_EQ(CastSideSwipeOrigin::NONE, test_gesture_handler().begin_swipe_origin()); @@ -286,8 +193,8 @@ generator.GestureScrollSequence(drag_point, drag_point + gfx::Vector2d(kSwipeDistance, 0), kTimeDelay, kNumSteps); - - base::RunLoop().RunUntilIdle(); + base::RunLoop run_loop; + run_loop.RunUntilIdle(); EXPECT_EQ(CastSideSwipeOrigin::LEFT, test_gesture_handler().begin_swipe_origin()); @@ -305,8 +212,8 @@ generator.GestureScrollSequence(drag_point, drag_point - gfx::Vector2d(kSwipeDistance, 0), kTimeDelay, kNumSteps); - - base::RunLoop().RunUntilIdle(); + base::RunLoop run_loop; + run_loop.RunUntilIdle(); EXPECT_EQ(CastSideSwipeOrigin::RIGHT, test_gesture_handler().begin_swipe_origin()); @@ -323,8 +230,8 @@ generator.GestureScrollSequence(drag_point, drag_point + gfx::Vector2d(0, kSwipeDistance), kTimeDelay, kNumSteps); - - base::RunLoop().RunUntilIdle(); + base::RunLoop run_loop; + run_loop.RunUntilIdle(); EXPECT_EQ(CastSideSwipeOrigin::TOP, test_gesture_handler().begin_swipe_origin()); @@ -342,8 +249,8 @@ generator.GestureScrollSequence(drag_point, drag_point - gfx::Vector2d(0, kSwipeDistance), kTimeDelay, kNumSteps); - - base::RunLoop().RunUntilIdle(); + base::RunLoop run_loop; + run_loop.RunUntilIdle(); EXPECT_EQ(CastSideSwipeOrigin::BOTTOM, test_gesture_handler().begin_swipe_origin()); @@ -365,8 +272,8 @@ generator.GestureScrollSequence(drag_point, drag_point - gfx::Vector2d(0, kSwipeDistance), kTimeDelay, kNumSteps); - - base::RunLoop().RunUntilIdle(); + base::RunLoop run_loop; + run_loop.RunUntilIdle(); EXPECT_EQ(CastSideSwipeOrigin::NONE, test_gesture_handler().begin_swipe_origin()); @@ -377,106 +284,5 @@ EXPECT_NE(0, test_event_handler().NumTouchEventsReceived()); } -TEST_F(SideSwipeDetectorTest, ScreenEnter) { - EXPECT_CALL(test_gesture_handler(), - HandleScreenEnter(Eq(CastSideSwipeOrigin::TOP), _)) - .Times(1); - EXPECT_CALL(test_gesture_handler(), - HandleScreenExit(Eq(CastSideSwipeOrigin::TOP), _)) - .Times(0); - - test_gesture_handler().SetHandleSwipe(false); - - gfx::Point drag_point(root_window()->bounds().width() / 2, 0); - ui::test::EventGenerator& generator = GetEventGenerator(); - generator.GestureScrollSequence(drag_point, - drag_point + gfx::Vector2d(0, kSwipeDistance), - kTimeDelay, kNumSteps); - - base::RunLoop().RunUntilIdle(); -} - -TEST_F(SideSwipeDetectorTest, ScreenExit) { - EXPECT_CALL(test_gesture_handler(), - HandleScreenExit(Eq(CastSideSwipeOrigin::TOP), _)) - .Times(1); - EXPECT_CALL(test_gesture_handler(), - HandleScreenEnter(Eq(CastSideSwipeOrigin::TOP), _)) - .Times(0); - - test_gesture_handler().SetHandleSwipe(false); - - gfx::Point drag_point(root_window()->bounds().width() / 2, 0); - ui::test::EventGenerator& generator = GetEventGenerator(); - generator.GestureScrollSequence(drag_point + gfx::Vector2d(0, kSwipeDistance), - drag_point, kTimeDelay, kNumSteps); - - base::RunLoop().RunUntilIdle(); -} - -// Test corner hold. -TEST_F(SideSwipeDetectorTest, CornerHoldTrigger) { - EXPECT_CALL(test_gesture_handler(), HandledCornerHolds()) - .WillRepeatedly(Return(CastGestureHandler::TOP_LEFT_CORNER)); - EXPECT_CALL(test_gesture_handler(), - HandleCornerHold(Eq(CastGestureHandler::TOP_LEFT_CORNER), _)) - .Times(1); - EXPECT_CALL(test_gesture_handler(), - HandleCornerHoldEnd(Eq(CastGestureHandler::TOP_LEFT_CORNER), _)) - .Times(1); - Hold(kNWCorner, kHoldCornerDelay); - - base::RunLoop().RunUntilIdle(); -} - -// Test that it's a corner hold if we hold long enough in corner then drag out. -TEST_F(SideSwipeDetectorTest, CornerHoldDragOutOfCorner) { - EXPECT_CALL(test_gesture_handler(), HandledCornerHolds()) - .WillRepeatedly(Return(CastGestureHandler::TOP_LEFT_CORNER)); - EXPECT_CALL(test_gesture_handler(), HandleCornerHold(_, _)).Times(1); - EXPECT_CALL(test_gesture_handler(), HandleCornerHoldEnd(_, _)).Times(1); - Drag(kNWCorner, kHoldCornerDelay, kHoldCornerDelay, - kNWCorner + gfx::Vector2d(100, 100)); - - base::RunLoop().RunUntilIdle(); -} - -// Test that it's not a corner hold if it doesn't sit in the corner long enough. -TEST_F(SideSwipeDetectorTest, CornerHoldCancelNotLongEnough) { - EXPECT_CALL(test_gesture_handler(), HandledCornerHolds()) - .WillRepeatedly(Return(CastGestureHandler::TOP_LEFT_CORNER)); - EXPECT_CALL(test_gesture_handler(), HandleCornerHold(_, _)).Times(0); - EXPECT_CALL(test_gesture_handler(), HandleCornerHoldEnd(_, _)).Times(0); - Hold(kNWCorner, base::TimeDelta::FromMilliseconds(5)); - - base::RunLoop().RunUntilIdle(); -} - -// Test that it's not a corner hold if it drags out of the corner before the -// hold time. -TEST_F(SideSwipeDetectorTest, CornerHoldCancelDragOutOfCorner) { - EXPECT_CALL(test_gesture_handler(), HandledCornerHolds()) - .WillRepeatedly(Return(CastGestureHandler::TOP_LEFT_CORNER)); - EXPECT_CALL(test_gesture_handler(), HandleCornerHold(_, _)).Times(0); - EXPECT_CALL(test_gesture_handler(), HandleCornerHoldEnd(_, _)).Times(0); - Drag(kNWCorner, base::TimeDelta::FromMilliseconds(5), kHoldCornerDelay, - kNWCorner + gfx::Vector2d(100, 100)); - - base::RunLoop().RunUntilIdle(); -} - -// Test that it's not a corner hold if it drags out of the corner before the -// hold time, even with the finger held. -TEST_F(SideSwipeDetectorTest, CornerHoldCancelDragOutOfCornerButHeld) { - EXPECT_CALL(test_gesture_handler(), HandledCornerHolds()) - .WillRepeatedly(Return(CastGestureHandler::TOP_LEFT_CORNER)); - EXPECT_CALL(test_gesture_handler(), HandleCornerHold(_, _)).Times(0); - EXPECT_CALL(test_gesture_handler(), HandleCornerHoldEnd(_, _)).Times(0); - Drag(kNWCorner, base::TimeDelta::FromMilliseconds(5), kHoldCornerDelay, - kNWCorner + gfx::Vector2d(100, 100), false /* end_release */); - - base::RunLoop().RunUntilIdle(); -} - } // namespace test } // namespace chromecast
diff --git a/chromecast/renderer/BUILD.gn b/chromecast/renderer/BUILD.gn index a698c3d..cd88cec 100644 --- a/chromecast/renderer/BUILD.gn +++ b/chromecast/renderer/BUILD.gn
@@ -28,8 +28,8 @@ sources = [ "cast_content_renderer_client.cc", "cast_content_renderer_client.h", - "cast_media_load_deferrer.cc", - "cast_media_load_deferrer.h", + "cast_media_playback_options.cc", + "cast_media_playback_options.h", ] public_deps = [
diff --git a/chromecast/renderer/cast_content_renderer_client.cc b/chromecast/renderer/cast_content_renderer_client.cc index 50fb162..299f7cd 100644 --- a/chromecast/renderer/cast_content_renderer_client.cc +++ b/chromecast/renderer/cast_content_renderer_client.cc
@@ -13,7 +13,7 @@ #include "chromecast/media/base/media_codec_support.h" #include "chromecast/media/base/supported_codec_profile_levels_memo.h" #include "chromecast/public/media/media_capabilities_shlib.h" -#include "chromecast/renderer/cast_media_load_deferrer.h" +#include "chromecast/renderer/cast_media_playback_options.h" #include "chromecast/renderer/media/key_systems_cast.h" #include "chromecast/renderer/media/media_caps_observer_impl.h" #include "components/network_hints/renderer/prescient_networking_dispatcher.h" @@ -147,7 +147,7 @@ content::RenderFrame* render_frame) { DCHECK(render_frame); // Lifetime is tied to |render_frame| via content::RenderFrameObserver. - new CastMediaLoadDeferrer(render_frame); + new CastMediaPlaybackOptions(render_frame); if (!app_media_capabilities_observer_binding_.is_bound()) { mojom::ApplicationMediaCapabilitiesObserverPtr observer; @@ -279,15 +279,22 @@ bool CastContentRendererClient::RunWhenInForeground( content::RenderFrame* render_frame, base::OnceClosure closure) { - auto* media_load_deferrer = CastMediaLoadDeferrer::Get(render_frame); - DCHECK(media_load_deferrer); - return media_load_deferrer->RunWhenInForeground(std::move(closure)); + auto* playback_options = CastMediaPlaybackOptions::Get(render_frame); + DCHECK(playback_options); + return playback_options->RunWhenInForeground(std::move(closure)); } bool CastContentRendererClient::IsIdleMediaSuspendEnabled() { return false; } +bool CastContentRendererClient::IsBackgroundMediaSuspendEnabled( + content::RenderFrame* render_frame) { + auto* playback_options = CastMediaPlaybackOptions::Get(render_frame); + DCHECK(playback_options); + return playback_options->IsBackgroundSuspendEnabled(); +} + void CastContentRendererClient:: SetRuntimeFeaturesDefaultsBeforeBlinkInitialization() { // Settings for ATV (Android defaults are not what we want).
diff --git a/chromecast/renderer/cast_content_renderer_client.h b/chromecast/renderer/cast_content_renderer_client.h index 671d44d..efc9117c 100644 --- a/chromecast/renderer/cast_content_renderer_client.h +++ b/chromecast/renderer/cast_content_renderer_client.h
@@ -67,6 +67,8 @@ bool render_frame_has_played_media_before, base::OnceClosure closure) override; bool IsIdleMediaSuspendEnabled() override; + bool IsBackgroundMediaSuspendEnabled( + content::RenderFrame* render_frame) override; void SetRuntimeFeaturesDefaultsBeforeBlinkInitialization() override; protected:
diff --git a/chromecast/renderer/cast_media_load_deferrer.cc b/chromecast/renderer/cast_media_load_deferrer.cc deleted file mode 100644 index 1da4a61..0000000 --- a/chromecast/renderer/cast_media_load_deferrer.cc +++ /dev/null
@@ -1,73 +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 "chromecast/renderer/cast_media_load_deferrer.h" - -#include <string> -#include <vector> - -#include "base/callback.h" -#include "base/logging.h" -#include "content/public/renderer/render_frame.h" -#include "mojo/public/cpp/bindings/associated_binding_set.h" -#include "third_party/blink/public/common/associated_interfaces/associated_interface_registry.h" - -namespace chromecast { - -CastMediaLoadDeferrer::CastMediaLoadDeferrer(content::RenderFrame* render_frame) - : content::RenderFrameObserver(render_frame), - content::RenderFrameObserverTracker<CastMediaLoadDeferrer>(render_frame), - render_frame_action_blocked_(false) { - render_frame->GetAssociatedInterfaceRegistry()->AddInterface( - base::BindRepeating( - &CastMediaLoadDeferrer::OnMediaLoadDeferrerAssociatedRequest, - base::Unretained(this))); -} - -CastMediaLoadDeferrer::~CastMediaLoadDeferrer() { - DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_); -} - -void CastMediaLoadDeferrer::OnDestruct() { - DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_); - delete this; -} - - -bool CastMediaLoadDeferrer::RunWhenInForeground(base::OnceClosure closure) { - DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_); - if (!render_frame_action_blocked_) { - std::move(closure).Run(); - return false; - } - - LOG(WARNING) << "A render frame action is being blocked."; - pending_closures_.push_back(std::move(closure)); - return true; -} - -// MediaLoadDeferrer implementation -void CastMediaLoadDeferrer::UpdateMediaLoadStatus(bool blocked) { - DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_); - render_frame_action_blocked_ = blocked; - if (blocked) { - LOG(INFO) << "Render frame actions are blocked."; - return; - } - // Move callbacks in case OnBlockMediaLoading() is called somehow - // during iteration. - std::vector<base::OnceClosure> callbacks; - callbacks.swap(pending_closures_); - for (auto& cb : callbacks) { - std::move(cb).Run(); - } - LOG(INFO) << "Render frame actions are unblocked."; -} - -void CastMediaLoadDeferrer::OnMediaLoadDeferrerAssociatedRequest( - chromecast::shell::mojom::MediaLoadDeferrerAssociatedRequest request) { - bindings_.AddBinding(this, std::move(request)); -} - -} // namespace chromecast
diff --git a/chromecast/renderer/cast_media_load_deferrer.h b/chromecast/renderer/cast_media_load_deferrer.h deleted file mode 100644 index 2ef879d1..0000000 --- a/chromecast/renderer/cast_media_load_deferrer.h +++ /dev/null
@@ -1,66 +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 CHROMECAST_RENDERER_CAST_MEDIA_LOAD_DEFERRER_H_ -#define CHROMECAST_RENDERER_CAST_MEDIA_LOAD_DEFERRER_H_ - -#include <string> -#include <vector> - -#include "base/callback_forward.h" -#include "base/sequence_checker.h" -#include "chromecast/common/mojom/media_load_deferrer.mojom.h" -#include "content/public/renderer/render_frame_observer.h" -#include "content/public/renderer/render_frame_observer_tracker.h" -#include "mojo/public/cpp/bindings/associated_binding_set.h" -#include "services/service_manager/public/cpp/binder_registry.h" - -namespace content { -class RenderFrame; -} // namespace content - -namespace chromecast { - -// Implements deferred media load for Chromecast devices, to prevent background -// applications from playing unwanted media. This functionality is based on -// Chrome prerender. Manages its own lifetime. -class CastMediaLoadDeferrer - : public chromecast::shell::mojom::MediaLoadDeferrer, - public content::RenderFrameObserver, - public content::RenderFrameObserverTracker<CastMediaLoadDeferrer> { - public: - explicit CastMediaLoadDeferrer(content::RenderFrame* render_frame); - - // Runs |closure| if the page/frame is switched to foreground. Returns true if - // the running of |closure| is deferred (not yet in foreground); false - // |closure| can be run immediately. - bool RunWhenInForeground(base::OnceClosure closure); - - private: - ~CastMediaLoadDeferrer() override; - - // content::RenderFrameObserver implementation: - void OnDestruct() override; - - // MediaLoadDeferrer implementation - void UpdateMediaLoadStatus(bool blocked) override; - - void OnMediaLoadDeferrerAssociatedRequest( - chromecast::shell::mojom::MediaLoadDeferrerAssociatedRequest request); - - bool render_frame_action_blocked_; - - std::vector<base::OnceClosure> pending_closures_; - - mojo::AssociatedBindingSet<chromecast::shell::mojom::MediaLoadDeferrer> - bindings_; - - SEQUENCE_CHECKER(sequence_checker_); - - DISALLOW_COPY_AND_ASSIGN(CastMediaLoadDeferrer); -}; - -} // namespace chromecast - -#endif // CHROMECAST_RENDERER_CAST_MEDIA_LOAD_DEFERRER_H_
diff --git a/chromecast/renderer/cast_media_playback_options.cc b/chromecast/renderer/cast_media_playback_options.cc new file mode 100644 index 0000000..5a70360 --- /dev/null +++ b/chromecast/renderer/cast_media_playback_options.cc
@@ -0,0 +1,83 @@ +// 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 "chromecast/renderer/cast_media_playback_options.h" + +#include <string> +#include <vector> + +#include "base/callback.h" +#include "base/logging.h" +#include "content/public/renderer/render_frame.h" +#include "mojo/public/cpp/bindings/associated_binding_set.h" +#include "third_party/blink/public/common/associated_interfaces/associated_interface_registry.h" + +namespace chromecast { + +CastMediaPlaybackOptions::CastMediaPlaybackOptions( + content::RenderFrame* render_frame) + : content::RenderFrameObserver(render_frame), + content::RenderFrameObserverTracker<CastMediaPlaybackOptions>( + render_frame), + render_frame_action_blocked_(false), + background_suspend_enabled_(true) { + render_frame->GetAssociatedInterfaceRegistry()->AddInterface( + base::BindRepeating( + &CastMediaPlaybackOptions::OnMediaPlaybackOptionsAssociatedRequest, + base::Unretained(this))); +} + +CastMediaPlaybackOptions::~CastMediaPlaybackOptions() { + DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_); +} + +void CastMediaPlaybackOptions::OnDestruct() { + DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_); + delete this; +} + +bool CastMediaPlaybackOptions::RunWhenInForeground(base::OnceClosure closure) { + DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_); + if (!render_frame_action_blocked_) { + std::move(closure).Run(); + return false; + } + + LOG(WARNING) << "A render frame action is being blocked."; + pending_closures_.push_back(std::move(closure)); + return true; +} + +bool CastMediaPlaybackOptions::IsBackgroundSuspendEnabled() const { + DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_); + return background_suspend_enabled_; +} + +void CastMediaPlaybackOptions::SetMediaLoadingBlocked(bool blocked) { + DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_); + render_frame_action_blocked_ = blocked; + if (blocked) { + LOG(INFO) << "Render frame actions are blocked."; + return; + } + // Move callbacks in case OnBlockMediaLoading() is called somehow + // during iteration. + std::vector<base::OnceClosure> callbacks; + callbacks.swap(pending_closures_); + for (auto& cb : callbacks) { + std::move(cb).Run(); + } + LOG(INFO) << "Render frame actions are unblocked."; +} + +void CastMediaPlaybackOptions::SetBackgroundSuspendEnabled(bool enabled) { + background_suspend_enabled_ = enabled; +} + +void CastMediaPlaybackOptions::OnMediaPlaybackOptionsAssociatedRequest( + chromecast::shell::mojom::MediaPlaybackOptionsAssociatedRequest request) { + bindings_.AddBinding(this, std::move(request)); +} + +} // namespace chromecast
diff --git a/chromecast/renderer/cast_media_playback_options.h b/chromecast/renderer/cast_media_playback_options.h new file mode 100644 index 0000000..7db303e --- /dev/null +++ b/chromecast/renderer/cast_media_playback_options.h
@@ -0,0 +1,69 @@ +// 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 CHROMECAST_RENDERER_CAST_MEDIA_PLAYBACK_OPTIONS_H_ +#define CHROMECAST_RENDERER_CAST_MEDIA_PLAYBACK_OPTIONS_H_ + +#include <string> +#include <vector> + +#include "base/callback_forward.h" +#include "base/sequence_checker.h" +#include "chromecast/common/mojom/media_playback_options.mojom.h" +#include "content/public/renderer/render_frame_observer.h" +#include "content/public/renderer/render_frame_observer_tracker.h" +#include "mojo/public/cpp/bindings/associated_binding_set.h" +#include "services/service_manager/public/cpp/binder_registry.h" + +namespace content { +class RenderFrame; +} // namespace content + +namespace chromecast { + +// Manages options for suspending playback and deferring media load. +// Based on Chrome prerender. Manages its own lifetime. +class CastMediaPlaybackOptions + : public chromecast::shell::mojom::MediaPlaybackOptions, + public content::RenderFrameObserver, + public content::RenderFrameObserverTracker<CastMediaPlaybackOptions> { + public: + explicit CastMediaPlaybackOptions(content::RenderFrame* render_frame); + + // Runs |closure| if the page/frame is switched to foreground. Returns true if + // the running of |closure| is deferred (not yet in foreground); false if + // |closure| can be run immediately. + bool RunWhenInForeground(base::OnceClosure closure); + + bool IsBackgroundSuspendEnabled() const; + + private: + ~CastMediaPlaybackOptions() override; + + // content::RenderFrameObserver implementation: + void OnDestruct() override; + + // MediaPlaybackOptions implementation + void SetMediaLoadingBlocked(bool blocked) override; + void SetBackgroundSuspendEnabled(bool enabled) override; + + void OnMediaPlaybackOptionsAssociatedRequest( + chromecast::shell::mojom::MediaPlaybackOptionsAssociatedRequest request); + + bool render_frame_action_blocked_; + bool background_suspend_enabled_; + + std::vector<base::OnceClosure> pending_closures_; + + mojo::AssociatedBindingSet<chromecast::shell::mojom::MediaPlaybackOptions> + bindings_; + + SEQUENCE_CHECKER(sequence_checker_); + + DISALLOW_COPY_AND_ASSIGN(CastMediaPlaybackOptions); +}; + +} // namespace chromecast + +#endif // CHROMECAST_RENDERER_CAST_MEDIA_PLAYBACK_OPTIONS_H_
diff --git a/chromeos/cryptohome/cryptohome_parameters.cc b/chromeos/cryptohome/cryptohome_parameters.cc index 8e7b966c..39273f8 100644 --- a/chromeos/cryptohome/cryptohome_parameters.cc +++ b/chromeos/cryptohome/cryptohome_parameters.cc
@@ -20,14 +20,24 @@ const char kCryptohome[] = "cryptohome"; const std::string GetCryptohomeId(const AccountId& account_id) { - // Guest/kiosk/managed/public accounts have empty GaiaId. Default to email. - if (account_id.GetAccountType() == AccountType::UNKNOWN) - return account_id.GetUserEmail(); // Migrated + switch (account_id.GetAccountType()) { + case AccountType::GOOGLE: { + if (GetGaiaIdMigrationStatus(account_id)) + return account_id.GetAccountIdKey(); + return account_id.GetUserEmail(); // Migrated. + } + case AccountType::ACTIVE_DIRECTORY: { + // Always use the account id key, authpolicyd relies on it! + return account_id.GetAccountIdKey(); + } + case AccountType::UNKNOWN: { + // Guest/kiosk/managed/public accounts have empty GaiaId. Use email. + return account_id.GetUserEmail(); // Migrated. + } + } - if (GetGaiaIdMigrationStatus(account_id)) - return account_id.GetAccountIdKey(); - - return account_id.GetUserEmail(); // Migrated + NOTREACHED(); + return account_id.GetUserEmail(); } } // anonymous namespace
diff --git a/chromeos/ime/BUILD.gn b/chromeos/ime/BUILD.gn index c471ca4..62cbe0c 100644 --- a/chromeos/ime/BUILD.gn +++ b/chromeos/ime/BUILD.gn
@@ -11,7 +11,7 @@ "$target_gen_dir/input_methods.h", ] args = [ - rebase_path("//chromeos/ime/input_methods.txt"), - rebase_path("$target_gen_dir/input_methods.h"), + rebase_path("//chromeos/ime/input_methods.txt", root_build_dir), + rebase_path("$target_gen_dir/input_methods.h", root_build_dir), ] }
diff --git a/chromeos/login/auth/cryptohome_authenticator.cc b/chromeos/login/auth/cryptohome_authenticator.cc index f8a80e07..2a2fdf7 100644 --- a/chromeos/login/auth/cryptohome_authenticator.cc +++ b/chromeos/login/auth/cryptohome_authenticator.cc
@@ -219,14 +219,14 @@ cryptohome::MountError return_code = cryptohome::BaseReplyToMountError(reply); chromeos::LoginEventRecorder::Get()->AddLoginTimeMarker( "CryptohomeRename-End", false); - const AccountId account_id = attempt->user_context.GetAccountId(); + const AccountId& account_id = attempt->user_context.GetAccountId(); if (return_code == cryptohome::MOUNT_ERROR_NONE) { cryptohome::SetGaiaIdMigrationStatusDone(account_id); UMACryptohomeMigrationToGaiaId(CryptohomeMigrationToGaiaId::SUCCESS); } else { - LOG(ERROR) << "Failed to rename cryptohome for account_id='" - << account_id.Serialize() << "' (return_code=" << return_code - << ")"; + LOG(ERROR) << "Failed to rename cryptohome for account of type " + << AccountId::AccountTypeToString(account_id.GetAccountType()) + << " (return_code=" << return_code << ")"; // If rename fails, we can still use legacy cryptohome identifier. // Proceed to DoMount. UMACryptohomeMigrationToGaiaId(CryptohomeMigrationToGaiaId::FAILURE); @@ -241,41 +241,45 @@ scoped_refptr<CryptohomeAuthenticator> resolver, bool ephemeral, bool create_if_nonexistent) { - if (attempt->user_context.GetAccountId().GetAccountType() == - AccountType::ACTIVE_DIRECTORY) { - cryptohome::SetGaiaIdMigrationStatusDone( - attempt->user_context.GetAccountId()); + // Set the migration flag for Active Directory accounts since they're using + // the account id key as cryptohome id. + const AccountId& account_id = attempt->user_context.GetAccountId(); + if (account_id.GetAccountType() == AccountType::ACTIVE_DIRECTORY) { + cryptohome::SetGaiaIdMigrationStatusDone(account_id); } + + // Only Google accounts have to be migrated. + if (account_id.GetAccountType() != AccountType::GOOGLE) { + DoMount(attempt, resolver, ephemeral, create_if_nonexistent); + return; + } + const bool is_gaiaid_migration_started = switches::IsGaiaIdMigrationStarted(); if (!is_gaiaid_migration_started) { UMACryptohomeMigrationToGaiaId(CryptohomeMigrationToGaiaId::NOT_STARTED); DoMount(attempt, resolver, ephemeral, create_if_nonexistent); return; } - const bool already_migrated = cryptohome::GetGaiaIdMigrationStatus( - attempt->user_context.GetAccountId()); - const bool has_account_key = - attempt->user_context.GetAccountId().HasAccountIdKey(); + const bool already_migrated = + cryptohome::GetGaiaIdMigrationStatus(account_id); + const bool has_account_key = account_id.HasAccountIdKey(); bool need_migration = false; if (!create_if_nonexistent && !already_migrated) { if (has_account_key) { need_migration = true; } else { - LOG(WARNING) << "Account '" - << attempt->user_context.GetAccountId().Serialize() - << "' has no gaia id. Cryptohome migration skipped."; + LOG(WARNING) + << "Google account has no gaia id. Cryptohome migration skipped."; } } if (need_migration) { chromeos::LoginEventRecorder::Get()->AddLoginTimeMarker( "CryptohomeRename-Start", false); cryptohome::AccountIdentifier cryptohome_id_from; - cryptohome_id_from.set_account_id( - attempt->user_context.GetAccountId().GetUserEmail()); // Migrated + cryptohome_id_from.set_account_id(account_id.GetUserEmail()); // Migrated cryptohome::AccountIdentifier cryptohome_id_to; - cryptohome_id_to.set_account_id( - attempt->user_context.GetAccountId().GetAccountIdKey()); + cryptohome_id_to.set_account_id(account_id.GetAccountIdKey()); DBusThreadManager::Get()->GetCryptohomeClient()->RenameCryptohome( cryptohome_id_from, cryptohome_id_to, @@ -285,8 +289,7 @@ } if (!already_migrated && has_account_key) { // Mark new users migrated. - cryptohome::SetGaiaIdMigrationStatusDone( - attempt->user_context.GetAccountId()); + cryptohome::SetGaiaIdMigrationStatusDone(account_id); } if (already_migrated) { UMACryptohomeMigrationToGaiaId( @@ -308,8 +311,7 @@ attempt->user_context.GetKey()->GetKeyType()); attempt->user_context.GetKey()->Transform( - Key::KEY_TYPE_SALTED_SHA256_TOP_HALF, - system_salt); + Key::KEY_TYPE_SALTED_SHA256_TOP_HALF, system_salt); EnsureCryptohomeMigratedToGaiaId(attempt, resolver, ephemeral, create_if_nonexistent); @@ -339,8 +341,8 @@ // Extract the key type and salt from |key_definition|, if present. std::unique_ptr<int64_t> type; std::unique_ptr<std::string> salt; - for (std::vector<cryptohome::KeyDefinition::ProviderData>:: - const_iterator it = key_definition.provider_data.begin(); + for (std::vector<cryptohome::KeyDefinition::ProviderData>::const_iterator + it = key_definition.provider_data.begin(); it != key_definition.provider_data.end(); ++it) { if (it->name == kKeyProviderDataTypeName) { if (it->number) @@ -369,8 +371,7 @@ } attempt->user_context.GetKey()->Transform( - static_cast<Key::KeyType>(*type), - *salt); + static_cast<Key::KeyType>(*type), *salt); EnsureCryptohomeMigratedToGaiaId(attempt, resolver, ephemeral, create_if_nonexistent); return; @@ -381,11 +382,8 @@ } } - SystemSaltGetter::Get()->GetSystemSalt(base::Bind(&OnGetSystemSalt, - attempt, - resolver, - ephemeral, - create_if_nonexistent)); + SystemSaltGetter::Get()->GetSystemSalt(base::Bind( + &OnGetSystemSalt, attempt, resolver, ephemeral, create_if_nonexistent)); } // Starts the process that will mount a user's cryptohome. @@ -404,7 +402,7 @@ "CryptohomeMount-Start", false); if (attempt->user_context.GetKey()->GetKeyType() != - Key::KEY_TYPE_PASSWORD_PLAIN) { + Key::KEY_TYPE_PASSWORD_PLAIN) { EnsureCryptohomeMigratedToGaiaId(attempt, resolver, ephemeral, create_if_nonexistent); return; @@ -550,8 +548,7 @@ owner_is_verified_(false), user_can_login_(false), remove_user_data_on_failure_(false), - delayed_login_failure_(NULL) { -} + delayed_login_failure_(NULL) {} void CryptohomeAuthenticator::AuthenticateToLogin( content::BrowserContext* context, @@ -655,11 +652,10 @@ DCHECK(task_runner_->RunsTasksInCurrentSequence()); DCHECK_EQ(user_manager::USER_TYPE_PUBLIC_ACCOUNT, user_context.GetUserType()); - current_state_.reset( - new AuthAttemptState(user_context, - false, // unlock - false, // online_complete - false)); // user_is_new + current_state_.reset(new AuthAttemptState(user_context, + false, // unlock + false, // online_complete + false)); // user_is_new remove_user_data_on_failure_ = false; ephemeral_mount_attempted_ = true; StartMount(current_state_->AsWeakPtr(),
diff --git a/components/BUILD.gn b/components/BUILD.gn index 2308b30..a8704c1f 100644 --- a/components/BUILD.gn +++ b/components/BUILD.gn
@@ -254,7 +254,7 @@ data_deps = [ ":components_tests_pak", - "//third_party/mesa:osmesa", + "//third_party/mesa_headers", "//ui/resources:ui_test_pak", ] } # iOS/!iOS @@ -501,7 +501,7 @@ data_deps = [ ":components_tests_pak", - "//third_party/mesa:osmesa", + "//third_party/mesa_headers", ] if (is_mac) {
diff --git a/components/arc/arc_util.cc b/components/arc/arc_util.cc index 6acaeb3e8..d93d6df0 100644 --- a/components/arc/arc_util.cc +++ b/components/arc/arc_util.cc
@@ -72,14 +72,7 @@ } bool IsWebstoreSearchEnabled() { - const auto* command_line = base::CommandLine::ForCurrentProcess(); - if (command_line->HasSwitch(chromeos::switches::kArcAvailability)) { - const std::string value = - command_line->GetSwitchValueASCII(chromeos::switches::kArcAvailability); - - return value == kAvailabilityNone; - } - return true; + return false; } bool IsPlayStoreAvailable() {
diff --git a/components/arc/common/accessibility_helper.mojom b/components/arc/common/accessibility_helper.mojom index 035dc8e7..19c5e085 100644 --- a/components/arc/common/accessibility_helper.mojom +++ b/components/arc/common/accessibility_helper.mojom
@@ -123,7 +123,9 @@ VIEW_ID_RESOURCE_NAME, CHROME_ROLE, // Chrome only ROLE_DESCRIPTION, // Chrome only - TOOLTIP + TOOLTIP, + PANE_TITLE, + HINT_TEXT }; // These fields are taken from int instance members of
diff --git a/components/arc/ime/arc_ime_service.cc b/components/arc/ime/arc_ime_service.cc index 00752ab..82ff300 100644 --- a/components/arc/ime/arc_ime_service.cc +++ b/components/arc/ime/arc_ime_service.cc
@@ -119,9 +119,8 @@ ime_type_(ui::TEXT_INPUT_TYPE_NONE), is_personalized_learning_allowed_(false), has_composition_text_(false) { - aura::Env* env = aura::Env::GetInstanceDontCreate(); - if (env) - env->AddObserver(this); + if (aura::Env::HasInstance()) + aura::Env::GetInstance()->AddObserver(this); arc_window_delegate_->RegisterFocusObserver(); } @@ -133,9 +132,8 @@ if (focused_arc_window_) focused_arc_window_->RemoveObserver(this); arc_window_delegate_->UnregisterFocusObserver(); - aura::Env* env = aura::Env::GetInstanceDontCreate(); - if (env) - env->RemoveObserver(this); + if (aura::Env::HasInstance()) + aura::Env::GetInstance()->RemoveObserver(this); // KeyboardController is destroyed before ArcImeService (except in tests), // so check whether there is a KeyboardController first before removing |this|
diff --git a/components/autofill/core/browser/BUILD.gn b/components/autofill/core/browser/BUILD.gn index b780abb65..7c3c4a2 100644 --- a/components/autofill/core/browser/BUILD.gn +++ b/components/autofill/core/browser/BUILD.gn
@@ -127,9 +127,12 @@ "payments/full_card_request.h", "payments/payments_client.cc", "payments/payments_client.h", + "payments/payments_customer_data.h", "payments/payments_request.h", "payments/payments_service_url.cc", "payments/payments_service_url.h", + "payments/payments_util.cc", + "payments/payments_util.h", "personal_data_manager.cc", "personal_data_manager.h", "personal_data_manager_observer.h", @@ -453,6 +456,7 @@ "payments/full_card_request_unittest.cc", "payments/payments_client_unittest.cc", "payments/payments_service_url_unittest.cc", + "payments/payments_util_unittest.cc", "personal_data_manager_unittest.cc", "phone_field_unittest.cc", "phone_number_i18n_unittest.cc",
diff --git a/components/autofill/core/browser/autofill_metrics.cc b/components/autofill/core/browser/autofill_metrics.cc index ad53f51..0823a49 100644 --- a/components/autofill/core/browser/autofill_metrics.cc +++ b/components/autofill/core/browser/autofill_metrics.cc
@@ -703,6 +703,11 @@ } // static +void AutofillMetrics::LogPaymentsCustomerDataBillingIdIsValid(bool valid) { + UMA_HISTOGRAM_BOOLEAN("Autofill.PaymentsCustomerDataBillingIdIsValid", valid); +} + +// static void AutofillMetrics::LogCardUploadDecisionMetrics( int upload_decision_metrics) { DCHECK(upload_decision_metrics);
diff --git a/components/autofill/core/browser/autofill_metrics.h b/components/autofill/core/browser/autofill_metrics.h index f299bee1..47e40c4 100644 --- a/components/autofill/core/browser/autofill_metrics.h +++ b/components/autofill/core/browser/autofill_metrics.h
@@ -825,6 +825,10 @@ // from its prefilled value or not. static void LogSaveCardCardholderNameWasEdited(bool edited); + // Logs whether the PaymentsCustomerData's billing ID was valid at the time of + // use. + static void LogPaymentsCustomerDataBillingIdIsValid(bool valid); + // |upload_decision_metrics| is a bitmask of |CardUploadDecisionMetric|. static void LogCardUploadDecisionMetrics(int upload_decision_metrics); static void LogCreditCardInfoBarMetric(
diff --git a/components/autofill/core/browser/credit_card_save_manager.cc b/components/autofill/core/browser/credit_card_save_manager.cc index 6d180cc..047b102b 100644 --- a/components/autofill/core/browser/credit_card_save_manager.cc +++ b/components/autofill/core/browser/credit_card_save_manager.cc
@@ -31,13 +31,12 @@ #include "components/autofill/core/browser/credit_card.h" #include "components/autofill/core/browser/form_structure.h" #include "components/autofill/core/browser/payments/payments_client.h" +#include "components/autofill/core/browser/payments/payments_util.h" #include "components/autofill/core/browser/personal_data_manager.h" #include "components/autofill/core/browser/validation.h" #include "components/autofill/core/common/autofill_clock.h" #include "components/autofill/core/common/autofill_features.h" -#include "components/autofill/core/common/autofill_prefs.h" #include "components/autofill/core/common/autofill_util.h" -#include "components/prefs/pref_service.h" #include "services/identity/public/cpp/identity_manager.h" #include "url/gurl.h" @@ -460,13 +459,14 @@ } } - // If the billing_customer_number Priority Preference is non-zero, it means - // the user has a Google Payments account. Include a bit for existence of this - // account (NOT the id itself), as it will help determine if a new Payments - // customer might need to be created when save is accepted. - if (static_cast<int64_t>(payments_client_->GetPrefService()->GetDouble( - prefs::kAutofillBillingCustomerNumber)) != 0) + // If the billing_customer_number is non-zero, it means the user has a Google + // Payments account. Include a bit for existence of this account (NOT the id + // itself), as it will help determine if a new Payments customer might need to + // be created when save is accepted. + if (payments::GetBillingCustomerId(personal_data_manager_, + payments_client_->GetPrefService()) != 0) { detected_values |= DetectedValue::HAS_GOOGLE_PAYMENTS_ACCOUNT; + } // If one of the following is true, signal that cardholder name will be // explicitly requested in the offer-to-save bubble: @@ -518,9 +518,8 @@ if (observer_for_testing_) observer_for_testing_->OnSentUploadCardRequest(); upload_request_.app_locale = app_locale_; - upload_request_.billing_customer_number = - static_cast<int64_t>(payments_client_->GetPrefService()->GetDouble( - prefs::kAutofillBillingCustomerNumber)); + upload_request_.billing_customer_number = payments::GetBillingCustomerId( + personal_data_manager_, payments_client_->GetPrefService()); AutofillMetrics::LogUploadAcceptedCardOriginMetric( uploading_local_card_
diff --git a/components/autofill/core/browser/local_card_migration_manager.cc b/components/autofill/core/browser/local_card_migration_manager.cc index 8aa7dde1..3bd77b1 100644 --- a/components/autofill/core/browser/local_card_migration_manager.cc +++ b/components/autofill/core/browser/local_card_migration_manager.cc
@@ -53,20 +53,8 @@ if (!IsCreditCardMigrationEnabled()) return false; - std::vector<CreditCard*> local_credit_cards = - personal_data_manager_->GetLocalCreditCards(); - - // Empty previous state. - migratable_credit_cards_.clear(); - - // Initialize the local credit card list and queue for showing and uploading. - for (CreditCard* credit_card : local_credit_cards) { - // If the card is valid (has a valid card number, expiration date, and is - // not expired) and is not a server card, add it to the list of migratable - // cards. - if (credit_card->IsValid() && !IsServerCard(credit_card)) - migratable_credit_cards_.push_back(MigratableCreditCard(*credit_card)); - } + // Fetch all migratable credit cards and store in |migratable_credit_cards_|. + GetMigratableCreditCards(); // If the form was submitted with a local card, only offer migration instead // of Upstream if there are other local cards to migrate as well. If the form @@ -174,15 +162,23 @@ return detected_values; } -bool LocalCardMigrationManager::IsServerCard(CreditCard* local_card) const { - std::vector<CreditCard*> server_credit_cards = - personal_data_manager_->GetServerCreditCards(); - // Check whether the current card is already uploaded. - for (const CreditCard* server_card : server_credit_cards) { - if (local_card->HasSameNumberAs(*server_card)) - return true; +void LocalCardMigrationManager::GetMigratableCreditCards() { + std::vector<CreditCard*> local_credit_cards = + personal_data_manager_->GetLocalCreditCards(); + + // Empty previous state. + migratable_credit_cards_.clear(); + + // Initialize the local credit card list and queue for showing and uploading. + for (CreditCard* credit_card : local_credit_cards) { + // If the card is valid (has a valid card number, expiration date, and is + // not expired) and is not a server card, add it to the list of migratable + // cards. + if (credit_card->IsValid() && + !personal_data_manager_->IsServerCard(credit_card)) { + migratable_credit_cards_.push_back(MigratableCreditCard(*credit_card)); + } } - return false; } } // namespace autofill
diff --git a/components/autofill/core/browser/local_card_migration_manager.h b/components/autofill/core/browser/local_card_migration_manager.h index 621e03e3..a5bd73e 100644 --- a/components/autofill/core/browser/local_card_migration_manager.h +++ b/components/autofill/core/browser/local_card_migration_manager.h
@@ -84,8 +84,8 @@ const base::string16& context_token, std::unique_ptr<base::DictionaryValue> legal_message); - // Check whether a local card is already a server card. - bool IsServerCard(CreditCard* local_card) const; + // Fetch all migratable credit cards and store in |migratable_credit_cards_|. + void GetMigratableCreditCards(); AutofillClient* const client_;
diff --git a/components/autofill/core/browser/payments/full_card_request.cc b/components/autofill/core/browser/payments/full_card_request.cc index 4a4c751..58086b8 100644 --- a/components/autofill/core/browser/payments/full_card_request.cc +++ b/components/autofill/core/browser/payments/full_card_request.cc
@@ -11,9 +11,9 @@ #include "components/autofill/core/browser/autofill_experiments.h" #include "components/autofill/core/browser/autofill_metrics.h" #include "components/autofill/core/browser/credit_card.h" +#include "components/autofill/core/browser/payments/payments_util.h" #include "components/autofill/core/browser/personal_data_manager.h" #include "components/autofill/core/common/autofill_clock.h" -#include "components/autofill/core/common/autofill_prefs.h" namespace autofill { namespace payments { @@ -69,9 +69,8 @@ card.ShouldUpdateExpiration(AutofillClock::Now())); if (should_unmask_card_) { payments_client_->Prepare(); - request_->billing_customer_number = - static_cast<int64_t>(payments_client_->GetPrefService()->GetDouble( - prefs::kAutofillBillingCustomerNumber)); + request_->billing_customer_number = GetBillingCustomerId( + personal_data_manager_, payments_client_->GetPrefService()); } ui_delegate_->ShowUnmaskPrompt(request_->card, reason,
diff --git a/components/autofill/core/browser/payments/payments_customer_data.h b/components/autofill/core/browser/payments/payments_customer_data.h new file mode 100644 index 0000000..be36af1 --- /dev/null +++ b/components/autofill/core/browser/payments/payments_customer_data.h
@@ -0,0 +1,27 @@ +// 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 COMPONENTS_AUTOFILL_CORE_BROWSER_PAYMENTS_PAYMENTS_CUSTOMER_DATA_H_ +#define COMPONENTS_AUTOFILL_CORE_BROWSER_PAYMENTS_PAYMENTS_CUSTOMER_DATA_H_ + +#include <string> + +namespace autofill { + +// Represents the Google Payments customer data. +struct PaymentsCustomerData { + explicit PaymentsCustomerData(const std::string& customer_id) + : customer_id(customer_id) {} + + bool operator==(const PaymentsCustomerData& other) const { + return customer_id == other.customer_id; + } + + // The identifier by which a Google Payments account is identified. + std::string customer_id; +}; + +} // namespace autofill + +#endif // COMPONENTS_AUTOFILL_CORE_BROWSER_PAYMENTS_PAYMENTS_CUSTOMER_DATA_H_ \ No newline at end of file
diff --git a/components/autofill/core/browser/payments/payments_util.cc b/components/autofill/core/browser/payments/payments_util.cc new file mode 100644 index 0000000..96cd68cd --- /dev/null +++ b/components/autofill/core/browser/payments/payments_util.cc
@@ -0,0 +1,47 @@ +// 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 "components/autofill/core/browser/payments/payments_util.h" + +#include "base/feature_list.h" +#include "base/strings/string_number_conversions.h" +#include "base/strings/string_piece.h" +#include "components/autofill/core/browser/autofill_metrics.h" +#include "components/autofill/core/browser/payments/payments_customer_data.h" +#include "components/autofill/core/browser/personal_data_manager.h" +#include "components/autofill/core/common/autofill_features.h" +#include "components/autofill/core/common/autofill_prefs.h" +#include "components/prefs/pref_service.h" + +namespace autofill { +namespace payments { + +int64_t GetBillingCustomerId(PersonalDataManager* personal_data_manager, + PrefService* pref_service) { + DCHECK(personal_data_manager); + DCHECK(pref_service); + + if (base::FeatureList::IsEnabled( + features::kAutofillUsePaymentsCustomerData)) { + // Get billing customer ID from the synced PaymentsCustomerData. + PaymentsCustomerData* customer_data = + personal_data_manager->GetPaymentsCustomerData(); + if (customer_data && !customer_data->customer_id.empty()) { + int64_t billing_customer_id = 0; + if (base::StringToInt64(base::StringPiece(customer_data->customer_id), + &billing_customer_id)) { + AutofillMetrics::LogPaymentsCustomerDataBillingIdIsValid(true); + return billing_customer_id; + } + } + AutofillMetrics::LogPaymentsCustomerDataBillingIdIsValid(false); + } + + // Get billing customer ID from priority preferences. + return static_cast<int64_t>( + pref_service->GetDouble(prefs::kAutofillBillingCustomerNumber)); +} + +} // namespace payments +} // namespace autofill
diff --git a/components/autofill/core/browser/payments/payments_util.h b/components/autofill/core/browser/payments/payments_util.h new file mode 100644 index 0000000..364284a1 --- /dev/null +++ b/components/autofill/core/browser/payments/payments_util.h
@@ -0,0 +1,27 @@ +// 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 COMPONENTS_AUTOFILL_CORE_BROWSER_PAYMENTS_PAYMENTS_UTIL_H_ +#define COMPONENTS_AUTOFILL_CORE_BROWSER_PAYMENTS_PAYMENTS_UTIL_H_ + +#include <stdint.h> + +class PrefService; + +namespace autofill { + +class PersonalDataManager; + +namespace payments { + +// Returns the billing customer ID (a.k.a. the customer number) for the Google +// Payments account for this user. Obtains it from the synced data. Returns 0 +// if the customer ID was not found. +int64_t GetBillingCustomerId(PersonalDataManager* personal_data_manager, + PrefService* pref_service); + +} // namespace payments +} // namespace autofill + +#endif // COMPONENTS_AUTOFILL_CORE_BROWSER_PAYMENTS_PAYMENTS_UTIL_H_
diff --git a/components/autofill/core/browser/payments/payments_util_unittest.cc b/components/autofill/core/browser/payments/payments_util_unittest.cc new file mode 100644 index 0000000..057bade --- /dev/null +++ b/components/autofill/core/browser/payments/payments_util_unittest.cc
@@ -0,0 +1,103 @@ +// 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 "components/autofill/core/browser/payments/payments_util.h" + +#include "base/test/metrics/histogram_tester.h" +#include "base/test/scoped_feature_list.h" +#include "components/autofill/core/browser/payments/payments_customer_data.h" +#include "components/autofill/core/browser/test_personal_data_manager.h" +#include "components/autofill/core/common/autofill_features.h" +#include "components/autofill/core/common/autofill_prefs.h" +#include "components/prefs/pref_registry_simple.h" +#include "components/prefs/testing_pref_service.h" +#include "testing/gtest/include/gtest/gtest.h" + +namespace autofill { +namespace payments { + +class PaymentsUtilTest : public testing::Test { + public: + PaymentsUtilTest() {} + ~PaymentsUtilTest() override {} + + protected: + void SetUp() override { + pref_service_.registry()->RegisterDoublePref( + prefs::kAutofillBillingCustomerNumber, 0.0); + } + + base::test::ScopedFeatureList scoped_feature_list_; + TestPersonalDataManager personal_data_manager_; + TestingPrefServiceSimple pref_service_; + + private: + DISALLOW_COPY_AND_ASSIGN(PaymentsUtilTest); +}; + +TEST_F(PaymentsUtilTest, GetBillingCustomerId_PaymentsCustomerData_Normal) { + scoped_feature_list_.InitAndEnableFeature( + features::kAutofillUsePaymentsCustomerData); + base::HistogramTester histogram_tester; + + personal_data_manager_.SetPaymentsCustomerData( + std::make_unique<PaymentsCustomerData>(/*customer_id=*/"123456")); + + EXPECT_EQ(123456, + GetBillingCustomerId(&personal_data_manager_, &pref_service_)); + + histogram_tester.ExpectUniqueSample( + "Autofill.PaymentsCustomerDataBillingIdIsValid", true, 1); +} + +TEST_F(PaymentsUtilTest, GetBillingCustomerId_PaymentsCustomerData_NoData) { + scoped_feature_list_.InitAndEnableFeature( + features::kAutofillUsePaymentsCustomerData); + base::HistogramTester histogram_tester; + + // Explictly do not set PaymentsCustomerData. Nothing crashes and the returned + // customer ID is 0. + EXPECT_EQ(0, GetBillingCustomerId(&personal_data_manager_, &pref_service_)); + histogram_tester.ExpectUniqueSample( + "Autofill.PaymentsCustomerDataBillingIdIsValid", false, 1); +} + +TEST_F(PaymentsUtilTest, + GetBillingCustomerId_PaymentsCustomerData_NoDataFallback) { + scoped_feature_list_.InitAndEnableFeature( + features::kAutofillUsePaymentsCustomerData); + base::HistogramTester histogram_tester; + + // Explictly do not set PaymentsCustomerData but set a fallback to prefs. + pref_service_.SetDouble(prefs::kAutofillBillingCustomerNumber, 123456.0); + + // We got the data from prefs and log that the PaymentsCustomerData is + // invalid. + EXPECT_EQ(123456, + GetBillingCustomerId(&personal_data_manager_, &pref_service_)); + histogram_tester.ExpectUniqueSample( + "Autofill.PaymentsCustomerDataBillingIdIsValid", false, 1); +} + +TEST_F(PaymentsUtilTest, GetBillingCustomerId_PriorityPrefs_Normal) { + scoped_feature_list_.InitAndDisableFeature( + features::kAutofillUsePaymentsCustomerData); + + pref_service_.SetDouble(prefs::kAutofillBillingCustomerNumber, 123456.0); + + EXPECT_EQ(123456, + GetBillingCustomerId(&personal_data_manager_, &pref_service_)); +} + +TEST_F(PaymentsUtilTest, GetBillingCustomerId_PriorityPrefs_NoData) { + scoped_feature_list_.InitAndDisableFeature( + features::kAutofillUsePaymentsCustomerData); + + // Explictly do not set Prefs data. Nothing crashes and the returned customer + // ID is 0. + EXPECT_EQ(0, GetBillingCustomerId(&personal_data_manager_, &pref_service_)); +} + +} // namespace payments +} // namespace autofill
diff --git a/components/autofill/core/browser/personal_data_manager.cc b/components/autofill/core/browser/personal_data_manager.cc index cab44ca..986f2cd0 100644 --- a/components/autofill/core/browser/personal_data_manager.cc +++ b/components/autofill/core/browser/personal_data_manager.cc
@@ -456,18 +456,7 @@ }; PersonalDataManager::PersonalDataManager(const std::string& app_locale) - : is_data_loaded_(false), - pending_profiles_query_(0), - pending_server_profiles_query_(0), - pending_creditcards_query_(0), - pending_server_creditcards_query_(0), - app_locale_(app_locale), - pref_service_(nullptr), - identity_manager_(nullptr), - sync_service_(nullptr), - is_off_the_record_(false), - has_logged_stored_profile_metrics_(false), - has_logged_stored_credit_card_metrics_(false) { + : app_locale_(app_locale) { database_helper_ = std::make_unique<PersonalDatabaseHelper>(this); } @@ -492,6 +481,7 @@ } LoadProfiles(); LoadCreditCards(); + LoadPaymentsCustomerData(); // Check if profile cleanup has already been performed this major version. is_autofill_profile_cleanup_pending_ = @@ -508,6 +498,7 @@ CancelPendingLocalQuery(&pending_server_profiles_query_); CancelPendingLocalQuery(&pending_creditcards_query_); CancelPendingServerQuery(&pending_server_creditcards_query_); + CancelPendingServerQuery(&pending_customer_data_query_); } void PersonalDataManager::Shutdown() { @@ -565,7 +556,8 @@ WebDataServiceBase::Handle h, std::unique_ptr<WDTypedResult> result) { DCHECK(pending_profiles_query_ || pending_server_profiles_query_ || - pending_creditcards_query_ || pending_server_creditcards_query_); + pending_creditcards_query_ || pending_server_creditcards_query_ || + pending_customer_data_query_); if (!result) { // Error from the web database. @@ -577,6 +569,8 @@ pending_server_creditcards_query_ = 0; else if (h == pending_server_profiles_query_) pending_server_profiles_query_ = 0; + else if (h == pending_server_creditcards_query_) + pending_server_profiles_query_ = 0; } else { switch (result->GetType()) { case AUTOFILL_PROFILES_RESULT: @@ -608,6 +602,16 @@ ResetFullServerCards(); } break; + case AUTOFILL_CUSTOMERDATA_RESULT: + DCHECK_EQ(h, pending_customer_data_query_) + << "received customer data from invalid request."; + pending_customer_data_query_ = 0; + + payments_customer_data_ = + static_cast<WDResult<std::unique_ptr<PaymentsCustomerData>>*>( + result.get()) + ->GetValue(); + break; default: NOTREACHED(); } @@ -619,6 +623,7 @@ if (pending_profiles_query_ == 0 && pending_creditcards_query_ == 0 && pending_server_profiles_query_ == 0 && pending_server_creditcards_query_ == 0 && + pending_customer_data_query_ == 0 && database_helper_->GetServerDatabase()) { // On initial data load, is_data_loaded_ will be false here. if (!is_data_loaded_) { @@ -1144,9 +1149,14 @@ return result; } +PaymentsCustomerData* PersonalDataManager::GetPaymentsCustomerData() const { + return payments_customer_data_ ? payments_customer_data_.get() : nullptr; +} + void PersonalDataManager::Refresh() { LoadProfiles(); LoadCreditCards(); + LoadPaymentsCustomerData(); } std::vector<AutofillProfile*> PersonalDataManager::GetProfilesToSuggest() @@ -1814,6 +1824,16 @@ // use the account storage. } +void PersonalDataManager::LoadPaymentsCustomerData() { + if (!database_helper_->GetServerDatabase()) + return; + + CancelPendingServerQuery(&pending_customer_data_query_); + + pending_customer_data_query_ = + database_helper_->GetServerDatabase()->GetPaymentsCustomerData(this); +} + std::string PersonalDataManager::SaveImportedProfile( const AutofillProfile& imported_profile) { if (is_off_the_record_) @@ -1977,6 +1997,20 @@ return false; } +bool PersonalDataManager::IsServerCard(const CreditCard* credit_card) const { + // Check whether the current card itself is a server card. + if (credit_card->record_type() != autofill::CreditCard::LOCAL_CARD) + return true; + + std::vector<CreditCard*> server_credit_cards = GetServerCreditCards(); + // Check whether the current card is already uploaded. + for (const CreditCard* server_card : server_credit_cards) { + if (credit_card->HasSameNumberAs(*server_card)) + return true; + } + return false; +} + std::vector<Suggestion> PersonalDataManager::GetSuggestionsForCards( const AutofillType& type, const base::string16& field_contents,
diff --git a/components/autofill/core/browser/personal_data_manager.h b/components/autofill/core/browser/personal_data_manager.h index 026cae7f..c9d98004 100644 --- a/components/autofill/core/browser/personal_data_manager.h +++ b/components/autofill/core/browser/personal_data_manager.h
@@ -21,6 +21,7 @@ #include "components/autofill/core/browser/autofill_profile.h" #include "components/autofill/core/browser/credit_card.h" #include "components/autofill/core/browser/field_types.h" +#include "components/autofill/core/browser/payments/payments_customer_data.h" #include "components/autofill/core/browser/suggestion.h" #include "components/autofill/core/browser/webdata/autofill_webdata_service.h" #include "components/autofill/core/browser/webdata/autofill_webdata_service_observer.h" @@ -227,6 +228,9 @@ // Returns all credit cards, server and local. virtual std::vector<CreditCard*> GetCreditCards() const; + // Returns the Payments customer data. Returns nullptr if no data is present. + virtual PaymentsCustomerData* GetPaymentsCustomerData() const; + // Returns the profiles to suggest to the user, ordered by frecency. std::vector<AutofillProfile*> GetProfilesToSuggest() const; @@ -335,6 +339,9 @@ // |credit_card| is equal to any masked server card known by the browser. bool IsKnownCard(const CreditCard& credit_card); + // Check whether a card is a server card or has a duplicated server card. + bool IsServerCard(const CreditCard* credit_card) const; + // Sets the value that can skip the checks to see if we are syncing in a test. void SetSyncingForTest(bool is_syncing_for_test) { is_syncing_for_test_ = is_syncing_for_test; @@ -459,6 +466,9 @@ // Loads the saved credit cards from the web database. virtual void LoadCreditCards(); + // Loads the payments customer data from the web database. + virtual void LoadPaymentsCustomerData(); + // Cancels a pending query to the local web database. |handle| is a pointer // to the query handle. void CancelPendingLocalQuery(WebDataServiceBase::Handle* handle); @@ -515,7 +525,7 @@ std::unique_ptr<PersonalDatabaseHelper> database_helper_; // True if personal data has been loaded from the web database. - bool is_data_loaded_; + bool is_data_loaded_ = false; // The loaded web profiles. These are constructed from entries on web pages // and from manually editing in the settings. @@ -524,6 +534,9 @@ // Profiles read from the user's account stored on the server. mutable std::vector<std::unique_ptr<AutofillProfile>> server_profiles_; + // Stores the PaymentsCustomerData obtained from the database. + std::unique_ptr<PaymentsCustomerData> payments_customer_data_; + // Storage for web profiles. Contents are weak references. Lifetime managed // by |web_profiles_|. mutable std::vector<AutofillProfile*> profiles_; @@ -536,10 +549,11 @@ // is queried on another sequence, we record the query handle until we // get called back. We store handles for both profile and credit card queries // so they can be loaded at the same time. - WebDataServiceBase::Handle pending_profiles_query_; - WebDataServiceBase::Handle pending_server_profiles_query_; - WebDataServiceBase::Handle pending_creditcards_query_; - WebDataServiceBase::Handle pending_server_creditcards_query_; + WebDataServiceBase::Handle pending_profiles_query_ = 0; + WebDataServiceBase::Handle pending_server_profiles_query_ = 0; + WebDataServiceBase::Handle pending_creditcards_query_ = 0; + WebDataServiceBase::Handle pending_server_creditcards_query_ = 0; + WebDataServiceBase::Handle pending_customer_data_query_ = 0; // The observers. base::ObserverList<PersonalDataManagerObserver> observers_; @@ -669,23 +683,23 @@ mutable std::string default_country_code_; // The PrefService that this instance uses. Must outlive this instance. - PrefService* pref_service_; + PrefService* pref_service_ = nullptr; // The identity manager that this instance uses. Must outlive this instance. - identity::IdentityManager* identity_manager_; + identity::IdentityManager* identity_manager_ = nullptr; // The sync service this instances uses. Must outlive this instance. - syncer::SyncService* sync_service_; + syncer::SyncService* sync_service_ = nullptr; // Whether the user is currently operating in an off-the-record context. // Default value is false. - bool is_off_the_record_; + bool is_off_the_record_ = false; // Whether we have already logged the stored profile metrics this session. - mutable bool has_logged_stored_profile_metrics_; + mutable bool has_logged_stored_profile_metrics_ = false; // Whether we have already logged the stored credit card metrics this session. - mutable bool has_logged_stored_credit_card_metrics_; + mutable bool has_logged_stored_credit_card_metrics_ = false; // An observer to listen for changes to prefs::kAutofillCreditCardEnabled. std::unique_ptr<BooleanPrefMember> credit_card_enabled_pref_;
diff --git a/components/autofill/core/browser/personal_data_manager_unittest.cc b/components/autofill/core/browser/personal_data_manager_unittest.cc index 9b5ffe8..18b65c0 100644 --- a/components/autofill/core/browser/personal_data_manager_unittest.cc +++ b/components/autofill/core/browser/personal_data_manager_unittest.cc
@@ -2190,6 +2190,102 @@ ASSERT_FALSE(personal_data_->IsKnownCard(cardToCompare)); } +TEST_F(PersonalDataManagerTest, IsServerCard_DuplicateOfFullServerCard) { + // Add a full server card. + std::vector<CreditCard> server_cards; + server_cards.push_back(CreditCard(CreditCard::FULL_SERVER_CARD, "b459")); + test::SetCreditCardInfo(&server_cards.back(), "Emmet Dalton", + "4234567890122110" /* Visa */, "12", "2999", "1"); + + SetServerCards(server_cards); + + // Add a dupe local card of a full server card. + CreditCard local_card("287151C8-6AB1-487C-9095-28E80BE5DA15", + test::kEmptyOrigin); + test::SetCreditCardInfo(&local_card, "Emmet Dalton", + "4234 5678 9012 2110" /* Visa */, "12", "2999", "1"); + personal_data_->AddCreditCard(local_card); + + // Make sure everything is set up correctly. + personal_data_->Refresh(); + WaitForOnPersonalDataChanged(); + EXPECT_EQ(2U, personal_data_->GetCreditCards().size()); + + CreditCard cardToCompare; + cardToCompare.SetNumber(base::ASCIIToUTF16("4234 5678 9012 2110") /* Visa */); + ASSERT_TRUE(personal_data_->IsServerCard(&cardToCompare)); + ASSERT_TRUE(personal_data_->IsServerCard(&local_card)); +} + +TEST_F(PersonalDataManagerTest, IsServerCard_DuplicateOfMaskedServerCard) { + // Add a masked server card. + std::vector<CreditCard> server_cards; + server_cards.push_back(CreditCard(CreditCard::MASKED_SERVER_CARD, "b459")); + test::SetCreditCardInfo(&server_cards.back(), "Emmet Dalton", + "2110" /* last 4 digits */, "12", "2999", "1"); + server_cards.back().SetNetworkForMaskedCard(kVisaCard); + + SetServerCards(server_cards); + + // Add a dupe local card of a full server card. + CreditCard local_card("287151C8-6AB1-487C-9095-28E80BE5DA15", + test::kEmptyOrigin); + test::SetCreditCardInfo(&local_card, "Emmet Dalton", + "4234 5678 9012 2110" /* Visa */, "12", "2999", "1"); + personal_data_->AddCreditCard(local_card); + + // Make sure everything is set up correctly. + personal_data_->Refresh(); + WaitForOnPersonalDataChanged(); + EXPECT_EQ(2U, personal_data_->GetCreditCards().size()); + + CreditCard cardToCompare; + cardToCompare.SetNumber(base::ASCIIToUTF16("4234 5678 9012 2110") /* Visa */); + ASSERT_TRUE(personal_data_->IsServerCard(&cardToCompare)); + ASSERT_TRUE(personal_data_->IsServerCard(&local_card)); +} + +TEST_F(PersonalDataManagerTest, IsServerCard_AlreadyServerCard) { + std::vector<CreditCard> server_cards; + // Create a full server card. + CreditCard full_server_card(CreditCard::FULL_SERVER_CARD, "c789"); + test::SetCreditCardInfo(&full_server_card, "Homer Simpson", + "4234567890123456" /* Visa */, "01", "2999", "1"); + server_cards.push_back(full_server_card); + // Create a masked server card. + CreditCard masked_card(CreditCard::MASKED_SERVER_CARD, "a123"); + test::SetCreditCardInfo(&masked_card, "Homer Simpson", "2110" /* Visa */, + "01", "2999", "1"); + masked_card.SetNetworkForMaskedCard(kVisaCard); + server_cards.push_back(masked_card); + + SetServerCards(server_cards); + + // Make sure everything is set up correctly. + personal_data_->Refresh(); + WaitForOnPersonalDataChanged(); + EXPECT_EQ(2U, personal_data_->GetCreditCards().size()); + + ASSERT_TRUE(personal_data_->IsServerCard(&full_server_card)); + ASSERT_TRUE(personal_data_->IsServerCard(&masked_card)); +} + +TEST_F(PersonalDataManagerTest, IsServerCard_UniqueLocalCard) { + // Add a unique local card. + CreditCard local_card("1141084B-72D7-4B73-90CF-3D6AC154673B", + test::kEmptyOrigin); + test::SetCreditCardInfo(&local_card, "Homer Simpson", + "4234567890123456" /* Visa */, "01", "2999", "1"); + personal_data_->AddCreditCard(local_card); + + // Make sure everything is set up correctly. + personal_data_->Refresh(); + WaitForOnPersonalDataChanged(); + EXPECT_EQ(1U, personal_data_->GetCreditCards().size()); + + ASSERT_FALSE(personal_data_->IsServerCard(&local_card)); +} + // Test that a masked server card is not suggested if more that six numbers have // been typed in the field. TEST_F(PersonalDataManagerTest,
diff --git a/components/autofill/core/browser/suggestion.cc b/components/autofill/core/browser/suggestion.cc index 754ede93..8d6959e1 100644 --- a/components/autofill/core/browser/suggestion.cc +++ b/components/autofill/core/browser/suggestion.cc
@@ -19,10 +19,10 @@ frontend_id(other.frontend_id), value(other.value), label(other.label), + custom_icon(other.custom_icon), icon(other.icon), match(other.match), - is_value_bold(other.is_value_bold) { -} + is_value_bold(other.is_value_bold) {} Suggestion::Suggestion(const base::string16& v) : frontend_id(0), @@ -43,7 +43,6 @@ is_value_bold(false) { } -Suggestion::~Suggestion() { -} +Suggestion::~Suggestion() = default; } // namespace autofill
diff --git a/components/autofill/core/browser/suggestion.h b/components/autofill/core/browser/suggestion.h index 63522de..58dfbf9 100644 --- a/components/autofill/core/browser/suggestion.h +++ b/components/autofill/core/browser/suggestion.h
@@ -8,6 +8,7 @@ #include <string> #include "base/strings/string16.h" +#include "ui/gfx/image/image.h" namespace autofill { @@ -45,6 +46,9 @@ base::string16 value; base::string16 label; + // Contains an image to display for the suggestion. + gfx::Image custom_icon; + // If |custom_icon| is empty, the name of the fallback built-in icon. base::string16 icon; MatchMode match; bool is_value_bold; // true if |value| should be displayed in bold type face.
diff --git a/components/autofill/core/browser/test_personal_data_manager.h b/components/autofill/core/browser/test_personal_data_manager.h index 2c2b6cd..a9c6974 100644 --- a/components/autofill/core/browser/test_personal_data_manager.h +++ b/components/autofill/core/browser/test_personal_data_manager.h
@@ -10,6 +10,7 @@ #include "base/optional.h" #include "components/autofill/core/browser/autofill_profile.h" #include "components/autofill/core/browser/credit_card.h" +#include "components/autofill/core/browser/payments/payments_customer_data.h" #include "components/autofill/core/browser/personal_data_manager.h" namespace autofill { @@ -100,6 +101,11 @@ autofill_wallet_import_enabled_ = autofill_wallet_import_enabled; } + void SetPaymentsCustomerData( + std::unique_ptr<PaymentsCustomerData> customer_data) { + payments_customer_data_ = std::move(customer_data); + } + private: std::string timezone_country_code_; std::string default_country_code_;
diff --git a/components/autofill/core/browser/ui/save_card_bubble_controller.h b/components/autofill/core/browser/ui/save_card_bubble_controller.h index 9bbae4c..f6f046d 100644 --- a/components/autofill/core/browser/ui/save_card_bubble_controller.h +++ b/components/autofill/core/browser/ui/save_card_bubble_controller.h
@@ -51,6 +51,9 @@ // Returns whether or not a sign in / sync promo needs to be shown. virtual bool ShouldShowSignInPromo() const = 0; + // Returns true iff the card saved animation can be shown. + virtual bool CanAnimate() const = 0; + // Interaction. // OnSyncPromoAccepted is called when the Dice Sign-in promo is clicked. virtual void OnSyncPromoAccepted(const AccountInfo& account, @@ -63,6 +66,8 @@ virtual void OnLegalMessageLinkClicked(const GURL& url) = 0; virtual void OnManageCardsClicked() = 0; virtual void OnBubbleClosed() = 0; + // Once the animation ends, it shows a new bubble if needed. + virtual void OnAnimationEnded() = 0; // State.
diff --git a/components/autofill/core/browser/webdata/autofill_sync_bridge_test_util.cc b/components/autofill/core/browser/webdata/autofill_sync_bridge_test_util.cc index 2bd936a4..593ce4b 100644 --- a/components/autofill/core/browser/webdata/autofill_sync_bridge_test_util.cc +++ b/components/autofill/core/browser/webdata/autofill_sync_bridge_test_util.cc
@@ -44,4 +44,18 @@ return wallet_specifics; } +sync_pb::AutofillWalletSpecifics +CreateAutofillWalletSpecificsForPaymentsCustomerData( + const std::string& specifics_id) { + sync_pb::AutofillWalletSpecifics wallet_specifics; + wallet_specifics.set_type( + sync_pb::AutofillWalletSpecifics_WalletInfoType:: + AutofillWalletSpecifics_WalletInfoType_CUSTOMER_DATA); + + sync_pb::PaymentsCustomerData* customer_data_specifics = + wallet_specifics.mutable_customer_data(); + customer_data_specifics->set_id(specifics_id); + return wallet_specifics; +} + } // namespace autofill \ No newline at end of file
diff --git a/components/autofill/core/browser/webdata/autofill_sync_bridge_test_util.h b/components/autofill/core/browser/webdata/autofill_sync_bridge_test_util.h index 0780855..a3119a1 100644 --- a/components/autofill/core/browser/webdata/autofill_sync_bridge_test_util.h +++ b/components/autofill/core/browser/webdata/autofill_sync_bridge_test_util.h
@@ -24,6 +24,10 @@ const std::string& specifics_id, const std::string& billing_address_id = ""); +sync_pb::AutofillWalletSpecifics +CreateAutofillWalletSpecificsForPaymentsCustomerData( + const std::string& specifics_id); + } // namespace autofill #endif // COMPONENTS_AUTOFILL_CORE_BROWSER_WEBDATA_AUTOFILL_SYNC_BRIDGE_TEST_UTIL_H_
diff --git a/components/autofill/core/browser/webdata/autofill_sync_bridge_util.cc b/components/autofill/core/browser/webdata/autofill_sync_bridge_util.cc index 3bd0f3e..b1e84ea 100644 --- a/components/autofill/core/browser/webdata/autofill_sync_bridge_util.cc +++ b/components/autofill/core/browser/webdata/autofill_sync_bridge_util.cc
@@ -10,6 +10,7 @@ #include "components/autofill/core/browser/autofill_data_util.h" #include "components/autofill/core/browser/autofill_profile.h" #include "components/autofill/core/browser/credit_card.h" +#include "components/autofill/core/browser/payments/payments_customer_data.h" #include "components/autofill/core/browser/webdata/autofill_table.h" #include "components/autofill/core/common/autofill_util.h" #include "components/sync/model/entity_data.h" @@ -306,6 +307,37 @@ return result; } +std::unique_ptr<EntityData> CreateEntityDataFromPaymentsCustomerData( + const PaymentsCustomerData& customer_data) { + // We use customer_id as a storage key here. + auto entity_data = std::make_unique<EntityData>(); + entity_data->non_unique_name = GetClientTagForSpecificsId( + AutofillWalletSpecifics::CUSTOMER_DATA, customer_data.customer_id); + + AutofillWalletSpecifics* wallet_specifics = + entity_data->specifics.mutable_autofill_wallet(); + + SetAutofillWalletSpecificsFromPaymentsCustomerData(customer_data, + wallet_specifics); + + return entity_data; +} + +void SetAutofillWalletSpecificsFromPaymentsCustomerData( + const PaymentsCustomerData& customer_data, + AutofillWalletSpecifics* wallet_specifics) { + wallet_specifics->set_type(AutofillWalletSpecifics::CUSTOMER_DATA); + + sync_pb::PaymentsCustomerData* mutable_customer_data = + wallet_specifics->mutable_customer_data(); + mutable_customer_data->set_id(customer_data.customer_id); +} + +PaymentsCustomerData CustomerDataFromSpecifics( + const sync_pb::PaymentsCustomerData& customer_data) { + return PaymentsCustomerData{/*customer_id=*/customer_data.id()}; +} + void CopyRelevantWalletMetadataFromDisk( const AutofillTable& table, std::vector<CreditCard>* cards_from_server) { @@ -333,10 +365,11 @@ } } -void PopulateWalletCardsAndAddresses( +void PopulateWalletTypesFromSyncData( const syncer::EntityChangeList& entity_data, std::vector<CreditCard>* wallet_cards, - std::vector<AutofillProfile>* wallet_addresses) { + std::vector<AutofillProfile>* wallet_addresses, + std::vector<PaymentsCustomerData>* customer_data) { std::map<std::string, std::string> ids; for (const syncer::EntityChange& change : entity_data) { @@ -359,6 +392,9 @@ wallet_addresses->back().server_id(); break; case sync_pb::AutofillWalletSpecifics::CUSTOMER_DATA: + customer_data->push_back( + CustomerDataFromSpecifics(autofill_specifics.customer_data())); + break; case sync_pb::AutofillWalletSpecifics::UNKNOWN: // Just ignore new entry types that the client doesn't know about. break;
diff --git a/components/autofill/core/browser/webdata/autofill_sync_bridge_util.h b/components/autofill/core/browser/webdata/autofill_sync_bridge_util.h index 7207ea7..9e42c88b 100644 --- a/components/autofill/core/browser/webdata/autofill_sync_bridge_util.h +++ b/components/autofill/core/browser/webdata/autofill_sync_bridge_util.h
@@ -16,6 +16,7 @@ class AutofillProfile; class AutofillTable; class CreditCard; +struct PaymentsCustomerData; // Returns the wallet specifics id for the specified |server_id|. std::string GetSpecificsIdForEntryServerId(const std::string& server_id); @@ -58,6 +59,21 @@ // Creates an AutofillProfile from the specified |card| specifics. CreditCard CardFromSpecifics(const sync_pb::WalletMaskedCreditCard& card); +// Creates a EntityData object corresponding to the specified |customer_data|. +std::unique_ptr<syncer::EntityData> CreateEntityDataFromPaymentsCustomerData( + const PaymentsCustomerData& customer_data); + +// Sets the fields of the |wallet_specifics| based on the specified +// |customer_data|. +void SetAutofillWalletSpecificsFromPaymentsCustomerData( + const PaymentsCustomerData& customer_data, + sync_pb::AutofillWalletSpecifics* wallet_specifics); + +// Creates a PaymentCustomerData object corresponding to the sync datatype +// |customer_data|. +PaymentsCustomerData CustomerDataFromSpecifics( + const sync_pb::PaymentsCustomerData& customer_data); + // TODO(sebsg): This should probably copy the converted state for the address // too. // Copies the metadata from the local cards (if present) to the corresponding @@ -68,12 +84,13 @@ const AutofillTable& table, std::vector<CreditCard>* cards_from_server); -// Populates the wallet cards and addresses from the sync data and uses the -// sync data to link the card to its billing address. -void PopulateWalletCardsAndAddresses( +// Populates the wallet datatypes from the sync data and uses the sync data to +// link the card to its billing address. +void PopulateWalletTypesFromSyncData( const ::syncer::EntityChangeList& entity_data, std::vector<CreditCard>* wallet_cards, - std::vector<AutofillProfile>* wallet_addresses); + std::vector<AutofillProfile>* wallet_addresses, + std::vector<PaymentsCustomerData>* customer_data); } // namespace autofill
diff --git a/components/autofill/core/browser/webdata/autofill_sync_bridge_util_unittest.cc b/components/autofill/core/browser/webdata/autofill_sync_bridge_util_unittest.cc index b0aacc5..eb1f65e 100644 --- a/components/autofill/core/browser/webdata/autofill_sync_bridge_util_unittest.cc +++ b/components/autofill/core/browser/webdata/autofill_sync_bridge_util_unittest.cc
@@ -9,6 +9,7 @@ #include "base/strings/utf_string_conversions.h" #include "components/autofill/core/browser/autofill_profile.h" #include "components/autofill/core/browser/credit_card.h" +#include "components/autofill/core/browser/payments/payments_customer_data.h" #include "components/autofill/core/browser/test_autofill_clock.h" #include "components/autofill/core/browser/webdata/autofill_sync_bridge_test_util.h" #include "components/autofill/core/browser/webdata/autofill_table.h" @@ -62,10 +63,8 @@ DISALLOW_COPY_AND_ASSIGN(AutofillSyncBridgeUtilTest); }; -// Tests that the link between a card and its billing address from sync is -// present in the generated Autofill objects. -TEST_F(AutofillSyncBridgeUtilTest, - PopulateWalletCardsAndAddresses_BillingAddressIdTransfer) { +// Tests that PopulateWalletTypesFromSyncData behaves as expected. +TEST_F(AutofillSyncBridgeUtilTest, PopulateWalletTypesFromSyncData) { // Add an address and a card that has its billing address id set to the // address' id. syncer::EntityChangeList entity_data; @@ -81,15 +80,24 @@ /*id=*/"card1", /*billing_address_id=*/address_id), /*client_tag=*/"card-card1") .PassToPtr())); + entity_data.push_back(EntityChange::CreateAdd( + "deadbeef", + SpecificsToEntity(CreateAutofillWalletSpecificsForPaymentsCustomerData( + /*specifics_id=*/"deadbeef"), + /*client_tag=*/"customer-deadbeef") + .PassToPtr())); std::vector<CreditCard> wallet_cards; std::vector<AutofillProfile> wallet_addresses; - PopulateWalletCardsAndAddresses(entity_data, &wallet_cards, - &wallet_addresses); + std::vector<PaymentsCustomerData> customer_data; + PopulateWalletTypesFromSyncData(entity_data, &wallet_cards, &wallet_addresses, + &customer_data); ASSERT_EQ(1U, wallet_cards.size()); ASSERT_EQ(1U, wallet_addresses.size()); + EXPECT_EQ("deadbeef", customer_data.back().customer_id); + // Make sure the card's billing address id is equal to the address' server id. EXPECT_EQ(wallet_addresses.back().server_id(), wallet_cards.back().billing_address_id());
diff --git a/components/autofill/core/browser/webdata/autofill_table.cc b/components/autofill/core/browser/webdata/autofill_table.cc index ce6167f..4c7baa94 100644 --- a/components/autofill/core/browser/webdata/autofill_table.cc +++ b/components/autofill/core/browser/webdata/autofill_table.cc
@@ -26,6 +26,7 @@ #include "components/autofill/core/browser/autofill_profile.h" #include "components/autofill/core/browser/autofill_type.h" #include "components/autofill/core/browser/credit_card.h" +#include "components/autofill/core/browser/payments/payments_customer_data.h" #include "components/autofill/core/browser/personal_data_manager.h" #include "components/autofill/core/browser/webdata/autofill_change.h" #include "components/autofill/core/browser/webdata/autofill_entry.h" @@ -413,7 +414,7 @@ InitMaskedCreditCardsTable() && InitUnmaskedCreditCardsTable() && InitServerCardMetadataTable() && InitServerAddressesTable() && InitServerAddressMetadataTable() && InitAutofillSyncMetadataTable() && - InitModelTypeStateTable()); + InitModelTypeStateTable() && InitPaymentsCustomerDataTable()); } bool AutofillTable::IsSyncable() { @@ -1345,6 +1346,39 @@ return db_->GetLastChangeCount() > 0; } +void AutofillTable::SetPaymentsCustomerData( + const PaymentsCustomerData* customer_data) { + sql::Transaction transaction(db_); + if (!transaction.Begin()) + return; + + // Delete all old values. + sql::Statement customer_data_delete( + db_->GetUniqueStatement("DELETE FROM payments_customer_data")); + customer_data_delete.Run(); + + if (customer_data) { + sql::Statement insert_customer_data(db_->GetUniqueStatement( + "INSERT INTO payments_customer_data (customer_id) VALUES (?)")); + insert_customer_data.BindString(0, customer_data->customer_id); + insert_customer_data.Run(); + } + + transaction.Commit(); +} + +bool AutofillTable::GetPaymentsCustomerData( + std::unique_ptr<PaymentsCustomerData>* customer_data) const { + sql::Statement s(db_->GetUniqueStatement( + "SELECT customer_id FROM payments_customer_data")); + if (s.Step()) { + customer_data->reset( + new PaymentsCustomerData(/*customer_id=*/s.ColumnString(0))); + } + + return s.Succeeded(); +} + bool AutofillTable::ClearAllServerData() { sql::Transaction transaction(db_); if (!transaction.Begin()) @@ -2779,4 +2813,15 @@ return true; } +bool AutofillTable::InitPaymentsCustomerDataTable() { + if (!db_->DoesTableExist("payments_customer_data")) { + if (!db_->Execute("CREATE TABLE payments_customer_data " + "(customer_id VARCHAR)")) { + NOTREACHED(); + return false; + } + } + return true; +} + } // namespace autofill
diff --git a/components/autofill/core/browser/webdata/autofill_table.h b/components/autofill/core/browser/webdata/autofill_table.h index bb34d9c4..8708a94 100644 --- a/components/autofill/core/browser/webdata/autofill_table.h +++ b/components/autofill/core/browser/webdata/autofill_table.h
@@ -33,6 +33,7 @@ class AutofillTableEncryptor; class AutofillTableTest; class CreditCard; +struct PaymentsCustomerData; struct FormFieldData; @@ -263,6 +264,11 @@ // for one model type, there was an id column with value 1 // for the single entry. // value The serialized ModelTypeState record. +// +// payments_customer_data +// Contains Google Payments customer data. +// +// customer_id A string representing the Google Payments customer id. class AutofillTable : public WebDatabaseTable, public syncer::SyncMetadataStore { @@ -398,6 +404,14 @@ bool UpdateServerCardMetadata(const CreditCard& credit_card); bool UpdateServerAddressMetadata(const AutofillProfile& profile); + // Setters and getters related to the Google Payments customer data. + // Passing null to the setter will clear the data. + void SetPaymentsCustomerData(const PaymentsCustomerData* customer_data); + // Getter returns false if it could not execute the database statement, and + // may return true but leave |customer_data| untouched if there is no data. + bool GetPaymentsCustomerData( + std::unique_ptr<PaymentsCustomerData>* customer_data) const; + // Deletes all data from the server card and profile tables. Returns true if // any data was deleted, false if not (so false means "commit not needed" // rather than "error"). @@ -593,6 +607,7 @@ bool InitServerAddressMetadataTable(); bool InitAutofillSyncMetadataTable(); bool InitModelTypeStateTable(); + bool InitPaymentsCustomerDataTable(); std::unique_ptr<AutofillTableEncryptor> autofill_table_encryptor_;
diff --git a/components/autofill/core/browser/webdata/autofill_table_unittest.cc b/components/autofill/core/browser/webdata/autofill_table_unittest.cc index 283dcc5..a12b8bc 100644 --- a/components/autofill/core/browser/webdata/autofill_table_unittest.cc +++ b/components/autofill/core/browser/webdata/autofill_table_unittest.cc
@@ -24,6 +24,7 @@ #include "components/autofill/core/browser/autofill_test_utils.h" #include "components/autofill/core/browser/autofill_type.h" #include "components/autofill/core/browser/credit_card.h" +#include "components/autofill/core/browser/payments/payments_customer_data.h" #include "components/autofill/core/browser/webdata/autofill_change.h" #include "components/autofill/core/browser/webdata/autofill_entry.h" #include "components/autofill/core/common/autofill_constants.h" @@ -2234,6 +2235,39 @@ outputs.clear(); } +// Test that we can get what we set. +TEST_F(AutofillTableTest, SetGetPaymentsCustomerData) { + PaymentsCustomerData input{/*customer_id=*/"deadbeef"}; + table_->SetPaymentsCustomerData(&input); + + std::unique_ptr<PaymentsCustomerData> output; + ASSERT_TRUE(table_->GetPaymentsCustomerData(&output)); + EXPECT_EQ(input, *output); +} + +// We don't set anything in the table. Test that we don't crash. +TEST_F(AutofillTableTest, GetPaymentsCustomerData_NoData) { + std::unique_ptr<PaymentsCustomerData> output; + ASSERT_TRUE(table_->GetPaymentsCustomerData(&output)); + EXPECT_FALSE(output); +} + +// The latest PaymentsCustomerData that was set is returned. +TEST_F(AutofillTableTest, SetGetPaymentsCustomerData_MultipleSet) { + PaymentsCustomerData input{/*customer_id=*/"deadbeef"}; + table_->SetPaymentsCustomerData(&input); + + PaymentsCustomerData input2{/*customer_id=*/"wallet"}; + table_->SetPaymentsCustomerData(&input2); + + PaymentsCustomerData input3{/*customer_id=*/"latest"}; + table_->SetPaymentsCustomerData(&input3); + + std::unique_ptr<PaymentsCustomerData> output; + ASSERT_TRUE(table_->GetPaymentsCustomerData(&output)); + EXPECT_EQ(input3, *output); +} + const size_t kMaxCount = 2; struct GetFormValuesTestCase { const char* const field_suggestion[kMaxCount];
diff --git a/components/autofill/core/browser/webdata/autofill_wallet_sync_bridge.cc b/components/autofill/core/browser/webdata/autofill_wallet_sync_bridge.cc index bffcdf2..27f92d2fe 100644 --- a/components/autofill/core/browser/webdata/autofill_wallet_sync_bridge.cc +++ b/components/autofill/core/browser/webdata/autofill_wallet_sync_bridge.cc
@@ -14,6 +14,7 @@ #include "components/autofill/core/browser/autofill_profile.h" #include "components/autofill/core/browser/autofill_profile_sync_util.h" #include "components/autofill/core/browser/credit_card.h" +#include "components/autofill/core/browser/payments/payments_customer_data.h" #include "components/autofill/core/browser/webdata/autofill_sync_bridge_util.h" #include "components/autofill/core/browser/webdata/autofill_table.h" #include "components/autofill/core/browser/webdata/autofill_webdata_backend.h" @@ -127,8 +128,10 @@ std::vector<std::unique_ptr<AutofillProfile>> profiles; std::vector<std::unique_ptr<CreditCard>> cards; + std::unique_ptr<PaymentsCustomerData> customer_data; if (!GetAutofillTable()->GetServerProfiles(&profiles) || - !GetAutofillTable()->GetServerCreditCards(&cards)) { + !GetAutofillTable()->GetServerCreditCards(&cards) || + !GetAutofillTable()->GetPaymentsCustomerData(&customer_data)) { change_processor()->ReportError( {FROM_HERE, "Failed to load entries from table."}); return; @@ -144,6 +147,10 @@ CreateEntityDataFromCard(*entry)); } + if (customer_data) { + batch->Put(GetStorageKeyForEntryServerId(customer_data->customer_id), + CreateEntityDataFromPaymentsCustomerData(*customer_data)); + } std::move(callback).Run(std::move(batch)); } @@ -166,10 +173,12 @@ void AutofillWalletSyncBridge::SetSyncData( const syncer::EntityChangeList& entity_data, bool is_initial_data) { + // Extract the Autofill types from the sync |entity_data|. std::vector<CreditCard> wallet_cards; std::vector<AutofillProfile> wallet_addresses; - PopulateWalletCardsAndAddresses(entity_data, &wallet_cards, - &wallet_addresses); + std::vector<PaymentsCustomerData> customer_data; + PopulateWalletTypesFromSyncData(entity_data, &wallet_cards, &wallet_addresses, + &customer_data); // Users can set billing address of the server credit card locally, but that // information does not propagate to either Chrome Sync or Google Payments @@ -196,6 +205,15 @@ if (!addresses_diff.IsEmpty()) table->SetServerProfiles(wallet_addresses); + if (customer_data.empty()) { + // Clears the data only. + table->SetPaymentsCustomerData(nullptr); + } else { + // In case there were multiple entries (and there shouldn't!), we take the + // first entry in the vector. + table->SetPaymentsCustomerData(&customer_data.front()); + } + if (!is_initial_data) { UMA_HISTOGRAM_COUNTS_100("Autofill.WalletCardsAdded", cards_diff.items_added);
diff --git a/components/autofill/core/browser/webdata/autofill_wallet_sync_bridge_unittest.cc b/components/autofill/core/browser/webdata/autofill_wallet_sync_bridge_unittest.cc index bf58942..52a5733 100644 --- a/components/autofill/core/browser/webdata/autofill_wallet_sync_bridge_unittest.cc +++ b/components/autofill/core/browser/webdata/autofill_wallet_sync_bridge_unittest.cc
@@ -20,6 +20,7 @@ #include "components/autofill/core/browser/autofill_test_utils.h" #include "components/autofill/core/browser/country_names.h" #include "components/autofill/core/browser/credit_card.h" +#include "components/autofill/core/browser/payments/payments_customer_data.h" #include "components/autofill/core/browser/test_autofill_clock.h" #include "components/autofill/core/browser/webdata/autofill_sync_bridge_test_util.h" #include "components/autofill/core/browser/webdata/autofill_sync_bridge_util.h" @@ -53,13 +54,15 @@ // Base64 encodings of the server IDs, used as ids in WalletMetadataSpecifics // (these are suitable for syncing, because they are valid UTF-8). const char kAddr1SpecificsId[] = "YWRkcjHvv74="; -//const char kAddr2SpecificsId[] = "YWRkcjLvv74="; const char kCard1SpecificsId[] = "Y2FyZDHvv74="; -//const char kCard2SpecificsId[] = "Y2FyZDLvv74="; + +// Represents a Payments customer id. +const char kCustomerDataId[] = "deadbeef"; // Unique sync tags for the server IDs. const char kAddr1SyncTag[] = "YWRkcjHvv74="; const char kCard1SyncTag[] = "Y2FyZDHvv74="; +const char kCustomerDataSyncTag[] = "deadbeef"; const char kLocaleString[] = "en-US"; const base::Time kJune2017 = base::Time::FromDoubleT(1497552271); @@ -267,7 +270,7 @@ DISALLOW_COPY_AND_ASSIGN(AutofillWalletSyncBridgeTest); }; -// The following 2 tests make sure client tags stay stable. +// The following 3 tests make sure client tags stay stable. TEST_F(AutofillWalletSyncBridgeTest, GetClientTagForAddress) { AutofillWalletSpecifics specifics = CreateAutofillWalletSpecificsForAddress(kAddr1SpecificsId); @@ -282,7 +285,15 @@ kCard1SyncTag); } -// The following 2 tests make sure storage keys stay stable. +TEST_F(AutofillWalletSyncBridgeTest, GetClientTagForCustomerData) { + AutofillWalletSpecifics specifics = + CreateAutofillWalletSpecificsForPaymentsCustomerData( + kCustomerDataSyncTag); + EXPECT_EQ(bridge()->GetClientTag(SpecificsToEntity(specifics)), + kCustomerDataSyncTag); +} + +// The following 3 tests make sure storage keys stay stable. TEST_F(AutofillWalletSyncBridgeTest, GetStorageKeyForAddress) { AutofillWalletSpecifics specifics1 = CreateAutofillWalletSpecificsForAddress(kAddr1SpecificsId); @@ -297,6 +308,13 @@ kCard1SpecificsId); } +TEST_F(AutofillWalletSyncBridgeTest, GetStorageKeyForCustomerData) { + AutofillWalletSpecifics specifics3 = + CreateAutofillWalletSpecificsForPaymentsCustomerData(kCustomerDataId); + EXPECT_EQ(bridge()->GetStorageKey(SpecificsToEntity(specifics3)), + kCustomerDataId); +} + TEST_F(AutofillWalletSyncBridgeTest, GetAllDataForDebugging_ShouldReturnAllData) { AutofillProfile address1 = test::GetServerProfile(); @@ -305,6 +323,8 @@ CreditCard card1 = test::GetMaskedServerCard(); CreditCard card2 = test::GetMaskedServerCardAmex(); table()->SetServerCreditCards({card1, card2}); + PaymentsCustomerData customer_data{/*customer_id=*/kCustomerDataId}; + table()->SetPaymentsCustomerData(&customer_data); AutofillWalletSpecifics profile_specifics1; SetAutofillWalletSpecificsFromServerProfile(address1, &profile_specifics1); @@ -314,12 +334,16 @@ SetAutofillWalletSpecificsFromServerCard(card1, &card_specifics1); AutofillWalletSpecifics card_specifics2; SetAutofillWalletSpecificsFromServerCard(card2, &card_specifics2); + AutofillWalletSpecifics customer_data_specifics; + SetAutofillWalletSpecificsFromPaymentsCustomerData(customer_data, + &customer_data_specifics); EXPECT_THAT(GetAllLocalData(), UnorderedElementsAre(EqualsSpecifics(profile_specifics1), EqualsSpecifics(profile_specifics2), EqualsSpecifics(card_specifics1), - EqualsSpecifics(card_specifics2))); + EqualsSpecifics(card_specifics2), + EqualsSpecifics(customer_data_specifics))); } // Tests that when a new wallet card and new wallet address are sent by the @@ -330,6 +354,8 @@ table()->SetServerProfiles({address1}); CreditCard card1 = test::GetMaskedServerCard(); table()->SetServerCreditCards({card1}); + PaymentsCustomerData customer_data{/*customer_id=*/kCustomerDataId}; + table()->SetPaymentsCustomerData(&customer_data); // Create a different profile and a different card on the server. AutofillProfile address2 = test::GetServerProfile2(); @@ -338,13 +364,17 @@ CreditCard card2 = test::GetMaskedServerCardAmex(); AutofillWalletSpecifics card_specifics2; SetAutofillWalletSpecificsFromServerCard(card2, &card_specifics2); + AutofillWalletSpecifics customer_data_specifics; + SetAutofillWalletSpecificsFromPaymentsCustomerData(customer_data, + &customer_data_specifics); - StartSyncing({profile_specifics2, card_specifics2}); + StartSyncing({profile_specifics2, card_specifics2, customer_data_specifics}); // Only the server card should be present on the client. EXPECT_THAT(GetAllLocalData(), UnorderedElementsAre(EqualsSpecifics(profile_specifics2), - EqualsSpecifics(card_specifics2))); + EqualsSpecifics(card_specifics2), + EqualsSpecifics(customer_data_specifics))); } // Tests that when the server sends no cards or address, the client should
diff --git a/components/autofill/core/browser/webdata/autofill_wallet_syncable_service.cc b/components/autofill/core/browser/webdata/autofill_wallet_syncable_service.cc index 27a429b9..f13179a 100644 --- a/components/autofill/core/browser/webdata/autofill_wallet_syncable_service.cc +++ b/components/autofill/core/browser/webdata/autofill_wallet_syncable_service.cc
@@ -139,6 +139,11 @@ return profile; } +PaymentsCustomerData CustomerDataFromSyncSpecifics( + const sync_pb::PaymentsCustomerData& customer_data) { + return PaymentsCustomerData{/*customer_id=*/customer_data.id()}; +} + } // namespace // static @@ -264,10 +269,11 @@ } // static -void AutofillWalletSyncableService::PopulateWalletCardsAndAddresses( +void AutofillWalletSyncableService::PopulateWalletTypesFromSyncData( const syncer::SyncDataList& data_list, std::vector<CreditCard>* wallet_cards, - std::vector<AutofillProfile>* wallet_addresses) { + std::vector<AutofillProfile>* wallet_addresses, + std::vector<PaymentsCustomerData>* customer_data) { std::map<std::string, std::string> ids; for (const syncer::SyncData& data : data_list) { @@ -288,6 +294,9 @@ wallet_addresses->back().server_id(); break; case sync_pb::AutofillWalletSpecifics::CUSTOMER_DATA: + customer_data->push_back( + CustomerDataFromSyncSpecifics(autofill_specifics.customer_data())); + break; case sync_pb::AutofillWalletSpecifics::UNKNOWN: // Just ignore new entry types that the client doesn't know about. break; @@ -335,7 +344,9 @@ bool is_initial_data) { std::vector<CreditCard> wallet_cards; std::vector<AutofillProfile> wallet_addresses; - PopulateWalletCardsAndAddresses(data_list, &wallet_cards, &wallet_addresses); + std::vector<PaymentsCustomerData> customer_data; + PopulateWalletTypesFromSyncData(data_list, &wallet_cards, &wallet_addresses, + &customer_data); // Users can set billing address of the server credit card locally, but that // information does not propagate to either Chrome Sync or Google Payments @@ -367,6 +378,16 @@ merge_result.set_num_items_after_association( static_cast<int>(wallet_cards.size() + wallet_addresses.size())); + if (customer_data.empty()) { + // Clears the data only. + table->SetPaymentsCustomerData(nullptr); + } else { + // In case there were multiple entries (and there shouldn't!), we take the + // first entry in the vector. + DCHECK_EQ(1u, customer_data.size()); + table->SetPaymentsCustomerData(&customer_data.front()); + } + if (!is_initial_data) { UMA_HISTOGRAM_COUNTS_100("Autofill.WalletCardsAdded", cards_diff.items_added);
diff --git a/components/autofill/core/browser/webdata/autofill_wallet_syncable_service.h b/components/autofill/core/browser/webdata/autofill_wallet_syncable_service.h index c27626c..bcaa296 100644 --- a/components/autofill/core/browser/webdata/autofill_wallet_syncable_service.h +++ b/components/autofill/core/browser/webdata/autofill_wallet_syncable_service.h
@@ -14,6 +14,7 @@ #include "base/threading/thread_checker.h" #include "components/autofill/core/browser/autofill_profile.h" #include "components/autofill/core/browser/credit_card.h" +#include "components/autofill/core/browser/payments/payments_customer_data.h" #include "components/sync/model/syncable_service.h" namespace autofill { @@ -72,11 +73,13 @@ CopyRelevantMetadataFromDisk_OverwriteOtherAddresses); FRIEND_TEST_ALL_PREFIXES( AutofillWalletSyncableServiceTest, - PopulateWalletCardsAndAddresses_BillingAddressIdTransfer); + PopulateWalletTypesFromSyncData_BillingAddressIdTransfer); FRIEND_TEST_ALL_PREFIXES(AutofillWalletSyncableServiceTest, CopyRelevantMetadataFromDisk_KeepUseStats); FRIEND_TEST_ALL_PREFIXES(AutofillWalletSyncableServiceTest, NewWalletCard); FRIEND_TEST_ALL_PREFIXES(AutofillWalletSyncableServiceTest, EmptyNameOnCard); + FRIEND_TEST_ALL_PREFIXES(AutofillWalletSyncableServiceTest, + PaymentsCustomerData); FRIEND_TEST_ALL_PREFIXES(AutofillWalletSyncableServiceTest, ComputeCardsDiff); FRIEND_TEST_ALL_PREFIXES(AutofillWalletSyncableServiceTest, ComputeAddressesDiff); @@ -102,12 +105,13 @@ syncer::SyncMergeResult SetSyncData(const syncer::SyncDataList& data_list, bool is_initial_data); - // Populates the wallet cards and addresses from the sync data and uses the - // sync data to link the card to its billing address. - static void PopulateWalletCardsAndAddresses( + // Populates the wallet datatypes from the sync data and uses the sync data to + // link the card to its billing address. + static void PopulateWalletTypesFromSyncData( const syncer::SyncDataList& data_list, std::vector<CreditCard>* wallet_cards, - std::vector<AutofillProfile>* wallet_addresses); + std::vector<AutofillProfile>* wallet_addresses, + std::vector<PaymentsCustomerData>* customer_data); // Finds the copies of the same credit card from the server and on disk and // overwrites the server version with the use stats saved on disk, and the
diff --git a/components/autofill/core/browser/webdata/autofill_wallet_syncable_service_unittest.cc b/components/autofill/core/browser/webdata/autofill_wallet_syncable_service_unittest.cc index c31ea73a..2530bfc 100644 --- a/components/autofill/core/browser/webdata/autofill_wallet_syncable_service_unittest.cc +++ b/components/autofill/core/browser/webdata/autofill_wallet_syncable_service_unittest.cc
@@ -10,6 +10,7 @@ #include "base/strings/utf_string_conversions.h" #include "components/autofill/core/browser/autofill_profile.h" #include "components/autofill/core/browser/credit_card.h" +#include "components/autofill/core/browser/payments/payments_customer_data.h" #include "components/autofill/core/browser/test_autofill_clock.h" #include "components/autofill/core/browser/webdata/autofill_table.h" #include "components/sync/protocol/autofill_specifics.pb.h" @@ -52,6 +53,21 @@ return syncer::SyncData::CreateLocalData(id, id, specifics); } +syncer::SyncData CreateSyncDataForPaymentsCustomerData(const std::string& id) { + sync_pb::EntitySpecifics specifics; + + sync_pb::AutofillWalletSpecifics* wallet_specifics = + specifics.mutable_autofill_wallet(); + wallet_specifics->set_type( + sync_pb::AutofillWalletSpecifics_WalletInfoType:: + AutofillWalletSpecifics_WalletInfoType_CUSTOMER_DATA); + + sync_pb::PaymentsCustomerData* customer_data_specifics = + wallet_specifics->mutable_customer_data(); + customer_data_specifics->set_id(id); + return syncer::SyncData::CreateLocalData(id, id, specifics); +} + class TestAutofillTable : public AutofillTable { public: explicit TestAutofillTable(std::vector<CreditCard> cards_on_disk) @@ -77,9 +93,10 @@ // Verify that the link between a card and its billing address from sync is // present in the generated Autofill objects. TEST(AutofillWalletSyncableServiceTest, - PopulateWalletCardsAndAddresses_BillingAddressIdTransfer) { + PopulateWalletTypesFromSyncData_BillingAddressIdTransfer) { std::vector<CreditCard> wallet_cards; std::vector<AutofillProfile> wallet_addresses; + std::vector<PaymentsCustomerData> customer_data; syncer::SyncDataList data_list; // Create a Sync data for a card and its billing address. @@ -87,8 +104,8 @@ data_list.push_back(CreateSyncDataForWalletCreditCard( "card1" /* id */, "1" /* billing_address_id */)); - AutofillWalletSyncableService::PopulateWalletCardsAndAddresses( - data_list, &wallet_cards, &wallet_addresses); + AutofillWalletSyncableService::PopulateWalletTypesFromSyncData( + data_list, &wallet_cards, &wallet_addresses, &customer_data); ASSERT_EQ(1U, wallet_cards.size()); ASSERT_EQ(1U, wallet_addresses.size()); @@ -206,6 +223,7 @@ std::vector<AutofillProfile> wallet_addresses; std::vector<CreditCard> wallet_cards; + std::vector<PaymentsCustomerData> customer_data; syncer::SyncDataList data_list; // Create a Sync data for a card and its billing address. @@ -213,8 +231,8 @@ data_list.push_back(CreateSyncDataForWalletCreditCard( "card1" /* id */, "1" /* billing_address_id */)); - AutofillWalletSyncableService::PopulateWalletCardsAndAddresses( - data_list, &wallet_cards, &wallet_addresses); + AutofillWalletSyncableService::PopulateWalletTypesFromSyncData( + data_list, &wallet_cards, &wallet_addresses, &customer_data); ASSERT_EQ(1U, wallet_cards.size()); @@ -227,14 +245,15 @@ TEST(AutofillWalletSyncableServiceTest, EmptyNameOnCard) { std::vector<CreditCard> wallet_cards; std::vector<AutofillProfile> wallet_addresses; + std::vector<PaymentsCustomerData> customer_data; syncer::SyncDataList data_list; // Create a Sync data for a card and its billing address. data_list.push_back(CreateSyncDataForWalletCreditCard( "card1" /* id */, "1" /* billing_address_id */)); - AutofillWalletSyncableService::PopulateWalletCardsAndAddresses( - data_list, &wallet_cards, &wallet_addresses); + AutofillWalletSyncableService::PopulateWalletTypesFromSyncData( + data_list, &wallet_cards, &wallet_addresses, &customer_data); ASSERT_EQ(1U, wallet_cards.size()); @@ -247,6 +266,23 @@ wallet_cards.back().GetRawInfo(autofill::CREDIT_CARD_NAME_LAST).empty()); } +TEST(AutofillWalletSyncableServiceTest, PaymentsCustomerData) { + std::vector<CreditCard> wallet_cards; + std::vector<AutofillProfile> wallet_addresses; + std::vector<PaymentsCustomerData> customer_data; + syncer::SyncDataList data_list; + + // Create Sync data for Payments Customer data. + data_list.push_back( + CreateSyncDataForPaymentsCustomerData("deadbeef" /* id */)); + + AutofillWalletSyncableService::PopulateWalletTypesFromSyncData( + data_list, &wallet_cards, &wallet_addresses, &customer_data); + + // Make sure the Payments customer id is there. + EXPECT_EQ("deadbeef", customer_data.back().customer_id); +} + TEST(AutofillWalletSyncableServiceTest, ComputeCardsDiff) { // Some arbitrary cards for testing. CreditCard card0(CreditCard::MASKED_SERVER_CARD, "a");
diff --git a/components/autofill/core/browser/webdata/autofill_webdata.h b/components/autofill/core/browser/webdata/autofill_webdata.h index fc715a0..3ae94e1 100644 --- a/components/autofill/core/browser/webdata/autofill_webdata.h +++ b/components/autofill/core/browser/webdata/autofill_webdata.h
@@ -112,6 +112,13 @@ const base::string16& full_number) = 0; virtual void MaskServerCreditCard(const std::string& id) = 0; + // Initiates the request for Payments customer data. The method + // OnWebDataServiceRequestDone of |consumer| gets called when the request is + // finished, with the customer data included in the argument |result|. The + // consumer owns the data. + virtual WebDataServiceBase::Handle GetPaymentsCustomerData( + WebDataServiceConsumer* consumer) = 0; + // Updates the metadata for a server card (masked or not). virtual void UpdateServerCardMetadata(const CreditCard& credit_card) = 0;
diff --git a/components/autofill/core/browser/webdata/autofill_webdata_backend_impl.cc b/components/autofill/core/browser/webdata/autofill_webdata_backend_impl.cc index e1f9b6e..1a03800 100644 --- a/components/autofill/core/browser/webdata/autofill_webdata_backend_impl.cc +++ b/components/autofill/core/browser/webdata/autofill_webdata_backend_impl.cc
@@ -11,6 +11,7 @@ #include "components/autofill/core/browser/autofill_country.h" #include "components/autofill/core/browser/autofill_profile.h" #include "components/autofill/core/browser/credit_card.h" +#include "components/autofill/core/browser/payments/payments_customer_data.h" #include "components/autofill/core/browser/webdata/autofill_change.h" #include "components/autofill/core/browser/webdata/autofill_entry.h" #include "components/autofill/core/browser/webdata/autofill_table.h" @@ -419,6 +420,15 @@ return WebDatabase::COMMIT_NEEDED; } +std::unique_ptr<WDTypedResult> +AutofillWebDataBackendImpl::GetPaymentsCustomerData(WebDatabase* db) { + DCHECK(owning_task_runner()->RunsTasksInCurrentSequence()); + std::unique_ptr<PaymentsCustomerData> customer_data; + AutofillTable::FromWebDatabase(db)->GetPaymentsCustomerData(&customer_data); + return std::make_unique<WDResult<std::unique_ptr<PaymentsCustomerData>>>( + AUTOFILL_CUSTOMERDATA_RESULT, std::move(customer_data)); +} + WebDatabase::State AutofillWebDataBackendImpl::ClearAllServerData( WebDatabase* db) { DCHECK(owning_task_runner()->RunsTasksInCurrentSequence());
diff --git a/components/autofill/core/browser/webdata/autofill_webdata_backend_impl.h b/components/autofill/core/browser/webdata/autofill_webdata_backend_impl.h index 91c379f..3a21793 100644 --- a/components/autofill/core/browser/webdata/autofill_webdata_backend_impl.h +++ b/components/autofill/core/browser/webdata/autofill_webdata_backend_impl.h
@@ -163,6 +163,9 @@ WebDatabase::State UpdateServerAddressMetadata(const AutofillProfile& profile, WebDatabase* db); + // Returns the PaymentsCustomerData from the database. + std::unique_ptr<WDTypedResult> GetPaymentsCustomerData(WebDatabase* db); + WebDatabase::State ClearAllServerData(WebDatabase* db); WebDatabase::State ClearAllLocalData(WebDatabase* db);
diff --git a/components/autofill/core/browser/webdata/autofill_webdata_service.cc b/components/autofill/core/browser/webdata/autofill_webdata_service.cc index e00a5fca..dd40364 100644 --- a/components/autofill/core/browser/webdata/autofill_webdata_service.cc +++ b/components/autofill/core/browser/webdata/autofill_webdata_service.cc
@@ -213,6 +213,15 @@ autofill_backend_, id)); } +WebDataServiceBase::Handle AutofillWebDataService::GetPaymentsCustomerData( + WebDataServiceConsumer* consumer) { + return wdbs_->ScheduleDBTaskWithResult( + FROM_HERE, + Bind(&AutofillWebDataBackendImpl::GetPaymentsCustomerData, + autofill_backend_), + consumer); +} + void AutofillWebDataService::ClearAllServerData() { wdbs_->ScheduleDBTask( FROM_HERE,
diff --git a/components/autofill/core/browser/webdata/autofill_webdata_service.h b/components/autofill/core/browser/webdata/autofill_webdata_service.h index 8b26dc1..d3a8adc 100644 --- a/components/autofill/core/browser/webdata/autofill_webdata_service.h +++ b/components/autofill/core/browser/webdata/autofill_webdata_service.h
@@ -98,6 +98,10 @@ const base::string16& full_number) override; void MaskServerCreditCard(const std::string& id) override; + // PaymentsCustomerData. + WebDataServiceBase::Handle GetPaymentsCustomerData( + WebDataServiceConsumer* consumer) override; + void ClearAllServerData(); void ClearAllLocalData();
diff --git a/components/autofill/core/common/autofill_features.cc b/components/autofill/core/common/autofill_features.cc index f4c8a8f..49d65b1 100644 --- a/components/autofill/core/common/autofill_features.cc +++ b/components/autofill/core/common/autofill_features.cc
@@ -138,6 +138,11 @@ "AutofillUpstreamUseGooglePayOnAndroidBranding", base::FEATURE_ENABLED_BY_DEFAULT}; +// Controls whether the PaymentsCustomerData is used to make requests to +// Google Payments. +const base::Feature kAutofillUsePaymentsCustomerData{ + "AutofillUsePaymentsCustomerData", base::FEATURE_DISABLED_BY_DEFAULT}; + // Controls whether password generation is offered automatically on fields // percieved as eligible for generation. const base::Feature kAutomaticPasswordGeneration = {
diff --git a/components/autofill/core/common/autofill_features.h b/components/autofill/core/common/autofill_features.h index fffbaf7..9c7458c2 100644 --- a/components/autofill/core/common/autofill_features.h +++ b/components/autofill/core/common/autofill_features.h
@@ -34,6 +34,7 @@ extern const base::Feature kAutofillUpstreamDisallowElo; extern const base::Feature kAutofillUpstreamDisallowJcb; extern const base::Feature kAutofillUpstreamUseGooglePayBrandingOnMobile; +extern const base::Feature kAutofillUsePaymentsCustomerData; extern const base::Feature kAutomaticPasswordGeneration; extern const base::Feature kSingleClickAutofill; extern const base::Feature kAutofillPrefilledFields;
diff --git a/components/autofill/core/common/autofill_prefs.cc b/components/autofill/core/common/autofill_prefs.cc index f512f4b..402a6a1 100644 --- a/components/autofill/core/common/autofill_prefs.cc +++ b/components/autofill/core/common/autofill_prefs.cc
@@ -80,9 +80,7 @@ registry->RegisterBooleanPref( prefs::kAutofillProfileEnabled, true, user_prefs::PrefRegistrySyncable::SYNCABLE_PREF); - registry->RegisterBooleanPref( - prefs::kAutofillJapanCityFieldMigrated, false, - user_prefs::PrefRegistrySyncable::SYNCABLE_PREF); + registry->RegisterBooleanPref(prefs::kAutofillJapanCityFieldMigrated, false); registry->RegisterIntegerPref( prefs::kAutofillLastVersionDeduped, 0, user_prefs::PrefRegistrySyncable::SYNCABLE_PREF);
diff --git a/components/autofill_strings.grdp b/components/autofill_strings.grdp index a41edf4..e4e3ffa 100644 --- a/components/autofill_strings.grdp +++ b/components/autofill_strings.grdp
@@ -444,6 +444,35 @@ No saved addresses </message> + <!-- Autofill settings --> + <message name="IDS_AUTOFILL_ADDRESSES" desc="Title for the list of addresses that chrome has saved for use in filling in forms."> + Addresses + </message> + <if expr="not is_ios"> + <then> + <message name="IDS_AUTOFILL_PAYMENT_METHODS" desc="Title for the list of saved payment methods that can be used to fill in forms. Sentence-Cased."> + Payment methods + </message> + <message name="IDS_AUTOFILL_ENABLE_PROFILES_TOGGLE_LABEL" desc="Label for a toggle that allows users to control whether addresses should be saved and forms should be autofilled with them. Sentence-Cased."> + Save and fill addresses + </message> + <message name="IDS_AUTOFILL_ENABLE_CREDIT_CARDS_TOGGLE_LABEL" desc="Label for a toggle that allows users to control whether credit cards should be saved and forms should be autofilled with it. Sentence-Cased."> + Save and fill payment methods + </message> + </then> + <else> + <message name="IDS_AUTOFILL_PAYMENT_METHODS" desc="Title for the list of saved payment methods that can be used to fill in forms. Title-Cased."> + Payment Methods + </message> + <message name="IDS_AUTOFILL_ENABLE_PROFILES_TOGGLE_LABEL" desc="Label for a toggle that allows users to control whether addresses should be saved and forms should be autofilled with them. Title-Cased."> + Save and Fill Addresses + </message> + <message name="IDS_AUTOFILL_ENABLE_CREDIT_CARDS_TOGGLE_LABEL" desc="Label for a toggle that allows users to control whether credit cards should be saved and forms should be autofilled with it. Title-Cased."> + Save and Fill Payment Methods + </message> + </else> + </if> + <!-- Autofill/Wallet integration preferences --> <if expr="not is_ios"> <then>
diff --git a/components/browser_sync/profile_sync_components_factory_impl.cc b/components/browser_sync/profile_sync_components_factory_impl.cc index 551d495..4e602db 100644 --- a/components/browser_sync/profile_sync_components_factory_impl.cc +++ b/components/browser_sync/profile_sync_components_factory_impl.cc
@@ -40,6 +40,7 @@ #include "components/sync_bookmarks/bookmark_change_processor.h" #include "components/sync_bookmarks/bookmark_data_type_controller.h" #include "components/sync_bookmarks/bookmark_model_associator.h" +#include "components/sync_bookmarks/bookmark_sync_service.h" #include "components/sync_sessions/session_data_type_controller.h" #include "components/sync_sessions/session_model_type_controller.h" @@ -110,7 +111,8 @@ web_data_service_on_disk, const scoped_refptr<autofill::AutofillWebDataService>& web_data_service_in_memory, - const scoped_refptr<password_manager::PasswordStore>& password_store) + const scoped_refptr<password_manager::PasswordStore>& password_store, + sync_bookmarks::BookmarkSyncService* bookmark_sync_service) : sync_client_(sync_client), channel_(channel), version_(version), @@ -120,7 +122,8 @@ db_thread_(db_thread), web_data_service_on_disk_(web_data_service_on_disk), web_data_service_in_memory_(web_data_service_in_memory), - password_store_(password_store) {} + password_store_(password_store), + bookmark_sync_service_(bookmark_sync_service) {} ProfileSyncComponentsFactoryImpl::~ProfileSyncComponentsFactoryImpl() {} @@ -202,8 +205,14 @@ // disabled. if (!disabled_types.Has(syncer::BOOKMARKS)) { if (FeatureList::IsEnabled(switches::kSyncUSSBookmarks)) { - controllers.push_back(CreateModelTypeControllerForModelRunningOnUIThread( - syncer::BOOKMARKS)); + controllers.push_back(std::make_unique<ModelTypeController>( + syncer::BOOKMARKS, + std::make_unique<syncer::ProxyModelTypeControllerDelegate>( + ui_thread_, + base::BindRepeating(&sync_bookmarks::BookmarkSyncService:: + GetBookmarkSyncControllerDelegate, + base::Unretained(bookmark_sync_service_), + sync_client_->GetFaviconService())))); } else { controllers.push_back(std::make_unique<BookmarkDataTypeController>( error_callback, sync_client_));
diff --git a/components/browser_sync/profile_sync_components_factory_impl.h b/components/browser_sync/profile_sync_components_factory_impl.h index 6663707..79f3fe98 100644 --- a/components/browser_sync/profile_sync_components_factory_impl.h +++ b/components/browser_sync/profile_sync_components_factory_impl.h
@@ -30,6 +30,10 @@ class PasswordStore; } +namespace sync_bookmarks { +class BookmarkSyncService; +} + namespace browser_sync { class ProfileSyncComponentsFactoryImpl @@ -47,7 +51,8 @@ web_data_service_on_disk, const scoped_refptr<autofill::AutofillWebDataService>& web_data_service_in_memory, - const scoped_refptr<password_manager::PasswordStore>& password_store); + const scoped_refptr<password_manager::PasswordStore>& password_store, + sync_bookmarks::BookmarkSyncService* bookmark_sync_service); ~ProfileSyncComponentsFactoryImpl() override; // SyncApiComponentFactory implementation: @@ -113,6 +118,7 @@ const scoped_refptr<autofill::AutofillWebDataService> web_data_service_in_memory_; const scoped_refptr<password_manager::PasswordStore> password_store_; + sync_bookmarks::BookmarkSyncService* const bookmark_sync_service_; // Whether to override PREFERENCES to use USS. static bool override_prefs_controller_to_uss_for_test_;
diff --git a/components/browser_sync/profile_sync_service_autofill_unittest.cc b/components/browser_sync/profile_sync_service_autofill_unittest.cc index 018c0fc..a91264e 100644 --- a/components/browser_sync/profile_sync_service_autofill_unittest.cc +++ b/components/browser_sync/profile_sync_service_autofill_unittest.cc
@@ -332,6 +332,7 @@ MOCK_CONST_METHOD0(IsDataLoaded, bool()); MOCK_METHOD0(LoadProfiles, void()); MOCK_METHOD0(LoadCreditCards, void()); + MOCK_METHOD0(LoadPaymentsCustomerData, void()); MOCK_METHOD0(Refresh, void()); }; @@ -373,12 +374,14 @@ EXPECT_CALL(personal_data_manager(), LoadProfiles()); EXPECT_CALL(personal_data_manager(), LoadCreditCards()); + EXPECT_CALL(personal_data_manager(), LoadPaymentsCustomerData()); personal_data_manager_->Init(web_data_service_, /*account_database=*/nullptr, profile_sync_service_bundle()->pref_service(), /*identity_manager=*/nullptr, /*is_off_the_record=*/false); + personal_data_manager_->SetUseAccountStorageForServerCards(false); web_data_service_->StartSyncableService();
diff --git a/components/cast_channel/cast_message_handler_unittest.cc b/components/cast_channel/cast_message_handler_unittest.cc index 149cb75..0dac8dd 100644 --- a/components/cast_channel/cast_message_handler_unittest.cc +++ b/components/cast_channel/cast_message_handler_unittest.cc
@@ -4,6 +4,7 @@ #include "components/cast_channel/cast_message_handler.h" +#include "base/json/json_reader.h" #include "base/run_loop.h" #include "base/strings/stringprintf.h" #include "base/test/scoped_task_environment.h" @@ -25,15 +26,18 @@ constexpr char kSourceId[] = "sourceId"; constexpr char kDestinationId[] = "destinationId"; -std::string GetMessageType(const CastMessage& message) { - std::unique_ptr<base::Value> dict = GetDictionaryFromCastMessage(message); +CastMessageType GetMessageType(const CastMessage& message) { + std::unique_ptr<base::Value> dict = + base::JSONReader::Read(message.payload_utf8()); if (!dict) - return std::string(); + return CastMessageType::kOther; + const base::Value* message_type = dict->FindKeyOfType("type", base::Value::Type::STRING); if (!message_type) - return std::string(); - return message_type->GetString(); + return CastMessageType::kOther; + + return CastMessageTypeFromString(message_type->GetString()); } } // namespace @@ -101,9 +105,12 @@ base::BindOnce(&CastMessageHandlerTest::OnAppAvailability, base::Unretained(this))); - EXPECT_EQ("CONNECT", GetMessageType(virtual_connection_request)); - EXPECT_EQ("GET_APP_AVAILABILITY", GetMessageType(app_availability_request1)); - EXPECT_EQ("GET_APP_AVAILABILITY", GetMessageType(app_availability_request2)); + EXPECT_EQ(CastMessageType::kConnect, + GetMessageType(virtual_connection_request)); + EXPECT_EQ(CastMessageType::kGetAppAvailability, + GetMessageType(app_availability_request1)); + EXPECT_EQ(CastMessageType::kGetAppAvailability, + GetMessageType(app_availability_request2)); } TEST_F(CastMessageHandlerTest, RecreateVirtualConnectionAfterError) { @@ -117,8 +124,10 @@ &cast_socket_, "AAAAAAAA", base::BindOnce(&CastMessageHandlerTest::OnAppAvailability, base::Unretained(this))); - EXPECT_EQ("CONNECT", GetMessageType(virtual_connection_request)); - EXPECT_EQ("GET_APP_AVAILABILITY", GetMessageType(app_availability_request)); + EXPECT_EQ(CastMessageType::kConnect, + GetMessageType(virtual_connection_request)); + EXPECT_EQ(CastMessageType::kGetAppAvailability, + GetMessageType(app_availability_request)); EXPECT_CALL( *this, OnAppAvailability("AAAAAAAA", GetAppAvailabilityResult::kUnknown)); @@ -133,8 +142,10 @@ base::BindOnce(&CastMessageHandlerTest::OnAppAvailability, base::Unretained(this))); - EXPECT_EQ("CONNECT", GetMessageType(virtual_connection_request)); - EXPECT_EQ("GET_APP_AVAILABILITY", GetMessageType(app_availability_request)); + EXPECT_EQ(CastMessageType::kConnect, + GetMessageType(virtual_connection_request)); + EXPECT_EQ(CastMessageType::kGetAppAvailability, + GetMessageType(app_availability_request)); // The callback is invoked with kUnknown before the PendingRequests is // destroyed. EXPECT_CALL( @@ -153,8 +164,10 @@ base::BindOnce(&CastMessageHandlerTest::OnAppAvailability, base::Unretained(this))); - EXPECT_EQ("CONNECT", GetMessageType(virtual_connection_request)); - EXPECT_EQ("GET_APP_AVAILABILITY", GetMessageType(app_availability_request)); + EXPECT_EQ(CastMessageType::kConnect, + GetMessageType(virtual_connection_request)); + EXPECT_EQ(CastMessageType::kGetAppAvailability, + GetMessageType(app_availability_request)); std::unique_ptr<base::Value> dict = GetDictionaryFromCastMessage(app_availability_request); @@ -213,7 +226,7 @@ handler_.EnsureConnection(cast_socket_.id(), kSourceId, kDestinationId); EXPECT_EQ(CastMessageType::kConnect, - ParseMessageType(virtual_connection_request)); + GetMessageType(virtual_connection_request)); // No-op because connection is already created the first time. EXPECT_CALL(*cast_socket_.mock_transport(), SendMessage(_, _, _)).Times(0); @@ -254,8 +267,8 @@ base::Unretained(this), LaunchSessionResponse::Result::kOk)); EXPECT_EQ(CastMessageType::kConnect, - ParseMessageType(virtual_connection_request)); - EXPECT_EQ(CastMessageType::kLaunch, ParseMessageType(launch_session_request)); + GetMessageType(virtual_connection_request)); + EXPECT_EQ(CastMessageType::kLaunch, GetMessageType(launch_session_request)); std::unique_ptr<base::Value> dict = GetDictionaryFromCastMessage(launch_session_request); @@ -297,8 +310,8 @@ base::Unretained(this), LaunchSessionResponse::Result::kTimedOut)); EXPECT_EQ(CastMessageType::kConnect, - ParseMessageType(virtual_connection_request)); - EXPECT_EQ(CastMessageType::kLaunch, ParseMessageType(launch_session_request)); + GetMessageType(virtual_connection_request)); + EXPECT_EQ(CastMessageType::kLaunch, GetMessageType(launch_session_request)); environment_.FastForwardBy(base::TimeDelta::FromSeconds(30)); EXPECT_EQ(1, session_launch_response_count_); @@ -318,7 +331,7 @@ handler_.SendAppMessage(cast_socket_.id(), message); EXPECT_EQ(CastMessageType::kConnect, - ParseMessageType(virtual_connection_request)); + GetMessageType(virtual_connection_request)); EXPECT_EQ(message.payload_utf8(), app_message.payload_utf8()); }
diff --git a/components/cast_channel/cast_message_util.cc b/components/cast_channel/cast_message_util.cc index da25c15b..ebadeef 100644 --- a/components/cast_channel/cast_message_util.cc +++ b/components/cast_channel/cast_message_util.cc
@@ -20,16 +20,6 @@ namespace cast_channel { namespace { -// Reserved message namespaces for internal messages. -constexpr char kCastInternalNamespacePrefix[] = "urn:x-cast:com.google.cast."; -constexpr char kAuthNamespace[] = "urn:x-cast:com.google.cast.tp.deviceauth"; -constexpr char kHeartbeatNamespace[] = - "urn:x-cast:com.google.cast.tp.heartbeat"; -constexpr char kConnectionNamespace[] = - "urn:x-cast:com.google.cast.tp.connection"; -constexpr char kReceiverNamespace[] = "urn:x-cast:com.google.cast.receiver"; -constexpr char kBroadcastNamespace[] = "urn:x-cast:com.google.cast.broadcast"; - // Text payload keys. constexpr char kTypeNodeId[] = "type"; constexpr char kRequestIdNodeId[] = "requestId"; @@ -121,13 +111,6 @@ base::CompareCase::SENSITIVE); } -CastMessageType ParseMessageType(const CastMessage& message) { - std::unique_ptr<base::DictionaryValue> dictionary = - GetDictionaryFromCastMessage(message); - return dictionary ? ParseMessageTypeFromPayload(*dictionary) - : CastMessageType::kOther; -} - CastMessageType ParseMessageTypeFromPayload(const base::Value& payload) { const Value* type_string = payload.FindKeyOfType(kTypeNodeId, Value::Type::STRING);
diff --git a/components/cast_channel/cast_message_util.h b/components/cast_channel/cast_message_util.h index b9afe35..d7be3d1 100644 --- a/components/cast_channel/cast_message_util.h +++ b/components/cast_channel/cast_message_util.h
@@ -15,9 +15,23 @@ class CastMessage; class DeviceAuthMessage; +// Reserved message namespaces for internal messages. +static constexpr char kCastInternalNamespacePrefix[] = + "urn:x-cast:com.google.cast."; +static constexpr char kAuthNamespace[] = + "urn:x-cast:com.google.cast.tp.deviceauth"; +static constexpr char kHeartbeatNamespace[] = + "urn:x-cast:com.google.cast.tp.heartbeat"; +static constexpr char kConnectionNamespace[] = + "urn:x-cast:com.google.cast.tp.connection"; +static constexpr char kReceiverNamespace[] = + "urn:x-cast:com.google.cast.receiver"; +static constexpr char kBroadcastNamespace[] = + "urn:x-cast:com.google.cast.broadcast"; + // Sender and receiver IDs to use for platform messages. -constexpr char kPlatformSenderId[] = "sender-0"; -constexpr char kPlatformReceiverId[] = "receiver-0"; +static constexpr char kPlatformSenderId[] = "sender-0"; +static constexpr char kPlatformReceiverId[] = "receiver-0"; // Cast application protocol message types. enum class CastMessageType { @@ -46,12 +60,8 @@ // messages. bool IsCastInternalNamespace(const std::string& message_namespace); -// Parses the JSON-encoded payload of |message| and returns the value in the -// "type" field or |kUnknown| if the parse fails or the field is not found. -// The result is only valid if |message| is a Cast application protocol message. -CastMessageType ParseMessageType(const CastMessage& message); - -// Similar to |ParseMessageType()|, but |payload| is already JSON-parsed. +// Returns the value in the "type" field or |kOther| if the field is not found. +// The result is only valid if |payload| is a Cast application protocol message. CastMessageType ParseMessageTypeFromPayload(const base::Value& payload); // Returns a human readable string for |message_type|.
diff --git a/components/cast_channel/keep_alive_delegate.cc b/components/cast_channel/keep_alive_delegate.cc index e052ecb9..623b4ad 100644 --- a/components/cast_channel/keep_alive_delegate.cc +++ b/components/cast_channel/keep_alive_delegate.cc
@@ -155,15 +155,22 @@ if (started_) ResetTimers(); - // PING and PONG messages are intercepted and handled by KeepAliveDelegate + // Keep-alive messages are intercepted and handled by KeepAliveDelegate // here. All other messages are passed through to |inner_delegate_|. - CastMessageType payload_type = ParseMessageType(message); - if (payload_type == CastMessageType::kPing) { - DVLOG(2) << "Received PING."; - if (started_) - SendKeepAliveMessage(pong_message_, CastMessageType::kPong); - } else if (payload_type == CastMessageType::kPong) { - DVLOG(2) << "Received PONG."; + // Keep-alive messages are assumed to be in the form { "type": "PING|PONG" }. + if (message.namespace_() == kHeartbeatNamespace) { + const char* ping_message_type = + CastMessageTypeToString(CastMessageType::kPing); + if (message.payload_utf8().find(ping_message_type) != std::string::npos) { + DVLOG(2) << "Received PING."; + if (started_) + SendKeepAliveMessage(pong_message_, CastMessageType::kPong); + } else { + DCHECK_NE(std::string::npos, + message.payload_utf8().find( + CastMessageTypeToString(CastMessageType::kPong))); + DVLOG(2) << "Received PONG."; + } } else { inner_delegate_->OnMessage(message); }
diff --git a/components/data_reduction_proxy/core/browser/BUILD.gn b/components/data_reduction_proxy/core/browser/BUILD.gn index 5cd2c3e4..198704c 100644 --- a/components/data_reduction_proxy/core/browser/BUILD.gn +++ b/components/data_reduction_proxy/core/browser/BUILD.gn
@@ -144,6 +144,8 @@ "//components/data_reduction_proxy/core/common", "//components/data_reduction_proxy/core/common:test_support", "//components/prefs:test_support", + "//components/previews/core:core", + "//components/previews/core:test_support", "//net", "//net:test_support", "//testing/gmock", @@ -208,6 +210,7 @@ "//components/data_use_measurement/core:ascriber", "//components/prefs:test_support", "//components/previews/core", + "//components/previews/core:test_support", "//components/variations", "//net:test_support", "//testing/gmock",
diff --git a/components/download/internal/common/base_file_win.cc b/components/download/internal/common/base_file_win.cc index 1179690..972218e 100644 --- a/components/download/internal/common/base_file_win.cc +++ b/components/download/internal/common/base_file_win.cc
@@ -14,7 +14,6 @@ #include "base/files/file_util.h" #include "base/guid.h" #include "base/macros.h" -#include "base/metrics/histogram_macros.h" #include "base/strings/utf_string_conversions.h" #include "base/threading/thread_restrictions.h" #include "components/download/public/common/download_interrupt_reasons_utils.h" @@ -23,38 +22,6 @@ namespace download { namespace { -const int kAllSpecialShFileOperationCodes[] = { - // Should be kept in sync with the case statement below. - ERROR_ACCESS_DENIED, - ERROR_SHARING_VIOLATION, - ERROR_INVALID_PARAMETER, - 0x71, - 0x72, - 0x73, - 0x74, - 0x75, - 0x76, - 0x78, - 0x79, - 0x7A, - 0x7C, - 0x7D, - 0x7E, - 0x80, - 0x81, - 0x82, - 0x83, - 0x84, - 0x85, - 0x86, - 0x87, - 0x88, - 0xB7, - 0x402, - 0x10000, - 0x10074, -}; - // Maps the result of a call to |SHFileOperation()| onto a // |DownloadInterruptReason|. // @@ -253,28 +220,6 @@ break; } - // Narrow down on the reason we're getting some catch-all interrupt reasons. - if (result == DOWNLOAD_INTERRUPT_REASON_FILE_FAILED) { - UMA_HISTOGRAM_CUSTOM_ENUMERATION( - "Download.MapWinShErrorFileFailed", code, - base::CustomHistogram::ArrayToCustomEnumRanges( - kAllSpecialShFileOperationCodes)); - } - - if (result == DOWNLOAD_INTERRUPT_REASON_FILE_ACCESS_DENIED) { - UMA_HISTOGRAM_CUSTOM_ENUMERATION( - "Download.MapWinShErrorAccessDenied", code, - base::CustomHistogram::ArrayToCustomEnumRanges( - kAllSpecialShFileOperationCodes)); - } - - if (result == DOWNLOAD_INTERRUPT_REASON_FILE_TRANSIENT_ERROR) { - UMA_HISTOGRAM_CUSTOM_ENUMERATION( - "Download.MapWinShErrorTransientError", code, - base::CustomHistogram::ArrayToCustomEnumRanges( - kAllSpecialShFileOperationCodes)); - } - if (result != DOWNLOAD_INTERRUPT_REASON_NONE) return result;
diff --git a/components/download/internal/common/download_file_impl.cc b/components/download/internal/common/download_file_impl.cc index 05d8f7c5..6a996e2 100644 --- a/components/download/internal/common/download_file_impl.cc +++ b/components/download/internal/common/download_file_impl.cc
@@ -378,11 +378,6 @@ return; } - if (!parameters->time_of_first_failure.is_null()) { - RecordDownloadFileRenameResultAfterRetry( - base::TimeTicks::Now() - parameters->time_of_first_failure, reason); - } - if (reason == DOWNLOAD_INTERRUPT_REASON_NONE && (parameters->option & ANNOTATE_WITH_SOURCE_INFORMATION)) { // Doing the annotation after the rename rather than before leaves @@ -498,14 +493,12 @@ break; case InputStream::HAS_DATA: { ++num_buffers; - base::TimeTicks write_start(base::TimeTicks::Now()); should_terminate = CalculateBytesToWrite( source_stream, incoming_data_size, &bytes_to_write); DCHECK_GE(incoming_data_size, bytes_to_write); reason = WriteDataToFile( source_stream->offset() + source_stream->bytes_written(), incoming_data->data(), bytes_to_write); - disk_writes_time_ += (base::TimeTicks::Now() - write_start); bytes_seen_ += bytes_to_write; total_incoming_data_size += bytes_to_write; if (reason == DOWNLOAD_INTERRUPT_REASON_NONE) { @@ -548,11 +541,6 @@ MOJO_RESULT_OK)); } - if (total_incoming_data_size) - RecordFileThreadReceiveBuffers(num_buffers); - - RecordContiguousWriteTime(now - start); - if (state == InputStream::COMPLETE) OnStreamCompleted(source_stream); else @@ -602,7 +590,7 @@ // All the stream reader are completed, shut down file IO processing. if (IsDownloadCompleted()) { - RecordFileBandwidth(bytes_seen_, disk_writes_time_, + RecordFileBandwidth(bytes_seen_, base::TimeTicks::Now() - download_start_); if (record_stream_bandwidth_) { RecordParallelizableDownloadStats(
diff --git a/components/download/internal/common/download_item_impl.cc b/components/download/internal/common/download_item_impl.cc index 8c4705f..d24214a 100644 --- a/components/download/internal/common/download_item_impl.cc +++ b/components/download/internal/common/download_item_impl.cc
@@ -620,7 +620,7 @@ // program that opens the file. So instead we spawn a check to update // the UI if the file has been deleted in parallel with the open. delegate_->CheckForFileRemoval(this); - RecordOpen(GetEndTime(), !GetOpened()); + RecordOpen(GetEndTime()); opened_ = true; last_access_time_ = base::Time::Now(); for (auto& observer : observers_) @@ -1187,7 +1187,6 @@ // HTTP_PRECONDITION_FAILED), then the download will automatically retried as // a full request rather than a partial. Full restarts clobber validators. int origin_state = 0; - bool is_partial = GetReceivedBytes() > 0; if (chain_iter != new_create_info.url_chain.end()) origin_state |= ORIGIN_STATE_ON_RESUMPTION_ADDITIONAL_REDIRECTS; if (etag_ != new_create_info.etag || @@ -1198,8 +1197,6 @@ } if (content_disposition_ != new_create_info.content_disposition) origin_state |= ORIGIN_STATE_ON_RESUMPTION_CONTENT_DISPOSITION_CHANGED; - RecordOriginStateOnResumption( - is_partial, static_cast<OriginStateOnResumption>(origin_state)); request_info_.url_chain.insert(request_info_.url_chain.end(), chain_iter, new_create_info.url_chain.end()); @@ -1813,7 +1810,7 @@ TransitionTo(COMPLETE_INTERNAL); bool is_parallelizable = job_ && job_->IsParallelizable(); - RecordDownloadCompleted(start_tick_, GetReceivedBytes(), is_parallelizable, + RecordDownloadCompleted(GetReceivedBytes(), is_parallelizable, download_source_); if (!delegate_->IsOffTheRecord()) { RecordDownloadCountWithSource(COMPLETED_COUNT_NORMAL_PROFILE,
diff --git a/components/download/internal/common/download_stats.cc b/components/download/internal/common/download_stats.cc index 0f0e81c..0d9d85cf 100644 --- a/components/download/internal/common/download_stats.cc +++ b/components/download/internal/common/download_stats.cc
@@ -331,12 +331,10 @@ base::UmaHistogramEnumeration(name, type, DOWNLOAD_COUNT_TYPES_LAST_ENTRY); } -void RecordDownloadCompleted(const base::TimeTicks& start, - int64_t download_len, +void RecordDownloadCompleted(int64_t download_len, bool is_parallelizable, DownloadSource download_source) { RecordDownloadCountWithSource(COMPLETED_COUNT, download_source); - UMA_HISTOGRAM_LONG_TIMES("Download.Time", (base::TimeTicks::Now() - start)); int64_t max = 1024 * 1024 * 1024; // One Terabyte. download_len /= 1024; // In Kilobytes UMA_HISTOGRAM_CUSTOM_COUNTS("Download.DownloadSize", download_len, 1, max, @@ -451,8 +449,6 @@ } } } - - UMA_HISTOGRAM_BOOLEAN("Download.InterruptedUnknownSize", unknown_size); } void RecordMaliciousDownloadClassified(DownloadDangerType danger_type) { @@ -496,27 +492,6 @@ } } -void RecordAcceptsRanges(const std::string& accepts_ranges, - int64_t download_len, - bool has_strong_validator) { - int64_t max = 1024 * 1024 * 1024; // One Terabyte. - download_len /= 1024; // In Kilobytes - static const int kBuckets = 50; - - if (base::LowerCaseEqualsASCII(accepts_ranges, "none")) { - UMA_HISTOGRAM_CUSTOM_COUNTS("Download.AcceptRangesNone.KBytes", - download_len, 1, max, kBuckets); - } else if (base::LowerCaseEqualsASCII(accepts_ranges, "bytes")) { - UMA_HISTOGRAM_CUSTOM_COUNTS("Download.AcceptRangesBytes.KBytes", - download_len, 1, max, kBuckets); - if (has_strong_validator) - RecordDownloadCount(STRONG_VALIDATOR_AND_ACCEPTS_RANGES); - } else { - UMA_HISTOGRAM_CUSTOM_COUNTS("Download.AcceptRangesMissingOrInvalid.KBytes", - download_len, 1, max, kBuckets); - } -} - namespace { int GetMimeTypeMatch(const std::string& mime_type_string, @@ -806,19 +781,9 @@ net::HttpContentDisposition::HAS_RFC2047_ENCODED_STRINGS); } -void RecordFileThreadReceiveBuffers(size_t num_buffers) { - UMA_HISTOGRAM_CUSTOM_COUNTS("Download.FileThreadReceiveBuffers", num_buffers, - 1, 100, 100); -} - -void RecordOpen(const base::Time& end, bool first) { - if (!end.is_null()) { +void RecordOpen(const base::Time& end) { + if (!end.is_null()) UMA_HISTOGRAM_LONG_TIMES("Download.OpenTime", (base::Time::Now() - end)); - if (first) { - UMA_HISTOGRAM_LONG_TIMES("Download.FirstOpenTime", - (base::Time::Now() - end)); - } - } } void RecordOpensOutstanding(int size) { @@ -826,32 +791,10 @@ (1 << 10) /*max*/, 64 /*num_buckets*/); } -void RecordContiguousWriteTime(base::TimeDelta time_blocked) { - UMA_HISTOGRAM_TIMES("Download.FileThreadBlockedTime", time_blocked); -} - -// Record what percentage of the time we have the network flow controlled. -void RecordNetworkBlockage(base::TimeDelta resource_handler_lifetime, - base::TimeDelta resource_handler_blocked_time) { - int percentage = 0; - // Avoid division by zero errors. - if (!resource_handler_blocked_time.is_zero()) { - percentage = - resource_handler_blocked_time * 100 / resource_handler_lifetime; - } - - UMA_HISTOGRAM_COUNTS_100("Download.ResourceHandlerBlockedPercentage", - percentage); -} - void RecordFileBandwidth(size_t length, - base::TimeDelta disk_write_time, base::TimeDelta elapsed_time) { RecordBandwidthMetric("Download.BandwidthOverallBytesPerSecond", CalculateBandwidthBytesPerSecond(length, elapsed_time)); - RecordBandwidthMetric( - "Download.BandwidthDiskBytesPerSecond", - CalculateBandwidthBytesPerSecond(length, disk_write_time)); } void RecordParallelizableDownloadCount(DownloadCountTypes type, @@ -984,33 +927,11 @@ ParallelDownloadCreationEvent::COUNT); } -void RecordDownloadFileRenameResultAfterRetry( - base::TimeDelta time_since_first_failure, - DownloadInterruptReason interrupt_reason) { - if (interrupt_reason == DOWNLOAD_INTERRUPT_REASON_NONE) { - UMA_HISTOGRAM_TIMES("Download.TimeToRenameSuccessAfterInitialFailure", - time_since_first_failure); - } else { - UMA_HISTOGRAM_TIMES("Download.TimeToRenameFailureAfterInitialFailure", - time_since_first_failure); - } -} - void RecordSavePackageEvent(SavePackageEvent event) { UMA_HISTOGRAM_ENUMERATION("Download.SavePackage", event, SAVE_PACKAGE_LAST_ENTRY); } -void RecordOriginStateOnResumption(bool is_partial, - OriginStateOnResumption state) { - if (is_partial) - UMA_HISTOGRAM_ENUMERATION("Download.OriginStateOnPartialResumption", state, - ORIGIN_STATE_ON_RESUMPTION_MAX); - else - UMA_HISTOGRAM_ENUMERATION("Download.OriginStateOnFullResumption", state, - ORIGIN_STATE_ON_RESUMPTION_MAX); -} - namespace { // Enumeration for histogramming purposes.
diff --git a/components/download/public/common/download_file_impl.h b/components/download/public/common/download_file_impl.h index 72f6d64..96791e1 100644 --- a/components/download/public/common/download_file_impl.h +++ b/components/download/public/common/download_file_impl.h
@@ -308,7 +308,6 @@ // Statistics size_t bytes_seen_; - base::TimeDelta disk_writes_time_; base::TimeTicks download_start_; RateEstimator rate_estimator_; int num_active_streams_;
diff --git a/components/download/public/common/download_stats.h b/components/download/public/common/download_stats.h index d40169e7..70de9e4 100644 --- a/components/download/public/common/download_stats.h +++ b/components/download/public/common/download_stats.h
@@ -27,7 +27,6 @@ class FilePath; class Time; class TimeDelta; -class TimeTicks; } // namespace base namespace download { @@ -230,7 +229,6 @@ // Record COMPLETED_COUNT and how long the download took. COMPONENTS_DOWNLOAD_EXPORT void RecordDownloadCompleted( - const base::TimeTicks& start, int64_t download_len, bool is_parallelizable, DownloadSource download_source); @@ -281,43 +279,16 @@ COMPONENTS_DOWNLOAD_EXPORT void RecordDownloadContentDisposition( const std::string& content_disposition); -// Record the number of buffers piled up by the IO thread -// before the file thread gets to draining them. -COMPONENTS_DOWNLOAD_EXPORT void RecordFileThreadReceiveBuffers( - size_t num_buffers); - -// Record the time of both the first open and all subsequent opens since the -// download completed. -COMPONENTS_DOWNLOAD_EXPORT void RecordOpen(const base::Time& end, bool first); - -// Record whether or not the server accepts ranges, and the download size. Also -// counts if a strong validator is supplied. The combination of range request -// support and ETag indicates downloads that are candidates for partial -// resumption. -COMPONENTS_DOWNLOAD_EXPORT void RecordAcceptsRanges( - const std::string& accepts_ranges, - int64_t download_len, - bool has_strong_validator); +// Record the time of all opens since the download completed. +COMPONENTS_DOWNLOAD_EXPORT void RecordOpen(const base::Time& end); // Record the number of completed unopened downloads when a download is opened. COMPONENTS_DOWNLOAD_EXPORT void RecordOpensOutstanding(int size); -// Record how long we block the file thread at a time. -COMPONENTS_DOWNLOAD_EXPORT void RecordContiguousWriteTime( - base::TimeDelta time_blocked); - -// Record the percentage of time we had to block the network (i.e. -// how often, for each download, something other than the network -// was the bottleneck). -COMPONENTS_DOWNLOAD_EXPORT void RecordNetworkBlockage( - base::TimeDelta resource_handler_lifetime, - base::TimeDelta resource_handler_blocked_time); - // Record overall bandwidth stats at the file end. // Does not count in any hash computation or file open/close time. COMPONENTS_DOWNLOAD_EXPORT void RecordFileBandwidth( size_t length, - base::TimeDelta disk_write_time, base::TimeDelta elapsed_time); // Records the size of the download from content-length header. @@ -396,13 +367,6 @@ ORIGIN_STATE_ON_RESUMPTION_MAX = 1 << 3 }; -// Record the state of the origin information across a download resumption -// request. |state| is a combination of values from OriginStateOnResumption -// enum. -COMPONENTS_DOWNLOAD_EXPORT void RecordOriginStateOnResumption( - bool is_partial, - OriginStateOnResumption state); - COMPONENTS_DOWNLOAD_EXPORT void RecordDownloadConnectionSecurity( const GURL& download_url, const std::vector<GURL>& url_chain);
diff --git a/components/download/quarantine/quarantine_win.cc b/components/download/quarantine/quarantine_win.cc index f240414..cf724c7 100644 --- a/components/download/quarantine/quarantine_win.cc +++ b/components/download/quarantine/quarantine_win.cc
@@ -36,28 +36,6 @@ const base::FilePath::CharType kZoneIdentifierStreamSuffix[] = FILE_PATH_LITERAL(":Zone.Identifier"); -// UMA enumeration for recording Download.AttachmentServicesResult. -enum class AttachmentServicesResult : int { - SUCCESS_WITH_MOTW = 0, - SUCCESS_WITHOUT_MOTW = 1, - SUCCESS_WITHOUT_FILE = 2, - NO_ATTACHMENT_SERVICES = 3, - FAILED_TO_SET_PARAMETER = 4, - BLOCKED_WITH_FILE = 5, - BLOCKED_WITHOUT_FILE = 6, - INFECTED_WITH_FILE = 7, - INFECTED_WITHOUT_FILE = 8, - ACCESS_DENIED_WITH_FILE = 9, - ACCESS_DENIED_WITHOUT_FILE = 10, - OTHER_WITH_FILE = 11, - OTHER_WITHOUT_FILE = 12, -}; - -void RecordAttachmentServicesResult(AttachmentServicesResult type) { - base::UmaHistogramSparse("Download.AttachmentServices.Result", - static_cast<int>(type)); -} - bool ZoneIdentifierPresentForFile(const base::FilePath& path) { const DWORD kShare = FILE_SHARE_READ | FILE_SHARE_WRITE | FILE_SHARE_DELETE; base::FilePath::StringType zone_identifier_path = @@ -89,50 +67,6 @@ lines[1].find("ZoneId=") == 0; } -void RecordAttachmentServicesSaveResult(const base::FilePath& file, - HRESULT hr) { - bool file_exists = base::PathExists(file); - switch (hr) { - case INET_E_SECURITY_PROBLEM: - RecordAttachmentServicesResult( - file_exists ? AttachmentServicesResult::BLOCKED_WITH_FILE - : AttachmentServicesResult::BLOCKED_WITHOUT_FILE); - break; - - case E_FAIL: - RecordAttachmentServicesResult( - file_exists ? AttachmentServicesResult::INFECTED_WITH_FILE - : AttachmentServicesResult::INFECTED_WITHOUT_FILE); - break; - - case E_ACCESSDENIED: - case ERROR_ACCESS_DENIED: - // ERROR_ACCESS_DENIED is not a valid HRESULT. However, - // IAttachmentExecute::Save() is known to return it and other system error - // codes in practice. - RecordAttachmentServicesResult( - file_exists ? AttachmentServicesResult::ACCESS_DENIED_WITH_FILE - : AttachmentServicesResult::ACCESS_DENIED_WITHOUT_FILE); - break; - - default: - if (SUCCEEDED(hr)) { - bool motw_exists = file_exists && ZoneIdentifierPresentForFile(file); - RecordAttachmentServicesResult( - file_exists ? motw_exists - ? AttachmentServicesResult::SUCCESS_WITH_MOTW - : AttachmentServicesResult::SUCCESS_WITHOUT_MOTW - : AttachmentServicesResult::SUCCESS_WITHOUT_FILE); - return; - } - - // Failure codes. - RecordAttachmentServicesResult( - file_exists ? AttachmentServicesResult::OTHER_WITH_FILE - : AttachmentServicesResult::OTHER_WITHOUT_FILE); - } -} - // Sets the Zone Identifier on the file to "Internet" (3). Returns true if the // function succeeds, false otherwise. A failure is expected if alternate // streams are not supported, like a file on a FAT32 filesystem. This function @@ -205,8 +139,6 @@ if (FAILED(hr)) { // The thread must have COM initialized. DCHECK_NE(CO_E_NOTINITIALIZED, hr); - RecordAttachmentServicesResult( - AttachmentServicesResult::NO_ATTACHMENT_SERVICES); return false; } @@ -215,18 +147,12 @@ // where the final Save() call will also fail. hr = attachment_services->SetClientGuid(client_guid); - if (FAILED(hr)) { - RecordAttachmentServicesResult( - AttachmentServicesResult::FAILED_TO_SET_PARAMETER); + if (FAILED(hr)) return false; - } hr = attachment_services->SetLocalPath(full_path.value().c_str()); - if (FAILED(hr)) { - RecordAttachmentServicesResult( - AttachmentServicesResult::FAILED_TO_SET_PARAMETER); + if (FAILED(hr)) return false; - } // The source URL could be empty if it was not a valid URL, or was not HTTP/S, // or the download was off-the-record. If so, user "about:internet" as a @@ -239,11 +165,8 @@ source_url.empty() || source_url.size() > INTERNET_MAX_URL_LENGTH ? L"about:internet" : base::UTF8ToWide(source_url).c_str()); - if (FAILED(hr)) { - RecordAttachmentServicesResult( - AttachmentServicesResult::FAILED_TO_SET_PARAMETER); + if (FAILED(hr)) return false; - } // Only set referrer if one is present and shorter than // INTERNET_MAX_URL_LENGTH. Also, the source_url is authoritative for @@ -252,11 +175,8 @@ if (!referrer_url.empty() && referrer_url.size() < INTERNET_MAX_URL_LENGTH) { hr = attachment_services->SetReferrer( base::UTF8ToWide(referrer_url).c_str()); - if (FAILED(hr)) { - RecordAttachmentServicesResult( - AttachmentServicesResult::FAILED_TO_SET_PARAMETER); + if (FAILED(hr)) return false; - } } { @@ -265,7 +185,6 @@ SCOPED_UMA_HISTOGRAM_LONG_TIMER("Download.AttachmentServices.Duration"); *save_result = attachment_services->Save(); } - RecordAttachmentServicesSaveResult(full_path, *save_result); return true; }
diff --git a/components/download/quarantine/quarantine_win_unittest.cc b/components/download/quarantine/quarantine_win_unittest.cc index 160f2e4d..4091d3e 100644 --- a/components/download/quarantine/quarantine_win_unittest.cc +++ b/components/download/quarantine/quarantine_win_unittest.cc
@@ -92,10 +92,6 @@ base::DeleteFile(test_file, false); } - - // Bucket 1 is SUCCESS_WITHOUT_MOTW. - histogram_tester.ExpectUniqueSample("Download.AttachmentServices.Result", 1, - arraysize(kLocalSourceURLs)); } // A file downloaded from the internet should be annotated with .. something. @@ -128,10 +124,6 @@ LOG(WARNING) << "Unexpected zone marker: " << motw_contents; base::DeleteFile(test_file, false); } - - // Bucket 0 is SUCCESS_WITH_MOTW. - histogram_tester.ExpectUniqueSample("Download.AttachmentServices.Result", 0, - arraysize(kUntrustedURLs)); } TEST(QuarantineWinTest, UnsafeReferrer_DependsOnLocalConfig) { @@ -167,10 +159,6 @@ LOG(WARNING) << "Unexpected zone marker: " << motw_contents; base::DeleteFile(test_file, false); } - - // Bucket 0 is SUCCESS_WITH_MOTW. - histogram_tester.ExpectUniqueSample("Download.AttachmentServices.Result", 0, - unsafe_referrers.size()); } // An empty source URL should result in a file that's treated the same as one @@ -191,10 +179,6 @@ // The actual assigned zone could be anything. So only testing that there is a // zone annotation. EXPECT_FALSE(motw_contents.empty()); - - // Bucket 0 is SUCCESS_WITH_MOTW. - histogram_tester.ExpectUniqueSample("Download.AttachmentServices.Result", 0, - 1); } // Empty files aren't passed to AVScanFile. They are instead marked manually. If @@ -214,9 +198,6 @@ ASSERT_TRUE(base::ReadFileToString( base::FilePath(test_file.value() + kMotwStreamSuffix), &motw_contents)); EXPECT_STREQ(kMotwForInternetZone, motw_contents.c_str()); - - // Attachment services shouldn't have been invoked at all. - histogram_tester.ExpectTotalCount("Download.AttachmentServices.Result", 0); } // If there is no client GUID supplied to the QuarantineFile() call, then rather
diff --git a/components/feed/core/feed_image_manager.cc b/components/feed/core/feed_image_manager.cc index 59b49609..f4e81e5 100644 --- a/components/feed/core/feed_image_manager.cc +++ b/components/feed/core/feed_image_manager.cc
@@ -7,6 +7,9 @@ #include <utility> #include "base/bind.h" +#include "base/metrics/histogram_macros.h" +#include "base/threading/thread_task_runner_handle.h" +#include "base/timer/elapsed_timer.h" #include "components/feed/core/time_serialization.h" #include "components/image_fetcher/core/image_decoder.h" #include "components/image_fetcher/core/image_fetcher.h" @@ -44,6 +47,9 @@ } })"); +void ReportFetchResult(FeedImageFetchResult result) { + UMA_HISTOGRAM_ENUMERATION("NewTabPage.Feed.ImageFetchResult", result); +} } // namespace FeedImageManager::FeedImageManager( @@ -72,11 +78,16 @@ ImageFetchedCallback callback) { if (url_index >= urls.size()) { // Already reached the last entry. Return an empty image. - std::move(callback).Run(gfx::Image()); + base::ThreadTaskRunnerHandle::Get()->PostTask( + FROM_HERE, base::BindOnce(std::move(callback), gfx::Image())); return; } - std::string image_id = urls[url_index]; + const std::string& image_id = urls[url_index]; + // Only take the first instance of the url so we get the worst-case time. + if (url_timers_.find(image_id) == url_timers_.end()) { + url_timers_.insert(std::make_pair(image_id, base::ElapsedTimer())); + } image_database_->LoadImage( image_id, base::BindOnce(&FeedImageManager::OnImageFetchedFromDatabase, weak_ptr_factory_.GetWeakPtr(), url_index, @@ -105,21 +116,37 @@ std::vector<std::string> urls, ImageFetchedCallback callback, const gfx::Image& image) { + const std::string& image_id = urls[url_index]; if (image.IsEmpty()) { // If decoding the image failed, delete the DB entry. - image_database_->DeleteImage(urls[url_index]); + image_database_->DeleteImage(image_id); FetchImageFromNetwork(url_index, std::move(urls), std::move(callback)); return; } - std::move(callback).Run(image); + base::ThreadTaskRunnerHandle::Get()->PostTask( + FROM_HERE, base::BindOnce(std::move(callback), image)); + + // Report success if the url exists. + // This check is for concurrent access to the same url. + if (url_timers_.find(image_id) != url_timers_.end()) { + UMA_HISTOGRAM_TIMES("NewTabPage.Feed.ImageLoadFromCacheTime", + url_timers_[image_id].Elapsed()); + ClearUmaTimer(image_id); + ReportFetchResult(FeedImageFetchResult::kSuccessCached); + } } void FeedImageManager::FetchImageFromNetwork(size_t url_index, std::vector<std::string> urls, ImageFetchedCallback callback) { - GURL url(urls[url_index]); + const std::string& image_id = urls[url_index]; + GURL url(image_id); if (!url.is_valid()) { + // Report failure. + ReportFetchResult(FeedImageFetchResult::kFailure); + ClearUmaTimer(image_id); + // url is not valid, go to next URL. FetchImagesFromDatabase(url_index + 1, std::move(urls), std::move(callback)); @@ -141,6 +168,10 @@ const std::string& image_data, const image_fetcher::RequestMetadata& request_metadata) { if (image_data.empty()) { + // Report failure. + ReportFetchResult(FeedImageFetchResult::kFailure); + ClearUmaTimer(urls[url_index]); + // Fetching image failed, let's move to the next url. FetchImagesFromDatabase(url_index + 1, std::move(urls), std::move(callback)); @@ -160,15 +191,31 @@ ImageFetchedCallback callback, const std::string& image_data, const gfx::Image& image) { - // Decoding urls[url_index] failed, let's move to the next url. + std::string image_id = urls[url_index]; if (image.IsEmpty()) { + // Report failure. + ReportFetchResult(FeedImageFetchResult::kFailure); + ClearUmaTimer(image_id); + + // Decoding failed, let's move to the next url. FetchImagesFromDatabase(url_index + 1, std::move(urls), std::move(callback)); return; } - image_database_->SaveImage(urls[url_index], image_data); - std::move(callback).Run(image); + image_database_->SaveImage(image_id, image_data); + + base::ThreadTaskRunnerHandle::Get()->PostTask( + FROM_HERE, base::BindOnce(std::move(callback), image)); + + // Report success if the url exists. + // This check is for concurrent access to the same url. + if (url_timers_.find(image_id) != url_timers_.end()) { + UMA_HISTOGRAM_TIMES("NewTabPage.Feed.ImageLoadFromNetworkTime", + url_timers_[image_id].Elapsed()); + ClearUmaTimer(image_id); + ReportFetchResult(FeedImageFetchResult::kSuccessFetched); + } } void FeedImageManager::DoGarbageCollectionIfNeeded() { @@ -204,4 +251,8 @@ garbage_collection_timer_.Stop(); } +void FeedImageManager::ClearUmaTimer(const std::string& url) { + url_timers_.erase(url); +} + } // namespace feed
diff --git a/components/feed/core/feed_image_manager.h b/components/feed/core/feed_image_manager.h index 13af33b..a9681ced 100644 --- a/components/feed/core/feed_image_manager.h +++ b/components/feed/core/feed_image_manager.h
@@ -9,10 +9,15 @@ #include <string> #include <vector> +#include "base/containers/flat_map.h" #include "base/memory/weak_ptr.h" #include "base/timer/timer.h" #include "components/feed/core/feed_image_database.h" +namespace base { +class ElapsedTimer; +} // namespace base + namespace gfx { class Image; } // namespace gfx @@ -26,6 +31,15 @@ using ImageFetchedCallback = base::OnceCallback<void(const gfx::Image&)>; +// Enum for the result of the fetch, reported through UMA. +// New values should be added at the end and things should not be renumbered. +enum class FeedImageFetchResult { + kSuccessCached = 0, + kSuccessFetched = 1, + kFailure = 2, + kMaxValue = kFailure, +}; + // FeedImageManager takes care of fetching images from the network and caching // them in the database. class FeedImageManager { @@ -84,6 +98,8 @@ void OnGarbageCollectionDone(base::Time garbage_collected_day, bool success); void StopGarbageCollection(); + void ClearUmaTimer(const std::string& url); + // The day which image database already ran garbage collection against on. base::Time image_garbage_collected_day_; @@ -92,6 +108,9 @@ std::unique_ptr<image_fetcher::ImageFetcher> image_fetcher_; std::unique_ptr<FeedImageDatabase> image_database_; + // Track time it takes to get images. + base::flat_map<std::string, base::ElapsedTimer> url_timers_; + base::WeakPtrFactory<FeedImageManager> weak_ptr_factory_; DISALLOW_COPY_AND_ASSIGN(FeedImageManager);
diff --git a/components/feed/core/feed_image_manager_unittest.cc b/components/feed/core/feed_image_manager_unittest.cc index 2631540..35eb596 100644 --- a/components/feed/core/feed_image_manager_unittest.cc +++ b/components/feed/core/feed_image_manager_unittest.cc
@@ -11,6 +11,7 @@ #include "base/bind.h" #include "base/files/scoped_temp_dir.h" +#include "base/test/metrics/histogram_tester.h" #include "base/test/mock_callback.h" #include "base/test/scoped_task_environment.h" #include "base/threading/sequenced_task_runner_handle.h" @@ -24,6 +25,7 @@ #include "ui/gfx/image/image.h" #include "ui/gfx/image/image_unittest_util.h" +using base::HistogramTester; using testing::_; namespace feed { @@ -34,6 +36,13 @@ const char kImageData[] = "pie image"; const char kImageData2[] = "cake image"; +const char kUmaImageLoadSuccessHistogramName[] = + "NewTabPage.Feed.ImageFetchResult"; +const char kUmaCacheLoadHistogramName[] = + "NewTabPage.Feed.ImageLoadFromCacheTime"; +const char kUmaNetworkLoadHistogramName[] = + "NewTabPage.Feed.ImageLoadFromNetworkTime"; + class FakeImageDecoder : public image_fetcher::ImageDecoder { public: void DecodeImage( @@ -116,6 +125,8 @@ return &test_url_loader_factory_; } + HistogramTester& histogram() { return histogram_; } + MOCK_METHOD1(OnImageLoaded, void(const std::string&)); private: @@ -126,6 +137,7 @@ base::ScopedTempDir database_dir_; FakeImageDecoder* fake_image_decoder_; base::test::ScopedTaskEnvironment scoped_task_environment_; + HistogramTester histogram_; DISALLOW_COPY_AND_ASSIGN(FeedImageManagerTest); }; @@ -260,4 +272,83 @@ EXPECT_TRUE(garbage_collection_timer().IsRunning()); } +TEST_F(FeedImageManagerTest, InvalidUrlHistogramFailure) { + base::MockCallback<ImageFetchedCallback> image_callback; + feed_image_manager()->FetchImage(std::vector<std::string>({""}), + image_callback.Get()); + + RunUntilIdle(); + + histogram().ExpectTotalCount(kUmaCacheLoadHistogramName, 0); + histogram().ExpectTotalCount(kUmaNetworkLoadHistogramName, 0); + histogram().ExpectTotalCount(kUmaImageLoadSuccessHistogramName, 1); + histogram().ExpectBucketCount(kUmaImageLoadSuccessHistogramName, + FeedImageFetchResult::kFailure, 1); +} + +TEST_F(FeedImageManagerTest, FetchImageFromCachHistogram) { + // Save the image in the database. + image_database()->SaveImage(kImageURL, kImageData); + RunUntilIdle(); + + base::MockCallback<ImageFetchedCallback> image_callback; + feed_image_manager()->FetchImage(std::vector<std::string>({kImageURL}), + image_callback.Get()); + + RunUntilIdle(); + + histogram().ExpectTotalCount(kUmaCacheLoadHistogramName, 1); + histogram().ExpectTotalCount(kUmaNetworkLoadHistogramName, 0); + histogram().ExpectTotalCount(kUmaImageLoadSuccessHistogramName, 1); + histogram().ExpectBucketCount(kUmaImageLoadSuccessHistogramName, + FeedImageFetchResult::kSuccessCached, 1); +} + +TEST_F(FeedImageManagerTest, FetchImageFromNetworkHistogram) { + test_url_loader_factory()->AddResponse(kImageURL, kImageData); + base::MockCallback<ImageFetchedCallback> image_callback; + feed_image_manager()->FetchImage(std::vector<std::string>({kImageURL}), + image_callback.Get()); + + RunUntilIdle(); + + histogram().ExpectTotalCount(kUmaCacheLoadHistogramName, 0); + histogram().ExpectTotalCount(kUmaNetworkLoadHistogramName, 1); + histogram().ExpectTotalCount(kUmaImageLoadSuccessHistogramName, 1); + histogram().ExpectBucketCount(kUmaImageLoadSuccessHistogramName, + FeedImageFetchResult::kSuccessFetched, 1); +} + +TEST_F(FeedImageManagerTest, FetchImageFromNetworkEmptyHistogram) { + test_url_loader_factory()->AddResponse(kImageURL, ""); + base::MockCallback<ImageFetchedCallback> image_callback; + feed_image_manager()->FetchImage(std::vector<std::string>({kImageURL}), + image_callback.Get()); + + RunUntilIdle(); + + histogram().ExpectTotalCount(kUmaCacheLoadHistogramName, 0); + histogram().ExpectTotalCount(kUmaNetworkLoadHistogramName, 0); + histogram().ExpectTotalCount(kUmaImageLoadSuccessHistogramName, 1); + histogram().ExpectBucketCount(kUmaImageLoadSuccessHistogramName, + FeedImageFetchResult::kFailure, 1); +} + +TEST_F(FeedImageManagerTest, NetworkDecodingErrorHistogram) { + test_url_loader_factory()->AddResponse(kImageURL, kImageData); + fake_image_decoder()->SetDecodingValid(false); + + base::MockCallback<ImageFetchedCallback> image_callback; + feed_image_manager()->FetchImage(std::vector<std::string>({kImageURL}), + image_callback.Get()); + + RunUntilIdle(); + + histogram().ExpectTotalCount(kUmaCacheLoadHistogramName, 0); + histogram().ExpectTotalCount(kUmaNetworkLoadHistogramName, 0); + histogram().ExpectTotalCount(kUmaImageLoadSuccessHistogramName, 1); + histogram().ExpectBucketCount(kUmaImageLoadSuccessHistogramName, + FeedImageFetchResult::kFailure, 1); +} + } // namespace feed
diff --git a/components/gcm_driver/account_tracker.cc b/components/gcm_driver/account_tracker.cc index 83ba3fa..d95e936 100644 --- a/components/gcm_driver/account_tracker.cc +++ b/components/gcm_driver/account_tracker.cc
@@ -226,7 +226,8 @@ access_token_fetcher_ = identity_manager_->CreateAccessTokenFetcherForAccount( account_key_, "gaia_account_tracker", scopes, base::BindOnce(&AccountIdFetcher::AccessTokenFetched, - base::Unretained(this))); + base::Unretained(this)), + identity::AccessTokenFetcher::Mode::kImmediate); } void AccountIdFetcher::AccessTokenFetched(
diff --git a/components/gcm_driver/gcm_account_tracker.cc b/components/gcm_driver/gcm_account_tracker.cc index bf13a09..fc182cb 100644 --- a/components/gcm_driver/gcm_account_tracker.cc +++ b/components/gcm_driver/gcm_account_tracker.cc
@@ -307,7 +307,8 @@ account_iter->first, kGCMAccountTrackerName, scopes, base::BindOnce( &GCMAccountTracker::OnAccessTokenFetchCompleteForAccount, - base::Unretained(this), account_iter->first)); + base::Unretained(this), account_iter->first), + identity::AccessTokenFetcher::Mode::kImmediate); DCHECK(pending_token_requests_.count(account_iter->first) == 0); pending_token_requests_.emplace(account_iter->first,
diff --git a/components/history/core/browser/download_database.cc b/components/history/core/browser/download_database.cc index 07f59dd5..938b437 100644 --- a/components/history/core/browser/download_database.cc +++ b/components/history/core/browser/download_database.cc
@@ -413,7 +413,6 @@ } void DownloadDatabase::QueryDownloads(std::vector<DownloadRow>* results) { - SCOPED_UMA_HISTOGRAM_TIMER("Download.Database.QueryDownloadDuration"); EnsureInProgressEntriesCleanedUp(); results->clear(); @@ -488,11 +487,7 @@ } else if (info->danger_type == DownloadDangerType::INVALID) { dropped_reason = DROPPED_REASON_BAD_DANGER_TYPE; } - if (dropped_reason != DROPPED_REASON_MAX) { - UMA_HISTOGRAM_ENUMERATION("Download.DatabaseRecordDropped", - dropped_reason, - DROPPED_REASON_MAX + 1); - } else { + if (dropped_reason == DROPPED_REASON_MAX) { DCHECK(!base::ContainsKey(info_map, info->id)); uint32_t id = info->id; info_map[id] = info.release(); @@ -559,7 +554,6 @@ bool DownloadDatabase::UpdateDownload(const DownloadRow& data) { // UpdateDownload() is called fairly frequently. - SCOPED_UMA_HISTOGRAM_TIMER("Download.Database.UpdateDownloadDuration"); EnsureInProgressEntriesCleanedUp(); DCHECK_NE(kInvalidDownloadId, data.id); @@ -644,7 +638,6 @@ bool DownloadDatabase::CreateDownload(const DownloadRow& info) { DCHECK_NE(kInvalidDownloadId, info.id); DCHECK(!info.guid.empty()); - SCOPED_UMA_HISTOGRAM_TIMER("Download.Database.CreateDownloadDuration"); EnsureInProgressEntriesCleanedUp(); if (info.url_chain.empty())
diff --git a/components/history/core/browser/history_backend.cc b/components/history/core/browser/history_backend.cc index 11bdcca7..582b1e5 100644 --- a/components/history/core/browser/history_backend.cc +++ b/components/history/core/browser/history_backend.cc
@@ -1281,8 +1281,6 @@ if (downloads_count_after > downloads_count_before) return; size_t num_downloads_deleted = downloads_count_before - downloads_count_after; - UMA_HISTOGRAM_COUNTS("Download.DatabaseRemoveDownloadsCount", - num_downloads_deleted); DCHECK_GE(ids.size(), num_downloads_deleted); }
diff --git a/components/invalidation/impl/profile_identity_provider.cc b/components/invalidation/impl/profile_identity_provider.cc index a2697bd2..f0bd9dc 100644 --- a/components/invalidation/impl/profile_identity_provider.cc +++ b/components/invalidation/impl/profile_identity_provider.cc
@@ -43,7 +43,8 @@ access_token_fetcher_ = identity_manager->CreateAccessTokenFetcherForAccount( active_account_id, oauth_consumer_name, scopes, base::BindOnce(&AccessTokenFetcherAdaptor::HandleTokenRequestCompletion, - base::Unretained(this))); + base::Unretained(this)), + identity::AccessTokenFetcher::Mode::kImmediate); } void AccessTokenFetcherAdaptor::HandleTokenRequestCompletion(
diff --git a/components/json_schema/json_schema_validator.cc b/components/json_schema/json_schema_validator.cc index 7a6daba..d06a3df 100644 --- a/components/json_schema/json_schema_validator.cc +++ b/components/json_schema/json_schema_validator.cc
@@ -106,6 +106,9 @@ const base::DictionaryValue* dictionary_value = nullptr; std::string string_value; + const base::ListValue* required_properties_value = nullptr; + const base::DictionaryValue* properties_value = nullptr; + for (base::DictionaryValue::Iterator it(*dict); !it.IsAtEnd(); it.Advance()) { // Validate the "type" attribute, which may be a string or a list. if (it.key() == schema::kType) { @@ -195,8 +198,8 @@ // Validate the "properties" attribute. Each entry maps a key to a schema. if (it.key() == schema::kProperties) { - it.value().GetAsDictionary(&dictionary_value); - for (base::DictionaryValue::Iterator iter(*dictionary_value); + it.value().GetAsDictionary(&properties_value); + for (base::DictionaryValue::Iterator iter(*properties_value); !iter.IsAtEnd(); iter.Advance()) { if (!iter.value().GetAsDictionary(&dictionary_value)) { *error = "properties must be a dictionary"; @@ -239,14 +242,12 @@ // Validate "required" attribute. if (it.key() == schema::kRequired) { - it.value().GetAsList(&list_value); - for (const base::Value& value : *list_value) { + it.value().GetAsList(&required_properties_value); + for (const base::Value& value : *required_properties_value) { if (value.type() != base::Value::Type::STRING) { *error = "Invalid value in 'required' attribute"; return false; } - // TODO(crbug.com/856903): Check that |value| is a key in - // schema::kProperties } } @@ -296,6 +297,18 @@ has_type_or_ref = true; } + // Check that properties in'required' are in the 'properties' object. + if (required_properties_value) { + for (const base::Value& value : required_properties_value->GetList()) { + const std::string& name = value.GetString(); + if (!properties_value || !properties_value->HasKey(name)) { + *error = "Property '" + name + + "' was listed in 'required', but not defined in 'properties'."; + return false; + } + } + } + if (!has_type_or_ref) { *error = "Schema must have a type or a $ref attribute"; return false;
diff --git a/components/json_schema/json_schema_validator_unittest.cc b/components/json_schema/json_schema_validator_unittest.cc index b1559536..0ee730a 100644 --- a/components/json_schema/json_schema_validator_unittest.cc +++ b/components/json_schema/json_schema_validator_unittest.cc
@@ -174,4 +174,30 @@ })", 0, &error)) << error; + + EXPECT_FALSE(JSONSchemaValidator::IsValidSchema(R"( + { + "type": "object", + "properties": {"foo": {"type": "number"}}, + "required": ["bar"] + })", + 0, &error)) + << error; + + EXPECT_FALSE(JSONSchemaValidator::IsValidSchema(R"( + { + "type": "object", + "required": ["bar"] + })", + 0, &error)) + << error; + + EXPECT_TRUE(JSONSchemaValidator::IsValidSchema(R"( + { + "type": "object", + "properties": {"foo": {"type": "number"}}, + "required": ["foo"] + })", + 0, &error)) + << error; }
diff --git a/components/leveldb_proto/leveldb_database.cc b/components/leveldb_proto/leveldb_database.cc index 6a683350..fd88e7f 100644 --- a/components/leveldb_proto/leveldb_database.cc +++ b/components/leveldb_proto/leveldb_database.cc
@@ -10,6 +10,7 @@ #include "base/files/file_path.h" #include "base/files/file_util.h" #include "base/metrics/histogram.h" +#include "base/strings/string_number_conversions.h" #include "base/strings/string_split.h" #include "base/threading/thread_checker.h" #include "third_party/leveldatabase/env_chromium.h" @@ -24,6 +25,13 @@ namespace leveldb_proto { +namespace { + +// Covers 8MB block cache, +const int kMaxApproxMemoryUseMB = 16; + +} // namespace + LevelDB::LevelDB(const char* client_name) : open_histogram_(nullptr), destroy_histogram_(nullptr) { // Used in lieu of UMA_HISTOGRAM_ENUMERATION because the histogram name is @@ -36,6 +44,10 @@ std::string("LevelDB.Destroy.") + client_name, 1, leveldb_env::LEVELDB_STATUS_MAX, leveldb_env::LEVELDB_STATUS_MAX + 1, base::Histogram::kUmaTargetedHistogramFlag); + approx_mem_histogram_ = base::LinearHistogram::FactoryGet( + std::string("LevelDB.ApproximateMemoryUse.") + client_name, 1, + kMaxApproxMemoryUseMB * 1048576, kMaxApproxMemoryUseMB * 4, + base::Histogram::kUmaTargetedHistogramFlag); } LevelDB::~LevelDB() { @@ -48,7 +60,8 @@ database_dir_ = database_dir; open_options_ = options; - if (database_dir.empty()) { + bool in_mem = database_dir.empty(); + if (in_mem) { env_ = leveldb_chrome::NewMemEnv("LevelDB"); open_options_.env = env_.get(); } @@ -66,8 +79,20 @@ // the meaning of corruptions/open which is an important statistic. } - if (status.ok()) + if (status.ok()) { + if (!in_mem) { + // Record the approximate memory usage of this DB right after init. + // This should just be the size of the MemTable since we haven't done any + // reads/writes and the block cache should be empty. + uint64_t approx_mem = 0; + std::string usage_string; + if (db_->GetProperty("leveldb.approximate-memory-usage", &usage_string) && + base::StringToUint64(usage_string, &approx_mem)) { + approx_mem_histogram_->Add(approx_mem); + } + } return true; + } LOG(WARNING) << "Unable to open " << database_dir.value() << ": " << status.ToString();
diff --git a/components/leveldb_proto/leveldb_database.h b/components/leveldb_proto/leveldb_database.h index a0476b2..6cc94e3 100644 --- a/components/leveldb_proto/leveldb_database.h +++ b/components/leveldb_proto/leveldb_database.h
@@ -73,6 +73,7 @@ leveldb_env::Options open_options_; base::HistogramBase* open_histogram_; base::HistogramBase* destroy_histogram_; + base::HistogramBase* approx_mem_histogram_; DISALLOW_COPY_AND_ASSIGN(LevelDB); };
diff --git a/components/metrics/metrics_upload_scheduler.cc b/components/metrics/metrics_upload_scheduler.cc index 457a725..b7b7364 100644 --- a/components/metrics/metrics_upload_scheduler.cc +++ b/components/metrics/metrics_upload_scheduler.cc
@@ -21,10 +21,10 @@ // longer before sending the next log. This backoff process helps reduce load // on a server that is having issues. // The following is the multiplier we use to expand that inter-log duration. -const double kBackoffMultiplier = 1.1; +const double kBackoffMultiplier = 2; -// The maximum backoff interval in minutes. -const int kMaxBackoffIntervalMinutes = 10; +// The maximum backoff interval in hours. +const int kMaxBackoffIntervalHours = 24; // Minutes to wait if we are unable to upload due to data usage cap. const int kOverDataUsageIntervalMinutes = 5; @@ -37,7 +37,7 @@ kBackoffMultiplier * interval.InMicroseconds())); base::TimeDelta max_interval = - base::TimeDelta::FromMinutes(kMaxBackoffIntervalMinutes); + base::TimeDelta::FromHours(kMaxBackoffIntervalHours); if (interval > max_interval || interval.InSeconds() < 0) { interval = max_interval; } @@ -51,9 +51,9 @@ return base::TimeDelta::FromSeconds(3); } -// Inital time delay after a log uploaded fails before retrying it. +// Initial time delay after a log uploaded fails before retrying it. base::TimeDelta GetInitialBackoffInterval() { - return base::TimeDelta::FromSeconds(15); + return base::TimeDelta::FromMinutes(5); } } // namespace
diff --git a/components/optimization_guide/BUILD.gn b/components/optimization_guide/BUILD.gn index 9ea1759..ea59dec 100644 --- a/components/optimization_guide/BUILD.gn +++ b/components/optimization_guide/BUILD.gn
@@ -9,6 +9,8 @@ "optimization_guide_service.cc", "optimization_guide_service.h", "optimization_guide_service_observer.h", + "url_pattern_with_wildcards.cc", + "url_pattern_with_wildcards.h", ] deps = [ @@ -35,6 +37,7 @@ testonly = true sources = [ "optimization_guide_service_unittest.cc", + "url_pattern_with_wildcards_unittest.cc", ] deps = [
diff --git a/components/optimization_guide/url_pattern_with_wildcards.cc b/components/optimization_guide/url_pattern_with_wildcards.cc new file mode 100644 index 0000000..0e292c0 --- /dev/null +++ b/components/optimization_guide/url_pattern_with_wildcards.cc
@@ -0,0 +1,78 @@ +// 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 "components/optimization_guide/url_pattern_with_wildcards.h" + +#include "base/logging.h" +#include "base/macros.h" + +namespace { + +// Splits |url_pattern| by wildcard, and returns the split patterns. +std::vector<std::string> SplitURLPattern(const std::string& url_pattern) { + std::vector<std::string> split_subpatterns; + size_t search_start_pos = 0; + while (true) { + size_t next_wildcard_pos = url_pattern.find('*', search_start_pos); + if (next_wildcard_pos == std::string::npos) { + // Add rest of the |url_pattern|, and return. + split_subpatterns.push_back(url_pattern.substr(search_start_pos)); + return split_subpatterns; + } + if (next_wildcard_pos == search_start_pos) { + // Skip empty subpatterns. This catches any explicit wildcards at the + // front and back, as well as repeated consecutive wildcards. + search_start_pos++; + continue; + } + // Add the subpattern from |search_start_pos| (inclusive) to + // |next_wildcard_pos| (not inclusive). + split_subpatterns.push_back(url_pattern.substr( + search_start_pos, next_wildcard_pos - search_start_pos)); + search_start_pos = next_wildcard_pos + 1; + } + return split_subpatterns; +} + +} // namespace + +namespace optimization_guide { + +URLPatternWithWildcards::URLPatternWithWildcards(const std::string& url_pattern) + : split_subpatterns_(SplitURLPattern(url_pattern)) { + DCHECK(!url_pattern.empty()); + DCHECK(!split_subpatterns_.empty()); +} + +URLPatternWithWildcards::~URLPatternWithWildcards() = default; + +bool URLPatternWithWildcards::Matches(const std::string& url_string) const { + // Determine if |url_string| matches |this| pattern. This determination is + // made by searching all the subpatterns in |split_subpatterns_| while + // traversing |url_string| . If all the subpatterns in |split_subpatterns_| + // are found in |url_string|, then it's a match. + + // Note that each of the subpattern belonging in |split_subpatterns_| should + // be located in |url_string| after the location of the previous subpattern. + // + // Example: If |split_subpatterns_| is {"example.com", "foo"}, and + // |url_string| is example.com/pages/foo.jpg, then first "example.com" is + // searched in |url_string| beginning at index 0. Then, "foo" is searched in + // |url_string| beginning at index 10. + + size_t search_start_pos = 0; + for (const auto& subpattern : split_subpatterns_) { + DCHECK_GE(url_string.length(), search_start_pos); + search_start_pos = url_string.find(subpattern, search_start_pos); + // |url_string| does not match |this| pattern. + if (search_start_pos == std::string::npos) + return false; + // Move the search position for next subpattern to be after where + // |subpattern| ends in |url_string|. + search_start_pos += subpattern.length(); + } + return true; +} + +} // namespace optimization_guide
diff --git a/components/optimization_guide/url_pattern_with_wildcards.h b/components/optimization_guide/url_pattern_with_wildcards.h new file mode 100644 index 0000000..fda9220 --- /dev/null +++ b/components/optimization_guide/url_pattern_with_wildcards.h
@@ -0,0 +1,41 @@ +// 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 COMPONENTS_OPTIMIZATION_GUIDE_URL_PATTERN_WITH_WILDCARDS_H_ +#define COMPONENTS_OPTIMIZATION_GUIDE_URL_PATTERN_WITH_WILDCARDS_H_ + +#include <stddef.h> + +#include <string> +#include <vector> + +#include "base/logging.h" +#include "base/macros.h" + +namespace optimization_guide { + +// URLPatternWithWildcards parses and stores one URL pattern. A URL pattern is a +// single substring to match against a URL. A URL pattern may +// contain multiple wildcard characters ('*'), each of which can match more than +// one character. An implicit wildcard character ('*') is assumed to be present +// at the beginning and end of a pattern. +class URLPatternWithWildcards { + public: + explicit URLPatternWithWildcards(const std::string& url_pattern); + ~URLPatternWithWildcards(); + + // Returns true if |url_string| matches |this| pattern. + bool Matches(const std::string& url_string) const; + + private: + // A single pattern string is split into multiple strings (each separated by + // '*'), and stored in |split_subpatterns_|. + const std::vector<std::string> split_subpatterns_; + + DISALLOW_COPY_AND_ASSIGN(URLPatternWithWildcards); +}; + +} // namespace optimization_guide + +#endif // COMPONENTS_OPTIMIZATION_GUIDE_URL_PATTERN_WITH_WILDCARDS_H_
diff --git a/components/optimization_guide/url_pattern_with_wildcards_unittest.cc b/components/optimization_guide/url_pattern_with_wildcards_unittest.cc new file mode 100644 index 0000000..8cd52ae1 --- /dev/null +++ b/components/optimization_guide/url_pattern_with_wildcards_unittest.cc
@@ -0,0 +1,212 @@ +// 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 "components/optimization_guide/url_pattern_with_wildcards.h" + +#include <string> + +#include "testing/gtest/include/gtest/gtest.h" + +namespace optimization_guide { + +namespace { + +TEST(URLPatternWithWildcardsTest, OnePattern) { + URLPatternWithWildcards url_pattern_with_wildcards("foo.jpg"); + + const struct { + std::string url; + bool expect_matches; + } tests[] = { + {"https://www.example.com/", false}, + {"https://www.example.com/foo.js", false}, + {"https://www.example.com/foo.jpg", true}, + {"https://www.example.com/pages/foo.jpg", true}, + {"https://www.example.com/foobar.jpg", false}, + {"https://www.example.com/barfoo.jpg", true}, + {"http://www.example.com/foo.jpg", true}, + {"http://www.example.com/foo.jpg?q=alpha", true}, + {"http://www.example.com/bar.jpg?q=foo.jpg", true}, + {"http://www.example.com/bar.jpg?q=foo.jpg#foo.jpg", true}, + }; + + for (const auto& test : tests) { + EXPECT_EQ(test.expect_matches, + url_pattern_with_wildcards.Matches(test.url)); + } +} + +TEST(URLPatternWithWildcardsTest, OnePatternWithOneWildcard) { + URLPatternWithWildcards url_pattern_with_wildcards( + "example.com/bar/*/foo.jpg"); + + const struct { + std::string url; + bool expect_matches; + } tests[] = { + {"https://www.example.com/", false}, + {"https://www.example.com/foo.js", false}, + {"https://www.example.com/foo.jpg", false}, + {"https://www.example.com/pages/foo.jpg", false}, + {"https://www.example.com/foobar.jpg", false}, + {"https://www.example.com/barfoo.jpg", false}, + {"http://www.example.com/foo.jpg", false}, + {"http://www.example.com/foo.jpg?q=alpha", false}, + {"http://www.example.com/bar.jpg?q=foo.jpg", false}, + {"http://www.example.com/bar.jpg?q=foo.jpg#foo.jpg", false}, + {"https://www.example.com/bar/foo.jpg", false}, + {"https://www.example.com/bar/pages/foo.jpg", true}, + {"https://www.example.com/bar/main_page/foo.jpg", true}, + {"https://www.example.com/bar/pages/subpages/foo.jpg", true}, + // Try different prefixes. + {"https://m.example.com/bar/main_page/foo.jpg", true}, + {"https://in.example.com/bar/main_page/foo.jpg", true}, + }; + + for (const auto& test : tests) { + EXPECT_EQ(test.expect_matches, + url_pattern_with_wildcards.Matches(test.url)); + } +} + +TEST(URLPatternWithWildcardsTest, OnePatternWithOneWildcardAtEnds) { + URLPatternWithWildcards url_pattern_with_wildcards("*example.com/bar/*"); + + const struct { + std::string url; + bool expect_matches; + } tests[] = { + {"https://www.example.com/", false}, + {"https://www.example.com/foo.js", false}, + {"https://www.example.com/foo.jpg", false}, + {"https://www.example.com/pages/foo.jpg", false}, + {"https://www.example.com/foobar.jpg", false}, + {"https://www.example.com/barfoo.jpg", false}, + {"http://www.example.com/foo.jpg", false}, + {"http://www.example.com/foo.jpg?q=alpha", false}, + {"http://www.example.com/bar.jpg?q=foo.jpg", false}, + {"http://www.example.com/bar.jpg?q=foo.jpg#foo.jpg", false}, + {"https://www.example.com/bar/foo.jpg", true}, + {"https://www.example.com/bar/pages/foo.jpg", true}, + {"https://www.example.com/bar/main_page/foo.jpg", true}, + {"https://www.example.com/bar/pages/subpages/foo.jpg", true}, + // Try different prefixes. + {"https://m.example.com/bar/main_page/foo.jpg", true}, + {"https://in.example.com/bar/main_page/foo.jpg", true}, + }; + + for (const auto& test : tests) { + EXPECT_EQ(test.expect_matches, + url_pattern_with_wildcards.Matches(test.url)); + } +} + +TEST(URLPatternWithWildcardsTest, OnePatternWithOneWildcardAndScheme) { + URLPatternWithWildcards url_pattern_with_wildcards( + "https://www.example.com/bar/*/foo.jpg"); + + const struct { + std::string url; + bool expect_matches; + } tests[] = { + {"https://www.example.com/", false}, + {"https://www.example.com/foo.js", false}, + {"https://www.example.com/foo.jpg", false}, + {"https://www.example.com/pages/foo.jpg", false}, + {"https://www.example.com/foobar.jpg", false}, + {"https://www.example.com/barfoo.jpg", false}, + {"http://www.example.com/foo.jpg", false}, + {"http://www.example.com/foo.jpg?q=alpha", false}, + {"http://www.example.com/bar.jpg?q=foo.jpg", false}, + {"http://www.example.com/bar.jpg?q=foo.jpg#foo.jpg", false}, + {"https://www.example.com/bar/foo.jpg", false}, + {"https://www.example.com/bar/pages/foo.jpg", true}, + {"https://www.example.com/bar/main_page/foo.jpg", true}, + {"https://www.example.com/bar/pages/subpages/foo.jpg", true}, + // Different scheme. + {"http://www.example.com/bar/pages/foo.jpg", false}, + }; + + for (const auto& test : tests) { + EXPECT_EQ(test.expect_matches, + url_pattern_with_wildcards.Matches(test.url)); + } +} + +TEST(URLPatternWithWildcardsTest, OnePatternWithMultipleWildcards) { + URLPatternWithWildcards url_pattern_with_wildcards( + "example.com/bar/*/pages/*/*.jpg"); + + const struct { + std::string url; + bool expect_matches; + } tests[] = { + {"https://www.example.com/", false}, + {"https://www.example.com/foo.js", false}, + {"https://www.example.com/foo.jpg", false}, + {"https://www.example.com/pages/foo.jpg", false}, + {"https://www.example.com/foobar.jpg", false}, + {"https://www.example.com/barfoo.jpg", false}, + {"http://www.example.com/foo.jpg", false}, + {"http://www.example.com/foo.jpg?q=alpha", false}, + {"http://www.example.com/bar.jpg?q=foo.jpg", false}, + {"http://www.example.com/bar.jpg?q=foo.jpg#foo.jpg", false}, + {"https://www.example.com/bar/foo.jpg", false}, + {"https://www.example.com/bar/pages/foo.jpg", false}, + {"https://www.example.com/bar/main_page/foo.jpg", false}, + {"https://www.example.com/bar/pages/subpages/foo.jpg", false}, + {"https://www.example.com/bar/main/pages/document/foo.jpg", true}, + {"https://www.example.com/bar/main/pages/document/foo1.jpg", true}, + {"https://www.example.com/bar/main/pages/document/foo1.js", false}, + // Out-of-order subpatterns. + {"https://cdn.com/pages/www.example.com/bar/document/foo.jpg", false}, + }; + + for (const auto& test : tests) { + EXPECT_EQ(test.expect_matches, + url_pattern_with_wildcards.Matches(test.url)); + } +} + +TEST(URLPatternWithWildcardsTest, + OnePatternWithMultipleWildcardsImplicitSuffix) { + URLPatternWithWildcards url_pattern_with_wildcards( + "example.com/bar/*/pages/"); + + const struct { + std::string url; + bool expect_matches; + } tests[] = { + {"https://www.example.com/", false}, + {"https://www.example.com/foo.js", false}, + {"https://www.example.com/foo.jpg", false}, + {"https://www.example.com/pages/foo.jpg", false}, + {"https://www.example.com/foobar.jpg", false}, + {"https://www.example.com/barfoo.jpg", false}, + {"http://www.example.com/foo.jpg", false}, + {"http://www.example.com/foo.jpg?q=alpha", false}, + {"http://www.example.com/bar.jpg?q=foo.jpg", false}, + {"http://www.example.com/bar.jpg?q=foo.jpg#foo.jpg", false}, + {"https://www.example.com/bar/foo.jpg", false}, + // No gap between "bar" and "pages". + {"https://www.example.com/bar/pages/foo.jpg", false}, + {"https://www.example.com/bar/main_page/foo.jpg", false}, + // No gap between "bar" and "pages". + {"https://www.example.com/bar/pages/subpages/foo.jpg", false}, + {"https://www.example.com/bar/main/pages/document/foo.jpg", true}, + {"https://www.example.com/bar/main/pages/document/foo1.jpg", true}, + {"https://www.example.com/bar/main/pages/document/foo1.js", true}, + // Out-of-order subpatterns. + {"https://cdn.com/pages/www.example.com/bar/document/foo.jpg", false}, + }; + + for (const auto& test : tests) { + EXPECT_EQ(test.expect_matches, url_pattern_with_wildcards.Matches(test.url)) + << " url=" << test.url; + } +} + +} // namespace + +} // namespace optimization_guide
diff --git a/components/password_manager/core/browser/BUILD.gn b/components/password_manager/core/browser/BUILD.gn index 78e400a..ed6b47b 100644 --- a/components/password_manager/core/browser/BUILD.gn +++ b/components/password_manager/core/browser/BUILD.gn
@@ -4,7 +4,7 @@ import("//build/config/jumbo.gni") import("//testing/libfuzzer/fuzzer_test.gni") -import("//third_party/protobuf/proto_library.gni") +import("//third_party/libprotobuf-mutator/fuzzable_proto_library.gni") if (is_android) { import("//build/config/android/config.gni") @@ -34,6 +34,8 @@ "android_affiliation/facet_manager.cc", "android_affiliation/facet_manager.h", "android_affiliation/facet_manager_host.h", + "android_affiliation/lookup_affiliation_response_parser.cc", + "android_affiliation/lookup_affiliation_response_parser.h", "android_affiliation/test_affiliation_fetcher_factory.h", "browser_save_password_progress_logger.cc", "browser_save_password_progress_logger.h", @@ -188,6 +190,7 @@ "//components/autofill/core/browser", "//components/autofill/core/browser/proto", "//components/autofill/core/common", + "//components/favicon/core", "//components/keyed_service/core", "//components/os_crypt", "//components/password_manager/core/browser/form_parsing", @@ -229,7 +232,7 @@ configs += [ "//build/config/compiler:no_size_t_to_int_warning" ] } -proto_library("proto") { +fuzzable_proto_library("proto") { sources = [ "android_affiliation/affiliation_api.proto", ] @@ -426,6 +429,7 @@ "//components/autofill/core/browser:test_support", "//components/autofill/core/browser/proto", "//components/autofill/core/common", + "//components/favicon/core/test:test_support", "//components/os_crypt", "//components/os_crypt:test_support", "//components/password_manager/core/browser:proto", @@ -449,6 +453,7 @@ "//testing/gtest", "//third_party/sqlite", "//ui/base", + "//ui/gfx:test_support", "//url", ] @@ -477,3 +482,17 @@ seed_corpus = "import/password_csv_reader_corpus" dict = "import/password_csv_reader_fuzzer.dict" } + +if (use_libfuzzer) { + fuzzer_test("lookup_affiliation_response_parser_fuzzer") { + sources = [ + "android_affiliation/lookup_affiliation_response_parser_fuzzer.cc", + ] + deps = [ + ":browser", + ":proto", + "//base:base", + "//third_party/libprotobuf-mutator", + ] + } +}
diff --git a/components/password_manager/core/browser/DEPS b/components/password_manager/core/browser/DEPS index 793928ad..dc8e2ac 100644 --- a/components/password_manager/core/browser/DEPS +++ b/components/password_manager/core/browser/DEPS
@@ -1,5 +1,6 @@ include_rules = [ "+components/autofill/core/browser", + "+components/favicon/core", "+components/keyed_service/core", "+components/pref_registry", "+components/security_state",
diff --git a/components/password_manager/core/browser/android_affiliation/affiliation_fetcher.cc b/components/password_manager/core/browser/android_affiliation/affiliation_fetcher.cc index e0daa1a..f3c09a2 100644 --- a/components/password_manager/core/browser/android_affiliation/affiliation_fetcher.cc +++ b/components/password_manager/core/browser/android_affiliation/affiliation_fetcher.cc
@@ -15,6 +15,7 @@ #include "base/metrics/histogram_macros.h" #include "components/password_manager/core/browser/android_affiliation/affiliation_api.pb.h" #include "components/password_manager/core/browser/android_affiliation/affiliation_utils.h" +#include "components/password_manager/core/browser/android_affiliation/lookup_affiliation_response_parser.h" #include "components/password_manager/core/browser/android_affiliation/test_affiliation_fetcher_factory.h" #include "google_apis/google_api_keys.h" #include "net/base/load_flags.h" @@ -168,55 +169,8 @@ if (!response.ParseFromString(serialized_response)) return false; - result->reserve(requested_facet_uris_.size()); - - std::map<FacetURI, size_t> facet_uri_to_class_index; - for (int i = 0; i < response.affiliation_size(); ++i) { - const affiliation_pb::Affiliation& equivalence_class( - response.affiliation(i)); - - AffiliatedFacets affiliated_facets; - for (int j = 0; j < equivalence_class.facet_size(); ++j) { - const affiliation_pb::Facet& facet(equivalence_class.facet(j)); - const std::string& uri_spec(facet.id()); - FacetURI uri = FacetURI::FromPotentiallyInvalidSpec(uri_spec); - // Ignore potential future kinds of facet URIs (e.g. for new platforms). - if (!uri.is_valid()) - continue; - affiliated_facets.push_back( - {uri, FacetBrandingInfo{facet.branding_info().name(), - GURL(facet.branding_info().icon_url())}}); - } - - // Be lenient and ignore empty (after filtering) equivalence classes. - if (affiliated_facets.empty()) - continue; - - // Ignore equivalence classes that are duplicates of earlier ones. However, - // fail in the case of a partial overlap, which violates the invariant that - // affiliations must form an equivalence relation. - for (const Facet& facet : affiliated_facets) { - if (!facet_uri_to_class_index.count(facet.uri)) - facet_uri_to_class_index[facet.uri] = result->size(); - if (facet_uri_to_class_index[facet.uri] != - facet_uri_to_class_index[affiliated_facets[0].uri]) { - return false; - } - } - - // Filter out duplicate equivalence classes in the response. - if (facet_uri_to_class_index[affiliated_facets[0].uri] == result->size()) - result->push_back(affiliated_facets); - } - - // Synthesize an equivalence class (of size one) for each facet that did not - // appear in the server response due to not being affiliated with any others. - for (const FacetURI& uri : requested_facet_uris_) { - if (!facet_uri_to_class_index.count(uri)) - result->push_back({{uri}}); - } - - return true; + return ParseLookupAffiliationResponse(requested_facet_uris_, response, + result); } void AffiliationFetcher::OnSimpleLoaderComplete(
diff --git a/components/password_manager/core/browser/android_affiliation/lookup_affiliation_response_parser.cc b/components/password_manager/core/browser/android_affiliation/lookup_affiliation_response_parser.cc new file mode 100644 index 0000000..8abbf26 --- /dev/null +++ b/components/password_manager/core/browser/android_affiliation/lookup_affiliation_response_parser.cc
@@ -0,0 +1,64 @@ +// 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 "components/password_manager/core/browser/android_affiliation/lookup_affiliation_response_parser.h" + +namespace password_manager { + +bool ParseLookupAffiliationResponse( + const std::vector<FacetURI>& requested_facet_uris, + const affiliation_pb::LookupAffiliationResponse& response, + AffiliationFetcherDelegate::Result* result) { + result->reserve(requested_facet_uris.size()); + + std::map<FacetURI, size_t> facet_uri_to_class_index; + for (int i = 0; i < response.affiliation_size(); ++i) { + const affiliation_pb::Affiliation& equivalence_class( + response.affiliation(i)); + + AffiliatedFacets affiliated_facets; + for (int j = 0; j < equivalence_class.facet_size(); ++j) { + const affiliation_pb::Facet& facet(equivalence_class.facet(j)); + const std::string& uri_spec(facet.id()); + FacetURI uri = FacetURI::FromPotentiallyInvalidSpec(uri_spec); + // Ignore potential future kinds of facet URIs (e.g. for new platforms). + if (!uri.is_valid()) + continue; + affiliated_facets.push_back( + {uri, FacetBrandingInfo{facet.branding_info().name(), + GURL(facet.branding_info().icon_url())}}); + } + + // Be lenient and ignore empty (after filtering) equivalence classes. + if (affiliated_facets.empty()) + continue; + + // Ignore equivalence classes that are duplicates of earlier ones. However, + // fail in the case of a partial overlap, which violates the invariant that + // affiliations must form an equivalence relation. + for (const Facet& facet : affiliated_facets) { + if (!facet_uri_to_class_index.count(facet.uri)) + facet_uri_to_class_index[facet.uri] = result->size(); + if (facet_uri_to_class_index[facet.uri] != + facet_uri_to_class_index[affiliated_facets[0].uri]) { + return false; + } + } + + // Filter out duplicate equivalence classes in the response. + if (facet_uri_to_class_index[affiliated_facets[0].uri] == result->size()) + result->push_back(affiliated_facets); + } + + // Synthesize an equivalence class (of size one) for each facet that did not + // appear in the server response due to not being affiliated with any others. + for (const FacetURI& uri : requested_facet_uris) { + if (!facet_uri_to_class_index.count(uri)) + result->push_back({{uri}}); + } + + return true; +} + +} // namespace password_manager
diff --git a/components/password_manager/core/browser/android_affiliation/lookup_affiliation_response_parser.h b/components/password_manager/core/browser/android_affiliation/lookup_affiliation_response_parser.h new file mode 100644 index 0000000..4efaed9 --- /dev/null +++ b/components/password_manager/core/browser/android_affiliation/lookup_affiliation_response_parser.h
@@ -0,0 +1,26 @@ +// 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 COMPONENTS_PASSWORD_MANAGER_CORE_BROWSER_ANDROID_AFFILIATION_LOOKUP_AFFILIATION_RESPONSE_PARSER_H_ +#define COMPONENTS_PASSWORD_MANAGER_CORE_BROWSER_ANDROID_AFFILIATION_LOOKUP_AFFILIATION_RESPONSE_PARSER_H_ + +#include <stddef.h> + +#include <map> +#include <vector> + +#include "components/password_manager/core/browser/android_affiliation/affiliation_api.pb.h" +#include "components/password_manager/core/browser/android_affiliation/affiliation_fetcher_delegate.h" +#include "components/password_manager/core/browser/android_affiliation/affiliation_utils.h" + +namespace password_manager { + +bool ParseLookupAffiliationResponse( + const std::vector<FacetURI>& requested_facet_uris, + const affiliation_pb::LookupAffiliationResponse& response, + AffiliationFetcherDelegate::Result* result); + +} // namespace password_manager + +#endif // COMPONENTS_PASSWORD_MANAGER_CORE_BROWSER_ANDROID_AFFILIATION_LOOKUP_AFFILIATION_RESPONSE_PARSER_H_
diff --git a/components/password_manager/core/browser/android_affiliation/lookup_affiliation_response_parser_fuzzer.cc b/components/password_manager/core/browser/android_affiliation/lookup_affiliation_response_parser_fuzzer.cc new file mode 100644 index 0000000..b50a6438 --- /dev/null +++ b/components/password_manager/core/browser/android_affiliation/lookup_affiliation_response_parser_fuzzer.cc
@@ -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 <stdlib.h> + +#include "components/password_manager/core/browser/android_affiliation/lookup_affiliation_response_parser.h" +#include "testing/libfuzzer/proto/lpm_interface.h" + +namespace password_manager { +namespace { + +// We run ParseLookupAffiliationResponse twice with two hardcoded vectors of +// FacetURI. This approach can be extended to generating not only +// LookupAffiliationResponse, but also the vector of FacetURI. +// See more details about the fuzzer extending at +// https://crrev.com/c/1131185/1/components/password_manager/core/browser/android_affiliation/lookup_affiliation_response_parser_fuzzer.cc#25 +DEFINE_BINARY_PROTO_FUZZER( + const affiliation_pb::LookupAffiliationResponse& response) { + AffiliationFetcherDelegate::Result result; + + std::vector<FacetURI> uris; + ParseLookupAffiliationResponse(uris, response, &result); + + uris.push_back(FacetURI::FromCanonicalSpec("https://www.example.com")); + ParseLookupAffiliationResponse(uris, response, &result); +} + +} // namespace +} // namespace password_manager
diff --git a/components/password_manager/core/browser/login_database.cc b/components/password_manager/core/browser/login_database.cc index e4d5c5a8..69ee5a7 100644 --- a/components/password_manager/core/browser/login_database.cc +++ b/components/password_manager/core/browser/login_database.cc
@@ -1266,8 +1266,12 @@ DatabaseCleanupResult LoginDatabase::DeleteUndecryptableLogins() { #if defined(OS_MACOSX) && !defined(OS_IOS) // If the Keychain is unavailable, don't delete any logins. - if (!OSCrypt::IsEncryptionAvailable()) + if (!OSCrypt::IsEncryptionAvailable()) { + metrics_util::LogDeleteUndecryptableLoginsReturnValue( + metrics_util::DeleteUndecryptableLoginsReturnValue:: + kEncryptionUnavailable); return DatabaseCleanupResult::kEncryptionUnavailable; + } DCHECK(db_.is_open()); @@ -1299,8 +1303,23 @@ } for (const auto& form : forms_to_be_deleted) { - if (!RemoveLogin(form)) + if (!RemoveLogin(form)) { + metrics_util::LogDeleteUndecryptableLoginsReturnValue( + metrics_util::DeleteUndecryptableLoginsReturnValue::kItemFailure); return DatabaseCleanupResult::kItemFailure; + } + } + + if (forms_to_be_deleted.empty()) { + metrics_util::LogDeleteUndecryptableLoginsReturnValue( + metrics_util::DeleteUndecryptableLoginsReturnValue:: + kSuccessNoDeletions); + } else { + metrics_util::LogDeleteUndecryptableLoginsReturnValue( + metrics_util::DeleteUndecryptableLoginsReturnValue:: + kSuccessLoginsDeleted); + UMA_HISTOGRAM_COUNTS_100("PasswordManager.CleanedUpPasswords", + forms_to_be_deleted.size()); } #endif
diff --git a/components/password_manager/core/browser/login_database_unittest.cc b/components/password_manager/core/browser/login_database_unittest.cc index 8e4ad01..b189ca9 100644 --- a/components/password_manager/core/browser/login_database_unittest.cc +++ b/components/password_manager/core/browser/login_database_unittest.cc
@@ -2061,6 +2061,7 @@ auto form3 = AddDummyLogin("foo3", GURL("https://foo3.com/"), false); LoginDatabase db(database_path()); + base::HistogramTester histogram_tester; ASSERT_TRUE(db.Init()); #if defined(OS_MACOSX) && !defined(OS_IOS) @@ -2076,6 +2077,20 @@ #else EXPECT_EQ(DatabaseCleanupResult::kSuccess, db.DeleteUndecryptableLogins()); #endif + +// Check histograms. +#if defined(OS_MACOSX) && !defined(OS_IOS) + histogram_tester.ExpectUniqueSample("PasswordManager.CleanedUpPasswords", 1, + 1); + histogram_tester.ExpectUniqueSample( + "PasswordManager.DeleteUndecryptableLoginsReturnValue", + metrics_util::DeleteUndecryptableLoginsReturnValue::kSuccessLoginsDeleted, + 1); +#else + EXPECT_TRUE( + histogram_tester.GetAllSamples("PasswordManager.CleanedUpPasswords") + .empty()); +#endif } #if defined(OS_MACOSX) && !defined(OS_IOS) @@ -2085,9 +2100,19 @@ OSCryptMocker::SetBackendLocked(true); LoginDatabase db(database_path()); + base::HistogramTester histogram_tester; ASSERT_TRUE(db.Init()); EXPECT_EQ(DatabaseCleanupResult::kEncryptionUnavailable, db.DeleteUndecryptableLogins()); + + EXPECT_TRUE( + histogram_tester.GetAllSamples("PasswordManager.CleanedUpPasswords") + .empty()); + histogram_tester.ExpectUniqueSample( + "PasswordManager.DeleteUndecryptableLoginsReturnValue", + metrics_util::DeleteUndecryptableLoginsReturnValue:: + kEncryptionUnavailable, + 1); } #endif
diff --git a/components/password_manager/core/browser/password_autofill_manager.cc b/components/password_manager/core/browser/password_autofill_manager.cc index 22512104..bb7a69d9 100644 --- a/components/password_manager/core/browser/password_autofill_manager.cc +++ b/components/password_manager/core/browser/password_autofill_manager.cc
@@ -26,6 +26,7 @@ #include "components/autofill/core/common/autofill_constants.h" #include "components/autofill/core/common/autofill_data_validation.h" #include "components/autofill/core/common/autofill_util.h" +#include "components/favicon/core/favicon_util.h" #include "components/password_manager/core/browser/android_affiliation/affiliation_utils.h" #include "components/password_manager/core/browser/password_manager_client.h" #include "components/password_manager/core/browser/password_manager_driver.h" @@ -81,6 +82,7 @@ void AppendSuggestionIfMatching( const base::string16& field_suggestion, const base::string16& field_contents, + const gfx::Image& custom_icon, const std::string& signon_realm, bool show_all, bool is_password_field, @@ -103,6 +105,9 @@ base::CompareCase::SENSITIVE) ? autofill::Suggestion::PREFIX_MATCH : autofill::Suggestion::SUBSTRING_MATCH; + suggestion.custom_icon = custom_icon; + // The UI code will pick up an icon from the resources based on the string. + suggestion.icon = base::ASCIIToUTF16("globeIcon"); suggestions->push_back(suggestion); } } @@ -114,16 +119,17 @@ // substring or a prefix based on the flag. void GetSuggestions(const autofill::PasswordFormFillData& fill_data, const base::string16& current_username, + const gfx::Image& custom_icon, bool show_all, bool is_password_field, std::vector<autofill::Suggestion>* suggestions) { AppendSuggestionIfMatching( - fill_data.username_field.value, current_username, + fill_data.username_field.value, current_username, custom_icon, fill_data.preferred_realm, show_all, is_password_field, fill_data.password_field.value.size(), suggestions); for (const auto& login : fill_data.additional_logins) { - AppendSuggestionIfMatching(login.first, current_username, + AppendSuggestionIfMatching(login.first, current_username, custom_icon, login.second.realm, show_all, is_password_field, login.second.password.size(), suggestions); } @@ -207,6 +213,7 @@ return; login_to_password_info_[key] = fill_data; + RequestFavicon(fill_data.origin); } void PasswordAutofillManager::OnShowPasswordSuggestions( @@ -223,7 +230,7 @@ NOTREACHED(); return; } - GetSuggestions(fill_data_it->second, typed_username, + GetSuggestions(fill_data_it->second, typed_username, page_favicon_, (options & autofill::SHOW_ALL) != 0, (options & autofill::IS_PASSWORD_FIELD) != 0, &suggestions); @@ -273,14 +280,15 @@ return false; std::vector<autofill::Suggestion> suggestions; GetSuggestions(login_to_password_info_.begin()->second, base::string16(), - true /* show_all */, true /* is_password_field */, - &suggestions); + page_favicon_, true /* show_all */, + true /* is_password_field */, &suggestions); form_data_key_ = login_to_password_info_.begin()->first; // Add 'Generation' option. + // The UI code will pick up an icon from the resources based on the string. autofill::Suggestion suggestion( l10n_util::GetStringUTF8(IDS_PASSWORD_MANAGER_GENERATE_PASSWORD), - std::string(), std::string(), + std::string(), std::string("keyIcon"), autofill::POPUP_ITEM_ID_GENERATE_PASSWORD_ENTRY); suggestions.push_back(suggestion); @@ -304,6 +312,8 @@ void PasswordAutofillManager::DidNavigateMainFrame() { login_to_password_info_.clear(); + favicon_tracker_.TryCancelAll(); + page_favicon_ = gfx::Image(); } bool PasswordAutofillManager::FillSuggestionForTest( @@ -434,4 +444,21 @@ return true; } +void PasswordAutofillManager::RequestFavicon(const GURL& url) { + if (!password_client_) + return; + favicon::GetFaviconImageForPageURL( + password_client_->GetFaviconService(), url, + favicon_base::IconType::kFavicon, + base::BindRepeating(&PasswordAutofillManager::OnFaviconReady, + weak_ptr_factory_.GetWeakPtr()), + &favicon_tracker_); +} + +void PasswordAutofillManager::OnFaviconReady( + const favicon_base::FaviconImageResult& result) { + if (!result.image.IsEmpty()) + page_favicon_ = result.image; +} + } // namespace password_manager
diff --git a/components/password_manager/core/browser/password_autofill_manager.h b/components/password_manager/core/browser/password_autofill_manager.h index 0168e79..b0d5c99 100644 --- a/components/password_manager/core/browser/password_autofill_manager.h +++ b/components/password_manager/core/browser/password_autofill_manager.h
@@ -10,10 +10,16 @@ #include "base/callback.h" #include "base/i18n/rtl.h" #include "base/macros.h" +#include "base/task/cancelable_task_tracker.h" #include "components/autofill/core/browser/autofill_client.h" #include "components/autofill/core/browser/autofill_popup_delegate.h" #include "components/autofill/core/common/password_form_fill_data.h" #include "components/password_manager/core/browser/password_manager_metrics_util.h" +#include "ui/gfx/image/image.h" + +namespace favicon_base { +struct FaviconImageResult; +} namespace gfx { class RectF; @@ -118,13 +124,20 @@ // Finds login information for a |node| that was previously filled. bool FindLoginInfo(int key, autofill::PasswordFormFillData* found_password); - // Creates suggestion and records the metrics for the "Form not secure - // warning". - autofill::Suggestion CreateFormNotSecureWarning(); + // Makes a request to the favicon service for the icon of |url|. + void RequestFavicon(const GURL& url); + + // Called when the favicon was retrieved. When the icon is not ready or + // unavailable a fallback globe icon is used. The request to the favicon + // store is canceled on navigation. + void OnFaviconReady(const favicon_base::FaviconImageResult& result); // The logins we have filled so far with their associated info. LoginToPasswordInfoMap login_to_password_info_; + // Contains the favicon for the credentials offered on the current page. + gfx::Image page_favicon_; + // When the autofill popup should be shown, |form_data_key_| identifies the // right password info in |login_to_password_info_|. int form_data_key_; @@ -139,6 +152,9 @@ // If not null then it will be called in destructor. base::OnceClosure deletion_callback_; + // Used to track a requested favicon. + base::CancelableTaskTracker favicon_tracker_; + base::WeakPtrFactory<PasswordAutofillManager> weak_ptr_factory_; DISALLOW_COPY_AND_ASSIGN(PasswordAutofillManager);
diff --git a/components/password_manager/core/browser/password_autofill_manager_unittest.cc b/components/password_manager/core/browser/password_autofill_manager_unittest.cc index e1a1003..f5a3ba67 100644 --- a/components/password_manager/core/browser/password_autofill_manager_unittest.cc +++ b/components/password_manager/core/browser/password_autofill_manager_unittest.cc
@@ -22,6 +22,7 @@ #include "components/autofill/core/common/autofill_switches.h" #include "components/autofill/core/common/form_field_data.h" #include "components/autofill/core/common/password_form_fill_data.h" +#include "components/favicon/core/test/mock_favicon_service.h" #include "components/password_manager/core/browser/password_manager.h" #include "components/password_manager/core/browser/password_manager_metrics_util.h" #include "components/password_manager/core/browser/stub_password_manager_client.h" @@ -36,6 +37,7 @@ #include "testing/gtest/include/gtest/gtest.h" #include "ui/base/l10n/l10n_util.h" #include "ui/gfx/geometry/rect_f.h" +#include "ui/gfx/image/image_unittest_util.h" #if defined(OS_ANDROID) #include "base/android/build_info.h" @@ -50,10 +52,13 @@ const char kAlicePassword[] = "password"; using autofill::Suggestion; +using autofill::SuggestionVectorIconsAre; using autofill::SuggestionVectorIdsAre; using autofill::SuggestionVectorValuesAre; using autofill::SuggestionVectorLabelsAre; using testing::_; +using testing::ElementsAreArray; +using testing::Return; using UkmEntry = ukm::builders::PageWithPassword; @@ -85,6 +90,7 @@ const GURL& GetMainFrameURL() const override { return main_frame_url_; } MOCK_METHOD0(GeneratePassword, void()); + MOCK_METHOD0(GetFaviconService, favicon::FaviconService*()); private: MockPasswordManagerDriver driver_; @@ -141,6 +147,15 @@ return credentials; } +std::vector<base::string16> GetIconsList(std::vector<std::string> icons) { + std::vector<base::string16> ret(icons.size()); + std::transform(icons.begin(), icons.end(), ret.begin(), &base::ASCIIToUTF16); + // On older Android versions the item "Manage passwords" is absent. + if (!IsPreLollipopAndroid()) + ret.push_back(base::string16()); + return ret; +} + } // namespace class PasswordAutofillManagerTest : public testing::Test { @@ -168,8 +183,16 @@ autofill::AutofillClient* autofill_client) { password_autofill_manager_.reset(new PasswordAutofillManager( client->mock_driver(), autofill_client, client)); + favicon::MockFaviconService favicon_service; + EXPECT_CALL(*client, GetFaviconService()) + .WillOnce(Return(&favicon_service)); + EXPECT_CALL(favicon_service, + GetFaviconImageForPageURL(fill_data_.origin, _, _)); password_autofill_manager_->OnAddPasswordFormMapping(fill_data_id_, fill_data_); + testing::Mock::VerifyAndClearExpectations(client); + // Suppress the warnings in the tests. + EXPECT_CALL(*client, GetFaviconService()).WillRepeatedly(Return(nullptr)); } protected: @@ -240,7 +263,7 @@ fill_data_id(), test_username_)); } -// Test that the popup is marked as visible after recieving password +// Test that the popup is marked as visible after receiving password // suggestions. TEST_F(PasswordAutofillManagerTest, ExternalDelegatePasswordSuggestions) { for (bool is_suggestion_on_password_field : {false, true}) { @@ -257,10 +280,18 @@ data.password_field.value = test_password_; data.preferred_realm = "http://foo.com/"; int dummy_key = 0; + favicon::MockFaviconService favicon_service; + EXPECT_CALL(*client, GetFaviconService()) + .WillOnce(Return(&favicon_service)); + favicon_base::FaviconImageCallback callback; + EXPECT_CALL(favicon_service, GetFaviconImageForPageURL(data.origin, _, _)) + .WillOnce(DoAll(testing::SaveArg<1>(&callback), Return(1))); password_autofill_manager_->OnAddPasswordFormMapping(dummy_key, data); - EXPECT_CALL(*client->mock_driver(), - FillSuggestion(test_username_, test_password_)); + // Resolve the favicon. + favicon_base::FaviconImageResult image_result; + image_result.image = gfx::test::CreateImage(16, 16); + callback.Run(image_result); std::vector<autofill::PopupItemId> ids = { is_suggestion_on_password_field @@ -269,18 +300,25 @@ if (!IsPreLollipopAndroid()) { ids.push_back(autofill::POPUP_ITEM_ID_ALL_SAVED_PASSWORDS_ENTRY); } + std::vector<Suggestion> suggestions; EXPECT_CALL( *autofill_client, ShowAutofillPopup( _, _, SuggestionVectorIdsAre(testing::ElementsAreArray(ids)), false, - _)); + _)) + .WillOnce(testing::SaveArg<2>(&suggestions)); int show_suggestion_options = is_suggestion_on_password_field ? autofill::IS_PASSWORD_FIELD : 0; password_autofill_manager_->OnShowPasswordSuggestions( dummy_key, base::i18n::RIGHT_TO_LEFT, base::string16(), show_suggestion_options, element_bounds); + ASSERT_GE(suggestions.size(), 1u); + EXPECT_TRUE(gfx::test::AreImagesEqual(suggestions[0].custom_icon, + image_result.image)); + EXPECT_CALL(*client->mock_driver(), + FillSuggestion(test_username_, test_password_)); // Accepting a suggestion should trigger a call to hide the popup. EXPECT_CALL(*autofill_client, HideAutofillPopup()); password_autofill_manager_->DidAcceptSuggestion( @@ -757,17 +795,23 @@ data.origin = GURL("https://foo.test"); int dummy_key = 0; + favicon::MockFaviconService favicon_service; + EXPECT_CALL(*client, GetFaviconService()).WillOnce(Return(&favicon_service)); + EXPECT_CALL(favicon_service, GetFaviconImageForPageURL(data.origin, _, _)); password_autofill_manager_->OnAddPasswordFormMapping(dummy_key, data); // Bring up the drop-down with the generaion option. base::string16 generation_string = l10n_util::GetStringUTF16(IDS_PASSWORD_MANAGER_GENERATE_PASSWORD); - EXPECT_CALL(*autofill_client, - ShowAutofillPopup( - element_bounds, base::i18n::RIGHT_TO_LEFT, - SuggestionVectorValuesAre(testing::ElementsAreArray( - GetSuggestionList({test_username_, generation_string}))), - false, _)); + EXPECT_CALL( + *autofill_client, + ShowAutofillPopup( + element_bounds, base::i18n::RIGHT_TO_LEFT, + AllOf(SuggestionVectorValuesAre(ElementsAreArray( + GetSuggestionList({test_username_, generation_string}))), + SuggestionVectorIconsAre( + ElementsAreArray(GetIconsList({"globeIcon", "keyIcon"})))), + false, _)); EXPECT_TRUE( password_autofill_manager_->MaybeShowPasswordSuggestionsWithGeneration( element_bounds, base::i18n::RIGHT_TO_LEFT));
diff --git a/components/password_manager/core/browser/password_manager_client.cc b/components/password_manager/core/browser/password_manager_client.cc index d3cbd3c..533a825c 100644 --- a/components/password_manager/core/browser/password_manager_client.cc +++ b/components/password_manager/core/browser/password_manager_client.cc
@@ -92,4 +92,8 @@ return nullptr; } +favicon::FaviconService* PasswordManagerClient::GetFaviconService() { + return nullptr; +} + } // namespace password_manager
diff --git a/components/password_manager/core/browser/password_manager_client.h b/components/password_manager/core/browser/password_manager_client.h index 9804694..b0838b59 100644 --- a/components/password_manager/core/browser/password_manager_client.h +++ b/components/password_manager/core/browser/password_manager_client.h
@@ -21,6 +21,10 @@ class AutofillManager; } +namespace favicon { +class FaviconService; +} + class GURL; #if defined(SAFE_BROWSING_DB_LOCAL) @@ -257,6 +261,9 @@ // incognito context. Callers should guard against this. virtual PasswordRequirementsService* GetPasswordRequirementsService(); + // Returns the favicon service used to retrieve icons for an origin. + virtual favicon::FaviconService* GetFaviconService(); + // Causes all live PasswordFormManager objects to query the password store // again. Results in updating the fill information on the page. virtual void UpdateFormManagers() {}
diff --git a/components/password_manager/core/browser/password_manager_metrics_util.cc b/components/password_manager/core/browser/password_manager_metrics_util.cc index 5c70bb1..c9a652b 100644 --- a/components/password_manager/core/browser/password_manager_metrics_util.cc +++ b/components/password_manager/core/browser/password_manager_metrics_util.cc
@@ -200,6 +200,12 @@ SubmittedFormFrame::SUBMITTED_FORM_FRAME_COUNT); } +void LogDeleteUndecryptableLoginsReturnValue( + DeleteUndecryptableLoginsReturnValue return_value) { + UMA_HISTOGRAM_ENUMERATION( + "PasswordManager.DeleteUndecryptableLoginsReturnValue", return_value); +} + #if defined(SYNC_PASSWORD_REUSE_DETECTION_ENABLED) void LogSyncPasswordHashChange(SyncPasswordHashChange event) { UMA_HISTOGRAM_ENUMERATION(
diff --git a/components/password_manager/core/browser/password_manager_metrics_util.h b/components/password_manager/core/browser/password_manager_metrics_util.h index d6505e38..bc505680 100644 --- a/components/password_manager/core/browser/password_manager_metrics_util.h +++ b/components/password_manager/core/browser/password_manager_metrics_util.h
@@ -199,6 +199,20 @@ kCredentialManagementAPI }; +// Metrics: PasswordManager.DeleteUndecryptableLoginsReturnValue +enum class DeleteUndecryptableLoginsReturnValue { + // No broken entries were deleted. + kSuccessNoDeletions = 0, + // There were broken entries that were successfully deleted. + kSuccessLoginsDeleted = 1, + // Broken entries were found, but failed to be deleted. + kItemFailure = 2, + // Encryption is unavailable, it's impossible to determine which entries are + // broken. + kEncryptionUnavailable = 3, + kMaxValue = kEncryptionUnavailable, +}; + #if defined(SYNC_PASSWORD_REUSE_DETECTION_ENABLED) enum class SyncPasswordHashChange { SAVED_ON_CHROME_SIGNIN, @@ -358,6 +372,10 @@ // Log a frame of a submitted password form. void LogSubmittedFormFrame(SubmittedFormFrame frame); +// Log a return value of LoginDatabase::DeleteUndecryptableLogins method. +void LogDeleteUndecryptableLoginsReturnValue( + DeleteUndecryptableLoginsReturnValue return_value); + #if defined(SYNC_PASSWORD_REUSE_DETECTION_ENABLED) // Log a save sync password change event. void LogSyncPasswordHashChange(SyncPasswordHashChange event);
diff --git a/components/payments/core/test_payment_manifest_downloader.cc b/components/payments/core/test_payment_manifest_downloader.cc index 902b7b6..86360898 100644 --- a/components/payments/core/test_payment_manifest_downloader.cc +++ b/components/payments/core/test_payment_manifest_downloader.cc
@@ -19,14 +19,26 @@ TestDownloader::~TestDownloader() {} +void TestDownloader::DownloadPaymentMethodManifest( + const GURL& url, + PaymentManifestDownloadCallback callback) { + PaymentManifestDownloader::DownloadPaymentMethodManifest( + FindTestServerURL(url), std::move(callback)); +} + +void TestDownloader::DownloadWebAppManifest( + const GURL& url, + PaymentManifestDownloadCallback callback) { + PaymentManifestDownloader::DownloadWebAppManifest(FindTestServerURL(url), + std::move(callback)); +} + void TestDownloader::AddTestServerURL(const std::string& prefix, const GURL& test_server_url) { test_server_url_[prefix] = test_server_url; } -void TestDownloader::DownloadPaymentMethodManifest( - const GURL& url, - PaymentManifestDownloadCallback callback) { +GURL TestDownloader::FindTestServerURL(const GURL& url) const { GURL actual_url = url; // Find the first key in |test_server_url_| that is a prefix of |url|. If @@ -42,8 +54,7 @@ } } - PaymentManifestDownloader::DownloadPaymentMethodManifest(actual_url, - std::move(callback)); + return actual_url; } } // namespace payments
diff --git a/components/payments/core/test_payment_manifest_downloader.h b/components/payments/core/test_payment_manifest_downloader.h index 473402e..da0aafd 100644 --- a/components/payments/core/test_payment_manifest_downloader.h +++ b/components/payments/core/test_payment_manifest_downloader.h
@@ -56,9 +56,13 @@ void DownloadPaymentMethodManifest( const GURL& url, PaymentManifestDownloadCallback callback) override; + void DownloadWebAppManifest( + const GURL& url, + PaymentManifestDownloadCallback callback) override; // Modifies the downloader to replace all instances of |prefix| with - // |test_server_url| when downloading the payment method manifest. + // |test_server_url| when downloading payment method manifests and web app + // manifests. // // For example, if AddTestServerURL("https://", "https://127.0.0.1:7070") is // called, then all calls to DownloadPaymentMethodManifest(some_url, callback) @@ -92,6 +96,8 @@ void AddTestServerURL(const std::string& prefix, const GURL& test_server_url); private: + GURL FindTestServerURL(const GURL& url) const; + // The mapping from the URL prefix to the URL of the test server to be used. // Example 1: //
diff --git a/components/policy/core/browser/browser_policy_connector_base.cc b/components/policy/core/browser/browser_policy_connector_base.cc index 45d7b22..526ffb4 100644 --- a/components/policy/core/browser/browser_policy_connector_base.cc +++ b/components/policy/core/browser/browser_policy_connector_base.cc
@@ -9,10 +9,10 @@ #include <vector> #include "base/logging.h" +#include "components/policy/core/common/chrome_schema.h" #include "components/policy/core/common/configuration_policy_provider.h" #include "components/policy/core/common/policy_namespace.h" #include "components/policy/core/common/policy_service_impl.h" -#include "components/policy/policy_constants.h" #include "ui/base/resource/resource_bundle.h" namespace policy { @@ -35,10 +35,10 @@ // Initialize the SchemaRegistry with the Chrome schema before creating any // of the policy providers in subclasses. - chrome_schema_ = Schema::Wrap(GetChromeSchemaData()); - handler_list_ = handler_list_factory.Run(chrome_schema_); + const Schema& chrome_schema = policy::GetChromeSchema(); + handler_list_ = handler_list_factory.Run(chrome_schema); schema_registry_.RegisterComponent(PolicyNamespace(POLICY_DOMAIN_CHROME, ""), - chrome_schema_); + chrome_schema); } BrowserPolicyConnectorBase::~BrowserPolicyConnectorBase() { @@ -64,7 +64,7 @@ } const Schema& BrowserPolicyConnectorBase::GetChromeSchema() const { - return chrome_schema_; + return policy::GetChromeSchema(); } CombinedSchemaRegistry* BrowserPolicyConnectorBase::GetSchemaRegistry() {
diff --git a/components/policy/core/browser/browser_policy_connector_base.h b/components/policy/core/browser/browser_policy_connector_base.h index b8fbfe0..3954712 100644 --- a/components/policy/core/browser/browser_policy_connector_base.h +++ b/components/policy/core/browser/browser_policy_connector_base.h
@@ -101,10 +101,6 @@ // Therefore, it's important to destroy |handler_list_| after the providers. std::unique_ptr<ConfigurationPolicyHandlerList> handler_list_; - // The Chrome schema. This wraps the structure generated by - // generate_policy_source.py at compile time. - Schema chrome_schema_; - // The global SchemaRegistry, which will track all the other registries. CombinedSchemaRegistry schema_registry_;
diff --git a/components/policy/core/common/BUILD.gn b/components/policy/core/common/BUILD.gn index 51d7c09..ec5439f 100644 --- a/components/policy/core/common/BUILD.gn +++ b/components/policy/core/common/BUILD.gn
@@ -28,6 +28,8 @@ "async_policy_loader.h", "async_policy_provider.cc", "async_policy_provider.h", + "chrome_schema.cc", + "chrome_schema.h", "cloud/cloud_external_data_manager.cc", "cloud/cloud_external_data_manager.h", "cloud/cloud_policy_client.cc",
diff --git a/components/policy/core/common/chrome_schema.cc b/components/policy/core/common/chrome_schema.cc new file mode 100644 index 0000000..e13ffd4 --- /dev/null +++ b/components/policy/core/common/chrome_schema.cc
@@ -0,0 +1,19 @@ +// Copyright 2013 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#include "components/policy/core/common/chrome_schema.h" + +#include "base/no_destructor.h" +#include "components/policy/core/common/schema.h" +#include "components/policy/policy_constants.h" + +namespace policy { + +const Schema& GetChromeSchema() { + static const base::NoDestructor<Schema> chrome_schema_( + Schema::Wrap(GetChromeSchemaData())); + return *chrome_schema_; +} + +} // namespace policy
diff --git a/components/policy/core/common/chrome_schema.h b/components/policy/core/common/chrome_schema.h new file mode 100644 index 0000000..7db7a29 --- /dev/null +++ b/components/policy/core/common/chrome_schema.h
@@ -0,0 +1,20 @@ +// 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 COMPONENTS_POLICY_CORE_COMMON_CHROME_SCHEMA_H_ +#define COMPONENTS_POLICY_CORE_COMMON_CHROME_SCHEMA_H_ + +#include "components/policy/policy_export.h" + +namespace policy { + +class Schema; + +// Returns the policy Schema generated from policy_templates.json +// Takes up very little memory, never destroyed. +POLICY_EXPORT const Schema& GetChromeSchema(); + +} // namespace policy + +#endif // COMPONENTS_POLICY_CORE_COMMON_CHROME_SCHEMA_H_
diff --git a/components/policy/resources/policy_templates.json b/components/policy/resources/policy_templates.json index 5e6f9cd0..ed73923 100644 --- a/components/policy/resources/policy_templates.json +++ b/components/policy/resources/policy_templates.json
@@ -12677,11 +12677,10 @@ 'name': 'WebRtcEventLogCollectionAllowed', 'type': 'main', 'schema': { 'type': 'boolean' }, + # TODO(crbug.com/775415): Support for ChromeOS as well. 'supported_on': ['chrome.*:70-'], 'features': { - # TODO(crbug.com/775415): Support dynamic refresh, then add support - # for ChromeOS as well. - 'dynamic_refresh': False, + 'dynamic_refresh': True, 'per_profile': True, }, 'example_value': True,
diff --git a/components/policy/resources/policy_templates_bn.xtb b/components/policy/resources/policy_templates_bn.xtb index fe899322..d0a08a2a 100644 --- a/components/policy/resources/policy_templates_bn.xtb +++ b/components/policy/resources/policy_templates_bn.xtb
@@ -315,6 +315,7 @@ <translation id="1914840757300882918">যদি এই নীতি সেট করা হয় তাহলে RemoteAccessHostTokenValidationUrl এ প্রমাণীকরণ করতে ইস্যুকারী প্রতিষ্ঠানের সরবরাহকৃত CN সহ একটি ক্লায়েন্ট শংসাপত্র ব্যবহার করবে। উপলব্ধ যেকোনও ক্লায়েন্ট শংসাপত্র ব্যবহার করতে এটিকে "*" এ সেট করুন। বর্তমানে এই বৈশিষ্ট্যটি সার্ভার-সাইডে অক্ষম রয়েছে।</translation> +<translation id="1920046221095339924">ডিভাইসে ম্যানেজ সেশনের অনুমতি দিন</translation> <translation id="1929709556673267855">ডিভাইসগুলির সাথে সংযুক্ত এন্টারপ্রাইজ প্রিন্টারগুলির জন্য কনফিগারেশন প্রদান করে। এই নীতির মাধ্যমে আপনি <ph name="PRODUCT_OS_NAME" /> ডিভাইসগুলিতে প্রিন্টার কনফিগারেশন প্রদান করতে পারবেন। সাদাতালিকাভুক্তি বা কালোতালিকাভুক্তির জন্য ফর্ম্যাটটি NativePrinters ডিরেক্টরির অনুরূপ, যা প্রতি প্রিন্টারের জন্য একটি অতিরিক্ত "ID" বা "guid" ক্ষেত্র অন্তর্ভুক্ত করে। @@ -348,6 +349,7 @@ আপনি যদি এই সেটিংটি চালু করেন বা কোনও মান সেট না করেন তাহলে ব্যবহারকারী UI-তে ঠিকানার ক্ষেত্রে 'আপনা-আপনি পূরণ হওয়া' ফিচারটি নিয়ন্ত্রণ করতে পারবেন।</translation> <translation id="1960840544413786116">subjectAlternativeName এক্সটেনশান অনুপস্থিত রয়েছে এমন স্থানীয় বিশ্বস্ততা অ্যাঙ্করের দ্বারা জারিকৃত শংসাপত্রগুলিকে অনুমতি দেওয়া হবে কিনা</translation> +<translation id="1962273523772270623">Google পরিষেবা থেকে WebRTC ইভেন্টের লগ সংগ্রহের অনুমতি দিন</translation> <translation id="1964634611280150550">ছদ্মবেশি মোড অক্ষমিত রয়েছে</translation> <translation id="1964802606569741174">Android YouTube অ্যাপ্লিকেশানের উপর এই নীতির কোনো প্রভাব নেই। যদি YouTube এ নিরাপদ মোড বলবৎ করতে হয়, তাহলে Android YouTube অ্যাপ্লিকেশানের ইনস্টলেশন অননুমোদিত করতে হবে।</translation> <translation id="1969212217917526199">দূরবর্তী অ্যাক্সেস হোস্টের ত্রুটিমুক্তকরণ বিল্ডে থাকা নীতিগুলি ওভাররাইড করা হয়। @@ -2335,6 +2337,11 @@ যদি নীতিটি সেট না করে ছেড়ে রাখা হয় বা যদি তালিকাটি খালি থাকে তাহলে <ph name="PRODUCT_NAME" /> এ সমস্ত স্কীম অ্যাক্সেস করা যাবে৷</translation> <translation id="6652197835259177259">স্থানীয়ভাবে পরিচালিত ব্যবহারকারীদের সেটিংস</translation> <translation id="6658245400435704251">প্রথমবার সার্ভারে আপডেট কেনার পর থেকে কোনো ডিভাইস বারবার সেটির আপডেট ডাউনলোডে কত সেকেন্ড পর্যন্ত দেরি করতে পারে সেই সংখ্যা নির্দিষ্ট করে৷ ডিভাইস কিছু সময় দেওয়াল-ঘড়ি-সময়ের শর্তাদিতে এবং অবশিষ্ট সময় আপডেট চেকের সংখ্যার শর্তাদিতে অপেক্ষা করতে পারে৷ যেকোনো ক্ষেত্রে, নিক্ষেপনের উর্দ্ধসীমা একতি স্থির সময়ে আবদ্ধ থাকে যাতে কোনো ডিভাইস কখনও কোনো আপডেট ডাউনলোড করতে আটকে না পড়ে৷</translation> +<translation id="6665599130599311250">নীতিটি 'ফলস'-এ সেট করা থাকলে বা সেট করা না থাকলে, ম্যানেজড গেস্ট সেশন https://support.google.com/chrome/a/answer/3017014-এ ডকুমেন্ট করা স্ট্যান্ডার্ড "সর্বজনীন সেশন"-এর মত আচরণ করবে। + + এই নীতিটি 'ট্রু'-তে সেট করা থাকলে, ম্যানেজড গেস্ট সেশন "ম্যানেজড সেশন"-এর আচরণ নেবে যা সাধারণ "সর্বজনীন সেশন"-এ থাকা অনেক বিধিনিষেধ তুলে দেয়। + + এই নীতিটি সেট করা থাকলে ব্যবহারকারী এটি পরিবর্তন বা ওভাররাইড করতে পারবেন না।</translation> <translation id="6665670272107384733">দ্রুত আনলক ব্যবহার করতে ব্যবহারকারীকে কত সময় পরপর পাসওয়ার্ডটি লিখতে হবে তা সেট করুন</translation> <translation id="6681229465468164801">এমন URL প্যাটার্নের তালিকা সেট করতে দেয়, যেগুলি সেই সমস্ত সাইটকে উল্লেখ করে যেগুলিকে ইউএসবি ডিভাইসে অ্যাক্সেস চাওয়া থেকে ব্লক করা হয়েছে। @@ -2494,6 +2501,17 @@ <translation id="6943577887654905793">Mac/Linux অভিরুচি নাম:</translation> <translation id="69525503251220566">ডিফল্ট সার্চ সরবরাহকারীর জন্য প্যারামিটার ছবি অনুসারে সার্চ বৈশিষ্ট্য প্রদান করছে</translation> <translation id="6956272732789158625">কোনো সাইটকে কী তৈরি করা ব্যবহার করতে মঞ্জুরি দিবেন না</translation> +<translation id="6982028490425791294"> + নীতিটি 'ট্রু'-তে সেট করা থাকলে <ph name="PRODUCT_NAME" /> Google পরিষেবা (যেমন Google Meet) থেকে WebRTC ইভেন্ট লগ সংগ্রহ, এবং সেই লগ Google-এ আপলোড করতে পারবে। + + নীতিটি 'ফলস'-এ সেট করা থাকলে বা সেট না করা থাকলে, <ph name="PRODUCT_NAME" /> কোনও রকম লগ সংগ্রহ বা আপলোড করতে নাও পারে। + + এই লগ সময় এবং RTP প্যাকেট পাঠানো ও গ্রহণ করার সাইজের মতো তথ্য, নেটওয়ার্কের কনজেশন সম্পর্কিত মতামত, অডিও এবং ভিডিও ফ্রেমের সময় এবং কোয়ালিটি সম্পর্কিত মেটাডেটা ইত্যাদির মতো তথ্য রাখে। Chrome-এ অডিও এবং ভিডিও কলের সমস্যা ডিবাগিং করার সময় এই তথ্যটি কাজে লাগে, যেমন ব্যান্ডউইথ মূল্যায়নের সমস্যা, ইত্যাদি। এই লগে অডিও এবং ভিডিও কলের কন্টেন্ট রাখা হয় না। + + এই ডেটা সংগ্রহ শুধুমাত্র Google Hangouts অথবা Google Meet ইত্যাদির মতো Google-এর ওয়েব পরিষেবা দিয়ে ট্রিগার করা যাবে। + + এই লগ Google পরিষেবার মাধ্যমে সংগ্রহ অন্যান্য লগের সাথে সেশন আইডি মাধ্যমে কোনও উপায়ে যুক্ত থাকতে পারে; এর লক্ষ্য হল ডিবাগিং সহজ করে তোলা। + </translation> <translation id="6994082778848658360">দ্বিতীয় পদক্ষেপ প্রমাণীকরণ যদি এই বৈশিষ্ট্যটির সাথে সঙ্গতিপূর্ণ হয়, তাহলে তার জন্য অন-বোর্ড নিরাপদ উপাদান হার্ডওয়্যার কিভাবে ব্যবহার করা হবে, এই নীতি তা নির্দিষ্ট করে। ব্যবহারকারীর শারীরিক উপস্থিতি শনাক্ত করতে মেশিন পাওয়ার বোতাম ব্যবহার করা হয়। 'অক্ষম' বিকল্পটি বেছে নিলে কোনও দ্বিতীয় পদক্ষেপের ব্যবস্থা করা হয় না।
diff --git a/components/policy/resources/policy_templates_hi.xtb b/components/policy/resources/policy_templates_hi.xtb index 7f1fcd93..406f7a7 100644 --- a/components/policy/resources/policy_templates_hi.xtb +++ b/components/policy/resources/policy_templates_hi.xtb
@@ -22,9 +22,9 @@ यदि सत्य पर सेट किया जाता है या सेट किए बिना छोड़ दिया जाता है, तो आंकड़ों की रिपोर्ट की जाएगी.</translation> <translation id="1046484220783400299">बहिष्कृत प्लेटफ़ॉर्म सुविधाओं को सीमित समय के लिए सक्षम करें</translation> <translation id="1047128214168693844">उपयोगकर्ताओं के वास्तविक स्थान पर नज़र रखने के लिए किसी भी साइट को अनुमति न दें</translation> -<translation id="1049138910114524876">उस स्थान-भाषा को कॉन्फ़िगर करती है जिसे <ph name="PRODUCT_OS_NAME" /> साइन इन स्क्रीन पर दिखाया जाता है. +<translation id="1049138910114524876">वह भाषा कॉन्फ़िगर करती है जिसे <ph name="PRODUCT_OS_NAME" /> साइन इन स्क्रीन पर बलपूर्वक लागू किया जाता है. - अगर यह नीति सेट की गई है तो, साइन इन स्क्रीन हमेशा उस स्थान-भाषा में दिखाई देगी जो इस नीति के पहले मान ने दी है (इस नीति को वैसी सूची के तौर पर बताया जाता है जो आगे बढ़ाने संबंधी काम कर सकती है). अगर यह नीति सेट नहीं की गई है या किसी खाली सूची पर सेट की गई है तो, साइन इन स्क्रीन पिछले उपयोगकर्ता के सेशन से जुड़ी स्थान-भाषा में दिखाई देगी. अगर यह नीति ऐसे मान पर सेट की गई है जो कि मान्य स्थान-भाषा नहीं है तो, साइन इन स्क्रीन किसी पहले से तय स्थान-भाषा (इस समय, en-US है) में दिखाई देगी.</translation> + अगर यह नीति सेट की गई है, तो साइन इन स्क्रीन हमेशा उस भाषा में दिखाई देगी जो इस नीति के पहले मान ने दी है (नीति को अग्रेषित संगतता की सूची के रूप में परिभाषित जाता है). अगर यह नीति सेट नहीं की गई है या किसी खाली सूची पर सेट की गई है, तो साइन इन स्क्रीन पिछले उपयोगकर्ता सत्र की भाषा में प्रदर्शित की जाएगी. अगर यह नीति ऐसे मान पर सेट की गई है जो कि मान्य भाषा नहीं है, तो साइन इन स्क्रीन किसी फ़ॉलबैक भाषा (इस समय en-US है) में प्रदर्शित की जाएगी.</translation> <translation id="1062011392452772310">डिवाइस के लिए दूरस्थ अनुप्रमाणन सक्षम करें</translation> <translation id="1062407476771304334">प्रतिस्थापित करें</translation> <translation id="1079801999187584280">डेवलपर टूल के इस्तेमाल की मंज़ूरी न दें</translation> @@ -550,9 +550,9 @@ जब यह नीति कॉन्फ़िगर नहीं की जाती है या "वयस्क सामग्री के लिए साइटें फ़िल्टर न करें" पर सेट की जाती है, तो साइटें फ़िल्टर नहीं की जाएंगी. जब यह नीति "वयस्क सामग्री के लिए टॉप लेवल की साइटें फ़िल्टर करें" पर सेट की जाती है, तो अश्लील (पोर्नोग्राफ़िक) के रूप में वर्गीकृत साइटें फ़िल्टर की जाएंगी.</translation> -<translation id="2485721741875148980">अगर यह नीति 'सही' पर सेट की जाती है तो, उपयोगकर्ता को ब्राउज़र का इस्तेमाल करने से पहले अपनी प्रोफ़ाइल के ज़रिए <ph name="PRODUCT_NAME" /> में साइन इन करना होगा. BrowserGuestModeEnabled का डिफ़ॉल्ट मान 'गलत' पर सेट कर दिया जाएगा. ध्यान दें कि इस नीति को चालू करने के बाद, साइन नहीं की गईं मौजूदा प्रोफ़ाइल लॉक कर दी जाएंगी और एक्सेस नहीं की जा सकेंगी. ज़्यादा जानकारी के लिए, 'सहायता केंद्र लेख' देखें. +<translation id="2485721741875148980">अगर यह नीति सही पर सेट की जाती है, तो उपयोगकर्ता को ब्राउज़र का इस्तेमाल करने से पहले अपनी प्रोफ़ाइल के ज़रिए <ph name="PRODUCT_NAME" /> में साइन इन करना होगा. और BrowserGuestModeEnabled का डिफ़ॉल्ट मान गलत पर सेट कर दिया जाएगा. ध्यान दें कि इस नीति को चालू करने के बाद साइन नहीं की गईं मौजूदा प्रोफ़ाइल लॉक कर दी जाएंगी और पहुंच से बाहर हो जाएंगी. अधिक जानकारी के लिए, सहायता केंद्र लेख देखें. - अगर यह नीति 'गलत' पर सेट की जाती है या कॉन्फ़िगर नहीं की जाती है तो, उपयोगकर्ता <ph name="PRODUCT_NAME" /> में साइन इन किए बिना ब्राउज़र का इस्तेमाल कर सकता है.</translation> + अगर यह नीति गलत पर सेट की जाती है या कॉन्फ़िगर नहीं की जाती है, तो उपयोगकर्ता <ph name="PRODUCT_NAME" /> में साइन इन किए बिना ब्राउज़र का इस्तेमाल कर सकता है.</translation> <translation id="2486371469462493753">सूची में शामिल किए गए URL के लिए 'प्रमाणपत्र पारदर्शिता' की ज़रूरत को लागू करना बंद करती है. यह नीति तय किए गए किसी खास URL में होस्टनाम के प्रमाणपत्रों को 'प्रमाणपत्र पारदर्शिता' के ज़रिए ज़ाहिर नहीं करती है. यह उन प्रमाणपत्रों का उपयोग किया जाना जारी रखने की अनुमति देती है, जो भरोसे के लायक नहीं होते क्योंकि वे ठीक तरह से सार्वजनिक तौर पर ज़ाहिर नहीं किए गए थे. हालांकि, यह उन होस्ट के लिए गलत तरीके से जारी किए गए प्रमाणपत्रों का पता लगाना ज़्यादा मुश्किल बना देती है. @@ -578,7 +578,7 @@ यदि यह सेटिंग अक्षम है, तो उपयोगकर्ता <ph name="PRODUCT_NAME" /> से प्रिंट कर सकते हैं. पाना मेनू, एक्सटेंशन, JavaScript ऐप्स , इत्यादि में प्रिंटिंग अक्षम है. प्रिंट करते समय <ph name="PRODUCT_NAME" /> को बायपास करने वाले प्लग इन से प्रिंट करना अभी भी संभव है. उदाहरण के लिए, कुछ Flash ऐप्स के संदर्भ मेनू में प्रिंट विकल्प होता है, जिसे इस नीति द्वारा कवर नहीं किया जाता है.</translation> <translation id="2518231489509538392">ऑडियो चलाने दें</translation> <translation id="2521581787935130926">बुकमार्क बार में ऐप्स शॉर्टकट दिखाएं</translation> -<translation id="2529700525201305165">यह प्रतिबंधित करें कि किन उपयोगकर्ताओं को <ph name="PRODUCT_NAME" /> में प्रवेश करने की अनुमति है</translation> +<translation id="2529700525201305165">यह प्रतिबंधित करें कि किन उपयोगकर्ताओं को <ph name="PRODUCT_NAME" /> में साइन इन करने की अनुमति है</translation> <translation id="2529880111512635313">बलपूर्वक-इंस्टॉल किए गए ऐप्स और एक्सटेंशन की सूची कॉन्फ़िगर करें</translation> <translation id="253135976343875019">AC पावर पर चलते समय प्रयोग में नहीं चेतवनी विलंब</translation> <translation id="2536525645274582300">उपयोगकर्ता 'Google स्थान सेवाओं' को चालू करने या नहीं करने का फ़ैसला लेता है</translation> @@ -1603,9 +1603,11 @@ यदि यह सेटिंग सक्षम हो, तो फिर होस्ट के भौतिक इनपुट और आउटपुट डिवाइस अक्षम कर दिए जाते हैं, जबकि एक दूरस्थ कनेक्शन चल रहा होता है. यदि यह सेटिंग अक्षम हो या सेट नहीं हो, तो फिर स्थानीय और दूरस्थ दोनों उपयोगकर्ता होस्ट के शेयर किए जाते समय उससे सहभागिता कर सकते हैं.</translation> -<translation id="5405289061476885481">यह कॉन्फ़िगर करती है कि <ph name="PRODUCT_OS_NAME" /> की साइन इन स्क्रीन पर किस कीबोर्ड लेआउट की अनुमति है. +<translation id="5405289061476885481">यह कॉन्फ़िगर करती है कि <ph name="PRODUCT_OS_NAME" /> साइन इन स्क्रीन पर कौन-कौन से कीबोर्ड लेआउट की अनुमति है. - अगर यह नीति इनपुट के तरीकों की पहचान संबंधी किसी सूची पर सेट की जाती है तो साइन इन स्क्रीन पर, दिया गया इनपुट का तरीका उपलब्ध होगा. इनपुट के लिए वह तरीका पहले से चुना गया होगा जो सबसे पहले दिया गया होगा. उपयोगकर्ता पॉड जहां साइन इन स्क्रीन पर फ़ोकस करता है वहीं इस नीति की ओर से दिए गए इनपुट के तरीकों के अलावा इनपुट का वह तरीका भी उपलब्ध होगा जिसका इस्तेमाल उसने आखिरी बार किया था. अगर यह नीति सेट नहीं की जाती तो, इनपुट का तरीका उस स्थान-भाषा से लिया जाएगा जिसमें साइन इन स्क्रीन दिखाई जाती है. वैसे मान जो इनपुट के मान्य तरीके नहीं हैं, उन्हें अनदेखा कर दिया जाएगा.</translation> + + + अगर यह नीति इनपुट विधि पहचानकर्ताओं की किसी सूची पर सेट की जाती है, तो दी गई इनपुट विधियां साइन इन स्क्रीन पर उपलब्ध होंगी. दी गई पहली इनपुट विधि पहले से चुनी हुई होगी. साइन इन स्क्रीन पर कोई उपयोगकर्ता पॉड फ़ोकस होने पर, इस नीति की ओर से दी गई इनपुट विधियों के अलावा उपयोगकर्ता की पिछली उपयोग की गई इनपुट विधि भी उपलब्ध होगी. अगर यह नीति सेट नहीं की जाती, तो साइन इन स्क्रीन पर मौजूद इनपुट विधियां उस भाषा से ली जाएंगी जिसमें साइन इन स्क्रीन दिखाई गई है. जो मान, मान्य इनपुट विधि पहचानकर्ता नहीं हैं उन्हें अनदेखा कर दिया जाएगा.</translation> <translation id="5423001109873148185">अगर यह नीति चालू हो तो, यह सर्च इंजन को वर्तमान डिफ़ॉल्ट ब्राउज़र से आयात करने के लिए बाध्य करती है. चालू होने पर यह नीति, आयात संबंधी संवाद पर भी असर डालती है. अगर बंद हो तो, डिफ़ॉल्ट सर्च इंजन को आयात नहीं किया जाता. @@ -1914,7 +1916,7 @@ <translation id="6281043242780654992">स्थानीय संदेश सेवा के लिए नीतियां कॉन्फ़िगर करता है. कालीसूची में डाले गए स्थानीय संदेश सेवा होस्ट को तब तक अनुमति नहीं दी जाएगी जब तक वे श्वेतसूची में नहीं डाले जाते.</translation> <translation id="6282799760374509080">ऑडियो कैप्चर की अनुमति देना या अस्वीकार करना</translation> <translation id="6284362063448764300">TLS 1.1</translation> -<translation id="6310223829319187614">उपयोगकर्ता के साइन इन करने के दौरान डोमेन नाम के 'अपने आप पूरा होने की सुविधा' चालू करें</translation> +<translation id="6310223829319187614">उपयोगकर्ता साइन इन के दौरान डोमेन नाम ऑटो कंप्लीट को सक्षम करें</translation> <translation id="6315673513957120120">जब उपयोगकर्ता SSL त्रुटियों वाली साइटों पर नेविगेट करते हैं, तो Chrome एक चेतावनी पेज दिखाता है. डिफ़ॉल्ट रूप से या जब इस पॉलिसी को सत्य पर सेट किया जाता है, तब उपयोगकर्ताओं को इन चेतावनी पेजों के द्वारा क्लिक करने की अनुमति होती है. इस पॉलिसी को असत्य पर सेट करने से उपयोगकर्ताओं को किसी भी चेतावनी पेज के द्वारा क्लिक करने की अनुमति नहीं दी जाती है.</translation> <translation id="6353901068939575220">POST के साथ कोई URL खोजते समय उपयोग किए जाने वाले पैरामीटर तय करती है. इसमें अल्पविराम के ज़रिए अलग किए गए नाम/मान जोड़े शामिल होते हैं. अगर कोई मान टेम्पलेट पैरामीटर, जैसे ऊपर दिए गए उदाहरण में {searchTerms} है तो, उसे वास्तविक खोज शब्द डेटा से बदल दिया जाएगा. @@ -2109,25 +2111,25 @@ <translation id="6903814433019432303">यह नीति सिर्फ़ रिटेल मोड में काम करती है. उन यूआरएल का समूह तय करती है जो डेमो सत्र के शुरू होने पर लोड होते हैं. यह नीति शुरुआती यूआरएल सेट करने की किसी भी अन्य प्रक्रिया को रद्द कर देगी और सिर्फ़ उसी सत्र पर लागू होगी जो किसी खास उपयोगकर्ता से जुड़ा हुआ नहीं होगा.</translation> -<translation id="6908347296939885026">G Suite में <ph name="PRODUCT_NAME" /> की पाबंदी वाली लॉग इन सुविधा को चालू करती है और उपयोगकर्ताओं को यह सेटिंग बदलने से रोकती है. +<translation id="6908347296939885026">G Suite में <ph name="PRODUCT_NAME" /> की प्रतिबंधित लॉग इन सुविधा चालू करती है और उपयोगकर्ताओं को यह सेटिंग बदलने से रोकती है. - अगर आप यह सेटिंग तय करते हैं तो, उपयोगकर्ता सिर्फ़ खास डोमेन के खातों का इस्तेमाल करके - ही 'Google ऐप' का एक्सेस कर सकेगा (ध्यान रखें कि यह सेटिंग - gmail.com/googlemail.com पर काम नहीं करती है). + अगर आप यह सेटिंग तय करते हैं, तो उपयोगकर्ता सिर्फ़ खास डोमेन के खातों का इस्तेमाल करके + Google ऐप एक्सेस कर सकेगा (ध्यान रखें कि यह सेटिंग + gmail.com/googlemail.com के लिए काम नहीं करती है). यह सेटिंग उपयोगकर्ता को किसी ऐसे प्रबंधित डिवाइस में लॉग इन करने से नहीं रोकेगी - जिसे Google के ज़रिए पहचान साबित करने की ज़रूरत होती है. उपयोगकर्ता को अभी भी अन्य - डोमेन के खातों में साइन इन करने की अनुमति होगी, लेकिन जब वे उन खातों के ज़रिए G Suite - का इस्तेमाल करने की कोशिश करेंगे तो उन्हें गड़बड़ी की सूचना मिलेगी. + जिसे Google प्रमाणीकरण की ज़रूरत होती है. उपयोगकर्ता को अभी भी अन्य डोमेन के खातों में + साइन इन करने की अनुमति होगी, लेकिन जब वे उन खातों के ज़रिए G Suite का इस्तेमाल + करने की कोशिश करेंगे तो उन्हें गड़बड़ी मिलेगी. - अगर आप इस सेटिंग को खाली/कॉन्फ़िगर किए बिना छोड़ देते हैं तो, - उपयोगकर्ता किसी भी खाते से G Suite को एक्सेस कर सकेगा. + अगर आप इस सेटिंग को खाली/कॉन्फ़िगर किए बिना छोड़ देते हैं, तो + उपयोगकर्ता किसी भी खाते से G Suite एक्सेस कर सकेगा. - इस नीति की वजह से X-GoogApps-Allowed-Domains हेडर google.com डोमेन के - सभी एचटीटीपी और एचटीटीपीएस अनुरोधों में जुड़ जाएगा, जैसा कि + इस नीति की वजह से X-GoogApps-Allowed-Domains हेडर सभी google.com डोमेन के + सभी HTTP और HTTPS अनुरोधों में जुड़ जाएगा, जैसा कि https://support.google.com/a/answer/1668854 में बताया गया है. - उपयोगकर्ता इस सेटिंग को बदल या इसे रद्द नहीं कर सकते.</translation> + उपयोगकर्ता इस सेटिंग को बदल या ओवरराइड नहीं कर सकते.</translation> <translation id="6908640907898649429">'डिफ़ॉल्ट खोज सेवा' कॉन्फ़िगर करती है. आप वह 'डिफ़ॉल्ट खोज सेवा' तय कर सकते हैं, उपयोगकर्ता जिसका उपयोग करेगा या जिसे डिफ़ॉल्ट खोज को बंद करने के लिए चुनेगा.</translation> <translation id="6913068954484253496"><ph name="PRODUCT_NAME" /> को सभी आईपी पतों पर कास्ट डिवाइस से कनेक्ट होने देती है.</translation> <translation id="6915442654606973733">'कंप्यूटर के बोलकर दिए जाने वाले जवाब' की सुलभता सुविधा चालू करें @@ -2327,7 +2329,7 @@ अगर यह 'गलत' पर सेट है तो, अपने आप जनरेट होने वाले सामग्री सुझाव, 'नया टैब' पेज पर दिखाए नहीं देते.</translation> <translation id="7323896582714668701"><ph name="PRODUCT_NAME" /> के लिए कुछ और कमांड लाइन पैरामीटर</translation> -<translation id="7326394567531622570">'वाइप करें' (मान 2) जैसा ही है लेकिन यह 'लॉगिन टोकन' सुरक्षित रखने की कोशिश करता है ताकि उपयोगकर्ता को फिर से साइन इन न करना पड़े.</translation> +<translation id="7326394567531622570">वाइप करें (मान 2) जैसा ही है, लेकिन यह लॉगिन टोकन सुरक्षित रखने की कोशिश करता है ताकि उपयोगकर्ता को फिर से साइन इन न करना पड़े.</translation> <translation id="7329842439428490522">बैटरी पावर पर चलते समय उस समय सीमा के बारे में बताती है, जितनी देर तक उपयोगकर्ता अगर कोई भी इनपुट नहीं देता है तो, उसके बाद स्क्रीन बंद हो जाती है. जब इस नीति को शून्य से ज़्यादा मान पर सेट किया जाता है तो, यह <ph name="PRODUCT_OS_NAME" /> की ओर से स्क्रीन बंद किए जाने से पहले की उस समय सीमा के बारे में बताती है, जितनी देर तक उपयोगकर्ता कोई गतिविधि नहीं करता. @@ -2569,7 +2571,7 @@ यदि CopyCaCerts पर सेट की गई हो, तो सभी ONC-इंस्टॉल किए गए <ph name="WEB_TRUSTED_BIT" /> युक्त CA प्रमाणपत्र ARC-ऐप्लिकेशन के लिए उपलब्ध होते हैं.</translation> <translation id="7882585827992171421">यह नीति केवल रीटेल मोड में सक्रिय होती है. - साइन-इन स्क्रीन पर स्क्रीन सेवर के रूप में उपयोग किए जाने वाले एक्सटेंशन का आईडी निर्धारित करती है. एक्सटेंशन, DeviceAppPack नीति के माध्यम से इस डोमेन के लिए कॉन्फ़िगर किए गए AppPack का भाग होना चाहिए.</translation> + साइन-इन स्क्रीन पर स्क्रीन सेवर के रूप में उपयोग किए जाने वाले एक्सटेंशन की आईडी तय करती है. एक्सटेंशन, DeviceAppPack नीति के माध्यम से इस डोमेन के लिए कॉन्फ़िगर किए गए AppPack का भाग होना चाहिए.</translation> <translation id="7882857838942884046">Google सिंक को अक्षम करने से Android बैकअप और पुनर्स्थापना ठीक से काम नहीं करेंगे.</translation> <translation id="7882890448959833986">असमर्थित OS चेतावनी को छिपाएं</translation> <translation id="7892077286206685156"> @@ -2803,10 +2805,10 @@ चेतावनी: वर्शन प्रतिबंधों को कॉन्फ़िगर करने का सुझाव नहीं दिया जाता है क्योंकि वे उपयोगकर्ताओं को सॉफ़्टवेयर अपडेट और महत्वपूर्ण सुरक्षा सुधार पाने से रोक सकते हैं. अपडेट को किसी खास वर्शन के शुरुआती हिस्से तक सीमित करने से उपयोगकर्ता खतरे में पड़ सकता है.</translation> <translation id="8519264904050090490">प्रबंधित उपयोगकर्ता मैन्युअल अपवाद यूआरएल</translation> -<translation id="8538235451413605457"><ph name="PRODUCT_NAME" /> के सबसे कम अनुमति वाले वर्शन संबंधी ज़रूरतों को कॉन्फ़िगर करती है. नीचे दिए गए वर्शन पुराने माने जाते हैं और डिवाइस तब तक उपयोगकर्ता को साइन इन की अनुमति नहीं देता जब तक कि ऑपरेटिंग सिस्टम को अपडेट नहीं कर लिया जाता. - अगर उपयोगकर्ता सत्र के दौरान मौजूदा सत्र पुराना हो जाता है तो, उपयोगकर्ता को जबरन साइन आउट कर दिया जाएगा. +<translation id="8538235451413605457"><ph name="PRODUCT_NAME" /> के कम से कम अनुमत वर्शन की ज़रूरतें कॉन्फ़िगर करती है. नीचे दिए गए वर्शन पुराने माने जाते हैं और डिवाइस उपयोगकर्ता को OS अपडेट किए जाने से पहले साइन इन नहीं करने देगा. + अगर उपयोगकर्ता सत्र के दौरान मौजूदा सत्र पुराना हो जाता है, तो उपयोगकर्ता को बलपूर्वक साइन आउट कर दिया जाएगा. - अगर यह नीति सेट नहीं की जाती है तो, किसी तरह की पाबंदी नहीं होती और उपयोगकर्ता आराम से साइन इन कर सकता है चाहे <ph name="PRODUCT_NAME" /> का वर्शन कुछ भी हो. + अगर यह नीति सेट नहीं की जाती है, तो कोई प्रतिबंध लागू नहीं किया जाएगा और उपयोगकर्ता <ph name="PRODUCT_NAME" /> वर्शन पर ध्यान दिए बिना साइन इन कर सकता है. यहां, "वर्शन" '61.0.3163.120' जैसा कोई सटीक वर्शन या '61.0' जैसा कोई वर्शन प्रीफ़िक्स हो सकता है </translation> <translation id="8544375438507658205"><ph name="PRODUCT_FRAME_NAME" /> के लिए सामान्य HTML रेंडरर</translation>
diff --git a/components/policy/resources/policy_templates_iw.xtb b/components/policy/resources/policy_templates_iw.xtb index d83f3d56..836871d 100644 --- a/components/policy/resources/policy_templates_iw.xtb +++ b/components/policy/resources/policy_templates_iw.xtb
@@ -263,6 +263,7 @@ אם המדיניות מוגדרת כ-false, הדיווח של מדדים ונתוני אבחון מושבת. אם המדיניות לא מוגדרת, הדיווח של מדדים ונתוני אבחון יושבת במכשירים שאינם מנוהלים ויופעל במכשירים מנוהלים.</translation> +<translation id="1920046221095339924">התרת סשן מנוהל במכשיר</translation> <translation id="1929709556673267855">מספקת תצורה למדפסות ארגוניות המשויכות למכשירים. המדיניות הזו מאפשרת לך לספק תצורת מדפסות למכשירי <ph name="PRODUCT_OS_NAME" />. הפורמט זהה לזה של מילון NativePrinters, עם תוספת של שדה "id" או "guid" נדרש לכל מדפסת כדי להוסיף לרשימת ההיתרים או לרשימה השחורה. @@ -296,6 +297,7 @@ אם ההגדרה הזו מופעלת או אם לא נקבע הערך שלה, המשתמש יוכל לקבוע דרך ממשק המשתמש את ההגדרות של תכונת המילוי האוטומטי לכתובות.</translation> <translation id="1960840544413786116">האם להתיר אישורים שהונפקו באמצעות עוגני אמון מקומיים שחסר בהם התוסף subjectAlternativeName</translation> +<translation id="1962273523772270623">התרת איסוף יומנים של אירועי WebRTC משירותי Google</translation> <translation id="1964634611280150550">מצב גלישה בסתר מושבת.</translation> <translation id="1964802606569741174">למדיניות הזו אין השפעה על האפליקציה של YouTube ל-Android. אם יש לאכוף מצב בטיחות ב-YouTube, יש לאסור את התקנת האפליקציה של YouTube ל-Android.</translation> <translation id="1969212217917526199">מדיניות זו מבטלת תקנוני מדיניות בגרסאות Build של ניפוי באגים של מארח הגישה מרחוק. @@ -1900,6 +1902,11 @@ אם תשאיר מדיניות זו ללא הגדרה או אם הרשימה ריקה, ניתן יהיה לגשת לכל הסכימות ב-<ph name="PRODUCT_NAME" />.</translation> <translation id="6652197835259177259">הגדרות של משתמשים המנוהלים באופן מקומי</translation> <translation id="6658245400435704251">מציין עד כמה שניות המכשיר יכול לעכב אוטומטית את הורדת העדכון המתבצעת באמצעותו, מהרגע שבו העדכון נדחף לראשונה אל השרת. המכשיר עשוי להמתין חלק מזמן זה במונחים של זמן לפי שעון רגיל, ואת החלק הנותר במונחים של מספר בדיקות העדכון. בכל מקרה, הפיזור נמצא בתחום העליון של פרק זמן קבוע, כדי שהמכשיר לעולם לא ייתקע לנצח בהמתנה להוריד עדכון.</translation> +<translation id="6665599130599311250">אם המדיניות הזו מוגדרת כ-false או אינה מוגדרת, סשן מנוהל של אורח יפעל כפי שמתואר בכתובת https://support.google.com/chrome/a/answer/3017014 - "סשן ציבורי" רגיל. + + אם המדיניות הזו מוגדרת כ-true, סשן מנוהל של אורח יפעל כמו "סשן מנוהל", שבו רבות מההגבלות הקיימות במצב "סשנים ציבוריים" רגילים לא נאכפות. + + אם המדיניות הזו מוגדרת, המשתמש לא יכול לשנות או לבטל אותה.</translation> <translation id="6665670272107384733">הגדרת התדירות שבה המשתמש צריך להזין סיסמה כדי להשתמש בביטול נעילה מהיר</translation> <translation id="6681229465468164801">מאפשרת לך להגדיר רשימת דפוסים של כתובות המציינים אתרים שאינם רשאים להציג בפני המשתמש בקשת הרשאה לגשת אל התקן USB. @@ -2057,6 +2064,17 @@ <translation id="6943577887654905793">שם העדפה של Mac/Linux:</translation> <translation id="69525503251220566">פרמטר המספק תכונה של חיפוש לפי תמונות עבור ספק החיפוש המוגדר כברירת המחדל</translation> <translation id="6956272732789158625">אל תאפשר לאף אתר להשתמש ביצירת מפתחות</translation> +<translation id="6982028490425791294"> + אם המדיניות הזו מוגדרת כ-true, <ph name="PRODUCT_NAME" /> מורשה לאוסף יומנים של אירועי WebRTC משירותי Google (למשל Google Meet) ולהעלות את היומנים האלה אל Google. + + אם המדיניות מוגדרת כ-false או אינה מוגדרת, <ph name="PRODUCT_NAME" /> אינו מורשה לאסוף או להעלות יומנים כאלה. + + היומנים האלה מכילים מידע כמו השעה שבה נשלחו והתקבלו חבילות RTP והגודל שלהן, משוב לגבי עומס ברשת ומטא-נתונים לגבי משך הזמן והאיכות של מסגרות אודיו ווידאו. המידע הזה מועיל לניפוי באגים בשיחות אודיו או וידאו ב-Chrome, כמו בעיות בהערכת רוחב הפס וכו'. היומנים לא מכילים את תוכן האודיו או הווידאו מהשיחה. + + את איסוף הנתונים יכולים להפעיל רק שירותי האינטרנט של Google, כמו Google Hangouts או Google Meet. + + ייתכן שהמערכת תשייך באמצעות מזהה סשן בין היומנים האלה לבין יומנים אחרים שנאספו על-ידי שירות Google עצמו. מטרת השיוך היא להקל על ניפוי הבאגים. + </translation> <translation id="6994082778848658360">מציינת איך אפשר להשתמש ברכיב החומרה המובנה לאבטחה כדי לספק אימות לפי גורם שני, אם הרכיב תואם לתכונה הזו. לחצן ההפעלה של המחשב משמש לזיהוי הנוכחות הפיזית של המשתמש. אם תבחר באפשרות 'מושבת', לא יסופק גורם שני.
diff --git a/components/policy/resources/policy_templates_no.xtb b/components/policy/resources/policy_templates_no.xtb index 87e9acf6..fbcc38d 100644 --- a/components/policy/resources/policy_templates_no.xtb +++ b/components/policy/resources/policy_templates_no.xtb
@@ -274,6 +274,7 @@ Hvis regelen er angitt som «False» (usann), er rapportering av beregninger og diagnostikkdata deaktivert. Hvis den ikke er konfigurert, er rapportering av beregninger og diagnostikkdata deaktivert på ikke-administrerte enheter og aktivert på administrerte enheter.</translation> +<translation id="1920046221095339924">Tillatt administrering av økter på enheten</translation> <translation id="1929709556673267855">Gir konfigurasjoner for bedriftsskrivere som er bundet til enheter. Med denne regelen kan du gi skriverkonfigurasjoner til enheter med <ph name="PRODUCT_OS_NAME" />. Formatet er det samme som for NativePrinters-ordlisten, med et ekstra påkrevd «id»- eller «quid»-felt per skriver for godkjenning eller sperring. @@ -307,6 +308,7 @@ Hvis denne innstillingen er på eller ikke har noen verdi, kan brukeren kontrollere all funksjonalitet for autofyllfunksjonen i brukergrensesnittet.</translation> <translation id="1960840544413786116">Hvorvidt du vil tillate sertifikater som utstedes av lokale klareringsankre som mangler subjectAlternativeName-utvidelsen</translation> +<translation id="1962273523772270623">Tillatt samling av WebRTC aktivitetslog fra Google-tjenester</translation> <translation id="1964634611280150550">Inkognitomodus er deaktivert</translation> <translation id="1964802606569741174">Denne regelen har ingen innvirkning på YouTube-appen for Android. Hvis du vil tvinge bruk av sikkerhetsmodus for YouTube, bør du ikke tillate installasjon av YouTube-appen for Android.</translation> <translation id="1969212217917526199">Overstyrer reglene i delversjonene for feilsøking på fjerntilgangsverten. @@ -1975,6 +1977,11 @@ Hvis denne innstillingen ikke angis eller listen er tom, blir alle oppsettene tilgjengelige i <ph name="PRODUCT_NAME" />.</translation> <translation id="6652197835259177259">Innstillinger for lokalt administrerte brukere</translation> <translation id="6658245400435704251">Angir grensen for hvor mange sekunder en enhet tilfeldig kan utsette nedlastingen av en oppdatering, fra tidspunktet oppdateringen første ble sendt til tjeneren. Enheten kan sette av en del av denne tiden i form av faktisk ventetid, og den gjenværende delen i form av antall oppdateringer som skal kontrolleres. I alle tilfelle er det den øvre grensen for spredning knyttet til en konstant tidsmengde, slik at enheten aldri blir stående fast og vente på å laste ned en oppdatering for alltid.</translation> +<translation id="6665599130599311250">Hvis denne regelen er satt til usann eller ikke stilt inn, vil den administrerte gjesteøkten oppføre seg som dokumentert i https://support.google.com/chrome/a/answer/3017014 - standarden for «Offentlig økt» + + Hvis denne regelen er satt til sann, vil den administrerte gjesteøkten benytte seg av samme oppførselen til «Administrert økt», noe som fjerner mange av begrensningene som gjelder for vanlig «Offentlig økt». + + Hvis denne regelen er angitt, kan ikke brukeren endre den eller overstyre den.</translation> <translation id="6665670272107384733">Angi hvor ofte brukerne må skrive inn passord for å bruke hurtigopplåsing</translation> <translation id="6681229465468164801">Lar deg angi en liste med nettadressemønstre for å spesifisere nettsteder som er forhindret fra å be brukeren om tilgang til en USB-enhet. @@ -2135,6 +2142,17 @@ <translation id="6943577887654905793">Innstillingsnavn for Mac/Linux:</translation> <translation id="69525503251220566">Parameteret som tilbyr search-by-image-funksjonen for standardsøkemotoren</translation> <translation id="6956272732789158625">Ikke tillat noen nettsteder å bruke nøkkelgenerering</translation> +<translation id="6982028490425791294"> + Hvis regelen er satt til sann, vil <ph name="PRODUCT_NAME" /> tillate samling av WebRTC aktiveringslogg fra Google-tjenester (f.eks. Google Meet) og laste opp disse loggene til Google. + + Hvis denne regelen er satt til .usann eller ikke satt, vil <ph name="PRODUCT_NAME" /> ikke samle eller laste opp slike logger. + + Disse loggene inneholder informasjon slik som tid og størrelse på send og mottatte RTP-pakker, tilbakemelding om overbelastning av nettverket og metadata om tid og kvalitet av lyd- og videorammer. Denne informasjon er nyttig ved feilsøking av problemer med lyd- og videosamtaler i Chrome, slik som båndbredde, estimeringsproblemer, osv. Loggene inneholder ikke lyd- og videoinnhold fra samtalen. + + Disse datainnsamlingene kan kun bli utløst av Googles nettjenester, slik som Google Hangouts eller Google Meet. + + Disse loggene kan knyttes sammen,ved hjel av en økt-ID, med andre logger samlet av Google-tjenester selv; med ønske om å gjøre feilsøking enklere. + </translation> <translation id="6994082778848658360">Spesifiserer hvordan det integrerte sikre maskinvareelementet kan brukes til å tilby tofaktor-autentisering hvis det er kompatibelt med denne funksjonen. Av/på-knappen på maskinen brukes til å finne ut om brukeren er fysisk til stede. Hvis «Disabled» (deaktivert) er valgt, tilbys ingen tofaktor-autentisering.
diff --git a/components/policy/tools/generate_policy_source.py b/components/policy/tools/generate_policy_source.py index 4c804f0d..dcbabf3 100755 --- a/components/policy/tools/generate_policy_source.py +++ b/components/policy/tools/generate_policy_source.py
@@ -619,8 +619,6 @@ self.root_properties_begin = begin self.root_properties_end = end - # TODO(crbug.com/856903): Check that each string in - # |required_properties| is in |properties|. required_begin = len(self.required_properties) required_properties = schema.get('required', []) assert type(required_properties) is list @@ -628,6 +626,11 @@ self.required_properties += required_properties required_end = len(self.required_properties) + # Check that each string in |required_properties| is in |properties|. + properties = schema.get('properties', {}) + for name in required_properties: + assert properties.has_key(name) + extra = len(self.properties_nodes) self.properties_nodes.append((begin, end, pattern_end, required_begin, required_end, additionalProperties, name))
diff --git a/components/previews/core/BUILD.gn b/components/previews/core/BUILD.gn index 611a489..71b38221 100644 --- a/components/previews/core/BUILD.gn +++ b/components/previews/core/BUILD.gn
@@ -18,8 +18,6 @@ "previews_switches.h", "previews_user_data.cc", "previews_user_data.h", - "test_previews_decider.cc", - "test_previews_decider.h", ] deps = [ @@ -32,6 +30,24 @@ ] } +static_library("test_support") { + testonly = true + sources = [ + "test_previews_decider.cc", + "test_previews_decider.h", + ] + + deps = [ + ":core", + "//base", + "//base/test:test_support", + "//net", + "//net:test_support", + "//testing/gmock", + "//testing/gtest", + ] +} + source_set("unit_tests") { testonly = true sources = [ @@ -43,6 +59,7 @@ deps = [ ":core", + ":test_support", "//base", "//base/test:test_support", "//components/blacklist/opt_out_blacklist",
diff --git a/components/printing/renderer/print_render_frame_helper.cc b/components/printing/renderer/print_render_frame_helper.cc index 89d54c4..47ebddb 100644 --- a/components/printing/renderer/print_render_frame_helper.cc +++ b/components/printing/renderer/print_render_frame_helper.cc
@@ -2306,7 +2306,7 @@ } void PrintRenderFrameHelper::PrintPreviewContext::Failed(bool report_error) { - DCHECK(state_ == INITIALIZED || state_ == RENDERING); + DCHECK(state_ != UNINITIALIZED); state_ = INITIALIZED; if (report_error) { DCHECK_NE(PREVIEW_ERROR_NONE, error_);
diff --git a/components/rlz/BUILD.gn b/components/rlz/BUILD.gn index f8434c42..9b86d7f 100644 --- a/components/rlz/BUILD.gn +++ b/components/rlz/BUILD.gn
@@ -18,6 +18,7 @@ "//components/google/core/browser", "//net", "//rlz:rlz_lib", + "//services/network/public/cpp:cpp", ] if (is_ios) { @@ -35,6 +36,7 @@ ":rlz", "//net:test_support", "//rlz:test_support", + "//services/network/public/cpp:cpp", "//ui/base", ]
diff --git a/components/rlz/DEPS b/components/rlz/DEPS index 15cc8cc7..7a00b939 100644 --- a/components/rlz/DEPS +++ b/components/rlz/DEPS
@@ -4,6 +4,7 @@ "+net", "+rlz", "+ui/base", + "+services/network/public", # rlz is used on iOS. "-content",
diff --git a/components/rlz/rlz_tracker.cc b/components/rlz/rlz_tracker.cc index 7c92c0dd..9e6cd6f 100644 --- a/components/rlz/rlz_tracker.cc +++ b/components/rlz/rlz_tracker.cc
@@ -21,6 +21,7 @@ #include "base/trace_event/trace_event.h" #include "build/build_config.h" #include "components/rlz/rlz_tracker_delegate.h" +#include "services/network/public/cpp/shared_url_loader_factory.h" #if defined(OS_CHROMEOS) #include "base/syslog_logging.h" @@ -151,16 +152,60 @@ #else product_signature = "chrome"; #endif - return rlz_lib::SendFinancialPing(rlz_lib::CHROME, points, - product_signature.c_str(), - brand.c_str(), referral_ascii.c_str(), - lang_ascii.c_str(), false, true); + return rlz_lib::SendFinancialPing( + rlz_lib::CHROME, points, product_signature.c_str(), brand.c_str(), + referral_ascii.c_str(), lang_ascii.c_str(), false, true); } } // namespace RLZTracker* RLZTracker::tracker_ = nullptr; +// WrapperURLLoaderFactory subclasses mojom::URLLoaderFactory as non-mojo, cross +// thread class. It basically posts ::CreateLoaderAndStart calls over to the UI +// thread, to call them on the real mojo object. +class RLZTracker::WrapperURLLoaderFactory + : public network::mojom::URLLoaderFactory { + public: + explicit WrapperURLLoaderFactory( + scoped_refptr<network::SharedURLLoaderFactory> url_loader_factory) + : url_loader_factory_(std::move(url_loader_factory)), + main_thread_task_runner_(base::SequencedTaskRunnerHandle::Get()) {} + + void CreateLoaderAndStart(network::mojom::URLLoaderRequest loader, + int32_t routing_id, + int32_t request_id, + uint32_t options, + const network::ResourceRequest& request, + network::mojom::URLLoaderClientPtr client, + const net::MutableNetworkTrafficAnnotationTag& + traffic_annotation) override { + if (main_thread_task_runner_->RunsTasksInCurrentSequence()) { + url_loader_factory_->CreateLoaderAndStart( + std::move(loader), routing_id, request_id, options, request, + std::move(client), traffic_annotation); + } else { + main_thread_task_runner_->PostTask( + FROM_HERE, + base::BindOnce(&WrapperURLLoaderFactory::CreateLoaderAndStart, + base::Unretained(this), std::move(loader), routing_id, + request_id, options, request, std::move(client), + traffic_annotation)); + } + } + void Clone(network::mojom::URLLoaderFactoryRequest factory) override { + NOTIMPLEMENTED(); + } + + private: + scoped_refptr<network::SharedURLLoaderFactory> url_loader_factory_; + + // Runner for RLZ main thread tasks. + scoped_refptr<base::SequencedTaskRunner> main_thread_task_runner_; + + DISALLOW_COPY_AND_ASSIGN(WrapperURLLoaderFactory); +}; + // static RLZTracker* RLZTracker::GetInstance() { return tracker_ ? tracker_ : base::Singleton<RLZTracker>::get(); @@ -261,9 +306,11 @@ #endif // Could be null; don't run if so. RLZ will try again next restart. - net::URLRequestContextGetter* context_getter = delegate_->GetRequestContext(); - if (context_getter) { - rlz_lib::SetURLRequestContext(context_getter); + auto shared_url_loader_factory = delegate_->GetURLLoaderFactory(); + if (shared_url_loader_factory) { + custom_url_loader_factory_ = + std::make_unique<WrapperURLLoaderFactory>(shared_url_loader_factory); + rlz_lib::SetURLLoaderFactory(custom_url_loader_factory_.get()); ScheduleDelayedInit(delay); } @@ -571,7 +618,7 @@ // static void RLZTracker::CleanupRlz() { GetInstance()->Cleanup(); - rlz_lib::SetURLRequestContext(nullptr); + rlz_lib::SetURLLoaderFactory(nullptr); } // static
diff --git a/components/rlz/rlz_tracker.h b/components/rlz/rlz_tracker.h index 6e6009a..7e164b6 100644 --- a/components/rlz/rlz_tracker.h +++ b/components/rlz/rlz_tracker.h
@@ -232,7 +232,10 @@ // Minimum delay before sending financial ping after initialization. base::TimeDelta min_init_delay_; - // Runner for RLZ background tasks. The checked is used to verify operations + class WrapperURLLoaderFactory; + std::unique_ptr<WrapperURLLoaderFactory> custom_url_loader_factory_; + + // Runner for RLZ background tasks. The checker is used to verify operations // occur in the correct sequence, especially in tests. scoped_refptr<base::SequencedTaskRunner> background_task_runner_; SEQUENCE_CHECKER(sequence_checker_);
diff --git a/components/rlz/rlz_tracker_delegate.h b/components/rlz/rlz_tracker_delegate.h index bbf43df..d2c2df9f 100644 --- a/components/rlz/rlz_tracker_delegate.h +++ b/components/rlz/rlz_tracker_delegate.h
@@ -11,9 +11,9 @@ #include "base/macros.h" #include "base/strings/string16.h" -namespace net { -class URLRequestContextGetter; -} +namespace network { +class SharedURLLoaderFactory; +} // namespace network namespace rlz { @@ -30,8 +30,9 @@ // Returns whether the current thread is the UI thread. virtual bool IsOnUIThread() = 0; - // Returns the URLRequestContextGetter to use for network connections. - virtual net::URLRequestContextGetter* GetRequestContext() = 0; + // Returns the SharedURLLoaderFactory to use for network connections. + virtual scoped_refptr<network::SharedURLLoaderFactory> + GetURLLoaderFactory() = 0; // Returns the brand code for the installation of Chrome in |brand| and a // boolean indicating whether the operation was a success or not.
diff --git a/components/rlz/rlz_tracker_unittest.cc b/components/rlz/rlz_tracker_unittest.cc index 879fd52..e33f7dc9 100644 --- a/components/rlz/rlz_tracker_unittest.cc +++ b/components/rlz/rlz_tracker_unittest.cc
@@ -17,6 +17,7 @@ #include "components/rlz/rlz_tracker_delegate.h" #include "net/url_request/url_request_test_util.h" #include "rlz/test/rlz_test_helpers.h" +#include "services/network/public/cpp/shared_url_loader_factory.h" #include "testing/gtest/include/gtest/gtest.h" #if defined(OS_IOS) @@ -71,8 +72,10 @@ bool IsOnUIThread() override { return true; } - net::URLRequestContextGetter* GetRequestContext() override { - return request_context_getter_.get(); + scoped_refptr<network::SharedURLLoaderFactory> GetURLLoaderFactory() + override { + NOTIMPLEMENTED() << "If this is called, it needs an implementation."; + return nullptr; } bool GetBrand(std::string* brand) override {
diff --git a/components/safe_browsing/db/v4_protocol_manager_util.h b/components/safe_browsing/db/v4_protocol_manager_util.h index 9c0c7882..0e993194 100644 --- a/components/safe_browsing/db/v4_protocol_manager_util.h +++ b/components/safe_browsing/db/v4_protocol_manager_util.h
@@ -141,7 +141,7 @@ // Enterprise password reuse detected on low reputation page, SB_THREAT_TYPE_ENTERPRISE_PASSWORD_REUSE, - // Deceptive mobile billing practice detected. + // Potential billing detected. SB_THREAT_TYPE_BILLING, };
diff --git a/components/signin/OWNERS b/components/signin/OWNERS index 08a5cce..ef73117 100644 --- a/components/signin/OWNERS +++ b/components/signin/OWNERS
@@ -1,6 +1,5 @@ droger@chromium.org msarda@chromium.org -rogerta@chromium.org # TEAM: chrome-signin@chromium.org # COMPONENT: Services>SignIn
diff --git a/components/strings/components_strings_am.xtb b/components/strings/components_strings_am.xtb index 7a65f395..4377c4a 100644 --- a/components/strings/components_strings_am.xtb +++ b/components/strings/components_strings_am.xtb
@@ -63,6 +63,7 @@ <translation id="129863573139666797"><ph name="BEGIN_LINK" />ኩኪዎችዎን ማጽዳት ይሞክሩ<ph name="END_LINK" /></translation> <translation id="1314614906530272393">የተመረጠው ክፍለ-ጊዜ የለም።</translation> <translation id="1323433172918577554">ተጨማሪ አሳይ</translation> +<translation id="132390688737681464">አድራሻዎችን አስቀምጥ እና ሙላ</translation> <translation id="1333989956347591814">የእርስዎ እንቅስቃሴ ለሚከተሉት <ph name="BEGIN_EMPHASIS" />አሁንም የሚታይ ሊሆን ይችላል<ph name="END_EMPHASIS" />፦ <ph name="BEGIN_LIST" /> <ph name="LIST_ITEM" />እርስዎ የሚጎበኟቸው ድር ጣቢያዎች @@ -110,9 +111,11 @@ <translation id="1645368109819982629">የማይደገፍ ፕሮቶኮል</translation> <translation id="1655462015569774233">{1,plural, =1{ይህ አገልጋይ <ph name="DOMAIN" /> መሆኑን ለማረጋገጥ አይችልም፤ የደህንነት ማረጋገጫ እውቅና ማረጋገጫው ትላንትና ጊዜው አልፎበታል። ይሄ በተሳሳተ አወቃቀር ወይም አንድ አጥቂ ግንኙነትዎን በመጥለፉ የተከሰተ ሊሆን ይችላል። የኮምፒውተርዎ ሰዓት አሁን በ<ph name="CURRENT_DATE" /> ተቀናብሯል። ትክክል ይመስልዎታል? ትክክል ካልሆነ፣ የእርስዎን ስርዓት ሰዓት ማስተካከል እና ይህንን ገፅ ማደስ አለብዎ።}one{ይህ አገልጋይ <ph name="DOMAIN" /> መሆኑን ለማረጋገጥ አይችልም፤ የደህንነት ማረጋገጫ እውቅና ማረጋገጫው ከ# ቀኖች በፊት ጊዜው አልፏል። ይሄ በተሳሳተ አወቃቀር ወይም አንድ አጥቂ ግንኙነትዎን በመጥለፉ የተከሰተ ሊሆን ይችላል። የኮምፒውተርዎ ሰዓት አሁን በ<ph name="CURRENT_DATE" /> ተቀናብሯል። ትክክል ይመስልዎታል? ትክክል ካልሆነ፣ የእርስዎን ስርዓት ሰዓት ማስተካከል እና ይህንን ገፅ ማደስ አለብዎ።}other{ይህ አገልጋይ <ph name="DOMAIN" /> መሆኑን ለማረጋገጥ አይችልም፤ የደህንነት ማረጋገጫ እውቅና ማረጋገጫው ከ# ቀኖች በፊት ጊዜው አልፏል። ይሄ በተሳሳተ አወቃቀር ወይም አንድ አጥቂ ግንኙነትዎን በመጥለፉ የተከሰተ ሊሆን ይችላል። የኮምፒውተርዎ ሰዓት አሁን በ<ph name="CURRENT_DATE" /> ተቀናብሯል። ትክክል ይመስልዎታል? ትክክል ካልሆነ፣ የእርስዎን ስርዓት ሰዓት ማስተካከል እና ይህንን ገፅ ማደስ አለብዎ።}}</translation> <translation id="1656489000284462475">መውሰጃ</translation> +<translation id="1662550410081243962">የመክፈያ ዘዴዎችን አስቀምጥ እና ሙላ</translation> <translation id="1663943134801823270">ካርዶች እና አድራሻዎች ከChrome የመጡ ናቸው። በ<ph name="BEGIN_LINK" />ቅንብሮች<ph name="END_LINK" /> ውስጥ ሊያስተዳድሯቸው ይችላሉ።</translation> <translation id="1676269943528358898"><ph name="SITE" /> የእርስዎን መረጃ ለመጠበቅ በመደበኝነት ምስጠራ ይጠቀማል። Google Chrome አሁን ከ<ph name="SITE" /> ጋር ለመገናኘት ሲሞክር ድር ጣቢያው ያልተለመዱ እና ትክክል ያልሆኑ ምስክርነቶችን መልሷል። ይህ አንድ አጥቂ <ph name="SITE" />ን አስመስሎ ለመቅረብ ሲሞክር ነው ወይም አንድ የWi-Fi መግቢያ ገጽ ግንኙነቱን ሲያቋረጥ ሊከሰት ይችላል። Google Chrome ማንኛውም የውሂብ ልውውጥ ከመካሄዱ በፊት ግንኙነቱን ስላቋረጠው የእርስዎ መረጃ ደህንነት አሁንም የተጠበቀ ነው።</translation> <translation id="168841957122794586">የአገልጋይ እውቅና ማረጋገጫው ደካማ የሆነ ባለስውር መረጃ ቁልፍ ነው ያለው።</translation> +<translation id="1697532407822776718">በቃ ጨርሰዋል!</translation> <translation id="1706954506755087368">{1,plural, =1{ይህ አገልጋይ <ph name="DOMAIN" /> እንደሆነ ማረጋገጥ አልቻለም፤ የደህንነት ማረጋገጫ እውቅና ማረጋገጫው ከነገ የመጣ ነው ይላል። ይሄ በተሳሳተ አወቃቀር ወይም አንድ አጥቂ ግንኙነትዎን በመጥለፉ የተከሰተ ሊሆን ይችላል።}one{ይህ አገልጋይ <ph name="DOMAIN" /> እንደሆነ ማረጋገጥ አልቻለም፤ የደህንነት ማረጋገጫ እውቅና ማረጋገጫው የወደፊት # ቀንኖች የመጣ ነው ይላል። ይሄ በተሳሳተ አወቃቀር ወይም አንድ አጥቂ ግንኙነትዎን በመጥለፉ የተከሰተ ሊሆን ይችላል።}other{ይህ አገልጋይ <ph name="DOMAIN" /> እንደሆነ ማረጋገጥ አልቻለም፤ የደህንነት ማረጋገጫ እውቅና ማረጋገጫው የወደፊት # ቀንኖች የመጣ ነው ይላል። ይሄ በተሳሳተ አወቃቀር ወይም አንድ አጥቂ ግንኙነትዎን በመጥለፉ የተከሰተ ሊሆን ይችላል።}}</translation> <translation id="1710259589646384581">ስርዓተ ክወና</translation> <translation id="1721312023322545264">ይህን ጣቢያ ለመጎብኘት ከ<ph name="NAME" /> ፈቃድ ያስፈልገዎታል</translation> @@ -193,6 +196,7 @@ <translation id="225207911366869382">ይህ ዋጋ ለዚህ መመሪያ ተቋርጧል።</translation> <translation id="2262243747453050782">የኤች ቲ ቲ ፒ ስህተት</translation> <translation id="2270484714375784793">ስልክ ቁጥር</translation> +<translation id="2283340219607151381">አድራሻዎችን አስቀምጥ እና ሙላ</translation> <translation id="2292556288342944218">የእርስዎ የበየነመረብ መዳረሻ ታግዷል</translation> <translation id="2316887270356262533">እስከ 1 ሜባ ቦታ ድረስ ያስለቅቃል። አንዳንድ ጣቢያዎች በሚቀጥለው ጉብኝትዎ ላይ ይበልጥ በዝግታ ሊጫኑ ይችላሉ።</translation> <translation id="2317259163369394535"><ph name="DOMAIN" /> የተጠቃሚ ስም እና የይለፍ ቃል ያስፈልገዋል።</translation> @@ -274,6 +278,7 @@ <translation id="2851634818064021665">ይህን ጣቢያ ለመጎብኘት ፈቃድ ያስፈልገዎታል</translation> <translation id="2856444702002559011">አጥቂዎች የእርስዎን መረጃ (ለምሳሌ፦ የይለፍ ቃላትን፣ መልዕክቶችን፣ ወይም የክሬዲት ካርዶችን የመሳሰሉ) ከ<ph name="BEGIN_BOLD" /><ph name="SITE" /><ph name="END_BOLD" /> ለመስረቅ እየሞከሩ ሊሆኑ ይችላሉ። <ph name="BEGIN_LEARN_MORE_LINK" />የበለጠ ለመረዳት<ph name="END_LEARN_MORE_LINK" /></translation> <translation id="2881276955470682203">ካርድ ይቀመጥ?</translation> +<translation id="2903493209154104877">አድራሻዎች</translation> <translation id="2909946352844186028">የአውታረ መረብ ለውጥ ተገኝቷል።</translation> <translation id="2916038427272391327">ሌሎች ፕሮግራሞችን ይዝጉ</translation> <translation id="2922350208395188000">የአገልጋይ እውቅና ማረጋገጫ ሊረጋገጥ አልቻለም።</translation> @@ -1146,6 +1151,7 @@ <translation id="973773823069644502">የማድረሻ አድራሻ ያክሉ</translation> <translation id="975560348586398090">{COUNT,plural, =0{ምንም}=1{1 ንጥል}one{# ንጥሎች}other{# ንጥሎች}}</translation> <translation id="981121421437150478">ከመስመር ውጪ</translation> +<translation id="984275831282074731">የመክፈያ ዘዴዎች</translation> <translation id="985199708454569384"><p>የእርስዎ ኮምፒውተር ወይም የተንቀሳቃሽ መሣሪያ ውሂብና ሰዓት ትክክል ካልሆኑ ይህን ስህተት ያዩታል።</p> <p>ስህተቱን ለማስተካከል የመሣሪያዎን ሰዓት ይክፈቱ። ሰዓቱ እና ቀኑ ትክክል መሆኑን ያረጋግጡ።</p></translation> <translation id="988159990683914416">የገንቢዎች ግንባታ</translation>
diff --git a/components/strings/components_strings_ar.xtb b/components/strings/components_strings_ar.xtb index 484b0b8..557378f 100644 --- a/components/strings/components_strings_ar.xtb +++ b/components/strings/components_strings_ar.xtb
@@ -63,6 +63,7 @@ <translation id="129863573139666797"><ph name="BEGIN_LINK" />جرّب محو ملفات تعريف الارتباط<ph name="END_LINK" /></translation> <translation id="1314614906530272393">الجلسة المختارة غير موجودة.</translation> <translation id="1323433172918577554">إظهار مزيد من الأقسام</translation> +<translation id="132390688737681464">حفظ العناوين وملؤها</translation> <translation id="1333989956347591814">قد يظل <ph name="BEGIN_EMPHASIS" />نشاطك مرئيًا<ph name="END_EMPHASIS" /> للجهات التالية: <ph name="BEGIN_LIST" /> <ph name="LIST_ITEM" />مواقع الويب التي تزورها @@ -110,9 +111,11 @@ <translation id="1645368109819982629">بروتوكول غير معتمد</translation> <translation id="1655462015569774233">{1,plural, =1{هذا الخادم لم يتمكن من إثبات أن ذلك <ph name="DOMAIN" />؛ انتهت صلاحية شهادة أمانه أمس. ربما يكون السبب في ذلك خطأ في التهيئة أو مهاجمًا يعترض اتصالك. تم تعيين ساعة الكمبيوتر لديك حاليًا على <ph name="CURRENT_DATE" />. هل يبدو ذلك صحيحًا؟ إذا لم يكن الأمر كذلك، يجب تصحيح ساعة النظام لديك ثم تحديث هذه الصفحة.}zero{هذا الخادم لم يتمكن من إثبات أن ذلك <ph name="DOMAIN" />؛ انتهت صلاحية شهادة أمانه منذ # يوم. ربما يكون السبب في ذلك خطأ في التهيئة أو مهاجمًا يعترض اتصالك. تم تعيين ساعة الكمبيوتر لديك حاليًا على <ph name="CURRENT_DATE" />. هل يبدو ذلك صحيحًا؟ إذا لم يكن الأمر كذلك، يجب تصحيح ساعة النظام لديك ثم تحديث هذه الصفحة.}two{هذا الخادم لم يتمكن من إثبات أن ذلك <ph name="DOMAIN" />؛ انتهت صلاحية شهادة أمانه منذ يومين (#). ربما يكون السبب في ذلك خطأ في التهيئة أو مهاجمًا يعترض اتصالك. تم تعيين ساعة الكمبيوتر لديك حاليًا على <ph name="CURRENT_DATE" />. هل يبدو ذلك صحيحًا؟ إذا لم يكن الأمر كذلك، يجب تصحيح ساعة النظام لديك ثم تحديث هذه الصفحة.}few{هذا الخادم لم يتمكن من إثبات أن ذلك <ph name="DOMAIN" />؛ انتهت صلاحية شهادة أمانه منذ # أيام. ربما يكون السبب في ذلك خطأ في التهيئة أو مهاجمًا يعترض اتصالك. تم تعيين ساعة الكمبيوتر لديك حاليًا على <ph name="CURRENT_DATE" />. هل يبدو ذلك صحيحًا؟ إذا لم يكن الأمر كذلك، يجب تصحيح ساعة النظام لديك ثم تحديث هذه الصفحة.}many{هذا الخادم لم يتمكن من إثبات أن ذلك <ph name="DOMAIN" />؛ انتهت صلاحية شهادة أمانه منذ # يومًا. ربما يكون السبب في ذلك خطأ في التهيئة أو مهاجمًا يعترض اتصالك. تم تعيين ساعة الكمبيوتر لديك حاليًا على <ph name="CURRENT_DATE" />. هل يبدو ذلك صحيحًا؟ إذا لم يكن الأمر كذلك، يجب تصحيح ساعة النظام لديك ثم تحديث هذه الصفحة.}other{هذا الخادم لم يتمكن من إثبات أن ذلك <ph name="DOMAIN" />؛ انتهت صلاحية شهادة أمانه منذ # يوم. ربما يكون السبب في ذلك خطأ في التهيئة أو مهاجمًا يعترض اتصالك. تم تعيين ساعة الكمبيوتر لديك حاليًا على <ph name="CURRENT_DATE" />. هل يبدو ذلك صحيحًا؟ إذا لم يكن الأمر كذلك، يجب تصحيح ساعة النظام لديك ثم تحديث هذه الصفحة.}}</translation> <translation id="1656489000284462475">الاستلام</translation> +<translation id="1662550410081243962">حفظ طرق الدفع وملؤها</translation> <translation id="1663943134801823270">تأتي البطاقات والعناوين من Chrome. ويمكنك إدارتها في <ph name="BEGIN_LINK" />الإعدادات<ph name="END_LINK" />.</translation> <translation id="1676269943528358898">يستخدم <ph name="SITE" /> التشفير عادة لحماية معلوماتك. عندما حاول Google Chrome الاتصال بموقع <ph name="SITE" /> هذه المرة، أرجَع موقع الويب بيانات اعتماد غير عادية وغير صحيحة. وقد يحدث هذا عندما يحاول أحد المهاجمين التظاهر بأنه موقع <ph name="SITE" />، أو إذا قاطعت شاشة تسجيل دخول Wi-Fi الاتصال. ولكن لا تزال معلوماتك آمنة نظرًا لأن Google Chrome أوقَف الاتصال قبل تبادل أي بيانات.</translation> <translation id="168841957122794586">تحتوي شهادة الخادم على مفتاح تشفير ضعيف.</translation> +<translation id="1697532407822776718">أنت الآن على أتم استعداد.</translation> <translation id="1706954506755087368">{1,plural, =1{هذا الخادم لم يتمكن من إثبات أن ذلك <ph name="DOMAIN" />؛ من المفترض أن تبدأ شهادة أمانه من الغد. ربما يكون السبب في ذلك خطأ في التهيئة أو مهاجمًا يعترض اتصالك.}zero{هذا الخادم لم يتمكن من إثبات أن ذلك <ph name="DOMAIN" />؛ من المفترض أن تبدأ شهادة أمانه خلال # يوم في المستقبل. ربما يكون السبب في ذلك خطأ في التهيئة أو مهاجمًا يعترض اتصالك.}two{هذا الخادم لم يتمكن من إثبات أن ذلك <ph name="DOMAIN" />؛ من المفترض أن تبدأ شهادة أمانه خلال يومين (#) في المستقبل. ربما يكون السبب في ذلك خطأ في التهيئة أو مهاجمًا يعترض اتصالك.}few{هذا الخادم لم يتمكن من إثبات أن ذلك <ph name="DOMAIN" />؛ من المفترض أن تبدأ شهادة أمانه خلال # أيام في المستقبل. ربما يكون السبب في ذلك خطأ في التهيئة أو مهاجمًا يعترض اتصالك.}many{هذا الخادم لم يتمكن من إثبات أن ذلك <ph name="DOMAIN" />؛ من المفترض أن تبدأ شهادة أمانه خلال # يومًا في المستقبل. ربما يكون السبب في ذلك خطأ في التهيئة أو مهاجمًا يعترض اتصالك.}other{هذا الخادم لم يتمكن من إثبات أن ذلك <ph name="DOMAIN" />؛ من المفترض أن تبدأ شهادة أمانه خلال # يوم في المستقبل. ربما يكون السبب في ذلك خطأ في التهيئة أو مهاجمًا يعترض اتصالك.}}</translation> <translation id="1710259589646384581">نظام التشغيل</translation> <translation id="1721312023322545264">أنت بحاجة لإذن من <ph name="NAME" /> لزيارة هذا الموقع</translation> @@ -193,6 +196,7 @@ <translation id="225207911366869382">تم تجاهل القيمة لهذه السياسة.</translation> <translation id="2262243747453050782">خطأ HTTP</translation> <translation id="2270484714375784793">رقم الهاتف</translation> +<translation id="2283340219607151381">حفظ العناوين وملؤها</translation> <translation id="2292556288342944218">تم حظر دخولك إلى الإنترنت</translation> <translation id="2316887270356262533">يوفِّر أقل من 1 ميغابايت. وقد يتم تحميل بعض المواقع بشكل أبطأ عند زيارتها في المرة القادمة.</translation> <translation id="2317259163369394535">يتطلَّب <ph name="DOMAIN" /> اسم مستخدم وكلمة مرور.</translation> @@ -274,6 +278,7 @@ <translation id="2851634818064021665">يلزمك الحصول على إذن لزيارة هذا الموقع</translation> <translation id="2856444702002559011">قد يحاول المهاجمون سرقة معلوماتك من <ph name="BEGIN_BOLD" /><ph name="SITE" /><ph name="END_BOLD" /> (على سبيل المثال، كلمات المرور، أو الرسائل، أو بطاقات الائتمان). <ph name="BEGIN_LEARN_MORE_LINK" />مزيد من المعلومات<ph name="END_LEARN_MORE_LINK" /></translation> <translation id="2881276955470682203">هل تريد حفظ البطاقة؟</translation> +<translation id="2903493209154104877">العناوين</translation> <translation id="2909946352844186028">تم اكتشاف حدوث تغيير في الشبكة.</translation> <translation id="2916038427272391327">إغلاق البرامج الأخرى</translation> <translation id="2922350208395188000">لا يمكن التحقق من شهادة الخادم.</translation> @@ -1147,6 +1152,7 @@ <translation id="973773823069644502">إضافة عنوان التسليم للمستخدم</translation> <translation id="975560348586398090">{COUNT,plural, =0{بدون}=1{عنصر واحد}two{عنصران (#)}few{# عناصر}many{# عنصرًا}other{# عنصر}}</translation> <translation id="981121421437150478">بلا اتصال</translation> +<translation id="984275831282074731">طرق الدفع</translation> <translation id="985199708454569384"><p>سيظهر هذا الخطأ إذا كان التاريخ والوقت غير دقيقَيْن في جهاز الكمبيوتر أو الجهاز الجوّال.</p> <p>لإصلاح الخطأ، افتح ساعة الجهاز وتأكد من صحة التاريخ والوقت.</p></translation> <translation id="988159990683914416">بنية المطوِّر</translation>
diff --git a/components/strings/components_strings_bg.xtb b/components/strings/components_strings_bg.xtb index 0e55fa6..a6d60f2 100644 --- a/components/strings/components_strings_bg.xtb +++ b/components/strings/components_strings_bg.xtb
@@ -63,6 +63,7 @@ <translation id="129863573139666797"><ph name="BEGIN_LINK" />Опитайте да изчистите „бисквитките“ си<ph name="END_LINK" /></translation> <translation id="1314614906530272393">Избраната сесия не съществува.</translation> <translation id="1323433172918577554">Показване на още</translation> +<translation id="132390688737681464">Запазване и попълване на адреси</translation> <translation id="1333989956347591814">Активността ви <ph name="BEGIN_EMPHASIS" />може да остане видима<ph name="END_EMPHASIS" /> за: <ph name="BEGIN_LIST" /> <ph name="LIST_ITEM" />уебсайтовете, които посещавате; @@ -110,9 +111,11 @@ <translation id="1645368109819982629">Неподдържан протокол</translation> <translation id="1655462015569774233">{1,plural, =1{Сървърът не можа да докаже, че е <ph name="DOMAIN" />. Сертификатът му за сигурност е изтекъл вчера. Това може да се дължи на неправилно конфигуриране или на прехващане на връзката ви от извършител на атака. Понастоящем часовникът на компютъра ви показва <ph name="CURRENT_DATE" />. Това изглежда ли правилно? Ако не е, трябва да сверите системния часовник и след това да опресните страницата.}other{Сървърът не можа да докаже, че е <ph name="DOMAIN" />. Сертификатът му за сигурност е изтекъл преди # дни. Това може да се дължи на неправилно конфигуриране или на прехващане на връзката ви от извършител на атака. Понастоящем часовникът на компютъра ви показва <ph name="CURRENT_DATE" />. Това изглежда ли правилно? Ако не е, трябва да сверите системния часовник и след това да опресните страницата.}}</translation> <translation id="1656489000284462475">Вземане</translation> +<translation id="1662550410081243962">Запазване и попълване на начини на плащане</translation> <translation id="1663943134801823270">Картите и адресите са от Chrome. Можете да ги управлявате от <ph name="BEGIN_LINK" />настройките<ph name="END_LINK" />.</translation> <translation id="1676269943528358898">Обикновено <ph name="SITE" /> използва шифроване за защита на информацията ви. Когато Google Chrome опита да установи връзка с/ъс <ph name="SITE" /> този път, уебсайтът върна необичайни и неправилни идентификационни данни. Това може да се случи, когато извършител на атака пробва да се представи за <ph name="SITE" /> или връзката е прекъсната от екран за вход в Wi-Fi. Информацията ви продължава да е защитена, тъй като Chrome спря връзката, преди да бъдат обменени данни.</translation> <translation id="168841957122794586">Сертификатът на сървъра съдържа слаб криптографски ключ.</translation> +<translation id="1697532407822776718">Готово!</translation> <translation id="1706954506755087368">{1,plural, =1{Сървърът не можа да докаже, че е <ph name="DOMAIN" />. Сертификатът му за сигурност е от утре. Това може да се дължи на неправилно конфигуриране или на прехващане на връзката ви от извършител на атака.}other{Сървърът не можа да докаже, че е <ph name="DOMAIN" />. Сертификатът му за сигурност е от # дни в бъдещето. Това може да се дължи на неправилно конфигуриране или на прехващане на връзката ви от извършител на атака.}}</translation> <translation id="1710259589646384581">ОС</translation> <translation id="1721312023322545264">Необходимо ви е разрешение от <ph name="NAME" />, за да посетите този сайт</translation> @@ -193,6 +196,7 @@ <translation id="225207911366869382">Стойността е оттеглена за това правило.</translation> <translation id="2262243747453050782">HTTP грешка</translation> <translation id="2270484714375784793">Телефонен номер</translation> +<translation id="2283340219607151381">Запазване и попълване на адреси</translation> <translation id="2292556288342944218">Достъпът ви до интернет е блокиран</translation> <translation id="2316887270356262533">Ще освободите по-малко от 1 МБ. Някои сайтове може да се заредят по-бавно при следващото ви посещение.</translation> <translation id="2317259163369394535">Изискват се потребителско име и парола за <ph name="DOMAIN" />.</translation> @@ -274,6 +278,7 @@ <translation id="2851634818064021665">Необходимо ви е разрешение, за да посетите този сайт</translation> <translation id="2856444702002559011">Възможно е извършители на атака да опитват да откраднат информацията ви от <ph name="BEGIN_BOLD" /><ph name="SITE" /><ph name="END_BOLD" /> (например пароли, съобщения или номера на кредитни карти). <ph name="BEGIN_LEARN_MORE_LINK" />Научете повече<ph name="END_LEARN_MORE_LINK" /></translation> <translation id="2881276955470682203">Да се запази ли картата?</translation> +<translation id="2903493209154104877">Адреси</translation> <translation id="2909946352844186028">Установена бе промяна в мрежата.</translation> <translation id="2916038427272391327">Затворете другите програми.</translation> <translation id="2922350208395188000">Сертификатът на сървъра не може да бъде проверен.</translation> @@ -1146,6 +1151,7 @@ <translation id="973773823069644502">Добавяне на адрес за бърза доставка</translation> <translation id="975560348586398090">{COUNT,plural, =0{Няма}=1{1 елемент}other{# елемента}}</translation> <translation id="981121421437150478">Офлайн</translation> +<translation id="984275831282074731">Начини на плащане</translation> <translation id="985199708454569384"><p>Ще виждате това съобщение за грешка, ако датата и часът на компютъра или мобилното ви устройство не са верни.</p> <p>За да отстраните грешката, отворете часовника на устройството си и сверете датата и часа.</p></translation> <translation id="988159990683914416">Компилирана програма за програмисти</translation>
diff --git a/components/strings/components_strings_bn.xtb b/components/strings/components_strings_bn.xtb index 4f5e339..815e6c3 100644 --- a/components/strings/components_strings_bn.xtb +++ b/components/strings/components_strings_bn.xtb
@@ -63,6 +63,7 @@ <translation id="129863573139666797"><ph name="BEGIN_LINK" />আপনার কুকিজ সাফ করে দেখুন<ph name="END_LINK" /></translation> <translation id="1314614906530272393">বেছে নেওয়া সেশনটির অস্তিত্ব নেই।</translation> <translation id="1323433172918577554">আরও দেখুন</translation> +<translation id="132390688737681464">অ্যাড্রেসগুলি পূরণ করে সেভ করুন</translation> <translation id="1333989956347591814">এগুলিতে আপনার অ্যাক্টিভিটি <ph name="BEGIN_EMPHASIS" />এখনও দেখা যেতে পারে<ph name="END_EMPHASIS" />: <ph name="BEGIN_LIST" /> <ph name="LIST_ITEM" />যে ওয়েবসাইট আপনি দেখেছেন @@ -110,9 +111,11 @@ <translation id="1645368109819982629">অসমর্থিত প্রোটোকল</translation> <translation id="1655462015569774233">{1,plural, =1{এই সার্ভার যে <ph name="DOMAIN" /> তা এটি প্রমাণ করতে পারেনি; এর নিরাপত্তা শংসাপত্রটি গতকাল মেয়াদোত্তীর্ণ হয়েছে। কোনো ভুল কনফিগারেশনের কারণে অথবা আপনার সংযোগে বাধাপ্রদানকারী কোনো আক্রমণকারীর কারণে এমনটি হতে পারে। আপনার কম্পিউটারের ঘড়ি বর্তমানে <ph name="CURRENT_DATE" /> এ সেট করা আছে। এটি কি ঠিক আছে বলে মনে হচ্ছে? যদি তা না হয়, তাহলে আপনার সিস্টেম ঘড়িটি ঠিক করা উচিত হবে এবং তারপর এই পৃষ্ঠাটি রিফ্রেশ করা উচিত।}one{এই সার্ভার যে <ph name="DOMAIN" /> তা এটি প্রমাণ করতে পারেনি; এর নিরাপত্তা শংসাপত্রটি # দিন আগে মেয়াদোত্তীর্ণ হয়েছে। কোনো ভুল কনফিগারেশনের কারণে অথবা আপনার সংযোগে বাধাপ্রদানকারী কোনো আক্রমণকারীর কারণে এমনটি হতে পারে। আপনার কম্পিউটারের ঘড়ি বর্তমানে <ph name="CURRENT_DATE" /> এ সেট করা আছে। এটি কি ঠিক আছে বলে মনে হচ্ছে? যদি তা না হয়, তাহলে আপনার সিস্টেম ঘড়িটি ঠিক করা উচিত হবে এবং তারপর এই পৃষ্ঠাটি রিফ্রেশ করা উচিত।}other{এই সার্ভার যে <ph name="DOMAIN" /> তা এটি প্রমাণ করতে পারেনি; এর নিরাপত্তা শংসাপত্রটি # দিন আগে মেয়াদোত্তীর্ণ হয়েছে। কোনো ভুল কনফিগারেশনের কারণে অথবা আপনার সংযোগে বাধাপ্রদানকারী কোনো আক্রমণকারীর কারণে এমনটি হতে পারে। আপনার কম্পিউটারের ঘড়ি বর্তমানে <ph name="CURRENT_DATE" /> এ সেট করা আছে। এটি কি ঠিক আছে বলে মনে হচ্ছে? যদি তা না হয়, তাহলে আপনার সিস্টেম ঘড়িটি ঠিক করা উচিত হবে এবং তারপর এই পৃষ্ঠাটি রিফ্রেশ করা উচিত।}}</translation> <translation id="1656489000284462475">তুলে নিন</translation> +<translation id="1662550410081243962">পেমেন্টের পদ্ধতিগুলি পূরণ করে সেভ করুন</translation> <translation id="1663943134801823270">Chrome থেকে কার্ড এবং ঠিকানাগুলি এসেছে। আপনি <ph name="BEGIN_LINK" />সেটিংস<ph name="END_LINK" /> এ এগুলি পরিচালনা করতে পারবেন।</translation> <translation id="1676269943528358898"><ph name="SITE" /> সাধারণত আপনার তথ্য সুরক্ষিত রাখতে এনক্রিপশান ব্যবহার করে। এইবার যখন Google Chrome <ph name="SITE" /> এর সাথে সংযোগ স্থাপন করার চেষ্টা করেছে, তখন ওয়েবসাইটটি অস্বাভাবিক এবং ভুল শংসাপত্র পাঠিয়েছে। হয় একজন আক্রমণকারী <ph name="SITE" /> হওয়ার ভান করছে, অথবা কোনো ওয়াই-ফাই প্রবেশ করুন স্ক্রীণ সংযোগকে বাধা দেওয়া হয়েছে। আপনার তথ্য এখনো নিরাপদ আছে কারণ কোনো ডেটা আদানপ্রদানের আগেই Google Chrome সংযোগটিকে বন্ধ করে দিয়েছে।</translation> <translation id="168841957122794586">সার্ভার শংসাপত্রে একটি দুর্বল কপিরাইট কী আছে৷</translation> +<translation id="1697532407822776718">আপনার সমস্ত সেট আছে!</translation> <translation id="1706954506755087368">{1,plural, =1{এই সার্ভার যে <ph name="DOMAIN" /> তা এটি প্রমাণ করতে পারেনি; এর নিরাপত্তা শংসাপত্রটি আগামীকালের বলে মনে হচ্ছে। কোনো ভুল কনফিগারেশনের কারণে অথবা আপনার সংযোগে বাধাপ্রদানকারী কোনো আক্রমণকারীর কারণে এমনটি হতে পারে।}one{এই সার্ভার যে <ph name="DOMAIN" /> তা এটি প্রমাণ করতে পারেনি; এর নিরাপত্তা শংসাপত্রটি আগামী # দিন পরের বলে মনে হচ্ছে। কোনো ভুল কনফিগারেশনের কারণে অথবা আপনার সংযোগে বাধাপ্রদানকারী কোনো আক্রমণকারীর কারণে এমনটি হতে পারে।}other{এই সার্ভার যে <ph name="DOMAIN" /> তা এটি প্রমাণ করতে পারেনি; এর নিরাপত্তা শংসাপত্রটি আগামী # দিন পরের বলে মনে হচ্ছে। কোনো ভুল কনফিগারেশনের কারণে অথবা আপনার সংযোগে বাধাপ্রদানকারী কোনো আক্রমণকারীর কারণে এমনটি হতে পারে।}}</translation> <translation id="1710259589646384581">OS</translation> <translation id="1721312023322545264">এই সাইটে যেতে আপনাকে <ph name="NAME" /> এর কাছ থেকে অনুমতি নিতে হবে</translation> @@ -194,6 +197,7 @@ <translation id="225207911366869382">এই মান এই নীতির জন্য অসমর্থিত হয়েছে৷</translation> <translation id="2262243747453050782">HTTP ত্রুটি</translation> <translation id="2270484714375784793">ফোন নম্বর</translation> +<translation id="2283340219607151381">অ্যাড্রেস পূরণ করে সেভ করুন</translation> <translation id="2292556288342944218">আপনার ইন্টারনেট অ্যাক্সেস অবরুদ্ধ করা হয়েছে</translation> <translation id="2316887270356262533">১ MB এর চেয়ে কম জায়গা খালি করে। পরের বার যখন দেখবেন তখন কিছু সাইট লোড হতে দেরি হতে পারে।</translation> <translation id="2317259163369394535"><ph name="DOMAIN" /> এর জন্য একটি ইউজারনেম এবং পাসওয়ার্ড প্রয়োজন।</translation> @@ -207,6 +211,7 @@ <translation id="2359808026110333948">অবিরত</translation> <translation id="2365563543831475020"><ph name="CRASH_TIME" /> এ ক্যাপচার করা ক্র্যাশ প্রতিবেদন আপলোড করা হয়নি</translation> <translation id="2367567093518048410">স্তর</translation> +<translation id="2378238891085281592">আপনি ব্যক্তিগত মোডে চলে গেছেন</translation> <translation id="2384307209577226199">এন্টারপ্রাইজ ডিফল্ট</translation> <translation id="2386255080630008482">সার্ভারের শংসাপত্রটি প্রত্যাহার করা হয়েছে৷</translation> <translation id="2392959068659972793">কোনো মান সেট করা নেই এমন নীতিগুলি দেখান</translation> @@ -274,6 +279,7 @@ <translation id="2851634818064021665">এই সাইট দেখার জন্য আপনার অনুমতির প্রয়োজন</translation> <translation id="2856444702002559011">আক্রমণকারীরা হয়ত <ph name="BEGIN_BOLD" /><ph name="SITE" /><ph name="END_BOLD" /> থেকে আপনার তথ্য (যেমন পাসওয়ার্ড, মেসেজ বা ক্রেডিট কার্ড) চুরি করার চেষ্টা করছে। <ph name="BEGIN_LEARN_MORE_LINK" />আরও জানুন<ph name="END_LEARN_MORE_LINK" /></translation> <translation id="2881276955470682203">কার্ড সেভ করবেন?</translation> +<translation id="2903493209154104877">ঠিকানা</translation> <translation id="2909946352844186028">একটি নেটওয়ার্ক পরিবর্তন শনাক্ত হয়েছে৷</translation> <translation id="2916038427272391327">অন্যান্য প্রোগ্রামগুলি বন্ধ করুন</translation> <translation id="2922350208395188000">সার্ভারের শংসাপত্র চেক করা যাবে না৷</translation> @@ -513,6 +519,7 @@ <translation id="450710068430902550">প্রশাসকের সাথে ভাগ করছে</translation> <translation id="4515275063822566619">কার্ড ও ঠিকানাগুলি Chrome এবং আপনার Google অ্যাকাউন্ট (<ph name="ACCOUNT_EMAIL" />) থেকে এসেছে। আপনি <ph name="BEGIN_LINK" />সেটিংস<ph name="END_LINK" /> এ গিয়ে সেগুলি পরিচালনা করতে পারবেন।</translation> <translation id="4522570452068850558">বিশদ বিবরণ</translation> +<translation id="4524805452350978254">কার্ড ম্যানেজ করুন</translation> <translation id="4552089082226364758">ফ্ল্যাশ</translation> <translation id="4558551763791394412">আপনার এক্সটেনশানগুলি অক্ষম করে দেখুন।</translation> <translation id="457875822857220463">পৌঁছে দেওয়া</translation> @@ -699,6 +706,7 @@ <translation id="5866257070973731571">ফোন নম্বর যোগ করুন</translation> <translation id="5869405914158311789">এই সাইটটিতে পৌছানো যাচ্ছে না</translation> <translation id="5869522115854928033">সংরক্ষিত পাসওয়ার্ড</translation> +<translation id="5887400589839399685">কার্ড সেভ করা হয়েছে</translation> <translation id="5893752035575986141">ক্রেডিট কার্ড গ্রহণ করা হয়।</translation> <translation id="5908541034548427511"><ph name="TYPE_1" /> (সিঙ্ক হয়েছে)</translation> <translation id="5920262536204764679">{NUM_COOKIES,plural, =1{১টি ব্যবহৃত হচ্ছে}one{#টি ব্যবহৃত হচ্ছে}other{#টি ব্যবহৃত হচ্ছে}}</translation> @@ -817,11 +825,13 @@ <translation id="6948701128805548767">পিকআপ এর পদ্ধতি এবং প্রয়োজনীয়তা দেখতে একটি ঠিকানা বেছে নিন</translation> <translation id="6949872517221025916">পাসওয়ার্ড রিসেট করুন</translation> <translation id="6950684638814147129">JSON মান পার্স করার সময় সমস্যা: <ph name="ERROR" /></translation> +<translation id="6957624206566198865">নতুন ব্যক্তিগত ট্যাবে একটি পৃষ্ঠা খুলুন</translation> <translation id="6957887021205513506">সার্ভারটির শংসাপত্রটি একটি জাল হিসাবে উপস্থিত হয়েছে৷</translation> <translation id="6965382102122355670">ঠিক আছে</translation> <translation id="6965978654500191972">ডিভাইস</translation> <translation id="6970216967273061347">জেলা</translation> <translation id="6973656660372572881">স্থির প্রক্সি সার্ভার এবং .pac স্ক্রিপ্ট URL-এর উভয়ই নির্দিষ্ট আছে৷</translation> +<translation id="6984479912851154518">এক্সটার্নাল অ্যাপ্লিকেশনের মাধ্যমে পেমেন্ট করার জন্য ব্যক্তিগত মোড থেকে বেরিয়ে যাচ্ছে। চালিয়ে যেতে চান?</translation> <translation id="6989763994942163495">উন্নত সেটিংস দেখান ...</translation> <translation id="7012363358306927923">China UnionPay</translation> <translation id="7016992613359344582">এই চার্জটি একবার করা হতে পারে অথবা বারবার করা হতে পারে এবং স্পষ্টভাবে তথ্য নাও থাকতে পারে।</translation> @@ -1072,6 +1082,7 @@ <translation id="8820817407110198400">বুকমার্কস</translation> <translation id="883848425547221593">অন্যান্য বুকমার্ক</translation> <translation id="884264119367021077">শিপিং ঠিকানা</translation> +<translation id="8846319957959474018">বুকমার্ক-এর মাধ্যমে সহজেই অ্যাপ খুলুন</translation> <translation id="884923133447025588">কোন প্রত্যাহার নির্মাণকৌশল পাওয়া যায় নি৷</translation> <translation id="885730110891505394">Google এর সাথে ভাগ করছে</translation> <translation id="8858065207712248076">Chrome-এর নীতি অনুযায়ী আপনার <ph name="BEGIN_BOLD" /><ph name="ORG_NAME" /><ph name="END_BOLD" /> পাসওয়ার্ড বদলে ফেলা উচিত যদি আপনি সেটি অন্য কোনও সাইটে ব্যবহার করে থাকেন।</translation> @@ -1140,6 +1151,7 @@ <translation id="973773823069644502">ডেলিভারি ঠিকানা যোগ করুন</translation> <translation id="975560348586398090">{COUNT,plural, =0{কিছুই নয়}=1{১টি আইটেম}one{#টি আইটেম}other{#টি আইটেম}}</translation> <translation id="981121421437150478">অফলাইন</translation> +<translation id="984275831282074731">পেমেন্ট পদ্ধতি</translation> <translation id="985199708454569384"><p>আপনার কম্পিউটার অথবা মোবাইল ডিভাইসে সঠিক তারিখ এবং সময় সেট করা না থাকলে এই সমস্যাটি হতে পারে।</p> <p>এই সমস্যার সমাধান করতে, ডিভাইসের ঘড়িতে যান। সঠিক তারিখ এবং সময় সেট করুন।</p></translation> <translation id="988159990683914416">ডেভেলপার বিল্ড</translation>
diff --git a/components/strings/components_strings_ca.xtb b/components/strings/components_strings_ca.xtb index e987748d..b472294 100644 --- a/components/strings/components_strings_ca.xtb +++ b/components/strings/components_strings_ca.xtb
@@ -63,6 +63,7 @@ <translation id="129863573139666797"><ph name="BEGIN_LINK" />Esborreu les galetes<ph name="END_LINK" /></translation> <translation id="1314614906530272393">La sessió seleccionada no existeix.</translation> <translation id="1323433172918577554">Mostra'n més</translation> +<translation id="132390688737681464">Desa i emplena les adreces</translation> <translation id="1333989956347591814">És possible que la teva activitat <ph name="BEGIN_EMPHASIS" />continuï sent visible<ph name="END_EMPHASIS" /> en: <ph name="BEGIN_LIST" /> <ph name="LIST_ITEM" />Els llocs web que visitis @@ -110,9 +111,11 @@ <translation id="1645368109819982629">Protocol no admès</translation> <translation id="1655462015569774233">{1,plural, =1{Aquest servidor no ha pogut demostrar que sigui <ph name="DOMAIN" /> perquè el seu certificat de seguretat va caducar ahir. Això pot ser a causa d'una configuració incorrecta o d'un atacant que intercepta la vostra connexió. Actualment, el rellotge del vostre ordinador està configurat amb la data <ph name="CURRENT_DATE" />. És correcta? Si no ho és, corregiu el rellotge del sistema i, a continuació, actualitzeu aquesta pàgina.}other{Aquest servidor no ha pogut demostrar que sigui <ph name="DOMAIN" /> perquè el seu certificat va caducar fa # dies. Això pot ser a causa d'una configuració incorrecta o d'un atacant que intercepta la vostra connexió. Actualment, el rellotge del vostre ordinador està configurat amb la data <ph name="CURRENT_DATE" />. És correcta? Si no ho és, corregiu el rellotge del sistema i, a continuació, actualitzeu aquesta pàgina.}}</translation> <translation id="1656489000284462475">Recollida</translation> +<translation id="1662550410081243962">Desa i emplena les formes de pagament</translation> <translation id="1663943134801823270">Les targetes i les adreces s'obtenen de Chrome. Pots gestionar-les des de <ph name="BEGIN_LINK" />Configuració<ph name="END_LINK" />.</translation> <translation id="1676269943528358898"><ph name="SITE" /> utilitza normalment l'encriptació per protegir la vostra informació. En aquesta ocasió, quan Google Chrome ha provat de connectar-se a <ph name="SITE" />, el lloc web ha enviat credencials poc comunes i incorrectes. Pot ser que un atacant estigui provant de fer-se passar per <ph name="SITE" /> o que una pantalla d'inici de sessió a la xarxa Wi-Fi hagi interromput la connexió. En qualsevol cas, la vostra informació continua estant segura, perquè Google Chrome ha aturat la connexió abans no s'intercanviés cap dada.</translation> <translation id="168841957122794586">El certificat de servidor conté una clau criptogràfica dèbil.</translation> +<translation id="1697532407822776718">Ja esteu a punt</translation> <translation id="1706954506755087368">{1,plural, =1{Aquest servidor no ha pogut demostrar que sigui <ph name="DOMAIN" /> perquè, suposadament, el seu certificat de seguretat té la data de demà. Això pot ser a causa d'una configuració incorrecta o d'un atacant que intercepta la vostra connexió.}other{Aquest servidor no ha pogut demostrar que sigui <ph name="DOMAIN" />; perquè, suposadament, el seu certificat de seguretat té una data que és d'aquí a # dies. Això pot ser a causa d'una configuració incorrecta o d'un atacant que intercepta la vostra connexió.}}</translation> <translation id="1710259589646384581">SO</translation> <translation id="1721312023322545264">Cal que <ph name="NAME" /> et doni permís per visitar aquest lloc</translation> @@ -193,6 +196,7 @@ <translation id="225207911366869382">El valor d'aquesta política és obsolet.</translation> <translation id="2262243747453050782">Error d'HTTP</translation> <translation id="2270484714375784793">Número de telèfon</translation> +<translation id="2283340219607151381">Desa i emplena les adreces</translation> <translation id="2292556288342944218">El vostre accés a Internet està bloquejat</translation> <translation id="2316887270356262533">Allibera menys d'1 MB. És possible que alguns llocs web es carreguin més a poc a poc la propera vegada que els visitis.</translation> <translation id="2317259163369394535"><ph name="DOMAIN" /> requereix un nom d'usuari i una contrasenya.</translation> @@ -274,6 +278,7 @@ <translation id="2851634818064021665">Necessites permís per visitar aquest lloc web</translation> <translation id="2856444702002559011">Pot ser que els atacants provin de robar la teva informació del lloc web <ph name="BEGIN_BOLD" /><ph name="SITE" /><ph name="END_BOLD" /> (per exemple, contrasenyes, missatges o targetes de crèdit). <ph name="BEGIN_LEARN_MORE_LINK" />Més informació<ph name="END_LEARN_MORE_LINK" /></translation> <translation id="2881276955470682203">Vols desar la targeta?</translation> +<translation id="2903493209154104877">Adreces</translation> <translation id="2909946352844186028">S'ha detectat un canvi a la xarxa.</translation> <translation id="2916038427272391327">Tanca altres programes</translation> <translation id="2922350208395188000">No es pot comprovar el certificat del servidor.</translation> @@ -577,7 +582,7 @@ <translation id="5039804452771397117">Permet</translation> <translation id="5040262127954254034">Privadesa</translation> <translation id="5045550434625856497">Contrasenya incorrecta</translation> -<translation id="5056549851600133418">Articles que us poden interessar</translation> +<translation id="5056549851600133418">Articles que et poden interessar</translation> <translation id="5070335125961472645"><ph name="BEGIN_LINK" />Comproveu l'adreça del servidor intermediari<ph name="END_LINK" /></translation> <translation id="5086888986931078152">Pot ser que perdis l'accés al contingut protegit d'alguns llocs web.</translation> <translation id="5087286274860437796">En aquest moment el certificat del servidor no és vàlid.</translation> @@ -1146,6 +1151,7 @@ <translation id="973773823069644502">Afegeix una adreça d'entrega</translation> <translation id="975560348586398090">{COUNT,plural, =0{Cap}=1{1 element}other{# elements}}</translation> <translation id="981121421437150478">Sense connexió</translation> +<translation id="984275831282074731">Formes de pagament</translation> <translation id="985199708454569384"><p>Aquest error es mostra si la data i l'hora de l'ordinador o del dispositiu mòbil són incorrectes.</p> <p>Per solucionar l'error, obriu el rellotge del dispositiu i comproveu que la data i l'hora siguin correctes.</p></translation> <translation id="988159990683914416">Muntatge del desenvolupador</translation>
diff --git a/components/strings/components_strings_cs.xtb b/components/strings/components_strings_cs.xtb index 1fecab4d..394f0d6 100644 --- a/components/strings/components_strings_cs.xtb +++ b/components/strings/components_strings_cs.xtb
@@ -63,6 +63,7 @@ <translation id="129863573139666797"><ph name="BEGIN_LINK" />Zkuste vymazat soubory cookie<ph name="END_LINK" /></translation> <translation id="1314614906530272393">Vybraná relace neexistuje.</translation> <translation id="1323433172918577554">Zobrazit více</translation> +<translation id="132390688737681464">Ukládat a vyplňovat adresy</translation> <translation id="1333989956347591814">Vaše aktivita <ph name="BEGIN_EMPHASIS" />může být nadále viditelná<ph name="END_EMPHASIS" /> pro následující subjekty: <ph name="BEGIN_LIST" /> <ph name="LIST_ITEM" />navštívené weby, @@ -110,9 +111,11 @@ <translation id="1645368109819982629">Nepodporovaný protokol</translation> <translation id="1655462015569774233">{1,plural, =1{Server nedokázal prokázat, že patří doméně <ph name="DOMAIN" />. Platnost jeho bezpečnostního certifikátu včera vypršela. Může to být způsobeno nesprávnou konfigurací nebo tím, že vaše připojení zachytává útočník. Hodiny ve vašem počítači jsou aktuálně nastaveny na <ph name="CURRENT_DATE" />. Je to správně? Pokud ne, měli byste nastavit správné hodiny systému a poté tuto stránku načíst znovu.}few{Server nedokázal prokázat, že patří doméně <ph name="DOMAIN" />. Platnost jeho bezpečnostního certifikátu vypršela před # dny. Může to být způsobeno nesprávnou konfigurací nebo tím, že vaše připojení zachytává útočník. Hodiny ve vašem počítači jsou aktuálně nastaveny na <ph name="CURRENT_DATE" />. Je to správně? Pokud ne, měli byste čas v počítači opravit a poté tuto stránku načíst znovu.}many{Server nedokázal prokázat, že patří doméně <ph name="DOMAIN" />. Platnost jeho bezpečnostního certifikátu vypršela před # dnem. Může to být způsobeno nesprávnou konfigurací nebo tím, že vaše připojení zachytává útočník. Hodiny ve vašem počítači jsou aktuálně nastaveny na <ph name="CURRENT_DATE" />. Je to správně? Pokud ne, měli byste nastavit správné hodiny systému a poté tuto stránku načíst znovu.}other{Server nedokázal prokázat, že patří doméně <ph name="DOMAIN" />. Platnost jeho bezpečnostního certifikátu vypršela před # dny. Může to být způsobeno nesprávnou konfigurací nebo tím, že vaše připojení zachytává útočník. Hodiny ve vašem počítači jsou aktuálně nastaveny na <ph name="CURRENT_DATE" />. Je to správně? Pokud ne, měli byste nastavit správné hodiny systému a poté tuto stránku načíst znovu.}}</translation> <translation id="1656489000284462475">Vyzvednutí</translation> +<translation id="1662550410081243962">Ukládat a vyplňovat platební metody</translation> <translation id="1663943134801823270">Karty a adresy pocházejí z Chromu. Můžete je spravovat v <ph name="BEGIN_LINK" />Nastavení<ph name="END_LINK" />.</translation> <translation id="1676269943528358898">Web <ph name="SITE" /> vaše informace běžně chrání šifrováním. Když se prohlížeč Chrome k webu <ph name="SITE" /> pokusil připojit tentokrát, web vrátil neobvyklé a nesprávné identifikační údaje. K tomuto problému může dojít, pokud se za web <ph name="SITE" /> pokouší vydávat nějaký útočník nebo pokud bylo připojení přerušeno přihlašovací obrazovkou sítě Wi-Fi. Vaše informace jsou i nadále v bezpečí, protože prohlížeč Google Chrome připojení přerušil dříve, než došlo k odeslání jakýchkoliv dat.</translation> <translation id="168841957122794586">Certifikát serveru obsahuje slabý kryptografický klíč.</translation> +<translation id="1697532407822776718">Vše je nastaveno!</translation> <translation id="1706954506755087368">{1,plural, =1{Server nedokázal prokázat, že patří doméně <ph name="DOMAIN" />. Uvedené datum vystavení jeho bezpečnostního certifikátu je zítra. Může to být způsobeno nesprávnou konfigurací nebo tím, že vaše připojení zachytává útočník.}few{Server nedokázal prokázat, že patří doméně <ph name="DOMAIN" />. Uvedené datum vystavení jeho bezpečnostního certifikátu je až za # dny. Může to být způsobeno nesprávnou konfigurací nebo tím, že vaše připojení zachytává útočník.}many{Server nedokázal prokázat, že patří doméně <ph name="DOMAIN" />. Uvedené datum vystavení jeho bezpečnostního certifikátu je až za # dne. Může to být způsobeno nesprávnou konfigurací nebo tím, že vaše připojení zachytává útočník.}other{Server nedokázal prokázat, že patří doméně <ph name="DOMAIN" />. Uvedené datum vystavení jeho bezpečnostního certifikátu je až za # dní. Může to být způsobeno nesprávnou konfigurací nebo tím, že vaše připojení zachytává útočník.}}</translation> <translation id="1710259589646384581">Operační systém</translation> <translation id="1721312023322545264">Zdá se, že k návštěvě tohoto webu potřebujete povolení od správce <ph name="NAME" /></translation> @@ -193,6 +196,7 @@ <translation id="225207911366869382">Tato hodnota již pro tuto zásadu není podporována.</translation> <translation id="2262243747453050782">Chyba protokolu HTTP</translation> <translation id="2270484714375784793">Telefonní číslo</translation> +<translation id="2283340219607151381">Ukládat a vyplňovat adresy</translation> <translation id="2292556288342944218">Vaše připojení k internetu je blokováno</translation> <translation id="2316887270356262533">Uvolní více než 1 MB. Je možné, že se některé weby při příští návštěvě budou načítat pomaleji.</translation> <translation id="2317259163369394535">Doména <ph name="DOMAIN" /> vyžaduje zadání uživatelského jména a hesla.</translation> @@ -274,6 +278,7 @@ <translation id="2851634818064021665">K návštěvě tohoto webu potřebujete povolení</translation> <translation id="2856444702002559011">Útočníci se mohou pokusit odcizit vaše údaje na webu <ph name="BEGIN_BOLD" /><ph name="SITE" /><ph name="END_BOLD" /> (například hesla, zprávy nebo informace o platebních kartách). <ph name="BEGIN_LEARN_MORE_LINK" />Další informace<ph name="END_LEARN_MORE_LINK" /></translation> <translation id="2881276955470682203">Uložit kartu?</translation> +<translation id="2903493209154104877">Adresy</translation> <translation id="2909946352844186028">Byla zjištěna změna sítě.</translation> <translation id="2916038427272391327">Zavřete ostatní programy</translation> <translation id="2922350208395188000">Certifikát serveru nelze zkontrolovat.</translation> @@ -1142,6 +1147,7 @@ <translation id="973773823069644502">Přidat adresu doručení</translation> <translation id="975560348586398090">{COUNT,plural, =0{Žádné}=1{1 položka}few{# položky}many{# položky}other{# položek}}</translation> <translation id="981121421437150478">Offline</translation> +<translation id="984275831282074731">Platební metody</translation> <translation id="985199708454569384"><p>Tato chyba se zobrazuje, pokud máte v počítači nebo mobilním zařízení nastaveno nepřesné datum a čas.</p> <p>Chcete-li tuto chybu odstranit, otevřete v zařízení hodiny. Zkontrolujte, zda jsou datum a čas nastaveny správně.</p></translation> <translation id="988159990683914416">Vývojářské sestavení</translation>
diff --git a/components/strings/components_strings_da.xtb b/components/strings/components_strings_da.xtb index 2bb7d49..945adfb 100644 --- a/components/strings/components_strings_da.xtb +++ b/components/strings/components_strings_da.xtb
@@ -63,6 +63,7 @@ <translation id="129863573139666797"><ph name="BEGIN_LINK" />Prøv at rydde dine cookies<ph name="END_LINK" /></translation> <translation id="1314614906530272393">Den valgte session findes ikke.</translation> <translation id="1323433172918577554">Se flere</translation> +<translation id="132390688737681464">Gem og udfyld adresser</translation> <translation id="1333989956347591814">Din aktivitet <ph name="BEGIN_EMPHASIS" />er muligvis stadig synlig<ph name="END_EMPHASIS" /> for: <ph name="BEGIN_LIST" /> <ph name="LIST_ITEM" />Websites, du besøger @@ -110,9 +111,11 @@ <translation id="1645368109819982629">Ikke-understøttet protokol</translation> <translation id="1655462015569774233">{1,plural, =1{Denne server kunne ikke bevise, at den er <ph name="DOMAIN" />, da dens sikkerhedscertifikat udløb i går. Dette kan skyldes en fejlkonfiguration, eller at en hacker har opfanget din forbindelse. Computerens ur er angivet til <ph name="CURRENT_DATE" />. Er det korrekt? Hvis ikke, skal du rette systemets ur og derefter opdatere denne side.}one{Denne server kunne ikke bevise, at den er <ph name="DOMAIN" />, da dens sikkerhedscertifikat udløb for # dag siden. Dette kan skyldes en fejlkonfiguration, eller at en hacker har opfanget din forbindelse. Computerens ur er angivet til <ph name="CURRENT_DATE" />. Er det korrekt? Hvis ikke, skal du rette systemets ur og derefter opdatere denne side.}other{Denne server kunne ikke bevise, at den er <ph name="DOMAIN" />, da dens sikkerhedscertifikat udløb for # dage siden. Dette kan skyldes en fejlkonfiguration, eller at en hacker har opfanget din forbindelse. Computerens ur er angivet til <ph name="CURRENT_DATE" />. Er det korrekt? Hvis ikke, skal du rette systemets ur og derefter opdatere denne side.}}</translation> <translation id="1656489000284462475">Afhentning</translation> +<translation id="1662550410081243962">Gem og udfyld betalingsmetoder</translation> <translation id="1663943134801823270">Kort og adresser er fra Chrome. Du kan administrere dem i <ph name="BEGIN_LINK" />Indstillinger<ph name="END_LINK" />.</translation> <translation id="1676269943528358898"><ph name="SITE" /> bruger normalt kryptering til at beskytte dine oplysninger. Da Google Chrome forsøgte at oprette forbindelse til <ph name="SITE" /> denne gang, returnerede websitet usædvanlige og forkerte legitimationsoplysninger. Dette kan skyldes, at en hacker forsøger at udgive sig for at være <ph name="SITE" />, eller at en Wi-Fi-loginskærm har forstyrret forbindelsen. Dine oplysninger er stadig sikre, idet Google Chrome afbrød forbindelsen, inden der blev udvekslet data.</translation> <translation id="168841957122794586">Servercertifikatet indeholder en svag kryptografisk nøgle.</translation> +<translation id="1697532407822776718">Fuldført</translation> <translation id="1706954506755087368">{1,plural, =1{Denne server kunne ikke bevise, at den er <ph name="DOMAIN" />, da dens sikkerhedscertifikat tilsyneladende først gælder fra i morgen. Dette kan skyldes en fejlkonfiguration, eller at en hacker har opfanget din forbindelse.}one{Denne server kunne ikke bevise, at den er <ph name="DOMAIN" />, da dens sikkerhedscertifikat tilsyneladende først gælder fra om # dag. Dette kan skyldes en fejlkonfiguration, eller at en hacker har opfanget din forbindelse.}other{Denne server kunne ikke bevise, at den er <ph name="DOMAIN" />, da dens sikkerhedscertifikat tilsyneladende først gælder fra om # dage. Dette kan skyldes en fejlkonfiguration, eller at en hacker har opfanget din forbindelse.}}</translation> <translation id="1710259589646384581">OS</translation> <translation id="1721312023322545264">Du skal have tilladelse fra <ph name="NAME" /> til at besøge dette website</translation> @@ -193,6 +196,7 @@ <translation id="225207911366869382">Denne værdi er forældet for denne politik.</translation> <translation id="2262243747453050782">HTTP-fejl</translation> <translation id="2270484714375784793">Telefonnummer</translation> +<translation id="2283340219607151381">Gem og udfyld adresser</translation> <translation id="2292556288342944218">Din internetadgang er blokeret</translation> <translation id="2316887270356262533">Frigiver over 1 MB. Nogle websites indlæses muligvis langsommere under dit næste besøg.</translation> <translation id="2317259163369394535"><ph name="DOMAIN" /> kræver et brugernavn og en adgangskode.</translation> @@ -274,6 +278,7 @@ <translation id="2851634818064021665">Du skal have tilladelse til at besøge dette website</translation> <translation id="2856444702002559011">Brugere med ondsindede hensigter kan forsøge at stjæle dine oplysninger fra <ph name="BEGIN_BOLD" /><ph name="SITE" /><ph name="END_BOLD" /> (f.eks. adgangskoder, beskeder eller kreditkort). <ph name="BEGIN_LEARN_MORE_LINK" />Få flere oplysninger<ph name="END_LEARN_MORE_LINK" /></translation> <translation id="2881276955470682203">Vil du gemme kortet?</translation> +<translation id="2903493209154104877">Adresser</translation> <translation id="2909946352844186028">Der blev registreret en netværksændring.</translation> <translation id="2916038427272391327">Luk andre programmer</translation> <translation id="2922350208395188000">Serverens certifikat kan ikke kontrolleres.</translation> @@ -1147,6 +1152,7 @@ <translation id="973773823069644502">Tilføj leveringsadresse</translation> <translation id="975560348586398090">{COUNT,plural, =0{Ingen}=1{1 element}one{# element}other{# elementer}}</translation> <translation id="981121421437150478">Offline</translation> +<translation id="984275831282074731">Betalingsmetoder</translation> <translation id="985199708454569384"><p>Denne fejlmeddelelse vises, hvis dato og klokkeslæt på din computer eller mobilenhed er forkerte.</p> <p>Ret fejlen ved at åbne uret på din enhed. Sørg for, at dato og klokkeslæt er indstillet korrekt.</p></translation> <translation id="988159990683914416">Udviklerversion</translation>
diff --git a/components/strings/components_strings_de.xtb b/components/strings/components_strings_de.xtb index 74a9f3c..709a280 100644 --- a/components/strings/components_strings_de.xtb +++ b/components/strings/components_strings_de.xtb
@@ -63,6 +63,7 @@ <translation id="129863573139666797"><ph name="BEGIN_LINK" />Löschen Sie Ihre Cookies<ph name="END_LINK" /></translation> <translation id="1314614906530272393">Die ausgewählte Sitzung existiert nicht.</translation> <translation id="1323433172918577554">Mehr anzeigen</translation> +<translation id="132390688737681464">Adressen speichern und ausfüllen</translation> <translation id="1333989956347591814">Ihre Aktivitäten <ph name="BEGIN_EMPHASIS" />sind eventuell weiterhin sichtbar<ph name="END_EMPHASIS" /> für: <ph name="BEGIN_LIST" /> <ph name="LIST_ITEM" />Von Ihnen besuchte Websites @@ -110,9 +111,11 @@ <translation id="1645368109819982629">Nicht unterstütztes Protokoll</translation> <translation id="1655462015569774233">{1,plural, =1{Dieser Server konnte nicht beweisen, dass er <ph name="DOMAIN" /> ist. Sein Sicherheitszertifikat ist gestern abgelaufen. Mögliche Gründe sind eine fehlerhafte Konfiguration oder ein Angreifer, der Ihre Verbindung abfängt. Die Uhr Ihres Computers ist derzeit auf <ph name="CURRENT_DATE" /> eingestellt. Ist das korrekt? Falls nicht, stellen Sie die Uhr Ihres Systems richtig ein und aktualisieren Sie anschließend diese Seite.}other{Dieser Server konnte nicht beweisen, dass er <ph name="DOMAIN" /> ist. Sein Sicherheitszertifikat ist vor # Tagen abgelaufen. Mögliche Gründe sind eine fehlerhafte Konfiguration oder ein Angreifer, der Ihre Verbindung abfängt. Die Uhr Ihres Computers ist derzeit auf <ph name="CURRENT_DATE" /> eingestellt. Ist das korrekt? Falls nicht, stellen Sie die Uhr Ihres Systems richtig ein und aktualisieren Sie anschließend diese Seite.}}</translation> <translation id="1656489000284462475">Abholung</translation> +<translation id="1662550410081243962">Zahlungsmethode speichern und ausfüllen</translation> <translation id="1663943134801823270">Die Karten und Adressen stammen aus Chrome. Sie werden in den <ph name="BEGIN_LINK" />Einstellungen<ph name="END_LINK" /> verwaltet.</translation> <translation id="1676269943528358898"><ph name="SITE" /> schützt Ihre Daten in der Regel durch Verschlüsselung. Als Google Chrome dieses Mal versuchte, eine Verbindung zu <ph name="SITE" /> herzustellen, gab die Website ungewöhnliche und falsche Anmeldedaten zurück. Entweder versucht ein Angreifer, sich als <ph name="SITE" /> auszugeben, oder die Verbindung wurde durch eine WLAN-Anmeldeseite unterbrochen. Da Google Chrome die Verbindung vor dem Austausch von Daten unterbrochen hat, sind Ihre Informationen weiterhin sicher.</translation> <translation id="168841957122794586">Das Serverzertifikat weist einen schwachen kryptografischen Schlüssel auf.</translation> +<translation id="1697532407822776718">Fertig!</translation> <translation id="1706954506755087368">{1,plural, =1{Dieser Server konnte nicht beweisen, dass er <ph name="DOMAIN" /> ist. Sein Sicherheitszertifikat gilt vermutlich erst ab morgen. Mögliche Gründe sind eine fehlerhafte Konfiguration oder ein Angreifer, der Ihre Verbindung abfängt.}other{Dieser Server konnte nicht beweisen, dass er <ph name="DOMAIN" /> ist. Sein Sicherheitszertifikat gilt vermutlich erst in # Tagen. Mögliche Gründe sind eine fehlerhafte Konfiguration oder ein Angreifer, der Ihre Verbindung abfängt.}}</translation> <translation id="1710259589646384581">Betriebssystem</translation> <translation id="1721312023322545264">Du benötigst die Berechtigung von <ph name="NAME" />, um diese Website zu besuchen</translation> @@ -193,6 +196,7 @@ <translation id="225207911366869382">Dieser Wert für die Richtlinie ist veraltet.</translation> <translation id="2262243747453050782">HTTP-Fehler</translation> <translation id="2270484714375784793">Telefonnummer</translation> +<translation id="2283340219607151381">Adressen speichern und ausfüllen</translation> <translation id="2292556288342944218">Ihre Internetverbindung ist gesperrt</translation> <translation id="2316887270356262533">Es werden weniger als 1 MB Speicherplatz freigegeben. Manche Websites werden beim nächsten Öffnen eventuell langsamer geladen.</translation> <translation id="2317259163369394535">Für <ph name="DOMAIN" /> sind ein Nutzername und ein Passwort erforderlich.</translation> @@ -274,6 +278,7 @@ <translation id="2851634818064021665">Sie benötigen eine Berechtigung, um auf diese Website zuzugreifen</translation> <translation id="2856444702002559011">Hacker könnten versuchen, Ihre Daten von <ph name="BEGIN_BOLD" /><ph name="SITE" /><ph name="END_BOLD" /> zu stehlen, zum Beispiel Passwörter, Nachrichten oder Kreditkartendaten. <ph name="BEGIN_LEARN_MORE_LINK" />Weitere Informationen<ph name="END_LEARN_MORE_LINK" /></translation> <translation id="2881276955470682203">Karte speichern?</translation> +<translation id="2903493209154104877">Adressen</translation> <translation id="2909946352844186028">Eine Netzwerkänderung ist aufgetreten.</translation> <translation id="2916038427272391327">Andere Programme schließen</translation> <translation id="2922350208395188000">Das Serverzertifikat kann nicht überprüft werden.</translation> @@ -1147,6 +1152,7 @@ <translation id="973773823069644502">Lieferadresse hinzufügen</translation> <translation id="975560348586398090">{COUNT,plural, =0{Keine}=1{1 Eintrag}other{# Einträge}}</translation> <translation id="981121421437150478">Offline</translation> +<translation id="984275831282074731">Zahlungsmethoden</translation> <translation id="985199708454569384"><p>Diese Fehlermeldung wird angezeigt, wenn das Datum bzw. die Uhrzeit auf Ihrem Computer oder Mobilgerät nicht korrekt ist.</p> <p>Korrigieren Sie in den Geräteeinstellungen die Uhrzeit und das Datum, um den Fehler zu beheben.</p></translation> <translation id="988159990683914416">Entwickler-Build</translation>
diff --git a/components/strings/components_strings_el.xtb b/components/strings/components_strings_el.xtb index 90a9fbc..acc8949 100644 --- a/components/strings/components_strings_el.xtb +++ b/components/strings/components_strings_el.xtb
@@ -63,6 +63,7 @@ <translation id="129863573139666797"><ph name="BEGIN_LINK" />Δοκιμάστε να διαγράψετε τα cookie σας<ph name="END_LINK" /></translation> <translation id="1314614906530272393">Η επιλεγμένη περίοδος λειτουργίας δεν υπάρχει.</translation> <translation id="1323433172918577554">Εμφάνιση περισσότερων</translation> +<translation id="132390688737681464">Αποθήκευση και συμπλήρωση διευθύνσεων</translation> <translation id="1333989956347591814">Η δραστηριότητά σας <ph name="BEGIN_EMPHASIS" />μπορεί να εξακολουθήσει να είναι ορατή<ph name="END_EMPHASIS" />: <ph name="BEGIN_LIST" /> <ph name="LIST_ITEM" />Στους ιστοτόπους που επισκέπτεστε @@ -110,9 +111,11 @@ <translation id="1645368109819982629">Μη υποστηριζόμενο πρωτόκολλο</translation> <translation id="1655462015569774233">{1,plural, =1{Αυτός ο διακομιστής δεν μπόρεσε να αποδείξει ότι είναι το <ph name="DOMAIN" />. Το πιστοποιητικό ασφαλείας του έληξε χθες. Αυτό μπορεί να οφείλεται σε εσφαλμένη ρύθμιση ή σε κάποιον εισβολέα που παρεμβαίνει στη σύνδεσή σας. Το ρολόι του υπολογιστή σας αυτήν τη στιγμή είναι ρυθμισμένο στην ημερομηνία <ph name="CURRENT_DATE" />. Είναι σωστή αυτή η ρύθμιση; Εάν όχι, θα πρέπει να διορθώσετε το ρολόι του συστήματός σας και έπειτα να ανανεώσετε αυτήν τη σελίδα.}other{Αυτός ο διακομιστής δεν μπόρεσε να αποδείξει ότι είναι το <ph name="DOMAIN" />. Το πιστοποιητικό ασφαλείας του έληξε πριν από # ημέρες. Αυτό μπορεί να οφείλεται σε εσφαλμένη ρύθμιση ή σε κάποιον εισβολέα που παρεμβαίνει στη σύνδεσή σας. Το ρολόι του υπολογιστή σας αυτήν τη στιγμή είναι ρυθμισμένο στην ημερομηνία <ph name="CURRENT_DATE" />. Είναι σωστή αυτή η ρύθμιση; Εάν όχι, θα πρέπει να διορθώσετε το ρολόι του συστήματός σας και έπειτα να ανανεώσετε αυτήν τη σελίδα.}}</translation> <translation id="1656489000284462475">Παραλαβή</translation> +<translation id="1662550410081243962">Αποθήκευση και συμπλήρωση τρόπων πληρωμής</translation> <translation id="1663943134801823270">Οι κάρτες και οι διευθύνσεις προέρχονται από το Chrome. Μπορείτε να τις διαχειριστείτε στις <ph name="BEGIN_LINK" />Ρυθμίσεις<ph name="END_LINK" />.</translation> <translation id="1676269943528358898">Κανονικά, ο ιστότοπος <ph name="SITE" /> χρησιμοποιεί κρυπτογράφηση για να προστατεύει τα στοιχεία σας. Όταν το Google Chrome επιχείρησε πρόσφατα να συνδεθεί στο <ph name="SITE" />, ο ιστότοπος ανταποκρίθηκε δημιουργώντας ασυνήθιστα και εσφαλμένα διαπιστευτήρια. Αυτό μπορεί να συμβεί όταν κάποιος εισβολέας προσπαθεί να υποκριθεί ότι είναι ο ιστότοπος <ph name="SITE" /> ή όταν κάποια οθόνη σύνδεσης Wi-Fi έχει διακόψει τη σύνδεσή σας. Τα στοιχεία σας εξακολουθούν να είναι ασφαλή επειδή το Google Chrome διέκοψε τη σύνδεση πριν από την ανταλλαγή δεδομένων.</translation> <translation id="168841957122794586">Το πιστοποιητικό διακομιστή περιέχει ένα αδύναμο κρυπτογραφικό κλειδί.</translation> +<translation id="1697532407822776718">Είστε έτοιμοι!</translation> <translation id="1706954506755087368">{1,plural, =1{Αυτός ο διακομιστής δεν μπόρεσε να αποδείξει ότι είναι το <ph name="DOMAIN" />. Η ημερομηνία του πιστοποιητικού ασφαλείας του υποτίθεται ότι είναι αυριανή. Αυτό μπορεί να οφείλεται σε εσφαλμένη ρύθμιση ή σε κάποιον εισβολέα που παρεμβαίνει στη σύνδεσή σας.}other{Αυτός ο διακομιστής δεν μπόρεσε να αποδείξει ότι είναι το <ph name="DOMAIN" />. Η ημερομηνία του πιστοποιητικού ασφαλείας του υποτίθεται ότι είναι από # ημέρες μετά. Αυτό μπορεί να οφείλεται σε εσφαλμένη ρύθμιση ή σε κάποιον εισβολέα που παρεμβαίνει στη σύνδεσή σας.}}</translation> <translation id="1710259589646384581">OS</translation> <translation id="1721312023322545264">Για να επισκεφτείτε αυτήν τη σελίδα, χρειάζεστε άδεια από τον διαχειριστή <ph name="NAME" /></translation> @@ -193,6 +196,7 @@ <translation id="225207911366869382">Αυτή η πολιτική έχει καταργηθεί για τη συγκεκριμένη πολιτική.</translation> <translation id="2262243747453050782">Σφάλμα HTTP</translation> <translation id="2270484714375784793">Αριθμός τηλεφώνου</translation> +<translation id="2283340219607151381">Αποθήκευση και συμπλήρωση διευθύνσεων</translation> <translation id="2292556288342944218">Η πρόσβασή σας στο διαδίκτυο είναι αποκλεισμένη</translation> <translation id="2316887270356262533">Απελευθερώνει λιγότερο από 1 MB. Ορισμένοι ιστότοποι μπορεί να φορτωθούν πιο αργά κατά την επόμενη επίσκεψή σας.</translation> <translation id="2317259163369394535">Ο τομέας <ph name="DOMAIN" /> απαιτεί ένα όνομα χρήστη και έναν κωδικό πρόσβασης.</translation> @@ -274,6 +278,7 @@ <translation id="2851634818064021665">Απαιτείται άδεια για να επισκεφτείτε αυτόν τον ιστότοπο</translation> <translation id="2856444702002559011">Οι εισβολείς ενδέχεται να προσπαθήσουν να υποκλέψουν τα στοιχεία σας από τον ιστότοπο <ph name="BEGIN_BOLD" /><ph name="SITE" /><ph name="END_BOLD" /> (για παράδειγμα, κωδικούς πρόσβασης, μηνύματα ή πιστωτικές κάρτες). <ph name="BEGIN_LEARN_MORE_LINK" />Μάθετε περισσότερα<ph name="END_LEARN_MORE_LINK" /></translation> <translation id="2881276955470682203">Αποθήκευση κάρτας;</translation> +<translation id="2903493209154104877">Διευθύνσεις</translation> <translation id="2909946352844186028">Εντοπίστηκε μια αλλαγή δικτύου.</translation> <translation id="2916038427272391327">Κλείστε τα άλλα προγράμματα</translation> <translation id="2922350208395188000">Δεν είναι δυνατός ο έλεγχος του πιστοποιητικού του διακομιστή.</translation> @@ -1148,6 +1153,7 @@ <translation id="973773823069644502">Προσθήκη διεύθυνσης παράδοσης</translation> <translation id="975560348586398090">{COUNT,plural, =0{Κανένα}=1{1 στοιχείο}other{# στοιχεία}}</translation> <translation id="981121421437150478">Εκτός σύνδεσης</translation> +<translation id="984275831282074731">Τρόποι πληρωμής</translation> <translation id="985199708454569384"><p>Αυτό το σφάλμα θα εμφανιστεί εάν η ημερομηνία και η ώρα του υπολογιστή ή της κινητής συσκευής σας είναι ανακριβείς.</p> <p>Για να διορθώσετε το σφάλμα, ανοίξτε το ρολόι της συσκευής. Βεβαιωθείτε ότι η ώρα και η ημερομηνία είναι σωστές.</p></translation> <translation id="988159990683914416">Έκδοση προγραμματιστή</translation>
diff --git a/components/strings/components_strings_en-GB.xtb b/components/strings/components_strings_en-GB.xtb index 4ad2ff5fb..dffac0d 100644 --- a/components/strings/components_strings_en-GB.xtb +++ b/components/strings/components_strings_en-GB.xtb
@@ -63,6 +63,7 @@ <translation id="129863573139666797"><ph name="BEGIN_LINK" />Try clearing your cookies<ph name="END_LINK" /></translation> <translation id="1314614906530272393">The selected session does not exist.</translation> <translation id="1323433172918577554">Show More</translation> +<translation id="132390688737681464">Save and Fill Addresses</translation> <translation id="1333989956347591814">Your activity <ph name="BEGIN_EMPHASIS" />might still be visible<ph name="END_EMPHASIS" /> to: <ph name="BEGIN_LIST" /> <ph name="LIST_ITEM" />Websites that you visit @@ -110,9 +111,11 @@ <translation id="1645368109819982629">Unsupported protocol</translation> <translation id="1655462015569774233">{1,plural, =1{This server could not prove that it is <ph name="DOMAIN" />; its security certificate expired yesterday. This may be caused by a misconfiguration or an attacker intercepting your connection. Your computer's clock is currently set to <ph name="CURRENT_DATE" />. Does that look right? If not, you should correct your system's clock and then refresh this page.}other{This server could not prove that it is <ph name="DOMAIN" />; its security certificate expired # days ago. This may be caused by a misconfiguration or an attacker intercepting your connection. Your computer's clock is currently set to <ph name="CURRENT_DATE" />. Does that look right? If not, you should correct your system's clock and then refresh this page.}}</translation> <translation id="1656489000284462475">Pick up</translation> +<translation id="1662550410081243962">Save and fill payment methods</translation> <translation id="1663943134801823270">Cards and addresses are from Chrome. You can manage them in <ph name="BEGIN_LINK" />Settings<ph name="END_LINK" />.</translation> <translation id="1676269943528358898"><ph name="SITE" /> normally uses encryption to protect your information. When Google Chrome tried to connect to <ph name="SITE" /> this time, the website sent back unusual and incorrect credentials. This may happen when an attacker is trying to pretend to be <ph name="SITE" />, or a Wi-Fi sign-in screen has interrupted the connection. Your information is still secure because Google Chrome stopped the connection before any data was exchanged.</translation> <translation id="168841957122794586">The server certificate contains a weak cryptographic key.</translation> +<translation id="1697532407822776718">You're all set!</translation> <translation id="1706954506755087368">{1,plural, =1{This server could not prove that it is <ph name="DOMAIN" />; its security certificate is supposedly from tomorrow. This may be caused by a misconfiguration or an attacker intercepting your connection.}other{This server could not prove that it is <ph name="DOMAIN" />; its security certificate is supposedly from # days in the future. This may be caused by a misconfiguration or an attacker intercepting your connection.}}</translation> <translation id="1710259589646384581">OS</translation> <translation id="1721312023322545264">You need permission from <ph name="NAME" /> to visit this site</translation> @@ -193,6 +196,7 @@ <translation id="225207911366869382">This value is deprecated for this policy.</translation> <translation id="2262243747453050782">HTTP error</translation> <translation id="2270484714375784793">Phone number</translation> +<translation id="2283340219607151381">Save and fill addresses</translation> <translation id="2292556288342944218">Your Internet access is blocked</translation> <translation id="2316887270356262533">Frees up less than 1 MB. Some sites may load more slowly on your next visit.</translation> <translation id="2317259163369394535"><ph name="DOMAIN" /> requires a username and password.</translation> @@ -274,6 +278,7 @@ <translation id="2851634818064021665">You need permission to visit this site</translation> <translation id="2856444702002559011">Attackers might be trying to steal your information from <ph name="BEGIN_BOLD" /><ph name="SITE" /><ph name="END_BOLD" /> (for example, passwords, messages or credit cards). <ph name="BEGIN_LEARN_MORE_LINK" />Learn more<ph name="END_LEARN_MORE_LINK" /></translation> <translation id="2881276955470682203">Save card?</translation> +<translation id="2903493209154104877">Addresses</translation> <translation id="2909946352844186028">A network change was detected.</translation> <translation id="2916038427272391327">Close other programmes</translation> <translation id="2922350208395188000">Server's certificate cannot be checked.</translation> @@ -1146,6 +1151,7 @@ <translation id="973773823069644502">Add delivery address</translation> <translation id="975560348586398090">{COUNT,plural, =0{None}=1{1 item}other{# items}}</translation> <translation id="981121421437150478">Offline</translation> +<translation id="984275831282074731">Payment methods</translation> <translation id="985199708454569384"><p>You'll see this error if your computer or mobile device's date and time are inaccurate.</p> <p>To fix the error, open your device's clock. Make sure that the time and date are correct.</p></translation> <translation id="988159990683914416">Developer Build</translation>
diff --git a/components/strings/components_strings_es-419.xtb b/components/strings/components_strings_es-419.xtb index 20869366..3c4ef17 100644 --- a/components/strings/components_strings_es-419.xtb +++ b/components/strings/components_strings_es-419.xtb
@@ -63,6 +63,7 @@ <translation id="129863573139666797"><ph name="BEGIN_LINK" />Intenta borrar tus cookies<ph name="END_LINK" /></translation> <translation id="1314614906530272393">La sesión seleccionada no existe.</translation> <translation id="1323433172918577554">Mostrar más</translation> +<translation id="132390688737681464">Guardar y completar direcciones</translation> <translation id="1333989956347591814">Es posible que tu actividad <ph name="BEGIN_EMPHASIS" />todavía sea visible<ph name="END_EMPHASIS" /> para: <ph name="BEGIN_LIST" /> <ph name="LIST_ITEM" />Los sitios web que visitas @@ -110,9 +111,11 @@ <translation id="1645368109819982629">Protocolo no compatible</translation> <translation id="1655462015569774233">{1,plural, =1{El servidor no logró comprobar si el dominio es <ph name="DOMAIN" />; el certificado de seguridad venció ayer. Es posible que esto se deba a una configuración incorrecta o a que un atacante haya interceptado la conexión. Actualmente, el reloj de la computadora está configurado en la siguiente fecha: <ph name="CURRENT_DATE" />. ¿Es correcto? De no ser así, corrige el reloj del sistema y, a continuación, actualiza la página.}other{El servidor no logró comprobar si el dominio es <ph name="DOMAIN" />; el certificado de seguridad venció hace # días. Es posible que esto se deba a una configuración incorrecta o a que un atacante haya interceptado la conexión. Actualmente, el reloj de la computadora está configurado en la siguiente fecha: <ph name="CURRENT_DATE" />. ¿Es correcto? De no ser así, corrige el reloj del sistema y, a continuación, actualiza la página.}}</translation> <translation id="1656489000284462475">Retiro</translation> +<translation id="1662550410081243962">Guardar y completar formas de pago</translation> <translation id="1663943134801823270">Las tarjetas y direcciones provienen de Chrome. Puedes administrarlas en <ph name="BEGIN_LINK" />Configuración<ph name="END_LINK" />.</translation> <translation id="1676269943528358898"><ph name="SITE" /> suele utilizar la encriptación para proteger la información. Cuando Google Chrome intentó conectarse a <ph name="SITE" />, el sitio web devolvió credenciales incorrectas y poco comunes. Es posible que un atacante quiera suplantar a <ph name="SITE" /> o que una pantalla de acceso Wi-Fi haya interrumpido la conexión. Tu información permanece segura porque Google Chrome detuvo la conexión para evitar el intercambio de datos.</translation> <translation id="168841957122794586">El certificado del servidor contiene una clave criptográfica no segura.</translation> +<translation id="1697532407822776718">¡Listo!</translation> <translation id="1706954506755087368">{1,plural, =1{El servidor no logró comprobar si el dominio es <ph name="DOMAIN" />; supuestamente, el certificado de seguridad entra en vigencia mañana. Es posible que esto se deba a una configuración incorrecta o a que un atacante haya interceptado la conexión.}other{El servidor no logró comprobar si el dominio es <ph name="DOMAIN" />; supuestamente, el certificado de seguridad entra en vigencia en # días. Es posible que esto se deba a una configuración incorrecta o a que un atacante haya interceptado la conexión.}}</translation> <translation id="1710259589646384581">SO</translation> <translation id="1721312023322545264">Necesitas permiso de <ph name="NAME" /> para visitar este sitio</translation> @@ -193,6 +196,7 @@ <translation id="225207911366869382">Este valor ya no se utiliza para esta política.</translation> <translation id="2262243747453050782">Error de HTTP</translation> <translation id="2270484714375784793">Número de teléfono</translation> +<translation id="2283340219607151381">Guardar y completar direcciones</translation> <translation id="2292556288342944218">Se bloqueó tu acceso a Internet</translation> <translation id="2316887270356262533">Esta acción libera menos de 1 MB. Es posible que algunos sitios se carguen más lento en tu próxima visita.</translation> <translation id="2317259163369394535"><ph name="DOMAIN" /> requiere un nombre de usuario y una contraseña.</translation> @@ -274,6 +278,7 @@ <translation id="2851634818064021665">Necesitas permiso para visitar este sitio</translation> <translation id="2856444702002559011">Es posible que algunos atacantes intenten robar tu información de <ph name="BEGIN_BOLD" /><ph name="SITE" /><ph name="END_BOLD" /> (p. ej., contraseñas, mensajes o tarjetas de crédito). <ph name="BEGIN_LEARN_MORE_LINK" />Más información<ph name="END_LEARN_MORE_LINK" /></translation> <translation id="2881276955470682203">¿Quieres guardar la tarjeta?</translation> +<translation id="2903493209154104877">Direcciones</translation> <translation id="2909946352844186028">Se detectó un cambio de red.</translation> <translation id="2916038427272391327">Cierra los demás programas.</translation> <translation id="2922350208395188000">No se puede comprobar el certificado del servidor.</translation> @@ -1148,6 +1153,7 @@ <translation id="973773823069644502">Agregar dirección de entrega</translation> <translation id="975560348586398090">{COUNT,plural, =0{Ninguno}=1{1 elemento}other{# elementos}}</translation> <translation id="981121421437150478">Sin conexión</translation> +<translation id="984275831282074731">Formas de pago</translation> <translation id="985199708454569384"><p>Este error se muestra si la fecha y hora de tu computadora o dispositivo móvil son incorrectas.</p> <p>Para solucionar el error, abre el reloj del dispositivo y asegúrate de que la fecha y hora sean correctas.</p></translation> <translation id="988159990683914416">Build para desarrolladores</translation>
diff --git a/components/strings/components_strings_es.xtb b/components/strings/components_strings_es.xtb index 2152a346..91af3da 100644 --- a/components/strings/components_strings_es.xtb +++ b/components/strings/components_strings_es.xtb
@@ -63,6 +63,7 @@ <translation id="129863573139666797"><ph name="BEGIN_LINK" />Borrar las cookies<ph name="END_LINK" /></translation> <translation id="1314614906530272393">La sesión seleccionada no existe.</translation> <translation id="1323433172918577554">Mostrar más</translation> +<translation id="132390688737681464">Guardar y autocompletar direcciones</translation> <translation id="1333989956347591814">Es posible que tu actividad <ph name="BEGIN_EMPHASIS" />todavía sea visible<ph name="END_EMPHASIS" /> para: <ph name="BEGIN_LIST" /> <ph name="LIST_ITEM" />Los sitios web que visites @@ -110,9 +111,11 @@ <translation id="1645368109819982629">Protocolo no admitido</translation> <translation id="1655462015569774233">{1,plural, =1{Este servidor no ha podido demostrar que es <ph name="DOMAIN" />; su certificado de seguridad caducó ayer. Este problema puede deberse a una configuración incorrecta o a que un atacante ha interceptado la conexión. El reloj de tu ordenador está establecido actualmente en las <ph name="CURRENT_DATE" />. ¿Es correcto? Si no lo es, corrige el reloj del sistema y, a continuación, actualiza esta página.}other{Este servidor no ha podido demostrar que es <ph name="DOMAIN" />; su certificado de seguridad caducó hace # días. Este problema puede deberse a una configuración incorrecta o a que un atacante ha interceptado la conexión. El reloj de tu ordenador está establecido actualmente en las <ph name="CURRENT_DATE" />. ¿Es correcto? Si no lo es, corrige el reloj del sistema y, a continuación, actualiza esta página.}}</translation> <translation id="1656489000284462475">Recogida</translation> +<translation id="1662550410081243962">Guardar y autocompletar métodos de pago</translation> <translation id="1663943134801823270">Las tarjetas y las direcciones proceden de Chrome. Puedes gestionarlas en <ph name="BEGIN_LINK" />Configuración<ph name="END_LINK" />.</translation> <translation id="1676269943528358898"><ph name="SITE" /> utiliza normalmente el cifrado para proteger tu información. Cuando Google Chrome intentó establecer conexión con <ph name="SITE" />, el sitio web devolvió unas credenciales inusuales e incorrectas. Esto puede ocurrir si un atacante intenta suplantar la identidad de <ph name="SITE" /> o si una pantalla de inicio de sesión Wi-Fi interrumpe la conexión. Tu información sigue estando protegida, ya que Google Chrome detuvo la conexión antes de que se intercambiaran datos.</translation> <translation id="168841957122794586">El certificado del servidor contiene una clave criptográfica no segura.</translation> +<translation id="1697532407822776718">¡Listo!</translation> <translation id="1706954506755087368">{1,plural, =1{Este servidor no ha podido demostrar que es <ph name="DOMAIN" />; supuestamente, su certificado de seguridad es válido a partir de mañana. Este problema puede deberse a una configuración incorrecta o a que un atacante ha interceptado la conexión.}other{Este servidor no ha podido demostrar que es <ph name="DOMAIN" />; supuestamente, su certificado de seguridad es válido dentro de # días. Este problema puede deberse a una configuración incorrecta o a que un atacante ha interceptado la conexión.}}</translation> <translation id="1710259589646384581">Sistema operativo</translation> <translation id="1721312023322545264">Necesitas permiso de <ph name="NAME" /> para acceder a este sitio web</translation> @@ -193,6 +196,7 @@ <translation id="225207911366869382">Este valor ya no se utiliza para esta política.</translation> <translation id="2262243747453050782">Error de HTTP</translation> <translation id="2270484714375784793">Número de teléfono</translation> +<translation id="2283340219607151381">Guardar y autocompletar direcciones</translation> <translation id="2292556288342944218">Tu acceso a Internet está bloqueado</translation> <translation id="2316887270356262533">Libera menos de 1 MB. Algunos sitios web pueden tardar más en cargarse la próxima vez que accedas a ellos.</translation> <translation id="2317259163369394535"><ph name="DOMAIN" /> necesita un nombre de usuario y una contraseña.</translation> @@ -274,6 +278,7 @@ <translation id="2851634818064021665">Necesitas permiso para acceder a este sitio web</translation> <translation id="2856444702002559011">Es posible que los atacantes estén intentando robar tu información de <ph name="BEGIN_BOLD" /><ph name="SITE" /><ph name="END_BOLD" /> (por ejemplo, contraseñas, mensajes o tarjetas de crédito). <ph name="BEGIN_LEARN_MORE_LINK" />Más información<ph name="END_LEARN_MORE_LINK" /></translation> <translation id="2881276955470682203">¿Quieres guardar la tarjeta?</translation> +<translation id="2903493209154104877">Direcciones</translation> <translation id="2909946352844186028">Se ha detectado un cambio de red.</translation> <translation id="2916038427272391327">Cierra otros programas</translation> <translation id="2922350208395188000">No es posible comprobar el certificado del servidor.</translation> @@ -1146,6 +1151,7 @@ <translation id="973773823069644502">Añadir dirección de entrega</translation> <translation id="975560348586398090">{COUNT,plural, =0{Ninguno}=1{1 elemento}other{# elementos}}</translation> <translation id="981121421437150478">Sin conexión</translation> +<translation id="984275831282074731">Métodos de pago</translation> <translation id="985199708454569384"><p>Este error se muestra si la fecha y la hora de tu ordenador o tu dispositivo móvil no son correctas.</p> <p>Para solucionar el problema, abre el reloj de tu dispositivo. Comprueba que la fecha y la hora sean correctas.</p></translation> <translation id="988159990683914416">Build para desarrolladores</translation>
diff --git a/components/strings/components_strings_et.xtb b/components/strings/components_strings_et.xtb index 627dffb..c97d5d4 100644 --- a/components/strings/components_strings_et.xtb +++ b/components/strings/components_strings_et.xtb
@@ -63,6 +63,7 @@ <translation id="129863573139666797"><ph name="BEGIN_LINK" />Kustutage küpsisefailid<ph name="END_LINK" /></translation> <translation id="1314614906530272393">Valitud seanssi ei ole olemas.</translation> <translation id="1323433172918577554">Kuva rohkem</translation> +<translation id="132390688737681464">Salvesta ja sisesta aadressid</translation> <translation id="1333989956347591814">Teie tegevused <ph name="BEGIN_EMPHASIS" />võivad siiski olla nähtavad<ph name="END_EMPHASIS" />: <ph name="BEGIN_LIST" /> <ph name="LIST_ITEM" />teie külastatud veebisaitidele; @@ -110,9 +111,11 @@ <translation id="1645368109819982629">Toetuseta protokoll</translation> <translation id="1655462015569774233">{1,plural, =1{Server ei suutnud tõestada, et tegemist on domeeniga <ph name="DOMAIN" />, selle turvasertifikaat aegus eile. Selle põhjuseks võib olla vale seadistus või teie ühendust segav ründaja. Teie arvuti kell on praegu seatud kuupäevale <ph name="CURRENT_DATE" />. Kas see on õige? Kui ei ole, seadke süsteemi kell õigeks ja värskendage lehte.}other{Server ei suutnud tõestada, et tegemist on domeeniga <ph name="DOMAIN" />, selle turvasertifikaat aegus # päeva tagasi. Selle põhjuseks võib olla vale seadistus või teie ühendust segav ründaja. Teie arvuti kell on praegu seatud kuupäevale <ph name="CURRENT_DATE" />. Kas see on õige? Kui ei ole, seadke süsteemi kell õigeks ja värskendage lehte.}}</translation> <translation id="1656489000284462475">Kättesaamine</translation> +<translation id="1662550410081243962">Salvesta ja sisesta makseviisid</translation> <translation id="1663943134801823270">Kaardid ja aadressid pärinevad Chrome'ist. Neid saate hallata menüüs <ph name="BEGIN_LINK" />Seaded<ph name="END_LINK" />.</translation> <translation id="1676269943528358898">Sait <ph name="SITE" /> kasutab teie teabe kaitsmiseks tavaliselt krüpteerimist. Kui Google Chrome püüdis seekord saidiga <ph name="SITE" /> ühendust luua, tagastas veebisait ebatavalised ja valed mandaadid. See võib juhtuda siis, kui ründaja proovib teeselda, et on sait <ph name="SITE" />, või WiFi sisselogimisekraan on ühenduse katkestanud. Teie teave on endiselt kaitstud, sest Google Chrome peatas ühenduse enne andmevahetust.</translation> <translation id="168841957122794586">Serveri sertifikaat sisaldab nõrka krüptograafilist võtit.</translation> +<translation id="1697532407822776718">Kõik on valmis!</translation> <translation id="1706954506755087368">{1,plural, =1{Server ei suutnud tõestada, et tegemist on domeeniga <ph name="DOMAIN" />, selle turvasertifikaat hakkab väidetavalt kehtima homme. Selle põhjuseks võib olla vale seadistus või teie ühendust segav ründaja.}other{Server ei suutnud tõestada, et tegemist on domeeniga <ph name="DOMAIN" />, selle turvasertifikaat hakkab väidetavalt kehtima # päeva pärast. Selle põhjuseks võib olla vale seadistus või teie ühendust segav ründaja.}}</translation> <translation id="1710259589646384581">OS</translation> <translation id="1721312023322545264">Vajate saidi külastamiseks halduri <ph name="NAME" /> luba</translation> @@ -193,6 +196,7 @@ <translation id="225207911366869382">Väärtus on eeskirjade jaoks aegunud.</translation> <translation id="2262243747453050782">HTTP viga</translation> <translation id="2270484714375784793">Telefoninumber</translation> +<translation id="2283340219607151381">Salvesta ja sisesta aadressid</translation> <translation id="2292556288342944218">Teie juurdepääs Internetile on blokeeritud</translation> <translation id="2316887270356262533">Vabastab alla 1 MB. Mõne saidi laadimine võib järgmisel külastusel rohkem aega võtta.</translation> <translation id="2317259163369394535">Domeen <ph name="DOMAIN" /> nõuab kasutajanime ja parooli.</translation> @@ -274,6 +278,7 @@ <translation id="2851634818064021665">Vajate selle saidi külastamiseks luba</translation> <translation id="2856444702002559011">Ründajad võivad üritada varastada teie teavet (nt paroole, sõnumeid või krediitkaarditeavet) saidilt <ph name="BEGIN_BOLD" /><ph name="SITE" /><ph name="END_BOLD" />. <ph name="BEGIN_LEARN_MORE_LINK" />Lisateave<ph name="END_LEARN_MORE_LINK" /></translation> <translation id="2881276955470682203">Kas salvestada kaart?</translation> +<translation id="2903493209154104877">Aadressid</translation> <translation id="2909946352844186028">Tuvastati võrgumuudatus.</translation> <translation id="2916038427272391327">Sulgege muud programmid</translation> <translation id="2922350208395188000">Serveri sertifikaati ei saa kontrollida.</translation> @@ -1146,6 +1151,7 @@ <translation id="973773823069644502">Lisage kohaletoimetamisaadress</translation> <translation id="975560348586398090">{COUNT,plural, =0{Ühtegi}=1{1 üksus}other{# üksust}}</translation> <translation id="981121421437150478">Võrguühenduseta</translation> +<translation id="984275831282074731">Makseviisid</translation> <translation id="985199708454569384"><p>Seda viga näete juhul, kui teie arvuti või mobiilseadme kuupäev ja kellaaeg pole õiged.</p> <p>Vea parandamiseks avage seadme kell ning veenduge, et kellaaeg ja kuupäev oleksid õiged.</p></translation> <translation id="988159990683914416">Arendaja järk</translation>
diff --git a/components/strings/components_strings_fa.xtb b/components/strings/components_strings_fa.xtb index 94d4d2a8..7915a63 100644 --- a/components/strings/components_strings_fa.xtb +++ b/components/strings/components_strings_fa.xtb
@@ -63,6 +63,7 @@ <translation id="129863573139666797"><ph name="BEGIN_LINK" />کوکیها را پاک کنید<ph name="END_LINK" /></translation> <translation id="1314614906530272393">جلسه انتخابشده موجود نیست.</translation> <translation id="1323433172918577554">نمایش موارد بیشتر</translation> +<translation id="132390688737681464">ذخیره و تکمیل نشانی</translation> <translation id="1333989956347591814">فعالیت شما <ph name="BEGIN_EMPHASIS" />ممکن است در موارد زیر قابلرؤیت باشد<ph name="END_EMPHASIS" />: <ph name="BEGIN_LIST" /> <ph name="LIST_ITEM" />در وبسایتهایی که بازدید میکنید @@ -110,9 +111,11 @@ <translation id="1645368109819982629">پروتکل پشتیبانینشده</translation> <translation id="1655462015569774233">{1,plural, =1{این سرور نتوانست ثابت کند این <ph name="DOMAIN" /> است؛ اعتبار گواهی امنیتی آن دیروز به پایان رسیده است. ممکن است علت این موضوع پیکربندی اشتباه باشد یا مهاجمی اتصالتان را قطع میکند. ساعت رایانهتان درحالحاضر روی <ph name="CURRENT_DATE" /> تنظیم شده است. آیا درست است؟ اگر پاسخ منفی است، باید ساعت سیستمتان را درست کنید و سپس این صفحه را بازخوانی کنید.}one{این سرور نتوانست ثابت کند این <ph name="DOMAIN" /> است. اعتبار گواهی امنیتی آن # روز قبل به پایان رسیده است. ممکن است علت این موضوع پیکربندی اشتباه باشد یا مهاجمی اتصالتان را قطع میکند. ساعت رایانهتان درحالحاضر روی <ph name="CURRENT_DATE" /> تنظیم شده است. آیا درست است؟ اگر پاسخ منفی است، باید ساعت سیستمتان را درست کنید و سپس این صفحه را بازخوانی کنید.}other{این سرور نتوانست ثابت کند این <ph name="DOMAIN" /> است. اعتبار گواهی امنیتی آن # روز قبل به پایان رسیده است. ممکن است علت این موضوع پیکربندی اشتباه باشد یا مهاجمی اتصالتان را قطع میکند. ساعت رایانهتان درحالحاضر روی <ph name="CURRENT_DATE" /> تنظیم شده است. آیا درست است؟ اگر پاسخ منفی است، باید ساعت سیستمتان را درست کنید و سپس این صفحه را بازخوانی کنید.}}</translation> <translation id="1656489000284462475">تحویل گرفتن</translation> +<translation id="1662550410081243962">ذخیره و تکمیل روشهای پرداخت</translation> <translation id="1663943134801823270">کارتها و نشانیها از Chrome هستند. میتوانید آنها را در <ph name="BEGIN_LINK" />تنظیمات<ph name="END_LINK" /> مدیریت کنید.</translation> <translation id="1676269943528358898"><ph name="SITE" /> معمولاً برای محافظت از اطلاعات شما از رمزگذاری استفاده میکند. اما این بار که Chrome تلاش کرد به <ph name="SITE" /> متصل شود، وبسایت اعتبارنامهای نامعمول و نادرست را برگرداند. ممکن است مهاجمی در تلاش باشد خود را بهجای <ph name="SITE" /> معرفی کند یا یک صفحه ورود به سیستم Wi-Fi در ارتباط اختلال ایجاد کرده باشد. اطلاعات شما همچنان ایمن است، زیرا Google Chrome قبل از هرگونه تبادل داده، اتصال را متوقف کرد.</translation> <translation id="168841957122794586">گواهینامه سرور دارای یک کلید رمزنگاری ضعیف است.</translation> +<translation id="1697532407822776718">آمادهاید!</translation> <translation id="1706954506755087368">{1,plural, =1{این سرور نتوانست ثابت کند این <ph name="DOMAIN" /> است؛ اعتبار گواهی امنیتی آن ظاهراً فردا شروع میشود. ممکن است علت این موضوع پیکربندی اشتباه باشد یا مهاجمی اتصالتان را قطع میکند.}one{این سرور نتوانست ثابت کند این <ph name="DOMAIN" /> است؛ اعتبار گواهی امنیتی آن ظاهراً # روز دیگر شروع میشود. ممکن است علت این موضوع پیکربندی اشتباه باشد یا مهاجمی اتصالتان را قطع میکند.}other{این سرور نتوانست ثابت کند این <ph name="DOMAIN" /> است؛ اعتبار گواهی امنیتی آن ظاهراً # روز دیگر شروع میشود. ممکن است علت این موضوع پیکربندی اشتباه باشد یا مهاجمی اتصالتان را قطع میکند.}}</translation> <translation id="1710259589646384581">OS</translation> <translation id="1721312023322545264">برای بازدید این سایت باید از <ph name="NAME" /> اجازه بگیرید</translation> @@ -193,6 +196,7 @@ <translation id="225207911366869382">این مقدار برای این خطمشی منسوخ شده است؟</translation> <translation id="2262243747453050782">خطای HTTP</translation> <translation id="2270484714375784793">شماره تلفن</translation> +<translation id="2283340219607151381">ذخیره و تکمیل نشانی</translation> <translation id="2292556288342944218">دسترسی شما به اینترنت مسدود است</translation> <translation id="2316887270356262533">کمتر از ۱ مگابایت از فضا را آزاد میکند. ممکن است برخی از سایتها در بازدیدهای بعدی کندتر بارگیری شوند.</translation> <translation id="2317259163369394535"><ph name="DOMAIN" /> به نام کاربری و گذرواژه نیاز دارد.</translation> @@ -274,6 +278,7 @@ <translation id="2851634818064021665">برای بازدید کردن از این سایت، مجوز لازم دارید</translation> <translation id="2856444702002559011">شاید مهاجمها در تلاش باشند اطلاعات شما (مانند گذرواژهها، پیامها یا کارتهای اعتباری) را از <ph name="BEGIN_BOLD" /><ph name="SITE" /><ph name="END_BOLD" /> سرقت کنند. <ph name="BEGIN_LEARN_MORE_LINK" />بیشتر بدانید<ph name="END_LEARN_MORE_LINK" /></translation> <translation id="2881276955470682203">کارت ذخیره شود؟</translation> +<translation id="2903493209154104877">آدرسها</translation> <translation id="2909946352844186028">تغییر شبکه تشخیص داده شد.</translation> <translation id="2916038427272391327">برنامههای دیگر را ببندید</translation> <translation id="2922350208395188000">گواهی سرور بررسی نمیشود.</translation> @@ -1146,6 +1151,7 @@ <translation id="973773823069644502">افزودن نشانی ارسال</translation> <translation id="975560348586398090">{COUNT,plural, =0{هیچکدام}=1{۱ مورد}one{# مورد}other{# مورد}}</translation> <translation id="981121421437150478">آفلاین</translation> +<translation id="984275831282074731">روشهای پرداخت</translation> <translation id="985199708454569384"><p>اگر تاریخ و زمان رایانه یا دستگاه همراهتان درست نباشد این خطا را میبینید.</p> <p>برای برطرف کردن این خطا، ساعت دستگاه را باز کنید. مطمئن شوید تاریخ و زمان صحیح است.</p></translation> <translation id="988159990683914416">ساخت برنامهنویس</translation>
diff --git a/components/strings/components_strings_fi.xtb b/components/strings/components_strings_fi.xtb index b984acc..53028580 100644 --- a/components/strings/components_strings_fi.xtb +++ b/components/strings/components_strings_fi.xtb
@@ -63,6 +63,7 @@ <translation id="129863573139666797"><ph name="BEGIN_LINK" />Tyhjennä evästeet.<ph name="END_LINK" /></translation> <translation id="1314614906530272393">Valittua käyttökertaa ei ole olemassa.</translation> <translation id="1323433172918577554">Näytä lisää</translation> +<translation id="132390688737681464">Tallenna ja täytä osoitteet</translation> <translation id="1333989956347591814">Toimintasi <ph name="BEGIN_EMPHASIS" />saattaa silti näkyä<ph name="END_EMPHASIS" /> <ph name="BEGIN_LIST" /> <ph name="LIST_ITEM" />käymillesi verkkosivustoille @@ -110,9 +111,11 @@ <translation id="1645368109819982629">Protokollaa ei tueta</translation> <translation id="1655462015569774233">{1,plural, =1{Palvelin ei voinut todistaa olevansa <ph name="DOMAIN" />; sen suojausvarmenne vanhentui eilen. Tämä voi johtua määritysvirheestä tai verkkoyhteytesi siepanneesta hyökkääjästä. Tietokoneesi kellonaika on tällä hetkellä <ph name="CURRENT_DATE" />. Onko se oikein? Jos ei, korjaa järjestelmän kellonaika ja päivitä sivu.}other{Palvelin ei voinut todistaa olevansa <ph name="DOMAIN" />; sen suojausvarmenne vanhentui # päivää sitten. Tämä voi johtua määritysvirheestä tai verkkoyhteytesi siepanneesta hyökkääjästä. Tietokoneesi kellonaika on tällä hetkellä <ph name="CURRENT_DATE" />. Onko se oikein? Jos ei, korjaa järjestelmän kellonaika ja päivitä sivu.}}</translation> <translation id="1656489000284462475">Noutoaika</translation> +<translation id="1662550410081243962">Tallenna ja täytä maksutavat</translation> <translation id="1663943134801823270">Kortit ja osoitteet ovat peräisin Chromesta. Voit hallinnoida niitä <ph name="BEGIN_LINK" />asetuksissa<ph name="END_LINK" />.</translation> <translation id="1676269943528358898"><ph name="SITE" /> suojaa tietosi normaalisti salauksen avulla. Kun Chrome yritti tällä kertaa yhdistää sivustoon <ph name="SITE" />, sivusto palautti epätavalliset ja virheelliset kirjautumistiedot. Hyökkääjä saattaa yrittää esiintyä sivustona <ph name="SITE" />, tai Wi-Fi-kirjautumisruutu on keskeyttänyt yhteyden. Tietosi ovat edelleen turvassa, sillä Google Chrome katkaisi yhteyden, ennen kuin mitään tietoja vaihdettiin.</translation> <translation id="168841957122794586">Palvelinvarmenne sisältää heikon salausavaimen.</translation> +<translation id="1697532407822776718">Kaikki on valmista.</translation> <translation id="1706954506755087368">{1,plural, =1{Palvelin ei voinut todistaa olevansa <ph name="DOMAIN" />; sen suojausvarmenne on päivätty huomiselle. Tämä voi johtua määritysvirheestä tai verkkoyhteytesi siepanneesta hyökkääjästä.}other{Palvelin ei voinut todistaa olevansa <ph name="DOMAIN" />; sen suojausvarmenne on päivätty # päivää tulevaisuuteen. Tämä voi johtua määritysvirheestä tai verkkoyhteytesi siepanneesta hyökkääjästä.}}</translation> <translation id="1710259589646384581">Käyttöjärjestelmä</translation> <translation id="1721312023322545264">Tarvitset henkilön <ph name="NAME" /> luvan käydä tällä sivustolla</translation> @@ -193,6 +196,7 @@ <translation id="225207911366869382">Tämän käytännön arvo on vanhentunut.</translation> <translation id="2262243747453050782">HTTP-virhe</translation> <translation id="2270484714375784793">Puhelinnumero</translation> +<translation id="2283340219607151381">Tallenna ja täytä osoitteet</translation> <translation id="2292556288342944218">Internetyhteytesi on estetty</translation> <translation id="2316887270356262533">Vapauttaa alle 1 Mt. Jotkin sivustot saattavat latautua hitaammin seuraavalla käynnillä.</translation> <translation id="2317259163369394535"><ph name="DOMAIN" /> pyytää käyttäjänimeä ja salasanaa.</translation> @@ -274,6 +278,7 @@ <translation id="2851634818064021665">Tarvitset luvan tälle sivustolle siirtymiseen.</translation> <translation id="2856444702002559011">Sivustolle <ph name="BEGIN_BOLD" /><ph name="SITE" /><ph name="END_BOLD" /> hyökännyt taho voi yrittää varastaa tietojasi (esimerkiksi salasanoja, viestejä tai luottokorttitietoja). <ph name="BEGIN_LEARN_MORE_LINK" />Lisätietoja<ph name="END_LEARN_MORE_LINK" /></translation> <translation id="2881276955470682203">Tallennetaanko kortti?</translation> +<translation id="2903493209154104877">Osoitteet</translation> <translation id="2909946352844186028">Verkossa havaittiin muutos.</translation> <translation id="2916038427272391327">Sulje muita ohjelmia.</translation> <translation id="2922350208395188000">Palvelimen varmennetta ei voi tarkistaa.</translation> @@ -1148,6 +1153,7 @@ <translation id="973773823069644502">Lisää jakeluosoite</translation> <translation id="975560348586398090">{COUNT,plural, =0{Ei mitään}=1{1 kohde}other{# kohdetta}}</translation> <translation id="981121421437150478">Offline</translation> +<translation id="984275831282074731">Maksutavat</translation> <translation id="985199708454569384"><p>Näet tämän virheen, jos tietokoneen tai mobiililaitteen päivämäärä ja aika ovat virheellisiä.</p> <p>Korjaa ongelma avaamalla laitteen kello ja varmistamalla, että päivämäärä ja aika ovat oikein.</p></translation> <translation id="988159990683914416">Kehittäjän koontiversio</translation>
diff --git a/components/strings/components_strings_fil.xtb b/components/strings/components_strings_fil.xtb index 465467d..7349aef 100644 --- a/components/strings/components_strings_fil.xtb +++ b/components/strings/components_strings_fil.xtb
@@ -63,6 +63,7 @@ <translation id="129863573139666797"><ph name="BEGIN_LINK" />Subukang i-clear ang iyong cookies<ph name="END_LINK" /></translation> <translation id="1314614906530272393">Hindi umiiral ang piniling session.</translation> <translation id="1323433172918577554">Magpakita Nang Higit Pa</translation> +<translation id="132390688737681464">I-save at Punan ang Mga Address</translation> <translation id="1333989956347591814">Ang iyong aktibidad <ph name="BEGIN_EMPHASIS" />ay maaari pa ring makita<ph name="END_EMPHASIS" /> ng: <ph name="BEGIN_LIST" /> <ph name="LIST_ITEM" />Mga binibisita mong website @@ -110,9 +111,11 @@ <translation id="1645368109819982629">Hindi sinusuportahang protocol</translation> <translation id="1655462015569774233">{1,plural, =1{Hindi mapatunayan ng server na ito na ito ang <ph name="DOMAIN" />; nag-expire na ang certificate ng seguridad nito kahapon. Maaaring resulta ito ng maling configuration o kaya ng isang attacker na humahadlang sa iyong koneksyon. Sa kasalukuyan, nakatakda ang orasan ng iyong computer sa <ph name="CURRENT_DATE" />. Mukha bang tama iyon? Kung hindi, dapat mong ayusin ang orasan ng iyong system at pagkatapos ay i-refresh ang page na ito.}one{Hindi mapatunayan ng server na ito na ito ang <ph name="DOMAIN" />; nag-expire na ang certificate ng seguridad nito # araw na ang nakalipas. Maaaring resulta ito ng maling configuration o kaya ng isang attacker na humahadlang sa iyong koneksyon. Sa kasalukuyan, nakatakda ang orasan ng iyong computer sa <ph name="CURRENT_DATE" />. Mukha bang tama iyon? Kung hindi, dapat mong ayusin ang orasan ng iyong system at pagkatapos ay i-refresh ang page na ito.}other{Hindi mapatunayan ng server na ito na ito ang <ph name="DOMAIN" />; nag-expire na ang certificate ng seguridad nito # na araw na ang nakalipas. Maaaring resulta ito ng maling configuration o kaya ng isang attacker na humahadlang sa iyong koneksyon. Sa kasalukuyan, nakatakda ang orasan ng iyong computer sa <ph name="CURRENT_DATE" />. Mukha bang tama iyon? Kung hindi, dapat mong ayusin ang orasan ng iyong system at pagkatapos ay i-refresh ang page na ito.}}</translation> <translation id="1656489000284462475">I-pick up</translation> +<translation id="1662550410081243962">I-save at punan ang mga paraan ng pagbabayad</translation> <translation id="1663943134801823270">Ang mga card at address ay mula sa Chrome. Maaari mong pamahalaan ang mga ito sa <ph name="BEGIN_LINK" />Mga Setting<ph name="END_LINK" />.</translation> <translation id="1676269943528358898">Karaniwang gumagamit ang <ph name="SITE" /> ng pag-encrypt upang protektahan ang iyong impormasyon. Noong sinubukang kumonekta ng Chrome sa <ph name="SITE" /> sa pagkakataong ito, nagbalik ang website ng mga hindi pangkaraniwan at maling kredensyal. Maaari itong mangyari kapag sinusubukan ng isang attacker na magpanggap bilang <ph name="SITE" />, o naputol ang koneksyon dahil sa isang screen ng pag-sign in sa Wi-Fi. Secure pa rin ang iyong impormasyon dahil inihinto ng Google Chrome ang koneksyon bago magkaroon ng palitan ng anumang data.</translation> <translation id="168841957122794586">Naglalaman ang server certificate ng isang mahinang cryptographic key.</translation> +<translation id="1697532407822776718">Handa ka na!</translation> <translation id="1706954506755087368">{1,plural, =1{Hindi mapatunayan ng server na ito na ito ang <ph name="DOMAIN" />; tinatayang mula sa susunod na araw ang certificate ng seguridad nito. Maaaring resulta ito ng maling configuration o kaya ng isang attacker na humahadlang sa iyong koneksyon.}one{Hindi mapatunayan ng server na ito na ito ang <ph name="DOMAIN" />; tinatayang mula sa # araw sa hinaharap ang certificate ng seguridad nito. Maaaring resulta ito ng maling configuration o kaya ng isang attacker na humahadlang sa iyong koneksyon.}other{Hindi mapatunayan ng server na ito na ito ang <ph name="DOMAIN" />; tinatayang mula sa # na araw sa hinaharap ang certificate ng seguridad nito. Maaaring resulta ito ng maling configuration o kaya ng isang attacker na humahadlang sa iyong koneksyon.}}</translation> <translation id="1710259589646384581">OS</translation> <translation id="1721312023322545264">Kailangan mo ng pahintulot mula kay <ph name="NAME" /> upang mabisita ang site na ito</translation> @@ -193,6 +196,7 @@ <translation id="225207911366869382">Hindi na gimagamit ang halagang ito para sa patakarang ito.</translation> <translation id="2262243747453050782">Error sa HTTP</translation> <translation id="2270484714375784793">Numero ng telepono</translation> +<translation id="2283340219607151381">I-save at punan ang mga address</translation> <translation id="2292556288342944218">Naka-block ang iyong access sa Internet</translation> <translation id="2316887270356262533">Magbabakante ng wala pang 1 MB. Maaaring mag-load nang mas mabagal ang ilang site sa iyong susunod na pagbisita.</translation> <translation id="2317259163369394535">Kailangan ng <ph name="DOMAIN" /> ng username at password.</translation> @@ -274,6 +278,7 @@ <translation id="2851634818064021665">Kailangan mo ng pahintulot upang mabisita ang site na ito</translation> <translation id="2856444702002559011">Maaaring sinusubukang nakawin ng mga attacker ang iyong impormasyon mula sa <ph name="BEGIN_BOLD" /><ph name="SITE" /><ph name="END_BOLD" /> (halimbawa, mga password, mensahe, o credit card). <ph name="BEGIN_LEARN_MORE_LINK" />Matuto pa<ph name="END_LEARN_MORE_LINK" /></translation> <translation id="2881276955470682203">I-save ang card?</translation> +<translation id="2903493209154104877">Mga Address</translation> <translation id="2909946352844186028">May nakitang pagbabago sa network.</translation> <translation id="2916038427272391327">Isara ang iba pang program</translation> <translation id="2922350208395188000">Hindi masuri ang certificate ng server.</translation> @@ -1146,6 +1151,7 @@ <translation id="973773823069644502">Magdagdag ng Address sa Paghahatid</translation> <translation id="975560348586398090">{COUNT,plural, =0{Wala}=1{1 item}one{# item}other{# na item}}</translation> <translation id="981121421437150478">Offline</translation> +<translation id="984275831282074731">Mga paraan ng pagbabayad</translation> <translation id="985199708454569384"><p>Makikita mo ang error na ito kung hindi tumpak ang petsa at oras ng iyong computer o mobile device.</p> <p>Para maayos ang error, buksan ang orasan ng iyong device. Tiyaking tama ang oras at petsa.</p></translation> <translation id="988159990683914416">Bumuo ang Developer</translation>
diff --git a/components/strings/components_strings_fr.xtb b/components/strings/components_strings_fr.xtb index c9d6fc5..0c1cf47ff 100644 --- a/components/strings/components_strings_fr.xtb +++ b/components/strings/components_strings_fr.xtb
@@ -63,6 +63,7 @@ <translation id="129863573139666797"><ph name="BEGIN_LINK" />Essayez de supprimer les cookies.<ph name="END_LINK" /></translation> <translation id="1314614906530272393">La session sélectionnée n'existe pas.</translation> <translation id="1323433172918577554">Afficher plus</translation> +<translation id="132390688737681464">Enregistrer et renseigner les adresses</translation> <translation id="1333989956347591814">Votre activité <ph name="BEGIN_EMPHASIS" />peut rester visible<ph name="END_EMPHASIS" /> par : <ph name="BEGIN_LIST" /> <ph name="LIST_ITEM" />Les sites Web que vous consultez @@ -110,9 +111,11 @@ <translation id="1645368109819982629">Protocole incompatible</translation> <translation id="1655462015569774233">{1,plural, =1{Impossible de vérifier que ce serveur est bien <ph name="DOMAIN" />, car son certificat de sécurité a expiré hier. Cela peut être dû à une mauvaise configuration ou bien à l'interception de votre connexion par un pirate informatique. L'horloge de votre ordinateur indique actuellement : <ph name="CURRENT_DATE" />. Cela vous semble-t-il correct ? Si ce n'est pas le cas, vous devez corriger l'horloge de votre système, puis actualiser la page.}one{Impossible de vérifier que ce serveur est bien <ph name="DOMAIN" />, car son certificat de sécurité a expiré il y a # jour. Cela peut être dû à une mauvaise configuration ou bien à l'interception de votre connexion par un pirate informatique. L'horloge de votre ordinateur indique actuellement : <ph name="CURRENT_DATE" />. Cela vous semble-t-il correct ? Si ce n'est pas le cas, vous devez corriger l'horloge de votre système, puis actualiser la page.}other{Impossible de vérifier que ce serveur est bien <ph name="DOMAIN" />, car son certificat de sécurité a expiré il y a # jours. Cela peut être dû à une mauvaise configuration ou bien à l'interception de votre connexion par un pirate informatique. L'horloge de votre ordinateur indique actuellement : <ph name="CURRENT_DATE" />. Cela vous semble-t-il correct ? Si ce n'est pas le cas, vous devez corriger l'horloge de votre système, puis actualiser la page.}}</translation> <translation id="1656489000284462475">Enlèvement</translation> +<translation id="1662550410081243962">Enregistrer et renseigner les modes de paiement</translation> <translation id="1663943134801823270">Les cartes et les adresses proviennent de Chrome. Vous pouvez les gérer dans les <ph name="BEGIN_LINK" />Paramètres<ph name="END_LINK" />.</translation> <translation id="1676269943528358898">Un chiffrement est normalement utilisé sur le site <ph name="SITE" /> pour protéger vos informations. Lors de la dernière tentative de connexion de Google Chrome au site <ph name="SITE" />, des identifiants inhabituels et incorrects ont été retournés. Il est possible qu'un individu malveillant tente de se faire passer pour <ph name="SITE" /> ou qu'un écran de connexion Wi-Fi ait interrompu la connexion. Vos informations restent sécurisées, car nous avons arrêté la connexion avant l'échange des données.</translation> <translation id="168841957122794586">Le certificat du serveur contient une clé de chiffrement faible.</translation> +<translation id="1697532407822776718">Vous êtes prêt !</translation> <translation id="1706954506755087368">{1,plural, =1{Impossible de vérifier que ce serveur est bien <ph name="DOMAIN" />, car la date d'émission de son certificat de sécurité est fixée à demain. Cela peut être dû à une mauvaise configuration ou bien à l'interception de votre connexion par un pirate informatique.}one{Impossible de vérifier que ce serveur est bien <ph name="DOMAIN" />, car la date d'émission de son certificat de sécurité est ultérieure de # jour à la date du jour. Cela peut être dû à une mauvaise configuration ou bien à l'interception de votre connexion par un pirate informatique.}other{Impossible de vérifier que ce serveur est bien <ph name="DOMAIN" />, car la date d'émission de son certificat de sécurité est ultérieure de # jours à la date du jour. Cela peut être dû à une mauvaise configuration ou bien à l'interception de votre connexion par un pirate informatique.}}</translation> <translation id="1710259589646384581">Système d'exploitation</translation> <translation id="1721312023322545264">Vous devez disposer de l'autorisation de <ph name="NAME" /> pour consulter ce site</translation> @@ -193,6 +196,7 @@ <translation id="225207911366869382">Cette valeur n'est plus utilisée dans le cadre de cette règle.</translation> <translation id="2262243747453050782">Erreur HTTP.</translation> <translation id="2270484714375784793">N° de téléphone</translation> +<translation id="2283340219607151381">Enregistrer et renseigner les adresses</translation> <translation id="2292556288342944218">Votre accès à Internet est bloqué</translation> <translation id="2316887270356262533">Libère moins de 1 Mo. Le chargement de certains sites risque d'être plus lent lors de votre prochaine visite.</translation> <translation id="2317259163369394535"><ph name="DOMAIN" /> nécessite un nom d'utilisateur et un mot de passe.</translation> @@ -274,6 +278,7 @@ <translation id="2851634818064021665">Tu n'es pas autorisé à consulter ce site</translation> <translation id="2856444702002559011">Des individus malveillants tentent peut-être de subtiliser vos informations personnelles sur le site <ph name="BEGIN_BOLD" /><ph name="SITE" /><ph name="END_BOLD" /> (mots de passe, messages ou numéros de carte de crédit, par exemple). <ph name="BEGIN_LEARN_MORE_LINK" />En savoir plus<ph name="END_LEARN_MORE_LINK" /></translation> <translation id="2881276955470682203">Enregistrer la carte ?</translation> +<translation id="2903493209154104877">Adresses</translation> <translation id="2909946352844186028">Un changement de réseau a été détecté.</translation> <translation id="2916038427272391327">Fermez les autres programmes</translation> <translation id="2922350208395188000">Impossible de vérifier le certificat du serveur.</translation> @@ -1146,6 +1151,7 @@ <translation id="973773823069644502">Ajouter une adresse d'expédition</translation> <translation id="975560348586398090">{COUNT,plural, =0{Aucun}=1{1 élément}one{# élément}other{# éléments}}</translation> <translation id="981121421437150478">Hors connexion</translation> +<translation id="984275831282074731">Modes de paiement</translation> <translation id="985199708454569384"><p>Ce message s'affiche si la date et l'heure de votre ordinateur ou de votre appareil mobile sont incorrectes.</p> <p>Pour corriger cette erreur, ouvrez l'horloge de votre appareil et assurez-vous que l'heure et la date sont correctes.</p></translation> <translation id="988159990683914416">Build de développement</translation>
diff --git a/components/strings/components_strings_gu.xtb b/components/strings/components_strings_gu.xtb index 19f8fca..6f9cd4c3 100644 --- a/components/strings/components_strings_gu.xtb +++ b/components/strings/components_strings_gu.xtb
@@ -63,6 +63,7 @@ <translation id="129863573139666797"><ph name="BEGIN_LINK" />તમારી કૂકીઝને સાફ કરવાનો પ્રયાસ કરો<ph name="END_LINK" /></translation> <translation id="1314614906530272393">પસંદ કરેલ સત્ર અસ્તિત્વમાં નથી.</translation> <translation id="1323433172918577554">વધુ બતાવો</translation> +<translation id="132390688737681464">સરનામાં સાચવો અને ભરો</translation> <translation id="1333989956347591814">તમારી પ્રવૃત્તિ <ph name="BEGIN_EMPHASIS" />હજીપણ દૃશ્યક્ષમ હોઈ શકે છે<ph name="END_EMPHASIS" />: <ph name="BEGIN_LIST" /> <ph name="LIST_ITEM" />વેબસાઇટો જેની તમે મુલાકાત લેતા હો @@ -110,9 +111,11 @@ <translation id="1645368109819982629">અસમર્થિત પ્રોટોકોલ</translation> <translation id="1655462015569774233">{1,plural, =1{આ સર્વર સાબિત કરી શક્યું નથી કે તે <ph name="DOMAIN" /> છે; તેના સુરક્ષા પ્રમાણપત્રની સમય સીમા ગઈકાલે સમાપ્ત થઈ ગઈ. આ કોઇ ખોટી ગોઠવણીને કારણે થયું હશે અથવા કોઇ હુમલાખોર તમારા કનેક્શનને અટકાવી રહ્યો છે. તમારા કમ્પ્યુટરની ઘડિયાળને હાલમાં <ph name="CURRENT_DATE" /> પર સેટ કરવામાં આવી છે. શું તે બરાબર લાગે છે? જો ઠીક ન લાગતી હોય, તો તમારે તમારી સિસ્ટમની ઘડિયાળને ઠીક કરવી જોઈએ અને પછી આ પૃષ્ઠ તાજું કરવું જોઈએ.}one{આ સર્વર સાબિત કરી શક્યું નથી કે તે <ph name="DOMAIN" /> છે; તેના સુરક્ષા પ્રમાણપત્રની સમય સીમા # દિવસ પહેલાં સમાપ્ત થઈ ગઈ. આ કોઇ ખોટી ગોઠવણીને કારણે થયું હશે અથવા કોઇ હુમલાખોર તમારા કનેક્શનને અટકાવી રહ્યો છે. તમારા કમ્પ્યુટરની ઘડિયાળને હાલમાં <ph name="CURRENT_DATE" /> પર સેટ કરવામાં આવી છે. શું તે બરાબર લાગે છે? જો ઠીક ન લાગતી હોય, તો તમારે તમારી સિસ્ટમની ઘડિયાળને ઠીક કરવી જોઈએ અને પછી આ પૃષ્ઠ તાજું કરવું જોઈએ.}other{આ સર્વર સાબિત કરી શક્યું નથી કે તે <ph name="DOMAIN" /> છે; તેના સુરક્ષા પ્રમાણપત્રની સમય સીમા # દિવસ પહેલાં સમાપ્ત થઈ ગઈ. આ કોઇ ખોટી ગોઠવણીને કારણે થયું હશે અથવા કોઇ હુમલાખોર તમારા કનેક્શનને અટકાવી રહ્યો છે. તમારા કમ્પ્યુટરની ઘડિયાળને હાલમાં <ph name="CURRENT_DATE" /> પર સેટ કરવામાં આવી છે. શું તે બરાબર લાગે છે? જો ઠીક ન લાગતી હોય, તો તમારે તમારી સિસ્ટમની ઘડિયાળને ઠીક કરવી જોઈએ અને પછી આ પૃષ્ઠ તાજું કરવું જોઈએ.}}</translation> <translation id="1656489000284462475">પિકઅપ</translation> +<translation id="1662550410081243962">ચુકવણી પદ્ધતિઓ સાચવો અને ભરો</translation> <translation id="1663943134801823270">કાર્ડ અને સરનામા Chromeમાંથી છે. તમે તેને <ph name="BEGIN_LINK" />સેટિંગ્સ<ph name="END_LINK" />માં સંચાલિત કરી શકો છો.</translation> <translation id="1676269943528358898"><ph name="SITE" /> સામાન્ય રીતે તમારી માહિતીને સુરક્ષિત રાખવા માટે એન્ક્રિપ્શનનો ઉપયોગ કરે છે. જ્યારે આ સમયે Google Chrome દ્વારા <ph name="SITE" /> થી કનેક્ટ કરવાનો પ્રયાસ થયો, ત્યારે વેબસાઇટે અસામાન્ય અને ખોટા ઓળખાણપત્રોને પાછા મોકલ્યાં. આવું ત્યારે થઇ શકે જ્યારે કોઈ હુમલાખોર <ph name="SITE" /> હોવાનો ડોળ કરવાનો પ્રયાસ કરી રહ્યો હોય અથવા કોઈ Wi-Fi સાઇન-ઇન સ્ક્રીને કનેક્શનમાં વિક્ષેપ પાડ્યો હોય. તમારી માહિતી હજી પણ સુરક્ષિત છે કારણ કે Google Chrome એ કોઈપણ ડેટા વિનિમય થાય તે પહેલાં જ કનેક્શન રોકી દીધું.</translation> <translation id="168841957122794586">સર્વર પ્રમાણપત્ર એક નબળી ક્રિપ્ટોગ્રાફિક કી ધરાવે છે.</translation> +<translation id="1697532407822776718">તમારું બધું સેટ છે!</translation> <translation id="1706954506755087368">{1,plural, =1{આ સર્વર સાબિત કરી શક્યું નથી કે તે <ph name="DOMAIN" /> છે; તેનું સુરક્ષા પ્રમાણપત્ર આવતીકાલથી માનવામાં આવે છે તે પ્રમાણે છે. આ કોઇ ખોટી ગોઠવણીને કારણે થયું હશે અથવા કોઇ હુમલાખોર તમારા કનેક્શનને અટકાવી રહ્યો છે.}one{આ સર્વર સાબિત કરી શક્યું નથી કે તે <ph name="DOMAIN" /> છે; તેનું સુરક્ષા પ્રમાણપત્ર માનવામાં આવે છે તે પ્રમાણે ભવિષ્યમાં # દિવસથી છે. આ કોઇ ખોટી ગોઠવણીને કારણે થયું હશે અથવા કોઇ હુમલાખોર તમારા કનેક્શનને અટકાવી રહ્યો છે.}other{આ સર્વર સાબિત કરી શક્યું નથી કે તે <ph name="DOMAIN" /> છે; તેનું સુરક્ષા પ્રમાણપત્ર માનવામાં આવે છે તે પ્રમાણે ભવિષ્યમાં # દિવસથી છે. આ કોઇ ખોટી ગોઠવણીને કારણે થયું હશે અથવા કોઇ હુમલાખોર તમારા કનેક્શનને અટકાવી રહ્યો છે.}}</translation> <translation id="1710259589646384581">OS</translation> <translation id="1721312023322545264">આ સાઇટની મુલાકાત લેવા માટે તમને <ph name="NAME" /> ની પરવાનગીની જરૂર છે</translation> @@ -193,6 +196,7 @@ <translation id="225207911366869382">આ નીતિ માટે આ મૂલ્યને નાપસંદ કરેલું છે.</translation> <translation id="2262243747453050782">HTTP ભૂલ</translation> <translation id="2270484714375784793">ફોન નંબર</translation> +<translation id="2283340219607151381">સરનામાં સાચવો અને ભરો</translation> <translation id="2292556288342944218">તમારી ઇન્ટરનેટ ઍક્સેસ અવરોધિત છે</translation> <translation id="2316887270356262533">1 MB કરતાં ઓછું ખાલી કરે છે. તમારી આગલી મુલાકાત સમયે કેટલીક સાઇટો વધુ ધીમે લોડ થઈ શકે છે.</translation> <translation id="2317259163369394535"><ph name="DOMAIN" /> માટે વપરાશકર્તાનામ અને પાસવર્ડ આવશ્યક છે.</translation> @@ -274,6 +278,7 @@ <translation id="2851634818064021665">આ સાઇટની મુલાકાત લેવા માટે તમને પરનાવગીની જરૂર છે</translation> <translation id="2856444702002559011">હુમલાખોરો કદાચ <ph name="BEGIN_BOLD" /><ph name="SITE" /><ph name="END_BOLD" />માંથી તમારી માહિતી (ઉદાહરણ તરીકે, પાસવર્ડ, સંદેશા અથવા ક્રેડિટ કાર્ડ) ચોરવાનો પ્રયાસ કરી રહ્યાં હોઈ શકે છે. <ph name="BEGIN_LEARN_MORE_LINK" />વધુ જાણો<ph name="END_LEARN_MORE_LINK" /></translation> <translation id="2881276955470682203">કાર્ડ સાચવીએ?</translation> +<translation id="2903493209154104877">સરનામાંઓ</translation> <translation id="2909946352844186028">નેટવર્ક ફેરફાર મળ્યો હતો.</translation> <translation id="2916038427272391327">અન્ય પ્રોગ્રામ બંધ કરો</translation> <translation id="2922350208395188000">સર્વરનું પ્રમાણપત્ર તપાસી શકાતું નથી.</translation> @@ -1146,6 +1151,7 @@ <translation id="973773823069644502">વિતરણ માટેનું સરનામું ઉમેરો</translation> <translation id="975560348586398090">{COUNT,plural, =0{કોઈ નહીં}=1{1 આઇટમ}one{# આઇટમ}other{# આઇટમ}}</translation> <translation id="981121421437150478">ઑફલાઇન</translation> +<translation id="984275831282074731">ચુકવણી પદ્ધતિઓ</translation> <translation id="985199708454569384"><p>જો તમારા કમ્પ્યુટર અથવા મોબાઇલ ઉપકરણની તારીખ અને સમય સચોટ નહીં હોય, તો તમને આ ભૂલ દેખાશે.</p> <p>આ ભૂલ સુધારવા માટે, તમારા ઉપકરણની ઘડિયાળ ખોલો. ખાતરી કરો કે સમય અને તારીખ સાચાં છે.</p></translation> <translation id="988159990683914416">વિકાસકર્તા બિલ્ડ</translation>
diff --git a/components/strings/components_strings_hi.xtb b/components/strings/components_strings_hi.xtb index 9140f41..849e69f 100644 --- a/components/strings/components_strings_hi.xtb +++ b/components/strings/components_strings_hi.xtb
@@ -6,7 +6,7 @@ <translation id="1015730422737071372">अतिरिक्त विवरण प्रदान करें</translation> <translation id="1021110881106174305">स्वीकार्य कार्ड</translation> <translation id="1032854598605920125">घड़ी की दिशा में घुमाएं</translation> -<translation id="1035334672863811645">Chrome में प्रवेश करें</translation> +<translation id="1035334672863811645">Chrome में साइन इन करें</translation> <translation id="1038842779957582377">अज्ञात नाम</translation> <translation id="1050038467049342496">दूूूूसरे ऐप्लिकेशन बंद करें</translation> <translation id="1055184225775184556">&जोड़ना वापस लाएं</translation> @@ -63,6 +63,7 @@ <translation id="129863573139666797"><ph name="BEGIN_LINK" />अपनी कुकी साफ़ करके देखें<ph name="END_LINK" /></translation> <translation id="1314614906530272393">चुना गया सत्र मौजूद नहीं है.</translation> <translation id="1323433172918577554">और दिखाएं</translation> +<translation id="132390688737681464">पतों की जानकारी सेव करें और भरें</translation> <translation id="1333989956347591814">आपकी गतिविधि <ph name="BEGIN_EMPHASIS" />अभी भी इन्हें दिखाई दे सकती है<ph name="END_EMPHASIS" />: <ph name="BEGIN_LIST" /> <ph name="LIST_ITEM" />जिन वेबसाइट पर आप जाते हैं @@ -84,7 +85,7 @@ <translation id="1430915738399379752">प्रिंट करें</translation> <translation id="1484290072879560759">शिपिंग पता चुनें</translation> <translation id="1506687042165942984">इस पृष्ठ की सहेजी गई (अर्थात जिसे पुराना माना जाता है) कॉपी दिखाएं.</translation> -<translation id="1507202001669085618"><p>अगर आपके पास ऐसा वाई-फ़ाई पोर्टल है जिसके लिए यह ज़रूरी है कि आप ऑनलाइन होने से पहले साइन इन करें, तो आपको यह गड़बड़ी दिखाई देगी.</p> +<translation id="1507202001669085618"><p>अगर आप ऐसे वाई-फ़ाई पोर्टल का उपयोग कर रहे हैं जिसमें ऑनलाइन होने से पहले साइन इन ज़रूरी है, तो आपको यह गड़बड़ी दिखाई देगी.</p> <p>गड़बड़ी ठीक करने के लिए, उस पेज पर <strong>कनेक्ट करें</strong> को क्लिक करें जिसे आप खोलने की कोशिश कर रहे हैं.</p></translation> <translation id="1517433312004943670">फ़ोन नंबर आवश्यक है</translation> <translation id="1517500485252541695">स्वीकृत क्रेडिट और डेबिट कार्ड</translation> @@ -110,9 +111,11 @@ <translation id="1645368109819982629">असमर्थित प्रोटोकॉल</translation> <translation id="1655462015569774233">{1,plural, =1{यह सर्वर प्रमाणित नहीं कर सका कि यह <ph name="DOMAIN" /> है; इसके सुरक्षा प्रमाणपत्र की समय सीमा कल समाप्त हो गई थी. ऐसा गलत कॉन्फ़िगरेशन के कारण या किसी आक्रमणकर्ता द्वारा आपके कनेक्शन को बाधित करने के कारण हो सकता है. आपके कंप्यूटर की घड़ी वर्तमान में <ph name="CURRENT_DATE" /> पर सेट है. क्या यह सही है? यदि नहीं, तो आपको अपने सिस्टम की घड़ी सही करनी चाहिए और फिर इस पेज को रीफ्रेश करना चाहिए.}one{यह सर्वर प्रमाणित नहीं कर सका कि यह <ph name="DOMAIN" /> है; इसके सुरक्षा प्रमाणपत्र की समय सीमा # दिन पहले समाप्त हो गई है. ऐसा गलत कॉन्फ़िगरेशन के कारण या किसी आक्रमणकर्ता द्वारा आपके कनेक्शन को बाधित करने के कारण हो सकता है. आपके कंप्यूटर की घड़ी वर्तमान में <ph name="CURRENT_DATE" /> पर सेट है. क्या यह सही है? यदि नहीं, तो आपको अपने सिस्टम की घड़ी सही करनी चाहिए और फिर इस पेज को रीफ्रेश करना चाहिए.}other{यह सर्वर प्रमाणित नहीं कर सका कि यह <ph name="DOMAIN" /> है; इसके सुरक्षा प्रमाणपत्र की समय सीमा # दिन पहले समाप्त हो गई है. ऐसा गलत कॉन्फ़िगरेशन के कारण या किसी आक्रमणकर्ता द्वारा आपके कनेक्शन को बाधित करने के कारण हो सकता है. आपके कंप्यूटर की घड़ी वर्तमान में <ph name="CURRENT_DATE" /> पर सेट है. क्या यह सही है? यदि नहीं, तो आपको अपने सिस्टम की घड़ी सही करनी चाहिए और फिर इस पेज को रीफ्रेश करना चाहिए.}}</translation> <translation id="1656489000284462475">पिकअप</translation> +<translation id="1662550410081243962">भुगतान के तरीके सेव करें और भरें</translation> <translation id="1663943134801823270">कार्ड और पते Chrome से मिलते हैं. आप उन्हें <ph name="BEGIN_LINK" />सेटिंग<ph name="END_LINK" /> में प्रबंधित कर सकते हैं.</translation> <translation id="1676269943528358898">आपकी जानकारी की सुरक्षा करने के लिए <ph name="SITE" /> आमतौर पर एन्क्रिप्शन का उपयोग करती है. जब Google Chrome ने इस बार <ph name="SITE" /> से कनेक्ट करने का प्रयास किया, तो वेबसाइट ने असामान्य और गलत क्रेडेंशियल वापस भेजे. ऐसा तब हो सकता है जब कोई हमलावर <ph name="SITE" /> होने का दावा करने का प्रयास कर रहा हो या किसी वाई-फ़ाई प्रवेश स्क्रीन ने कनेक्शन को बाधित कर दिया हो. आपकी जानकारी अभी भी सुरक्षित है क्योंकि किसी भी डेटा के आदान-प्रदान से पहले ही Google Chrome ने कनेक्शन को रोक दिया था.</translation> <translation id="168841957122794586">सर्वर प्रमाणपत्र में कमज़ोर क्रिप्टोग्राफ़िक कुंजी है.</translation> +<translation id="1697532407822776718">आप बिल्कुल तैयार हैं!</translation> <translation id="1706954506755087368">{1,plural, =1{यह सर्वर प्रमाणित नहीं कर सका कि यह <ph name="DOMAIN" /> है; इसका सुरक्षा प्रमाणपत्र कल से माना जाएगा. ऐसा गलत कॉन्फ़िगरेशन के कारण या किसी आक्रमणकर्ता द्वारा आपके कनेक्शन को बाधित करने के कारण हो सकता है.}one{यह सर्वर प्रमाणित नहीं कर सका कि यह <ph name="DOMAIN" /> है; इसका सुरक्षा प्रमाणपत्र # दिन बाद से माना जाएगा. ऐसा गलत कॉन्फ़िगरेशन के कारण या किसी आक्रमणकर्ता द्वारा आपके कनेक्शन को बाधित करने के कारण हो सकता है.}other{यह सर्वर प्रमाणित नहीं कर सका कि यह <ph name="DOMAIN" /> है; इसका सुरक्षा प्रमाणपत्र # दिन बाद से माना जाएगा. ऐसा गलत कॉन्फ़िगरेशन के कारण या किसी आक्रमणकर्ता द्वारा आपके कनेक्शन को बाधित करने के कारण हो सकता है.}}</translation> <translation id="1710259589646384581">OS</translation> <translation id="1721312023322545264">आपको <ph name="NAME" /> से इस साइट पर जाने की अनुमति लेनी होगी</translation> @@ -193,6 +196,7 @@ <translation id="225207911366869382">यह मान इस नीति के लिए हटा दिया गया है.</translation> <translation id="2262243747453050782">HTTP गड़बड़ी</translation> <translation id="2270484714375784793">फ़ोन नंबर</translation> +<translation id="2283340219607151381">पतों की जानकारी सेव करें और भरें</translation> <translation id="2292556288342944218">आपका इंटरनेट कनेक्शन अवरुद्ध है</translation> <translation id="2316887270356262533">1 MB से भी कम जगह खाली करता है. जब आप अगली बार विज़िट करेंगे तो, कुछ साइटें और धीमे लोड हो सकती हैं.</translation> <translation id="2317259163369394535"><ph name="DOMAIN" /> के लिए उपयोगकर्ता नाम और पासवर्ड आवश्यक है.</translation> @@ -274,6 +278,7 @@ <translation id="2851634818064021665">आपको इस साइट पर जाने की अनुमति लेनी होगी</translation> <translation id="2856444702002559011">हो सकता है कि हमलावर <ph name="BEGIN_BOLD" /><ph name="SITE" /><ph name="END_BOLD" /> से आपकी जानकारी (उदाहरण के लिए, पासवर्ड, संदेश या क्रेडिट कार्ड) चुराने की कोशिश कर रहे हों. <ph name="BEGIN_LEARN_MORE_LINK" />अधिक जानें<ph name="END_LEARN_MORE_LINK" /></translation> <translation id="2881276955470682203">कार्ड सेव करें?</translation> +<translation id="2903493209154104877">पते</translation> <translation id="2909946352844186028">नेटवर्क में बदलाव का पता चला.</translation> <translation id="2916038427272391327">दूसरे प्रोग्राम बंद करें</translation> <translation id="2922350208395188000">सर्वर प्रमाणपत्र की जाँच नहीं की जा सकती.</translation> @@ -426,7 +431,7 @@ <translation id="3946209740501886391">इस साइट पर हमेशा पूछें</translation> <translation id="3949571496842715403">यह सर्वर प्रमाणित नहीं कर सका कि यह <ph name="DOMAIN" /> है; इसके सुरक्षा प्रमाणपत्र में विषय के वैकल्पिक नाम नहीं बताए गए हैं. ऐसा गलत कॉन्फ़िगरेशन के कारण या किसी आक्रमणकर्ता की ओर से आपके कनेक्शन में अवरोध डालने के कारण हो सकता है.</translation> <translation id="3949601375789751990">आपका ब्राउज़िंग इतिहास यहां दिखाई देता है</translation> -<translation id="3950820424414687140">प्रवेश करें</translation> +<translation id="3950820424414687140">साइन इन करें</translation> <translation id="3963721102035795474">रीडर मोड</translation> <translation id="3964661563329879394">{COUNT,plural, =0{कुछ नहीं}=1{1 साइट से }one{# साइटों से }other{# साइटों से }}</translation> <translation id="397105322502079400">गणना की जा रही है...</translation> @@ -658,7 +663,7 @@ <translation id="5565735124758917034">सक्रिय</translation> <translation id="5571083550517324815">इस पते से पिक अप नहीं किया जा सकता. कोई दूसरा पता चुनें.</translation> <translation id="5571347317547569613">({NUM_COOKIES,plural, =1{1 इस्तेमाल में है}one{# इस्तेमाल में हैं}other{# इस्तेमाल में हैं}})</translation> -<translation id="5572851009514199876">कृपया Chrome शुरू करके उसमें प्रवेश करें ताकि Chrome देख सके कि क्या आपके पास यह साइट एक्सेस करने की अनुमति है.</translation> +<translation id="5572851009514199876">कृपया Chrome शुरू करके उसमें साइन इन करें ताकि Chrome देख सके कि क्या आपके पास यह साइट एक्सेस करने की अनुमति है.</translation> <translation id="5580958916614886209">अपना समाप्ति माह जाँचें और फिर से कोशिश करें</translation> <translation id="5586446728396275693">कोई सहेजा गया पता नहीं है</translation> <translation id="5595485650161345191">पता संपादित करें</translation> @@ -1014,7 +1019,7 @@ <translation id="825929999321470778">सेव किए गए सभी पासवर्ड दिखाएं</translation> <translation id="8261506727792406068">हटाएं</translation> <translation id="8267698848189296333"><ph name="USERNAME" /> के रूप में प्रवेश करना</translation> -<translation id="8286036467436129157">प्रवेश करें</translation> +<translation id="8286036467436129157">साइन इन करें</translation> <translation id="8288807391153049143">प्रमाणपत्र दिखाएं</translation> <translation id="8289355894181816810">यदि आप सुनिश्चित नहीं हैं कि इसका क्या मतलब है, तो अपने नेटवर्क व्यवस्थापक से संपर्क करें.</translation> <translation id="8293206222192510085">बुकमार्क जोड़ें</translation> @@ -1118,13 +1123,13 @@ <translation id="9076283476770535406">इसमें वयस्क सामग्री हो सकती है</translation> <translation id="9078964945751709336">अधिक जानकारी की आवश्यकता है</translation> <translation id="9080712759204168376">आदेश सारांश</translation> -<translation id="9103872766612412690"><ph name="SITE" /> आपकी जानकारी की सुरक्षा करने के लिए आमतौर पर एन्क्रिप्शन का उपयोग करती है. जब क्रोमियम ने इस बार <ph name="SITE" /> से कनेक्ट करने का प्रयास किया, तो वेबसाइट ने असामान्य और गलत क्रेडेंशियल वापस भेजे. ऐसा तब हो सकता है जब कोई हमलावर <ph name="SITE" /> होने का दावा करने का प्रयास कर रहा हो या किसी वाई-फ़ाई प्रवेश स्क्रीन ने कनेक्शन को बाधित कर दिया हो. आपकी जानकारी अभी भी सुरक्षित है क्योंकि किसी भी डेटा के आदान-प्रदान से पहले ही क्रोमियम ने कनेक्शन को रोक दिया था.</translation> +<translation id="9103872766612412690"><ph name="SITE" /> आपकी जानकारी की सुरक्षा करने के लिए आमतौर पर एन्क्रिप्शन का उपयोग करती है. जब क्रोमियम ने इस बार <ph name="SITE" /> से कनेक्ट करने का प्रयास किया, तो वेबसाइट ने असामान्य और गलत क्रेडेंशियल वापस भेजे. ऐसा तब हो सकता है जब कोई हमलावर <ph name="SITE" /> होने का दिखाना करने की कोशिश कर रहा हो या किसी वाई-फ़ाई साइन इन स्क्रीन ने कनेक्शन को बाधित कर दिया हो. आपकी जानकारी अभी भी सुरक्षित है क्योंकि किसी भी डेटा के लेन-देन से पहले ही क्रोमियम ने कनेक्शन को रोक दिया था.</translation> <translation id="9106062320799175032">बिलिंग पता जोड़ें</translation> <translation id="910908805481542201">इसे ठीक करने में मेरी सहायता करें</translation> <translation id="9114524666733003316">कार्ड की पुष्टि की जा रही है...</translation> <translation id="9128870381267983090">नेटवर्क से कनेक्ट करें</translation> <translation id="9137013805542155359">मूल दिखाएं</translation> -<translation id="9137248913990643158">इस ऐप्लिकेशन का उपयोग करने से पहले कृपया Chrome शुरू करके उसमें प्रवेश करें.</translation> +<translation id="9137248913990643158">इस ऐप्लिकेशन का उपयोग करने से पहले कृपया Chrome शुरू करके उसमें साइन इन करें.</translation> <translation id="9148088599418889305">शिपिंग का तरीका चुनें</translation> <translation id="9148507642005240123">&संपादन वापस लाएं</translation> <translation id="9154194610265714752">अपडेट किया गया</translation> @@ -1147,6 +1152,7 @@ <translation id="973773823069644502">डिलीवरी का पता जोड़ें</translation> <translation id="975560348586398090">{COUNT,plural, =0{कुछ नहीं}=1{1 आइटम}one{# आइटम}other{# आइटम}}</translation> <translation id="981121421437150478">ऑफ़लाइन</translation> +<translation id="984275831282074731">भुगतान के तरीके</translation> <translation id="985199708454569384"><p>अगर आपके कंप्यूटर या मोबाइल डिवाइस की तारीख और समय गलत है, तो आपको यह गड़बड़ी दिखाई देगी.</p> <p>इस गड़बड़ी को ठीक करने के लिए, अपने डिवाइस की घड़ी खोलें. पक्का करें कि समय और तारीख सही हों.</p></translation> <translation id="988159990683914416">डेवलपर बिल्ड</translation>
diff --git a/components/strings/components_strings_hr.xtb b/components/strings/components_strings_hr.xtb index d0357c6..4f1c6c8f 100644 --- a/components/strings/components_strings_hr.xtb +++ b/components/strings/components_strings_hr.xtb
@@ -63,6 +63,7 @@ <translation id="129863573139666797"><ph name="BEGIN_LINK" />Izbrišite kolačiće<ph name="END_LINK" /></translation> <translation id="1314614906530272393">Odabrana sesija ne postoji.</translation> <translation id="1323433172918577554">Više</translation> +<translation id="132390688737681464">Spremi i popuni adrese</translation> <translation id="1333989956347591814">Vaše aktivnosti <ph name="BEGIN_EMPHASIS" />i dalje mogu biti vidljive<ph name="END_EMPHASIS" />: <ph name="BEGIN_LIST" /> <ph name="LIST_ITEM" />web-lokacijama koje posjećujete @@ -110,9 +111,11 @@ <translation id="1645368109819982629">Protokol nije podržan</translation> <translation id="1655462015569774233">{1,plural, =1{Poslužitelj nije mogao dokazati da je to <ph name="DOMAIN" /> jer je sigurnosni certifikat istekao jučer. Razlog može biti pogrešna konfiguracija ili napad na vašu vezu. Sat vašeg računala trenutačno je postavljen na <ph name="CURRENT_DATE" />. Je li to u redu? Ako nije, ispravite vrijeme na satu sustava, a zatim osvježite ovu stranicu.}one{Poslužitelj nije mogao dokazati da je to <ph name="DOMAIN" /> jer je sigurnosni certifikat istekao prije # dan. Razlog može biti pogrešna konfiguracija ili napad na vašu vezu. Sat vašeg računala trenutačno je postavljen na <ph name="CURRENT_DATE" />. Je li to u redu? Ako nije, ispravite vrijeme na satu sustava, a zatim osvježite ovu stranicu.}few{Poslužitelj nije mogao dokazati da je to <ph name="DOMAIN" /> jer je sigurnosni certifikat istekao prije # dana. Razlog može biti pogrešna konfiguracija ili napad na vašu vezu. Sat vašeg računala trenutačno je postavljen na <ph name="CURRENT_DATE" />. Je li to u redu? Ako nije, ispravite vrijeme na satu sustava, a zatim osvježite ovu stranicu.}other{Poslužitelj nije mogao dokazati da je to <ph name="DOMAIN" /> jer je sigurnosni certifikat istekao prije # dana. Razlog može biti pogrešna konfiguracija ili napad na vašu vezu. Sat vašeg računala trenutačno je postavljen na <ph name="CURRENT_DATE" />. Je li to u redu? Ako nije, ispravite vrijeme na satu sustava, a zatim osvježite ovu stranicu.}}</translation> <translation id="1656489000284462475">Preuzimanje</translation> +<translation id="1662550410081243962">Spremi i popuni načine plaćanja</translation> <translation id="1663943134801823270">Kartice i adrese dolaze iz Chromea. Njima možete upravljati u <ph name="BEGIN_LINK" />Postavkama<ph name="END_LINK" />.</translation> <translation id="1676269943528358898"><ph name="SITE" /> obično upotrebljava enkripciju radi zaštite vaših podataka. Prilikom ovog pokušaja povezivanja Google Chromea s web-lokacijom <ph name="SITE" /> ta je web-lokacija vratila neuobičajene i netočne vjerodajnice. To može značiti da se neki napadač pokušava predstaviti kao <ph name="SITE" /> ili je zaslon za prijavu na Wi-Fi prekinuo vezu. Vaši su podaci još uvijek sigurni jer je Google Chrome zaustavio povezivanje prije razmjene podataka.</translation> <translation id="168841957122794586">Certifikat poslužitelja sadrži slab kriptografski ključ!</translation> +<translation id="1697532407822776718">Potpuno ste spremni!</translation> <translation id="1706954506755087368">{1,plural, =1{Poslužitelj nije mogao dokazati da je to <ph name="DOMAIN" /> jer je sigurnosni certifikat navodno izdan sutra. Razlog može biti pogrešna konfiguracija ili napad na vašu vezu.}one{Poslužitelj nije mogao dokazati da je to <ph name="DOMAIN" /> jer je sigurnosni certifikat navodno izdan # dan u budućnosti. Razlog može biti pogrešna konfiguracija ili napad na vašu vezu.}few{Poslužitelj nije mogao dokazati da je to <ph name="DOMAIN" /> jer je sigurnosni certifikat navodno izdan # dana u budućnosti. Razlog može biti pogrešna konfiguracija ili napad na vašu vezu.}other{Poslužitelj nije mogao dokazati da je to <ph name="DOMAIN" /> jer je sigurnosni certifikat navodno izdan # dana u budućnosti. Razlog može biti pogrešna konfiguracija ili napad na vašu vezu.}}</translation> <translation id="1710259589646384581">OS</translation> <translation id="1721312023322545264"><ph name="NAME" /> mora dopustiti da posjetiš tu web-lokaciju</translation> @@ -193,6 +196,7 @@ <translation id="225207911366869382">Ta je vrijednost obustavljena za to pravilo.</translation> <translation id="2262243747453050782">HTTP pogreška</translation> <translation id="2270484714375784793">Telefonski broj</translation> +<translation id="2283340219607151381">Spremi i popuni adrese</translation> <translation id="2292556288342944218">Internetski je pristup blokiran</translation> <translation id="2316887270356262533">Oslobodit će se manje od 1 MB. Neke bi se web-lokacije pri sljedećem otvaranju mogle sporije učitavati.</translation> <translation id="2317259163369394535"><ph name="DOMAIN" /> zahtijeva korisničko ime i zaporku.</translation> @@ -274,6 +278,7 @@ <translation id="2851634818064021665">Potrebno ti je dopuštenje za posjet toj web-lokaciji</translation> <translation id="2856444702002559011">Napadači možda pokušavaju ukrasti vaše podatke s web-lokacije <ph name="BEGIN_BOLD" /><ph name="SITE" /><ph name="END_BOLD" /> (na primjer zaporke, poruke ili brojeve kreditnih kartica). <ph name="BEGIN_LEARN_MORE_LINK" />Saznajte više<ph name="END_LEARN_MORE_LINK" /></translation> <translation id="2881276955470682203">Želite li spremiti karticu?</translation> +<translation id="2903493209154104877">Adrese</translation> <translation id="2909946352844186028">Otkrivena je promjena mreže.</translation> <translation id="2916038427272391327">Zatvorite ostale programe</translation> <translation id="2922350208395188000">Certifikat poslužitelja nije moguće provjeriti.</translation> @@ -1147,6 +1152,7 @@ <translation id="973773823069644502">Dodajte adresu za isporuku</translation> <translation id="975560348586398090">{COUNT,plural, =0{Nijedna}=1{1 stavka}one{# stavka}few{# stavke}other{# stavki}}</translation> <translation id="981121421437150478">Izvanmrežno</translation> +<translation id="984275831282074731">Načini plaćanja</translation> <translation id="985199708454569384"><p>Ta će se pogreška prikazati ako datum i vrijeme na računalu ili mobilnom uređaju nisu točni.</p> <p>Da biste ispravili tu pogrešku, otvorite sat uređaja. Ako vrijeme i datum nisu točni, ispravite ih.</p></translation> <translation id="988159990683914416">Sastavak razvojnog programera</translation>
diff --git a/components/strings/components_strings_hu.xtb b/components/strings/components_strings_hu.xtb index c4d3ceb1..a5abcb3 100644 --- a/components/strings/components_strings_hu.xtb +++ b/components/strings/components_strings_hu.xtb
@@ -63,6 +63,7 @@ <translation id="129863573139666797"><ph name="BEGIN_LINK" />Próbálkozzon a cookie-k törlésével<ph name="END_LINK" /></translation> <translation id="1314614906530272393">A kiválasztott munkamenet nem létezik.</translation> <translation id="1323433172918577554">Több</translation> +<translation id="132390688737681464">Címek mentése és betöltése</translation> <translation id="1333989956347591814">Tevékenysége <ph name="BEGIN_EMPHASIS" />továbbra is látható maradhat<ph name="END_EMPHASIS" /> a következők számára: <ph name="BEGIN_LIST" /> <ph name="LIST_ITEM" />A megtekintett webhelyek @@ -110,9 +111,11 @@ <translation id="1645368109819982629">Nem támogatott protokoll</translation> <translation id="1655462015569774233">{1,plural, =1{A szerver nem tudta bizonyítani, hogy valóban a(z) <ph name="DOMAIN" /> domainbe tartozik; biztonsági tanúsítványa tegnap lejárt. Ennek oka lehet konfigurációs hiba, de az is lehet, hogy egy támadó eltérítette az Ön kapcsolódását. Számítógépének órája jelenleg a következőre van állítva: <ph name="CURRENT_DATE" />. Ez megfelelőnek tűnik? Ha nem, állítsa be megfelelően a rendszer óráját, majd frissítse az oldalt.}other{A szerver nem tudta bizonyítani, hogy valóban a(z) <ph name="DOMAIN" /> domainbe tartozik; biztonsági tanúsítványa # nappal ezelőtt lejárt. Ennek oka lehet konfigurációs hiba, de az is lehet, hogy egy támadó eltérítette az Ön kapcsolódását. Számítógépének órája jelenleg a következőre van állítva: <ph name="CURRENT_DATE" />. Ez megfelelőnek tűnik? Ha nem, állítsa be megfelelően a rendszer óráját, majd frissítse az oldalt.}}</translation> <translation id="1656489000284462475">Átvétel</translation> +<translation id="1662550410081243962">Fizetési módok mentése és betöltése</translation> <translation id="1663943134801823270">A kártyák és a címek a Chrome-ból származnak. A <ph name="BEGIN_LINK" />Beállításokban<ph name="END_LINK" /> kezelheti őket.</translation> <translation id="1676269943528358898">A(z) <ph name="SITE" /> webhely rendes esetben titkosítást alkalmaz az Ön adatainak védelme érdekében. Amikor a Google Chrome most csatlakozni próbált, a(z) <ph name="SITE" /> webhely szokatlan és helytelen hitelesítési adatokat küldött vissza. Ez olyankor fordulhat elő, amikor egy támadó megpróbálja magát kiadni a(z) <ph name="SITE" /> webhelynek, vagy valamilyen Wi-Fi-bejelentkezési képernyő megszakította a kapcsolatot. Adatai továbbra is biztonságban vannak, mivel a Google Chrome még azt megelőzően megszakította a kapcsolatot, hogy bármiféle adatcserére sor kerülhetett volna.</translation> <translation id="168841957122794586">A szervertanúsítvány gyenge titkosítási kulcsot tartalmaz.</translation> +<translation id="1697532407822776718">Máris elkészült!</translation> <translation id="1706954506755087368">{1,plural, =1{A szerver nem tudta bizonyítani, hogy valóban a(z) <ph name="DOMAIN" /> domainbe tartozik; biztonsági tanúsítványa elméletileg holnaptól érvényes. Ennek oka lehet konfigurációs hiba, de az is lehet, hogy egy támadó eltérítette az Ön kapcsolódását.}other{A szerver nem tudta bizonyítani, hogy valóban a(z) <ph name="DOMAIN" /> domainbe tartozik; biztonsági tanúsítványa elméletileg # nap múlva lép érvénybe. Ennek oka lehet konfigurációs hiba, de az is lehet, hogy egy támadó eltérítette az Ön kapcsolódását.}}</translation> <translation id="1710259589646384581">OS</translation> <translation id="1721312023322545264">A webhely felkereséséhez <ph name="NAME" /> engedélyére van szükség</translation> @@ -193,6 +196,7 @@ <translation id="225207911366869382">Ez az érték elavult ennél a házirendnél.</translation> <translation id="2262243747453050782">HTTP hiba</translation> <translation id="2270484714375784793">Telefonszám</translation> +<translation id="2283340219607151381">Címek mentése és betöltése</translation> <translation id="2292556288342944218">Az internethez való hozzáférést a rendszer letiltotta</translation> <translation id="2316887270356262533">1 MB-nál kevesebb hely szabadul fel. Előfordulhat, hogy egyes webhelyek lassabban töltődnek be, amikor legközelebb felkeresi őket.</translation> <translation id="2317259163369394535">A(z) <ph name="DOMAIN" /> felhasználónevet és jelszót kér.</translation> @@ -274,6 +278,7 @@ <translation id="2851634818064021665">A webhely felkereséséhez jogosultságra van szüksége</translation> <translation id="2856444702002559011">A támadók megpróbálhatják ellopni a(z) <ph name="BEGIN_BOLD" /><ph name="SITE" /><ph name="END_BOLD" /> webhelyen lévő adatait (például jelszavait, üzeneteit és hitelkártyaadatait). <ph name="BEGIN_LEARN_MORE_LINK" />További információ<ph name="END_LEARN_MORE_LINK" />.</translation> <translation id="2881276955470682203">Menti a kártyát?</translation> +<translation id="2903493209154104877">Címek</translation> <translation id="2909946352844186028">Változást érzékeltünk a hálózatban.</translation> <translation id="2916038427272391327">Zárja be a többi programot</translation> <translation id="2922350208395188000">A szerver tanúsítványát nem sikerült leellenőrizni.</translation> @@ -1145,6 +1150,7 @@ <translation id="973773823069644502">Kézbesítési cím hozzáadása</translation> <translation id="975560348586398090">{COUNT,plural, =0{Nincs}=1{1 elem}other{# elem}}</translation> <translation id="981121421437150478">Offline</translation> +<translation id="984275831282074731">Fizetési módok</translation> <translation id="985199708454569384"><p>Ez a hiba akkor fordul elő, ha a számítógép vagy mobileszköz dátuma és ideje pontatlan.</p> <p>A hiba kijavításához nyissa meg eszköze óráját. Ellenőrizze, hogy helyes-e a dátum és az idő.</p></translation> <translation id="988159990683914416">Fejlesztői változat</translation>
diff --git a/components/strings/components_strings_id.xtb b/components/strings/components_strings_id.xtb index 6d487a5a..ade6356 100644 --- a/components/strings/components_strings_id.xtb +++ b/components/strings/components_strings_id.xtb
@@ -63,6 +63,7 @@ <translation id="129863573139666797"><ph name="BEGIN_LINK" />Coba hapus cookie Anda<ph name="END_LINK" /></translation> <translation id="1314614906530272393">Sesi yang dipilih tidak ada.</translation> <translation id="1323433172918577554">Tampilkan Lebih Banyak</translation> +<translation id="132390688737681464">Simpan dan Isi Alamat</translation> <translation id="1333989956347591814">Aktivitas Anda <ph name="BEGIN_EMPHASIS" />mungkin tetap dapat dilihat<ph name="END_EMPHASIS" /> oleh: <ph name="BEGIN_LIST" /> <ph name="LIST_ITEM" />Situs yang Anda buka @@ -110,9 +111,11 @@ <translation id="1645368109819982629">Protokol yang tidak didukung</translation> <translation id="1655462015569774233">{1,plural, =1{Server ini tidak dapat membuktikan bahwa ini adalah <ph name="DOMAIN" />; masa berlaku sertifikat keamanannya telah berakhir kemarin. Hal ini mungkin disebabkan oleh kesalahan konfigurasi, atau ada penyerang yang memintas sambungan internet Anda. Jam komputer Anda saat ini diatur ke <ph name="CURRENT_DATE" />. Apakah terlihat sesuai? Jika tidak, Anda harus membenarkan jam sistem dan menyegarkan halaman ini.}other{Server ini tidak dapat membuktikan bahwa ini adalah <ph name="DOMAIN" />; masa berlaku sertifikat keamanannya telah berakhir # hari yang lalu. Hal ini mungkin disebabkan oleh kesalahan konfigurasi, atau ada penyerang yang memintas sambungan internet Anda. Jam komputer Anda saat ini diatur ke <ph name="CURRENT_DATE" />. Apakah terlihat sesuai? Jika tidak, Anda harus membenarkan jam sistem dan menyegarkan halaman ini.}}</translation> <translation id="1656489000284462475">Pengambilan</translation> +<translation id="1662550410081243962">Simpan dan isi metode pembayaran</translation> <translation id="1663943134801823270">Kartu dan alamat berasal dari Chrome. Anda dapat mengelolanya di <ph name="BEGIN_LINK" />Setelan<ph name="END_LINK" />.</translation> <translation id="1676269943528358898"><ph name="SITE" /> biasanya menggunakan enkripsi untuk melindungi informasi Anda. Saat Google Chrome mencoba menyambung ke <ph name="SITE" /> kali ini, situs web mengembalikan kredensial yang salah dan tidak biasa. Hal ini dapat terjadi jika ada penyerang yang berpura-pura menjadi <ph name="SITE" />, atau layar masuk Wi-Fi mengganggu sambungan. Informasi Anda masih aman karena Google Chrome menghentikan sambungan sebelum terjadi pertukaran data apa pun.</translation> <translation id="168841957122794586">Sertifikat server berisi kunci kriptografis yang lemah.</translation> +<translation id="1697532407822776718">Anda sudah siap!</translation> <translation id="1706954506755087368">{1,plural, =1{Server ini tidak dapat membuktikan bahwa ini adalah <ph name="DOMAIN" />; sertifikat keamanannya sepertinya dari esok hari. Hal ini mungkin disebabkan oleh kesalahan konfigurasi, atau ada penyerang yang memintas sambungan internet Anda.}other{Server ini tidak dapat membuktikan bahwa ini adalah <ph name="DOMAIN" />; sertifikat keamanannya sepertinya dari # hari mendatang. Hal ini mungkin disebabkan oleh kesalahan konfigurasi, atau ada penyerang yang memintas sambungan internet Anda.}}</translation> <translation id="1710259589646384581">OS</translation> <translation id="1721312023322545264">Anda memerlukan izin dari <ph name="NAME" /> untuk mengunjungi situs ini</translation> @@ -193,6 +196,7 @@ <translation id="225207911366869382">Nilai ini sudah usang untuk kebijakan ini.</translation> <translation id="2262243747453050782">Kesalahan HTTP</translation> <translation id="2270484714375784793">Nomor telepon</translation> +<translation id="2283340219607151381">Simpan dan isi alamat</translation> <translation id="2292556288342944218">Akses Internet Anda diblokir</translation> <translation id="2316887270356262533">Sediakan ruang kurang dari 1 MB. Beberapa situs mungkin dimuat lebih lambat dibuka lagi.</translation> <translation id="2317259163369394535"><ph name="DOMAIN" /> memerlukan nama pengguna dan sandi.</translation> @@ -274,6 +278,7 @@ <translation id="2851634818064021665">Anda memerlukan izin untuk membuka situs ini</translation> <translation id="2856444702002559011">Penyerang mungkin berusaha mencuri informasi Anda dari <ph name="BEGIN_BOLD" /><ph name="SITE" /><ph name="END_BOLD" /> (misalnya, sandi, pesan, atau kartu kredit). <ph name="BEGIN_LEARN_MORE_LINK" />Pelajari lebih lanjut<ph name="END_LEARN_MORE_LINK" /></translation> <translation id="2881276955470682203">Simpan kartu?</translation> +<translation id="2903493209154104877">Alamat</translation> <translation id="2909946352844186028">Perubahan jaringan terdeteksi.</translation> <translation id="2916038427272391327">Tutup program lain</translation> <translation id="2922350208395188000">Sertifikat server tidak dapat diperiksa.</translation> @@ -1146,6 +1151,7 @@ <translation id="973773823069644502">Tambahkan Alamat Pengiriman</translation> <translation id="975560348586398090">{COUNT,plural, =0{Tidak ada}=1{1 item}other{# item}}</translation> <translation id="981121421437150478">Offline</translation> +<translation id="984275831282074731">Metode pembayaran</translation> <translation id="985199708454569384"><p>Anda akan melihat error ini jika tanggal dan waktu di komputer atau perangkat seluler Anda tidak akurat.</p> <p>Untuk memperbaiki error, buka jam perangkat. Pastikan waktu dan tanggal sudah tepat.</p></translation> <translation id="988159990683914416">Buatan Pengembang</translation>
diff --git a/components/strings/components_strings_it.xtb b/components/strings/components_strings_it.xtb index 839b340..1d8145e 100644 --- a/components/strings/components_strings_it.xtb +++ b/components/strings/components_strings_it.xtb
@@ -63,6 +63,7 @@ <translation id="129863573139666797"><ph name="BEGIN_LINK" />Prova a cancellare i cookie<ph name="END_LINK" /></translation> <translation id="1314614906530272393">La sessione selezionata non esiste.</translation> <translation id="1323433172918577554">Espandi</translation> +<translation id="132390688737681464">Salva e compila gli indirizzi</translation> <translation id="1333989956347591814">La tua attività <ph name="BEGIN_EMPHASIS" />potrebbe comunque essere visibile<ph name="END_EMPHASIS" />: <ph name="BEGIN_LIST" /> <ph name="LIST_ITEM" />Ai siti web visitati @@ -110,9 +111,11 @@ <translation id="1645368109819982629">Protocollo non supportato</translation> <translation id="1655462015569774233">{1,plural, =1{Questo server non è riuscito a verificare che si tratti di <ph name="DOMAIN" />; il relativo certificato di sicurezza è scaduto ieri. Il problema potrebbe essere dovuto a un'errata configurazione o a un malintenzionato che intercetta la connessione. L'orologio del computer è attualmente impostato su <ph name="CURRENT_DATE" />. È corretto? Se è sbagliato, dovresti regolare l'orologio e aggiornare la pagina.}other{Questo server non è riuscito a verificare che si tratti di <ph name="DOMAIN" />; il relativo certificato di sicurezza è scaduto # giorni fa. Il problema potrebbe essere dovuto a un'errata configurazione o a un malintenzionato che intercetta la connessione. L'orologio del computer è attualmente impostato su <ph name="CURRENT_DATE" />. È corretto? Se è sbagliato, dovresti regolare l'orologio e aggiornare la pagina.}}</translation> <translation id="1656489000284462475">Ritiro</translation> +<translation id="1662550410081243962">Salva e compila i metodi di pagamento</translation> <translation id="1663943134801823270">Carte di credito e indirizzi provengono da Chrome. Puoi gestirli in <ph name="BEGIN_LINK" />Impostazioni<ph name="END_LINK" />.</translation> <translation id="1676269943528358898"><ph name="SITE" /> in genere utilizza la crittografia per proteggere le tue informazioni. Questa volta, quando Google Chrome ha provato a connettersi a <ph name="SITE" />, il sito web ha restituito credenziali insolite e sbagliate. È possibile che un malintenzionato stia cercando di spacciarsi per il sito <ph name="SITE" /> oppure che una schermata di accesso alla rete Wi-Fi abbia interrotto la connessione. Le tue informazioni sono ancora al sicuro perché Google Chrome ha interrotto la connessione prima che avvenissero scambi di dati.</translation> <translation id="168841957122794586">Il certificato del server contiene una chiave crittografica debole.</translation> +<translation id="1697532407822776718">Ecco fatto!</translation> <translation id="1706954506755087368">{1,plural, =1{Questo server non è riuscito a verificare che si tratti di <ph name="DOMAIN" />; il relativo certificato di sicurezza potrebbe essere attivo da domani. Il problema potrebbe essere dovuto a un'errata configurazione o a un malintenzionato che intercetta la connessione.}other{Questo server non è riuscito a verificare che si tratti di <ph name="DOMAIN" />; il relativo certificato di sicurezza potrebbe essere attivo tra # giorni. Il problema potrebbe essere dovuto a un'errata configurazione o a un malintenzionato che intercetta la connessione.}}</translation> <translation id="1710259589646384581">Sistema operativo</translation> <translation id="1721312023322545264">Ti occorre l'autorizzazione di <ph name="NAME" /> per poter visitare il sito</translation> @@ -193,6 +196,7 @@ <translation id="225207911366869382">Il valore specificato per la norma è obsoleto.</translation> <translation id="2262243747453050782">Errore HTTP</translation> <translation id="2270484714375784793">Numero di telefono</translation> +<translation id="2283340219607151381">Salva e compila gli indirizzi</translation> <translation id="2292556288342944218">L'accesso a Internet è bloccato</translation> <translation id="2316887270356262533">Consente di liberare meno di 1 MB. Alcuni siti potrebbero caricarsi più lentamente alla prossima visita.</translation> <translation id="2317259163369394535"><ph name="DOMAIN" /> richiede un nome utente e una password.</translation> @@ -274,6 +278,7 @@ <translation id="2851634818064021665">Ti occorre l'autorizzazione per poter visitare questo sito</translation> <translation id="2856444702002559011">Gli utenti malintenzionati potrebbero provare a carpire le tue informazioni da <ph name="BEGIN_BOLD" /><ph name="SITE" /><ph name="END_BOLD" /> (ad esempio, password, messaggi o carte di credito). <ph name="BEGIN_LEARN_MORE_LINK" />Ulteriori informazioni<ph name="END_LEARN_MORE_LINK" /></translation> <translation id="2881276955470682203">Salvare la carta?</translation> +<translation id="2903493209154104877">Indirizzi</translation> <translation id="2909946352844186028">È stato rilevato un cambio di rete.</translation> <translation id="2916038427272391327">Chiudi altri programmi</translation> <translation id="2922350208395188000">Il certificato del server non può essere verificato.</translation> @@ -1142,6 +1147,7 @@ <translation id="973773823069644502">Aggiungi l'indirizzo di consegna</translation> <translation id="975560348586398090">{COUNT,plural, =0{Nessuno}=1{1 elemento}other{# elementi}}</translation> <translation id="981121421437150478">Offline</translation> +<translation id="984275831282074731">Metodi di pagamento</translation> <translation id="985199708454569384"><p>Vedrai questo errore se la data e l'ora del dispositivo mobile o del computer non sono esatte.</p> <p>Per risolvere il problema, apri l'orologio del dispositivo e assicurati che la data e l'ora siano corrette.</p></translation> <translation id="988159990683914416">Build</translation>
diff --git a/components/strings/components_strings_iw.xtb b/components/strings/components_strings_iw.xtb index f89e22ad..00579a1 100644 --- a/components/strings/components_strings_iw.xtb +++ b/components/strings/components_strings_iw.xtb
@@ -63,6 +63,7 @@ <translation id="129863573139666797"><ph name="BEGIN_LINK" />נסה לנקות את קובצי ה-Cookie<ph name="END_LINK" /></translation> <translation id="1314614906530272393">הסשן שנבחר לא קיים.</translation> <translation id="1323433172918577554">הצגת פריטים נוספים</translation> +<translation id="132390688737681464">שמירה ומילוי של כתובות</translation> <translation id="1333989956347591814">הפעילות שלך <ph name="BEGIN_EMPHASIS" />עדיין עשויה להיות מוצגת<ph name="END_EMPHASIS" /> בפני: <ph name="BEGIN_LIST" /> <ph name="LIST_ITEM" />אתרים שאליהם נכנסת @@ -110,9 +111,11 @@ <translation id="1645368109819982629">פרוטוקול לא נתמך</translation> <translation id="1655462015569774233">{1,plural, =1{השרת הזה לא הצליח להוכיח שהוא <ph name="DOMAIN" />; התוקף של אישור האבטחה שלו פג אתמול. ייתכן שהסיבה לכך היא הגדרה שגויה או שתוקף מיירט את החיבור שלך. התאריך המוגדר כעת בשעון המחשב שלך הוא <ph name="CURRENT_DATE" />. האם זה נכון? אם לא, עליך לכוון את שעון המערכת ולאחר מכן לרענן את הדף הזה.}two{השרת הזה לא הצליח להוכיח שהוא <ph name="DOMAIN" />; התוקף של אישור האבטחה שלו פג לפני יומיים. ייתכן שהסיבה לכך היא הגדרה שגויה או שתוקף מיירט את החיבור שלך. התאריך המוגדר כעת בשעון המחשב שלך הוא <ph name="CURRENT_DATE" />. האם זה נכון? אם לא, עליך לכוון את שעון המערכת ולאחר מכן לרענן את הדף הזה.}many{השרת הזה לא הצליח להוכיח שהוא <ph name="DOMAIN" />; התוקף של אישור האבטחה שלו פג לפני # ימים. ייתכן שהסיבה לכך היא הגדרה שגויה או שתוקף מיירט את החיבור שלך. התאריך המוגדר כעת בשעון המחשב שלך הוא <ph name="CURRENT_DATE" />. האם זה נכון? אם לא, עליך לכוון את שעון המערכת ולאחר מכן לרענן את הדף הזה.}other{השרת הזה לא הצליח להוכיח שהוא <ph name="DOMAIN" />; התוקף של אישור האבטחה שלו פג לפני # ימים. ייתכן שהסיבה לכך היא הגדרה שגויה או שתוקף מיירט את החיבור שלך. התאריך המוגדר כעת בשעון המחשב שלך הוא <ph name="CURRENT_DATE" />. האם זה נכון? אם לא, עליך לכוון את שעון המערכת ולאחר מכן לרענן את הדף הזה.}}</translation> <translation id="1656489000284462475">איסוף</translation> +<translation id="1662550410081243962">שמירה ומילוי של אמצעי תשלום</translation> <translation id="1663943134801823270">הכרטיסים והכתובות נלקחים מ-Chrome. אפשר לנהל אותם ב<ph name="BEGIN_LINK" />הגדרות<ph name="END_LINK" />.</translation> <translation id="1676269943528358898">האתר <ph name="SITE" /> משתמש בדרך כלל בהצפנה כדי להגן על המידע שלך. כאשר Google Chrome ניסה הפעם להתחבר ל-<ph name="SITE" />, האתר שלח חזרה אישורים חריגים ושגויים. ייתכן שתוקף מנסה להתחזות לאתר <ph name="SITE" />, או שמסך כניסה ל-Wi-Fi הפריע לחיבור. המידע שלך עדיין מאובטח מכיוון ש-Google Chrome הפסיק את החיבור לפני חילופי הנתונים.</translation> <translation id="168841957122794586">אישור השרת מכיל מפתח הצפנה חלש.</translation> +<translation id="1697532407822776718">הכל מוכן!</translation> <translation id="1706954506755087368">{1,plural, =1{השרת הזה לא הצליח להוכיח שהוא <ph name="DOMAIN" />; אישור האבטחה שלו אמור להיכנס לתוקף רק מחר. ייתכן שהסיבה לכך היא הגדרה שגויה או שתוקף מיירט את החיבור שלך.}two{השרת הזה לא הצליח להוכיח שהוא <ph name="DOMAIN" />; אישור האבטחה שלו אמור להיכנס לתוקף רק בעוד יומיים. ייתכן שהסיבה לכך היא הגדרה שגויה או שתוקף מיירט את החיבור שלך.}many{השרת הזה לא הצליח להוכיח שהוא <ph name="DOMAIN" />; אישור האבטחה שלו אמור להיכנס לתוקף רק בעוד # ימים. ייתכן שהסיבה לכך היא הגדרה שגויה או שתוקף מיירט את החיבור שלך.}other{השרת הזה לא הצליח להוכיח שהוא <ph name="DOMAIN" />; אישור האבטחה שלו אמור להיכנס לתוקף רק בעוד # ימים. ייתכן שהסיבה לכך היא הגדרה שגויה או שתוקף מיירט את החיבור שלך.}}</translation> <translation id="1710259589646384581">מערכת הפעלה</translation> <translation id="1721312023322545264">עליך לפנות אל <ph name="NAME" /> לקבלת הרשאה לביקור באתר הזה</translation> @@ -193,6 +196,7 @@ <translation id="225207911366869382">ערך זה הוצא משימוש עבור מדיניות זו.</translation> <translation id="2262243747453050782">שגיאת HTTP</translation> <translation id="2270484714375784793">מספר טלפון</translation> +<translation id="2283340219607151381">שמירה ומילוי של כתובות</translation> <translation id="2292556288342944218">הגישה לאינטרנט חסומה</translation> <translation id="2316887270356262533">פינוי של פחות מ-1 MB מהשטח. ייתכן שחלק מהאתרים ייטענו לאט יותר בביקור הבא שלך.</translation> <translation id="2317259163369394535"><ph name="DOMAIN" /> דורש שם משתמש וסיסמה.</translation> @@ -206,6 +210,7 @@ <translation id="2359808026110333948">המשך</translation> <translation id="2365563543831475020">דוח הקריסה שתועד ב-<ph name="CRASH_TIME" /> לא הועלה</translation> <translation id="2367567093518048410">רמה</translation> +<translation id="2378238891085281592">עברת למצב פרטי</translation> <translation id="2384307209577226199">ברירת מחדל של ארגון</translation> <translation id="2386255080630008482">אישור השרת נשלל.</translation> <translation id="2392959068659972793">הצגת מדיניות ללא ערך מוגדר</translation> @@ -273,6 +278,7 @@ <translation id="2851634818064021665">יש צורך בהרשאה כדי להיכנס אל האתר הזה</translation> <translation id="2856444702002559011">ייתכן שתוקפים מנסים לגנוב את הפרטים שלך מהאתר <ph name="BEGIN_BOLD" /><ph name="SITE" /><ph name="END_BOLD" /> (לדוגמה, סיסמאות, הודעות או כרטיסי אשראי). <ph name="BEGIN_LEARN_MORE_LINK" />מידע נוסף<ph name="END_LEARN_MORE_LINK" /></translation> <translation id="2881276955470682203">לשמור את הכרטיס?</translation> +<translation id="2903493209154104877">כתובות</translation> <translation id="2909946352844186028">אותר שינוי ברשת.</translation> <translation id="2916038427272391327">סגירת תוכניות אחרות</translation> <translation id="2922350208395188000">לא ניתן לבדוק את אישור השרת.</translation> @@ -512,6 +518,7 @@ <translation id="450710068430902550">שיתוף עם מנהל מערכת</translation> <translation id="4515275063822566619">הכרטיסים והכתובות לקוחים מ-Chrome ומחשבון Google שלך (<ph name="ACCOUNT_EMAIL" />). אפשר לנהל אותם ב<ph name="BEGIN_LINK" />הגדרות<ph name="END_LINK" />.</translation> <translation id="4522570452068850558">פרטים</translation> +<translation id="4524805452350978254">ניהול כרטיסים</translation> <translation id="4552089082226364758">Flash</translation> <translation id="4558551763791394412">נסה להשבית את התוספים.</translation> <translation id="457875822857220463">משלוח</translation> @@ -703,6 +710,7 @@ <translation id="5866257070973731571">הוספת מספר טלפון</translation> <translation id="5869405914158311789">לא ניתן לגשת לאתר הזה</translation> <translation id="5869522115854928033">סיסמאות שמורות</translation> +<translation id="5887400589839399685">הכרטיס נשמר</translation> <translation id="5893752035575986141">אפשר לשלם באמצעות כרטיסי אשראי.</translation> <translation id="5908541034548427511"><ph name="TYPE_1" /> (מסונכרנים)</translation> <translation id="5920262536204764679">{NUM_COOKIES,plural, =1{אחד נמצא בשימוש}two{שניים נמצאים בשימוש}many{# נמצאים בשימוש}other{# נמצאים בשימוש}}</translation> @@ -822,11 +830,13 @@ <translation id="6948701128805548767">עליך לבחור כתובת כדי לראות שיטות איסוף ודרישות</translation> <translation id="6949872517221025916">איפוס סיסמה</translation> <translation id="6950684638814147129">קרתה שגיאה בזמן ניתוח ערך JSON: <ph name="ERROR" /></translation> +<translation id="6957624206566198865">יש לפתוח את הדף בכרטיסייה חדשה של גלישה בסתר</translation> <translation id="6957887021205513506">נראה שהאישור של השרת מזויף.</translation> <translation id="6965382102122355670">אישור</translation> <translation id="6965978654500191972">התקן</translation> <translation id="6970216967273061347">מחוז</translation> <translation id="6973656660372572881">צוינו שרתי Proxy קבועים וכתובת אתר של הסקריפט מסוג .Pac</translation> +<translation id="6984479912851154518">בחרת לצאת ממצב פרטי כדי לשלם באמצעות אפליקציה חיצונית. להמשיך?</translation> <translation id="6989763994942163495">הצג הגדרות מתקדמות...</translation> <translation id="7012363358306927923">China UnionPay</translation> <translation id="7016992613359344582">התשלום עשוי להיות חד-פעמי או לכלול חיובים חוזרים וייתכן שהדרישה לתשלום לא תוצג בצורה ברורה וחד-משמעית.</translation> @@ -1078,6 +1088,7 @@ <translation id="8820817407110198400">סימניות</translation> <translation id="883848425547221593">סימניות אחרות</translation> <translation id="884264119367021077">כתובת למשלוח</translation> +<translation id="8846319957959474018">סימניות עוזרות לפתוח אפליקציות במהירות</translation> <translation id="884923133447025588">לא נמצא מנגנון ביטול</translation> <translation id="885730110891505394">שיתוף עם Google</translation> <translation id="8858065207712248076">אם הזנת את הסיסמה של <ph name="BEGIN_BOLD" /><ph name="ORG_NAME" /><ph name="END_BOLD" /> באתרים אחרים, ההמלצה של Chrome היא לאפס אותה.</translation> @@ -1146,6 +1157,7 @@ <translation id="973773823069644502">הוספת כתובת למסירה</translation> <translation id="975560348586398090">{COUNT,plural, =0{ללא}=1{פריט אחד}two{שני פריטים}many{# פריטים}other{# פריטים}}</translation> <translation id="981121421437150478">לא מקוון</translation> +<translation id="984275831282074731">אמצעי תשלום</translation> <translation id="985199708454569384"><p>השגיאה הזו תוצג אם התאריך והשעה במחשב או בנייד אינם מדויקים.</p> <p>כדי לפתור את השגיאה, פותחים את השעון של המכשיר. מוודאים שהשעה והתאריך נכונים</p></translation> <translation id="988159990683914416">גירסת מפתחים</translation>
diff --git a/components/strings/components_strings_ja.xtb b/components/strings/components_strings_ja.xtb index d3c1fc0..0fc28ca0 100644 --- a/components/strings/components_strings_ja.xtb +++ b/components/strings/components_strings_ja.xtb
@@ -63,6 +63,7 @@ <translation id="129863573139666797"><ph name="BEGIN_LINK" />Cookie を消去してみてください<ph name="END_LINK" /></translation> <translation id="1314614906530272393">選択されたセッションが存在しません。</translation> <translation id="1323433172918577554">もっと見る</translation> +<translation id="132390688737681464">住所の保存と入力</translation> <translation id="1333989956347591814">ただし、次の相手に<ph name="BEGIN_EMPHASIS" />あなたのアクティビティが知られる<ph name="END_EMPHASIS" />可能性はあります。 <ph name="BEGIN_LIST" /> <ph name="LIST_ITEM" />訪問先のウェブサイト @@ -110,9 +111,11 @@ <translation id="1645368109819982629">サポートされていないプロトコルです</translation> <translation id="1655462015569774233">{1,plural, =1{このサーバーが <ph name="DOMAIN" /> であることを確認できませんでした。セキュリティ証明書の有効期限が昨日付けで切れています。原因として、設定が不適切であるか、悪意のあるユーザーが接続を妨害していることが考えられます。パソコンの時計は現在 <ph name="CURRENT_DATE" />に設定されています。この時刻が正しくない場合は、システムの時計を修正した後このページを更新してください。}other{このサーバーが <ph name="DOMAIN" /> であることを確認できませんでした。セキュリティ証明書の有効期限が # 日前に切れています。原因として、設定が不適切であるか、悪意のあるユーザーが接続を妨害していることが考えられます。パソコンの時計は現在 <ph name="CURRENT_DATE" />に設定されています。この時刻が正しくない場合は、システムの時計を修正した後このページを更新してください。}}</translation> <translation id="1656489000284462475">引取</translation> +<translation id="1662550410081243962">お支払い方法の保存と入力</translation> <translation id="1663943134801823270">Chrome に保存されているクレジット カードと住所です。[<ph name="BEGIN_LINK" />設定<ph name="END_LINK" />] で管理できます。</translation> <translation id="1676269943528358898"><ph name="SITE" /> では通常、暗号化して情報を保護しています。今回、Google Chrome から <ph name="SITE" /> への接続試行時に、このウェブサイトからいつもとは異なる誤った認証情報が返されました。悪意のあるユーザーが <ph name="SITE" /> になりすまそうとしているか、Wi-Fi ログイン画面で接続が中断された可能性があります。データのやり取りが行われる前に Google Chrome によって接続が停止されたため、情報は引き続き保護されています。</translation> <translation id="168841957122794586">サーバー証明書に脆弱な暗号鍵が含まれています。</translation> +<translation id="1697532407822776718">設定が完了しました。</translation> <translation id="1706954506755087368">{1,plural, =1{このサーバーが <ph name="DOMAIN" /> であることを確認できませんでした。セキュリティ証明書はおそらく明日以降に利用できるようになります。原因として、設定が不適切であるか、悪意のあるユーザーが接続を妨害していることが考えられます。}other{このサーバーが <ph name="DOMAIN" /> であることを確認できませんでした。セキュリティ証明書はおそらく # 日後から利用できるようになります。原因として、設定が不適切であるか、悪意のあるユーザーが接続を妨害していることが考えられます。}}</translation> <translation id="1710259589646384581">OS</translation> <translation id="1721312023322545264">このサイトにアクセスするには <ph name="NAME" /> さんの許可が必要です</translation> @@ -193,6 +196,7 @@ <translation id="225207911366869382">この値は、このポリシーではサポートが終了しています。</translation> <translation id="2262243747453050782">HTTP エラーです</translation> <translation id="2270484714375784793">電話番号</translation> +<translation id="2283340219607151381">住所の保存と入力</translation> <translation id="2292556288342944218">インターネット アクセスがブロックされています</translation> <translation id="2316887270356262533">最大で 1 MB を解放します。サイトによっては、次回アクセスする際に読み込みに時間がかかる可能性があります。</translation> <translation id="2317259163369394535"><ph name="DOMAIN" /> にはユーザー名とパスワードが必要です。</translation> @@ -274,6 +278,7 @@ <translation id="2851634818064021665">このサイトにアクセスするには許可が必要です</translation> <translation id="2856444702002559011"><ph name="BEGIN_BOLD" /><ph name="SITE" /><ph name="END_BOLD" /> では、悪意のあるユーザーによって、パスワード、メッセージ、クレジット カードなどの情報が盗まれる可能性があります。<ph name="BEGIN_LEARN_MORE_LINK" />詳細<ph name="END_LEARN_MORE_LINK" /></translation> <translation id="2881276955470682203">カードを保存しますか?</translation> +<translation id="2903493209154104877">住所</translation> <translation id="2909946352844186028">ネットワークの変更が検出されました。</translation> <translation id="2916038427272391327">他のプログラムを終了する</translation> <translation id="2922350208395188000">サーバーの証明書を確認できません。</translation> @@ -1147,6 +1152,7 @@ <translation id="973773823069644502">配達先住所を追加</translation> <translation id="975560348586398090">{COUNT,plural, =0{なし}=1{1 件のアイテム}other{# 件のアイテム}}</translation> <translation id="981121421437150478">オフライン</translation> +<translation id="984275831282074731">お支払い方法</translation> <translation id="985199708454569384"><p>このエラーは、パソコンまたはモバイル端末の日付と時刻が正確でない場合に表示されます。</p> <p>エラーを解決するには、端末の時計を開き、日付と時刻が正しいことを確認します。</p></translation> <translation id="988159990683914416">Developer Build</translation>
diff --git a/components/strings/components_strings_kn.xtb b/components/strings/components_strings_kn.xtb index 0759bcb..c0dcc51 100644 --- a/components/strings/components_strings_kn.xtb +++ b/components/strings/components_strings_kn.xtb
@@ -63,6 +63,7 @@ <translation id="129863573139666797"><ph name="BEGIN_LINK" />ನಿಮ್ಮ ಕುಕೀಗಳನ್ನು ತೆರವುಗೊಳಿಸಲು ಪ್ರಯತ್ನಿಸಿ<ph name="END_LINK" /></translation> <translation id="1314614906530272393">ಆಯ್ಕೆ ಮಾಡಿದ ಸೆಷನ್ ಅಸ್ತಿತ್ವದಲ್ಲಿಲ್ಲ.</translation> <translation id="1323433172918577554">ಇನ್ನಷ್ಟು ತೋರಿಸಿ</translation> +<translation id="132390688737681464">ವಿಳಾಸಗಳನ್ನು ಉಳಿಸಿ ಮತ್ತು ಭರ್ತಿ ಮಾಡಿ</translation> <translation id="1333989956347591814">ನಿಮ್ಮ ಚಟುವಟಿಕೆಗಳು <ph name="BEGIN_EMPHASIS" />ಇನ್ನೂ ಇವರಿಗೆ ಕಾಣಿಸಿಕೊಳ್ಳಬಹುದು<ph name="END_EMPHASIS" /> : <ph name="BEGIN_LIST" /> <ph name="LIST_ITEM" />ನೀವು ಭೇಟಿ ನೀಡಿದ ವೆಬ್ಸೈಟ್ಗಳು @@ -109,9 +110,11 @@ <translation id="1645368109819982629">ಬೆಂಬಲವಿಲ್ಲದ ಪ್ರೊಟೋಕಾಲ್</translation> <translation id="1655462015569774233">{1,plural, =1{ಈ ಸರ್ವರ್ <ph name="DOMAIN" /> ಆಗಿದೆ ಎಂಬುದನ್ನು ಸಾಬೀತುಪಡಿಸಲು ಸಾಧ್ಯವಾಗಲಿಲ್ಲ; ಅದರ ಸುರಕ್ಷತಾ ಪ್ರಮಾಣಪತ್ರದ ಅವಧಿಯು ನಿನ್ನೆ ಮುಗಿದಿದೆ. ಇದು ತಪ್ಪು ಕಾನ್ಫಿಗರೇಶನ್ನಿಂದ ಅಥವಾ ಆಕ್ರಮಣಕಾರರು ನಿಮ್ಮ ಸಂಪರ್ಕದಲ್ಲಿ ಒಳನುಸುಳಿರುವುದರಿಂದ ಆಗಿರಬಹುದು. ನಿಮ್ಮ ಕಂಪ್ಯೂಟರ್ನ ಗಡಿಯಾರವನ್ನು ಪ್ರಸ್ತುತ <ph name="CURRENT_DATE" /> ಗೆ ಹೊಂದಿಸಲಾಗಿದೆ. ಅದು ಸರಿಯಾಗಿದೆಯೇ? ಇಲ್ಲದಿದ್ದರೆ, ನಿಮ್ಮ ಸಿಸ್ಟಂನ ಗಡಿಯಾರವನ್ನು ನೀವು ಸರಿಪಡಿಸಿ ಹಾಗೂ ನಂತರ ಈ ಪುಟವನ್ನು ರಿಫ್ರೆಶ್ ಮಾಡಿ.}one{ಈ ಸರ್ವರ್ <ph name="DOMAIN" /> ಆಗಿದೆ ಎಂಬುದನ್ನು ಸಾಬೀತುಪಡಿಸಲು ಸಾಧ್ಯವಾಗಲಿಲ್ಲ; ಅದರ ಸುರಕ್ಷತಾ ಪ್ರಮಾಣಪತ್ರದ ಅವಧಿಯು # ದಿನಗಳ ಹಿಂದೆ ಮುಗಿದಿದೆ. ಇದು ತಪ್ಪು ಕಾನ್ಫಿಗರೇಶನ್ನಿಂದ ಅಥವಾ ಆಕ್ರಮಣಕಾರರು ನಿಮ್ಮ ಸಂಪರ್ಕದಲ್ಲಿ ಒಳನುಸುಳಿರುವುದರಿಂದ ಆಗಿರಬಹುದು. ನಿಮ್ಮ ಕಂಪ್ಯೂಟರ್ನ ಗಡಿಯಾರವನ್ನು ಪ್ರಸ್ತುತ <ph name="CURRENT_DATE" /> ಗೆ ಹೊಂದಿಸಲಾಗಿದೆ. ಅದು ಸರಿಯಾಗಿದೆಯೇ? ಇಲ್ಲದಿದ್ದರೆ, ನಿಮ್ಮ ಸಿಸ್ಟಂನ ಗಡಿಯಾರವನ್ನು ನೀವು ಸರಿಪಡಿಸಿ ಹಾಗೂ ನಂತರ ಈ ಪುಟವನ್ನು ರಿಫ್ರೆಶ್ ಮಾಡಿ.}other{ಈ ಸರ್ವರ್ <ph name="DOMAIN" /> ಆಗಿದೆ ಎಂಬುದನ್ನು ಸಾಬೀತುಪಡಿಸಲು ಸಾಧ್ಯವಾಗಲಿಲ್ಲ; ಅದರ ಸುರಕ್ಷತಾ ಪ್ರಮಾಣಪತ್ರದ ಅವಧಿಯು # ದಿನಗಳ ಹಿಂದೆ ಮುಗಿದಿದೆ. ಇದು ತಪ್ಪು ಕಾನ್ಫಿಗರೇಶನ್ನಿಂದ ಅಥವಾ ಆಕ್ರಮಣಕಾರರು ನಿಮ್ಮ ಸಂಪರ್ಕದಲ್ಲಿ ಒಳನುಸುಳಿರುವುದರಿಂದ ಆಗಿರಬಹುದು. ನಿಮ್ಮ ಕಂಪ್ಯೂಟರ್ನ ಗಡಿಯಾರವನ್ನು ಪ್ರಸ್ತುತ <ph name="CURRENT_DATE" /> ಗೆ ಹೊಂದಿಸಲಾಗಿದೆ. ಅದು ಸರಿಯಾಗಿದೆಯೇ? ಇಲ್ಲದಿದ್ದರೆ, ನಿಮ್ಮ ಸಿಸ್ಟಂನ ಗಡಿಯಾರವನ್ನು ನೀವು ಸರಿಪಡಿಸಿ ಹಾಗೂ ನಂತರ ಈ ಪುಟವನ್ನು ರಿಫ್ರೆಶ್ ಮಾಡಿ.}}</translation> <translation id="1656489000284462475">ಪಿಕಪ್</translation> +<translation id="1662550410081243962">ಪಾವತಿ ವಿಧಾನಗಳನ್ನು ಉಳಿಸಿ ಮತ್ತು ಭರ್ತಿ ಮಾಡಿ</translation> <translation id="1663943134801823270">ಕಾರ್ಡ್ಗಳು ಮತ್ತು ವಿಳಾಸಗಳನ್ನು Chrome ನಿಂದ ಪಡೆಯಲಾಗಿದೆ. ನೀವು ಅವುಗಳನ್ನು <ph name="BEGIN_LINK" />ಸೆಟ್ಟಿಂಗ್ಗಳಲ್ಲಿ<ph name="END_LINK" /> ನಿರ್ವಹಿಸಬಹುದು.</translation> <translation id="1676269943528358898"><ph name="SITE" /> ಸಾಮಾನ್ಯವಾಗಿ ನಿಮ್ಮ ಮಾಹಿತಿಯನ್ನು ಸಂರಕ್ಷಿಸಲು ಎನ್ಕ್ರಿಪ್ಶನ್ ಪ್ರಯೋಜನವನ್ನು ಬಳಸಿಕೊಳ್ಳುತ್ತದೆ. ಈ ಸಂದರ್ಭದಲ್ಲಿ Google Chrome <ph name="SITE" /> ವೆಬ್ಸೈಟ್ಗೆ ಸಂಪರ್ಕಿಸಲು ಪ್ರಯತ್ನಿಸಿದಾಗ, ಆ ವೆಬ್ಸೈಟ್ ಅಸಹಜ ಮತ್ತು ತಪ್ಪು ರುಜುವಾತುಗಳನ್ನು ಹಿಂತಿರುಗಿಸಿದೆ. ದಾಳಿಕೋರರು <ph name="SITE" /> ರೂಪದಲ್ಲಿ ಸೋಗು ಹಾಕಲು ಪ್ರಯತ್ನಿಸುತ್ತಿರುವಾಗ ಅಥವಾ ವೈ-ಫೈ ಸೈನ್-ಇನ್ ಪರದೆಯು ಸಂಪರ್ಕಕ್ಕೆ ಅಡ್ಡಿಯುಂಟು ಮಾಡಿದಾಗ ಇದು ಕಂಡುಬರಬಹುದು. ಯಾವುದೇ ಡೇಟಾವನ್ನು ವಿನಿಮಯ ಮಾಡಿಕೊಳ್ಳುವ ಮೊದಲೇ Google Chrome ಸಂಪರ್ಕ ಕಡಿತಗೊಳಿಸಿರುವ ಕಾರಣ, ನಿಮ್ಮ ಮಾಹಿತಿ ಈಗಲೂ ಸುರಕ್ಷಿತವಾಗಿದೆ.</translation> <translation id="168841957122794586">ಸರ್ವರ್ ಪ್ರಮಾಣಪತ್ರವು ದುರ್ಬಲ ಕ್ರಿಪ್ಟೋಗ್ರಾಫಿಕ್ ಕೀಯನ್ನು ಹೊಂದಿದೆ.</translation> +<translation id="1697532407822776718">ನೀವು ಎಲ್ಲ ರೀತಿಯಲ್ಲಿಯೂ ಸಿದ್ಧರಾಗಿರುವಿರಿ!</translation> <translation id="1706954506755087368">{1,plural, =1{ಈ ಸರ್ವರ್ <ph name="DOMAIN" /> ; ಆಗಿದೆ ಎಂಬುದನ್ನು ಸಾಬೀತುಪಡಿಸಲು ಸಾಧ್ಯವಾಗಲಿಲ್ಲ; ಅದರ ಸುರಕ್ಷತಾ ಪ್ರಮಾಣಪತ್ರ ಬಹುಶಃ ನಾಳೆಯಿಂದ ಕಾರ್ಯನಿರ್ವಹಿಸಬಹುದು. ಇದು ತಪ್ಪು ಕಾನ್ಫಿಗರೇಶನ್ನಿಂದ ಅಥವಾ ಆಕ್ರಮಣಕಾರರು ನಿಮ್ಮ ಸಂಪರ್ಕದಲ್ಲಿ ಒಳನುಸುಳಿರುವುದರಿಂದ ಆಗಿರಬಹುದು.}one{ಈ ಸರ್ವರ್ <ph name="DOMAIN" /> ಆಗಿದೆ ಎಂಬುದನ್ನು ಸಾಬೀತುಪಡಿಸಲು ಸಾಧ್ಯವಾಗಲಿಲ್ಲ; ಅದರ ಸುರಕ್ಷತಾ ಪ್ರಮಾಣಪತ್ರ ಬಹುಶಃ ಭವಿಷ್ಯದಲ್ಲಿ # ದಿನಗಳಲ್ಲಿ ಕಾರ್ಯನಿರ್ವಹಿಸಬಹುದು. ಇದು ತಪ್ಪು ಕಾನ್ಫಿಗರೇಶನ್ನಿಂದ ಅಥವಾ ಆಕ್ರಮಣಕಾರರು ನಿಮ್ಮ ಸಂಪರ್ಕದಲ್ಲಿ ಒಳನುಸುಳಿರುವುದರಿಂದ ಆಗಿರಬಹುದು.}other{ಈ ಸರ್ವರ್ <ph name="DOMAIN" /> ಆಗಿದೆ ಎಂಬುದನ್ನು ಸಾಬೀತುಪಡಿಸಲು ಸಾಧ್ಯವಾಗಲಿಲ್ಲ; ಅದರ ಸುರಕ್ಷತಾ ಪ್ರಮಾಣಪತ್ರ ಬಹುಶಃ ಭವಿಷ್ಯದಲ್ಲಿ # ದಿನಗಳಲ್ಲಿ ಕಾರ್ಯನಿರ್ವಹಿಸಬಹುದು. ಇದು ತಪ್ಪು ಕಾನ್ಫಿಗರೇಶನ್ನಿಂದ ಅಥವಾ ಆಕ್ರಮಣಕಾರರು ನಿಮ್ಮ ಸಂಪರ್ಕದಲ್ಲಿ ಒಳನುಸುಳಿರುವುದರಿಂದ ಆಗಿರಬಹುದು.}}</translation> <translation id="1710259589646384581">OS</translation> <translation id="1721312023322545264">ಈ ಸೈಟ್ಗೆ ಭೇಟಿ ನೀಡಲು ನಿಮಗೆ <ph name="NAME" /> ಅವರ ಅನುಮತಿಯ ಅಗತ್ಯವಿರುತ್ತದೆ</translation> @@ -192,6 +195,7 @@ <translation id="225207911366869382">ಈ ನೀತಿಗಾಗಿ ಈ ಮೌಲ್ಯವನ್ನು ಅಸಮ್ಮತಿಸಲಾಗಿದೆ.</translation> <translation id="2262243747453050782">HTTP ದೋಷ</translation> <translation id="2270484714375784793">ಫೋನ್ ಸಂಖ್ಯೆ</translation> +<translation id="2283340219607151381">ವಿಳಾಸಗಳನ್ನು ಉಳಿಸಿ ಮತ್ತು ಭರ್ತಿ ಮಾಡಿ</translation> <translation id="2292556288342944218">ನಿಮ್ಮ ಇಂಟರ್ನೆಟ್ ಪ್ರವೇಶ ನಿರ್ಬಂಧಿಸಲಾಗಿದೆ</translation> <translation id="2316887270356262533">1 MB ಕ್ಕಿಂತ ಕಡಿಮೆ ಇರುವುದನ್ನು ತೆಗೆದುಹಾಕಿ. ನಿಮ್ಮ ನಂತರದ ಭೇಟಿಯ ಸಮಯದಲ್ಲಿ ಕೆಲವು ಸೈಟ್ಗಳು ನಿಧಾನವಾಗಿ ಲೋಡ್ ಆಗಬಹುದು.</translation> <translation id="2317259163369394535"><ph name="DOMAIN" /> ಗೆ ಬಳಕೆದಾರಹೆಸರು ಮತ್ತು ಪಾಸ್ವರ್ಡ್ ಅಗತ್ಯವಿದೆ.</translation> @@ -273,6 +277,7 @@ <translation id="2851634818064021665">ಈ ಸೈಟ್ ಗೆ ಭೇಟಿ ನೀಡಲು ನಿಮ್ಮಗೆ ಅನುಮತಿಯ ಅಗತ್ಯವಿದೆ</translation> <translation id="2856444702002559011">ದಾಳಿಕೋರರು <ph name="BEGIN_BOLD" /><ph name="SITE" /><ph name="END_BOLD" /> ನಿಂದ ನಿಮ್ಮ ಮಾಹಿತಿಯನ್ನು ಕದಿಯಲು ಪ್ರಯತ್ನಿಸುತ್ತಿರಬಹುದು (ಉದಾಹರಣೆಗೆ, ಪಾಸ್ವರ್ಡ್ಗಳು, ಸಂದೇಶಗಳು ಅಥವಾ ಕ್ರೆಡಿಟ್ ಕಾರ್ಡ್ಗಳು). <ph name="BEGIN_LEARN_MORE_LINK" />ಇನ್ನಷ್ಟು ತಿಳಿಯಿರಿ<ph name="END_LEARN_MORE_LINK" /></translation> <translation id="2881276955470682203">ಕಾರ್ಡ್ ಉಳಿಸುವುದೇ?</translation> +<translation id="2903493209154104877">ವಿಳಾಸಗಳು</translation> <translation id="2909946352844186028">ನೆಟ್ವರ್ಕ್ ಬದಲಾವಣೆಯನ್ನು ಪತ್ತೆ ಮಾಡಲಾಗಿದೆ.</translation> <translation id="2916038427272391327">ಇತರ ಪ್ರೋಗ್ರಾಂಗಳನ್ನು ಮುಚ್ಚಿ</translation> <translation id="2922350208395188000">ಸರ್ವರ್ನ ಪ್ರಮಾಣಪತ್ರವನ್ನು ಪರಿಶೀಲಿಸಲಾಗುವುದಿಲ್ಲ.</translation> @@ -1140,6 +1145,7 @@ <translation id="973773823069644502">ವಿತರಣೆ ವಿಳಾಸವನ್ನು ಸೇರಿಸಿ</translation> <translation id="975560348586398090">{COUNT,plural, =0{ಯಾವುದೂ ಇಲ್ಲ}=1{1 ಐಟಂ}one{# ಐಟಂಗಳು}other{# ಐಟಂಗಳು}}</translation> <translation id="981121421437150478">ಆಫ್ಲೈನ್</translation> +<translation id="984275831282074731">ಪಾವತಿ ವಿಧಾನಗಳು</translation> <translation id="985199708454569384"><p>ನಿಮ್ಮ ಕಂಪ್ಯೂಟರ್ ಅಥವಾ ಮೊಬೈಲ್ ಸಾಧನದ ದಿನಾಂಕ ಮತ್ತು ಸಮಯ ನಿಖರವಾಗಿರದಿದ್ದರೆ, ನೀವು ಈ ದೋಷವನ್ನು ನೋಡುವಿರಿ</p> <p>ದೋಷವನ್ನು ಪರಿಹರಿಸಲು, ನಿಮ್ಮ ಸಾಧನದ ಗಡಿಯಾರವನ್ನು ತೆರೆಯಿರಿ. ದಿನಾಂಕ ಮತ್ತು ಸಮಯ ಸರಿಯಾಗಿರುವುದನ್ನು ಖಚಿತಪಡಿಸಿಕೊಳ್ಳಿ.</p></translation> <translation id="988159990683914416">ಡೆವಲಪರ್ ಬಿಲ್ಡ್</translation> <translation id="989988560359834682">ವಿಳಾಸವನ್ನು ಎಡಿಟ್ ಮಾಡಿ</translation>
diff --git a/components/strings/components_strings_ko.xtb b/components/strings/components_strings_ko.xtb index 436aa710..35c19a3 100644 --- a/components/strings/components_strings_ko.xtb +++ b/components/strings/components_strings_ko.xtb
@@ -63,6 +63,7 @@ <translation id="129863573139666797"><ph name="BEGIN_LINK" />쿠키 삭제해 보기<ph name="END_LINK" /></translation> <translation id="1314614906530272393">선택한 세션이 존재하지 않습니다.</translation> <translation id="1323433172918577554">더보기</translation> +<translation id="132390688737681464">주소 저장 및 자동 입력</translation> <translation id="1333989956347591814">다음의 관계자는 내 활동 내역을 <ph name="BEGIN_EMPHASIS" />확인할 수도 있습니다<ph name="END_EMPHASIS" />. <ph name="BEGIN_LIST" /> <ph name="LIST_ITEM" />방문한 웹사이트 @@ -110,9 +111,11 @@ <translation id="1645368109819982629">지원되지 않는 프로토콜</translation> <translation id="1655462015569774233">{1,plural, =1{서버의 보안 인증서가 어제 만료되어 <ph name="DOMAIN" />임을 입증할 수 없습니다. 서버를 잘못 설정했거나 불법 사용자가 연결을 가로채고 있기 때문일 수 있습니다. 현재 컴퓨터의 시계가 <ph name="CURRENT_DATE" />로 설정되어 있습니다. 시간이 정확하지 않으면 시스템 시계를 수정한 뒤 이 페이지를 새로고침하세요.}other{서버의 보안 인증서가 #일 전에 만료되어 <ph name="DOMAIN" />임을 입증할 수 없습니다. 서버를 잘못 설정했거나 불법 사용자가 연결을 가로채고 있기 때문일 수 있습니다. 현재 컴퓨터의 시계가 <ph name="CURRENT_DATE" />로 설정되어 있습니다. 시간이 정확하지 않으면 시스템 시계를 수정한 뒤 이 페이지를 새로고침하세요.}}</translation> <translation id="1656489000284462475">수령</translation> +<translation id="1662550410081243962">결제 수단 저장 및 자동 입력</translation> <translation id="1663943134801823270">카드와 주소는 Chrome에서 가져왔습니다. 이 정보는 <ph name="BEGIN_LINK" />설정<ph name="END_LINK" />에서 관리할 수 있습니다.</translation> <translation id="1676269943528358898"><ph name="SITE" />에서는 사용자 정보를 보호하기 위해 일반적으로 암호화를 사용합니다. 이번에 Chrome에서 <ph name="SITE" />에 연결을 시도했을 때 웹사이트에서 비정상적이고 잘못된 사용자 인증 정보를 반환했습니다. 이는 공격자가 <ph name="SITE" />인 것처럼 가장하려고 하거나 Wi-Fi 로그인 화면이 연결을 방해했기 때문일 수 있습니다. 데이터 교환이 발생하기 전에 Chrome에서 연결을 중단했기 때문에 사용자 정보는 안전합니다.</translation> <translation id="168841957122794586">서버 인증서에 안전성이 낮은 암호화 키가 포함되어 있습니다.</translation> +<translation id="1697532407822776718">설정 완료</translation> <translation id="1706954506755087368">{1,plural, =1{서버의 보안 인증서가 내일 발효될 예정이며 이에 따라 <ph name="DOMAIN" />임을 입증할 수 없습니다. 서버를 잘못 설정했거나 불법 사용자가 연결을 가로채고 있기 때문일 수 있습니다.}other{서버의 보안 인증서가 #일 후 발효될 예정이며 이에 따라 <ph name="DOMAIN" />임을 입증할 수 없습니다. 서버를 잘못 설정했거나 불법 사용자가 연결을 가로채고 있기 때문일 수 있습니다.}}</translation> <translation id="1710259589646384581">OS</translation> <translation id="1721312023322545264">이 사이트를 방문하려면 <ph name="NAME" />님으로부터 권한을 받아야 합니다.</translation> @@ -193,6 +196,7 @@ <translation id="225207911366869382">이 값은 이 정책에 사용되지 않습니다.</translation> <translation id="2262243747453050782">HTTP 오류</translation> <translation id="2270484714375784793">전화번호</translation> +<translation id="2283340219607151381">주소 저장 및 자동 입력</translation> <translation id="2292556288342944218">인터넷 액세스가 차단됨</translation> <translation id="2316887270356262533">1MB 미만의 저장용량을 확보합니다. 일부 사이트는 다음 방문 시 로드 속도가 느려질 수 있습니다.</translation> <translation id="2317259163369394535"><ph name="DOMAIN" />에 사용자 이름과 비밀번호를 입력해야 합니다.</translation> @@ -274,6 +278,7 @@ <translation id="2851634818064021665">이 사이트에 방문하려면 권한이 필요합니다.</translation> <translation id="2856444702002559011">해커가 <ph name="BEGIN_BOLD" /><ph name="SITE" /><ph name="END_BOLD" />에서 정보(예: 비밀번호, 메시지, 신용카드 등)를 도용하려고 시도 중일 수 있습니다. <ph name="BEGIN_LEARN_MORE_LINK" />자세히 알아보기<ph name="END_LEARN_MORE_LINK" /></translation> <translation id="2881276955470682203">카드를 저장하시겠습니까?</translation> +<translation id="2903493209154104877">주소</translation> <translation id="2909946352844186028">네트워크 변경이 감지되었습니다.</translation> <translation id="2916038427272391327">다른 프로그램 닫기</translation> <translation id="2922350208395188000">서버 인증서를 확인할 수 없습니다.</translation> @@ -1145,6 +1150,7 @@ <translation id="973773823069644502">배달 주소 추가</translation> <translation id="975560348586398090">{COUNT,plural, =0{없음}=1{항목 1개}other{항목 #개}}</translation> <translation id="981121421437150478">오프라인</translation> +<translation id="984275831282074731">결제 수단</translation> <translation id="985199708454569384"><p>컴퓨터나 휴대기기의 날짜 및 시간이 잘못 설정되어 있는 경우 이 오류가 표시됩니다.</p> <p>오류를 수정하려면 기기의 시계를 열고 날짜 및 시간이 올바른지 확인하세요.</p></translation> <translation id="988159990683914416">개발자 빌드</translation>
diff --git a/components/strings/components_strings_lt.xtb b/components/strings/components_strings_lt.xtb index b6c80b8..178e1d8c 100644 --- a/components/strings/components_strings_lt.xtb +++ b/components/strings/components_strings_lt.xtb
@@ -63,6 +63,7 @@ <translation id="129863573139666797"><ph name="BEGIN_LINK" />Pabandykite išvalyti slapukus<ph name="END_LINK" /></translation> <translation id="1314614906530272393">Pasirinktos sesijos nėra.</translation> <translation id="1323433172918577554">Rodyti daugiau</translation> +<translation id="132390688737681464">Išsaugoti ir užpildyti adresus</translation> <translation id="1333989956347591814">Veiklą <ph name="BEGIN_EMPHASIS" />vis tiek gali peržiūrėti<ph name="END_EMPHASIS" />: <ph name="BEGIN_LIST" /> <ph name="LIST_ITEM" />lankomos svetainės; @@ -110,9 +111,11 @@ <translation id="1645368109819982629">Nepalaikomas protokolas</translation> <translation id="1655462015569774233">{1,plural, =1{Šiam serveriui nepavyko patvirtinti, kad tai yra <ph name="DOMAIN" />; jo saugos sertifikato galiojimas baigėsi vakar. Taip gali nutikti dėl netinkamos konfigūracijos ar dėl ryšį pertraukusio užpuoliko. Šiuo metu kompiuterio laikrodis nustatytas į <ph name="CURRENT_DATE" />. Ar tai tinkama? Jei netinkama, turėtumėte koreguoti sistemos laikrodį ir atnaujinti šį puslapį.}one{Šiam serveriui nepavyko patvirtinti, kad tai yra <ph name="DOMAIN" />; jo saugos sertifikato galiojimas baigėsi prieš # dieną. Taip gali nutikti dėl netinkamos konfigūracijos ar dėl ryšį pertraukusio užpuoliko. Šiuo metu kompiuterio laikrodis nustatytas į <ph name="CURRENT_DATE" />. Ar tai tinkama? Jei netinkama, turėtumėte koreguoti sistemos laikrodį ir atnaujinti šį puslapį.}few{Šiam serveriui nepavyko patvirtinti, kad tai yra <ph name="DOMAIN" />; jo saugos sertifikato galiojimas baigėsi prieš # dienas. Taip gali nutikti dėl netinkamos konfigūracijos ar dėl ryšį pertraukusio užpuoliko. Šiuo metu kompiuterio laikrodis nustatytas į <ph name="CURRENT_DATE" />. Ar tai tinkama? Jei netinkama, turėtumėte koreguoti sistemos laikrodį ir atnaujinti šį puslapį.}many{Šiam serveriui nepavyko patvirtinti, kad tai yra <ph name="DOMAIN" />; jo saugos sertifikato galiojimas baigėsi prieš # dienos. Taip gali nutikti dėl netinkamos konfigūracijos ar dėl ryšį pertraukusio užpuoliko. Šiuo metu kompiuterio laikrodis nustatytas į <ph name="CURRENT_DATE" />. Ar tai tinkama? Jei netinkama, turėtumėte koreguoti sistemos laikrodį ir atnaujinti šį puslapį.}other{Šiam serveriui nepavyko patvirtinti, kad tai yra <ph name="DOMAIN" />; jo saugos sertifikato galiojimas baigėsi prieš # dienų. Taip gali nutikti dėl netinkamos konfigūracijos ar dėl ryšį pertraukusio užpuoliko. Šiuo metu kompiuterio laikrodis nustatytas į <ph name="CURRENT_DATE" />. Ar tai tinkama? Jei netinkama, turėtumėte koreguoti sistemos laikrodį ir atnaujinti šį puslapį.}}</translation> <translation id="1656489000284462475">Paėmimas</translation> +<translation id="1662550410081243962">Išsaugoti ir užpildyti mokėjimo metodų informaciją</translation> <translation id="1663943134801823270">Kortelės ir adresai naudojami iš „Chrome“. Juos galite tvarkyti nuėję į <ph name="BEGIN_LINK" />Nustatymus<ph name="END_LINK" />.</translation> <translation id="1676269943528358898">Svetainėje <ph name="SITE" /> įprastai naudojama šifruotė informacijai apsaugoti. Šį kartą „Google Chrome“ bandant prisijungti prie <ph name="SITE" />, ji pateikė neįprastus ir netinkamus prisijungimo duomenis. Gali būti, kad užpuolėjas bando apsimesti svetaine <ph name="SITE" /> arba „Wi-Fi“ prisijungimo ekrane nutrūko ryšys. Jūsų informacija vis tiek liko apsaugota, nes „Google Chrome“ sustabdė prisijungimą prieš apsikeitimą bet kokiais duomenimis.</translation> <translation id="168841957122794586">Serverio sertifikate yra nesudėtingas kriptografinis raktas.</translation> +<translation id="1697532407822776718">Viskas nustatyta!</translation> <translation id="1706954506755087368">{1,plural, =1{Šiam serveriui nepavyko patvirtinti, kad tai yra <ph name="DOMAIN" />; jo saugos sertifikatas įsigalios nuo rytojaus. Taip gali nutikti dėl netinkamos konfigūracijos ar dėl ryšį pertraukusio užpuoliko.}one{Šiam serveriui nepavyko patvirtinti, kad tai yra <ph name="DOMAIN" />; jo saugos sertifikatas įsigalios po # dienos. Taip gali nutikti dėl netinkamos konfigūracijos ar dėl ryšį pertraukusio užpuoliko.}few{Šiam serveriui nepavyko patvirtinti, kad tai yra <ph name="DOMAIN" />; jo saugos sertifikatas įsigalios po # dienų. Taip gali nutikti dėl netinkamos konfigūracijos ar dėl ryšį pertraukusio užpuoliko.}many{Šiam serveriui nepavyko patvirtinti, kad tai yra <ph name="DOMAIN" />; jo saugos sertifikatas įsigalios po # dienos. Taip gali nutikti dėl netinkamos konfigūracijos ar dėl ryšį pertraukusio užpuoliko.}other{Šiam serveriui nepavyko patvirtinti, kad tai yra <ph name="DOMAIN" />; jo saugos sertifikatas įsigalios po # dienų. Taip gali nutikti dėl netinkamos konfigūracijos ar dėl ryšį pertraukusio užpuoliko.}}</translation> <translation id="1710259589646384581">OS</translation> <translation id="1721312023322545264">Turite gauti <ph name="NAME" /> leidimą apsilankyti šioje svetainėje</translation> @@ -193,6 +196,7 @@ <translation id="225207911366869382">Pagal šią politiką ši vertė nepatvirtinta.</translation> <translation id="2262243747453050782">HTTP klaida</translation> <translation id="2270484714375784793">Telefono numeris</translation> +<translation id="2283340219607151381">Išsaugoti ir užpildyti adresus</translation> <translation id="2292556288342944218">Interneto prieiga užblokuota</translation> <translation id="2316887270356262533">Atlaisvina mažiau nei 1 MB. Per kitą jūsų apsilankymą kai kurios svetainės gali būti įkeliamos lėčiau.</translation> <translation id="2317259163369394535"><ph name="DOMAIN" /> būtina įvesti naudotojo vardą ir slaptažodį.</translation> @@ -274,6 +278,7 @@ <translation id="2851634818064021665">Jums reikalingas leidimas, kad galėtumėte apsilankykite šioje svetainėje</translation> <translation id="2856444702002559011">Užpuolikai gali bandyti pavogti jūsų informaciją iš <ph name="BEGIN_BOLD" /><ph name="SITE" /><ph name="END_BOLD" /> (pvz., slaptažodžius, pranešimus ar kredito kortelių duomenis). <ph name="BEGIN_LEARN_MORE_LINK" />Sužinokite daugiau<ph name="END_LEARN_MORE_LINK" /></translation> <translation id="2881276955470682203">Išsaugoti kortelę?</translation> +<translation id="2903493209154104877">Adresai</translation> <translation id="2909946352844186028">Aptiktas tinklo pasikeitimas.</translation> <translation id="2916038427272391327">Uždarykite kitas programas</translation> <translation id="2922350208395188000">Neįmanoma patikrinti serverio sertifikato.</translation> @@ -1148,6 +1153,7 @@ <translation id="973773823069644502">Pridėti pristatymo adresą</translation> <translation id="975560348586398090">{COUNT,plural, =0{Nėra}=1{1 elementas}one{# elementas}few{# elementai}many{# elemento}other{# elementų}}</translation> <translation id="981121421437150478">Neprisijungus</translation> +<translation id="984275831282074731">Mokėjimo metodai</translation> <translation id="985199708454569384"><p>Ši klaida rodoma, jei kompiuterio ar mobiliojo įrenginio data ir laikas netikslūs.</p> <p>Kad ištaisytumėte klaidą, atidarykite įrenginio laikrodį. Įsitikinkite, kad rodomas tikslus laikas ir data.</p></translation> <translation id="988159990683914416">Vykdymo programa sukurta</translation>
diff --git a/components/strings/components_strings_lv.xtb b/components/strings/components_strings_lv.xtb index ea7f671..f8073b7 100644 --- a/components/strings/components_strings_lv.xtb +++ b/components/strings/components_strings_lv.xtb
@@ -63,6 +63,7 @@ <translation id="129863573139666797"><ph name="BEGIN_LINK" />Dzēsiet sīkfailus<ph name="END_LINK" /></translation> <translation id="1314614906530272393">Atlasītā sesija nepastāv.</translation> <translation id="1323433172918577554">Rādīt vairāk</translation> +<translation id="132390688737681464">Saglabāt un aizpildīt adreses</translation> <translation id="1333989956347591814">Iespējams, jūsu darbības <ph name="BEGIN_EMPHASIS" />joprojām būs redzamas<ph name="END_EMPHASIS" />: <ph name="BEGIN_LIST" /> <ph name="LIST_ITEM" />jūsu apmeklētajām vietnēm; @@ -110,9 +111,11 @@ <translation id="1645368109819982629">Neatbalstīts protokols</translation> <translation id="1655462015569774233">{1,plural, =1{Šis serveris nevarēja pierādīt, ka ir <ph name="DOMAIN" />; tā drošības sertifikāta derīguma termiņš beidzās vakar. Šī problēma var rasties nepareizas konfigurācijas dēļ vai tādēļ, ka kāds uzbrucējs ir pārtvēris jūsu savienojumu. Jūsu datora pulkstenī pašlaik ir iestatīts šāds datums: <ph name="CURRENT_DATE" />. Vai tas ir pareizs? Ja datums nav pareizs, mainiet sistēmas pulksteni un pēc tam atsvaidziniet šo lapu.}zero{Šis serveris nevarēja pierādīt, ka ir <ph name="DOMAIN" />; tā drošības sertifikāta derīguma termiņš beidzās pirms # dienām. Šī problēma var rasties nepareizas konfigurācijas dēļ vai tādēļ, ka kāds uzbrucējs ir pārtvēris jūsu savienojumu. Jūsu datora pulkstenī pašlaik ir iestatīts šāds datums: <ph name="CURRENT_DATE" />. Vai tas ir pareizs? Ja datums nav pareizs, mainiet sistēmas pulksteni un pēc tam atsvaidziniet šo lapu.}one{Šis serveris nevarēja pierādīt, ka ir <ph name="DOMAIN" />; tā drošības sertifikāta derīguma termiņš beidzās pirms # dienas. Šī problēma var rasties nepareizas konfigurācijas dēļ vai tādēļ, ka kāds uzbrucējs ir pārtvēris jūsu savienojumu. Jūsu datora pulkstenī pašlaik ir iestatīts šāds datums: <ph name="CURRENT_DATE" />. Vai tas ir pareizs? Ja datums nav pareizs, mainiet sistēmas pulksteni un pēc tam atsvaidziniet šo lapu.}other{Šis serveris nevarēja pierādīt, ka ir <ph name="DOMAIN" />; tā drošības sertifikāta derīguma termiņš beidzās pirms # dienām. Šī problēma var rasties nepareizas konfigurācijas dēļ vai tādēļ, ka kāds uzbrucējs ir pārtvēris jūsu savienojumu. Jūsu datora pulkstenī pašlaik ir iestatīts šāds datums: <ph name="CURRENT_DATE" />. Vai tas ir pareizs? Ja datums nav pareizs, mainiet sistēmas pulksteni un pēc tam atsvaidziniet šo lapu.}}</translation> <translation id="1656489000284462475">Informācija par saņemšanu</translation> +<translation id="1662550410081243962">Saglabāt un aizpildīt maksājuma veidus</translation> <translation id="1663943134801823270">Kartes un adreses tiek iegūtas no Chrome. Varat pārvaldīt tās <ph name="BEGIN_LINK" />iestatījumos<ph name="END_LINK" />.</translation> <translation id="1676269943528358898">Vietnē <ph name="SITE" /> informācijas aizsargāšanai parasti tiek izmantota šifrēšana. Kad pārlūkā Google Chrome tika mēģināts izveidot savienojumu ar vietni <ph name="SITE" />, šoreiz tā nosūtīja neparastus un nepareizus akreditācijas datus. Iespējams, tas notika, jo uzbrucējs mēģināja uzdoties par vietni <ph name="SITE" />, vai arī Wi-Fi pierakstīšanās ekrāns pārtrauc savienojumu. Jūsu informācija joprojām ir drošībā, jo pārlūks Google Chrome pārtrauca savienojumu, pirms tika veikta jebkādu datu apmaiņa.</translation> <translation id="168841957122794586">Servera sertifikāts ietver vāju kriptogrāfisko atslēgu.</translation> +<translation id="1697532407822776718">Gatavs!</translation> <translation id="1706954506755087368">{1,plural, =1{Šis serveris nevarēja pierādīt, ka ir <ph name="DOMAIN" />; šķiet, ka tā drošības sertifikāts sāks darboties rīt. Šī problēma var rasties nepareizas konfigurācijas dēļ vai tādēļ, ka kāds uzbrucējs ir pārtvēris jūsu savienojumu.}zero{Šis serveris nevarēja pierādīt, ka ir <ph name="DOMAIN" />; šķiet, ka tā drošības sertifikāts sāks darboties pēc # dienām. Šī problēma var rasties nepareizas konfigurācijas dēļ vai tādēļ, ka kāds uzbrucējs ir pārtvēris jūsu savienojumu.}one{Šis serveris nevarēja pierādīt, ka ir <ph name="DOMAIN" />; šķiet, ka tā drošības sertifikāts sāks darboties pēc # dienas. Šī problēma var rasties nepareizas konfigurācijas dēļ vai tādēļ, ka kāds uzbrucējs ir pārtvēris jūsu savienojumu.}other{Šis serveris nevarēja pierādīt, ka ir <ph name="DOMAIN" />; šķiet, ka tā drošības sertifikāts sāks darboties pēc # dienām. Šī problēma var rasties nepareizas konfigurācijas dēļ vai tādēļ, ka kāds uzbrucējs ir pārtvēris jūsu savienojumu.}}</translation> <translation id="1710259589646384581">Operētājsistēma</translation> <translation id="1721312023322545264">Jums ir nepieciešama atļauja no <ph name="NAME" />, lai apmeklētu šo vietni</translation> @@ -193,6 +196,7 @@ <translation id="225207911366869382">Šī vērtība vairs netiek atbalstīta šai politikai.</translation> <translation id="2262243747453050782">HTTP kļūda</translation> <translation id="2270484714375784793">Tālruņa numurs</translation> +<translation id="2283340219607151381">Saglabāt un aizpildīt adreses</translation> <translation id="2292556288342944218">Piekļuve internetam ir bloķēta</translation> <translation id="2316887270356262533">Tiks atbrīvots mazāk nekā 1 MB. Dažas vietnes nākamajā apmeklējumā var ielādēt lēnāk.</translation> <translation id="2317259163369394535">Vietnē <ph name="DOMAIN" /> ir jāievada lietotājvārds un parole.</translation> @@ -274,6 +278,7 @@ <translation id="2851634818064021665">Jums nepieciešama atļauja, lai apmeklētu šo vietni</translation> <translation id="2856444702002559011">Iespējams, uzbrucēji mēģina nozagt jūsu informāciju no vietnes <ph name="BEGIN_BOLD" /><ph name="SITE" /><ph name="END_BOLD" /> (piemēram, paroles, ziņojumus vai kredītkaršu datus). <ph name="BEGIN_LEARN_MORE_LINK" />Uzziniet vairāk<ph name="END_LEARN_MORE_LINK" />.</translation> <translation id="2881276955470682203">Vai saglabāt karti?</translation> +<translation id="2903493209154104877">Adreses</translation> <translation id="2909946352844186028">Konstatētas tīkla izmaiņas.</translation> <translation id="2916038427272391327">Aizveriet citas programmas</translation> <translation id="2922350208395188000">Servera sertifikātu nevar pārbaudīt.</translation> @@ -1146,6 +1151,7 @@ <translation id="973773823069644502">Pievienot piegādes adresi</translation> <translation id="975560348586398090">{COUNT,plural, =0{Nav}=1{1 vienums}zero{# vienumi}one{# vienums}other{# vienumi}}</translation> <translation id="981121421437150478">Bezsaistē</translation> +<translation id="984275831282074731">Maksājumu veidi</translation> <translation id="985199708454569384"><p>Šis kļūdas ziņojums tiek rādīts, ja datora vai mobilās ierīces datums un laiks nav precīzs.</p> <p>Lai novērstu šo kļūdu, atveriet ierīces pulksteni. Iestatiet pareizu datumu un laiku.</p></translation> <translation id="988159990683914416">Attīstītāja konstrukcija</translation>
diff --git a/components/strings/components_strings_ml.xtb b/components/strings/components_strings_ml.xtb index 5a9d50c..db5d25e 100644 --- a/components/strings/components_strings_ml.xtb +++ b/components/strings/components_strings_ml.xtb
@@ -63,6 +63,7 @@ <translation id="129863573139666797"><ph name="BEGIN_LINK" />നിങ്ങളുടെ കുക്കികൾ മായ്ക്കുന്നത് പരീക്ഷിക്കുക<ph name="END_LINK" /></translation> <translation id="1314614906530272393">തിരഞ്ഞെടുത്ത സെഷൻ നിലവിലില്ല.</translation> <translation id="1323433172918577554">കൂടുതൽ കാണിക്കുക</translation> +<translation id="132390688737681464">വിലാസങ്ങൾ സംരക്ഷിച്ച് സ്വമേധയാ പൂരിപ്പിക്കുക</translation> <translation id="1333989956347591814">നിങ്ങളുടെ ആക്റ്റിവിറ്റി ഇനിപ്പറയുന്നവയ്ക്ക് <ph name="BEGIN_EMPHASIS" />തുടർന്നും ദൃശ്യമായേക്കും<ph name="END_EMPHASIS" />: <ph name="BEGIN_LIST" /> <ph name="LIST_ITEM" />നിങ്ങൾ സന്ദർശിക്കുന്ന വെബ്സൈറ്റുകൾക്ക് @@ -110,9 +111,11 @@ <translation id="1645368109819982629">പ്രോട്ടോക്കോൾ പിന്തുണയ്ക്കുന്നില്ല</translation> <translation id="1655462015569774233">{1,plural, =1{ഈ സെർവറിന് ഇത് <ph name="DOMAIN" /> ആണെന്ന് തെളിയിക്കാനായില്ല; അതിന്റെ സുരക്ഷാ സർട്ടിഫിക്കറ്റ് ഇന്നലെ കാലഹരണപ്പെട്ടു. തെറ്റായ കോൺഫിഗറേഷൻ കാരണമോ ഒരു ആക്രമണകാരി നിങ്ങളുടെ കണക്ഷനെ തടസ്സപ്പെടുത്തുന്നത് കൊണ്ടോ ആയിരിക്കാം ഇത് സംഭവിച്ചത്. നിങ്ങളുടെ കമ്പ്യൂട്ടറിന്റെ ക്ലോക്ക് നിലവിൽ <ph name="CURRENT_DATE" /> എന്ന് സജ്ജമാക്കി. അത് ശരിയാണോ? അല്ലെങ്കിൽ, നിങ്ങൾ സിസ്റ്റത്തിന്റെ ക്ലോക്ക് ശരിയാക്കി ഈ പേജ് പുതുക്കുക.}other{ഈ സെർവറിന് ഇത് <ph name="DOMAIN" /> ആണെന്ന് തെളിയിക്കാനായില്ല; ഇതിന്റെ സുരക്ഷാ സർട്ടിഫിക്കറ്റ് # ദിവസം മുമ്പ് കാലഹരണപ്പെട്ടു. തെറ്റായ കോൺഫിഗറേഷൻ കാരണമോ ഒരു ആക്രമണകാരി നിങ്ങളുടെ കണക്ഷനെ തടസ്സപ്പെടുത്തുന്നത് കൊണ്ടോ ആയിരിക്കാം ഇത് സംഭവിച്ചത്. നിങ്ങളുടെ കമ്പ്യൂട്ടറിന്റെ ക്ലോക്ക് നിലവിൽ <ph name="CURRENT_DATE" /> എന്ന് സജ്ജമാക്കി. അത് ശരിയാണോ? അല്ലെങ്കിൽ, നിങ്ങൾ സിസ്റ്റത്തിന്റെ ക്ലോക്ക് ശരിയാക്കി ഈ പേജ് പുതുക്കുക.}}</translation> <translation id="1656489000284462475">പിക്കപ്പ്</translation> +<translation id="1662550410081243962">പേയ്മെന്റ് രീതികൾ സംരക്ഷിച്ച് സ്വമേധയാ പൂരിപ്പിക്കുക</translation> <translation id="1663943134801823270">കാർഡുകളും വിലാസങ്ങളും Chrome-ൽ നിന്നുള്ളതാണ്. നിങ്ങൾക്ക് അവ <ph name="BEGIN_LINK" />ക്രമീകരണത്തിൽ<ph name="END_LINK" /> മാനേജുചെയ്യാം.</translation> <translation id="1676269943528358898">നിങ്ങളുടെ വിവരങ്ങൾ പരിരക്ഷിക്കാൻ സാധാരണയായി <ph name="SITE" />, എൻക്രിപ്ഷൻ ഉപയോഗിക്കുന്നു. ഇപ്പോൾ <ph name="SITE" /> സൈറ്റിലേക്ക് കണക്റ്റുചെയ്യാൻ Google Chrome ശ്രമിച്ചപ്പോൾ, അസാധാരണമായതും തെറ്റായതുമായ ക്രെഡൻഷ്യലുകൾ വെബ്സൈറ്റ് തിരികെ അയച്ചു. ഒരു ആക്രമണകാരി, <ph name="SITE" /> എന്നതായി ഭാവിക്കാൻ ശ്രമിക്കുമ്പോഴോ Wi-Fi സൈൻ ഇൻ സ്ക്രീൻ, കണക്ഷനെ തടസ്സപ്പെടുത്തുമ്പോഴോ ആണ് ഇങ്ങനെ സംഭവിക്കാനിടയുള്ളത്. ഏതെങ്കിലും ഡാറ്റ കൈമാറുന്നതിനുമുമ്പ് Google Chrome കണക്ഷൻ അവസാനിപ്പിച്ചതിനാൽ, നിങ്ങളുടെ വിവരങ്ങൾ തുടർന്നും സുരക്ഷിതമായിരിക്കും.</translation> <translation id="168841957122794586">സെർവർ സർട്ടിഫിക്കറ്റിൽ ഒരു ദുർബലമായ ഗൂഢഭാഷ കീ ഉൾപ്പെടുന്നു.</translation> +<translation id="1697532407822776718">എല്ലാം സജ്ജമായിക്കഴിഞ്ഞു!</translation> <translation id="1706954506755087368">{1,plural, =1{ഈ സെർവറിന് ഇത് <ph name="DOMAIN" /> ആണെന്ന് തെളിയിക്കാനായില്ല; അതിന്റെ സുരക്ഷാ സർട്ടിഫിക്കറ്റ് ഇന്നലെ മുതൽ സാധുവല്ല. തെറ്റായ കോൺഫിഗറേഷൻ കാരണമോ ഒരു ആക്രമണകാരി നിങ്ങളുടെ കണക്ഷനെ തടസ്സപ്പെടുത്തുന്നത് കൊണ്ടോ ആയിരിക്കാം ഇത് സംഭവിച്ചത്.}other{ഈ സെർവറിന് ഇത് <ph name="DOMAIN" /> ആണെന്ന് തെളിയിക്കാനായില്ല; അതിന്റെ സുരക്ഷാ സർട്ടിഫിക്കറ്റ് # ദിവസം മുതൽ സാധുവായിരിക്കില്ല. തെറ്റായ കോൺഫിഗറേഷൻ കാരണമോ ഒരു ആക്രമണകാരി നിങ്ങളുടെ കണക്ഷനെ തടസ്സപ്പെടുത്തുന്നത് കൊണ്ടോ ആയിരിക്കാം ഇത് സംഭവിച്ചത്.}}</translation> <translation id="1710259589646384581">OS</translation> <translation id="1721312023322545264">ഈ സൈറ്റ് സന്ദർശിക്കാൻ നിങ്ങൾക്ക് <ph name="NAME" /> എന്നയാളിൽ നിന്നുള്ള അനുമതി ആവശ്യമാണ്</translation> @@ -193,6 +196,7 @@ <translation id="225207911366869382">ഈ നയത്തിനായി ഈ മൂല്യത്തെ ഒഴിവാക്കി.</translation> <translation id="2262243747453050782">HTTP പിശക്</translation> <translation id="2270484714375784793">ഫോൺ നമ്പർ</translation> +<translation id="2283340219607151381">വിലാസങ്ങൾ സംരക്ഷിച്ച് സ്വമേധയാ പൂരിപ്പിക്കുക</translation> <translation id="2292556288342944218">നിങ്ങളുടെ ഇന്റർനെറ്റ് ആക്സസ്സ് ബ്ലോക്കുചെയ്തു</translation> <translation id="2316887270356262533">1 MB-യിൽ കുറഞ്ഞ ഡാറ്റ ലാഭിക്കുന്നു. അടുത്തതവണ നിങ്ങൾ സന്ദർശിക്കുമ്പോൾ ചില സൈറ്റുകൾ ഇതിനേക്കാൾ പതുക്കെ ലോഡാകാം.</translation> <translation id="2317259163369394535"><ph name="DOMAIN" /> ഡൊമെയ്ന് ഒരു ഉപയോക്തൃനാമവും പാസ്വേഡും വേണം.</translation> @@ -274,6 +278,7 @@ <translation id="2851634818064021665">ഈ സൈറ്റ് സന്ദർശിക്കാൻ നിങ്ങൾക്ക് അനുമതി ആവശ്യമാണ്</translation> <translation id="2856444702002559011"><ph name="BEGIN_BOLD" /><ph name="SITE" /><ph name="END_BOLD" /> എന്നതിൽ നിന്ന് നിങ്ങളുടെ വിവരം മോഷ്ടിക്കാൻ അക്രമികൾ ശ്രമിക്കുന്നുണ്ടാവാം (ഉദാഹരണത്തിന്, പാസ്വേഡുകൾ, സന്ദേശങ്ങൾ, അല്ലെങ്കിൽ ക്രെഡിറ്റ് കാർഡുകൾ). <ph name="BEGIN_LEARN_MORE_LINK" />കൂടുതലറിയുക<ph name="END_LEARN_MORE_LINK" /></translation> <translation id="2881276955470682203">കാർഡ് സംരക്ഷിക്കണോ?</translation> +<translation id="2903493209154104877">വിലാസങ്ങള്</translation> <translation id="2909946352844186028">ഒരു നെറ്റ്വർക്ക് മാറ്റം കണ്ടെത്തി.</translation> <translation id="2916038427272391327">മറ്റ് പ്രോഗ്രാമുകൾ അടയ്ക്കുക</translation> <translation id="2922350208395188000">സെര്വറിന്റെ സര്ട്ടിഫിക്കറ്റ് പരിശോധിക്കാന് കഴിയില്ല.</translation> @@ -1144,6 +1149,7 @@ <translation id="973773823069644502">ഡെലിവറി നൽകേണ്ട വിലാസം ചേർക്കുക</translation> <translation id="975560348586398090">{COUNT,plural, =0{ഒന്നുമില്ല}=1{ഒരു ഇനം}other{# ഇനങ്ങൾ}}</translation> <translation id="981121421437150478">ഓഫ്ലൈൻ</translation> +<translation id="984275831282074731">പേയ്മെന്റ് രീതികൾ</translation> <translation id="985199708454569384"><p>നിങ്ങളുടെ കമ്പ്യൂട്ടറിന്റെയോ മൊബൈൽ ഉപകരണത്തിന്റെയോ തീയതിയും സമയവും കൃത്യമല്ലെങ്കിൽ ഈ പിശക് കാണും.</p> <p>പിശക് പരിഹരിക്കാൻ, ഉപകരണത്തിന്റെ ക്ലോക്ക് തുറക്കുക. സമയവും തീയതിയും കൃത്യമാണെന്ന് ഉറപ്പാക്കുക.</p></translation> <translation id="988159990683914416">വികാസക പതിപ്പ്</translation>
diff --git a/components/strings/components_strings_mr.xtb b/components/strings/components_strings_mr.xtb index eaa4e87..f32268b 100644 --- a/components/strings/components_strings_mr.xtb +++ b/components/strings/components_strings_mr.xtb
@@ -63,6 +63,7 @@ <translation id="129863573139666797"><ph name="BEGIN_LINK" />आपल्या कुकीज साफ करून पहा<ph name="END_LINK" /></translation> <translation id="1314614906530272393">निवडलेले सेशन अस्तित्वात नाही.</translation> <translation id="1323433172918577554">अधिक दाखवा</translation> +<translation id="132390688737681464">पत्ते भरा आणि सेव्ह करा</translation> <translation id="1333989956347591814">आपले पुढील क्रियाकलाप <ph name="BEGIN_EMPHASIS" />अद्याप दिसतील<ph name="END_EMPHASIS" />: <ph name="BEGIN_LIST" /> <ph name="LIST_ITEM" />आपण पाहत असलेल्या वेबसाइट @@ -110,9 +111,11 @@ <translation id="1645368109819982629">असमर्थित प्रोटोकॉल</translation> <translation id="1655462015569774233">{1,plural, =1{हा सर्व्हर हे <ph name="DOMAIN" /> असल्याचे सिद्ध करू शकला नाही; त्याचे सुरक्षा प्रमाणपत्र काल कालबाह्य झाले. हे कदाचित एका चुकीच्या कॉन्फिगरेशनमुळे किंवा आक्रमणकर्त्याने आपले कनेक्शन आंतरखंडित केल्यामुळे झाले असू शकते. आपले कॉंप्युटर सध्या <ph name="CURRENT_DATE" /> वर सेट आहे. ते योग्य दिसते आहे? नसल्यास, आपण आपल्या सिस्टीमचे घड्याळ दुरूस्त करावे आणि त्यानंतर हे पृष्ठ रिफ्रेश करा.}one{हा सर्व्हर हे <ph name="DOMAIN" />असल्याचे सिद्ध करू शकला नाही; त्याचे सुरक्षा प्रमाणपत्र # दिवसांपूर्वी कालबाह्य झाले. हे कदाचित एका चुकीच्या कॉन्फिगरेशनमुळे किंवा आक्रमणकर्त्याने आपले कनेक्शन आंतरखंडित केल्यामुळे झाले असू शकते. आपले कॉंप्युटर सध्या <ph name="CURRENT_DATE" /> वर सेट आहे. ते योग्य दिसते आहे? नसल्यास, आपण आपल्या सिस्टीमचे घड्याळ दुरूस्त करावे आणि त्यानंतर हे पृष्ठ रिफ्रेश करा.}other{हा सर्व्हर हे <ph name="DOMAIN" />असल्याचे सिद्ध करू शकला नाही; त्याचे सुरक्षा प्रमाणपत्र # दिवसांपूर्वी कालबाह्य झाले. हे कदाचित एका चुकीच्या कॉन्फिगरेशनमुळे किंवा आक्रमणकर्त्याने आपले कनेक्शन आंतरखंडित केल्यामुळे झाले असू शकते. आपले कॉंप्युटर सध्या <ph name="CURRENT_DATE" /> वर सेट आहे. ते योग्य दिसते आहे? नसल्यास, आपण आपल्या सिस्टीमचे घड्याळ दुरूस्त करावे आणि त्यानंतर हे पृष्ठ रिफ्रेश करा.}}</translation> <translation id="1656489000284462475">घेणे</translation> +<translation id="1662550410081243962">पेमेंट पद्धती सेव्ह करा आणि भरा</translation> <translation id="1663943134801823270">कार्ड आणि पत्ते Chrome कडील आहेत. आपण त्यांना <ph name="BEGIN_LINK" />सेटिंग्ज<ph name="END_LINK" /> मधून व्यवस्थापित करू शकता.</translation> <translation id="1676269943528358898"><ph name="SITE" /> तुमची माहिती संरक्षित करण्यासाठी सामान्यतः कूटबद्धीकरण वापरते. Google Chrome ने यावेळी <ph name="SITE" /> शी कनेक्ट करण्याचा प्रयत्न केला तेव्हा, वेबसाइटने असामान्य आणि अयोग्य क्रेडेन्शियल परत पाठविले. एकतर आक्रमणकर्ता <ph name="SITE" /> असल्याची बतावणी करण्याचा प्रयत्न करतो तेव्हा किंवा वाय-फाय साइन इन स्क्रीनने कनेक्शनमध्ये व्यत्यय आणले तेव्हा हे घडू शकते. कोणत्याही डेटाची अदलाबदल करण्यापूर्वी Google Chrome ने कनेक्शन थांबविल्यामुळे तुमची माहिती अद्याप सुरक्षित आहे.</translation> <translation id="168841957122794586">सर्व्हर प्रमाणपत्रात एक कमकुवत क्रिप्टोग्राफिक की आहे.</translation> +<translation id="1697532407822776718">आपण पूर्णपणे तयार आहात!</translation> <translation id="1706954506755087368">{1,plural, =1{हा सर्व्हर हे <ph name="DOMAIN" /> असल्याचे सिद्ध करू शकला नाही; त्याचे सुरक्षा प्रमाणपत्र उद्यापासून मानले जाईल. हे कदाचित एका चुकीच्या कॉन्फिगरेशनमुळे किंवा आक्रमणकर्त्याने आपले कनेक्शन आंतरखंडित केल्यामुळे झाले असू शकते.}one{हा सर्व्हर हे <ph name="DOMAIN" /> असल्याचे सिद्ध करू शकला नाही; त्याचे सुरक्षा प्रमाणपत्र पुढील # दिवसांपासून मानले जाईल. हे कदाचित एका चुकीच्या कॉन्फिगरेशनमुळे किंवा आक्रमणकर्त्याने आपले कनेक्शन आंतरखंडित केल्यामुळे झाले असू शकते.}other{हा सर्व्हर हे <ph name="DOMAIN" /> असल्याचे सिद्ध करू शकला नाही; त्याचे सुरक्षा प्रमाणपत्र पुढील # दिवसांपासून मानले जाईल. हे कदाचित एका चुकीच्या कॉन्फिगरेशनमुळे किंवा आक्रमणकर्त्याने आपले कनेक्शन आंतरखंडित केल्यामुळे झाले असू शकते.}}</translation> <translation id="1710259589646384581">OS</translation> <translation id="1721312023322545264">या साइटला भेट देण्यासाठी आपल्याला <ph name="NAME" /> कडील परवानगी आवश्यक आहे</translation> @@ -193,6 +196,7 @@ <translation id="225207911366869382">हे मूल्य या धोरणासाठी नापसंत करण्यात आले आहे.</translation> <translation id="2262243747453050782">HTTP एरर</translation> <translation id="2270484714375784793">फोन नंबर</translation> +<translation id="2283340219607151381">पत्ते भरा आणि सेव्ह करा</translation> <translation id="2292556288342944218">आपला इंटरनेट प्रवेश अवरोधित केला आहे</translation> <translation id="2316887270356262533">1 MB पेक्षा कमी जागा मोकळी करते. काही साइट तुमच्या पुढील भेटीच्या वेळी आणखी धीम्या गतीने लोड होऊ शकतात.</translation> <translation id="2317259163369394535"><ph name="DOMAIN" /> साठी वापरकर्तानाव आणि पासवर्ड आवश्यक आहेत.</translation> @@ -274,6 +278,7 @@ <translation id="2851634818064021665">या साइटला भेट देण्यासाठी तुम्हाला परवानगीची गरज आहे</translation> <translation id="2856444702002559011">हल्लेखोर कदाचित तुमची माहिती (उदाहरणार्थ पासवर्ड, संदेश किंवा क्रेडिट कार्ड) <ph name="BEGIN_BOLD" /><ph name="SITE" /><ph name="END_BOLD" /> मधून चोरण्याचा प्रयत्न करत असतील. <ph name="BEGIN_LEARN_MORE_LINK" />आणखी जाणून घ्या<ph name="END_LEARN_MORE_LINK" /></translation> <translation id="2881276955470682203">कार्ड सेव्ह करायचे?</translation> +<translation id="2903493209154104877">पत्ते</translation> <translation id="2909946352844186028">एक नेटवर्क बदल आढळला.</translation> <translation id="2916038427272391327">अन्य प्रोग्राम बंद करा</translation> <translation id="2922350208395188000">सर्व्हरचे प्रमाणपत्र तपासणे शक्य नाही.</translation> @@ -1147,6 +1152,7 @@ <translation id="973773823069644502">वितरणाचा पत्ता जोडा</translation> <translation id="975560348586398090">{COUNT,plural, =0{काहीही नाही}=1{1 आयटम}one{# आयटम}other{# आयटम}}</translation> <translation id="981121421437150478">ऑफलाइन</translation> +<translation id="984275831282074731">पेमेंट पद्धती</translation> <translation id="985199708454569384"><p>जर तुमच्या कॉंप्युटर किंवा मोबाइल डिव्हाइसची तारीख आणि वेळ चुकीची असेल, तर तुम्हाला ही एरर दिसेल.</p> <p>या एररला घालवण्यासाठी, तुमच्या डिव्हाइसचे क्लॉक उघडा. वेळ आणि तारीख अचूक असल्याची खात्री करा.</p></translation> <translation id="988159990683914416">विकसक बिल्ड</translation>
diff --git a/components/strings/components_strings_ms.xtb b/components/strings/components_strings_ms.xtb index 1146c62..c120a8cf 100644 --- a/components/strings/components_strings_ms.xtb +++ b/components/strings/components_strings_ms.xtb
@@ -63,6 +63,7 @@ <translation id="129863573139666797"><ph name="BEGIN_LINK" />Cuba kosongkan kuki anda<ph name="END_LINK" /></translation> <translation id="1314614906530272393">Sesi yang dipilih tidak wujud.</translation> <translation id="1323433172918577554">Tunjukkan Lagi</translation> +<translation id="132390688737681464">Simpan dan Lengkapkan Alamat</translation> <translation id="1333989956347591814">Aktiviti anda <ph name="BEGIN_EMPHASIS" />mungkin masih boleh dilihat<ph name="END_EMPHASIS" /> oleh: <ph name="BEGIN_LIST" /> <ph name="LIST_ITEM" />Tapak web yang anda lawati @@ -110,9 +111,11 @@ <translation id="1645368109819982629">Protokol tidak disokong</translation> <translation id="1655462015569774233">{1,plural, =1{Pelayan ini tidak dapat membuktikan bahawa <ph name="DOMAIN" />; sijil keselamatannya tamat tempoh semalam. Ini mungkin disebabkan oleh kesilapan konfigurasi atau penyerang yang memintas sambungan anda. Jam komputer anda ditetapkan kepada <ph name="CURRENT_DATE" /> pada masa ini. Adakah itu betul? Jika tidak, anda perlu membetulkan jam sistem anda dan kemudian muat semula halaman ini.}other{Pelayan ini tidak dapat membuktikan bahawa <ph name="DOMAIN" />; sijil keselamatannya tamat tempoh # hari yang lalu. Ini mungkin disebabkan oleh kesilapan konfigurasi atau penyerang yang memintas sambungan anda. Jam komputer anda ditetapkan kepada <ph name="CURRENT_DATE" /> pada masa ini. Adakah itu betul? Jika tidak, anda perlu membetulkan jam sistem anda dan kemudian muat semula halaman ini.}}</translation> <translation id="1656489000284462475">Pengambilan</translation> +<translation id="1662550410081243962">Simpan dan lengkapkan kaedah pembayaran</translation> <translation id="1663943134801823270">Kad dan alamat adalah daripada Chrome. Anda boleh mengurus kad dan alamat ini dalam <ph name="BEGIN_LINK" />Tetapan<ph name="END_LINK" />.</translation> <translation id="1676269943528358898"><ph name="SITE" /> biasanya menggunakan penyulitan untuk melindungi maklumat anda. Apabila Google Chrome cuba menyambung ke <ph name="SITE" /> pada kali ini, tapak web tersebut mengembalikan bukti kelayakan yang luar biasa dan salah. Hal ini boleh berlaku apabila penyerang sedang cuba menyamar sebagai <ph name="SITE" /> atau skrin log masuk Wi-Fi telah memutuskan sambungan. Maklumat anda masih selamat kerana Google Chrome menghentikan sambungan sebelum sebarang pertukaran data berlaku.</translation> <translation id="168841957122794586">Sijil pelayan mengandungi kunci kriptografi yang lemah.</translation> +<translation id="1697532407822776718">Anda telah bersedia!</translation> <translation id="1706954506755087368">{1,plural, =1{Pelayan ini tidak dapat membuktikan bahawa itu <ph name="DOMAIN" />;sijil keselamatannya sepatutnya bermula esok. Ini mungkin disebabkan oleh kesilapan konfigurasi atau penyerang yang memintas sambungan anda.}other{Pelayan ini tidak dapat membuktikan bahawa itu <ph name="DOMAIN" />; sijil keselamatannya sepatutnya bermula # hari lagi. Ini mungkin disebabkan oleh kesilapan konfigurasi atau penyerang yang memintas sambungan anda.}}</translation> <translation id="1710259589646384581">OS</translation> <translation id="1721312023322545264">Anda memerlukan kebenaran daripada <ph name="NAME" /> untuk melawat tapak ini</translation> @@ -193,6 +196,7 @@ <translation id="225207911366869382">Nilai ini tidak lagi digunakan untuk dasar ini.</translation> <translation id="2262243747453050782">Ralat HTTP</translation> <translation id="2270484714375784793">Nombor telefon</translation> +<translation id="2283340219607151381">Simpan dan lengkapkan alamat</translation> <translation id="2292556288342944218">Akses Internet anda disekat</translation> <translation id="2316887270356262533">Mengosongkan kurang daripada 1 MB. Sesetengah tapak mungkin dimuatkan dengan lebih perlahan pada lawatan anda yang seterusnya.</translation> <translation id="2317259163369394535"><ph name="DOMAIN" /> memerlukan nama pengguna dan kata laluan.</translation> @@ -274,6 +278,7 @@ <translation id="2851634818064021665">Anda memerlukan kebenaran untuk melawat tapak ini</translation> <translation id="2856444702002559011">Penyerang mungkin akan cuba mencuri maklumat anda daripada <ph name="BEGIN_BOLD" /><ph name="SITE" /><ph name="END_BOLD" /> (contohnya, kata laluan, mesej atau kad kredit). <ph name="BEGIN_LEARN_MORE_LINK" />Ketahui lebih lanjut<ph name="END_LEARN_MORE_LINK" /></translation> <translation id="2881276955470682203">Simpan kad?</translation> +<translation id="2903493209154104877">Alamat</translation> <translation id="2909946352844186028">Perubahan rangkaian dikesan.</translation> <translation id="2916038427272391327">Tutup atur cara lain</translation> <translation id="2922350208395188000">Sijil pelayan tidak boleh diperiksa.</translation> @@ -1148,6 +1153,7 @@ <translation id="973773823069644502">Tambahkan Alamat Penghantaran</translation> <translation id="975560348586398090">{COUNT,plural, =0{Tiada}=1{1 item}other{# item}}</translation> <translation id="981121421437150478">Luar talian</translation> +<translation id="984275831282074731">Kaedah pembayaran</translation> <translation id="985199708454569384"><p>Anda akan melihat ralat ini jika tarikh dan masa komputer atau peranti mudah alih anda tidak tepat.</p> <p>Untuk membetulkan ralat ini, buka jam peranti anda. Pastikan masa dan tarikh adalah betul.</p></translation> <translation id="988159990683914416">Binaan Pemaju</translation>
diff --git a/components/strings/components_strings_nl.xtb b/components/strings/components_strings_nl.xtb index b2374cf5..3f0e028 100644 --- a/components/strings/components_strings_nl.xtb +++ b/components/strings/components_strings_nl.xtb
@@ -63,6 +63,7 @@ <translation id="129863573139666797"><ph name="BEGIN_LINK" />Probeer je cookies te wissen<ph name="END_LINK" /></translation> <translation id="1314614906530272393">De geselecteerde sessie bestaat niet.</translation> <translation id="1323433172918577554">Meer weergeven</translation> +<translation id="132390688737681464">Adressen opslaan en invullen</translation> <translation id="1333989956347591814">Je activiteit is mogelijk <ph name="BEGIN_EMPHASIS" />nog wel zichtbaar<ph name="END_EMPHASIS" /> voor: <ph name="BEGIN_LIST" /> <ph name="LIST_ITEM" />Websites die je bezoekt @@ -110,9 +111,11 @@ <translation id="1645368109819982629">Niet-ondersteund protocol</translation> <translation id="1655462015569774233">{1,plural, =1{Deze server kan niet bewijzen dat dit <ph name="DOMAIN" /> is. Het bijbehorende beveiligingscertificaat is gisteren verlopen. Dit kan worden veroorzaakt door een verkeerde configuratie of een aanvaller die je verbinding onderschept. De klok van je computer is momenteel ingesteld op <ph name="CURRENT_DATE" />. Is dat correct? Zo niet, dan moet je de klok van je systeem aanpassen en vervolgens deze pagina vernieuwen.}other{Deze server kan niet bewijzen dat dit <ph name="DOMAIN" /> is. Het bijbehorende beveiligingscertificaat is # dagen geleden verlopen. Dit kan worden veroorzaakt door een verkeerde configuratie of een aanvaller die je verbinding onderschept. De klok van je computer is momenteel ingesteld op <ph name="CURRENT_DATE" />. Is dat correct? Zo niet, dan moet je de klok van je systeem aanpassen en vervolgens deze pagina vernieuwen.}}</translation> <translation id="1656489000284462475">Ophaaltijd</translation> +<translation id="1662550410081243962">Betaalmethoden toevoegen en invullen</translation> <translation id="1663943134801823270">Kaarten en adressen zijn afkomstig uit Chrome. Je kunt ze beheren in <ph name="BEGIN_LINK" />Instellingen<ph name="END_LINK" />.</translation> <translation id="1676269943528358898"><ph name="SITE" /> gebruikt gewoonlijk versleuteling om je gegevens te beschermen. Toen Google Chrome deze keer probeerde verbinding te maken met <ph name="SITE" />, retourneerde de website ongewone en onjuiste inloggegevens. Dit kan gebeuren als een aanvaller probeert zich als <ph name="SITE" /> voor te doen of als een wifi-inlogscherm de verbinding heeft verbroken. Je gegevens zijn nog steeds beveiligd omdat Google Chrome de verbinding heeft beëindigd voordat er gegevens konden worden uitgewisseld.</translation> <translation id="168841957122794586">Het servercertificaat bevat een zwakke cryptografische sleutel.</translation> +<translation id="1697532407822776718">Je bent nu klaar!</translation> <translation id="1706954506755087368">{1,plural, =1{Deze server kan niet bewijzen dat dit <ph name="DOMAIN" /> is. Het bijbehorende beveiligingscertificaat is zogenaamd van morgen. Dit kan worden veroorzaakt door een verkeerde configuratie of een aanvaller die je verbinding onderschept.}other{Deze server kan niet bewijzen dat dit <ph name="DOMAIN" /> is. Het bijbehorende beveiligingscertificaat is zogenaamd van # dagen in de toekomst. Dit kan worden veroorzaakt door een verkeerde configuratie of een aanvaller die je verbinding onderschept.}}</translation> <translation id="1710259589646384581">Besturingssysteem</translation> <translation id="1721312023322545264">Je hebt toestemming van <ph name="NAME" /> nodig om deze site te bezoeken</translation> @@ -193,6 +196,7 @@ <translation id="225207911366869382">Deze waarde is verouderd voor dit beleid.</translation> <translation id="2262243747453050782">HTTP-fout</translation> <translation id="2270484714375784793">Telefoonnummer</translation> +<translation id="2283340219607151381">Adressen opslaan en invullen</translation> <translation id="2292556288342944218">Je toegang tot internet wordt geblokkeerd</translation> <translation id="2316887270356262533">Hiermee wordt minder dan 1 MB vrijgemaakt. Sommige sites kunnen langzamer worden geladen wanneer je ze weer bezoekt.</translation> <translation id="2317259163369394535">Voor <ph name="DOMAIN" /> zijn een gebruikersnaam en een wachtwoord vereist.</translation> @@ -274,6 +278,7 @@ <translation id="2851634818064021665">Je hebt toestemming nodig om deze site te bezoeken</translation> <translation id="2856444702002559011">Cybercriminelen proberen mogelijk je gegevens van <ph name="BEGIN_BOLD" /><ph name="SITE" /><ph name="END_BOLD" /> te stelen (bijvoorbeeld wachtwoorden, berichten of creditcardgegevens). <ph name="BEGIN_LEARN_MORE_LINK" />Meer informatie<ph name="END_LEARN_MORE_LINK" /></translation> <translation id="2881276955470682203">Kaart opslaan?</translation> +<translation id="2903493209154104877">Adressen</translation> <translation id="2909946352844186028">Er is een netwerkwijziging gedetecteerd.</translation> <translation id="2916038427272391327">Andere programma's sluiten</translation> <translation id="2922350208395188000">Het servercertificaat kan niet worden gecontroleerd.</translation> @@ -1141,6 +1146,7 @@ <translation id="973773823069644502">Afleveradres toevoegen</translation> <translation id="975560348586398090">{COUNT,plural, =0{Geen}=1{1 item}other{# items}}</translation> <translation id="981121421437150478">Offline</translation> +<translation id="984275831282074731">Betaalmethoden</translation> <translation id="985199708454569384"><p>Je ziet deze fout als de datum en tijd van je computer of mobiele apparaat niet goed zijn ingesteld.</p> <p>Open de klok van het apparaat om deze fout op te lossen. Zorg dat de tijd en datum juist zijn.</p></translation> <translation id="988159990683914416">Ontwikkelaarsbuild</translation>
diff --git a/components/strings/components_strings_no.xtb b/components/strings/components_strings_no.xtb index a193ea2..896a85a 100644 --- a/components/strings/components_strings_no.xtb +++ b/components/strings/components_strings_no.xtb
@@ -63,6 +63,7 @@ <translation id="129863573139666797"><ph name="BEGIN_LINK" />Prøv å slette informasjonskapslene dine<ph name="END_LINK" /></translation> <translation id="1314614906530272393">Den valgte økten finnes ikke.</translation> <translation id="1323433172918577554">Vis mer</translation> +<translation id="132390688737681464">Lagre og fyll inn adresser</translation> <translation id="1333989956347591814">Aktiviteten din <ph name="BEGIN_EMPHASIS" />kan fortsatt være synlig<ph name="END_EMPHASIS" /> for <ph name="BEGIN_LIST" /> <ph name="LIST_ITEM" />nettsteder du besøker @@ -110,9 +111,11 @@ <translation id="1645368109819982629">Protokollen støttes ikke</translation> <translation id="1655462015569774233">{1,plural, =1{Denne tjeneren kunne ikke bevise at den er <ph name="DOMAIN" />, ettersom sikkerhetssertifikatet utløp i går. Dette kan skyldes en feilkonfigurasjon eller at en angriper avskjærer tilkoblingen mellom deg og nettstedet. Klokken på datamaskinen din er stilt til <ph name="CURRENT_DATE" />. Er det riktig? Hvis ikke bør du stille klokken på systemet og laste inn denne siden på nytt.}other{Denne tjeneren kunne ikke bevise at den er <ph name="DOMAIN" />, ettersom sikkerhetssertifikatet utløp for # dager siden. Dette kan skyldes en feilkonfigurasjon eller at en angriper avskjærer tilkoblingen mellom deg og nettstedet. Klokken på datamaskinen din er stilt til <ph name="CURRENT_DATE" />. Er det riktig? Hvis ikke bør du stille klokken på systemet og laste inn denne siden på nytt.}}</translation> <translation id="1656489000284462475">Henting</translation> +<translation id="1662550410081243962">Lagre og fyll ut betalingsmåter</translation> <translation id="1663943134801823270">Kortene og adressene er fra Chrome. Du kan administrere dem i <ph name="BEGIN_LINK" />Innstillinger<ph name="END_LINK" />.</translation> <translation id="1676269943528358898"><ph name="SITE" /> bruker vanligvis kryptering for å beskytte informasjonen din. Da Chrome prøvde å koble til <ph name="SITE" /> denne gangen, sendte nettstedet tilbake uvanlig og feil legitimasjon. Dette kan skje hvis en angriper prøver å utgi seg for å være <ph name="SITE" />, eller hvis en Wi-Fi-påloggingsskjerm har avbrutt tilkoblingen. Informasjonen din er likevel sikker fordi Chrome stoppet tilkoblingen før det ble utvekslet noen data.</translation> <translation id="168841957122794586">Tjenersertifikatet inneholder en svak kryptografisk nøkkel.</translation> +<translation id="1697532407822776718">Da er alt klart!</translation> <translation id="1706954506755087368">{1,plural, =1{Denne tjeneren kunne ikke bevise at den er <ph name="DOMAIN" />, ettersom sikkerhetssertifikatet ser ut til å være fra i morgen. Dette kan skyldes en feilkonfigurasjon eller at en angriper avskjærer tilkoblingen mellom deg og nettstedet.}other{Denne tjeneren kunne ikke bevise at den er <ph name="DOMAIN" />, ettersom sikkerhetssertifikatet ser ut til å være fra # dager frem i tid. Dette kan skyldes en feilkonfigurasjon eller at en angriper avskjærer tilkoblingen mellom deg og nettstedet.}}</translation> <translation id="1710259589646384581">OS</translation> <translation id="1721312023322545264">Du trenger tillatelse fra <ph name="NAME" /> for å besøke dette nettstedet</translation> @@ -193,6 +196,7 @@ <translation id="225207911366869382">Denne verdien er foreldet for denne innstillingen.</translation> <translation id="2262243747453050782">HTTP-feil</translation> <translation id="2270484714375784793">Telefonnummer</translation> +<translation id="2283340219607151381">Lagre og fyll inn adresser</translation> <translation id="2292556288342944218">Internett-tilgangen din er blokkert</translation> <translation id="2316887270356262533">Frigjør mindre enn 1 MB. Det kan hende enkelte nettsteder lastes inn tregere neste gang du besøker dem.</translation> <translation id="2317259163369394535"><ph name="DOMAIN" /> krever brukernavn og passord.</translation> @@ -206,6 +210,7 @@ <translation id="2359808026110333948">Fortsett</translation> <translation id="2365563543831475020">Programstopprapporten fra <ph name="CRASH_TIME" /> ble ikke lastet opp</translation> <translation id="2367567093518048410">Nivå</translation> +<translation id="2378238891085281592">Nå er du i privatmodus</translation> <translation id="2384307209577226199">Bedriftsstandard</translation> <translation id="2386255080630008482">Tjenerens sertifikat er tilbakekalt.</translation> <translation id="2392959068659972793">Vis innstillinger uten verdi</translation> @@ -273,6 +278,7 @@ <translation id="2851634818064021665">Du trenger tillatelse for å besøke dette nettstedet</translation> <translation id="2856444702002559011">Det kan hende at angripere prøver å stjele informasjonen din fra <ph name="BEGIN_BOLD" /><ph name="SITE" /><ph name="END_BOLD" /> (for eksempel passord, meldinger og kredittkortinformasjon). <ph name="BEGIN_LEARN_MORE_LINK" />Finn ut mer<ph name="END_LEARN_MORE_LINK" /></translation> <translation id="2881276955470682203">Vil du lagre kortet?</translation> +<translation id="2903493209154104877">Adresser</translation> <translation id="2909946352844186028">En nettverksendring ble oppdaget.</translation> <translation id="2916038427272391327">Lukk andre programmer</translation> <translation id="2922350208395188000">Tjenerens sertifikat kan ikke kontrolleres.</translation> @@ -512,6 +518,7 @@ <translation id="450710068430902550">Deling med administratoren</translation> <translation id="4515275063822566619">Kortene og adressene er fra Chrome og Google-kontoen din (<ph name="ACCOUNT_EMAIL" />). Du kan administrere dem i <ph name="BEGIN_LINK" />Innstillinger<ph name="END_LINK" />.</translation> <translation id="4522570452068850558">Detaljer</translation> +<translation id="4524805452350978254">Administrer kort</translation> <translation id="4552089082226364758">Flash</translation> <translation id="4558551763791394412">Prøv å slå av utvidelsene dine.</translation> <translation id="457875822857220463">Levering</translation> @@ -698,6 +705,7 @@ <translation id="5866257070973731571">Legg til telefonnummer</translation> <translation id="5869405914158311789">Dette nettstedet er ikke tilgjengelig</translation> <translation id="5869522115854928033">Lagrede passord</translation> +<translation id="5887400589839399685">Kort lagret</translation> <translation id="5893752035575986141">Kredittkort godtas.</translation> <translation id="5908541034548427511"><ph name="TYPE_1" /> (synkronisert)</translation> <translation id="5920262536204764679">{NUM_COOKIES,plural, =1{1 er i bruk}other{# er i bruk}}</translation> @@ -817,11 +825,13 @@ <translation id="6948701128805548767">For å se hentemetoder og -krav, velg en adresse</translation> <translation id="6949872517221025916">Tilbakestill passordet</translation> <translation id="6950684638814147129">Feil under parsering av JSON-verdi: <ph name="ERROR" /></translation> +<translation id="6957624206566198865">Åpne siden i et nytt privatvindu</translation> <translation id="6957887021205513506">Tjenersertifikatet ser ut til å være forfalsket.</translation> <translation id="6965382102122355670">OK</translation> <translation id="6965978654500191972">Enhet</translation> <translation id="6970216967273061347">Område</translation> <translation id="6973656660372572881">Både statiske proxytjenere og en .pac-skriptnettadresse er angitt.</translation> +<translation id="6984479912851154518">Går ut av privatmodus for å betale via en ekstern app. Vil du fortsette?</translation> <translation id="6989763994942163495">Vis avanserte innstillinger</translation> <translation id="7012363358306927923">China UnionPay</translation> <translation id="7016992613359344582">Disse belastningene kan skje én gang eller være gjentakende, og det er ikke sikkert de er åpenbare.</translation> @@ -1072,6 +1082,7 @@ <translation id="8820817407110198400">Bokmerker</translation> <translation id="883848425547221593">Andre bokmerker</translation> <translation id="884264119367021077">Leveringsadresse</translation> +<translation id="8846319957959474018">Åpne apper enkelt med bokmerker</translation> <translation id="884923133447025588">Finner ingen tilbakekallingsmekanisme.</translation> <translation id="885730110891505394">Deling med Google</translation> <translation id="8858065207712248076">Chrome anbefaler at du tilbakestiller passordet ditt for <ph name="BEGIN_BOLD" /><ph name="ORG_NAME" /><ph name="END_BOLD" /> hvis du også har brukt det på andre nettsteder.</translation> @@ -1140,6 +1151,7 @@ <translation id="973773823069644502">Legg til leveringsadresse</translation> <translation id="975560348586398090">{COUNT,plural, =0{Ingen}=1{1 element}other{# elementer}}</translation> <translation id="981121421437150478">Uten nett</translation> +<translation id="984275831282074731">Betalingsmåter</translation> <translation id="985199708454569384"><p>Du ser denne feilen hvis du har feil dato eller klokkeslett på datamaskinen eller mobilenheten din.</p> <p>For å fikse feilen, åpne klokken på enheten, og sørg for at klokkeslettet og datoen er riktig.</p></translation> <translation id="988159990683914416">Utviklerversjon</translation>
diff --git a/components/strings/components_strings_pl.xtb b/components/strings/components_strings_pl.xtb index ad958c7..0286670 100644 --- a/components/strings/components_strings_pl.xtb +++ b/components/strings/components_strings_pl.xtb
@@ -63,6 +63,7 @@ <translation id="129863573139666797"><ph name="BEGIN_LINK" />Usuń pliki cookie<ph name="END_LINK" /></translation> <translation id="1314614906530272393">Wybrana sesja nie istnieje.</translation> <translation id="1323433172918577554">Pokaż więcej</translation> +<translation id="132390688737681464">Zapisuj i automatycznie uzupełniaj adresy</translation> <translation id="1333989956347591814">Twoja aktywność <ph name="BEGIN_EMPHASIS" />może być nadal widoczna<ph name="END_EMPHASIS" /> dla: <ph name="BEGIN_LIST" /> <ph name="LIST_ITEM" />stron internetowych, które odwiedzasz; @@ -110,9 +111,11 @@ <translation id="1645368109819982629">Nieobsługiwany protokół</translation> <translation id="1655462015569774233">{1,plural, =1{Ten serwer nie mógł udowodnić, że należy do <ph name="DOMAIN" />. Jego certyfikat bezpieczeństwa wygasł wczoraj. Może to być spowodowane błędną konfiguracją lub przechwyceniem połączenia. Zegar komputera jest obecnie ustawiony na <ph name="CURRENT_DATE" />. Czy to prawidłowa data? Jeśli nie, musisz skorygować zegar systemu, a następnie odświeżyć tę stronę.}few{Ten serwer nie mógł udowodnić, że należy do <ph name="DOMAIN" />. Jego certyfikat bezpieczeństwa wygasł # dni temu. Może to być spowodowane błędną konfiguracją lub przechwyceniem połączenia. Zegar komputera jest obecnie ustawiony na <ph name="CURRENT_DATE" />. Czy to prawidłowa data? Jeśli nie, musisz skorygować zegar systemu, a następnie odświeżyć tę stronę.}many{Ten serwer nie mógł udowodnić, że należy do <ph name="DOMAIN" />. Jego certyfikat bezpieczeństwa wygasł # dni temu. Może to być spowodowane błędną konfiguracją lub przechwyceniem połączenia. Zegar komputera jest obecnie ustawiony na <ph name="CURRENT_DATE" />. Czy to prawidłowa data? Jeśli nie, musisz skorygować zegar systemu, a następnie odświeżyć tę stronę.}other{Ten serwer nie mógł udowodnić, że należy do <ph name="DOMAIN" />. Jego certyfikat bezpieczeństwa wygasł # dnia temu. Może to być spowodowane błędną konfiguracją lub przechwyceniem połączenia. Zegar komputera jest obecnie ustawiony na <ph name="CURRENT_DATE" />. Czy to prawidłowa data? Jeśli nie, musisz skorygować zegar systemu, a następnie odświeżyć tę stronę.}}</translation> <translation id="1656489000284462475">Odbiór</translation> +<translation id="1662550410081243962">Zapisuj i automatycznie uzupełniaj informacje o formach płatności</translation> <translation id="1663943134801823270">Karty i adresy pochodzą z Chrome. Możesz nimi zarządzać w <ph name="BEGIN_LINK" />Ustawieniach<ph name="END_LINK" />.</translation> <translation id="1676269943528358898"><ph name="SITE" /> zazwyczaj używa szyfrowania do ochrony Twoich informacji. Gdy tym razem Google Chrome próbował połączyć się ze stroną <ph name="SITE" />, odesłała ona nietypowe i nieprawidłowe dane logowania. Może się tak zdarzyć, gdy pod stronę <ph name="SITE" /> podszywa się atakująca osoba albo gdy ekran logowania do sieci Wi-Fi przerwie połączenie. Twoje informacje są nadal bezpieczne, bo połączenie w Google Chrome zakończyło się przed wymianą jakichkolwiek danych.</translation> <translation id="168841957122794586">Certyfikat serwera ma słaby klucz kryptograficzny.</translation> +<translation id="1697532407822776718">Wszystko gotowe.</translation> <translation id="1706954506755087368">{1,plural, =1{Ten serwer nie mógł udowodnić, że należy do <ph name="DOMAIN" />. Jego certyfikat bezpieczeństwa przypuszczalnie zacznie obowiązywać od jutra. Może to być spowodowane błędną konfiguracją lub przechwyceniem połączenia.}few{Ten serwer nie mógł udowodnić, że należy do <ph name="DOMAIN" />. Jego certyfikat bezpieczeństwa przypuszczalnie zacznie obowiązywać za # dni. Może to być spowodowane błędną konfiguracją lub przechwyceniem połączenia.}many{Ten serwer nie mógł udowodnić, że należy do <ph name="DOMAIN" />. Jego certyfikat bezpieczeństwa przypuszczalnie zacznie obowiązywać za # dni. Może to być spowodowane błędną konfiguracją lub przechwyceniem połączenia.}other{Ten serwer nie mógł udowodnić, że należy do <ph name="DOMAIN" />. Jego certyfikat bezpieczeństwa przypuszczalnie zacznie obowiązywać za # dnia. Może to być spowodowane błędną konfiguracją lub przechwyceniem połączenia.}}</translation> <translation id="1710259589646384581">System operacyjny</translation> <translation id="1721312023322545264">Aby wejść na tę stronę, musisz uzyskać pozwolenie od użytkownika <ph name="NAME" /></translation> @@ -193,6 +196,7 @@ <translation id="225207911366869382">Ta wartość tej zasady została wycofana.</translation> <translation id="2262243747453050782">Błąd HTTP</translation> <translation id="2270484714375784793">Numer telefonu</translation> +<translation id="2283340219607151381">Zapisuj i automatycznie uzupełniaj adresy</translation> <translation id="2292556288342944218">Masz zablokowany dostęp do internetu</translation> <translation id="2316887270356262533">Zwolni się mniej niż 1 MB. Podczas następnej wizyty niektóre strony mogą ładować się wolniej.</translation> <translation id="2317259163369394535"><ph name="DOMAIN" /> wymaga nazwy użytkownika i hasła.</translation> @@ -274,6 +278,7 @@ <translation id="2851634818064021665">Musisz mieć pozwolenie, by wejść na tę stronę</translation> <translation id="2856444702002559011">Osoby atakujące mogą próbować wykraść Twoje informacje ze strony <ph name="BEGIN_BOLD" /><ph name="SITE" /><ph name="END_BOLD" /> (na przykład hasła, wiadomości lub dane kart kredytowych). <ph name="BEGIN_LEARN_MORE_LINK" />Więcej informacji<ph name="END_LEARN_MORE_LINK" /></translation> <translation id="2881276955470682203">Czy zapisać kartę?</translation> +<translation id="2903493209154104877">Adresy</translation> <translation id="2909946352844186028">Wykryto zmianę sieci.</translation> <translation id="2916038427272391327">Zamknij inne programy</translation> <translation id="2922350208395188000">Nie można sprawdzić certyfikatu serwera.</translation> @@ -1146,6 +1151,7 @@ <translation id="973773823069644502">Dodaj adres dostawy</translation> <translation id="975560348586398090">{COUNT,plural, =0{Brak}=1{1 element}few{# elementy}many{# elementów}other{# elementu}}</translation> <translation id="981121421437150478">Offline</translation> +<translation id="984275831282074731">Formy płatności</translation> <translation id="985199708454569384"><p>Ten błąd występuje, jeśli data i godzina na komputerze lub urządzeniu mobilnym są niedokładne.</p> <p>Aby naprawić błąd, otwórz ustawienia zegara na urządzeniu i zmień datę oraz godzinę na prawidłowe.</p></translation> <translation id="988159990683914416">Build</translation>
diff --git a/components/strings/components_strings_pt-BR.xtb b/components/strings/components_strings_pt-BR.xtb index 7294f69c..f695084 100644 --- a/components/strings/components_strings_pt-BR.xtb +++ b/components/strings/components_strings_pt-BR.xtb
@@ -63,6 +63,7 @@ <translation id="129863573139666797"><ph name="BEGIN_LINK" />Tente limpar os cookies<ph name="END_LINK" /></translation> <translation id="1314614906530272393">A sessão selecionada não existe.</translation> <translation id="1323433172918577554">Mostrar mais</translation> +<translation id="132390688737681464">Salvar e preencher endereços</translation> <translation id="1333989956347591814">É possível que sua atividade <ph name="BEGIN_EMPHASIS" />ainda esteja visível<ph name="END_EMPHASIS" /> para: <ph name="BEGIN_LIST" /> <ph name="LIST_ITEM" />os websites que você visita @@ -110,9 +111,11 @@ <translation id="1645368109819982629">Protocolo não compatível</translation> <translation id="1655462015569774233">{1,plural, =1{Este servidor não conseguiu provar que é <ph name="DOMAIN" />; o certificado de segurança dele expirou ontem. Isso pode ser causado por uma configuração incorreta ou pela interceptação da sua conexão por um invasor. O relógio do seu computador está definido para <ph name="CURRENT_DATE" />. Essa data está correta? Se não estiver, corrija o relógio do sistema e depois atualize esta página.}one{Este servidor não conseguiu provar que é <ph name="DOMAIN" />. O certificado de segurança dele expirou há # dias. Isso pode ser causado por uma configuração incorreta ou pela interceptação da sua conexão por um invasor. O relógio do seu computador está definido para <ph name="CURRENT_DATE" />. Essa data está correta? Se não estiver, corrija o relógio do sistema e depois atualize esta página.}other{Este servidor não conseguiu provar que é <ph name="DOMAIN" />. O certificado de segurança dele expirou há # dias. Isso pode ser causado por uma configuração incorreta ou pela interceptação da sua conexão por um invasor. O relógio do seu computador está definido para <ph name="CURRENT_DATE" />. Essa data está correta? Se não estiver, corrija o relógio do sistema e depois atualize esta página.}}</translation> <translation id="1656489000284462475">Retirada</translation> +<translation id="1662550410081243962">Salvar e preencher as formas de pagamento</translation> <translation id="1663943134801823270">Os cartões e os endereços vieram do Chrome. É possível gerenciar essas opções em <ph name="BEGIN_LINK" />Configurações<ph name="END_LINK" />.</translation> <translation id="1676269943528358898">O site <ph name="SITE" /> geralmente usa criptografia para proteger suas informações. Quando o Google Chrome tentou se conectar a <ph name="SITE" /> dessa vez, o website retornou credenciais incomuns e incorretas. Isso pode acontecer quando um invasor está fingindo ser <ph name="SITE" /> ou quando uma tela de login por Wi-Fi interrompeu a conexão. Suas informações ainda estão protegidas, porque o Google Chrome interrompeu a conexão antes que os dados fossem trocados.</translation> <translation id="168841957122794586">O certificado do servidor contém uma chave de criptografia fraca.</translation> +<translation id="1697532407822776718">Pronto.</translation> <translation id="1706954506755087368">{1,plural, =1{Este servidor não conseguiu provar que é <ph name="DOMAIN" />. O certificado de segurança dele está com a data de amanhã. Isso pode ser causado por uma configuração incorreta ou pela interceptação da sua conexão por um invasor.}one{Este servidor não conseguiu provar que é <ph name="DOMAIN" />. O certificado de segurança dele está com uma data de # dias depois de hoje. Isso pode ser causado por uma configuração incorreta ou pela interceptação da sua conexão por um invasor.}other{Este servidor não conseguiu provar que é <ph name="DOMAIN" />. O certificado de segurança dele está com uma data de # dias depois de hoje. Isso pode ser causado por uma configuração incorreta ou pela interceptação da sua conexão por um invasor.}}</translation> <translation id="1710259589646384581">SO</translation> <translation id="1721312023322545264">É necessário pedir a permissão de <ph name="NAME" /> para visitar este site</translation> @@ -193,6 +196,7 @@ <translation id="225207911366869382">Este valor está obsoleto para esta política.</translation> <translation id="2262243747453050782">Erro HTTP</translation> <translation id="2270484714375784793">Número do telefone</translation> +<translation id="2283340219607151381">Salvar e preencher endereços</translation> <translation id="2292556288342944218">O seu acesso à Internet está bloqueado</translation> <translation id="2316887270356262533">Libera menos de 1 MB. O carregamento de alguns sites pode ficar mais lento no seu próximo acesso.</translation> <translation id="2317259163369394535"><ph name="DOMAIN" /> exige um nome de usuário e uma senha.</translation> @@ -274,6 +278,7 @@ <translation id="2851634818064021665">Você precisa de permissão para visitar este site</translation> <translation id="2856444702002559011">Invasores podem estar tentando roubar suas informações de <ph name="BEGIN_BOLD" /><ph name="SITE" /><ph name="END_BOLD" /> (por exemplo, senhas, mensagens ou cartões de crédito). <ph name="BEGIN_LEARN_MORE_LINK" />Saiba mais<ph name="END_LEARN_MORE_LINK" /></translation> <translation id="2881276955470682203">Salvar cartão?</translation> +<translation id="2903493209154104877">Endereços</translation> <translation id="2909946352844186028">Foi detectada uma alteração na rede.</translation> <translation id="2916038427272391327">Fechar outros programas</translation> <translation id="2922350208395188000">O certificado do servidor não pode ser verificado.</translation> @@ -1148,6 +1153,7 @@ <translation id="973773823069644502">Adicionar endereço de entrega</translation> <translation id="975560348586398090">{COUNT,plural, =0{Nenhum}=1{1 item}one{# item}other{# itens}}</translation> <translation id="981121421437150478">Off-line</translation> +<translation id="984275831282074731">Formas de pagamento</translation> <translation id="985199708454569384"><p>Esse erro será exibido se a data e a hora do computador ou dispositivo móvel estiverem incorretas.</p> <p>Para corrigir o erro, abra o relógio do dispositivo e verifique se a hora e a data estão corretas.</p></translation> <translation id="988159990683914416">Versão do desenvolvedor</translation>
diff --git a/components/strings/components_strings_pt-PT.xtb b/components/strings/components_strings_pt-PT.xtb index ca1f3f6e..1370b47 100644 --- a/components/strings/components_strings_pt-PT.xtb +++ b/components/strings/components_strings_pt-PT.xtb
@@ -63,6 +63,7 @@ <translation id="129863573139666797"><ph name="BEGIN_LINK" />Experimente limpar os cookies<ph name="END_LINK" /></translation> <translation id="1314614906530272393">A sessão selecionada não existe.</translation> <translation id="1323433172918577554">Mostrar mais</translation> +<translation id="132390688737681464">Guardar e preencher endereços</translation> <translation id="1333989956347591814">A sua atividade <ph name="BEGIN_EMPHASIS" />poderá continuar visível<ph name="END_EMPHASIS" /> para: <ph name="BEGIN_LIST" /> <ph name="LIST_ITEM" />Os Sites que visita @@ -110,9 +111,11 @@ <translation id="1645368109819982629">Protocolo não suportado</translation> <translation id="1655462015569774233">{1,plural, =1{Este servidor não conseguiu provar que é <ph name="DOMAIN" />; o seu certificado de segurança expirou ontem. Isto pode ser o resultado de uma configuração incorreta ou de um invasor a intercetar a sua ligação. O relógio do seu computador está atualmente configurado para <ph name="CURRENT_DATE" />. Será que isso está correto? Em caso negativo, deve corrigir o relógio do seu sistema e depois atualizar esta página.}other{Este servidor não conseguiu provar que é <ph name="DOMAIN" />; o seu certificado de segurança expirou há # dias. Isto pode ser o resultado de uma configuração incorreta ou de um invasor a intercetar a sua ligação. O relógio do seu computador está atualmente configurado para <ph name="CURRENT_DATE" />. Será que isso está correto? Em caso negativo, deve corrigir o relógio do seu sistema e depois atualizar esta página.}}</translation> <translation id="1656489000284462475">Recolha</translation> +<translation id="1662550410081243962">Guardar e preencher métodos de pagamento</translation> <translation id="1663943134801823270">Os cartões e os endereços são provenientes do Chrome. Pode geri-los nas <ph name="BEGIN_LINK" />Definições<ph name="END_LINK" />.</translation> <translation id="1676269943528358898">Normalmente, o site <ph name="SITE" /> utiliza a encriptação para proteger as suas informações. Quando o Google Chrome tentou estabelecer ligação a <ph name="SITE" /> desta vez, o Website devolveu credenciais invulgares e incorretas. Isto pode acontecer quando um utilizador mal intencionado tenta simular ser <ph name="SITE" /> ou quando um ecrã de início de sessão Wi-Fi interrompe a ligação. As suas informações continuam seguras porque o Google Chrome interrompeu a ligação antes de qualquer troca de dados.</translation> <translation id="168841957122794586">O certificado do servidor contém uma chave criptográfica fraca.</translation> +<translation id="1697532407822776718">O processo está concluído!</translation> <translation id="1706954506755087368">{1,plural, =1{Este servidor não conseguiu provar que é <ph name="DOMAIN" />; o seu certificado de segurança é supostamente de amanhã. Isto pode ser o resultado de uma configuração incorreta ou de um invasor a intercetar a sua ligação.}other{Este servidor não conseguiu provar que é <ph name="DOMAIN" />; a data do seu certificado de segurança é supostamente daqui a # dias. Isto pode ser o resultado de uma configuração incorreta ou de um invasor a intercetar a sua ligação.}}</translation> <translation id="1710259589646384581">SO</translation> <translation id="1721312023322545264">Precisa da autorização de <ph name="NAME" /> para visitar este site</translation> @@ -193,6 +196,7 @@ <translation id="225207911366869382">Este valor está desatualizado para esta política.</translation> <translation id="2262243747453050782">Erro HTTP</translation> <translation id="2270484714375784793">Número de telefone</translation> +<translation id="2283340219607151381">Guardar e preencher endereços</translation> <translation id="2292556288342944218">O acesso à Internet está bloqueado</translation> <translation id="2316887270356262533">Liberta menos de 1 MB. É possível que alguns sites sejam carregados mais lentamente na sua próxima visita.</translation> <translation id="2317259163369394535">O domínio <ph name="DOMAIN" /> requer um nome de utilizador e uma palavra-passe.</translation> @@ -274,6 +278,7 @@ <translation id="2851634818064021665">Necessita de autorização para aceder a este site</translation> <translation id="2856444702002559011">Os atacantes poderão estar a tentar roubar as suas informações de <ph name="BEGIN_BOLD" /><ph name="SITE" /><ph name="END_BOLD" /> (por exemplo, palavras-passe, mensagens ou cartões de crédito). <ph name="BEGIN_LEARN_MORE_LINK" />Saiba mais<ph name="END_LEARN_MORE_LINK" /></translation> <translation id="2881276955470682203">Pretende guardar o cartão?</translation> +<translation id="2903493209154104877">Endereços</translation> <translation id="2909946352844186028">Foi detetada uma alteração de rede.</translation> <translation id="2916038427272391327">Fechar outros programas</translation> <translation id="2922350208395188000">Não é possível verificar o certificado do servidor.</translation> @@ -1146,6 +1151,7 @@ <translation id="973773823069644502">Adicionar endereço de entrega</translation> <translation id="975560348586398090">{COUNT,plural, =0{Nenhum}=1{1 item}other{# itens}}</translation> <translation id="981121421437150478">Offline</translation> +<translation id="984275831282074731">Métodos de pagamento</translation> <translation id="985199708454569384"><p>Este erro é apresentado se a data e a hora do computador ou do dispositivo móvel estiverem erradas.</p> <p>Para corrigir o erro, aceda ao relógio do dispositivo. Certifique-se de que a data e a hora estão corretas.</p></translation> <translation id="988159990683914416">Compilação de programador</translation>
diff --git a/components/strings/components_strings_ro.xtb b/components/strings/components_strings_ro.xtb index 28fcfba..8c326d3 100644 --- a/components/strings/components_strings_ro.xtb +++ b/components/strings/components_strings_ro.xtb
@@ -63,6 +63,7 @@ <translation id="129863573139666797"><ph name="BEGIN_LINK" />Șterge cookie-urile<ph name="END_LINK" /></translation> <translation id="1314614906530272393">Sesiunea selectată nu există.</translation> <translation id="1323433172918577554">Afișează mai multe</translation> +<translation id="132390688737681464">Salvează și completează adresele</translation> <translation id="1333989956347591814">Este posibil ca activitatea ta <ph name="BEGIN_EMPHASIS" />să fie în continuare vizibilă<ph name="END_EMPHASIS" /> pentru: <ph name="BEGIN_LIST" /> <ph name="LIST_ITEM" />site-urile pe care le accesezi; @@ -110,9 +111,11 @@ <translation id="1645368109819982629">Protocol neacceptat</translation> <translation id="1655462015569774233">{1,plural, =1{Acest server nu a putut dovedi că este <ph name="DOMAIN" />. Certificatul său de securitate a expirat ieri. Cauza poate fi o eroare de configurare sau interceptarea conexiunii de către un atacator. În prezent, ora computerului este setată la <ph name="CURRENT_DATE" />. Este corect? Dacă nu este, corectează ora sistemului și actualizează pagina.}few{Acest server nu a putut dovedi că este <ph name="DOMAIN" />. Certificatul său de securitate a expirat acum # zile. Cauza poate fi o eroare de configurare sau interceptarea conexiunii de către un atacator. În prezent, ora computerului este setată la <ph name="CURRENT_DATE" />. Este corect? Dacă nu este, corectează ora sistemului și actualizează pagina.}other{Acest server nu a putut dovedi că este <ph name="DOMAIN" />. Certificatul său de securitate a expirat acum # de zile. Cauza poate fi o eroare de configurare sau interceptarea conexiunii de către un atacator. În prezent, ora computerului este setată la <ph name="CURRENT_DATE" />. Este corect? Dacă nu este, corectează ora sistemului și actualizează pagina.}}</translation> <translation id="1656489000284462475">Preluare</translation> +<translation id="1662550410081243962">Salvează și completează metodele de plată</translation> <translation id="1663943134801823270">Cardurile și adresele sunt din Chrome. Le poți gestiona în <ph name="BEGIN_LINK" />Setări<ph name="END_LINK" />.</translation> <translation id="1676269943528358898">Site-ul <ph name="SITE" /> folosește în mod obișnuit criptarea pentru a-ți proteja informațiile. Când Google Chrome a încercat să se conecteze la <ph name="SITE" /> de această dată, site-ul a returnat date de conectare neobișnuite și incorecte. Acest lucru s-a întâmplat fie pentru că un atacator încearcă să falsifice site-ul <ph name="SITE" />, fie pentru că un ecran de conectare Wi-Fi a întrerupt conexiunea. Securitatea informațiilor tale nu a fost afectată, deoarece Google Chrome a oprit conexiunea înainte ca datele să fie transferate.</translation> <translation id="168841957122794586">Certificatul de server conține o cheie criptografică slabă.</translation> +<translation id="1697532407822776718">Ești gata!</translation> <translation id="1706954506755087368">{1,plural, =1{Acest server nu a putut dovedi că este <ph name="DOMAIN" />. Data de emitere a certificatului său de securitate este mâine. Cauza poate fi o eroare de configurare sau interceptarea conexiunii de către un atacator.}few{Acest server nu a putut dovedi că este <ph name="DOMAIN" />. Data de emitere a certificatului său de securitate este în viitor, peste # zile. Cauza poate fi o eroare de configurare sau interceptarea conexiunii de către un atacator.}other{Acest server nu a putut dovedi că este <ph name="DOMAIN" />. Data de emitere a certificatului său de securitate este în viitor, peste # de zile. Cauza poate fi o eroare de configurare sau interceptarea conexiunii de către un atacator.}}</translation> <translation id="1710259589646384581">Sistem de operare</translation> <translation id="1721312023322545264">Ai nevoie de permisiunea utilizatorului <ph name="NAME" /> ca să accesezi acest site</translation> @@ -193,6 +196,7 @@ <translation id="225207911366869382">Valoarea este învechită pentru această politică.</translation> <translation id="2262243747453050782">Eroare HTTP</translation> <translation id="2270484714375784793">Număr telefon</translation> +<translation id="2283340219607151381">Salvează și completează adresele</translation> <translation id="2292556288342944218">Accesul la internet este blocat</translation> <translation id="2316887270356262533">Eliberează mai puțin de 1 MB. Este posibil ca unele site-uri să se încarce mai lent la următoarea accesare.</translation> <translation id="2317259163369394535"><ph name="DOMAIN" /> necesită un nume de utilizator și o parolă.</translation> @@ -274,6 +278,7 @@ <translation id="2851634818064021665">Ai nevoie de permisiune ca să accesezi acest site</translation> <translation id="2856444702002559011">Atacatorii pot încerca să îți fure informațiile de pe <ph name="BEGIN_BOLD" /><ph name="SITE" /><ph name="END_BOLD" /> (de exemplu, parole, mesaje sau date despre cardurile de credit). <ph name="BEGIN_LEARN_MORE_LINK" />Află mai multe<ph name="END_LEARN_MORE_LINK" /></translation> <translation id="2881276955470682203">Salvezi cardul?</translation> +<translation id="2903493209154104877">Adrese</translation> <translation id="2909946352844186028">A fost detectată o schimbare a rețelei.</translation> <translation id="2916038427272391327">închide celelalte programe;</translation> <translation id="2922350208395188000">Certificatul serverului nu poate fi verificat.</translation> @@ -1147,6 +1152,7 @@ <translation id="973773823069644502">Adaugă o adresă de livrare</translation> <translation id="975560348586398090">{COUNT,plural, =0{Niciunul}=1{1 element}few{# elemente}other{# de elemente}}</translation> <translation id="981121421437150478">Offline</translation> +<translation id="984275831282074731">Metode de plată</translation> <translation id="985199708454569384"><p>Această eroare se va afișa dacă data și ora de pe computer sau de pe dispozitivul mobil sunt inexacte.</p> <p>Pentru a remedia eroarea, deschide ceasul dispozitivului. Asigură-te că data și ora sunt corecte.</p></translation> <translation id="988159990683914416">Versiune de programare</translation>
diff --git a/components/strings/components_strings_ru.xtb b/components/strings/components_strings_ru.xtb index 03f16243..3dacd3e 100644 --- a/components/strings/components_strings_ru.xtb +++ b/components/strings/components_strings_ru.xtb
@@ -63,6 +63,7 @@ <translation id="129863573139666797"><ph name="BEGIN_LINK" />Удалите файлы cookie<ph name="END_LINK" />.</translation> <translation id="1314614906530272393">Выбранный сеанс не существует.</translation> <translation id="1323433172918577554">Развернуть</translation> +<translation id="132390688737681464">Сохранять и автоматически подставлять адреса</translation> <translation id="1333989956347591814">Ваши действия <ph name="BEGIN_EMPHASIS" />будут видны<ph name="END_EMPHASIS" />: <ph name="BEGIN_LIST" /> <ph name="LIST_ITEM" />сайтам, которые вы посещаете; @@ -110,9 +111,11 @@ <translation id="1645368109819982629">Неподдерживаемый протокол</translation> <translation id="1655462015569774233">{1,plural, =1{Не удалось подтвердить, что это сервер <ph name="DOMAIN" />. Срок действия его сертификата безопасности истек вчера. Возможно, сервер настроен неправильно или кто-то пытается перехватить ваши данные. Обратите внимание, что на компьютере установлено время <ph name="CURRENT_DATE" />. Если оно неправильное, измените его и обновите страницу.}one{Не удалось подтвердить, что это сервер <ph name="DOMAIN" />. Срок действия его сертификата безопасности истек # день назад. Возможно, сервер настроен неправильно или кто-то пытается перехватить ваши данные. Обратите внимание, что на компьютере установлено время <ph name="CURRENT_DATE" />. Если оно неправильное, измените его и обновите страницу.}few{Не удалось подтвердить, что это сервер <ph name="DOMAIN" />. Срок действия его сертификата безопасности истек # дня назад. Возможно, сервер настроен неправильно или кто-то пытается перехватить ваши данные. Обратите внимание, что на компьютере установлено время <ph name="CURRENT_DATE" />. Если оно неправильное, измените его и обновите страницу.}many{Не удалось подтвердить, что это сервер <ph name="DOMAIN" />. Срок действия его сертификата безопасности истек # дней назад. Возможно, сервер настроен неправильно или кто-то пытается перехватить ваши данные. Обратите внимание, что на компьютере установлено время <ph name="CURRENT_DATE" />. Если оно неправильное, измените его и обновите страницу.}other{Не удалось подтвердить, что это сервер <ph name="DOMAIN" />. Срок действия его сертификата безопасности истек # дня назад. Возможно, сервер настроен неправильно или кто-то пытается перехватить ваши данные. Обратите внимание, что на компьютере установлено время <ph name="CURRENT_DATE" />. Если оно неправильное, измените его и обновите страницу.}}</translation> <translation id="1656489000284462475">Получение</translation> +<translation id="1662550410081243962">Сохранять и автоматически подставлять платежные данные</translation> <translation id="1663943134801823270">Карты и адреса, указанные в Chrome. Вы можете изменить их на странице <ph name="BEGIN_LINK" />Настройки<ph name="END_LINK" />.</translation> <translation id="1676269943528358898">На сайте <ph name="SITE" /> для защиты ваших данных обычно используется шифрование. Однако учетные данные, которые мы получили от сайта <ph name="SITE" /> сейчас, отличаются от тех, которые он отправляет обычно. Вероятно, вредоносный сайт пытается выдать себя за <ph name="SITE" />, либо страница подключения к сети Wi-Fi прервала соединение. Ваша информация по-прежнему в безопасности, так как браузер Google Chrome разорвал соединение до того, как произошел обмен данными.</translation> <translation id="168841957122794586">Сертификат сервера содержит ненадежный криптографический ключ.</translation> +<translation id="1697532407822776718">Готово!</translation> <translation id="1706954506755087368">{1,plural, =1{Не удалось подтвердить, что это сервер <ph name="DOMAIN" />. Его сертификат безопасности вступит в силу завтра. Возможно, сервер настроен неправильно или кто-то пытается перехватить ваши данные.}one{Не удалось подтвердить, что это сервер <ph name="DOMAIN" />. Его сертификат безопасности вступит в силу через # день. Возможно, сервер настроен неправильно или кто-то пытается перехватить ваши данные.}few{Не удалось подтвердить, что это сервер <ph name="DOMAIN" />. Его сертификат безопасности вступит в силу через # дня. Возможно, сервер настроен неправильно или кто-то пытается перехватить ваши данные.}many{Не удалось подтвердить, что это сервер <ph name="DOMAIN" />. Его сертификат безопасности вступит в силу через # дней. Возможно, сервер настроен неправильно или кто-то пытается перехватить ваши данные.}other{Не удалось подтвердить, что это сервер <ph name="DOMAIN" />. Его сертификат безопасности вступит в силу через # дня. Возможно, сервер настроен неправильно или кто-то пытается перехватить ваши данные.}}</translation> <translation id="1710259589646384581">ОС</translation> <translation id="1721312023322545264">Для доступа к этой странице требуется разрешение пользователя <ph name="NAME" /></translation> @@ -193,6 +196,7 @@ <translation id="225207911366869382">Это значение для данного правила больше не используется.</translation> <translation id="2262243747453050782">Ошибка HTTP</translation> <translation id="2270484714375784793">Номер телефона</translation> +<translation id="2283340219607151381">Сохранять и автоматически подставлять адреса</translation> <translation id="2292556288342944218">Доступ в Интернет закрыт</translation> <translation id="2316887270356262533">Освободится менее 1 МБ пространства. После этого некоторые веб-страницы могут загружаться дольше обычного.</translation> <translation id="2317259163369394535">Для доступа к домену <ph name="DOMAIN" /> необходимо указать имя пользователя и пароль.</translation> @@ -274,6 +278,7 @@ <translation id="2851634818064021665">Для доступа к этой странице требуется разрешение.</translation> <translation id="2856444702002559011">Злоумышленники могут пытаться похитить ваши данные с сайта <ph name="BEGIN_BOLD" /><ph name="SITE" /><ph name="END_BOLD" /> (например, пароли, сообщения или номера банковских карт). <ph name="BEGIN_LEARN_MORE_LINK" />Подробнее…<ph name="END_LEARN_MORE_LINK" /></translation> <translation id="2881276955470682203">Сохранить карту?</translation> +<translation id="2903493209154104877">Адреса</translation> <translation id="2909946352844186028">Похоже, вы подключились к другой сети.</translation> <translation id="2916038427272391327">Закройте другие программы.</translation> <translation id="2922350208395188000">Не удается проверить сертификат сервера.</translation> @@ -1145,6 +1150,7 @@ <translation id="973773823069644502">Добавить адрес доставки</translation> <translation id="975560348586398090">{COUNT,plural, =0{Нет}=1{1 запись}one{# запись}few{# записи}many{# записей}other{# записи}}</translation> <translation id="981121421437150478">Офлайн</translation> +<translation id="984275831282074731">Способы оплаты</translation> <translation id="985199708454569384"><p>Эта ошибка возникает, если дата и время на компьютере или мобильном устройстве установлены неправильно.</p> <p>Чтобы устранить проблему, откройте настройки системных часов и установите правильные параметры.</p></translation> <translation id="988159990683914416">Сборка для разработчиков</translation>
diff --git a/components/strings/components_strings_sk.xtb b/components/strings/components_strings_sk.xtb index 98d90ad8..be7ee0383 100644 --- a/components/strings/components_strings_sk.xtb +++ b/components/strings/components_strings_sk.xtb
@@ -63,6 +63,7 @@ <translation id="129863573139666797"><ph name="BEGIN_LINK" />Skúste vymazať súbory cookie<ph name="END_LINK" /></translation> <translation id="1314614906530272393">Vybraná relácia neexistuje.</translation> <translation id="1323433172918577554">Zobraziť viac</translation> +<translation id="132390688737681464">Ukladať a dopĺňať adresy</translation> <translation id="1333989956347591814">Vašu aktivitu <ph name="BEGIN_EMPHASIS" />stále môžu vidieť<ph name="END_EMPHASIS" />: <ph name="BEGIN_LIST" /> <ph name="LIST_ITEM" />navštívené weby @@ -110,9 +111,11 @@ <translation id="1645368109819982629">Nepodporovaný protokol</translation> <translation id="1655462015569774233">{1,plural, =1{Tomuto serveru sa nepodarilo dokázať, že ide o doménu <ph name="DOMAIN" />; platnosť jej bezpečnostného certifikátu vypršala včera. Môže to byť následok nesprávnej konfigurácie alebo napadnutia vášho pripojenia útočníkom. Hodiny vášho počítača sú momentálne nastavené na <ph name="CURRENT_DATE" />. Je tento čas správny? Ak nie, opravte čas na hodinách systému a potom obnovte túto stránku.}few{Tomuto serveru sa nepodarilo dokázať, že ide o doménu <ph name="DOMAIN" />; platnosť jej bezpečnostného certifikátu vypršala pred # dňami. Môže to byť následok nesprávnej konfigurácie alebo napadnutia vášho pripojenia útočníkom. Hodiny vášho počítača sú momentálne nastavené na <ph name="CURRENT_DATE" />. Je tento čas správny? Ak nie, opravte čas na hodinách systému a potom obnovte túto stránku.}many{Tomuto serveru sa nepodarilo dokázať, že ide o doménu <ph name="DOMAIN" />; platnosť jej bezpečnostného certifikátu vypršala pred # dňom. Môže to byť následok nesprávnej konfigurácie alebo napadnutia vášho pripojenia útočníkom. Hodiny vášho počítača sú momentálne nastavené na <ph name="CURRENT_DATE" />. Je tento čas správny? Ak nie, opravte čas na hodinách systému a potom obnovte túto stránku.}other{Tomuto serveru sa nepodarilo dokázať, že ide o doménu <ph name="DOMAIN" />; platnosť jej bezpečnostného certifikátu vypršala pred # dňami. Môže to byť následok nesprávnej konfigurácie alebo napadnutia vášho pripojenia útočníkom. Hodiny vášho počítača sú momentálne nastavené na <ph name="CURRENT_DATE" />. Je tento čas správny? Ak nie, opravte čas na hodinách systému a potom obnovte túto stránku.}}</translation> <translation id="1656489000284462475">Vyzdvihnutie</translation> +<translation id="1662550410081243962">Ukladať a dopĺňať spôsoby platby</translation> <translation id="1663943134801823270">Karty a adresy pochádzajú z Chromu. Môžete ich spravovať v <ph name="BEGIN_LINK" />Nastaveniach<ph name="END_LINK" />.</translation> <translation id="1676269943528358898">Web <ph name="SITE" /> zvyčajne chráni vaše informácie pomocou šifrovania. Keď sa Chrome tentokrát pokúsil pripojiť k webu <ph name="SITE" />, odoslal späť nezvyčajné a nesprávne poverenia. Môže sa to stať vtedy, keď sa za web <ph name="SITE" /> snaží vydávať útočník alebo keď pripojenie preruší prihlasovacia obrazovka siete Wi‑Fi. Vaše informácie sú stále zabezpečené, pretože Chrome zastavil pripojenie ešte pred výmenou dát.</translation> <translation id="168841957122794586">Certifikát servera obsahuje slabý kryptografický kľúč.</translation> +<translation id="1697532407822776718">Všetko je nastavené!</translation> <translation id="1706954506755087368">{1,plural, =1{Tomuto serveru sa nepodarilo dokázať, že ide o doménu <ph name="DOMAIN" />; jej certifikát by mal začať platiť od zajtra. Môže to byť následok nesprávnej konfigurácie alebo napadnutia vášho pripojenia útočníkom.}few{Tomuto serveru sa nepodarilo dokázať, že ide o doménu <ph name="DOMAIN" />; jej certifikát by mal začať platiť o # dni. Môže to byť následok nesprávnej konfigurácie alebo napadnutia vášho pripojenia útočníkom.}many{Tomuto serveru sa nepodarilo dokázať, že ide o doménu <ph name="DOMAIN" />; jej certifikát by mal začať platiť o # dňa. Môže to byť následok nesprávnej konfigurácie alebo napadnutia vášho pripojenia útočníkom.}other{Tomuto serveru sa nepodarilo dokázať, že ide o doménu <ph name="DOMAIN" />; jej certifikát by mal začať platiť o # dní. Môže to byť následok nesprávnej konfigurácie alebo napadnutia vášho pripojenia útočníkom.}}</translation> <translation id="1710259589646384581">OS</translation> <translation id="1721312023322545264">Ak chcete navštíviť tento web, potrebujete povolenie od správcu <ph name="NAME" /></translation> @@ -193,6 +196,7 @@ <translation id="225207911366869382">Táto hodnota už pre toto pravidlo nie je podporovaná.</translation> <translation id="2262243747453050782">Chyba protokolu HTTP</translation> <translation id="2270484714375784793">Telefónne číslo</translation> +<translation id="2283340219607151381">Ukladať a dopĺňať adresy</translation> <translation id="2292556288342944218">Váš prístup k internetu je blokovaný</translation> <translation id="2316887270356262533">Uvoľní menej ako 1 MB. Niektoré weby sa môžu pri ďalšej návšteve načítať pomalšie.</translation> <translation id="2317259163369394535">Doména <ph name="DOMAIN" /> vyžaduje používateľské meno a heslo.</translation> @@ -274,6 +278,7 @@ <translation id="2851634818064021665">Na návštevu tohto webu potrebujete povolenie</translation> <translation id="2856444702002559011">Útočníci sa môžu pokúsiť ukradnúť vaše informácie z webu <ph name="BEGIN_BOLD" /><ph name="SITE" /><ph name="END_BOLD" /> (napríklad heslá, správy alebo kreditné karty). <ph name="BEGIN_LEARN_MORE_LINK" />Ďalšie informácie<ph name="END_LEARN_MORE_LINK" /></translation> <translation id="2881276955470682203">Uložiť kartu?</translation> +<translation id="2903493209154104877">Adresy</translation> <translation id="2909946352844186028">Zistila sa zmena siete.</translation> <translation id="2916038427272391327">Zavrite ostatné programy</translation> <translation id="2922350208395188000">Certifikát servera sa nedá overiť.</translation> @@ -1142,6 +1147,7 @@ <translation id="973773823069644502">Pridať adresu doručenia</translation> <translation id="975560348586398090">{COUNT,plural, =0{Žiadne}=1{1 položka}few{# položky}many{# položky}other{# položiek}}</translation> <translation id="981121421437150478">Offline</translation> +<translation id="984275831282074731">Spôsoby platby</translation> <translation id="985199708454569384"><p>Táto chyba sa zobrazí, keď máte v počítači alebo mobilnom zariadení nesprávny dátum a čas.</p> <p>Ak chcete túto chybu odstrániť, otvorte v zariadení hodiny a nastavte správny dátum a čas.</p></translation> <translation id="988159990683914416">Zostavenie pre vývojárov</translation>
diff --git a/components/strings/components_strings_sl.xtb b/components/strings/components_strings_sl.xtb index 326f124c..3fc9b86 100644 --- a/components/strings/components_strings_sl.xtb +++ b/components/strings/components_strings_sl.xtb
@@ -63,6 +63,7 @@ <translation id="129863573139666797"><ph name="BEGIN_LINK" />Poskusite izbrisati piškotke<ph name="END_LINK" /></translation> <translation id="1314614906530272393">Izbrana seja ne obstaja.</translation> <translation id="1323433172918577554">Pokaži več</translation> +<translation id="132390688737681464">Shranjevanje in izpolnjevanje naslovov</translation> <translation id="1333989956347591814">Vaša dejavnost <ph name="BEGIN_EMPHASIS" />je morda še vedno vidna<ph name="END_EMPHASIS" />: <ph name="BEGIN_LIST" /> <ph name="LIST_ITEM" />spletnim mestom, ki jih obiščete, @@ -110,9 +111,11 @@ <translation id="1645368109819982629">Nepodprt protokol</translation> <translation id="1655462015569774233">{1,plural, =1{Strežniku ni uspelo dokazati, da je domena <ph name="DOMAIN" />; njegovo varnostno potrdilo je poteklo včeraj. Razlog za to je lahko napačna konfiguracija ali napadalčevo prestrezanje povezave. Ura vašega računalnika je trenutno nastavljena na <ph name="CURRENT_DATE" />. Je to videti v redu? Če ni, pravilno nastavite sistemsko uro in nato osvežite stran.}one{Strežniku ni uspelo dokazati, da je domena <ph name="DOMAIN" />; njegovo varnostno potrdilo je poteklo pred # dnevom. Razlog za to je lahko napačna konfiguracija ali napadalčevo prestrezanje povezave. Ura vašega računalnika je trenutno nastavljena na <ph name="CURRENT_DATE" />. Je to videti v redu? Če ni, pravilno nastavite sistemsko uro in nato osvežite stran.}two{Strežniku ni uspelo dokazati, da je domena <ph name="DOMAIN" />; njegovo varnostno potrdilo je poteklo pred # dnevoma. Razlog za to je lahko napačna konfiguracija ali napadalčevo prestrezanje povezave. Ura vašega računalnika je trenutno nastavljena na <ph name="CURRENT_DATE" />. Je to videti v redu? Če ni, pravilno nastavite sistemsko uro in nato osvežite stran.}few{Strežniku ni uspelo dokazati, da je domena <ph name="DOMAIN" />; njegovo varnostno potrdilo je poteklo pred # dnevi. Razlog za to je lahko napačna konfiguracija ali napadalčevo prestrezanje povezave. Ura vašega računalnika je trenutno nastavljena na <ph name="CURRENT_DATE" />. Je to videti v redu? Če ni, pravilno nastavite sistemsko uro in nato osvežite stran.}other{Strežniku ni uspelo dokazati, da je domena <ph name="DOMAIN" />; njegovo varnostno potrdilo je poteklo pred # dnevi. Razlog za to je lahko napačna konfiguracija ali napadalčevo prestrezanje povezave. Ura vašega računalnika je trenutno nastavljena na <ph name="CURRENT_DATE" />. Je to videti v redu? Če ni, pravilno nastavite sistemsko uro in nato osvežite stran.}}</translation> <translation id="1656489000284462475">Prevzem</translation> +<translation id="1662550410081243962">Shranjevanje in izpolnjevanje plačilnih sredstev</translation> <translation id="1663943134801823270">Kartice in naslovi so iz Chroma. Upravljate jih lahko v <ph name="BEGIN_LINK" />nastavitvah<ph name="END_LINK" />.</translation> <translation id="1676269943528358898">Spletno mesto <ph name="SITE" /> za zaščito vaših podatkov običajno uporablja šifriranje. Ko se je Google Chrome tokrat poskusil povezati s spletnim mestom <ph name="SITE" />, je to vrnilo nenavadne in nepravilne poverilnice. Do tega lahko pride, če se napadalec lažno predstavlja za spletno mesto <ph name="SITE" /> ali če je povezavo prekinil zaslon za prijavo v omrežje Wi-Fi. Vaši podatki so še vedno varni, saj je Google Chrome pred izmenjavo podatkov prekinil povezavo.</translation> <translation id="168841957122794586">Potrdilo strežnika vsebuje šibek šifrirni ključ.</translation> +<translation id="1697532407822776718">Pripravljeni ste.</translation> <translation id="1706954506755087368">{1,plural, =1{Strežniku ni uspelo dokazati, da je domena <ph name="DOMAIN" />; njegovo varnostno potrdilo naj bi imelo jutrišnji datum. Razlog za to je lahko napačna konfiguracija ali napadalčevo prestrezanje povezave.}one{Strežniku ni uspelo dokazati, da je domena <ph name="DOMAIN" />; njegovo varnostno potrdilo naj bi imelo datum v prihodnosti – # dan od danes. Razlog za to je lahko napačna konfiguracija ali napadalčevo prestrezanje povezave.}two{Strežniku ni uspelo dokazati, da je domena <ph name="DOMAIN" />; njegovo varnostno potrdilo naj bi imelo datum v prihodnosti – # dneva od danes. Razlog za to je lahko napačna konfiguracija ali napadalčevo prestrezanje povezave.}few{Strežniku ni uspelo dokazati, da je domena <ph name="DOMAIN" />; njegovo varnostno potrdilo naj bi imelo datum v prihodnosti – # dni od danes. Razlog za to je lahko napačna konfiguracija ali napadalčevo prestrezanje povezave.}other{Strežniku ni uspelo dokazati, dokazati, da je domena <ph name="DOMAIN" />; njegovo varnostno potrdilo naj bi imelo datum v prihodnosti – # dni od danes. Razlog za to je lahko napačna konfiguracija ali napadalčevo prestrezanje povezave.}}</translation> <translation id="1710259589646384581">Operacijski sistem</translation> <translation id="1721312023322545264"><ph name="NAME" /> vam mora odobriti obisk tega spletnega mesta</translation> @@ -193,6 +196,7 @@ <translation id="225207911366869382">Vrednost za ta pravilnik je zastarela.</translation> <translation id="2262243747453050782">Napaka HTTP</translation> <translation id="2270484714375784793">Telefonska številka</translation> +<translation id="2283340219607151381">Shranjevanje in izpolnjevanje naslovov</translation> <translation id="2292556288342944218">Internetni dostop je blokiran</translation> <translation id="2316887270356262533">Sprosti manj kot 1 MB. Nekatera spletna mesta se bodo ob naslednjem obisku morda počasneje naložila.</translation> <translation id="2317259163369394535">Domena <ph name="DOMAIN" /> zahteva uporabniško ime in geslo.</translation> @@ -274,6 +278,7 @@ <translation id="2851634818064021665">Za obisk tega spletnega mesta potrebujete dovoljenje</translation> <translation id="2856444702002559011">Morda poskušajo napadalci ukrasti vaše podatke s spletnega mesta <ph name="BEGIN_BOLD" /><ph name="SITE" /><ph name="END_BOLD" /> (na primer gesla, sporočila ali podatke kreditnih kartic). <ph name="BEGIN_LEARN_MORE_LINK" />Več o tem<ph name="END_LEARN_MORE_LINK" /></translation> <translation id="2881276955470682203">Želite shraniti kartico?</translation> +<translation id="2903493209154104877">Naslovi</translation> <translation id="2909946352844186028">Zaznana je bila sprememba omrežja.</translation> <translation id="2916038427272391327">Zaprite druge programe</translation> <translation id="2922350208395188000">Potrdila strežnika ni mogoče preveriti.</translation> @@ -1146,6 +1151,7 @@ <translation id="973773823069644502">Dodajanje naslova za dostavo</translation> <translation id="975560348586398090">{COUNT,plural, =0{Brez}=1{1 element}one{# element}two{# elementa}few{# elementi}other{# elementov}}</translation> <translation id="981121421437150478">Brez povezave</translation> +<translation id="984275831282074731">Plačilna sredstva</translation> <translation id="985199708454569384"><p>Ta napaka se prikaže, če datum in ura v računalniku ali mobilni napravi nista točna.</p> <p>Napako odpravite tako, da v napravi odprete uro ter se prepričate, da sta ura in datum pravilna.</p></translation> <translation id="988159990683914416">Različica za razvijalce</translation>
diff --git a/components/strings/components_strings_sr.xtb b/components/strings/components_strings_sr.xtb index 650f6a6..1d8fcac 100644 --- a/components/strings/components_strings_sr.xtb +++ b/components/strings/components_strings_sr.xtb
@@ -63,6 +63,7 @@ <translation id="129863573139666797"><ph name="BEGIN_LINK" />Покушајте да обришете колачиће<ph name="END_LINK" /></translation> <translation id="1314614906530272393">Изабрана сесија не постоји.</translation> <translation id="1323433172918577554">Прикажи више</translation> +<translation id="132390688737681464">Чувај и уноси адресе</translation> <translation id="1333989956347591814">Активности ће <ph name="BEGIN_EMPHASIS" />можда ипак бити видљиве<ph name="END_EMPHASIS" /> за: <ph name="BEGIN_LIST" /> <ph name="LIST_ITEM" />веб-сајтове које посећујете @@ -110,9 +111,11 @@ <translation id="1645368109819982629">Неподржани протокол</translation> <translation id="1655462015569774233">{1,plural, =1{Овај сервер не може да докаже да је <ph name="DOMAIN" />; његов безбедносни сертификат је истекао јуче. Узрок томе је можда погрешна конфигурација или нападач који је прекинуо везу. Сат рачунара је тренутно подешен на <ph name="CURRENT_DATE" />. Да ли је то тачно? Ако није, требало би да исправите сат система и да затим освежите ову страницу.}one{Овај сервер не може да докаже да је <ph name="DOMAIN" />; његов безбедносни сертификат је истекао пре # дана. Узрок томе је можда погрешна конфигурација или нападач који је прекинуо везу. Сат рачунара је тренутно подешен на <ph name="CURRENT_DATE" />. Да ли је то тачно? Ако није, требало би да исправите сат система и да затим освежите ову страницу.}few{Овај сервер не може да докаже да је <ph name="DOMAIN" />; његов безбедносни сертификат је истекао пре # дана. Узрок томе је можда погрешна конфигурација или нападач који је прекинуо везу. Сат рачунара је тренутно подешен на <ph name="CURRENT_DATE" />. Да ли је то тачно? Ако није, требало би да исправите сат система и да затим освежите ову страницу.}other{Овај сервер не може да докаже да је <ph name="DOMAIN" />; његов безбедносни сертификат је истекао пре # дана. Узрок томе је можда погрешна конфигурација или нападач који је прекинуо везу. Сат рачунара је тренутно подешен на <ph name="CURRENT_DATE" />. Да ли је то тачно? Ако није, требало би да исправите сат система и да затим освежите ову страницу.}}</translation> <translation id="1656489000284462475">Преузимање</translation> +<translation id="1662550410081243962">Чувај и уноси начине плаћања</translation> <translation id="1663943134801823270">Картице и адресе су из Chrome-а. Њима можете да управљате у <ph name="BEGIN_LINK" />подешавањима<ph name="END_LINK" />.</translation> <translation id="1676269943528358898"><ph name="SITE" /> обично користи шифровање да би заштитио информације. Када је Google Chrome овог пута покушао да се повеже са <ph name="SITE" />, веб-сајт је вратио необичне и нетачне акредитиве. Или нападач покушава да се представи као <ph name="SITE" /> или је екран за Wi-Fi пријављивање прекинуо везу. Информације су и даље безбедне зато што је Google Chrome прекинуо везу пре него што су размењени било какви подаци.</translation> <translation id="168841957122794586">Сертификат сервера садржи слаб криптографски кључ.</translation> +<translation id="1697532407822776718">Спремни сте!</translation> <translation id="1706954506755087368">{1,plural, =1{Овај сервер не може да докаже да је <ph name="DOMAIN" />; датум његовог безбедносног сертификата је наводно сутрашњи. Узрок томе је можда погрешна конфигурација или нападач који је прекинуо везу.}one{Овај сервер не може да докаже да је <ph name="DOMAIN" />; његов безбедносни сертификат је наводно датиран у будућности (за # дан). Узрок томе је можда погрешна конфигурација или нападач који је прекинуо везу.}few{Овај сервер не може да докаже да је <ph name="DOMAIN" />; његов безбедносни сертификат је наводно датиран у будућности (за # дана). Узрок томе је можда погрешна конфигурација или нападач који је прекинуо везу.}other{Овај сервер не може да докаже да је <ph name="DOMAIN" />; његов безбедносни сертификат је наводно датиран у будућности (за # дана). Узрок томе је можда погрешна конфигурација или нападач који је прекинуо везу.}}</translation> <translation id="1710259589646384581">ОС</translation> <translation id="1721312023322545264">Потребна вам је дозвола корисника <ph name="NAME" /> да бисте посетили овај сајт</translation> @@ -193,6 +196,7 @@ <translation id="225207911366869382">Ова вредност је застарела за ове смернице.</translation> <translation id="2262243747453050782">HTTP грешка</translation> <translation id="2270484714375784793">Број телефона</translation> +<translation id="2283340219607151381">Чувај и уноси адресе</translation> <translation id="2292556288342944218">Приступ интернету је блокиран</translation> <translation id="2316887270356262533">Ослобађа мање од 1 MB. Неки сајтови ће се можда спорије учитавати кад их следећи пут посетите.</translation> <translation id="2317259163369394535"><ph name="DOMAIN" /> захтева корисничко име и лозинку.</translation> @@ -274,6 +278,7 @@ <translation id="2851634818064021665">Треба вам дозвола да бисте посетили овај сајт</translation> <translation id="2856444702002559011">Нападачи можда покушавају да украду информације са <ph name="BEGIN_BOLD" /><ph name="SITE" /><ph name="END_BOLD" /> (на пример, лозинке, поруке или кредитне картице). <ph name="BEGIN_LEARN_MORE_LINK" />Сазнајте више<ph name="END_LEARN_MORE_LINK" /></translation> <translation id="2881276955470682203">Желите ли да сачувате картицу?</translation> +<translation id="2903493209154104877">Адресе</translation> <translation id="2909946352844186028">Откривена је промена на мрежи.</translation> <translation id="2916038427272391327">Затворите друге програме</translation> <translation id="2922350208395188000">Није могуће проверити сертификат сервера.</translation> @@ -1146,6 +1151,7 @@ <translation id="973773823069644502">Додај адресу за доставу</translation> <translation id="975560348586398090">{COUNT,plural, =0{None}=1{1 ставка}one{# ставка}few{# ставке}other{# ставки}}</translation> <translation id="981121421437150478">Офлајн</translation> +<translation id="984275831282074731">Начини плаћања</translation> <translation id="985199708454569384"><p>Ова грешка се приказује ако датум и време на рачунару или мобилном уређају нису тачни.</p> <p>Да бисте отклонили грешку, отворите сат на уређају. Уверите се да су време и датум тачни.</p></translation> <translation id="988159990683914416">Верзија за програмере</translation>
diff --git a/components/strings/components_strings_sv.xtb b/components/strings/components_strings_sv.xtb index ab6f32c..3860969f 100644 --- a/components/strings/components_strings_sv.xtb +++ b/components/strings/components_strings_sv.xtb
@@ -63,6 +63,7 @@ <translation id="129863573139666797"><ph name="BEGIN_LINK" />Testa att rensa cookies<ph name="END_LINK" /></translation> <translation id="1314614906530272393">Den valda sessionen finns inte.</translation> <translation id="1323433172918577554">Visa fler</translation> +<translation id="132390688737681464">Spara och fyll i adresser</translation> <translation id="1333989956347591814">Din aktivitet <ph name="BEGIN_EMPHASIS" />kanske fortfarande är synlig<ph name="END_EMPHASIS" /> för: <ph name="BEGIN_LIST" /> <ph name="LIST_ITEM" />webbplatser som du besöker @@ -110,9 +111,11 @@ <translation id="1645368109819982629">Det finns inget stöd för protokollet</translation> <translation id="1655462015569774233">{1,plural, =1{Det gick inte att bevisa att serverns identitet är <ph name="DOMAIN" /> eftersom dess säkerhetscertifikat gick ut i går. Det kan bero på att servern är felkonfigurerad eller att anslutningen har blivit kapad. Dagens datum är <ph name="CURRENT_DATE" /> enligt datorklockan. Går den rätt? I annat fall bör du ställa om datorklockan och sedan uppdatera sidan.}other{Det gick inte att bevisa att serverns identitet är <ph name="DOMAIN" /> eftersom dess säkerhetscertifikat gick ut för # dagar sedan. Det kan bero på att servern är felkonfigurerad eller att anslutningen har blivit kapad. Dagens datum är <ph name="CURRENT_DATE" /> enligt datorklockan. Går den rätt? I annat fall bör du ställa om datorklockan och sedan uppdatera sidan.}}</translation> <translation id="1656489000284462475">Upphämtning</translation> +<translation id="1662550410081243962">Spara och fyll i betalningsmetoder</translation> <translation id="1663943134801823270">Kort och adresser har hämtats från Chrome. Du hanterar dessa under <ph name="BEGIN_LINK" />Inställningar<ph name="END_LINK" />.</translation> <translation id="1676269943528358898">På <ph name="SITE" /> används vanligtvis kryptering (SSL) för att skydda din information. När Chrome försökte ansluta till <ph name="SITE" /> den här gången skickade webbplatsen tillbaka ovanliga och felaktiga uppgifter. Sådant kan hända när en angripare utger sig för att vara <ph name="SITE" /> eller när anslutningen har avbrutits av en Wi-Fi-inloggningsskärm. Din information är fortfarande säker eftersom Chrome avbröt anslutningen innan någon data utbyttes.</translation> <translation id="168841957122794586">Servercertifikatet innehåller en svag kryptografisk nyckel.</translation> +<translation id="1697532407822776718">Färdigt!</translation> <translation id="1706954506755087368">{1,plural, =1{Det gick inte att bevisa att serverns identitet är <ph name="DOMAIN" /> eftersom dess säkerhetscertifikat uppges börja gälla i morgon. Det kan bero på att servern är felkonfigurerad eller att anslutningen har blivit kapad.}other{Det gick inte att bevisa att serverns identitet är <ph name="DOMAIN" /> eftersom dess säkerhetscertifikat uppges börja gälla om # dagar. Det kan bero på att servern är felkonfigurerad eller att anslutningen har blivit kapad.}}</translation> <translation id="1710259589646384581">OS</translation> <translation id="1721312023322545264">Du behöver tillstånd från <ph name="NAME" /> om du vill besöka den här webbplatsen</translation> @@ -193,6 +196,7 @@ <translation id="225207911366869382">Värdet är inte längre giltigt för policyn.</translation> <translation id="2262243747453050782">HTTP-fel</translation> <translation id="2270484714375784793">Telefonnummer</translation> +<translation id="2283340219607151381">Spara och fyll i adresser</translation> <translation id="2292556288342944218">Internetanslutningen har blockerats</translation> <translation id="2316887270356262533">Frigör mindre än 1 MB. Vissa webbplatser kan läsas in långsammare nästa gång du besöker dem.</translation> <translation id="2317259163369394535"><ph name="DOMAIN" /> kräver användarnamn och lösenord.</translation> @@ -274,6 +278,7 @@ <translation id="2851634818064021665">Du behöver tillstånd att besöka den här webbplatsen</translation> <translation id="2856444702002559011">En angripare kan försöka stjäla dina uppgifter från <ph name="BEGIN_BOLD" /><ph name="SITE" /><ph name="END_BOLD" /> (t.ex. lösenord, meddelanden eller kreditkortsuppgifter). <ph name="BEGIN_LEARN_MORE_LINK" />Läs mer<ph name="END_LEARN_MORE_LINK" /></translation> <translation id="2881276955470682203">Vill du spara kortet?</translation> +<translation id="2903493209154104877">Adresser</translation> <translation id="2909946352844186028">En nätverksförändring upptäcktes.</translation> <translation id="2916038427272391327">Stäng andra program</translation> <translation id="2922350208395188000">Servercertifikatet kan inte kontrolleras.</translation> @@ -1147,6 +1152,7 @@ <translation id="973773823069644502">Lägg till leveransadress</translation> <translation id="975560348586398090">{COUNT,plural, =0{Ingen}=1{1 objekt}other{# objekt}}</translation> <translation id="981121421437150478">Offline</translation> +<translation id="984275831282074731">Betalningsmetoder</translation> <translation id="985199708454569384"><p>Felet visas om klockan går fel eller fel datum är inställt på datorn eller den mobila enheten.</p> <p>Åtgärda felet genom att öppna klockan på enheten. Ställ in rätt tid och datum.</p></translation> <translation id="988159990683914416">Utvecklarversion</translation>
diff --git a/components/strings/components_strings_sw.xtb b/components/strings/components_strings_sw.xtb index f9a6acfb..1665aa7 100644 --- a/components/strings/components_strings_sw.xtb +++ b/components/strings/components_strings_sw.xtb
@@ -63,6 +63,7 @@ <translation id="129863573139666797"><ph name="BEGIN_LINK" />Jaribu kufuta vidakuzi kwenye kivinjari chako<ph name="END_LINK" /></translation> <translation id="1314614906530272393">Kipindi ulichochagua hakipo.</translation> <translation id="1323433172918577554">Onyesha Zaidi</translation> +<translation id="132390688737681464">Hifadhi na Ujaze Anwani</translation> <translation id="1333989956347591814">Huenda bado shughuli zako <ph name="BEGIN_EMPHASIS" />Zitaonwa<ph name="END_EMPHASIS" /> na: <ph name="BEGIN_LIST" /> <ph name="LIST_ITEM" />Tovuti utakazotembelea @@ -110,9 +111,11 @@ <translation id="1645368109819982629">Itifaki haitumiki</translation> <translation id="1655462015569774233">{1,plural, =1{Seva hii haikuweza kuthibitisha kuwa ni <ph name="DOMAIN" />; cheti chake cha usalama kilikwisha muda jana. Hii inaweza kusababishwa na usanidi usiofaa au mvamizi kuingilia muunganisho wako. Saa ya kompyuta kwa sasa imewekwa kuwa <ph name="CURRENT_DATE" />. Je, hiyo ni sahihi? Ikiwa si sahihi, rekebisha saa ya mfumo wako kisha uonyeshe upya ukurasa huu.}other{Seva hii haikuweza kuthibitisha kuwa ni <ph name="DOMAIN" />; cheti chake cha usalama kilikwisha muda siku # zilizopita. Hii inaweza kusababishwa na usanidi usiofaa au mvamizi kuingilia muunganisho wako. Saa ya kompyuta kwa sasa imewekwa kuwa <ph name="CURRENT_DATE" />. Je, hiyo ni sahihi? Ikiwa si sahihi, rekebisha saa ya mfumo wako kisha uonyeshe upya ukurasa huu.}}</translation> <translation id="1656489000284462475">Muda wa kuabiri gari</translation> +<translation id="1662550410081243962">Hifadhi na ujaze njia za kulipa</translation> <translation id="1663943134801823270">Kadi na anwani zinatoka Chrome. Unaweza kuzidhibiti kwenye <ph name="BEGIN_LINK" />Mipangilio<ph name="END_LINK" />.</translation> <translation id="1676269943528358898">Kwa kawaida <ph name="SITE" /> hutumia usimbaji fiche ili kulinda maelezo yako. Google Chrome ilipojaribu kuunganisha kwenye <ph name="SITE" /> wakati huu, tovuti ilituma kitambulisho kisicho cha kawaida na kisicho sahihi. Hili linaweza kutokea mvamizi anapojaribu kujifanya kuwa <ph name="SITE" />, au uchanganuzi wa kuingia katika Wi-Fi umeingilia muunganisho. Maelezo yako yangali salama kwa sababu Google Chrome ilisimamisha muunganisho kabla data yoyote itumwe.</translation> <translation id="168841957122794586">Cheti cha seva kina kitufe dhaifu cha kifichua msimbo.</translation> +<translation id="1697532407822776718">Mko tayari nyote!</translation> <translation id="1706954506755087368">{1,plural, =1{Seva hii haikuweza kuthibitisha kuwa ni <ph name="DOMAIN" />; cheti chake cha usalama kitakwisha muda kuanzia kesho. Hii inaweza kusababishwa na usanidi usiofaa au mvamizi kuingilia muunganisho wako.}other{Seva hii haikuweza kuthibitisha kuwa ni <ph name="DOMAIN" />; cheti chake cha usalama kitakwisha muda kuanzia siku # zijazo. Hii inaweza kusababishwa na usanidi usiofaa au mvamizi kuingilia muunganisho wako.}}</translation> <translation id="1710259589646384581">OS</translation> <translation id="1721312023322545264">Unahitaji ruhusa kutoka kwa <ph name="NAME" /> ili utembelee tovuti hii</translation> @@ -193,6 +196,7 @@ <translation id="225207911366869382">Thamani hii inapingwa kwa sera hii.</translation> <translation id="2262243747453050782">Hitilfau ya HTTP</translation> <translation id="2270484714375784793">Nambari ya simu</translation> +<translation id="2283340219607151381">Hifadhi na ujaze anwani</translation> <translation id="2292556288342944218">Ufikiaji wako wa intaneti umezuiwa</translation> <translation id="2316887270356262533">Huongeza nafasi isiyozidi MB 1. Baadhi ya tovuti huenda zikapakia polepole zaidi utakapozivinjari tena.</translation> <translation id="2317259163369394535"><ph name="DOMAIN" /> inahitaji jina la mtumiaji na nenosiri.</translation> @@ -274,6 +278,7 @@ <translation id="2851634818064021665">Unahitaji ruhusa ili utembelee tovuti hii</translation> <translation id="2856444702002559011">Huenda wavamizi wanajaribu kuiba maelezo yako kutoka <ph name="BEGIN_BOLD" /><ph name="SITE" /><ph name="END_BOLD" /> (kwa mfano, manenosiri, ujumbe au kadi za mikopo).<ph name="BEGIN_LEARN_MORE_LINK" />Pata maelezo zaidi<ph name="END_LEARN_MORE_LINK" /></translation> <translation id="2881276955470682203">Ungependa kuhifadhi kadi?</translation> +<translation id="2903493209154104877">Anwani</translation> <translation id="2909946352844186028">Mabadiliko ya mtandao yamegunduliwa.</translation> <translation id="2916038427272391327">Funga programu nyingine</translation> <translation id="2922350208395188000">Cheti cha seva hakiwezi kukaguliwa.</translation> @@ -1147,6 +1152,7 @@ <translation id="973773823069644502">Chagua Mahali Bidhaa Itakapopelekwa</translation> <translation id="975560348586398090">{COUNT,plural, =0{Hamna}=1{Kipengee 1}other{Vipengee #}}</translation> <translation id="981121421437150478">Nje ya mtandao</translation> +<translation id="984275831282074731">Njia za kulipa</translation> <translation id="985199708454569384"><p>Utaona hitilafu hii kwenye kompyuta au simu yako kwa sababu tarehe na wakati wa kifaa chako si sahihi.</p> <p>Ili urekebishe hitilafu, fungua saa ya kifaa chako. Hakikisha kuwa tarehe na wakati ni sahihi.</p></translation> <translation id="988159990683914416">Muundo wa Wasanidi Programu</translation>
diff --git a/components/strings/components_strings_ta.xtb b/components/strings/components_strings_ta.xtb index 0af87fc0..2bbcfdb 100644 --- a/components/strings/components_strings_ta.xtb +++ b/components/strings/components_strings_ta.xtb
@@ -63,6 +63,7 @@ <translation id="129863573139666797"><ph name="BEGIN_LINK" />குக்கீகளை அழிக்கவும்<ph name="END_LINK" /></translation> <translation id="1314614906530272393">தேர்ந்தெடுத்த அமர்வு இல்லை.</translation> <translation id="1323433172918577554">மேலும் காட்டு</translation> +<translation id="132390688737681464">முகவரிகளைச் சேமித்துத் தானாக நிரப்பு</translation> <translation id="1333989956347591814">இருப்பினும், பின்வரும் தரப்பினர் உங்கள் செயல்பாட்டைப் <ph name="BEGIN_EMPHASIS" />பார்க்க முடியும்<ph name="END_EMPHASIS" />: <ph name="BEGIN_LIST" /> <ph name="LIST_ITEM" />நீங்கள் பார்வையிடும் இணையதளங்கள் @@ -110,9 +111,11 @@ <translation id="1645368109819982629">ஆதரிக்கப்படாத நெறிமுறை</translation> <translation id="1655462015569774233">{1,plural, =1{இந்தச் சேவையகம் தான் <ph name="DOMAIN" /> என்பதை நிரூபிக்க முடியவில்லை; இதன் பாதுகாப்புச் சான்றிதழ் நேற்று காலாவதியானது. இது தவறான உள்ளமைவால் ஏற்பட்டிருக்கலாம் அல்லது தீங்கிழைப்பவர் உங்கள் இணைப்பில் குறுக்கிட்டிருக்கலாம். உங்கள் கணினியின் கடிகாரம் தற்போது <ph name="CURRENT_DATE" /> என அமைக்கப்பட்டுள்ளது. அது சரியாக இருக்கிறதா? இல்லை என்றால், உங்கள் முறைமையின் கடிகாரத்தைச் சரிசெய்து, பின்னர் இந்தப் பக்கத்தைப் புதுப்பிக்க வேண்டும்.}other{இந்தச் சேவையகம் தான் <ph name="DOMAIN" /> என்பதை நிரூபிக்க முடியவில்லை; இதன் பாதுகாப்புச் சான்றிதழ் # நாட்களுக்கு முன்பு காலாவதியானது. இது தவறான உள்ளமைவால் ஏற்பட்டிருக்கலாம் அல்லது தீங்கிழைப்பவர் உங்கள் இணைப்பில் குறுக்கிட்டிருக்கலாம். உங்கள் கணினியின் கடிகாரம் தற்போது <ph name="CURRENT_DATE" /> என அமைக்கப்பட்டுள்ளது. அது சரியாக இருக்கிறதா? இல்லை என்றால், உங்கள் முறைமையின் கடிகாரத்தைச் சரிசெய்து, பின்னர் இந்தப் பக்கத்தைப் புதுப்பிக்க வேண்டும்.}}</translation> <translation id="1656489000284462475">பிக்கப்</translation> +<translation id="1662550410081243962">கட்டண முறைகளைச் சேமித்துத் தானாக நிரப்பு</translation> <translation id="1663943134801823270">கார்டுகளும் முகவரிகளும் Chrome இலிருந்து பெறப்பட்டவையாகும். <ph name="BEGIN_LINK" />அமைப்புகளில்<ph name="END_LINK" /> அவற்றை நிர்வகிக்கலாம்.</translation> <translation id="1676269943528358898">வழக்கமாக, <ph name="SITE" /> உங்கள் தகவலைப் பாதுகாப்பதற்காக முறைமையாக்கத்தைப் பயன்படுத்துகிறது. இந்த முறை <ph name="SITE" /> உடன் இணைவதற்கு Google Chrome முயற்சித்தபோது வழக்கத்திற்கு மாறான மற்றும் தவறான நற்சான்றிதழ்களை இணையதளம் வழங்கியது. தாக்குபவர் தன்னை <ph name="SITE" /> ஆகக் காட்ட முயற்சிக்கும் போது அல்லது இணைப்பை வைஃபை உள்நுழைவுத் திரை குறுக்கிடும் போது இது ஏற்படலாம். இருப்பினும், தரவு எதுவும் பரிமாற்றப்படுவதற்கு முன் Google Chrome இணைப்பை நிறுத்தியதால் உங்கள் தகவல் பாதுகாப்பாகவே இருக்கிறது.</translation> <translation id="168841957122794586">சேவையக சான்றிதழில் வலுவற்ற குறியீட்டாக்க விசை இருக்கிறது.</translation> +<translation id="1697532407822776718">எல்லாவற்றையும் அமைத்துவிட்டீர்கள்!</translation> <translation id="1706954506755087368">{1,plural, =1{இந்தச் சேவையகம் தான் <ph name="DOMAIN" /> என்பதை நிரூபிக்க முடியவில்லை; இதன் பாதுகாப்புச் சான்றிதழ் நாளை முதலே செல்லுபடியாகும். இது தவறான உள்ளமைவால் ஏற்பட்டிருக்கலாம் அல்லது தீங்கிழைப்பவர் உங்கள் இணைப்பில் குறுக்கிட்டிருக்கலாம்.}other{இந்தச் சேவையகம் தான் <ph name="DOMAIN" /> என்பதை நிரூபிக்க முடியவில்லை; இதன் பாதுகாப்புச் சான்றிதழ் எதிர்காலத்தில் # நாட்களில் ஏற்றுக்கொள்ளப்படும். இது தவறான உள்ளமைவால் ஏற்பட்டிருக்கலாம் அல்லது தீங்கிழைப்பவர் உங்கள் இணைப்பில் குறுக்கிட்டிருக்கலாம்.}}</translation> <translation id="1710259589646384581">OS</translation> <translation id="1721312023322545264">இந்தத் தளத்திற்குச் செல்ல, <ph name="NAME" /> இன் அனுமதி வேண்டும்</translation> @@ -193,6 +196,7 @@ <translation id="225207911366869382">இந்த கொள்கைக்கான மதிப்பு தடுக்கப்பட்டது.</translation> <translation id="2262243747453050782">HTTP பிழை</translation> <translation id="2270484714375784793">தொலைபேசி எண்</translation> +<translation id="2283340219607151381">முகவரிகளைச் சேமித்துத் தானாக நிரப்பு</translation> <translation id="2292556288342944218">உங்கள் இணைய அணுகல் தடுக்கப்பட்டது</translation> <translation id="2316887270356262533">1 மெ.பை. அளவிற்கும் குறைவான இடத்தைக் காலியாக்கும். நீங்கள் அடுத்த முறை பார்வையிடும் போது, சில தளங்கள் மிகவும் மெதுவாக ஏற்றப்படலாம்.</translation> <translation id="2317259163369394535"><ph name="DOMAIN" />க்குப் பயனர்பெயரும் கடவுச்சொல்லும் தேவை.</translation> @@ -274,6 +278,7 @@ <translation id="2851634818064021665">இந்தத் தளத்தைப் பார்ப்பதற்கு அனுமதி தேவை</translation> <translation id="2856444702002559011"><ph name="BEGIN_BOLD" /><ph name="SITE" /><ph name="END_BOLD" /> தளத்திலிருந்து ஹேக்கர்கள் உங்கள் தகவலை (எடுத்துக்காட்டாக, கடவுச்சொற்கள், செய்திகள் அல்லது கிரெடிட் கார்டுகள்) திருட முயற்சிக்கக்கூடும். <ph name="BEGIN_LEARN_MORE_LINK" />மேலும் அறிக<ph name="END_LEARN_MORE_LINK" /></translation> <translation id="2881276955470682203">கார்டைச் சேமிக்கவா?</translation> +<translation id="2903493209154104877">முகவரிகள்</translation> <translation id="2909946352844186028">பிணைய மாற்றம் கண்டறியப்பட்டது.</translation> <translation id="2916038427272391327">பிற நிரல்களை மூடவும்</translation> <translation id="2922350208395188000">சேவையகச் சான்றிதழை சோதிக்க முடியவில்லை.</translation> @@ -1143,6 +1148,7 @@ <translation id="973773823069644502">டெலிவரி முகவரியைச் சேர்</translation> <translation id="975560348586398090">{COUNT,plural, =0{ஏதுமில்லை}=1{1 உருப்படி}other{# உருப்படிகள்}}</translation> <translation id="981121421437150478">ஆஃப்லைன்</translation> +<translation id="984275831282074731">பேமெண்ட் முறைகள்</translation> <translation id="985199708454569384"><p>உங்கள் கணினி அல்லது மொபைல் சாதனத்தின் தேதி மற்றும் நேரம் தவறாக இருந்தால், இந்தப் பிழையைப் பார்ப்பீர்கள்.</p> <p>இந்தப் பிழையைச் சரிசெய்ய, உங்கள் சாதனத்தின் கடிகாரத்தைத் திறக்கவும். நேரமும் தேதியும் சரியாக இருப்பதை உறுதிப்படுத்தவும்.</p></translation> <translation id="988159990683914416">டெவலப்பர் கட்டமைப்பு</translation>
diff --git a/components/strings/components_strings_te.xtb b/components/strings/components_strings_te.xtb index 614be2b..e3bb5f1e 100644 --- a/components/strings/components_strings_te.xtb +++ b/components/strings/components_strings_te.xtb
@@ -63,6 +63,7 @@ <translation id="129863573139666797"><ph name="BEGIN_LINK" />మీ కుక్కీలను తీసివేయడానికి ప్రయత్నించండి<ph name="END_LINK" /></translation> <translation id="1314614906530272393">ఎంచుకోబడిన సెషన్ ఉనికిలో లేదు.</translation> <translation id="1323433172918577554">మరింత చూపు</translation> +<translation id="132390688737681464">చిరునామాలను సేవ్ చేసి, పూరించండి</translation> <translation id="1333989956347591814">మీ కార్యాచరణ వీరికి <ph name="BEGIN_EMPHASIS" />ఇప్పటికీ కనిపించవచ్చు<ph name="END_EMPHASIS" />: <ph name="BEGIN_LIST" /> <ph name="LIST_ITEM" />మీరు సందర్శించే వెబ్సైట్లు @@ -110,9 +111,11 @@ <translation id="1645368109819982629">ప్రోటోకాల్కు మద్దతు లేదు</translation> <translation id="1655462015569774233">{1,plural, =1{ఈ సర్వర్ ఇది <ph name="DOMAIN" /> అని నిరూపించలేకపోయింది; దీని భద్రతా ప్రమాణపత్రం గడువు నిన్న ముగిసింది. తప్పుగా కాన్ఫిగర్ చేసినందున లేదా దాడిచేసేవారు మీ కనెక్షన్కు అంతరాయం కలిగించినందున ఇలా జరిగి ఉండవచ్చు. మీ కంప్యూటర్ గడియారం ప్రస్తుతం <ph name="CURRENT_DATE" />కి సెట్ చేయబడింది. అది సరిగ్గా ఉందా? సరిగ్గా లేకుంటే, మీరు సిస్టమ్ గడియారాన్ని సరిచేసి, ఆపై ఈ పేజీని రీఫ్రెష్ చేయాలి.}other{ఈ సర్వర్ ఇది <ph name="DOMAIN" /> అని నిరూపించలేకపోయింది; దీని భద్రతా ప్రమాణపత్రం గడువు # రోజుల క్రితం ముగిసింది. తప్పుగా కాన్ఫిగర్ చేసినందున లేదా దాడిచేసేవారు మీ కనెక్షన్కు అంతరాయం కలిగించినందున ఇలా జరిగి ఉండవచ్చు. మీ కంప్యూటర్ గడియారం ప్రస్తుతం <ph name="CURRENT_DATE" />కి సెట్ చేయబడింది. అది సరిగ్గా ఉందా? సరిగ్గా లేకుంటే, మీరు సిస్టమ్ గడియారాన్ని సరిచేసి, ఆపై ఈ పేజీని రీఫ్రెష్ చేయాలి.}}</translation> <translation id="1656489000284462475">పికప్</translation> +<translation id="1662550410081243962">చెల్లింపు పద్ధతులను సేవ్ చేసి, పూరించండి</translation> <translation id="1663943134801823270">కార్డ్లు మరియు చిరునామాలు Chrome నుండి పొందినవి. మీరు <ph name="BEGIN_LINK" />సెట్టింగ్లు<ph name="END_LINK" />లో వాటిని నిర్వహించవచ్చు.</translation> <translation id="1676269943528358898"><ph name="SITE" /> సాధారణంగా మీ సమాచారాన్ని రక్షించడానికి గుప్తీకరణను ఉపయోగిస్తుంది. Google Chrome ఈసారి <ph name="SITE" />కి కనెక్ట్ చేయడానికి ప్రయత్నించినప్పుడు, వెబ్సైట్ అసాధారణ మరియు తప్పు ఆధారాలు అని ప్రతిస్పందించింది. దాడి చేసే వ్యక్తి <ph name="SITE" />గా వ్యవహరించి మోసగించడానికి ప్రయత్నిస్తున్నప్పుడు లేదా Wi-Fi సైన్-ఇన్ స్క్రీన్ కనెక్షన్కు అంతరాయం కలిగించినప్పుడు ఇలా జరగవచ్చు. Google Chrome డేటా వినిమయం సంభవించక ముందే కనెక్షన్ను ఆపివేసినందున మీ సమాచారం ఇప్పటికీ సురక్షితంగానే ఉంది.</translation> <translation id="168841957122794586">సర్వర్ ప్రమాణపత్రం బలహీన క్రిప్టోగ్రాఫిక్ కీని కలిగి ఉంది.</translation> +<translation id="1697532407822776718">మీరు సిద్ధంగా ఉన్నారు!</translation> <translation id="1706954506755087368">{1,plural, =1{ఈ సర్వర్ ఇది <ph name="DOMAIN" /> అని నిరూపించలేకపోయింది; దీని భద్రతా ప్రమాణపత్రం రేపటిది కావచ్చు. తప్పుగా కాన్ఫిగర్ చేసినందున లేదా దాడిచేసేవారు మీ కనెక్షన్కు అంతరాయం కలిగించినందున ఇలా జరిగి ఉండవచ్చు.}other{ఈ సర్వర్ ఇది <ph name="DOMAIN" /> అని నిరూపించలేకపోయింది; దీని భద్రతా ప్రమాణపత్రం భవిష్యత్తులో # రోజుల తదుపరిది కావచ్చు. తప్పుగా కాన్ఫిగర్ చేసినందున లేదా దాడిచేసేవారు మీ కనెక్షన్కు అంతరాయం కలిగించినందున ఇలా జరిగి ఉండవచ్చు.}}</translation> <translation id="1710259589646384581">OS</translation> <translation id="1721312023322545264">ఈ సైట్ని సందర్శించడానికి మీకు <ph name="NAME" /> నుండి అనుమతి అవసరం</translation> @@ -193,6 +196,7 @@ <translation id="225207911366869382">ఈ విధానం కోసం ఈ విలువ తగ్గించబడింది.</translation> <translation id="2262243747453050782">HTTP లోపం</translation> <translation id="2270484714375784793">ఫోన్ నంబర్</translation> +<translation id="2283340219607151381">చిరునామాలను సేవ్ చేసి, పూరించండి</translation> <translation id="2292556288342944218">మీ ఇంటర్నెట్ ప్రాప్యత బ్లాక్ చేయబడింది</translation> <translation id="2316887270356262533">1 MB కంటే తక్కువ స్థలాన్ని ఖాళీ చేస్తుంది. మీ తదుపరి సందర్శనలో కొన్ని సైట్లు మరింత నెమ్మదిగా లోడ్ కావచ్చు.</translation> <translation id="2317259163369394535"><ph name="DOMAIN" />కి వినియోగదారు పేరు మరియు పాస్వర్డ్ అవసరం.</translation> @@ -273,6 +277,7 @@ <translation id="2851634818064021665">ఈ సైట్ను సందర్శించడానికి మీకు అనుమతి అవసరం</translation> <translation id="2856444702002559011">హ్యాకర్లు <ph name="BEGIN_BOLD" /><ph name="SITE" /><ph name="END_BOLD" /> నుండి మీ సమాచారాన్ని దొంగిలించడానికి ప్రయత్నిస్తూ ఉండవచ్చు (ఉదాహరణకు, పాస్వర్డ్లు, సందేశాలు లేదా క్రెడిట్ కార్డ్లు). <ph name="BEGIN_LEARN_MORE_LINK" />మరింత తెలుసుకోండి<ph name="END_LEARN_MORE_LINK" /></translation> <translation id="2881276955470682203">కార్డ్ను సేవ్ చేయాలా?</translation> +<translation id="2903493209154104877">చిరునామాలు</translation> <translation id="2909946352844186028">నెట్వర్క్ మార్పు గుర్తించబడింది.</translation> <translation id="2916038427272391327">ఇతర ప్రోగ్రామ్లను మూసివేయండి</translation> <translation id="2922350208395188000">సర్వర్ యొక్క ప్రమాణపత్రం తనిఖీ చెయ్యబడదు.</translation> @@ -1141,6 +1146,7 @@ <translation id="973773823069644502">బట్వాడా చిరునామాను జోడించండి</translation> <translation id="975560348586398090">{COUNT,plural, =0{ఏమీ లేవు}=1{1 అంశం}other{# అంశాలు}}</translation> <translation id="981121421437150478">ఆఫ్లైన్</translation> +<translation id="984275831282074731">చెల్లింపు పద్ధతులు</translation> <translation id="985199708454569384"><p>మీ కంప్యూటర్ లేదా మొబైల్ పరికరంలో తేదీ మరియు సమయం తప్పుగా ఉన్నట్లయితే మీకు ఈ ఎర్రర్ కనిపిస్తుంది.</p> <p>ఎర్రర్ని పరిష్కరించడానికి, మీ పరికర గడియారాన్ని తెరవండి. సమయం మరియు తేదీ సరిగ్గా ఉన్నాయని నిర్ధారించుకోండి.</p></translation> <translation id="988159990683914416">డెవలపర్ బిల్డ్</translation>
diff --git a/components/strings/components_strings_th.xtb b/components/strings/components_strings_th.xtb index 8273f17..99d54ab 100644 --- a/components/strings/components_strings_th.xtb +++ b/components/strings/components_strings_th.xtb
@@ -63,6 +63,7 @@ <translation id="129863573139666797"><ph name="BEGIN_LINK" />ลองล้างคุกกี้<ph name="END_LINK" /></translation> <translation id="1314614906530272393">ไม่มีเซสชันที่เลือก</translation> <translation id="1323433172918577554">แสดงเพิ่มเติม</translation> +<translation id="132390688737681464">บันทึกและกรอกที่อยู่</translation> <translation id="1333989956347591814">ผู้อื่น<ph name="BEGIN_EMPHASIS" />อาจยังมองเห็น<ph name="END_EMPHASIS" />กิจกรรมของคุณ: <ph name="BEGIN_LIST" /> <ph name="LIST_ITEM" />เว็บไซต์ที่คุณเข้าชม @@ -110,9 +111,11 @@ <translation id="1645368109819982629">ไม่รองรับโปรโตคอล</translation> <translation id="1655462015569774233">{1,plural, =1{เซิร์ฟเวอร์นี้พิสูจน์ไม่ได้ว่าเป็น <ph name="DOMAIN" /> เพราะใบรับรองความปลอดภัยหมดอายุไปเมื่อวานนี้ โดยอาจเกิดจากการกำหนดค่าผิดหรือผู้บุกรุกที่ขัดขวางการเชื่อมต่อของคุณ ขณะนี้นาฬิกาของคุณตั้งค่าไว้ที่วันที่ <ph name="CURRENT_DATE" /> การตั้งค่านี้ถูกต้องไหม หากไม่ถูกต้อง คุณควรแก้ไขนาฬิกาของระบบและรีเฟรชหน้านี้}other{เซิร์ฟเวอร์นี้พิสูจน์ไม่ได้ว่าเป็น <ph name="DOMAIN" /> เพราะใบรับรองความปลอดภัยหมดอายุไปเมื่อ # วันที่ผ่านมา โดยอาจเกิดจากการกำหนดค่าผิดหรือผู้บุกรุกที่ขัดขวางการเชื่อมต่อของคุณ ขณะนี้นาฬิกาของคุณตั้งค่าไว้ที่วันที่ <ph name="CURRENT_DATE" /> การตั้งค่านี้ถูกต้องไหม หากไม่ถูกต้อง คุณควรแก้ไขนาฬิกาของระบบและรีเฟรชหน้านี้}}</translation> <translation id="1656489000284462475">การรับ</translation> +<translation id="1662550410081243962">บันทึกและกรอกวิธีการชำระเงิน</translation> <translation id="1663943134801823270">ข้อมูลบัตรและที่อยู่มาจาก Chrome คุณสามารถจัดการข้อมูลเหล่านี้ใน<ph name="BEGIN_LINK" />การตั้งค่า<ph name="END_LINK" /></translation> <translation id="1676269943528358898">โดยทั่วไป <ph name="SITE" /> จะใช้การเข้ารหัสเพื่อปกป้องข้อมูลของคุณ เมื่อ Google Chrome พยายามเชื่อมต่อกับ <ph name="SITE" /> ในครั้งนี้ เว็บไซต์ดังกล่าวส่งข้อมูลรับรองที่ผิดปกติและไม่ถูกต้องกลับมา เหตุการณ์นี้อาจเกิดขึ้นเมื่อผู้บุกรุกพยายามปลอมเป็น <ph name="SITE" /> หรือหน้าจอการลงชื่อเข้าใช้ Wi-Fi รบกวนการเชื่อมต่อ ข้อมูลของคุณยังปลอดภัยอยู่เนื่องจาก Google Chrome หยุดการเชื่อมต่อก่อนมีการแลกเปลี่ยนข้อมูล</translation> <translation id="168841957122794586">ใบรับรองของเซิร์ฟเวอร์มีคีย์การเข้ารหัสที่ไม่รัดกุม</translation> +<translation id="1697532407822776718">คุณพร้อมแล้ว!</translation> <translation id="1706954506755087368">{1,plural, =1{เซิร์ฟเวอร์นี้พิสูจน์ไม่ได้ว่าเป็น <ph name="DOMAIN" /> เพราะใบรับรองความปลอดภัยควรจะเริ่มใช้งานได้ตั้งแต่วันพรุ่งนี้ โดยอาจเกิดจากการกำหนดค่าผิดหรือผู้บุกรุกที่ขัดขวางการเชื่อมต่อของคุณ}other{เซิร์ฟเวอร์นี้พิสูจน์ไม่ได้ว่าเป็น <ph name="DOMAIN" /> เพราะใบรับรองความปลอดภัยควรจะเริ่มใช้งานได้ในอีก # วันข้างหน้า โดยอาจเกิดจากการกำหนดค่าผิดหรือผู้บุกรุกที่ขัดขวางการเชื่อมต่อของคุณ}}</translation> <translation id="1710259589646384581">ระบบปฏิบัติการ</translation> <translation id="1721312023322545264">คุณต้องได้รับสิทธิ์จาก <ph name="NAME" /> เพื่อเข้าชมเว็บไซต์นี้</translation> @@ -193,6 +196,7 @@ <translation id="225207911366869382">เลิกใช้งานค่านี้กับนโยบายนี้</translation> <translation id="2262243747453050782">ข้อผิดพลาดของ HTTP</translation> <translation id="2270484714375784793">หมายเลขโทรศัพท์</translation> +<translation id="2283340219607151381">บันทึกและกรอกที่อยู่</translation> <translation id="2292556288342944218">การเข้าถึงอินเทอร์เน็ตของคุณถูกบล็อก</translation> <translation id="2316887270356262533">หากเพิ่มพื้นที่ว่างไม่ถึง 1 MB ไซต์บางแห่งอาจโหลดช้าลงเมื่อคุณเข้าชมครั้งถัดไป</translation> <translation id="2317259163369394535"><ph name="DOMAIN" /> ต้องใช้ชื่อผู้ใช้และรหัสผ่าน</translation> @@ -274,6 +278,7 @@ <translation id="2851634818064021665">คุณต้องได้รับสิทธิ์เพื่อเข้าชมไซต์นี้</translation> <translation id="2856444702002559011">ผู้โจมตีอาจพยายามขโมยข้อมูลจาก <ph name="BEGIN_BOLD" /><ph name="SITE" /><ph name="END_BOLD" /> (ตัวอย่างเช่น รหัสผ่าน ข้อความ หรือบัตรเครดิต) <ph name="BEGIN_LEARN_MORE_LINK" />ดูข้อมูลเพิ่มเติม<ph name="END_LEARN_MORE_LINK" /></translation> <translation id="2881276955470682203">บันทึกบัตรไหม</translation> +<translation id="2903493209154104877">ที่อยู่</translation> <translation id="2909946352844186028">ตรวจพบการเปลี่ยนแปลงเครือข่าย</translation> <translation id="2916038427272391327">ปิดโปรแกรมอื่นๆ</translation> <translation id="2922350208395188000">ไม่สามารถตรวจสอบใบรับรองของเซิร์ฟเวอร์</translation> @@ -1147,6 +1152,7 @@ <translation id="973773823069644502">เพิ่มที่อยู่สำหรับนำส่งสินค้า</translation> <translation id="975560348586398090">{COUNT,plural, =0{ไม่มี}=1{1 รายการ}other{# รายการ}}</translation> <translation id="981121421437150478">ออฟไลน์</translation> +<translation id="984275831282074731">วิธีการชำระเงิน</translation> <translation id="985199708454569384"><p>คุณจะเห็นข้อผิดพลาดนี้หากวันที่และเวลาของคอมพิวเตอร์หรืออุปกรณ์เคลื่อนที่ไม่ถูกต้อง</p> <p>ในการแก้ไขข้อผิดพลาด ให้เปิดนาฬิกาของอุปกรณ์ ตรวจสอบให้แน่ใจว่าเวลาและวันที่ถูกต้องแล้ว</p></translation> <translation id="988159990683914416">รุ่นนักพัฒนา</translation>
diff --git a/components/strings/components_strings_tr.xtb b/components/strings/components_strings_tr.xtb index 44b40db..627362a 100644 --- a/components/strings/components_strings_tr.xtb +++ b/components/strings/components_strings_tr.xtb
@@ -63,6 +63,7 @@ <translation id="129863573139666797"><ph name="BEGIN_LINK" />Çerezlerinizi temizlemeyi deneyin<ph name="END_LINK" /></translation> <translation id="1314614906530272393">Seçilen oturum mevcut değil.</translation> <translation id="1323433172918577554">Daha Fazla Göster</translation> +<translation id="132390688737681464">Adresleri Kaydet ve Doldur</translation> <translation id="1333989956347591814">Etkinliğiniz şunlar tarafından <ph name="BEGIN_EMPHASIS" />yine de görülebilir<ph name="END_EMPHASIS" />: <ph name="BEGIN_LIST" /> <ph name="LIST_ITEM" />Ziyaret ettiğiniz web siteleri @@ -110,9 +111,11 @@ <translation id="1645368109819982629">Desteklenmeyen protokol</translation> <translation id="1655462015569774233">{1,plural, =1{Bu sunucu, <ph name="DOMAIN" /> olduğunu kanıtlayamadı. Güvenlik sertifikasının süresi dün sona erdi. Bu durum, bir yanlış yapılandırmadan veya bağlantınıza müdahale eden bir saldırgandan kaynaklanıyor olabilir. Bilgisayarınızın saati geçerli olarak <ph name="CURRENT_DATE" /> tarihine ayarlı. Bu ayar doğru görünüyor mu? Değilse, sisteminizin saatini düzeltmeli ve sonra bu sayfayı yenilemelisiniz.}other{Bu sunucu, <ph name="DOMAIN" /> olduğunu kanıtlayamadı. Güvenlik sertifikası # gün önce sona erdi. Bu durum, bir yanlış yapılandırmadan veya bağlantınıza müdahale eden bir saldırgandan kaynaklanıyor olabilir. Bilgisayarınızın saati geçerli olarak <ph name="CURRENT_DATE" /> tarihine ayarlı. Bu ayar doğru görünüyor mu? Değilse, sisteminizin saatini düzeltmeli ve sonra bu sayfayı yenilemelisiniz.}}</translation> <translation id="1656489000284462475">Alma</translation> +<translation id="1662550410081243962">Ödeme yöntemlerini kaydet ve doldur</translation> <translation id="1663943134801823270">Kartlar ve adresler Chrome'dan alınmaktadır. Bu bilgileri <ph name="BEGIN_LINK" />Ayarlar<ph name="END_LINK" />'dan yönetebilirsiniz.</translation> <translation id="1676269943528358898"><ph name="SITE" /> normalde bilgilerinizi korumak için şifreleme kullanmaktadır. Google Chrome bu sefer <ph name="SITE" /> sitesine bağlanmayı denediğinde, web sitesi sıra dışı ve yanlış kimlik bilgileri döndürdü. Bir saldırgan <ph name="SITE" /> gibi davranmaya çalışıyor olabilir ya da bir Kablosuz oturum açma ekranı bağlantıyı kesmiştir. Google Chrome herhangi bir veri alışverişinden önce bağlantıyı durdurduğu için bilgileriniz hâlâ güvendedir.</translation> <translation id="168841957122794586">Sunucu sertifikasında zayıf bir şifreleme anahtarı var.</translation> +<translation id="1697532407822776718">Artık hazırsınız!</translation> <translation id="1706954506755087368">{1,plural, =1{Bu sunucu, <ph name="DOMAIN" /> olduğunu kanıtlayamadı. Güvenlik sertifikasının alınma tarihinin yarın olduğu iddia ediliyor. Bu durum, bir yanlış yapılandırmadan veya bağlantınıza müdahale eden bir saldırgandan kaynaklanıyor olabilir.}other{Bu sunucu, <ph name="DOMAIN" /> olduğunu kanıtlayamadı. Güvenlik sertifikasının alınma tarihinin # gün sonra olduğu iddia ediliyor. Bu durum, bir yanlış yapılandırmadan veya bağlantınıza müdahale eden bir saldırgandan kaynaklanıyor olabilir.}}</translation> <translation id="1710259589646384581">OS</translation> <translation id="1721312023322545264">Bu siteyi ziyaret etmek için <ph name="NAME" /> size izin vermelidir</translation> @@ -193,6 +196,7 @@ <translation id="225207911366869382">Bu değer bu politika için kullanımdan kaldırıldı.</translation> <translation id="2262243747453050782">HTTP hatası</translation> <translation id="2270484714375784793">Telefon numarası</translation> +<translation id="2283340219607151381">Adresleri kaydet ve doldur</translation> <translation id="2292556288342944218">İnternet erişiminiz engellendi</translation> <translation id="2316887270356262533">1 MB'tan az yer açar. Bir sonraki ziyaretinizde bazı siteler daha yavaş yüklenebilir.</translation> <translation id="2317259163369394535"><ph name="DOMAIN" /> için kullanıcı adı ve şifre gerekiyor.</translation> @@ -274,6 +278,7 @@ <translation id="2851634818064021665">Bu siteyi ziyaret etmek için izninizin olması gerekir</translation> <translation id="2856444702002559011">Saldırganlar <ph name="BEGIN_BOLD" /><ph name="SITE" /><ph name="END_BOLD" /> üzerinden bilgilerinizi çalmaya çalışıyor olabilir (örneğin, şifreler, mesajlar veya kredi kartları). <ph name="BEGIN_LEARN_MORE_LINK" />Daha fazla bilgi<ph name="END_LEARN_MORE_LINK" /></translation> <translation id="2881276955470682203">Kart kaydedilsin mi?</translation> +<translation id="2903493209154104877">Adresler</translation> <translation id="2909946352844186028">Bir ağ değişikliği algılandı.</translation> <translation id="2916038427272391327">Diğer programları kapatın</translation> <translation id="2922350208395188000">Sunucunun sertifikası kontrol edilemiyor.</translation> @@ -1147,6 +1152,7 @@ <translation id="973773823069644502">Teslimat Adresi Ekle</translation> <translation id="975560348586398090">{COUNT,plural, =0{Yok}=1{1 öğe}other{# öğe}}</translation> <translation id="981121421437150478">Çevrimdışı</translation> +<translation id="984275831282074731">Ödeme yöntemleri</translation> <translation id="985199708454569384"><p>Bilgisayarınızın veya mobil cihazınızın tarihi ve saati doğru değilse bu hatayı görürsünüz.</p> <p>Hatayı gidermek için cihazınızın saatini açın. Saat ve tarih ayarının doğru olduğundan emin olun.</p></translation> <translation id="988159990683914416">Geliştirici Derlemesi</translation>
diff --git a/components/strings/components_strings_uk.xtb b/components/strings/components_strings_uk.xtb index f1f8b30..2f13c51 100644 --- a/components/strings/components_strings_uk.xtb +++ b/components/strings/components_strings_uk.xtb
@@ -63,6 +63,7 @@ <translation id="129863573139666797"><ph name="BEGIN_LINK" />Спробуйте видалити файли cookie<ph name="END_LINK" /></translation> <translation id="1314614906530272393">Вибраний сеанс не існує.</translation> <translation id="1323433172918577554">Показати більше</translation> +<translation id="132390688737681464">Зберігати й заповнювати адреси</translation> <translation id="1333989956347591814">Дані про вашу активність <ph name="BEGIN_EMPHASIS" />усе ще можуть бачити<ph name="END_EMPHASIS" />: <ph name="BEGIN_LIST" /> <ph name="LIST_ITEM" />адміністратори веб-сайтів, які ви відвідуєте @@ -110,9 +111,11 @@ <translation id="1645368109819982629">Протокол не підтримується</translation> <translation id="1655462015569774233">{1,plural, =1{Не вдалося підтвердити, що це сервер <ph name="DOMAIN" />. Його сертифікат перестав діяти учора. Можливо, сервер налаштовано неправильно або хтось намагається перехопити ваші дані. На годиннику вашого комп’ютера зараз <ph name="CURRENT_DATE" />. Якщо дата неправильна, налаштуйте системний годинник і оновіть цю сторінку.}one{Не вдалося підтвердити, що це сервер <ph name="DOMAIN" />. Його сертифікат перестав діяти # день тому. Можливо, сервер налаштовано неправильно або хтось намагається перехопити ваші дані. На годиннику вашого комп’ютера зараз <ph name="CURRENT_DATE" />. Якщо дата неправильна, налаштуйте системний годинник і оновіть цю сторінку.}few{Не вдалося підтвердити, що це сервер <ph name="DOMAIN" />. Його сертифікат перестав діяти # дні тому. Можливо, сервер налаштовано неправильно або хтось намагається перехопити ваші дані. На годиннику вашого комп’ютера зараз <ph name="CURRENT_DATE" />. Якщо дата неправильна, налаштуйте системний годинник і оновіть цю сторінку.}many{Не вдалося підтвердити, що це сервер <ph name="DOMAIN" />. Його сертифікат перестав діяти # днів тому. Можливо, сервер налаштовано неправильно або хтось намагається перехопити ваші дані. На годиннику вашого комп’ютера зараз <ph name="CURRENT_DATE" />. Якщо дата неправильна, налаштуйте системний годинник і оновіть цю сторінку.}other{Не вдалося підтвердити, що це сервер <ph name="DOMAIN" />. Його сертифікат перестав діяти # дня тому. Можливо, сервер налаштовано неправильно або хтось намагається перехопити ваші дані. На годиннику вашого комп’ютера зараз <ph name="CURRENT_DATE" />. Якщо дата неправильна, налаштуйте системний годинник і оновіть цю сторінку.}}</translation> <translation id="1656489000284462475">Отримання</translation> +<translation id="1662550410081243962">Зберігати й заповнювати способи оплати</translation> <translation id="1663943134801823270">Дані картки та список адрес містяться в Chrome. Ними можна керувати в <ph name="BEGIN_LINK" />Налаштуваннях<ph name="END_LINK" />.</translation> <translation id="1676269943528358898">Веб-сайт <ph name="SITE" /> зазвичай використовує шифрування для захисту вашої інформації. Під час цієї спроби Chrome під’єднатися до сторінки <ph name="SITE" /> з неї отримано незвичні й неправильні облікові дані. Це може статися, коли зловмисник намагається видавати себе за веб-сайт <ph name="SITE" /> або з’єднання перервано екраном входу Wi-Fi. Ваша інформація залишається захищеною, оскільки Chrome припинив з’єднання до того, як почався обмін будь-якими даними.</translation> <translation id="168841957122794586">Сертифікат сервера містить слабкий криптографічний ключ.</translation> +<translation id="1697532407822776718">Готово!</translation> <translation id="1706954506755087368">{1,plural, =1{Не вдалося підтвердити, що це сервер <ph name="DOMAIN" />. Його сертифікат безпеки почне діяти завтра. Можливо, сервер налаштовано неправильно або хтось намагається перехопити ваші дані.}one{Не вдалося підтвердити, що це сервер <ph name="DOMAIN" />. Його сертифікат безпеки почне діяти через # день. Можливо, сервер налаштовано неправильно або хтось намагається перехопити ваші дані.}few{Не вдалося підтвердити, що це сервер <ph name="DOMAIN" />. Його сертифікат безпеки почне діяти через # дні. Можливо, сервер налаштовано неправильно або хтось намагається перехопити ваші дані.}many{Не вдалося підтвердити, що це сервер <ph name="DOMAIN" />. Його сертифікат безпеки почне діяти через # днів. Можливо, сервер налаштовано неправильно або хтось намагається перехопити ваші дані.}other{Не вдалося підтвердити, що це сервер <ph name="DOMAIN" />. Його сертифікат безпеки почне діяти через # дня. Можливо, сервер налаштовано неправильно або хтось намагається перехопити ваші дані.}}</translation> <translation id="1710259589646384581">ОС</translation> <translation id="1721312023322545264">Вам потрібен дозвіл адміністратора <ph name="NAME" />, щоб перейти на цей сайт</translation> @@ -193,6 +196,7 @@ <translation id="225207911366869382">Дію цього значення припинено для цього правила</translation> <translation id="2262243747453050782">Помилка HTTP</translation> <translation id="2270484714375784793">Номер телефону</translation> +<translation id="2283340219607151381">Зберігати й заповнювати адреси</translation> <translation id="2292556288342944218">Ваш доступ до Інтернету заблоковано</translation> <translation id="2316887270356262533">Звільняє менше 1 Мб. Деякі сайти можуть завантажуватися повільніше під час наступного відвідування.</translation> <translation id="2317259163369394535">Для сайту <ph name="DOMAIN" /> потрібно ввести ім’я користувача та пароль.</translation> @@ -274,6 +278,7 @@ <translation id="2851634818064021665">Щоб відвідувати цей сайт, потрібен дозвіл</translation> <translation id="2856444702002559011">Зловмисники можуть намагатися викрасти вашу інформацію із сайту <ph name="BEGIN_BOLD" /><ph name="SITE" /><ph name="END_BOLD" /> (наприклад, паролі, повідомлення чи дані кредитних карток). <ph name="BEGIN_LEARN_MORE_LINK" />Докладніше<ph name="END_LEARN_MORE_LINK" /></translation> <translation id="2881276955470682203">Зберегти картку?</translation> +<translation id="2903493209154104877">Адреси</translation> <translation id="2909946352844186028">Виявлено зміну в мережі.</translation> <translation id="2916038427272391327">Закрийте інші програми</translation> <translation id="2922350208395188000">Сертифікат сервера неможливо перевірити.</translation> @@ -1147,6 +1152,7 @@ <translation id="973773823069644502">Додати адресу доставки</translation> <translation id="975560348586398090">{COUNT,plural, =0{Немає}=1{1 запис}one{# запис}few{# записи}many{# записів}other{# запису}}</translation> <translation id="981121421437150478">Офлайн</translation> +<translation id="984275831282074731">Способи оплати</translation> <translation id="985199708454569384"><p>Це повідомлення про помилку з’являється, якщо дата й час на комп’ютері або мобільному пристрої неправильні.</p> <p>Щоб виправити цю помилку, відкрийте годинник на пристрої та переконайтеся, що дата й час правильні.</p></translation> <translation id="988159990683914416">Конструкція розробника</translation>
diff --git a/components/strings/components_strings_vi.xtb b/components/strings/components_strings_vi.xtb index 3c6972e..66856de1 100644 --- a/components/strings/components_strings_vi.xtb +++ b/components/strings/components_strings_vi.xtb
@@ -63,6 +63,7 @@ <translation id="129863573139666797"><ph name="BEGIN_LINK" />Thử xóa các cookie của bạn<ph name="END_LINK" /></translation> <translation id="1314614906530272393">Phiên đã chọn không tồn tại.</translation> <translation id="1323433172918577554">Xem thêm</translation> +<translation id="132390688737681464">Lưu và điền địa chỉ</translation> <translation id="1333989956347591814">Hoạt động của bạn <ph name="BEGIN_EMPHASIS" />có thể vẫn hiển thị<ph name="END_EMPHASIS" /> với: <ph name="BEGIN_LIST" /> <ph name="LIST_ITEM" />Trang web bạn truy cập @@ -110,9 +111,11 @@ <translation id="1645368109819982629">Giao thức không được hỗ trợ</translation> <translation id="1655462015569774233">{1,plural, =1{Máy chủ này không chứng minh được rằng đó là <ph name="DOMAIN" />; chứng chỉ bảo mật của máy chủ này đã hết hạn hôm qua. Điều này có thể do cấu hình sai hoặc có kẻ tấn công chặn kết nối của bạn. Đồng hồ máy tính của bạn hiện được đặt là <ph name="CURRENT_DATE" />. Ngày này có đúng không? Nếu không đúng, bạn phải sửa lại đồng hồ của hệ thống rồi làm mới trang này.}other{Máy chủ này không chứng minh được rằng đó là <ph name="DOMAIN" />; chứng chỉ bảo mật của máy chủ này đã hết hạn cách đây # ngày. Điều này có thể do cấu hình sai hoặc có kẻ tấn công chặn kết nối của bạn. Đồng hồ máy tính của bạn hiện được đặt là <ph name="CURRENT_DATE" />. Ngày này có đúng không? Nếu không đúng, bạn phải sửa lại đồng hồ của hệ thống rồi làm mới trang này.}}</translation> <translation id="1656489000284462475">Nhận hàng</translation> +<translation id="1662550410081243962">Lưu và điền phương thức thanh toán</translation> <translation id="1663943134801823270">Thẻ và địa chỉ từ Chrome. Bạn có thể quản lý thẻ và địa chỉ trong <ph name="BEGIN_LINK" />Cài đặt<ph name="END_LINK" />.</translation> <translation id="1676269943528358898"><ph name="SITE" /> thường sử dụng mã hóa để bảo vệ thông tin của bạn. Khi Google Chrome tìm cách kết nối với <ph name="SITE" /> tại thời điểm này, trang web đã gửi lại thông tin đăng nhập không chính xác và bất thường. Điều này có thể xảy ra khi kẻ tấn công đang cố gắng giả mạo là <ph name="SITE" /> hoặc màn hình đăng nhập Wi-Fi đã làm gián đoạn kết nối. Thông tin của bạn vẫn an toàn do Google Chrome đã ngừng kết nối trước khi bất kỳ dữ liệu nào được trao đổi.</translation> <translation id="168841957122794586">Chứng chỉ máy chủ chứa khóa mật mã yếu.</translation> +<translation id="1697532407822776718">Bạn đã hoàn tất!</translation> <translation id="1706954506755087368">{1,plural, =1{Máy chủ này không chứng minh được rằng đó là <ph name="DOMAIN" />; chứng chỉ bảo mật của máy chủ này được đề từ ngày mai. Điều này có thể do cấu hình sai hoặc có kẻ tấn công chặn kết nối của bạn.}other{Máy chủ này không chứng minh được rằng đó là <ph name="DOMAIN" />; chứng chỉ bảo mật của máy chủ này được đề # ngày trong tương lai. Điều này có thể do cấu hình sai hoặc có kẻ tấn công chặn kết nối của bạn.}}</translation> <translation id="1710259589646384581">OS</translation> <translation id="1721312023322545264">Bạn cần được <ph name="NAME" /> cấp quyền để truy cập vào trang web này</translation> @@ -193,6 +196,7 @@ <translation id="225207911366869382">Giá trị này không được dùng cho chính sách này nữa.</translation> <translation id="2262243747453050782">Lỗi HTTP</translation> <translation id="2270484714375784793">Số điện thoại</translation> +<translation id="2283340219607151381">Lưu và điền địa chỉ</translation> <translation id="2292556288342944218">Quyền truy cập Internet của bạn bị chặn</translation> <translation id="2316887270356262533">Bộ nhớ đệm còn chưa đầy 1 MB. Một số trang web có thể tải chậm hơn vào lần tới bạn truy cập.</translation> <translation id="2317259163369394535"><ph name="DOMAIN" /> yêu cầu tên người dùng và mật khẩu.</translation> @@ -274,6 +278,7 @@ <translation id="2851634818064021665">Bạn cần quyền để truy cập trang web này</translation> <translation id="2856444702002559011">Những kẻ tấn công có thể đang cố gắng đánh cắp thông tin của bạn từ <ph name="BEGIN_BOLD" /><ph name="SITE" /><ph name="END_BOLD" /> (ví dụ: mật khẩu, thư hoặc thẻ tín dụng). <ph name="BEGIN_LEARN_MORE_LINK" />Tìm hiểu thêm<ph name="END_LEARN_MORE_LINK" /></translation> <translation id="2881276955470682203">Lưu thẻ?</translation> +<translation id="2903493209154104877">Địa chỉ</translation> <translation id="2909946352844186028">Đã phát hiện thấy thay đổi mạng.</translation> <translation id="2916038427272391327">Đóng các chương trình khác</translation> <translation id="2922350208395188000">Không thể kiểm tra chứng chỉ của máy chủ.</translation> @@ -1147,6 +1152,7 @@ <translation id="973773823069644502">Thêm địa chỉ giao hàng</translation> <translation id="975560348586398090">{COUNT,plural, =0{Không có}=1{1 mục}other{# mục}}</translation> <translation id="981121421437150478">Ngoại tuyến</translation> +<translation id="984275831282074731">Phương thức thanh toán</translation> <translation id="985199708454569384"><p>Bạn sẽ gặp lỗi này nếu ngày và giờ trên máy tính hoặc thiết bị di động không chính xác.</p> <p>Để khắc phục lỗi này, hãy mở đồng hồ trên thiết bị. Đảm bảo ngày và giờ chính xác.</p></translation> <translation id="988159990683914416">Phiên bản dành cho Nhà phát triển</translation>
diff --git a/components/strings/components_strings_zh-CN.xtb b/components/strings/components_strings_zh-CN.xtb index a2a637b..dc331f45 100644 --- a/components/strings/components_strings_zh-CN.xtb +++ b/components/strings/components_strings_zh-CN.xtb
@@ -63,6 +63,7 @@ <translation id="129863573139666797"><ph name="BEGIN_LINK" />尝试清除 Cookie<ph name="END_LINK" /></translation> <translation id="1314614906530272393">所选会话不存在。</translation> <translation id="1323433172918577554">展开</translation> +<translation id="132390688737681464">保存并填写地址</translation> <translation id="1333989956347591814">以下各方<ph name="BEGIN_EMPHASIS" />可能仍会看到<ph name="END_EMPHASIS" />您的活动: <ph name="BEGIN_LIST" /> <ph name="LIST_ITEM" />您访问的网站 @@ -110,9 +111,11 @@ <translation id="1645368109819982629">协议不受支持</translation> <translation id="1655462015569774233">{1,plural, =1{此服务器无法证明它是 <ph name="DOMAIN" />;其安全证书已在昨天过期。出现此问题的原因可能是配置有误,或有攻击者拦截了您的连接。计算机的时钟目前已设为 <ph name="CURRENT_DATE" />,该设置是否正确?如果不正确,请更正系统的时钟,然后刷新此页面。}other{此服务器无法证明它是 <ph name="DOMAIN" />;其安全证书已在 # 天前过期。出现此问题的原因可能是配置有误,或有攻击者拦截了您的连接。计算机的时钟目前已设为 <ph name="CURRENT_DATE" />,该设置是否正确?如果不正确,请更正系统的时钟,然后刷新此页面。}}</translation> <translation id="1656489000284462475">取货</translation> +<translation id="1662550410081243962">保存并填写付款方式</translation> <translation id="1663943134801823270">信用卡选项和地址选项均来自 Chrome。您可在<ph name="BEGIN_LINK" />设置<ph name="END_LINK" />中管理这些选项。</translation> <translation id="1676269943528358898"><ph name="SITE" /> 通常会使用加密技术来保护您的信息。Google Chrome 此次尝试连接到 <ph name="SITE" /> 时,此网站发回了异常的错误凭据。这可能是因为有攻击者在试图冒充 <ph name="SITE" />,或 Wi-Fi 登录屏幕中断了此次连接。请放心,您的信息仍然是安全的,因为 Google Chrome 尚未进行任何数据交换便停止了连接。</translation> <translation id="168841957122794586">服务器证书包含弱加密密钥。</translation> +<translation id="1697532407822776718">搞定了!</translation> <translation id="1706954506755087368">{1,plural, =1{此服务器无法证明它是 <ph name="DOMAIN" />;其安全证书明天才会生效。出现此问题的原因可能是配置有误,或有攻击者拦截了您的连接。}other{此服务器无法证明它是 <ph name="DOMAIN" />;其安全证书 # 天后才会生效。出现此问题的原因可能是配置有误,或有攻击者拦截了您的连接。}}</translation> <translation id="1710259589646384581">操作系统</translation> <translation id="1721312023322545264">您需要获得<ph name="NAME" />的许可,然后才能访问此网站</translation> @@ -193,6 +196,7 @@ <translation id="225207911366869382">适用于该政策的此值已弃用。</translation> <translation id="2262243747453050782">HTTP 错误</translation> <translation id="2270484714375784793">电话号码</translation> +<translation id="2283340219607151381">保存并填写地址</translation> <translation id="2292556288342944218">您被禁止访问互联网</translation> <translation id="2316887270356262533">释放了不到 1 MB。当您下次访问时,某些网站的加载速度可能会更慢。</translation> <translation id="2317259163369394535"><ph name="DOMAIN" /> 要求提供用户名和密码。</translation> @@ -274,6 +278,7 @@ <translation id="2851634818064021665">您需获得许可,才能访问此网站</translation> <translation id="2856444702002559011">攻击者可能会试图从 <ph name="BEGIN_BOLD" /><ph name="SITE" /><ph name="END_BOLD" /> 窃取您的信息(例如:密码、通讯内容或信用卡信息)。<ph name="BEGIN_LEARN_MORE_LINK" />了解详情<ph name="END_LEARN_MORE_LINK" /></translation> <translation id="2881276955470682203">保存卡片?</translation> +<translation id="2903493209154104877">地址</translation> <translation id="2909946352844186028">检测到了网络变化。</translation> <translation id="2916038427272391327">关闭其他程序</translation> <translation id="2922350208395188000">无法核实服务器证书。</translation> @@ -1143,6 +1148,7 @@ <translation id="973773823069644502">添加速递地址</translation> <translation id="975560348586398090">{COUNT,plural, =0{无}=1{1 项内容}other{# 项内容}}</translation> <translation id="981121421437150478">离线</translation> +<translation id="984275831282074731">付款方式</translation> <translation id="985199708454569384"><p>如果您的计算机或移动设备的日期与时间不准确,您就会看到这条错误消息。</p> <p>要修正该错误,请打开您设备的时钟,并确保日期与时间正确无误。</p></translation> <translation id="988159990683914416">开发者内部版本</translation>
diff --git a/components/strings/components_strings_zh-TW.xtb b/components/strings/components_strings_zh-TW.xtb index f54b6b9..7e53cc3b 100644 --- a/components/strings/components_strings_zh-TW.xtb +++ b/components/strings/components_strings_zh-TW.xtb
@@ -63,6 +63,7 @@ <translation id="129863573139666797"><ph name="BEGIN_LINK" />試試看清除 Cookie<ph name="END_LINK" /></translation> <translation id="1314614906530272393">你所選的工作階段不存在。</translation> <translation id="1323433172918577554">顯示完整清單</translation> +<translation id="132390688737681464">儲存及填入地址</translation> <translation id="1333989956347591814">以下各方<ph name="BEGIN_EMPHASIS" />可能仍會看到<ph name="END_EMPHASIS" />你的活動: <ph name="BEGIN_LIST" /> <ph name="LIST_ITEM" />你造訪的網站 @@ -110,9 +111,11 @@ <translation id="1645368109819982629">不支援的通訊協定</translation> <translation id="1655462015569774233">{1,plural, =1{這個伺服器無法證明所在網域是 <ph name="DOMAIN" />;伺服器的安全性憑證已在昨天過期。這可能是因為設定錯誤,或是有攻擊者攔截您的連線。您電腦的時鐘目前設為 <ph name="CURRENT_DATE" />,這是正確的時間嗎?如果不是的話,請更新系統時鐘,然後重新整理這個網頁。}other{這個伺服器無法證明所在網域是 <ph name="DOMAIN" />;伺服器的安全性憑證已在 # 天前過期。這可能是因為設定錯誤,或是有攻擊者攔截您的連線。您電腦的時鐘目前設為 <ph name="CURRENT_DATE" />,這是正確的時間嗎?如果不是的話,請更新系統時鐘,然後重新整理這個網頁。}}</translation> <translation id="1656489000284462475">取件</translation> +<translation id="1662550410081243962">儲存及填入付款方式</translation> <translation id="1663943134801823270">信用卡和地址資訊皆來自 Chrome。你可以在<ph name="BEGIN_LINK" />設定<ph name="END_LINK" />頁面管理這些資訊。</translation> <translation id="1676269943528358898"><ph name="SITE" /> 通常使用加密方式保護您的資訊。但 Google Chrome 這次嘗試連線到 <ph name="SITE" /> 時,該網站傳回了異常且錯誤的憑證。這可能是因為有攻擊者企圖偽裝成 <ph name="SITE" />,或是受到 Wi-Fi 登入畫面影響而造成連線中斷。不過請放心,Google Chrome 已及時停止連線,並未傳輸任何資料,因此您的資訊仍然安全無虞。</translation> <translation id="168841957122794586">伺服器憑證含有防護力薄弱的加密編譯金鑰。</translation> +<translation id="1697532407822776718">大功告成!</translation> <translation id="1706954506755087368">{1,plural, =1{這個伺服器無法證明所在網域是 <ph name="DOMAIN" />;伺服器的安全性憑證預定明天才生效。這可能是因為設定錯誤,或是有攻擊者攔截您的連線。}other{這個伺服器無法證明所在網域是 <ph name="DOMAIN" />;伺服器的安全性憑證預定 # 天後才生效。這可能是因為設定錯誤,或是有攻擊者攔截您的連線。}}</translation> <translation id="1710259589646384581">作業系統</translation> <translation id="1721312023322545264">你必須獲得<ph name="NAME" />授權,才能造訪這個網站</translation> @@ -193,6 +196,7 @@ <translation id="225207911366869382">這個政策值已遭汰換。</translation> <translation id="2262243747453050782">HTTP 錯誤</translation> <translation id="2270484714375784793">電話號碼</translation> +<translation id="2283340219607151381">儲存及填入地址</translation> <translation id="2292556288342944218">您的網際網路存取權遭到封鎖</translation> <translation id="2316887270356262533">釋出不到 1 MB。下次造訪部分網站時,載入速度可能會變慢。</translation> <translation id="2317259163369394535"><ph name="DOMAIN" /> 要求提供使用者名稱和密碼。</translation> @@ -274,6 +278,7 @@ <translation id="2851634818064021665">你必須獲得授權,才能造訪這個網站</translation> <translation id="2856444702002559011">攻擊者可能會試圖從 <ph name="BEGIN_BOLD" /><ph name="SITE" /><ph name="END_BOLD" /> 竊取你的資訊 (例如密碼、郵件或信用卡資料)。<ph name="BEGIN_LEARN_MORE_LINK" />瞭解詳情<ph name="END_LEARN_MORE_LINK" /></translation> <translation id="2881276955470682203">要儲存卡片嗎?</translation> +<translation id="2903493209154104877">地址</translation> <translation id="2909946352844186028">系統偵測到網路變更。</translation> <translation id="2916038427272391327">關閉其他程式</translation> <translation id="2922350208395188000">無法檢查伺服器憑證。</translation> @@ -1146,6 +1151,7 @@ <translation id="973773823069644502">新增快遞地址</translation> <translation id="975560348586398090">{COUNT,plural, =0{無}=1{1 個項目}other{# 個項目}}</translation> <translation id="981121421437150478">離線</translation> +<translation id="984275831282074731">付款方式</translation> <translation id="985199708454569384"><p>如果畫面顯示這則錯誤訊息,表示您電腦或行動裝置的日期或時間不正確。</p> <p>如要修正這項錯誤,請開啟裝置的時鐘,確認時間和日期是否正確無誤。</p></translation> <translation id="988159990683914416">開發人員版本</translation>
diff --git a/components/supervised_user_error_page/OWNERS b/components/supervised_user_error_page/OWNERS index 5ce5d83..c9ea2346 100644 --- a/components/supervised_user_error_page/OWNERS +++ b/components/supervised_user_error_page/OWNERS
@@ -1,4 +1,3 @@ -aberent@chromium.org bauerb@chromium.org pam@chromium.org treib@chromium.org
diff --git a/components/sync/BUILD.gn b/components/sync/BUILD.gn index 27934aaf..bef27f0 100644 --- a/components/sync/BUILD.gn +++ b/components/sync/BUILD.gn
@@ -931,7 +931,6 @@ "//third_party/pyftpdlib/", "//third_party/pywebsocket/src/mod_pywebsocket/", "//third_party/tlslite/", - "$root_out_dir/pyproto/google/", ] deps = [
diff --git a/components/sync/driver/about_sync_util.cc b/components/sync/driver/about_sync_util.cc index 44c91e02..be243e70 100644 --- a/components/sync/driver/about_sync_util.cc +++ b/components/sync/driver/about_sync_util.cc
@@ -50,25 +50,30 @@ const char kGetAllNodesCallback[] = "chrome.sync.getAllNodesCallback"; const char kRegisterForEvents[] = "registerForEvents"; const char kRegisterForPerTypeCounters[] = "registerForPerTypeCounters"; +const char kRequestIncludeSpecificsInitialState[] = + "requestIncludeSpecificsInitialState"; const char kRequestListOfTypes[] = "requestListOfTypes"; +const char kRequestStart[] = "requestStart"; +const char kRequestStop[] = "requestStop"; const char kRequestUpdatedAboutInfo[] = "requestUpdatedAboutInfo"; const char kRequestUserEventsVisibility[] = "requestUserEventsVisibility"; const char kSetIncludeSpecifics[] = "setIncludeSpecifics"; +const char kTriggerRefresh[] = "triggerRefresh"; const char kUserEventsVisibilityCallback[] = "chrome.sync.userEventsVisibilityCallback"; const char kWriteUserEvent[] = "writeUserEvent"; -const char kRequestStart[] = "requestStart"; -const char kRequestStop[] = "requestStop"; -const char kTriggerRefresh[] = "triggerRefresh"; // Other strings. const char kCommit[] = "commit"; const char kCounters[] = "counters"; const char kCounterType[] = "counterType"; +const char kIncludeSpecifics[] = "includeSpecifics"; const char kModelType[] = "modelType"; const char kOnAboutInfoUpdated[] = "onAboutInfoUpdated"; const char kOnCountersUpdated[] = "onCountersUpdated"; const char kOnProtocolEvent[] = "onProtocolEvent"; +const char kOnReceivedIncludeSpecificsInitialState[] = + "onReceivedIncludeSpecificsInitialState"; const char kOnReceivedListOfTypes[] = "onReceivedListOfTypes"; const char kStatus[] = "status"; const char kTypes[] = "types";
diff --git a/components/sync/driver/about_sync_util.h b/components/sync/driver/about_sync_util.h index a372e07..f14264d6 100644 --- a/components/sync/driver/about_sync_util.h +++ b/components/sync/driver/about_sync_util.h
@@ -47,25 +47,28 @@ extern const char kGetAllNodesCallback[]; extern const char kRegisterForEvents[]; extern const char kRegisterForPerTypeCounters[]; +extern const char kRequestIncludeSpecificsInitialState[]; extern const char kRequestListOfTypes[]; +extern const char kRequestStart[]; +extern const char kRequestStop[]; extern const char kRequestUpdatedAboutInfo[]; extern const char kRequestUserEventsVisibility[]; extern const char kSetIncludeSpecifics[]; +extern const char kTriggerRefresh[]; extern const char kUserEventsVisibilityCallback[]; extern const char kWriteUserEvent[]; -extern const char kRequestStart[]; -extern const char kRequestStop[]; -extern const char kTriggerRefresh[]; // Other strings. // Must match the constants used in the resource files. extern const char kCommit[]; extern const char kCounters[]; extern const char kCounterType[]; +extern const char kIncludeSpecifics[]; extern const char kModelType[]; extern const char kOnAboutInfoUpdated[]; extern const char kOnCountersUpdated[]; extern const char kOnProtocolEvent[]; +extern const char kOnReceivedIncludeSpecificsInitialState[]; extern const char kOnReceivedListOfTypes[]; extern const char kStatus[]; extern const char kTypes[];
diff --git a/components/sync/driver/resources/chrome_sync.js b/components/sync/driver/resources/chrome_sync.js index 0e21cc80ea..14985101 100644 --- a/components/sync/driver/resources/chrome_sync.js +++ b/components/sync/driver/resources/chrome_sync.js
@@ -62,7 +62,7 @@ } /** - * Asks the browser to refresh our snapshot of sync state. Should result + * Asks the browser to refresh our snapshot of sync state. Should result * in an onAboutInfoUpdated event being emitted. */ var requestUpdatedAboutInfo = function() { @@ -70,7 +70,7 @@ }; /** - * Asks the browser to send us the list of registered types. Should result + * Asks the browser to send us the list of registered types. Should result * in an onReceivedListOfTypes event being emitted. */ var requestListOfTypes = function() { @@ -78,6 +78,15 @@ }; /** + * Asks the browser to send us the initial state of the "include specifics" + * flag. Should result in an onReceivedIncludeSpecificsInitialState event + * being emitted. + */ + var requestIncludeSpecificsInitialState = function() { + chrome.send('requestIncludeSpecificsInitialState'); + } + + /** * Asks the browser if we should show the User Events tab or not. */ var requestUserEventsVisibility = function() { @@ -170,6 +179,7 @@ registerForEvents: registerForEvents, registerForPerTypeCounters: registerForPerTypeCounters, requestUpdatedAboutInfo: requestUpdatedAboutInfo, + requestIncludeSpecificsInitialState: requestIncludeSpecificsInitialState, requestListOfTypes: requestListOfTypes, requestUserEventsVisibility: requestUserEventsVisibility, setIncludeSpecifics: setIncludeSpecifics,
diff --git a/components/sync/driver/resources/data.js b/components/sync/driver/resources/data.js index 420b7a6..baca0554 100644 --- a/components/sync/driver/resources/data.js +++ b/components/sync/driver/resources/data.js
@@ -191,11 +191,20 @@ onReceivedListOfTypes); } +function onReceivedIncludeSpecificsInitialState(e) { + $('capture-specifics').checked = e.details.includeSpecifics; +} + document.addEventListener('DOMContentLoaded', function() { chrome.sync.events.addEventListener( 'onReceivedListOfTypes', onReceivedListOfTypes); chrome.sync.requestListOfTypes(); + + chrome.sync.events.addEventListener( + 'onReceivedIncludeSpecificsInitialState', + onReceivedIncludeSpecificsInitialState); + chrome.sync.requestIncludeSpecificsInitialState(); }); var dumpToFileLink = $('dump-to-file');
diff --git a/components/sync/driver/sync_driver_switches.cc b/components/sync/driver/sync_driver_switches.cc index e21fa2a..2969d45 100644 --- a/components/sync/driver/sync_driver_switches.cc +++ b/components/sync/driver/sync_driver_switches.cc
@@ -17,6 +17,10 @@ // Enables feature to avoid unnecessary GetUpdate requests. const char kSyncEnableGetUpdateAvoidance[] = "sync-enable-get-update-avoidance"; +// Controls whether the initial state of the "Capture Specifics" flag on +// chrome://sync-internals is enabled. +const char kSyncIncludeSpecificsInProtocolLog[] = "sync-include-specifics"; + // Overrides the default server used for profile sync. const char kSyncServiceURL[] = "sync-url";
diff --git a/components/sync/driver/sync_driver_switches.h b/components/sync/driver/sync_driver_switches.h index ef0d7f9..6480612 100644 --- a/components/sync/driver/sync_driver_switches.h +++ b/components/sync/driver/sync_driver_switches.h
@@ -15,6 +15,7 @@ extern const char kSyncDeferredStartupTimeoutSeconds[]; extern const char kSyncDisableDeferredStartup[]; extern const char kSyncEnableGetUpdateAvoidance[]; +extern const char kSyncIncludeSpecificsInProtocolLog[]; extern const char kSyncServiceURL[]; extern const char kSyncShortInitialRetryOverride[]; extern const char kSyncShortNudgeDelayForTest[];
diff --git a/components/sync_bookmarks/BUILD.gn b/components/sync_bookmarks/BUILD.gn index 02920cff..e264a6f 100644 --- a/components/sync_bookmarks/BUILD.gn +++ b/components/sync_bookmarks/BUILD.gn
@@ -61,12 +61,14 @@ "//base/test:test_support", "//components/bookmarks/browser", "//components/bookmarks/test", + "//components/favicon/core/test:test_support", "//components/history/core/browser", "//components/prefs:test_support", "//components/sync", "//components/sync:test_support_driver", "//components/sync:test_support_engine", "//components/sync:test_support_model", + "//components/undo", "//testing/gmock", "//testing/gtest", ]
diff --git a/components/sync_bookmarks/bookmark_local_changes_builder.cc b/components/sync_bookmarks/bookmark_local_changes_builder.cc index 2de8a12..64f5c36 100644 --- a/components/sync_bookmarks/bookmark_local_changes_builder.cc +++ b/components/sync_bookmarks/bookmark_local_changes_builder.cc
@@ -17,9 +17,11 @@ namespace sync_bookmarks { BookmarkLocalChangesBuilder::BookmarkLocalChangesBuilder( - const SyncedBookmarkTracker* const bookmark_tracker) - : bookmark_tracker_(bookmark_tracker) { + const SyncedBookmarkTracker* const bookmark_tracker, + bookmarks::BookmarkModel* bookmark_model) + : bookmark_tracker_(bookmark_tracker), bookmark_model_(bookmark_model) { DCHECK(bookmark_tracker); + DCHECK(bookmark_model); } std::vector<syncer::CommitRequestData> @@ -64,7 +66,7 @@ data.unique_position = metadata->unique_position(); // Assign specifics only for the non-deletion case. In case of deletion, // EntityData should contain empty specifics to indicate deletion. - data.specifics = CreateSpecificsFromBookmarkNode(node); + data.specifics = CreateSpecificsFromBookmarkNode(node, bookmark_model_); } request.entity = data.PassToPtr(); request.sequence_number = metadata->sequence_number();
diff --git a/components/sync_bookmarks/bookmark_local_changes_builder.h b/components/sync_bookmarks/bookmark_local_changes_builder.h index 0a5fd06..e8938159 100644 --- a/components/sync_bookmarks/bookmark_local_changes_builder.h +++ b/components/sync_bookmarks/bookmark_local_changes_builder.h
@@ -9,21 +9,27 @@ #include "components/sync/engine/non_blocking_sync_common.h" +namespace bookmarks { +class BookmarkModel; +} + namespace sync_bookmarks { class SyncedBookmarkTracker; class BookmarkLocalChangesBuilder { public: - // |bookmark_tracker| must not be null and must outlive this object. - explicit BookmarkLocalChangesBuilder( - const SyncedBookmarkTracker* bookmark_tracker); + // |bookmark_tracker| and |bookmark_model| must not be null and must outlive + // this object. + BookmarkLocalChangesBuilder(const SyncedBookmarkTracker* bookmark_tracker, + bookmarks::BookmarkModel* bookmark_model); // Builds the commit requests list. std::vector<syncer::CommitRequestData> BuildCommitRequests( size_t max_entries) const; private: const SyncedBookmarkTracker* const bookmark_tracker_; + bookmarks::BookmarkModel* const bookmark_model_; DISALLOW_COPY_AND_ASSIGN(BookmarkLocalChangesBuilder); };
diff --git a/components/sync_bookmarks/bookmark_model_merger.cc b/components/sync_bookmarks/bookmark_model_merger.cc index a27f8ea..95d412a 100644 --- a/components/sync_bookmarks/bookmark_model_merger.cc +++ b/components/sync_bookmarks/bookmark_model_merger.cc
@@ -170,13 +170,16 @@ BookmarkModelMerger::BookmarkModelMerger( const UpdateResponseDataList* updates, bookmarks::BookmarkModel* bookmark_model, + favicon::FaviconService* favicon_service, SyncedBookmarkTracker* bookmark_tracker) : updates_(updates), bookmark_model_(bookmark_model), + favicon_service_(favicon_service), bookmark_tracker_(bookmark_tracker), updates_tree_( BuildUpdatesTreeWithoutTombstonesWithSortedChildren(updates_)) { DCHECK(bookmark_tracker_->IsEmpty()); + DCHECK(favicon_service); } BookmarkModelMerger::~BookmarkModelMerger() {} @@ -272,7 +275,7 @@ const bookmarks::BookmarkNode* bookmark_node = CreateBookmarkNodeFromSpecifics( remote_update_entity.specifics.bookmark(), local_parent, index, - remote_update_entity.is_folder, bookmark_model_); + remote_update_entity.is_folder, bookmark_model_, favicon_service_); if (!bookmark_node) { // We ignore bookmarks we can't add. DLOG(ERROR) << "Failed to create bookmark node with title " @@ -332,7 +335,7 @@ const bookmarks::BookmarkNode* node = parent->GetChild(index); const sync_pb::EntitySpecifics specifics = - CreateSpecificsFromBookmarkNode(node); + CreateSpecificsFromBookmarkNode(node, bookmark_model_); bookmark_tracker_->Add(sync_id, node, server_version, creation_time, pos.ToProto(), specifics); // Mark the entity that it needs to be committed.
diff --git a/components/sync_bookmarks/bookmark_model_merger.h b/components/sync_bookmarks/bookmark_model_merger.h index 580c44a..322e3fc 100644 --- a/components/sync_bookmarks/bookmark_model_merger.h +++ b/components/sync_bookmarks/bookmark_model_merger.h
@@ -16,6 +16,10 @@ class BookmarkNode; } // namespace bookmarks +namespace favicon { +class FaviconService; +} // namespace favicon + namespace sync_bookmarks { class SyncedBookmarkTracker; @@ -27,10 +31,11 @@ // used by the BookmarkModelTypeProcessor(). class BookmarkModelMerger { public: - // |updates|, |bookmark_model| and |bookmark_tracker| must not be null and - // must outlive this object. + // |updates|, |bookmark_model|, |favicon_service| and |bookmark_tracker| must + // not be null and must outlive this object. BookmarkModelMerger(const syncer::UpdateResponseDataList* updates, bookmarks::BookmarkModel* bookmark_model, + favicon::FaviconService* favicon_service, SyncedBookmarkTracker* bookmark_tracker); ~BookmarkModelMerger(); @@ -71,6 +76,7 @@ const syncer::UpdateResponseDataList* const updates_; bookmarks::BookmarkModel* const bookmark_model_; + favicon::FaviconService* const favicon_service_; SyncedBookmarkTracker* const bookmark_tracker_; // Stores the tree of |updates_| as a map from a remote node to a // vector of remote children. It's constructed in the c'tor.
diff --git a/components/sync_bookmarks/bookmark_model_merger_unittest.cc b/components/sync_bookmarks/bookmark_model_merger_unittest.cc index 363af8d..ecc78dc 100644 --- a/components/sync_bookmarks/bookmark_model_merger_unittest.cc +++ b/components/sync_bookmarks/bookmark_model_merger_unittest.cc
@@ -11,11 +11,13 @@ #include "base/strings/utf_string_conversions.h" #include "components/bookmarks/browser/bookmark_model.h" #include "components/bookmarks/test/test_bookmark_client.h" +#include "components/favicon/core/test/mock_favicon_service.h" #include "components/sync/base/unique_position.h" #include "components/sync_bookmarks/synced_bookmark_tracker.h" #include "testing/gmock/include/gmock/gmock.h" #include "testing/gtest/include/gtest/gtest.h" +using testing::_; using testing::Eq; using testing::UnorderedElementsAre; @@ -33,7 +35,9 @@ const std::string& title, const std::string& url, bool is_folder, - const syncer::UniquePosition& unique_position) { + const syncer::UniquePosition& unique_position, + const std::string& icon_url = std::string(), + const std::string& icon_data = std::string()) { syncer::EntityData data; data.id = server_id; data.parent_id = parent_id; @@ -43,6 +47,8 @@ data.specifics.mutable_bookmark(); bookmark_specifics->set_title(title); bookmark_specifics->set_url(url); + bookmark_specifics->set_icon_url(icon_url); + bookmark_specifics->set_favicon(icon_data); data.is_folder = is_folder; syncer::UpdateResponseData response_data; @@ -223,7 +229,10 @@ SyncedBookmarkTracker tracker(std::vector<NodeMetadataPair>(), std::make_unique<sync_pb::ModelTypeState>()); - BookmarkModelMerger(&updates, bookmark_model.get(), &tracker).Merge(); + testing::NiceMock<favicon::MockFaviconService> favicon_service; + BookmarkModelMerger(&updates, bookmark_model.get(), &favicon_service, + &tracker) + .Merge(); ASSERT_THAT(bookmark_bar_node->child_count(), Eq(3)); // Verify Folder 1. @@ -368,7 +377,10 @@ SyncedBookmarkTracker tracker(std::vector<NodeMetadataPair>(), std::make_unique<sync_pb::ModelTypeState>()); - BookmarkModelMerger(&updates, bookmark_model.get(), &tracker).Merge(); + testing::NiceMock<favicon::MockFaviconService> favicon_service; + BookmarkModelMerger(&updates, bookmark_model.get(), &favicon_service, + &tracker) + .Merge(); ASSERT_THAT(bookmark_bar_node->child_count(), Eq(3)); EXPECT_THAT(bookmark_bar_node->GetChild(0)->GetTitle(), @@ -390,4 +402,57 @@ EXPECT_TRUE(PositionsInTrackerMatchModel(bookmark_bar_node, tracker)); } +TEST(BookmarkModelMergerTest, ShouldMergeFaviconsForRemoteNodesOnly) { + const std::string kTitle1 = "title1"; + const GURL kUrl1("http://www.url1.com"); + // -------- The local model -------- + // bookmark_bar + // |- title 1 + + std::unique_ptr<bookmarks::BookmarkModel> bookmark_model = + bookmarks::TestBookmarkClient::CreateModel(); + + const bookmarks::BookmarkNode* bookmark_bar_node = + bookmark_model->bookmark_bar_node(); + bookmark_model->AddURL( + /*parent=*/bookmark_bar_node, /*index=*/0, base::UTF8ToUTF16(kTitle1), + kUrl1); + + // -------- The remote model -------- + // bookmark_bar + // |- title 2 + + const std::string kTitle2 = "title2"; + const std::string kId2 = "Id2"; + const GURL kUrl2("http://www.url2.com"); + const GURL kIcon2Url("http://www.icon-url.com"); + syncer::UniquePosition pos2 = syncer::UniquePosition::InitialPosition( + syncer::UniquePosition::RandomSuffix()); + + syncer::UpdateResponseDataList updates; + updates.push_back(CreateBookmarkBarNodeUpdateData()); + updates.push_back(CreateUpdateResponseData( + /*server_id=*/kId2, /*parent_id=*/kBookmarkBarId, kTitle2, kUrl2.spec(), + /*is_folder=*/false, /*unique_position=*/pos2, kIcon2Url.spec(), + /*icon_data=*/"PNG")); + + // -------- The expected merge outcome -------- + // bookmark_bar + // |- title 2 + // |- title 1 + + SyncedBookmarkTracker tracker(std::vector<NodeMetadataPair>(), + std::make_unique<sync_pb::ModelTypeState>()); + testing::NiceMock<favicon::MockFaviconService> favicon_service; + + // Favicon should be set for the remote node. + EXPECT_CALL(favicon_service, + AddPageNoVisitForBookmark(kUrl2, base::UTF8ToUTF16(kTitle2))); + EXPECT_CALL(favicon_service, MergeFavicon(kUrl2, _, _, _, _)); + + BookmarkModelMerger(&updates, bookmark_model.get(), &favicon_service, + &tracker) + .Merge(); +} + } // namespace sync_bookmarks
diff --git a/components/sync_bookmarks/bookmark_model_observer_impl.cc b/components/sync_bookmarks/bookmark_model_observer_impl.cc index e273c2c..13c5de8 100644 --- a/components/sync_bookmarks/bookmark_model_observer_impl.cc +++ b/components/sync_bookmarks/bookmark_model_observer_impl.cc
@@ -49,8 +49,9 @@ // We shouldn't see changes to the top-level nodes. DCHECK(!model->is_permanent_node(node)); - // TODO(crbug.com/516866): continue only if - // model->client()->CanSyncNode(node). + if (!model->client()->CanSyncNode(node)) { + return; + } const SyncedBookmarkTracker::Entity* entity = bookmark_tracker_->GetEntityForBookmarkNode(node); DCHECK(entity); @@ -61,7 +62,8 @@ const sync_pb::UniquePosition unique_position = ComputePosition(*new_parent, new_index, sync_id).ToProto(); - sync_pb::EntitySpecifics specifics = CreateSpecificsFromBookmarkNode(node); + sync_pb::EntitySpecifics specifics = + CreateSpecificsFromBookmarkNode(node, model); bookmark_tracker_->Update(sync_id, entity->metadata()->server_version(), modification_time, unique_position, specifics); @@ -75,8 +77,9 @@ const bookmarks::BookmarkNode* parent, int index) { const bookmarks::BookmarkNode* node = parent->GetChild(index); - // TODO(crbug.com/516866): continue only if - // model->client()->CanSyncNode(node). + if (!model->client()->CanSyncNode(node)) { + return; + } const SyncedBookmarkTracker::Entity* parent_entity = bookmark_tracker_->GetEntityForBookmarkNode(parent); @@ -94,7 +97,8 @@ const sync_pb::UniquePosition unique_position = ComputePosition(*parent, index, sync_id).ToProto(); - sync_pb::EntitySpecifics specifics = CreateSpecificsFromBookmarkNode(node); + sync_pb::EntitySpecifics specifics = + CreateSpecificsFromBookmarkNode(node, model); bookmark_tracker_->Add(sync_id, node, server_version, creation_time, unique_position, specifics); @@ -108,8 +112,9 @@ const bookmarks::BookmarkNode* parent, int old_index, const bookmarks::BookmarkNode* node) { - // TODO(crbug.com/516866): continue only if - // model->client()->CanSyncNode(node). + if (!model->client()->CanSyncNode(node)) { + return; + } ProcessDelete(parent, node); nudge_for_commit_closure_.Run(); } @@ -133,8 +138,9 @@ void BookmarkModelObserverImpl::BookmarkNodeChanged( bookmarks::BookmarkModel* model, const bookmarks::BookmarkNode* node) { - // TODO(crbug.com/516866): continue only if - // model->client()->CanSyncNode(node). + if (!model->client()->CanSyncNode(node)) { + return; + } // We shouldn't see changes to the top-level nodes. DCHECK(!model->is_permanent_node(node)); @@ -158,8 +164,14 @@ } const std::string& sync_id = entity->metadata()->server_id(); const base::Time modification_time = base::Time::Now(); - sync_pb::EntitySpecifics specifics = CreateSpecificsFromBookmarkNode(node); - + sync_pb::EntitySpecifics specifics = + CreateSpecificsFromBookmarkNode(node, model); + if (entity->MatchesSpecificsHash(specifics)) { + // We should push data to the server only if there is an actual change in + // the data. We could hit this code path without having actual changes + // (e.g.upon a favicon load). + return; + } bookmark_tracker_->Update(sync_id, entity->metadata()->server_version(), modification_time, entity->metadata()->unique_position(), specifics); @@ -177,14 +189,30 @@ void BookmarkModelObserverImpl::BookmarkNodeFaviconChanged( bookmarks::BookmarkModel* model, const bookmarks::BookmarkNode* node) { - NOTIMPLEMENTED(); + if (!model->client()->CanSyncNode(node)) { + return; + } + + // We shouldn't see changes to the top-level nodes. + DCHECK(!model->is_permanent_node(node)); + + // Ignore favicons that are being loaded. + if (!node->is_favicon_loaded()) { + // Subtle way to trigger a load of the favicon. This very same function will + // be notified when the favicon gets loaded (read from HistoryService and + // cached in RAM within BookmarkModel). + model->GetFavicon(node); + return; + } + BookmarkNodeChanged(model, node); } void BookmarkModelObserverImpl::BookmarkNodeChildrenReordered( bookmarks::BookmarkModel* model, const bookmarks::BookmarkNode* node) { - // TODO(crbug.com/516866): continue only if - // model->client()->CanSyncNode(node). + if (!model->client()->CanSyncNode(node)) { + return; + } // The given node's children got reordered. We need to reorder all the // corresponding sync node. @@ -220,7 +248,7 @@ previous_position = position; const sync_pb::EntitySpecifics specifics = - CreateSpecificsFromBookmarkNode(node); + CreateSpecificsFromBookmarkNode(node, model); bookmark_tracker_->Update(sync_id, entity->metadata()->server_version(), modification_time, position.ToProto(), specifics);
diff --git a/components/sync_bookmarks/bookmark_model_observer_impl_unittest.cc b/components/sync_bookmarks/bookmark_model_observer_impl_unittest.cc index 4a83412..965a367 100644 --- a/components/sync_bookmarks/bookmark_model_observer_impl_unittest.cc +++ b/components/sync_bookmarks/bookmark_model_observer_impl_unittest.cc
@@ -6,6 +6,7 @@ #include <algorithm> #include <memory> +#include <utility> #include <vector> #include "base/strings/utf_string_conversions.h" @@ -443,6 +444,39 @@ EXPECT_TRUE(PositionOf(bookmark_node3).LessThan(PositionOf(bookmark_node2))); } +TEST_F(BookmarkModelObserverImplTest, ShouldNotSyncUnsyncableBookmarks) { + bookmarks::BookmarkPermanentNodeList extra_nodes; + extra_nodes.push_back( + std::make_unique<bookmarks::BookmarkPermanentNode>(100)); + bookmarks::BookmarkPermanentNode* extra_node = extra_nodes.back().get(); + auto client = std::make_unique<bookmarks::TestBookmarkClient>(); + client->SetExtraNodesToLoad(std::move(extra_nodes)); + + std::unique_ptr<bookmarks::BookmarkModel> model = + bookmarks::TestBookmarkClient::CreateModelWithClient(std::move(client)); + model->AddObserver(observer()); + + EXPECT_CALL(*nudge_for_commit_closure(), Run()).Times(0); + // In the TestBookmarkClient, descendants of extra nodes shouldn't be synced. + const bookmarks::BookmarkNode* unsyncable_node = + model->AddURL(/*parent=*/extra_node, /*index=*/0, + base::ASCIIToUTF16("Title"), GURL("http://www.url.com")); + // Only bookmark bar should be tracked. + EXPECT_THAT(bookmark_tracker()->TrackedEntitiesCountForTest(), 1U); + + EXPECT_CALL(*nudge_for_commit_closure(), Run()).Times(0); + // In the TestBookmarkClient, descendants of extra nodes shouldn't be synced. + model->SetTitle(unsyncable_node, base::ASCIIToUTF16("NewTitle")); + // Only bookmark bar should be tracked. + EXPECT_THAT(bookmark_tracker()->TrackedEntitiesCountForTest(), 1U); + + EXPECT_CALL(*nudge_for_commit_closure(), Run()).Times(0); + // In the TestBookmarkClient, descendants of extra nodes shouldn't be synced. + model->Remove(unsyncable_node); + // Only bookmark bar should be tracked. + EXPECT_THAT(bookmark_tracker()->TrackedEntitiesCountForTest(), 1U); +} + } // namespace } // namespace sync_bookmarks
diff --git a/components/sync_bookmarks/bookmark_model_type_processor.cc b/components/sync_bookmarks/bookmark_model_type_processor.cc index 033220ec..5cc94ac 100644 --- a/components/sync_bookmarks/bookmark_model_type_processor.cc +++ b/components/sync_bookmarks/bookmark_model_type_processor.cc
@@ -103,7 +103,7 @@ size_t max_entries, GetLocalChangesCallback callback) { DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_); - BookmarkLocalChangesBuilder builder(bookmark_tracker_.get()); + BookmarkLocalChangesBuilder builder(bookmark_tracker_.get(), bookmark_model_); std::vector<syncer::CommitRequestData> local_changes = builder.BuildCommitRequests(max_entries); std::move(callback).Run(std::move(local_changes)); @@ -146,7 +146,8 @@ bookmark_model_, bookmark_undo_service_, bookmark_model_observer_.get()); - BookmarkModelMerger(&updates, bookmark_model_, bookmark_tracker_.get()) + BookmarkModelMerger(&updates, bookmark_model_, favicon_service_, + bookmark_tracker_.get()) .Merge(); } schedule_save_closure_.Run(); @@ -155,8 +156,8 @@ } ScopedRemoteUpdateBookmarks update_bookmarks( bookmark_model_, bookmark_undo_service_, bookmark_model_observer_.get()); - BookmarkRemoteUpdatesHandler updates_handler(bookmark_model_, - bookmark_tracker_.get()); + BookmarkRemoteUpdatesHandler updates_handler( + bookmark_model_, favicon_service_, bookmark_tracker_.get()); updates_handler.Process(updates); bookmark_tracker_->set_model_type_state( std::make_unique<sync_pb::ModelTypeState>(model_type_state)); @@ -240,6 +241,12 @@ ConnectIfReady(); } +void BookmarkModelTypeProcessor::SetFaviconService( + favicon::FaviconService* favicon_service) { + DCHECK(favicon_service); + favicon_service_ = favicon_service; +} + base::WeakPtr<syncer::ModelTypeControllerDelegate> BookmarkModelTypeProcessor::GetWeakPtr() { DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_); @@ -251,6 +258,8 @@ StartCallback start_callback) { DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_); DCHECK(start_callback); + // |favicon_service_| should have been set by now. + DCHECK(favicon_service_); DVLOG(1) << "Sync is starting for Bookmarks"; cache_guid_ = request.cache_guid;
diff --git a/components/sync_bookmarks/bookmark_model_type_processor.h b/components/sync_bookmarks/bookmark_model_type_processor.h index 445d2d4..0eca800 100644 --- a/components/sync_bookmarks/bookmark_model_type_processor.h +++ b/components/sync_bookmarks/bookmark_model_type_processor.h
@@ -24,6 +24,10 @@ class BookmarkModel; } +namespace favicon { +class FaviconService; +} + namespace sync_bookmarks { class BookmarkModelObserverImpl; @@ -70,6 +74,11 @@ const base::RepeatingClosure& schedule_save_closure, bookmarks::BookmarkModel* model); + // Sets the favicon service used when processing remote updates. It must be + // called before the processor is ready to receive remote updates, and hence + // before OnSyncStarting() is called. |favicon_service| must not be null. + void SetFaviconService(favicon::FaviconService* favicon_service); + const SyncedBookmarkTracker* GetTrackerForTest() const; base::WeakPtr<syncer::ModelTypeControllerDelegate> GetWeakPtr(); @@ -100,6 +109,11 @@ // during startup, as part of the bookmark-loading process. bookmarks::BookmarkModel* bookmark_model_ = nullptr; + // Used to when processing remote updates to apply favicon information. It's + // not set at start up because it's only avialable after the bookmark model + // has been loaded. + favicon::FaviconService* favicon_service_ = nullptr; + // Used to suspend bookmark undo when processing remote changes. BookmarkUndoService* const bookmark_undo_service_;
diff --git a/components/sync_bookmarks/bookmark_model_type_processor_unittest.cc b/components/sync_bookmarks/bookmark_model_type_processor_unittest.cc index f7239a1..2f72302 100644 --- a/components/sync_bookmarks/bookmark_model_type_processor_unittest.cc +++ b/components/sync_bookmarks/bookmark_model_type_processor_unittest.cc
@@ -11,9 +11,11 @@ #include "base/test/scoped_task_environment.h" #include "components/bookmarks/browser/bookmark_model.h" #include "components/bookmarks/test/test_bookmark_client.h" +#include "components/favicon/core/test/mock_favicon_service.h" #include "components/sync/base/unique_position.h" #include "components/sync/driver/fake_sync_client.h" #include "components/sync/model/data_type_activation_request.h" +#include "components/undo/bookmark_undo_service.h" #include "testing/gmock/include/gmock/gmock.h" #include "testing/gtest/include/gtest/gtest.h" @@ -120,38 +122,27 @@ AssertState(processor, bookmarks); } -class TestSyncClient : public syncer::FakeSyncClient { - public: - explicit TestSyncClient(bookmarks::BookmarkModel* bookmark_model) - : bookmark_model_(bookmark_model) {} - - bookmarks::BookmarkModel* GetBookmarkModel() override { - return bookmark_model_; - } - - private: - bookmarks::BookmarkModel* bookmark_model_; -}; - class BookmarkModelTypeProcessorTest : public testing::Test { public: BookmarkModelTypeProcessorTest() : bookmark_model_(bookmarks::TestBookmarkClient::CreateModel()), - sync_client_(bookmark_model_.get()), - processor_(sync_client()->GetBookmarkUndoServiceIfExists()) { + processor_(&bookmark_undo_service_) { // TODO(crbug.com/516866): This class assumes model is loaded and sync has // started before running tests. We should test other variations (i.e. model // isn't loaded yet and/or sync didn't start yet). - processor_.ModelReadyToSync(/*metadata_str=*/std::string(), - schedule_save_closure_.Get(), - bookmark_model_.get()); + processor_.ModelReadyToSync( + /*metadata_str=*/std::string(), schedule_save_closure_.Get(), + bookmark_model_.get()); syncer::DataTypeActivationRequest request; request.cache_guid = kCacheGuid; + processor_.SetFaviconService(&favicon_service_); processor_.OnSyncStarting(request, base::DoNothing()); } - - TestSyncClient* sync_client() { return &sync_client_; } bookmarks::BookmarkModel* bookmark_model() { return bookmark_model_.get(); } + BookmarkUndoService* bookmark_undo_service() { + return &bookmark_undo_service_; + } + favicon::FaviconService* favicon_service() { return &favicon_service_; } BookmarkModelTypeProcessor* processor() { return &processor_; } base::MockCallback<base::RepeatingClosure>* schedule_save_closure() { return &schedule_save_closure_; @@ -161,7 +152,8 @@ base::test::ScopedTaskEnvironment task_environment_; NiceMock<base::MockCallback<base::RepeatingClosure>> schedule_save_closure_; std::unique_ptr<bookmarks::BookmarkModel> bookmark_model_; - TestSyncClient sync_client_; + BookmarkUndoService bookmark_undo_service_; + NiceMock<favicon::MockFaviconService> favicon_service_; BookmarkModelTypeProcessor processor_; }; @@ -296,8 +288,8 @@ bookmark_metadata->mutable_metadata()->set_server_id(kNodeId); // Create a new processor and init it with the metadata str. - BookmarkModelTypeProcessor new_processor( - sync_client()->GetBookmarkUndoServiceIfExists()); + BookmarkModelTypeProcessor new_processor(bookmark_undo_service()); + std::string metadata_str; model_metadata.SerializeToString(&metadata_str); new_processor.ModelReadyToSync(metadata_str, base::DoNothing(), @@ -330,8 +322,7 @@ model_metadata.mutable_model_type_state()->set_initial_sync_done(true); // Create a new processor and init it with the same metadata str. - BookmarkModelTypeProcessor new_processor( - sync_client()->GetBookmarkUndoServiceIfExists()); + BookmarkModelTypeProcessor new_processor(bookmark_undo_service()); model_metadata.SerializeToString(&metadata_str); new_processor.ModelReadyToSync(metadata_str, base::DoNothing(), bookmark_model());
diff --git a/components/sync_bookmarks/bookmark_remote_updates_handler.cc b/components/sync_bookmarks/bookmark_remote_updates_handler.cc index b9f5770..094ca0e 100644 --- a/components/sync_bookmarks/bookmark_remote_updates_handler.cc +++ b/components/sync_bookmarks/bookmark_remote_updates_handler.cc
@@ -78,13 +78,15 @@ const SyncedBookmarkTracker::Entity* tracked_entity, const SyncedBookmarkTracker::Entity* new_parent_tracked_entity, bookmarks::BookmarkModel* model, - SyncedBookmarkTracker* tracker) { + SyncedBookmarkTracker* tracker, + favicon::FaviconService* favicon_service) { const syncer::EntityData& update_entity = update.entity.value(); DCHECK(!update_entity.is_deleted()); DCHECK(tracked_entity); DCHECK(new_parent_tracked_entity); DCHECK(model); DCHECK(tracker); + DCHECK(favicon_service); const bookmarks::BookmarkNode* node = tracked_entity->bookmark_node(); const bookmarks::BookmarkNode* old_parent = node->parent(); const bookmarks::BookmarkNode* new_parent = @@ -98,7 +100,7 @@ return; } UpdateBookmarkNodeFromSpecifics(update_entity.specifics.bookmark(), node, - model); + model, favicon_service); // Compute index information before updating the |tracker|. const int old_index = old_parent->GetIndexOf(node); const int new_index = @@ -122,10 +124,14 @@ BookmarkRemoteUpdatesHandler::BookmarkRemoteUpdatesHandler( bookmarks::BookmarkModel* bookmark_model, + favicon::FaviconService* favicon_service, SyncedBookmarkTracker* bookmark_tracker) - : bookmark_model_(bookmark_model), bookmark_tracker_(bookmark_tracker) { + : bookmark_model_(bookmark_model), + favicon_service_(favicon_service), + bookmark_tracker_(bookmark_tracker) { DCHECK(bookmark_model); DCHECK(bookmark_tracker); + DCHECK(favicon_service); } void BookmarkRemoteUpdatesHandler::Process( @@ -302,7 +308,7 @@ update_entity.specifics.bookmark(), parent_node, ComputeChildNodeIndex(parent_node, update_entity.unique_position, bookmark_tracker_), - update_entity.is_folder, bookmark_model_); + update_entity.is_folder, bookmark_model_, favicon_service_); if (!bookmark_node) { // We ignore bookmarks we can't add. DLOG(ERROR) << "Failed to create bookmark node with title " @@ -361,7 +367,7 @@ return; } ApplyRemoteUpdate(update, tracked_entity, new_parent_entity, bookmark_model_, - bookmark_tracker_); + bookmark_tracker_, favicon_service_); } void BookmarkRemoteUpdatesHandler::ProcessRemoteDelete( @@ -495,7 +501,7 @@ syncer::ConflictResolution::USE_REMOTE, syncer::ConflictResolution::TYPE_SIZE); ApplyRemoteUpdate(update, tracked_entity, new_parent_entity, bookmark_model_, - bookmark_tracker_); + bookmark_tracker_, favicon_service_); } void BookmarkRemoteUpdatesHandler::RemoveEntityAndChildrenFromTracker(
diff --git a/components/sync_bookmarks/bookmark_remote_updates_handler.h b/components/sync_bookmarks/bookmark_remote_updates_handler.h index 9620e3c..a7d1303 100644 --- a/components/sync_bookmarks/bookmark_remote_updates_handler.h +++ b/components/sync_bookmarks/bookmark_remote_updates_handler.h
@@ -17,15 +17,20 @@ class BookmarkNode; } // namespace bookmarks +namespace favicon { +class FaviconService; +} // namespace favicon + namespace sync_bookmarks { // Responsible for processing one batch of remote updates received from the sync // server. class BookmarkRemoteUpdatesHandler { public: - // |bookmark_model| and |bookmark_tracker| must not be null and must outlive - // this object. + // |bookmark_model|, |favicon_service| and |bookmark_tracker| must not be null + // and must outlive this object. BookmarkRemoteUpdatesHandler(bookmarks::BookmarkModel* bookmark_model, + favicon::FaviconService* favicon_service, SyncedBookmarkTracker* bookmark_tracker); // Processes the updates received from the sync server in |updates| and // updates the |bookmark_model_| and |bookmark_tracker_| accordingly. @@ -87,6 +92,7 @@ void RemoveEntityAndChildrenFromTracker(const bookmarks::BookmarkNode* node); bookmarks::BookmarkModel* const bookmark_model_; + favicon::FaviconService* const favicon_service_; SyncedBookmarkTracker* const bookmark_tracker_; DISALLOW_COPY_AND_ASSIGN(BookmarkRemoteUpdatesHandler);
diff --git a/components/sync_bookmarks/bookmark_remote_updates_handler_unittest.cc b/components/sync_bookmarks/bookmark_remote_updates_handler_unittest.cc index 2f71d44..fb6edd3 100644 --- a/components/sync_bookmarks/bookmark_remote_updates_handler_unittest.cc +++ b/components/sync_bookmarks/bookmark_remote_updates_handler_unittest.cc
@@ -12,6 +12,7 @@ #include "base/strings/utf_string_conversions.h" #include "components/bookmarks/browser/bookmark_model.h" #include "components/bookmarks/test/test_bookmark_client.h" +#include "components/favicon/core/test/mock_favicon_service.h" #include "components/sync/base/hash_util.h" #include "components/sync/base/model_type.h" #include "components/sync/base/unique_position.h" @@ -21,6 +22,8 @@ #include "testing/gtest/include/gtest/gtest.h" using base::ASCIIToUTF16; +using testing::_; +using testing::ElementsAre; using testing::Eq; namespace sync_bookmarks { @@ -203,7 +206,9 @@ CreateBookmarkBarNodeUpdateData()}; // TODO(crbug.com/516866): Create a test fixture that would encapsulate // the merge functionality for all relevant tests. - BookmarkModelMerger(&bookmark_bar_updates, bookmark_model.get(), &tracker) + testing::NiceMock<favicon::MockFaviconService> favicon_service; + BookmarkModelMerger(&bookmark_bar_updates, bookmark_model.get(), + &favicon_service, &tracker) .Merge(); const std::string kId0 = "id0"; @@ -222,7 +227,8 @@ /*parent_id=*/kId0, /*is_deletion=*/false)); - BookmarkRemoteUpdatesHandler updates_handler(bookmark_model.get(), &tracker); + BookmarkRemoteUpdatesHandler updates_handler(bookmark_model.get(), + &favicon_service, &tracker); updates_handler.Process(updates); // All nodes should be tracked including the bookmark_bar. @@ -293,8 +299,9 @@ updates.push_back(CreateUpdateResponseData(/*server_id=*/kId2, /*parent_id=*/kId1, /*is_deletion=*/true)); - - BookmarkRemoteUpdatesHandler updates_handler(bookmark_model.get(), &tracker); + testing::NiceMock<favicon::MockFaviconService> favicon_service; + BookmarkRemoteUpdatesHandler updates_handler(bookmark_model.get(), + &favicon_service, &tracker); updates_handler.Process(updates); // |tracker| should be empty now. @@ -315,7 +322,9 @@ std::make_unique<sync_pb::ModelTypeState>()); const syncer::UpdateResponseDataList bookmark_bar_updates = { CreateBookmarkBarNodeUpdateData()}; - BookmarkModelMerger(&bookmark_bar_updates, bookmark_model.get(), &tracker) + testing::NiceMock<favicon::MockFaviconService> favicon_service; + BookmarkModelMerger(&bookmark_bar_updates, bookmark_model.get(), + &favicon_service, &tracker) .Merge(); const std::string kId0 = "id0"; @@ -343,7 +352,8 @@ /*server_id=*/kId1, /*parent_id=*/kBookmarkBarId, /*is_deletion=*/false, /*unique_position=*/pos1)); - BookmarkRemoteUpdatesHandler updates_handler(bookmark_model.get(), &tracker); + BookmarkRemoteUpdatesHandler updates_handler(bookmark_model.get(), + &favicon_service, &tracker); updates_handler.Process(updates); // All nodes should have been added to the model in the correct order. @@ -413,8 +423,9 @@ /*unique_position=*/ syncer::UniquePosition::Between(positions[1], positions[2], syncer::UniquePosition::RandomSuffix()))); - - BookmarkRemoteUpdatesHandler updates_handler(bookmark_model.get(), &tracker); + testing::NiceMock<favicon::MockFaviconService> favicon_service; + BookmarkRemoteUpdatesHandler updates_handler(bookmark_model.get(), + &favicon_service, &tracker); updates_handler.Process(updates); // Model should have been updated. @@ -479,8 +490,9 @@ /*unique_position=*/ syncer::UniquePosition::Between(positions[3], positions[4], syncer::UniquePosition::RandomSuffix()))); - - BookmarkRemoteUpdatesHandler updates_handler(bookmark_model.get(), &tracker); + testing::NiceMock<favicon::MockFaviconService> favicon_service; + BookmarkRemoteUpdatesHandler updates_handler(bookmark_model.get(), + &favicon_service, &tracker); updates_handler.Process(updates); // Model should have been updated. @@ -545,8 +557,9 @@ /*unique_position=*/ syncer::UniquePosition::InitialPosition( syncer::UniquePosition::RandomSuffix()))); - - BookmarkRemoteUpdatesHandler updates_handler(bookmark_model.get(), &tracker); + testing::NiceMock<favicon::MockFaviconService> favicon_service; + BookmarkRemoteUpdatesHandler updates_handler(bookmark_model.get(), + &favicon_service, &tracker); updates_handler.Process(updates); // Model should have been updated. @@ -556,6 +569,107 @@ Eq(ASCIIToUTF16(ids[4]))); } +TEST(BookmarkRemoteUpdatesHandlerReorderUpdatesTest, + ShouldMergeFaviconUponRemoteCreationsWithFavicon) { + // Prepare creation updates to construct this structure: + // bookmark_bar + // |- node0 + + std::unique_ptr<bookmarks::BookmarkModel> bookmark_model = + bookmarks::TestBookmarkClient::CreateModel(); + SyncedBookmarkTracker tracker(std::vector<NodeMetadataPair>(), + std::make_unique<sync_pb::ModelTypeState>()); + const syncer::UpdateResponseDataList bookmark_bar_updates = { + CreateBookmarkBarNodeUpdateData()}; + // TODO(crbug.com/516866): Create a test fixture that would encapsulate + // the merge functionality for all relevant tests. + testing::NiceMock<favicon::MockFaviconService> favicon_service; + BookmarkModelMerger(&bookmark_bar_updates, bookmark_model.get(), + &favicon_service, &tracker) + .Merge(); + const std::string kTitle = "Title"; + const GURL kUrl("http://www.url.com"); + const GURL kIconUrl("http://www.icon-url.com"); + + syncer::UpdateResponseDataList updates; + syncer::EntityData data; + data.id = "server_id"; + data.parent_id = kBookmarkBarId; + data.unique_position = syncer::UniquePosition::InitialPosition( + syncer::UniquePosition::RandomSuffix()) + .ToProto(); + sync_pb::BookmarkSpecifics* bookmark_specifics = + data.specifics.mutable_bookmark(); + // Use the server id as the title for simplicity. + bookmark_specifics->set_title(kTitle); + bookmark_specifics->set_url(kUrl.spec()); + bookmark_specifics->set_icon_url(kIconUrl.spec()); + bookmark_specifics->set_favicon("PNG"); + data.is_folder = false; + syncer::UpdateResponseData response_data; + response_data.entity = data.PassToPtr(); + // Similar to what's done in the loopback_server. + response_data.response_version = 0; + + updates.push_back(response_data); + + BookmarkRemoteUpdatesHandler updates_handler(bookmark_model.get(), + &favicon_service, &tracker); + EXPECT_CALL(favicon_service, + AddPageNoVisitForBookmark(kUrl, base::UTF8ToUTF16(kTitle))); + EXPECT_CALL(favicon_service, MergeFavicon(kUrl, kIconUrl, _, _, _)); + updates_handler.Process(updates); +} + +TEST(BookmarkRemoteUpdatesHandlerReorderUpdatesTest, + ShouldDeleteFaviconUponRemoteCreationsWithoutFavicon) { + // Prepare creation updates to construct this structure: + // bookmark_bar + // |- node0 + + std::unique_ptr<bookmarks::BookmarkModel> bookmark_model = + bookmarks::TestBookmarkClient::CreateModel(); + SyncedBookmarkTracker tracker(std::vector<NodeMetadataPair>(), + std::make_unique<sync_pb::ModelTypeState>()); + const syncer::UpdateResponseDataList bookmark_bar_updates = { + CreateBookmarkBarNodeUpdateData()}; + // TODO(crbug.com/516866): Create a test fixture that would encapsulate + // the merge functionality for all relevant tests. + testing::NiceMock<favicon::MockFaviconService> favicon_service; + BookmarkModelMerger(&bookmark_bar_updates, bookmark_model.get(), + &favicon_service, &tracker) + .Merge(); + const std::string kTitle = "Title"; + const GURL kUrl("http://www.url.com"); + + syncer::UpdateResponseDataList updates; + syncer::EntityData data; + data.id = "server_id"; + data.parent_id = kBookmarkBarId; + data.unique_position = syncer::UniquePosition::InitialPosition( + syncer::UniquePosition::RandomSuffix()) + .ToProto(); + sync_pb::BookmarkSpecifics* bookmark_specifics = + data.specifics.mutable_bookmark(); + // Use the server id as the title for simplicity. + bookmark_specifics->set_title(kTitle); + bookmark_specifics->set_url(kUrl.spec()); + data.is_folder = false; + syncer::UpdateResponseData response_data; + response_data.entity = data.PassToPtr(); + // Similar to what's done in the loopback_server. + response_data.response_version = 0; + + updates.push_back(response_data); + + BookmarkRemoteUpdatesHandler updates_handler(bookmark_model.get(), + &favicon_service, &tracker); + EXPECT_CALL(favicon_service, + DeleteFaviconMappings(ElementsAre(kUrl), + favicon_base::IconType::kFavicon)); + updates_handler.Process(updates); +} + } // namespace } // namespace sync_bookmarks
diff --git a/components/sync_bookmarks/bookmark_specifics_conversions.cc b/components/sync_bookmarks/bookmark_specifics_conversions.cc index 9030829..9951385a 100644 --- a/components/sync_bookmarks/bookmark_specifics_conversions.cc +++ b/components/sync_bookmarks/bookmark_specifics_conversions.cc
@@ -11,7 +11,9 @@ #include "base/strings/utf_string_conversions.h" #include "components/bookmarks/browser/bookmark_model.h" #include "components/bookmarks/browser/bookmark_node.h" +#include "components/favicon/core/favicon_service.h" #include "components/sync/protocol/sync.pb.h" +#include "ui/gfx/favicon_size.h" #include "url/gurl.h" namespace sync_bookmarks { @@ -43,20 +45,77 @@ return meta_info_map; } +// Sets the favicon of the given bookmark node from the given specifics. +void SetBookmarkFaviconFromSpecifics( + const sync_pb::BookmarkSpecifics& specifics, + const bookmarks::BookmarkNode* bookmark_node, + favicon::FaviconService* favicon_service) { + DCHECK(bookmark_node); + DCHECK(favicon_service); + + favicon_service->AddPageNoVisitForBookmark(bookmark_node->url(), + bookmark_node->GetTitle()); + + const std::string& icon_bytes_str = specifics.favicon(); + scoped_refptr<base::RefCountedString> icon_bytes( + new base::RefCountedString()); + icon_bytes->data().assign(icon_bytes_str); + + const GURL icon_url(specifics.icon_url()); + + if (icon_bytes->size() == 0) { + DCHECK(icon_url.is_empty()); + // Empty icon URL and no bitmap data means no icon mapping. + favicon_service->DeleteFaviconMappings({bookmark_node->url()}, + favicon_base::IconType::kFavicon); + return; + } + + // The client may have cached the favicon at 2x. Use MergeFavicon() as not to + // overwrite the cached 2x favicon bitmap. Sync favicons are always + // gfx::kFaviconSize in width and height. Store the favicon into history + // as such. + gfx::Size pixel_size(gfx::kFaviconSize, gfx::kFaviconSize); + favicon_service->MergeFavicon(bookmark_node->url(), icon_url, + favicon_base::IconType::kFavicon, icon_bytes, + pixel_size); +} + } // namespace sync_pb::EntitySpecifics CreateSpecificsFromBookmarkNode( - const bookmarks::BookmarkNode* node) { + const bookmarks::BookmarkNode* node, + bookmarks::BookmarkModel* model) { sync_pb::EntitySpecifics specifics; sync_pb::BookmarkSpecifics* bm_specifics = specifics.mutable_bookmark(); bm_specifics->set_url(node->url().spec()); - // TODO(crbug.com/516866): Set the favicon. bm_specifics->set_title(base::UTF16ToUTF8(node->GetTitle())); bm_specifics->set_creation_time_us( node->date_added().ToDeltaSinceWindowsEpoch().InMicroseconds()); - bm_specifics->set_icon_url(node->icon_url() ? node->icon_url()->spec() - : std::string()); + // Encodes a bookmark's favicon into raw PNG data. + scoped_refptr<base::RefCountedMemory> favicon_bytes(nullptr); + const gfx::Image& favicon = model->GetFavicon(node); + // Check for empty images. This can happen if the favicon is still being + // loaded. Also avoid syncing touch icons. + if (!favicon.IsEmpty() && + model->GetFaviconType(node) == favicon_base::IconType::kFavicon) { + // TODO(crbug.com/516866): Verify that this isn't problematic for bookmarks + // created on iOS devices. + + // Re-encode the BookmarkNode's favicon as a PNG. + favicon_bytes = favicon.As1xPNGBytes(); + } + + if (favicon_bytes.get() && favicon_bytes->size() != 0) { + DCHECK(!node->icon_url()->is_empty()); + bm_specifics->set_favicon(favicon_bytes->front(), favicon_bytes->size()); + bm_specifics->set_icon_url(node->icon_url()->spec()); + } else { + bm_specifics->clear_favicon(); + bm_specifics->clear_icon_url(); + } + if (node->GetMetaInfoMap()) { UpdateBookmarkSpecificsMetaInfo(node->GetMetaInfoMap(), bm_specifics); } @@ -66,41 +125,52 @@ const bookmarks::BookmarkNode* CreateBookmarkNodeFromSpecifics( const sync_pb::BookmarkSpecifics& specifics, const bookmarks::BookmarkNode* parent, - int index, bool is_folder, - bookmarks::BookmarkModel* model) { + bookmarks::BookmarkModel* model, + favicon::FaviconService* favicon_service) { DCHECK(parent); DCHECK(model); + DCHECK(favicon_service); bookmarks::BookmarkNode::MetaInfoMap metainfo = GetBookmarkMetaInfo(specifics); + const bookmarks::BookmarkNode* node; if (is_folder) { - return model->AddFolderWithMetaInfo( + node = model->AddFolderWithMetaInfo( parent, index, base::UTF8ToUTF16(specifics.title()), &metainfo); + } else { + const int64_t create_time_us = specifics.creation_time_us(); + base::Time create_time = base::Time::FromDeltaSinceWindowsEpoch( + // Use FromDeltaSinceWindowsEpoch because create_time_us has + // always used the Windows epoch. + base::TimeDelta::FromMicroseconds(create_time_us)); + node = model->AddURLWithCreationTimeAndMetaInfo( + parent, index, base::UTF8ToUTF16(specifics.title()), + GURL(specifics.url()), create_time, &metainfo); } - const int64_t create_time_us = specifics.creation_time_us(); - base::Time create_time = base::Time::FromDeltaSinceWindowsEpoch( - // Use FromDeltaSinceWindowsEpoch because create_time_us has - // always used the Windows epoch. - base::TimeDelta::FromMicroseconds(create_time_us)); - return model->AddURLWithCreationTimeAndMetaInfo( - parent, index, base::UTF8ToUTF16(specifics.title()), - GURL(specifics.url()), create_time, &metainfo); - // TODO(crbug.com/516866): Add the favicon related code. + if (node) { + SetBookmarkFaviconFromSpecifics(specifics, node, favicon_service); + } + return node; } void UpdateBookmarkNodeFromSpecifics( const sync_pb::BookmarkSpecifics& specifics, const bookmarks::BookmarkNode* node, - bookmarks::BookmarkModel* model) { + bookmarks::BookmarkModel* model, + favicon::FaviconService* favicon_service) { + DCHECK(node); + DCHECK(model); + DCHECK(favicon_service); + if (!node->is_folder()) { model->SetURL(node, GURL(specifics.url())); } model->SetTitle(node, base::UTF8ToUTF16(specifics.title())); - // TODO(crbug.com/516866): Add the favicon related code. model->SetNodeMetaInfoMap(node, GetBookmarkMetaInfo(specifics)); + SetBookmarkFaviconFromSpecifics(specifics, node, favicon_service); } bool IsValidBookmarkSpecifics(const sync_pb::BookmarkSpecifics& specifics, @@ -109,10 +179,23 @@ DLOG(ERROR) << "Invalid bookmark: empty specifics."; return false; } - if (!is_folder && !GURL(specifics.url()).is_valid()) { - DLOG(ERROR) << "Invalid bookmark: invalid url in the specifics."; - return false; + if (!is_folder) { + if (!GURL(specifics.url()).is_valid()) { + DLOG(ERROR) << "Invalid bookmark: invalid url in the specifics."; + return false; + } + if (specifics.favicon().empty() != specifics.icon_url().empty()) { + DLOG(ERROR) << "Invalid bookmark: specifics can have neither or both of " + "favicon and icon_url."; + return false; + } + if (!specifics.icon_url().empty() && + !GURL(specifics.icon_url()).is_valid()) { + DLOG(ERROR) << "Invalid bookmark: invalid icon_url in specifics."; + return false; + } } + // Verify all keys in meta_info are unique. std::unordered_set<base::StringPiece, base::StringPieceHash> keys; for (const sync_pb::MetaInfo& meta_info : specifics.meta_info()) {
diff --git a/components/sync_bookmarks/bookmark_specifics_conversions.h b/components/sync_bookmarks/bookmark_specifics_conversions.h index c03cc612c..07f21f6 100644 --- a/components/sync_bookmarks/bookmark_specifics_conversions.h +++ b/components/sync_bookmarks/bookmark_specifics_conversions.h
@@ -15,10 +15,15 @@ class EntitySpecifics; } // namespace sync_pb +namespace favicon { +class FaviconService; +} // namespace favicon + namespace sync_bookmarks { sync_pb::EntitySpecifics CreateSpecificsFromBookmarkNode( - const bookmarks::BookmarkNode* node); + const bookmarks::BookmarkNode* node, + bookmarks::BookmarkModel* model); // Creates a bookmark node under the given parent node from the given specifics. // Returns the newly created node. Callers must verify that @@ -28,14 +33,16 @@ const bookmarks::BookmarkNode* parent, int index, bool is_folder, - bookmarks::BookmarkModel* model); + bookmarks::BookmarkModel* model, + favicon::FaviconService* favicon_service); // Updates the bookmark node |node| with the data in |specifics|. Callers must // verify that |specifics| passes the IsValidBookmarkSpecifics(). void UpdateBookmarkNodeFromSpecifics( const sync_pb::BookmarkSpecifics& specifics, const bookmarks::BookmarkNode* node, - bookmarks::BookmarkModel* model); + bookmarks::BookmarkModel* model, + favicon::FaviconService* favicon_service); // Checks if a bookmark specifics represents a valid bookmark. |is_folder| is // whether this specifics is for a folder. Valid specifics must not be empty,
diff --git a/components/sync_bookmarks/bookmark_specifics_conversions_unittest.cc b/components/sync_bookmarks/bookmark_specifics_conversions_unittest.cc index a93870a..a49509a 100644 --- a/components/sync_bookmarks/bookmark_specifics_conversions_unittest.cc +++ b/components/sync_bookmarks/bookmark_specifics_conversions_unittest.cc
@@ -12,11 +12,13 @@ #include "components/bookmarks/browser/bookmark_model.h" #include "components/bookmarks/browser/bookmark_node.h" #include "components/bookmarks/test/test_bookmark_client.h" +#include "components/favicon/core/test/mock_favicon_service.h" #include "components/sync/protocol/sync.pb.h" #include "testing/gmock/include/gmock/gmock.h" #include "testing/gtest/include/gtest/gtest.h" #include "url/gurl.h" +using testing::_; using testing::Eq; using testing::NotNull; @@ -28,19 +30,25 @@ const GURL kUrl("http://www.url.com"); const std::string kTitle = "Title"; const base::Time kTime = base::Time::Now(); - const GURL kIconUrl("http://www.icon-url.com"); const std::string kKey1 = "key1"; const std::string kValue1 = "value1"; const std::string kKey2 = "key2"; const std::string kValue2 = "value2"; - bookmarks::BookmarkNode node(kUrl); - node.SetTitle(base::UTF8ToUTF16(kTitle)); - node.set_date_added(kTime); - node.SetMetaInfo(kKey1, kValue1); - node.SetMetaInfo(kKey2, kValue2); + std::unique_ptr<bookmarks::BookmarkModel> model = + bookmarks::TestBookmarkClient::CreateModel(); - sync_pb::EntitySpecifics specifics = CreateSpecificsFromBookmarkNode(&node); + const bookmarks::BookmarkNode* bookmark_bar_node = model->bookmark_bar_node(); + const bookmarks::BookmarkNode* node = model->AddURL( + /*parent=*/bookmark_bar_node, /*index=*/0, base::UTF8ToUTF16(kTitle), + GURL(kUrl)); + ASSERT_THAT(node, NotNull()); + model->SetDateAdded(node, kTime); + model->SetNodeMetaInfo(node, kKey1, kValue1); + model->SetNodeMetaInfo(node, kKey2, kValue2); + + sync_pb::EntitySpecifics specifics = + CreateSpecificsFromBookmarkNode(node, model.get()); const sync_pb::BookmarkSpecifics& bm_specifics = specifics.bookmark(); EXPECT_THAT(bm_specifics.title(), Eq(kTitle)); EXPECT_THAT(GURL(bm_specifics.url()), Eq(kUrl)); @@ -50,13 +58,12 @@ Eq(kTime)); for (const sync_pb::MetaInfo& meta_info : bm_specifics.meta_info()) { std::string value; - node.GetMetaInfo(meta_info.key(), &value); + node->GetMetaInfo(meta_info.key(), &value); EXPECT_THAT(meta_info.value(), Eq(value)); } } -TEST(BookmarkSpecificsConversionsTest, - ShouldUpdateBookmarkNodeFromBookmarkSpecifics) { +TEST(BookmarkSpecificsConversionsTest, ShouldCreateBookmarkNodeFromSpecifics) { const GURL kUrl("http://www.url.com"); const std::string kTitle = "Title"; const base::Time kTime = base::Time::Now(); @@ -69,6 +76,8 @@ sync_pb::EntitySpecifics specifics; sync_pb::BookmarkSpecifics* bm_specifics = specifics.mutable_bookmark(); bm_specifics->set_url(kUrl.spec()); + bm_specifics->set_icon_url(kIconUrl.spec()); + bm_specifics->set_favicon("PNG"); bm_specifics->set_title(kTitle); bm_specifics->set_creation_time_us( kTime.ToDeltaSinceWindowsEpoch().InMicroseconds()); @@ -82,10 +91,14 @@ std::unique_ptr<bookmarks::BookmarkModel> model = bookmarks::TestBookmarkClient::CreateModel(); + testing::NiceMock<favicon::MockFaviconService> favicon_service; + EXPECT_CALL(favicon_service, + AddPageNoVisitForBookmark(kUrl, base::UTF8ToUTF16(kTitle))); + EXPECT_CALL(favicon_service, MergeFavicon(kUrl, kIconUrl, _, _, _)); const bookmarks::BookmarkNode* node = CreateBookmarkNodeFromSpecifics( *bm_specifics, /*parent=*/model->bookmark_bar_node(), /*index=*/0, - /*is_folder=*/false, model.get()); + /*is_folder=*/false, model.get(), &favicon_service); ASSERT_THAT(node, NotNull()); EXPECT_THAT(node->GetTitle(), Eq(base::UTF8ToUTF16(kTitle))); EXPECT_THAT(node->url(), Eq(kUrl)); @@ -98,6 +111,64 @@ EXPECT_THAT(value2, Eq(kValue2)); } +TEST(BookmarkSpecificsConversionsTest, ShouldUpdateBookmarkNodeFromSpecifics) { + const GURL kUrl("http://www.url.com"); + const std::string kTitle = "Title"; + const base::Time kTime = base::Time::Now(); + const std::string kKey1 = "key1"; + const std::string kValue1 = "value1"; + const std::string kKey2 = "key2"; + const std::string kValue2 = "value2"; + + std::unique_ptr<bookmarks::BookmarkModel> model = + bookmarks::TestBookmarkClient::CreateModel(); + + const bookmarks::BookmarkNode* bookmark_bar_node = model->bookmark_bar_node(); + const bookmarks::BookmarkNode* node = model->AddURL( + /*parent=*/bookmark_bar_node, /*index=*/0, base::UTF8ToUTF16(kTitle), + GURL(kUrl)); + ASSERT_THAT(node, NotNull()); + model->SetNodeMetaInfo(node, kKey1, kValue1); + model->SetNodeMetaInfo(node, kKey2, kValue2); + + const GURL kNewUrl("http://www.new-url.com"); + const std::string kNewTitle = "NewTitle"; + const GURL kNewIconUrl("http://www.new-icon-url.com"); + const std::string kNewValue1 = "new-value1"; + const std::string kNewValue2 = "new-value2"; + + sync_pb::EntitySpecifics specifics; + sync_pb::BookmarkSpecifics* bm_specifics = specifics.mutable_bookmark(); + bm_specifics->set_url(kNewUrl.spec()); + bm_specifics->set_icon_url(kNewIconUrl.spec()); + bm_specifics->set_favicon("PNG"); + bm_specifics->set_title(kNewTitle); + bm_specifics->set_creation_time_us( + kTime.ToDeltaSinceWindowsEpoch().InMicroseconds()); + sync_pb::MetaInfo* meta_info1 = bm_specifics->add_meta_info(); + meta_info1->set_key(kKey1); + meta_info1->set_value(kNewValue1); + + sync_pb::MetaInfo* meta_info2 = bm_specifics->add_meta_info(); + meta_info2->set_key(kKey2); + meta_info2->set_value(kNewValue2); + + testing::NiceMock<favicon::MockFaviconService> favicon_service; + EXPECT_CALL(favicon_service, + AddPageNoVisitForBookmark(kNewUrl, base::UTF8ToUTF16(kNewTitle))); + EXPECT_CALL(favicon_service, MergeFavicon(kNewUrl, kNewIconUrl, _, _, _)); + UpdateBookmarkNodeFromSpecifics(*bm_specifics, node, model.get(), + &favicon_service); + EXPECT_THAT(node->GetTitle(), Eq(base::UTF8ToUTF16(kNewTitle))); + EXPECT_THAT(node->url(), Eq(kNewUrl)); + std::string value1; + node->GetMetaInfo(kKey1, &value1); + EXPECT_THAT(value1, Eq(kNewValue1)); + std::string value2; + node->GetMetaInfo(kKey2, &value2); + EXPECT_THAT(value2, Eq(kNewValue2)); +} + TEST(BookmarkSpecificsConversionsTest, ShouldBeValidBookmarkSpecifics) { sync_pb::EntitySpecifics specifics; sync_pb::BookmarkSpecifics* bm_specifics = specifics.mutable_bookmark();
diff --git a/components/sync_bookmarks/bookmark_sync_service.cc b/components/sync_bookmarks/bookmark_sync_service.cc index 7ecb5efe..f82ef519 100644 --- a/components/sync_bookmarks/bookmark_sync_service.cc +++ b/components/sync_bookmarks/bookmark_sync_service.cc
@@ -44,10 +44,13 @@ } base::WeakPtr<syncer::ModelTypeControllerDelegate> -BookmarkSyncService::GetBookmarkSyncControllerDelegate() { +BookmarkSyncService::GetBookmarkSyncControllerDelegate( + favicon::FaviconService* favicon_service) { + DCHECK(favicon_service); if (!bookmark_model_type_processor_) { return nullptr; } + bookmark_model_type_processor_->SetFaviconService(favicon_service); return bookmark_model_type_processor_->GetWeakPtr(); }
diff --git a/components/sync_bookmarks/bookmark_sync_service.h b/components/sync_bookmarks/bookmark_sync_service.h index 0c407db0..0416edd8 100644 --- a/components/sync_bookmarks/bookmark_sync_service.h +++ b/components/sync_bookmarks/bookmark_sync_service.h
@@ -22,6 +22,10 @@ class BookmarkModel; } +namespace favicon { +class FaviconService; +} + namespace sync_bookmarks { class BookmarkModelTypeProcessor; @@ -43,8 +47,15 @@ bookmarks::BookmarkModel* model); // Returns the ModelTypeControllerDelegate for syncer::BOOKMARKS. + // |favicon_service| is the favicon service used when processing updates in + // the underlying processor. It could have been a separate a setter in + // BookmarkSyncService instead of passing it as a parameter to + // GetBookmarkSyncControllerDelegate(). However, this would incur the risk of + // overlooking setting it. Therefore, it has been added as a parameter to the + // GetBookmarkSyncControllerDelegate() in order to gauarantee it will be set + // before the processor starts receiving updates. virtual base::WeakPtr<syncer::ModelTypeControllerDelegate> - GetBookmarkSyncControllerDelegate(); + GetBookmarkSyncControllerDelegate(favicon::FaviconService* favicon_service); private: // BookmarkModelTypeProcessor handles communications between sync engine and
diff --git a/components/sync_bookmarks/synced_bookmark_tracker.cc b/components/sync_bookmarks/synced_bookmark_tracker.cc index b681e700..316997b2 100644 --- a/components/sync_bookmarks/synced_bookmark_tracker.cc +++ b/components/sync_bookmarks/synced_bookmark_tracker.cc
@@ -45,8 +45,6 @@ bool SyncedBookmarkTracker::Entity::MatchesDataIgnoringParent( const syncer::EntityData& data) const { - // TODO(crbug.com/516866): Compare the actual specifics instead of the - // specifics hash. if (metadata_->is_deleted() || data.is_deleted()) { // In case of deletion, no need to check the specifics. return metadata_->is_deleted() == data.is_deleted();
diff --git a/components/sync_bookmarks/synced_bookmark_tracker.h b/components/sync_bookmarks/synced_bookmark_tracker.h index f101a4f..d30f240 100644 --- a/components/sync_bookmarks/synced_bookmark_tracker.h +++ b/components/sync_bookmarks/synced_bookmark_tracker.h
@@ -51,6 +51,9 @@ // information. bool MatchesDataIgnoringParent(const syncer::EntityData& data) const; + // Check whether |specifics| matches the stored specifics_hash. + bool MatchesSpecificsHash(const sync_pb::EntitySpecifics& specifics) const; + // Returns null for tomstones. const bookmarks::BookmarkNode* bookmark_node() const { return bookmark_node_; @@ -63,9 +66,6 @@ sync_pb::EntityMetadata* metadata() { return metadata_.get(); } private: - // Check whether |specifics| matches the stored specifics_hash. - bool MatchesSpecificsHash(const sync_pb::EntitySpecifics& specifics) const; - // Null for tombstones. const bookmarks::BookmarkNode* bookmark_node_;
diff --git a/components/test/data/js_dialogs/render_tests/VrBrowserJavaScriptModalDialogTest.js_modal_view_vr.Pixel_XL-27.png b/components/test/data/js_dialogs/render_tests/VrBrowserJavaScriptModalDialogTest.js_modal_view_vr.Pixel_XL-27.png new file mode 100644 index 0000000..d7e3592 --- /dev/null +++ b/components/test/data/js_dialogs/render_tests/VrBrowserJavaScriptModalDialogTest.js_modal_view_vr.Pixel_XL-27.png Binary files differ
diff --git a/components/test/data/payments/kylepay.com/app.js b/components/test/data/payments/kylepay.com/app.js new file mode 100644 index 0000000..856a895 --- /dev/null +++ b/components/test/data/payments/kylepay.com/app.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. + */ + +self.addEventListener('canmakepayment', (evt) => { + evt.respondWith(true); +}); + +self.addEventListener('paymentrequest', (evt) => { + evt.respondWith({ + methodName: evt.methodData[0].supportedMethods, + details: {transactionId: '123'}, + }); +});
diff --git a/components/test/data/payments/kylepay.com/app.json b/components/test/data/payments/kylepay.com/app.json new file mode 100644 index 0000000..989d729 --- /dev/null +++ b/components/test/data/payments/kylepay.com/app.json
@@ -0,0 +1,14 @@ +{ + "name": "Pay with KylePay", + "short_name": "KylePay", + "icons": [{ + "src": "icon.png", + "sizes": "48x48", + "type": "image/png" + }], + "serviceworker": { + "src": "app.js", + "use_cache": false, + "scope": "/webpay" + } +}
diff --git a/components/test/data/payments/kylepay.com/payment-manifest.json b/components/test/data/payments/kylepay.com/payment-manifest.json new file mode 100644 index 0000000..5d48a08 --- /dev/null +++ b/components/test/data/payments/kylepay.com/payment-manifest.json
@@ -0,0 +1,3 @@ +{ + "default_applications": ["https://kylepay.com/app.json"] +}
diff --git a/components/test/data/payments/kylepay.com/webpay b/components/test/data/payments/kylepay.com/webpay new file mode 100644 index 0000000..e0dfe7d --- /dev/null +++ b/components/test/data/payments/kylepay.com/webpay
@@ -0,0 +1 @@ +<!-- Intentionally blank. -->
diff --git a/components/test/data/payments/kylepay.com/webpay.mock-http-headers b/components/test/data/payments/kylepay.com/webpay.mock-http-headers new file mode 100644 index 0000000..44e5a707 --- /dev/null +++ b/components/test/data/payments/kylepay.com/webpay.mock-http-headers
@@ -0,0 +1,2 @@ +HTTP/1.1 200 OK +Link: <payment-manifest.json>; rel="payment-method-manifest"
diff --git a/components/url_formatter/top_domains/BUILD.gn b/components/url_formatter/top_domains/BUILD.gn index aa76af7..29618e5 100644 --- a/components/url_formatter/top_domains/BUILD.gn +++ b/components/url_formatter/top_domains/BUILD.gn
@@ -47,9 +47,7 @@ "$target_gen_dir/alexa_domains-trie-inc.cc", ] args = - # Make sure the inputs are system-absolute, as base::File cannot open - # files with ".." components. - rebase_path(inputs, "", "/") + rebase_path(outputs, root_build_dir) + rebase_path(inputs, root_build_dir) + rebase_path(outputs, root_build_dir) } # TODO: Combine this and the previous one into a compiled_action_foreach target. @@ -65,7 +63,5 @@ "$target_gen_dir/test_domains-trie-inc.cc", ] args = - # Make sure the inputs are system-absolute, as base::File cannot open - # files with ".." components. - rebase_path(inputs, "", "/") + rebase_path(outputs, root_build_dir) + rebase_path(inputs, root_build_dir) + rebase_path(outputs, root_build_dir) }
diff --git a/components/url_formatter/top_domains/top_domain_generator.cc b/components/url_formatter/top_domains/top_domain_generator.cc index 7ce1cedf..f15692b 100644 --- a/components/url_formatter/top_domains/top_domain_generator.cc +++ b/components/url_formatter/top_domains/top_domain_generator.cc
@@ -71,7 +71,8 @@ return 1; } - base::FilePath input_path = base::FilePath::FromUTF8Unsafe(argv[1]); + base::FilePath input_path = + base::MakeAbsoluteFilePath(base::FilePath::FromUTF8Unsafe(argv[1])); if (!base::PathExists(input_path)) { LOG(ERROR) << "Input path doesn't exist: " << input_path; return 1; @@ -146,4 +147,4 @@ } return 0; -} \ No newline at end of file +}
diff --git a/components/viz/BUILD.gn b/components/viz/BUILD.gn index 636474c..71424f37 100644 --- a/components/viz/BUILD.gn +++ b/components/viz/BUILD.gn
@@ -27,7 +27,7 @@ ] data_deps = [ - "//third_party/mesa:osmesa", + "//third_party/mesa_headers", ] if (is_android) {
diff --git a/components/viz/common/BUILD.gn b/components/viz/common/BUILD.gn index 4be660c..f03d0c6 100644 --- a/components/viz/common/BUILD.gn +++ b/components/viz/common/BUILD.gn
@@ -267,7 +267,7 @@ ] data_deps = [ - "//third_party/mesa:osmesa", + "//third_party/mesa_headers", ] }
diff --git a/components/viz/common/quads/compositor_frame_metadata.h b/components/viz/common/quads/compositor_frame_metadata.h index e14615c..f733b70 100644 --- a/components/viz/common/quads/compositor_frame_metadata.h +++ b/components/viz/common/quads/compositor_frame_metadata.h
@@ -10,18 +10,22 @@ #include <vector> #include "base/optional.h" +#include "build/build_config.h" #include "components/viz/common/frame_sinks/begin_frame_args.h" #include "components/viz/common/quads/frame_deadline.h" -#include "components/viz/common/quads/selection.h" #include "components/viz/common/surfaces/surface_id.h" #include "components/viz/common/surfaces/surface_range.h" #include "components/viz/common/viz_common_export.h" #include "third_party/skia/include/core/SkColor.h" #include "ui/gfx/geometry/size_f.h" #include "ui/gfx/geometry/vector2d_f.h" -#include "ui/gfx/selection_bound.h" #include "ui/latency/latency_info.h" +#if defined(OS_ANDROID) +#include "components/viz/common/quads/selection.h" +#include "ui/gfx/selection_bound.h" +#endif // defined(OS_ANDROID) + namespace viz { // Compares two frame tokens, handling cases where the token wraps around the @@ -80,10 +84,6 @@ // it's too small to fill the box the parent reserved for it. SkColor root_background_color = SK_ColorWHITE; - // Provides selection region updates relative to the current viewport. If the - // selection is empty or otherwise unused, the bound types will indicate such. - Selection<gfx::SelectionBound> selection; - std::vector<ui::LatencyInfo> latency_info; // This is the set of Surfaces that are referenced by this frame. @@ -143,6 +143,12 @@ // will be provided to CompositorFrameSinkClient. bool request_presentation_feedback = false; +#if defined(OS_ANDROID) + // Provides selection region updates relative to the current viewport. If the + // selection is empty or otherwise unused, the bound types will indicate such. + Selection<gfx::SelectionBound> selection; +#endif // defined(OS_ANDROID) + private: CompositorFrameMetadata(const CompositorFrameMetadata& other); CompositorFrameMetadata operator=(const CompositorFrameMetadata&) = delete;
diff --git a/components/viz/service/frame_sinks/compositor_frame_sink_support.cc b/components/viz/service/frame_sinks/compositor_frame_sink_support.cc index 5b11c845..1d6edc8 100644 --- a/components/viz/service/frame_sinks/compositor_frame_sink_support.cc +++ b/components/viz/service/frame_sinks/compositor_frame_sink_support.cc
@@ -122,7 +122,6 @@ } DCHECK(surface->HasActiveFrame()); - surface->UpdateSurfaceReferences(); // Check if this is a display root surface and the SurfaceId is changing. if (is_root_ && (!referenced_local_surface_id_ ||
diff --git a/components/viz/service/frame_sinks/surface_synchronization_unittest.cc b/components/viz/service/frame_sinks/surface_synchronization_unittest.cc index 38c96b232..d5ae53ea 100644 --- a/components/viz/service/frame_sinks/surface_synchronization_unittest.cc +++ b/components/viz/service/frame_sinks/surface_synchronization_unittest.cc
@@ -137,6 +137,14 @@ supports_.erase(it); } + // Returns all the references where |surface_id| is the parent. + const base::flat_set<SurfaceId>& GetReferencesFrom( + const SurfaceId& surface_id) { + return frame_sink_manager() + .surface_manager() + ->GetSurfacesReferencedByParent(surface_id); + } + FrameSinkManagerImpl& frame_sink_manager() { return frame_sink_manager_; } // Returns all the references where |surface_id| is the parent. @@ -2697,6 +2705,56 @@ MakeDefaultCompositorFrame()); } +// This test verifies that a parent referencing a SurfaceRange get updated +// whenever a child surface activates inside this range. This should also update +// the SurfaceReferences tree. +TEST_F(SurfaceSynchronizationTest, SurfaceReferencesChangeOnChildActivation) { + SetFrameSinkHierarchy(kParentFrameSink, kChildFrameSink1); + const SurfaceId parent_id = MakeSurfaceId(kParentFrameSink, 1); + const SurfaceId child_id1 = MakeSurfaceId(kChildFrameSink1, 1); + const SurfaceId child_id2 = MakeSurfaceId(kChildFrameSink1, 2); + const SurfaceId child_id3 = MakeSurfaceId(kChildFrameSink1, 3); + const SurfaceId child_id4 = MakeSurfaceId(kChildFrameSink2, 1); + + parent_support().SubmitCompositorFrame( + parent_id.local_surface_id(), + MakeCompositorFrame( + empty_surface_ids(), {SurfaceRange(child_id1, child_id4)}, + std::vector<TransferableResource>(), MakeDefaultDeadline())); + + // Verify that no references exist. + EXPECT_THAT(GetReferencesFrom(parent_id), empty_surface_ids()); + + // Activate |child_id1|. + child_support1().SubmitCompositorFrame(child_id1.local_surface_id(), + MakeDefaultCompositorFrame()); + + // Verify that a reference is acquired. + EXPECT_THAT(GetReferencesFrom(parent_id), UnorderedElementsAre(child_id1)); + + // Activate |child_id2|. + child_support1().SubmitCompositorFrame(child_id2.local_surface_id(), + MakeDefaultCompositorFrame()); + + // Verify that the reference is updated. + EXPECT_THAT(GetReferencesFrom(parent_id), UnorderedElementsAre(child_id2)); + + // Activate |child_id4| in a different frame sink. + child_support2().SubmitCompositorFrame(child_id4.local_surface_id(), + MakeDefaultCompositorFrame()); + + // Verify that the reference is updated. + EXPECT_THAT(GetReferencesFrom(parent_id), UnorderedElementsAre(child_id4)); + + // Activate |child_id3|. + child_support1().SubmitCompositorFrame(child_id3.local_surface_id(), + MakeDefaultCompositorFrame()); + + // Verify that the reference will not get updated since |child_id3| is in the + // fallback's FrameSinkId. + EXPECT_THAT(GetReferencesFrom(parent_id), UnorderedElementsAre(child_id4)); +} + // This test verifies that once a frame sink become invalidated, it should // immediately unblock all pending frames depending on that sink. TEST_F(SurfaceSynchronizationTest,
diff --git a/components/viz/service/surfaces/surface.cc b/components/viz/service/surfaces/surface.cc index c721604..f75afe7 100644 --- a/components/viz/service/surfaces/surface.cc +++ b/components/viz/service/surfaces/surface.cc
@@ -98,29 +98,6 @@ surface_client_->UnrefResources(resources); } -void Surface::UpdateSurfaceReferences() { - const base::flat_set<SurfaceId>& existing_referenced_surfaces = - surface_manager_->GetSurfacesReferencedByParent(surface_id()); - base::flat_set<SurfaceId> new_referenced_surfaces( - active_referenced_surfaces().begin(), active_referenced_surfaces().end(), - base::KEEP_FIRST_OF_DUPES); - - // Populate list of surface references to add and remove by getting the - // difference between existing surface references and surface references for - // latest activated CompositorFrame. - std::vector<SurfaceReference> references_to_add; - std::vector<SurfaceReference> references_to_remove; - GetSurfaceReferenceDifference(surface_id(), existing_referenced_surfaces, - new_referenced_surfaces, &references_to_add, - &references_to_remove); - - // Modify surface references stored in SurfaceManager. - if (!references_to_add.empty()) - surface_manager_->AddSurfaceReferences(references_to_add); - if (!references_to_remove.empty()) - surface_manager_->RemoveSurfaceReferences(references_to_remove); -} - void Surface::RejectCompositorFramesToFallbackSurfaces() { for (const SurfaceRange& surface_range : GetPendingFrame().metadata.referenced_surfaces) { @@ -146,6 +123,65 @@ } } +void Surface::UpdateSurfaceReferences() { + const base::flat_set<SurfaceId>& existing_referenced_surfaces = + surface_manager_->GetSurfacesReferencedByParent(surface_id()); + + // Populate list of surface references to add and remove by getting the + // difference between existing surface references and surface references for + // latest activated CompositorFrame. + std::vector<SurfaceReference> references_to_add; + std::vector<SurfaceReference> references_to_remove; + GetSurfaceReferenceDifference(surface_id(), existing_referenced_surfaces, + active_referenced_surfaces(), + &references_to_add, &references_to_remove); + + // Modify surface references stored in SurfaceManager. + if (!references_to_add.empty()) + surface_manager_->AddSurfaceReferences(references_to_add); + if (!references_to_remove.empty()) + surface_manager_->RemoveSurfaceReferences(references_to_remove); +} + +void Surface::OnChildActivated(const SurfaceId& activated_id) { + DCHECK(HasActiveFrame()); + + for (size_t i = 0; + i < active_frame_data_->frame.metadata.referenced_surfaces.size(); i++) { + const SurfaceRange& surface_range = + active_frame_data_->frame.metadata.referenced_surfaces[i]; + const SurfaceId& last_id = last_surface_id_for_range_[i]; + + // If |activated_id| is in fallback's FrameSinkId but we already reference a + // SurfaceId in the primary's FrameSinkId, we do nothing. + if (surface_range.HasDifferentFrameSinkIds() && last_id.is_valid() && + last_id.frame_sink_id() == surface_range.end().frame_sink_id() && + activated_id.frame_sink_id() == + surface_range.start()->frame_sink_id()) { + continue; + } + + if (surface_range.IsInRangeInclusive(activated_id)) { + // Remove the old reference. + if (last_id.is_valid()) { + auto old_it = active_referenced_surfaces_.find(last_id); + if (old_it != active_referenced_surfaces_.end()) + active_referenced_surfaces_.erase(old_it); + surface_manager_->RemoveSurfaceReferences( + {SurfaceReference(surface_info_.id(), last_id)}); + } + + // Add a new reference. + active_referenced_surfaces_.insert(activated_id); + surface_manager_->AddSurfaceReferences( + {SurfaceReference(surface_info_.id(), activated_id)}); + + // Update the referenced surface for this range. + last_surface_id_for_range_[i] = activated_id; + } + } +} + void Surface::Close() { closed_ = true; } @@ -306,6 +342,56 @@ ActivateFrame(std::move(frame_data), duration); } +void Surface::UpdateObservedSinks( + const base::flat_set<FrameSinkId>& new_observed_sinks) { + std::vector<FrameSinkId> sinks_to_remove; + std::vector<FrameSinkId> sinks_to_add; + + for (const FrameSinkId& sink_id : new_observed_sinks) + if (observed_sinks_.count(sink_id) == 0) + sinks_to_add.push_back(sink_id); + + for (const FrameSinkId& sink_id : observed_sinks_) + if (new_observed_sinks.count(sink_id) == 0) + sinks_to_remove.push_back(sink_id); + + for (const FrameSinkId& sink_id : sinks_to_remove) { + observed_sinks_.erase(sink_id); + surface_manager_->RemoveActivationObserver(sink_id, surface_info_.id()); + } + + for (const FrameSinkId& sink_id : sinks_to_add) { + observed_sinks_.insert(sink_id); + surface_manager_->AddActivationObserver(sink_id, surface_info_.id()); + } +} + +void Surface::RecomputeActiveReferencedSurfaces() { + // Extract the latest in flight surface from the ranges in the frame then + // notify SurfaceManager of the new references. + active_referenced_surfaces_.clear(); + last_surface_id_for_range_.clear(); + base::flat_set<FrameSinkId> new_observed_sinks; + for (const SurfaceRange& surface_range : + active_frame_data_->frame.metadata.referenced_surfaces) { + // Observe frame sinks of both endpoints of the range. + new_observed_sinks.insert(surface_range.end().frame_sink_id()); + if (surface_range.HasDifferentFrameSinkIds()) + new_observed_sinks.insert(surface_range.start()->frame_sink_id()); + + Surface* surface = + surface_manager_->GetLatestInFlightSurface(surface_range); + if (surface) { + active_referenced_surfaces_.insert(surface->surface_id()); + last_surface_id_for_range_.push_back(surface->surface_id()); + } else { + last_surface_id_for_range_.push_back(SurfaceId()); + } + } + UpdateObservedSinks(new_observed_sinks); + UpdateSurfaceReferences(); +} + // A frame is activated if all its Surface ID dependences are active or a // deadline has hit and the frame was forcibly activated. |duration| is a // measure of the time the frame has spent waiting on dependencies to arrive. @@ -331,12 +417,7 @@ active_frame_data_ = std::move(frame_data); - active_referenced_surfaces_.clear(); - for (SurfaceRange surface_range : - active_frame_data_->frame.metadata.referenced_surfaces) { - if (surface_range.start()) - active_referenced_surfaces_.emplace_back(*surface_range.start()); - } + RecomputeActiveReferencedSurfaces(); for (auto& copy_request : old_copy_requests) RequestCopyOfOutput(std::move(copy_request));
diff --git a/components/viz/service/surfaces/surface.h b/components/viz/service/surfaces/surface.h index 9cf98025..ca22038 100644 --- a/components/viz/service/surfaces/surface.h +++ b/components/viz/service/surfaces/surface.h
@@ -121,11 +121,6 @@ bool needs_sync_tokens() const { return needs_sync_tokens_; } - // Updates surface references of the surface using the referenced - // surfaces from the most recent CompositorFrame. - // Modifies surface references stored in SurfaceManager. - void UpdateSurfaceReferences(); - // Returns false if |frame| is invalid. // |frame_rejected_callback| will be called once if the frame will not be // displayed. @@ -182,7 +177,7 @@ void NotifyAggregatedDamage(const gfx::Rect& damage_rect, base::TimeTicks expected_display_time); - const std::vector<SurfaceId>& active_referenced_surfaces() const { + const base::flat_set<SurfaceId>& active_referenced_surfaces() const { return active_referenced_surfaces_; } @@ -211,6 +206,10 @@ // Called when this surface will be included in the next display frame. void OnWillBeDrawn(); + // Called when |surface_id| is activated for the first time and its part of a + // referenced SurfaceRange. + void OnChildActivated(const SurfaceId& surface_id); + private: struct SequenceNumbers { uint32_t parent_sequence_number = 0u; @@ -238,10 +237,25 @@ // children to catch up to the parent. void RejectCompositorFramesToFallbackSurfaces(); + // Updates surface references of the surface using the referenced + // surfaces from the most recent CompositorFrame. + // Modifies surface references stored in SurfaceManager. + void UpdateSurfaceReferences(); + // Called to prevent additional CompositorFrames from being accepted into this // surface. Once a Surface is closed, it cannot accept CompositorFrames again. void Close(); + // Updates the FrameSinkIds observed by this surface to be equal to + // |new_observed_sinks|. + void UpdateObservedSinks( + const base::flat_set<FrameSinkId>& new_observed_sinks); + + // Recomputes active references for this surface when it activates. This + // method will also update the observed sinks based on the referenced ranges + // in the submitted compositor frame. + void RecomputeActiveReferencedSurfaces(); + void ActivatePendingFrame(base::Optional<base::TimeDelta> duration); // Called when all of the surface's dependencies have been resolved. @@ -291,7 +305,20 @@ // passes the local_id in the map, then this surface is no longer interested // in observing activations for that FrameSinkId. base::flat_map<FrameSinkId, SequenceNumbers> frame_sink_id_dependencies_; - std::vector<SurfaceId> active_referenced_surfaces_; + + // A set of all valid SurfaceIds contained |last_surface_id_for_range_| to + // avoid recompution. + base::flat_set<SurfaceId> active_referenced_surfaces_; + + // Keeps track of the referenced surface for each SurfaceRange. i.e the i-th + // element is the referenced SurfaceId in the i-th SurfaceRange. If a + // SurfaceRange doesn't contain any active surfaces then the corresponding + // entry in this vector is an unvalid SurfaceId. + std::vector<SurfaceId> last_surface_id_for_range_; + + // Frame sinks that this surface observe for activation events. + base::flat_set<FrameSinkId> observed_sinks_; + DISALLOW_COPY_AND_ASSIGN(Surface); };
diff --git a/components/viz/service/surfaces/surface_manager.cc b/components/viz/service/surfaces/surface_manager.cc index c22da5f..50a48e1 100644 --- a/components/viz/service/surfaces/surface_manager.cc +++ b/components/viz/service/surfaces/surface_manager.cc
@@ -568,10 +568,35 @@ void SurfaceManager::FirstSurfaceActivation(const SurfaceInfo& surface_info) { CHECK(thread_checker_.CalledOnValidThread()); + // Notify every Surface interested in knowing about activation events in + // |surface_info.surface_id()|'s frame sink. + for (const SurfaceId& sink_observer : + activation_observers_[surface_info.id().frame_sink_id()]) { + Surface* observer_surface = GetSurfaceForId(sink_observer); + if (observer_surface) + observer_surface->OnChildActivated(surface_info.id()); + } + for (auto& observer : observer_list_) observer.OnFirstSurfaceActivation(surface_info); } +void SurfaceManager::AddActivationObserver(const FrameSinkId& sink_id, + const SurfaceId& surface_id) { + activation_observers_[sink_id].insert(surface_id); +} + +void SurfaceManager::RemoveActivationObserver(const FrameSinkId& sink_id, + const SurfaceId& surface_id) { + if (activation_observers_.count(sink_id) == 0) + return; + + base::flat_set<SurfaceId>& observers = activation_observers_[sink_id]; + observers.erase(surface_id); + if (observers.empty()) + activation_observers_.erase(sink_id); +} + void SurfaceManager::SurfaceActivated( Surface* surface, base::Optional<base::TimeDelta> duration) {
diff --git a/components/viz/service/surfaces/surface_manager.h b/components/viz/service/surfaces/surface_manager.h index 024cb9b..391dd78 100644 --- a/components/viz/service/surfaces/surface_manager.h +++ b/components/viz/service/surfaces/surface_manager.h
@@ -108,6 +108,14 @@ // Called when a surface has an active frame for the first time. void FirstSurfaceActivation(const SurfaceInfo& surface_info); + // Add |surface_id| as an observer for |sink_id|. + void AddActivationObserver(const FrameSinkId& sink_id, + const SurfaceId& surface_id); + + // Remove |surface_id| from the observers of |sink_id|. + void RemoveActivationObserver(const FrameSinkId& sink_id, + const SurfaceId& surface_id); + // Called when a CompositorFrame within |surface| has activated. |duration| is // a measure of the time the frame has spent waiting on dependencies to // arrive. If |duration| is base::nullopt, then that indicates that this frame @@ -324,6 +332,10 @@ base::flat_map<FrameSinkId, base::flat_set<LocalSurfaceId>> persistent_references_by_frame_sink_id_; + // A map storing SurfaceIds interested in knowing about activation events + // happending in FrameSinkId. + base::flat_map<FrameSinkId, base::flat_set<SurfaceId>> activation_observers_; + // Timer to remove old temporary references that aren't removed after an // interval of time. The timer will started/stopped so it only runs if there // are temporary references. Also the timer isn't used with Android WebView.
diff --git a/components/web_restrictions/OWNERS b/components/web_restrictions/OWNERS index b9540e11..00985a81 100644 --- a/components/web_restrictions/OWNERS +++ b/components/web_restrictions/OWNERS
@@ -1,2 +1 @@ -aberent@chromium.org -bauerb@chromium.org \ No newline at end of file +bauerb@chromium.org
diff --git a/components/webdata/common/web_data_results.h b/components/webdata/common/web_data_results.h index 3eafb86..d7113ee 100644 --- a/components/webdata/common/web_data_results.h +++ b/components/webdata/common/web_data_results.h
@@ -34,6 +34,8 @@ AUTOFILL_CREDITCARD_RESULT, // WDResult<CreditCard> AUTOFILL_CREDITCARDS_RESULT, // WDResult<std::vector< // std::unique_ptr<CreditCard>>> + AUTOFILL_CUSTOMERDATA_RESULT, // WDResult<std::unique_ptr< + // PaymentsCustomerData>> #if !defined(OS_IOS) PAYMENT_WEB_APP_MANIFEST, // WDResult<std::vector< // mojom::WebAppManifestSectionPtr>>
diff --git a/components/webrtc_logging/browser/log_list.h b/components/webrtc_logging/browser/log_list.h index 6a4b00a9..951189b 100644 --- a/components/webrtc_logging/browser/log_list.h +++ b/components/webrtc_logging/browser/log_list.h
@@ -17,9 +17,8 @@ class LogList { public: - // Creates the upload list with the given callback delegate for a - // browser context. The upload list loads and parses a text file list of - // WebRTC logs stored locally and/or uploaded. + // Creates the upload list for a browser context. The upload list loads and + // parses a text file list of WebRTC logs stored locally and/or uploaded. static UploadList* CreateWebRtcLogList( content::BrowserContext* browser_context);
diff --git a/components/zucchini/encoded_view.cc b/components/zucchini/encoded_view.cc index 5b55b51b..90eeba9 100644 --- a/components/zucchini/encoded_view.cc +++ b/components/zucchini/encoded_view.cc
@@ -29,7 +29,7 @@ // |location| points into a Reference. const ReferenceSet& ref_set = image_index_.refs(type); - IndirectReference ref = ref_set.at(location); + Reference ref = ref_set.at(location); DCHECK_GE(location, ref.location); DCHECK_LT(location, ref.location + ref_set.width()); @@ -40,11 +40,12 @@ } PoolTag pool_tag = ref_set.pool_tag(); + const auto& target_pool = ref_set.target_pool(); // Targets with an associated Label will use its Label index in projection. - DCHECK_EQ(image_index_.pool(pool_tag).size(), - pool_infos_[pool_tag.value()].labels.size()); - uint32_t label = pool_infos_[pool_tag.value()].labels[ref.target_key]; + DCHECK_EQ(target_pool.size(), pool_infos_[pool_tag.value()].labels.size()); + uint32_t label = pool_infos_[pool_tag.value()] + .labels[target_pool.KeyForOffset(ref.target)]; // Projection is done on (|target|, |type|), shifted by // kBaseReferenceProjection to avoid collisions with raw content.
diff --git a/components/zucchini/equivalence_map.cc b/components/zucchini/equivalence_map.cc index 77551ec..b85fe9f 100644 --- a/components/zucchini/equivalence_map.cc +++ b/components/zucchini/equivalence_map.cc
@@ -59,12 +59,13 @@ const ReferenceSet& old_ref_set = old_image_index.refs(old_type); const ReferenceSet& new_ref_set = new_image_index.refs(new_type); - IndirectReference old_reference = old_ref_set.at(src); - IndirectReference new_reference = new_ref_set.at(dst); + Reference old_reference = old_ref_set.at(src); + Reference new_reference = new_ref_set.at(dst); PoolTag pool_tag = old_ref_set.pool_tag(); double affinity = targets_affinities[pool_tag.value()].AffinityBetween( - old_reference.target_key, new_reference.target_key); + old_ref_set.target_pool().KeyForOffset(old_reference.target), + new_ref_set.target_pool().KeyForOffset(new_reference.target)); // Both targets are not associated, which implies a weak match. if (affinity == 0.0)
diff --git a/components/zucchini/image_index.cc b/components/zucchini/image_index.cc index 6c7a28b..1efe5d8f 100644 --- a/components/zucchini/image_index.cc +++ b/components/zucchini/image_index.cc
@@ -47,7 +47,7 @@ return true; // |location| points into a Reference. - IndirectReference reference = refs(type).at(location); + Reference reference = refs(type).at(location); // Only the first byte of a reference is a token. return location == reference.location; }
diff --git a/components/zucchini/image_utils.h b/components/zucchini/image_utils.h index 9aba0a6..b34b9dc 100644 --- a/components/zucchini/image_utils.h +++ b/components/zucchini/image_utils.h
@@ -85,15 +85,6 @@ return a.location == b.location && a.target == b.target; } -struct IndirectReference { - offset_t location; - key_t target_key; // Key within a pool of references with same semantics. -}; - -inline bool operator==(const IndirectReference& a, const IndirectReference& b) { - return a.location == b.location && a.target_key == b.target_key; -} - // Interface for extracting References through member function GetNext(). // This is used by Disassemblers to extract references from an image file. // Typically, a Reader lazily extracts values and does not hold any storage.
diff --git a/components/zucchini/reference_set.cc b/components/zucchini/reference_set.cc index 963e814..0179a51 100644 --- a/components/zucchini/reference_set.cc +++ b/components/zucchini/reference_set.cc
@@ -16,12 +16,11 @@ namespace { // Returns true if |refs| is sorted by location. -bool IsReferenceListSorted(const std::vector<IndirectReference>& refs) { - return std::is_sorted( - refs.begin(), refs.end(), - [](const IndirectReference& a, const IndirectReference& b) { - return a.location < b.location; - }); +bool IsReferenceListSorted(const std::vector<Reference>& refs) { + return std::is_sorted(refs.begin(), refs.end(), + [](const Reference& a, const Reference& b) { + return a.location < b.location; + }); } } // namespace @@ -36,28 +35,22 @@ DCHECK(references_.empty()); for (auto ref = ref_reader.GetNext(); ref.has_value(); ref = ref_reader.GetNext()) { - references_.push_back( - {ref->location, target_pool_.KeyForOffset(ref->target)}); + references_.push_back(*ref); } DCHECK(IsReferenceListSorted(references_)); } void ReferenceSet::InitReferences(const std::vector<Reference>& refs) { DCHECK(references_.empty()); - references_.reserve(refs.size()); - std::transform(refs.begin(), refs.end(), std::back_inserter(references_), - [&](const Reference& ref) -> IndirectReference { - return {ref.location, target_pool_.KeyForOffset(ref.target)}; - }); DCHECK(IsReferenceListSorted(references_)); + references_.assign(refs.begin(), refs.end()); } -IndirectReference ReferenceSet::at(offset_t offset) const { - auto pos = - std::upper_bound(references_.begin(), references_.end(), offset, - [](offset_t offset, const IndirectReference& ref) { - return offset < ref.location; - }); +Reference ReferenceSet::at(offset_t offset) const { + auto pos = std::upper_bound(references_.begin(), references_.end(), offset, + [](offset_t offset, const Reference& ref) { + return offset < ref.location; + }); DCHECK(pos != references_.begin()); // Iterators. --pos;
diff --git a/components/zucchini/reference_set.h b/components/zucchini/reference_set.h index 2ca7202..07940f0 100644 --- a/components/zucchini/reference_set.h +++ b/components/zucchini/reference_set.h
@@ -15,11 +15,11 @@ class TargetPool; -// Container of distinct indirect references of one type, along with traits, -// only used during patch generation. +// Container of distinct references of one type, along with traits, only used +// during patch generation. class ReferenceSet { public: - using const_iterator = std::vector<IndirectReference>::const_iterator; + using const_iterator = std::vector<Reference>::const_iterator; // |traits| specifies the reference represented. |target_pool| specifies // common targets shared by all reference represented, and mediates target @@ -36,19 +36,17 @@ void InitReferences(ReferenceReader&& ref_reader); void InitReferences(const std::vector<Reference>& refs); - const std::vector<IndirectReference>& references() const { - return references_; - } + const std::vector<Reference>& references() const { return references_; } const ReferenceTypeTraits& traits() const { return traits_; } const TargetPool& target_pool() const { return target_pool_; } TypeTag type_tag() const { return traits_.type_tag; } PoolTag pool_tag() const { return traits_.pool_tag; } offset_t width() const { return traits_.width; } - // Looks up the IndirectReference by an |offset| that it spans. |offset| is - // assumed to be valid, i.e., |offset| must be spanned by some - // IndirectReference in |references_|. - IndirectReference at(offset_t offset) const; + // Looks up the Reference by an |offset| that it spans. |offset| is assumed to + // be valid, i.e., |offset| must be spanned by some Reference in + // |references_|. + Reference at(offset_t offset) const; size_t size() const { return references_.size(); } const_iterator begin() const { return references_.begin(); } @@ -57,8 +55,8 @@ private: ReferenceTypeTraits traits_; const TargetPool& target_pool_; - // List of distinct IndirectReference instances sorted by location. - std::vector<IndirectReference> references_; + // List of distinct Reference instances sorted by location. + std::vector<Reference> references_; }; } // namespace zucchini
diff --git a/components/zucchini/reference_set_unittest.cc b/components/zucchini/reference_set_unittest.cc index b4ccceb..0bf869e 100644 --- a/components/zucchini/reference_set_unittest.cc +++ b/components/zucchini/reference_set_unittest.cc
@@ -28,24 +28,22 @@ }; TEST_F(ReferenceSetTest, InitReferencesFromReader) { - EXPECT_EQ(std::vector<IndirectReference>(), reference_set_.references()); + EXPECT_EQ(std::vector<Reference>(), reference_set_.references()); EXPECT_EQ(0U, reference_set_.size()); std::vector<Reference> references = {{10, 0}, {12, 2}, {14, 5}}; reference_set_.InitReferences(TestReferenceReader(references)); - EXPECT_EQ(std::vector<IndirectReference>({{10, 0}, {12, 1}, {14, 3}}), - reference_set_.references()); - EXPECT_EQ(3U, reference_set_.size()); + EXPECT_EQ(references, reference_set_.references()); } TEST_F(ReferenceSetTest, At) { reference_set_.InitReferences({{10, 0}, {12, 2}, {15, 5}}); // Each references has kWidth = 2, so check all bytes covered. - EXPECT_EQ(IndirectReference({10, 0}), reference_set_.at(10)); - EXPECT_EQ(IndirectReference({10, 0}), reference_set_.at(11)); - EXPECT_EQ(IndirectReference({12, 1}), reference_set_.at(12)); - EXPECT_EQ(IndirectReference({12, 1}), reference_set_.at(13)); - EXPECT_EQ(IndirectReference({15, 3}), reference_set_.at(15)); - EXPECT_EQ(IndirectReference({15, 3}), reference_set_.at(16)); + EXPECT_EQ(Reference({10, 0}), reference_set_.at(10)); + EXPECT_EQ(Reference({10, 0}), reference_set_.at(11)); + EXPECT_EQ(Reference({12, 2}), reference_set_.at(12)); + EXPECT_EQ(Reference({12, 2}), reference_set_.at(13)); + EXPECT_EQ(Reference({15, 5}), reference_set_.at(15)); + EXPECT_EQ(Reference({15, 5}), reference_set_.at(16)); } } // namespace zucchini
diff --git a/components/zucchini/zucchini_gen.cc b/components/zucchini/zucchini_gen.cc index 0bb4658..38bd8b1 100644 --- a/components/zucchini/zucchini_gen.cc +++ b/components/zucchini/zucchini_gen.cc
@@ -202,21 +202,19 @@ equiv.src_offset + (dst_ref->location - equiv.dst_offset); auto src_ref = std::lower_bound( src_refs.begin(), src_refs.end(), src_loc, - [](const IndirectReference& a, offset_t b) { return a.location < b; }); + [](const Reference& a, offset_t b) { return a.location < b; }); for (; dst_ref != dst_refs.end() && dst_ref->location + ref_width <= equiv.dst_end(); ++dst_ref, ++src_ref) { // Local offset of |src_ref| should match that of |dst_ref|. DCHECK_EQ(src_ref->location - equiv.src_offset, dst_ref->location - equiv.dst_offset); - offset_t old_offset = - src_refs.target_pool().OffsetForKey(src_ref->target_key); + offset_t old_offset = src_ref->target; offset_t new_estimated_offset = offset_mapper.ExtendedForwardProject(old_offset); offset_t new_estimated_key = projected_target_pool.KeyForNearestOffset(new_estimated_offset); - offset_t new_offset = - dst_refs.target_pool().OffsetForKey(dst_ref->target_key); + offset_t new_offset = dst_ref->target; offset_t new_key = projected_target_pool.KeyForOffset(new_offset); reference_delta_sink->PutNext(
diff --git a/content/browser/BUILD.gn b/content/browser/BUILD.gn index 15d7277..9cb8d99 100644 --- a/content/browser/BUILD.gn +++ b/content/browser/BUILD.gn
@@ -789,10 +789,10 @@ "file_url_loader_factory.h", "fileapi/browser_file_system_helper.cc", "fileapi/browser_file_system_helper.h", + "fileapi/file_system_manager_impl.cc", + "fileapi/file_system_manager_impl.h", "fileapi/file_system_url_loader_factory.cc", "fileapi/file_system_url_loader_factory.h", - "fileapi/fileapi_message_filter.cc", - "fileapi/fileapi_message_filter.h", "find_in_page_client.cc", "find_in_page_client.h", "find_request_manager.cc", @@ -1161,6 +1161,8 @@ "media/session/media_session_uma_helper.h", "media/url_provision_fetcher.cc", "media/url_provision_fetcher.h", + "media/video_decoder_proxy.cc", + "media/video_decoder_proxy.h", "memory/memory_condition_observer.cc", "memory/memory_condition_observer.h", "memory/memory_coordinator_default_policy.cc", @@ -1238,6 +1240,8 @@ "picture_in_picture/overlay_surface_embedder.h", "picture_in_picture/picture_in_picture_window_controller_impl.cc", "picture_in_picture/picture_in_picture_window_controller_impl.h", + "portal/portal.cc", + "portal/portal.h", "presentation/presentation_service_impl.cc", "presentation/presentation_service_impl.h", "process_internals/process_internals_handler_impl.cc",
diff --git a/content/browser/android/synchronous_compositor_host.h b/content/browser/android/synchronous_compositor_host.h index 9084dcf..3c17c46 100644 --- a/content/browser/android/synchronous_compositor_host.h +++ b/content/browser/android/synchronous_compositor_host.h
@@ -131,7 +131,8 @@ // Indicates begin frames are paused from the browser. bool begin_frame_paused_ = false; - // Updated by both renderer and browser. + // Updated by both renderer and browser. This is in physical pixel when + // use-zoom-for-dsf is enabled, otherwise in dip. gfx::ScrollOffset root_scroll_offset_; // Indicates that whether OnComputeScroll is called or overridden. The @@ -146,6 +147,7 @@ bool invalidate_needs_draw_; uint32_t did_activate_pending_tree_count_; uint32_t frame_metadata_version_ = 0u; + // Physical pixel when use-zoom-for-dsf is enabled, otherwise in dip. gfx::ScrollOffset max_scroll_offset_; gfx::SizeF scrollable_size_; float page_scale_factor_ = 0.f;
diff --git a/content/browser/background_fetch/background_fetch_context.cc b/content/browser/background_fetch/background_fetch_context.cc index 55bbbde..83bf25e 100644 --- a/content/browser/background_fetch/background_fetch_context.cc +++ b/content/browser/background_fetch/background_fetch_context.cc
@@ -365,14 +365,15 @@ case BackgroundFetchReasonToAbort::CANCELLED_FROM_UI: CleanupRegistration(registration_id, {}, mojom::BackgroundFetchState::FAILED); - // TODO(rayankans): Send fetches to the event dispatcher. - event_dispatcher_.DispatchBackgroundFetchAbortEvent( - registration_id, {} /* settled_fetches */, base::DoNothing()); + event_dispatcher_.DispatchBackgroundFetchAbortEvent(registration_id, + base::DoNothing()); return; case BackgroundFetchReasonToAbort::TOTAL_DOWNLOAD_SIZE_EXCEEDED: case BackgroundFetchReasonToAbort::SERVICE_WORKER_UNAVAILABLE: case BackgroundFetchReasonToAbort::NONE: // This will send a BackgroundFetchFetched or BackgroundFetchFail event. + // TODO(crbug.com/699957): Get rid of this once matchAll() is implemented + // on BackgroundFetchRegistration. data_manager_->GetSettledFetchesForRegistration( registration_id, std::make_unique<BackgroundFetchRequestMatchParams>(), @@ -397,11 +398,11 @@ return; } - // The `backgroundfetched` event will be invoked when all requests in the + // The `backgroundfetchsuccess` event will be invoked when all requests in the // registration have completed successfully. In all other cases, the // `backgroundfetchfail` event will be invoked instead. if (background_fetch_succeeded) { - event_dispatcher_.DispatchBackgroundFetchedEvent( + event_dispatcher_.DispatchBackgroundFetchSuccessEvent( registration_id, std::move(settled_fetches), base::BindOnce( &BackgroundFetchContext::CleanupRegistration, @@ -435,12 +436,12 @@ // If we had an active JobController, it is no longer necessary, as the // notification's UI can no longer be updated after the fetch is aborted, or - // after the waitUntil promise of the backgroundfetched/backgroundfetchfail - // event has been resolved. Store the information we want to persist after - // the controller is gone, in completed_fetches_. + // after the waitUntil promise of the + // backgroundfetchsuccess/backgroundfetchfail event has been resolved. Store + // the information we want to persist after the controller is gone, in + // completed_fetches_. if (preserve_info_to_dispatch_click_event) { - completed_fetches_[registration_id.unique_id()] = {registration_id, - background_fetch_state}; + completed_fetches_[registration_id.unique_id()] = registration_id; } job_controllers_.erase(registration_id.unique_id()); @@ -463,8 +464,7 @@ if (iter != completed_fetches_.end()) { // The fetch has succeeded or failed. (not aborted/cancelled). event_dispatcher_.DispatchBackgroundFetchClickEvent( - iter->second.first /* registration_id */, - iter->second.second /* background_fetch_state */, base::DoNothing()); + iter->second /* registration_id */, base::DoNothing()); completed_fetches_.erase(iter); return; } @@ -474,8 +474,7 @@ if (controllers_iter == job_controllers_.end()) return; event_dispatcher_.DispatchBackgroundFetchClickEvent( - controllers_iter->second->registration_id(), - mojom::BackgroundFetchState::PENDING, base::DoNothing()); + controllers_iter->second->registration_id(), base::DoNothing()); } void BackgroundFetchContext::LastObserverGarbageCollected(
diff --git a/content/browser/background_fetch/background_fetch_context.h b/content/browser/background_fetch/background_fetch_context.h index 146b027..23e9d532 100644 --- a/content/browser/background_fetch/background_fetch_context.h +++ b/content/browser/background_fetch/background_fetch_context.h
@@ -254,14 +254,11 @@ std::map<std::string, std::unique_ptr<BackgroundFetchJobController>> job_controllers_; - // Map from background fetch registration |unique_ids|s to {background fetch - // registration id, fetch state}. An entry in here means the fetch has - // completed. This information is needed after the fetch has completed. + // Map from |unique_id|s to |registration_id|s. An entry in here means the + // fetch has completed. This information is needed after the fetch has + // completed to dispatch the backgroundfetchclick event. // TODO(crbug.com/857122): Clean this up when the UI is no longer showing. - std::map< - std::string, - std::pair<BackgroundFetchRegistrationId, mojom::BackgroundFetchState>> - completed_fetches_; + std::map<std::string, BackgroundFetchRegistrationId> completed_fetches_; // Map from BackgroundFetchRegistrationIds to FetchCallbacks for active // fetches. Must be destroyed before |data_manager_| and
diff --git a/content/browser/background_fetch/background_fetch_data_manager.h b/content/browser/background_fetch/background_fetch_data_manager.h index a250971..345e219 100644 --- a/content/browser/background_fetch/background_fetch_data_manager.h +++ b/content/browser/background_fetch/background_fetch_data_manager.h
@@ -125,16 +125,17 @@ std::unique_ptr<BackgroundFetchRequestMatchParams> match_params, SettledFetchesCallback callback); - // Marks that the backgroundfetched/backgroundfetchfail/backgroundfetchabort - // event is being dispatched. It's not possible to call DeleteRegistration at - // this point as JavaScript may hold a reference to a - // BackgroundFetchRegistration object and we need to keep the corresponding - // data around until the last such reference is released (or until shutdown). - // We can't just move the Background Fetch registration's data to RAM as it - // might consume too much memory. So instead this step disassociates the - // |developer_id| from the |unique_id|, so that existing JS objects with a - // reference to |unique_id| can still access the data, but it can no longer be - // reached using GetIds or GetRegistration. + // Marks that the + // backgroundfetchsuccess/backgroundfetchfail/backgroundfetchabort event is + // being dispatched. It's not possible to call DeleteRegistration at this + // point as JavaScript may hold a reference to a BackgroundFetchRegistration + // object and we need to keep the corresponding data around until the last + // such reference is released (or until shutdown). We can't just move the + // Background Fetch registration's data to RAM as it might consume too much + // memory. So instead this step disassociates the |developer_id| from the + // |unique_id|, so that existing JS objects with a reference to |unique_id| + // can still access the data, but it can no longer be reached using GetIds or + // GetRegistration. void MarkRegistrationForDeletion( const BackgroundFetchRegistrationId& registration_id, HandleBackgroundFetchErrorCallback callback);
diff --git a/content/browser/background_fetch/background_fetch_data_manager_unittest.cc b/content/browser/background_fetch/background_fetch_data_manager_unittest.cc index 08db0e6..6661a2de5 100644 --- a/content/browser/background_fetch/background_fetch_data_manager_unittest.cc +++ b/content/browser/background_fetch/background_fetch_data_manager_unittest.cc
@@ -25,6 +25,7 @@ #include "content/browser/background_fetch/background_fetch_test_data_manager.h" #include "content/browser/background_fetch/storage/database_helpers.h" #include "content/browser/background_fetch/storage/image_helpers.h" +#include "content/browser/cache_storage/cache_storage_cache_handle.h" #include "content/browser/cache_storage/cache_storage_manager.h" #include "content/browser/service_worker/service_worker_context_wrapper.h" #include "content/public/browser/background_fetch_response.h" @@ -426,6 +427,39 @@ return result; } + void DeleteFromCache(const ServiceWorkerFetchRequest& request) { + CacheStorageCacheHandle handle; + { + base::RunLoop run_loop; + background_fetch_data_manager_->cache_manager()->OpenCache( + origin(), CacheStorageOwner::kBackgroundFetch, + kExampleUniqueId /* cache_name */, + base::BindOnce(&BackgroundFetchDataManagerTest::DidOpenCache, + base::Unretained(this), run_loop.QuitClosure(), + &handle)); + run_loop.Run(); + } + + DCHECK(handle.value()); + + { + base::RunLoop run_loop; + std::vector<blink::mojom::BatchOperationPtr> operation_ptr_vec; + operation_ptr_vec.push_back(blink::mojom::BatchOperation::New()); + operation_ptr_vec[0]->operation_type = + blink::mojom::OperationType::kDelete; + operation_ptr_vec[0]->request = request; + + handle.value()->BatchOperation( + std::move(operation_ptr_vec), + base::BindOnce(&BackgroundFetchDataManagerTest::DidDeleteFromCache, + base::Unretained(this), run_loop.QuitClosure()), + base::DoNothing()); + + run_loop.Run(); + } + } + // Returns the title and the icon. std::pair<std::string, SkBitmap> GetUIOptions( int64_t service_worker_registration_id) { @@ -614,6 +648,22 @@ std::move(quit_closure).Run(); } + void DidOpenCache(base::OnceClosure quit_closure, + CacheStorageCacheHandle* out_handle, + CacheStorageCacheHandle handle, + blink::mojom::CacheStorageError error) { + DCHECK(out_handle); + DCHECK_EQ(error, blink::mojom::CacheStorageError::kSuccess); + *out_handle = std::move(handle); + std::move(quit_closure).Run(); + } + + void DidDeleteFromCache(base::OnceClosure quit_closure, + blink::mojom::CacheStorageError error) { + DCHECK_EQ(error, blink::mojom::CacheStorageError::kSuccess); + std::move(quit_closure).Run(); + } + std::unique_ptr<BackgroundFetchTestDataManager> background_fetch_data_manager_; }; @@ -1237,7 +1287,8 @@ int64_t sw_id = RegisterServiceWorker(); ASSERT_NE(blink::mojom::kInvalidServiceWorkerRegistrationId, sw_id); - std::vector<ServiceWorkerFetchRequest> requests(2u); + std::vector<ServiceWorkerFetchRequest> requests = + CreateValidRequests(origin(), 2u /* num_requests */); BackgroundFetchOptions options; blink::mojom::BackgroundFetchError error; BackgroundFetchRegistrationId registration_id( @@ -1690,6 +1741,41 @@ "BackgroundFetch.Storage.CreateMetadataTask", 1 /* kServiceWorkerStorageError */, 1); } + + scoped_refptr<BackgroundFetchRequestInfo> request_info; + PopNextRequest(registration_id, &request_info); + ASSERT_TRUE(request_info); + AnnotateRequestInfoWithFakeDownloadManagerData(request_info.get(), + true /* success */); + MarkRequestAsComplete(registration_id, request_info.get()); + + bool succeeded = false; + std::vector<BackgroundFetchSettledFetch> settled_fetches; + + { + GetSettledFetchesForRegistration(registration_id, + base::nullopt /* request_to_match */, + &error, &succeeded, &settled_fetches); + + ASSERT_EQ(error, blink::mojom::BackgroundFetchError::NONE); + } + + // Delete an expected entry to get a CachStorageError. + EXPECT_TRUE(MatchCache(requests[0])); + DeleteFromCache(requests[0]); + ASSERT_FALSE(MatchCache(requests[0])); + + { + base::HistogramTester histogram_tester; + GetSettledFetchesForRegistration(registration_id, + base::nullopt /* request_to_match */, + &error, &succeeded, &settled_fetches); + + ASSERT_EQ(error, blink::mojom::BackgroundFetchError::STORAGE_ERROR); + histogram_tester.ExpectBucketCount( + "BackgroundFetch.Storage.GetSettledFetchesTask", + 2 /* kCacheStorageError */, 1); + } } } // namespace content
diff --git a/content/browser/background_fetch/background_fetch_embedded_worker_test_helper.cc b/content/browser/background_fetch/background_fetch_embedded_worker_test_helper.cc index 81b2e3a..8ff1c510 100644 --- a/content/browser/background_fetch/background_fetch_embedded_worker_test_helper.cc +++ b/content/browser/background_fetch/background_fetch_embedded_worker_test_helper.cc
@@ -22,11 +22,9 @@ void BackgroundFetchEmbeddedWorkerTestHelper::OnBackgroundFetchAbortEvent( const std::string& developer_id, const std::string& unique_id, - const std::vector<BackgroundFetchSettledFetch>& fetches, mojom::ServiceWorker::DispatchBackgroundFetchAbortEventCallback callback) { last_developer_id_ = developer_id; last_unique_id_ = unique_id; - last_fetches_ = fetches; if (fail_abort_event_) { std::move(callback).Run(blink::mojom::ServiceWorkerEventStatus::REJECTED, @@ -42,10 +40,10 @@ void BackgroundFetchEmbeddedWorkerTestHelper::OnBackgroundFetchClickEvent( const std::string& developer_id, - mojom::BackgroundFetchState state, + const std::string& unique_id, mojom::ServiceWorker::DispatchBackgroundFetchClickEventCallback callback) { last_developer_id_ = developer_id; - last_state_ = state; + last_unique_id_ = unique_id; if (fail_click_event_) { std::move(callback).Run(blink::mojom::ServiceWorkerEventStatus::REJECTED, @@ -80,11 +78,12 @@ fetch_fail_event_closure_.Run(); } -void BackgroundFetchEmbeddedWorkerTestHelper::OnBackgroundFetchedEvent( +void BackgroundFetchEmbeddedWorkerTestHelper::OnBackgroundFetchSuccessEvent( const std::string& developer_id, const std::string& unique_id, const std::vector<BackgroundFetchSettledFetch>& fetches, - mojom::ServiceWorker::DispatchBackgroundFetchedEventCallback callback) { + mojom::ServiceWorker::DispatchBackgroundFetchSuccessEventCallback + callback) { last_developer_id_ = developer_id; last_unique_id_ = unique_id; last_fetches_ = fetches;
diff --git a/content/browser/background_fetch/background_fetch_embedded_worker_test_helper.h b/content/browser/background_fetch/background_fetch_embedded_worker_test_helper.h index 312debd..f799a145 100644 --- a/content/browser/background_fetch/background_fetch_embedded_worker_test_helper.h +++ b/content/browser/background_fetch/background_fetch_embedded_worker_test_helper.h
@@ -69,12 +69,11 @@ void OnBackgroundFetchAbortEvent( const std::string& developer_id, const std::string& unique_id, - const std::vector<BackgroundFetchSettledFetch>& fetches, mojom::ServiceWorker::DispatchBackgroundFetchAbortEventCallback callback) override; void OnBackgroundFetchClickEvent( const std::string& developer_id, - mojom::BackgroundFetchState state, + const std::string& unique_id, mojom::ServiceWorker::DispatchBackgroundFetchClickEventCallback callback) override; void OnBackgroundFetchFailEvent( @@ -83,12 +82,12 @@ const std::vector<BackgroundFetchSettledFetch>& fetches, mojom::ServiceWorker::DispatchBackgroundFetchFailEventCallback callback) override; - void OnBackgroundFetchedEvent( + void OnBackgroundFetchSuccessEvent( const std::string& developer_id, const std::string& unique_id, const std::vector<BackgroundFetchSettledFetch>& fetches, - mojom::ServiceWorker::DispatchBackgroundFetchedEventCallback callback) - override; + mojom::ServiceWorker::DispatchBackgroundFetchSuccessEventCallback + callback) override; private: bool fail_abort_event_ = false;
diff --git a/content/browser/background_fetch/background_fetch_event_dispatcher.cc b/content/browser/background_fetch/background_fetch_event_dispatcher.cc index e80dd43..a17344a 100644 --- a/content/browser/background_fetch/background_fetch_event_dispatcher.cc +++ b/content/browser/background_fetch/background_fetch_event_dispatcher.cc
@@ -27,8 +27,8 @@ return "ClickEvent"; case ServiceWorkerMetrics::EventType::BACKGROUND_FETCH_FAIL: return "FailEvent"; - case ServiceWorkerMetrics::EventType::BACKGROUND_FETCHED: - return "FetchedEvent"; + case ServiceWorkerMetrics::EventType::BACKGROUND_FETCH_SUCCESS: + return "SuccessEvent"; default: NOTREACHED(); return std::string(); @@ -75,7 +75,6 @@ void BackgroundFetchEventDispatcher::DispatchBackgroundFetchAbortEvent( const BackgroundFetchRegistrationId& registration_id, - const std::vector<BackgroundFetchSettledFetch>& fetches, base::OnceClosure finished_closure) { DCHECK_CURRENTLY_ON(BrowserThread::IO); LoadServiceWorkerRegistrationForDispatch( @@ -83,25 +82,22 @@ std::move(finished_closure), base::Bind( &BackgroundFetchEventDispatcher::DoDispatchBackgroundFetchAbortEvent, - registration_id.developer_id(), registration_id.unique_id(), - fetches)); + registration_id.developer_id(), registration_id.unique_id())); } void BackgroundFetchEventDispatcher::DoDispatchBackgroundFetchAbortEvent( const std::string& developer_id, const std::string& unique_id, - const std::vector<BackgroundFetchSettledFetch>& fetches, scoped_refptr<ServiceWorkerVersion> service_worker_version, int request_id) { DCHECK(service_worker_version); service_worker_version->endpoint()->DispatchBackgroundFetchAbortEvent( - developer_id, unique_id, fetches, + developer_id, unique_id, service_worker_version->CreateSimpleEventCallback(request_id)); } void BackgroundFetchEventDispatcher::DispatchBackgroundFetchClickEvent( const BackgroundFetchRegistrationId& registration_id, - mojom::BackgroundFetchState state, base::OnceClosure finished_closure) { DCHECK_CURRENTLY_ON(BrowserThread::IO); LoadServiceWorkerRegistrationForDispatch( @@ -109,17 +105,16 @@ std::move(finished_closure), base::Bind( &BackgroundFetchEventDispatcher::DoDispatchBackgroundFetchClickEvent, - registration_id.developer_id(), state)); + registration_id)); } void BackgroundFetchEventDispatcher::DoDispatchBackgroundFetchClickEvent( - const std::string& developer_id, - mojom::BackgroundFetchState state, + const BackgroundFetchRegistrationId& registration_id, scoped_refptr<ServiceWorkerVersion> service_worker_version, int request_id) { DCHECK(service_worker_version); service_worker_version->endpoint()->DispatchBackgroundFetchClickEvent( - developer_id, state, + registration_id.developer_id(), registration_id.unique_id(), service_worker_version->CreateSimpleEventCallback(request_id)); } @@ -149,28 +144,29 @@ service_worker_version->CreateSimpleEventCallback(request_id)); } -void BackgroundFetchEventDispatcher::DispatchBackgroundFetchedEvent( +void BackgroundFetchEventDispatcher::DispatchBackgroundFetchSuccessEvent( const BackgroundFetchRegistrationId& registration_id, const std::vector<BackgroundFetchSettledFetch>& fetches, base::OnceClosure finished_closure) { DCHECK_CURRENTLY_ON(BrowserThread::IO); LoadServiceWorkerRegistrationForDispatch( - registration_id, ServiceWorkerMetrics::EventType::BACKGROUND_FETCHED, + registration_id, + ServiceWorkerMetrics::EventType::BACKGROUND_FETCH_SUCCESS, std::move(finished_closure), - base::Bind( - &BackgroundFetchEventDispatcher::DoDispatchBackgroundFetchedEvent, - registration_id.developer_id(), registration_id.unique_id(), - fetches)); + base::Bind(&BackgroundFetchEventDispatcher:: + DoDispatchBackgroundFetchSuccessEvent, + registration_id.developer_id(), registration_id.unique_id(), + fetches)); } -void BackgroundFetchEventDispatcher::DoDispatchBackgroundFetchedEvent( +void BackgroundFetchEventDispatcher::DoDispatchBackgroundFetchSuccessEvent( const std::string& developer_id, const std::string& unique_id, const std::vector<BackgroundFetchSettledFetch>& fetches, scoped_refptr<ServiceWorkerVersion> service_worker_version, int request_id) { DCHECK(service_worker_version); - service_worker_version->endpoint()->DispatchBackgroundFetchedEvent( + service_worker_version->endpoint()->DispatchBackgroundFetchSuccessEvent( developer_id, unique_id, fetches, service_worker_version->CreateSimpleEventCallback(request_id)); }
diff --git a/content/browser/background_fetch/background_fetch_event_dispatcher.h b/content/browser/background_fetch/background_fetch_event_dispatcher.h index f535820..dc864e7 100644 --- a/content/browser/background_fetch/background_fetch_event_dispatcher.h +++ b/content/browser/background_fetch/background_fetch_event_dispatcher.h
@@ -45,14 +45,12 @@ // background fetch was aborted by the user or another external event. void DispatchBackgroundFetchAbortEvent( const BackgroundFetchRegistrationId& registration_id, - const std::vector<BackgroundFetchSettledFetch>& fetches, base::OnceClosure finished_closure); // Dispatches the `backgroundfetchclick` event, which indicates that the user // interface displayed for an active background fetch was activated. void DispatchBackgroundFetchClickEvent( const BackgroundFetchRegistrationId& registration_id, - mojom::BackgroundFetchState state, base::OnceClosure finished_closure); // Dispatches the `backgroundfetchfail` event, which indicates that a @@ -63,9 +61,10 @@ const std::vector<BackgroundFetchSettledFetch>& fetches, base::OnceClosure finished_closure); - // Dispatches the `backgroundfetched` event, which indicates that a background - // fetch has successfully completed. The request-response pairs are included. - void DispatchBackgroundFetchedEvent( + // Dispatches the `backgroundfetchsuccess` event, which indicates that a + // background fetch has successfully completed. The request-response pairs are + // included. + void DispatchBackgroundFetchSuccessEvent( const BackgroundFetchRegistrationId& registration_id, const std::vector<BackgroundFetchSettledFetch>& fetches, base::OnceClosure finished_closure); @@ -116,12 +115,10 @@ static void DoDispatchBackgroundFetchAbortEvent( const std::string& developer_id, const std::string& unique_id, - const std::vector<BackgroundFetchSettledFetch>& fetches, scoped_refptr<ServiceWorkerVersion> service_worker_version, int request_id); static void DoDispatchBackgroundFetchClickEvent( - const std::string& developer_id, - mojom::BackgroundFetchState state, + const BackgroundFetchRegistrationId& registration_id, scoped_refptr<ServiceWorkerVersion> service_worker_version, int request_id); static void DoDispatchBackgroundFetchFailEvent( @@ -130,7 +127,7 @@ const std::vector<BackgroundFetchSettledFetch>& fetches, scoped_refptr<ServiceWorkerVersion> service_worker_version, int request_id); - static void DoDispatchBackgroundFetchedEvent( + static void DoDispatchBackgroundFetchSuccessEvent( const std::string& developer_id, const std::string& unique_id, const std::vector<BackgroundFetchSettledFetch>& fetches,
diff --git a/content/browser/background_fetch/background_fetch_event_dispatcher_unittest.cc b/content/browser/background_fetch/background_fetch_event_dispatcher_unittest.cc index dd6655e..11ea633 100644 --- a/content/browser/background_fetch/background_fetch_event_dispatcher_unittest.cc +++ b/content/browser/background_fetch/background_fetch_event_dispatcher_unittest.cc
@@ -44,8 +44,8 @@ kExampleUniqueId); base::RunLoop run_loop; - event_dispatcher_.DispatchBackgroundFetchAbortEvent( - invalid_registration_id, {}, run_loop.QuitClosure()); + event_dispatcher_.DispatchBackgroundFetchAbortEvent(invalid_registration_id, + run_loop.QuitClosure()); run_loop.Run(); @@ -71,8 +71,8 @@ { base::RunLoop run_loop; - event_dispatcher_.DispatchBackgroundFetchAbortEvent( - registration_id, fetches, run_loop.QuitClosure()); + event_dispatcher_.DispatchBackgroundFetchAbortEvent(registration_id, + run_loop.QuitClosure()); run_loop.Run(); } @@ -83,7 +83,6 @@ ASSERT_TRUE(embedded_worker_test_helper()->last_unique_id().has_value()); EXPECT_EQ(kExampleUniqueId, embedded_worker_test_helper()->last_unique_id().value()); - ASSERT_TRUE(embedded_worker_test_helper()->last_fetches().has_value()); histogram_tester_.ExpectUniqueSample( "BackgroundFetch.EventDispatchResult.AbortEvent", @@ -97,8 +96,8 @@ { base::RunLoop run_loop; - event_dispatcher_.DispatchBackgroundFetchAbortEvent( - second_registration_id, fetches, run_loop.QuitClosure()); + event_dispatcher_.DispatchBackgroundFetchAbortEvent(second_registration_id, + run_loop.QuitClosure()); run_loop.Run(); } @@ -109,7 +108,6 @@ ASSERT_TRUE(embedded_worker_test_helper()->last_unique_id().has_value()); EXPECT_EQ(kExampleUniqueId2, embedded_worker_test_helper()->last_unique_id().value()); - ASSERT_TRUE(embedded_worker_test_helper()->last_fetches().has_value()); histogram_tester_.ExpectBucketCount( "BackgroundFetch.EventDispatchResult.AbortEvent", @@ -133,9 +131,8 @@ { base::RunLoop run_loop; - event_dispatcher_.DispatchBackgroundFetchClickEvent( - registration_id, mojom::BackgroundFetchState::PENDING, - run_loop.QuitClosure()); + event_dispatcher_.DispatchBackgroundFetchClickEvent(registration_id, + run_loop.QuitClosure()); run_loop.Run(); } @@ -144,9 +141,6 @@ EXPECT_EQ(kExampleDeveloperId, embedded_worker_test_helper()->last_developer_id().value()); - ASSERT_TRUE(embedded_worker_test_helper()->last_state().has_value()); - EXPECT_EQ(mojom::BackgroundFetchState::PENDING, - embedded_worker_test_helper()->last_state()); histogram_tester_.ExpectUniqueSample( "BackgroundFetch.EventDispatchResult.ClickEvent", @@ -160,9 +154,8 @@ { base::RunLoop run_loop; - event_dispatcher_.DispatchBackgroundFetchClickEvent( - second_registration_id, mojom::BackgroundFetchState::SUCCEEDED, - run_loop.QuitClosure()); + event_dispatcher_.DispatchBackgroundFetchClickEvent(second_registration_id, + run_loop.QuitClosure()); run_loop.Run(); } @@ -171,10 +164,6 @@ EXPECT_EQ(kExampleDeveloperId2, embedded_worker_test_helper()->last_developer_id().value()); - ASSERT_TRUE(embedded_worker_test_helper()->last_state().has_value()); - EXPECT_EQ(mojom::BackgroundFetchState::SUCCEEDED, - embedded_worker_test_helper()->last_state()); - histogram_tester_.ExpectBucketCount( "BackgroundFetch.EventDispatchResult.ClickEvent", BackgroundFetchEventDispatcher::DISPATCH_RESULT_SUCCESS, 1); @@ -253,7 +242,7 @@ blink::ServiceWorkerStatusCode::kErrorEventWaitUntilRejected, 1); } -TEST_F(BackgroundFetchEventDispatcherTest, DispatchFetchedEvent) { +TEST_F(BackgroundFetchEventDispatcherTest, DispatchFetchSuccessEvent) { int64_t service_worker_registration_id = RegisterServiceWorker(); ASSERT_NE(blink::mojom::kInvalidServiceWorkerRegistrationId, service_worker_registration_id); @@ -267,8 +256,8 @@ { base::RunLoop run_loop; - event_dispatcher_.DispatchBackgroundFetchedEvent(registration_id, fetches, - run_loop.QuitClosure()); + event_dispatcher_.DispatchBackgroundFetchSuccessEvent( + registration_id, fetches, run_loop.QuitClosure()); run_loop.Run(); } @@ -286,7 +275,7 @@ embedded_worker_test_helper()->last_fetches()->size()); histogram_tester_.ExpectUniqueSample( - "BackgroundFetch.EventDispatchResult.FetchedEvent", + "BackgroundFetch.EventDispatchResult.SuccessEvent", BackgroundFetchEventDispatcher::DISPATCH_RESULT_SUCCESS, 1); fetches.push_back(BackgroundFetchSettledFetch()); @@ -299,7 +288,7 @@ { base::RunLoop run_loop; - event_dispatcher_.DispatchBackgroundFetchedEvent( + event_dispatcher_.DispatchBackgroundFetchSuccessEvent( second_registration_id, fetches, run_loop.QuitClosure()); run_loop.Run(); @@ -318,13 +307,13 @@ embedded_worker_test_helper()->last_fetches()->size()); histogram_tester_.ExpectBucketCount( - "BackgroundFetch.EventDispatchResult.FetchedEvent", + "BackgroundFetch.EventDispatchResult.SuccessEvent", BackgroundFetchEventDispatcher::DISPATCH_RESULT_SUCCESS, 1); histogram_tester_.ExpectBucketCount( - "BackgroundFetch.EventDispatchResult.FetchedEvent", + "BackgroundFetch.EventDispatchResult.SuccessEvent", BackgroundFetchEventDispatcher::DISPATCH_RESULT_CANNOT_DISPATCH_EVENT, 1); histogram_tester_.ExpectUniqueSample( - "BackgroundFetch.EventDispatchFailure.Dispatch.FetchedEvent", + "BackgroundFetch.EventDispatchFailure.Dispatch.SuccessEvent", blink::ServiceWorkerStatusCode::kErrorEventWaitUntilRejected, 1); }
diff --git a/content/browser/background_fetch/background_fetch_service_unittest.cc b/content/browser/background_fetch/background_fetch_service_unittest.cc index f6e0a0c5..f465789 100644 --- a/content/browser/background_fetch/background_fetch_service_unittest.cc +++ b/content/browser/background_fetch/background_fetch_service_unittest.cc
@@ -468,7 +468,8 @@ TEST_F(BackgroundFetchServiceTest, FetchSuccessEventDispatch) { // This test starts a new Background Fetch, completes the registration, then // fetches all files to complete the job, and then verifies that the - // `backgroundfetched` event will be dispatched with the expected contents. + // `backgroundfetchsuccess` event will be dispatched with the expected + // contents. int64_t service_worker_registration_id = RegisterServiceWorker(); ASSERT_NE(blink::mojom::kInvalidServiceWorkerRegistrationId, @@ -909,7 +910,7 @@ // Calling UpdateUI for the aborted registration should fail (unlike, say, // calling UpdateUI before resolving the waitUntil promise of a - // backgroundfetched or backgroundfetchfail event, both of which should + // backgroundfetchsuccess or backgroundfetchfail event, both of which should // work even though that registration is no longer active). UpdateUI(aborted_registration_id.service_worker_registration_id(), aborted_registration_id.unique_id(),
diff --git a/content/browser/background_fetch/storage/database_task.cc b/content/browser/background_fetch/storage/database_task.cc index 77d9f4e..ca593fe 100644 --- a/content/browser/background_fetch/storage/database_task.cc +++ b/content/browser/background_fetch/storage/database_task.cc
@@ -93,6 +93,10 @@ storage_error_); } +bool DatabaseTask::HasStorageError() { + return storage_error_ != BackgroundFetchStorageError::kNone; +} + std::string DatabaseTask::HistogramName() const { NOTREACHED() << "HistogramName needs to be provided."; return "GeneralDatabaseTask";
diff --git a/content/browser/background_fetch/storage/database_task.h b/content/browser/background_fetch/storage/database_task.h index 62d32979..b59bed6 100644 --- a/content/browser/background_fetch/storage/database_task.h +++ b/content/browser/background_fetch/storage/database_task.h
@@ -103,6 +103,7 @@ void SetStorageError(BackgroundFetchStorageError error); void SetStorageErrorAndFinish(BackgroundFetchStorageError error); void ReportStorageError(); + bool HasStorageError(); private: // Each task must override this function and perform the following steps:
diff --git a/content/browser/background_fetch/storage/delete_registration_task.cc b/content/browser/background_fetch/storage/delete_registration_task.cc index a1a0c0fa..ade9a78 100644 --- a/content/browser/background_fetch/storage/delete_registration_task.cc +++ b/content/browser/background_fetch/storage/delete_registration_task.cc
@@ -57,12 +57,9 @@ void DeleteRegistrationTask::Start() { base::RepeatingClosure barrier_closure = base::BarrierClosure( - 2u, base::BindOnce( - [](base::WeakPtr<DeleteRegistrationTask> task) { - if (task) - task->FinishWithError(task->error_); - }, - weak_factory_.GetWeakPtr())); + 2u, base::BindOnce(&DeleteRegistrationTask::FinishWithError, + weak_factory_.GetWeakPtr(), + blink::mojom::BackgroundFetchError::NONE)); #if DCHECK_IS_ON() // Get the registration |developer_id| to check it was deactivated. @@ -97,7 +94,7 @@ base::BindOnce(&DCheckRegistrationNotActive, unique_id_)); } else { // Service worker database has been corrupted. Abandon all fetches. - error_ = blink::mojom::BackgroundFetchError::STORAGE_ERROR; + SetStorageError(BackgroundFetchStorageError::kServiceWorkerStorageError); AbandonFetches(service_worker_registration_id_); std::move(done_closure).Run(); } @@ -125,7 +122,7 @@ case DatabaseStatus::kNotFound: break; case DatabaseStatus::kFailed: - error_ = blink::mojom::BackgroundFetchError::STORAGE_ERROR; + SetStorageError(BackgroundFetchStorageError::kServiceWorkerStorageError); break; } std::move(done_closure).Run(); @@ -136,17 +133,24 @@ blink::mojom::CacheStorageError error) { if (error != blink::mojom::CacheStorageError::kSuccess && error != blink::mojom::CacheStorageError::kErrorNotFound) { - error_ = blink::mojom::BackgroundFetchError::STORAGE_ERROR; + SetStorageError(BackgroundFetchStorageError::kCacheStorageError); } std::move(done_closure).Run(); } void DeleteRegistrationTask::FinishWithError( blink::mojom::BackgroundFetchError error) { + if (HasStorageError()) + error = blink::mojom::BackgroundFetchError::STORAGE_ERROR; + ReportStorageError(); std::move(callback_).Run(error); Finished(); // Destroys |this|. } +std::string DeleteRegistrationTask::HistogramName() const { + return "DeleteRegistrationTask"; +} + } // namespace background_fetch } // namespace content
diff --git a/content/browser/background_fetch/storage/delete_registration_task.h b/content/browser/background_fetch/storage/delete_registration_task.h index b25a7d1..89195b8 100644 --- a/content/browser/background_fetch/storage/delete_registration_task.h +++ b/content/browser/background_fetch/storage/delete_registration_task.h
@@ -43,15 +43,13 @@ void FinishWithError(blink::mojom::BackgroundFetchError error) override; + std::string HistogramName() const override; + int64_t service_worker_registration_id_; url::Origin origin_; std::string unique_id_; HandleBackgroundFetchErrorCallback callback_; - // The error to report once all async work is completed. - blink::mojom::BackgroundFetchError error_ = - blink::mojom::BackgroundFetchError::NONE; - base::WeakPtrFactory<DeleteRegistrationTask> weak_factory_; // Keep as last. DISALLOW_COPY_AND_ASSIGN(DeleteRegistrationTask);
diff --git a/content/browser/background_fetch/storage/get_settled_fetches_task.cc b/content/browser/background_fetch/storage/get_settled_fetches_task.cc index e39a864..7272dbb9 100644 --- a/content/browser/background_fetch/storage/get_settled_fetches_task.cc +++ b/content/browser/background_fetch/storage/get_settled_fetches_task.cc
@@ -50,8 +50,7 @@ CacheStorageCacheHandle handle, blink::mojom::CacheStorageError error) { if (error != blink::mojom::CacheStorageError::kSuccess) { - // TODO(crbug.com/780025): Log failures to UMA. - error_ = blink::mojom::BackgroundFetchError::STORAGE_ERROR; + SetStorageError(BackgroundFetchStorageError::kCacheStorageError); } else { DCHECK(handle.value()); handle_ = std::move(handle); @@ -66,9 +65,8 @@ switch (ToDatabaseStatus(status)) { case DatabaseStatus::kOk: break; - // TODO(crbug.com/780025): Log failures to UMA. case DatabaseStatus::kFailed: - error_ = blink::mojom::BackgroundFetchError::STORAGE_ERROR; + SetStorageError(BackgroundFetchStorageError::kServiceWorkerStorageError); break; case DatabaseStatus::kNotFound: background_fetch_succeeded_ = false; @@ -82,7 +80,7 @@ if (!completed_requests_.back().ParseFromString( serialized_completed_request)) { // Service worker database has been corrupted. Abandon fetches. - error_ = blink::mojom::BackgroundFetchError::STORAGE_ERROR; + SetStorageError(BackgroundFetchStorageError::kServiceWorkerStorageError); background_fetch_succeeded_ = false; AbandonFetches(registration_id_.service_worker_registration_id()); break; @@ -94,6 +92,11 @@ } void GetSettledFetchesTask::GetResponses() { + // Handle potential errors. + if (HasStorageError()) { + FinishWithError(blink::mojom::BackgroundFetchError::STORAGE_ERROR); + return; + } if (error_ != blink::mojom::BackgroundFetchError::NONE) { FinishWithError(error_); return; @@ -166,8 +169,19 @@ base::OnceClosure callback, blink::mojom::CacheStorageError error, blink::mojom::FetchAPIResponsePtr cache_response) { - if (error != blink::mojom::CacheStorageError::kSuccess) { - DCHECK(settled_fetch); + DCHECK(settled_fetch); + + // Handle error cases. + if (error == blink::mojom::CacheStorageError::kErrorNotFound) { + // If we are matching everything then we expect to find all responses + // in the cache. + if (!match_params_->FilterByRequest()) + SetStorageError(BackgroundFetchStorageError::kCacheStorageError); + } else if (error != blink::mojom::CacheStorageError::kSuccess) { + SetStorageError(BackgroundFetchStorageError::kCacheStorageError); + } + + if (!cache_response) { FillUncachedResponse(settled_fetch, std::move(callback)); return; } @@ -192,12 +206,19 @@ void GetSettledFetchesTask::FinishWithError( blink::mojom::BackgroundFetchError error) { + if (HasStorageError()) + error = blink::mojom::BackgroundFetchError::STORAGE_ERROR; + ReportStorageError(); std::move(settled_fetches_callback_) .Run(error, background_fetch_succeeded_, std::move(settled_fetches_), {} /* blob_data_handles */); Finished(); // Destroys |this|. } +std::string GetSettledFetchesTask::HistogramName() const { + return "GetSettledFetchesTask"; +}; + } // namespace background_fetch } // namespace content
diff --git a/content/browser/background_fetch/storage/get_settled_fetches_task.h b/content/browser/background_fetch/storage/get_settled_fetches_task.h index 01cdae6..6761485 100644 --- a/content/browser/background_fetch/storage/get_settled_fetches_task.h +++ b/content/browser/background_fetch/storage/get_settled_fetches_task.h
@@ -65,6 +65,8 @@ void FinishWithError(blink::mojom::BackgroundFetchError error) override; + std::string HistogramName() const override; + BackgroundFetchRegistrationId registration_id_; std::unique_ptr<BackgroundFetchRequestMatchParams> match_params_; SettledFetchesCallback settled_fetches_callback_;
diff --git a/content/browser/browser_main_loop.cc b/content/browser/browser_main_loop.cc index 51c63a9..21295c2 100644 --- a/content/browser/browser_main_loop.cc +++ b/content/browser/browser_main_loop.cc
@@ -83,6 +83,7 @@ #include "content/browser/net/browser_online_state_observer.h" #include "content/browser/renderer_host/media/media_stream_manager.h" #include "content/browser/renderer_host/render_process_host_impl.h" +#include "content/browser/scheduler/responsiveness/watcher.h" #include "content/browser/service_manager/service_manager_context.h" #include "content/browser/speech/speech_recognition_manager_impl.h" #include "content/browser/startup_data_impl.h" @@ -128,6 +129,7 @@ #include "ppapi/buildflags/buildflags.h" #include "services/audio/public/cpp/audio_system_factory.h" #include "services/audio/public/mojom/constants.mojom.h" +#include "services/network/transitional_url_loader_factory_owner.h" #include "services/resource_coordinator/public/cpp/memory_instrumentation/client_process_impl.h" #include "services/resource_coordinator/public/mojom/memory_instrumentation/memory_instrumentation.mojom.h" #include "services/resource_coordinator/public/mojom/service_constants.mojom.h" @@ -436,6 +438,9 @@ } #endif +const base::Feature kBrowserResponsivenessCalculator{ + "BrowserResponsivenessCalculator", base::FEATURE_DISABLED_BY_DEFAULT}; + } // namespace #if defined(USE_X11) @@ -810,6 +815,7 @@ skia::SkiaMemoryDumpProvider::GetInstance(), "Skia", nullptr); base::trace_event::MemoryDumpManager::GetInstance()->RegisterDumpProvider( sql::SqlMemoryDumpProvider::GetInstance(), "Sql", nullptr); + network::TransitionalURLLoaderFactoryOwner::DisallowUsageInProcess(); } int BrowserMainLoop::PreCreateThreads() { @@ -1470,6 +1476,11 @@ SystemHotkeyHelperMac::GetInstance()->DeferredLoadSystemHotkeys(); #endif // defined(OS_MACOSX) + if (base::FeatureList::IsEnabled(kBrowserResponsivenessCalculator)) { + responsiveness_watcher_ = new responsiveness::Watcher; + responsiveness_watcher_->SetUp(); + } + #if defined(OS_ANDROID) media::SetMediaDrmBridgeClient(GetContentClient()->GetMediaDrmBridgeClient()); #endif
diff --git a/content/browser/browser_main_loop.h b/content/browser/browser_main_loop.h index 040f1b6..feebf19d 100644 --- a/content/browser/browser_main_loop.h +++ b/content/browser/browser_main_loop.h
@@ -102,6 +102,10 @@ class TracingControllerImpl; struct MainFunctionParams; +namespace responsiveness { +class Watcher; +} // namespace responsiveness + #if defined(OS_ANDROID) class ScreenOrientationDelegate; #endif @@ -370,6 +374,7 @@ discardable_shared_memory_manager_; scoped_refptr<SaveFileManager> save_file_manager_; std::unique_ptr<content::TracingControllerImpl> tracing_controller_; + scoped_refptr<responsiveness::Watcher> responsiveness_watcher_; #if !defined(OS_ANDROID) // A SharedBitmapManager used to sharing and mapping IDs to shared memory // between processes for software compositing. When the display compositor is
diff --git a/content/browser/cache_storage/cache_storage_cache.cc b/content/browser/cache_storage/cache_storage_cache.cc index 2b2797e..2c4f2d3 100644 --- a/content/browser/cache_storage/cache_storage_cache.cc +++ b/content/browser/cache_storage/cache_storage_cache.cc
@@ -168,6 +168,63 @@ return true; } +// Check batch operation list for duplicate entries. +bool HasDuplicateOperations( + const std::vector<blink::mojom::BatchOperationPtr>& operations) { + using blink::mojom::BatchOperation; + + if (operations.size() < 2) { + return false; + } + + // Create a temporary sorted vector of the operations to support quickly + // finding potentially duplicate entries. Multiple entries may have the + // same URL, but differ by VARY header, so a sorted list is easier to + // work with than a map. + // + // Note, this will use 512 bytes of stack space on 64-bit devices. The + // static size attempts to accommodate most typical Cache.addAll() uses in + // service worker install events while not blowing up the stack too much. + base::StackVector<BatchOperation*, 64> sorted; + sorted->reserve(operations.size()); + for (const auto& op : operations) { + sorted->push_back(op.get()); + } + std::sort(sorted->begin(), sorted->end(), + [](BatchOperation* left, BatchOperation* right) { + return left->request.url < right->request.url; + }); + + // Check each entry in the sorted vector for any duplicates. Since the + // list is sorted we only need to inspect the immediate neighbors that + // have the same URL. This results in an average complexity of O(n log n). + // If the entire list has entries with the same URL and different VARY + // headers then this devolves into O(n^2). + for (auto outer = sorted->cbegin(); outer != sorted->cend(); ++outer) { + const BatchOperation* outer_op = *outer; + for (auto inner = std::next(outer); inner != sorted->cend(); ++inner) { + const BatchOperation* inner_op = *inner; + // Since the list is sorted we can stop looking at neighbors after + // the first different URL. + if (outer_op->request.url != inner_op->request.url) { + break; + } + // VaryMatches() is asymmetric since the operation depends on the VARY + // header in the target response. Since we only visit each pair of + // entries once we need to perform the VaryMatches() call in both + // directions. + if (VaryMatches(outer_op->request.headers, inner_op->request.headers, + inner_op->response->headers) || + VaryMatches(outer_op->request.headers, inner_op->request.headers, + outer_op->response->headers)) { + return true; + } + } + } + + return false; +} + GURL RemoveQueryParam(const GURL& url) { url::Replacements<char> replacements; replacements.ClearQuery(); @@ -544,6 +601,26 @@ return; } + // From BatchCacheOperations: + // + // https://w3c.github.io/ServiceWorker/#batch-cache-operations-algorithm + // + // "If the result of running Query Cache with operation’s request, + // operation’s options, and addedItems is not empty, throw an + // InvalidStateError DOMException." + // + // Note, the spec checks CacheQueryOptions like ignoreSearch, etc, but + // currently there is no way for script to trigger a batch operation with + // those set. The only exposed API is addAll() which does not allow + // options to be passed. Therefore, assume default options below. This + // is enforced in the mojo interface by not passing any options arguments. + if (HasDuplicateOperations(operations)) { + base::ThreadTaskRunnerHandle::Get()->PostTask( + FROM_HERE, base::BindOnce(std::move(callback), + CacheStorageError::kErrorDuplicateOperation)); + return; + } + // Estimate the required size of the put operations. The size of the deletes // is unknown and not considered. base::CheckedNumeric<uint64_t> safe_space_required = 0;
diff --git a/content/browser/cache_storage/cache_storage_cache_unittest.cc b/content/browser/cache_storage/cache_storage_cache_unittest.cc index 4a2b0f49..78fe095 100644 --- a/content/browser/cache_storage/cache_storage_cache_unittest.cc +++ b/content/browser/cache_storage/cache_storage_cache_unittest.cc
@@ -910,15 +910,17 @@ } TEST_P(CacheStorageCacheTestP, PutBadMessage) { + // Two unique puts that will collectively overflow unit64_t size of the + // batch operation. blink::mojom::BatchOperationPtr operation1 = blink::mojom::BatchOperation::New(blink::mojom::OperationType::kPut, body_request_, CreateBlobBodyResponse(), nullptr /* match_params */); operation1->response->blob->size = std::numeric_limits<uint64_t>::max(); blink::mojom::BatchOperationPtr operation2 = - blink::mojom::BatchOperation::New(blink::mojom::OperationType::kPut, - body_request_, CreateBlobBodyResponse(), - nullptr /* match_params */); + blink::mojom::BatchOperation::New( + blink::mojom::OperationType::kPut, body_request_with_query_, + CreateBlobBodyResponse(), nullptr /* match_params */); operation2->response->blob->size = std::numeric_limits<uint64_t>::max(); std::vector<blink::mojom::BatchOperationPtr> operations; @@ -945,7 +947,7 @@ EXPECT_FALSE(callback_response_->blob); } -TEST_P(CacheStorageCacheTestP, PutReplaceInBatch) { +TEST_P(CacheStorageCacheTestP, PutReplaceInBatchFails) { blink::mojom::BatchOperationPtr operation1 = blink::mojom::BatchOperation::New(); operation1->operation_type = blink::mojom::OperationType::kPut; @@ -962,11 +964,11 @@ operations.push_back(std::move(operation1)); operations.push_back(std::move(operation2)); - EXPECT_EQ(CacheStorageError::kSuccess, BatchOperation(std::move(operations))); + EXPECT_EQ(CacheStorageError::kErrorDuplicateOperation, + BatchOperation(std::move(operations))); - // |operation2| should win. - EXPECT_TRUE(Match(body_request_)); - EXPECT_TRUE(callback_response_->blob); + // Neither operation should have completed. + EXPECT_FALSE(Match(body_request_)); } TEST_P(CacheStorageCacheTestP, MatchNoBody) {
diff --git a/content/browser/download/download_request_core.cc b/content/browser/download/download_request_core.cc index fb6a33b..a4cdc54 100644 --- a/content/browser/download/download_request_core.cc +++ b/content/browser/download/download_request_core.cc
@@ -245,7 +245,6 @@ const std::string& override_mime_type) { DCHECK_CURRENTLY_ON(BrowserThread::IO); DVLOG(20) << __func__ << "() " << DebugString(); - download_start_time_ = base::TimeTicks::Now(); download::DownloadInterruptReason result = request()->response_headers() ? download::HandleSuccessfulServerResponse( @@ -361,7 +360,6 @@ if (!stream_writer_->Write(read_buffer_, bytes_read)) { PauseRequest(); *defer = was_deferred_ = true; - last_stream_pause_time_ = base::TimeTicks::Now(); } read_buffer_ = nullptr; // Drop our reference. @@ -411,10 +409,6 @@ request()->response_headers()->EnumerateHeader(nullptr, "Accept-Ranges", &accept_ranges); } - download::RecordAcceptsRanges(accept_ranges, bytes_read_, - has_strong_validators); - download::RecordNetworkBlockage(base::TimeTicks::Now() - download_start_time_, - total_pause_time_); // Send the info down the stream. Conditional is in case we get // OnResponseCompleted without OnResponseStarted. @@ -462,10 +456,6 @@ return; was_deferred_ = false; - if (!last_stream_pause_time_.is_null()) { - total_pause_time_ += (base::TimeTicks::Now() - last_stream_pause_time_); - last_stream_pause_time_ = base::TimeTicks(); - } delegate_->OnReadyToRead(); }
diff --git a/content/browser/download/download_request_core.h b/content/browser/download/download_request_core.h index 0fdd19e..0a4a2db6 100644 --- a/content/browser/download/download_request_core.h +++ b/content/browser/download/download_request_core.h
@@ -145,11 +145,6 @@ // URLRequest to fail and the associated download will be interrupted. device::mojom::WakeLockPtr wake_lock_; - // The following are used to collect stats. - base::TimeTicks download_start_time_; - base::TimeTicks last_stream_pause_time_; - base::TimeDelta total_pause_time_; - int64_t bytes_read_; int pause_count_;
diff --git a/content/browser/fileapi/file_system_manager_impl.cc b/content/browser/fileapi/file_system_manager_impl.cc new file mode 100644 index 0000000..113430f5 --- /dev/null +++ b/content/browser/fileapi/file_system_manager_impl.cc
@@ -0,0 +1,718 @@ +// Copyright (c) 2012 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 "content/browser/fileapi/file_system_manager_impl.h" + +#include <memory> +#include <string> +#include <utility> +#include <vector> + +#include "base/bind.h" +#include "base/files/file_path.h" +#include "base/logging.h" +#include "base/macros.h" +#include "base/metrics/user_metrics.h" +#include "base/sequenced_task_runner.h" +#include "base/strings/string_util.h" +#include "base/threading/thread.h" +#include "base/time/time.h" +#include "build/build_config.h" +#include "components/services/filesystem/public/interfaces/types.mojom.h" +#include "content/browser/bad_message.h" +#include "content/browser/blob_storage/chrome_blob_storage_context.h" +#include "content/browser/child_process_security_policy_impl.h" +#include "content/browser/fileapi/browser_file_system_helper.h" +#include "content/common/fileapi/webblob_messages.h" +#include "content/public/browser/browser_thread.h" +#include "ipc/ipc_platform_file.h" +#include "net/base/mime_util.h" +#include "storage/browser/blob/blob_data_builder.h" +#include "storage/browser/blob/blob_storage_context.h" +#include "storage/browser/blob/shareable_file_reference.h" +#include "storage/browser/fileapi/file_observers.h" +#include "storage/browser/fileapi/file_permission_policy.h" +#include "storage/browser/fileapi/file_system_context.h" +#include "storage/browser/fileapi/isolated_context.h" +#include "storage/common/fileapi/file_system_info.h" +#include "storage/common/fileapi/file_system_type_converters.h" +#include "storage/common/fileapi/file_system_types.h" +#include "storage/common/fileapi/file_system_util.h" +#include "url/gurl.h" + +using storage::FileSystemFileUtil; +using storage::FileSystemBackend; +using storage::FileSystemOperation; +using storage::FileSystemURL; +using storage::BlobDataBuilder; +using storage::BlobStorageContext; + +namespace content { + +namespace { + +void RevokeFilePermission(int child_id, const base::FilePath& path) { + ChildProcessSecurityPolicyImpl::GetInstance()->RevokeAllPermissionsForFile( + child_id, path); +} + +} // namespace + +class FileSystemManagerImpl::FileSystemCancellableOperationImpl + : public blink::mojom::FileSystemCancellableOperation { + using OperationID = storage::FileSystemOperationRunner::OperationID; + + public: + FileSystemCancellableOperationImpl( + OperationID id, + FileSystemManagerImpl* file_system_manager_impl) + : id_(id), file_system_manager_impl_(file_system_manager_impl) {} + ~FileSystemCancellableOperationImpl() override = default; + + private: + void Cancel(CancelCallback callback) override { + file_system_manager_impl_->Cancel(id_, std::move(callback)); + } + + const OperationID id_; + // |file_system_manager_impl| owns |this| through a StrongBindingSet. + FileSystemManagerImpl* const file_system_manager_impl_; +}; + +class FileSystemManagerImpl::ReceivedSnapshotListenerImpl + : public blink::mojom::ReceivedSnapshotListener { + public: + ReceivedSnapshotListenerImpl(int snapshot_id, + FileSystemManagerImpl* file_system_manager_impl) + : snapshot_id_(snapshot_id), + file_system_manager_impl_(file_system_manager_impl) {} + ~ReceivedSnapshotListenerImpl() override = default; + + private: + void DidReceiveSnapshotFile() override { + file_system_manager_impl_->DidReceiveSnapshotFile(snapshot_id_); + } + + const int snapshot_id_; + // |file_system_manager_impl| owns |this| through a StrongBindingSet. + FileSystemManagerImpl* const file_system_manager_impl_; +}; + +FileSystemManagerImpl::FileSystemManagerImpl( + int process_id, + storage::FileSystemContext* file_system_context, + scoped_refptr<ChromeBlobStorageContext> blob_storage_context) + : process_id_(process_id), + context_(file_system_context), + security_policy_(ChildProcessSecurityPolicyImpl::GetInstance()), + blob_storage_context_(blob_storage_context), + weak_factory_(this) { + DCHECK_CURRENTLY_ON(BrowserThread::UI); + DCHECK(context_); + DCHECK(blob_storage_context); + bindings_.set_connection_error_handler(base::BindRepeating( + &FileSystemManagerImpl::OnConnectionError, base::Unretained(this))); +} + +FileSystemManagerImpl::~FileSystemManagerImpl() { + DCHECK_CURRENTLY_ON(BrowserThread::IO); +} + +base::WeakPtr<FileSystemManagerImpl> FileSystemManagerImpl::GetWeakPtr() { + DCHECK_CURRENTLY_ON(BrowserThread::IO); + return weak_factory_.GetWeakPtr(); +} + +void FileSystemManagerImpl::BindRequest( + blink::mojom::FileSystemManagerRequest request) { + DCHECK_CURRENTLY_ON(BrowserThread::IO); + if (!operation_runner_) + operation_runner_ = context_->CreateFileSystemOperationRunner(); + bindings_.AddBinding(this, std::move(request)); +} + +void FileSystemManagerImpl::Open(const GURL& origin_url, + blink::mojom::FileSystemType file_system_type, + OpenCallback callback) { + DCHECK_CURRENTLY_ON(BrowserThread::IO); + if (file_system_type == blink::mojom::FileSystemType::kTemporary) { + RecordAction(base::UserMetricsAction("OpenFileSystemTemporary")); + } else if (file_system_type == blink::mojom::FileSystemType::kPersistent) { + RecordAction(base::UserMetricsAction("OpenFileSystemPersistent")); + } + context_->OpenFileSystem( + origin_url, mojo::ConvertTo<storage::FileSystemType>(file_system_type), + storage::OPEN_FILE_SYSTEM_CREATE_IF_NONEXISTENT, + base::BindOnce(&FileSystemManagerImpl::DidOpenFileSystem, GetWeakPtr(), + std::move(callback))); +}; + +void FileSystemManagerImpl::ResolveURL(const GURL& filesystem_url, + ResolveURLCallback callback) { + DCHECK_CURRENTLY_ON(BrowserThread::IO); + FileSystemURL url(context_->CrackURL(filesystem_url)); + base::Optional<base::File::Error> opt_error = ValidateFileSystemURL(url); + if (opt_error) { + std::move(callback).Run(blink::mojom::FileSystemInfo::New(), + base::FilePath(), false, opt_error.value()); + return; + } + + if (!security_policy_->CanReadFileSystemFile(process_id_, url)) { + std::move(callback).Run(blink::mojom::FileSystemInfo::New(), + base::FilePath(), false, + base::File::FILE_ERROR_SECURITY); + return; + } + + context_->ResolveURL( + url, base::BindOnce(&FileSystemManagerImpl::DidResolveURL, GetWeakPtr(), + std::move(callback))); +} + +void FileSystemManagerImpl::Move(const GURL& src_path, + const GURL& dest_path, + MoveCallback callback) { + DCHECK_CURRENTLY_ON(BrowserThread::IO); + FileSystemURL src_url(context_->CrackURL(src_path)); + FileSystemURL dest_url(context_->CrackURL(dest_path)); + base::Optional<base::File::Error> opt_error = ValidateFileSystemURL(src_url); + if (!opt_error) + opt_error = ValidateFileSystemURL(dest_url); + if (opt_error) { + std::move(callback).Run(opt_error.value()); + return; + } + if (!security_policy_->CanReadFileSystemFile(process_id_, src_url) || + !security_policy_->CanDeleteFileSystemFile(process_id_, src_url) || + !security_policy_->CanCreateFileSystemFile(process_id_, dest_url)) { + std::move(callback).Run(base::File::FILE_ERROR_SECURITY); + return; + } + + operation_runner()->Move( + src_url, dest_url, storage::FileSystemOperation::OPTION_NONE, + base::BindRepeating(&FileSystemManagerImpl::DidFinish, GetWeakPtr(), + base::Passed(&callback))); +} + +void FileSystemManagerImpl::Copy(const GURL& src_path, + const GURL& dest_path, + CopyCallback callback) { + DCHECK_CURRENTLY_ON(BrowserThread::IO); + FileSystemURL src_url(context_->CrackURL(src_path)); + FileSystemURL dest_url(context_->CrackURL(dest_path)); + base::Optional<base::File::Error> opt_error = ValidateFileSystemURL(src_url); + if (!opt_error) + opt_error = ValidateFileSystemURL(dest_url); + if (opt_error) { + std::move(callback).Run(opt_error.value()); + return; + } + if (!security_policy_->CanReadFileSystemFile(process_id_, src_url) || + !security_policy_->CanCopyIntoFileSystemFile(process_id_, dest_url)) { + std::move(callback).Run(base::File::FILE_ERROR_SECURITY); + return; + } + + operation_runner()->Copy( + src_url, dest_url, storage::FileSystemOperation::OPTION_NONE, + FileSystemOperation::ERROR_BEHAVIOR_ABORT, + storage::FileSystemOperationRunner::CopyProgressCallback(), + base::BindRepeating(&FileSystemManagerImpl::DidFinish, GetWeakPtr(), + base::Passed(&callback))); +} + +void FileSystemManagerImpl::Remove(const GURL& path, + bool recursive, + RemoveCallback callback) { + DCHECK_CURRENTLY_ON(BrowserThread::IO); + FileSystemURL url(context_->CrackURL(path)); + base::Optional<base::File::Error> opt_error = ValidateFileSystemURL(url); + if (opt_error) { + std::move(callback).Run(opt_error.value()); + return; + } + if (!security_policy_->CanDeleteFileSystemFile(process_id_, url)) { + std::move(callback).Run(base::File::FILE_ERROR_SECURITY); + return; + } + + operation_runner()->Remove( + url, recursive, + base::BindRepeating(&FileSystemManagerImpl::DidFinish, GetWeakPtr(), + base::Passed(&callback))); +} + +void FileSystemManagerImpl::ReadMetadata(const GURL& path, + ReadMetadataCallback callback) { + DCHECK_CURRENTLY_ON(BrowserThread::IO); + FileSystemURL url(context_->CrackURL(path)); + base::Optional<base::File::Error> opt_error = ValidateFileSystemURL(url); + if (opt_error) { + std::move(callback).Run(base::File::Info(), opt_error.value()); + return; + } + if (!security_policy_->CanReadFileSystemFile(process_id_, url)) { + std::move(callback).Run(base::File::Info(), + base::File::FILE_ERROR_SECURITY); + return; + } + + operation_runner()->GetMetadata( + url, + FileSystemOperation::GET_METADATA_FIELD_IS_DIRECTORY | + FileSystemOperation::GET_METADATA_FIELD_SIZE | + FileSystemOperation::GET_METADATA_FIELD_LAST_MODIFIED, + base::BindRepeating(&FileSystemManagerImpl::DidGetMetadata, GetWeakPtr(), + base::Passed(&callback))); +} + +void FileSystemManagerImpl::Create(const GURL& path, + bool exclusive, + bool is_directory, + bool recursive, + CreateCallback callback) { + DCHECK_CURRENTLY_ON(BrowserThread::IO); + FileSystemURL url(context_->CrackURL(path)); + base::Optional<base::File::Error> opt_error = ValidateFileSystemURL(url); + if (opt_error) { + std::move(callback).Run(opt_error.value()); + return; + } + if (!security_policy_->CanCreateFileSystemFile(process_id_, url)) { + std::move(callback).Run(base::File::FILE_ERROR_SECURITY); + return; + } + + if (is_directory) { + operation_runner()->CreateDirectory( + url, exclusive, recursive, + base::BindRepeating(&FileSystemManagerImpl::DidFinish, GetWeakPtr(), + base::Passed(&callback))); + } else { + operation_runner()->CreateFile( + url, exclusive, + base::BindRepeating(&FileSystemManagerImpl::DidFinish, GetWeakPtr(), + base::Passed(&callback))); + } +} + +void FileSystemManagerImpl::Exists(const GURL& path, + bool is_directory, + ExistsCallback callback) { + DCHECK_CURRENTLY_ON(BrowserThread::IO); + FileSystemURL url(context_->CrackURL(path)); + base::Optional<base::File::Error> opt_error = ValidateFileSystemURL(url); + if (opt_error) { + std::move(callback).Run(opt_error.value()); + return; + } + if (!security_policy_->CanReadFileSystemFile(process_id_, url)) { + std::move(callback).Run(base::File::FILE_ERROR_SECURITY); + return; + } + + if (is_directory) { + operation_runner()->DirectoryExists( + url, base::BindRepeating(&FileSystemManagerImpl::DidFinish, + GetWeakPtr(), base::Passed(&callback))); + } else { + operation_runner()->FileExists( + url, base::BindRepeating(&FileSystemManagerImpl::DidFinish, + GetWeakPtr(), base::Passed(&callback))); + } +} + +void FileSystemManagerImpl::ReadDirectory( + const GURL& path, + blink::mojom::FileSystemOperationListenerPtr listener) { + DCHECK_CURRENTLY_ON(BrowserThread::IO); + FileSystemURL url(context_->CrackURL(path)); + base::Optional<base::File::Error> opt_error = ValidateFileSystemURL(url); + if (opt_error) { + listener->ErrorOccurred(opt_error.value()); + return; + } + if (!security_policy_->CanReadFileSystemFile(process_id_, url)) { + listener->ErrorOccurred(base::File::FILE_ERROR_SECURITY); + return; + } + + OperationListenerID listener_id = AddOpListener(std::move(listener)); + operation_runner()->ReadDirectory( + url, base::BindRepeating(&FileSystemManagerImpl::DidReadDirectory, + GetWeakPtr(), listener_id)); +} + +void FileSystemManagerImpl::Write( + const GURL& file_path, + const std::string& blob_uuid, + int64_t position, + blink::mojom::FileSystemCancellableOperationRequest op_request, + blink::mojom::FileSystemOperationListenerPtr listener) { + DCHECK_CURRENTLY_ON(BrowserThread::IO); + + FileSystemURL url(context_->CrackURL(file_path)); + base::Optional<base::File::Error> opt_error = ValidateFileSystemURL(url); + if (opt_error) { + listener->ErrorOccurred(opt_error.value()); + return; + } + if (!security_policy_->CanWriteFileSystemFile(process_id_, url)) { + listener->ErrorOccurred(base::File::FILE_ERROR_SECURITY); + return; + } + std::unique_ptr<storage::BlobDataHandle> blob = + blob_storage_context_->context()->GetBlobDataFromUUID(blob_uuid); + + OperationListenerID listener_id = AddOpListener(std::move(listener)); + + OperationID op_id = operation_runner()->Write( + url, std::move(blob), position, + base::BindRepeating(&FileSystemManagerImpl::DidWrite, GetWeakPtr(), + listener_id)); + cancellable_operations_.AddBinding( + std::make_unique<FileSystemCancellableOperationImpl>(op_id, this), + std::move(op_request)); +} + +void FileSystemManagerImpl::Truncate( + const GURL& file_path, + int64_t length, + blink::mojom::FileSystemCancellableOperationRequest op_request, + TruncateCallback callback) { + DCHECK_CURRENTLY_ON(BrowserThread::IO); + FileSystemURL url(context_->CrackURL(file_path)); + base::Optional<base::File::Error> opt_error = ValidateFileSystemURL(url); + if (opt_error) { + std::move(callback).Run(opt_error.value()); + return; + } + if (!security_policy_->CanWriteFileSystemFile(process_id_, url)) { + std::move(callback).Run(base::File::FILE_ERROR_SECURITY); + return; + } + + OperationID op_id = operation_runner()->Truncate( + url, length, + base::BindRepeating(&FileSystemManagerImpl::DidFinish, GetWeakPtr(), + base::Passed(&callback))); + cancellable_operations_.AddBinding( + std::make_unique<FileSystemCancellableOperationImpl>(op_id, this), + std::move(op_request)); +} + +void FileSystemManagerImpl::TouchFile(const GURL& path, + base::Time last_access_time, + base::Time last_modified_time, + TouchFileCallback callback) { + DCHECK_CURRENTLY_ON(BrowserThread::IO); + FileSystemURL url(context_->CrackURL(path)); + base::Optional<base::File::Error> opt_error = ValidateFileSystemURL(url); + if (opt_error) { + std::move(callback).Run(opt_error.value()); + return; + } + if (!security_policy_->CanCreateFileSystemFile(process_id_, url)) { + std::move(callback).Run(base::File::FILE_ERROR_SECURITY); + return; + } + + operation_runner()->TouchFile( + url, last_access_time, last_modified_time, + base::BindRepeating(&FileSystemManagerImpl::DidFinish, GetWeakPtr(), + base::Passed(&callback))); +} + +void FileSystemManagerImpl::Cancel( + OperationID op_id, + FileSystemCancellableOperationImpl::CancelCallback callback) { + DCHECK_CURRENTLY_ON(BrowserThread::IO); + operation_runner()->Cancel( + op_id, base::BindRepeating(&FileSystemManagerImpl::DidFinish, + GetWeakPtr(), base::Passed(&callback))); +} + +void FileSystemManagerImpl::GetPlatformPath(const GURL& path, + GetPlatformPathCallback callback) { + DCHECK_CURRENTLY_ON(BrowserThread::IO); + base::FilePath platform_path; + context_->default_file_task_runner()->PostTask( + FROM_HERE, + base::BindOnce(&FileSystemManagerImpl::GetPlatformPathOnFileThread, path, + process_id_, base::Unretained(context_), GetWeakPtr(), + std::move(callback))); +} + +void FileSystemManagerImpl::CreateSnapshotFile( + const GURL& file_path, + CreateSnapshotFileCallback callback) { + DCHECK_CURRENTLY_ON(BrowserThread::IO); + FileSystemURL url(context_->CrackURL(file_path)); + + // Make sure if this file can be read by the renderer as this is + // called when the renderer is about to create a new File object + // (for reading the file). + base::Optional<base::File::Error> opt_error = ValidateFileSystemURL(url); + if (opt_error) { + std::move(callback).Run(base::File::Info(), base::FilePath(), + opt_error.value(), nullptr); + return; + } + if (!security_policy_->CanReadFileSystemFile(process_id_, url)) { + std::move(callback).Run(base::File::Info(), base::FilePath(), + base::File::FILE_ERROR_SECURITY, nullptr); + return; + } + + FileSystemBackend* backend = context_->GetFileSystemBackend(url.type()); + if (backend->SupportsStreaming(url)) { + operation_runner()->GetMetadata( + url, + FileSystemOperation::GET_METADATA_FIELD_IS_DIRECTORY | + FileSystemOperation::GET_METADATA_FIELD_SIZE | + FileSystemOperation::GET_METADATA_FIELD_LAST_MODIFIED, + base::BindRepeating(&FileSystemManagerImpl::DidGetMetadataForStreaming, + GetWeakPtr(), base::Passed(&callback))); + } else { + operation_runner()->CreateSnapshotFile( + url, base::BindRepeating(&FileSystemManagerImpl::DidCreateSnapshot, + GetWeakPtr(), base::Passed(&callback), url)); + } +} + +void FileSystemManagerImpl::DidReceiveSnapshotFile(int snapshot_id) { + DCHECK_CURRENTLY_ON(BrowserThread::IO); + in_transit_snapshot_files_.Remove(snapshot_id); +} + +void FileSystemManagerImpl::OnConnectionError() { + DCHECK_CURRENTLY_ON(BrowserThread::IO); + if (bindings_.empty()) { + in_transit_snapshot_files_.Clear(); + operation_runner_.reset(); + } +} + +void FileSystemManagerImpl::DidFinish( + base::OnceCallback<void(base::File::Error)> callback, + base::File::Error error_code) { + DCHECK_CURRENTLY_ON(BrowserThread::IO); + std::move(callback).Run(error_code); +} + +void FileSystemManagerImpl::DidGetMetadata(ReadMetadataCallback callback, + base::File::Error result, + const base::File::Info& info) { + DCHECK_CURRENTLY_ON(BrowserThread::IO); + std::move(callback).Run(info, result); +} + +void FileSystemManagerImpl::DidGetMetadataForStreaming( + CreateSnapshotFileCallback callback, + base::File::Error result, + const base::File::Info& info) { + // For now, streaming Blobs are implemented as a successful snapshot file + // creation with an empty path. + DCHECK_CURRENTLY_ON(BrowserThread::IO); + std::move(callback).Run(info, base::FilePath(), result, nullptr); +} + +void FileSystemManagerImpl::DidReadDirectory( + OperationListenerID listener_id, + base::File::Error result, + std::vector<filesystem::mojom::DirectoryEntry> entries, + bool has_more) { + DCHECK_CURRENTLY_ON(BrowserThread::IO); + blink::mojom::FileSystemOperationListener* listener = + GetOpListener(listener_id); + if (!listener) + return; + if (result != base::File::FILE_OK) { + DCHECK(!has_more); + listener->ErrorOccurred(result); + RemoveOpListener(listener_id); + return; + } + std::vector<filesystem::mojom::DirectoryEntryPtr> entry_struct_ptrs; + for (const auto& entry : entries) { + entry_struct_ptrs.emplace_back( + filesystem::mojom::DirectoryEntry::New(entry)); + } + listener->ResultsRetrieved(std::move(entry_struct_ptrs), has_more); + if (!has_more) + RemoveOpListener(listener_id); +} + +void FileSystemManagerImpl::DidWrite(OperationListenerID listener_id, + base::File::Error result, + int64_t bytes, + bool complete) { + DCHECK_CURRENTLY_ON(BrowserThread::IO); + blink::mojom::FileSystemOperationListener* listener = + GetOpListener(listener_id); + if (!listener) + return; + if (result == base::File::FILE_OK) { + listener->DidWrite(bytes, complete); + if (complete) + RemoveOpListener(listener_id); + } else { + listener->ErrorOccurred(result); + RemoveOpListener(listener_id); + } +} + +void FileSystemManagerImpl::DidOpenFileSystem( + OpenCallback callback, + const GURL& root, + const std::string& filesystem_name, + base::File::Error result) { + DCHECK_CURRENTLY_ON(BrowserThread::IO); + DCHECK(root.is_valid() || result != base::File::FILE_OK); + std::move(callback).Run(filesystem_name, root, result); + // For OpenFileSystem we do not create a new operation, so no unregister here. +} + +void FileSystemManagerImpl::DidResolveURL( + ResolveURLCallback callback, + base::File::Error result, + const storage::FileSystemInfo& info, + const base::FilePath& file_path, + storage::FileSystemContext::ResolvedEntryType type) { + DCHECK_CURRENTLY_ON(BrowserThread::IO); + if (result == base::File::FILE_OK && + type == storage::FileSystemContext::RESOLVED_ENTRY_NOT_FOUND) + result = base::File::FILE_ERROR_NOT_FOUND; + + std::move(callback).Run( + mojo::ConvertTo<blink::mojom::FileSystemInfoPtr>(info), file_path, + type == storage::FileSystemContext::RESOLVED_ENTRY_DIRECTORY, result); + // For ResolveURL we do not create a new operation, so no unregister here. +} + +void FileSystemManagerImpl::DidCreateSnapshot( + CreateSnapshotFileCallback callback, + const storage::FileSystemURL& url, + base::File::Error result, + const base::File::Info& info, + const base::FilePath& platform_path, + scoped_refptr<storage::ShareableFileReference> /* unused */) { + DCHECK_CURRENTLY_ON(BrowserThread::IO); + if (result != base::File::FILE_OK) { + std::move(callback).Run(base::File::Info(), base::FilePath(), result, + nullptr); + return; + } + + scoped_refptr<storage::ShareableFileReference> file_ref = + storage::ShareableFileReference::Get(platform_path); + if (!security_policy_->CanReadFile(process_id_, platform_path)) { + // Give per-file read permission to the snapshot file if it hasn't it yet. + // In order for the renderer to be able to read the file via File object, + // it must be granted per-file read permission for the file's platform + // path. By now, it has already been verified that the renderer has + // sufficient permissions to read the file, so giving per-file permission + // here must be safe. + security_policy_->GrantReadFile(process_id_, platform_path); + + // Revoke all permissions for the file when the last ref of the file + // is dropped. + if (!file_ref.get()) { + // Create a reference for temporary permission handling. + file_ref = storage::ShareableFileReference::GetOrCreate( + platform_path, + storage::ShareableFileReference::DONT_DELETE_ON_FINAL_RELEASE, + context_->default_file_task_runner()); + } + file_ref->AddFinalReleaseCallback( + base::BindOnce(&RevokeFilePermission, process_id_)); + } + + if (file_ref.get()) { + // This ref is held until DidReceiveSnapshotFile is called. + int request_id = in_transit_snapshot_files_.Add(file_ref); + blink::mojom::ReceivedSnapshotListenerPtr listener_ptr; + snapshot_listeners_.AddBinding( + std::make_unique<ReceivedSnapshotListenerImpl>(request_id, this), + mojo::MakeRequest<blink::mojom::ReceivedSnapshotListener>( + &listener_ptr)); + // Return the file info and platform_path. + std::move(callback).Run(info, platform_path, result, + std::move(listener_ptr)); + return; + } + + // Return the file info and platform_path. + std::move(callback).Run(info, platform_path, result, nullptr); +} + +void FileSystemManagerImpl::DidGetPlatformPath(GetPlatformPathCallback callback, + base::FilePath platform_path) { + DCHECK_CURRENTLY_ON(BrowserThread::IO); + std::move(callback).Run(platform_path); +} + +// static +void FileSystemManagerImpl::GetPlatformPathOnFileThread( + const GURL& path, + int process_id, + storage::FileSystemContext* context, + base::WeakPtr<FileSystemManagerImpl> file_system_manager, + GetPlatformPathCallback callback) { + base::FilePath platform_path; + SyncGetPlatformPath(context, process_id, path, &platform_path); + BrowserThread::PostTask( + BrowserThread::IO, FROM_HERE, + base::BindOnce(&FileSystemManagerImpl::DidGetPlatformPath, + file_system_manager, std::move(callback), platform_path)); +} + +base::Optional<base::File::Error> FileSystemManagerImpl::ValidateFileSystemURL( + const storage::FileSystemURL& url) { + DCHECK_CURRENTLY_ON(BrowserThread::IO); + if (!FileSystemURLIsValid(context_, url)) + return base::File::FILE_ERROR_INVALID_URL; + + // Deny access to files in PluginPrivate FileSystem from JavaScript. + // TODO(nhiroki): Move this filter somewhere else since this is not for + // validation. + if (url.type() == storage::kFileSystemTypePluginPrivate) + return base::File::FILE_ERROR_SECURITY; + + return base::nullopt; +} + +FileSystemManagerImpl::OperationListenerID FileSystemManagerImpl::AddOpListener( + blink::mojom::FileSystemOperationListenerPtr listener) { + DCHECK_CURRENTLY_ON(BrowserThread::IO); + int op_id = next_operation_listener_id_++; + listener.set_connection_error_handler( + base::BindOnce(&FileSystemManagerImpl::OnConnectionErrorForOpListeners, + base::Unretained(this), op_id)); + op_listeners_[op_id] = std::move(listener); + return op_id; +} + +void FileSystemManagerImpl::RemoveOpListener(OperationListenerID listener_id) { + DCHECK_CURRENTLY_ON(BrowserThread::IO); + DCHECK(op_listeners_.find(listener_id) != op_listeners_.end()); + op_listeners_.erase(listener_id); +} + +blink::mojom::FileSystemOperationListener* FileSystemManagerImpl::GetOpListener( + OperationListenerID listener_id) { + DCHECK_CURRENTLY_ON(BrowserThread::IO); + if (op_listeners_.find(listener_id) == op_listeners_.end()) + return nullptr; + return &*op_listeners_[listener_id]; +} + +void FileSystemManagerImpl::OnConnectionErrorForOpListeners( + OperationListenerID listener_id) { + RemoveOpListener(listener_id); +} + +} // namespace content
diff --git a/content/browser/fileapi/file_system_manager_impl.h b/content/browser/fileapi/file_system_manager_impl.h new file mode 100644 index 0000000..bc08ed04 --- /dev/null +++ b/content/browser/fileapi/file_system_manager_impl.h
@@ -0,0 +1,213 @@ +// Copyright (c) 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 CONTENT_BROWSER_FILEAPI_FILE_SYSTEM_MANAGER_IMPL_H_ +#define CONTENT_BROWSER_FILEAPI_FILE_SYSTEM_MANAGER_IMPL_H_ + +#include <stddef.h> +#include <stdint.h> + +#include <map> +#include <memory> +#include <set> +#include <string> +#include <vector> + +#include "base/callback.h" +#include "base/containers/hash_tables.h" +#include "base/macros.h" +#include "base/memory/ref_counted.h" +#include "base/memory/shared_memory.h" +#include "components/services/filesystem/public/interfaces/types.mojom.h" +#include "content/browser/streams/stream.h" +#include "content/browser/streams/stream_context.h" +#include "content/common/content_export.h" +#include "content/public/browser/browser_message_filter.h" +#include "mojo/public/cpp/bindings/binding_set.h" +#include "mojo/public/cpp/bindings/interface_ptr_set.h" +#include "mojo/public/cpp/bindings/strong_binding_set.h" +#include "storage/browser/fileapi/file_system_context.h" +#include "storage/browser/fileapi/file_system_operation_runner.h" +#include "storage/common/fileapi/file_system_types.h" +#include "third_party/blink/public/mojom/filesystem/file_system.mojom.h" + +class GURL; + +namespace base { +class FilePath; +class Time; +} // namespace base + +namespace storage { +class FileSystemURL; +class FileSystemOperationRunner; +struct FileSystemInfo; +class ShareableFileReference; +} // namespace storage + +namespace content { +class ChildProcessSecurityPolicyImpl; +class ChromeBlobStorageContext; + +// All methods for this class are expected to be called on the IO thread, +// except for the constructor. The destructor must also be called on the IO +// thread as weak refs are created on that thread. A single instance of this +// class is owned by RenderProcessHostImpl. +class CONTENT_EXPORT FileSystemManagerImpl + : public blink::mojom::FileSystemManager { + public: + // Used by the renderer process host on the UI thread. + FileSystemManagerImpl( + int process_id, + storage::FileSystemContext* file_system_context, + scoped_refptr<ChromeBlobStorageContext> blob_storage_context); + ~FileSystemManagerImpl() override; + base::WeakPtr<FileSystemManagerImpl> GetWeakPtr(); + + void BindRequest(blink::mojom::FileSystemManagerRequest request); + + // blink::mojom::FileSystem + void Open(const GURL& origin_url, + blink::mojom::FileSystemType file_system_type, + OpenCallback callback) override; + void ResolveURL(const GURL& filesystem_url, + ResolveURLCallback callback) override; + void Move(const GURL& src_path, + const GURL& dest_path, + MoveCallback callback) override; + void Copy(const GURL& src_path, + const GURL& dest_path, + CopyCallback callback) override; + void Remove(const GURL& path, + bool recursive, + RemoveCallback callback) override; + void ReadMetadata(const GURL& path, ReadMetadataCallback callback) override; + void Create(const GURL& path, + bool exclusive, + bool is_directory, + bool recursive, + CreateCallback callback) override; + void Exists(const GURL& path, + bool is_directory, + ExistsCallback callback) override; + void ReadDirectory( + const GURL& path, + blink::mojom::FileSystemOperationListenerPtr listener) override; + void Write(const GURL& file_path, + const std::string& blob_uuid, + int64_t position, + blink::mojom::FileSystemCancellableOperationRequest op_request, + blink::mojom::FileSystemOperationListenerPtr listener) override; + void Truncate(const GURL& file_path, + int64_t length, + blink::mojom::FileSystemCancellableOperationRequest op_request, + TruncateCallback callback) override; + void TouchFile(const GURL& path, + base::Time last_access_time, + base::Time last_modified_time, + TouchFileCallback callback) override; + void CreateSnapshotFile(const GURL& file_path, + CreateSnapshotFileCallback callback) override; + void GetPlatformPath(const GURL& file_path, + GetPlatformPathCallback callback) override; + + private: + class FileSystemCancellableOperationImpl; + class ReceivedSnapshotListenerImpl; + using OperationID = storage::FileSystemOperationRunner::OperationID; + using OperationListenerID = int; + + void Cancel( + OperationID op_id, + blink::mojom::FileSystemCancellableOperation::CancelCallback callback); + void DidReceiveSnapshotFile(int snapshot_id); + void OnConnectionError(); + + // Callback functions to be used when each file operation is finished. + void DidFinish(base::OnceCallback<void(base::File::Error)> callback, + base::File::Error error_code); + void DidGetMetadata(ReadMetadataCallback callback, + base::File::Error result, + const base::File::Info& info); + void DidGetMetadataForStreaming(CreateSnapshotFileCallback callback, + base::File::Error result, + const base::File::Info& info); + void DidReadDirectory(OperationListenerID listener_id, + base::File::Error result, + std::vector<filesystem::mojom::DirectoryEntry> entries, + bool has_more); + void DidWrite(OperationListenerID listener_id, + base::File::Error result, + int64_t bytes, + bool complete); + void DidOpenFileSystem(OpenCallback callback, + const GURL& root, + const std::string& filesystem_name, + base::File::Error result); + void DidResolveURL(ResolveURLCallback callback, + base::File::Error result, + const storage::FileSystemInfo& info, + const base::FilePath& file_path, + storage::FileSystemContext::ResolvedEntryType type); + void DidCreateSnapshot( + CreateSnapshotFileCallback callback, + const storage::FileSystemURL& url, + base::File::Error result, + const base::File::Info& info, + const base::FilePath& platform_path, + scoped_refptr<storage::ShareableFileReference> file_ref); + void DidGetPlatformPath(GetPlatformPathCallback callback, + base::FilePath platform_path); + + static void GetPlatformPathOnFileThread( + const GURL& path, + int process_id, + storage::FileSystemContext* context, + base::WeakPtr<FileSystemManagerImpl> file_system_manager, + GetPlatformPathCallback callback); + // Returns an error if |url| is invalid. + base::Optional<base::File::Error> ValidateFileSystemURL( + const storage::FileSystemURL& url); + + storage::FileSystemOperationRunner* operation_runner() { + return operation_runner_.get(); + } + + OperationListenerID AddOpListener( + blink::mojom::FileSystemOperationListenerPtr listener); + void RemoveOpListener(OperationListenerID listener_id); + blink::mojom::FileSystemOperationListener* GetOpListener( + OperationListenerID listener_id); + void OnConnectionErrorForOpListeners(OperationListenerID listener_id); + + const int process_id_; + storage::FileSystemContext* const context_; + ChildProcessSecurityPolicyImpl* const security_policy_; + const scoped_refptr<ChromeBlobStorageContext> blob_storage_context_; + std::unique_ptr<storage::FileSystemOperationRunner> operation_runner_; + + mojo::BindingSet<blink::mojom::FileSystemManager> bindings_; + mojo::StrongBindingSet<blink::mojom::FileSystemCancellableOperation> + cancellable_operations_; + mojo::StrongBindingSet<blink::mojom::ReceivedSnapshotListener> + snapshot_listeners_; + + std::unordered_map<OperationListenerID, + blink::mojom::FileSystemOperationListenerPtr> + op_listeners_; + OperationListenerID next_operation_listener_id_ = 0; + + // Used to keep snapshot files alive while a DidCreateSnapshot + // is being sent to the renderer. + base::IDMap<scoped_refptr<storage::ShareableFileReference>> + in_transit_snapshot_files_; + + base::WeakPtrFactory<FileSystemManagerImpl> weak_factory_; + + DISALLOW_COPY_AND_ASSIGN(FileSystemManagerImpl); +}; + +} // namespace content + +#endif // CONTENT_BROWSER_FILEAPI_FILE_SYSTEM_MANAGER_IMPL_H_
diff --git a/content/browser/fileapi/fileapi_message_filter.cc b/content/browser/fileapi/fileapi_message_filter.cc deleted file mode 100644 index 11c3863f8..0000000 --- a/content/browser/fileapi/fileapi_message_filter.cc +++ /dev/null
@@ -1,607 +0,0 @@ -// Copyright (c) 2012 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 "content/browser/fileapi/fileapi_message_filter.h" - -#include <memory> -#include <string> -#include <utility> -#include <vector> - -#include "base/bind.h" -#include "base/files/file_path.h" -#include "base/logging.h" -#include "base/macros.h" -#include "base/metrics/user_metrics.h" -#include "base/sequenced_task_runner.h" -#include "base/strings/string_util.h" -#include "base/threading/thread.h" -#include "base/time/time.h" -#include "build/build_config.h" -#include "components/services/filesystem/public/interfaces/types.mojom.h" -#include "content/browser/bad_message.h" -#include "content/browser/blob_storage/chrome_blob_storage_context.h" -#include "content/browser/child_process_security_policy_impl.h" -#include "content/browser/fileapi/browser_file_system_helper.h" -#include "content/common/fileapi/file_system_messages.h" -#include "content/common/fileapi/webblob_messages.h" -#include "content/public/browser/browser_thread.h" -#include "ipc/ipc_platform_file.h" -#include "net/base/mime_util.h" -#include "storage/browser/blob/blob_data_builder.h" -#include "storage/browser/blob/blob_storage_context.h" -#include "storage/browser/blob/shareable_file_reference.h" -#include "storage/browser/fileapi/file_observers.h" -#include "storage/browser/fileapi/file_permission_policy.h" -#include "storage/browser/fileapi/file_system_context.h" -#include "storage/browser/fileapi/isolated_context.h" -#include "storage/common/fileapi/file_system_info.h" -#include "storage/common/fileapi/file_system_types.h" -#include "storage/common/fileapi/file_system_util.h" -#include "url/gurl.h" - -using storage::FileSystemFileUtil; -using storage::FileSystemBackend; -using storage::FileSystemOperation; -using storage::FileSystemURL; -using storage::BlobDataBuilder; -using storage::BlobStorageContext; - -namespace content { - -namespace { - -const uint32_t kFileApiFilteredMessageClasses[] = {FileSystemMsgStart, - BlobMsgStart}; - -void RevokeFilePermission(int child_id, const base::FilePath& path) { - ChildProcessSecurityPolicyImpl::GetInstance()->RevokeAllPermissionsForFile( - child_id, path); -} - -} // namespace - -FileAPIMessageFilter::FileAPIMessageFilter( - int process_id, - storage::FileSystemContext* file_system_context, - ChromeBlobStorageContext* blob_storage_context) - : BrowserMessageFilter(kFileApiFilteredMessageClasses, - arraysize(kFileApiFilteredMessageClasses)), - process_id_(process_id), - context_(file_system_context), - security_policy_(ChildProcessSecurityPolicyImpl::GetInstance()), - blob_storage_context_(blob_storage_context) { - DCHECK(context_); - DCHECK(blob_storage_context); -} - -void FileAPIMessageFilter::OnChannelConnected(int32_t peer_pid) { - DCHECK_CURRENTLY_ON(BrowserThread::IO); - - operation_runner_ = context_->CreateFileSystemOperationRunner(); -} - -void FileAPIMessageFilter::OnChannelClosing() { - DCHECK_CURRENTLY_ON(BrowserThread::IO); - - in_transit_snapshot_files_.clear(); - - operation_runner_.reset(); - operations_.clear(); -} - -base::TaskRunner* FileAPIMessageFilter::OverrideTaskRunnerForMessage( - const IPC::Message& message) { - if (message.type() == FileSystemHostMsg_SyncGetPlatformPath::ID) - return context_->default_file_task_runner(); - return nullptr; -} - -bool FileAPIMessageFilter::OnMessageReceived(const IPC::Message& message) { - bool handled = true; - IPC_BEGIN_MESSAGE_MAP(FileAPIMessageFilter, message) - IPC_MESSAGE_HANDLER(FileSystemHostMsg_OpenFileSystem, OnOpenFileSystem) - IPC_MESSAGE_HANDLER(FileSystemHostMsg_ResolveURL, OnResolveURL) - IPC_MESSAGE_HANDLER(FileSystemHostMsg_Move, OnMove) - IPC_MESSAGE_HANDLER(FileSystemHostMsg_Copy, OnCopy) - IPC_MESSAGE_HANDLER(FileSystemHostMsg_Remove, OnRemove) - IPC_MESSAGE_HANDLER(FileSystemHostMsg_ReadMetadata, OnReadMetadata) - IPC_MESSAGE_HANDLER(FileSystemHostMsg_Create, OnCreate) - IPC_MESSAGE_HANDLER(FileSystemHostMsg_Exists, OnExists) - IPC_MESSAGE_HANDLER(FileSystemHostMsg_ReadDirectory, OnReadDirectory) - IPC_MESSAGE_HANDLER(FileSystemHostMsg_Write, OnWrite) - IPC_MESSAGE_HANDLER(FileSystemHostMsg_Truncate, OnTruncate) - IPC_MESSAGE_HANDLER(FileSystemHostMsg_TouchFile, OnTouchFile) - IPC_MESSAGE_HANDLER(FileSystemHostMsg_CancelWrite, OnCancel) - IPC_MESSAGE_HANDLER(FileSystemHostMsg_CreateSnapshotFile, - OnCreateSnapshotFile) - IPC_MESSAGE_HANDLER(FileSystemHostMsg_DidReceiveSnapshotFile, - OnDidReceiveSnapshotFile) - IPC_MESSAGE_HANDLER(FileSystemHostMsg_SyncGetPlatformPath, - OnSyncGetPlatformPath) - IPC_MESSAGE_UNHANDLED(handled = false) - IPC_END_MESSAGE_MAP() - return handled; -} - -FileAPIMessageFilter::~FileAPIMessageFilter() {} - -void FileAPIMessageFilter::OnOpenFileSystem(int request_id, - const GURL& origin_url, - storage::FileSystemType type) { - DCHECK_CURRENTLY_ON(BrowserThread::IO); - if (type == storage::kFileSystemTypeTemporary) { - RecordAction(base::UserMetricsAction("OpenFileSystemTemporary")); - } else if (type == storage::kFileSystemTypePersistent) { - RecordAction(base::UserMetricsAction("OpenFileSystemPersistent")); - } - storage::OpenFileSystemMode mode = - storage::OPEN_FILE_SYSTEM_CREATE_IF_NONEXISTENT; - context_->OpenFileSystem( - origin_url, type, mode, - base::BindOnce(&FileAPIMessageFilter::DidOpenFileSystem, this, - request_id)); -} - -void FileAPIMessageFilter::OnResolveURL( - int request_id, - const GURL& filesystem_url) { - DCHECK_CURRENTLY_ON(BrowserThread::IO); - FileSystemURL url(context_->CrackURL(filesystem_url)); - if (!ValidateFileSystemURL(request_id, url)) - return; - if (!security_policy_->CanReadFileSystemFile(process_id_, url)) { - Send(new FileSystemMsg_DidFail(request_id, - base::File::FILE_ERROR_SECURITY)); - return; - } - - context_->ResolveURL(url, base::BindOnce(&FileAPIMessageFilter::DidResolveURL, - this, request_id)); -} - -void FileAPIMessageFilter::OnMove( - int request_id, const GURL& src_path, const GURL& dest_path) { - DCHECK_CURRENTLY_ON(BrowserThread::IO); - FileSystemURL src_url(context_->CrackURL(src_path)); - FileSystemURL dest_url(context_->CrackURL(dest_path)); - if (!ValidateFileSystemURL(request_id, src_url) || - !ValidateFileSystemURL(request_id, dest_url)) { - return; - } - if (!security_policy_->CanReadFileSystemFile(process_id_, src_url) || - !security_policy_->CanDeleteFileSystemFile(process_id_, src_url) || - !security_policy_->CanCreateFileSystemFile(process_id_, dest_url)) { - Send(new FileSystemMsg_DidFail(request_id, - base::File::FILE_ERROR_SECURITY)); - return; - } - - operations_[request_id] = operation_runner()->Move( - src_url, - dest_url, - storage::FileSystemOperation::OPTION_NONE, - base::Bind(&FileAPIMessageFilter::DidFinish, this, request_id)); -} - -void FileAPIMessageFilter::OnCopy( - int request_id, const GURL& src_path, const GURL& dest_path) { - DCHECK_CURRENTLY_ON(BrowserThread::IO); - FileSystemURL src_url(context_->CrackURL(src_path)); - FileSystemURL dest_url(context_->CrackURL(dest_path)); - if (!ValidateFileSystemURL(request_id, src_url) || - !ValidateFileSystemURL(request_id, dest_url)) { - return; - } - if (!security_policy_->CanReadFileSystemFile(process_id_, src_url) || - !security_policy_->CanCopyIntoFileSystemFile(process_id_, dest_url)) { - Send(new FileSystemMsg_DidFail(request_id, - base::File::FILE_ERROR_SECURITY)); - return; - } - - operations_[request_id] = operation_runner()->Copy( - src_url, dest_url, storage::FileSystemOperation::OPTION_NONE, - FileSystemOperation::ERROR_BEHAVIOR_ABORT, - storage::FileSystemOperationRunner::CopyProgressCallback(), - base::Bind(&FileAPIMessageFilter::DidFinish, this, request_id)); -} - -void FileAPIMessageFilter::OnRemove( - int request_id, const GURL& path, bool recursive) { - DCHECK_CURRENTLY_ON(BrowserThread::IO); - FileSystemURL url(context_->CrackURL(path)); - if (!ValidateFileSystemURL(request_id, url)) - return; - if (!security_policy_->CanDeleteFileSystemFile(process_id_, url)) { - Send(new FileSystemMsg_DidFail(request_id, - base::File::FILE_ERROR_SECURITY)); - return; - } - - operations_[request_id] = operation_runner()->Remove( - url, recursive, - base::Bind(&FileAPIMessageFilter::DidFinish, this, request_id)); -} - -void FileAPIMessageFilter::OnReadMetadata( - int request_id, const GURL& path) { - DCHECK_CURRENTLY_ON(BrowserThread::IO); - FileSystemURL url(context_->CrackURL(path)); - if (!ValidateFileSystemURL(request_id, url)) - return; - if (!security_policy_->CanReadFileSystemFile(process_id_, url)) { - Send(new FileSystemMsg_DidFail(request_id, - base::File::FILE_ERROR_SECURITY)); - return; - } - - operations_[request_id] = operation_runner()->GetMetadata( - url, FileSystemOperation::GET_METADATA_FIELD_IS_DIRECTORY | - FileSystemOperation::GET_METADATA_FIELD_SIZE | - FileSystemOperation::GET_METADATA_FIELD_LAST_MODIFIED, - base::Bind(&FileAPIMessageFilter::DidGetMetadata, this, request_id)); -} - -void FileAPIMessageFilter::OnCreate( - int request_id, const GURL& path, bool exclusive, - bool is_directory, bool recursive) { - DCHECK_CURRENTLY_ON(BrowserThread::IO); - FileSystemURL url(context_->CrackURL(path)); - if (!ValidateFileSystemURL(request_id, url)) - return; - if (!security_policy_->CanCreateFileSystemFile(process_id_, url)) { - Send(new FileSystemMsg_DidFail(request_id, - base::File::FILE_ERROR_SECURITY)); - return; - } - - if (is_directory) { - operations_[request_id] = operation_runner()->CreateDirectory( - url, exclusive, recursive, - base::Bind(&FileAPIMessageFilter::DidFinish, this, request_id)); - } else { - operations_[request_id] = operation_runner()->CreateFile( - url, exclusive, - base::Bind(&FileAPIMessageFilter::DidFinish, this, request_id)); - } -} - -void FileAPIMessageFilter::OnExists( - int request_id, const GURL& path, bool is_directory) { - DCHECK_CURRENTLY_ON(BrowserThread::IO); - FileSystemURL url(context_->CrackURL(path)); - if (!ValidateFileSystemURL(request_id, url)) - return; - if (!security_policy_->CanReadFileSystemFile(process_id_, url)) { - Send(new FileSystemMsg_DidFail(request_id, - base::File::FILE_ERROR_SECURITY)); - return; - } - - if (is_directory) { - operations_[request_id] = operation_runner()->DirectoryExists( - url, - base::Bind(&FileAPIMessageFilter::DidFinish, this, request_id)); - } else { - operations_[request_id] = operation_runner()->FileExists( - url, - base::Bind(&FileAPIMessageFilter::DidFinish, this, request_id)); - } -} - -void FileAPIMessageFilter::OnReadDirectory( - int request_id, const GURL& path) { - DCHECK_CURRENTLY_ON(BrowserThread::IO); - FileSystemURL url(context_->CrackURL(path)); - if (!ValidateFileSystemURL(request_id, url)) - return; - if (!security_policy_->CanReadFileSystemFile(process_id_, url)) { - Send(new FileSystemMsg_DidFail(request_id, - base::File::FILE_ERROR_SECURITY)); - return; - } - - operations_[request_id] = operation_runner()->ReadDirectory( - url, base::BindRepeating(&FileAPIMessageFilter::DidReadDirectory, this, - request_id)); -} - -void FileAPIMessageFilter::OnWrite(int request_id, - const GURL& path, - const std::string& blob_uuid, - int64_t offset) { - DCHECK_CURRENTLY_ON(BrowserThread::IO); - - FileSystemURL url(context_->CrackURL(path)); - if (!ValidateFileSystemURL(request_id, url)) - return; - if (!security_policy_->CanWriteFileSystemFile(process_id_, url)) { - Send(new FileSystemMsg_DidFail(request_id, - base::File::FILE_ERROR_SECURITY)); - return; - } - - std::unique_ptr<storage::BlobDataHandle> blob = - blob_storage_context_->context()->GetBlobDataFromUUID(blob_uuid); - - operations_[request_id] = operation_runner()->Write( - url, std::move(blob), offset, - base::Bind(&FileAPIMessageFilter::DidWrite, this, request_id)); -} - -void FileAPIMessageFilter::OnTruncate(int request_id, - const GURL& path, - int64_t length) { - FileSystemURL url(context_->CrackURL(path)); - if (!ValidateFileSystemURL(request_id, url)) - return; - if (!security_policy_->CanWriteFileSystemFile(process_id_, url)) { - Send(new FileSystemMsg_DidFail(request_id, - base::File::FILE_ERROR_SECURITY)); - return; - } - - operations_[request_id] = operation_runner()->Truncate( - url, length, - base::Bind(&FileAPIMessageFilter::DidFinish, this, request_id)); -} - -void FileAPIMessageFilter::OnTouchFile( - int request_id, - const GURL& path, - const base::Time& last_access_time, - const base::Time& last_modified_time) { - DCHECK_CURRENTLY_ON(BrowserThread::IO); - FileSystemURL url(context_->CrackURL(path)); - if (!ValidateFileSystemURL(request_id, url)) - return; - if (!security_policy_->CanCreateFileSystemFile(process_id_, url)) { - Send(new FileSystemMsg_DidFail(request_id, - base::File::FILE_ERROR_SECURITY)); - return; - } - - operations_[request_id] = operation_runner()->TouchFile( - url, last_access_time, last_modified_time, - base::Bind(&FileAPIMessageFilter::DidFinish, this, request_id)); -} - -void FileAPIMessageFilter::OnCancel( - int request_id, - int request_id_to_cancel) { - DCHECK_CURRENTLY_ON(BrowserThread::IO); - - OperationsMap::iterator found = operations_.find(request_id_to_cancel); - if (found != operations_.end()) { - // The cancel will eventually send both the write failure and the cancel - // success. - operation_runner()->Cancel( - found->second, - base::Bind(&FileAPIMessageFilter::DidFinish, this, request_id)); - } else { - // The write already finished; report that we failed to stop it. - Send(new FileSystemMsg_DidFail( - request_id, base::File::FILE_ERROR_INVALID_OPERATION)); - } -} - -void FileAPIMessageFilter::OnSyncGetPlatformPath( - const GURL& path, base::FilePath* platform_path) { - SyncGetPlatformPath(context_, process_id_, path, platform_path); -} - -void FileAPIMessageFilter::OnCreateSnapshotFile( - int request_id, const GURL& path) { - DCHECK_CURRENTLY_ON(BrowserThread::IO); - FileSystemURL url(context_->CrackURL(path)); - - // Make sure if this file can be read by the renderer as this is - // called when the renderer is about to create a new File object - // (for reading the file). - if (!ValidateFileSystemURL(request_id, url)) - return; - if (!security_policy_->CanReadFileSystemFile(process_id_, url)) { - Send(new FileSystemMsg_DidFail(request_id, - base::File::FILE_ERROR_SECURITY)); - return; - } - - FileSystemBackend* backend = context_->GetFileSystemBackend(url.type()); - if (backend->SupportsStreaming(url)) { - operations_[request_id] = operation_runner()->GetMetadata( - url, FileSystemOperation::GET_METADATA_FIELD_IS_DIRECTORY | - FileSystemOperation::GET_METADATA_FIELD_SIZE | - FileSystemOperation::GET_METADATA_FIELD_LAST_MODIFIED, - base::Bind(&FileAPIMessageFilter::DidGetMetadataForStreaming, this, - request_id)); - } else { - operations_[request_id] = operation_runner()->CreateSnapshotFile( - url, - base::Bind(&FileAPIMessageFilter::DidCreateSnapshot, - this, request_id, url)); - } -} - -void FileAPIMessageFilter::OnDidReceiveSnapshotFile(int request_id) { - DCHECK_CURRENTLY_ON(BrowserThread::IO); - in_transit_snapshot_files_.erase(request_id); -} - -void FileAPIMessageFilter::DidFinish(int request_id, - base::File::Error result) { - if (result == base::File::FILE_OK) - Send(new FileSystemMsg_DidSucceed(request_id)); - else - Send(new FileSystemMsg_DidFail(request_id, result)); - operations_.erase(request_id); -} - -void FileAPIMessageFilter::DidGetMetadata( - int request_id, - base::File::Error result, - const base::File::Info& info) { - if (result == base::File::FILE_OK) - Send(new FileSystemMsg_DidReadMetadata(request_id, info)); - else - Send(new FileSystemMsg_DidFail(request_id, result)); - operations_.erase(request_id); -} - -void FileAPIMessageFilter::DidGetMetadataForStreaming( - int request_id, - base::File::Error result, - const base::File::Info& info) { - if (result == base::File::FILE_OK) { - // For now, streaming Blobs are implemented as a successful snapshot file - // creation with an empty path. - Send(new FileSystemMsg_DidCreateSnapshotFile(request_id, info, - base::FilePath())); - } else { - Send(new FileSystemMsg_DidFail(request_id, result)); - } - operations_.erase(request_id); -} - -void FileAPIMessageFilter::DidReadDirectory( - int request_id, - base::File::Error result, - std::vector<filesystem::mojom::DirectoryEntry> entries, - bool has_more) { - if (result == base::File::FILE_OK) { - if (!entries.empty() || !has_more) - Send(new FileSystemMsg_DidReadDirectory(request_id, std::move(entries), - has_more)); - } else { - DCHECK(!has_more); - Send(new FileSystemMsg_DidFail(request_id, result)); - } - if (!has_more) - operations_.erase(request_id); -} - -void FileAPIMessageFilter::DidWrite(int request_id, - base::File::Error result, - int64_t bytes, - bool complete) { - if (result == base::File::FILE_OK) { - Send(new FileSystemMsg_DidWrite(request_id, bytes, complete)); - if (complete) - operations_.erase(request_id); - } else { - Send(new FileSystemMsg_DidFail(request_id, result)); - operations_.erase(request_id); - } -} - -void FileAPIMessageFilter::DidOpenFileSystem(int request_id, - const GURL& root, - const std::string& filesystem_name, - base::File::Error result) { - DCHECK_CURRENTLY_ON(BrowserThread::IO); - if (result == base::File::FILE_OK) { - DCHECK(root.is_valid()); - Send(new FileSystemMsg_DidOpenFileSystem( - request_id, filesystem_name, root)); - } else { - Send(new FileSystemMsg_DidFail(request_id, result)); - } - // For OpenFileSystem we do not create a new operation, so no unregister here. -} - -void FileAPIMessageFilter::DidResolveURL( - int request_id, - base::File::Error result, - const storage::FileSystemInfo& info, - const base::FilePath& file_path, - storage::FileSystemContext::ResolvedEntryType type) { - DCHECK_CURRENTLY_ON(BrowserThread::IO); - if (result == base::File::FILE_OK && - type == storage::FileSystemContext::RESOLVED_ENTRY_NOT_FOUND) - result = base::File::FILE_ERROR_NOT_FOUND; - - if (result == base::File::FILE_OK) { - DCHECK(info.root_url.is_valid()); - Send(new FileSystemMsg_DidResolveURL( - request_id, - info, - file_path, - type == storage::FileSystemContext::RESOLVED_ENTRY_DIRECTORY)); - } else { - Send(new FileSystemMsg_DidFail(request_id, result)); - } - // For ResolveURL we do not create a new operation, so no unregister here. -} - -void FileAPIMessageFilter::DidCreateSnapshot( - int request_id, - const storage::FileSystemURL& url, - base::File::Error result, - const base::File::Info& info, - const base::FilePath& platform_path, - scoped_refptr<storage::ShareableFileReference> /* unused */) { - DCHECK_CURRENTLY_ON(BrowserThread::IO); - operations_.erase(request_id); - - if (result != base::File::FILE_OK) { - Send(new FileSystemMsg_DidFail(request_id, result)); - return; - } - - scoped_refptr<storage::ShareableFileReference> file_ref = - storage::ShareableFileReference::Get(platform_path); - if (!security_policy_->CanReadFile(process_id_, platform_path)) { - // Give per-file read permission to the snapshot file if it hasn't it yet. - // In order for the renderer to be able to read the file via File object, - // it must be granted per-file read permission for the file's platform - // path. By now, it has already been verified that the renderer has - // sufficient permissions to read the file, so giving per-file permission - // here must be safe. - security_policy_->GrantReadFile(process_id_, platform_path); - - // Revoke all permissions for the file when the last ref of the file - // is dropped. - if (!file_ref.get()) { - // Create a reference for temporary permission handling. - file_ref = storage::ShareableFileReference::GetOrCreate( - platform_path, - storage::ShareableFileReference::DONT_DELETE_ON_FINAL_RELEASE, - context_->default_file_task_runner()); - } - file_ref->AddFinalReleaseCallback( - base::BindOnce(&RevokeFilePermission, process_id_)); - } - - if (file_ref.get()) { - // This ref is held until OnDidReceiveSnapshotFile is called. - in_transit_snapshot_files_[request_id] = file_ref; - } - - // Return the file info and platform_path. - Send(new FileSystemMsg_DidCreateSnapshotFile( - request_id, info, platform_path)); -} - -bool FileAPIMessageFilter::ValidateFileSystemURL( - int request_id, - const storage::FileSystemURL& url) { - if (!FileSystemURLIsValid(context_, url)) { - Send(new FileSystemMsg_DidFail(request_id, - base::File::FILE_ERROR_INVALID_URL)); - return false; - } - - // Deny access to files in PluginPrivate FileSystem from JavaScript. - // TODO(nhiroki): Move this filter somewhere else since this is not for - // validation. - if (url.type() == storage::kFileSystemTypePluginPrivate) { - Send(new FileSystemMsg_DidFail(request_id, - base::File::FILE_ERROR_SECURITY)); - return false; - } - - return true; -} - -} // namespace content
diff --git a/content/browser/fileapi/fileapi_message_filter.h b/content/browser/fileapi/fileapi_message_filter.h deleted file mode 100644 index d6b37f6..0000000 --- a/content/browser/fileapi/fileapi_message_filter.h +++ /dev/null
@@ -1,177 +0,0 @@ -// Copyright (c) 2012 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 CONTENT_BROWSER_FILEAPI_FILEAPI_MESSAGE_FILTER_H_ -#define CONTENT_BROWSER_FILEAPI_FILEAPI_MESSAGE_FILTER_H_ - -#include <stddef.h> -#include <stdint.h> - -#include <map> -#include <memory> -#include <set> -#include <string> -#include <vector> - -#include "base/callback.h" -#include "base/containers/hash_tables.h" -#include "base/macros.h" -#include "base/memory/ref_counted.h" -#include "base/memory/shared_memory.h" -#include "components/services/filesystem/public/interfaces/types.mojom.h" -#include "content/browser/streams/stream.h" -#include "content/browser/streams/stream_context.h" -#include "content/common/content_export.h" -#include "content/public/browser/browser_message_filter.h" -#include "storage/browser/fileapi/file_system_context.h" -#include "storage/browser/fileapi/file_system_operation_runner.h" -#include "storage/common/fileapi/file_system_types.h" - -class GURL; - -namespace base { -class FilePath; -class Time; -} - -namespace storage { -class FileSystemURL; -class FileSystemOperationRunner; -struct FileSystemInfo; -} - -namespace storage { -class ShareableFileReference; -} - -namespace content { -class ChildProcessSecurityPolicyImpl; -class ChromeBlobStorageContext; - -// TODO(tyoshino): Factor out code except for IPC gluing from -// FileAPIMessageFilter into separate classes. See crbug.com/263741. -class CONTENT_EXPORT FileAPIMessageFilter : public BrowserMessageFilter { - public: - FileAPIMessageFilter(int process_id, - storage::FileSystemContext* file_system_context, - ChromeBlobStorageContext* blob_storage_context); - - // BrowserMessageFilter implementation. - void OnChannelConnected(int32_t peer_pid) override; - void OnChannelClosing() override; - base::TaskRunner* OverrideTaskRunnerForMessage( - const IPC::Message& message) override; - bool OnMessageReceived(const IPC::Message& message) override; - - protected: - ~FileAPIMessageFilter() override; - - private: - typedef storage::FileSystemOperationRunner::OperationID OperationID; - - void OnOpenFileSystem(int request_id, - const GURL& origin_url, - storage::FileSystemType type); - void OnResolveURL(int request_id, - const GURL& filesystem_url); - void OnMove(int request_id, - const GURL& src_path, - const GURL& dest_path); - void OnCopy(int request_id, - const GURL& src_path, - const GURL& dest_path); - void OnRemove(int request_id, const GURL& path, bool recursive); - void OnReadMetadata(int request_id, const GURL& path); - void OnCreate(int request_id, - const GURL& path, - bool exclusive, - bool is_directory, - bool recursive); - void OnExists(int request_id, const GURL& path, bool is_directory); - void OnReadDirectory(int request_id, const GURL& path); - void OnWrite(int request_id, - const GURL& path, - const std::string& blob_uuid, - int64_t offset); - void OnTruncate(int request_id, const GURL& path, int64_t length); - void OnTouchFile(int request_id, - const GURL& path, - const base::Time& last_access_time, - const base::Time& last_modified_time); - void OnCancel(int request_id, int request_to_cancel); - void OnSyncGetPlatformPath(const GURL& path, - base::FilePath* platform_path); - void OnCreateSnapshotFile(int request_id, - const GURL& path); - void OnDidReceiveSnapshotFile(int request_id); - - // Callback functions to be used when each file operation is finished. - void DidFinish(int request_id, base::File::Error result); - void DidGetMetadata(int request_id, - base::File::Error result, - const base::File::Info& info); - void DidGetMetadataForStreaming(int request_id, - base::File::Error result, - const base::File::Info& info); - void DidReadDirectory(int request_id, - base::File::Error result, - std::vector<filesystem::mojom::DirectoryEntry> entries, - bool has_more); - void DidWrite(int request_id, - base::File::Error result, - int64_t bytes, - bool complete); - void DidOpenFileSystem(int request_id, - const GURL& root, - const std::string& filesystem_name, - base::File::Error result); - void DidResolveURL(int request_id, - base::File::Error result, - const storage::FileSystemInfo& info, - const base::FilePath& file_path, - storage::FileSystemContext::ResolvedEntryType type); - void DidCreateSnapshot( - int request_id, - const storage::FileSystemURL& url, - base::File::Error result, - const base::File::Info& info, - const base::FilePath& platform_path, - scoped_refptr<storage::ShareableFileReference> file_ref); - - // Sends a FileSystemMsg_DidFail and returns false if |url| is invalid. - bool ValidateFileSystemURL(int request_id, const storage::FileSystemURL& url); - - storage::FileSystemOperationRunner* operation_runner() { - return operation_runner_.get(); - } - - int process_id_; - - storage::FileSystemContext* context_; - ChildProcessSecurityPolicyImpl* security_policy_; - - // Keeps map from request_id to OperationID for ongoing operations. - // (Primarily for Cancel operation) - typedef std::map<int, OperationID> OperationsMap; - OperationsMap operations_; - - scoped_refptr<ChromeBlobStorageContext> blob_storage_context_; - - std::unique_ptr<storage::FileSystemOperationRunner> operation_runner_; - - // Keep track of stream URLs registered in this process. Need to unregister - // all of them when the renderer process dies. - base::hash_set<std::string> stream_urls_; - - // Used to keep snapshot files alive while a DidCreateSnapshot - // is being sent to the renderer. - std::map<int, scoped_refptr<storage::ShareableFileReference> > - in_transit_snapshot_files_; - - DISALLOW_COPY_AND_ASSIGN(FileAPIMessageFilter); -}; - -} // namespace content - -#endif // CONTENT_BROWSER_FILEAPI_FILEAPI_MESSAGE_FILTER_H_
diff --git a/content/browser/fileapi/fileapi_message_filter_unittest.cc b/content/browser/fileapi/fileapi_message_filter_unittest.cc deleted file mode 100644 index 5302dee..0000000 --- a/content/browser/fileapi/fileapi_message_filter_unittest.cc +++ /dev/null
@@ -1,121 +0,0 @@ -// Copyright 2013 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -#include "content/browser/fileapi/fileapi_message_filter.h" - -#include <stddef.h> - -#include <string> -#include <vector> - -#include "base/memory/ref_counted.h" -#include "base/memory/shared_memory.h" -#include "base/process/process_handle.h" -#include "base/run_loop.h" -#include "content/browser/blob_storage/chrome_blob_storage_context.h" -#include "content/browser/child_process_security_policy_impl.h" -#include "content/common/fileapi/file_system_messages.h" -#include "content/common/fileapi/webblob_messages.h" -#include "content/public/browser/browser_context.h" -#include "content/public/browser/browser_thread.h" -#include "content/public/browser/storage_partition.h" -#include "content/public/common/common_param_traits.h" -#include "content/public/test/mock_render_process_host.h" -#include "content/public/test/test_browser_context.h" -#include "content/public/test/test_browser_thread.h" -#include "content/public/test/test_browser_thread_bundle.h" -#include "net/base/io_buffer.h" -#include "storage/browser/blob/blob_storage_context.h" -#include "storage/browser/fileapi/file_system_context.h" -#include "storage/browser/test/test_file_system_context.h" -#include "testing/gtest/include/gtest/gtest.h" - -namespace content { - -class FileAPIMessageFilterTest : public testing::Test { - public: - FileAPIMessageFilterTest() - : browser_thread_bundle_(TestBrowserThreadBundle::IO_MAINLOOP) { - } - - protected: - void SetUp() override { - file_system_context_ = - CreateFileSystemContextForTesting(nullptr, base::FilePath()); - - for (const storage::FileSystemType& type : - file_system_context_->GetFileSystemTypes()) { - ChildProcessSecurityPolicyImpl::GetInstance() - ->RegisterFileSystemPermissionPolicy( - type, storage::FileSystemContext::GetPermissionPolicy(type)); - } - - blob_storage_context_ = ChromeBlobStorageContext::GetFor(&browser_context_); - - filter_ = new FileAPIMessageFilter( - 0 /* process_id */, - file_system_context_.get(), blob_storage_context_); - - // Complete initialization. - base::RunLoop().RunUntilIdle(); - } - - TestBrowserThreadBundle browser_thread_bundle_; - TestBrowserContext browser_context_; - scoped_refptr<storage::FileSystemContext> file_system_context_; - ChromeBlobStorageContext* blob_storage_context_; - - scoped_refptr<FileAPIMessageFilter> filter_; -}; - -TEST_F(FileAPIMessageFilterTest, CloseChannelWithInflightRequest) { - scoped_refptr<FileAPIMessageFilter> filter(new FileAPIMessageFilter( - 0 /* process_id */, - file_system_context_.get(), - ChromeBlobStorageContext::GetFor(&browser_context_))); - filter->OnChannelConnected(0); - - // Complete initialization. - base::RunLoop().RunUntilIdle(); - - int request_id = 0; - const GURL kUrl("filesystem:http://example.com/temporary/foo"); - FileSystemHostMsg_ReadMetadata read_metadata(request_id++, kUrl); - EXPECT_TRUE(filter->OnMessageReceived(read_metadata)); - - // Close the filter while it has inflight request. - filter->OnChannelClosing(); - - // This shouldn't cause DCHECK failure. - base::RunLoop().RunUntilIdle(); -} - -TEST_F(FileAPIMessageFilterTest, MultipleFilters) { - scoped_refptr<FileAPIMessageFilter> filter1(new FileAPIMessageFilter( - 0 /* process_id */, - file_system_context_.get(), - ChromeBlobStorageContext::GetFor(&browser_context_))); - scoped_refptr<FileAPIMessageFilter> filter2(new FileAPIMessageFilter( - 1 /* process_id */, - file_system_context_.get(), - ChromeBlobStorageContext::GetFor(&browser_context_))); - filter1->OnChannelConnected(0); - filter2->OnChannelConnected(1); - - // Complete initialization. - base::RunLoop().RunUntilIdle(); - - int request_id = 0; - const GURL kUrl("filesystem:http://example.com/temporary/foo"); - FileSystemHostMsg_ReadMetadata read_metadata(request_id++, kUrl); - EXPECT_TRUE(filter1->OnMessageReceived(read_metadata)); - - // Close the other filter before the request for filter1 is processed. - filter2->OnChannelClosing(); - - // This shouldn't cause DCHECK failure. - base::RunLoop().RunUntilIdle(); -} - -} // namespace content
diff --git a/content/browser/font_unique_name_lookup/icu_fold_case_util.cc b/content/browser/font_unique_name_lookup/icu_fold_case_util.cc index af0f937..d24a0ec1 100644 --- a/content/browser/font_unique_name_lookup/icu_fold_case_util.cc +++ b/content/browser/font_unique_name_lookup/icu_fold_case_util.cc
@@ -4,12 +4,11 @@ #include "content/browser/font_unique_name_lookup/icu_fold_case_util.h" -using namespace ::icu_62; - namespace content { std::string IcuFoldCase(const std::string& name_request) { - UnicodeString name_request_unicode = UnicodeString::fromUTF8(name_request); + icu_62::UnicodeString name_request_unicode = + icu_62::UnicodeString::fromUTF8(name_request); name_request_unicode.foldCase(); std::string name_request_lower; name_request_unicode.toUTF8String(name_request_lower);
diff --git a/content/browser/frame_host/navigation_controller_impl_browsertest.cc b/content/browser/frame_host/navigation_controller_impl_browsertest.cc index 818e4d5..1a70632 100644 --- a/content/browser/frame_host/navigation_controller_impl_browsertest.cc +++ b/content/browser/frame_host/navigation_controller_impl_browsertest.cc
@@ -7467,8 +7467,12 @@ TestNavigationObserver observer(shell()->web_contents()); controller.GoBack(); observer.Wait(); + GURL x_frame_options_deny_url = + embedded_test_server()->GetURL("/x-frame-options-deny.html"); + EXPECT_EQ(x_frame_options_deny_url, root->child_at(0)->current_url()); + EXPECT_EQ(net::ERR_BLOCKED_BY_RESPONSE, observer.last_net_error_code()); + EXPECT_FALSE(observer.last_navigation_succeeded()); } - EXPECT_EQ(GURL("data:,"), root->child_at(0)->current_url()); // Go back again. This would have been same-document if the prior navigation // had succeeded.
diff --git a/content/browser/frame_host/navigation_entry_impl.cc b/content/browser/frame_host/navigation_entry_impl.cc index b0fa217..aa9c80e 100644 --- a/content/browser/frame_host/navigation_entry_impl.cc +++ b/content/browser/frame_host/navigation_entry_impl.cc
@@ -12,6 +12,7 @@ #include <utility> #include "base/containers/queue.h" +#include "base/files/file_path.h" #include "base/i18n/rtl.h" #include "base/memory/ptr_util.h" #include "base/metrics/histogram_macros.h" @@ -28,6 +29,10 @@ #include "content/public/common/url_constants.h" #include "ui/gfx/text_elider.h" +#if defined(OS_ANDROID) +#include "base/android/content_uri_utils.h" +#endif + using base::UTF16ToUTF8; namespace content { @@ -457,6 +462,16 @@ base::i18n::WrapStringWithLTRFormatting(&title); } +#if defined(OS_ANDROID) + if (GetURL().SchemeIs(url::kContentScheme)) { + base::string16 file_display_name; + if (base::MaybeGetFileDisplayName(base::FilePath(GetURL().spec()), + &file_display_name)) { + title = file_display_name; + } + } +#endif + gfx::ElideString(title, kMaxTitleChars, &cached_display_title_); return cached_display_title_; }
diff --git a/content/browser/frame_host/navigation_entry_impl_unittest.cc b/content/browser/frame_host/navigation_entry_impl_unittest.cc index c592771..a95cedbd 100644 --- a/content/browser/frame_host/navigation_entry_impl_unittest.cc +++ b/content/browser/frame_host/navigation_entry_impl_unittest.cc
@@ -2,12 +2,15 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#include "content/browser/frame_host/navigation_entry_impl.h" + +#include "base/path_service.h" #include "base/strings/string16.h" #include "base/strings/string_util.h" #include "base/strings/utf_string_conversions.h" +#include "base/test/test_file_util.h" #include "base/time/time.h" #include "build/build_config.h" -#include "content/browser/frame_host/navigation_entry_impl.h" #include "content/browser/site_instance_impl.h" #include "content/public/browser/ssl_status.h" #include "testing/gtest/include/gtest/gtest.h" @@ -328,4 +331,22 @@ EXPECT_EQ(ASCIIToUTF16(""), output2); } +#if defined(OS_ANDROID) +// Test that content URIs correctly show the file display name as the title. +TEST_F(NavigationEntryTest, NavigationEntryContentUri) { + base::FilePath image_path; + EXPECT_TRUE(base::PathService::Get(base::DIR_SOURCE_ROOT, &image_path)); + image_path = image_path.Append(FILE_PATH_LITERAL("content")); + image_path = image_path.Append(FILE_PATH_LITERAL("test")); + image_path = image_path.Append(FILE_PATH_LITERAL("data")); + image_path = image_path.Append(FILE_PATH_LITERAL("blank.jpg")); + EXPECT_TRUE(base::PathExists(image_path)); + + base::FilePath content_uri = base::InsertImageIntoMediaStore(image_path); + + entry1_->SetURL(GURL(content_uri.value())); + EXPECT_EQ(ASCIIToUTF16("blank.jpg"), entry1_->GetTitleForDisplay()); +} +#endif + } // namespace content
diff --git a/content/browser/frame_host/render_frame_host_android.cc b/content/browser/frame_host/render_frame_host_android.cc index 63de23c2..bee0329 100644 --- a/content/browser/frame_host/render_frame_host_android.cc +++ b/content/browser/frame_host/render_frame_host_android.cc
@@ -10,6 +10,7 @@ #include "base/android/jni_string.h" #include "base/android/unguessable_token_android.h" #include "base/bind.h" +#include "base/json/json_string_value_serializer.h" #include "base/logging.h" #include "content/browser/frame_host/render_frame_host_delegate.h" #include "content/browser/frame_host/render_frame_host_impl.h" @@ -37,6 +38,15 @@ base::android::RunStringCallbackAndroid(jcallback, url->spec()); } + +void OnExecuteJavaScriptResult(const base::android::JavaRef<jobject>& jcallback, + const base::Value* value) { + std::string result; + JSONStringValueSerializer serializer(&result); + bool value_serialized = serializer.SerializeAndOmitBinaryValues(*value); + DCHECK(value_serialized); + base::android::RunStringCallbackAndroid(jcallback, result); +} } // namespace RenderFrameHostAndroid::RenderFrameHostAndroid( @@ -101,4 +111,16 @@ render_frame_host_->NotifyUserActivation(); } +void RenderFrameHostAndroid::ExecuteJavaScriptForTests( + JNIEnv* env, + const base::android::JavaParamRef<jobject>& obj, + const base::android::JavaParamRef<jstring>& jscript, + const base::android::JavaParamRef<jobject>& jcallback) { + base::string16 script(ConvertJavaStringToUTF16(env, jscript)); + auto callback = base::BindRepeating( + &OnExecuteJavaScriptResult, + base::android::ScopedJavaGlobalRef<jobject>(env, jcallback)); + render_frame_host_->ExecuteJavaScriptForTests(script, callback); +} + } // namespace content
diff --git a/content/browser/frame_host/render_frame_host_android.h b/content/browser/frame_host/render_frame_host_android.h index 423e1a6..827f540 100644 --- a/content/browser/frame_host/render_frame_host_android.h +++ b/content/browser/frame_host/render_frame_host_android.h
@@ -52,6 +52,14 @@ void NotifyUserActivation(JNIEnv* env, const base::android::JavaParamRef<jobject>&); + // TODO(https://crbug.com/873217): Move this and OnExecuteJavaScriptResult + // into a test-only RFH wrapper. + void ExecuteJavaScriptForTests( + JNIEnv* env, + const base::android::JavaParamRef<jobject>&, + const base::android::JavaParamRef<jstring>& jscript, + const base::android::JavaParamRef<jobject>& jcallback); + private: RenderFrameHostImpl* const render_frame_host_; service_manager::mojom::InterfaceProviderPtr interface_provider_ptr_;
diff --git a/content/browser/frame_host/render_frame_host_impl.cc b/content/browser/frame_host/render_frame_host_impl.cc index 143644b..7f5d62f 100644 --- a/content/browser/frame_host/render_frame_host_impl.cc +++ b/content/browser/frame_host/render_frame_host_impl.cc
@@ -68,6 +68,7 @@ #include "content/browser/permissions/permission_controller_impl.h" #include "content/browser/permissions/permission_service_context.h" #include "content/browser/permissions/permission_service_impl.h" +#include "content/browser/portal/portal.h" #include "content/browser/presentation/presentation_service_impl.h" #include "content/browser/quota_dispatcher_host.h" #include "content/browser/renderer_host/dip_util.h" @@ -3614,6 +3615,11 @@ base::BindRepeating(SpeechRecognitionDispatcherHost::Create, GetProcess()->GetID(), routing_id_), BrowserThread::GetTaskRunnerForThread(BrowserThread::IO)); + + if (Portal::IsEnabled()) { + registry_->AddInterface(base::BindRepeating(IgnoreResult(&Portal::Create), + base::Unretained(this))); + } } void RenderFrameHostImpl::ResetWaitingState() {
diff --git a/content/browser/frame_host/render_widget_host_view_guest.cc b/content/browser/frame_host/render_widget_host_view_guest.cc index 7c08ae7a..09d512f 100644 --- a/content/browser/frame_host/render_widget_host_view_guest.cc +++ b/content/browser/frame_host/render_widget_host_view_guest.cc
@@ -354,6 +354,10 @@ return platform_view_->GetSelectedRange(); } +size_t RenderWidgetHostViewGuest::GetOffsetForSurroundingText() { + return platform_view_->GetOffsetForSurroundingText(); +} + void RenderWidgetHostViewGuest::SetNeedsBeginFrames(bool needs_begin_frames) { if (platform_view_) platform_view_->SetNeedsBeginFrames(needs_begin_frames);
diff --git a/content/browser/frame_host/render_widget_host_view_guest.h b/content/browser/frame_host/render_widget_host_view_guest.h index 864dd4b..b6b986c 100644 --- a/content/browser/frame_host/render_widget_host_view_guest.h +++ b/content/browser/frame_host/render_widget_host_view_guest.h
@@ -82,6 +82,7 @@ base::string16 GetSelectedText() override; base::string16 GetSurroundingText() override; gfx::Range GetSelectedRange() override; + size_t GetOffsetForSurroundingText() override; void SetNeedsBeginFrames(bool needs_begin_frames) override; TouchSelectionControllerClientManager* GetTouchSelectionControllerClientManager() override;
diff --git a/content/browser/indexed_db/indexed_db_callbacks.cc b/content/browser/indexed_db/indexed_db_callbacks.cc index 3038de8e..5c8e725 100644 --- a/content/browser/indexed_db/indexed_db_callbacks.cc +++ b/content/browser/indexed_db/indexed_db_callbacks.cc
@@ -17,7 +17,6 @@ #include "base/threading/sequenced_task_runner_handle.h" #include "base/time/time.h" #include "content/browser/child_process_security_policy_impl.h" -#include "content/browser/fileapi/fileapi_message_filter.h" #include "content/browser/indexed_db/cursor_impl.h" #include "content/browser/indexed_db/database_impl.h" #include "content/browser/indexed_db/indexed_db_connection.h"
diff --git a/content/browser/loader/resource_dispatcher_host_impl.cc b/content/browser/loader/resource_dispatcher_host_impl.cc index caf7dd8..b595348 100644 --- a/content/browser/loader/resource_dispatcher_host_impl.cc +++ b/content/browser/loader/resource_dispatcher_host_impl.cc
@@ -1060,11 +1060,11 @@ requester_info->IsNavigationPreload() || requester_info->IsCertificateFetcherForSignedExchange()); // Construct the IPC resource handler. - std::unique_ptr<ResourceHandler> handler; - handler = CreateBaseResourceHandler( - request, url_loader_options, std::move(mojo_request), - std::move(url_loader_client), - static_cast<ResourceType>(request_data.resource_type)); + std::unique_ptr<ResourceHandler> handler = + std::make_unique<MojoAsyncResourceHandler>( + request, this, std::move(mojo_request), std::move(url_loader_client), + static_cast<ResourceType>(request_data.resource_type), + url_loader_options); // Prefetches outlive their child process. if (request_data.resource_type == RESOURCE_TYPE_PREFETCH) { @@ -1084,20 +1084,6 @@ } std::unique_ptr<ResourceHandler> -ResourceDispatcherHostImpl::CreateBaseResourceHandler( - net::URLRequest* request, - uint32_t url_loader_options, - network::mojom::URLLoaderRequest mojo_request, - network::mojom::URLLoaderClientPtr url_loader_client, - ResourceType resource_type) { - std::unique_ptr<ResourceHandler> handler; - handler.reset(new MojoAsyncResourceHandler( - request, this, std::move(mojo_request), std::move(url_loader_client), - resource_type, url_loader_options)); - return handler; -} - -std::unique_ptr<ResourceHandler> ResourceDispatcherHostImpl::AddStandardHandlers( net::URLRequest* request, ResourceType resource_type,
diff --git a/content/browser/loader/resource_dispatcher_host_impl.h b/content/browser/loader/resource_dispatcher_host_impl.h index 1a3c389..d39156a 100644 --- a/content/browser/loader/resource_dispatcher_host_impl.h +++ b/content/browser/loader/resource_dispatcher_host_impl.h
@@ -588,14 +588,6 @@ network::mojom::URLLoaderRequest mojo_request, network::mojom::URLLoaderClientPtr url_loader_client); - // Creates either MojoAsyncResourceHandler or AsyncResourceHandler. - std::unique_ptr<ResourceHandler> CreateBaseResourceHandler( - net::URLRequest* request, - uint32_t url_loader_options, - network::mojom::URLLoaderRequest mojo_request, - network::mojom::URLLoaderClientPtr url_loader_client, - ResourceType resource_type); - // Wraps |handler| in the standard resource handlers for normal resource // loading and navigation requests. This adds MimeTypeResourceHandler and // ResourceThrottles.
diff --git a/content/browser/media/video_decoder_proxy.cc b/content/browser/media/video_decoder_proxy.cc new file mode 100644 index 0000000..ea252f0c --- /dev/null +++ b/content/browser/media/video_decoder_proxy.cc
@@ -0,0 +1,96 @@ +// 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 "content/browser/media/video_decoder_proxy.h" + +#include "base/logging.h" +#include "content/public/common/service_manager_connection.h" +#include "media/mojo/interfaces/constants.mojom.h" +#include "media/mojo/interfaces/media_service.mojom.h" +#include "services/service_manager/public/cpp/connector.h" + +namespace content { + +VideoDecoderProxy::VideoDecoderProxy() { + DVLOG(1) << __func__; +} + +VideoDecoderProxy::~VideoDecoderProxy() { + DVLOG(1) << __func__; + DCHECK_CALLED_ON_VALID_THREAD(thread_checker_); +} + +void VideoDecoderProxy::Add(media::mojom::InterfaceFactoryRequest request) { + DVLOG(1) << __func__; + DCHECK_CALLED_ON_VALID_THREAD(thread_checker_); + + bindings_.AddBinding(this, std::move(request)); +} + +void VideoDecoderProxy::CreateAudioDecoder( + media::mojom::AudioDecoderRequest request) {} + +void VideoDecoderProxy::CreateVideoDecoder( + media::mojom::VideoDecoderRequest request) { + DVLOG(2) << __func__; + DCHECK_CALLED_ON_VALID_THREAD(thread_checker_); + InterfaceFactory* factory = GetMediaInterfaceFactory(); + if (factory) + factory->CreateVideoDecoder(std::move(request)); +} + +void VideoDecoderProxy::CreateRenderer(media::mojom::HostedRendererType type, + const std::string& type_specific_id, + media::mojom::RendererRequest request) {} + +void VideoDecoderProxy::CreateCdm( + const std::string& key_system, + media::mojom::ContentDecryptionModuleRequest request) {} + +void VideoDecoderProxy::CreateDecryptor( + int cdm_id, + media::mojom::DecryptorRequest request) {} + +void VideoDecoderProxy::CreateCdmProxy(const std::string& cdm_guid, + media::mojom::CdmProxyRequest request) {} + +media::mojom::InterfaceFactory* VideoDecoderProxy::GetMediaInterfaceFactory() { + DCHECK_CALLED_ON_VALID_THREAD(thread_checker_); + + if (!interface_factory_ptr_) + ConnectToMediaService(); + + return interface_factory_ptr_.get(); +} + +void VideoDecoderProxy::ConnectToMediaService() { + DVLOG(1) << __func__; + DCHECK_CALLED_ON_VALID_THREAD(thread_checker_); + DCHECK(!interface_factory_ptr_); + + media::mojom::MediaServicePtr media_service; + // TODO(slan): Use the BrowserContext Connector instead. + // See https://crbug.com/638950. + service_manager::Connector* connector = + ServiceManagerConnection::GetForProcess()->GetConnector(); + connector->BindInterface(media::mojom::kMediaServiceName, &media_service); + + // TODO(sandersd): Do we need to bind an empty |interfaces| implementation? + service_manager::mojom::InterfaceProviderPtr interfaces; + media_service->CreateInterfaceFactory(MakeRequest(&interface_factory_ptr_), + std::move(interfaces)); + + interface_factory_ptr_.set_connection_error_handler( + base::BindOnce(&VideoDecoderProxy::OnMediaServiceConnectionError, + base::Unretained(this))); +} + +void VideoDecoderProxy::OnMediaServiceConnectionError() { + DVLOG(1) << __func__; + DCHECK_CALLED_ON_VALID_THREAD(thread_checker_); + + interface_factory_ptr_.reset(); +} + +} // namespace content
diff --git a/content/browser/media/video_decoder_proxy.h b/content/browser/media/video_decoder_proxy.h new file mode 100644 index 0000000..35052a5 --- /dev/null +++ b/content/browser/media/video_decoder_proxy.h
@@ -0,0 +1,58 @@ +// 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 CONTENT_BROWSER_MEDIA_VIDEO_DECODER_PROXY_H_ +#define CONTENT_BROWSER_MEDIA_VIDEO_DECODER_PROXY_H_ + +#include <string> + +#include "base/macros.h" +#include "base/threading/thread_checker.h" +#include "media/mojo/interfaces/interface_factory.mojom.h" +#include "mojo/public/cpp/bindings/binding_set.h" + +namespace content { + +// This implements the media::mojom::InterfaceFactory interface for a +// RenderProcessHostImpl. Unlike MediaInterfaceProxy, only +// CreateVideoDecoder() is implemented. This allows WebRTC to create +// MojoVideoDecoder instances without a RenderFrame. +class VideoDecoderProxy : public media::mojom::InterfaceFactory { + public: + VideoDecoderProxy(); + ~VideoDecoderProxy() final; + + void Add(media::mojom::InterfaceFactoryRequest request); + + // media::mojom::InterfaceFactory implementation. + void CreateAudioDecoder(media::mojom::AudioDecoderRequest request) final; + void CreateVideoDecoder(media::mojom::VideoDecoderRequest request) final; + void CreateRenderer(media::mojom::HostedRendererType type, + const std::string& type_specific_id, + media::mojom::RendererRequest request) final; + void CreateCdm(const std::string& key_system, + media::mojom::ContentDecryptionModuleRequest request) final; + void CreateDecryptor(int cdm_id, + media::mojom::DecryptorRequest request) final; + void CreateCdmProxy(const std::string& cdm_guid, + media::mojom::CdmProxyRequest request) final; + + private: + media::mojom::InterfaceFactory* GetMediaInterfaceFactory(); + void ConnectToMediaService(); + void OnMediaServiceConnectionError(); + + // Connection to the remote media InterfaceFactory. + media::mojom::InterfaceFactoryPtr interface_factory_ptr_; + + // Connections to the renderer. + mojo::BindingSet<media::mojom::InterfaceFactory> bindings_; + + THREAD_CHECKER(thread_checker_); + DISALLOW_COPY_AND_ASSIGN(VideoDecoderProxy); +}; + +} // namespace content + +#endif // CONTENT_BROWSER_MEDIA_VIDEO_DECODER_PROXY_H_
diff --git a/content/browser/net/reporting_service_proxy.cc b/content/browser/net/reporting_service_proxy.cc index 6f525514..d207fa4 100644 --- a/content/browser/net/reporting_service_proxy.cc +++ b/content/browser/net/reporting_service_proxy.cc
@@ -105,6 +105,25 @@ QueueReport(url, group, "csp", std::move(body)); } + void QueueFeaturePolicyViolationReport( + const GURL& url, + const std::string& policy, + const std::string& message, + const base::Optional<std::string>& source_file, + int line_number, + int column_number) override { + auto body = std::make_unique<base::DictionaryValue>(); + body->SetString("policy", policy); + body->SetString("message", message); + if (source_file) + body->SetString("sourceFile", *source_file); + if (line_number) + body->SetInteger("lineNumber", line_number); + if (column_number) + body->SetInteger("columnNumber", column_number); + QueueReport(url, "default", "feature-policy", std::move(body)); + } + private: void QueueReport(const GURL& url, const std::string& group,
diff --git a/content/browser/portal/portal.cc b/content/browser/portal/portal.cc new file mode 100644 index 0000000..b7cd4a9ca4 --- /dev/null +++ b/content/browser/portal/portal.cc
@@ -0,0 +1,46 @@ +// 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 "content/browser/portal/portal.h" + +#include "base/feature_list.h" +#include "base/memory/ptr_util.h" +#include "content/browser/frame_host/render_frame_host_impl.h" +#include "content/public/browser/web_contents.h" +#include "content/public/common/content_switches.h" +#include "mojo/public/cpp/bindings/strong_binding.h" +#include "third_party/blink/public/common/features.h" + +namespace content { + +Portal::Portal(RenderFrameHostImpl* owner_render_frame_host) + : WebContentsObserver( + WebContents::FromRenderFrameHost(owner_render_frame_host)), + owner_render_frame_host_(owner_render_frame_host) {} + +Portal::~Portal() {} + +// static +bool Portal::IsEnabled() { + return base::FeatureList::IsEnabled(blink::features::kPortals) || + base::CommandLine::ForCurrentProcess()->HasSwitch( + switches::kEnableExperimentalWebPlatformFeatures); +} + +// static +Portal* Portal::Create(RenderFrameHostImpl* owner_render_frame_host, + blink::mojom::PortalRequest request) { + auto portal_ptr = base::WrapUnique(new Portal(owner_render_frame_host)); + Portal* portal = portal_ptr.get(); + mojo::StrongBinding<blink::mojom::Portal>::Create(std::move(portal_ptr), + std::move(request)); + return portal; +} + +void Portal::RenderFrameDeleted(RenderFrameHost* render_frame_host) { + if (render_frame_host == owner_render_frame_host_) + owner_render_frame_host_ = nullptr; +} + +} // namespace content
diff --git a/content/browser/portal/portal.h b/content/browser/portal/portal.h new file mode 100644 index 0000000..5fe7aef --- /dev/null +++ b/content/browser/portal/portal.h
@@ -0,0 +1,41 @@ +// 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 CONTENT_BROWSER_PORTAL_PORTAL_H_ +#define CONTENT_BROWSER_PORTAL_PORTAL_H_ + +#include "content/public/browser/web_contents_observer.h" +#include "third_party/blink/public/mojom/portal/portal.mojom.h" + +namespace content { + +class RenderFrameHostImpl; + +// A Portal provides a way to embed a WebContents inside a frame in another +// WebContents. It also provides an API that the owning frame can interact with +// the portal WebContents. The portal can be activated, where the portal +// WebContents replaces the outer WebContents and inherit it as a new Portal. +// +// The Portal is owned by its mojo binding, so it is kept alive as long as the +// other end of the pipe (typically in the renderer) exists. +class Portal : public blink::mojom::Portal, public WebContentsObserver { + public: + ~Portal() override; + + static bool IsEnabled(); + static Portal* Create(RenderFrameHostImpl* owner_render_frame_host, + blink::mojom::PortalRequest request); + + // WebContentsObserver overrides. + void RenderFrameDeleted(RenderFrameHost* render_frame_host) override; + + private: + explicit Portal(RenderFrameHostImpl* owner_render_frame_host); + + RenderFrameHostImpl* owner_render_frame_host_; +}; + +} // namespace content + +#endif // CONTENT_BROWSER_PORTAL_PORTAL_H_
diff --git a/content/browser/portal/portal_unit_test.cc b/content/browser/portal/portal_unit_test.cc new file mode 100644 index 0000000..4f4aea46 --- /dev/null +++ b/content/browser/portal/portal_unit_test.cc
@@ -0,0 +1,35 @@ +// 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 "base/feature_list.h" +#include "base/test/scoped_feature_list.h" +#include "content/browser/portal/portal.h" +#include "content/test/test_render_frame_host.h" +#include "content/test/test_render_view_host.h" +#include "content/test/test_web_contents.h" +#include "services/service_manager/public/cpp/interface_provider.h" +#include "testing/gtest/include/gtest/gtest.h" +#include "third_party/blink/public/common/features.h" + +namespace content { + +class PortalUnitTest : public RenderViewHostImplTestHarness { + protected: + void SetUp() override { + scoped_feature_list_.InitAndEnableFeature(blink::features::kPortals); + RenderViewHostImplTestHarness::SetUp(); + } + + private: + base::test::ScopedFeatureList scoped_feature_list_; +}; + +TEST_F(PortalUnitTest, InterfaceExists) { + ASSERT_TRUE(base::FeatureList::IsEnabled(blink::features::kPortals)); + + ASSERT_TRUE(contents()->GetMainFrame()->binder_registry().CanBindInterface( + blink::mojom::Portal::Name_)); +} + +} // namespace content
diff --git a/content/browser/renderer_host/browser_compositor_view_mac.mm b/content/browser/renderer_host/browser_compositor_view_mac.mm index 9df94c2b..77bd199 100644 --- a/content/browser/renderer_host/browser_compositor_view_mac.mm +++ b/content/browser/renderer_host/browser_compositor_view_mac.mm
@@ -60,9 +60,7 @@ // content (otherwise this solid color will be flashed during navigation). root_layer_->SetColor(SK_ColorTRANSPARENT); delegated_frame_host_.reset(new DelegatedFrameHost( - frame_sink_id, this, - base::FeatureList::IsEnabled(features::kVizDisplayCompositor), - true /* should_register_frame_sink_id */)); + frame_sink_id, this, true /* should_register_frame_sink_id */)); SetRenderWidgetHostIsHidden(render_widget_host_is_hidden); SetNSViewAttachedToWindow(false);
diff --git a/content/browser/renderer_host/delegated_frame_host.cc b/content/browser/renderer_host/delegated_frame_host.cc index cbd2743..85efab95 100644 --- a/content/browser/renderer_host/delegated_frame_host.cc +++ b/content/browser/renderer_host/delegated_frame_host.cc
@@ -15,6 +15,7 @@ #include "base/trace_event/trace_event.h" #include "build/build_config.h" #include "cc/base/switches.h" +#include "components/viz/common/features.h" #include "components/viz/common/frame_sinks/copy_output_request.h" #include "components/viz/common/quads/compositor_frame.h" #include "components/viz/common/resources/single_release_callback.h" @@ -37,22 +38,22 @@ DelegatedFrameHost::DelegatedFrameHost(const viz::FrameSinkId& frame_sink_id, DelegatedFrameHostClient* client, - bool enable_viz, bool should_register_frame_sink_id) : frame_sink_id_(frame_sink_id), client_(client), - enable_viz_(enable_viz), + enable_viz_( + base::FeatureList::IsEnabled(features::kVizDisplayCompositor)), should_register_frame_sink_id_(should_register_frame_sink_id), + host_frame_sink_manager_(GetHostFrameSinkManager()), frame_evictor_(std::make_unique<viz::FrameEvictor>(this)) { ImageTransportFactory* factory = ImageTransportFactory::GetInstance(); factory->GetContextFactory()->AddObserver(this); - viz::HostFrameSinkManager* host_frame_sink_manager = - factory->GetContextFactoryPrivate()->GetHostFrameSinkManager(); - host_frame_sink_manager->RegisterFrameSinkId(frame_sink_id_, this); - host_frame_sink_manager->EnableSynchronizationReporting( + DCHECK(host_frame_sink_manager_); + host_frame_sink_manager_->RegisterFrameSinkId(frame_sink_id_, this); + host_frame_sink_manager_->EnableSynchronizationReporting( frame_sink_id_, "Compositing.MainFrameSynchronization.Duration"); - host_frame_sink_manager->SetFrameSinkDebugLabel(frame_sink_id_, - "DelegatedFrameHost"); + host_frame_sink_manager_->SetFrameSinkDebugLabel(frame_sink_id_, + "DelegatedFrameHost"); CreateCompositorFrameSinkSupport(); } @@ -62,10 +63,8 @@ factory->GetContextFactory()->RemoveObserver(this); ResetCompositorFrameSinkSupport(); - - viz::HostFrameSinkManager* host_frame_sink_manager = - factory->GetContextFactoryPrivate()->GetHostFrameSinkManager(); - host_frame_sink_manager->InvalidateFrameSinkId(frame_sink_id_); + DCHECK(host_frame_sink_manager_); + host_frame_sink_manager_->InvalidateFrameSinkId(frame_sink_id_); } void DelegatedFrameHost::WasShown( @@ -142,15 +141,14 @@ gfx::Vector2d(area.width(), area.height()), gfx::Vector2d(result_selection.width(), result_selection.height())); } - - GetHostFrameSinkManager()->RequestCopyOfOutput( + DCHECK(host_frame_sink_manager_); + host_frame_sink_manager_->RequestCopyOfOutput( viz::SurfaceId(frame_sink_id_, pending_local_surface_id_), std::move(request)); } bool DelegatedFrameHost::CanCopyFromCompositingSurface() const { - return (enable_viz_ || support_) && HasFallbackSurface() && - active_device_scale_factor_ != 0.f; + return HasFallbackSurface() && active_device_scale_factor_ != 0.f; } bool DelegatedFrameHost::TransformPointToLocalCoordSpaceLegacy( @@ -353,10 +351,8 @@ client_->DidReceiveFirstFrameAfterNavigation(); } } else { - ImageTransportFactory* factory = ImageTransportFactory::GetInstance(); - viz::HostFrameSinkManager* host_frame_sink_manager = - factory->GetContextFactoryPrivate()->GetHostFrameSinkManager(); - host_frame_sink_manager->DropTemporaryReference(surface_info.id()); + DCHECK(host_frame_sink_manager_); + host_frame_sink_manager_->DropTemporaryReference(surface_info.id()); return; } @@ -365,10 +361,8 @@ // surface either. Since we won't use the fallback surface, we drop the // temporary reference here to save resources. if (!HasPrimarySurface()) { - ImageTransportFactory* factory = ImageTransportFactory::GetInstance(); - viz::HostFrameSinkManager* host_frame_sink_manager = - factory->GetContextFactoryPrivate()->GetHostFrameSinkManager(); - host_frame_sink_manager->DropTemporaryReference(surface_info.id()); + DCHECK(host_frame_sink_manager_); + host_frame_sink_manager_->DropTemporaryReference(surface_info.id()); return; } @@ -416,7 +410,8 @@ if (!HasSavedFrame()) return; std::vector<viz::SurfaceId> surface_ids = {GetCurrentSurfaceId()}; - GetHostFrameSinkManager()->EvictSurfaces(surface_ids); + DCHECK(host_frame_sink_manager_); + host_frame_sink_manager_->EvictSurfaces(surface_ids); frame_evictor_->DiscardedFrame(); } @@ -502,11 +497,9 @@ DCHECK(!support_); constexpr bool is_root = false; constexpr bool needs_sync_points = true; - ImageTransportFactory* factory = ImageTransportFactory::GetInstance(); - support_ = factory->GetContextFactoryPrivate() - ->GetHostFrameSinkManager() - ->CreateCompositorFrameSinkSupport(this, frame_sink_id_, - is_root, needs_sync_points); + DCHECK(host_frame_sink_manager_); + support_ = host_frame_sink_manager_->CreateCompositorFrameSinkSupport( + this, frame_sink_id_, is_root, needs_sync_points); if (compositor_ && should_register_frame_sink_id_) compositor_->AddFrameSink(frame_sink_id_); if (needs_begin_frame_) @@ -533,9 +526,8 @@ } void DelegatedFrameHost::WindowTitleChanged(const std::string& title) { - auto* host_frame_sink_manager = GetHostFrameSinkManager(); - if (host_frame_sink_manager) - host_frame_sink_manager->SetFrameSinkDebugLabel(frame_sink_id_, title); + if (host_frame_sink_manager_) + host_frame_sink_manager_->SetFrameSinkDebugLabel(frame_sink_id_, title); } void DelegatedFrameHost::TakeFallbackContentFrom(DelegatedFrameHost* other) {
diff --git a/content/browser/renderer_host/delegated_frame_host.h b/content/browser/renderer_host/delegated_frame_host.h index d8f5261c..87b9b923 100644 --- a/content/browser/renderer_host/delegated_frame_host.h +++ b/content/browser/renderer_host/delegated_frame_host.h
@@ -73,7 +73,6 @@ // responsible for doing the appropriate [un]registration. DelegatedFrameHost(const viz::FrameSinkId& frame_sink_id, DelegatedFrameHostClient* client, - bool enable_viz, bool should_register_frame_sink_id); ~DelegatedFrameHost() override; @@ -239,6 +238,8 @@ // This is the last root background color from a swapped frame. SkColor background_color_; + viz::HostFrameSinkManager* const host_frame_sink_manager_; + // State for rendering into a Surface. std::unique_ptr<viz::CompositorFrameSinkSupport> support_;
diff --git a/content/browser/renderer_host/input/fling_controller_unittest.cc b/content/browser/renderer_host/input/fling_controller_unittest.cc index 7447a68..4c0a68fd 100644 --- a/content/browser/renderer_host/input/fling_controller_unittest.cc +++ b/content/browser/renderer_host/input/fling_controller_unittest.cc
@@ -429,7 +429,8 @@ EXPECT_GT(last_sent_gesture_.data.scroll_update.delta_x, 0.f); } -TEST_F(FlingControllerTest, GestureFlingWithNegativeTimeDelta) { +// TODO(https://crbug.com/836996): Timing-dependent flakes on some platforms. +TEST_F(FlingControllerTest, DISABLED_GestureFlingWithNegativeTimeDelta) { base::TimeTicks progress_time = base::TimeTicks::Now(); SimulateFlingStart(blink::kWebGestureDeviceTouchscreen, gfx::Vector2dF(1000, 0));
diff --git a/content/browser/renderer_host/input/fling_scheduler_android.cc b/content/browser/renderer_host/input/fling_scheduler_android.cc index 94ca5bf..c2e9684 100644 --- a/content/browser/renderer_host/input/fling_scheduler_android.cc +++ b/content/browser/renderer_host/input/fling_scheduler_android.cc
@@ -67,6 +67,13 @@ return host_->GetView()->GetNativeView()->GetWindowAndroid(); } +void FlingSchedulerAndroid::OnDetachCompositor() { + // Once the window's compositor has detached, we will no longer receive + // OnAnimate calls. Stop observing the window. + observed_window_->RemoveObserver(this); + observed_window_ = nullptr; +} + void FlingSchedulerAndroid::OnAnimate(base::TimeTicks frame_begin_time) { DCHECK(observed_window_); if (fling_controller_)
diff --git a/content/browser/renderer_host/input/fling_scheduler_android.h b/content/browser/renderer_host/input/fling_scheduler_android.h index eba6059..cbe1e6e1 100644 --- a/content/browser/renderer_host/input/fling_scheduler_android.h +++ b/content/browser/renderer_host/input/fling_scheduler_android.h
@@ -40,7 +40,7 @@ void OnCompositingDidCommit() override {} void OnRootWindowVisibilityChanged(bool visible) override {} void OnAttachCompositor() override {} - void OnDetachCompositor() override {} + void OnDetachCompositor() override; void OnAnimate(base::TimeTicks frame_begin_time) override; void OnActivityStopped() override {} void OnActivityStarted() override {}
diff --git a/content/browser/renderer_host/input/touch_action_filter.cc b/content/browser/renderer_host/input/touch_action_filter.cc index 658171df8..34ae74dd 100644 --- a/content/browser/renderer_host/input/touch_action_filter.cc +++ b/content/browser/renderer_host/input/touch_action_filter.cc
@@ -6,7 +6,6 @@ #include <math.h> -#include "base/debug/crash_logging.h" #include "base/debug/dump_without_crashing.h" #include "base/logging.h" #include "base/metrics/histogram_macros.h" @@ -42,9 +41,7 @@ allow_current_double_tap_event_(true), force_enable_zoom_(false) {} -TouchActionFilter::~TouchActionFilter() { - gesture_sequence_.clear(); -} +TouchActionFilter::~TouchActionFilter() {} FilterGestureEventResult TouchActionFilter::FilterGestureEvent( WebGestureEvent* gesture_event) { @@ -57,7 +54,6 @@ case WebInputEvent::kGestureScrollBegin: { DCHECK(!suppress_manipulation_events_); DCHECK(!touchscreen_scroll_in_progress_); - gesture_sequence_.append("GSB "); touchscreen_scroll_in_progress_ = true; // TODO(https://crbug.com/851644): Make sure the value is properly set. if (!scrolling_touch_action_.has_value()) @@ -103,7 +99,6 @@ break; case WebInputEvent::kGestureScrollEnd: - gesture_sequence_.clear(); DCHECK(touchscreen_scroll_in_progress_); touchscreen_scroll_in_progress_ = false; ReportGestureEventFiltered(suppress_manipulation_events_); @@ -155,13 +150,8 @@ SetTouchAction(cc::kTouchActionAuto); scrolling_touch_action_ = allowed_touch_action_; // TODO(https://crbug.com/851644): Make sure the value is properly set. - if (!scrolling_touch_action_.has_value()) { - static auto* crash_key = base::debug::AllocateCrashKeyString( - "touchaction-gestures", base::debug::CrashKeySize::Size256); - base::debug::SetCrashKeyString(crash_key, gesture_sequence_); - base::debug::DumpWithoutCrashing(); + if (!scrolling_touch_action_.has_value()) SetTouchAction(cc::kTouchActionAuto); - } DCHECK(!drop_current_tap_ending_event_); break; @@ -188,8 +178,6 @@ } void TouchActionFilter::OnSetTouchAction(cc::TouchAction touch_action) { - if (touch_action != cc::kTouchActionAuto) - gesture_sequence_.append("Set "); // TODO(https://crbug.com/849819): add a DCHECK for // |has_touch_event_handler_|. // For multiple fingers, we take the intersection of the touch actions for @@ -248,7 +236,6 @@ // their begin event(s) suppressed will be suppressed until the next // sequenceo. if (has_touch_event_handler_) { - gesture_sequence_.append("Reset "); allowed_touch_action_.reset(); white_listed_touch_action_.reset(); } else {
diff --git a/content/browser/renderer_host/input/touch_action_filter.h b/content/browser/renderer_host/input/touch_action_filter.h index 5b8b0e5..bbfb605 100644 --- a/content/browser/renderer_host/input/touch_action_filter.h +++ b/content/browser/renderer_host/input/touch_action_filter.h
@@ -113,8 +113,6 @@ // Whitelisted touch action received from the compositor. base::Optional<cc::TouchAction> white_listed_touch_action_; - std::string gesture_sequence_; - DISALLOW_COPY_AND_ASSIGN(TouchActionFilter); };
diff --git a/content/browser/renderer_host/input/touch_emulator.cc b/content/browser/renderer_host/input/touch_emulator.cc index bb6fb67..e5cfa600 100644 --- a/content/browser/renderer_host/input/touch_emulator.cc +++ b/content/browser/renderer_host/input/touch_emulator.cc
@@ -363,14 +363,7 @@ WebGestureEvent gesture_event = ui::CreateWebGestureEventFromGestureEventData(gesture); - if (!gesture_event.unique_touch_event_id) { - // TODO(wjmaclean): Find out why the local GestureProvider puts id=0 on - // kGestureShowPress. This is a problem for RWHIER as it will cause it to - // attempt to re-target the event. There must be a nicer solution than - // setting the id to -1. - DCHECK(gesture_event.GetType() == blink::WebInputEvent::kGestureShowPress); - gesture_event.unique_touch_event_id = -1; - } + DCHECK(gesture_event.unique_touch_event_id); switch (gesture_event.GetType()) { case WebInputEvent::kUndefined: @@ -528,11 +521,12 @@ WebGestureEvent TouchEmulator::GetPinchGestureEvent( WebInputEvent::Type type, - const WebInputEvent& original_event) { + const WebGestureEvent& original_event) { WebGestureEvent event(type, ModifiersWithoutMouseButtons(original_event), original_event.TimeStamp(), blink::kWebGestureDeviceTouchscreen); event.SetPositionInWidget(pinch_anchor_); + event.unique_touch_event_id = original_event.unique_touch_event_id; return event; }
diff --git a/content/browser/renderer_host/input/touch_emulator.h b/content/browser/renderer_host/input/touch_emulator.h index 3ff06e2..55fabad 100644 --- a/content/browser/renderer_host/input/touch_emulator.h +++ b/content/browser/renderer_host/input/touch_emulator.h
@@ -105,7 +105,7 @@ const gfx::PointF& pos_in_root); blink::WebGestureEvent GetPinchGestureEvent( blink::WebInputEvent::Type type, - const blink::WebInputEvent& original_event); + const blink::WebGestureEvent& original_event); // The following methods generate and pass gesture events to the renderer. void PinchBegin(const blink::WebGestureEvent& event);
diff --git a/content/browser/renderer_host/input/wheel_event_listener_browsertest.cc b/content/browser/renderer_host/input/wheel_event_listener_browsertest.cc new file mode 100644 index 0000000..d72cafc5 --- /dev/null +++ b/content/browser/renderer_host/input/wheel_event_listener_browsertest.cc
@@ -0,0 +1,135 @@ +// 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 "base/test/scoped_feature_list.h" +#include "content/browser/web_contents/web_contents_impl.h" +#include "content/public/common/content_features.h" +#include "content/public/test/browser_test_utils.h" +#include "content/public/test/content_browser_test.h" +#include "content/public/test/content_browser_test_utils.h" +#include "content/shell/browser/shell.h" +#include "third_party/blink/public/platform/web_input_event.h" + +using blink::WebInputEvent; + +namespace { + +const std::string kWheelEventListenerDataURL = R"HTML( + <!DOCTYPE html> + <meta name='viewport' content='width=device-width'/> + <style> + html, body { + margin: 0; + } + .spacer { height: 10000px; } + </style> + <div class=spacer></div> + <script> + window.addEventListener('wheel', () => { while (true); }); + document.title='ready'; + </script>)HTML"; + +const std::string kMouseWheelEventListenerDataURL = R"HTML( + <!DOCTYPE html> + <meta name='viewport' content='width=device-width'/> + <style> + html, body { + margin: 0; + } + .spacer { height: 10000px; } + </style> + <div class=spacer></div> + <script> + document.addEventListener('mousewheel', () => { while (true); }); + document.title='ready'; + </script>)HTML"; +} // namespace + +namespace content { + +class WheelEventListenerBrowserTest : public ContentBrowserTest { + public: + WheelEventListenerBrowserTest() { + feature_list_.InitWithFeatures( + {features::kPassiveDocumentWheelEventListeners}, {}); + } + ~WheelEventListenerBrowserTest() override {} + + protected: + RenderWidgetHostImpl* GetWidgetHost() { + return RenderWidgetHostImpl::From( + shell()->web_contents()->GetRenderViewHost()->GetWidget()); + } + + void LoadURL(const std::string& page_data) { + const GURL data_url("data:text/html," + page_data); + NavigateToURL(shell(), data_url); + + RenderWidgetHostImpl* host = GetWidgetHost(); + host->GetView()->SetSize(gfx::Size(400, 400)); + + base::string16 ready_title(base::ASCIIToUTF16("ready")); + TitleWatcher watcher(shell()->web_contents(), ready_title); + ignore_result(watcher.WaitAndGetTitle()); + + MainThreadFrameObserver main_thread_sync(host); + main_thread_sync.Wait(); + } + + void ScrollByMouseWheel() { + // Send a wheel event and wait for its ack. + auto wheel_msg_watcher = std::make_unique<InputMsgWatcher>( + GetWidgetHost(), blink::WebInputEvent::kMouseWheel); + double x = 10; + double y = 10; + blink::WebMouseWheelEvent wheel_event = + SyntheticWebMouseWheelEventBuilder::Build(x, y, x, y, -20, -20, 0, + true); + wheel_event.phase = blink::WebMouseWheelEvent::kPhaseBegan; + GetWidgetHost()->ForwardWheelEvent(wheel_event); + EXPECT_EQ(INPUT_EVENT_ACK_STATE_SET_NON_BLOCKING, + wheel_msg_watcher->WaitForAck()); + } + + void WaitForScroll() { + RenderFrameSubmissionObserver observer( + GetWidgetHost()->render_frame_metadata_provider()); + gfx::Vector2dF default_scroll_offset; + while (observer.LastRenderFrameMetadata() + .root_scroll_offset.value_or(default_scroll_offset) + .y() <= 0) { + observer.WaitForMetadataChange(); + } + } + + private: + base::test::ScopedFeatureList feature_list_; + DISALLOW_COPY_AND_ASSIGN(WheelEventListenerBrowserTest); +}; + +IN_PROC_BROWSER_TEST_F(WheelEventListenerBrowserTest, + DocumentWheelEventListenersPassiveByDefault) { + LoadURL(kWheelEventListenerDataURL); + + // Send a wheel event and wait for its ack. + ScrollByMouseWheel(); + + // Wait for the page to scroll, the test will timeout if the wheel event + // listener added to window is not treated as passive. + WaitForScroll(); +} + +IN_PROC_BROWSER_TEST_F(WheelEventListenerBrowserTest, + DocumentMouseWheelEventListenersPassiveByDefault) { + LoadURL(kMouseWheelEventListenerDataURL); + + // Send a wheel event and wait for its ack. + ScrollByMouseWheel(); + + // Wait for the page to scroll, the test will timeout if the mousewheel event + // listener added to document is not treated as passive. + WaitForScroll(); +} + +} // namespace content \ No newline at end of file
diff --git a/content/browser/renderer_host/media/media_stream_manager.cc b/content/browser/renderer_host/media/media_stream_manager.cc index 8d3adc64..f154de0 100644 --- a/content/browser/renderer_host/media/media_stream_manager.cc +++ b/content/browser/renderer_host/media/media_stream_manager.cc
@@ -1041,6 +1041,13 @@ devices.reserve(devices.size() + video_devices.size()); devices.insert(devices.end(), video_devices.begin(), video_devices.end()); + // We cannot select a display device without user action, therefore add a + // fake one for tests. + if (request->video_type() == MEDIA_DISPLAY_VIDEO_CAPTURE) { + DCHECK(devices.empty()); + devices.push_back(MediaStreamDevice(MEDIA_DISPLAY_VIDEO_CAPTURE, + "Fake id", "Fake name")); + } std::unique_ptr<FakeMediaStreamUIProxy> fake_ui = fake_ui_factory_.Run(); fake_ui->SetAvailableDevices(devices); @@ -1069,6 +1076,13 @@ request->controls.audio.stream_type)); request->SetVideoType(request->controls.video.stream_type); + const bool is_display_capture = + request->video_type() == MEDIA_DISPLAY_VIDEO_CAPTURE; + if (is_display_capture && !SetUpDisplayCaptureRequest(request)) { + FinalizeRequestFailed(label, request, MEDIA_DEVICE_SCREEN_CAPTURE_FAILURE); + return; + } + const bool is_tab_capture = request->audio_type() == MEDIA_GUM_TAB_AUDIO_CAPTURE || request->video_type() == MEDIA_GUM_TAB_VIDEO_CAPTURE; @@ -1086,7 +1100,7 @@ return; } - if (!is_tab_capture && !is_screen_capture) { + if (!is_tab_capture && !is_screen_capture && !is_display_capture) { if (IsDeviceMediaType(request->audio_type()) || IsDeviceMediaType(request->video_type())) { StartEnumeration(request, label); @@ -1102,6 +1116,26 @@ ReadOutputParamsAndPostRequestToUI(label, request, MediaDeviceEnumeration()); } +bool MediaStreamManager::SetUpDisplayCaptureRequest(DeviceRequest* request) { + DCHECK_CURRENTLY_ON(BrowserThread::IO); + DCHECK(request->video_type() == MEDIA_DISPLAY_VIDEO_CAPTURE); + + // getDisplayMedia function does not permit the use of constraints for + // selection of a source, see + // https://w3c.github.io/mediacapture-screen-share/#constraints. + if (!request->controls.video.requested || + !request->controls.video.device_id.empty()) { + LOG(ERROR) << "Invalid display media request."; + return false; + } + + request->CreateUIRequest(std::string() /* requested_audio_device_id */, + std::string() /* requested_video_device_id */); + DVLOG(3) << "Audio requested " << request->controls.audio.requested + << " Video requested " << request->controls.video.requested; + return true; +} + bool MediaStreamManager::SetUpDeviceCaptureRequest( DeviceRequest* request, const MediaDeviceEnumeration& enumeration) {
diff --git a/content/browser/renderer_host/media/media_stream_manager.h b/content/browser/renderer_host/media/media_stream_manager.h index 620965a4..2c0afba 100644 --- a/content/browser/renderer_host/media/media_stream_manager.h +++ b/content/browser/renderer_host/media/media_stream_manager.h
@@ -358,6 +358,8 @@ // StreamControls for requested device IDs. bool SetUpDeviceCaptureRequest(DeviceRequest* request, const MediaDeviceEnumeration& enumeration); + // Prepare |request| of type MEDIA_DISPLAY_CAPTURE. + bool SetUpDisplayCaptureRequest(DeviceRequest* request); // Prepare |request| of type MEDIA_GUM_DESKTOP_AUDIO_CAPTURE and/or // MEDIA_GUM_DESKTOP_VIDEO_CAPTURE for being posted to the UI by parsing // StreamControls for the requested desktop ID.
diff --git a/content/browser/renderer_host/media/media_stream_manager_unittest.cc b/content/browser/renderer_host/media/media_stream_manager_unittest.cc index f91261ce..fae5c3ca 100644 --- a/content/browser/renderer_host/media/media_stream_manager_unittest.cc +++ b/content/browser/renderer_host/media/media_stream_manager_unittest.cc
@@ -156,6 +156,20 @@ MediaObserver* media_observer_; }; +class MockMediaStreamUIProxy : public FakeMediaStreamUIProxy { + public: + MockMediaStreamUIProxy() + : FakeMediaStreamUIProxy(/*tests_use_fake_render_frame_hosts=*/true) {} + void RequestAccess(std::unique_ptr<MediaStreamRequest> request, + ResponseCallback response_callback) override { + MockRequestAccess(request, response_callback); + } + + MOCK_METHOD2(MockRequestAccess, + void(std::unique_ptr<MediaStreamRequest>& request, + ResponseCallback& response_callback)); +}; + } // namespace class MediaStreamManagerTest : public ::testing::Test { @@ -380,4 +394,90 @@ EXPECT_TRUE(base::IsAsciiDigit(c) || (c >= 'a' && c <= 'f')); } +TEST_F(MediaStreamManagerTest, GetDisplayMediaRequest) { + media_stream_manager_->UseFakeUIFactoryForTests(base::BindRepeating([]() { + return std::make_unique<FakeMediaStreamUIProxy>( + /*tests_use_fake_render_frame_hosts=*/true); + })); + + StreamControls controls(false /* request_audio */, true /* request_video */); + controls.video.stream_type = MEDIA_DISPLAY_VIDEO_CAPTURE; + const int render_process_id = 1; + const int render_frame_id = 1; + const int page_request_id = 1; + + MediaStreamDevice video_device; + MediaStreamManager::GenerateStreamCallback generate_stream_callback = + base::BindOnce( + [](base::RunLoop* wait_loop, MediaStreamDevice* video_device, + MediaStreamRequestResult result, const std::string& label, + const MediaStreamDevices& audio_devices, + const MediaStreamDevices& video_devices) { + EXPECT_EQ(0u, audio_devices.size()); + ASSERT_EQ(1u, video_devices.size()); + *video_device = video_devices[0]; + wait_loop->Quit(); + }, + &run_loop_, &video_device); + MediaStreamManager::DeviceStoppedCallback stopped_callback; + EXPECT_CALL(*media_observer_, OnMediaRequestStateChanged( + _, _, _, _, MEDIA_DISPLAY_VIDEO_CAPTURE, + MEDIA_REQUEST_STATE_PENDING_APPROVAL)); + EXPECT_CALL(*media_observer_, OnMediaRequestStateChanged( + _, _, _, _, MEDIA_DISPLAY_VIDEO_CAPTURE, + MEDIA_REQUEST_STATE_OPENING)); + EXPECT_CALL(*media_observer_, OnMediaRequestStateChanged( + _, _, _, _, MEDIA_DISPLAY_VIDEO_CAPTURE, + MEDIA_REQUEST_STATE_DONE)); + media_stream_manager_->GenerateStream( + render_process_id, render_frame_id, page_request_id, controls, + MediaDeviceSaltAndOrigin(), false /* user_gesture */, + std::move(generate_stream_callback), std::move(stopped_callback)); + run_loop_.Run(); + + EXPECT_EQ(MEDIA_DISPLAY_VIDEO_CAPTURE, video_device.type); + EXPECT_CALL(*media_observer_, OnMediaRequestStateChanged( + _, _, _, _, MEDIA_DISPLAY_VIDEO_CAPTURE, + MEDIA_REQUEST_STATE_CLOSING)); + media_stream_manager_->StopStreamDevice(render_process_id, render_frame_id, + video_device.id, + video_device.session_id); +} + +TEST_F(MediaStreamManagerTest, GetDisplayMediaRequestCallsUIProxy) { + media_stream_manager_->UseFakeUIFactoryForTests(base::BindRepeating( + [](base::RunLoop* run_loop) { + auto mock_ui = std::make_unique<MockMediaStreamUIProxy>(); + EXPECT_CALL(*mock_ui, MockRequestAccess(_, _)) + .WillOnce(testing::Invoke( + [run_loop](std::unique_ptr<MediaStreamRequest>& request, + testing::Unused) { + EXPECT_EQ(MEDIA_DISPLAY_VIDEO_CAPTURE, request->video_type); + run_loop->Quit(); + })); + return std::unique_ptr<FakeMediaStreamUIProxy>(std::move(mock_ui)); + }, + &run_loop_)); + StreamControls controls(false /* request_audio */, true /* request_video */); + controls.video.stream_type = MEDIA_DISPLAY_VIDEO_CAPTURE; + + MediaStreamManager::GenerateStreamCallback generate_stream_callback = + base::BindOnce([](MediaStreamRequestResult result, + const std::string& label, + const MediaStreamDevices& audio_devices, + const MediaStreamDevices& video_devices) {}); + EXPECT_CALL(*media_observer_, OnMediaRequestStateChanged( + _, _, _, _, MEDIA_DISPLAY_VIDEO_CAPTURE, + MEDIA_REQUEST_STATE_PENDING_APPROVAL)); + media_stream_manager_->GenerateStream( + 0, 0, 0, controls, MediaDeviceSaltAndOrigin(), false /* user_gesture */, + std::move(generate_stream_callback), + MediaStreamManager::DeviceStoppedCallback()); + run_loop_.Run(); + + EXPECT_CALL(*media_observer_, OnMediaRequestStateChanged(_, _, _, _, _, _)) + .Times(testing::AtLeast(1)); + media_stream_manager_->CancelAllRequests(0, 0); +} + } // namespace content
diff --git a/content/browser/renderer_host/pepper/pepper_file_io_host.cc b/content/browser/renderer_host/pepper/pepper_file_io_host.cc index a614f4f..1464188 100644 --- a/content/browser/renderer_host/pepper/pepper_file_io_host.cc +++ b/content/browser/renderer_host/pepper/pepper_file_io_host.cc
@@ -14,7 +14,6 @@ #include "content/browser/renderer_host/pepper/pepper_file_ref_host.h" #include "content/browser/renderer_host/pepper/pepper_file_system_browser_host.h" #include "content/browser/renderer_host/pepper/pepper_security_helper.h" -#include "content/common/fileapi/file_system_messages.h" #include "content/common/view_messages.h" #include "content/public/browser/browser_thread.h" #include "content/public/browser/content_browser_client.h"
diff --git a/content/browser/renderer_host/render_process_host_impl.cc b/content/browser/renderer_host/render_process_host_impl.cc index 166816c..c63ea22 100644 --- a/content/browser/renderer_host/render_process_host_impl.cc +++ b/content/browser/renderer_host/render_process_host_impl.cc
@@ -86,7 +86,7 @@ #include "content/browser/dom_storage/dom_storage_context_wrapper.h" #include "content/browser/dom_storage/dom_storage_message_filter.h" #include "content/browser/field_trial_recorder.h" -#include "content/browser/fileapi/fileapi_message_filter.h" +#include "content/browser/fileapi/file_system_manager_impl.h" #include "content/browser/font_unique_name_lookup/font_unique_name_lookup_service.h" #include "content/browser/frame_host/render_frame_message_filter.h" #include "content/browser/gpu/browser_gpu_client_delegate.h" @@ -1848,9 +1848,6 @@ #if BUILDFLAG(ENABLE_PLUGINS) AddFilter(new PepperRendererConnection(GetID())); #endif - AddFilter(new FileAPIMessageFilter( - GetID(), storage_partition_impl_->GetFileSystemContext(), - blob_storage_context.get())); AddFilter(new BlobDispatcherHost(GetID(), blob_storage_context)); #if defined(OS_MACOSX) AddFilter(new TextInputClientMessageFilter()); @@ -1991,6 +1988,13 @@ base::Bind(&PushMessagingManager::BindRequest, base::Unretained(push_messaging_manager_.get()))); + file_system_manager_impl_.reset(new FileSystemManagerImpl( + GetID(), storage_partition_impl_->GetFileSystemContext(), + ChromeBlobStorageContext::GetFor(GetBrowserContext()))); + registry->AddInterface( + base::BindRepeating(&FileSystemManagerImpl::BindRequest, + base::Unretained(file_system_manager_impl_.get()))); + if (gpu_client_) { // |gpu_client_| outlives the registry, because its destruction is posted to // IO thread from the destructor of |this|. @@ -2081,6 +2085,9 @@ AddUIThreadInterface(registry.get(), base::BindRepeating(&GetNetworkChangeManager)); + registry->AddInterface(base::BindRepeating( + &RenderProcessHostImpl::BindVideoDecoderService, base::Unretained(this))); + // ---- Please do not register interfaces below this line ------ // // This call should be done after registering all interfaces above, so that @@ -2163,6 +2170,13 @@ storage_partition_impl_->Bind(id_, std::move(request)); } +void RenderProcessHostImpl::BindVideoDecoderService( + media::mojom::InterfaceFactoryRequest request) { + if (!video_decoder_proxy_) + video_decoder_proxy_.reset(new VideoDecoderProxy()); + video_decoder_proxy_->Add(std::move(request)); +} + void RenderProcessHostImpl::CreateRendererHost( mojom::RendererHostAssociatedRequest request) { renderer_host_binding_.Bind(std::move(request));
diff --git a/content/browser/renderer_host/render_process_host_impl.h b/content/browser/renderer_host/render_process_host_impl.h index 607eefb..2396e76c 100644 --- a/content/browser/renderer_host/render_process_host_impl.h +++ b/content/browser/renderer_host/render_process_host_impl.h
@@ -28,6 +28,7 @@ #include "content/browser/cache_storage/cache_storage_dispatcher_host.h" #include "content/browser/child_process_launcher.h" #include "content/browser/dom_storage/session_storage_namespace_impl.h" +#include "content/browser/media/video_decoder_proxy.h" #include "content/browser/renderer_host/embedded_frame_sink_provider_impl.h" #include "content/browser/renderer_host/frame_sink_provider_impl.h" #include "content/browser/renderer_host/media/renderer_audio_output_stream_factory_context_impl.h" @@ -73,6 +74,7 @@ namespace content { class BrowserPluginMessageFilter; class ChildConnection; +class FileSystemManagerImpl; class GpuClientImpl; class IndexedDBDispatcherHost; class InProcessChildThreadParams; @@ -414,6 +416,10 @@ // before the process shuts down. void DelayProcessShutdownForUnload(const base::TimeDelta& timeout); + FileSystemManagerImpl* GetFileSystemManagerForTesting() { + return file_system_manager_impl_.get(); + } + protected: // A proxy for our IPC::Channel that lives on the IO thread. std::unique_ptr<IPC::ChannelProxy> channel_; @@ -490,6 +496,7 @@ void CreateStoragePartitionService( blink::mojom::StoragePartitionServiceRequest request); void CreateRendererHost(mojom::RendererHostAssociatedRequest request); + void BindVideoDecoderService(media::mojom::InterfaceFactoryRequest request); // Control message handlers. void OnUserMetricsRecordAction(const std::string& action); @@ -777,6 +784,8 @@ std::unique_ptr<MediaStreamTrackMetricsHost, BrowserThread::DeleteOnIOThread> media_stream_track_metrics_host_; + std::unique_ptr<VideoDecoderProxy> video_decoder_proxy_; + // Forwards messages between WebRTCInternals in the browser process // and PeerConnectionTracker in the renderer process. // It holds a raw pointer to webrtc_eventlog_host_, and therefore should be @@ -814,6 +823,8 @@ #endif scoped_refptr<ResourceMessageFilter> resource_message_filter_; + std::unique_ptr<FileSystemManagerImpl, BrowserThread::DeleteOnIOThread> + file_system_manager_impl_; std::unique_ptr<GpuClientImpl, BrowserThread::DeleteOnIOThread> gpu_client_; std::unique_ptr<PushMessagingManager, BrowserThread::DeleteOnIOThread> push_messaging_manager_;
diff --git a/content/browser/renderer_host/render_widget_host_delegate.h b/content/browser/renderer_host/render_widget_host_delegate.h index 2df71bf2..1f7c9b0 100644 --- a/content/browser/renderer_host/render_widget_host_delegate.h +++ b/content/browser/renderer_host/render_widget_host_delegate.h
@@ -138,7 +138,8 @@ #if defined(OS_MACOSX) virtual void DidChangeTextSelection(const base::string16& text, - const gfx::Range& range) {} + const gfx::Range& range, + size_t offset) {} #endif // Request the renderer to Move the caret to the new position.
diff --git a/content/browser/renderer_host/render_widget_host_view_aura.cc b/content/browser/renderer_host/render_widget_host_view_aura.cc index 881bb211..ecb3cda 100644 --- a/content/browser/renderer_host/render_widget_host_view_aura.cc +++ b/content/browser/renderer_host/render_widget_host_view_aura.cc
@@ -1940,10 +1940,8 @@ delegated_frame_host_client_ = std::make_unique<DelegatedFrameHostClientAura>(this); - const bool enable_viz = - base::FeatureList::IsEnabled(features::kVizDisplayCompositor); delegated_frame_host_ = std::make_unique<DelegatedFrameHost>( - frame_sink_id_, delegated_frame_host_client_.get(), enable_viz, + frame_sink_id_, delegated_frame_host_client_.get(), false /* should_register_frame_sink_id */); // Let the page-level input event router know about our surface ID
diff --git a/content/browser/renderer_host/render_widget_host_view_aura_unittest.cc b/content/browser/renderer_host/render_widget_host_view_aura_unittest.cc index 9a9492b..68888a5 100644 --- a/content/browser/renderer_host/render_widget_host_view_aura_unittest.cc +++ b/content/browser/renderer_host/render_widget_host_view_aura_unittest.cc
@@ -504,12 +504,10 @@ return; view->delegated_frame_host_client_ = std::move(delegated_frame_host_client); - const bool enable_viz = - base::FeatureList::IsEnabled(features::kVizDisplayCompositor); view->delegated_frame_host_ = nullptr; view->delegated_frame_host_ = std::make_unique<DelegatedFrameHost>( view->frame_sink_id_, view->delegated_frame_host_client_.get(), - enable_viz, false /* should_register_frame_sink_id */); + false /* should_register_frame_sink_id */); } FakeRenderWidgetHostViewAura* CreateView(bool is_guest_view_hack) {
diff --git a/content/browser/renderer_host/render_widget_host_view_base.cc b/content/browser/renderer_host/render_widget_host_view_base.cc index bb9aa275..1b55c4d6 100644 --- a/content/browser/renderer_host/render_widget_host_view_base.cc +++ b/content/browser/renderer_host/render_widget_host_view_base.cc
@@ -233,6 +233,12 @@ return GetTextInputManager()->GetTextSelection(this)->range(); } +size_t RenderWidgetHostViewBase::GetOffsetForSurroundingText() { + if (!GetTextInputManager()) + return 0; + return GetTextInputManager()->GetTextSelection(this)->offset(); +} + void RenderWidgetHostViewBase::SetBackgroundColor(SkColor color) { DCHECK(SkColorGetA(color) == SK_AlphaOPAQUE || SkColorGetA(color) == SK_AlphaTRANSPARENT);
diff --git a/content/browser/renderer_host/render_widget_host_view_base.h b/content/browser/renderer_host/render_widget_host_view_base.h index a8065f2..f73ac2a 100644 --- a/content/browser/renderer_host/render_widget_host_view_base.h +++ b/content/browser/renderer_host/render_widget_host_view_base.h
@@ -117,6 +117,7 @@ base::string16 GetSelectedText() override; base::string16 GetSurroundingText() override; gfx::Range GetSelectedRange() override; + size_t GetOffsetForSurroundingText() override; bool IsMouseLocked() override; bool LockKeyboard(base::Optional<base::flat_set<ui::DomCode>> codes) override; void SetBackgroundColor(SkColor color) 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 ad6e2ffb..b12b3c3 100644 --- a/content/browser/renderer_host/render_widget_host_view_mac.mm +++ b/content/browser/renderer_host/render_widget_host_view_mac.mm
@@ -592,8 +592,8 @@ ns_view_bridge_->SetTextSelection(selection->text(), selection->offset(), selection->range()); if (host() && host()->delegate()) - host()->delegate()->DidChangeTextSelection(selection->text(), - selection->range()); + host()->delegate()->DidChangeTextSelection( + selection->text(), selection->range(), selection->offset()); } bool RenderWidgetHostViewMac::ShouldWaitInPreCommit() {
diff --git a/content/browser/renderer_host/render_widget_host_view_mac_unittest.mm b/content/browser/renderer_host/render_widget_host_view_mac_unittest.mm index 393a084..8e31ddd 100644 --- a/content/browser/renderer_host/render_widget_host_view_mac_unittest.mm +++ b/content/browser/renderer_host/render_widget_host_view_mac_unittest.mm
@@ -382,8 +382,6 @@ base::test::ScopedFeatureList feature_list; feature_list.InitAndEnableFeature(features::kDirectManipulationStylus); - gpu::ImageTransportSurface::SetAllowOSMesaForTesting(true); - browser_context_ = std::make_unique<TestBrowserContext>(); process_host_ = std::make_unique<MockRenderProcessHost>(browser_context_.get());
diff --git a/content/browser/service_manager/service_manager_context.cc b/content/browser/service_manager/service_manager_context.cc index 9a1a106..db3fc34 100644 --- a/content/browser/service_manager/service_manager_context.cc +++ b/content/browser/service_manager/service_manager_context.cc
@@ -298,7 +298,7 @@ bool ShouldEnableVizService() { #if defined(USE_AURA) // aura::Env can be null in tests. - return aura::Env::GetInstanceDontCreate() && + return aura::Env::HasInstance() && aura::Env::GetInstance()->mode() == aura::Env::Mode::MUS; #else return false;
diff --git a/content/browser/service_worker/embedded_worker_test_helper.cc b/content/browser/service_worker/embedded_worker_test_helper.cc index 3983e51..cfbe281 100644 --- a/content/browser/service_worker/embedded_worker_test_helper.cc +++ b/content/browser/service_worker/embedded_worker_test_helper.cc
@@ -215,21 +215,20 @@ void DispatchBackgroundFetchAbortEvent( const std::string& developer_id, const std::string& unique_id, - const std::vector<BackgroundFetchSettledFetch>& fetches, DispatchBackgroundFetchAbortEventCallback callback) override { if (!helper_) return; - helper_->OnBackgroundFetchAbortEventStub(developer_id, unique_id, fetches, + helper_->OnBackgroundFetchAbortEventStub(developer_id, unique_id, std::move(callback)); } void DispatchBackgroundFetchClickEvent( const std::string& developer_id, - mojom::BackgroundFetchState state, + const std::string& unique_id, DispatchBackgroundFetchClickEventCallback callback) override { if (!helper_) return; - helper_->OnBackgroundFetchClickEventStub(developer_id, state, + helper_->OnBackgroundFetchClickEventStub(developer_id, unique_id, std::move(callback)); } @@ -244,15 +243,15 @@ std::move(callback)); } - void DispatchBackgroundFetchedEvent( + void DispatchBackgroundFetchSuccessEvent( const std::string& developer_id, const std::string& unique_id, const std::vector<BackgroundFetchSettledFetch>& fetches, - DispatchBackgroundFetchedEventCallback callback) override { + DispatchBackgroundFetchSuccessEventCallback callback) override { if (!helper_) return; - helper_->OnBackgroundFetchedEventStub(developer_id, unique_id, fetches, - std::move(callback)); + helper_->OnBackgroundFetchSuccessEventStub(developer_id, unique_id, fetches, + std::move(callback)); } void DispatchCookieChangeEvent( @@ -598,7 +597,6 @@ void EmbeddedWorkerTestHelper::OnBackgroundFetchAbortEvent( const std::string& developer_id, const std::string& unique_id, - const std::vector<BackgroundFetchSettledFetch>& fetches, mojom::ServiceWorker::DispatchBackgroundFetchAbortEventCallback callback) { std::move(callback).Run(blink::mojom::ServiceWorkerEventStatus::COMPLETED, base::Time::Now()); @@ -606,7 +604,7 @@ void EmbeddedWorkerTestHelper::OnBackgroundFetchClickEvent( const std::string& developer_id, - mojom::BackgroundFetchState state, + const std::string& unique_id, mojom::ServiceWorker::DispatchBackgroundFetchClickEventCallback callback) { std::move(callback).Run(blink::mojom::ServiceWorkerEventStatus::COMPLETED, base::Time::Now()); @@ -621,11 +619,12 @@ base::Time::Now()); } -void EmbeddedWorkerTestHelper::OnBackgroundFetchedEvent( +void EmbeddedWorkerTestHelper::OnBackgroundFetchSuccessEvent( const std::string& developer_id, const std::string& unique_id, const std::vector<BackgroundFetchSettledFetch>& fetches, - mojom::ServiceWorker::DispatchBackgroundFetchedEventCallback callback) { + mojom::ServiceWorker::DispatchBackgroundFetchSuccessEventCallback + callback) { std::move(callback).Run(blink::mojom::ServiceWorkerEventStatus::COMPLETED, base::Time::Now()); } @@ -875,23 +874,23 @@ void EmbeddedWorkerTestHelper::OnBackgroundFetchAbortEventStub( const std::string& developer_id, const std::string& unique_id, - const std::vector<BackgroundFetchSettledFetch>& fetches, mojom::ServiceWorker::DispatchBackgroundFetchAbortEventCallback callback) { base::ThreadTaskRunnerHandle::Get()->PostTask( FROM_HERE, base::BindOnce(&EmbeddedWorkerTestHelper::OnBackgroundFetchAbortEvent, - AsWeakPtr(), developer_id, unique_id, fetches, + AsWeakPtr(), developer_id, unique_id, std::move(callback))); } void EmbeddedWorkerTestHelper::OnBackgroundFetchClickEventStub( const std::string& developer_id, - mojom::BackgroundFetchState state, + const std::string& unique_id, mojom::ServiceWorker::DispatchBackgroundFetchClickEventCallback callback) { base::ThreadTaskRunnerHandle::Get()->PostTask( FROM_HERE, base::BindOnce(&EmbeddedWorkerTestHelper::OnBackgroundFetchClickEvent, - AsWeakPtr(), developer_id, state, std::move(callback))); + AsWeakPtr(), developer_id, unique_id, + std::move(callback))); } void EmbeddedWorkerTestHelper::OnBackgroundFetchFailEventStub( @@ -906,14 +905,15 @@ std::move(callback))); } -void EmbeddedWorkerTestHelper::OnBackgroundFetchedEventStub( +void EmbeddedWorkerTestHelper::OnBackgroundFetchSuccessEventStub( const std::string& developer_id, const std::string& unique_id, const std::vector<BackgroundFetchSettledFetch>& fetches, - mojom::ServiceWorker::DispatchBackgroundFetchedEventCallback callback) { + mojom::ServiceWorker::DispatchBackgroundFetchSuccessEventCallback + callback) { base::ThreadTaskRunnerHandle::Get()->PostTask( FROM_HERE, - base::BindOnce(&EmbeddedWorkerTestHelper::OnBackgroundFetchedEvent, + base::BindOnce(&EmbeddedWorkerTestHelper::OnBackgroundFetchSuccessEvent, AsWeakPtr(), developer_id, unique_id, fetches, std::move(callback))); }
diff --git a/content/browser/service_worker/embedded_worker_test_helper.h b/content/browser/service_worker/embedded_worker_test_helper.h index f8d5017..dd40218 100644 --- a/content/browser/service_worker/embedded_worker_test_helper.h +++ b/content/browser/service_worker/embedded_worker_test_helper.h
@@ -169,22 +169,22 @@ virtual void OnBackgroundFetchAbortEvent( const std::string& developer_id, const std::string& unique_id, - const std::vector<BackgroundFetchSettledFetch>& fetches, mojom::ServiceWorker::DispatchBackgroundFetchAbortEventCallback callback); virtual void OnBackgroundFetchClickEvent( const std::string& developer_id, - mojom::BackgroundFetchState state, + const std::string& unique_id, mojom::ServiceWorker::DispatchBackgroundFetchClickEventCallback callback); virtual void OnBackgroundFetchFailEvent( const std::string& developer_id, const std::string& unique_id, const std::vector<BackgroundFetchSettledFetch>& fetches, mojom::ServiceWorker::DispatchBackgroundFetchFailEventCallback callback); - virtual void OnBackgroundFetchedEvent( + virtual void OnBackgroundFetchSuccessEvent( const std::string& developer_id, const std::string& unique_id, const std::vector<BackgroundFetchSettledFetch>& fetches, - mojom::ServiceWorker::DispatchBackgroundFetchedEventCallback callback); + mojom::ServiceWorker::DispatchBackgroundFetchSuccessEventCallback + callback); virtual void OnCookieChangeEvent( const net::CanonicalCookie& cookie, ::network::mojom::CookieChangeCause cause, @@ -269,22 +269,22 @@ void OnBackgroundFetchAbortEventStub( const std::string& developer_id, const std::string& unique_id, - const std::vector<BackgroundFetchSettledFetch>& fetches, mojom::ServiceWorker::DispatchBackgroundFetchAbortEventCallback callback); void OnBackgroundFetchClickEventStub( const std::string& developer_id, - mojom::BackgroundFetchState state, + const std::string& unique_id, mojom::ServiceWorker::DispatchBackgroundFetchClickEventCallback callback); void OnBackgroundFetchFailEventStub( const std::string& developer_id, const std::string& unique_id, const std::vector<BackgroundFetchSettledFetch>& fetches, mojom::ServiceWorker::DispatchBackgroundFetchFailEventCallback callback); - void OnBackgroundFetchedEventStub( + void OnBackgroundFetchSuccessEventStub( const std::string& developer_id, const std::string& unique_id, const std::vector<BackgroundFetchSettledFetch>& fetches, - mojom::ServiceWorker::DispatchBackgroundFetchedEventCallback callback); + mojom::ServiceWorker::DispatchBackgroundFetchSuccessEventCallback + callback); void OnCookieChangeEventStub( const net::CanonicalCookie& cookie, ::network::mojom::CookieChangeCause cause,
diff --git a/content/browser/service_worker/service_worker_context_request_handler.cc b/content/browser/service_worker/service_worker_context_request_handler.cc index 1fcb4c80..1570948 100644 --- a/content/browser/service_worker/service_worker_context_request_handler.cc +++ b/content/browser/service_worker/service_worker_context_request_handler.cc
@@ -67,8 +67,6 @@ return "ERROR_UNINSTALLED_SCRIPT_IMPORT"; case CreateJobStatus::ERROR_OUT_OF_RESOURCE_IDS: return "ERROR_OUT_OF_RESOURCE_IDS"; - case CreateJobStatus::NUM_TYPES: - NOTREACHED(); } NOTREACHED() << static_cast<int>(status); return "UNKNOWN";
diff --git a/content/browser/service_worker/service_worker_context_request_handler.h b/content/browser/service_worker/service_worker_context_request_handler.h index 26bf3869..4c9fa5c 100644 --- a/content/browser/service_worker/service_worker_context_request_handler.h +++ b/content/browser/service_worker/service_worker_context_request_handler.h
@@ -51,7 +51,7 @@ ERROR_OUT_OF_RESOURCE_IDS, // Add new types here. - NUM_TYPES + kMaxValue = ERROR_OUT_OF_RESOURCE_IDS, }; ServiceWorkerContextRequestHandler(
diff --git a/content/browser/service_worker/service_worker_metrics.cc b/content/browser/service_worker/service_worker_metrics.cc index 39644f8..19d807e0 100644 --- a/content/browser/service_worker/service_worker_metrics.cc +++ b/content/browser/service_worker/service_worker_metrics.cc
@@ -9,6 +9,7 @@ #include "base/metrics/histogram_functions.h" #include "base/metrics/histogram_macros.h" +#include "base/strings/strcat.h" #include "base/strings/string_util.h" #include "base/time/time.h" #include "content/browser/service_worker/embedded_worker_status.h" @@ -22,7 +23,7 @@ namespace { -std::string StartSituationToSuffix( +const char* StartSituationToSuffix( ServiceWorkerMetrics::StartSituation situation) { // Don't change these returned strings. They are written (in hashed form) into // logs. @@ -44,18 +45,28 @@ } // TODO(falken): Remove this when the associated UMA are removed. -std::string StartSituationToDeprecatedSuffix( +const char* StartSituationToDeprecatedSuffix( ServiceWorkerMetrics::StartSituation situation) { // Don't change this returned string. It is written (in hashed form) into // logs. - std::string suffix = StartSituationToSuffix(situation); - // Replace '.' separator with '_'. - DCHECK(suffix.length() > 1 && suffix[0] == '.'); - suffix[0] = '_'; - return suffix; + switch (situation) { + case ServiceWorkerMetrics::StartSituation::UNKNOWN: + NOTREACHED(); + return "_Unknown"; + case ServiceWorkerMetrics::StartSituation::DURING_STARTUP: + return "_DuringStartup"; + case ServiceWorkerMetrics::StartSituation::NEW_PROCESS: + return "_NewProcess"; + case ServiceWorkerMetrics::StartSituation::EXISTING_UNREADY_PROCESS: + return "_ExistingUnreadyProcess"; + case ServiceWorkerMetrics::StartSituation::EXISTING_READY_PROCESS: + return "_ExistingReadyProcess"; + } + NOTREACHED() << static_cast<int>(situation); + return "_Unknown"; } -std::string EventTypeToSuffix(ServiceWorkerMetrics::EventType event_type) { +const char* EventTypeToSuffix(ServiceWorkerMetrics::EventType event_type) { // Don't change these returned strings. They are written (in hashed form) into // logs. switch (event_type) { @@ -99,8 +110,6 @@ return "_BACKGROUND_FETCH_CLICK"; case ServiceWorkerMetrics::EventType::BACKGROUND_FETCH_FAIL: return "_BACKGROUND_FETCH_FAIL"; - case ServiceWorkerMetrics::EventType::BACKGROUND_FETCHED: - return "_BACKGROUND_FETCHED"; case ServiceWorkerMetrics::EventType::NAVIGATION_HINT: return "_NAVIGATION_HINT"; case ServiceWorkerMetrics::EventType::CAN_MAKE_PAYMENT: @@ -111,8 +120,8 @@ return "_COOKIE_CHANGE"; case ServiceWorkerMetrics::EventType::LONG_RUNNING_MESSAGE: return "_LONG_RUNNING_MESSAGE"; - case ServiceWorkerMetrics::EventType::NUM_TYPES: - NOTREACHED() << static_cast<int>(event_type); + case ServiceWorkerMetrics::EventType::BACKGROUND_FETCH_SUCCESS: + return "_BACKGROUND_FETCH_SUCCESS"; } return "_UNKNOWN"; } @@ -149,12 +158,11 @@ return Preparation::UNKNOWN; } -std::string GetWorkerPreparationSuffix( +const char* GetWorkerPreparationSuffix( ServiceWorkerMetrics::WorkerPreparationType status) { using Preparation = ServiceWorkerMetrics::WorkerPreparationType; switch (status) { case Preparation::UNKNOWN: - case Preparation::NUM_TYPES: break; case Preparation::START_DURING_STARTUP: return "_StartWorkerDuringStartup"; @@ -175,44 +183,6 @@ return "_UNKNOWN"; } -// Use this for histograms with dynamically generated names, which -// otherwise can't use the UMA_HISTOGRAM macro without code duplication. -void RecordSuffixedTimeHistogram(const std::string& name, - const std::string& suffix, - base::TimeDelta sample) { - const std::string name_with_suffix = name + suffix; - // This unrolls UMA_HISTOGRAM_TIMES. - base::HistogramBase* histogram_pointer = base::Histogram::FactoryTimeGet( - name_with_suffix, base::TimeDelta::FromMilliseconds(1), - base::TimeDelta::FromSeconds(10), 50, - base::HistogramBase::kUmaTargetedHistogramFlag); - histogram_pointer->AddTime(sample); -} - -// Use this for histograms with dynamically generated names, which -// otherwise can't use the UMA_MEDIUM_HISTOGRAM macro without code duplication. -void RecordSuffixedMediumTimeHistogram(const std::string& name, - const std::string& suffix, - base::TimeDelta sample) { - const std::string name_with_suffix = name + suffix; - // This unrolls UMA_HISTOGRAM_MEDIUM_TIMES. - base::HistogramBase* histogram_pointer = base::Histogram::FactoryTimeGet( - name_with_suffix, base::TimeDelta::FromMilliseconds(10), - base::TimeDelta::FromMinutes(3), 50, - base::HistogramBase::kUmaTargetedHistogramFlag); - histogram_pointer->AddTime(sample); -} - -// Use this for histograms with dynamically generated names, which -// otherwise can't use the UMA_HISTOGRAM macro without code duplication. -void RecordHistogramEnum(const std::string& name, int value, int max_value) { - // This unrolls UMA_HISTOGRAM_ENUMERATION. - base::HistogramBase* histogram_pointer = base::LinearHistogram::FactoryGet( - name, 1, max_value, max_value + 1, - base::HistogramBase::kUmaTargetedHistogramFlag); - histogram_pointer->Add(value); -} - void RecordURLMetricOnUI(const std::string& metric_name, const GURL& url) { DCHECK_CURRENTLY_ON(BrowserThread::UI); GetContentClient()->browser()->RecordURLMetric(metric_name, url); @@ -279,8 +249,6 @@ return "Background Fetch Click"; case EventType::BACKGROUND_FETCH_FAIL: return "Background Fetch Fail"; - case EventType::BACKGROUND_FETCHED: - return "Background Fetched"; case EventType::NAVIGATION_HINT: return "Navigation Hint"; case EventType::CAN_MAKE_PAYMENT: @@ -291,8 +259,8 @@ return "Cookie Change"; case EventType::LONG_RUNNING_MESSAGE: return "Long Running Message"; - case EventType::NUM_TYPES: - break; + case EventType::BACKGROUND_FETCH_SUCCESS: + return "Background Fetch Success"; } NOTREACHED() << "Got unexpected event type: " << static_cast<int>(event_type); return "error"; @@ -333,7 +301,7 @@ return ServiceWorkerMetrics::Site::NEW_TAB_PAGE; } - const std::string host = url.host(); + const base::StringPiece host = url.host_piece(); if (host == "plus.google.com") return ServiceWorkerMetrics::Site::PLUS; if (host == "inbox.google.com") @@ -407,12 +375,9 @@ const GURL& url, bool is_main_frame_load) { DCHECK_NE(site, Site::OTHER); - UMA_HISTOGRAM_ENUMERATION("ServiceWorker.PageLoad", static_cast<int>(site), - static_cast<int>(Site::NUM_TYPES)); + UMA_HISTOGRAM_ENUMERATION("ServiceWorker.PageLoad", site); if (is_main_frame_load) { - UMA_HISTOGRAM_ENUMERATION("ServiceWorker.MainFramePageLoad", - static_cast<int>(site), - static_cast<int>(Site::NUM_TYPES)); + UMA_HISTOGRAM_ENUMERATION("ServiceWorker.MainFramePageLoad", site); } if (ShouldExcludeSiteFromHistogram(site)) return; @@ -433,16 +398,14 @@ } UMA_HISTOGRAM_ENUMERATION("ServiceWorker.StartWorker.Status", status); - RecordHistogramEnum( - std::string("ServiceWorker.StartWorker.StatusByPurpose") + - EventTypeToSuffix(purpose), - static_cast<uint32_t>(status), - static_cast<uint32_t>(blink::ServiceWorkerStatusCode::kMaxValue)); - UMA_HISTOGRAM_ENUMERATION("ServiceWorker.StartWorker.Purpose", purpose, - EventType::NUM_TYPES); + base::UmaHistogramEnumeration( + base::StrCat({"ServiceWorker.StartWorker.StatusByPurpose", + EventTypeToSuffix(purpose)}), + status); + UMA_HISTOGRAM_ENUMERATION("ServiceWorker.StartWorker.Purpose", purpose); if (status == blink::ServiceWorkerStatusCode::kErrorTimeout) { UMA_HISTOGRAM_ENUMERATION("ServiceWorker.StartWorker.Timeout.StartPurpose", - purpose, EventType::NUM_TYPES); + purpose); } } @@ -459,13 +422,14 @@ EventType purpose) { if (is_installed) { UMA_HISTOGRAM_MEDIUM_TIMES("ServiceWorker.StartWorker.Time", time); - RecordSuffixedMediumTimeHistogram( - "ServiceWorker.StartWorker.Time", - StartSituationToDeprecatedSuffix(start_situation), time); - RecordSuffixedMediumTimeHistogram( - "ServiceWorker.StartWorker.Time", - StartSituationToDeprecatedSuffix(start_situation) + - EventTypeToSuffix(purpose), + base::UmaHistogramMediumTimes( + base::StrCat({"ServiceWorker.StartWorker.Time", + StartSituationToDeprecatedSuffix(start_situation)}), + time); + base::UmaHistogramMediumTimes( + base::StrCat({"ServiceWorker.StartWorker.Time", + StartSituationToDeprecatedSuffix(start_situation), + EventTypeToSuffix(purpose)}), time); } else { UMA_HISTOGRAM_MEDIUM_TIMES("ServiceWorker.StartNewWorker.Time", time); @@ -482,18 +446,15 @@ WorkerPreparationType preparation = GetWorkerPreparationType(initial_worker_status, start_situation); UMA_HISTOGRAM_ENUMERATION( - "ServiceWorker.ActivatedWorkerPreparationForMainFrame.Type", - static_cast<int>(preparation), - static_cast<int>(WorkerPreparationType::NUM_TYPES)); + "ServiceWorker.ActivatedWorkerPreparationForMainFrame.Type", preparation); std::string suffix = GetContentClient()->browser()->GetMetricSuffixForURL(url); if (!suffix.empty()) { - RecordHistogramEnum( - std::string( - "ServiceWorker.ActivatedWorkerPreparationForMainFrame.Type.") + - suffix, - static_cast<int>(preparation), - static_cast<int>(WorkerPreparationType::NUM_TYPES) - 1); + base::UmaHistogramEnumeration( + base::StrCat( + {"ServiceWorker.ActivatedWorkerPreparationForMainFrame.Type.", + suffix}), + preparation); } if (did_navigation_preload) { @@ -505,8 +466,7 @@ UMA_HISTOGRAM_ENUMERATION( "ServiceWorker.ActivatedWorkerPreparationForMainFrame.Type_" "NavigationPreloadEnabled", - static_cast<int>(preparation), - static_cast<int>(WorkerPreparationType::NUM_TYPES)); + preparation); } // Don't record .Time if S13nServiceWorker is enabled. @@ -519,9 +479,10 @@ "ServiceWorker.ActivatedWorkerPreparationForMainFrame.Time", time); // Record the preparation time using the worker preparation suffix. - RecordSuffixedMediumTimeHistogram( - "ServiceWorker.ActivatedWorkerPreparationForMainFrame.Time", - GetWorkerPreparationSuffix(preparation), time); + base::UmaHistogramMediumTimes( + base::StrCat({"ServiceWorker.ActivatedWorkerPreparationForMainFrame.Time", + GetWorkerPreparationSuffix(preparation)}), + time); // Record the preparation time using the navigation preload suffix. if (did_navigation_preload) { @@ -540,9 +501,7 @@ } void ServiceWorkerMetrics::RecordWorkerStopped(StopStatus status) { - UMA_HISTOGRAM_ENUMERATION("ServiceWorker.WorkerStopped", - static_cast<int>(status), - static_cast<int>(StopStatus::NUM_TYPES)); + UMA_HISTOGRAM_ENUMERATION("ServiceWorker.WorkerStopped", status); } void ServiceWorkerMetrics::RecordStopWorkerTime(base::TimeDelta time) { @@ -569,15 +528,14 @@ void ServiceWorkerMetrics::RecordEventDispatchingDelay(EventType event_type, base::TimeDelta time) { - const std::string name = "ServiceWorker.EventDispatchingDelay"; - UMA_HISTOGRAM_TIMES(name, time); - RecordSuffixedTimeHistogram(name, EventTypeToSuffix(event_type), time); + static constexpr char kName[] = "ServiceWorker.EventDispatchingDelay"; + UMA_HISTOGRAM_TIMES(kName, time); + base::UmaHistogramTimes(base::StrCat({kName, EventTypeToSuffix(event_type)}), + time); } void ServiceWorkerMetrics::RecordEventTimeout(EventType event) { - UMA_HISTOGRAM_ENUMERATION("ServiceWorker.RequestTimeouts.Count", - static_cast<int>(event), - static_cast<int>(EventType::NUM_TYPES)); + UMA_HISTOGRAM_ENUMERATION("ServiceWorker.RequestTimeouts.Count", event); } void ServiceWorkerMetrics::RecordEventDuration(EventType event, @@ -657,9 +615,9 @@ UMA_HISTOGRAM_MEDIUM_TIMES("ServiceWorker.BackgroundFetchFailEvent.Time", time); break; - case EventType::BACKGROUND_FETCHED: - UMA_HISTOGRAM_MEDIUM_TIMES("ServiceWorker.BackgroundFetchedEvent.Time", - time); + case EventType::BACKGROUND_FETCH_SUCCESS: + UMA_HISTOGRAM_MEDIUM_TIMES( + "ServiceWorker.BackgroundFetchSuccessEvent.Time", time); break; case EventType::CAN_MAKE_PAYMENT: UMA_HISTOGRAM_MEDIUM_TIMES("ServiceWorker.CanMakePaymentEvent.Time", @@ -679,7 +637,6 @@ case EventType::NAVIGATION_HINT: // The navigation hint should not be sent as an event. case EventType::UNKNOWN: - case EventType::NUM_TYPES: NOTREACHED() << "Invalid event type"; break; } @@ -751,9 +708,10 @@ // Total duration. UMA_HISTOGRAM_MEDIUM_TIMES("ServiceWorker.StartTiming.Duration", times.local_end - times.local_start); - RecordSuffixedMediumTimeHistogram("ServiceWorker.StartTiming.Duration", - StartSituationToSuffix(situation), - times.local_end - times.local_start); + base::UmaHistogramMediumTimes( + base::StrCat({"ServiceWorker.StartTiming.Duration", + StartSituationToSuffix(situation)}), + times.local_end - times.local_start); // SentStartWorker milestone. UMA_HISTOGRAM_MEDIUM_TIMES("ServiceWorker.StartTiming.StartToSentStartWorker", @@ -793,8 +751,7 @@ void ServiceWorkerMetrics::RecordStartWorkerTimingClockConsistency( CrossProcessTimeDelta type) { - UMA_HISTOGRAM_ENUMERATION("ServiceWorker.StartTiming.ClockConsistency", type, - CrossProcessTimeDelta::NUM_TYPES); + UMA_HISTOGRAM_ENUMERATION("ServiceWorker.StartTiming.ClockConsistency", type); } void ServiceWorkerMetrics::RecordStartStatusAfterFailure( @@ -856,8 +813,7 @@ GetWorkerPreparationType(initial_worker_status, start_situation); UMA_HISTOGRAM_ENUMERATION( - "ServiceWorker.NavPreload.WorkerPreparationType_MainFrame", preparation, - WorkerPreparationType::NUM_TYPES); + "ServiceWorker.NavPreload.WorkerPreparationType_MainFrame", preparation); UMA_HISTOGRAM_MEDIUM_TIMES("ServiceWorker.NavPreload.ResponseTime_MainFrame", response_start); UMA_HISTOGRAM_BOOLEAN("ServiceWorker.NavPreload.FinishedFirst_MainFrame", @@ -895,31 +851,28 @@ ServiceWorkerContextRequestHandler::CreateJobStatus status, bool is_installed, bool is_main_script) { - const int value = static_cast<int>(status); - const int max = static_cast<int>( - ServiceWorkerContextRequestHandler::CreateJobStatus::NUM_TYPES); if (is_installed) { if (is_main_script) { UMA_HISTOGRAM_ENUMERATION( "ServiceWorker.ContextRequestHandlerStatus.InstalledWorker." "MainScript", - value, max); + status); } else { UMA_HISTOGRAM_ENUMERATION( "ServiceWorker.ContextRequestHandlerStatus.InstalledWorker." "ImportedScript", - value, max); + status); } } else { if (is_main_script) { UMA_HISTOGRAM_ENUMERATION( "ServiceWorker.ContextRequestHandlerStatus.NewWorker.MainScript", - value, max); + status); } else { UMA_HISTOGRAM_ENUMERATION( "ServiceWorker.ContextRequestHandlerStatus.NewWorker." "ImportedScript", - value, max); + status); } } } @@ -950,9 +903,8 @@ void ServiceWorkerMetrics::RecordStartServiceWorkerForNavigationHintResult( StartServiceWorkerForNavigationHintResult result) { - UMA_HISTOGRAM_ENUMERATION( - "ServiceWorker.StartForNavigationHint.Result", result, - StartServiceWorkerForNavigationHintResult::NUM_TYPES); + UMA_HISTOGRAM_ENUMERATION("ServiceWorker.StartForNavigationHint.Result", + result); } void ServiceWorkerMetrics::RecordRegisteredOriginCount(size_t origin_count) {
diff --git a/content/browser/service_worker/service_worker_metrics.h b/content/browser/service_worker/service_worker_metrics.h index cae26aa..a0898955 100644 --- a/content/browser/service_worker/service_worker_metrics.h +++ b/content/browser/service_worker/service_worker_metrics.h
@@ -168,7 +168,7 @@ DETACH_BY_REGISTRY, TIMEOUT, // Add new types here. - NUM_TYPES + kMaxValue = TIMEOUT, }; // Used for UMA. Append-only. @@ -208,14 +208,15 @@ BACKGROUND_FETCH_ABORT = 23, BACKGROUND_FETCH_CLICK = 24, BACKGROUND_FETCH_FAIL = 25, - BACKGROUND_FETCHED = 26, + // BACKGROUND_FETCHED = 26, // Obsolete NAVIGATION_HINT = 27, CAN_MAKE_PAYMENT = 28, ABORT_PAYMENT = 29, COOKIE_CHANGE = 30, LONG_RUNNING_MESSAGE = 31, + BACKGROUND_FETCH_SUCCESS = 32, // Add new events to record here. - NUM_TYPES + kMaxValue = BACKGROUND_FETCH_SUCCESS, }; // Used for UMA. Append only. @@ -228,7 +229,7 @@ PLUS, INBOX, DOCS, - NUM_TYPES + kMaxValue = DOCS, }; // Not used for UMA. @@ -275,7 +276,7 @@ // existing ready process. START_IN_EXISTING_READY_PROCESS = 8, // Add new types here. - NUM_TYPES + kMaxValue = START_IN_EXISTING_READY_PROCESS, }; // Used for UMA. Append only. @@ -285,7 +286,7 @@ NEGATIVE, INACCURATE_CLOCK, // Add new types here. - NUM_TYPES + kMaxValue = INACCURATE_CLOCK, }; // These are prefixed with "local" or "remote" to indicate whether the browser
diff --git a/content/browser/site_per_process_browsertest.cc b/content/browser/site_per_process_browsertest.cc index 68dec4b4..7e20440 100644 --- a/content/browser/site_per_process_browsertest.cc +++ b/content/browser/site_per_process_browsertest.cc
@@ -6870,29 +6870,53 @@ "document.querySelector('iframe').onload = " " function() { document.title = 'loaded'; };")); - GURL blocked_urls[] = { - embedded_test_server()->GetURL("b.com", "/frame-ancestors-none.html"), - embedded_test_server()->GetURL("b.com", "/x-frame-options-deny.html") + const struct { + const char* url; + bool use_error_page; + } kTestCases[] = { + {"/frame-ancestors-none.html", false}, + {"/x-frame-options-deny.html", true}, }; - for (size_t i = 0; i < arraysize(blocked_urls); ++i) { + for (const auto& test : kTestCases) { + GURL blocked_url = embedded_test_server()->GetURL("b.com", test.url); EXPECT_TRUE(ExecuteScript(shell(), "document.title = 'not loaded';")); base::string16 expected_title(base::UTF8ToUTF16("loaded")); TitleWatcher title_watcher(shell()->web_contents(), expected_title); // Navigate the subframe to a blocked URL. TestNavigationObserver load_observer(shell()->web_contents()); - EXPECT_TRUE(ExecuteScript(shell(), "frames[0].location.href = '" + - blocked_urls[i].spec() + "';")); + EXPECT_TRUE(ExecuteScript( + shell(), "frames[0].location.href = '" + blocked_url.spec() + "';")); load_observer.Wait(); // The blocked frame's origin should become unique. EXPECT_EQ("null", root->child_at(0)->current_origin().Serialize()); - // Ensure that we don't use the blocked URL as the blocked frame's last - // committed URL (see https://crbug.com/622385). - EXPECT_NE(root->child_at(0)->current_frame_host()->GetLastCommittedURL(), - blocked_urls[i]); + // X-Frame-Options and CSP frame-ancestors behave differently. XFO commits + // an error page, while CSP commits a "data:," URL. + // TODO(https://crbug.com/870815): Use an error page for both. + if (test.use_error_page) { + EXPECT_FALSE(load_observer.last_navigation_succeeded()); + EXPECT_EQ(net::ERR_BLOCKED_BY_RESPONSE, + load_observer.last_net_error_code()); + EXPECT_EQ(root->child_at(0)->current_frame_host()->GetLastCommittedURL(), + blocked_url); + EXPECT_EQ("Error", EvalJs(root->child_at(0), "document.title")); + } else { + EXPECT_TRUE(load_observer.last_navigation_succeeded()); + EXPECT_EQ(net::OK, load_observer.last_net_error_code()); + // Ensure that we don't use the blocked URL as the blocked frame's last + // committed URL (see https://crbug.com/622385). + EXPECT_EQ(root->child_at(0)->current_frame_host()->GetLastCommittedURL(), + GURL("data:,")); + + // The blocked navigation should behave like an empty 200 response. Make + // sure that the frame's document.title is empty: this double-checks both + // that the blocked URL's contents wasn't loaded, and that the old page + // isn't active anymore (both of these pages have non-empty titles). + EXPECT_EQ("", EvalJs(root->child_at(0), "document.title")); + } // The blocked frame should still fire a load event in its parent's process. EXPECT_EQ(expected_title, title_watcher.WaitAndGetTitle()); @@ -6900,12 +6924,6 @@ // Check that the current RenderFrameHost has stopped loading. EXPECT_FALSE(root->child_at(0)->current_frame_host()->is_loading()); - // The blocked navigation should behave like an empty 200 response. Make - // sure that the frame's document.title is empty: this double-checks both - // that the blocked URL's contents wasn't loaded, and that the old page - // isn't active anymore (both of these pages have non-empty titles). - EXPECT_EQ("", EvalJs(root->child_at(0), "document.title")); - // Navigate the subframe to another cross-origin page and ensure that this // navigation succeeds. Use a renderer-initiated navigation to test the // transfer logic, which used to have some issues with this.
diff --git a/content/browser/site_per_process_hit_test_browsertest.cc b/content/browser/site_per_process_hit_test_browsertest.cc index 0f098484..65f9815a 100644 --- a/content/browser/site_per_process_hit_test_browsertest.cc +++ b/content/browser/site_per_process_hit_test_browsertest.cc
@@ -1162,7 +1162,12 @@ class SitePerProcessEmulatedTouchBrowserTest : public SitePerProcessHitTestBrowserTest { public: - enum TestType { ScrollBubbling, PinchGoesToMainFrame, TouchActionBubbling }; + enum TestType { + ScrollBubbling, + PinchGoesToMainFrame, + TouchActionBubbling, + ShowPressHasTouchID + }; ~SitePerProcessEmulatedTouchBrowserTest() override {} @@ -1212,6 +1217,10 @@ 1); EXPECT_EQ(blink::kWebGestureDeviceTouchscreen, gesture_event.SourceDevice()); + // We expect all gesture events to have non-zero ids otherwise they + // can force hit-testing in RenderWidgetHostInputEventRouter even + // when it's unnecessary. + EXPECT_NE(0U, gesture_event.unique_touch_event_id); return true; }); @@ -1224,6 +1233,9 @@ case PinchGoesToMainFrame: expected_gesture_type = blink::WebInputEvent::kGesturePinchBegin; break; + case ShowPressHasTouchID: + expected_gesture_type = blink::WebInputEvent::kGestureShowPress; + break; default: ASSERT_TRUE(false); } @@ -1288,6 +1300,12 @@ // Send mouse events and wait for GesturePinchBegin. router->RouteMouseEvent(root_rwhv, &mouse_move_event, ui::LatencyInfo()); router->RouteMouseEvent(root_rwhv, &mouse_down_event, ui::LatencyInfo()); + if (test_type == ShowPressHasTouchID) { + // Wait for child to receive GestureShowPress. If this test fails, it + // will either DCHECK or time out. + child_gesture_event_observer.Wait(); + return; + } router->RouteMouseEvent(root_rwhv, &mouse_drag_event, ui::LatencyInfo()); router->RouteMouseEvent(root_rwhv, &mouse_up_event, ui::LatencyInfo()); @@ -1305,6 +1323,11 @@ } }; +IN_PROC_BROWSER_TEST_P(SitePerProcessEmulatedTouchBrowserTest, + EmulatedTouchShowPressHasTouchID) { + RunTest(ShowPressHasTouchID); +} + #if defined(OS_CHROMEOS) // Flaky: https://crbug.com/833380 #define MAYBE_EmulatedTouchScrollBubbles DISABLED_EmulatedTouchScrollBubbles @@ -4721,7 +4744,7 @@ } IN_PROC_BROWSER_TEST_P(SitePerProcessHitTestDataGenerationBrowserTest, - DISABLED_ClippedOOPIFFastPath) { + ClippedOOPIFFastPath) { if (!features::IsVizHitTestingEnabled()) return; auto hit_test_data =
diff --git a/content/browser/tracing/tracing_controller_browsertest.cc b/content/browser/tracing/tracing_controller_browsertest.cc index 94c32a4..2649d7e 100644 --- a/content/browser/tracing/tracing_controller_browsertest.cc +++ b/content/browser/tracing/tracing_controller_browsertest.cc
@@ -487,9 +487,7 @@ } // TODO(crbug.com/871770): Disabled for failing on ASAN. -// TODO(crbug.com/872631): Disabled on Android as flaky. -// TODO(crbug.com/873073): Disabled on Linux as flaky. -#if defined(ADDRESS_SANITIZER) || defined(OS_ANDROID) || defined(OS_LINUX) +#if defined(ADDRESS_SANITIZER) #define MAYBE_EnableAndStopTracingWithEmptyFile \ DISABLED_EnableAndStopTracingWithEmptyFile #else @@ -517,9 +515,7 @@ } // TODO(crbug.com/871770): Disabled for failing on ASAN. -// TODO(crbug.com/872631): Disabled on Android as flaky. -// TODO(crbug.com/873073): Disabled on Linux as flaky. -#if defined(ADDRESS_SANITIZER) || defined(OS_ANDROID) || defined(OS_LINUX) +#if defined(ADDRESS_SANITIZER) #define MAYBE_DoubleStopTracing DISABLED_DoubleStopTracing #else #define MAYBE_DoubleStopTracing DoubleStopTracing
diff --git a/content/browser/web_contents/web_contents_android.cc b/content/browser/web_contents/web_contents_android.cc index 5438f60c9..f63cb4b 100644 --- a/content/browser/web_contents/web_contents_android.cc +++ b/content/browser/web_contents/web_contents_android.cc
@@ -303,6 +303,12 @@ return web_contents_->GetMainFrame()->GetJavaRenderFrameHost(); } +ScopedJavaLocalRef<jobject> WebContentsAndroid::GetFocusedFrame( + JNIEnv* env, + const JavaParamRef<jobject>& obj) const { + return web_contents_->GetFocusedFrame()->GetJavaRenderFrameHost(); +} + ScopedJavaLocalRef<jstring> WebContentsAndroid::GetTitle( JNIEnv* env, const JavaParamRef<jobject>& obj) const {
diff --git a/content/browser/web_contents/web_contents_android.h b/content/browser/web_contents/web_contents_android.h index cb299e2..c6c0026 100644 --- a/content/browser/web_contents/web_contents_android.h +++ b/content/browser/web_contents/web_contents_android.h
@@ -52,6 +52,9 @@ base::android::ScopedJavaLocalRef<jobject> GetMainFrame( JNIEnv* env, const base::android::JavaParamRef<jobject>& obj) const; + base::android::ScopedJavaLocalRef<jobject> GetFocusedFrame( + JNIEnv* env, + const base::android::JavaParamRef<jobject>& obj) const; base::android::ScopedJavaLocalRef<jstring> GetTitle( JNIEnv* env, const base::android::JavaParamRef<jobject>& obj) const;
diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc index 495000c..3d34c9a 100644 --- a/content/browser/web_contents/web_contents_impl.cc +++ b/content/browser/web_contents/web_contents_impl.cc
@@ -3156,9 +3156,10 @@ #if defined(OS_MACOSX) void WebContentsImpl::DidChangeTextSelection(const base::string16& text, - const gfx::Range& range) { + const gfx::Range& range, + size_t offset) { for (auto& observer : observers_) - observer.DidChangeTextSelection(text, range); + observer.DidChangeTextSelection(text, range, offset); } #endif
diff --git a/content/browser/web_contents/web_contents_impl.h b/content/browser/web_contents/web_contents_impl.h index b921c8d0..4211eeb 100644 --- a/content/browser/web_contents/web_contents_impl.h +++ b/content/browser/web_contents/web_contents_impl.h
@@ -715,7 +715,8 @@ void SelectRange(const gfx::Point& base, const gfx::Point& extent) override; #if defined(OS_MACOSX) void DidChangeTextSelection(const base::string16& text, - const gfx::Range& range) override; + const gfx::Range& range, + size_t offset) override; #endif void MoveCaret(const gfx::Point& extent) override; void AdjustSelectionByCharacterOffset(int start_adjust,
diff --git a/content/browser/web_contents/web_contents_view_aura.cc b/content/browser/web_contents/web_contents_view_aura.cc index 713b179..8aff250 100644 --- a/content/browser/web_contents/web_contents_view_aura.cc +++ b/content/browser/web_contents/web_contents_view_aura.cc
@@ -729,7 +729,7 @@ } void WebContentsViewAura::CreateAuraWindow(aura::Window* context) { - DCHECK(aura::Env::GetInstanceDontCreate()); + DCHECK(aura::Env::HasInstance()); DCHECK(!window_); window_ = std::make_unique<aura::Window>(this); window_->set_owned_by_parent(false);
diff --git a/content/browser/webauth/authenticator_impl.cc b/content/browser/webauth/authenticator_impl.cc index e2471d2..c8c2729 100644 --- a/content/browser/webauth/authenticator_impl.cc +++ b/content/browser/webauth/authenticator_impl.cc
@@ -473,7 +473,9 @@ DCHECK(make_credential_response_callback_.is_null()); make_credential_response_callback_ = std::move(callback); - request_delegate_->DidStartRequest(); + request_delegate_->DidStartRequest( + base::BindOnce(&AuthenticatorImpl::Cancel, + weak_factory_.GetWeakPtr()) /* cancel_callback */); timer_->Start( FROM_HERE, options->adjusted_timeout, @@ -569,7 +571,9 @@ DCHECK(get_assertion_response_callback_.is_null()); get_assertion_response_callback_ = std::move(callback); - request_delegate_->DidStartRequest(); + request_delegate_->DidStartRequest( + base::BindOnce(&AuthenticatorImpl::Cancel, + weak_factory_.GetWeakPtr()) /* cancel_callback */); timer_->Start( FROM_HERE, options->adjusted_timeout, @@ -805,6 +809,16 @@ } } +void AuthenticatorImpl::Cancel() { + // If response callback is invoked already, then ignore cancel request. + if (!make_credential_response_callback_ && !get_assertion_response_callback_) + return; + + // Response from user cancellation is indistinguishable from error due to + // timeout. + OnTimeout(); +} + void AuthenticatorImpl::InvokeCallbackAndCleanup( MakeCredentialCallback callback, blink::mojom::AuthenticatorStatus status,
diff --git a/content/browser/webauth/authenticator_impl.h b/content/browser/webauth/authenticator_impl.h index c62e1fa..1b8dc671 100644 --- a/content/browser/webauth/authenticator_impl.h +++ b/content/browser/webauth/authenticator_impl.h
@@ -141,6 +141,8 @@ // Runs when timer expires and cancels all issued requests to a U2fDevice. void OnTimeout(); + // Runs when the user cancels WebAuthN request via UI dialog. + void Cancel(); void InvokeCallbackAndCleanup( MakeCredentialCallback callback,
diff --git a/content/browser/webauth/authenticator_impl_unittest.cc b/content/browser/webauth/authenticator_impl_unittest.cc index e872e131..6b455017 100644 --- a/content/browser/webauth/authenticator_impl_unittest.cc +++ b/content/browser/webauth/authenticator_impl_unittest.cc
@@ -65,6 +65,7 @@ using blink::mojom::PublicKeyCredentialType; using blink::mojom::PublicKeyCredentialUserEntity; using blink::mojom::PublicKeyCredentialUserEntityPtr; +using blink::mojom::AuthenticatorTransport; using cbor::CBORValue; using cbor::CBORReader; @@ -257,6 +258,7 @@ credential->type = PublicKeyCredentialType::PUBLIC_KEY; std::vector<uint8_t> id(32, 0x0A); credential->id = id; + credential->transports.push_back(AuthenticatorTransport::USB); descriptors.push_back(std::move(credential)); return descriptors; } @@ -827,6 +829,7 @@ auto credential = PublicKeyCredentialDescriptor::New(); credential->type = PublicKeyCredentialType::PUBLIC_KEY; credential->id.resize(size); + credential->transports.push_back(AuthenticatorTransport::USB); const bool should_be_valid = size < 256; if (should_be_valid) { @@ -1138,7 +1141,7 @@ is_focused_(is_focused) {} ~TestAuthenticatorRequestDelegate() override {} - void DidStartRequest() override { + void DidStartRequest(base::OnceClosure cancel_callback) override { ASSERT_TRUE(did_start_request_callback_) << "DidStartRequest called twice."; std::move(did_start_request_callback_).Run(); } @@ -1538,6 +1541,8 @@ auto credential = PublicKeyCredentialDescriptor::New(); credential->type = PublicKeyCredentialType::PUBLIC_KEY; credential->id.resize(16); + credential->transports = {AuthenticatorTransport::USB}; + ASSERT_TRUE(virtual_device_.mutable_state()->InjectRegistration( credential->id, kTestRelyingPartyId)); options->allow_credentials.emplace_back(std::move(credential)); @@ -1664,7 +1669,9 @@ true /* is_focused */) {} ~MockAuthenticatorRequestDelegateObserver() override = default; - MOCK_METHOD0(BluetoothAdapterIsAvailable, void()); + MOCK_METHOD1( + OnTransportAvailabilityEnumerated, + void(device::FidoRequestHandlerBase::TransportAvailabilityInfo data)); MOCK_METHOD1(FidoAuthenticatorAdded, void(const device::FidoAuthenticator&)); MOCK_METHOD1(FidoAuthenticatorRemoved, void(base::StringPiece)); @@ -1775,7 +1782,7 @@ device::FidoTransportProtocol::kBluetoothLowEnergy); const auto device_id = mock_ble_device->GetId(); - EXPECT_CALL(*mock_delegate_ptr, BluetoothAdapterIsAvailable()); + EXPECT_CALL(*mock_delegate_ptr, OnTransportAvailabilityEnumerated(_)); base::RunLoop ble_device_found_done; EXPECT_CALL(*mock_delegate_ptr, FidoAuthenticatorAdded(_))
diff --git a/content/browser/webauth/authenticator_type_converters.cc b/content/browser/webauth/authenticator_type_converters.cc index 28985e875..cd64499 100644 --- a/content/browser/webauth/authenticator_type_converters.cc +++ b/content/browser/webauth/authenticator_type_converters.cc
@@ -5,7 +5,9 @@ #include "content/browser/webauth/authenticator_type_converters.h" #include <algorithm> +#include <utility> +#include "base/containers/flat_set.h" #include "device/fido/fido_constants.h" #include "device/fido/fido_parsing_utils.h" @@ -33,6 +35,10 @@ return ::device::FidoTransportProtocol::kNearFieldCommunication; case AuthenticatorTransport::BLE: return ::device::FidoTransportProtocol::kBluetoothLowEnergy; + case AuthenticatorTransport::CABLE: + return ::device::FidoTransportProtocol::kCloudAssistedBluetoothLowEnergy; + case AuthenticatorTransport::INTERNAL: + return ::device::FidoTransportProtocol::kInternal; } NOTREACHED(); return ::device::FidoTransportProtocol::kUsbHumanInterfaceDevice; @@ -78,8 +84,14 @@ credential_descriptors.reserve(input.size()); for (const auto& credential : input) { + base::flat_set<::device::FidoTransportProtocol> protocols; + for (const auto& protocol : credential->transports) { + protocols.emplace(ConvertTo<::device::FidoTransportProtocol>(protocol)); + } + credential_descriptors.emplace_back(::device::PublicKeyCredentialDescriptor( - ConvertTo<::device::CredentialType>(credential->type), credential->id)); + ConvertTo<::device::CredentialType>(credential->type), credential->id, + std::move(protocols))); } return credential_descriptors; }
diff --git a/content/child/runtime_features.cc b/content/child/runtime_features.cc index c8a8e238..10776fb 100644 --- a/content/child/runtime_features.cc +++ b/content/child/runtime_features.cc
@@ -260,6 +260,10 @@ WebRuntimeFeatures::EnablePassiveDocumentEventListeners( base::FeatureList::IsEnabled(features::kPassiveDocumentEventListeners)); + WebRuntimeFeatures::EnablePassiveDocumentWheelEventListeners( + base::FeatureList::IsEnabled( + features::kPassiveDocumentWheelEventListeners)); + WebRuntimeFeatures::EnableFeatureFromString( "FontCacheScaling", base::FeatureList::IsEnabled(features::kFontCacheScaling)); @@ -407,10 +411,6 @@ WebRuntimeFeatures::EnableScheduledScriptStreaming( base::FeatureList::IsEnabled(features::kScheduledScriptStreaming)); - WebRuntimeFeatures::EnableFeatureFromString( - "FeaturePolicyForPermissions", - base::FeatureList::IsEnabled(features::kUseFeaturePolicyForPermissions)); - if (base::FeatureList::IsEnabled(features::kLazyFrameLoading)) WebRuntimeFeatures::EnableLazyFrameLoading(true); if (base::FeatureList::IsEnabled(features::kLazyFrameVisibleLoadTimeMetrics))
diff --git a/content/common/BUILD.gn b/content/common/BUILD.gn index b4bcc6a..078402e 100644 --- a/content/common/BUILD.gn +++ b/content/common/BUILD.gn
@@ -109,7 +109,6 @@ "drag_messages.h", "drag_traits.h", "edit_command.h", - "fileapi/file_system_messages.h", "fileapi/webblob_messages.h", "font_cache_dispatcher_win.cc", "font_list.cc",
diff --git a/content/common/content_message_generator.h b/content/common/content_message_generator.h index d0c6171..522bb456 100644 --- a/content/common/content_message_generator.h +++ b/content/common/content_message_generator.h
@@ -27,11 +27,6 @@ #error "Failed to include content/common/drag_messages.h" #endif #include "content/common/drag_traits.h" -#undef CONTENT_COMMON_FILEAPI_FILE_SYSTEM_MESSAGES_H_ -#include "content/common/fileapi/file_system_messages.h" -#ifndef CONTENT_COMMON_FILEAPI_FILE_SYSTEM_MESSAGES_H_ -#error "Failed to include content/common/fileapi/file_system_messages.h" -#endif #undef CONTENT_COMMON_FILEAPI_WEBBLOB_MESSAGES_H_ #include "content/common/fileapi/webblob_messages.h" #ifndef CONTENT_COMMON_FILEAPI_WEBBLOB_MESSAGES_H_
diff --git a/content/common/content_param_traits_macros.h b/content/common/content_param_traits_macros.h index 65199c2f..24f371e 100644 --- a/content/common/content_param_traits_macros.h +++ b/content/common/content_param_traits_macros.h
@@ -8,6 +8,7 @@ #ifndef CONTENT_COMMON_CONTENT_PARAM_TRAITS_MACROS_H_ #define CONTENT_COMMON_CONTENT_PARAM_TRAITS_MACROS_H_ +#include "components/viz/common/quads/selection.h" #include "content/common/content_export.h" #include "content/common/content_param_traits.h" #include "content/common/download/mhtml_save_status.h"
diff --git a/content/common/fileapi/file_system_messages.h b/content/common/fileapi/file_system_messages.h deleted file mode 100644 index 971610bd..0000000 --- a/content/common/fileapi/file_system_messages.h +++ /dev/null
@@ -1,176 +0,0 @@ -// Copyright (c) 2012 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 CONTENT_COMMON_FILEAPI_FILE_SYSTEM_MESSAGES_H_ -#define CONTENT_COMMON_FILEAPI_FILE_SYSTEM_MESSAGES_H_ - -// IPC messages for the file system. - -#include <stdint.h> - -#include <string> -#include <vector> - -#include "components/services/filesystem/public/interfaces/types.mojom.h" -#include "ipc/ipc_message_macros.h" -#include "ipc/ipc_platform_file.h" -#include "storage/common/fileapi/file_system_info.h" -#include "storage/common/fileapi/file_system_types.h" -#include "storage/common/quota/quota_limit_type.h" -#include "url/gurl.h" - -#undef IPC_MESSAGE_EXPORT -#define IPC_MESSAGE_EXPORT CONTENT_EXPORT -#define IPC_MESSAGE_START FileSystemMsgStart - -IPC_STRUCT_TRAITS_BEGIN(filesystem::mojom::DirectoryEntry) - IPC_STRUCT_TRAITS_MEMBER(name) - IPC_STRUCT_TRAITS_MEMBER(type) -IPC_STRUCT_TRAITS_END() - -IPC_STRUCT_TRAITS_BEGIN(storage::FileSystemInfo) - IPC_STRUCT_TRAITS_MEMBER(name) - IPC_STRUCT_TRAITS_MEMBER(root_url) - IPC_STRUCT_TRAITS_MEMBER(mount_type) -IPC_STRUCT_TRAITS_END() - -IPC_ENUM_TRAITS_MAX_VALUE(filesystem::mojom::FsFileType, - filesystem::mojom::FsFileType::DIRECTORY) -IPC_ENUM_TRAITS_MAX_VALUE(storage::FileSystemType, - storage::FileSystemType::kFileSystemTypeLast) -IPC_ENUM_TRAITS_MAX_VALUE(storage::QuotaLimitType, storage::kQuotaLimitTypeLast) - -// File system messages sent from the browser to the child process. - -// WebLocalFrameClient::openFileSystem response messages. -IPC_MESSAGE_CONTROL3(FileSystemMsg_DidOpenFileSystem, - int /* request_id */, - std::string /* name */, - GURL /* root_url */) - -// WebFileSystem response messages. -IPC_MESSAGE_CONTROL4(FileSystemMsg_DidResolveURL, - int /* request_id */, - storage::FileSystemInfo /* filesystem_info */, - base::FilePath /* file_path */, - bool /* is_directory */) -IPC_MESSAGE_CONTROL1(FileSystemMsg_DidSucceed, - int /* request_id */) -IPC_MESSAGE_CONTROL2(FileSystemMsg_DidReadMetadata, - int /* request_id */, - base::File::Info) -IPC_MESSAGE_CONTROL3(FileSystemMsg_DidCreateSnapshotFile, - int /* request_id */, - base::File::Info, - base::FilePath /* true platform path */) -IPC_MESSAGE_CONTROL3( - FileSystemMsg_DidReadDirectory, - int /* request_id */, - std::vector<filesystem::mojom::DirectoryEntry> /* entries */, - bool /* has_more */) -IPC_MESSAGE_CONTROL3(FileSystemMsg_DidWrite, - int /* request_id */, - int64_t /* byte count */, - bool /* complete */) -IPC_MESSAGE_CONTROL2(FileSystemMsg_DidFail, - int /* request_id */, - base::File::Error /* error_code */) - -// File system messages sent from the child process to the browser. - -// WebLocalFrameClient::openFileSystem() message. -IPC_MESSAGE_CONTROL3(FileSystemHostMsg_OpenFileSystem, - int /* request_id */, - GURL /* origin_url */, - storage::FileSystemType /* type */) - -// WevFrameClient::resolveURL() message. -IPC_MESSAGE_CONTROL2(FileSystemHostMsg_ResolveURL, - int /* request_id */, - GURL /* filesystem_url */) - -// WebFileSystem::move() message. -IPC_MESSAGE_CONTROL3(FileSystemHostMsg_Move, - int /* request_id */, - GURL /* src path */, - GURL /* dest path */) - -// WebFileSystem::copy() message. -IPC_MESSAGE_CONTROL3(FileSystemHostMsg_Copy, - int /* request_id */, - GURL /* src path */, - GURL /* dest path */) - -// WebFileSystem::remove() message. -IPC_MESSAGE_CONTROL3(FileSystemHostMsg_Remove, - int /* request_id */, - GURL /* path */, - bool /* recursive */) - -// WebFileSystem::readMetadata() message. -IPC_MESSAGE_CONTROL2(FileSystemHostMsg_ReadMetadata, - int /* request_id */, - GURL /* path */) - -// WebFileSystem::create() message. -IPC_MESSAGE_CONTROL5(FileSystemHostMsg_Create, - int /* request_id */, - GURL /* path */, - bool /* exclusive */, - bool /* is_directory */, - bool /* recursive */) - -// WebFileSystem::exists() messages. -IPC_MESSAGE_CONTROL3(FileSystemHostMsg_Exists, - int /* request_id */, - GURL /* path */, - bool /* is_directory */) - -// WebFileSystem::readDirectory() message. -IPC_MESSAGE_CONTROL2(FileSystemHostMsg_ReadDirectory, - int /* request_id */, - GURL /* path */) - -// WebFileWriter::write() message. -IPC_MESSAGE_CONTROL4(FileSystemHostMsg_Write, - int /* request id */, - GURL /* file path */, - std::string /* blob uuid */, - int64_t /* position */) - -// WebFileWriter::truncate() message. -IPC_MESSAGE_CONTROL3(FileSystemHostMsg_Truncate, - int /* request id */, - GURL /* file path */, - int64_t /* length */) - -// Pepper's Touch() message. -IPC_MESSAGE_CONTROL4(FileSystemHostMsg_TouchFile, - int /* request_id */, - GURL /* path */, - base::Time /* last_access_time */, - base::Time /* last_modified_time */) - -// WebFileWriter::cancel() message. -IPC_MESSAGE_CONTROL2(FileSystemHostMsg_CancelWrite, - int /* request id */, - int /* id of request to cancel */) - -// WebFileSystem::createSnapshotFileAndReadMetadata() message. -IPC_MESSAGE_CONTROL2(FileSystemHostMsg_CreateSnapshotFile, - int /* request_id */, - GURL /* file_path */) - -// Renderers are expected to send this message after having processed -// the FileSystemMsg_DidCreateSnapshotFile message. In particular, -// after having created a BlobDataHandle backed by the snapshot file. -IPC_MESSAGE_CONTROL1(FileSystemHostMsg_DidReceiveSnapshotFile, - int /* request_id */) - -// For Pepper's URL loader. -IPC_SYNC_MESSAGE_CONTROL1_1(FileSystemHostMsg_SyncGetPlatformPath, - GURL /* file path */, - base::FilePath /* platform_path */) - -#endif // CONTENT_COMMON_FILEAPI_FILE_SYSTEM_MESSAGES_H_
diff --git a/content/common/sandbox_init_mac.cc b/content/common/sandbox_init_mac.cc index 6bd5d2b..0a4a263 100644 --- a/content/common/sandbox_init_mac.cc +++ b/content/common/sandbox_init_mac.cc
@@ -61,7 +61,7 @@ gpu::EnableSwiftShaderIfNeeded( command_line, gpu_feature_info, gpu_preferences.disable_software_rasterizer, needs_more_info); - // Preload either the desktop GL or the osmesa so, depending on the + // Preload either the desktop GL or SwiftShader so, depending on the // --use-gl flag. gl::init::InitializeGLOneOff();
diff --git a/content/common/service_worker/service_worker.mojom b/content/common/service_worker/service_worker.mojom index 3b4290f..1992086 100644 --- a/content/common/service_worker/service_worker.mojom +++ b/content/common/service_worker/service_worker.mojom
@@ -98,12 +98,11 @@ // promise has settled. |developer_id| and |unique_id| are documented in // content::BackgroundFetchRegistrationId. DispatchBackgroundFetchAbortEvent(string developer_id, - string unique_id, - array<BackgroundFetchSettledFetch> fetches) + string unique_id) => (blink.mojom.ServiceWorkerEventStatus status, mojo_base.mojom.Time dispatch_event_time); DispatchBackgroundFetchClickEvent(string developer_id, - BackgroundFetchState state) + string unique_id) => (blink.mojom.ServiceWorkerEventStatus status, mojo_base.mojom.Time dispatch_event_time); DispatchBackgroundFetchFailEvent(string developer_id, @@ -111,9 +110,10 @@ array<BackgroundFetchSettledFetch> fetches) => (blink.mojom.ServiceWorkerEventStatus status, mojo_base.mojom.Time dispatch_event_time); - DispatchBackgroundFetchedEvent(string developer_id, - string unique_id, - array<BackgroundFetchSettledFetch> fetches) + DispatchBackgroundFetchSuccessEvent( + string developer_id, + string unique_id, + array<BackgroundFetchSettledFetch> fetches) => (blink.mojom.ServiceWorkerEventStatus status, mojo_base.mojom.Time dispatch_event_time);
diff --git a/content/common/service_worker/service_worker_loader_helpers.cc b/content/common/service_worker/service_worker_loader_helpers.cc index 27b6a61..d47b3cb1 100644 --- a/content/common/service_worker/service_worker_loader_helpers.cc +++ b/content/common/service_worker/service_worker_loader_helpers.cc
@@ -5,11 +5,13 @@ #include "content/common/service_worker/service_worker_loader_helpers.h" #include <memory> +#include <string> #include <utility> +#include <vector> #include "base/strings/stringprintf.h" -#include "content/common/service_worker/service_worker_utils.h" #include "content/public/common/content_features.h" +#include "content/public/common/resource_type.h" #include "mojo/public/cpp/bindings/strong_binding.h" #include "net/http/http_util.h" #include "services/network/loader_util.h" @@ -40,6 +42,58 @@ BlobCompleteCallback callback_; }; +// Sets |has_range_out| to true if |headers| specify a single range request, and +// |offset_out| and |size_out| to the range. Returns true on valid input +// (regardless of |has_range_out|), and false if there is more than one range or +// if the bounds overflow. +bool ExtractSinglePartHttpRange(const net::HttpRequestHeaders& headers, + bool* has_range_out, + uint64_t* offset_out, + uint64_t* length_out) { + std::string range_header; + *has_range_out = false; + if (!headers.GetHeader(net::HttpRequestHeaders::kRange, &range_header)) + return true; + + std::vector<net::HttpByteRange> ranges; + if (!net::HttpUtil::ParseRangeHeader(range_header, &ranges)) + return true; + + // Multi-part (or invalid) ranges are not supported. + if (ranges.size() != 1) + return false; + + // Safely parse the single range to our more-sane output format. + *has_range_out = true; + const net::HttpByteRange& byte_range = ranges[0]; + if (byte_range.first_byte_position() < 0) + return false; + // Allow the range [0, -1] to be valid and specify the entire range. + if (byte_range.first_byte_position() == 0 && + byte_range.last_byte_position() == -1) { + *has_range_out = false; + return true; + } + if (byte_range.last_byte_position() < 0) + return false; + + uint64_t first_byte_position = + static_cast<uint64_t>(byte_range.first_byte_position()); + uint64_t last_byte_position = + static_cast<uint64_t>(byte_range.last_byte_position()); + + base::CheckedNumeric<uint64_t> length = last_byte_position; + length -= first_byte_position; + length += 1; + + if (!length.IsValid()) + return false; + + *offset_out = static_cast<uint64_t>(byte_range.first_byte_position()); + *length_out = length.ValueOrDie(); + return true; +} + } // namespace // static @@ -135,8 +189,7 @@ // We don't support multiple range requests in one single URL request, // because we need to do multipart encoding here. // TODO(falken): Support multipart byte range requests. - if (!ServiceWorkerUtils::ExtractSinglePartHttpRange(headers, &byte_range_set, - &offset, &length)) { + if (!ExtractSinglePartHttpRange(headers, &byte_range_set, &offset, &length)) { return net::ERR_REQUEST_RANGE_NOT_SATISFIABLE; }
diff --git a/content/common/service_worker/service_worker_utils.cc b/content/common/service_worker/service_worker_utils.cc index 5abbb6e9..191ec845 100644 --- a/content/common/service_worker/service_worker_utils.cc +++ b/content/common/service_worker/service_worker_utils.cc
@@ -166,55 +166,6 @@ return true; } -bool ServiceWorkerUtils::ExtractSinglePartHttpRange( - const net::HttpRequestHeaders& headers, - bool* has_range_out, - uint64_t* offset_out, - uint64_t* length_out) { - std::string range_header; - *has_range_out = false; - if (!headers.GetHeader(net::HttpRequestHeaders::kRange, &range_header)) - return true; - - std::vector<net::HttpByteRange> ranges; - if (!net::HttpUtil::ParseRangeHeader(range_header, &ranges)) - return true; - - // Multi-part (or invalid) ranges are not supported. - if (ranges.size() != 1) - return false; - - // Safely parse the single range to our more-sane output format. - *has_range_out = true; - const net::HttpByteRange& byte_range = ranges[0]; - if (byte_range.first_byte_position() < 0) - return false; - // Allow the range [0, -1] to be valid and specify the entire range. - if (byte_range.first_byte_position() == 0 && - byte_range.last_byte_position() == -1) { - *has_range_out = false; - return true; - } - if (byte_range.last_byte_position() < 0) - return false; - - uint64_t first_byte_position = - static_cast<uint64_t>(byte_range.first_byte_position()); - uint64_t last_byte_position = - static_cast<uint64_t>(byte_range.last_byte_position()); - - base::CheckedNumeric<uint64_t> length = last_byte_position; - length -= first_byte_position; - length += 1; - - if (!length.IsValid()) - return false; - - *offset_out = static_cast<uint64_t>(byte_range.first_byte_position()); - *length_out = length.ValueOrDie(); - return true; -} - bool ServiceWorkerUtils::ShouldBypassCacheDueToUpdateViaCache( bool is_main_script, blink::mojom::ServiceWorkerUpdateViaCache cache_mode) {
diff --git a/content/common/service_worker/service_worker_utils.h b/content/common/service_worker/service_worker_utils.h index 62606881..f0f25a65 100644 --- a/content/common/service_worker/service_worker_utils.h +++ b/content/common/service_worker/service_worker_utils.h
@@ -7,6 +7,7 @@ #include <sstream> #include <string> +#include <vector> #include "base/command_line.h" #include "base/macros.h" @@ -69,14 +70,6 @@ return oss.str(); } - // Sets |has_range| to true if |headers| specify a single range request, and - // |offset| and |size| to the range. Returns true on valid input (regardless - // of |has_range|), and false if there is more than one range or if the bounds - // overflow. - static bool ExtractSinglePartHttpRange(const net::HttpRequestHeaders& headers, - bool* has_range_out, - uint64_t* offset_out, - uint64_t* size_out); static bool ShouldBypassCacheDueToUpdateViaCache( bool is_main_script,
diff --git a/content/public/android/java/src/org/chromium/content/browser/BindingManager.java b/content/public/android/java/src/org/chromium/content/browser/BindingManager.java index 0449085..f867342fd 100644 --- a/content/public/android/java/src/org/chromium/content/browser/BindingManager.java +++ b/content/public/android/java/src/org/chromium/content/browser/BindingManager.java
@@ -7,12 +7,13 @@ import android.content.ComponentCallbacks2; import android.content.Context; import android.content.res.Configuration; +import android.support.v4.util.ArraySet; import org.chromium.base.Log; import org.chromium.base.metrics.RecordHistogram; import org.chromium.base.process_launcher.ChildProcessConnection; -import java.util.LinkedList; +import java.util.Set; /** * Manages oom bindings used to bound child services. @@ -29,9 +30,9 @@ // Delays used when clearing moderate binding pool when onSentToBackground happens. private static final long MODERATE_BINDING_POOL_CLEARER_DELAY_MILLIS = 10 * 1000; - // Stores the connections in MRU order. - private final LinkedList<ChildProcessConnection> mConnections = new LinkedList<>(); + private final Set<ChildProcessConnection> mConnections = new ArraySet<ChildProcessConnection>(); private final int mMaxSize; + private final Iterable<ChildProcessConnection> mRanking; private final Runnable mDelayedClearer; @Override @@ -80,35 +81,32 @@ } private void addAndUseConnection(ChildProcessConnection connection) { - // Note that the size of connections is currently fairly small (20). - // If it became bigger we should consider using an alternate data structure so we don't - // have to traverse the list every time. - boolean alreadyInQueue = mConnections.removeFirstOccurrence(connection); + // Note that the size of connections is currently fairly small (40). + // If it became bigger we should consider using an alternate data structure. + boolean alreadyInQueue = !mConnections.add(connection); if (!alreadyInQueue) connection.addModerateBinding(); - - if (mConnections.size() == mMaxSize) { - // Make room for the connection we are about to add. - removeOldConnections(1); - } - mConnections.add(0, connection); assert mConnections.size() <= mMaxSize; } private void removeConnection(ChildProcessConnection connection) { - boolean alreadyInQueue = mConnections.removeFirstOccurrence(connection); + boolean alreadyInQueue = mConnections.remove(connection); if (alreadyInQueue) connection.removeModerateBinding(); assert !mConnections.contains(connection); } - void removeAllConnections() { + private void removeAllConnections() { removeOldConnections(mConnections.size()); } private void removeOldConnections(int numberOfConnections) { assert numberOfConnections <= mConnections.size(); - for (int i = 0; i < numberOfConnections; i++) { - ChildProcessConnection connection = mConnections.removeLast(); - connection.removeModerateBinding(); + int numRemoved = 0; + for (ChildProcessConnection connection : mRanking) { + if (mConnections.contains(connection)) { + connection.removeModerateBinding(); + mConnections.remove(connection); + if (++numRemoved == numberOfConnections) break; + } } } @@ -137,12 +135,14 @@ * The constructor is private to hide parameters exposed for testing from the regular consumer. * Use factory methods to create an instance. */ - BindingManager(Context context, int maxSize, boolean onTesting) { + BindingManager(Context context, int maxSize, Iterable<ChildProcessConnection> ranking, + boolean onTesting) { assert LauncherThread.runningOnLauncherThread(); Log.i(TAG, "Moderate binding enabled: maxSize=%d", maxSize); mOnTesting = onTesting; mMaxSize = maxSize; + mRanking = ranking; assert mMaxSize > 0; mDelayedClearer = new Runnable() {
diff --git a/content/public/android/java/src/org/chromium/content/browser/ChildProcessLauncherHelperImpl.java b/content/public/android/java/src/org/chromium/content/browser/ChildProcessLauncherHelperImpl.java index 67d5588..aa89dc0 100644 --- a/content/public/android/java/src/org/chromium/content/browser/ChildProcessLauncherHelperImpl.java +++ b/content/public/android/java/src/org/chromium/content/browser/ChildProcessLauncherHelperImpl.java
@@ -259,8 +259,8 @@ public void run() { ChildConnectionAllocator allocator = getConnectionAllocator(context, true /* sandboxed */); - sBindingManager = new BindingManager( - context, allocator.getNumberOfServices(), false /* onTesting */); + sBindingManager = new BindingManager(context, allocator.getNumberOfServices(), + sSandboxedChildConnectionRanking, false /* onTesting */); } });
diff --git a/content/public/android/java/src/org/chromium/content/browser/ChildProcessRanking.java b/content/public/android/java/src/org/chromium/content/browser/ChildProcessRanking.java index d5176fd..7c77555c 100644 --- a/content/public/android/java/src/org/chromium/content/browser/ChildProcessRanking.java +++ b/content/public/android/java/src/org/chromium/content/browser/ChildProcessRanking.java
@@ -9,11 +9,12 @@ import java.util.Arrays; import java.util.Comparator; +import java.util.Iterator; /** * Ranking of ChildProcessConnections for a particular ChildConnectionAllocator. */ -public class ChildProcessRanking { +public class ChildProcessRanking implements Iterable<ChildProcessConnection> { private static class ConnectionWithRank { public final ChildProcessConnection connection; @@ -86,6 +87,32 @@ } } + private class ReverseRankIterator implements Iterator<ChildProcessConnection> { + private final int mSizeOnConstruction; + private int mNextIndex; + + public ReverseRankIterator() { + mSizeOnConstruction = ChildProcessRanking.this.mSize; + mNextIndex = mSizeOnConstruction - 1; + } + + @Override + public boolean hasNext() { + modificationCheck(); + return mNextIndex >= 0; + } + + @Override + public ChildProcessConnection next() { + modificationCheck(); + return ChildProcessRanking.this.mRankings[mNextIndex--].connection; + } + + private void modificationCheck() { + assert mSizeOnConstruction == ChildProcessRanking.this.mSize; + } + } + private static final RankComparator COMPARATOR = new RankComparator(); // Not the most theoretically efficient data structure, but is good enough @@ -97,6 +124,15 @@ mRankings = new ConnectionWithRank[maxSize]; } + /** + * Iterate from lowest to highest rank. Ranking should not be modified during iteration, + * including using Iterator.delete. + */ + @Override + public Iterator<ChildProcessConnection> iterator() { + return new ReverseRankIterator(); + } + public void addConnection(ChildProcessConnection connection, boolean foreground, long frameDepth, boolean intersectsViewport, @ChildProcessImportance int importance) { assert connection != null;
diff --git a/content/public/android/java/src/org/chromium/content/browser/MotionEventSynthesizerImpl.java b/content/public/android/java/src/org/chromium/content/browser/MotionEventSynthesizerImpl.java index 4445172c..7a35963 100644 --- a/content/public/android/java/src/org/chromium/content/browser/MotionEventSynthesizerImpl.java +++ b/content/public/android/java/src/org/chromium/content/browser/MotionEventSynthesizerImpl.java
@@ -4,6 +4,7 @@ package org.chromium.content.browser; +import android.view.InputDevice; import android.view.MotionEvent; import android.view.MotionEvent.PointerCoords; import android.view.MotionEvent.PointerProperties; @@ -16,6 +17,7 @@ */ public class MotionEventSynthesizerImpl implements MotionEventSynthesizer { private static final int MAX_NUM_POINTERS = 16; + private static final int SOURCE = InputDevice.SOURCE_CLASS_POINTER; private final PointerProperties[] mPointerProperties; private final PointerCoords[] mPointerCoords; @@ -90,16 +92,15 @@ * @param action Type of the action to inject. * @param pointerCount The number of points associated with the event. * @param timeInMs Timestamp for the event. - * @param source Source of the event. */ @Override - public void inject(int action, int pointerCount, long timeInMs, int source) { + public void inject(int action, int pointerCount, long timeInMs) { switch (action) { case MotionEventAction.START: { mDownTimeInMs = timeInMs; MotionEvent event = MotionEvent.obtain(mDownTimeInMs, timeInMs, MotionEvent.ACTION_DOWN, 1, - mPointerProperties, mPointerCoords, 0, 0, 1, 1, 0, 0, source, 0); + mPointerProperties, mPointerCoords, 0, 0, 1, 1, 0, 0, SOURCE, 0); mTarget.dispatchTouchEvent(event); event.recycle(); @@ -110,7 +111,7 @@ int pointerIndex = 1 << MotionEvent.ACTION_POINTER_INDEX_SHIFT; event = MotionEvent.obtain(mDownTimeInMs, timeInMs, MotionEvent.ACTION_POINTER_DOWN | pointerIndex, pointerCount, - mPointerProperties, mPointerCoords, 0, 0, 1, 1, 0, 0, source, 0); + mPointerProperties, mPointerCoords, 0, 0, 1, 1, 0, 0, SOURCE, 0); mTarget.dispatchTouchEvent(event); event.recycle(); } @@ -119,7 +120,7 @@ case MotionEventAction.MOVE: { MotionEvent event = MotionEvent.obtain(mDownTimeInMs, timeInMs, MotionEvent.ACTION_MOVE, pointerCount, mPointerProperties, mPointerCoords, - 0, 0, 1, 1, 0, 0, source, 0); + 0, 0, 1, 1, 0, 0, SOURCE, 0); mTarget.dispatchTouchEvent(event); event.recycle(); break; @@ -127,7 +128,7 @@ case MotionEventAction.CANCEL: { MotionEvent event = MotionEvent.obtain(mDownTimeInMs, timeInMs, MotionEvent.ACTION_CANCEL, 1, - mPointerProperties, mPointerCoords, 0, 0, 1, 1, 0, 0, source, 0); + mPointerProperties, mPointerCoords, 0, 0, 1, 1, 0, 0, SOURCE, 0); mTarget.dispatchTouchEvent(event); event.recycle(); break; @@ -140,14 +141,14 @@ int pointerIndex = 1 << MotionEvent.ACTION_POINTER_INDEX_SHIFT; MotionEvent event = MotionEvent.obtain(mDownTimeInMs, timeInMs, MotionEvent.ACTION_POINTER_UP | pointerIndex, pointerCount, - mPointerProperties, mPointerCoords, 0, 0, 1, 1, 0, 0, source, 0); + mPointerProperties, mPointerCoords, 0, 0, 1, 1, 0, 0, SOURCE, 0); mTarget.dispatchTouchEvent(event); event.recycle(); } MotionEvent event = MotionEvent.obtain(mDownTimeInMs, timeInMs, MotionEvent.ACTION_UP, 1, - mPointerProperties, mPointerCoords, 0, 0, 1, 1, 0, 0, source, 0); + mPointerProperties, mPointerCoords, 0, 0, 1, 1, 0, 0, SOURCE, 0); mTarget.dispatchTouchEvent(event); event.recycle(); break; @@ -156,7 +157,7 @@ assert pointerCount == 1; MotionEvent event = MotionEvent.obtain(mDownTimeInMs, timeInMs, MotionEvent.ACTION_SCROLL, pointerCount, mPointerProperties, mPointerCoords, - 0, 0, 1, 1, 0, 0, source, 0); + 0, 0, 1, 1, 0, 0, SOURCE, 0); mTarget.dispatchGenericMotionEvent(event); event.recycle(); break; @@ -164,7 +165,7 @@ case MotionEventAction.HOVER_ENTER: case MotionEventAction.HOVER_EXIT: case MotionEventAction.HOVER_MOVE: { - injectHover(action, pointerCount, timeInMs, source); + injectHover(action, pointerCount, timeInMs); break; } default: { @@ -174,13 +175,13 @@ } } - private void injectHover(int action, int pointerCount, long timeInMs, int source) { + private void injectHover(int action, int pointerCount, long timeInMs) { assert pointerCount == 1; int androidAction = MotionEvent.ACTION_HOVER_ENTER; if (MotionEventAction.HOVER_EXIT == action) androidAction = MotionEvent.ACTION_HOVER_EXIT; if (MotionEventAction.HOVER_MOVE == action) androidAction = MotionEvent.ACTION_HOVER_MOVE; MotionEvent event = MotionEvent.obtain(mDownTimeInMs, timeInMs, androidAction, pointerCount, - mPointerProperties, mPointerCoords, 0, 0, 1, 1, 0, 0, source, 0); + mPointerProperties, mPointerCoords, 0, 0, 1, 1, 0, 0, SOURCE, 0); mTarget.dispatchGenericMotionEvent(event); event.recycle(); }
diff --git a/content/public/android/java/src/org/chromium/content/browser/SyntheticGestureTarget.java b/content/public/android/java/src/org/chromium/content/browser/SyntheticGestureTarget.java index 11d17de..018addfa1 100644 --- a/content/public/android/java/src/org/chromium/content/browser/SyntheticGestureTarget.java +++ b/content/public/android/java/src/org/chromium/content/browser/SyntheticGestureTarget.java
@@ -27,7 +27,7 @@ @CalledByNative private void inject(int action, int pointerCount, long timeInMs) { - mMotionEventSynthesizer.inject(action, pointerCount, timeInMs, 0 /* source */); + mMotionEventSynthesizer.inject(action, pointerCount, timeInMs); } @CalledByNative
diff --git a/content/public/android/java/src/org/chromium/content/browser/framehost/RenderFrameHostImpl.java b/content/public/android/java/src/org/chromium/content/browser/framehost/RenderFrameHostImpl.java index ebc4819..bd09e1f 100644 --- a/content/public/android/java/src/org/chromium/content/browser/framehost/RenderFrameHostImpl.java +++ b/content/public/android/java/src/org/chromium/content/browser/framehost/RenderFrameHostImpl.java
@@ -95,6 +95,11 @@ nativeNotifyUserActivation(mNativeRenderFrameHostAndroid); } + @Override + public void executeJavaScriptForTests(String script, Callback<String> callback) { + nativeExecuteJavaScriptForTests(mNativeRenderFrameHostAndroid, script, callback); + } + /** * Return the AndroidOverlay routing token for this RenderFrameHostImpl. */ @@ -109,4 +114,6 @@ private native UnguessableToken nativeGetAndroidOverlayRoutingToken( long nativeRenderFrameHostAndroid); private native void nativeNotifyUserActivation(long nativeRenderFrameHostAndroid); + private native void nativeExecuteJavaScriptForTests( + long nativeRenderFrameHostAndroid, String script, Callback<String> callback); }
diff --git a/content/public/android/java/src/org/chromium/content/browser/webcontents/WebContentsImpl.java b/content/public/android/java/src/org/chromium/content/browser/webcontents/WebContentsImpl.java index 5c46b88e..2da2a29 100644 --- a/content/public/android/java/src/org/chromium/content/browser/webcontents/WebContentsImpl.java +++ b/content/public/android/java/src/org/chromium/content/browser/webcontents/WebContentsImpl.java
@@ -342,6 +342,11 @@ } @Override + public RenderFrameHost getFocusedFrame() { + return nativeGetFocusedFrame(mNativeWebContentsAndroid); + } + + @Override public String getTitle() { return nativeGetTitle(mNativeWebContentsAndroid); } @@ -895,6 +900,7 @@ private native void nativeSetTopLevelNativeWindow( long nativeWebContentsAndroid, WindowAndroid windowAndroid); private native RenderFrameHost nativeGetMainFrame(long nativeWebContentsAndroid); + private native RenderFrameHost nativeGetFocusedFrame(long nativeWebContentsAndroid); private native String nativeGetTitle(long nativeWebContentsAndroid); private native String nativeGetVisibleURL(long nativeWebContentsAndroid); private native String nativeGetEncoding(long nativeWebContentsAndroid);
diff --git a/content/public/android/java/src/org/chromium/content_public/browser/MotionEventSynthesizer.java b/content/public/android/java/src/org/chromium/content_public/browser/MotionEventSynthesizer.java index e69a7ad..651e682 100644 --- a/content/public/android/java/src/org/chromium/content_public/browser/MotionEventSynthesizer.java +++ b/content/public/android/java/src/org/chromium/content_public/browser/MotionEventSynthesizer.java
@@ -33,7 +33,6 @@ * @param action Type of the action to inject. * @param pointerCount The number of points associated with the event. * @param timeInMs Timestamp for the event. - * @param source Source of the event. */ - void inject(int action, int pointerCount, long timeInMs, int source); + void inject(int action, int pointerCount, long timeInMs); }
diff --git a/content/public/android/java/src/org/chromium/content_public/browser/RenderFrameHost.java b/content/public/android/java/src/org/chromium/content_public/browser/RenderFrameHost.java index 19adb2a..5c219b5b 100644 --- a/content/public/android/java/src/org/chromium/content_public/browser/RenderFrameHost.java +++ b/content/public/android/java/src/org/chromium/content_public/browser/RenderFrameHost.java
@@ -40,6 +40,15 @@ void notifyUserActivation(); /** + * Runs the given JavaScript in the RenderFrameHost. + * + * @param script A String containing the JavaScript to run. + * @param callback The Callback that will be called with the result of the JavaScript execution + * serialized to a String using JSONStringValueSerializer. + */ + void executeJavaScriptForTests(String script, Callback<String> callback); + + /** * Returns whether we're in incognito mode. * * @return {@code true} if we're in incoginto mode.
diff --git a/content/public/android/java/src/org/chromium/content_public/browser/WebContents.java b/content/public/android/java/src/org/chromium/content_public/browser/WebContents.java index d827a25..66e7e38 100644 --- a/content/public/android/java/src/org/chromium/content_public/browser/WebContents.java +++ b/content/public/android/java/src/org/chromium/content_public/browser/WebContents.java
@@ -131,6 +131,11 @@ RenderFrameHost getMainFrame(); /** + * @return The focused frame in this WebContents. + */ + RenderFrameHost getFocusedFrame(); + + /** * @return The title for the current visible page. */ String getTitle();
diff --git a/content/public/android/junit/src/org/chromium/content/browser/BindingManagerTest.java b/content/public/android/junit/src/org/chromium/content/browser/BindingManagerTest.java index 5ce4605c..2e0761f 100644 --- a/content/public/android/junit/src/org/chromium/content/browser/BindingManagerTest.java +++ b/content/public/android/junit/src/org/chromium/content/browser/BindingManagerTest.java
@@ -28,6 +28,7 @@ import org.chromium.base.test.util.Feature; import java.util.ArrayList; +import java.util.List; /** * Unit tests for BindingManager and ChildProcessConnection. @@ -40,7 +41,7 @@ public class BindingManagerTest { // Creates a mocked ChildProcessConnection that is optionally added to a BindingManager. private static ChildProcessConnection createTestChildProcessConnection( - int pid, BindingManager manager) { + int pid, BindingManager manager, List<ChildProcessConnection> iterable) { TestChildProcessConnection connection = new TestChildProcessConnection( new ComponentName("org.chromium.test", "TestService"), false /* bindToCallerCheck */, false /* bindAsExternalService */, @@ -48,6 +49,7 @@ connection.setPid(pid); connection.start(false /* useStrongBinding */, null /* serviceCallback */); manager.increaseRecency(connection); + iterable.add(connection); connection.removeModerateBinding(); // Remove initial binding. return connection; } @@ -57,13 +59,16 @@ // Created in setUp() for convenience. BindingManager mManager; + List<ChildProcessConnection> mIterable; + @Before public void setUp() { // The tests run on only one thread. Pretend that is the launcher thread so LauncherThread // asserts are not triggered. LauncherThread.setCurrentThreadAsLauncherThread(); mActivity = Robolectric.buildActivity(Activity.class).setup().get(); - mManager = new BindingManager(mActivity, 4, true); + mIterable = new ArrayList<>(); + mManager = new BindingManager(mActivity, 4, mIterable, true); } @After @@ -82,7 +87,7 @@ ChildProcessConnection[] connections = new ChildProcessConnection[3]; for (int i = 0; i < connections.length; i++) { - connections[i] = createTestChildProcessConnection(i + 1 /* pid */, manager); + connections[i] = createTestChildProcessConnection(i + 1 /* pid */, manager, mIterable); } // Verify that each connection has a moderate binding after binding and releasing a strong @@ -134,7 +139,7 @@ ChildProcessConnection[] connections = new ChildProcessConnection[4]; for (int i = 0; i < connections.length; i++) { - connections[i] = createTestChildProcessConnection(i + 1 /* pid */, manager); + connections[i] = createTestChildProcessConnection(i + 1 /* pid */, manager, mIterable); } for (ChildProcessConnection connection : connections) { @@ -167,15 +172,17 @@ ChildProcessConnection[] connections = new ChildProcessConnection[4]; for (int i = 0; i < connections.length; i++) { - connections[i] = createTestChildProcessConnection(i + 1 /* pid */, manager); + connections[i] = createTestChildProcessConnection(i + 1 /* pid */, manager, mIterable); } for (Pair<Integer, Integer> pair : levelAndExpectedVictimCountList) { String message = "Failed for the level=" + pair.first; + mIterable.clear(); // Verify that each connection has a moderate binding after binding and releasing a // strong binding. for (ChildProcessConnection connection : connections) { manager.increaseRecency(connection); + mIterable.add(connection); Assert.assertTrue(message, connection.isModerateBindingBound()); } @@ -197,7 +204,7 @@ public void testModerateBindingTillBackgroundedSentToBackground() { BindingManager manager = mManager; - ChildProcessConnection connection = createTestChildProcessConnection(0, manager); + ChildProcessConnection connection = createTestChildProcessConnection(0, manager, mIterable); Assert.assertTrue(connection.isModerateBindingBound()); manager.onSentToBackground();
diff --git a/content/public/android/junit/src/org/chromium/content/browser/ChildProcessRankingTest.java b/content/public/android/junit/src/org/chromium/content/browser/ChildProcessRankingTest.java index aeb9a4d..615b0e1 100644 --- a/content/public/android/junit/src/org/chromium/content/browser/ChildProcessRankingTest.java +++ b/content/public/android/junit/src/org/chromium/content/browser/ChildProcessRankingTest.java
@@ -28,6 +28,12 @@ private void assertRankingAndRemoveAll( ChildProcessRanking ranking, ChildProcessConnection[] connections) { + int index = connections.length; + for (ChildProcessConnection c : ranking) { + Assert.assertEquals(connections[--index], c); + } + Assert.assertEquals(0, index); + for (int i = connections.length - 1; i >= 0; i--) { Assert.assertEquals(connections[i], ranking.getLowestRankedConnection()); ranking.removeConnection(connections[i]);
diff --git a/content/public/app/mojo/content_browser_manifest.json b/content/public/app/mojo/content_browser_manifest.json index c5f01ba..530d398 100644 --- a/content/public/app/mojo/content_browser_manifest.json +++ b/content/public/app/mojo/content_browser_manifest.json
@@ -41,6 +41,7 @@ "blink.mojom.FontUniqueNameLookup", "blink.mojom.EmbeddedFrameSinkProvider", "blink.mojom.FileUtilitiesHost", + "blink.mojom.FileSystemManager", "blink.mojom.LockManager", "blink.mojom.Hyphenation", "blink.mojom.MimeRegistry", @@ -167,6 +168,7 @@ "blink.mojom.MediaSessionService", "blink.mojom.NotificationService", "blink.mojom.PermissionService", + "blink.mojom.Portal", "blink.mojom.PrefetchURLLoaderService", "blink.mojom.PresentationService", "blink.mojom.QuotaDispatcherHost",
diff --git a/content/public/browser/authenticator_request_client_delegate.cc b/content/public/browser/authenticator_request_client_delegate.cc index b1b4e59..eca877b7 100644 --- a/content/public/browser/authenticator_request_client_delegate.cc +++ b/content/public/browser/authenticator_request_client_delegate.cc
@@ -16,7 +16,8 @@ AuthenticatorRequestClientDelegate::~AuthenticatorRequestClientDelegate() = default; -void AuthenticatorRequestClientDelegate::DidStartRequest() {} +void AuthenticatorRequestClientDelegate::DidStartRequest( + base::OnceClosure cancel_callback) {} bool AuthenticatorRequestClientDelegate::ShouldPermitIndividualAttestation( const std::string& relying_party_id) { @@ -40,7 +41,14 @@ } #endif -void AuthenticatorRequestClientDelegate::BluetoothAdapterIsAvailable() {} +void AuthenticatorRequestClientDelegate::UpdateLastTransportUsed( + device::FidoTransportProtocol transport) {} + +void AuthenticatorRequestClientDelegate::OnTransportAvailabilityEnumerated( + device::FidoRequestHandlerBase::TransportAvailabilityInfo data) {} + +void AuthenticatorRequestClientDelegate::BluetoothAdapterPowerChanged( + bool is_powered_on) {} void AuthenticatorRequestClientDelegate::FidoAuthenticatorAdded( const device::FidoAuthenticator& authenticator) {} @@ -48,7 +56,4 @@ void AuthenticatorRequestClientDelegate::FidoAuthenticatorRemoved( base::StringPiece device_id) {} -void AuthenticatorRequestClientDelegate::UpdateLastTransportUsed( - device::FidoTransportProtocol transport) {} - } // namespace content
diff --git a/content/public/browser/authenticator_request_client_delegate.h b/content/public/browser/authenticator_request_client_delegate.h index 2d49904..39a5277 100644 --- a/content/public/browser/authenticator_request_client_delegate.h +++ b/content/public/browser/authenticator_request_client_delegate.h
@@ -27,13 +27,13 @@ // // [1]: See https://www.w3.org/TR/webauthn/. class CONTENT_EXPORT AuthenticatorRequestClientDelegate - : public device::FidoRequestHandlerBase::AuthenticatorMapObserver { + : public device::FidoRequestHandlerBase::TransportAvailabilityObserver { public: AuthenticatorRequestClientDelegate(); ~AuthenticatorRequestClientDelegate() override; // Notifies the delegate that the request is actually starting. - virtual void DidStartRequest(); + virtual void DidStartRequest(base::OnceClosure cancel_callback); // Returns true if the given relying party ID is permitted to receive // individual attestation certificates. This: @@ -87,8 +87,10 @@ // WebAuthN UI will default to the same transport type during next API call. virtual void UpdateLastTransportUsed(device::FidoTransportProtocol transport); - // device::FidoRequestHandlerBase::AuthenticatorMapObserver: - void BluetoothAdapterIsAvailable() override; + // device::FidoRequestHandlerBase::TransportAvailabilityObserver: + void OnTransportAvailabilityEnumerated( + device::FidoRequestHandlerBase::TransportAvailabilityInfo data) override; + void BluetoothAdapterPowerChanged(bool is_powered_on) override; void FidoAuthenticatorAdded( const device::FidoAuthenticator& authenticator) override; void FidoAuthenticatorRemoved(base::StringPiece device_id) override;
diff --git a/content/public/browser/render_widget_host_view.h b/content/public/browser/render_widget_host_view.h index c4b2115..c662115 100644 --- a/content/public/browser/render_widget_host_view.h +++ b/content/public/browser/render_widget_host_view.h
@@ -141,12 +141,16 @@ // Returns the currently selected text. virtual base::string16 GetSelectedText() = 0; - // Returns the currently selected text with the text before and after it. + // Returns part of the text on the page which includes the selected text plus + // possibly several characters before and after it. virtual base::string16 GetSurroundingText() = 0; // Returns the range of the selection in the page. virtual gfx::Range GetSelectedRange() = 0; + // The offset of the surrounding text relative to the start of the total text. + virtual size_t GetOffsetForSurroundingText() = 0; + // This only returns non-null on platforms that implement touch // selection editing (TSE), currently Aura and (soon) Android. // TODO(wjmaclean): update this comment when OOPIF TSE is implemented on
diff --git a/content/public/browser/service_worker_context.h b/content/public/browser/service_worker_context.h index 29f847ad..61f14836 100644 --- a/content/public/browser/service_worker_context.h +++ b/content/public/browser/service_worker_context.h
@@ -39,7 +39,7 @@ // Something failed. FAILED = 5, // Add new result to record here. - NUM_TYPES + kMaxValue = FAILED, }; // Represents the per-StoragePartition service worker data.
diff --git a/content/public/browser/web_contents_observer.h b/content/public/browser/web_contents_observer.h index e40d67d..5d43ecc 100644 --- a/content/public/browser/web_contents_observer.h +++ b/content/public/browser/web_contents_observer.h
@@ -449,7 +449,8 @@ // Invoked when text selection is changed. virtual void DidChangeTextSelection(const base::string16& text, - const gfx::Range& range) {} + const gfx::Range& range, + size_t offset) {} // Invoked when media is playing or paused. |id| is unique per player and per // RenderFrameHost. There may be multiple players within a RenderFrameHost
diff --git a/content/public/browser/webrtc_event_logger.cc b/content/public/browser/webrtc_event_logger.cc index e61c7b2..b4de604d 100644 --- a/content/public/browser/webrtc_event_logger.cc +++ b/content/public/browser/webrtc_event_logger.cc
@@ -5,6 +5,7 @@ #include "content/public/browser/webrtc_event_logger.h" #include "base/logging.h" +#include "content/public/browser/browser_thread.h" namespace content { @@ -15,6 +16,7 @@ } WebRtcEventLogger::WebRtcEventLogger() { + DCHECK_CURRENTLY_ON(BrowserThread::UI); DCHECK(!g_webrtc_event_logger); g_webrtc_event_logger = this; // Checking that g_webrtc_event_logger was never set before, in a way that @@ -22,6 +24,7 @@ } WebRtcEventLogger::~WebRtcEventLogger() { + DCHECK_CURRENTLY_ON(BrowserThread::UI); DCHECK_EQ(g_webrtc_event_logger, this); g_webrtc_event_logger = nullptr; }
diff --git a/content/public/browser/webrtc_event_logger.h b/content/public/browser/webrtc_event_logger.h index 158745d0..664e659 100644 --- a/content/public/browser/webrtc_event_logger.h +++ b/content/public/browser/webrtc_event_logger.h
@@ -11,12 +11,8 @@ #include "base/files/file_path.h" #include "content/common/content_export.h" -class WebRTCInternalsIntegrationBrowserTest; - namespace content { -class BrowserContext; - // Interface for a logger of WebRTC events, which the embedding application may // subclass and instantiate. Only one instance may ever be created, and it must // live until the embedding application terminates. @@ -33,30 +29,6 @@ // not execute. virtual ~WebRtcEventLogger(); - // TODO(eladalon): Change from using BrowserContext to using Profile. - // https://crbug.com/775415 - - // Enables WebRTC event logging for a given BrowserContext: - // * Pending logs from previous sessions become eligible to be uploaded. - // * New logs for active peer connections *may* be recorded. (This does *not* - // start logging; it just makes it possible.) - // This function would typically be called during a BrowserContext's - // initialization. - // This function must not be called for an off-the-records BrowserContext. - // Local-logging is not associated with BrowserContexts, and is allowed even - // if EnableForBrowserContext is not called. That is, even for incognito mode. - virtual void EnableForBrowserContext(BrowserContext* browser_context, - base::OnceClosure reply) = 0; - - // Disables WebRTC event logging for a given BrowserContext. New remote-bound - // WebRTC event logs will no longer be created for this BrowserContext. - // This would typically be called when a BrowserContext is destroyed. One must - // therefore be careful note to call any of BrowserContext's virtual methods. - // TODO(eladalon): After changing to a Profile-centered interface, change this - // to not even receive a pointer. https://crbug.com/775415 - virtual void DisableForBrowserContext(const BrowserContext* browser_context, - base::OnceClosure reply) = 0; - // Call this to let the logger know when a PeerConnection was created. // |peer_connection_id| should be a non-empty, relatively short (i.e. // inexpensive to store) identifier, by which the peer connection may later @@ -127,15 +99,7 @@ base::OnceCallback<void(std::pair<bool, bool>)> reply) = 0; protected: - friend WebRTCInternalsIntegrationBrowserTest; // (PostNullTaskForTesting) - WebRtcEventLogger(); - - // Allows tests to synchronize with internal task queues (if such exist in - // the subclass). This allows tests to only examine products (such as log - // files) at a time when, if the program is behaving as expected, they would - // be guaranteed to be ready. - virtual void PostNullTaskForTesting(base::OnceClosure reply) = 0; }; } // namespace content
diff --git a/content/public/common/content_features.cc b/content/public/common/content_features.cc index 2157f33..11ee631 100644 --- a/content/public/common/content_features.cc +++ b/content/public/common/content_features.cc
@@ -295,6 +295,11 @@ const base::Feature kPassiveDocumentEventListeners{ "PassiveDocumentEventListeners", base::FEATURE_ENABLED_BY_DEFAULT}; +// Whether document level wheel and mousewheel event listeners should default +// 'passive' to true. +const base::Feature kPassiveDocumentWheelEventListeners{ + "PassiveDocumentWheelEventListeners", base::FEATURE_DISABLED_BY_DEFAULT}; + // Whether we should force a touchstart and first touchmove per scroll event // listeners to be non-blocking during fling. const base::Feature kPassiveEventListenersDueToFling{ @@ -574,6 +579,11 @@ const base::Feature kWebRtcUseEchoCanceller3{"WebRtcUseEchoCanceller3", base::FEATURE_DISABLED_BY_DEFAULT}; +// Enables the WebRTC Agc2 digital adaptation with WebRTC Agc1 analog +// adaptation. Feature for http://crbug.com/873650. Is sent to WebRTC. +const base::Feature kWebRtcHybridAgc{"WebRtcHybridAgc", + base::FEATURE_DISABLED_BY_DEFAULT}; + // Use GpuMemoryBuffer backed VideoFrames in media streams. const base::Feature kWebRtcUseGpuMemoryBufferVideoFrames{ "WebRTC-UseGpuMemoryBufferVideoFrames", base::FEATURE_ENABLED_BY_DEFAULT};
diff --git a/content/public/common/content_features.h b/content/public/common/content_features.h index a1a40a7..c3dcac0 100644 --- a/content/public/common/content_features.h +++ b/content/public/common/content_features.h
@@ -75,6 +75,7 @@ CONTENT_EXPORT extern const base::Feature kOriginTrials; CONTENT_EXPORT extern const base::Feature kPageLifecycle; CONTENT_EXPORT extern const base::Feature kPassiveDocumentEventListeners; +CONTENT_EXPORT extern const base::Feature kPassiveDocumentWheelEventListeners; CONTENT_EXPORT extern const base::Feature kPassiveEventListenersDueToFling; CONTENT_EXPORT extern const base::Feature kPdfIsolation; CONTENT_EXPORT extern const base::Feature kPerNavigationMojoInterface; @@ -129,6 +130,7 @@ CONTENT_EXPORT extern const base::Feature kWebRtcMultiplexCodec; CONTENT_EXPORT extern const base::Feature kWebRtcScreenshareSwEncoding; CONTENT_EXPORT extern const base::Feature kWebRtcUseEchoCanceller3; +CONTENT_EXPORT extern const base::Feature kWebRtcHybridAgc; CONTENT_EXPORT extern const base::Feature kWebRtcUseGpuMemoryBufferVideoFrames; CONTENT_EXPORT extern const base::Feature kWebUsb; CONTENT_EXPORT extern const base::Feature kWebVrVsyncAlign;
diff --git a/content/public/common/media_stream_request.cc b/content/public/common/media_stream_request.cc index 532cccd..1f18ec8 100644 --- a/content/public/common/media_stream_request.cc +++ b/content/public/common/media_stream_request.cc
@@ -18,11 +18,13 @@ bool IsVideoInputMediaType(MediaStreamType type) { return (type == MEDIA_DEVICE_VIDEO_CAPTURE || type == MEDIA_GUM_TAB_VIDEO_CAPTURE || - type == MEDIA_GUM_DESKTOP_VIDEO_CAPTURE); + type == MEDIA_GUM_DESKTOP_VIDEO_CAPTURE || + type == MEDIA_DISPLAY_VIDEO_CAPTURE); } bool IsScreenCaptureMediaType(MediaStreamType type) { - return (type == MEDIA_GUM_TAB_AUDIO_CAPTURE || + return (type == MEDIA_DISPLAY_VIDEO_CAPTURE || + type == MEDIA_GUM_TAB_AUDIO_CAPTURE || type == MEDIA_GUM_TAB_VIDEO_CAPTURE || type == MEDIA_GUM_DESKTOP_AUDIO_CAPTURE || type == MEDIA_GUM_DESKTOP_VIDEO_CAPTURE);
diff --git a/content/public/test/android/javatests/src/org/chromium/content/browser/test/mock/MockRenderFrameHost.java b/content/public/test/android/javatests/src/org/chromium/content/browser/test/mock/MockRenderFrameHost.java index ee11de9c..b4bd1727 100644 --- a/content/public/test/android/javatests/src/org/chromium/content/browser/test/mock/MockRenderFrameHost.java +++ b/content/public/test/android/javatests/src/org/chromium/content/browser/test/mock/MockRenderFrameHost.java
@@ -29,6 +29,9 @@ public void notifyUserActivation() {} @Override + public void executeJavaScriptForTests(String script, Callback<String> callback) {} + + @Override public boolean isIncognito() { return false; }
diff --git a/content/public/test/android/javatests/src/org/chromium/content/browser/test/mock/MockWebContents.java b/content/public/test/android/javatests/src/org/chromium/content/browser/test/mock/MockWebContents.java index 4d18417..90e75b2d 100644 --- a/content/public/test/android/javatests/src/org/chromium/content/browser/test/mock/MockWebContents.java +++ b/content/public/test/android/javatests/src/org/chromium/content/browser/test/mock/MockWebContents.java
@@ -76,6 +76,11 @@ } @Override + public RenderFrameHost getFocusedFrame() { + return renderFrameHost; + } + + @Override public String getTitle() { return null; }
diff --git a/content/public/test/browser_test_utils.cc b/content/public/test/browser_test_utils.cc index ad2d49a0..4c1cf83 100644 --- a/content/public/test/browser_test_utils.cc +++ b/content/public/test/browser_test_utils.cc
@@ -37,6 +37,7 @@ #include "content/browser/browser_plugin/browser_plugin_guest.h" #include "content/browser/browser_plugin/browser_plugin_message_filter.h" #include "content/browser/compositor/surface_utils.h" +#include "content/browser/fileapi/file_system_manager_impl.h" #include "content/browser/frame_host/cross_process_frame_connector.h" #include "content/browser/frame_host/frame_tree_node.h" #include "content/browser/frame_host/interstitial_page_impl.h" @@ -49,7 +50,6 @@ #include "content/browser/web_contents/web_contents_impl.h" #include "content/browser/web_contents/web_contents_view.h" #include "content/common/browser_plugin/browser_plugin_messages.h" -#include "content/common/fileapi/file_system_messages.h" #include "content/common/fileapi/webblob_messages.h" #include "content/common/frame_messages.h" #include "content/common/frame_visual_properties.h" @@ -105,6 +105,7 @@ #include "services/service_manager/public/cpp/connector.h" #include "storage/browser/fileapi/file_system_context.h" #include "testing/gtest/include/gtest/gtest.h" +#include "third_party/blink/public/mojom/filesystem/file_system.mojom.h" #include "ui/base/clipboard/clipboard.h" #include "ui/base/clipboard/scoped_clipboard_writer.h" #include "ui/base/resource/resource_bundle.h" @@ -2669,6 +2670,21 @@ process->GetChannel(), BlobHostMsg_RegisterPublicURL(url, uuid)); } +namespace { +blink::mojom::FileSystemManagerPtr GetFileSystemManager( + RenderProcessHost* rph) { + FileSystemManagerImpl* file_system = static_cast<RenderProcessHostImpl*>(rph) + ->GetFileSystemManagerForTesting(); + blink::mojom::FileSystemManagerPtr file_system_manager_ptr; + BrowserThread::PostTask( + BrowserThread::IO, FROM_HERE, + base::BindOnce(&FileSystemManagerImpl::BindRequest, + base::Unretained(file_system), + mojo::MakeRequest(&file_system_manager_ptr))); + return file_system_manager_ptr; +} +} // namespace + // static void PwnMessageHelper::FileSystemCreate(RenderProcessHost* process, int request_id, @@ -2676,17 +2692,14 @@ bool exclusive, bool is_directory, bool recursive) { - TestFileapiOperationWaiter waiter( - process->GetStoragePartition()->GetFileSystemContext()); - - IPC::IpcSecurityTestUtil::PwnMessageReceived( - process->GetChannel(), - FileSystemHostMsg_Create(request_id, path, exclusive, is_directory, - recursive)); - - // If this started an async operation, wait for it to complete. - if (waiter.did_start_update()) - waiter.WaitForEndUpdate(); + TestFileapiOperationWaiter waiter; + blink::mojom::FileSystemManagerPtr file_system_manager_ptr = + GetFileSystemManager(process); + file_system_manager_ptr->Create( + path, exclusive, is_directory, recursive, + base::BindOnce(&TestFileapiOperationWaiter::DidCreate, + base::Unretained(&waiter))); + waiter.WaitForOperationToFinish(); } // static @@ -2695,16 +2708,18 @@ GURL file_path, std::string blob_uuid, int64_t position) { - TestFileapiOperationWaiter waiter( - process->GetStoragePartition()->GetFileSystemContext()); + TestFileapiOperationWaiter waiter; + blink::mojom::FileSystemManagerPtr file_system_manager_ptr = + GetFileSystemManager(process); + blink::mojom::FileSystemOperationListenerPtr listener_ptr; + mojo::Binding<blink::mojom::FileSystemOperationListener> binding( + &waiter, mojo::MakeRequest(&listener_ptr)); + blink::mojom::FileSystemCancellableOperationPtr op_ptr; - IPC::IpcSecurityTestUtil::PwnMessageReceived( - process->GetChannel(), - FileSystemHostMsg_Write(request_id, file_path, blob_uuid, position)); - - // If this started an async operation, wait for it to complete. - if (waiter.did_start_update()) - waiter.WaitForEndUpdate(); + file_system_manager_ptr->Write(file_path, blob_uuid, position, + mojo::MakeRequest(&op_ptr), + std::move(listener_ptr)); + waiter.WaitForOperationToFinish(); } void PwnMessageHelper::LockMouse(RenderProcessHost* process,
diff --git a/content/public/test/test_fileapi_operation_waiter.cc b/content/public/test/test_fileapi_operation_waiter.cc index 211e88d8..1c5bfc5 100644 --- a/content/public/test/test_fileapi_operation_waiter.cc +++ b/content/public/test/test_fileapi_operation_waiter.cc
@@ -5,109 +5,36 @@ #include "content/public/test/test_fileapi_operation_waiter.h" #include "base/bind_helpers.h" -#include "base/lazy_instance.h" -#include "base/observer_list.h" -#include "content/public/browser/browser_thread.h" -#include "storage/browser/fileapi/file_system_context.h" -#include "storage/browser/fileapi/sandbox_file_system_backend_delegate.h" namespace content { -using storage::FileSystemContext; -using storage::FileSystemURL; -using storage::FileUpdateObserver; +TestFileapiOperationWaiter::TestFileapiOperationWaiter() = default; -namespace { +TestFileapiOperationWaiter::~TestFileapiOperationWaiter() = default; -// Because of how fileapi internally creates copies of its observer lists, -// removing an observer is not a supported operation. So to support temporary, -// test-style observers, we create one long-lived global observer instance that -// dispatches to a list of short-lived observers. -// -// This object operates on the UI thread, though it registers itself as an -// observer on the IO thread. -class FileUpdateObserverMultiplexer : public FileUpdateObserver { - public: - FileUpdateObserverMultiplexer() {} - - void AddObserver(FileSystemContext* context, FileUpdateObserver* observer) { - DCHECK_CURRENTLY_ON(BrowserThread::UI); - - // On first initialization, install ourself as an observer. We never - // uninstall, because we expect to leak. - if (!context_) { - // Currently we only listen to kFileSystemTypeTemporary; it should be fine - // to add other filesystem types as needed. - context_ = context; - base::Closure task = base::Bind( - &storage::SandboxFileSystemBackendDelegate::AddFileUpdateObserver, - base::Unretained(context_->sandbox_delegate()), - storage::kFileSystemTypeTemporary, base::Unretained(this), - base::RetainedRef( - BrowserThread::GetTaskRunnerForThread(BrowserThread::UI))); - BrowserThread::PostTask(BrowserThread::IO, FROM_HERE, std::move(task)); - } - - CHECK_EQ(context, context_) << "Multiprofile is not implemented"; - - observers_.AddObserver(observer); - } - - void RemoveObserver(FileUpdateObserver* observer) { - DCHECK_CURRENTLY_ON(BrowserThread::UI); - observers_.RemoveObserver(observer); - } - - // FileUpdateObserver overrides: - void OnStartUpdate(const FileSystemURL& url) override { - DCHECK_CURRENTLY_ON(BrowserThread::UI); - for (auto& observer : observers_) - observer.OnStartUpdate(url); - } - void OnUpdate(const FileSystemURL& url, int64_t delta) override { - DCHECK_CURRENTLY_ON(BrowserThread::UI); - for (auto& observer : observers_) - observer.OnUpdate(url, delta); - } - void OnEndUpdate(const FileSystemURL& url) override { - DCHECK_CURRENTLY_ON(BrowserThread::UI); - for (auto& observer : observers_) - observer.OnEndUpdate(url); - } - - private: - FileSystemContext* context_ = nullptr; - base::ObserverList<FileUpdateObserver> observers_; - DISALLOW_COPY_AND_ASSIGN(FileUpdateObserverMultiplexer); -}; - -static base::LazyInstance<FileUpdateObserverMultiplexer>::Leaky g_multiplexer = - LAZY_INSTANCE_INITIALIZER; - -} // namespace - -TestFileapiOperationWaiter::TestFileapiOperationWaiter( - FileSystemContext* context) { - g_multiplexer.Get().AddObserver(context, this); -} - -TestFileapiOperationWaiter::~TestFileapiOperationWaiter() { - g_multiplexer.Get().RemoveObserver(this); -} - -void TestFileapiOperationWaiter::WaitForEndUpdate() { +void TestFileapiOperationWaiter::WaitForOperationToFinish() { run_loop_.Run(); } -void TestFileapiOperationWaiter::OnStartUpdate(const FileSystemURL& url) { - did_start_update_ = true; +void TestFileapiOperationWaiter::DidCreate(base::File::Error error_code) { + run_loop_.Quit(); } -void TestFileapiOperationWaiter::OnUpdate(const FileSystemURL& url, - int64_t delta) {} +void TestFileapiOperationWaiter::ResultsRetrieved( + std::vector<filesystem::mojom::DirectoryEntryPtr> entries, + bool has_more) { + // blink::mojom::FileSystemManager::ReadDirectory isn't being called by tests + // right now, so this callback shouldn't be called. + NOTREACHED(); +} -void TestFileapiOperationWaiter::OnEndUpdate(const FileSystemURL& url) { +void TestFileapiOperationWaiter::ErrorOccurred(base::File::Error error_code) { run_loop_.Quit(); } +void TestFileapiOperationWaiter::DidWrite(int64_t byte_count, bool complete) { + if (complete) + run_loop_.Quit(); +} + } // namespace content
diff --git a/content/public/test/test_fileapi_operation_waiter.h b/content/public/test/test_fileapi_operation_waiter.h index 48ff6d9..18313fa 100644 --- a/content/public/test/test_fileapi_operation_waiter.h +++ b/content/public/test/test_fileapi_operation_waiter.h
@@ -8,37 +8,35 @@ #include <stdint.h> #include "base/compiler_specific.h" +#include "base/files/file.h" #include "base/macros.h" #include "base/run_loop.h" #include "storage/browser/fileapi/file_observers.h" - -namespace storage { -class FileSystemContext; -class FileSystemURL; -} +#include "third_party/blink/public/mojom/filesystem/file_system.mojom.h" namespace content { // Installs a temporary storage::FileUpdateObserver for use in browser tests // that need to wait for a specific fileapi operation to complete. -class TestFileapiOperationWaiter : public storage::FileUpdateObserver { +class TestFileapiOperationWaiter + : public blink::mojom::FileSystemOperationListener { public: - explicit TestFileapiOperationWaiter(storage::FileSystemContext* context); + TestFileapiOperationWaiter(); ~TestFileapiOperationWaiter() override; - // Returns true if OnStartUpdate has occurred. - bool did_start_update() { return did_start_update_; } + void WaitForOperationToFinish(); - // Wait for the next OnEndUpdate event. - void WaitForEndUpdate(); + // Callback for passing into blink::mojom::FileSystem::Create. + void DidCreate(base::File::Error error_code); - // FileUpdateObserver overrides. - void OnStartUpdate(const storage::FileSystemURL& url) override; - void OnUpdate(const storage::FileSystemURL& url, int64_t delta) override; - void OnEndUpdate(const storage::FileSystemURL& url) override; + // blink::mojom::FileSystemOperationListener + void ResultsRetrieved( + std::vector<filesystem::mojom::DirectoryEntryPtr> entries, + bool has_more) override; + void ErrorOccurred(base::File::Error error_code) override; + void DidWrite(int64_t byte_count, bool complete) override; private: - bool did_start_update_ = false; base::RunLoop run_loop_; DISALLOW_COPY_AND_ASSIGN(TestFileapiOperationWaiter);
diff --git a/content/renderer/accessibility/blink_ax_tree_source.cc b/content/renderer/accessibility/blink_ax_tree_source.cc index f43d721..6a5030c 100644 --- a/content/renderer/accessibility/blink_ax_tree_source.cc +++ b/content/renderer/accessibility/blink_ax_tree_source.cc
@@ -903,7 +903,7 @@ // TODO(nektar): Turn off kHTMLAccessibilityMode for automation and Mac // and remove ifdef. -#if defined(OS_WIN) +#if defined(OS_WIN) || defined(OS_CHROMEOS) if (dst->role == ax::mojom::Role::kMath && element.InnerHTML().length()) { TruncateAndAddStringAttribute(dst, ax::mojom::StringAttribute::kInnerHtml,
diff --git a/content/renderer/android/synchronous_compositor_proxy.h b/content/renderer/android/synchronous_compositor_proxy.h index 8319840..9615426 100644 --- a/content/renderer/android/synchronous_compositor_proxy.h +++ b/content/renderer/android/synchronous_compositor_proxy.h
@@ -130,6 +130,8 @@ // To browser. uint32_t version_ = 0; + // |total_scroll_offset_| and |max_scroll_offset_| are in physical pixel when + // use-zoom-for-dsf is enabled, otherwise in dip. gfx::ScrollOffset total_scroll_offset_; // Modified by both. gfx::ScrollOffset max_scroll_offset_; gfx::SizeF scrollable_size_;
diff --git a/content/renderer/fileapi/file_system_dispatcher.cc b/content/renderer/fileapi/file_system_dispatcher.cc index 77d8e5b..0e6f8504 100644 --- a/content/renderer/fileapi/file_system_dispatcher.cc +++ b/content/renderer/fileapi/file_system_dispatcher.cc
@@ -14,8 +14,10 @@ #include "base/process/process.h" #include "components/services/filesystem/public/interfaces/types.mojom.h" #include "content/child/child_thread_impl.h" -#include "content/common/fileapi/file_system_messages.h" +#include "content/public/common/service_names.mojom.h" +#include "services/service_manager/public/cpp/connector.h" #include "storage/common/fileapi/file_system_info.h" +#include "storage/common/fileapi/file_system_type_converters.h" namespace content { @@ -85,16 +87,17 @@ error_callback_.Run(error_code); } - void DidReadMetadata( - const base::File::Info& file_info) { + void DidReadMetadata(const base::File::Info& file_info) { metadata_callback_.Run(file_info); } void DidCreateSnapshotFile( const base::File::Info& file_info, const base::FilePath& platform_path, + base::Optional<blink::mojom::ReceivedSnapshotListenerPtr> opt_listener, int request_id) { - snapshot_callback_.Run(file_info, platform_path, request_id); + snapshot_callback_.Run(file_info, platform_path, std::move(opt_listener), + request_id); } void DidReadDirectory( @@ -103,8 +106,7 @@ directory_callback_.Run(entries, has_more); } - void DidOpenFileSystem(const std::string& name, - const GURL& root) { + void DidOpenFileSystem(const std::string& name, const GURL& root) { filesystem_callback_.Run(name, root); } @@ -134,8 +136,26 @@ DISALLOW_COPY_AND_ASSIGN(CallbackDispatcher); }; -FileSystemDispatcher::FileSystemDispatcher() { -} +class FileSystemDispatcher::FileSystemOperationListenerImpl + : public blink::mojom::FileSystemOperationListener { + public: + FileSystemOperationListenerImpl(int request_id, + FileSystemDispatcher* dispatcher) + : request_id_(request_id), dispatcher_(dispatcher) {} + + private: + // blink::mojom::FileSystemOperationListener + void ResultsRetrieved( + std::vector<filesystem::mojom::DirectoryEntryPtr> entries, + bool has_more) override; + void ErrorOccurred(base::File::Error error_code) override; + void DidWrite(int64_t byte_count, bool complete) override; + + const int request_id_; + FileSystemDispatcher* const dispatcher_; +}; + +FileSystemDispatcher::FileSystemDispatcher() {} FileSystemDispatcher::~FileSystemDispatcher() { // Make sure we fire all the remaining callbacks. @@ -150,21 +170,16 @@ } } -bool FileSystemDispatcher::OnMessageReceived(const IPC::Message& msg) { - bool handled = true; - IPC_BEGIN_MESSAGE_MAP(FileSystemDispatcher, msg) - IPC_MESSAGE_HANDLER(FileSystemMsg_DidOpenFileSystem, OnDidOpenFileSystem) - IPC_MESSAGE_HANDLER(FileSystemMsg_DidResolveURL, OnDidResolveURL) - IPC_MESSAGE_HANDLER(FileSystemMsg_DidSucceed, OnDidSucceed) - IPC_MESSAGE_HANDLER(FileSystemMsg_DidReadDirectory, OnDidReadDirectory) - IPC_MESSAGE_HANDLER(FileSystemMsg_DidReadMetadata, OnDidReadMetadata) - IPC_MESSAGE_HANDLER(FileSystemMsg_DidCreateSnapshotFile, - OnDidCreateSnapshotFile) - IPC_MESSAGE_HANDLER(FileSystemMsg_DidFail, OnDidFail) - IPC_MESSAGE_HANDLER(FileSystemMsg_DidWrite, OnDidWrite) - IPC_MESSAGE_UNHANDLED(handled = false) - IPC_END_MESSAGE_MAP() - return handled; +blink::mojom::FileSystemManager& FileSystemDispatcher::GetFileSystemManager() { + if (!file_system_manager_ptr_) { + ChildThreadImpl::current()->GetConnector()->BindInterface( + mojom::kBrowserServiceName, + mojo::MakeRequest(&file_system_manager_ptr_)); + file_system_manager_ptr_.set_connection_error_handler( + base::BindOnce(&FileSystemDispatcher::OnConnectionErrorHandler, + base::Unretained(this))); + } + return *file_system_manager_ptr_; } void FileSystemDispatcher::OpenFileSystem( @@ -174,8 +189,10 @@ const StatusCallback& error_callback) { int request_id = dispatchers_.Add( CallbackDispatcher::Create(success_callback, error_callback)); - ChildThreadImpl::current()->Send(new FileSystemHostMsg_OpenFileSystem( - request_id, origin_url, type)); + GetFileSystemManager().Open( + origin_url, mojo::ConvertTo<blink::mojom::FileSystemType>(type), + base::BindOnce(&FileSystemDispatcher::DidOpenFileSystem, + base::Unretained(this), request_id)); } void FileSystemDispatcher::ResolveURL( @@ -184,35 +201,39 @@ const StatusCallback& error_callback) { int request_id = dispatchers_.Add( CallbackDispatcher::Create(success_callback, error_callback)); - ChildThreadImpl::current()->Send(new FileSystemHostMsg_ResolveURL( - request_id, filesystem_url)); + GetFileSystemManager().ResolveURL( + filesystem_url, base::BindOnce(&FileSystemDispatcher::DidResolveURL, + base::Unretained(this), request_id)); } -void FileSystemDispatcher::Move( - const GURL& src_path, - const GURL& dest_path, - const StatusCallback& callback) { +void FileSystemDispatcher::Move(const GURL& src_path, + const GURL& dest_path, + const StatusCallback& callback) { int request_id = dispatchers_.Add(CallbackDispatcher::Create(callback)); - ChildThreadImpl::current()->Send(new FileSystemHostMsg_Move( - request_id, src_path, dest_path)); + GetFileSystemManager().Move( + src_path, dest_path, + base::BindOnce(&FileSystemDispatcher::DidFinish, base::Unretained(this), + request_id)); } -void FileSystemDispatcher::Copy( - const GURL& src_path, - const GURL& dest_path, - const StatusCallback& callback) { +void FileSystemDispatcher::Copy(const GURL& src_path, + const GURL& dest_path, + const StatusCallback& callback) { int request_id = dispatchers_.Add(CallbackDispatcher::Create(callback)); - ChildThreadImpl::current()->Send(new FileSystemHostMsg_Copy( - request_id, src_path, dest_path)); + GetFileSystemManager().Copy( + src_path, dest_path, + base::BindOnce(&FileSystemDispatcher::DidFinish, base::Unretained(this), + request_id)); } -void FileSystemDispatcher::Remove( - const GURL& path, - bool recursive, - const StatusCallback& callback) { +void FileSystemDispatcher::Remove(const GURL& path, + bool recursive, + const StatusCallback& callback) { int request_id = dispatchers_.Add(CallbackDispatcher::Create(callback)); - ChildThreadImpl::current()->Send( - new FileSystemHostMsg_Remove(request_id, path, recursive)); + GetFileSystemManager().Remove( + path, recursive, + base::BindOnce(&FileSystemDispatcher::DidFinish, base::Unretained(this), + request_id)); } void FileSystemDispatcher::ReadMetadata( @@ -221,37 +242,40 @@ const StatusCallback& error_callback) { int request_id = dispatchers_.Add( CallbackDispatcher::Create(success_callback, error_callback)); - ChildThreadImpl::current()->Send( - new FileSystemHostMsg_ReadMetadata(request_id, path)); + GetFileSystemManager().ReadMetadata( + path, base::BindOnce(&FileSystemDispatcher::DidReadMetadata, + base::Unretained(this), request_id)); } -void FileSystemDispatcher::CreateFile( - const GURL& path, - bool exclusive, - const StatusCallback& callback) { +void FileSystemDispatcher::CreateFile(const GURL& path, + bool exclusive, + const StatusCallback& callback) { int request_id = dispatchers_.Add(CallbackDispatcher::Create(callback)); - ChildThreadImpl::current()->Send(new FileSystemHostMsg_Create( - request_id, path, exclusive, - false /* is_directory */, false /* recursive */)); + GetFileSystemManager().Create( + path, exclusive, /*is_directory=*/false, /*is_recursive=*/false, + base::BindOnce(&FileSystemDispatcher::DidFinish, base::Unretained(this), + request_id)); } -void FileSystemDispatcher::CreateDirectory( - const GURL& path, - bool exclusive, - bool recursive, - const StatusCallback& callback) { +void FileSystemDispatcher::CreateDirectory(const GURL& path, + bool exclusive, + bool recursive, + const StatusCallback& callback) { int request_id = dispatchers_.Add(CallbackDispatcher::Create(callback)); - ChildThreadImpl::current()->Send(new FileSystemHostMsg_Create( - request_id, path, exclusive, true /* is_directory */, recursive)); + GetFileSystemManager().Create( + path, exclusive, true, recursive, + base::BindOnce(&FileSystemDispatcher::DidFinish, base::Unretained(this), + request_id)); } -void FileSystemDispatcher::Exists( - const GURL& path, - bool is_directory, - const StatusCallback& callback) { +void FileSystemDispatcher::Exists(const GURL& path, + bool is_directory, + const StatusCallback& callback) { int request_id = dispatchers_.Add(CallbackDispatcher::Create(callback)); - ChildThreadImpl::current()->Send( - new FileSystemHostMsg_Exists(request_id, path, is_directory)); + GetFileSystemManager().Exists( + path, is_directory, + base::BindOnce(&FileSystemDispatcher::DidFinish, base::Unretained(this), + request_id)); } void FileSystemDispatcher::ReadDirectory( @@ -260,8 +284,13 @@ const StatusCallback& error_callback) { int request_id = dispatchers_.Add( CallbackDispatcher::Create(success_callback, error_callback)); - ChildThreadImpl::current()->Send( - new FileSystemHostMsg_ReadDirectory(request_id, path)); + blink::mojom::FileSystemOperationListenerPtr ptr; + blink::mojom::FileSystemOperationListenerRequest request = + mojo::MakeRequest(&ptr); + op_listeners_.AddBinding( + std::make_unique<FileSystemOperationListenerImpl>(request_id, this), + std::move(request)); + GetFileSystemManager().ReadDirectory(path, std::move(ptr)); } void FileSystemDispatcher::Truncate(const GURL& path, @@ -269,8 +298,17 @@ int* request_id_out, const StatusCallback& callback) { int request_id = dispatchers_.Add(CallbackDispatcher::Create(callback)); - ChildThreadImpl::current()->Send( - new FileSystemHostMsg_Truncate(request_id, path, offset)); + blink::mojom::FileSystemCancellableOperationPtr op_ptr; + blink::mojom::FileSystemCancellableOperationRequest op_request = + mojo::MakeRequest(&op_ptr); + op_ptr.set_connection_error_handler( + base::BindOnce(&FileSystemDispatcher::RemoveOperationPtr, + base::Unretained(this), request_id)); + cancellable_operations_[request_id] = std::move(op_ptr); + GetFileSystemManager().Truncate( + path, offset, std::move(op_request), + base::BindOnce(&FileSystemDispatcher::DidTruncate, base::Unretained(this), + request_id)); if (request_id_out) *request_id_out = request_id; @@ -284,30 +322,51 @@ const StatusCallback& error_callback) { int request_id = dispatchers_.Add( CallbackDispatcher::Create(success_callback, error_callback)); - ChildThreadImpl::current()->Send( - new FileSystemHostMsg_Write(request_id, path, blob_id, offset)); + + blink::mojom::FileSystemCancellableOperationPtr op_ptr; + blink::mojom::FileSystemCancellableOperationRequest op_request = + mojo::MakeRequest(&op_ptr); + op_ptr.set_connection_error_handler( + base::BindOnce(&FileSystemDispatcher::RemoveOperationPtr, + base::Unretained(this), request_id)); + cancellable_operations_[request_id] = std::move(op_ptr); + + blink::mojom::FileSystemOperationListenerPtr listener_ptr; + blink::mojom::FileSystemOperationListenerRequest request = + mojo::MakeRequest(&listener_ptr); + op_listeners_.AddBinding( + std::make_unique<FileSystemOperationListenerImpl>(request_id, this), + std::move(request)); + + GetFileSystemManager().Write(path, blob_id, offset, std::move(op_request), + std::move(listener_ptr)); if (request_id_out) *request_id_out = request_id; } -void FileSystemDispatcher::Cancel( - int request_id_to_cancel, - const StatusCallback& callback) { +void FileSystemDispatcher::Cancel(int request_id_to_cancel, + const StatusCallback& callback) { int request_id = dispatchers_.Add(CallbackDispatcher::Create(callback)); - ChildThreadImpl::current()->Send(new FileSystemHostMsg_CancelWrite( - request_id, request_id_to_cancel)); + if (cancellable_operations_.find(request_id_to_cancel) == + cancellable_operations_.end()) { + DidFail(request_id, base::File::FILE_ERROR_INVALID_OPERATION); + return; + } + cancellable_operations_[request_id_to_cancel]->Cancel( + base::BindOnce(&FileSystemDispatcher::DidCancel, base::Unretained(this), + request_id, request_id_to_cancel)); } -void FileSystemDispatcher::TouchFile( - const GURL& path, - const base::Time& last_access_time, - const base::Time& last_modified_time, - const StatusCallback& callback) { +void FileSystemDispatcher::TouchFile(const GURL& path, + const base::Time& last_access_time, + const base::Time& last_modified_time, + const StatusCallback& callback) { int request_id = dispatchers_.Add(CallbackDispatcher::Create(callback)); - ChildThreadImpl::current()->Send( - new FileSystemHostMsg_TouchFile( - request_id, path, last_access_time, last_modified_time)); + GetFileSystemManager().TouchFile( + path, last_access_time, last_modified_time, + base::BindOnce(&FileSystemDispatcher::DidFinish, base::Unretained(this), + request_id)); } void FileSystemDispatcher::CreateSnapshotFile( @@ -316,83 +375,158 @@ const StatusCallback& error_callback) { int request_id = dispatchers_.Add( CallbackDispatcher::Create(success_callback, error_callback)); - ChildThreadImpl::current()->Send( - new FileSystemHostMsg_CreateSnapshotFile( - request_id, file_path)); + GetFileSystemManager().CreateSnapshotFile( + file_path, base::BindOnce(&FileSystemDispatcher::DidCreateSnapshotFile, + base::Unretained(this), request_id)); } -void FileSystemDispatcher::OnDidOpenFileSystem(int request_id, - const std::string& name, - const GURL& root) { - DCHECK(root.is_valid()); - CallbackDispatcher* dispatcher = dispatchers_.Lookup(request_id); - DCHECK(dispatcher); - dispatcher->DidOpenFileSystem(name, root); - dispatchers_.Remove(request_id); +void FileSystemDispatcher::DidOpenFileSystem(int request_id, + const std::string& name, + const GURL& root, + base::File::Error error_code) { + if (error_code == base::File::Error::FILE_OK) { + CallbackDispatcher* dispatcher = dispatchers_.Lookup(request_id); + DCHECK(dispatcher); + dispatcher->DidOpenFileSystem(name, root); + dispatchers_.Remove(request_id); + } else { + DidFail(request_id, error_code); + } } -void FileSystemDispatcher::OnDidResolveURL(int request_id, - const storage::FileSystemInfo& info, - const base::FilePath& file_path, - bool is_directory) { - DCHECK(info.root_url.is_valid()); - CallbackDispatcher* dispatcher = dispatchers_.Lookup(request_id); - DCHECK(dispatcher); - dispatcher->DidResolveURL(info, file_path, is_directory); - dispatchers_.Remove(request_id); +void FileSystemDispatcher::DidResolveURL(int request_id, + blink::mojom::FileSystemInfoPtr info, + const base::FilePath& file_path, + bool is_directory, + base::File::Error error_code) { + if (error_code == base::File::Error::FILE_OK) { + DCHECK(info->root_url.is_valid()); + CallbackDispatcher* dispatcher = dispatchers_.Lookup(request_id); + DCHECK(dispatcher); + dispatcher->DidResolveURL(mojo::ConvertTo<storage::FileSystemInfo>(info), + file_path, is_directory); + dispatchers_.Remove(request_id); + } else { + DidFail(request_id, error_code); + } } -void FileSystemDispatcher::OnDidSucceed(int request_id) { - CallbackDispatcher* dispatcher = dispatchers_.Lookup(request_id); - DCHECK(dispatcher); - dispatcher->DidSucceed(); - dispatchers_.Remove(request_id); +void FileSystemDispatcher::DidFinish(int request_id, + base::File::Error error_code) { + if (error_code == base::File::Error::FILE_OK) { + CallbackDispatcher* dispatcher = dispatchers_.Lookup(request_id); + DCHECK(dispatcher); + dispatcher->DidSucceed(); + dispatchers_.Remove(request_id); + } else { + DidFail(request_id, error_code); + } } -void FileSystemDispatcher::OnDidReadMetadata( - int request_id, const base::File::Info& file_info) { - CallbackDispatcher* dispatcher = dispatchers_.Lookup(request_id); - DCHECK(dispatcher); - dispatcher->DidReadMetadata(file_info); - dispatchers_.Remove(request_id); +void FileSystemDispatcher::DidReadMetadata(int request_id, + const base::File::Info& file_info, + base::File::Error error_code) { + if (error_code == base::File::FILE_OK) { + CallbackDispatcher* dispatcher = dispatchers_.Lookup(request_id); + DCHECK(dispatcher); + dispatcher->DidReadMetadata(file_info); + dispatchers_.Remove(request_id); + } else { + DidFail(request_id, error_code); + } } -void FileSystemDispatcher::OnDidCreateSnapshotFile( - int request_id, const base::File::Info& file_info, - const base::FilePath& platform_path) { - CallbackDispatcher* dispatcher = dispatchers_.Lookup(request_id); - DCHECK(dispatcher); - dispatcher->DidCreateSnapshotFile(file_info, platform_path, request_id); - dispatchers_.Remove(request_id); -} - -void FileSystemDispatcher::OnDidReadDirectory( +void FileSystemDispatcher::DidCreateSnapshotFile( int request_id, - const std::vector<filesystem::mojom::DirectoryEntry>& entries, + const base::File::Info& file_info, + const base::FilePath& platform_path, + base::File::Error error_code, + blink::mojom::ReceivedSnapshotListenerPtr listener) { + base::Optional<blink::mojom::ReceivedSnapshotListenerPtr> opt_listener; + if (listener) + opt_listener = std::move(listener); + if (error_code == base::File::FILE_OK) { + CallbackDispatcher* dispatcher = dispatchers_.Lookup(request_id); + DCHECK(dispatcher); + dispatcher->DidCreateSnapshotFile(file_info, platform_path, + std::move(opt_listener), request_id); + dispatchers_.Remove(request_id); + } else { + DidFail(request_id, error_code); + } +} + +void FileSystemDispatcher::DidReadDirectory( + int request_id, + std::vector<filesystem::mojom::DirectoryEntryPtr> entries, bool has_more) { CallbackDispatcher* dispatcher = dispatchers_.Lookup(request_id); DCHECK(dispatcher); - dispatcher->DidReadDirectory(entries, has_more); + std::vector<filesystem::mojom::DirectoryEntry> entries_copy; + for (const auto& entry : entries) { + entries_copy.push_back(*entry); + } + dispatcher->DidReadDirectory(std::move(entries_copy), has_more); if (!has_more) dispatchers_.Remove(request_id); } -void FileSystemDispatcher::OnDidFail( - int request_id, base::File::Error error_code) { +void FileSystemDispatcher::DidFail(int request_id, + base::File::Error error_code) { CallbackDispatcher* dispatcher = dispatchers_.Lookup(request_id); DCHECK(dispatcher); dispatcher->DidFail(error_code); dispatchers_.Remove(request_id); } -void FileSystemDispatcher::OnDidWrite(int request_id, - int64_t bytes, - bool complete) { +void FileSystemDispatcher::DidWrite(int request_id, + int64_t bytes, + bool complete) { CallbackDispatcher* dispatcher = dispatchers_.Lookup(request_id); DCHECK(dispatcher); dispatcher->DidWrite(bytes, complete); - if (complete) + if (complete) { dispatchers_.Remove(request_id); + RemoveOperationPtr(request_id); + } +} + +void FileSystemDispatcher::DidTruncate(int request_id, + base::File::Error error_code) { + // If |error_code| is ABORT, it means the operation was cancelled, + // so we let DidCancel clean up the interface pointer. + if (error_code != base::File::FILE_ERROR_ABORT) + RemoveOperationPtr(request_id); + DidFinish(request_id, error_code); +} + +void FileSystemDispatcher::DidCancel(int request_id, + int cancelled_request_id, + base::File::Error error_code) { + if (error_code == base::File::FILE_OK) + RemoveOperationPtr(cancelled_request_id); + DidFinish(request_id, error_code); +} + +void FileSystemDispatcher::OnConnectionErrorHandler() { + file_system_manager_ptr_.reset(); +} + +void FileSystemDispatcher::FileSystemOperationListenerImpl::ResultsRetrieved( + std::vector<filesystem::mojom::DirectoryEntryPtr> entries, + bool has_more) { + dispatcher_->DidReadDirectory(request_id_, std::move(entries), has_more); +} + +void FileSystemDispatcher::FileSystemOperationListenerImpl::ErrorOccurred( + base::File::Error error_code) { + dispatcher_->DidFail(request_id_, error_code); +} + +void FileSystemDispatcher::FileSystemOperationListenerImpl::DidWrite( + int64_t byte_count, + bool complete) { + dispatcher_->DidWrite(request_id_, byte_count, complete); } } // namespace content
diff --git a/content/renderer/fileapi/file_system_dispatcher.h b/content/renderer/fileapi/file_system_dispatcher.h index 676e471..c913ad15 100644 --- a/content/renderer/fileapi/file_system_dispatcher.h +++ b/content/renderer/fileapi/file_system_dispatcher.h
@@ -18,8 +18,10 @@ #include "components/services/filesystem/public/interfaces/types.mojom.h" #include "ipc/ipc_listener.h" #include "ipc/ipc_platform_file.h" +#include "mojo/public/cpp/bindings/strong_binding_set.h" #include "storage/common/fileapi/file_system_types.h" #include "storage/common/quota/quota_limit_type.h" +#include "third_party/blink/public/mojom/filesystem/file_system.mojom.h" namespace base { class FilePath; @@ -32,18 +34,21 @@ class GURL; namespace content { +class FileSystemOperationListenerImpl; // Dispatches and sends file system related messages sent to/from a child // process from/to the main browser process. There is one instance -// per child process. Messages are dispatched on the main child thread. -class FileSystemDispatcher : public IPC::Listener { +// per child process. +class FileSystemDispatcher { public: typedef base::Callback<void(base::File::Error error)> StatusCallback; typedef base::Callback<void(const base::File::Info& file_info)> MetadataCallback; - typedef base::Callback<void(const base::File::Info& file_info, - const base::FilePath& platform_path, - int request_id)> + typedef base::Callback<void( + const base::File::Info& file_info, + const base::FilePath& platform_path, + base::Optional<blink::mojom::ReceivedSnapshotListenerPtr> opt_listener, + int request_id)> CreateSnapshotFileCallback; typedef base::Callback<void( @@ -64,10 +69,7 @@ OpenFileCallback; FileSystemDispatcher(); - ~FileSystemDispatcher() override; - - // IPC::Listener implementation. - bool OnMessageReceived(const IPC::Message& msg) override; + ~FileSystemDispatcher(); void OpenFileSystem(const GURL& origin_url, storage::FileSystemType type, @@ -114,40 +116,65 @@ const base::Time& last_access_time, const base::Time& last_modified_time, const StatusCallback& callback); - - // The caller must send FileSystemHostMsg_DidReceiveSnapshot message - // with |request_id| passed to |success_callback| after the snapshot file - // is successfully received. void CreateSnapshotFile(const GURL& file_path, const CreateSnapshotFileCallback& success_callback, const StatusCallback& error_callback); private: class CallbackDispatcher; + class FileSystemOperationListenerImpl; - // Message handlers. - void OnDidOpenFileSystem(int request_id, - const std::string& name, - const GURL& root); - void OnDidResolveURL(int request_id, - const storage::FileSystemInfo& info, - const base::FilePath& file_path, - bool is_directory); - void OnDidSucceed(int request_id); - void OnDidReadMetadata(int request_id, - const base::File::Info& file_info); - void OnDidCreateSnapshotFile(int request_id, - const base::File::Info& file_info, - const base::FilePath& platform_path); - void OnDidReadDirectory( + void DidOpenFileSystem(int request_id, + const std::string& name, + const GURL& root, + base::File::Error error_code); + void DidResolveURL(int request_id, + blink::mojom::FileSystemInfoPtr info, + const base::FilePath& file_path, + bool is_directory, + base::File::Error error_code); + void DidFinish(int request_id, base::File::Error error_code); + void DidReadMetadata(int request_id, + const base::File::Info& file_info, + base::File::Error error); + void DidCreateSnapshotFile( int request_id, - const std::vector<filesystem::mojom::DirectoryEntry>& entries, + const base::File::Info& file_info, + const base::FilePath& platform_path, + base::File::Error error_code, + blink::mojom::ReceivedSnapshotListenerPtr listener); + void DidReadDirectory( + int request_id, + std::vector<filesystem::mojom::DirectoryEntryPtr> entries, bool has_more); - void OnDidFail(int request_id, base::File::Error error_code); - void OnDidWrite(int request_id, int64_t bytes, bool complete); + void DidFail(int request_id, base::File::Error error_code); + void DidWrite(int request_id, int64_t bytes, bool complete); + void DidTruncate(int request_id, base::File::Error error_code); + void DidCancel(int request_id, + int cancelled_request_id, + base::File::Error error_code); + + void RemoveOperationPtr(int request_id) { + DCHECK(cancellable_operations_.find(request_id) != + cancellable_operations_.end()); + cancellable_operations_.erase(request_id); + } + + void OnConnectionErrorHandler(); + + blink::mojom::FileSystemManager& GetFileSystemManager(); + + blink::mojom::FileSystemManagerPtr file_system_manager_ptr_; base::IDMap<std::unique_ptr<CallbackDispatcher>> dispatchers_; + mojo::StrongBindingSet<blink::mojom::FileSystemOperationListener> + op_listeners_; + + using OperationsMap = + std::unordered_map<int, blink::mojom::FileSystemCancellableOperationPtr>; + OperationsMap cancellable_operations_; + DISALLOW_COPY_AND_ASSIGN(FileSystemDispatcher); };
diff --git a/content/renderer/fileapi/webfilesystem_impl.cc b/content/renderer/fileapi/webfilesystem_impl.cc index f5969dc7..95ed24c1 100644 --- a/content/renderer/fileapi/webfilesystem_impl.cc +++ b/content/renderer/fileapi/webfilesystem_impl.cc
@@ -18,7 +18,6 @@ #include "base/threading/thread_local.h" #include "base/threading/thread_task_runner_handle.h" #include "components/services/filesystem/public/interfaces/types.mojom.h" -#include "content/common/fileapi/file_system_messages.h" #include "content/renderer/file_info_util.h" #include "content/renderer/fileapi/file_system_dispatcher.h" #include "content/renderer/fileapi/webfilewriter_impl.h" @@ -88,12 +87,6 @@ base::LazyInstance<base::ThreadLocalPointer<WebFileSystemImpl>>::Leaky g_webfilesystem_tls = LAZY_INSTANCE_INITIALIZER; -void DidReceiveSnapshotFile(int request_id) { - if (ChildThreadImpl::current()) - ChildThreadImpl::current()->Send( - new FileSystemHostMsg_DidReceiveSnapshotFile(request_id)); -} - template <typename Method, typename Params> void CallDispatcherOnMainThread( const scoped_refptr<base::SingleThreadTaskRunner>& main_thread_task_runner, @@ -336,6 +329,7 @@ const scoped_refptr<base::SingleThreadTaskRunner>& main_thread_task_runner, const base::File::Info& file_info, const base::FilePath& platform_path, + base::Optional<blink::mojom::ReceivedSnapshotListenerPtr> opt_listener, int request_id) { WebFileSystemImpl* filesystem = WebFileSystemImpl::ThreadSpecificInstance(nullptr); @@ -352,8 +346,14 @@ // TODO(michaeln,kinuko): Use ThreadSafeSender when Blob becomes // non-bridge model. - main_thread_task_runner->PostTask( - FROM_HERE, base::BindOnce(&DidReceiveSnapshotFile, request_id)); + if (opt_listener) { + main_thread_task_runner->PostTask( + FROM_HERE, base::BindOnce( + [](blink::mojom::ReceivedSnapshotListenerPtr listener) { + listener->DidReceiveSnapshotFile(); + }, + std::move(opt_listener.value()))); + } } void CreateSnapshotFileCallbackAdapter( @@ -363,11 +363,13 @@ const scoped_refptr<base::SingleThreadTaskRunner>& main_thread_task_runner, const base::File::Info& file_info, const base::FilePath& platform_path, + base::Optional<blink::mojom::ReceivedSnapshotListenerPtr> opt_listener, int request_id) { DispatchResultsClosure( task_runner, callbacks_id, waitable_results, base::Bind(&DidCreateSnapshotFile, callbacks_id, main_thread_task_runner, - file_info, platform_path, request_id)); + file_info, platform_path, base::Passed(&opt_listener), + request_id)); } } // namespace
diff --git a/content/renderer/media/stream/media_stream_audio_processor.cc b/content/renderer/media/stream/media_stream_audio_processor.cc index 536537cc..bb99d12 100644 --- a/content/renderer/media/stream/media_stream_audio_processor.cc +++ b/content/renderer/media/stream/media_stream_audio_processor.cc
@@ -589,8 +589,12 @@ // If the experimental AGC is enabled, check for overridden config params. if (properties.goog_experimental_auto_gain_control) { auto startup_min_volume = GetStartupMinVolumeForAgc(); - config.Set<webrtc::ExperimentalAgc>( - new webrtc::ExperimentalAgc(true, startup_min_volume.value_or(0))); + auto* experimental_agc = + new webrtc::ExperimentalAgc(true, startup_min_volume.value_or(0)); + experimental_agc->digital_adaptive_disabled = + base::FeatureList::IsEnabled(features::kWebRtcHybridAgc); + + config.Set<webrtc::ExperimentalAgc>(experimental_agc); } // Create and configure the webrtc::AudioProcessing. @@ -612,8 +616,6 @@ audio_processing_.reset(ap_builder.Create(config)); // Enable the audio processing components. - webrtc::AudioProcessing::Config apm_config; - if (playout_data_source_) { playout_data_source_->AddPlayoutSink(this); } @@ -633,8 +635,6 @@ if (properties.goog_noise_suppression) EnableNoiseSuppression(audio_processing_.get(), NoiseSuppression::kHigh); - apm_config.high_pass_filter.enabled = properties.goog_highpass_filter; - if (goog_typing_detection) { // TODO(xians): Remove this |typing_detector_| after the typing suppression // is enabled by default. @@ -645,6 +645,14 @@ if (properties.goog_auto_gain_control) EnableAutomaticGainControl(audio_processing_.get()); + webrtc::AudioProcessing::Config apm_config = audio_processing_->GetConfig(); + apm_config.high_pass_filter.enabled = properties.goog_highpass_filter; + + if (properties.goog_experimental_auto_gain_control) { + apm_config.gain_controller2.enabled = + base::FeatureList::IsEnabled(features::kWebRtcHybridAgc); + apm_config.gain_controller2.fixed_gain_db = 0.f; + } audio_processing_->ApplyConfig(apm_config); RecordProcessingState(AUDIO_PROCESSING_ENABLED);
diff --git a/content/renderer/media/stream/media_stream_audio_processor_options.cc b/content/renderer/media/stream/media_stream_audio_processor_options.cc index 7a5a6274..68d09fe 100644 --- a/content/renderer/media/stream/media_stream_audio_processor_options.cc +++ b/content/renderer/media/stream/media_stream_audio_processor_options.cc
@@ -202,13 +202,17 @@ } void EnableEchoCancellation(AudioProcessing* audio_processing) { + // TODO(bugs.webrtc.org/9535): Remove double-booking AEC toggle when the + // config applies (from 2018-08-16). + webrtc::AudioProcessing::Config apm_config = audio_processing->GetConfig(); + apm_config.echo_canceller.enabled = true; #if defined(OS_ANDROID) // Mobile devices are using AECM. CHECK_EQ(0, audio_processing->echo_control_mobile()->set_routing_mode( webrtc::EchoControlMobile::kSpeakerphone)); CHECK_EQ(0, audio_processing->echo_control_mobile()->Enable(true)); - return; -#endif + apm_config.echo_canceller.mobile_mode = true; +#else int err = audio_processing->echo_cancellation()->set_suppression_level( webrtc::EchoCancellation::kHighSuppression); @@ -217,6 +221,9 @@ err |= audio_processing->echo_cancellation()->enable_delay_logging(true); err |= audio_processing->echo_cancellation()->Enable(true); CHECK_EQ(err, 0); + apm_config.echo_canceller.mobile_mode = false; +#endif + audio_processing->ApplyConfig(apm_config); } void EnableNoiseSuppression(AudioProcessing* audio_processing,
diff --git a/content/renderer/media/stream/user_media_processor.cc b/content/renderer/media/stream/user_media_processor.cc index a6f73a1b..150e73c 100644 --- a/content/renderer/media/stream/user_media_processor.cc +++ b/content/renderer/media/stream/user_media_processor.cc
@@ -82,6 +82,15 @@ void InitializeVideoTrackControls(const blink::WebUserMediaRequest& web_request, TrackControls* track_controls) { + if (web_request.MediaRequestType() == + blink::WebUserMediaRequest::MediaType::kDisplayMedia) { + track_controls->requested = true; + track_controls->stream_type = MEDIA_DISPLAY_VIDEO_CAPTURE; + return; + } + + DCHECK_EQ(blink::WebUserMediaRequest::MediaType::kUserMedia, + web_request.MediaRequestType()); const blink::WebMediaConstraints& constraints = web_request.VideoConstraints(); DCHECK(!constraints.IsNull()); @@ -554,9 +563,16 @@ GenerateStreamForCurrentRequestInfo(); return; } + auto& video_controls = current_request_info_->stream_controls()->video; InitializeVideoTrackControls(current_request_info_->web_request(), &video_controls); + + if (video_controls.stream_type == MEDIA_DISPLAY_VIDEO_CAPTURE) { + SelectVideoContentSettings(false /* allow_device_id_constraint */); + return; + } + if (IsDeviceMediaType(video_controls.stream_type)) { GetMediaDevicesDispatcher()->GetVideoInputCapabilities(base::BindOnce( &UserMediaProcessor::SelectVideoDeviceSettings, @@ -572,7 +588,7 @@ GetUserMediaRequestFailed(result, failed_constraint_name); return; } - SelectVideoContentSettings(); + SelectVideoContentSettings(true /* allow_device_id_constraint */); } } @@ -622,7 +638,8 @@ GenerateStreamForCurrentRequestInfo(); } -void UserMediaProcessor::SelectVideoContentSettings() { +void UserMediaProcessor::SelectVideoContentSettings( + bool allow_device_id_constraint) { DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_); DCHECK(current_request_info_); gfx::Size screen_size = GetScreenSize(); @@ -638,8 +655,10 @@ failed_constraint_name); return; } - current_request_info_->stream_controls()->video.device_id = - settings.device_id(); + if (allow_device_id_constraint) { + current_request_info_->stream_controls()->video.device_id = + settings.device_id(); + } current_request_info_->SetVideoCaptureSettings(settings, true /* is_content_capture */); GenerateStreamForCurrentRequestInfo();
diff --git a/content/renderer/media/stream/user_media_processor.h b/content/renderer/media/stream/user_media_processor.h index 5e29c9b..6b9e18f8 100644 --- a/content/renderer/media/stream/user_media_processor.h +++ b/content/renderer/media/stream/user_media_processor.h
@@ -270,7 +270,7 @@ void FinalizeSelectVideoDeviceSettings( const blink::WebUserMediaRequest& web_request, const VideoCaptureSettings& settings); - void SelectVideoContentSettings(); + void SelectVideoContentSettings(bool allow_device_id_constraint); void GenerateStreamForCurrentRequestInfo();
diff --git a/content/renderer/media_recorder/vea_encoder.cc b/content/renderer/media_recorder/vea_encoder.cc index 761c6a1e..0a81de0 100644 --- a/content/renderer/media_recorder/vea_encoder.cc +++ b/content/renderer/media_recorder/vea_encoder.cc
@@ -75,6 +75,11 @@ } VEAEncoder::~VEAEncoder() { + if (encoding_task_runner_->BelongsToCurrentThread()) { + DestroyOnEncodingTaskRunner(); + return; + } + base::WaitableEvent release_waiter( base::WaitableEvent::ResetPolicy::MANUAL, base::WaitableEvent::InitialState::NOT_SIGNALED); @@ -276,7 +281,8 @@ base::WaitableEvent* async_waiter) { DCHECK(encoding_task_runner_->BelongsToCurrentThread()); video_encoder_.reset(); - async_waiter->Signal(); + if (async_waiter) + async_waiter->Signal(); } } // namespace content
diff --git a/content/renderer/media_recorder/vea_encoder.h b/content/renderer/media_recorder/vea_encoder.h index 1a74ae3c..2ef80c76 100644 --- a/content/renderer/media_recorder/vea_encoder.h +++ b/content/renderer/media_recorder/vea_encoder.h
@@ -70,7 +70,7 @@ void ConfigureEncoderOnEncodingTaskRunner(const gfx::Size& size); - void DestroyOnEncodingTaskRunner(base::WaitableEvent* async_waiter); + void DestroyOnEncodingTaskRunner(base::WaitableEvent* async_waiter = nullptr); media::GpuVideoAcceleratorFactories* const gpu_factories_;
diff --git a/content/renderer/media_recorder/video_track_recorder.cc b/content/renderer/media_recorder/video_track_recorder.cc index 9651610..8e53b80 100644 --- a/content/renderer/media_recorder/video_track_recorder.cc +++ b/content/renderer/media_recorder/video_track_recorder.cc
@@ -163,6 +163,23 @@ } // anonymous namespace +VideoTrackRecorder::Counter::Counter() : count_(0u), weak_factory_(this) {} + +VideoTrackRecorder::Counter::~Counter() = default; + +void VideoTrackRecorder::Counter::IncreaseCount() { + count_++; +} + +void VideoTrackRecorder::Counter::DecreaseCount() { + count_--; +} + +base::WeakPtr<VideoTrackRecorder::Counter> +VideoTrackRecorder::Counter::GetWeakPtr() { + return weak_factory_.GetWeakPtr(); +} + VideoTrackRecorder::Encoder::Encoder( const OnEncodedVideoCB& on_encoded_video_callback, int32_t bits_per_second, @@ -173,7 +190,7 @@ paused_(false), on_encoded_video_callback_(on_encoded_video_callback), bits_per_second_(bits_per_second), - num_frames_in_encode_(0) { + num_frames_in_encode_(std::make_unique<VideoTrackRecorder::Counter>()) { DCHECK(!on_encoded_video_callback_.is_null()); if (encoding_task_runner_) return; @@ -184,6 +201,10 @@ VideoTrackRecorder::Encoder::~Encoder() { main_task_runner_->DeleteSoon(FROM_HERE, video_renderer_.release()); + if (origin_task_runner_ && !origin_task_runner_->BelongsToCurrentThread()) { + origin_task_runner_->DeleteSoon(FROM_HERE, + std::move(num_frames_in_encode_)); + } } void VideoTrackRecorder::Encoder::StartFrameEncode( @@ -204,7 +225,7 @@ return; } - if (num_frames_in_encode_ > kMaxNumberOfFramesInEncode) { + if (num_frames_in_encode_->count() > kMaxNumberOfFramesInEncode) { DLOG(WARNING) << "Too many frames are queued up. Dropping this one."; return; } @@ -226,9 +247,13 @@ video_frame, video_frame->format(), video_frame->visible_rect(), video_frame->natural_size()); } - wrapped_frame->AddDestructionObserver(media::BindToCurrentLoop(base::Bind( - &VideoTrackRecorder::Encoder::FrameReleased, this, video_frame))); - ++num_frames_in_encode_; + wrapped_frame->AddDestructionObserver(media::BindToCurrentLoop( + base::BindOnce(&VideoTrackRecorder::Counter::DecreaseCount, + num_frames_in_encode_->GetWeakPtr()))); + wrapped_frame->AddDestructionObserver( + base::BindOnce([](const scoped_refptr<VideoFrame>& video_frame) {}, + std::move(video_frame))); + num_frames_in_encode_->IncreaseCount(); encoding_task_runner_->PostTask( FROM_HERE, base::BindOnce(&Encoder::EncodeOnEncodingTaskRunner, this, @@ -349,12 +374,6 @@ return false; } -void VideoTrackRecorder::Encoder::FrameReleased( - const scoped_refptr<VideoFrame>& frame) { - DCHECK(origin_task_runner_->BelongsToCurrentThread()); - --num_frames_in_encode_; -} - // static VideoTrackRecorder::CodecId VideoTrackRecorder::GetPreferredCodecId() { return GetCodecEnumerator()->GetPreferredCodecId(); @@ -377,7 +396,7 @@ int32_t bits_per_second, scoped_refptr<base::SingleThreadTaskRunner> main_task_runner) : track_(track), - paused_before_init_(false), + should_pause_encoder_on_initialization_(false), main_task_runner_(std::move(main_task_runner)), weak_ptr_factory_(this) { DCHECK_CALLED_ON_VALID_THREAD(main_thread_checker_); @@ -407,7 +426,7 @@ if (encoder_) encoder_->SetPaused(true); else - paused_before_init_ = true; + should_pause_encoder_on_initialization_ = true; } void VideoTrackRecorder::Resume() { @@ -415,7 +434,7 @@ if (encoder_) encoder_->SetPaused(false); else - paused_before_init_ = false; + should_pause_encoder_on_initialization_ = false; } void VideoTrackRecorder::OnVideoFrameForTesting( @@ -479,8 +498,8 @@ } } - if (paused_before_init_) - encoder_->SetPaused(paused_before_init_); + if (should_pause_encoder_on_initialization_) + encoder_->SetPaused(should_pause_encoder_on_initialization_); // StartFrameEncode() will be called on Render IO thread. MediaStreamVideoSink::ConnectToTrack(
diff --git a/content/renderer/media_recorder/video_track_recorder.h b/content/renderer/media_recorder/video_track_recorder.h index 7316080..63244ef 100644 --- a/content/renderer/media_recorder/video_track_recorder.h +++ b/content/renderer/media_recorder/video_track_recorder.h
@@ -69,6 +69,22 @@ bool is_key_frame)>; using OnErrorCB = base::Closure; + // Wraps a counter in a class in order to enable use of base::WeakPtr<>. + // See https://crbug.com/859610 for why this was added. + class Counter { + public: + Counter(); + ~Counter(); + uint32_t count() const { return count_; } + void IncreaseCount(); + void DecreaseCount(); + base::WeakPtr<Counter> GetWeakPtr(); + + private: + uint32_t count_; + base::WeakPtrFactory<Counter> weak_factory_; + }; + // Base class to describe a generic Encoder, encapsulating all actual encoder // (re)configurations, encoding and delivery of received frames. This class is // ref-counted to allow the MediaStreamVideoTrack to hold a reference to it @@ -118,6 +134,13 @@ friend class base::RefCountedThreadSafe<Encoder>; friend class VideoTrackRecorderTest; + // This destructor may run on either |main_task_runner|, + // |encoding_task_runner|, or |origin_task_runner_|. Main ownership lies + // with VideoTrackRecorder. Shared ownership is handed out to + // asynchronous tasks running on |encoding_task_runner| for encoding. Shared + // ownership is also handed out to a MediaStreamVideoTrack which pushes + // frames on |origin_task_runner_|. Each of these may end up being the last + // reference. virtual ~Encoder(); virtual void EncodeOnEncodingTaskRunner( @@ -150,7 +173,8 @@ const int32_t bits_per_second_; // Number of frames that we keep the reference alive for encode. - uint32_t num_frames_in_encode_; + // Operated and released exclusively on |origin_task_runner_|. + std::unique_ptr<Counter> num_frames_in_encode_; // Used to retrieve incoming opaque VideoFrames (i.e. VideoFrames backed by // textures). Created on-demand on |main_task_runner_|. @@ -203,8 +227,7 @@ base::TimeTicks capture_time)> initialize_encoder_callback_; - // Used to track the paused state during the initialization process. - bool paused_before_init_; + bool should_pause_encoder_on_initialization_; scoped_refptr<base::SingleThreadTaskRunner> main_task_runner_;
diff --git a/content/renderer/media_recorder/video_track_recorder_unittest.cc b/content/renderer/media_recorder/video_track_recorder_unittest.cc index 2eecab58..2860893 100644 --- a/content/renderer/media_recorder/video_track_recorder_unittest.cc +++ b/content/renderer/media_recorder/video_track_recorder_unittest.cc
@@ -17,6 +17,7 @@ #include "base/single_thread_task_runner.h" #include "base/strings/utf_string_conversions.h" #include "base/test/scoped_task_environment.h" +#include "base/threading/thread_task_runner_handle.h" #include "content/child/child_process.h" #include "content/renderer/media/stream/media_stream_video_track.h" #include "content/renderer/media/stream/mock_media_stream_video_source.h" @@ -92,6 +93,9 @@ blink_source_.Reset(); video_track_recorder_.reset(); blink::WebHeap::CollectAllGarbageForTesting(); + // VideoTrackRecorder::Encoder::~Encoder may post a DeleteSoon(), which + // may cause ASAN to detect a memory leak if we don't wait. + scoped_task_environment_.RunUntilIdle(); } void InitializeRecorder(VideoTrackRecorder::CodecId codec) { @@ -137,7 +141,7 @@ } uint32_t NumFramesInEncode() { - return video_track_recorder_->encoder_->num_frames_in_encode_; + return video_track_recorder_->encoder_->num_frames_in_encode_->count(); } // A ChildProcess is needed to fool the Tracks and Sources into believing they
diff --git a/content/renderer/pepper/url_request_info_util.cc b/content/renderer/pepper/url_request_info_util.cc index f5b4028..5108a428 100644 --- a/content/renderer/pepper/url_request_info_util.cc +++ b/content/renderer/pepper/url_request_info_util.cc
@@ -9,7 +9,7 @@ #include "base/logging.h" #include "base/strings/string_util.h" -#include "content/common/fileapi/file_system_messages.h" +#include "content/public/common/service_names.mojom.h" #include "content/renderer/loader/request_extra_data.h" #include "content/renderer/pepper/host_globals.h" #include "content/renderer/pepper/pepper_file_ref_renderer_host.h" @@ -24,6 +24,8 @@ #include "ppapi/shared_impl/url_request_info_data.h" #include "ppapi/shared_impl/var.h" #include "ppapi/thunk/enter.h" +#include "services/service_manager/public/cpp/connector.h" +#include "third_party/blink/public/mojom/filesystem/file_system.mojom.h" #include "third_party/blink/public/platform/file_path_conversion.h" #include "third_party/blink/public/platform/web_data.h" #include "third_party/blink/public/platform/web_feature.mojom.h" @@ -49,6 +51,13 @@ namespace { +blink::mojom::FileSystemManagerPtr GetFileSystemManager() { + blink::mojom::FileSystemManagerPtr file_system_manager_ptr; + ChildThreadImpl::current()->GetConnector()->BindInterface( + mojom::kBrowserServiceName, mojo::MakeRequest(&file_system_manager_ptr)); + return file_system_manager_ptr; +} + // Appends the file ref given the Resource pointer associated with it to the // given HTTP body, returning true on success. bool AppendFileRefToBody(PP_Instance instance, @@ -78,9 +87,8 @@ case PP_FILESYSTEMTYPE_LOCALPERSISTENT: // TODO(kinuko): remove this sync IPC when we fully support // AppendURLRange for FileSystem URL. - RenderThreadImpl::current()->Send( - new FileSystemHostMsg_SyncGetPlatformPath( - file_ref_host->GetFileSystemURL(), &platform_path)); + GetFileSystemManager()->GetPlatformPath(file_ref_host->GetFileSystemURL(), + &platform_path); break; case PP_FILESYSTEMTYPE_EXTERNAL: platform_path = file_ref_host->GetExternalFilePath();
diff --git a/content/renderer/render_frame_impl.cc b/content/renderer/render_frame_impl.cc index f53d21b3..eadaa4f 100644 --- a/content/renderer/render_frame_impl.cc +++ b/content/renderer/render_frame_impl.cc
@@ -2638,23 +2638,6 @@ const blink::WebHistoryItem& history_item = entry ? entry->root() : blink::WebHistoryItem(); - // Requests blocked by the X-Frame-Options HTTP response header don't display - // error pages but a blank page instead. - // TODO(alexmos, mkwst, arthursonzogni): This block can be removed once error - // pages are refactored. See crbug.com/588314 and crbug.com/622385. - if (error.reason() == net::ERR_BLOCKED_BY_RESPONSE) { - // Do not preserve the history item for blocked navigations, since we will - // not attempt to reload it later. Also, it is important that the document - // sequence number is not preserved, so that other navigations will not be - // considered same-document with this data URL. - const blink::WebHistoryItem& blank_history_item = blink::WebHistoryItem(); - frame_load_type = blink::WebFrameLoadType::kStandard; - LoadNavigationErrorPageInternal("", GURL("data:,"), WebURL(), replace, - frame_load_type, blank_history_item, - std::move(navigation_data)); - return; - } - std::string error_html; if (error_page_content.has_value()) { error_html = error_page_content.value();
diff --git a/content/renderer/render_thread_impl.cc b/content/renderer/render_thread_impl.cc index cd5ff66..db2edf8 100644 --- a/content/renderer/render_thread_impl.cc +++ b/content/renderer/render_thread_impl.cc
@@ -1524,12 +1524,6 @@ return user_agent_; } -bool RenderThreadImpl::OnMessageReceived(const IPC::Message& msg) { - if (file_system_dispatcher_->OnMessageReceived(msg)) - return true; - return ChildThreadImpl::OnMessageReceived(msg); -} - void RenderThreadImpl::OnAssociatedInterfaceRequest( const std::string& name, mojo::ScopedInterfaceEndpointHandle handle) {
diff --git a/content/renderer/render_thread_impl.h b/content/renderer/render_thread_impl.h index 61f528d0..4436b05 100644 --- a/content/renderer/render_thread_impl.h +++ b/content/renderer/render_thread_impl.h
@@ -227,7 +227,6 @@ blink::WebString GetUserAgent() const override; // IPC::Listener implementation via ChildThreadImpl: - bool OnMessageReceived(const IPC::Message& msg) override; void OnAssociatedInterfaceRequest( const std::string& name, mojo::ScopedInterfaceEndpointHandle handle) override;
diff --git a/content/renderer/render_thread_impl_browsertest.cc b/content/renderer/render_thread_impl_browsertest.cc index 0ccefa81..93a88a7 100644 --- a/content/renderer/render_thread_impl_browsertest.cc +++ b/content/renderer/render_thread_impl_browsertest.cc
@@ -176,12 +176,12 @@ content_renderer_client_.reset(new ContentRendererClient()); SetRendererClientForTesting(content_renderer_client_.get()); - main_message_loop_.reset(new base::MessageLoop(base::MessageLoop::TYPE_IO)); + main_message_loop_.reset(new base::MessageLoop(base::MessageLoop::TYPE_UI)); test_task_scheduler_.reset(new TestTaskScheduler); browser_threads_.reset( - new TestBrowserThreadBundle(TestBrowserThreadBundle::IO_MAINLOOP)); + new TestBrowserThreadBundle(TestBrowserThreadBundle::REAL_IO_THREAD)); scoped_refptr<base::SingleThreadTaskRunner> io_task_runner = - blink::scheduler::GetSingleThreadTaskRunnerForTesting(); + BrowserThread::GetTaskRunnerForThread(BrowserThread::IO); InitializeMojo(); mojo_ipc_support_.reset(new mojo::core::ScopedIPCSupport(
diff --git a/content/renderer/render_view_browsertest.cc b/content/renderer/render_view_browsertest.cc index 489a86f..0647169 100644 --- a/content/renderer/render_view_browsertest.cc +++ b/content/renderer/render_view_browsertest.cc
@@ -1783,7 +1783,15 @@ EXPECT_EQ(0, info.selection_end); } -TEST_F(RenderViewImplTest, OnDeleteSurroundingTextInCodePoints) { +#if defined(OS_ANDROID) +// Failing on Android M: http://crbug.com/873580 +#define MAYBE_OnDeleteSurroundingTextInCodePoints \ + DISABLED_OnDeleteSurroundingTextInCodePoints +#else +#define MAYBE_OnDeleteSurroundingTextInCodePoints \ + OnDeleteSurroundingTextInCodePoints +#endif +TEST_F(RenderViewImplTest, MAYBE_OnDeleteSurroundingTextInCodePoints) { // Load an HTML page consisting of an input field. LoadHTML( // "ab" + trophy + space + "cdef" + trophy + space + "gh".
diff --git a/content/renderer/render_view_impl.cc b/content/renderer/render_view_impl.cc index b97c67a..1b52fb6 100644 --- a/content/renderer/render_view_impl.cc +++ b/content/renderer/render_view_impl.cc
@@ -1135,6 +1135,7 @@ void RenderViewImpl::DidCommitCompositorFrameForWidget() { for (auto& observer : observers_) observer.DidCommitCompositorFrame(); + UpdatePreferredSize(); } void RenderViewImpl::DidCompletePageScaleAnimationForWidget() { @@ -1666,7 +1667,8 @@ for (auto& observer : observers_) observer.DidUpdateMainFrameLayout(); - UpdatePreferredSize(); + // The main frame may have changed size. + needs_preferred_size_update_ = true; } void RenderViewImpl::NavigateBackForwardSoon(int offset) { @@ -1739,6 +1741,11 @@ // message. if (!send_preferred_size_changes_ || !webview()) return; + + if (!needs_preferred_size_update_) + return; + needs_preferred_size_update_ = false; + blink::WebSize tmp_size = webview()->ContentsPreferredMinimumSize(); blink::WebRect tmp_rect(0, 0, tmp_size.width, tmp_size.height); WidgetClient()->ConvertViewportToWindow(&tmp_rect); @@ -1853,6 +1860,8 @@ if (!webview()) return; + needs_preferred_size_update_ = true; + // We need to ensure |UpdatePreferredSize| gets called. If a layout is needed, // force an update here which will call |DidUpdateMainFrameLayout|. webview()->UpdateLifecycle(WebWidget::LifecycleUpdate::kLayout);
diff --git a/content/renderer/render_view_impl.h b/content/renderer/render_view_impl.h index 10e897a..6f71eab 100644 --- a/content/renderer/render_view_impl.h +++ b/content/renderer/render_view_impl.h
@@ -553,6 +553,10 @@ // If true, we send IPC messages when |preferred_size_| changes. bool send_preferred_size_changes_ = false; + // Whether the preferred size may have changed and |UpdatePreferredSize| needs + // to be called. + bool needs_preferred_size_update_ = true; + // If non-empty, and |send_preferred_size_changes_| is true, disable drawing // scroll bars on windows smaller than this size. Used for windows that the // browser resizes to the size of the content, such as browser action popups.
diff --git a/content/renderer/service_worker/service_worker_context_client.cc b/content/renderer/service_worker/service_worker_context_client.cc index 512edba..783a08f8 100644 --- a/content/renderer/service_worker/service_worker_context_client.cc +++ b/content/renderer/service_worker/service_worker_context_client.cc
@@ -496,7 +496,7 @@ background_fetch_click_event_callbacks; std::map<int, DispatchBackgroundFetchFailEventCallback> background_fetch_fail_event_callbacks; - std::map<int, DispatchBackgroundFetchedEventCallback> + std::map<int, DispatchBackgroundFetchSuccessEventCallback> background_fetched_event_callbacks; std::map<int, DispatchSyncEventCallback> sync_event_callbacks; std::map<int, payments::mojom::PaymentHandlerResponseCallbackPtr> @@ -1037,13 +1037,13 @@ base::Time::FromDoubleT(event_dispatch_time)); } -void ServiceWorkerContextClient::DidHandleBackgroundFetchedEvent( +void ServiceWorkerContextClient::DidHandleBackgroundFetchSuccessEvent( int request_id, blink::mojom::ServiceWorkerEventStatus status, double event_dispatch_time) { TRACE_EVENT_WITH_FLOW1( "ServiceWorker", - "ServiceWorkerContextClient::DidHandleBackgroundFetchedEvent", + "ServiceWorkerContextClient::DidHandleBackgroundFetchSuccessEvent", TRACE_ID_WITH_SCOPE(kServiceWorkerContextClientScope, TRACE_ID_LOCAL(request_id)), TRACE_EVENT_FLAG_FLOW_IN, "status", @@ -1581,7 +1581,6 @@ void ServiceWorkerContextClient::DispatchBackgroundFetchAbortEvent( const std::string& developer_id, const std::string& unique_id, - const std::vector<BackgroundFetchSettledFetch>& fetches, DispatchBackgroundFetchAbortEventCallback callback) { int request_id = context_->timeout_timer->StartEvent( CreateAbortCallback(&context_->background_fetch_abort_event_callbacks)); @@ -1594,22 +1593,14 @@ TRACE_ID_LOCAL(request_id)), TRACE_EVENT_FLAG_FLOW_OUT); - blink::WebVector<blink::WebBackgroundFetchSettledFetch> web_fetches( - fetches.size()); - for (size_t i = 0; i < fetches.size(); ++i) { - ToWebServiceWorkerRequest(fetches[i].request, &web_fetches[i].request); - ToWebServiceWorkerResponse(fetches[i].response.get(), - &web_fetches[i].response); - } - proxy_->DispatchBackgroundFetchAbortEvent( request_id, blink::WebString::FromUTF8(developer_id), - blink::WebString::FromUTF8(unique_id), web_fetches); + blink::WebString::FromUTF8(unique_id)); } void ServiceWorkerContextClient::DispatchBackgroundFetchClickEvent( const std::string& developer_id, - mojom::BackgroundFetchState state, + const std::string& unique_id, DispatchBackgroundFetchClickEventCallback callback) { int request_id = context_->timeout_timer->StartEvent( CreateAbortCallback(&context_->background_fetch_click_event_callbacks)); @@ -1622,12 +1613,9 @@ TRACE_ID_LOCAL(request_id)), TRACE_EVENT_FLAG_FLOW_OUT); - // TODO(peter): Use typemap when this is moved to blink-side. - blink::WebServiceWorkerContextProxy::BackgroundFetchState web_state = - mojo::ConvertTo< - blink::WebServiceWorkerContextProxy::BackgroundFetchState>(state); proxy_->DispatchBackgroundFetchClickEvent( - request_id, blink::WebString::FromUTF8(developer_id), web_state); + request_id, blink::WebString::FromUTF8(developer_id), + blink::WebString::FromUTF8(unique_id)); } void ServiceWorkerContextClient::DispatchBackgroundFetchFailEvent( @@ -1659,18 +1647,18 @@ blink::WebString::FromUTF8(unique_id), web_fetches); } -void ServiceWorkerContextClient::DispatchBackgroundFetchedEvent( +void ServiceWorkerContextClient::DispatchBackgroundFetchSuccessEvent( const std::string& developer_id, const std::string& unique_id, const std::vector<BackgroundFetchSettledFetch>& fetches, - DispatchBackgroundFetchedEventCallback callback) { + DispatchBackgroundFetchSuccessEventCallback callback) { int request_id = context_->timeout_timer->StartEvent( CreateAbortCallback(&context_->background_fetched_event_callbacks)); context_->background_fetched_event_callbacks.emplace(request_id, std::move(callback)); TRACE_EVENT_WITH_FLOW0( "ServiceWorker", - "ServiceWorkerContextClient::DispatchBackgroundFetchedEvent", + "ServiceWorkerContextClient::DispatchBackgroundFetchSuccessEvent", TRACE_ID_WITH_SCOPE(kServiceWorkerContextClientScope, TRACE_ID_LOCAL(request_id)), TRACE_EVENT_FLAG_FLOW_OUT); @@ -1683,7 +1671,7 @@ &web_fetches[i].response); } - proxy_->DispatchBackgroundFetchedEvent( + proxy_->DispatchBackgroundFetchSuccessEvent( request_id, blink::WebString::FromUTF8(developer_id), blink::WebString::FromUTF8(unique_id), web_fetches); }
diff --git a/content/renderer/service_worker/service_worker_context_client.h b/content/renderer/service_worker/service_worker_context_client.h index 01a7b80..c530751 100644 --- a/content/renderer/service_worker/service_worker_context_client.h +++ b/content/renderer/service_worker/service_worker_context_client.h
@@ -158,7 +158,7 @@ int request_id, blink::mojom::ServiceWorkerEventStatus status, double dispatch_event_time) override; - void DidHandleBackgroundFetchedEvent( + void DidHandleBackgroundFetchSuccessEvent( int request_id, blink::mojom::ServiceWorkerEventStatus status, double dispatch_event_time) override; @@ -284,22 +284,21 @@ void DispatchBackgroundFetchAbortEvent( const std::string& developer_id, const std::string& unique_id, - const std::vector<BackgroundFetchSettledFetch>& fetches, DispatchBackgroundFetchAbortEventCallback callback) override; void DispatchBackgroundFetchClickEvent( const std::string& developer_id, - mojom::BackgroundFetchState state, + const std::string& unique_id, DispatchBackgroundFetchClickEventCallback callback) override; void DispatchBackgroundFetchFailEvent( const std::string& developer_id, const std::string& unique_id, const std::vector<BackgroundFetchSettledFetch>& fetches, DispatchBackgroundFetchFailEventCallback callback) override; - void DispatchBackgroundFetchedEvent( + void DispatchBackgroundFetchSuccessEvent( const std::string& developer_id, const std::string& unique_id, const std::vector<BackgroundFetchSettledFetch>& fetches, - DispatchBackgroundFetchedEventCallback callback) override; + DispatchBackgroundFetchSuccessEventCallback callback) override; void DispatchExtendableMessageEvent( mojom::ExtendableMessageEventPtr event, DispatchExtendableMessageEventCallback callback) override;
diff --git a/content/renderer/service_worker/service_worker_context_client_unittest.cc b/content/renderer/service_worker/service_worker_context_client_unittest.cc index d7b35051..7c58804 100644 --- a/content/renderer/service_worker/service_worker_context_client_unittest.cc +++ b/content/renderer/service_worker/service_worker_context_client_unittest.cc
@@ -79,14 +79,13 @@ void DispatchBackgroundFetchAbortEvent( int event_id, const blink::WebString& developer_id, - const blink::WebString& unique_id, - const blink::WebVector<blink::WebBackgroundFetchSettledFetch>& fetches) - override { + const blink::WebString& unique_id) override { NOTREACHED(); } - void DispatchBackgroundFetchClickEvent(int event_id, - const blink::WebString& developer_id, - BackgroundFetchState status) override { + void DispatchBackgroundFetchClickEvent( + int event_id, + const blink::WebString& developer_id, + const blink::WebString& unique_id) override { NOTREACHED(); } void DispatchBackgroundFetchFailEvent( @@ -97,7 +96,7 @@ override { NOTREACHED(); } - void DispatchBackgroundFetchedEvent( + void DispatchBackgroundFetchSuccessEvent( int event_id, const blink::WebString& developer_id, const blink::WebString& unique_id,
diff --git a/content/renderer/webclipboard_impl_browsertest.cc b/content/renderer/webclipboard_impl_browsertest.cc index 00d4b1d..d86dddb7 100644 --- a/content/renderer/webclipboard_impl_browsertest.cc +++ b/content/renderer/webclipboard_impl_browsertest.cc
@@ -22,21 +22,15 @@ ~WebClipboardImplTest() override = default; }; -#if defined(OS_CHROMEOS) -// Test is flaky on ChromeOS (https://crbug.com/867339). -#define MAYBE_PasteRTF DISABLED_PasteRTF -#else -#define MAYBE_PasteRTF PasteRTF -#endif -IN_PROC_BROWSER_TEST_F(WebClipboardImplTest, MAYBE_PasteRTF) { +IN_PROC_BROWSER_TEST_F(WebClipboardImplTest, PasteRTF) { BrowserTestClipboardScope clipboard; const std::string rtf_content = "{\\rtf1\\ansi Hello, {\\b world.}}"; clipboard.SetRtf(rtf_content); + FrameFocusedObserver focus_observer(shell()->web_contents()->GetMainFrame()); // paste_listener.html takes RTF from the clipboard and sets the title. NavigateToURL(shell(), GetTestUrl(".", "paste_listener.html")); - FrameFocusedObserver focus_observer(shell()->web_contents()->GetMainFrame()); focus_observer.Wait(); const base::string16 expected_title = base::UTF8ToUTF16(rtf_content); @@ -45,22 +39,16 @@ EXPECT_EQ(expected_title, title_watcher.WaitAndGetTitle()); } -#if (defined(OS_CHROMEOS) && !defined(NDEBUG)) || defined(OS_MACOSX) -// Test is flaky on ChromeOS (dbg) and mac (https://crbug.com/867954). -#define MAYBE_ImageCopy DISABLED_ImageCopy -#else -#define MAYBE_ImageCopy ImageCopy -#endif -IN_PROC_BROWSER_TEST_F(WebClipboardImplTest, MAYBE_ImageCopy) { +IN_PROC_BROWSER_TEST_F(WebClipboardImplTest, ImageCopy) { BrowserTestClipboardScope clipboard; clipboard.SetText(""); base::string16 expected_types; expected_types = base::ASCIIToUTF16("file;image/png string;text/html"); - NavigateToURL(shell(), GetTestUrl(".", "image_copy_types.html")); WebContents* web_contents = shell()->web_contents(); FrameFocusedObserver focus_observer(web_contents->GetMainFrame()); + NavigateToURL(shell(), GetTestUrl(".", "image_copy_types.html")); focus_observer.Wait(); // Populate an iframe with an image, and wait for load to complete.
diff --git a/content/shell/BUILD.gn b/content/shell/BUILD.gn index 698aaa4c..bb99826 100644 --- a/content/shell/BUILD.gn +++ b/content/shell/BUILD.gn
@@ -899,7 +899,7 @@ testonly = true data_deps = [ ":content_shell", - "//third_party/mesa:osmesa", + "//third_party/mesa_headers", ] data = [ "//content/shell/tools/breakpad_integration_test.py",
diff --git a/content/shell/android/BUILD.gn b/content/shell/android/BUILD.gn index 88350014..f71d26c 100644 --- a/content/shell/android/BUILD.gn +++ b/content/shell/android/BUILD.gn
@@ -179,14 +179,13 @@ "//media/capture/video/android:capture_java", "//net/android:net_java", "//services/shape_detection:shape_detection_java", - "//third_party/mesa:osmesa", + "//third_party/mesa_headers", "//ui/android:ui_java", ] apk_name = "ContentShell" android_manifest = content_shell_manifest android_manifest_dep = ":content_shell_manifest" shared_libraries = [ ":libcontent_shell_content_view" ] - loadable_modules = [ "$root_out_dir/libosmesa.so" ] command_line_flags_file = "content-shell-command-line" }
diff --git a/content/shell/browser/shell_aura.cc b/content/shell/browser/shell_aura.cc index 51f15cd..10ae46aa 100644 --- a/content/shell/browser/shell_aura.cc +++ b/content/shell/browser/shell_aura.cc
@@ -7,7 +7,6 @@ #include "content/public/browser/web_contents.h" #include "content/shell/browser/shell_platform_data_aura.h" #include "ui/aura/env.h" -#include "ui/aura/test/test_screen.h" #include "ui/aura/window.h" #include "ui/aura/window_event_dispatcher.h" @@ -16,8 +15,6 @@ // static void Shell::PlatformInitialize(const gfx::Size& default_window_size) { CHECK(!platform_); - aura::TestScreen* screen = aura::TestScreen::Create(gfx::Size()); - display::Screen::SetScreenInstance(screen); platform_ = new ShellPlatformDataAura(default_window_size); } @@ -26,17 +23,13 @@ platform_ = nullptr; } -void Shell::PlatformCleanUp() { -} +void Shell::PlatformCleanUp() {} -void Shell::PlatformEnableUIControl(UIControl control, bool is_enabled) { -} +void Shell::PlatformEnableUIControl(UIControl control, bool is_enabled) {} -void Shell::PlatformSetAddressBarURL(const GURL& url) { -} +void Shell::PlatformSetAddressBarURL(const GURL& url) {} -void Shell::PlatformSetIsLoading(bool loading) { -} +void Shell::PlatformSetIsLoading(bool loading) {} void Shell::PlatformCreateWindow(int width, int height) { CHECK(platform_); @@ -56,14 +49,12 @@ content->Show(); } -void Shell::PlatformResizeSubViews() { -} +void Shell::PlatformResizeSubViews() {} void Shell::Close() { delete this; } -void Shell::PlatformSetTitle(const base::string16& title) { -} +void Shell::PlatformSetTitle(const base::string16& title) {} } // namespace content
diff --git a/content/shell/browser/shell_platform_data_aura.cc b/content/shell/browser/shell_platform_data_aura.cc index 076783d..c95dc76d 100644 --- a/content/shell/browser/shell_platform_data_aura.cc +++ b/content/shell/browser/shell_platform_data_aura.cc
@@ -11,6 +11,7 @@ #include "ui/aura/env.h" #include "ui/aura/layout_manager.h" #include "ui/aura/test/test_focus_client.h" +#include "ui/aura/test/test_screen.h" #include "ui/aura/test/test_window_parenting_client.h" #include "ui/aura/window.h" #include "ui/aura/window_event_dispatcher.h" @@ -26,6 +27,10 @@ #include "base/fuchsia/component_context.h" #endif +#if defined(USE_OZONE) +#include "ui/aura/screen_ozone.h" +#endif + namespace content { namespace { @@ -78,6 +83,27 @@ ShellPlatformDataAura::ShellPlatformDataAura(const gfx::Size& initial_size) { CHECK(aura::Env::GetInstance()); + // Setup global display::Screen singleton. + if (!display::Screen::GetScreen()) { +#if defined(USE_OZONE) + auto platform_screen = ui::OzonePlatform::GetInstance()->CreateScreen(); + if (platform_screen) + screen_ = std::make_unique<aura::ScreenOzone>(std::move(platform_screen)); +#endif // defined(USE_OZONE) + + // Use aura::TestScreen for Ozone platforms that don't provide + // PlatformScreen. + // TODO(https://crbug.com/872339): Implement PlatformScreen for all + // platforms and remove this code. + if (!screen_) { + // Some layout tests expect to be able to resize the window, so the screen + // must be larger than the window. + screen_.reset( + aura::TestScreen::Create(gfx::ScaleToCeiledSize(initial_size, 2.0))); + } + display::Screen::SetScreenInstance(screen_.get()); + } + ui::PlatformWindowInitProperties properties; properties.bounds = gfx::Rect(initial_size); @@ -113,7 +139,10 @@ new aura::test::TestWindowParentingClient(host_->window())); } -ShellPlatformDataAura::~ShellPlatformDataAura() = default; +ShellPlatformDataAura::~ShellPlatformDataAura() { + if (screen_) + display::Screen::SetScreenInstance(nullptr); +} void ShellPlatformDataAura::ShowWindow() { host_->Show();
diff --git a/content/shell/browser/shell_platform_data_aura.h b/content/shell/browser/shell_platform_data_aura.h index de91498e..fae33e69 100644 --- a/content/shell/browser/shell_platform_data_aura.h +++ b/content/shell/browser/shell_platform_data_aura.h
@@ -18,6 +18,10 @@ } } +namespace display { +class Screen; +} + namespace gfx { class Size; } @@ -35,6 +39,8 @@ aura::WindowTreeHost* host() { return host_.get(); } private: + std::unique_ptr<display::Screen> screen_; + std::unique_ptr<aura::WindowTreeHost> host_; std::unique_ptr<aura::client::FocusClient> focus_client_; std::unique_ptr<aura::client::DefaultCaptureClient> capture_client_;
diff --git a/content/test/BUILD.gn b/content/test/BUILD.gn index f351bf0c..449a7436 100644 --- a/content/test/BUILD.gn +++ b/content/test/BUILD.gn
@@ -819,6 +819,7 @@ "../browser/renderer_host/input/touch_input_browsertest.cc", "../browser/renderer_host/input/touch_selection_controller_client_aura_browsertest.cc", "../browser/renderer_host/input/touchpad_pinch_browsertest.cc", + "../browser/renderer_host/input/wheel_event_listener_browsertest.cc", "../browser/renderer_host/input/wheel_scroll_latching_browsertest.cc", "../browser/renderer_host/media/video_capture_browsertest.cc", "../browser/renderer_host/render_process_host_browsertest.cc", @@ -978,7 +979,7 @@ "//third_party/blink/public:blink", "//third_party/leveldatabase", "//third_party/libaom:av1_buildflags", - "//third_party/mesa:osmesa", + "//third_party/mesa_headers", "//third_party/zlib", "//ui/accessibility", "//ui/accessibility:ax_enums_mojo", @@ -1004,7 +1005,7 @@ ":web_ui_test_mojo_bindings_js_data_deps", "//content/shell:pak", "//testing/buildbot/filters:content_browsertests_filters", - "//third_party/mesa:osmesa", + "//third_party/mesa_headers", ] if (enable_plugins) { @@ -1348,7 +1349,6 @@ "../browser/download/save_package_unittest.cc", "../browser/fileapi/browser_file_system_helper_unittest.cc", "../browser/fileapi/file_system_operation_runner_unittest.cc", - "../browser/fileapi/fileapi_message_filter_unittest.cc", "../browser/frame_host/ancestor_throttle_unittest.cc", "../browser/frame_host/frame_service_base_unittest.cc", "../browser/frame_host/frame_tree_node_blame_context_unittest.cc", @@ -1465,6 +1465,7 @@ "../browser/payments/payment_app_content_unittest_base.h", "../browser/payments/payment_app_provider_impl_unittest.cc", "../browser/payments/payment_manager_unittest.cc", + "../browser/portal/portal_unit_test.cc", "../browser/presentation/presentation_service_impl_unittest.cc", "../browser/renderer_host/clipboard_host_impl_unittest.cc", "../browser/renderer_host/cursor_manager_unittest.cc", @@ -1927,7 +1928,7 @@ data_deps = [ "//components/services/filesystem:filesystem", - "//third_party/mesa:osmesa", + "//third_party/mesa_headers", ] if (is_posix) {
diff --git a/content/test/layouttest_support.cc b/content/test/layouttest_support.cc index 04bed89c..c530fc3 100644 --- a/content/test/layouttest_support.cc +++ b/content/test/layouttest_support.cc
@@ -436,7 +436,6 @@ void EnableBrowserLayoutTestMode() { #if defined(OS_MACOSX) - gpu::ImageTransportSurface::SetAllowOSMesaForTesting(true); PopupMenuHelper::DontShowPopupMenuForTesting(); #endif RenderWidgetHostImpl::DisableResizeAckCheckForTesting();
diff --git a/content/utility/utility_service_factory.cc b/content/utility/utility_service_factory.cc index 4d2eb95..bd5a89c 100644 --- a/content/utility/utility_service_factory.cc +++ b/content/utility/utility_service_factory.cc
@@ -27,8 +27,6 @@ #include "services/network/network_service.h" #include "services/network/public/cpp/features.h" #include "services/service_manager/public/mojom/service.mojom.h" -#include "services/shape_detection/public/mojom/constants.mojom.h" -#include "services/shape_detection/shape_detection_service.h" #include "services/video_capture/public/mojom/constants.mojom.h" #include "services/video_capture/service_impl.h" #include "services/viz/public/interfaces/constants.mojom.h" @@ -145,12 +143,6 @@ services->emplace(media::mojom::kCdmServiceName, info); #endif - service_manager::EmbeddedServiceInfo shape_detection_info; - shape_detection_info.factory = - base::Bind(&shape_detection::ShapeDetectionService::Create); - services->insert(std::make_pair(shape_detection::mojom::kServiceName, - shape_detection_info)); - service_manager::EmbeddedServiceInfo data_decoder_info; data_decoder_info.factory = base::Bind(&CreateDataDecoderService); services->insert(
diff --git a/device/BUILD.gn b/device/BUILD.gn index 20770d2..cc06a2d 100644 --- a/device/BUILD.gn +++ b/device/BUILD.gn
@@ -298,6 +298,8 @@ "bluetooth/test/fake_bluetooth_le_device_winrt.h", "bluetooth/test/fake_bluetooth_le_manufacturer_data_winrt.cc", "bluetooth/test/fake_bluetooth_le_manufacturer_data_winrt.h", + "bluetooth/test/fake_device_information_pairing_winrt.cc", + "bluetooth/test/fake_device_information_pairing_winrt.h", "bluetooth/test/fake_device_information_winrt.cc", "bluetooth/test/fake_device_information_winrt.h", "bluetooth/test/fake_gatt_characteristic_winrt.cc",
diff --git a/device/bluetooth/bluetooth_device_unittest.cc b/device/bluetooth/bluetooth_device_unittest.cc index cd08026..7443736 100644 --- a/device/bluetooth/bluetooth_device_unittest.cc +++ b/device/bluetooth/bluetooth_device_unittest.cc
@@ -94,6 +94,32 @@ } } +#if defined(OS_WIN) +TEST_P(BluetoothTestWinrtOnly, DeviceIsPaired) { + if (!PlatformSupportsLowEnergy()) { + LOG(WARNING) << "Low Energy Bluetooth unavailable, skipping unit test."; + return; + } + InitWithFakeAdapter(); + StartLowEnergyDiscoverySession(); + BluetoothDevice* device = SimulateLowEnergyDevice(1); + + // By default a device should not be paired. + EXPECT_FALSE(device->IsPaired()); + + // Connect to the device and simulate a paired state. + device->CreateGattConnection(GetGattConnectionCallback(Call::EXPECTED), + GetConnectErrorCallback(Call::NOT_EXPECTED)); + SimulateGattConnection(device); + base::RunLoop().RunUntilIdle(); + SimulateDevicePaired(device, true); + EXPECT_TRUE(device->IsPaired()); + + SimulateDevicePaired(device, false); + EXPECT_FALSE(device->IsPaired()); +} +#endif + // Verifies basic device properties, e.g. GetAddress, GetName, ... #if defined(OS_WIN) TEST_P(BluetoothTestWinrt, LowEnergyDeviceProperties) {
diff --git a/device/bluetooth/bluetooth_device_winrt.cc b/device/bluetooth/bluetooth_device_winrt.cc index e248c43..aba5d0b 100644 --- a/device/bluetooth/bluetooth_device_winrt.cc +++ b/device/bluetooth/bluetooth_device_winrt.cc
@@ -4,6 +4,7 @@ #include "device/bluetooth/bluetooth_device_winrt.h" +#include <windows.devices.enumeration.h> #include <windows.foundation.h> #include <utility> @@ -35,8 +36,12 @@ using ABI::Windows::Devices::Bluetooth::GenericAttributeProfile:: IGattDeviceServicesResult; using ABI::Windows::Devices::Bluetooth::IBluetoothLEDevice; +using ABI::Windows::Devices::Bluetooth::IBluetoothLEDevice2; using ABI::Windows::Devices::Bluetooth::IBluetoothLEDevice3; using ABI::Windows::Devices::Bluetooth::IBluetoothLEDeviceStatics; +using ABI::Windows::Devices::Enumeration::IDeviceInformation; +using ABI::Windows::Devices::Enumeration::IDeviceInformation2; +using ABI::Windows::Devices::Enumeration::IDeviceInformationPairing; using ABI::Windows::Foundation::IAsyncOperation; using ABI::Windows::Foundation::IClosable; using Microsoft::WRL::ComPtr; @@ -147,8 +152,54 @@ } bool BluetoothDeviceWinrt::IsPaired() const { - NOTIMPLEMENTED(); - return false; + if (!ble_device_) { + VLOG(2) << "No BLE device instance present."; + return false; + } + + ComPtr<IBluetoothLEDevice2> ble_device_2; + HRESULT hr = ble_device_.As(&ble_device_2); + if (FAILED(hr)) { + VLOG(2) << "Obtaining IBluetoothLEDevice2 failed: " + << logging::SystemErrorCodeToString(hr); + return false; + } + + ComPtr<IDeviceInformation> device_information; + hr = ble_device_2->get_DeviceInformation(&device_information); + if (FAILED(hr)) { + VLOG(2) << "Getting Device Information failed: " + << logging::SystemErrorCodeToString(hr); + return false; + } + + ComPtr<IDeviceInformation2> device_information_2; + hr = device_information.As(&device_information_2); + if (FAILED(hr)) { + VLOG(2) << "Obtaining IDeviceInformation2 failed: " + << logging::SystemErrorCodeToString(hr); + return false; + } + + ComPtr<IDeviceInformationPairing> pairing; + hr = device_information_2->get_Pairing(&pairing); + if (FAILED(hr)) { + VLOG(2) << "DeviceInformation::get_Pairing() failed: " + << logging::SystemErrorCodeToString(hr); + return false; + } + + boolean is_paired; + hr = pairing->get_IsPaired(&is_paired); + if (FAILED(hr)) { + VLOG(2) << "DeviceInformationPairing::get_IsPaired() failed: " + << logging::SystemErrorCodeToString(hr); + return false; + } + + VLOG(2) << "BluetoothDeviceWinrt::IsPaired(): " + << (is_paired ? "True" : "False"); + return is_paired; } bool BluetoothDeviceWinrt::IsConnected() const {
diff --git a/device/bluetooth/test/bluetooth_test.h b/device/bluetooth/test/bluetooth_test.h index 6baa47f..5bad6c2 100644 --- a/device/bluetooth/test/bluetooth_test.h +++ b/device/bluetooth/test/bluetooth_test.h
@@ -248,6 +248,9 @@ // name kTestDeviceName, no advertised UUIDs and address kTestDeviceAddress3. virtual BluetoothDevice* SimulateClassicDevice(); + // Simulates a change in |device|'s pairing state. + virtual void SimulateDevicePaired(BluetoothDevice* device, bool is_paired) {} + // Remembers |device|'s platform specific object to be used in a // subsequent call to methods such as SimulateGattServicesDiscovered that // accept a nullptr value to select this remembered characteristic. This
diff --git a/device/bluetooth/test/bluetooth_test_win.cc b/device/bluetooth/test/bluetooth_test_win.cc index e34819d..f70eb50 100644 --- a/device/bluetooth/test/bluetooth_test_win.cc +++ b/device/bluetooth/test/bluetooth_test_win.cc
@@ -674,6 +674,14 @@ return adapter_->GetDevice(data.address); } +void BluetoothTestWinrt::SimulateDevicePaired(BluetoothDevice* device, + bool is_paired) { + auto* const ble_device = + static_cast<TestBluetoothDeviceWinrt*>(device)->ble_device(); + DCHECK(ble_device); + ble_device->SimulateDevicePaired(is_paired); +} + void BluetoothTestWinrt::SimulateGattConnection(BluetoothDevice* device) { if (!GetParam() || !PlatformSupportsLowEnergy()) return BluetoothTestWin::SimulateGattConnection(device);
diff --git a/device/bluetooth/test/bluetooth_test_win.h b/device/bluetooth/test/bluetooth_test_win.h index d536010..70da709 100644 --- a/device/bluetooth/test/bluetooth_test_win.h +++ b/device/bluetooth/test/bluetooth_test_win.h
@@ -122,6 +122,7 @@ void InitWithoutDefaultAdapter() override; void InitWithFakeAdapter() override; BluetoothDevice* SimulateLowEnergyDevice(int device_ordinal) override; + void SimulateDevicePaired(BluetoothDevice* device, bool is_paired) override; void SimulateGattConnection(BluetoothDevice* device) override; void SimulateGattConnectionError( BluetoothDevice* device,
diff --git a/device/bluetooth/test/fake_bluetooth_le_device_winrt.cc b/device/bluetooth/test/fake_bluetooth_le_device_winrt.cc index 89b1367d..9fff1bda 100644 --- a/device/bluetooth/test/fake_bluetooth_le_device_winrt.cc +++ b/device/bluetooth/test/fake_bluetooth_le_device_winrt.cc
@@ -15,6 +15,7 @@ #include "base/win/async_operation.h" #include "device/bluetooth/bluetooth_remote_gatt_service_winrt.h" #include "device/bluetooth/test/bluetooth_test_win.h" +#include "device/bluetooth/test/fake_device_information_pairing_winrt.h" #include "device/bluetooth/test/fake_gatt_characteristic_winrt.h" #include "device/bluetooth/test/fake_gatt_device_service_winrt.h" #include "device/bluetooth/test/fake_gatt_device_services_result_winrt.h" @@ -23,6 +24,7 @@ namespace { +using ABI::Windows::Devices::Bluetooth::BluetoothAddressType; using ABI::Windows::Devices::Bluetooth::BluetoothCacheMode; using ABI::Windows::Devices::Bluetooth::BluetoothConnectionStatus; using ABI::Windows::Devices::Bluetooth::BluetoothConnectionStatus_Connected; @@ -44,8 +46,10 @@ GattDeviceServicesResult; using ABI::Windows::Devices::Bluetooth::GenericAttributeProfile:: IGattDeviceService; +using ABI::Windows::Devices::Bluetooth::IBluetoothLEAppearance; using ABI::Windows::Devices::Enumeration::DeviceAccessStatus; using ABI::Windows::Devices::Enumeration::IDeviceAccessInformation; +using ABI::Windows::Devices::Enumeration::IDeviceInformation; using ABI::Windows::Foundation::Collections::IVectorView; using ABI::Windows::Foundation::IAsyncOperation; using ABI::Windows::Foundation::ITypedEventHandler; @@ -125,6 +129,21 @@ return S_OK; } +HRESULT FakeBluetoothLEDeviceWinrt::get_DeviceInformation( + IDeviceInformation** value) { + return device_information_.CopyTo(value); +} + +HRESULT FakeBluetoothLEDeviceWinrt::get_Appearance( + IBluetoothLEAppearance** value) { + return E_NOTIMPL; +} + +HRESULT FakeBluetoothLEDeviceWinrt::get_BluetoothAddressType( + BluetoothAddressType* value) { + return E_NOTIMPL; +} + HRESULT FakeBluetoothLEDeviceWinrt::get_DeviceAccessInformation( IDeviceAccessInformation** value) { return E_NOTIMPL; @@ -168,6 +187,11 @@ return S_OK; } +void FakeBluetoothLEDeviceWinrt::SimulateDevicePaired(bool is_paired) { + device_information_ = Make<FakeDeviceInformationWinrt>( + Make<FakeDeviceInformationPairingWinrt>(is_paired)); +} + void FakeBluetoothLEDeviceWinrt::SimulateGattConnection() { status_ = BluetoothConnectionStatus_Connected; connection_status_changed_handler_->Invoke(this, nullptr);
diff --git a/device/bluetooth/test/fake_bluetooth_le_device_winrt.h b/device/bluetooth/test/fake_bluetooth_le_device_winrt.h index 0b729fd..e3d23a8 100644 --- a/device/bluetooth/test/fake_bluetooth_le_device_winrt.h +++ b/device/bluetooth/test/fake_bluetooth_le_device_winrt.h
@@ -7,6 +7,7 @@ #include <windows.devices.bluetooth.h> #include <windows.foundation.h> +#include <wrl/client.h> #include <wrl/implements.h> #include <stdint.h> @@ -17,6 +18,7 @@ #include "base/callback.h" #include "base/macros.h" #include "device/bluetooth/bluetooth_device.h" +#include "device/bluetooth/test/fake_device_information_winrt.h" namespace device { @@ -28,6 +30,7 @@ Microsoft::WRL::RuntimeClassFlags< Microsoft::WRL::WinRt | Microsoft::WRL::InhibitRoOriginateError>, ABI::Windows::Devices::Bluetooth::IBluetoothLEDevice, + ABI::Windows::Devices::Bluetooth::IBluetoothLEDevice2, ABI::Windows::Devices::Bluetooth::IBluetoothLEDevice3, ABI::Windows::Foundation::IClosable> { public: @@ -70,6 +73,15 @@ IFACEMETHODIMP remove_ConnectionStatusChanged( EventRegistrationToken token) override; + // IBluetoothLEDevice2: + IFACEMETHODIMP get_DeviceInformation( + ABI::Windows::Devices::Enumeration::IDeviceInformation** value) override; + IFACEMETHODIMP get_Appearance( + ABI::Windows::Devices::Bluetooth::IBluetoothLEAppearance** value) + override; + IFACEMETHODIMP get_BluetoothAddressType( + ABI::Windows::Devices::Bluetooth::BluetoothAddressType* value) override; + // IBluetoothLEDevice3: IFACEMETHODIMP get_DeviceAccessInformation( ABI::Windows::Devices::Enumeration::IDeviceAccessInformation** value) @@ -102,6 +114,7 @@ // IClosable: IFACEMETHODIMP Close() override; + void SimulateDevicePaired(bool is_paired); void SimulateGattConnection(); void SimulateGattConnectionError( BluetoothDevice::ConnectErrorCode error_code); @@ -127,6 +140,9 @@ IInspectable*>> connection_status_changed_handler_; + Microsoft::WRL::ComPtr<ABI::Windows::Devices::Enumeration::IDeviceInformation> + device_information_ = Microsoft::WRL::Make<FakeDeviceInformationWinrt>(); + Microsoft::WRL::ComPtr<ABI::Windows::Foundation::ITypedEventHandler< ABI::Windows::Devices::Bluetooth::BluetoothLEDevice*, IInspectable*>>
diff --git a/device/bluetooth/test/fake_device_information_pairing_winrt.cc b/device/bluetooth/test/fake_device_information_pairing_winrt.cc new file mode 100644 index 0000000..f41d7e6 --- /dev/null +++ b/device/bluetooth/test/fake_device_information_pairing_winrt.cc
@@ -0,0 +1,44 @@ +// 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 "device/bluetooth/test/fake_device_information_pairing_winrt.h" + +namespace device { + +namespace { + +using ABI::Windows::Devices::Enumeration::DevicePairingProtectionLevel; +using ABI::Windows::Devices::Enumeration::DevicePairingResult; +using ABI::Windows::Foundation::IAsyncOperation; + +} // namespace + +FakeDeviceInformationPairingWinrt::FakeDeviceInformationPairingWinrt( + bool is_paired) + : is_paired_(is_paired) {} + +FakeDeviceInformationPairingWinrt::~FakeDeviceInformationPairingWinrt() = + default; + +HRESULT FakeDeviceInformationPairingWinrt::get_IsPaired(boolean* value) { + *value = is_paired_; + return S_OK; +} + +HRESULT FakeDeviceInformationPairingWinrt::get_CanPair(boolean* value) { + return E_NOTIMPL; +} + +HRESULT FakeDeviceInformationPairingWinrt::PairAsync( + IAsyncOperation<DevicePairingResult*>** result) { + return E_NOTIMPL; +} + +HRESULT FakeDeviceInformationPairingWinrt::PairWithProtectionLevelAsync( + DevicePairingProtectionLevel min_protection_level, + IAsyncOperation<DevicePairingResult*>** result) { + return E_NOTIMPL; +} + +} // namespace device
diff --git a/device/bluetooth/test/fake_device_information_pairing_winrt.h b/device/bluetooth/test/fake_device_information_pairing_winrt.h new file mode 100644 index 0000000..38f2fb4 --- /dev/null +++ b/device/bluetooth/test/fake_device_information_pairing_winrt.h
@@ -0,0 +1,47 @@ +// 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 DEVICE_BLUETOOTH_TEST_FAKE_DEVICE_INFORMATION_PAIRING_WINRT_H_ +#define DEVICE_BLUETOOTH_TEST_FAKE_DEVICE_INFORMATION_PAIRING_WINRT_H_ + +#include <windows.devices.enumeration.h> +#include <wrl/client.h> +#include <wrl/implements.h> + +#include "base/macros.h" + +namespace device { + +class FakeDeviceInformationPairingWinrt + : public Microsoft::WRL::RuntimeClass< + Microsoft::WRL::RuntimeClassFlags< + Microsoft::WRL::WinRt | Microsoft::WRL::InhibitRoOriginateError>, + ABI::Windows::Devices::Enumeration::IDeviceInformationPairing> { + public: + explicit FakeDeviceInformationPairingWinrt(bool is_paired); + ~FakeDeviceInformationPairingWinrt() override; + + // IDeviceInformationPairing: + IFACEMETHODIMP get_IsPaired(boolean* value) override; + IFACEMETHODIMP get_CanPair(boolean* value) override; + IFACEMETHODIMP PairAsync( + ABI::Windows::Foundation::IAsyncOperation< + ABI::Windows::Devices::Enumeration::DevicePairingResult*>** result) + override; + IFACEMETHODIMP PairWithProtectionLevelAsync( + ABI::Windows::Devices::Enumeration::DevicePairingProtectionLevel + min_protection_level, + ABI::Windows::Foundation::IAsyncOperation< + ABI::Windows::Devices::Enumeration::DevicePairingResult*>** result) + override; + + private: + bool is_paired_ = false; + + DISALLOW_COPY_AND_ASSIGN(FakeDeviceInformationPairingWinrt); +}; + +} // namespace device + +#endif // DEVICE_BLUETOOTH_TEST_FAKE_DEVICE_INFORMATION_PAIRING_WINRT_H_
diff --git a/device/bluetooth/test/fake_device_information_winrt.cc b/device/bluetooth/test/fake_device_information_winrt.cc index 122a30f..6921c29 100644 --- a/device/bluetooth/test/fake_device_information_winrt.cc +++ b/device/bluetooth/test/fake_device_information_winrt.cc
@@ -20,8 +20,10 @@ using ABI::Windows::Devices::Enumeration::DeviceClass; using ABI::Windows::Devices::Enumeration::DeviceInformation; using ABI::Windows::Devices::Enumeration::DeviceInformationCollection; +using ABI::Windows::Devices::Enumeration::DeviceInformationKind; using ABI::Windows::Devices::Enumeration::DeviceThumbnail; using ABI::Windows::Devices::Enumeration::IDeviceInformation; +using ABI::Windows::Devices::Enumeration::IDeviceInformationPairing; using ABI::Windows::Devices::Enumeration::IDeviceInformationUpdate; using ABI::Windows::Devices::Enumeration::IDeviceWatcher; using ABI::Windows::Devices::Enumeration::IEnclosureLocation; @@ -33,9 +35,18 @@ } // namespace +FakeDeviceInformationWinrt::FakeDeviceInformationWinrt() = default; + +FakeDeviceInformationWinrt::FakeDeviceInformationWinrt(const char* name) + : name_(name) {} + FakeDeviceInformationWinrt::FakeDeviceInformationWinrt(std::string name) : name_(std::move(name)) {} +FakeDeviceInformationWinrt::FakeDeviceInformationWinrt( + ComPtr<IDeviceInformationPairing> pairing) + : pairing_(std::move(pairing)) {} + FakeDeviceInformationWinrt::~FakeDeviceInformationWinrt() = default; HRESULT FakeDeviceInformationWinrt::get_Id(HSTRING* value) { @@ -80,6 +91,15 @@ return E_NOTIMPL; } +HRESULT FakeDeviceInformationWinrt::get_Kind(DeviceInformationKind* value) { + return E_NOTIMPL; +} + +HRESULT FakeDeviceInformationWinrt::get_Pairing( + IDeviceInformationPairing** value) { + return pairing_.CopyTo(value); +} + FakeDeviceInformationStaticsWinrt::FakeDeviceInformationStaticsWinrt( ComPtr<IDeviceInformation> device_information) : device_information_(std::move(device_information)) {}
diff --git a/device/bluetooth/test/fake_device_information_winrt.h b/device/bluetooth/test/fake_device_information_winrt.h index 0be4d8d..b6891fc 100644 --- a/device/bluetooth/test/fake_device_information_winrt.h +++ b/device/bluetooth/test/fake_device_information_winrt.h
@@ -12,6 +12,7 @@ #include <string> #include "base/macros.h" +#include "device/bluetooth/test/fake_device_information_pairing_winrt.h" namespace device { @@ -19,9 +20,18 @@ : public Microsoft::WRL::RuntimeClass< Microsoft::WRL::RuntimeClassFlags< Microsoft::WRL::WinRt | Microsoft::WRL::InhibitRoOriginateError>, - ABI::Windows::Devices::Enumeration::IDeviceInformation> { + ABI::Windows::Devices::Enumeration::IDeviceInformation, + ABI::Windows::Devices::Enumeration::IDeviceInformation2> { public: + FakeDeviceInformationWinrt(); + // Explicit const char* constructor is required to break ambiguity for C + // string arguments. + explicit FakeDeviceInformationWinrt(const char* name); explicit FakeDeviceInformationWinrt(std::string name); + explicit FakeDeviceInformationWinrt( + Microsoft::WRL::ComPtr< + ABI::Windows::Devices::Enumeration::IDeviceInformationPairing> + pairing); ~FakeDeviceInformationWinrt() override; // IDeviceInformation: @@ -46,8 +56,19 @@ ABI::Windows::Devices::Enumeration::DeviceThumbnail*>** async_op) override; + // IDeviceInformation2: + IFACEMETHODIMP get_Kind( + ABI::Windows::Devices::Enumeration::DeviceInformationKind* value) + override; + IFACEMETHODIMP get_Pairing( + ABI::Windows::Devices::Enumeration::IDeviceInformationPairing** value) + override; + private: std::string name_; + Microsoft::WRL::ComPtr< + ABI::Windows::Devices::Enumeration::IDeviceInformationPairing> + pairing_ = Microsoft::WRL::Make<FakeDeviceInformationPairingWinrt>(false); DISALLOW_COPY_AND_ASSIGN(FakeDeviceInformationWinrt); };
diff --git a/device/bluetooth/test/mock_bluetooth_gatt_characteristic.h b/device/bluetooth/test/mock_bluetooth_gatt_characteristic.h index cc52b56..d970195 100644 --- a/device/bluetooth/test/mock_bluetooth_gatt_characteristic.h +++ b/device/bluetooth/test/mock_bluetooth_gatt_characteristic.h
@@ -12,6 +12,7 @@ #include <vector> #include "base/callback.h" +#include "base/containers/span.h" #include "base/macros.h" #include "device/bluetooth/bluetooth_remote_gatt_characteristic.h" #include "device/bluetooth/bluetooth_remote_gatt_descriptor.h" @@ -71,6 +72,7 @@ const base::Closure&, const ErrorCallback&)); #endif + MOCK_METHOD1(WriteWithoutResponse, bool(base::span<const uint8_t>)); void AddMockDescriptor( std::unique_ptr<MockBluetoothGattDescriptor> mock_descriptor);
diff --git a/device/fido/BUILD.gn b/device/fido/BUILD.gn index cc4989d4..3780fc1 100644 --- a/device/fido/BUILD.gn +++ b/device/fido/BUILD.gn
@@ -126,9 +126,11 @@ "//components/cbor", "//crypto", "//device/base", + "//device/fido/strings", "//services/service_manager/public/cpp", "//services/service_manager/public/mojom", "//third_party/boringssl", + "//ui/base", ] public_deps = [
diff --git a/device/fido/DEPS b/device/fido/DEPS index 37d8456..3d3a449 100644 --- a/device/fido/DEPS +++ b/device/fido/DEPS
@@ -4,5 +4,6 @@ "+crypto", "+net/base", "+net/cert", + "+ui/base/l10n", "+third_party/boringssl/src/include", ]
diff --git a/device/fido/ble/fido_ble_connection.cc b/device/fido/ble/fido_ble_connection.cc index c57301e0..2442ba85 100644 --- a/device/fido/ble/fido_ble_connection.cc +++ b/device/fido/ble/fido_ble_connection.cc
@@ -10,6 +10,7 @@ #include "base/bind.h" #include "base/callback_helpers.h" #include "base/logging.h" +#include "build/build_config.h" #include "device/bluetooth/bluetooth_gatt_connection.h" #include "device/bluetooth/bluetooth_gatt_notify_session.h" #include "device/bluetooth/bluetooth_remote_gatt_characteristic.h" @@ -234,19 +235,21 @@ return; } +#if defined(OS_MACOSX) // Attempt a write without response for performance reasons. Fall back to a // confirmed write in case of failure, e.g. when the characteristic does not // provide the required property. if (control_point->WriteWithoutResponse(data)) { DVLOG(2) << "Write without response succeeded."; std::move(callback).Run(true); - } else { - auto copyable_callback = - base::AdaptCallbackForRepeating(std::move(callback)); - control_point->WriteRemoteCharacteristic( - data, base::Bind(OnWrite, copyable_callback), - base::Bind(OnWriteError, copyable_callback)); + return; } +#endif // defined(OS_MACOSX) + + auto copyable_callback = base::AdaptCallbackForRepeating(std::move(callback)); + control_point->WriteRemoteCharacteristic( + data, base::Bind(OnWrite, copyable_callback), + base::Bind(OnWriteError, copyable_callback)); } void FidoBleConnection::WriteServiceRevision(ServiceRevision service_revision,
diff --git a/device/fido/ble/fido_ble_connection_unittest.cc b/device/fido/ble/fido_ble_connection_unittest.cc index 6f81ba39..7d8bb21 100644 --- a/device/fido/ble/fido_ble_connection_unittest.cc +++ b/device/fido/ble/fido_ble_connection_unittest.cc
@@ -251,6 +251,16 @@ } void SetNextWriteControlPointResponse(bool success) { +// For performance reasons we try writes without responses first on macOS. +#if defined(OS_MACOSX) + EXPECT_CALL(*u2f_control_point_, WriteWithoutResponse) + .WillOnce(Return(success)); + if (success) + return; +#else + EXPECT_CALL(*u2f_control_point_, WriteWithoutResponse).Times(0); +#endif // defined(OS_MACOSX) + EXPECT_CALL(*u2f_control_point_, WriteRemoteCharacteristic(_, _, _)) .WillOnce(Invoke([success](const auto& data, const auto& callback, const auto& error_callback) {
diff --git a/device/fido/ble/fido_ble_discovery.cc b/device/fido/ble/fido_ble_discovery.cc index 9b309c5..0c4f293 100644 --- a/device/fido/ble/fido_ble_discovery.cc +++ b/device/fido/ble/fido_ble_discovery.cc
@@ -79,4 +79,11 @@ } } +void FidoBleDiscovery::AdapterPoweredChanged(BluetoothAdapter* adapter, + bool powered) { + if (!observer_) + return; + observer_->BluetoothAdapterPowerChanged(powered); +} + } // namespace device
diff --git a/device/fido/ble/fido_ble_discovery.h b/device/fido/ble/fido_ble_discovery.h index 568c658e..b961e44e 100644 --- a/device/fido/ble/fido_ble_discovery.h +++ b/device/fido/ble/fido_ble_discovery.h
@@ -35,6 +35,7 @@ BluetoothDevice* device) override; void DeviceRemoved(BluetoothAdapter* adapter, BluetoothDevice* device) override; + void AdapterPoweredChanged(BluetoothAdapter* adapter, bool powered) override; base::WeakPtrFactory<FidoBleDiscovery> weak_factory_;
diff --git a/device/fido/fido_discovery.h b/device/fido/fido_discovery.h index 68aadcc9..bc01e25f 100644 --- a/device/fido/fido_discovery.h +++ b/device/fido/fido_discovery.h
@@ -57,6 +57,7 @@ virtual void DeviceAdded(FidoDiscovery* discovery, FidoDevice* device) = 0; virtual void DeviceRemoved(FidoDiscovery* discovery, FidoDevice* device) = 0; + virtual void BluetoothAdapterPowerChanged(bool is_powered_on) {} }; // Factory function to construct an instance that discovers authenticators on
diff --git a/device/fido/fido_request_handler_base.cc b/device/fido/fido_request_handler_base.cc index 8dd8463..84b9c838 100644 --- a/device/fido/fido_request_handler_base.cc +++ b/device/fido/fido_request_handler_base.cc
@@ -6,6 +6,7 @@ #include <utility> +#include "base/barrier_closure.h" #include "base/logging.h" #include "base/strings/string_piece.h" #include "build/build_config.h" @@ -17,6 +18,10 @@ namespace { +// Number of async calls we need to wait before notifying the embedder layer +// of FidoUiAprioriData. +constexpr size_t kNumAsyncTransportInfoCallbacks = 2; + bool ShouldDeferRequestDispatchToUi(const FidoAuthenticator& authenticator) { // TODO(hongjunchoi): Change this to be dependent on authenticator transport // type once UI component is in place. @@ -25,9 +30,28 @@ } // namespace -FidoRequestHandlerBase::AuthenticatorMapObserver::~AuthenticatorMapObserver() = +// FidoRequestHandlerBase::TransportAvailabilityInfo -------------------------- + +FidoRequestHandlerBase::TransportAvailabilityInfo::TransportAvailabilityInfo() = default; +FidoRequestHandlerBase::TransportAvailabilityInfo::TransportAvailabilityInfo( + const TransportAvailabilityInfo& data) = default; + +FidoRequestHandlerBase::TransportAvailabilityInfo& +FidoRequestHandlerBase::TransportAvailabilityInfo::operator=( + const TransportAvailabilityInfo& other) = default; + +FidoRequestHandlerBase::TransportAvailabilityInfo:: + ~TransportAvailabilityInfo() = default; + +// FidoRequestHandlerBase::TransportAvailabilityObserver ---------------------- + +FidoRequestHandlerBase::TransportAvailabilityObserver:: + ~TransportAvailabilityObserver() = default; + +// FidoRequestHandlerBase ----------------------------------------------------- + FidoRequestHandlerBase::FidoRequestHandlerBase( service_manager::Connector* connector, const base::flat_set<FidoTransportProtocol>& transports) @@ -39,7 +63,8 @@ service_manager::Connector* connector, const base::flat_set<FidoTransportProtocol>& transports, AddPlatformAuthenticatorCallback add_platform_authenticator) - : add_platform_authenticator_(std::move(add_platform_authenticator)) { + : add_platform_authenticator_(std::move(add_platform_authenticator)), + weak_factory_(this) { for (const auto transport : transports) { // Construction of CaBleDiscovery is handled by the implementing class as it // requires an extension passed on from the relying party. @@ -62,6 +87,11 @@ discovery->set_observer(this); discoveries_.push_back(std::move(discovery)); } + + notify_observer_callback_ = base::BarrierClosure( + kNumAsyncTransportInfoCallbacks, + base::BindOnce(&FidoRequestHandlerBase::NotifyObserverUiData, + weak_factory_.GetWeakPtr())); } FidoRequestHandlerBase::~FidoRequestHandlerBase() = default; @@ -88,22 +118,21 @@ MaybeAddPlatformAuthenticator(); } -void FidoRequestHandlerBase::MaybeAddPlatformAuthenticator() { - if (!add_platform_authenticator_) - return; - - auto authenticator = std::move(add_platform_authenticator_).Run(); - if (!authenticator) - return; - - AddAuthenticator(std::move(authenticator)); -} void FidoRequestHandlerBase::DiscoveryStarted(FidoDiscovery* discovery, bool success) { - if (discovery->transport() == FidoTransportProtocol::kBluetoothLowEnergy && - observer_) { - observer_->BluetoothAdapterIsAvailable(); + if (discovery->transport() == FidoTransportProtocol::kBluetoothLowEnergy) { + // For FidoBleDiscovery, discovery is started with |success| set to true + // if device::BluetoothAdapter is present in the system. + if (!success) { + transport_availability_info_.available_transports.erase( + FidoTransportProtocol::kBluetoothLowEnergy); + transport_availability_info_.available_transports.erase( + FidoTransportProtocol::kCloudAssistedBluetoothLowEnergy); + } + + DCHECK(notify_observer_callback_); + notify_observer_callback_.Run(); } } @@ -132,6 +161,13 @@ observer_->FidoAuthenticatorRemoved(device->GetId()); } +void FidoRequestHandlerBase::BluetoothAdapterPowerChanged(bool is_powered_on) { + if (!observer_) + return; + + observer_->BluetoothAdapterPowerChanged(is_powered_on); +} + void FidoRequestHandlerBase::AddAuthenticator( std::unique_ptr<FidoAuthenticator> authenticator) { DCHECK(authenticator && @@ -139,7 +175,6 @@ FidoAuthenticator* authenticator_ptr = authenticator.get(); active_authenticators_.emplace(authenticator->GetId(), std::move(authenticator)); - if (!ShouldDeferRequestDispatchToUi(*authenticator_ptr)) DispatchRequest(authenticator_ptr); @@ -147,4 +182,27 @@ observer_->FidoAuthenticatorAdded(*authenticator_ptr); } +void FidoRequestHandlerBase::MaybeAddPlatformAuthenticator() { + std::unique_ptr<FidoAuthenticator> authenticator; + if (add_platform_authenticator_) + authenticator = std::move(add_platform_authenticator_).Run(); + + if (authenticator) { + AddAuthenticator(std::move(authenticator)); + } else { + transport_availability_info_.available_transports.erase( + FidoTransportProtocol::kInternal); + } + + DCHECK(notify_observer_callback_); + notify_observer_callback_.Run(); +} + +void FidoRequestHandlerBase::NotifyObserverUiData() { + if (!observer_) + return; + + observer_->OnTransportAvailabilityEnumerated(transport_availability_info_); +} + } // namespace device
diff --git a/device/fido/fido_request_handler_base.h b/device/fido/fido_request_handler_base.h index 37628c9..4617c517 100644 --- a/device/fido/fido_request_handler_base.h +++ b/device/fido/fido_request_handler_base.h
@@ -8,6 +8,7 @@ #include <functional> #include <map> #include <memory> +#include <set> #include <string> #include <vector> @@ -43,11 +44,34 @@ using AddPlatformAuthenticatorCallback = base::OnceCallback<std::unique_ptr<FidoAuthenticator>()>; - class COMPONENT_EXPORT(DEVICE_FIDO) AuthenticatorMapObserver { - public: - virtual ~AuthenticatorMapObserver(); + enum class RequestType { kMakeCredential, kGetAssertion }; - virtual void BluetoothAdapterIsAvailable() = 0; + // Encapsulates data required to initiate WebAuthN UX dialog. Once all + // components of TransportAvailabilityInfo is set, + // AuthenticatorRequestClientDelegate should be notified. + // TODO(hongjunchoi): Add async calls to notify embedder when Bluetooth is + // powered on/off. + struct COMPONENT_EXPORT(DEVICE_FIDO) TransportAvailabilityInfo { + TransportAvailabilityInfo(); + TransportAvailabilityInfo(const TransportAvailabilityInfo& other); + TransportAvailabilityInfo& operator=( + const TransportAvailabilityInfo& other); + ~TransportAvailabilityInfo(); + + RequestType request_type = RequestType::kMakeCredential; + std::set<FidoTransportProtocol> available_transports; + bool has_recognized_mac_touch_id_credential = false; + bool is_ble_powered = false; + bool can_power_on_ble_adapter = false; + }; + + class COMPONENT_EXPORT(DEVICE_FIDO) TransportAvailabilityObserver { + public: + virtual ~TransportAvailabilityObserver(); + + virtual void OnTransportAvailabilityEnumerated( + TransportAvailabilityInfo data) = 0; + virtual void BluetoothAdapterPowerChanged(bool is_powered_on) = 0; virtual void FidoAuthenticatorAdded( const FidoAuthenticator& authenticator) = 0; virtual void FidoAuthenticatorRemoved(base::StringPiece device_id) = 0; @@ -76,7 +100,7 @@ // https://w3c.github.io/webauthn/#iface-pkcredential void CancelOngoingTasks(base::StringPiece exclude_device_id = nullptr); - void set_observer(AuthenticatorMapObserver* observer) { + void set_observer(TransportAvailabilityObserver* observer) { DCHECK(!observer_) << "Only one observer is supported."; observer_ = observer; } @@ -97,23 +121,30 @@ std::vector<std::unique_ptr<FidoDiscovery>>& discoveries() { return discoveries_; } - - AuthenticatorMapObserver* observer() const { return observer_; } + TransportAvailabilityInfo& transport_availability_info() { + return transport_availability_info_; + } + TransportAvailabilityObserver* observer() const { return observer_; } private: // FidoDiscovery::Observer void DiscoveryStarted(FidoDiscovery* discovery, bool success) final; void DeviceAdded(FidoDiscovery* discovery, FidoDevice* device) final; void DeviceRemoved(FidoDiscovery* discovery, FidoDevice* device) final; + void BluetoothAdapterPowerChanged(bool is_powered_on) final; void AddAuthenticator(std::unique_ptr<FidoAuthenticator> authenticator); void MaybeAddPlatformAuthenticator(); + void NotifyObserverUiData(); AuthenticatorMap active_authenticators_; std::vector<std::unique_ptr<FidoDiscovery>> discoveries_; - AuthenticatorMapObserver* observer_ = nullptr; - + TransportAvailabilityObserver* observer_ = nullptr; + TransportAvailabilityInfo transport_availability_info_; + base::RepeatingClosure notify_observer_callback_; AddPlatformAuthenticatorCallback add_platform_authenticator_; + + base::WeakPtrFactory<FidoRequestHandlerBase> weak_factory_; DISALLOW_COPY_AND_ASSIGN(FidoRequestHandlerBase); };
diff --git a/device/fido/fido_strings.grd b/device/fido/fido_strings.grd new file mode 100644 index 0000000..8eaa387 --- /dev/null +++ b/device/fido/fido_strings.grd
@@ -0,0 +1,136 @@ +<?xml version="1.0" encoding="UTF-8"?> + +<!-- +This file contains the strings for //device/fido. +--> + +<grit base_dir="." latest_public_release="0" current_release="1" + output_all_resource_defines="false" source_lang_id="en" enc_check="möl"> + <outputs> + <output filename="grit/fido_strings.h" type="rc_header"> + <emit emit_type='prepend'></emit> + </output> + <output filename="fido_strings_am.pak" type="data_package" lang="am" /> + <output filename="fido_strings_ar.pak" type="data_package" lang="ar" /> + <output filename="fido_strings_bg.pak" type="data_package" lang="bg" /> + <output filename="fido_strings_bn.pak" type="data_package" lang="bn" /> + <output filename="fido_strings_ca.pak" type="data_package" lang="ca" /> + <output filename="fido_strings_cs.pak" type="data_package" lang="cs" /> + <output filename="fido_strings_da.pak" type="data_package" lang="da" /> + <output filename="fido_strings_de.pak" type="data_package" lang="de" /> + <output filename="fido_strings_el.pak" type="data_package" lang="el" /> + <output filename="fido_strings_en-GB.pak" type="data_package" lang="en-GB" /> + <output filename="fido_strings_en-US.pak" type="data_package" lang="en" /> + <output filename="fido_strings_es.pak" type="data_package" lang="es" /> + <output filename="fido_strings_es-419.pak" type="data_package" lang="es-419" /> + <output filename="fido_strings_et.pak" type="data_package" lang="et" /> + <output filename="fido_strings_fa.pak" type="data_package" lang="fa" /> + <output filename="fido_strings_fake-bidi.pak" type="data_package" lang="fake-bidi" /> + <output filename="fido_strings_fi.pak" type="data_package" lang="fi" /> + <output filename="fido_strings_fil.pak" type="data_package" lang="fil" /> + <output filename="fido_strings_fr.pak" type="data_package" lang="fr" /> + <output filename="fido_strings_gu.pak" type="data_package" lang="gu" /> + <output filename="fido_strings_he.pak" type="data_package" lang="he" /> + <output filename="fido_strings_hi.pak" type="data_package" lang="hi" /> + <output filename="fido_strings_hr.pak" type="data_package" lang="hr" /> + <output filename="fido_strings_hu.pak" type="data_package" lang="hu" /> + <output filename="fido_strings_id.pak" type="data_package" lang="id" /> + <output filename="fido_strings_it.pak" type="data_package" lang="it" /> + <output filename="fido_strings_ja.pak" type="data_package" lang="ja" /> + <output filename="fido_strings_kn.pak" type="data_package" lang="kn" /> + <output filename="fido_strings_ko.pak" type="data_package" lang="ko" /> + <output filename="fido_strings_lt.pak" type="data_package" lang="lt" /> + <output filename="fido_strings_lv.pak" type="data_package" lang="lv" /> + <output filename="fido_strings_ml.pak" type="data_package" lang="ml" /> + <output filename="fido_strings_mr.pak" type="data_package" lang="mr" /> + <output filename="fido_strings_ms.pak" type="data_package" lang="ms" /> + <output filename="fido_strings_nl.pak" type="data_package" lang="nl" /> + <!-- The translation console uses 'no' for Norwegian Bokmål. It should + be 'nb'. --> + <output filename="fido_strings_nb.pak" type="data_package" lang="no" /> + <output filename="fido_strings_pl.pak" type="data_package" lang="pl" /> + <output filename="fido_strings_pt-BR.pak" type="data_package" lang="pt-BR" /> + <output filename="fido_strings_pt-PT.pak" type="data_package" lang="pt-PT" /> + <output filename="fido_strings_ro.pak" type="data_package" lang="ro" /> + <output filename="fido_strings_ru.pak" type="data_package" lang="ru" /> + <output filename="fido_strings_sk.pak" type="data_package" lang="sk" /> + <output filename="fido_strings_sl.pak" type="data_package" lang="sl" /> + <output filename="fido_strings_sr.pak" type="data_package" lang="sr" /> + <output filename="fido_strings_sv.pak" type="data_package" lang="sv" /> + <output filename="fido_strings_sw.pak" type="data_package" lang="sw" /> + <output filename="fido_strings_ta.pak" type="data_package" lang="ta" /> + <output filename="fido_strings_te.pak" type="data_package" lang="te" /> + <output filename="fido_strings_th.pak" type="data_package" lang="th" /> + <output filename="fido_strings_tr.pak" type="data_package" lang="tr" /> + <output filename="fido_strings_uk.pak" type="data_package" lang="uk" /> + <output filename="fido_strings_vi.pak" type="data_package" lang="vi" /> + <output filename="fido_strings_zh-CN.pak" type="data_package" lang="zh-CN" /> + <output filename="fido_strings_zh-TW.pak" type="data_package" lang="zh-TW" /> + </outputs> + <translations> + <file path="strings/fido_strings_am.xtb" lang="am" /> + <file path="strings/fido_strings_ar.xtb" lang="ar" /> + <file path="strings/fido_strings_bg.xtb" lang="bg" /> + <file path="strings/fido_strings_bn.xtb" lang="bn" /> + <file path="strings/fido_strings_ca.xtb" lang="ca" /> + <file path="strings/fido_strings_cs.xtb" lang="cs" /> + <file path="strings/fido_strings_da.xtb" lang="da" /> + <file path="strings/fido_strings_de.xtb" lang="de" /> + <file path="strings/fido_strings_el.xtb" lang="el" /> + <file path="strings/fido_strings_en-GB.xtb" lang="en-GB" /> + <file path="strings/fido_strings_es.xtb" lang="es" /> + <file path="strings/fido_strings_es-419.xtb" lang="es-419" /> + <file path="strings/fido_strings_et.xtb" lang="et" /> + <file path="strings/fido_strings_fa.xtb" lang="fa" /> + <file path="strings/fido_strings_fi.xtb" lang="fi" /> + <file path="strings/fido_strings_fil.xtb" lang="fil" /> + <file path="strings/fido_strings_fr.xtb" lang="fr" /> + <file path="strings/fido_strings_gu.xtb" lang="gu" /> + <file path="strings/fido_strings_hi.xtb" lang="hi" /> + <file path="strings/fido_strings_hr.xtb" lang="hr" /> + <file path="strings/fido_strings_hu.xtb" lang="hu" /> + <file path="strings/fido_strings_id.xtb" lang="id" /> + <file path="strings/fido_strings_it.xtb" lang="it" /> + <!-- The translation console uses 'iw' for Hebrew, but we use 'he'. --> + <file path="strings/fido_strings_iw.xtb" lang="he" /> + <file path="strings/fido_strings_ja.xtb" lang="ja" /> + <file path="strings/fido_strings_kn.xtb" lang="kn" /> + <file path="strings/fido_strings_ko.xtb" lang="ko" /> + <file path="strings/fido_strings_lt.xtb" lang="lt" /> + <file path="strings/fido_strings_lv.xtb" lang="lv" /> + <file path="strings/fido_strings_ml.xtb" lang="ml" /> + <file path="strings/fido_strings_mr.xtb" lang="mr" /> + <file path="strings/fido_strings_ms.xtb" lang="ms" /> + <file path="strings/fido_strings_nl.xtb" lang="nl" /> + <file path="strings/fido_strings_no.xtb" lang="no" /> + <file path="strings/fido_strings_pl.xtb" lang="pl" /> + <file path="strings/fido_strings_pt-BR.xtb" lang="pt-BR" /> + <file path="strings/fido_strings_pt-PT.xtb" lang="pt-PT" /> + <file path="strings/fido_strings_ro.xtb" lang="ro" /> + <file path="strings/fido_strings_ru.xtb" lang="ru" /> + <file path="strings/fido_strings_sk.xtb" lang="sk" /> + <file path="strings/fido_strings_sl.xtb" lang="sl" /> + <file path="strings/fido_strings_sr.xtb" lang="sr" /> + <file path="strings/fido_strings_sv.xtb" lang="sv" /> + <file path="strings/fido_strings_sw.xtb" lang="sw" /> + <file path="strings/fido_strings_ta.xtb" lang="ta" /> + <file path="strings/fido_strings_te.xtb" lang="te" /> + <file path="strings/fido_strings_th.xtb" lang="th" /> + <file path="strings/fido_strings_tr.xtb" lang="tr" /> + <file path="strings/fido_strings_uk.xtb" lang="uk" /> + <file path="strings/fido_strings_vi.xtb" lang="vi" /> + <file path="strings/fido_strings_zh-CN.xtb" lang="zh-CN" /> + <file path="strings/fido_strings_zh-TW.xtb" lang="zh-TW" /> + </translations> + <release seq="1" allow_pseudo="false"> + <messages fallback_to_english="true"> + <if expr="is_macosx"> + <message name="IDS_WEBAUTHN_TOUCH_ID_PROMPT_REASON" desc="Sentence fragment (lower case). Shown after 'Google Chrome is trying to ' (or in some languages, 'Google Chrome wants to ') in a dialog message asking the user to confirm or cancel this action."> + verify your identity on <ph name="APP_NAME">$1<ex>google.com</ex></ph> + </message> + </if> + </messages> + </release> +</grit> + +
diff --git a/device/fido/get_assertion_handler_unittest.cc b/device/fido/get_assertion_handler_unittest.cc index fffaf21d..bfebbb3 100644 --- a/device/fido/get_assertion_handler_unittest.cc +++ b/device/fido/get_assertion_handler_unittest.cc
@@ -238,4 +238,33 @@ EXPECT_FALSE(get_assertion_callback().was_called()); } +// Tests a scenario where authenticator of incorrect transport type was used to +// conduct CTAP GetAssertion call. +TEST_F(FidoGetAssertionHandlerTest, IncorrectTransportType) { + // GetAssertion request that expects GetAssertion call for credential + // |CredentialType::kPublicKey| to be signed with Cable authenticator. + CtapGetAssertionRequest request(test_data::kRelyingPartyId, + test_data::kClientDataHash); + request.SetAllowList( + {{CredentialType::kPublicKey, + fido_parsing_utils::Materialize( + test_data::kTestGetAssertionCredentialId), + {FidoTransportProtocol::kCloudAssistedBluetoothLowEnergy}}}); + auto request_handler = + CreateGetAssertionHandlerWithRequest(std::move(request)); + discovery()->WaitForCallToStartAndSimulateSuccess(); + auto device = MockFidoDevice::MakeCtapWithGetInfoExpectation(); + // Since transport type of |device| is different from what the relying party + // defined in |request| above, this request should fail. + device->SetDeviceTransport(FidoTransportProtocol::kUsbHumanInterfaceDevice); + device->ExpectCtap2CommandAndRespondWith( + CtapRequestCommand::kAuthenticatorGetAssertion, + test_data::kTestGetAssertionResponse); + + discovery()->AddDevice(std::move(device)); + + scoped_task_environment_.FastForwardUntilNoTasksRemain(); + EXPECT_FALSE(get_assertion_callback().was_called()); +} + } // namespace device
diff --git a/device/fido/get_assertion_request_handler.cc b/device/fido/get_assertion_request_handler.cc index 074e04a..eacc8a7 100644 --- a/device/fido/get_assertion_request_handler.cc +++ b/device/fido/get_assertion_request_handler.cc
@@ -5,6 +5,7 @@ #include "device/fido/get_assertion_request_handler.h" #include <algorithm> +#include <set> #include <utility> #include "base/bind.h" @@ -54,10 +55,11 @@ return true; } -// Checks whether credential ID returned from the authenticator was included -// in the allowed list for authenticators. If the device has resident key -// support, returned credential ID may be resident credential. Thus, returned -// credential ID need not be in allowed list. +// Checks whether credential ID returned from the authenticator and transport +// type used matches the transport type and credential ID defined in +// PublicKeyCredentialDescriptor of the allowed list. If the device has resident +// key support, returned credential ID may be resident credential. Thus, +// returned credential ID need not be in allowed list. // TODO(hongjunchoi) : Add link to section of the CTAP spec once it is // published. bool CheckResponseCredentialIdMatchesRequestAllowList( @@ -71,13 +73,69 @@ } // Credential ID may be omitted if allow list has size 1. Otherwise, it needs // to match. + const auto transport_used = authenticator.AuthenticatorTransport(); return (allow_list->size() == 1 && !response.credential()) || std::any_of(allow_list->cbegin(), allow_list->cend(), - [&response](const auto& credential) { - return credential.id() == response.raw_credential_id(); + [&response, transport_used](const auto& credential) { + return credential.id() == response.raw_credential_id() && + base::ContainsKey(credential.transports(), + transport_used); }); } +// Checks UserVerificationRequirement enum passed from the relying party is +// compatible with the authenticator, and updates the request to the +// "effective" user verification requirement. +// https://w3c.github.io/webauthn/#effective-user-verification-requirement-for-assertion +bool CheckUserVerificationCompatible(FidoAuthenticator* authenticator, + CtapGetAssertionRequest* request) { + const auto uv_availability = + authenticator->Options().user_verification_availability(); + + switch (request->user_verification()) { + case UserVerificationRequirement::kRequired: + return uv_availability == + AuthenticatorSupportedOptions::UserVerificationAvailability:: + kSupportedAndConfigured; + + case UserVerificationRequirement::kDiscouraged: + return true; + + case UserVerificationRequirement::kPreferred: + if (uv_availability == + AuthenticatorSupportedOptions::UserVerificationAvailability:: + kSupportedAndConfigured) { + request->SetUserVerification(UserVerificationRequirement::kRequired); + } else { + request->SetUserVerification(UserVerificationRequirement::kDiscouraged); + } + return true; + } + + NOTREACHED(); + return false; +} + +std::set<FidoTransportProtocol> GetAllowedTransports( + const CtapGetAssertionRequest& request) { + const auto& allowed_list = request.allow_list(); + if (!allowed_list) { + return {FidoTransportProtocol::kInternal, + FidoTransportProtocol::kNearFieldCommunication, + FidoTransportProtocol::kUsbHumanInterfaceDevice, + FidoTransportProtocol::kBluetoothLowEnergy, + FidoTransportProtocol::kCloudAssistedBluetoothLowEnergy}; + } + + std::set<FidoTransportProtocol> protocols; + for (const auto credential : *allowed_list) { + protocols.insert(credential.transports().begin(), + credential.transports().end()); + } + + return protocols; +} + } // namespace GetAssertionRequestHandler::GetAssertionRequestHandler( @@ -112,48 +170,15 @@ discoveries().push_back(std::move(discovery)); } + transport_availability_info().request_type = + FidoRequestHandlerBase::RequestType::kGetAssertion; + transport_availability_info().available_transports = + GetAllowedTransports(request_); Start(); } GetAssertionRequestHandler::~GetAssertionRequestHandler() = default; -namespace { - -// Checks UserVerificationRequirement enum passed from the relying party is -// compatible with the authenticator, and updates the request to the -// "effective" user verification requirement. -// https://w3c.github.io/webauthn/#effective-user-verification-requirement-for-assertion -bool CheckUserVerificationCompatible(FidoAuthenticator* authenticator, - CtapGetAssertionRequest* request) { - const auto uv_availability = - authenticator->Options().user_verification_availability(); - - switch (request->user_verification()) { - case UserVerificationRequirement::kRequired: - return uv_availability == - AuthenticatorSupportedOptions::UserVerificationAvailability:: - kSupportedAndConfigured; - - case UserVerificationRequirement::kDiscouraged: - return true; - - case UserVerificationRequirement::kPreferred: - if (uv_availability == - AuthenticatorSupportedOptions::UserVerificationAvailability:: - kSupportedAndConfigured) { - request->SetUserVerification(UserVerificationRequirement::kRequired); - } else { - request->SetUserVerification(UserVerificationRequirement::kDiscouraged); - } - return true; - } - - NOTREACHED(); - return false; -} - -} // namespace - void GetAssertionRequestHandler::DispatchRequest( FidoAuthenticator* authenticator) { // The user verification field of the request may be adjusted to the
diff --git a/device/fido/mac/fake_touch_id_context.h b/device/fido/mac/fake_touch_id_context.h index 97c59171..28f55297 100644 --- a/device/fido/mac/fake_touch_id_context.h +++ b/device/fido/mac/fake_touch_id_context.h
@@ -19,7 +19,7 @@ ~FakeTouchIdContext() override; // TouchIdContext: - void PromptTouchId(std::string reason, Callback callback) override; + void PromptTouchId(const base::string16& reason, Callback callback) override; void set_callback_result(bool callback_result) { callback_result_ = callback_result;
diff --git a/device/fido/mac/fake_touch_id_context.mm b/device/fido/mac/fake_touch_id_context.mm index a858ef4..ad95504 100644 --- a/device/fido/mac/fake_touch_id_context.mm +++ b/device/fido/mac/fake_touch_id_context.mm
@@ -14,7 +14,8 @@ FakeTouchIdContext::FakeTouchIdContext() = default; FakeTouchIdContext::~FakeTouchIdContext() = default; -void FakeTouchIdContext::PromptTouchId(std::string reason, Callback callback) { +void FakeTouchIdContext::PromptTouchId(const base::string16& reason, + Callback callback) { std::move(callback).Run(callback_result_); }
diff --git a/device/fido/mac/get_assertion_operation.mm b/device/fido/mac/get_assertion_operation.mm index 5085e07..0f93bad 100644 --- a/device/fido/mac/get_assertion_operation.mm +++ b/device/fido/mac/get_assertion_operation.mm
@@ -13,11 +13,14 @@ #include "base/mac/mac_logging.h" #include "base/mac/scoped_cftyperef.h" #include "base/strings/string_number_conversions.h" +#include "base/strings/utf_string_conversions.h" #include "device/fido/fido_constants.h" #include "device/fido/mac/keychain.h" #include "device/fido/mac/util.h" #include "device/fido/public_key_credential_descriptor.h" #include "device/fido/public_key_credential_user_entity.h" +#include "device/fido/strings/grit/fido_strings.h" +#include "ui/base/l10n/l10n_util.h" namespace device { namespace fido { @@ -73,9 +76,9 @@ return; } - // Prompt the user for consent. - // TODO(martinkr): Localize reason strings. - PromptTouchId("sign in to " + RpId()); + // Display the macOS Touch ID prompt. + PromptTouchId(l10n_util::GetStringFUTF16(IDS_WEBAUTHN_TOUCH_ID_PROMPT_REASON, + base::UTF8ToUTF16(RpId()))); } void GetAssertionOperation::PromptTouchIdDone(bool success) {
diff --git a/device/fido/mac/make_credential_operation.mm b/device/fido/mac/make_credential_operation.mm index e5669be3..b83f45b64 100644 --- a/device/fido/mac/make_credential_operation.mm +++ b/device/fido/mac/make_credential_operation.mm
@@ -11,12 +11,15 @@ #include "base/mac/foundation_util.h" #include "base/mac/mac_logging.h" #include "base/mac/scoped_cftyperef.h" +#include "base/strings/utf_string_conversions.h" #include "device/fido/attestation_statement_formats.h" #include "device/fido/fido_constants.h" #include "device/fido/fido_parsing_utils.h" #include "device/fido/mac/credential_metadata.h" #include "device/fido/mac/keychain.h" #include "device/fido/mac/util.h" +#include "device/fido/strings/grit/fido_strings.h" +#include "ui/base/l10n/l10n_util.h" namespace device { namespace fido { @@ -65,9 +68,9 @@ return; } - // Prompt the user for consent. - // TODO(martinkr): Localize reason strings. - PromptTouchId("register with " + RpId()); + // Display the macOS Touch ID prompt. + PromptTouchId(l10n_util::GetStringFUTF16(IDS_WEBAUTHN_TOUCH_ID_PROMPT_REASON, + base::UTF8ToUTF16(RpId()))); } void MakeCredentialOperation::PromptTouchIdDone(bool success) {
diff --git a/device/fido/mac/operation_base.h b/device/fido/mac/operation_base.h index 3e26efac..5dc476b6 100644 --- a/device/fido/mac/operation_base.h +++ b/device/fido/mac/operation_base.h
@@ -56,13 +56,13 @@ // PromptTouchId triggers a Touch ID consent dialog with the given reason // string. Subclasses implement the PromptTouchIdDone callback to receive the // result. - void PromptTouchId(std::string reason) { + void PromptTouchId(const base::string16& reason) { // The callback passed to TouchIdContext::Prompt will not fire if the // TouchIdContext itself has been deleted. Since that it is owned by this // class, there is no need to bind the callback to a weak ref here. touch_id_context_->PromptTouchId( - std::move(reason), base::BindOnce(&OperationBase::PromptTouchIdDone, - base::Unretained(this))); + reason, base::BindOnce(&OperationBase::PromptTouchIdDone, + base::Unretained(this))); } // Callback for |PromptTouchId|.
diff --git a/device/fido/mac/touch_id_context.h b/device/fido/mac/touch_id_context.h index 9106e718..2eff4ca 100644 --- a/device/fido/mac/touch_id_context.h +++ b/device/fido/mac/touch_id_context.h
@@ -14,6 +14,7 @@ #include "base/mac/scoped_nsobject.h" #include "base/macros.h" #include "base/memory/weak_ptr.h" +#include "base/strings/string16.h" namespace device { namespace fido { @@ -49,7 +50,7 @@ // string to the user. On completion or error, the provided callback is // invoked, unless the TouchIdContext instance has been destroyed in the // meantime (in which case nothing happens). - virtual void PromptTouchId(std::string reason, Callback callback); + virtual void PromptTouchId(const base::string16& reason, Callback callback); // authentication_context returns the LAContext used for the Touch ID prompt. LAContext* authentication_context() const { return context_; }
diff --git a/device/fido/mac/touch_id_context.mm b/device/fido/mac/touch_id_context.mm index d1d61f77..632556c 100644 --- a/device/fido/mac/touch_id_context.mm +++ b/device/fido/mac/touch_id_context.mm
@@ -77,7 +77,8 @@ [context_ invalidate]; } -void TouchIdContext::PromptTouchId(std::string reason, Callback callback) { +void TouchIdContext::PromptTouchId(const base::string16& reason, + Callback callback) { callback_ = std::move(callback); scoped_refptr<base::SequencedTaskRunner> runner = base::SequencedTaskRunnerHandle::Get(); @@ -88,7 +89,7 @@ // the sign bit there. [context_ evaluateAccessControl:access_control_ operation:LAAccessControlOperationUseKeySign - localizedReason:base::SysUTF8ToNSString(reason) + localizedReason:base::SysUTF16ToNSString(reason) reply:^(BOOL success, NSError* error) { // The reply block is invoked in a separate // thread. We want to invoke the callback in the
diff --git a/device/fido/mac/util.h b/device/fido/mac/util.h index 6f6d8ca..0b4e56d5 100644 --- a/device/fido/mac/util.h +++ b/device/fido/mac/util.h
@@ -47,8 +47,6 @@ std::unique_ptr<ECPublicKey> SecKeyRefToECPublicKey(SecKeyRef public_key_ref) API_AVAILABLE(macosx(10.12.2)); -std::vector<uint8_t> TouchIdAaguid(); - } // namespace mac } // namespace fido } // namespace device
diff --git a/device/fido/mac/util.mm b/device/fido/mac/util.mm index af4f6105..b91556f 100644 --- a/device/fido/mac/util.mm +++ b/device/fido/mac/util.mm
@@ -31,14 +31,11 @@ using cbor::CBORWriter; using cbor::CBORValue; -// The authenticator AAGUID value. -constexpr std::array<uint8_t, 16> kAaguid = {0xad, 0xce, 0x00, 0x02, 0x35, 0xbc, - 0xc6, 0x0a, 0x64, 0x8b, 0x0b, 0x25, - 0xf1, 0xf0, 0x55, 0x03}; - -std::vector<uint8_t> TouchIdAaguid() { - return std::vector<uint8_t>(kAaguid.begin(), kAaguid.end()); -} +// WebAuthn requires an all-zero AAGUID for authenticators using +// self-attestation. +constexpr std::array<uint8_t, 16> kAaguid = {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00}; // SecKeyRefToECPublicKey converts a SecKeyRef for a public key into an // equivalent |ECPublicKey| instance. It returns |nullptr| if the key cannot be
diff --git a/device/fido/make_credential_request_handler.cc b/device/fido/make_credential_request_handler.cc index 133fe01..9fc2e8b 100644 --- a/device/fido/make_credential_request_handler.cc +++ b/device/fido/make_credential_request_handler.cc
@@ -4,50 +4,19 @@ #include "device/fido/make_credential_request_handler.h" +#include <set> #include <utility> #include "base/bind.h" #include "device/fido/authenticator_make_credential_response.h" #include "device/fido/fido_authenticator.h" #include "device/fido/fido_parsing_utils.h" +#include "device/fido/fido_transport_protocol.h" #include "device/fido/make_credential_task.h" #include "services/service_manager/public/cpp/connector.h" namespace device { -MakeCredentialRequestHandler::MakeCredentialRequestHandler( - service_manager::Connector* connector, - const base::flat_set<FidoTransportProtocol>& protocols, - CtapMakeCredentialRequest request, - AuthenticatorSelectionCriteria authenticator_selection_criteria, - RegisterResponseCallback completion_callback) - : MakeCredentialRequestHandler(connector, - protocols, - std::move(request), - authenticator_selection_criteria, - std::move(completion_callback), - AddPlatformAuthenticatorCallback()) {} - -MakeCredentialRequestHandler::MakeCredentialRequestHandler( - service_manager::Connector* connector, - const base::flat_set<FidoTransportProtocol>& protocols, - CtapMakeCredentialRequest request, - AuthenticatorSelectionCriteria authenticator_selection_criteria, - RegisterResponseCallback completion_callback, - AddPlatformAuthenticatorCallback add_platform_authenticator) - : FidoRequestHandler(connector, - protocols, - std::move(completion_callback), - std::move(add_platform_authenticator)), - request_parameter_(std::move(request)), - authenticator_selection_criteria_( - std::move(authenticator_selection_criteria)), - weak_factory_(this) { - Start(); -} - -MakeCredentialRequestHandler::~MakeCredentialRequestHandler() = default; - namespace { bool CheckIfAuthenticatorSelectionCriteriaAreSatisfied( @@ -88,8 +57,71 @@ UvAvailability::kSupportedAndConfigured; } +std::set<FidoTransportProtocol> GetValidTransportProtocols( + const AuthenticatorSelectionCriteria& authenticator_selection_criteria) { + using AttachmentType = + AuthenticatorSelectionCriteria::AuthenticatorAttachment; + const auto attachment_type = + authenticator_selection_criteria.authenticator_attachement(); + switch (attachment_type) { + case AttachmentType::kPlatform: + return {FidoTransportProtocol::kInternal}; + case AttachmentType::kCrossPlatform: + return {FidoTransportProtocol::kUsbHumanInterfaceDevice, + FidoTransportProtocol::kBluetoothLowEnergy, + FidoTransportProtocol::kNearFieldCommunication, + FidoTransportProtocol::kCloudAssistedBluetoothLowEnergy}; + case AttachmentType::kAny: + return {FidoTransportProtocol::kInternal, + FidoTransportProtocol::kNearFieldCommunication, + FidoTransportProtocol::kUsbHumanInterfaceDevice, + FidoTransportProtocol::kBluetoothLowEnergy, + FidoTransportProtocol::kCloudAssistedBluetoothLowEnergy}; + } + + NOTREACHED(); + return std::set<FidoTransportProtocol>(); +} + } // namespace +MakeCredentialRequestHandler::MakeCredentialRequestHandler( + service_manager::Connector* connector, + const base::flat_set<FidoTransportProtocol>& protocols, + CtapMakeCredentialRequest request, + AuthenticatorSelectionCriteria authenticator_selection_criteria, + RegisterResponseCallback completion_callback) + : MakeCredentialRequestHandler(connector, + protocols, + std::move(request), + authenticator_selection_criteria, + std::move(completion_callback), + AddPlatformAuthenticatorCallback()) {} + +MakeCredentialRequestHandler::MakeCredentialRequestHandler( + service_manager::Connector* connector, + const base::flat_set<FidoTransportProtocol>& protocols, + CtapMakeCredentialRequest request, + AuthenticatorSelectionCriteria authenticator_selection_criteria, + RegisterResponseCallback completion_callback, + AddPlatformAuthenticatorCallback add_platform_authenticator) + : FidoRequestHandler(connector, + protocols, + std::move(completion_callback), + std::move(add_platform_authenticator)), + request_parameter_(std::move(request)), + authenticator_selection_criteria_( + std::move(authenticator_selection_criteria)), + weak_factory_(this) { + transport_availability_info().request_type = + FidoRequestHandlerBase::RequestType::kMakeCredential; + transport_availability_info().available_transports = + GetValidTransportProtocols(authenticator_selection_criteria); + Start(); +} + +MakeCredentialRequestHandler::~MakeCredentialRequestHandler() = default; + void MakeCredentialRequestHandler::DispatchRequest( FidoAuthenticator* authenticator) { // The user verification field of the request may be adjusted to the
diff --git a/device/fido/public_key_credential_descriptor.cc b/device/fido/public_key_credential_descriptor.cc index af48eeb..8bce337c 100644 --- a/device/fido/public_key_credential_descriptor.cc +++ b/device/fido/public_key_credential_descriptor.cc
@@ -41,7 +41,22 @@ PublicKeyCredentialDescriptor::PublicKeyCredentialDescriptor( CredentialType credential_type, std::vector<uint8_t> id) - : credential_type_(credential_type), id_(std::move(id)) {} + : PublicKeyCredentialDescriptor( + credential_type, + std::move(id), + {FidoTransportProtocol::kUsbHumanInterfaceDevice, + FidoTransportProtocol::kBluetoothLowEnergy, + FidoTransportProtocol::kNearFieldCommunication, + FidoTransportProtocol::kCloudAssistedBluetoothLowEnergy, + FidoTransportProtocol::kInternal}) {} + +PublicKeyCredentialDescriptor::PublicKeyCredentialDescriptor( + CredentialType credential_type, + std::vector<uint8_t> id, + base::flat_set<FidoTransportProtocol> transports) + : credential_type_(credential_type), + id_(std::move(id)), + transports_(std::move(transports)) {} PublicKeyCredentialDescriptor::PublicKeyCredentialDescriptor( const PublicKeyCredentialDescriptor& other) = default;
diff --git a/device/fido/public_key_credential_descriptor.h b/device/fido/public_key_credential_descriptor.h index 02bc438..626832666 100644 --- a/device/fido/public_key_credential_descriptor.h +++ b/device/fido/public_key_credential_descriptor.h
@@ -10,9 +10,11 @@ #include <vector> #include "base/component_export.h" +#include "base/containers/flat_set.h" #include "base/optional.h" #include "components/cbor/cbor_values.h" #include "device/fido/fido_constants.h" +#include "device/fido/fido_transport_protocol.h" namespace device { @@ -27,6 +29,10 @@ PublicKeyCredentialDescriptor(CredentialType credential_type, std::vector<uint8_t> id); + PublicKeyCredentialDescriptor( + CredentialType credential_type, + std::vector<uint8_t> id, + base::flat_set<FidoTransportProtocol> transports); PublicKeyCredentialDescriptor(const PublicKeyCredentialDescriptor& other); PublicKeyCredentialDescriptor(PublicKeyCredentialDescriptor&& other); PublicKeyCredentialDescriptor& operator=( @@ -39,10 +45,14 @@ CredentialType credential_type() const { return credential_type_; } const std::vector<uint8_t>& id() const { return id_; } + const base::flat_set<FidoTransportProtocol>& transports() const { + return transports_; + } private: CredentialType credential_type_; std::vector<uint8_t> id_; + base::flat_set<FidoTransportProtocol> transports_; }; } // namespace device
diff --git a/device/fido/strings/BUILD.gn b/device/fido/strings/BUILD.gn new file mode 100644 index 0000000..a07303d --- /dev/null +++ b/device/fido/strings/BUILD.gn
@@ -0,0 +1,66 @@ +# 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. + +import("//tools/grit/grit_rule.gni") + +grit("strings") { + source = "../fido_strings.grd" + outputs = [ + "grit/fido_strings.h", + "fido_strings_am.pak", + "fido_strings_ar.pak", + "fido_strings_bg.pak", + "fido_strings_bn.pak", + "fido_strings_ca.pak", + "fido_strings_cs.pak", + "fido_strings_da.pak", + "fido_strings_de.pak", + "fido_strings_el.pak", + "fido_strings_en-GB.pak", + "fido_strings_en-US.pak", + "fido_strings_es.pak", + "fido_strings_es-419.pak", + "fido_strings_et.pak", + "fido_strings_fa.pak", + "fido_strings_fake-bidi.pak", + "fido_strings_fi.pak", + "fido_strings_fil.pak", + "fido_strings_fr.pak", + "fido_strings_gu.pak", + "fido_strings_he.pak", + "fido_strings_hi.pak", + "fido_strings_hr.pak", + "fido_strings_hu.pak", + "fido_strings_id.pak", + "fido_strings_it.pak", + "fido_strings_ja.pak", + "fido_strings_kn.pak", + "fido_strings_ko.pak", + "fido_strings_lt.pak", + "fido_strings_lv.pak", + "fido_strings_ml.pak", + "fido_strings_mr.pak", + "fido_strings_ms.pak", + "fido_strings_nl.pak", + "fido_strings_nb.pak", + "fido_strings_pl.pak", + "fido_strings_pt-BR.pak", + "fido_strings_pt-PT.pak", + "fido_strings_ro.pak", + "fido_strings_ru.pak", + "fido_strings_sk.pak", + "fido_strings_sl.pak", + "fido_strings_sr.pak", + "fido_strings_sv.pak", + "fido_strings_sw.pak", + "fido_strings_ta.pak", + "fido_strings_te.pak", + "fido_strings_th.pak", + "fido_strings_tr.pak", + "fido_strings_uk.pak", + "fido_strings_vi.pak", + "fido_strings_zh-CN.pak", + "fido_strings_zh-TW.pak", + ] +}
diff --git a/device/fido/strings/fido_strings_am.xtb b/device/fido/strings/fido_strings_am.xtb new file mode 100644 index 0000000..92406ec2 --- /dev/null +++ b/device/fido/strings/fido_strings_am.xtb
@@ -0,0 +1,4 @@ +<?xml version="1.0" ?> +<!DOCTYPE translationbundle> +<translationbundle lang="am"> +</translationbundle> \ No newline at end of file
diff --git a/device/fido/strings/fido_strings_ar.xtb b/device/fido/strings/fido_strings_ar.xtb new file mode 100644 index 0000000..198ea62 --- /dev/null +++ b/device/fido/strings/fido_strings_ar.xtb
@@ -0,0 +1,4 @@ +<?xml version="1.0" ?> +<!DOCTYPE translationbundle> +<translationbundle lang="ar"> +</translationbundle> \ No newline at end of file
diff --git a/device/fido/strings/fido_strings_bg.xtb b/device/fido/strings/fido_strings_bg.xtb new file mode 100644 index 0000000..6681995 --- /dev/null +++ b/device/fido/strings/fido_strings_bg.xtb
@@ -0,0 +1,4 @@ +<?xml version="1.0" ?> +<!DOCTYPE translationbundle> +<translationbundle lang="bg"> +</translationbundle> \ No newline at end of file
diff --git a/device/fido/strings/fido_strings_bn.xtb b/device/fido/strings/fido_strings_bn.xtb new file mode 100644 index 0000000..eca68d46 --- /dev/null +++ b/device/fido/strings/fido_strings_bn.xtb
@@ -0,0 +1,4 @@ +<?xml version="1.0" ?> +<!DOCTYPE translationbundle> +<translationbundle lang="bn"> +</translationbundle> \ No newline at end of file
diff --git a/device/fido/strings/fido_strings_ca.xtb b/device/fido/strings/fido_strings_ca.xtb new file mode 100644 index 0000000..71cdd772 --- /dev/null +++ b/device/fido/strings/fido_strings_ca.xtb
@@ -0,0 +1,4 @@ +<?xml version="1.0" ?> +<!DOCTYPE translationbundle> +<translationbundle lang="ca"> +</translationbundle> \ No newline at end of file
diff --git a/device/fido/strings/fido_strings_cs.xtb b/device/fido/strings/fido_strings_cs.xtb new file mode 100644 index 0000000..dc153a85 --- /dev/null +++ b/device/fido/strings/fido_strings_cs.xtb
@@ -0,0 +1,4 @@ +<?xml version="1.0" ?> +<!DOCTYPE translationbundle> +<translationbundle lang="cs"> +</translationbundle> \ No newline at end of file
diff --git a/device/fido/strings/fido_strings_da.xtb b/device/fido/strings/fido_strings_da.xtb new file mode 100644 index 0000000..1256832 --- /dev/null +++ b/device/fido/strings/fido_strings_da.xtb
@@ -0,0 +1,4 @@ +<?xml version="1.0" ?> +<!DOCTYPE translationbundle> +<translationbundle lang="da"> +</translationbundle> \ No newline at end of file
diff --git a/device/fido/strings/fido_strings_de.xtb b/device/fido/strings/fido_strings_de.xtb new file mode 100644 index 0000000..43dd909 --- /dev/null +++ b/device/fido/strings/fido_strings_de.xtb
@@ -0,0 +1,4 @@ +<?xml version="1.0" ?> +<!DOCTYPE translationbundle> +<translationbundle lang="de"> +</translationbundle> \ No newline at end of file
diff --git a/device/fido/strings/fido_strings_el.xtb b/device/fido/strings/fido_strings_el.xtb new file mode 100644 index 0000000..1b096642 --- /dev/null +++ b/device/fido/strings/fido_strings_el.xtb
@@ -0,0 +1,4 @@ +<?xml version="1.0" ?> +<!DOCTYPE translationbundle> +<translationbundle lang="el"> +</translationbundle> \ No newline at end of file
diff --git a/device/fido/strings/fido_strings_en-GB.xtb b/device/fido/strings/fido_strings_en-GB.xtb new file mode 100644 index 0000000..12c3fa00 --- /dev/null +++ b/device/fido/strings/fido_strings_en-GB.xtb
@@ -0,0 +1,4 @@ +<?xml version="1.0" ?> +<!DOCTYPE translationbundle> +<translationbundle lang="en-GB"> +</translationbundle> \ No newline at end of file
diff --git a/device/fido/strings/fido_strings_es-419.xtb b/device/fido/strings/fido_strings_es-419.xtb new file mode 100644 index 0000000..b652ed0 --- /dev/null +++ b/device/fido/strings/fido_strings_es-419.xtb
@@ -0,0 +1,4 @@ +<?xml version="1.0" ?> +<!DOCTYPE translationbundle> +<translationbundle lang="es-419"> +</translationbundle> \ No newline at end of file
diff --git a/device/fido/strings/fido_strings_es.xtb b/device/fido/strings/fido_strings_es.xtb new file mode 100644 index 0000000..4d4f400 --- /dev/null +++ b/device/fido/strings/fido_strings_es.xtb
@@ -0,0 +1,4 @@ +<?xml version="1.0" ?> +<!DOCTYPE translationbundle> +<translationbundle lang="es"> +</translationbundle> \ No newline at end of file
diff --git a/device/fido/strings/fido_strings_et.xtb b/device/fido/strings/fido_strings_et.xtb new file mode 100644 index 0000000..ab777bc5 --- /dev/null +++ b/device/fido/strings/fido_strings_et.xtb
@@ -0,0 +1,4 @@ +<?xml version="1.0" ?> +<!DOCTYPE translationbundle> +<translationbundle lang="et"> +</translationbundle> \ No newline at end of file
diff --git a/device/fido/strings/fido_strings_fa.xtb b/device/fido/strings/fido_strings_fa.xtb new file mode 100644 index 0000000..4cff15d --- /dev/null +++ b/device/fido/strings/fido_strings_fa.xtb
@@ -0,0 +1,4 @@ +<?xml version="1.0" ?> +<!DOCTYPE translationbundle> +<translationbundle lang="fa"> +</translationbundle> \ No newline at end of file
diff --git a/device/fido/strings/fido_strings_fi.xtb b/device/fido/strings/fido_strings_fi.xtb new file mode 100644 index 0000000..60ba9aa --- /dev/null +++ b/device/fido/strings/fido_strings_fi.xtb
@@ -0,0 +1,4 @@ +<?xml version="1.0" ?> +<!DOCTYPE translationbundle> +<translationbundle lang="fi"> +</translationbundle> \ No newline at end of file
diff --git a/device/fido/strings/fido_strings_fil.xtb b/device/fido/strings/fido_strings_fil.xtb new file mode 100644 index 0000000..8f6a880 --- /dev/null +++ b/device/fido/strings/fido_strings_fil.xtb
@@ -0,0 +1,4 @@ +<?xml version="1.0" ?> +<!DOCTYPE translationbundle> +<translationbundle lang="fil"> +</translationbundle> \ No newline at end of file
diff --git a/device/fido/strings/fido_strings_fr.xtb b/device/fido/strings/fido_strings_fr.xtb new file mode 100644 index 0000000..bf48975a --- /dev/null +++ b/device/fido/strings/fido_strings_fr.xtb
@@ -0,0 +1,4 @@ +<?xml version="1.0" ?> +<!DOCTYPE translationbundle> +<translationbundle lang="fr"> +</translationbundle> \ No newline at end of file
diff --git a/device/fido/strings/fido_strings_gu.xtb b/device/fido/strings/fido_strings_gu.xtb new file mode 100644 index 0000000..7969d06 --- /dev/null +++ b/device/fido/strings/fido_strings_gu.xtb
@@ -0,0 +1,4 @@ +<?xml version="1.0" ?> +<!DOCTYPE translationbundle> +<translationbundle lang="gu"> +</translationbundle> \ No newline at end of file
diff --git a/device/fido/strings/fido_strings_hi.xtb b/device/fido/strings/fido_strings_hi.xtb new file mode 100644 index 0000000..279503cd --- /dev/null +++ b/device/fido/strings/fido_strings_hi.xtb
@@ -0,0 +1,4 @@ +<?xml version="1.0" ?> +<!DOCTYPE translationbundle> +<translationbundle lang="hi"> +</translationbundle> \ No newline at end of file
diff --git a/device/fido/strings/fido_strings_hr.xtb b/device/fido/strings/fido_strings_hr.xtb new file mode 100644 index 0000000..9ec62af --- /dev/null +++ b/device/fido/strings/fido_strings_hr.xtb
@@ -0,0 +1,4 @@ +<?xml version="1.0" ?> +<!DOCTYPE translationbundle> +<translationbundle lang="hr"> +</translationbundle> \ No newline at end of file
diff --git a/device/fido/strings/fido_strings_hu.xtb b/device/fido/strings/fido_strings_hu.xtb new file mode 100644 index 0000000..bdc02eeac --- /dev/null +++ b/device/fido/strings/fido_strings_hu.xtb
@@ -0,0 +1,4 @@ +<?xml version="1.0" ?> +<!DOCTYPE translationbundle> +<translationbundle lang="hu"> +</translationbundle> \ No newline at end of file
diff --git a/device/fido/strings/fido_strings_id.xtb b/device/fido/strings/fido_strings_id.xtb new file mode 100644 index 0000000..5f2882d0 --- /dev/null +++ b/device/fido/strings/fido_strings_id.xtb
@@ -0,0 +1,4 @@ +<?xml version="1.0" ?> +<!DOCTYPE translationbundle> +<translationbundle lang="id"> +</translationbundle> \ No newline at end of file
diff --git a/device/fido/strings/fido_strings_it.xtb b/device/fido/strings/fido_strings_it.xtb new file mode 100644 index 0000000..e7df702 --- /dev/null +++ b/device/fido/strings/fido_strings_it.xtb
@@ -0,0 +1,4 @@ +<?xml version="1.0" ?> +<!DOCTYPE translationbundle> +<translationbundle lang="it"> +</translationbundle> \ No newline at end of file
diff --git a/device/fido/strings/fido_strings_iw.xtb b/device/fido/strings/fido_strings_iw.xtb new file mode 100644 index 0000000..a29d4ad --- /dev/null +++ b/device/fido/strings/fido_strings_iw.xtb
@@ -0,0 +1,4 @@ +<?xml version="1.0" ?> +<!DOCTYPE translationbundle> +<translationbundle lang="iw"> +</translationbundle> \ No newline at end of file
diff --git a/device/fido/strings/fido_strings_ja.xtb b/device/fido/strings/fido_strings_ja.xtb new file mode 100644 index 0000000..d8a3543 --- /dev/null +++ b/device/fido/strings/fido_strings_ja.xtb
@@ -0,0 +1,4 @@ +<?xml version="1.0" ?> +<!DOCTYPE translationbundle> +<translationbundle lang="ja"> +</translationbundle> \ No newline at end of file
diff --git a/device/fido/strings/fido_strings_kn.xtb b/device/fido/strings/fido_strings_kn.xtb new file mode 100644 index 0000000..4ecb12ba --- /dev/null +++ b/device/fido/strings/fido_strings_kn.xtb
@@ -0,0 +1,4 @@ +<?xml version="1.0" ?> +<!DOCTYPE translationbundle> +<translationbundle lang="kn"> +</translationbundle> \ No newline at end of file
diff --git a/device/fido/strings/fido_strings_ko.xtb b/device/fido/strings/fido_strings_ko.xtb new file mode 100644 index 0000000..558b05b --- /dev/null +++ b/device/fido/strings/fido_strings_ko.xtb
@@ -0,0 +1,4 @@ +<?xml version="1.0" ?> +<!DOCTYPE translationbundle> +<translationbundle lang="ko"> +</translationbundle> \ No newline at end of file
diff --git a/device/fido/strings/fido_strings_lt.xtb b/device/fido/strings/fido_strings_lt.xtb new file mode 100644 index 0000000..f20c0fa2 --- /dev/null +++ b/device/fido/strings/fido_strings_lt.xtb
@@ -0,0 +1,4 @@ +<?xml version="1.0" ?> +<!DOCTYPE translationbundle> +<translationbundle lang="lt"> +</translationbundle> \ No newline at end of file
diff --git a/device/fido/strings/fido_strings_lv.xtb b/device/fido/strings/fido_strings_lv.xtb new file mode 100644 index 0000000..6f3afbc --- /dev/null +++ b/device/fido/strings/fido_strings_lv.xtb
@@ -0,0 +1,4 @@ +<?xml version="1.0" ?> +<!DOCTYPE translationbundle> +<translationbundle lang="lv"> +</translationbundle> \ No newline at end of file
diff --git a/device/fido/strings/fido_strings_ml.xtb b/device/fido/strings/fido_strings_ml.xtb new file mode 100644 index 0000000..e01197e --- /dev/null +++ b/device/fido/strings/fido_strings_ml.xtb
@@ -0,0 +1,4 @@ +<?xml version="1.0" ?> +<!DOCTYPE translationbundle> +<translationbundle lang="ml"> +</translationbundle> \ No newline at end of file
diff --git a/device/fido/strings/fido_strings_mr.xtb b/device/fido/strings/fido_strings_mr.xtb new file mode 100644 index 0000000..b137924e --- /dev/null +++ b/device/fido/strings/fido_strings_mr.xtb
@@ -0,0 +1,4 @@ +<?xml version="1.0" ?> +<!DOCTYPE translationbundle> +<translationbundle lang="mr"> +</translationbundle> \ No newline at end of file
diff --git a/device/fido/strings/fido_strings_ms.xtb b/device/fido/strings/fido_strings_ms.xtb new file mode 100644 index 0000000..518685dd --- /dev/null +++ b/device/fido/strings/fido_strings_ms.xtb
@@ -0,0 +1,4 @@ +<?xml version="1.0" ?> +<!DOCTYPE translationbundle> +<translationbundle lang="ms"> +</translationbundle> \ No newline at end of file
diff --git a/device/fido/strings/fido_strings_nl.xtb b/device/fido/strings/fido_strings_nl.xtb new file mode 100644 index 0000000..05ab957 --- /dev/null +++ b/device/fido/strings/fido_strings_nl.xtb
@@ -0,0 +1,4 @@ +<?xml version="1.0" ?> +<!DOCTYPE translationbundle> +<translationbundle lang="nl"> +</translationbundle> \ No newline at end of file
diff --git a/device/fido/strings/fido_strings_no.xtb b/device/fido/strings/fido_strings_no.xtb new file mode 100644 index 0000000..ede4de30 --- /dev/null +++ b/device/fido/strings/fido_strings_no.xtb
@@ -0,0 +1,4 @@ +<?xml version="1.0" ?> +<!DOCTYPE translationbundle> +<translationbundle lang="no"> +</translationbundle> \ No newline at end of file
diff --git a/device/fido/strings/fido_strings_pl.xtb b/device/fido/strings/fido_strings_pl.xtb new file mode 100644 index 0000000..1bf17bd5 --- /dev/null +++ b/device/fido/strings/fido_strings_pl.xtb
@@ -0,0 +1,4 @@ +<?xml version="1.0" ?> +<!DOCTYPE translationbundle> +<translationbundle lang="pl"> +</translationbundle> \ No newline at end of file
diff --git a/device/fido/strings/fido_strings_pt-BR.xtb b/device/fido/strings/fido_strings_pt-BR.xtb new file mode 100644 index 0000000..de39dfa --- /dev/null +++ b/device/fido/strings/fido_strings_pt-BR.xtb
@@ -0,0 +1,4 @@ +<?xml version="1.0" ?> +<!DOCTYPE translationbundle> +<translationbundle lang="pt-BR"> +</translationbundle> \ No newline at end of file
diff --git a/device/fido/strings/fido_strings_pt-PT.xtb b/device/fido/strings/fido_strings_pt-PT.xtb new file mode 100644 index 0000000..0b98ee77 --- /dev/null +++ b/device/fido/strings/fido_strings_pt-PT.xtb
@@ -0,0 +1,4 @@ +<?xml version="1.0" ?> +<!DOCTYPE translationbundle> +<translationbundle lang="pt-PT"> +</translationbundle> \ No newline at end of file
diff --git a/device/fido/strings/fido_strings_ro.xtb b/device/fido/strings/fido_strings_ro.xtb new file mode 100644 index 0000000..7129eb4 --- /dev/null +++ b/device/fido/strings/fido_strings_ro.xtb
@@ -0,0 +1,4 @@ +<?xml version="1.0" ?> +<!DOCTYPE translationbundle> +<translationbundle lang="ro"> +</translationbundle> \ No newline at end of file
diff --git a/device/fido/strings/fido_strings_ru.xtb b/device/fido/strings/fido_strings_ru.xtb new file mode 100644 index 0000000..6dfaa442 --- /dev/null +++ b/device/fido/strings/fido_strings_ru.xtb
@@ -0,0 +1,4 @@ +<?xml version="1.0" ?> +<!DOCTYPE translationbundle> +<translationbundle lang="ru"> +</translationbundle> \ No newline at end of file
diff --git a/device/fido/strings/fido_strings_sk.xtb b/device/fido/strings/fido_strings_sk.xtb new file mode 100644 index 0000000..202e515a --- /dev/null +++ b/device/fido/strings/fido_strings_sk.xtb
@@ -0,0 +1,4 @@ +<?xml version="1.0" ?> +<!DOCTYPE translationbundle> +<translationbundle lang="sk"> +</translationbundle> \ No newline at end of file
diff --git a/device/fido/strings/fido_strings_sl.xtb b/device/fido/strings/fido_strings_sl.xtb new file mode 100644 index 0000000..31b5a1a --- /dev/null +++ b/device/fido/strings/fido_strings_sl.xtb
@@ -0,0 +1,4 @@ +<?xml version="1.0" ?> +<!DOCTYPE translationbundle> +<translationbundle lang="sl"> +</translationbundle> \ No newline at end of file
diff --git a/device/fido/strings/fido_strings_sr.xtb b/device/fido/strings/fido_strings_sr.xtb new file mode 100644 index 0000000..984d7192 --- /dev/null +++ b/device/fido/strings/fido_strings_sr.xtb
@@ -0,0 +1,4 @@ +<?xml version="1.0" ?> +<!DOCTYPE translationbundle> +<translationbundle lang="sr"> +</translationbundle> \ No newline at end of file
diff --git a/device/fido/strings/fido_strings_sv.xtb b/device/fido/strings/fido_strings_sv.xtb new file mode 100644 index 0000000..9a787b8 --- /dev/null +++ b/device/fido/strings/fido_strings_sv.xtb
@@ -0,0 +1,4 @@ +<?xml version="1.0" ?> +<!DOCTYPE translationbundle> +<translationbundle lang="sv"> +</translationbundle> \ No newline at end of file
diff --git a/device/fido/strings/fido_strings_sw.xtb b/device/fido/strings/fido_strings_sw.xtb new file mode 100644 index 0000000..9aa61cb --- /dev/null +++ b/device/fido/strings/fido_strings_sw.xtb
@@ -0,0 +1,4 @@ +<?xml version="1.0" ?> +<!DOCTYPE translationbundle> +<translationbundle lang="sw"> +</translationbundle> \ No newline at end of file
diff --git a/device/fido/strings/fido_strings_ta.xtb b/device/fido/strings/fido_strings_ta.xtb new file mode 100644 index 0000000..c983c75f2 --- /dev/null +++ b/device/fido/strings/fido_strings_ta.xtb
@@ -0,0 +1,4 @@ +<?xml version="1.0" ?> +<!DOCTYPE translationbundle> +<translationbundle lang="ta"> +</translationbundle> \ No newline at end of file
diff --git a/device/fido/strings/fido_strings_te.xtb b/device/fido/strings/fido_strings_te.xtb new file mode 100644 index 0000000..7affb9a --- /dev/null +++ b/device/fido/strings/fido_strings_te.xtb
@@ -0,0 +1,4 @@ +<?xml version="1.0" ?> +<!DOCTYPE translationbundle> +<translationbundle lang="te"> +</translationbundle> \ No newline at end of file
diff --git a/device/fido/strings/fido_strings_th.xtb b/device/fido/strings/fido_strings_th.xtb new file mode 100644 index 0000000..dbe6a601 --- /dev/null +++ b/device/fido/strings/fido_strings_th.xtb
@@ -0,0 +1,4 @@ +<?xml version="1.0" ?> +<!DOCTYPE translationbundle> +<translationbundle lang="th"> +</translationbundle> \ No newline at end of file
diff --git a/device/fido/strings/fido_strings_tr.xtb b/device/fido/strings/fido_strings_tr.xtb new file mode 100644 index 0000000..d99480c0 --- /dev/null +++ b/device/fido/strings/fido_strings_tr.xtb
@@ -0,0 +1,4 @@ +<?xml version="1.0" ?> +<!DOCTYPE translationbundle> +<translationbundle lang="tr"> +</translationbundle> \ No newline at end of file
diff --git a/device/fido/strings/fido_strings_uk.xtb b/device/fido/strings/fido_strings_uk.xtb new file mode 100644 index 0000000..6e80099d --- /dev/null +++ b/device/fido/strings/fido_strings_uk.xtb
@@ -0,0 +1,4 @@ +<?xml version="1.0" ?> +<!DOCTYPE translationbundle> +<translationbundle lang="uk"> +</translationbundle> \ No newline at end of file
diff --git a/device/fido/strings/fido_strings_vi.xtb b/device/fido/strings/fido_strings_vi.xtb new file mode 100644 index 0000000..8a42ab1 --- /dev/null +++ b/device/fido/strings/fido_strings_vi.xtb
@@ -0,0 +1,4 @@ +<?xml version="1.0" ?> +<!DOCTYPE translationbundle> +<translationbundle lang="vi"> +</translationbundle> \ No newline at end of file
diff --git a/device/fido/strings/fido_strings_zh-CN.xtb b/device/fido/strings/fido_strings_zh-CN.xtb new file mode 100644 index 0000000..c7d76e8 --- /dev/null +++ b/device/fido/strings/fido_strings_zh-CN.xtb
@@ -0,0 +1,4 @@ +<?xml version="1.0" ?> +<!DOCTYPE translationbundle> +<translationbundle lang="zh-CN"> +</translationbundle> \ No newline at end of file
diff --git a/device/fido/strings/fido_strings_zh-TW.xtb b/device/fido/strings/fido_strings_zh-TW.xtb new file mode 100644 index 0000000..3e0c306 --- /dev/null +++ b/device/fido/strings/fido_strings_zh-TW.xtb
@@ -0,0 +1,4 @@ +<?xml version="1.0" ?> +<!DOCTYPE translationbundle> +<translationbundle lang="zh-TW"> +</translationbundle> \ No newline at end of file
diff --git a/device/usb/mojo/device_impl.cc b/device/usb/mojo/device_impl.cc index c460bcf..16de93f 100644 --- a/device/usb/mojo/device_impl.cc +++ b/device/usb/mojo/device_impl.cc
@@ -103,10 +103,9 @@ // static void DeviceImpl::Create(scoped_refptr<device::UsbDevice> device, - base::WeakPtr<PermissionProvider> permission_provider, - mojom::UsbDeviceRequest request) { - auto* device_impl = - new DeviceImpl(std::move(device), std::move(permission_provider)); + mojom::UsbDeviceRequest request, + mojom::UsbDeviceClientPtr client) { + auto* device_impl = new DeviceImpl(std::move(device), std::move(client)); device_impl->binding_ = mojo::MakeStrongBinding(base::WrapUnique(device_impl), std::move(request)); } @@ -116,10 +115,10 @@ } DeviceImpl::DeviceImpl(scoped_refptr<device::UsbDevice> device, - base::WeakPtr<PermissionProvider> permission_provider) + mojom::UsbDeviceClientPtr client) : device_(std::move(device)), - permission_provider_(std::move(permission_provider)), observer_(this), + client_(std::move(client)), weak_factory_(this) { DCHECK(device_); observer_.Add(device_.get()); @@ -128,8 +127,8 @@ void DeviceImpl::CloseHandle() { if (device_handle_) { device_handle_->Close(); - if (permission_provider_) - permission_provider_->DecrementConnectionCount(); + if (client_) + client_->OnDeviceClosed(); } device_handle_ = nullptr; } @@ -174,8 +173,9 @@ } self->device_handle_ = std::move(handle); - if (self->device_handle_ && self->permission_provider_) - self->permission_provider_->IncrementConnectionCount(); + if (self->device_handle_ && self->client_) + self->client_->OnDeviceOpened(); + std::move(callback).Run(self->device_handle_ ? mojom::UsbOpenDeviceError::OK : mojom::UsbOpenDeviceError::ACCESS_DENIED);
diff --git a/device/usb/mojo/device_impl.h b/device/usb/mojo/device_impl.h index 4a82e06..7406264 100644 --- a/device/usb/mojo/device_impl.h +++ b/device/usb/mojo/device_impl.h
@@ -13,7 +13,6 @@ #include "base/memory/ref_counted.h" #include "base/memory/weak_ptr.h" #include "base/scoped_observer.h" -#include "device/usb/mojo/permission_provider.h" #include "device/usb/public/mojom/device.mojom.h" #include "device/usb/usb_device.h" #include "device/usb/usb_device_handle.h" @@ -22,22 +21,20 @@ namespace device { namespace usb { -class PermissionProvider; - // Implementation of the public Device interface. Instances of this class are // constructed by DeviceManagerImpl and are strongly bound to their MessagePipe // lifetime. class DeviceImpl : public mojom::UsbDevice, public device::UsbDevice::Observer { public: static void Create(scoped_refptr<device::UsbDevice> device, - base::WeakPtr<PermissionProvider> permission_provider, - mojom::UsbDeviceRequest request); + mojom::UsbDeviceRequest request, + mojom::UsbDeviceClientPtr client); ~DeviceImpl() override; private: DeviceImpl(scoped_refptr<device::UsbDevice> device, - base::WeakPtr<PermissionProvider> permission_provider); + mojom::UsbDeviceClientPtr client); // Closes the device if it's open. This will always set |device_handle_| to // null. @@ -99,7 +96,6 @@ void OnDeviceRemoved(scoped_refptr<device::UsbDevice> device) override; const scoped_refptr<device::UsbDevice> device_; - base::WeakPtr<PermissionProvider> permission_provider_; ScopedObserver<device::UsbDevice, device::UsbDevice::Observer> observer_; // The device handle. Will be null before the device is opened and after it @@ -107,6 +103,7 @@ scoped_refptr<UsbDeviceHandle> device_handle_; mojo::StrongBindingPtr<mojom::UsbDevice> binding_; + device::mojom::UsbDeviceClientPtr client_; base::WeakPtrFactory<DeviceImpl> weak_factory_; DISALLOW_COPY_AND_ASSIGN(DeviceImpl);
diff --git a/device/usb/mojo/device_impl_unittest.cc b/device/usb/mojo/device_impl_unittest.cc index 7fbcedaad..c67f1ac 100644 --- a/device/usb/mojo/device_impl_unittest.cc +++ b/device/usb/mojo/device_impl_unittest.cc
@@ -24,7 +24,6 @@ #include "base/stl_util.h" #include "device/usb/mock_usb_device.h" #include "device/usb/mock_usb_device_handle.h" -#include "device/usb/mojo/mock_permission_provider.h" #include "device/usb/mojo/type_converters.h" #include "mojo/public/cpp/bindings/interface_request.h" #include "mojo/public/cpp/bindings/strong_binding.h" @@ -138,6 +137,24 @@ continuation.Run(); } +class MockUsbDeviceClient : public mojom::UsbDeviceClient { + public: + MockUsbDeviceClient() : binding_(this) {} + ~MockUsbDeviceClient() override = default; + + mojom::UsbDeviceClientPtr CreateInterfacePtrAndBind() { + mojom::UsbDeviceClientPtr client; + binding_.Bind(mojo::MakeRequest(&client)); + return client; + } + + MOCK_METHOD0(OnDeviceOpened, void()); + MOCK_METHOD0(OnDeviceClosed, void()); + + private: + mojo::Binding<mojom::UsbDeviceClient> binding_; +}; + class USBDeviceImplTest : public testing::Test { public: USBDeviceImplTest() @@ -150,7 +167,6 @@ void TearDown() override { base::RunLoop().RunUntilIdle(); } protected: - MockPermissionProvider& permission_provider() { return permission_provider_; } MockUsbDevice& mock_device() { return *mock_device_.get(); } bool is_device_open() const { return is_device_open_; } MockUsbDeviceHandle& mock_handle() { return *mock_handle_.get(); } @@ -163,14 +179,15 @@ uint16_t product_id, const std::string& manufacturer, const std::string& product, - const std::string& serial) { + const std::string& serial, + mojom::UsbDeviceClientPtr client) { mock_device_ = new MockUsbDevice(vendor_id, product_id, manufacturer, product, serial); mock_handle_ = new MockUsbDeviceHandle(mock_device_.get()); UsbDevicePtr proxy; - DeviceImpl::Create(mock_device_, permission_provider_.GetWeakPtr(), - mojo::MakeRequest(&proxy)); + DeviceImpl::Create(mock_device_, mojo::MakeRequest(&proxy), + std::move(client)); // Set up mock handle calls to respond based on mock device configs // established by the test. @@ -202,10 +219,13 @@ return proxy; } - UsbDevicePtr GetMockDeviceProxy() { - return GetMockDeviceProxy(0x1234, 0x5678, "ACME", "Frobinator", "ABCDEF"); + UsbDevicePtr GetMockDeviceProxy(mojom::UsbDeviceClientPtr client) { + return GetMockDeviceProxy(0x1234, 0x5678, "ACME", "Frobinator", "ABCDEF", + std::move(client)); } + UsbDevicePtr GetMockDeviceProxy() { return GetMockDeviceProxy(nullptr); } + void AddMockConfig(const ConfigBuilder& builder) { const UsbConfigDescriptor& config = builder.config(); DCHECK(!base::ContainsKey(mock_configs_, config.configuration_value)); @@ -419,8 +439,6 @@ std::set<uint8_t> claimed_interfaces_; - MockPermissionProvider permission_provider_; - DISALLOW_COPY_AND_ASSIGN(USBDeviceImplTest); }; @@ -436,12 +454,14 @@ } TEST_F(USBDeviceImplTest, Open) { - UsbDevicePtr device = GetMockDeviceProxy(); + MockUsbDeviceClient device_client; + UsbDevicePtr device = + GetMockDeviceProxy(device_client.CreateInterfacePtrAndBind()); EXPECT_FALSE(is_device_open()); EXPECT_CALL(mock_device(), OpenInternal(_)); - EXPECT_CALL(permission_provider(), IncrementConnectionCount()); + EXPECT_CALL(device_client, OnDeviceOpened()); { base::RunLoop loop; @@ -459,7 +479,10 @@ } EXPECT_CALL(mock_handle(), Close()); - EXPECT_CALL(permission_provider(), DecrementConnectionCount()); + EXPECT_CALL(device_client, OnDeviceClosed()); + + device.reset(); + base::RunLoop().RunUntilIdle(); } TEST_F(USBDeviceImplTest, Close) {
diff --git a/device/usb/mojo/device_manager_impl.cc b/device/usb/mojo/device_manager_impl.cc index 5f611f2f..f474b61 100644 --- a/device/usb/mojo/device_manager_impl.cc +++ b/device/usb/mojo/device_manager_impl.cc
@@ -63,15 +63,16 @@ } void DeviceManagerImpl::GetDevice(const std::string& guid, - mojom::UsbDeviceRequest device_request) { + mojom::UsbDeviceRequest device_request, + mojom::UsbDeviceClientPtr device_client) { scoped_refptr<UsbDevice> device = usb_service_->GetDevice(guid); if (!device) return; if (permission_provider_ && permission_provider_->HasDevicePermission(device)) { - DeviceImpl::Create(std::move(device), permission_provider_, - std::move(device_request)); + DeviceImpl::Create(std::move(device), std::move(device_request), + std::move(device_client)); } }
diff --git a/device/usb/mojo/device_manager_impl.h b/device/usb/mojo/device_manager_impl.h index 095419db..55e0b9e 100644 --- a/device/usb/mojo/device_manager_impl.h +++ b/device/usb/mojo/device_manager_impl.h
@@ -44,7 +44,8 @@ void GetDevices(mojom::UsbEnumerationOptionsPtr options, GetDevicesCallback callback) override; void GetDevice(const std::string& guid, - mojom::UsbDeviceRequest device_request) override; + mojom::UsbDeviceRequest device_request, + mojom::UsbDeviceClientPtr device_client) override; void SetClient(mojom::UsbDeviceManagerClientPtr client) override; // Callbacks to handle the async responses from the underlying UsbService.
diff --git a/device/usb/mojo/device_manager_impl_unittest.cc b/device/usb/mojo/device_manager_impl_unittest.cc index ed3ed79..d247dd7 100644 --- a/device/usb/mojo/device_manager_impl_unittest.cc +++ b/device/usb/mojo/device_manager_impl_unittest.cc
@@ -152,7 +152,8 @@ { base::RunLoop loop; UsbDevicePtr device; - device_manager->GetDevice(mock_device->guid(), mojo::MakeRequest(&device)); + device_manager->GetDevice(mock_device->guid(), mojo::MakeRequest(&device), + /*device_client=*/nullptr); // Close is a no-op if the device hasn't been opened but ensures that the // pipe was successfully connected. device->Close(loop.QuitClosure()); @@ -160,7 +161,8 @@ } UsbDevicePtr bad_device; - device_manager->GetDevice("not a real guid", mojo::MakeRequest(&bad_device)); + device_manager->GetDevice("not a real guid", mojo::MakeRequest(&bad_device), + /*device_client=*/nullptr); { base::RunLoop loop;
diff --git a/device/usb/public/mojom/device.mojom b/device/usb/public/mojom/device.mojom index 4967853..17b2b49 100644 --- a/device/usb/public/mojom/device.mojom +++ b/device/usb/public/mojom/device.mojom
@@ -271,3 +271,19 @@ uint32 timeout) => (array<UsbIsochronousPacket> packets); }; + +// This client is introduced for keeping connection count for a tab through +// WebUSBPermissionProvider. It will be implemented by WebUsbServiceImpl and +// passed to the UsbDevice via UsbDeviceManager::GetDevice method. +interface UsbDeviceClient { + // Called when a device is opened successfully. + // This event may be triggered once more than OnDeviceClosed while the device + // is in use. + OnDeviceOpened(); + + // Called when a device is closed successfully. + // This event may not be triggered when the device is in use. But eventually, + // after the whole lifecycle, it is expected to have the same number of this + // call as that of OnDeviceOpened. + OnDeviceClosed(); +};
diff --git a/device/usb/public/mojom/device_manager.mojom b/device/usb/public/mojom/device_manager.mojom index 2ef620e6..9c783d49 100644 --- a/device/usb/public/mojom/device_manager.mojom +++ b/device/usb/public/mojom/device_manager.mojom
@@ -36,7 +36,8 @@ GetDevices(UsbEnumerationOptions? options) => (array<UsbDeviceInfo> results); // Requests a device by guid. - GetDevice(string guid, UsbDevice& device_request); + GetDevice(string guid, UsbDevice& device_request, + UsbDeviceClient? device_client); // Sets the client for this DeviceManager service. The service will notify its // client of device events such as connection and disconnection.
diff --git a/extensions/BUILD.gn b/extensions/BUILD.gn index ba2df9d..df4e232 100644 --- a/extensions/BUILD.gn +++ b/extensions/BUILD.gn
@@ -229,7 +229,7 @@ ] data_deps = [ - "//third_party/mesa:osmesa", + "//third_party/mesa_headers", ] } @@ -249,7 +249,7 @@ ] data_deps = [ - "//third_party/mesa:osmesa", + "//third_party/mesa_headers", ] }
diff --git a/extensions/browser/verified_contents.h b/extensions/browser/verified_contents.h index cf24d3c..6af1e5d 100644 --- a/extensions/browser/verified_contents.h +++ b/extensions/browser/verified_contents.h
@@ -8,6 +8,7 @@ #include <stdint.h> #include <map> +#include <memory> #include <string> #include <vector>
diff --git a/extensions/renderer/BUILD.gn b/extensions/renderer/BUILD.gn index 34a14e63..1a86150 100644 --- a/extensions/renderer/BUILD.gn +++ b/extensions/renderer/BUILD.gn
@@ -70,6 +70,8 @@ "bindings/exception_handler.h", "bindings/js_runner.cc", "bindings/js_runner.h", + "bindings/listener_tracker.cc", + "bindings/listener_tracker.h", "blob_native_handler.cc", "blob_native_handler.h", "chrome_setting.cc", @@ -426,6 +428,7 @@ "bindings/declarative_event_unittest.cc", "bindings/event_emitter_unittest.cc", "bindings/exception_handler_unittest.cc", + "bindings/listener_tracker_unittest.cc", "event_unittest.cc", "extension_throttle_simulation_unittest.cc", "extension_throttle_test_support.cc",
diff --git a/extensions/renderer/bindings/api_binding_types.h b/extensions/renderer/bindings/api_binding_types.h index 37560aa..63041f2c 100644 --- a/extensions/renderer/bindings/api_binding_types.h +++ b/extensions/renderer/bindings/api_binding_types.h
@@ -19,8 +19,29 @@ // Types of changes for event listener registration. enum class EventListenersChanged { - HAS_LISTENERS, // The event had no listeners, and now does. - NO_LISTENERS, // The event had listeners, and now does not. + // Unfiltered Events: + + // The first unfiltered listener for the associated context was added. + kFirstUnfilteredListenerForContextAdded, + // The first unfiltered listener for the associated context owner was added. + // This also implies the first listener for the context was added. + kFirstUnfilteredListenerForContextOwnerAdded, + // The last unfiltered listener for the associated context was removed. + kLastUnfilteredListenerForContextRemoved, + // The last unfiltered listener for the associated context owner was removed. + // This also implies the last listener for the context was removed. + kLastUnfilteredListenerForContextOwnerRemoved, + + // Filtered Events: + // TODO(https://crbug.com/873017): The fact that we only have added/removed + // at the context owner level for filtered events can cause issues. + + // The first listener for the associated context owner with a specific + // filter was added. + kFirstListenerWithFilterForContextOwnerAdded, + // The last listener for the associated context owner with a specific + // filter was removed. + kLastListenerWithFilterForContextOwnerRemoved, }; // The browser thread that the request should be sent to.
diff --git a/extensions/renderer/bindings/api_binding_unittest.cc b/extensions/renderer/bindings/api_binding_unittest.cc index dd0dc1dd..3b79506 100644 --- a/extensions/renderer/bindings/api_binding_unittest.cc +++ b/extensions/renderer/bindings/api_binding_unittest.cc
@@ -198,8 +198,12 @@ on_silent_request_ = base::DoNothing(); if (!availability_callback_) availability_callback_ = base::Bind(&AllowAllFeatures); + auto get_context_owner = [](v8::Local<v8::Context>) { + return std::string(); + }; event_handler_ = std::make_unique<APIEventHandler>( - base::Bind(&OnEventListenersChanged), nullptr); + base::Bind(&OnEventListenersChanged), + base::BindRepeating(get_context_owner), nullptr); access_checker_ = std::make_unique<BindingAccessChecker>(availability_callback_); binding_ = std::make_unique<APIBinding>(
diff --git a/extensions/renderer/bindings/api_bindings_system.cc b/extensions/renderer/bindings/api_bindings_system.cc index e03688a50..1b72e43 100644 --- a/extensions/renderer/bindings/api_bindings_system.cc +++ b/extensions/renderer/bindings/api_bindings_system.cc
@@ -16,7 +16,8 @@ const GetAPISchemaMethod& get_api_schema, const BindingAccessChecker::AvailabilityCallback& is_available, const APIRequestHandler::SendRequestMethod& send_request, - const APIEventHandler::EventListenersChangedMethod& event_listeners_changed, + const APIEventListeners::ListenersUpdated& event_listeners_changed, + const APIEventHandler::ContextOwnerIdGetter& context_owner_getter, const APIBinding::OnSilentRequest& on_silent_request, const binding::AddConsoleError& add_console_error, APILastError last_error) @@ -26,7 +27,9 @@ request_handler_(send_request, std::move(last_error), &exception_handler_), - event_handler_(event_listeners_changed, &exception_handler_), + event_handler_(event_listeners_changed, + context_owner_getter, + &exception_handler_), access_checker_(is_available), get_api_schema_(get_api_schema), on_silent_request_(on_silent_request) {
diff --git a/extensions/renderer/bindings/api_bindings_system.h b/extensions/renderer/bindings/api_bindings_system.h index 198ae80..154c3909 100644 --- a/extensions/renderer/bindings/api_bindings_system.h +++ b/extensions/renderer/bindings/api_bindings_system.h
@@ -48,8 +48,8 @@ const GetAPISchemaMethod& get_api_schema, const BindingAccessChecker::AvailabilityCallback& is_available, const APIRequestHandler::SendRequestMethod& send_request, - const APIEventHandler::EventListenersChangedMethod& - event_listeners_changed, + const APIEventListeners::ListenersUpdated& event_listeners_changed, + const APIEventHandler::ContextOwnerIdGetter& context_owner_getter, const APIBinding::OnSilentRequest& on_silent_request, const binding::AddConsoleError& add_console_error, APILastError last_error);
diff --git a/extensions/renderer/bindings/api_bindings_system_unittest.cc b/extensions/renderer/bindings/api_bindings_system_unittest.cc index 146970e6..23df060 100644 --- a/extensions/renderer/bindings/api_bindings_system_unittest.cc +++ b/extensions/renderer/bindings/api_bindings_system_unittest.cc
@@ -112,13 +112,15 @@ binding::AddConsoleError add_console_error(base::Bind( &APIBindingsSystemTest::AddConsoleError, base::Unretained(this))); + auto get_context_owner = [](v8::Local<v8::Context>) { return std::string(); }; bindings_system_ = std::make_unique<APIBindingsSystem>( base::Bind(&APIBindingsSystemTest::GetAPISchema, base::Unretained(this)), base::Bind(&AllowAllAPIs), base::Bind(&APIBindingsSystemTest::OnAPIRequest, base::Unretained(this)), base::Bind(&APIBindingsSystemTest::OnEventListenersChanged, base::Unretained(this)), - base::DoNothing(), add_console_error, + base::BindRepeating(get_context_owner), base::DoNothing(), + add_console_error, APILastError(base::Bind(&APIBindingsSystemTest::GetLastErrorParent, base::Unretained(this)), add_console_error));
diff --git a/extensions/renderer/bindings/api_event_handler.cc b/extensions/renderer/bindings/api_event_handler.cc index 2fc7adb..439e458 100644 --- a/extensions/renderer/bindings/api_event_handler.cc +++ b/extensions/renderer/bindings/api_event_handler.cc
@@ -15,7 +15,6 @@ #include "base/supports_user_data.h" #include "base/values.h" #include "content/public/renderer/v8_value_converter.h" -#include "extensions/renderer/bindings/api_event_listeners.h" #include "extensions/renderer/bindings/event_emitter.h" #include "extensions/renderer/bindings/get_per_context_data.h" #include "extensions/renderer/bindings/js_runner.h" @@ -99,9 +98,11 @@ } // namespace APIEventHandler::APIEventHandler( - const EventListenersChangedMethod& listeners_changed, + const APIEventListeners::ListenersUpdated& listeners_changed, + const ContextOwnerIdGetter& context_owner_id_getter, ExceptionHandler* exception_handler) : listeners_changed_(listeners_changed), + context_owner_id_getter_(context_owner_id_getter), exception_handler_(exception_handler) {} APIEventHandler::~APIEventHandler() {} @@ -118,21 +119,23 @@ // context directly. v8::Context::Scope context_scope(context); + std::string context_owner = context_owner_id_getter_.Run(context); + APIEventPerContextData* data = APIEventPerContextData::GetFrom(context, kCreateIfMissing); DCHECK(data->emitters.find(event_name) == data->emitters.end()); APIEventListeners::ListenersUpdated updated = - notify_on_change ? base::Bind(listeners_changed_, event_name) - : base::DoNothing(); + notify_on_change ? listeners_changed_ : base::DoNothing(); std::unique_ptr<APIEventListeners> listeners; if (supports_filters) { listeners = std::make_unique<FilteredEventListeners>( - updated, event_name, max_listeners, supports_lazy_listeners, - &event_filter_); + updated, event_name, context_owner, max_listeners, + supports_lazy_listeners, &listener_tracker_); } else { listeners = std::make_unique<UnfilteredEventListeners>( - updated, max_listeners, supports_lazy_listeners); + updated, event_name, context_owner, max_listeners, + supports_lazy_listeners, &listener_tracker_); } gin::Handle<EventEmitter> emitter_handle = @@ -156,9 +159,16 @@ APIEventPerContextData* data = APIEventPerContextData::GetFrom(context, kCreateIfMissing); bool supports_filters = false; + + // Anonymous events are not tracked, and thus don't need a name or a context + // owner. + std::string empty_context_owner; + std::string empty_event_name; + ListenerTracker* anonymous_listener_tracker = nullptr; std::unique_ptr<APIEventListeners> listeners = std::make_unique<UnfilteredEventListeners>( - base::DoNothing(), binding::kNoListenerMax, false); + base::DoNothing(), empty_context_owner, empty_event_name, + binding::kNoListenerMax, false, anonymous_listener_tracker); gin::Handle<EventEmitter> emitter_handle = gin::CreateHandle(context->GetIsolate(), new EventEmitter(supports_filters, std::move(listeners),
diff --git a/extensions/renderer/bindings/api_event_handler.h b/extensions/renderer/bindings/api_event_handler.h index 15abe8c..c8b8730f 100644 --- a/extensions/renderer/bindings/api_event_handler.h +++ b/extensions/renderer/bindings/api_event_handler.h
@@ -9,9 +9,10 @@ #include "base/callback.h" #include "base/macros.h" -#include "extensions/common/event_filter.h" #include "extensions/renderer/bindings/api_binding_types.h" +#include "extensions/renderer/bindings/api_event_listeners.h" #include "extensions/renderer/bindings/event_emitter.h" +#include "extensions/renderer/bindings/listener_tracker.h" #include "v8/include/v8.h" namespace base { @@ -28,20 +29,14 @@ // single thread. class APIEventHandler { public: - // The callback to be called when event listeners change. - // |update_lazy_listeners| indicates that the change was due to an extension - // calling addListener or removeListener on an event that supports lazy - // listeners, rather than through something like context destruction or - // removing a listener from an event that doesn't support lazy listeners. - // See also APIEventListeners. - using EventListenersChangedMethod = - base::Callback<void(const std::string& event_name, - binding::EventListenersChanged, - const base::DictionaryValue* filter, - bool update_lazy_listeners, - v8::Local<v8::Context>)>; + // A callback to retrieve the owner of the context's identity. This allows us + // to associate multiple listeners from different v8::Contexts with the same + // owner (e.g., extension). + using ContextOwnerIdGetter = + base::RepeatingCallback<std::string(v8::Local<v8::Context>)>; - APIEventHandler(const EventListenersChangedMethod& listeners_changed, + APIEventHandler(const APIEventListeners::ListenersUpdated& listeners_changed, + const ContextOwnerIdGetter& context_owner_id_getter, ExceptionHandler* exception_handler); ~APIEventHandler(); @@ -107,10 +102,12 @@ v8::Local<v8::Context> context); private: - EventListenersChangedMethod listeners_changed_; + APIEventListeners::ListenersUpdated listeners_changed_; - // The associated EventFilter; shared across all contexts and events. - EventFilter event_filter_; + ContextOwnerIdGetter context_owner_id_getter_; + + // The shared ListenerTracker for all listeners in the system. + ListenerTracker listener_tracker_; // The exception handler associated with the bindings system; guaranteed to // outlive this object.
diff --git a/extensions/renderer/bindings/api_event_handler_unittest.cc b/extensions/renderer/bindings/api_event_handler_unittest.cc index c485b72..fc4e2efa 100644 --- a/extensions/renderer/bindings/api_event_handler_unittest.cc +++ b/extensions/renderer/bindings/api_event_handler_unittest.cc
@@ -9,6 +9,7 @@ #include "base/callback_helpers.h" #include "base/optional.h" #include "base/run_loop.h" +#include "base/test/bind_test_util.h" #include "base/test/mock_callback.h" #include "base/values.h" #include "extensions/common/event_filtering_info.h" @@ -31,7 +32,30 @@ "(function(event, listener) { event.removeListener(listener); })"; using MockEventChangeHandler = ::testing::StrictMock< - base::MockCallback<APIEventHandler::EventListenersChangedMethod>>; + base::MockCallback<APIEventListeners::ListenersUpdated>>; + +std::string GetContextOwner(v8::Local<v8::Context> context) { + return std::string(); +} + +// TODO(devlin): Use these handy functions more places. +void AddListener(v8::Local<v8::Context> context, + v8::Local<v8::Function> listener, + v8::Local<v8::Object> event) { + v8::Local<v8::Function> add_listener = + FunctionFromString(context, kAddListenerFunction); + v8::Local<v8::Value> argv[] = {event, listener}; + RunFunction(add_listener, context, base::size(argv), argv); +} + +void RemoveListener(v8::Local<v8::Context> context, + v8::Local<v8::Function> listener, + v8::Local<v8::Object> event) { + v8::Local<v8::Function> remove_listener = + FunctionFromString(context, kRemoveListenerFunction); + v8::Local<v8::Value> argv[] = {event, listener}; + RunFunction(remove_listener, context, base::size(argv), argv); +} class APIEventHandlerTest : public APIBindingTest { protected: @@ -40,7 +64,8 @@ void SetUp() override { APIBindingTest::SetUp(); - handler_ = std::make_unique<APIEventHandler>(base::DoNothing(), nullptr); + handler_ = std::make_unique<APIEventHandler>( + base::DoNothing(), base::BindRepeating(&GetContextOwner), nullptr); } void TearDown() override { @@ -525,8 +550,9 @@ std::vector<std::string> logged_errors; ExceptionHandler exception_handler(base::Bind(log_error, &logged_errors)); - SetHandler( - std::make_unique<APIEventHandler>(base::DoNothing(), &exception_handler)); + SetHandler(std::make_unique<APIEventHandler>( + base::DoNothing(), base::BindRepeating(&GetContextOwner), + &exception_handler)); v8::HandleScope handle_scope(isolate()); v8::Local<v8::Context> context = MainContext(); @@ -581,7 +607,8 @@ // Tests being notified as listeners are added or removed from events. TEST_F(APIEventHandlerTest, CallbackNotifications) { MockEventChangeHandler change_handler; - SetHandler(std::make_unique<APIEventHandler>(change_handler.Get(), nullptr)); + SetHandler(std::make_unique<APIEventHandler>( + change_handler.Get(), base::BindRepeating(&GetContextOwner), nullptr)); v8::HandleScope handle_scope(isolate()); @@ -608,7 +635,9 @@ FunctionFromString(context_a, "(function() {})"); { EXPECT_CALL(change_handler, - Run(kEventName1, binding::EventListenersChanged::HAS_LISTENERS, + Run(kEventName1, + binding::EventListenersChanged:: + kFirstUnfilteredListenerForContextOwnerAdded, nullptr, true, context_a)) .Times(1); v8::Local<v8::Value> argv[] = {event1_a, listener1}; @@ -645,7 +674,9 @@ // event no longer has listeners. { EXPECT_CALL(change_handler, - Run(kEventName1, binding::EventListenersChanged::NO_LISTENERS, + Run(kEventName1, + binding::EventListenersChanged:: + kLastUnfilteredListenerForContextOwnerRemoved, nullptr, true, context_a)) .Times(1); v8::Local<v8::Value> argv[] = {event1_a, listener2}; @@ -661,7 +692,9 @@ FunctionFromString(context_a, "(function() {})"); { EXPECT_CALL(change_handler, - Run(kEventName2, binding::EventListenersChanged::HAS_LISTENERS, + Run(kEventName2, + binding::EventListenersChanged:: + kFirstUnfilteredListenerForContextOwnerAdded, nullptr, true, context_a)) .Times(1); v8::Local<v8::Value> argv[] = {event2_a, listener3}; @@ -673,7 +706,9 @@ { EXPECT_CALL(change_handler, - Run(kEventName1, binding::EventListenersChanged::HAS_LISTENERS, + Run(kEventName1, + binding::EventListenersChanged:: + kFirstUnfilteredListenerForContextOwnerAdded, nullptr, true, context_b)) .Times(1); // And add a listener to an event in a different context to make sure the @@ -693,14 +728,18 @@ // notifications. Additionally, since this was the context being torn down, // rather than a removeListener call, was_manual should be false. EXPECT_CALL(change_handler, - Run(kEventName2, binding::EventListenersChanged::NO_LISTENERS, + Run(kEventName2, + binding::EventListenersChanged:: + kLastUnfilteredListenerForContextOwnerRemoved, nullptr, false, context_a)) .Times(1); DisposeContext(context_a); ::testing::Mock::VerifyAndClearExpectations(&change_handler); EXPECT_CALL(change_handler, - Run(kEventName1, binding::EventListenersChanged::NO_LISTENERS, + Run(kEventName1, + binding::EventListenersChanged:: + kLastUnfilteredListenerForContextOwnerRemoved, nullptr, false, context_b)) .Times(1); DisposeContext(context_b); @@ -903,7 +942,8 @@ v8::Local<v8::Context> context = MainContext(); MockEventChangeHandler change_handler; - APIEventHandler handler(change_handler.Get(), nullptr); + APIEventHandler handler(change_handler.Get(), + base::BindRepeating(&GetContextOwner), nullptr); v8::Local<v8::Object> event = handler.CreateAnonymousEventInstance(context); ASSERT_FALSE(event.IsEmpty()); @@ -950,7 +990,8 @@ v8::Local<v8::Context> context = MainContext(); MockEventChangeHandler change_handler; - APIEventHandler handler(change_handler.Get(), nullptr); + APIEventHandler handler(change_handler.Get(), + base::BindRepeating(&GetContextOwner), nullptr); v8::Local<v8::Object> event = handler.CreateAnonymousEventInstance(context); ASSERT_FALSE(event.IsEmpty()); @@ -975,7 +1016,8 @@ const base::DictionaryValue* filter, bool was_manual, v8::Local<v8::Context> context) { ADD_FAILURE(); }; - APIEventHandler handler(base::Bind(fail_on_notified), nullptr); + APIEventHandler handler(base::Bind(fail_on_notified), + base::BindRepeating(&GetContextOwner), nullptr); const char kEventName[] = "alpha"; v8::Local<v8::Object> event = handler.CreateEventInstance( @@ -1017,7 +1059,8 @@ // Test callback notifications for events that don't support lazy listeners. TEST_F(APIEventHandlerTest, TestEventsWithoutLazyListeners) { MockEventChangeHandler change_handler; - APIEventHandler handler(change_handler.Get(), nullptr); + APIEventHandler handler(change_handler.Get(), + base::BindRepeating(&GetContextOwner), nullptr); v8::HandleScope handle_scope(isolate()); v8::Local<v8::Context> context = MainContext(); @@ -1039,8 +1082,9 @@ { EXPECT_CALL(change_handler, Run(kLazyListenersSupported, - binding::EventListenersChanged::HAS_LISTENERS, nullptr, - true, context)) + binding::EventListenersChanged:: + kFirstUnfilteredListenerForContextOwnerAdded, + nullptr, true, context)) .Times(1); v8::Local<v8::Value> argv[] = {lazy_listeners_supported, listener}; RunFunction(add_listener, context, arraysize(argv), argv); @@ -1050,8 +1094,9 @@ { EXPECT_CALL(change_handler, Run(kLazyListenersNotSupported, - binding::EventListenersChanged::HAS_LISTENERS, nullptr, - false, context)) + binding::EventListenersChanged:: + kFirstUnfilteredListenerForContextOwnerAdded, + nullptr, false, context)) .Times(1); v8::Local<v8::Value> argv[] = {lazy_listeners_not_supported, listener}; RunFunction(add_listener, context, arraysize(argv), argv); @@ -1063,8 +1108,9 @@ { EXPECT_CALL(change_handler, Run(kLazyListenersSupported, - binding::EventListenersChanged::NO_LISTENERS, nullptr, true, - context)) + binding::EventListenersChanged:: + kLastUnfilteredListenerForContextOwnerRemoved, + nullptr, true, context)) .Times(1); v8::Local<v8::Value> argv[] = {lazy_listeners_supported, listener}; RunFunction(remove_listener, context, arraysize(argv), argv); @@ -1074,8 +1120,9 @@ { EXPECT_CALL(change_handler, Run(kLazyListenersNotSupported, - binding::EventListenersChanged::NO_LISTENERS, nullptr, - false, context)) + binding::EventListenersChanged:: + kLastUnfilteredListenerForContextOwnerRemoved, + nullptr, false, context)) .Times(1); v8::Local<v8::Value> argv[] = {lazy_listeners_not_supported, listener}; RunFunction(remove_listener, context, arraysize(argv), argv); @@ -1132,8 +1179,9 @@ std::vector<std::string> logged_errors; ExceptionHandler exception_handler( base::BindRepeating(log_error, &logged_errors)); - SetHandler( - std::make_unique<APIEventHandler>(base::DoNothing(), &exception_handler)); + SetHandler(std::make_unique<APIEventHandler>( + base::DoNothing(), base::BindRepeating(&GetContextOwner), + &exception_handler)); const char kEventName[] = "alpha"; v8::HandleScope handle_scope(isolate()); @@ -1250,4 +1298,113 @@ "eventFired2")); } +// Test that notifications are properly fired for multiple events with the +// same context owner. +TEST_F(APIEventHandlerTest, + TestListenersFromDifferentContextsWithTheSameOwner) { + v8::HandleScope handle_scope(isolate()); + v8::Local<v8::Context> context_alpha1 = MainContext(); + v8::Local<v8::Context> context_alpha2 = AddContext(); + v8::Local<v8::Context> context_beta1 = AddContext(); + + // Associate two v8::Contexts with the same owner, and a third with a separate + // owner. + auto get_context_owner = [context_alpha1, context_alpha2, + context_beta1](v8::Local<v8::Context> context) { + if (context == context_alpha1 || context == context_alpha2) + return std::string("alpha"); + if (context == context_beta1) + return std::string("beta"); + ADD_FAILURE(); + return std::string(); + }; + + MockEventChangeHandler change_handler; + APIEventHandler handler(change_handler.Get(), + base::BindLambdaForTesting(get_context_owner), + nullptr); + + const char kEventName[] = "alpha"; + v8::Local<v8::Object> event_alpha1 = handler.CreateEventInstance( + kEventName, false, true, binding::kNoListenerMax, true, context_alpha1); + ASSERT_FALSE(event_alpha1.IsEmpty()); + v8::Local<v8::Object> event_alpha2 = handler.CreateEventInstance( + kEventName, false, true, binding::kNoListenerMax, true, context_alpha2); + ASSERT_FALSE(event_alpha2.IsEmpty()); + v8::Local<v8::Object> event_beta1 = handler.CreateEventInstance( + kEventName, false, true, binding::kNoListenerMax, true, context_beta1); + ASSERT_FALSE(event_beta1.IsEmpty()); + + // Add a listener to the first event. The APIEventHandler should notify + // since it's a change in state (no listeners -> listeners). + v8::Local<v8::Function> listener_alpha1 = + FunctionFromString(context_alpha1, "(function() {})"); + EXPECT_CALL(change_handler, + Run(kEventName, + binding::EventListenersChanged:: + kFirstUnfilteredListenerForContextOwnerAdded, + nullptr, true, context_alpha1)) + .Times(1); + AddListener(context_alpha1, listener_alpha1, event_alpha1); + ::testing::Mock::VerifyAndClearExpectations(&change_handler); + + // Adding a listener to the same event in a different context that is still + // associated with the same owner should fire a notification for the context, + // but not the context owner. + EXPECT_CALL(change_handler, Run(kEventName, + binding::EventListenersChanged:: + kFirstUnfilteredListenerForContextAdded, + nullptr, true, context_alpha2)) + .Times(1); + v8::Local<v8::Function> listener_alpha2 = + FunctionFromString(context_alpha2, "(function() {})"); + AddListener(context_alpha2, listener_alpha2, event_alpha2); + ::testing::Mock::VerifyAndClearExpectations(&change_handler); + + // Adding a listener in a separate context should fire a notification. + v8::Local<v8::Function> listener_beta1 = + FunctionFromString(context_alpha1, "(function() {})"); + EXPECT_CALL(change_handler, + Run(kEventName, + binding::EventListenersChanged:: + kFirstUnfilteredListenerForContextOwnerAdded, + nullptr, true, context_beta1)) + .Times(1); + AddListener(context_beta1, listener_beta1, event_beta1); + ::testing::Mock::VerifyAndClearExpectations(&change_handler); + + // Removing one of the listeners from the alpha context should notify about + // the context, but not the context owner (since there are multiple listeners + // for the context owner). + EXPECT_CALL(change_handler, Run(kEventName, + binding::EventListenersChanged:: + kLastUnfilteredListenerForContextRemoved, + nullptr, true, context_alpha1)) + .Times(1); + RemoveListener(context_alpha1, listener_alpha1, event_alpha1); + ::testing::Mock::VerifyAndClearExpectations(&change_handler); + + // Removing the final listener should fire a notification for the context + // owner. + EXPECT_CALL(change_handler, + Run(kEventName, + binding::EventListenersChanged:: + kLastUnfilteredListenerForContextOwnerRemoved, + nullptr, true, context_alpha2)) + .Times(1); + RemoveListener(context_alpha2, listener_alpha2, event_alpha2); + ::testing::Mock::VerifyAndClearExpectations(&change_handler); + + // And removing the only listener for the beta context should fire a + // notification. + EXPECT_CALL(change_handler, + Run(kEventName, + binding::EventListenersChanged:: + kLastUnfilteredListenerForContextOwnerRemoved, + nullptr, true, context_beta1)) + .Times(1); + RemoveListener(context_beta1, listener_beta1, event_beta1); + ::testing::Mock::VerifyAndClearExpectations(&change_handler); +} + } // namespace extensions
diff --git a/extensions/renderer/bindings/api_event_listeners.cc b/extensions/renderer/bindings/api_event_listeners.cc index e38efe1..e0ae030d 100644 --- a/extensions/renderer/bindings/api_event_listeners.cc +++ b/extensions/renderer/bindings/api_event_listeners.cc
@@ -8,9 +8,9 @@ #include <memory> #include "content/public/renderer/v8_value_converter.h" -#include "extensions/common/event_filter.h" #include "extensions/common/event_filtering_info.h" #include "extensions/common/event_matcher.h" +#include "extensions/renderer/bindings/listener_tracker.h" #include "gin/converter.h" namespace extensions { @@ -78,11 +78,17 @@ UnfilteredEventListeners::UnfilteredEventListeners( const ListenersUpdated& listeners_updated, + const std::string& event_name, + const std::string& context_owner_id, int max_listeners, - bool supports_lazy_listeners) + bool supports_lazy_listeners, + ListenerTracker* listener_tracker) : listeners_updated_(listeners_updated), + event_name_(event_name), + context_owner_id_(context_owner_id), max_listeners_(max_listeners), - supports_lazy_listeners_(supports_lazy_listeners) { + supports_lazy_listeners_(supports_lazy_listeners), + listener_tracker_(listener_tracker) { DCHECK(max_listeners_ == binding::kNoListenerMax || max_listeners_ > 0); } UnfilteredEventListeners::~UnfilteredEventListeners() = default; @@ -107,8 +113,21 @@ listeners_.push_back( v8::Global<v8::Function>(context->GetIsolate(), listener)); if (listeners_.size() == 1) { - listeners_updated_.Run(binding::EventListenersChanged::HAS_LISTENERS, - nullptr, supports_lazy_listeners_, context); + // NOTE: |listener_tracker_| is null for unmanaged events, in which case we + // send no notifications. + if (listener_tracker_) { + bool was_first_listener_for_context_owner = + listener_tracker_->AddUnfilteredListener(context_owner_id_, + event_name_); + binding::EventListenersChanged changed = + was_first_listener_for_context_owner + ? binding::EventListenersChanged:: + kFirstUnfilteredListenerForContextOwnerAdded + : binding::EventListenersChanged:: + kFirstUnfilteredListenerForContextAdded; + listeners_updated_.Run(event_name_, changed, nullptr, + supports_lazy_listeners_, context); + } } return true; @@ -122,8 +141,8 @@ listeners_.erase(iter); if (listeners_.empty()) { - listeners_updated_.Run(binding::EventListenersChanged::NO_LISTENERS, - nullptr, supports_lazy_listeners_, context); + bool update_lazy_listeners = supports_lazy_listeners_; + NotifyListenersEmpty(context, update_lazy_listeners); } } @@ -150,13 +169,34 @@ if (!listeners_.empty()) { listeners_.clear(); // We don't want to update stored lazy listeners in this case, since the - // extension didn't unregister interest in the event. - bool update_lazy_listeners = false; - listeners_updated_.Run(binding::EventListenersChanged::NO_LISTENERS, - nullptr, update_lazy_listeners, context); + // extension didn't explicitly unregister interest in the event. + constexpr bool update_lazy_listeners = false; + NotifyListenersEmpty(context, update_lazy_listeners); } } +void UnfilteredEventListeners::NotifyListenersEmpty( + v8::Local<v8::Context> context, + bool update_lazy_listeners) { + DCHECK(listeners_.empty()); + // NOTE: |listener_tracker_| is null for unmanaged events, in which case we + // send no notifications. + if (!listener_tracker_) + return; + + bool was_last_listener_for_context_owner = + listener_tracker_->RemoveUnfilteredListener(context_owner_id_, + event_name_); + binding::EventListenersChanged changed = + was_last_listener_for_context_owner + ? binding::EventListenersChanged:: + kLastUnfilteredListenerForContextOwnerRemoved + : binding::EventListenersChanged:: + kLastUnfilteredListenerForContextRemoved; + listeners_updated_.Run(event_name_, changed, nullptr, update_lazy_listeners, + context); +} + struct FilteredEventListeners::ListenerData { bool operator==(v8::Local<v8::Function> other_function) const { // Note that we only consider the listener function here, and not the @@ -173,14 +213,16 @@ FilteredEventListeners::FilteredEventListeners( const ListenersUpdated& listeners_updated, const std::string& event_name, + const std::string& context_owner_id, int max_listeners, bool supports_lazy_listeners, - EventFilter* event_filter) + ListenerTracker* listener_tracker) : listeners_updated_(listeners_updated), event_name_(event_name), + context_owner_id_(context_owner_id), max_listeners_(max_listeners), supports_lazy_listeners_(supports_lazy_listeners), - event_filter_(event_filter) {} + listener_tracker_(listener_tracker) {} FilteredEventListeners::~FilteredEventListeners() = default; bool FilteredEventListeners::AddListener(v8::Local<v8::Function> listener, @@ -200,22 +242,26 @@ if (!ValidateFilter(context, filter, &filter_dict, error)) return false; - int filter_id = event_filter_->AddEventMatcher( - event_name_, - std::make_unique<EventMatcher>(std::move(filter_dict), kIgnoreRoutingId)); + base::DictionaryValue* filter_weak = filter_dict.get(); + int filter_id = -1; + bool was_first_of_kind = false; + std::tie(was_first_of_kind, filter_id) = + listener_tracker_->AddFilteredListener(context_owner_id_, event_name_, + std::move(filter_dict), + kIgnoreRoutingId); if (filter_id == -1) { *error = "Could not add listener"; return false; } - const EventMatcher* matcher = event_filter_->GetEventMatcher(filter_id); - DCHECK(matcher); listeners_.push_back( {v8::Global<v8::Function>(context->GetIsolate(), listener), filter_id}); - if (value_counter_.Add(*matcher->value())) { - listeners_updated_.Run(binding::EventListenersChanged::HAS_LISTENERS, - matcher->value(), supports_lazy_listeners_, context); + if (was_first_of_kind) { + listeners_updated_.Run(event_name_, + binding::EventListenersChanged:: + kFirstListenerWithFilterForContextOwnerAdded, + filter_weak, supports_lazy_listeners_, context); } return true; @@ -245,7 +291,7 @@ std::vector<v8::Local<v8::Function>> FilteredEventListeners::GetListeners( const EventFilteringInfo* filter, v8::Local<v8::Context> context) { - std::set<int> ids = event_filter_->MatchEvent( + std::set<int> ids = listener_tracker_->GetMatchingFilteredListeners( event_name_, filter ? *filter : EventFilteringInfo(), kIgnoreRoutingId); std::vector<v8::Local<v8::Function>> listeners; @@ -267,15 +313,18 @@ const ListenerData& listener, bool was_manual, v8::Local<v8::Context> context) { - EventMatcher* matcher = event_filter_->GetEventMatcher(listener.filter_id); - DCHECK(matcher); - if (value_counter_.Remove(*matcher->value())) { - listeners_updated_.Run(binding::EventListenersChanged::NO_LISTENERS, - matcher->value(), - was_manual && supports_lazy_listeners_, context); + bool was_last_of_kind = false; + std::unique_ptr<base::DictionaryValue> filter; + std::tie(was_last_of_kind, filter) = + listener_tracker_->RemoveFilteredListener(context_owner_id_, event_name_, + listener.filter_id); + if (was_last_of_kind) { + listeners_updated_.Run(event_name_, + binding::EventListenersChanged:: + kLastListenerWithFilterForContextOwnerRemoved, + filter.get(), was_manual && supports_lazy_listeners_, + context); } - - event_filter_->RemoveEventMatcher(listener.filter_id); } } // namespace extensions
diff --git a/extensions/renderer/bindings/api_event_listeners.h b/extensions/renderer/bindings/api_event_listeners.h index 9d2c659..afec8a7 100644 --- a/extensions/renderer/bindings/api_event_listeners.h +++ b/extensions/renderer/bindings/api_event_listeners.h
@@ -10,7 +10,6 @@ #include "base/callback.h" #include "base/macros.h" -#include "extensions/common/value_counter.h" #include "extensions/renderer/bindings/api_binding_types.h" #include "v8/include/v8.h" @@ -19,7 +18,7 @@ } namespace extensions { -class EventFilter; +class ListenerTracker; struct EventFilteringInfo; // A base class to hold listeners for a given event. This allows for adding, @@ -33,7 +32,8 @@ // change was "manual" (i.e., triggered by a direct call from the extension // rather than something like the context being destroyed). using ListenersUpdated = - base::Callback<void(binding::EventListenersChanged, + base::Callback<void(const std::string& event_name, + binding::EventListenersChanged, const base::DictionaryValue* filter, bool update_lazy_listeners, v8::Local<v8::Context> context)>; @@ -80,8 +80,11 @@ class UnfilteredEventListeners final : public APIEventListeners { public: UnfilteredEventListeners(const ListenersUpdated& listeners_updated, + const std::string& event_name, + const std::string& context_owner_id, int max_listeners, - bool supports_lazy_listeners); + bool supports_lazy_listeners, + ListenerTracker* listener_tracker); ~UnfilteredEventListeners() override; bool AddListener(v8::Local<v8::Function> listener, @@ -98,6 +101,10 @@ void Invalidate(v8::Local<v8::Context> context) override; private: + // Notifies that all the listeners for this context are now removed. + void NotifyListenersEmpty(v8::Local<v8::Context> context, + bool update_lazy_listeners); + // The event listeners associated with this event. // TODO(devlin): Having these listeners held as v8::Globals means that we // need to worry about cycles when a listener holds a reference to the event, @@ -110,12 +117,23 @@ ListenersUpdated listeners_updated_; + // This event's name. + std::string event_name_; + + // The owner of the context these listeners belong to. + std::string context_owner_id_; + // The maximum number of supported listeners. int max_listeners_; // Whether the event supports lazy listeners. bool supports_lazy_listeners_; + // The listener tracker to notify of added or removed listeners. This may be + // null if this is a set of listeners for an unmanaged event. If + // non-null, required to outlive this object. + ListenerTracker* listener_tracker_ = nullptr; + DISALLOW_COPY_AND_ASSIGN(UnfilteredEventListeners); }; @@ -127,9 +145,10 @@ public: FilteredEventListeners(const ListenersUpdated& listeners_updated, const std::string& event_name, + const std::string& context_owner_id, int max_listeners, bool supports_lazy_listeners, - EventFilter* event_filter); + ListenerTracker* listener_tracker); ~FilteredEventListeners() override; bool AddListener(v8::Local<v8::Function> listener, @@ -157,18 +176,21 @@ ListenersUpdated listeners_updated_; + // This event's name. std::string event_name_; + // The owner of the context these listeners belong to. + std::string context_owner_id_; + // The maximum number of supported listeners. int max_listeners_; // Whether the event supports lazy listeners. bool supports_lazy_listeners_; - // The associated EventFilter; required to outlive this object. - EventFilter* event_filter_ = nullptr; - - ValueCounter value_counter_; + // The listener tracker to notify of added or removed listeners. Required to + // outlive this object. + ListenerTracker* listener_tracker_ = nullptr; DISALLOW_COPY_AND_ASSIGN(FilteredEventListeners); };
diff --git a/extensions/renderer/bindings/api_event_listeners_unittest.cc b/extensions/renderer/bindings/api_event_listeners_unittest.cc index a2106d9..227b2ed 100644 --- a/extensions/renderer/bindings/api_event_listeners_unittest.cc +++ b/extensions/renderer/bindings/api_event_listeners_unittest.cc
@@ -11,6 +11,7 @@ #include "extensions/renderer/bindings/api_binding_test.h" #include "extensions/renderer/bindings/api_binding_test_util.h" #include "extensions/renderer/bindings/api_binding_types.h" +#include "extensions/renderer/bindings/listener_tracker.h" #include "testing/gmock/include/gmock/gmock.h" namespace extensions { @@ -23,6 +24,7 @@ const char kFunction[] = "(function() {})"; const char kEvent[] = "event"; +const char kContextOwner[] = "context"; } // namespace @@ -32,8 +34,9 @@ v8::Local<v8::Context> context = MainContext(); MockEventChangeHandler handler; - UnfilteredEventListeners listeners(handler.Get(), binding::kNoListenerMax, - true); + ListenerTracker tracker; + UnfilteredEventListeners listeners(handler.Get(), kEvent, kContextOwner, + binding::kNoListenerMax, true, &tracker); // Starting out, there should be no listeners. v8::Local<v8::Function> function_a = FunctionFromString(context, kFunction); @@ -44,7 +47,9 @@ v8::Local<v8::Object> filter; // Adding a new listener should trigger the callback (0 -> 1). - EXPECT_CALL(handler, Run(binding::EventListenersChanged::HAS_LISTENERS, + EXPECT_CALL(handler, Run(kEvent, + binding::EventListenersChanged:: + kFirstUnfilteredListenerForContextOwnerAdded, nullptr, true, context)); EXPECT_TRUE(listeners.AddListener(function_a, filter, context, &error)); ::testing::Mock::VerifyAndClearExpectations(&handler); @@ -89,7 +94,9 @@ testing::UnorderedElementsAre(function_b)); // Remove function_b (the final listener). No more listeners should remain. - EXPECT_CALL(handler, Run(binding::EventListenersChanged::NO_LISTENERS, + EXPECT_CALL(handler, Run(kEvent, + binding::EventListenersChanged:: + kLastUnfilteredListenerForContextOwnerRemoved, nullptr, true, context)); listeners.RemoveListener(function_b, context); ::testing::Mock::VerifyAndClearExpectations(&handler); @@ -104,8 +111,9 @@ v8::Local<v8::Context> context = MainContext(); MockEventChangeHandler handler; - UnfilteredEventListeners listeners(handler.Get(), binding::kNoListenerMax, - true); + ListenerTracker tracker; + UnfilteredEventListeners listeners(handler.Get(), kEvent, kContextOwner, + binding::kNoListenerMax, true, &tracker); listeners.Invalidate(context); @@ -113,13 +121,17 @@ v8::Local<v8::Function> function_b = FunctionFromString(context, kFunction); std::string error; v8::Local<v8::Object> filter; - EXPECT_CALL(handler, Run(binding::EventListenersChanged::HAS_LISTENERS, + EXPECT_CALL(handler, Run(kEvent, + binding::EventListenersChanged:: + kFirstUnfilteredListenerForContextOwnerAdded, nullptr, true, context)); EXPECT_TRUE(listeners.AddListener(function_a, filter, context, &error)); ::testing::Mock::VerifyAndClearExpectations(&handler); EXPECT_TRUE(listeners.AddListener(function_b, filter, context, &error)); - EXPECT_CALL(handler, Run(binding::EventListenersChanged::NO_LISTENERS, + EXPECT_CALL(handler, Run(kEvent, + binding::EventListenersChanged:: + kLastUnfilteredListenerForContextOwnerRemoved, nullptr, false, context)); listeners.Invalidate(context); ::testing::Mock::VerifyAndClearExpectations(&handler); @@ -132,8 +144,9 @@ v8::HandleScope handle_scope(isolate()); v8::Local<v8::Context> context = MainContext(); - UnfilteredEventListeners listeners(base::DoNothing(), binding::kNoListenerMax, - true); + ListenerTracker tracker; + UnfilteredEventListeners listeners(base::DoNothing(), kEvent, kContextOwner, + binding::kNoListenerMax, true, &tracker); v8::Local<v8::Function> function = FunctionFromString(context, kFunction); std::string error; v8::Local<v8::Object> filter; @@ -148,7 +161,9 @@ v8::HandleScope handle_scope(isolate()); v8::Local<v8::Context> context = MainContext(); - UnfilteredEventListeners listeners(base::DoNothing(), 1, true); + ListenerTracker tracker; + UnfilteredEventListeners listeners(base::DoNothing(), kEvent, kContextOwner, + 1, true, &tracker); v8::Local<v8::Function> function_a = FunctionFromString(context, kFunction); EXPECT_EQ(0u, listeners.GetNumListeners()); @@ -171,18 +186,23 @@ v8::HandleScope handle_scope(isolate()); v8::Local<v8::Context> context = MainContext(); + ListenerTracker tracker; MockEventChangeHandler handler; - UnfilteredEventListeners listeners(handler.Get(), binding::kNoListenerMax, - false); + UnfilteredEventListeners listeners(handler.Get(), kEvent, kContextOwner, + binding::kNoListenerMax, false, &tracker); v8::Local<v8::Function> listener = FunctionFromString(context, kFunction); std::string error; - EXPECT_CALL(handler, Run(binding::EventListenersChanged::HAS_LISTENERS, + EXPECT_CALL(handler, Run(kEvent, + binding::EventListenersChanged:: + kFirstUnfilteredListenerForContextOwnerAdded, nullptr, false, context)); listeners.AddListener(listener, v8::Local<v8::Object>(), context, &error); ::testing::Mock::VerifyAndClearExpectations(&handler); - EXPECT_CALL(handler, Run(binding::EventListenersChanged::NO_LISTENERS, + EXPECT_CALL(handler, Run(kEvent, + binding::EventListenersChanged:: + kLastUnfilteredListenerForContextOwnerRemoved, nullptr, false, context)); listeners.RemoveListener(listener, context); ::testing::Mock::VerifyAndClearExpectations(&handler); @@ -194,14 +214,16 @@ v8::Local<v8::Context> context = MainContext(); MockEventChangeHandler handler; - EventFilter event_filter; - FilteredEventListeners listeners( - handler.Get(), kEvent, binding::kNoListenerMax, true, &event_filter); + ListenerTracker tracker; + FilteredEventListeners listeners(handler.Get(), kEvent, kContextOwner, + binding::kNoListenerMax, true, &tracker); // Starting out, there should be no listeners registered. v8::Local<v8::Function> function_a = FunctionFromString(context, kFunction); EXPECT_EQ(0u, listeners.GetNumListeners()); - EXPECT_EQ(0, event_filter.GetMatcherCountForEventForTesting(kEvent)); + EXPECT_EQ( + 0, tracker.event_filter_for_testing()->GetMatcherCountForEventForTesting( + kEvent)); EXPECT_FALSE(listeners.HasListener(function_a)); v8::Local<v8::Object> empty_filter; @@ -213,7 +235,9 @@ // Note that we don't test the passed filter here. This is mostly because it's // a pain to match against a DictionaryValue (which doesn't have an // operator==). - EXPECT_CALL(handler, Run(binding::EventListenersChanged::HAS_LISTENERS, + EXPECT_CALL(handler, Run(kEvent, + binding::EventListenersChanged:: + kFirstListenerWithFilterForContextOwnerAdded, testing::NotNull(), true, context)); EXPECT_TRUE(listeners.AddListener(function_a, empty_filter, context, &error)); ::testing::Mock::VerifyAndClearExpectations(&handler); @@ -226,7 +250,9 @@ testing::UnorderedElementsAre(function_a)); // It should also be registered in the event filter. - EXPECT_EQ(1, event_filter.GetMatcherCountForEventForTesting(kEvent)); + EXPECT_EQ( + 1, tracker.event_filter_for_testing()->GetMatcherCountForEventForTesting( + kEvent)); // Since function_a has no filter, associating a specific url should still // return function_a. @@ -261,7 +287,9 @@ ASSERT_TRUE(val->IsObject()); path_filter = val.As<v8::Object>(); } - EXPECT_CALL(handler, Run(binding::EventListenersChanged::HAS_LISTENERS, + EXPECT_CALL(handler, Run(kEvent, + binding::EventListenersChanged:: + kFirstListenerWithFilterForContextOwnerAdded, testing::NotNull(), true, context)); EXPECT_TRUE(listeners.AddListener(function_b, path_filter, context, &error)); ::testing::Mock::VerifyAndClearExpectations(&handler); @@ -269,7 +297,9 @@ // function_b should be present. EXPECT_TRUE(listeners.HasListener(function_b)); EXPECT_EQ(2u, listeners.GetNumListeners()); - EXPECT_EQ(2, event_filter.GetMatcherCountForEventForTesting(kEvent)); + EXPECT_EQ( + 2, tracker.event_filter_for_testing()->GetMatcherCountForEventForTesting( + kEvent)); // function_b should ignore calls that don't specify an url, since they, by // definition, don't match. @@ -287,13 +317,17 @@ // Remove function_a. Since filtered listeners notify whenever there's a // change in listeners registered with a specific filter, this should trigger // the callback. - EXPECT_CALL(handler, Run(binding::EventListenersChanged::NO_LISTENERS, + EXPECT_CALL(handler, Run(kEvent, + binding::EventListenersChanged:: + kLastListenerWithFilterForContextOwnerRemoved, testing::NotNull(), true, context)); listeners.RemoveListener(function_a, context); ::testing::Mock::VerifyAndClearExpectations(&handler); EXPECT_FALSE(listeners.HasListener(function_a)); EXPECT_EQ(1u, listeners.GetNumListeners()); - EXPECT_EQ(1, event_filter.GetMatcherCountForEventForTesting(kEvent)); + EXPECT_EQ( + 1, tracker.event_filter_for_testing()->GetMatcherCountForEventForTesting( + kEvent)); // function_b should be the only listener remaining, so we shouldn't find // any listeners for events without matching filters. EXPECT_TRUE(listeners.GetListeners(nullptr, context).empty()); @@ -303,7 +337,9 @@ listeners.GetListeners(&filtering_info_no_match, context).empty()); // Remove function_b. No listeners should remain. - EXPECT_CALL(handler, Run(binding::EventListenersChanged::NO_LISTENERS, + EXPECT_CALL(handler, Run(kEvent, + binding::EventListenersChanged:: + kLastListenerWithFilterForContextOwnerRemoved, testing::NotNull(), true, context)); listeners.RemoveListener(function_b, context); ::testing::Mock::VerifyAndClearExpectations(&handler); @@ -311,7 +347,9 @@ EXPECT_EQ(0u, listeners.GetNumListeners()); EXPECT_TRUE(listeners.GetListeners(nullptr, context).empty()); EXPECT_TRUE(listeners.GetListeners(&filtering_info_match, context).empty()); - EXPECT_EQ(0, event_filter.GetMatcherCountForEventForTesting(kEvent)); + EXPECT_EQ( + 0, tracker.event_filter_for_testing()->GetMatcherCountForEventForTesting( + kEvent)); } // Tests that adding multiple listeners with the same filter doesn't trigger @@ -322,9 +360,9 @@ v8::Local<v8::Context> context = MainContext(); MockEventChangeHandler handler; - EventFilter event_filter; - FilteredEventListeners listeners( - handler.Get(), kEvent, binding::kNoListenerMax, true, &event_filter); + ListenerTracker tracker; + FilteredEventListeners listeners(handler.Get(), kEvent, kContextOwner, + binding::kNoListenerMax, true, &tracker); auto get_filter = [context]() { return V8ValueFromScriptSource(context, "({url: [{pathContains: 'foo'}]})") @@ -334,18 +372,24 @@ v8::Local<v8::Function> function_a = FunctionFromString(context, kFunction); std::string error; - EXPECT_CALL(handler, Run(binding::EventListenersChanged::HAS_LISTENERS, + EXPECT_CALL(handler, Run(kEvent, + binding::EventListenersChanged:: + kFirstListenerWithFilterForContextOwnerAdded, testing::NotNull(), true, context)); EXPECT_TRUE(listeners.AddListener(function_a, get_filter(), context, &error)); ::testing::Mock::VerifyAndClearExpectations(&handler); - EXPECT_EQ(1, event_filter.GetMatcherCountForEventForTesting(kEvent)); + EXPECT_EQ( + 1, tracker.event_filter_for_testing()->GetMatcherCountForEventForTesting( + kEvent)); v8::Local<v8::Function> function_b = FunctionFromString(context, kFunction); v8::Local<v8::Function> function_c = FunctionFromString(context, kFunction); EXPECT_TRUE(listeners.AddListener(function_b, get_filter(), context, &error)); EXPECT_TRUE(listeners.AddListener(function_c, get_filter(), context, &error)); EXPECT_EQ(3u, listeners.GetNumListeners()); - EXPECT_EQ(3, event_filter.GetMatcherCountForEventForTesting(kEvent)); + EXPECT_EQ( + 3, tracker.event_filter_for_testing()->GetMatcherCountForEventForTesting( + kEvent)); EventFilteringInfo filtering_info_match; filtering_info_match.url = GURL("http://example.com/foo"); @@ -356,11 +400,15 @@ listeners.RemoveListener(function_c, context); listeners.RemoveListener(function_b, context); - EXPECT_CALL(handler, Run(binding::EventListenersChanged::NO_LISTENERS, + EXPECT_CALL(handler, Run(kEvent, + binding::EventListenersChanged:: + kLastListenerWithFilterForContextOwnerRemoved, testing::NotNull(), true, context)); listeners.RemoveListener(function_a, context); ::testing::Mock::VerifyAndClearExpectations(&handler); - EXPECT_EQ(0, event_filter.GetMatcherCountForEventForTesting(kEvent)); + EXPECT_EQ( + 0, tracker.event_filter_for_testing()->GetMatcherCountForEventForTesting( + kEvent)); } // Tests that trying to add a listener with an invalid filter fails. @@ -368,9 +416,9 @@ v8::HandleScope handle_scope(isolate()); v8::Local<v8::Context> context = MainContext(); - EventFilter event_filter; - FilteredEventListeners listeners( - base::DoNothing(), kEvent, binding::kNoListenerMax, true, &event_filter); + ListenerTracker tracker; + FilteredEventListeners listeners(base::DoNothing(), kEvent, kContextOwner, + binding::kNoListenerMax, true, &tracker); v8::Local<v8::Object> invalid_filter = V8ValueFromScriptSource(context, "({url: 'some string'})") @@ -391,35 +439,55 @@ const char kAlpha[] = "alpha"; const char kBeta[] = "beta"; - EventFilter event_filter; - FilteredEventListeners listeners_a( - base::DoNothing(), kAlpha, binding::kNoListenerMax, true, &event_filter); - FilteredEventListeners listeners_b( - base::DoNothing(), kBeta, binding::kNoListenerMax, true, &event_filter); + ListenerTracker tracker; + FilteredEventListeners listeners_a(base::DoNothing(), kAlpha, kContextOwner, + binding::kNoListenerMax, true, &tracker); + FilteredEventListeners listeners_b(base::DoNothing(), kBeta, kContextOwner, + binding::kNoListenerMax, true, &tracker); - EXPECT_EQ(0, event_filter.GetMatcherCountForEventForTesting(kAlpha)); - EXPECT_EQ(0, event_filter.GetMatcherCountForEventForTesting(kBeta)); + EXPECT_EQ( + 0, tracker.event_filter_for_testing()->GetMatcherCountForEventForTesting( + kAlpha)); + EXPECT_EQ( + 0, tracker.event_filter_for_testing()->GetMatcherCountForEventForTesting( + kBeta)); std::string error; v8::Local<v8::Object> filter; v8::Local<v8::Function> function_a = FunctionFromString(context, kFunction); EXPECT_TRUE(listeners_a.AddListener(function_a, filter, context, &error)); - EXPECT_EQ(1, event_filter.GetMatcherCountForEventForTesting(kAlpha)); - EXPECT_EQ(0, event_filter.GetMatcherCountForEventForTesting(kBeta)); + EXPECT_EQ( + 1, tracker.event_filter_for_testing()->GetMatcherCountForEventForTesting( + kAlpha)); + EXPECT_EQ( + 0, tracker.event_filter_for_testing()->GetMatcherCountForEventForTesting( + kBeta)); v8::Local<v8::Function> function_b = FunctionFromString(context, kFunction); EXPECT_TRUE(listeners_b.AddListener(function_b, filter, context, &error)); - EXPECT_EQ(1, event_filter.GetMatcherCountForEventForTesting(kAlpha)); - EXPECT_EQ(1, event_filter.GetMatcherCountForEventForTesting(kBeta)); + EXPECT_EQ( + 1, tracker.event_filter_for_testing()->GetMatcherCountForEventForTesting( + kAlpha)); + EXPECT_EQ( + 1, tracker.event_filter_for_testing()->GetMatcherCountForEventForTesting( + kBeta)); listeners_b.RemoveListener(function_b, context); - EXPECT_EQ(1, event_filter.GetMatcherCountForEventForTesting(kAlpha)); - EXPECT_EQ(0, event_filter.GetMatcherCountForEventForTesting(kBeta)); + EXPECT_EQ( + 1, tracker.event_filter_for_testing()->GetMatcherCountForEventForTesting( + kAlpha)); + EXPECT_EQ( + 0, tracker.event_filter_for_testing()->GetMatcherCountForEventForTesting( + kBeta)); listeners_a.RemoveListener(function_a, context); - EXPECT_EQ(0, event_filter.GetMatcherCountForEventForTesting(kAlpha)); - EXPECT_EQ(0, event_filter.GetMatcherCountForEventForTesting(kBeta)); + EXPECT_EQ( + 0, tracker.event_filter_for_testing()->GetMatcherCountForEventForTesting( + kAlpha)); + EXPECT_EQ( + 0, tracker.event_filter_for_testing()->GetMatcherCountForEventForTesting( + kBeta)); } // Tests the invalidation of filtered listeners. @@ -428,9 +496,9 @@ v8::Local<v8::Context> context = MainContext(); MockEventChangeHandler handler; - EventFilter event_filter; - FilteredEventListeners listeners( - handler.Get(), kEvent, binding::kNoListenerMax, true, &event_filter); + ListenerTracker tracker; + FilteredEventListeners listeners(handler.Get(), kEvent, kContextOwner, + binding::kNoListenerMax, true, &tracker); listeners.Invalidate(context); v8::Local<v8::Object> empty_filter; @@ -443,11 +511,15 @@ v8::Local<v8::Function> function_b = FunctionFromString(context, kFunction); v8::Local<v8::Function> function_c = FunctionFromString(context, kFunction); - EXPECT_CALL(handler, Run(binding::EventListenersChanged::HAS_LISTENERS, + EXPECT_CALL(handler, Run(kEvent, + binding::EventListenersChanged:: + kFirstListenerWithFilterForContextOwnerAdded, testing::NotNull(), true, context)); EXPECT_TRUE(listeners.AddListener(function_a, empty_filter, context, &error)); ::testing::Mock::VerifyAndClearExpectations(&handler); - EXPECT_CALL(handler, Run(binding::EventListenersChanged::HAS_LISTENERS, + EXPECT_CALL(handler, Run(kEvent, + binding::EventListenersChanged:: + kFirstListenerWithFilterForContextOwnerAdded, testing::NotNull(), true, context)); EXPECT_TRUE(listeners.AddListener(function_b, filter, context, &error)); ::testing::Mock::VerifyAndClearExpectations(&handler); @@ -455,23 +527,27 @@ // Since two listener filters are present in the list, we should be notified // of each going away when we invalidate the context. - EXPECT_CALL(handler, Run(binding::EventListenersChanged::NO_LISTENERS, + EXPECT_CALL(handler, Run(kEvent, + binding::EventListenersChanged:: + kLastListenerWithFilterForContextOwnerRemoved, testing::NotNull(), false, context)) .Times(2); listeners.Invalidate(context); ::testing::Mock::VerifyAndClearExpectations(&handler); EXPECT_EQ(0u, listeners.GetNumListeners()); - EXPECT_EQ(0, event_filter.GetMatcherCountForEventForTesting(kEvent)); + EXPECT_EQ( + 0, tracker.event_filter_for_testing()->GetMatcherCountForEventForTesting( + kEvent)); } TEST_F(APIEventListenersTest, FilteredListenersMaxListenersTest) { v8::HandleScope handle_scope(isolate()); v8::Local<v8::Context> context = MainContext(); - EventFilter event_filter; - FilteredEventListeners listeners(base::DoNothing(), kEvent, 1, true, - &event_filter); + ListenerTracker tracker; + FilteredEventListeners listeners(base::DoNothing(), kEvent, kContextOwner, 1, + true, &tracker); v8::Local<v8::Function> function_a = FunctionFromString(context, kFunction); EXPECT_EQ(0u, listeners.GetNumListeners()); @@ -495,18 +571,22 @@ v8::Local<v8::Context> context = MainContext(); MockEventChangeHandler handler; - EventFilter event_filter; - FilteredEventListeners listeners( - handler.Get(), kEvent, binding::kNoListenerMax, false, &event_filter); + ListenerTracker tracker; + FilteredEventListeners listeners(handler.Get(), kEvent, kContextOwner, + binding::kNoListenerMax, false, &tracker); v8::Local<v8::Function> listener = FunctionFromString(context, kFunction); std::string error; - EXPECT_CALL(handler, Run(binding::EventListenersChanged::HAS_LISTENERS, + EXPECT_CALL(handler, Run(kEvent, + binding::EventListenersChanged:: + kFirstListenerWithFilterForContextOwnerAdded, testing::NotNull(), false, context)); listeners.AddListener(listener, v8::Local<v8::Object>(), context, &error); ::testing::Mock::VerifyAndClearExpectations(&handler); - EXPECT_CALL(handler, Run(binding::EventListenersChanged::NO_LISTENERS, + EXPECT_CALL(handler, Run(kEvent, + binding::EventListenersChanged:: + kLastListenerWithFilterForContextOwnerRemoved, testing::NotNull(), false, context)); listeners.RemoveListener(listener, context); ::testing::Mock::VerifyAndClearExpectations(&handler);
diff --git a/extensions/renderer/bindings/event_emitter_unittest.cc b/extensions/renderer/bindings/event_emitter_unittest.cc index 6e386db..530cbdd 100644 --- a/extensions/renderer/bindings/event_emitter_unittest.cc +++ b/extensions/renderer/bindings/event_emitter_unittest.cc
@@ -11,6 +11,7 @@ #include "extensions/renderer/bindings/api_binding_test_util.h" #include "extensions/renderer/bindings/api_event_listeners.h" #include "extensions/renderer/bindings/exception_handler.h" +#include "extensions/renderer/bindings/listener_tracker.h" #include "extensions/renderer/bindings/test_js_runner.h" #include "gin/handle.h" #include "testing/gmock/include/gmock/gmock.h" @@ -38,8 +39,10 @@ v8::HandleScope handle_scope(isolate()); v8::Local<v8::Context> context = MainContext(); + ListenerTracker tracker; auto listeners = std::make_unique<UnfilteredEventListeners>( - base::DoNothing(), binding::kNoListenerMax, true); + base::DoNothing(), "event", "context", binding::kNoListenerMax, true, + &tracker); auto log_error = [](std::vector<std::string>* errors, v8::Local<v8::Context> context, @@ -139,8 +142,10 @@ info.GetIsolate()->GetCurrentContext()); }; + ListenerTracker tracker; auto listeners = std::make_unique<UnfilteredEventListeners>( - base::DoNothing(), binding::kNoListenerMax, true); + base::DoNothing(), "event", "context", binding::kNoListenerMax, true, + &tracker); ExceptionHandler exception_handler(base::BindRepeating( [](v8::Local<v8::Context> context, const std::string& error) {})); gin::Handle<EventEmitter> event = gin::CreateHandle(
diff --git a/extensions/renderer/bindings/listener_tracker.cc b/extensions/renderer/bindings/listener_tracker.cc new file mode 100644 index 0000000..9a18b8ed --- /dev/null +++ b/extensions/renderer/bindings/listener_tracker.cc
@@ -0,0 +1,88 @@ +// 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 "extensions/renderer/bindings/listener_tracker.h" + +#include "base/values.h" +#include "extensions/common/value_counter.h" + +namespace extensions { + +ListenerTracker::ListenerTracker() = default; +ListenerTracker::~ListenerTracker() = default; + +bool ListenerTracker::AddUnfilteredListener(const std::string& context_owner_id, + const std::string& event_name) { + ListenerCountMap& listeners = unfiltered_listeners_[context_owner_id]; + return ++listeners[event_name] == 1; +} + +bool ListenerTracker::RemoveUnfilteredListener( + const std::string& context_owner_id, + const std::string& event_name) { + ListenerCountMap& listeners = unfiltered_listeners_[context_owner_id]; + auto iter = listeners.find(event_name); + DCHECK(iter != listeners.end()); + if (--(iter->second) == 0) { + listeners.erase(iter); + return true; + } + return false; +} + +std::pair<bool, int> ListenerTracker::AddFilteredListener( + const std::string& context_owner_id, + const std::string& event_name, + std::unique_ptr<base::DictionaryValue> filter, + int routing_id) { + int filter_id = event_filter_.AddEventMatcher( + event_name, + std::make_unique<EventMatcher>(std::move(filter), routing_id)); + if (filter_id == -1) + return std::make_pair(false, -1); + + FilteredEventListenerKey key(context_owner_id, event_name); + std::unique_ptr<ValueCounter>& counts = filtered_listeners_[key]; + if (!counts) + counts = std::make_unique<ValueCounter>(); + + const EventMatcher* matcher = event_filter_.GetEventMatcher(filter_id); + bool was_first_of_kind = counts->Add(*matcher->value()); + return std::make_pair(was_first_of_kind, filter_id); +} + +std::pair<bool, std::unique_ptr<base::DictionaryValue>> +ListenerTracker::RemoveFilteredListener(const std::string& context_owner_id, + const std::string& event_name, + int filter_id) { + EventMatcher* matcher = event_filter_.GetEventMatcher(filter_id); + DCHECK(matcher); + std::unique_ptr<base::DictionaryValue> filter_copy = + matcher->value()->CreateDeepCopy(); + + FilteredEventListenerKey key(context_owner_id, event_name); + FilteredListeners::const_iterator counts = filtered_listeners_.find(key); + + bool was_last_of_kind = false; + DCHECK(counts != filtered_listeners_.end()); + if (counts->second->Remove(*matcher->value())) { + if (counts->second->is_empty()) { + // Clean up if there are no more filters. + filtered_listeners_.erase(counts); + } + was_last_of_kind = true; + } + + event_filter_.RemoveEventMatcher(filter_id); + return std::make_pair(was_last_of_kind, std::move(filter_copy)); +} + +std::set<int> ListenerTracker::GetMatchingFilteredListeners( + const std::string& event_name, + const EventFilteringInfo& filter, + int routing_id) { + return event_filter_.MatchEvent(event_name, filter, routing_id); +} + +} // namespace extensions
diff --git a/extensions/renderer/bindings/listener_tracker.h b/extensions/renderer/bindings/listener_tracker.h new file mode 100644 index 0000000..e29e6771 --- /dev/null +++ b/extensions/renderer/bindings/listener_tracker.h
@@ -0,0 +1,116 @@ +// 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 EXTENSIONS_RENDERER_BINDINGS_LISTENER_TRACKER_H_ +#define EXTENSIONS_RENDERER_BINDINGS_LISTENER_TRACKER_H_ + +#include <map> +#include <memory> +#include <string> +#include <utility> + +#include "extensions/common/event_filter.h" + +namespace base { +class DictionaryValue; +} + +namespace extensions { +class EventFilter; +class ValueCounter; +struct EventFilteringInfo; + +// A class to track all event listeners across multiple v8::Contexts. Each +// context has a "context owner", which may be the same across multiple +// contexts. For instance, an extension may listen to the same event in +// multiple pages. Since these contexts may have the same context owner, +// tracking when a new listener is added requires looking at more than a +// single context. +// +// TODO(devlin): We should combine this with EventBookkeeper and use it with +// both native and JS bindings. +// TODO(devlin): We should incorporate the notifications for newly added/ +// removed listeners into this class, rather than having callers worry about +// it based on return values. +class ListenerTracker { + public: + ListenerTracker(); + ~ListenerTracker(); + + // Adds a record of an unfiltered listener for the given |event_name|, + // associated with the given |context_owner_id|. + // Returns true if this was the first listener for this event by this + // |context_owner_id| across all contexts. + // Note that unfiltered listeners should only be added once per unique + // context; callers are responsible for ensuring this isn't called for + // multiple listeners in the same context (though it may be for the same + // context owner). + bool AddUnfilteredListener(const std::string& context_owner_id, + const std::string& event_name); + + // Removes a record of an unfiltered listener for the given |event_name|, + // associated with the given |context_owner_id|. + // Returns true if this was the last listener for this event by this + // |context_owner_id| across all contexts. + bool RemoveUnfilteredListener(const std::string& context_owner_id, + const std::string& event_name); + + // Adds a record of a filtered listener for the given |event_name|, + // associated with the given |context_owner_id| and with the given |filter| + // and |routing_id|. Returns a pair, with the bool indicating if this was the + // first listener added for this event and |context_owner_id| with this + // specific filter, and an integer for the filter ID. If the filter could not + // be added (i.e., it was invalid), the filter ID will be -1, and no listener + // will have been added. + std::pair<bool, int> AddFilteredListener( + const std::string& context_owner_id, + const std::string& event_name, + std::unique_ptr<base::DictionaryValue> filter, + int routing_id); + + // Removes a record of a filtered listener for the given |event_name|, + // associated with the given |context_owner_id| and |filter_id|. DCHECKs that + // such a listener exists. + // Returns a pair, with the bool indicating if this was the last listener + // added for this event and |context_owner_id| with this specific filter, and + // a copy of the filter value. + std::pair<bool, std::unique_ptr<base::DictionaryValue>> + RemoveFilteredListener(const std::string& context_owner_id, + const std::string& event_name, + int filter_id); + + // Returns a set of filter IDs to that correspond to the given |event_name|, + // |filter|, and |routing_id|. + std::set<int> GetMatchingFilteredListeners(const std::string& event_name, + const EventFilteringInfo& filter, + int routing_id); + + EventFilter* event_filter_for_testing() { return &event_filter_; } + + private: + // A map of event name to the number of different contexts listening to that + // event. + using ListenerCountMap = std::map<std::string, int>; + // A map of context owner to the listener counts for all events. + using UnfilteredListeners = std::map<std::string, ListenerCountMap>; + + // A key for a filtered listener; a pair of <context owner, event name>. + using FilteredEventListenerKey = std::pair<std::string, std::string>; + // A map of filtered event listeners, mapping the key to a counter to track + // the number of listeners with given filters. + using FilteredListeners = + std::map<FilteredEventListenerKey, std::unique_ptr<ValueCounter>>; + + UnfilteredListeners unfiltered_listeners_; + FilteredListeners filtered_listeners_; + + // The event filter. + EventFilter event_filter_; + + DISALLOW_COPY_AND_ASSIGN(ListenerTracker); +}; + +} // namespace extensions + +#endif // EXTENSIONS_RENDERER_BINDINGS_LISTENER_TRACKER_H_
diff --git a/extensions/renderer/bindings/listener_tracker_unittest.cc b/extensions/renderer/bindings/listener_tracker_unittest.cc new file mode 100644 index 0000000..af2fb43 --- /dev/null +++ b/extensions/renderer/bindings/listener_tracker_unittest.cc
@@ -0,0 +1,205 @@ +// 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 "extensions/renderer/bindings/listener_tracker.h" + +#include <memory> + +#include "base/values.h" +#include "extensions/renderer/bindings/api_binding_test_util.h" +#include "testing/gmock/include/gmock/gmock.h" +#include "testing/gtest/include/gtest/gtest.h" + +namespace extensions { +namespace { + +constexpr char kEvent1[] = "Event1"; +constexpr char kEvent2[] = "Event2"; +constexpr char kOwner1[] = "Owner1"; +constexpr char kOwner2[] = "Owner2"; +constexpr int kRoutingId = 0; + +} // namespace + +TEST(ListenerTrackerTest, UnfilteredListeners) { + ListenerTracker tracker; + + // Add two listeners for the same event with the same owner. Only the + // first added should return true. + EXPECT_TRUE(tracker.AddUnfilteredListener(kOwner1, kEvent1)); + EXPECT_FALSE(tracker.AddUnfilteredListener(kOwner1, kEvent1)); + + EXPECT_TRUE(tracker.AddUnfilteredListener(kOwner1, kEvent2)); + EXPECT_TRUE(tracker.AddUnfilteredListener(kOwner2, kEvent1)); + + EXPECT_FALSE(tracker.RemoveUnfilteredListener(kOwner1, kEvent1)); + EXPECT_TRUE(tracker.RemoveUnfilteredListener(kOwner1, kEvent1)); + + EXPECT_TRUE(tracker.RemoveUnfilteredListener(kOwner1, kEvent2)); + EXPECT_TRUE(tracker.RemoveUnfilteredListener(kOwner2, kEvent1)); +} + +TEST(ListenerTrackerTest, FilteredListenersWithMultipleFilters) { + std::unique_ptr<base::DictionaryValue> filter1 = + DictionaryValueFromString(R"({"url": [{"hostSuffix": "example.com"}]})"); + std::unique_ptr<base::DictionaryValue> filter2 = + DictionaryValueFromString(R"({"url": [{"hostSuffix": "google.com"}]})"); + + ListenerTracker tracker; + int filter_id1 = -1; + bool was_first_of_kind = false; + std::tie(was_first_of_kind, filter_id1) = tracker.AddFilteredListener( + kOwner1, kEvent1, filter1->CreateDeepCopy(), kRoutingId); + EXPECT_TRUE(was_first_of_kind); + EXPECT_NE(-1, filter_id1); + + int filter_id2 = -1; + std::tie(was_first_of_kind, filter_id2) = tracker.AddFilteredListener( + kOwner1, kEvent1, filter1->CreateDeepCopy(), kRoutingId); + EXPECT_FALSE(was_first_of_kind); + EXPECT_NE(-1, filter_id2); + EXPECT_NE(filter_id1, filter_id2); + + int filter_id3 = -1; + std::tie(was_first_of_kind, filter_id3) = tracker.AddFilteredListener( + kOwner1, kEvent1, filter2->CreateDeepCopy(), kRoutingId); + EXPECT_TRUE(was_first_of_kind); + EXPECT_NE(-1, filter_id3); + + std::unique_ptr<base::DictionaryValue> removed_filter; + bool was_last_of_kind = false; + std::tie(was_last_of_kind, removed_filter) = + tracker.RemoveFilteredListener(kOwner1, kEvent1, filter_id1); + EXPECT_FALSE(was_last_of_kind); + ASSERT_TRUE(removed_filter); + EXPECT_EQ(ValueToString(*removed_filter), ValueToString(*filter1)); + + std::tie(was_last_of_kind, removed_filter) = + tracker.RemoveFilteredListener(kOwner1, kEvent1, filter_id2); + EXPECT_TRUE(was_last_of_kind); + ASSERT_TRUE(removed_filter); + EXPECT_EQ(ValueToString(*removed_filter), ValueToString(*filter1)); + + std::tie(was_last_of_kind, removed_filter) = + tracker.RemoveFilteredListener(kOwner1, kEvent1, filter_id3); + EXPECT_TRUE(was_last_of_kind); + ASSERT_TRUE(removed_filter); + EXPECT_EQ(ValueToString(*removed_filter), ValueToString(*filter2)); +} + +TEST(ListenerTrackerTest, FilteredListenersWithMultipleOwners) { + std::unique_ptr<base::DictionaryValue> filter = + DictionaryValueFromString(R"({"url": [{"hostSuffix": "example.com"}]})"); + + ListenerTracker tracker; + int filter_id1 = -1; + bool was_first_of_kind = false; + std::tie(was_first_of_kind, filter_id1) = tracker.AddFilteredListener( + kOwner1, kEvent1, filter->CreateDeepCopy(), kRoutingId); + EXPECT_TRUE(was_first_of_kind); + EXPECT_NE(-1, filter_id1); + + int filter_id2 = -1; + std::tie(was_first_of_kind, filter_id2) = tracker.AddFilteredListener( + kOwner2, kEvent1, filter->CreateDeepCopy(), kRoutingId); + EXPECT_TRUE(was_first_of_kind); + EXPECT_NE(-1, filter_id2); + EXPECT_NE(filter_id1, filter_id2); + + std::unique_ptr<base::DictionaryValue> removed_filter; + bool was_last_of_kind = false; + std::tie(was_last_of_kind, removed_filter) = + tracker.RemoveFilteredListener(kOwner1, kEvent1, filter_id1); + EXPECT_TRUE(was_last_of_kind); + ASSERT_TRUE(removed_filter); + EXPECT_EQ(ValueToString(*removed_filter), ValueToString(*filter)); + + std::tie(was_last_of_kind, removed_filter) = + tracker.RemoveFilteredListener(kOwner2, kEvent1, filter_id2); + EXPECT_TRUE(was_last_of_kind); + ASSERT_TRUE(removed_filter); + EXPECT_EQ(ValueToString(*removed_filter), ValueToString(*filter)); +} + +TEST(ListenerTrackerTest, FilteredListenersWithMultipleEvents) { + std::unique_ptr<base::DictionaryValue> filter = + DictionaryValueFromString(R"({"url": [{"hostSuffix": "example.com"}]})"); + + ListenerTracker tracker; + int filter_id1 = -1; + bool was_first_of_kind = false; + std::tie(was_first_of_kind, filter_id1) = tracker.AddFilteredListener( + kOwner1, kEvent1, filter->CreateDeepCopy(), kRoutingId); + EXPECT_TRUE(was_first_of_kind); + EXPECT_NE(-1, filter_id1); + + int filter_id2 = -1; + std::tie(was_first_of_kind, filter_id2) = tracker.AddFilteredListener( + kOwner1, kEvent2, filter->CreateDeepCopy(), kRoutingId); + EXPECT_TRUE(was_first_of_kind); + EXPECT_NE(-1, filter_id2); + EXPECT_NE(filter_id1, filter_id2); + + std::unique_ptr<base::DictionaryValue> removed_filter; + bool was_last_of_kind = false; + std::tie(was_last_of_kind, removed_filter) = + tracker.RemoveFilteredListener(kOwner1, kEvent1, filter_id1); + EXPECT_TRUE(was_last_of_kind); + ASSERT_TRUE(removed_filter); + EXPECT_EQ(ValueToString(*removed_filter), ValueToString(*filter)); + + std::tie(was_last_of_kind, removed_filter) = + tracker.RemoveFilteredListener(kOwner1, kEvent2, filter_id2); + EXPECT_TRUE(was_last_of_kind); + ASSERT_TRUE(removed_filter); + EXPECT_EQ(ValueToString(*removed_filter), ValueToString(*filter)); +} + +TEST(ListenerTrackerTest, InvalidFilteredListener) { + ListenerTracker tracker; + + std::unique_ptr<base::DictionaryValue> filter = + DictionaryValueFromString(R"({"url": ["Not a dictionary"]})"); + int filter_id = 0; + bool was_first_of_kind = false; + std::tie(was_first_of_kind, filter_id) = tracker.AddFilteredListener( + kOwner1, kEvent1, std::move(filter), kRoutingId); + EXPECT_EQ(-1, filter_id); + EXPECT_FALSE(was_first_of_kind); +} + +TEST(ListenerTrackerTest, GetMatchingFilters) { + std::unique_ptr<base::DictionaryValue> filter1 = + DictionaryValueFromString(R"({"url": [{"hostSuffix": "example.com"}]})"); + std::unique_ptr<base::DictionaryValue> filter2 = + DictionaryValueFromString(R"({"url": [{"hostContains": "google"}]})"); + std::unique_ptr<base::DictionaryValue> filter3 = + DictionaryValueFromString(R"({"url": [{"hostContains": "example"}]})"); + + ListenerTracker tracker; + int filter_id1 = -1; + bool was_first_of_kind = false; + std::tie(was_first_of_kind, filter_id1) = tracker.AddFilteredListener( + kOwner1, kEvent1, filter1->CreateDeepCopy(), kRoutingId); + EXPECT_NE(-1, filter_id1); + + int filter_id2 = -1; + std::tie(was_first_of_kind, filter_id2) = tracker.AddFilteredListener( + kOwner1, kEvent1, filter2->CreateDeepCopy(), kRoutingId); + EXPECT_NE(-1, filter_id2); + + int filter_id3 = -1; + std::tie(was_first_of_kind, filter_id3) = tracker.AddFilteredListener( + kOwner2, kEvent1, filter3->CreateDeepCopy(), kRoutingId); + EXPECT_NE(-1, filter_id3); + + EventFilteringInfo filtering_info; + filtering_info.url = GURL("https://example.com/foo"); + std::set<int> matching_filters = + tracker.GetMatchingFilteredListeners(kEvent1, filtering_info, kRoutingId); + EXPECT_THAT(matching_filters, + testing::UnorderedElementsAre(filter_id1, filter_id3)); +} + +} // namespace extensions
diff --git a/extensions/renderer/gin_port_unittest.cc b/extensions/renderer/gin_port_unittest.cc index 2732191..0486fbb 100644 --- a/extensions/renderer/gin_port_unittest.cc +++ b/extensions/renderer/gin_port_unittest.cc
@@ -65,8 +65,11 @@ void SetUp() override { APIBindingTest::SetUp(); - event_handler_ = - std::make_unique<APIEventHandler>(base::DoNothing(), nullptr); + auto get_context_owner = [](v8::Local<v8::Context> context) { + return std::string(); + }; + event_handler_ = std::make_unique<APIEventHandler>( + base::DoNothing(), base::BindRepeating(get_context_owner), nullptr); delegate_ = std::make_unique<testing::StrictMock<TestPortDelegate>>(); }
diff --git a/extensions/renderer/native_extension_bindings_system.cc b/extensions/renderer/native_extension_bindings_system.cc index dd89ee46..b3cf6e5 100644 --- a/extensions/renderer/native_extension_bindings_system.cc +++ b/extensions/renderer/native_extension_bindings_system.cc
@@ -8,6 +8,7 @@ #include "base/command_line.h" #include "base/metrics/histogram_macros.h" #include "base/timer/elapsed_timer.h" +#include "components/crx_file/id_util.h" #include "content/public/common/console_message_level.h" #include "content/public/common/content_switches.h" #include "extensions/common/constants.h" @@ -326,6 +327,14 @@ return root_binding; } +std::string GetContextOwner(v8::Local<v8::Context> context) { + ScriptContext* script_context = GetScriptContextFromV8ContextChecked(context); + const std::string& extension_id = script_context->GetExtensionID(); + bool id_is_valid = crx_file::id_util::IdIsValid(extension_id); + CHECK(id_is_valid || script_context->url().is_valid()); + return id_is_valid ? extension_id : script_context->url().spec(); +} + } // namespace NativeExtensionBindingsSystem::NativeExtensionBindingsSystem( @@ -338,6 +347,7 @@ base::Unretained(this)), base::Bind(&NativeExtensionBindingsSystem::OnEventListenerChanged, base::Unretained(this)), + base::Bind(&GetContextOwner), base::Bind(&APIActivityLogger::LogAPICall), base::Bind(&AddConsoleError), APILastError(base::Bind(&GetLastErrorParents), @@ -753,48 +763,70 @@ bool update_lazy_listeners, v8::Local<v8::Context> context) { ScriptContext* script_context = GetScriptContextFromV8ContextChecked(context); + // We only remove a lazy listener if the listener removal was triggered + // manually by the extension and the context is a lazy context. // Note: Check context_type() first to avoid accessing ExtensionFrameHelper on // a worker thread. bool is_lazy = update_lazy_listeners && (script_context->context_type() == Feature::SERVICE_WORKER_CONTEXT || ExtensionFrameHelper::IsContextForEventPage(script_context)); - // We only remove a lazy listener if the listener removal was triggered - // manually by the extension. - if (filter) { // Filtered event listeners. - DCHECK(filter); - if (change == binding::EventListenersChanged::HAS_LISTENERS) { - ipc_message_sender_->SendAddFilteredEventListenerIPC( - script_context, event_name, *filter, is_lazy); - } else { - DCHECK_EQ(binding::EventListenersChanged::NO_LISTENERS, change); - ipc_message_sender_->SendRemoveFilteredEventListenerIPC( - script_context, event_name, *filter, is_lazy); - } - } else { // Unfiltered event listeners. - if (change == binding::EventListenersChanged::HAS_LISTENERS) { - // TODO(devlin): The JS bindings code only adds one listener per extension - // per event per process, whereas this is one listener per context per - // event per process. Typically, this won't make a difference, but it - // could if there are multiple contexts for the same extension (e.g., - // multiple frames). In that case, it would result in extra IPCs being - // sent. I'm not sure it's a big enough deal to warrant refactoring. + switch (change) { + case binding::EventListenersChanged:: + kFirstUnfilteredListenerForContextOwnerAdded: + // Send a message to add a new listener since this is the first listener + // for the context owner (e.g., extension). ipc_message_sender_->SendAddUnfilteredEventListenerIPC(script_context, event_name); + // Check if we need to add a lazy listener as well. + FALLTHROUGH; + case binding::EventListenersChanged:: + kFirstUnfilteredListenerForContextAdded: { + // If the listener is the first for the event page, we need to + // specifically add a lazy listener. if (is_lazy) { ipc_message_sender_->SendAddUnfilteredLazyEventListenerIPC( script_context, event_name); } - } else { - DCHECK_EQ(binding::EventListenersChanged::NO_LISTENERS, change); + break; + } + case binding::EventListenersChanged:: + kLastUnfilteredListenerForContextOwnerRemoved: + // Send a message to remove a listener since this is the last listener + // for the context owner (e.g., extension). ipc_message_sender_->SendRemoveUnfilteredEventListenerIPC(script_context, event_name); + // Check if we need to remove a lazy listener as well. + FALLTHROUGH; + case binding::EventListenersChanged:: + kLastUnfilteredListenerForContextRemoved: { + // If the listener was the last for the event page, we need to remove + // the lazy listener entry. if (is_lazy) { ipc_message_sender_->SendRemoveUnfilteredLazyEventListenerIPC( script_context, event_name); } + break; } + // TODO(https://crbug.com/873017): This is broken, since we'll only add or + // remove a lazy listener if it was the first/last for the context owner. + // This means that if an extension registers a filtered listener on a page + // and *then* adds one in the event page, we won't properly add the listener + // as lazy. This is an issue for both native and JS bindings, so for now, + // let's settle for parity. + case binding::EventListenersChanged:: + kFirstListenerWithFilterForContextOwnerAdded: + DCHECK(filter); + ipc_message_sender_->SendAddFilteredEventListenerIPC( + script_context, event_name, *filter, is_lazy); + break; + case binding::EventListenersChanged:: + kLastListenerWithFilterForContextOwnerRemoved: + DCHECK(filter); + ipc_message_sender_->SendRemoveFilteredEventListenerIPC( + script_context, event_name, *filter, is_lazy); + break; } }
diff --git a/extensions/renderer/resources/guest_view/guest_view_container.js b/extensions/renderer/resources/guest_view/guest_view_container.js index 2d550413..c750388 100644 --- a/extensions/renderer/resources/guest_view/guest_view_container.js +++ b/extensions/renderer/resources/guest_view/guest_view_container.js
@@ -24,7 +24,7 @@ this.setupAttributes(); privates(this).internalElement = this.createInternalElement$(); - var shadowRoot = this.element.createShadowRoot(); + var shadowRoot = this.element.attachShadow({mode: 'open'}); shadowRoot.appendChild(privates(this).internalElement); GuestViewInternalNatives.RegisterView(this.viewInstanceId, this, viewType);
diff --git a/extensions/shell/BUILD.gn b/extensions/shell/BUILD.gn index 2a2293db..4acb120a 100644 --- a/extensions/shell/BUILD.gn +++ b/extensions/shell/BUILD.gn
@@ -320,7 +320,7 @@ data_deps = [ # "//gin", # TODO(dpranke): Either gin or v8 data is needed ... - "//third_party/mesa:osmesa", + "//third_party/mesa_headers", ] if (use_aura) {
diff --git a/gpu/BUILD.gn b/gpu/BUILD.gn index f4672d35..2b9f9e2 100644 --- a/gpu/BUILD.gn +++ b/gpu/BUILD.gn
@@ -482,8 +482,7 @@ "//testing/gmock", "//testing/gtest", "//third_party/angle:translator", - "//third_party/mesa:mesa_headers", - "//third_party/mesa:osmesa", + "//third_party/mesa_headers", "//ui/gfx", "//ui/gfx:test_support", "//ui/gfx/geometry", @@ -529,7 +528,7 @@ data_deps = [ # Needed for isolate script to execute. "//testing:run_perf_test", - "//third_party/mesa:osmesa", + "//third_party/mesa_headers", ] # This target should not require the Chrome executable to run.
diff --git a/gpu/command_buffer/build_cmd_buffer_lib.py b/gpu/command_buffer/build_cmd_buffer_lib.py index ba4cca5a..b033bac 100644 --- a/gpu/command_buffer/build_cmd_buffer_lib.py +++ b/gpu/command_buffer/build_cmd_buffer_lib.py
@@ -2053,7 +2053,7 @@ cmd.Init(kNewClientId); EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); EXPECT_EQ(GL_NO_ERROR, GetGLError()); - EXPECT_TRUE(Get%(resource_type)s(kNewClientId) != NULL); + EXPECT_TRUE(Get%(resource_type)s(kNewClientId) != nullptr); } """ self.WriteValidUnitTest(func, f, valid_test, { @@ -2083,7 +2083,7 @@ cmd.Init(%(args_with_new_id)s); EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); EXPECT_EQ(GL_NO_ERROR, GetGLError()); - EXPECT_TRUE(Get%(resource_type)s(kNewClientId) != NULL); + EXPECT_TRUE(Get%(resource_type)s(kNewClientId) != nullptr); } """ @@ -2324,7 +2324,7 @@ EXPECT_EQ(error::kNoError, ExecuteImmediateCmd(*cmd, sizeof(temp))); EXPECT_EQ(GL_NO_ERROR, GetGLError()); - EXPECT_TRUE(Get%(resource_name)s(kNewClientId) != NULL); + EXPECT_TRUE(Get%(resource_name)s(kNewClientId) != nullptr); } """ self.WriteValidUnitTest(func, f, valid_test, { @@ -2339,13 +2339,13 @@ cmd->Init(3, temp); EXPECT_EQ(error::kInvalidArguments, ExecuteImmediateCmd(*cmd, sizeof(temp))); - EXPECT_TRUE(Get%(resource_name)s(kNewClientId) == NULL); - EXPECT_TRUE(Get%(resource_name)s(kNewClientId + 1) == NULL); + EXPECT_TRUE(Get%(resource_name)s(kNewClientId) == nullptr); + EXPECT_TRUE(Get%(resource_name)s(kNewClientId + 1) == nullptr); GLuint null_id[2] = {kNewClientId, 0}; cmd->Init(2, null_id); EXPECT_EQ(error::kInvalidArguments, ExecuteImmediateCmd(*cmd, sizeof(temp))); - EXPECT_TRUE(Get%(resource_name)s(kNewClientId) == NULL); + EXPECT_TRUE(Get%(resource_name)s(kNewClientId) == nullptr); } """ self.WriteValidUnitTest(func, f, duplicate_id_test, { @@ -2698,7 +2698,7 @@ EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); EXPECT_EQ(GL_NO_ERROR, GetGLError()); EXPECT_TRUE( - Get%(upper_resource_name)s(client_%(resource_name)s_id_) == NULL); + Get%(upper_resource_name)s(client_%(resource_name)s_id_) == nullptr); } """ self.WriteValidUnitTest(func, f, valid_test, { @@ -2731,7 +2731,7 @@ ExecuteImmediateCmd(cmd, sizeof(client_%(resource_name)s_id_))); EXPECT_EQ(GL_NO_ERROR, GetGLError()); EXPECT_TRUE( - Get%(upper_resource_name)s(client_%(resource_name)s_id_) == NULL); + Get%(upper_resource_name)s(client_%(resource_name)s_id_) == nullptr); } """ self.WriteValidUnitTest(func, f, valid_test, { @@ -2934,7 +2934,7 @@ Result* result = GetSharedMemoryAs<Result*>( c.%(last_arg_name)s_shm_id, c.%(last_arg_name)s_shm_offset, Result::ComputeSize(num_values)); - %(last_arg_type)s %(last_arg_name)s = result ? result->GetData() : NULL; + %(last_arg_type)s %(last_arg_name)s = result ? result->GetData() : nullptr; """ f.write(code % { 'last_arg_type': last_arg.type, @@ -2982,8 +2982,8 @@ Result* result = GetSharedMemoryAndSizeAs<Result*>( c.%(last_arg_name)s_shm_id, c.%(last_arg_name)s_shm_offset, sizeof(Result), &buffer_size); - %(last_arg_type)s %(last_arg_name)s = result ? result->GetData() : NULL; - if (%(last_arg_name)s == NULL) { + %(last_arg_type)s %(last_arg_name)s = result ? result->GetData() : nullptr; + if (%(last_arg_name)s == nullptr) { return error::kOutOfBounds; } GLsizei bufsize = Result::ComputeMaxResults(buffer_size); @@ -3967,7 +3967,7 @@ """ f.write(code_block % { 'data': data_arg.name, - 'length': length_arg.name if not length_arg == None else 'NULL', + 'length': length_arg.name if not length_arg == None else 'nullptr', 'func_name': func.name, 'bucket_args': ', '.join(bucket_args), }) @@ -4031,7 +4031,7 @@ gl_args.append('kStrings') bucket_args.append('kBucketId') elif arg == self.__GetLengthArg(func): - gl_args.append('NULL') + gl_args.append('nullptr') elif arg.name == 'count': gl_args.append('2') else: @@ -4635,7 +4635,7 @@ GPU_CLIENT_LOG("------\\n" << %(dest_name)s << "\\n------"); } } - if (%(length_name)s != NULL) { + if (%(length_name)s != nullptr) { *%(length_name)s = max_size; } CheckGLError(); @@ -4675,7 +4675,7 @@ cmd.Init(%(args)s); EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); CommonDecoder::Bucket* bucket = decoder_->GetBucket(kBucketId); - ASSERT_TRUE(bucket != NULL); + ASSERT_TRUE(bucket != nullptr); EXPECT_EQ(strlen(kInfo) + 1, bucket->size()); EXPECT_EQ(0, memcmp(bucket->GetData(0, bucket->size()), kInfo, bucket->size())); @@ -5285,7 +5285,7 @@ """Overridden from Argument.""" if self.optional: return - f.write(" if (%s == NULL) {\n" % self.name) + f.write(" if (%s == nullptr) {\n" % self.name) f.write(" return error::kOutOfBounds;\n") f.write(" }\n") @@ -5368,7 +5368,7 @@ """Overridden from Argument.""" if self.optional: return - f.write(" if (%s == NULL) {\n" % self.name) + f.write(" if (%s == nullptr) {\n" % self.name) f.write(" return error::kOutOfBounds;\n") f.write(" }\n") @@ -5455,9 +5455,9 @@ return error::kInvalidArguments; } const char** %(original_name)s = - strs.size() > 0 ? const_cast<const char**>(&strs[0]) : NULL; + strs.size() > 0 ? const_cast<const char**>(&strs[0]) : nullptr; const GLint* length = - len.size() > 0 ? const_cast<const GLint*>(&len[0]) : NULL; + len.size() > 0 ? const_cast<const GLint*>(&len[0]) : nullptr; (void)length; """ f.write(code % { @@ -5732,7 +5732,7 @@ elif self.return_type == "GLboolean": return "GL_FALSE" elif "*" in self.return_type: - return "NULL" + return "nullptr" return "0" def GetGLFunctionName(self): @@ -7110,7 +7110,7 @@ f.write( ' { "gl%s", reinterpret_cast<GLES2FunctionPointer>(gl%s), },\n' % (func.name, func.name)) - f.write(""" { NULL, NULL, }, + f.write(""" { nullptr, nullptr, }, }; } // namespace gles2 @@ -7402,7 +7402,7 @@ """ % _prefix) else: f.write(""" return %sUtil::GetQualifiedEnumString( - NULL, 0, value); + nullptr, 0, value); } """ % _prefix)
diff --git a/gpu/command_buffer/client/buffer_tracker.cc b/gpu/command_buffer/client/buffer_tracker.cc index 548dbe8..32a8062 100644 --- a/gpu/command_buffer/client/buffer_tracker.cc +++ b/gpu/command_buffer/client/buffer_tracker.cc
@@ -28,7 +28,7 @@ DCHECK_LE(0, size); int32_t shm_id = -1; uint32_t shm_offset = 0; - void* address = NULL; + void* address = nullptr; if (size) address = mapped_memory_->Alloc(size, &shm_id, &shm_offset); @@ -41,7 +41,7 @@ BufferTracker::Buffer* BufferTracker::GetBuffer(GLuint client_id) { BufferMap::iterator it = buffers_.find(client_id); - return it != buffers_.end() ? it->second : NULL; + return it != buffers_.end() ? it->second : nullptr; } void BufferTracker::RemoveBuffer(GLuint client_id) { @@ -61,7 +61,7 @@ buffer->size_ = 0; buffer->shm_id_ = 0; buffer->shm_offset_ = 0; - buffer->address_ = NULL; + buffer->address_ = nullptr; buffer->last_usage_token_ = 0; buffer->last_async_upload_token_ = 0; } @@ -70,7 +70,7 @@ buffer->size_ = 0; buffer->shm_id_ = 0; buffer->shm_offset_ = 0; - buffer->address_ = NULL; + buffer->address_ = nullptr; buffer->last_usage_token_ = 0; buffer->last_async_upload_token_ = 0; } @@ -82,7 +82,7 @@ buffer->size_ = 0; buffer->shm_id_ = 0; buffer->shm_offset_ = 0; - buffer->address_ = NULL; + buffer->address_ = nullptr; buffer->last_usage_token_ = 0; buffer->last_async_upload_token_ = 0; }
diff --git a/gpu/command_buffer/client/buffer_tracker_unittest.cc b/gpu/command_buffer/client/buffer_tracker_unittest.cc index c01197e..2125fc6 100644 --- a/gpu/command_buffer/client/buffer_tracker_unittest.cc +++ b/gpu/command_buffer/client/buffer_tracker_unittest.cc
@@ -34,7 +34,7 @@ int32_t* id) override { if (context_lost_) { *id = -1; - return NULL; + return nullptr; } return MockClientCommandBuffer::CreateTransferBuffer(size, id); } @@ -82,22 +82,22 @@ // Check we can create a Buffer. BufferTracker::Buffer* buffer = buffer_tracker_->CreateBuffer(kId1, size); - ASSERT_TRUE(buffer != NULL); + ASSERT_TRUE(buffer != nullptr); // Check we can get the same Buffer. EXPECT_EQ(buffer, buffer_tracker_->GetBuffer(kId1)); // Check mapped memory address. - EXPECT_TRUE(buffer->address() != NULL); + EXPECT_TRUE(buffer->address() != nullptr); // Check shared memory was allocated. EXPECT_EQ(1lu, mapped_memory_->num_chunks()); // Check we get nothing for a non-existent buffer. - EXPECT_TRUE(buffer_tracker_->GetBuffer(kId2) == NULL); + EXPECT_TRUE(buffer_tracker_->GetBuffer(kId2) == nullptr); // Check we can delete the buffer. buffer_tracker_->RemoveBuffer(kId1); // Check shared memory was freed. mapped_memory_->FreeUnused(); EXPECT_EQ(0lu, mapped_memory_->num_chunks()); // Check we get nothing for a non-existent buffer. - EXPECT_TRUE(buffer_tracker_->GetBuffer(kId1) == NULL); + EXPECT_TRUE(buffer_tracker_->GetBuffer(kId1) == nullptr); } TEST_F(BufferTrackerTest, ZeroSize) { @@ -105,9 +105,9 @@ // Check we can create a Buffer with zero size. BufferTracker::Buffer* buffer = buffer_tracker_->CreateBuffer(kId, 0); - ASSERT_TRUE(buffer != NULL); + ASSERT_TRUE(buffer != nullptr); // Check mapped memory address. - EXPECT_TRUE(buffer->address() == NULL); + EXPECT_TRUE(buffer->address() == nullptr); // Check no shared memory was allocated. EXPECT_EQ(0lu, mapped_memory_->num_chunks()); // Check we can delete the buffer. @@ -121,11 +121,11 @@ command_buffer_->set_context_lost(true); // Check we can create a Buffer when after losing context. BufferTracker::Buffer* buffer = buffer_tracker_->CreateBuffer(kId, size); - ASSERT_TRUE(buffer != NULL); + ASSERT_TRUE(buffer != nullptr); // Check mapped memory address. EXPECT_EQ(64u, buffer->size()); // Check mapped memory address. - EXPECT_TRUE(buffer->address() == NULL); + EXPECT_TRUE(buffer->address() == nullptr); // Check no shared memory was allocated. EXPECT_EQ(0lu, mapped_memory_->num_chunks()); // Check we can delete the buffer. @@ -137,7 +137,7 @@ const GLsizeiptr size = 64; BufferTracker::Buffer* buffer = buffer_tracker_->CreateBuffer(kId, size); - ASSERT_TRUE(buffer != NULL); + ASSERT_TRUE(buffer != nullptr); EXPECT_EQ(mapped_memory_->bytes_in_use(), static_cast<size_t>(size)); void* mem = buffer->address();
diff --git a/gpu/command_buffer/client/client_test_helper.cc b/gpu/command_buffer/client/client_test_helper.cc index c9ef1e92..afa81d1 100644 --- a/gpu/command_buffer/client/client_test_helper.cc +++ b/gpu/command_buffer/client/client_test_helper.cc
@@ -70,7 +70,7 @@ DCHECK_GE(id, kTransferBufferBaseId); DCHECK_LT(id, kTransferBufferBaseId + kMaxTransferBuffers); id -= kTransferBufferBaseId; - transfer_buffer_buffers_[id] = NULL; + transfer_buffer_buffers_[id] = nullptr; } scoped_refptr<Buffer> FakeCommandBufferServiceBase::GetTransferBuffer(
diff --git a/gpu/command_buffer/client/cmd_buffer_helper.h b/gpu/command_buffer/client/cmd_buffer_helper.h index fe17cce..7820820 100644 --- a/gpu/command_buffer/client/cmd_buffer_helper.h +++ b/gpu/command_buffer/client/cmd_buffer_helper.h
@@ -134,7 +134,7 @@ if (entries > immediate_entry_count_) { WaitForAvailableEntries(entries); if (entries > immediate_entry_count_) - return NULL; + return nullptr; } DCHECK_LE(entries, immediate_entry_count_);
diff --git a/gpu/command_buffer/client/cmd_buffer_helper_test.cc b/gpu/command_buffer/client/cmd_buffer_helper_test.cc index aa20eaa..5687d247 100644 --- a/gpu/command_buffer/client/cmd_buffer_helper_test.cc +++ b/gpu/command_buffer/client/cmd_buffer_helper_test.cc
@@ -403,7 +403,7 @@ EXPECT_EQ(0, GetGetOffset()); // Add 3 commands through the helper - AddCommandWithExpect(error::kNoError, kUnusedCommandId, 0, NULL); + AddCommandWithExpect(error::kNoError, kUnusedCommandId, 0, nullptr); CommandBufferEntry args1[2]; args1[0].value_uint32 = 3; @@ -500,8 +500,8 @@ args[1].value_float = 4.f; // Add 2 commands through the helper - 8 entries - AddCommandWithExpect(error::kNoError, kUnusedCommandId + 1, 0, NULL); - AddCommandWithExpect(error::kNoError, kUnusedCommandId + 2, 0, NULL); + AddCommandWithExpect(error::kNoError, kUnusedCommandId + 1, 0, nullptr); + AddCommandWithExpect(error::kNoError, kUnusedCommandId + 2, 0, nullptr); AddCommandWithExpect(error::kNoError, kUnusedCommandId + 3, 2, args); AddCommandWithExpect(error::kNoError, kUnusedCommandId + 4, 2, args); @@ -611,7 +611,7 @@ EXPECT_FALSE(helper_->HaveRingBuffer()); // Test that WaitForAvailableEntries allocates a new one - AddCommandWithExpect(error::kNoError, kUnusedCommandId, 0, NULL); + AddCommandWithExpect(error::kNoError, kUnusedCommandId, 0, nullptr); EXPECT_TRUE(helper_->HaveRingBuffer()); helper_->Finish(); helper_->FreeRingBuffer(); @@ -621,7 +621,7 @@ Mock::VerifyAndClearExpectations(api_mock_.get()); // Test that FreeRingBuffer doesn't force a finish - AddCommandWithExpect(error::kNoError, kUnusedCommandId, 0, NULL); + AddCommandWithExpect(error::kNoError, kUnusedCommandId, 0, nullptr); EXPECT_TRUE(helper_->HaveRingBuffer()); int32_t old_get_offset = command_buffer_->GetLastState().get_offset; EXPECT_NE(helper_->GetPutOffsetForTest(), old_get_offset);
diff --git a/gpu/command_buffer/client/fenced_allocator.h b/gpu/command_buffer/client/fenced_allocator.h index 9c42d34..f820ca2 100644 --- a/gpu/command_buffer/client/fenced_allocator.h +++ b/gpu/command_buffer/client/fenced_allocator.h
@@ -216,14 +216,15 @@ } // Gets a pointer to a memory block given the base memory and the offset. - // It translates FencedAllocator::kInvalidOffset to NULL. + // It translates FencedAllocator::kInvalidOffset to nullptr. void *GetPointer(FencedAllocator::Offset offset) { - return (offset == FencedAllocator::kInvalidOffset) ? - NULL : static_cast<char *>(base_) + offset; + return (offset == FencedAllocator::kInvalidOffset) + ? nullptr + : static_cast<char*>(base_) + offset; } // Gets the offset to a memory block given the base memory and the address. - // It translates NULL to FencedAllocator::kInvalidOffset. + // It translates nullptr to FencedAllocator::kInvalidOffset. FencedAllocator::Offset GetOffset(void *pointer) { return pointer ? static_cast<FencedAllocator::Offset>(
diff --git a/gpu/command_buffer/client/gles2_c_lib_autogen.h b/gpu/command_buffer/client/gles2_c_lib_autogen.h index b7ae4e6..b78f4ec 100644 --- a/gpu/command_buffer/client/gles2_c_lib_autogen.h +++ b/gpu/command_buffer/client/gles2_c_lib_autogen.h
@@ -3212,7 +3212,7 @@ glFramebufferTextureMultiviewLayeredANGLE), }, { - NULL, NULL, + nullptr, nullptr, }, };
diff --git a/gpu/command_buffer/client/gles2_implementation.cc b/gpu/command_buffer/client/gles2_implementation.cc index e9e5634..3fad8ae 100644 --- a/gpu/command_buffer/client/gles2_implementation.cc +++ b/gpu/command_buffer/client/gles2_implementation.cc
@@ -1608,7 +1608,7 @@ return false; } result->SetNumResults(0); - if (!PackStringsToBucket(count, names, NULL, "glGetUniformIndices")) { + if (!PackStringsToBucket(count, names, nullptr, "glGetUniformIndices")) { return false; } helper_->GetUniformIndices(program, kResultBucketId, @@ -3621,7 +3621,7 @@ if (name == GL_EXTENSIONS && cached_extension_string_) { return reinterpret_cast<const GLubyte*>(cached_extension_string_); } - const char* result = NULL; + const char* result = nullptr; // Clears the bucket so if the command fails nothing will be in it. helper_->SetBucketSize(kResultBucketId, 0); helper_->GetString(name, kResultBucketId); @@ -4980,11 +4980,11 @@ if (access != GL_WRITE_ONLY) { SetGLErrorInvalidEnum( "glMapBufferSubDataCHROMIUM", access, "access"); - return NULL; + return nullptr; } if (!ValidateSize("glMapBufferSubDataCHROMIUM", size) || !ValidateOffset("glMapBufferSubDataCHROMIUM", offset)) { - return NULL; + return nullptr; } int32_t shm_id; @@ -4992,7 +4992,7 @@ void* mem = mapped_memory_->Alloc(size, &shm_id, &shm_offset); if (!mem) { SetGLError(GL_OUT_OF_MEMORY, "glMapBufferSubDataCHROMIUM", "out of memory"); - return NULL; + return nullptr; } std::pair<MappedBufferMap::iterator, bool> result = @@ -5219,28 +5219,29 @@ if (access != GL_WRITE_ONLY) { SetGLErrorInvalidEnum( "glMapTexSubImage2DCHROMIUM", access, "access"); - return NULL; + return nullptr; } // NOTE: target is NOT checked because the service will check it // and we don't know what targets are valid. if (level < 0 || xoffset < 0 || yoffset < 0 || width < 0 || height < 0) { SetGLError( GL_INVALID_VALUE, "glMapTexSubImage2DCHROMIUM", "bad dimensions"); - return NULL; + return nullptr; } uint32_t size; - if (!GLES2Util::ComputeImageDataSizes( - width, height, 1, format, type, unpack_alignment_, &size, NULL, NULL)) { + if (!GLES2Util::ComputeImageDataSizes(width, height, 1, format, type, + unpack_alignment_, &size, nullptr, + nullptr)) { SetGLError( GL_INVALID_VALUE, "glMapTexSubImage2DCHROMIUM", "image size too large"); - return NULL; + return nullptr; } int32_t shm_id; unsigned int shm_offset; void* mem = mapped_memory_->Alloc(size, &shm_id, &shm_offset); if (!mem) { SetGLError(GL_OUT_OF_MEMORY, "glMapTexSubImage2DCHROMIUM", "out of memory"); - return NULL; + return nullptr; } std::pair<MappedTextureMap::iterator, bool> result = @@ -5291,7 +5292,7 @@ << "] glGetRequestableExtensionsCHROMIUM()"); TRACE_EVENT0("gpu", "GLES2Implementation::GetRequestableExtensionsCHROMIUM()"); - const char* result = NULL; + const char* result = nullptr; // Clear the bucket so if the command fails nothing will be in it. helper_->SetBucketSize(kResultBucketId, 0); helper_->GetRequestableExtensionsCHROMIUM(kResultBucketId); @@ -5358,7 +5359,7 @@ GL_INVALID_VALUE, "glProgramInfoCHROMIUM", "bufsize less than 0."); return; } - if (size == NULL) { + if (size == nullptr) { SetGLError(GL_INVALID_VALUE, "glProgramInfoCHROMIUM", "size is null."); return; } @@ -5400,7 +5401,7 @@ GL_INVALID_VALUE, "glGetUniformBlocksCHROMIUM", "bufsize less than 0."); return; } - if (size == NULL) { + if (size == nullptr) { SetGLError(GL_INVALID_VALUE, "glGetUniformBlocksCHROMIUM", "size is null."); return; } @@ -5442,7 +5443,7 @@ GL_INVALID_VALUE, "glGetUniformsES3CHROMIUM", "bufsize less than 0."); return; } - if (size == NULL) { + if (size == nullptr) { SetGLError(GL_INVALID_VALUE, "glGetUniformsES3CHROMIUM", "size is null."); return; } @@ -5484,7 +5485,7 @@ "bufsize less than 0."); return; } - if (size == NULL) { + if (size == nullptr) { SetGLError(GL_INVALID_VALUE, "glGetTransformFeedbackVaryingsCHROMIUM", "size is null."); return; @@ -5549,7 +5550,7 @@ // TODO(gman): To be spec compliant IDs from other contexts sharing // resources need to return true here even though you can't share // queries across contexts? - return query_tracker_->GetQuery(id) != NULL; + return query_tracker_->GetQuery(id) != nullptr; } void GLES2Implementation::BeginQueryEXT(GLenum target, GLuint id) { @@ -5995,27 +5996,27 @@ case GL_PIXEL_PACK_TRANSFER_BUFFER_CHROMIUM: if (access != GL_READ_ONLY) { SetGLError(GL_INVALID_ENUM, "glMapBufferCHROMIUM", "bad access mode"); - return NULL; + return nullptr; } break; default: SetGLError( GL_INVALID_ENUM, "glMapBufferCHROMIUM", "invalid target"); - return NULL; + return nullptr; } GLuint buffer_id; GetBoundPixelTransferBuffer(target, "glMapBufferCHROMIUM", &buffer_id); if (!buffer_id) { - return NULL; + return nullptr; } BufferTracker::Buffer* buffer = buffer_tracker_->GetBuffer(buffer_id); if (!buffer) { SetGLError(GL_INVALID_OPERATION, "glMapBufferCHROMIUM", "invalid buffer"); - return NULL; + return nullptr; } if (buffer->mapped()) { SetGLError(GL_INVALID_OPERATION, "glMapBufferCHROMIUM", "already mapped"); - return NULL; + return nullptr; } // Here we wait for previous transfer operations to be finished. if (buffer->last_usage_token()) {
diff --git a/gpu/command_buffer/client/gles2_implementation_impl_autogen.h b/gpu/command_buffer/client/gles2_implementation_impl_autogen.h index 8060fce7..8343e5c 100644 --- a/gpu/command_buffer/client/gles2_implementation_impl_autogen.h +++ b/gpu/command_buffer/client/gles2_implementation_impl_autogen.h
@@ -1150,7 +1150,7 @@ GPU_CLIENT_LOG("------\n" << infolog << "\n------"); } } - if (length != NULL) { + if (length != nullptr) { *length = max_size; } CheckGLError(); @@ -1294,7 +1294,7 @@ GPU_CLIENT_LOG("------\n" << infolog << "\n------"); } } - if (length != NULL) { + if (length != nullptr) { *length = max_size; } CheckGLError(); @@ -1321,7 +1321,7 @@ GPU_CLIENT_LOG("------\n" << source << "\n------"); } } - if (length != NULL) { + if (length != nullptr) { *length = max_size; } CheckGLError(); @@ -2008,7 +2008,7 @@ return; } - if (!PackStringsToBucket(count, varyings, NULL, + if (!PackStringsToBucket(count, varyings, nullptr, "glTransformFeedbackVaryings")) { return; } @@ -3131,7 +3131,7 @@ GPU_CLIENT_LOG("------\n" << source << "\n------"); } } - if (length != NULL) { + if (length != nullptr) { *length = max_size; } CheckGLError();
diff --git a/gpu/command_buffer/client/gles2_implementation_unittest.cc b/gpu/command_buffer/client/gles2_implementation_unittest.cc index 0ac56609..a658754 100644 --- a/gpu/command_buffer/client/gles2_implementation_unittest.cc +++ b/gpu/command_buffer/client/gles2_implementation_unittest.cc
@@ -177,7 +177,7 @@ class TestContext { public: - TestContext() : commands_(NULL), token_(0) {} + TestContext() : commands_(nullptr), token_(0) {} bool Initialize(ShareGroup* share_group, bool bind_generates_resource_client, @@ -304,7 +304,7 @@ Capabilities capabilities_; }; - GLES2ImplementationTest() : commands_(NULL) {} + GLES2ImplementationTest() : commands_(nullptr) {} void SetUp() override; void TearDown() override; @@ -1361,8 +1361,8 @@ GL_FLOAT, GL_FALSE, kStride2, reinterpret_cast<const void*>(kOffset2)); // now get them both. - void* ptr1 = NULL; - void* ptr2 = NULL; + void* ptr1 = nullptr; + void* ptr2 = nullptr; gl_->GetVertexAttribPointerv( kAttribIndex1, GL_VERTEX_ATTRIB_ARRAY_POINTER, &ptr1); @@ -1586,7 +1586,7 @@ void* mem = gl_->MapBufferSubDataCHROMIUM( kTarget, kOffset, kSize, GL_WRITE_ONLY); - ASSERT_TRUE(mem != NULL); + ASSERT_TRUE(mem != nullptr); gl_->UnmapBufferSubDataCHROMIUM(mem); EXPECT_CALL(*command_buffer(), DestroyTransferBuffer(_)) .Times(1) @@ -1612,7 +1612,7 @@ void* mem = gl_->MapBufferSubDataCHROMIUM( kTarget, kOffset, kSize, GL_WRITE_ONLY); - ASSERT_TRUE(mem != NULL); + ASSERT_TRUE(mem != nullptr); gl_->UnmapBufferSubDataCHROMIUM(mem); EXPECT_EQ(0, memcmp(&expected, commands_, sizeof(expected))); } @@ -1641,13 +1641,13 @@ void* mem; mem = gl_->MapBufferSubDataCHROMIUM(kTarget, -1, kSize, GL_WRITE_ONLY); - ASSERT_TRUE(mem == NULL); + ASSERT_TRUE(mem == nullptr); EXPECT_EQ(static_cast<GLenum>(GL_INVALID_VALUE), gl_->GetError()); mem = gl_->MapBufferSubDataCHROMIUM(kTarget, kOffset, -1, GL_WRITE_ONLY); - ASSERT_TRUE(mem == NULL); + ASSERT_TRUE(mem == nullptr); EXPECT_EQ(static_cast<GLenum>(GL_INVALID_VALUE), gl_->GetError()); mem = gl_->MapBufferSubDataCHROMIUM(kTarget, kOffset, kSize, GL_READ_ONLY); - ASSERT_TRUE(mem == NULL); + ASSERT_TRUE(mem == nullptr); EXPECT_EQ(static_cast<GLenum>(GL_INVALID_ENUM), gl_->GetError()); const char* kPtr = "something"; gl_->UnmapBufferSubDataCHROMIUM(kPtr); @@ -1685,7 +1685,7 @@ kFormat, kType, GL_WRITE_ONLY); - ASSERT_TRUE(mem != NULL); + ASSERT_TRUE(mem != nullptr); gl_->UnmapTexSubImage2DCHROMIUM(mem); EXPECT_EQ(0, memcmp(&expected, commands_, sizeof(expected))); } @@ -1736,7 +1736,7 @@ kFormat, kType, GL_WRITE_ONLY); - EXPECT_TRUE(mem == NULL); + EXPECT_TRUE(mem == nullptr); EXPECT_EQ(static_cast<GLenum>(GL_INVALID_VALUE), gl_->GetError()); mem = gl_->MapTexSubImage2DCHROMIUM( GL_TEXTURE_2D, @@ -1748,7 +1748,7 @@ kFormat, kType, GL_WRITE_ONLY); - EXPECT_TRUE(mem == NULL); + EXPECT_TRUE(mem == nullptr); EXPECT_EQ(static_cast<GLenum>(GL_INVALID_VALUE), gl_->GetError()); mem = gl_->MapTexSubImage2DCHROMIUM( GL_TEXTURE_2D, @@ -1760,7 +1760,7 @@ kFormat, kType, GL_WRITE_ONLY); - EXPECT_TRUE(mem == NULL); + EXPECT_TRUE(mem == nullptr); EXPECT_EQ(static_cast<GLenum>(GL_INVALID_VALUE), gl_->GetError()); mem = gl_->MapTexSubImage2DCHROMIUM( GL_TEXTURE_2D, @@ -1772,7 +1772,7 @@ kFormat, kType, GL_WRITE_ONLY); - EXPECT_TRUE(mem == NULL); + EXPECT_TRUE(mem == nullptr); EXPECT_EQ(static_cast<GLenum>(GL_INVALID_VALUE), gl_->GetError()); mem = gl_->MapTexSubImage2DCHROMIUM( GL_TEXTURE_2D, @@ -1784,7 +1784,7 @@ kFormat, kType, GL_WRITE_ONLY); - EXPECT_TRUE(mem == NULL); + EXPECT_TRUE(mem == nullptr); EXPECT_EQ(static_cast<GLenum>(GL_INVALID_VALUE), gl_->GetError()); mem = gl_->MapTexSubImage2DCHROMIUM( GL_TEXTURE_2D, @@ -1796,7 +1796,7 @@ kFormat, kType, GL_READ_ONLY); - EXPECT_TRUE(mem == NULL); + EXPECT_TRUE(mem == nullptr); EXPECT_EQ(static_cast<GLenum>(GL_INVALID_ENUM), gl_->GetError()); const char* kPtr = "something"; gl_->UnmapTexSubImage2DCHROMIUM(kPtr); @@ -1900,7 +1900,7 @@ EXPECT_EQ(static_cast<GLenum>(GL_INVALID_VALUE), gl_->GetError()); ClearCommands(); // try no size ptr. - gl_->GetProgramInfoCHROMIUM(kProgramId, sizeof(buf), NULL, &buf); + gl_->GetProgramInfoCHROMIUM(kProgramId, sizeof(buf), nullptr, &buf); EXPECT_TRUE(NoCommandsWritten()); EXPECT_EQ(static_cast<GLenum>(GL_INVALID_VALUE), gl_->GetError()); } @@ -2002,7 +2002,7 @@ EXPECT_EQ(static_cast<GLenum>(GL_INVALID_VALUE), gl_->GetError()); ClearCommands(); // try no size ptr. - gl_->GetUniformBlocksCHROMIUM(kProgramId, sizeof(buf), NULL, &buf); + gl_->GetUniformBlocksCHROMIUM(kProgramId, sizeof(buf), nullptr, &buf); EXPECT_TRUE(NoCommandsWritten()); EXPECT_EQ(static_cast<GLenum>(GL_INVALID_VALUE), gl_->GetError()); } @@ -2278,12 +2278,12 @@ &size, &unpadded_row_size, &padded_row_size)); const GLsizei kHeight = (MaxTransferBufferSize() / padded_row_size) * 2; ASSERT_TRUE(GLES2Util::ComputeImageDataSizes( - kWidth, kHeight, 1, kFormat, kType, kPixelStoreUnpackAlignment, - &size, NULL, NULL)); + kWidth, kHeight, 1, kFormat, kType, kPixelStoreUnpackAlignment, &size, + nullptr, nullptr)); uint32_t half_size = 0; ASSERT_TRUE(GLES2Util::ComputeImageDataSizes( kWidth, kHeight / 2, 1, kFormat, kType, kPixelStoreUnpackAlignment, - &half_size, NULL, NULL)); + &half_size, nullptr, nullptr)); std::unique_ptr<uint8_t[]> pixels(new uint8_t[size]); for (uint32_t ii = 0; ii < size; ++ii) { @@ -2720,7 +2720,7 @@ const GLsizei kHeight = MaxTransferBufferSize() / padded_row_size / kDepth; ASSERT_TRUE(GLES2Util::ComputeImageDataSizes( kWidth, kHeight, kDepth, kFormat, kType, kPixelStoreUnpackAlignment, - &size, NULL, NULL)); + &size, nullptr, nullptr)); std::unique_ptr<uint8_t[]> pixels(new uint8_t[size]); for (uint32_t ii = 0; ii < size; ++ii) { @@ -2773,7 +2773,7 @@ const GLsizei kHeight = kMaxHeight * 2; ASSERT_TRUE(GLES2Util::ComputeImageDataSizes( kWidth, kHeight, kDepth, kFormat, kType, kPixelStoreUnpackAlignment, - &size, NULL, NULL)); + &size, nullptr, nullptr)); std::unique_ptr<uint8_t[]> pixels(new uint8_t[size]); for (uint32_t ii = 0; ii < size; ++ii) { @@ -2824,8 +2824,8 @@ // Makes sure the data is more than one command can hold. const GLsizei kHeight = MaxTransferBufferSize() / padded_row_size + 3; ASSERT_TRUE(GLES2Util::ComputeImageDataSizes( - kWidth, kHeight, 1, kFormat, kType, kPixelStoreUnpackAlignment, - &size, NULL, NULL)); + kWidth, kHeight, 1, kFormat, kType, kPixelStoreUnpackAlignment, &size, + nullptr, nullptr)); uint32_t first_size = padded_row_size * (kHeight - 3); uint32_t second_size = padded_row_size * 3 - (padded_row_size - unpadded_row_size); @@ -2885,7 +2885,7 @@ const GLsizei kHeight = MaxTransferBufferSize() / padded_row_size + 2; ASSERT_TRUE(GLES2Util::ComputeImageDataSizes( kWidth, kHeight, kDepth, kFormat, kType, kPixelStoreUnpackAlignment, - &size, NULL, NULL)); + &size, nullptr, nullptr)); uint32_t first_size = (kHeight - 2) * padded_row_size; uint32_t second_size = 2 * padded_row_size; uint32_t third_size = first_size; @@ -3174,7 +3174,7 @@ const void* commands = GetPut(); gl_->BeginQueryEXT(GL_ANY_SAMPLES_PASSED_EXT, id1); QueryTracker::Query* query = GetQuery(id1); - ASSERT_TRUE(query != NULL); + ASSERT_TRUE(query != nullptr); expected_begin_cmds.begin_query.Init( GL_ANY_SAMPLES_PASSED_EXT, id1, query->shm_id(), query->shm_offset()); EXPECT_EQ(0, memcmp( @@ -3372,7 +3372,7 @@ gl_->QueryCounterEXT(id1, GL_TIMESTAMP_EXT); EXPECT_EQ(GL_NO_ERROR, CheckError()); QueryTracker::Query* query = GetQuery(id1); - ASSERT_TRUE(query != NULL); + ASSERT_TRUE(query != nullptr); expected_query_counter_cmds.query_counter.Init( id1, GL_TIMESTAMP_EXT, query->shm_id(), query->shm_offset(), query->submit_count()); @@ -3385,7 +3385,7 @@ gl_->QueryCounterEXT(id2, GL_TIMESTAMP_EXT); EXPECT_EQ(GL_NO_ERROR, CheckError()); QueryTracker::Query* query2 = GetQuery(id2); - ASSERT_TRUE(query2 != NULL); + ASSERT_TRUE(query2 != nullptr); expected_query_counter_cmds.query_counter.Init( id2, GL_TIMESTAMP_EXT, query2->shm_id(), query2->shm_offset(), query2->submit_count()); @@ -3428,7 +3428,7 @@ gl_->BeginQueryEXT(GL_GET_ERROR_QUERY_CHROMIUM, id); EXPECT_TRUE(NoCommandsWritten()); QueryTracker::Query* query = GetQuery(id); - ASSERT_TRUE(query != NULL); + ASSERT_TRUE(query != nullptr); // Test EndQueryEXT sends both begin and end command struct EndCmds { @@ -3486,7 +3486,7 @@ gl_->BindVertexArrayOES(id); // Test that VertexAttribPointer cannot be called with a bound buffer of 0 - // unless the offset is NULL + // unless the offset is nullptr gl_->BindBuffer(GL_ARRAY_BUFFER, 0); gl_->VertexAttribPointer( @@ -3494,8 +3494,8 @@ reinterpret_cast<const void*>(4)); EXPECT_EQ(GL_INVALID_OPERATION, CheckError()); - gl_->VertexAttribPointer( - kAttribIndex1, kNumComponents1, GL_FLOAT, GL_FALSE, kClientStride, NULL); + gl_->VertexAttribPointer(kAttribIndex1, kNumComponents1, GL_FLOAT, GL_FALSE, + kClientStride, nullptr); EXPECT_EQ(GL_NO_ERROR, CheckError()); } #endif @@ -3609,25 +3609,25 @@ // Call MapBufferSubDataCHROMIUM() should succeed with legal paramaters. void* mem = gl_->MapBufferSubDataCHROMIUM(GL_ARRAY_BUFFER, 0, 1, GL_WRITE_ONLY); - EXPECT_TRUE(NULL != mem); + EXPECT_TRUE(nullptr != mem); EXPECT_EQ(GL_NO_ERROR, CheckError()); gl_->UnmapBufferSubDataCHROMIUM(mem); // MapBufferSubDataCHROMIUM: offset - EXPECT_TRUE(NULL == gl_->MapBufferSubDataCHROMIUM( - GL_ARRAY_BUFFER, offset, 1, GL_WRITE_ONLY)); + EXPECT_TRUE(nullptr == gl_->MapBufferSubDataCHROMIUM(GL_ARRAY_BUFFER, offset, + 1, GL_WRITE_ONLY)); EXPECT_EQ(GL_INVALID_OPERATION, CheckError()); EXPECT_STREQ(kOffsetOverflowMessage, GetLastError().c_str()); // MapBufferSubDataCHROMIUM: size EXPECT_EQ(GL_NO_ERROR, CheckError()); - EXPECT_TRUE(NULL == gl_->MapBufferSubDataCHROMIUM( - GL_ARRAY_BUFFER, 0, size, GL_WRITE_ONLY)); + EXPECT_TRUE(nullptr == gl_->MapBufferSubDataCHROMIUM(GL_ARRAY_BUFFER, 0, size, + GL_WRITE_ONLY)); EXPECT_EQ(GL_INVALID_OPERATION, CheckError()); EXPECT_STREQ(kSizeOverflowMessage, GetLastError().c_str()); // Call DrawElements() should succeed with legal paramaters. - gl_->DrawElements(GL_POINTS, 1, GL_UNSIGNED_BYTE, NULL); + gl_->DrawElements(GL_POINTS, 1, GL_UNSIGNED_BYTE, nullptr); EXPECT_EQ(GL_NO_ERROR, CheckError()); // DrawElements: offset @@ -3637,7 +3637,7 @@ EXPECT_STREQ(kOffsetOverflowMessage, GetLastError().c_str()); // Call DrawElementsInstancedANGLE() should succeed with legal paramaters. - gl_->DrawElementsInstancedANGLE(GL_POINTS, 1, GL_UNSIGNED_BYTE, NULL, 1); + gl_->DrawElementsInstancedANGLE(GL_POINTS, 1, GL_UNSIGNED_BYTE, nullptr, 1); EXPECT_EQ(GL_NO_ERROR, CheckError()); // DrawElementsInstancedANGLE: offset @@ -3649,8 +3649,8 @@ // Call VertexAttribPointer() should succeed with legal paramaters. const GLuint kAttribIndex = 1; const GLsizei kStride = 4; - gl_->VertexAttribPointer( - kAttribIndex, 1, GL_FLOAT, GL_FALSE, kStride, NULL); + gl_->VertexAttribPointer(kAttribIndex, 1, GL_FLOAT, GL_FALSE, kStride, + nullptr); EXPECT_EQ(GL_NO_ERROR, CheckError()); // VertexAttribPointer: offset
diff --git a/gpu/command_buffer/client/gles2_implementation_unittest_autogen.h b/gpu/command_buffer/client/gles2_implementation_unittest_autogen.h index a332f56..3ba7054 100644 --- a/gpu/command_buffer/client/gles2_implementation_unittest_autogen.h +++ b/gpu/command_buffer/client/gles2_implementation_unittest_autogen.h
@@ -1564,7 +1564,7 @@ expected.cmd_bucket.Init(1, kBucketId); expected.clear_bucket_size.Init(kBucketId, 0); const char* kStrings[] = {kString1, kString2}; - gl_->ShaderSource(1, 2, kStrings, NULL); + gl_->ShaderSource(1, 2, kStrings, nullptr); EXPECT_EQ(0, memcmp(&expected, commands_, sizeof(expected))); }
diff --git a/gpu/command_buffer/client/gles2_lib.cc b/gpu/command_buffer/client/gles2_lib.cc index 6c8b0ead..4f96f021 100644 --- a/gpu/command_buffer/client/gles2_lib.cc +++ b/gpu/command_buffer/client/gles2_lib.cc
@@ -45,7 +45,7 @@ return named_function->func; } } - return NULL; + return nullptr; } } // namespace gles2
diff --git a/gpu/command_buffer/client/mapped_memory.cc b/gpu/command_buffer/client/mapped_memory.cc index 47e4c5a..bbb0f8a 100644 --- a/gpu/command_buffer/client/mapped_memory.cc +++ b/gpu/command_buffer/client/mapped_memory.cc
@@ -112,7 +112,7 @@ scoped_refptr<gpu::Buffer> shm = cmd_buf->CreateTransferBuffer(chunk_size, &id); if (id < 0) - return NULL; + return nullptr; DCHECK(shm.get()); MemoryChunk* mc = new MemoryChunk(id, shm, helper_); allocated_memory_ += mc->GetSize();
diff --git a/gpu/command_buffer/client/mapped_memory.h b/gpu/command_buffer/client/mapped_memory.h index c23e602..8a6fb75 100644 --- a/gpu/command_buffer/client/mapped_memory.h +++ b/gpu/command_buffer/client/mapped_memory.h
@@ -60,14 +60,14 @@ // size: the size of the memory block to allocate. // // Returns: - // the pointer to the allocated memory block, or NULL if out of + // the pointer to the allocated memory block, or nullptr if out of // memory. void* Alloc(unsigned int size) { return allocator_.Alloc(size); } // Gets the offset to a memory block given the base memory and the address. - // It translates NULL to FencedAllocator::kInvalidOffset. + // It translates nullptr to FencedAllocator::kInvalidOffset. unsigned int GetOffset(void* pointer) { return allocator_.GetOffset(pointer); } @@ -162,7 +162,7 @@ // shm_id: pointer to variable to receive the shared memory id. // shm_offset: pointer to variable to receive the shared memory offset. // Returns: - // pointer to allocated block of memory. NULL if failure. + // pointer to allocated block of memory. nullptr if failure. void* Alloc( unsigned int size, int32_t* shm_id, unsigned int* shm_offset); @@ -230,11 +230,10 @@ // A class that will manage the lifetime of a mapped memory allocation class GPU_EXPORT ScopedMappedMemoryPtr { public: - ScopedMappedMemoryPtr( - uint32_t size, - CommandBufferHelper* helper, - MappedMemoryManager* mapped_memory_manager) - : buffer_(NULL), + ScopedMappedMemoryPtr(uint32_t size, + CommandBufferHelper* helper, + MappedMemoryManager* mapped_memory_manager) + : buffer_(nullptr), size_(0), shm_id_(0), shm_offset_(0), @@ -248,9 +247,7 @@ Release(); } - bool valid() const { - return buffer_ != NULL; - } + bool valid() const { return buffer_ != nullptr; } void SetFlushAfterRelease(bool flush_after_release) { flush_after_release_ = flush_after_release;
diff --git a/gpu/command_buffer/client/mapped_memory_unittest.cc b/gpu/command_buffer/client/mapped_memory_unittest.cc index e02ea68..affe2335 100644 --- a/gpu/command_buffer/client/mapped_memory_unittest.cc +++ b/gpu/command_buffer/client/mapped_memory_unittest.cc
@@ -175,7 +175,7 @@ int32_t id3 = -1; unsigned int offset3 = 0xFFFFFFFFU; void* mem3 = manager_->Alloc(kSize, &id3, &offset3); - ASSERT_TRUE(mem3 != NULL); + ASSERT_TRUE(mem3 != nullptr); EXPECT_NE(mem2, mem3); EXPECT_NE(id2, id3); EXPECT_EQ(0u, offset3); @@ -187,8 +187,8 @@ unsigned int offset5 = 0xFFFFFFFFU; void* mem4 = manager_->Alloc(kSize / 2, &id4, &offset4); void* mem5 = manager_->Alloc(kSize / 2, &id5, &offset5); - ASSERT_TRUE(mem4 != NULL); - ASSERT_TRUE(mem5 != NULL); + ASSERT_TRUE(mem4 != nullptr); + ASSERT_TRUE(mem5 != nullptr); EXPECT_EQ(id3, id4); EXPECT_EQ(id4, id5); EXPECT_EQ(0u, offset4); @@ -252,13 +252,13 @@ void* m1 = manager_->Alloc(kAllocSize, &id, &offset); void* m2 = manager_->Alloc(kAllocSize, &id, &offset); - ASSERT_TRUE(m1 != NULL); - ASSERT_TRUE(m2 != NULL); + ASSERT_TRUE(m1 != nullptr); + ASSERT_TRUE(m2 != nullptr); // m1 and m2 fit in one chunk EXPECT_EQ(1u, manager_->num_chunks()); void* m3 = manager_->Alloc(kAllocSize, &id, &offset); - ASSERT_TRUE(m3 != NULL); + ASSERT_TRUE(m3 != nullptr); // m3 needs another chunk EXPECT_EQ(2u, manager_->num_chunks());
diff --git a/gpu/command_buffer/client/mock_transfer_buffer.cc b/gpu/command_buffer/client/mock_transfer_buffer.cc index c3a4870..a218117 100644 --- a/gpu/command_buffer/client/mock_transfer_buffer.cc +++ b/gpu/command_buffer/client/mock_transfer_buffer.cc
@@ -20,7 +20,7 @@ alignment_(alignment), actual_buffer_index_(0), expected_buffer_index_(0), - last_alloc_(NULL), + last_alloc_(nullptr), expected_offset_(result_size), actual_offset_(result_size), initialize_fail_(initialize_fail) {
diff --git a/gpu/command_buffer/client/program_info_manager.cc b/gpu/command_buffer/client/program_info_manager.cc index bc15d41..5c79059 100644 --- a/gpu/command_buffer/client/program_info_manager.cc +++ b/gpu/command_buffer/client/program_info_manager.cc
@@ -16,7 +16,7 @@ const int8_t* p = &data[0] + offset; if (offset + size > data.size()) { NOTREACHED(); - return NULL; + return nullptr; } return static_cast<T>(static_cast<const void*>(p)); } @@ -112,19 +112,21 @@ const ProgramInfoManager::Program::VertexAttrib* ProgramInfoManager::Program::GetAttribInfo(GLint index) const { - return (static_cast<size_t>(index) < attrib_infos_.size()) ? - &attrib_infos_[index] : NULL; + return (static_cast<size_t>(index) < attrib_infos_.size()) + ? &attrib_infos_[index] + : nullptr; } const ProgramInfoManager::Program::UniformInfo* ProgramInfoManager::Program::GetUniformInfo(GLint index) const { - return (static_cast<size_t>(index) < uniform_infos_.size()) ? - &uniform_infos_[index] : NULL; + return (static_cast<size_t>(index) < uniform_infos_.size()) + ? &uniform_infos_[index] + : nullptr; } const ProgramInfoManager::Program::UniformBlock* ProgramInfoManager::Program::GetUniformBlock(GLuint index) const { - return (index < uniform_blocks_.size()) ? &uniform_blocks_[index] : NULL; + return (index < uniform_blocks_.size()) ? &uniform_blocks_[index] : nullptr; } GLint ProgramInfoManager::Program::GetUniformLocation( @@ -253,8 +255,9 @@ const ProgramInfoManager::Program::TransformFeedbackVarying* ProgramInfoManager::Program::GetTransformFeedbackVarying(GLuint index) const { - return (index < transform_feedback_varyings_.size()) ? - &transform_feedback_varyings_[index] : NULL; + return (index < transform_feedback_varyings_.size()) + ? &transform_feedback_varyings_[index] + : nullptr; } bool ProgramInfoManager::Program::GetUniformsiv( @@ -594,7 +597,7 @@ lock_.AssertAcquired(); ProgramInfoMap::iterator it = program_infos_.find(program); if (it == program_infos_.end()) { - return NULL; + return nullptr; } Program* info = &it->second; if (info->IsCached(type)) @@ -640,7 +643,7 @@ break; default: NOTREACHED(); - return NULL; + return nullptr; } return info; }
diff --git a/gpu/command_buffer/client/program_info_manager_unittest.cc b/gpu/command_buffer/client/program_info_manager_unittest.cc index 830ccade..302dc19 100644 --- a/gpu/command_buffer/client/program_info_manager_unittest.cc +++ b/gpu/command_buffer/client/program_info_manager_unittest.cc
@@ -69,8 +69,8 @@ { base::AutoLock auto_lock(program_info_manager_->lock_); program_ = program_info_manager_->GetProgramInfo( - NULL, kClientProgramId, ProgramInfoManager::kNone); - ASSERT_TRUE(program_ != NULL); + nullptr, kClientProgramId, ProgramInfoManager::kNone); + ASSERT_TRUE(program_ != nullptr); } } @@ -202,7 +202,7 @@ for (uint32_t ii = 0; ii < data.header.num_uniforms; ++ii) { const Program::UniformInfo* info = program_->GetUniformInfo(ii); - EXPECT_TRUE(info != NULL); + EXPECT_TRUE(info != nullptr); EXPECT_EQ(data.uniforms[ii].type, info->type); EXPECT_EQ(data.uniforms[ii].size, info->size); EXPECT_LT(kNames[0].length(), @@ -239,7 +239,7 @@ for (uint32_t ii = 0; ii < data.header.num_uniform_blocks; ++ii) { EXPECT_EQ(ii, program_->GetUniformBlockIndex(kName[ii])); const Program::UniformBlock* info = program_->GetUniformBlock(ii); - EXPECT_TRUE(info != NULL); + EXPECT_TRUE(info != nullptr); EXPECT_EQ(data.entry[ii].binding, info->binding); EXPECT_EQ(data.entry[ii].data_size, info->data_size); EXPECT_EQ(data.entry[ii].active_uniforms, @@ -256,7 +256,7 @@ } EXPECT_EQ(GL_INVALID_INDEX, program_->GetUniformBlockIndex("BadName")); - EXPECT_EQ(NULL, program_->GetUniformBlock(data.header.num_uniform_blocks)); + EXPECT_EQ(nullptr, program_->GetUniformBlock(data.header.num_uniform_blocks)); } TEST_F(ProgramInfoManagerTest, UpdateES3TransformFeedbackVaryings) { @@ -288,14 +288,14 @@ ++ii) { const Program::TransformFeedbackVarying* varying = program_->GetTransformFeedbackVarying(ii); - EXPECT_TRUE(varying != NULL); + EXPECT_TRUE(varying != nullptr); EXPECT_EQ(data.entry[ii].size, static_cast<uint32_t>(varying->size)); EXPECT_EQ(data.entry[ii].type, varying->type); EXPECT_EQ(kName[ii], varying->name); EXPECT_GE(max_name_length, static_cast<GLint>(varying->name.size()) + 1); } - EXPECT_EQ(NULL, program_->GetTransformFeedbackVarying( - data.header.num_transform_feedback_varyings)); + EXPECT_EQ(nullptr, program_->GetTransformFeedbackVarying( + data.header.num_transform_feedback_varyings)); } TEST_F(ProgramInfoManagerTest, GetUniformBlockIndexCached) { @@ -306,11 +306,11 @@ program_->UpdateES3UniformBlocks(result); EXPECT_EQ(0u, program_info_manager_->GetUniformBlockIndex( - NULL, kClientProgramId, data.name0)); + nullptr, kClientProgramId, data.name0)); EXPECT_EQ(1u, program_info_manager_->GetUniformBlockIndex( - NULL, kClientProgramId, data.name1)); + nullptr, kClientProgramId, data.name1)); EXPECT_EQ(GL_INVALID_INDEX, program_info_manager_->GetUniformBlockIndex( - NULL, kClientProgramId, "BadName")); + nullptr, kClientProgramId, "BadName")); } TEST_F(ProgramInfoManagerTest, GetActiveUniformBlockNameCached) { @@ -323,30 +323,35 @@ GLsizei buf_size = std::max(strlen(data.name0), strlen(data.name1)) + 1; std::vector<char> buffer(buf_size); GLsizei length = 0; - EXPECT_EQ(true, program_info_manager_->GetActiveUniformBlockName( - NULL, kClientProgramId, 0, buf_size, &length, &buffer[0])); + EXPECT_EQ(true, + program_info_manager_->GetActiveUniformBlockName( + nullptr, kClientProgramId, 0, buf_size, &length, &buffer[0])); EXPECT_EQ(static_cast<GLsizei>(strlen(data.name0)), length); EXPECT_STREQ(data.name0, &buffer[0]); - EXPECT_EQ(true, program_info_manager_->GetActiveUniformBlockName( - NULL, kClientProgramId, 1, buf_size, &length, &buffer[0])); + EXPECT_EQ(true, + program_info_manager_->GetActiveUniformBlockName( + nullptr, kClientProgramId, 1, buf_size, &length, &buffer[0])); EXPECT_EQ(static_cast<GLsizei>(strlen(data.name1)), length); EXPECT_STREQ(data.name1, &buffer[0]); - // Test length == NULL. - EXPECT_EQ(true, program_info_manager_->GetActiveUniformBlockName( - NULL, kClientProgramId, 0, buf_size, NULL, &buffer[0])); + // Test length == nullptr. + EXPECT_EQ(true, + program_info_manager_->GetActiveUniformBlockName( + nullptr, kClientProgramId, 0, buf_size, nullptr, &buffer[0])); EXPECT_STREQ(data.name0, &buffer[0]); - // Test buffer == NULL. - EXPECT_EQ(true, program_info_manager_->GetActiveUniformBlockName( - NULL, kClientProgramId, 0, buf_size, &length, NULL)); + // Test buffer == nullptr. + EXPECT_EQ(true, + program_info_manager_->GetActiveUniformBlockName( + nullptr, kClientProgramId, 0, buf_size, &length, nullptr)); EXPECT_EQ(0, length); // Test buf_size smaller than string size. buf_size = strlen(data.name0); - EXPECT_EQ(true, program_info_manager_->GetActiveUniformBlockName( - NULL, kClientProgramId, 0, buf_size, &length, &buffer[0])); + EXPECT_EQ(true, + program_info_manager_->GetActiveUniformBlockName( + nullptr, kClientProgramId, 0, buf_size, &length, &buffer[0])); EXPECT_EQ(buf_size, length + 1); EXPECT_STREQ(std::string(data.name0).substr(0, length).c_str(), &buffer[0]); } @@ -364,36 +369,37 @@ ASSERT_GE(2u, data.entry[ii].active_uniforms); GLint params[2]; EXPECT_TRUE(program_info_manager_->GetActiveUniformBlockiv( - NULL, kClientProgramId, ii, GL_UNIFORM_BLOCK_BINDING, params)); + nullptr, kClientProgramId, ii, GL_UNIFORM_BLOCK_BINDING, params)); EXPECT_EQ(data.entry[ii].binding, static_cast<uint32_t>(params[0])); EXPECT_TRUE(program_info_manager_->GetActiveUniformBlockiv( - NULL, kClientProgramId, ii, GL_UNIFORM_BLOCK_DATA_SIZE, params)); + nullptr, kClientProgramId, ii, GL_UNIFORM_BLOCK_DATA_SIZE, params)); EXPECT_EQ(data.entry[ii].data_size, static_cast<uint32_t>(params[0])); EXPECT_TRUE(program_info_manager_->GetActiveUniformBlockiv( - NULL, kClientProgramId, ii, GL_UNIFORM_BLOCK_NAME_LENGTH, params)); + nullptr, kClientProgramId, ii, GL_UNIFORM_BLOCK_NAME_LENGTH, params)); EXPECT_EQ(strlen(kName[ii]) + 1, static_cast<uint32_t>(params[0])); EXPECT_TRUE(program_info_manager_->GetActiveUniformBlockiv( - NULL, kClientProgramId, ii, GL_UNIFORM_BLOCK_ACTIVE_UNIFORMS, params)); + nullptr, kClientProgramId, ii, GL_UNIFORM_BLOCK_ACTIVE_UNIFORMS, + params)); EXPECT_EQ(data.entry[ii].active_uniforms, static_cast<uint32_t>(params[0])); EXPECT_TRUE(program_info_manager_->GetActiveUniformBlockiv( - NULL, kClientProgramId, ii, - GL_UNIFORM_BLOCK_ACTIVE_UNIFORM_INDICES, params)); + nullptr, kClientProgramId, ii, GL_UNIFORM_BLOCK_ACTIVE_UNIFORM_INDICES, + params)); for (uint32_t uu = 0; uu < data.entry[ii].active_uniforms; ++uu) { EXPECT_EQ(kIndices[ii][uu], static_cast<uint32_t>(params[uu])); } EXPECT_TRUE(program_info_manager_->GetActiveUniformBlockiv( - NULL, kClientProgramId, ii, + nullptr, kClientProgramId, ii, GL_UNIFORM_BLOCK_REFERENCED_BY_VERTEX_SHADER, params)); EXPECT_EQ(data.entry[ii].referenced_by_vertex_shader, static_cast<uint32_t>(params[0])); EXPECT_TRUE(program_info_manager_->GetActiveUniformBlockiv( - NULL, kClientProgramId, ii, + nullptr, kClientProgramId, ii, GL_UNIFORM_BLOCK_REFERENCED_BY_FRAGMENT_SHADER, params)); EXPECT_EQ(data.entry[ii].referenced_by_fragment_shader, static_cast<uint32_t>(params[0])); @@ -415,8 +421,8 @@ GLsizei size = 0; GLenum type = 0; EXPECT_EQ(true, program_info_manager_->GetTransformFeedbackVarying( - NULL, kClientProgramId, ii, buf_size, - &length, &size, &type, &buffer[0])); + nullptr, kClientProgramId, ii, buf_size, &length, &size, + &type, &buffer[0])); EXPECT_EQ(data.entry[ii].size, static_cast<uint32_t>(size)); EXPECT_EQ(data.entry[ii].type, static_cast<uint32_t>(type)); EXPECT_STREQ(kName[ii], &buffer[0]); @@ -437,7 +443,7 @@ const GLsizei kCount = 2; GLuint indices[kCount]; EXPECT_TRUE(program_info_manager_->GetUniformIndices( - NULL, kClientProgramId, kCount, kNames, indices)); + nullptr, kClientProgramId, kCount, kNames, indices)); for (GLsizei ii = 0; ii < kCount; ++ii) { EXPECT_EQ(kIndices[ii], indices[ii]); } @@ -449,7 +455,7 @@ const GLsizei kCount = 2; GLuint indices[kCount]; EXPECT_TRUE(program_info_manager_->GetUniformIndices( - NULL, kClientProgramId, kCount, kNames, indices)); + nullptr, kClientProgramId, kCount, kNames, indices)); for (GLsizei ii = 0; ii < kCount; ++ii) { EXPECT_EQ(kIndices[ii], indices[ii]); } @@ -461,7 +467,7 @@ const GLsizei kCount = 2; GLuint indices[kCount]; EXPECT_TRUE(program_info_manager_->GetUniformIndices( - NULL, kClientProgramId, kCount, kNames, indices)); + nullptr, kClientProgramId, kCount, kNames, indices)); for (GLsizei ii = 0; ii < kCount; ++ii) { EXPECT_EQ(kIndices[ii], indices[ii]); } @@ -474,7 +480,7 @@ const GLsizei kCount = 3; GLuint indices[kCount]; EXPECT_TRUE(program_info_manager_->GetUniformIndices( - NULL, kClientProgramId, kCount, kNames, indices)); + nullptr, kClientProgramId, kCount, kNames, indices)); for (GLsizei ii = 0; ii < kCount; ++ii) { EXPECT_EQ(kIndices[ii], indices[ii]); } @@ -498,23 +504,23 @@ } std::vector<GLint> block_index(count); EXPECT_TRUE(program_info_manager_->GetActiveUniformsiv( - NULL, kClientProgramId, static_cast<GLsizei>(count), &indices[0], + nullptr, kClientProgramId, static_cast<GLsizei>(count), &indices[0], GL_UNIFORM_BLOCK_INDEX, &block_index[0])); std::vector<GLint> offset(count); EXPECT_TRUE(program_info_manager_->GetActiveUniformsiv( - NULL, kClientProgramId, static_cast<GLsizei>(count), &indices[0], + nullptr, kClientProgramId, static_cast<GLsizei>(count), &indices[0], GL_UNIFORM_OFFSET, &offset[0])); std::vector<GLint> array_stride(count); EXPECT_TRUE(program_info_manager_->GetActiveUniformsiv( - NULL, kClientProgramId, static_cast<GLsizei>(count), &indices[0], + nullptr, kClientProgramId, static_cast<GLsizei>(count), &indices[0], GL_UNIFORM_ARRAY_STRIDE, &array_stride[0])); std::vector<GLint> matrix_stride(count); EXPECT_TRUE(program_info_manager_->GetActiveUniformsiv( - NULL, kClientProgramId, static_cast<GLsizei>(count), &indices[0], + nullptr, kClientProgramId, static_cast<GLsizei>(count), &indices[0], GL_UNIFORM_MATRIX_STRIDE, &matrix_stride[0])); std::vector<GLint> is_row_major(count); EXPECT_TRUE(program_info_manager_->GetActiveUniformsiv( - NULL, kClientProgramId, static_cast<GLsizei>(count), &indices[0], + nullptr, kClientProgramId, static_cast<GLsizei>(count), &indices[0], GL_UNIFORM_IS_ROW_MAJOR, &is_row_major[0])); for (uint32_t ii = 0; ii < count; ++ii) { @@ -536,15 +542,15 @@ std::vector<GLint> size(count); EXPECT_TRUE(program_info_manager_->GetActiveUniformsiv( - NULL, kClientProgramId, static_cast<GLsizei>(count), &indices[0], + nullptr, kClientProgramId, static_cast<GLsizei>(count), &indices[0], GL_UNIFORM_SIZE, &size[0])); std::vector<GLint> type(count); EXPECT_TRUE(program_info_manager_->GetActiveUniformsiv( - NULL, kClientProgramId, static_cast<GLsizei>(count), &indices[0], + nullptr, kClientProgramId, static_cast<GLsizei>(count), &indices[0], GL_UNIFORM_TYPE, &type[0])); std::vector<GLint> name_length(count); EXPECT_TRUE(program_info_manager_->GetActiveUniformsiv( - NULL, kClientProgramId, static_cast<GLsizei>(count), &indices[0], + nullptr, kClientProgramId, static_cast<GLsizei>(count), &indices[0], GL_UNIFORM_NAME_LENGTH, &name_length[0])); for (uint32_t ii = 0; ii < count; ++ii) {
diff --git a/gpu/command_buffer/client/query_tracker_unittest.cc b/gpu/command_buffer/client/query_tracker_unittest.cc index 8b5191e..48d6ba5 100644 --- a/gpu/command_buffer/client/query_tracker_unittest.cc +++ b/gpu/command_buffer/client/query_tracker_unittest.cc
@@ -61,7 +61,7 @@ for (size_t ii = 0; ii < arraysize(infos); ++ii) { EXPECT_TRUE(sync_manager_->Alloc(&infos[ii])); - ASSERT_TRUE(infos[ii].sync != NULL); + ASSERT_TRUE(infos[ii].sync != nullptr); EXPECT_EQ(0, infos[ii].sync->process_count); EXPECT_EQ(0u, infos[ii].sync->result); EXPECT_EQ(0, infos[ii].submit_count); @@ -252,15 +252,15 @@ // Check we can create a Query. QueryTracker::Query* query = query_tracker_->CreateQuery( kId1, GL_ANY_SAMPLES_PASSED_EXT); - ASSERT_TRUE(query != NULL); + ASSERT_TRUE(query != nullptr); // Check we can get the same Query. EXPECT_EQ(query, query_tracker_->GetQuery(kId1)); // Check we get nothing for a non-existent query. - EXPECT_TRUE(query_tracker_->GetQuery(kId2) == NULL); + EXPECT_TRUE(query_tracker_->GetQuery(kId2) == nullptr); // Check we can delete the query. query_tracker_->RemoveQuery(kId1); // Check we get nothing for a non-existent query. - EXPECT_TRUE(query_tracker_->GetQuery(kId1) == NULL); + EXPECT_TRUE(query_tracker_->GetQuery(kId1) == nullptr); } TEST_F(QueryTrackerTest, Query) { @@ -271,7 +271,7 @@ // Create a Query. QueryTracker::Query* query = query_tracker_->CreateQuery( kId1, GL_ANY_SAMPLES_PASSED_EXT); - ASSERT_TRUE(query != NULL); + ASSERT_TRUE(query != nullptr); EXPECT_TRUE(query->NeverUsed()); EXPECT_FALSE(query->Pending()); EXPECT_EQ(0, query->token()); @@ -337,7 +337,7 @@ // Create a Query. QueryTracker::Query* query = query_tracker_->CreateQuery( kId1, GL_ANY_SAMPLES_PASSED_EXT); - ASSERT_TRUE(query != NULL); + ASSERT_TRUE(query != nullptr); QuerySyncManager::Bucket* bucket = GetBucket(query); EXPECT_EQ(1u, GetBucketUsedCount(bucket)); @@ -349,7 +349,7 @@ query_tracker_->RemoveQuery(kId1); // Check we get nothing for a non-existent query. - EXPECT_TRUE(query_tracker_->GetQuery(kId1) == NULL); + EXPECT_TRUE(query_tracker_->GetQuery(kId1) == nullptr); // Check that memory was not freed. EXPECT_EQ(1u, GetBucketUsedCount(bucket)); @@ -370,7 +370,7 @@ // Create a Query. QueryTracker::Query* query = query_tracker_->CreateQuery(kId1, GL_ANY_SAMPLES_PASSED_EXT); - ASSERT_TRUE(query != NULL); + ASSERT_TRUE(query != nullptr); QuerySyncManager::Bucket* bucket = GetBucket(query); EXPECT_EQ(1u, GetBucketUsedCount(bucket)); @@ -379,7 +379,7 @@ query_tracker_->RemoveQuery(kId1); // Check we get nothing for a non-existent query. - EXPECT_TRUE(query_tracker_->GetQuery(kId1) == NULL); + EXPECT_TRUE(query_tracker_->GetQuery(kId1) == nullptr); // Check that memory was freed. EXPECT_EQ(0u, GetBucketUsedCount(bucket)); @@ -399,7 +399,7 @@ for (size_t i = 0; i < kTestSize; i++) { QueryTracker::Query* query = query_tracker_->CreateQuery(kId1 + i, GL_ANY_SAMPLES_PASSED_EXT); - ASSERT_TRUE(query != NULL); + ASSERT_TRUE(query != nullptr); queries.push_back(query); QuerySyncManager::Bucket* bucket = GetBucket(query); EXPECT_LE(1u, GetBucketUsedCount(bucket)); @@ -425,7 +425,7 @@ EXPECT_EQ(use_count_before_remove, GetBucketUsedCount(bucket)); query_tracker_->RemoveQuery(query_id); // Check we get nothing for a non-existent query. - EXPECT_TRUE(query_tracker_->GetQuery(query_id) == NULL); + EXPECT_TRUE(query_tracker_->GetQuery(query_id) == nullptr); // Check that memory was not freed since it was not completed. EXPECT_EQ(use_count_before_remove, GetBucketUsedCount(bucket));
diff --git a/gpu/command_buffer/client/transfer_buffer.cc b/gpu/command_buffer/client/transfer_buffer.cc index 75ab3d8..67bb846 100644 --- a/gpu/command_buffer/client/transfer_buffer.cc +++ b/gpu/command_buffer/client/transfer_buffer.cc
@@ -24,7 +24,7 @@ max_buffer_size_(0), alignment_(0), buffer_id_(-1), - result_buffer_(NULL), + result_buffer_(nullptr), result_shm_offset_(0), usable_(true) {} @@ -60,8 +60,8 @@ helper_->OrderingBarrier(); helper_->command_buffer()->DestroyTransferBuffer(buffer_id_); buffer_id_ = -1; - buffer_ = NULL; - result_buffer_ = NULL; + buffer_ = nullptr; + result_buffer_ = nullptr; result_shm_offset_ = 0; previous_ring_buffers_.push_back(std::move(ring_buffer_)); last_allocated_size_ = 0; @@ -198,7 +198,7 @@ ShrinkOrExpandRingBufferIfNecessary(size); if (!HaveBuffer()) { - return NULL; + return nullptr; } unsigned int max_size = ring_buffer_->GetLargestFreeOrPendingSize(); @@ -211,12 +211,12 @@ ShrinkOrExpandRingBufferIfNecessary(size); if (!HaveBuffer()) { - return NULL; + return nullptr; } unsigned int max_size = ring_buffer_->GetLargestFreeOrPendingSize(); if (size > max_size) { - return NULL; + return nullptr; } bytes_since_last_shrink_ += size; return ring_buffer_->Alloc(size); @@ -248,7 +248,7 @@ void ScopedTransferBufferPtr::Release() { if (buffer_) { transfer_buffer_->FreePendingToken(buffer_, helper_->InsertToken()); - buffer_ = NULL; + buffer_ = nullptr; size_ = 0; } } @@ -256,7 +256,7 @@ void ScopedTransferBufferPtr::Discard() { if (buffer_) { transfer_buffer_->DiscardBlock(buffer_); - buffer_ = NULL; + buffer_ = nullptr; size_ = 0; } }
diff --git a/gpu/command_buffer/client/transfer_buffer.h b/gpu/command_buffer/client/transfer_buffer.h index 841a3fc..cd18fbd7 100644 --- a/gpu/command_buffer/client/transfer_buffer.h +++ b/gpu/command_buffer/client/transfer_buffer.h
@@ -163,11 +163,10 @@ // A class that will manage the lifetime of a transferbuffer allocation. class GPU_EXPORT ScopedTransferBufferPtr { public: - ScopedTransferBufferPtr( - unsigned int size, - CommandBufferHelper* helper, - TransferBufferInterface* transfer_buffer) - : buffer_(NULL), + ScopedTransferBufferPtr(unsigned int size, + CommandBufferHelper* helper, + TransferBufferInterface* transfer_buffer) + : buffer_(nullptr), size_(0), helper_(helper), transfer_buffer_(transfer_buffer) { @@ -177,7 +176,7 @@ // Constructs an empty and invalid allocation that should be Reset() later. ScopedTransferBufferPtr(CommandBufferHelper* helper, TransferBufferInterface* transfer_buffer) - : buffer_(NULL), + : buffer_(nullptr), size_(0), helper_(helper), transfer_buffer_(transfer_buffer) {} @@ -186,9 +185,7 @@ Release(); } - bool valid() const { - return buffer_ != NULL; - } + bool valid() const { return buffer_ != nullptr; } unsigned int size() const { return size_;
diff --git a/gpu/command_buffer/client/transfer_buffer_unittest.cc b/gpu/command_buffer/client/transfer_buffer_unittest.cc index 04f1ad8d..84662cf9 100644 --- a/gpu/command_buffer/client/transfer_buffer_unittest.cc +++ b/gpu/command_buffer/client/transfer_buffer_unittest.cc
@@ -141,7 +141,7 @@ EXPECT_EQ(base::UnguessableToken(), transfer_buffer_->shared_memory_guid()); // See that it gets reallocated. - EXPECT_TRUE(transfer_buffer_->GetResultBuffer() != NULL); + EXPECT_TRUE(transfer_buffer_->GetResultBuffer() != nullptr); EXPECT_TRUE(transfer_buffer_->HaveBuffer()); EXPECT_NE(base::UnguessableToken(), transfer_buffer_->shared_memory_guid()); @@ -160,7 +160,7 @@ // See that it gets reallocated. unsigned int size = 0; void* data = transfer_buffer_->AllocUpTo(1, &size); - EXPECT_TRUE(data != NULL); + EXPECT_TRUE(data != nullptr); EXPECT_TRUE(transfer_buffer_->HaveBuffer()); EXPECT_NE(base::UnguessableToken(), transfer_buffer_->shared_memory_guid()); int32_t token = helper_->InsertToken(); @@ -203,12 +203,12 @@ Initialize(); // Check that we can't allocate large than max size. void* ptr = transfer_buffer_->Alloc(kTransferBufferSize + 1); - EXPECT_TRUE(ptr == NULL); + EXPECT_TRUE(ptr == nullptr); // Check we if we try to allocate larger than max we get max. unsigned int size_allocated = 0; ptr = transfer_buffer_->AllocUpTo( kTransferBufferSize + 1, &size_allocated); - ASSERT_TRUE(ptr != NULL); + ASSERT_TRUE(ptr != nullptr); EXPECT_EQ(kTransferBufferSize - kStartingOffset, size_allocated); transfer_buffer_->FreePendingToken(ptr, 1); } @@ -359,7 +359,7 @@ // Allocate one more byte to force expansion. ExpectCreateTransferBuffer(kStartTransferBufferSize * 2); ptr = transfer_buffer_->AllocUpTo(1, &size_allocated); - ASSERT_TRUE(ptr != NULL); + ASSERT_TRUE(ptr != nullptr); EXPECT_EQ(1u, size_allocated); transfer_buffer_->FreePendingToken(ptr, token); @@ -369,7 +369,7 @@ transfer_buffer_->FreePendingToken(ptr, token); ExpectCreateTransferBuffer(kStartTransferBufferSize * 4); ptr = transfer_buffer_->AllocUpTo(1, &size_allocated); - ASSERT_TRUE(ptr != NULL); + ASSERT_TRUE(ptr != nullptr); EXPECT_EQ(1u, size_allocated); transfer_buffer_->FreePendingToken(ptr, token); @@ -379,7 +379,7 @@ transfer_buffer_->FreePendingToken(ptr, token); EXPECT_CALL(*command_buffer(), Flush(_)).Times(1).RetiresOnSaturation(); ptr = transfer_buffer_->AllocUpTo(1, &size_allocated); - ASSERT_TRUE(ptr != NULL); + ASSERT_TRUE(ptr != nullptr); EXPECT_EQ(1u, size_allocated); transfer_buffer_->FreePendingToken(ptr, token); EXPECT_EQ(kMaxTransferBufferSize - kStartingOffset, @@ -419,7 +419,7 @@ ExpectCreateTransferBuffer(kStartTransferBufferSize * 4); unsigned int size_requested = transfer_buffer_->GetFreeSize() + 1; ptr = transfer_buffer_->AllocUpTo(size_requested, &size_allocated); - ASSERT_TRUE(ptr != NULL); + ASSERT_TRUE(ptr != nullptr); EXPECT_EQ(size_requested, size_allocated); transfer_buffer_->FreePendingToken(ptr, token); @@ -457,7 +457,7 @@ // Expand the ring buffer to the maximum size. ExpectCreateTransferBuffer(kMaxTransferBufferSize); void* ptr = transfer_buffer_->Alloc(kMaxTransferBufferSize - kStartingOffset); - EXPECT_TRUE(ptr != NULL); + EXPECT_TRUE(ptr != nullptr); transfer_buffer_->FreePendingToken(ptr, token); // We shouldn't shrink before we reach the allocation threshold. @@ -465,14 +465,14 @@ allocated < (kStartTransferBufferSize + kStartingOffset) * (TransferBuffer::kShrinkThreshold);) { ptr = transfer_buffer_->Alloc(kStartTransferBufferSize); - EXPECT_TRUE(ptr != NULL); + EXPECT_TRUE(ptr != nullptr); transfer_buffer_->FreePendingToken(ptr, token); allocated += kStartTransferBufferSize; } // The next allocation should trip the threshold and shrink. ExpectCreateTransferBuffer(kStartTransferBufferSize * 2); ptr = transfer_buffer_->Alloc(1); - EXPECT_TRUE(ptr != NULL); + EXPECT_TRUE(ptr != nullptr); transfer_buffer_->FreePendingToken(ptr, token); } @@ -510,7 +510,7 @@ const size_t kSize2 = 128 - kStartingOffset; unsigned int size_allocated = 0; void* ptr = transfer_buffer_->AllocUpTo(kSize1, &size_allocated); - ASSERT_TRUE(ptr != NULL); + ASSERT_TRUE(ptr != nullptr); EXPECT_EQ(kSize2, size_allocated); EXPECT_EQ(kSize2, transfer_buffer_->GetCurrentMaxAllocationWithoutRealloc()); transfer_buffer_->FreePendingToken(ptr, 1); @@ -535,7 +535,7 @@ .RetiresOnSaturation(); ptr = transfer_buffer_->AllocUpTo(kSize1, &size_allocated); - ASSERT_TRUE(ptr != NULL); + ASSERT_TRUE(ptr != nullptr); EXPECT_EQ(kSize2, size_allocated); EXPECT_EQ(kSize2, transfer_buffer_->GetCurrentMaxAllocationWithoutRealloc()); transfer_buffer_->FreePendingToken(ptr, 1); @@ -566,7 +566,7 @@ const size_t kSize1 = 512 - kStartingOffset; unsigned int size_allocated = 0; void* ptr = transfer_buffer_->AllocUpTo(kSize1, &size_allocated); - ASSERT_TRUE(ptr == NULL); + ASSERT_TRUE(ptr == nullptr); EXPECT_FALSE(transfer_buffer_->HaveBuffer()); }
diff --git a/gpu/command_buffer/client/vertex_array_object_manager.cc b/gpu/command_buffer/client/vertex_array_object_manager.cc index 0690c5e..4893115 100644 --- a/gpu/command_buffer/client/vertex_array_object_manager.cc +++ b/gpu/command_buffer/client/vertex_array_object_manager.cc
@@ -45,11 +45,10 @@ size_(4), type_(GL_FLOAT), normalized_(GL_FALSE), - pointer_(NULL), + pointer_(nullptr), gl_stride_(0), divisor_(0), - integer_(GL_FALSE) { - } + integer_(GL_FALSE) {} bool enabled() const { return enabled_; @@ -327,7 +326,7 @@ const VertexAttrib* attrib = &vertex_attribs_[index]; return attrib; } - return NULL; + return nullptr; } VertexArrayObjectManager::VertexArrayObjectManager( @@ -523,7 +522,7 @@ gl_helper->BindBuffer(GL_ARRAY_BUFFER, array_buffer_id_); array_buffer_offset_ = 0; if (total_size > array_buffer_size_) { - gl->BufferDataHelper(GL_ARRAY_BUFFER, total_size, NULL, GL_DYNAMIC_DRAW); + gl->BufferDataHelper(GL_ARRAY_BUFFER, total_size, nullptr, GL_DYNAMIC_DRAW); array_buffer_size_ = total_size; } for (GLuint ii = 0; ii < vertex_attribs.size(); ++ii) { @@ -617,8 +616,8 @@ GLsizei bytes_needed = bytes_per_element * count; if (bytes_needed > element_array_buffer_size_) { element_array_buffer_size_ = bytes_needed; - gl->BufferDataHelper( - GL_ELEMENT_ARRAY_BUFFER, bytes_needed, NULL, GL_DYNAMIC_DRAW); + gl->BufferDataHelper(GL_ELEMENT_ARRAY_BUFFER, bytes_needed, nullptr, + GL_DYNAMIC_DRAW); } gl->BufferSubDataHelper( GL_ELEMENT_ARRAY_BUFFER, 0, bytes_needed, indices);
diff --git a/gpu/command_buffer/client/vertex_array_object_manager_unittest.cc b/gpu/command_buffer/client/vertex_array_object_manager_unittest.cc index 77b6b4c..7e1f2ef 100644 --- a/gpu/command_buffer/client/vertex_array_object_manager_unittest.cc +++ b/gpu/command_buffer/client/vertex_array_object_manager_unittest.cc
@@ -71,7 +71,7 @@ EXPECT_EQ(0u, param); EXPECT_TRUE(manager_->GetAttribPointer( ii, GL_VERTEX_ATTRIB_ARRAY_POINTER, &ptr)); - EXPECT_TRUE(NULL == ptr); + EXPECT_TRUE(nullptr == ptr); } } @@ -187,10 +187,10 @@ EXPECT_FALSE(manager_->HaveEnabledClientSideBuffers()); // Check turning on an array and assigning a buffer. manager_->SetAttribEnable(1, true); - manager_->SetAttribPointer(123, 1, 3, GL_BYTE, true, 3, NULL, GL_FALSE); + manager_->SetAttribPointer(123, 1, 3, GL_BYTE, true, 3, nullptr, GL_FALSE); EXPECT_FALSE(manager_->HaveEnabledClientSideBuffers()); // Check unassigning a buffer. - manager_->SetAttribPointer(0, 1, 3, GL_BYTE, true, 3, NULL, GL_FALSE); + manager_->SetAttribPointer(0, 1, 3, GL_BYTE, true, 3, nullptr, GL_FALSE); EXPECT_TRUE(manager_->HaveEnabledClientSideBuffers()); // Check disabling the array. manager_->SetAttribEnable(1, false);
diff --git a/gpu/command_buffer/common/buffer.cc b/gpu/command_buffer/common/buffer.cc index 4682400..639a220 100644 --- a/gpu/command_buffer/common/buffer.cc +++ b/gpu/command_buffer/common/buffer.cc
@@ -77,14 +77,14 @@ base::CheckedNumeric<uint32_t> end = data_offset; end += data_size; if (!end.IsValid() || end.ValueOrDie() > static_cast<uint32_t>(size_)) - return NULL; + return nullptr; return static_cast<uint8_t*>(memory_) + data_offset; } void* Buffer::GetDataAddressAndSize(uint32_t data_offset, uint32_t* data_size) const { if (data_offset > static_cast<uint32_t>(size_)) - return NULL; + return nullptr; *data_size = GetRemainingSize(data_offset); return static_cast<uint8_t*>(memory_) + data_offset; }
diff --git a/gpu/command_buffer/common/buffer.h b/gpu/command_buffer/common/buffer.h index e7c3198..538542f 100644 --- a/gpu/command_buffer/common/buffer.h +++ b/gpu/command_buffer/common/buffer.h
@@ -67,10 +67,10 @@ void* memory() const { return memory_; } size_t size() const { return size_; } - // Returns NULL if the address overflows the memory. + // Returns nullptr if the address overflows the memory. void* GetDataAddress(uint32_t data_offset, uint32_t data_size) const; - // Returns NULL if the address overflows the memory. + // Returns nullptr if the address overflows the memory. void* GetDataAddressAndSize(uint32_t data_offset, uint32_t* data_size) const; // Returns the remaining size of the buffer after an offset
diff --git a/gpu/command_buffer/common/gles2_cmd_utils.h b/gpu/command_buffer/common/gles2_cmd_utils.h index 61ffa634..e618cd3 100644 --- a/gpu/command_buffer/common/gles2_cmd_utils.h +++ b/gpu/command_buffer/common/gles2_cmd_utils.h
@@ -65,7 +65,7 @@ return reinterpret_cast<const volatile uint8_t*>(&pod) + sizeof(pod); } -// Returns the address of the frst byte after the struct or NULL if size > +// Returns the address of the frst byte after the struct or nullptr if size > // immediate_data_size. template <typename RETURN_TYPE, typename COMMAND_TYPE> RETURN_TYPE GetImmediateDataAs(const volatile COMMAND_TYPE& pod, @@ -74,7 +74,7 @@ return (size <= immediate_data_size) ? static_cast<RETURN_TYPE>( const_cast<volatile void*>(AddressAfterStruct(pod))) - : NULL; + : nullptr; } struct GLES2_UTILS_EXPORT PixelStoreParams {
diff --git a/gpu/command_buffer/common/gles2_cmd_utils_implementation_autogen.h b/gpu/command_buffer/common/gles2_cmd_utils_implementation_autogen.h index 3e3d8a5..a93b72b 100644 --- a/gpu/command_buffer/common/gles2_cmd_utils_implementation_autogen.h +++ b/gpu/command_buffer/common/gles2_cmd_utils_implementation_autogen.h
@@ -4896,7 +4896,7 @@ } std::string GLES2Util::GetStringCompressedTextureFormat(uint32_t value) { - return GLES2Util::GetQualifiedEnumString(NULL, 0, value); + return GLES2Util::GetQualifiedEnumString(nullptr, 0, value); } std::string GLES2Util::GetStringCoverageModulationComponents(uint32_t value) { @@ -5010,7 +5010,7 @@ } std::string GLES2Util::GetStringFramebufferParameter(uint32_t value) { - return GLES2Util::GetQualifiedEnumString(NULL, 0, value); + return GLES2Util::GetQualifiedEnumString(nullptr, 0, value); } std::string GLES2Util::GetStringFramebufferTarget(uint32_t value) { @@ -5682,7 +5682,7 @@ } std::string GLES2Util::GetStringShaderBinaryFormat(uint32_t value) { - return GLES2Util::GetQualifiedEnumString(NULL, 0, value); + return GLES2Util::GetQualifiedEnumString(nullptr, 0, value); } std::string GLES2Util::GetStringShaderParameter(uint32_t value) {
diff --git a/gpu/command_buffer/common/thread_local.h b/gpu/command_buffer/common/thread_local.h index bc9ff66b..454daad 100644 --- a/gpu/command_buffer/common/thread_local.h +++ b/gpu/command_buffer/common/thread_local.h
@@ -26,7 +26,7 @@ return TlsAlloc(); #else ThreadLocalKey key; - pthread_key_create(&key, NULL); + pthread_key_create(&key, nullptr); return key; #endif }
diff --git a/gpu/command_buffer/service/BUILD.gn b/gpu/command_buffer/service/BUILD.gn index 7470876c..d8b8205 100644 --- a/gpu/command_buffer/service/BUILD.gn +++ b/gpu/command_buffer/service/BUILD.gn
@@ -240,7 +240,7 @@ ] # Prefer mesa GL headers to system headers, which cause problems on Win. - include_dirs = [ "//third_party/mesa/src/include" ] + include_dirs = [ "//third_party/mesa_headers" ] public_deps = [ "//gpu/command_buffer/common",
diff --git a/gpu/command_buffer/service/buffer_manager.cc b/gpu/command_buffer/service/buffer_manager.cc index 4276bf8..bc4072d 100644 --- a/gpu/command_buffer/service/buffer_manager.cc +++ b/gpu/command_buffer/service/buffer_manager.cc
@@ -83,7 +83,7 @@ Buffer* BufferManager::GetBuffer( GLuint client_id) { BufferMap::iterator it = buffers_.find(client_id); - return it != buffers_.end() ? it->second.get() : NULL; + return it != buffers_.end() ? it->second.get() : nullptr; } void BufferManager::RemoveBuffer(GLuint client_id) { @@ -226,10 +226,10 @@ const void* Buffer::GetRange(GLintptr offset, GLsizeiptr size) const { if (shadow_.empty()) { - return NULL; + return nullptr; } if (!CheckRange(offset, size)) { - return NULL; + return nullptr; } DCHECK_LE(static_cast<size_t>(offset + size), shadow_.size()); return shadow_.data() + offset;
diff --git a/gpu/command_buffer/service/buffer_manager_unittest.cc b/gpu/command_buffer/service/buffer_manager_unittest.cc index a7ef866..43ad1aa 100644 --- a/gpu/command_buffer/service/buffer_manager_unittest.cc +++ b/gpu/command_buffer/service/buffer_manager_unittest.cc
@@ -82,10 +82,10 @@ const uint8_t new_data[] = {100, 120, 110}; manager_->CreateBuffer(kClientBufferId, kServiceBufferId); Buffer* buffer = manager_->GetBuffer(kClientBufferId); - ASSERT_TRUE(buffer != NULL); + ASSERT_TRUE(buffer != nullptr); manager_->SetTarget(buffer, kTarget); - DoBufferData( - buffer, kTarget, sizeof(data), GL_STATIC_DRAW, NULL, GL_NO_ERROR); + DoBufferData(buffer, kTarget, sizeof(data), GL_STATIC_DRAW, nullptr, + GL_NO_ERROR); EXPECT_TRUE(DoBufferSubData(buffer, kTarget, 0, sizeof(data), data)); GLuint max_value; // Check entire range succeeds. @@ -129,10 +129,10 @@ const uint16_t new_data[] = {100, 120, 110}; manager_->CreateBuffer(kClientBufferId, kServiceBufferId); Buffer* buffer = manager_->GetBuffer(kClientBufferId); - ASSERT_TRUE(buffer != NULL); + ASSERT_TRUE(buffer != nullptr); manager_->SetTarget(buffer, kTarget); - DoBufferData( - buffer, kTarget, sizeof(data), GL_STATIC_DRAW, NULL, GL_NO_ERROR); + DoBufferData(buffer, kTarget, sizeof(data), GL_STATIC_DRAW, nullptr, + GL_NO_ERROR); EXPECT_TRUE(DoBufferSubData(buffer, kTarget, 0, sizeof(data), data)); GLuint max_value; // Check entire range succeeds. @@ -179,10 +179,10 @@ const uint32_t new_data[] = {100, 120, 110}; manager_->CreateBuffer(kClientBufferId, kServiceBufferId); Buffer* buffer = manager_->GetBuffer(kClientBufferId); - ASSERT_TRUE(buffer != NULL); + ASSERT_TRUE(buffer != nullptr); manager_->SetTarget(buffer, kTarget); - DoBufferData( - buffer, kTarget, sizeof(data), GL_STATIC_DRAW, NULL, GL_NO_ERROR); + DoBufferData(buffer, kTarget, sizeof(data), GL_STATIC_DRAW, nullptr, + GL_NO_ERROR); EXPECT_TRUE(DoBufferSubData(buffer, kTarget, 0, sizeof(data), data)); GLuint max_value; // Check entire range succeeds. @@ -231,12 +231,12 @@ class BufferManagerTest : public BufferManagerTestBase { protected: - void SetUp() override { SetUpBase(NULL, NULL, ""); } + void SetUp() override { SetUpBase(nullptr, nullptr, ""); } }; class BufferManagerMemoryTrackerTest : public BufferManagerTestBase { protected: - void SetUp() override { SetUpBase(&mock_memory_tracker_, NULL, ""); } + void SetUp() override { SetUpBase(&mock_memory_tracker_, nullptr, ""); } StrictMock<MockMemoryTracker> mock_memory_tracker_; }; @@ -249,7 +249,7 @@ GpuFeatureInfo gpu_feature_info; feature_info_ = new FeatureInfo(gpu_driver_bug_workarounds, gpu_feature_info); - SetUpBase(NULL, feature_info_.get(), ""); + SetUpBase(nullptr, feature_info_.get(), ""); } scoped_refptr<FeatureInfo> feature_info_; @@ -271,7 +271,7 @@ manager_->CreateBuffer(kClientBuffer1Id, kServiceBuffer1Id); // Check buffer got created. Buffer* buffer1 = manager_->GetBuffer(kClientBuffer1Id); - ASSERT_TRUE(buffer1 != NULL); + ASSERT_TRUE(buffer1 != nullptr); EXPECT_EQ(0u, GetInitialTarget(buffer1)); EXPECT_EQ(0, buffer1->size()); EXPECT_EQ(static_cast<GLenum>(GL_STATIC_DRAW), buffer1->usage()); @@ -284,12 +284,12 @@ manager_->SetTarget(buffer1, kTarget); EXPECT_EQ(kTarget, GetInitialTarget(buffer1)); // Check we and set its size. - DoBufferData( - buffer1, kTarget, kBuffer1Size, GL_DYNAMIC_DRAW, NULL, GL_NO_ERROR); + DoBufferData(buffer1, kTarget, kBuffer1Size, GL_DYNAMIC_DRAW, nullptr, + GL_NO_ERROR); EXPECT_EQ(kBuffer1Size, buffer1->size()); EXPECT_EQ(static_cast<GLenum>(GL_DYNAMIC_DRAW), buffer1->usage()); // Check we get nothing for a non-existent buffer. - EXPECT_TRUE(manager_->GetBuffer(kClientBuffer2Id) == NULL); + EXPECT_TRUE(manager_->GetBuffer(kClientBuffer2Id) == nullptr); // Check trying to a remove non-existent buffers does not crash. manager_->RemoveBuffer(kClientBuffer2Id); // Check that it gets deleted when the last reference is released. @@ -298,7 +298,7 @@ .RetiresOnSaturation(); // Check we can't get the buffer after we remove it. manager_->RemoveBuffer(kClientBuffer1Id); - EXPECT_TRUE(manager_->GetBuffer(kClientBuffer1Id) == NULL); + EXPECT_TRUE(manager_->GetBuffer(kClientBuffer1Id) == nullptr); } TEST_F(BufferManagerMemoryTrackerTest, Basic) { @@ -311,16 +311,16 @@ manager_->CreateBuffer(kClientBuffer1Id, kServiceBuffer1Id); // Check buffer got created. Buffer* buffer1 = manager_->GetBuffer(kClientBuffer1Id); - ASSERT_TRUE(buffer1 != NULL); + ASSERT_TRUE(buffer1 != nullptr); manager_->SetTarget(buffer1, kTarget); // Check we and set its size. EXPECT_MEMORY_ALLOCATION_CHANGE(0, kBuffer1Size1); - DoBufferData( - buffer1, kTarget, kBuffer1Size1, GL_DYNAMIC_DRAW, NULL, GL_NO_ERROR); + DoBufferData(buffer1, kTarget, kBuffer1Size1, GL_DYNAMIC_DRAW, nullptr, + GL_NO_ERROR); EXPECT_MEMORY_ALLOCATION_CHANGE(kBuffer1Size1, 0); EXPECT_MEMORY_ALLOCATION_CHANGE(0, kBuffer1Size2); - DoBufferData( - buffer1, kTarget, kBuffer1Size2, GL_DYNAMIC_DRAW, NULL, GL_NO_ERROR); + DoBufferData(buffer1, kTarget, kBuffer1Size2, GL_DYNAMIC_DRAW, nullptr, + GL_NO_ERROR); // On delete it will get freed. EXPECT_MEMORY_ALLOCATION_CHANGE(kBuffer1Size2, 0); } @@ -332,14 +332,14 @@ manager_->CreateBuffer(kClient1Id, kService1Id); // Check buffer got created. Buffer* buffer1 = manager_->GetBuffer(kClient1Id); - ASSERT_TRUE(buffer1 != NULL); + ASSERT_TRUE(buffer1 != nullptr); EXPECT_CALL(*gl_, DeleteBuffersARB(1, ::testing::Pointee(kService1Id))) .Times(1) .RetiresOnSaturation(); manager_->Destroy(); // Check the resources were released. buffer1 = manager_->GetBuffer(kClient1Id); - ASSERT_TRUE(buffer1 == NULL); + ASSERT_TRUE(buffer1 == nullptr); } TEST_F(BufferManagerTest, DoBufferSubData) { @@ -349,17 +349,17 @@ const uint8_t data[] = {10, 9, 8, 7, 6, 5, 4, 3, 2, 1}; manager_->CreateBuffer(kClientBufferId, kServiceBufferId); Buffer* buffer = manager_->GetBuffer(kClientBufferId); - ASSERT_TRUE(buffer != NULL); + ASSERT_TRUE(buffer != nullptr); manager_->SetTarget(buffer, kTarget); - DoBufferData( - buffer, kTarget, sizeof(data), GL_STATIC_DRAW, NULL, GL_NO_ERROR); + DoBufferData(buffer, kTarget, sizeof(data), GL_STATIC_DRAW, nullptr, + GL_NO_ERROR); EXPECT_TRUE(DoBufferSubData(buffer, kTarget, 0, sizeof(data), data)); EXPECT_TRUE(DoBufferSubData(buffer, kTarget, sizeof(data), 0, data)); EXPECT_FALSE(DoBufferSubData(buffer, kTarget, sizeof(data), 1, data)); EXPECT_FALSE(DoBufferSubData(buffer, kTarget, 0, sizeof(data) + 1, data)); EXPECT_FALSE(DoBufferSubData(buffer, kTarget, -1, sizeof(data), data)); EXPECT_FALSE(DoBufferSubData(buffer, kTarget, 0, -1, data)); - DoBufferData(buffer, kTarget, 1, GL_STATIC_DRAW, NULL, GL_NO_ERROR); + DoBufferData(buffer, kTarget, 1, GL_STATIC_DRAW, nullptr, GL_NO_ERROR); const int size = 0x20000; std::unique_ptr<uint8_t[]> temp(new uint8_t[size]); EXPECT_FALSE(DoBufferSubData(buffer, kTarget, 0 - size, size, temp.get())); @@ -373,23 +373,24 @@ const GLsizeiptr kDataSize = 10; manager_->CreateBuffer(kClientBufferId, kServiceBufferId); Buffer* buffer = manager_->GetBuffer(kClientBufferId); - ASSERT_TRUE(buffer != NULL); + ASSERT_TRUE(buffer != nullptr); manager_->SetTarget(buffer, kTarget); - DoBufferData(buffer, kTarget, kDataSize, GL_STATIC_DRAW, NULL, GL_NO_ERROR); + DoBufferData(buffer, kTarget, kDataSize, GL_STATIC_DRAW, nullptr, + GL_NO_ERROR); const char* buf = static_cast<const char*>(buffer->GetRange(0, kDataSize)); - ASSERT_TRUE(buf != NULL); + ASSERT_TRUE(buf != nullptr); const char* buf1 = static_cast<const char*>(buffer->GetRange(1, kDataSize - 1)); EXPECT_EQ(buf + 1, buf1); - EXPECT_TRUE(buffer->GetRange(kDataSize, 1) == NULL); - EXPECT_TRUE(buffer->GetRange(0, kDataSize + 1) == NULL); - EXPECT_TRUE(buffer->GetRange(-1, kDataSize) == NULL); - EXPECT_TRUE(buffer->GetRange(-0, -1) == NULL); + EXPECT_TRUE(buffer->GetRange(kDataSize, 1) == nullptr); + EXPECT_TRUE(buffer->GetRange(0, kDataSize + 1) == nullptr); + EXPECT_TRUE(buffer->GetRange(-1, kDataSize) == nullptr); + EXPECT_TRUE(buffer->GetRange(-0, -1) == nullptr); const int size = 0x20000; - DoBufferData(buffer, kTarget, size / 2, GL_STATIC_DRAW, NULL, GL_NO_ERROR); - EXPECT_TRUE(buffer->GetRange(0 - size, size) == NULL); - EXPECT_TRUE(buffer->GetRange(1, size / 2) == NULL); + DoBufferData(buffer, kTarget, size / 2, GL_STATIC_DRAW, nullptr, GL_NO_ERROR); + EXPECT_TRUE(buffer->GetRange(0 - size, size) == nullptr); + EXPECT_TRUE(buffer->GetRange(1, size / 2) == nullptr); } TEST_F(BufferManagerTest, GetMaxValueForRangeUint8) { @@ -423,18 +424,18 @@ const GLsizeiptr kDataSize = 10; manager_->CreateBuffer(kClientBufferId, kServiceBufferId); scoped_refptr<Buffer> buffer = manager_->GetBuffer(kClientBufferId); - ASSERT_TRUE(buffer.get() != NULL); + ASSERT_TRUE(buffer.get() != nullptr); manager_->SetTarget(buffer.get(), kTarget); // Remove buffer manager_->RemoveBuffer(kClientBufferId); // Use it after removing - DoBufferData( - buffer.get(), kTarget, kDataSize, GL_STATIC_DRAW, NULL, GL_NO_ERROR); + DoBufferData(buffer.get(), kTarget, kDataSize, GL_STATIC_DRAW, nullptr, + GL_NO_ERROR); // Check that it gets deleted when the last reference is released. EXPECT_CALL(*gl_, DeleteBuffersARB(1, ::testing::Pointee(kServiceBufferId))) .Times(1) .RetiresOnSaturation(); - buffer = NULL; + buffer = nullptr; } // Test buffers get shadowed when they are supposed to be. @@ -445,7 +446,7 @@ static const uint32_t data[] = {10, 9, 8, 7, 6, 5, 4, 3, 2, 1}; manager_->CreateBuffer(kClientBufferId, kServiceBufferId); Buffer* buffer = manager_->GetBuffer(kClientBufferId); - ASSERT_TRUE(buffer != NULL); + ASSERT_TRUE(buffer != nullptr); manager_->SetTarget(buffer, kTarget); DoBufferData( buffer, kTarget, sizeof(data), GL_STREAM_DRAW, data, GL_NO_ERROR); @@ -465,7 +466,7 @@ const uint32_t data3[] = {30, 29, 28}; manager_->CreateBuffer(kClientBufferId, kServiceBufferId); Buffer* buffer = manager_->GetBuffer(kClientBufferId); - ASSERT_TRUE(buffer != NULL); + ASSERT_TRUE(buffer != nullptr); manager_->SetTarget(buffer, kTarget); GLuint max_value; // Load the buffer with some initial data, and then get the maximum value for @@ -503,7 +504,7 @@ // any other targets except for GL_COPY_READ/WRITE_BUFFER. manager_->CreateBuffer(client_id, service_id); Buffer* buffer = manager_->GetBuffer(client_id); - ASSERT_TRUE(buffer != NULL); + ASSERT_TRUE(buffer != nullptr); EXPECT_TRUE(manager_->SetTarget(buffer, GL_ELEMENT_ARRAY_BUFFER)); EXPECT_TRUE(manager_->SetTarget(buffer, GL_COPY_READ_BUFFER)); EXPECT_TRUE(manager_->SetTarget(buffer, GL_COPY_WRITE_BUFFER)); @@ -530,7 +531,7 @@ service_id++; manager_->CreateBuffer(client_id, service_id); Buffer* buffer = manager_->GetBuffer(client_id); - ASSERT_TRUE(buffer != NULL); + ASSERT_TRUE(buffer != nullptr); EXPECT_TRUE(manager_->SetTarget(buffer, kTargets[ii])); for (size_t jj = 0; jj < arraysize(kTargets); ++jj) { @@ -557,7 +558,7 @@ service_id++; manager_->CreateBuffer(client_id, service_id); Buffer* buffer = manager_->GetBuffer(client_id); - ASSERT_TRUE(buffer != NULL); + ASSERT_TRUE(buffer != nullptr); EXPECT_TRUE(manager_->SetTarget(buffer, kTargets[ii])); for (size_t jj = 0; jj < arraysize(kTargets); ++jj) {
diff --git a/gpu/command_buffer/service/command_buffer_service.cc b/gpu/command_buffer/service/command_buffer_service.cc index 04eaddd1..644b820 100644 --- a/gpu/command_buffer/service/command_buffer_service.cc +++ b/gpu/command_buffer/service/command_buffer_service.cc
@@ -103,7 +103,7 @@ ++state_.set_get_buffer_count; // If the buffer is invalid we handle it gracefully. - // This means ring_buffer_ can be NULL. + // This means ring_buffer_ can be nullptr. ring_buffer_ = GetTransferBuffer(transfer_buffer_id); if (ring_buffer_) { int32_t size = ring_buffer_->size();
diff --git a/gpu/command_buffer/service/common_decoder.cc b/gpu/command_buffer/service/common_decoder.cc index 3db0e428c..7cafcc4 100644 --- a/gpu/command_buffer/service/common_decoder.cc +++ b/gpu/command_buffer/service/common_decoder.cc
@@ -38,12 +38,12 @@ if (OffsetSizeValid(offset, size)) { return data_.get() + offset; } - return NULL; + return nullptr; } void CommonDecoder::Bucket::SetSize(size_t size) { if (size != size_) { - data_.reset(size ? new int8_t[size] : NULL); + data_.reset(size ? new int8_t[size] : nullptr); size_ = size; memset(data_.get(), 0, size); } @@ -59,7 +59,7 @@ } void CommonDecoder::Bucket::SetFromString(const char* str) { - // Strings are passed NULL terminated to distinguish between empty string + // Strings are passed nullptr terminated to distinguish between empty string // and no string. if (!str) { SetSize(0); @@ -176,7 +176,7 @@ CommonDecoder::Bucket* CommonDecoder::GetBucket(uint32_t bucket_id) const { BucketMap::const_iterator iter(buckets_.find(bucket_id)); - return iter != buckets_.end() ? &(*iter->second) : NULL; + return iter != buckets_.end() ? &(*iter->second) : nullptr; } CommonDecoder::Bucket* CommonDecoder::CreateBucket(uint32_t bucket_id) { @@ -310,7 +310,7 @@ int32_t data_memory_id = args.data_memory_id; uint32_t data_memory_offset = args.data_memory_offset; uint32_t data_memory_size = args.data_memory_size; - uint8_t* data = NULL; + uint8_t* data = nullptr; if (data_memory_size != 0 || data_memory_id != 0 || data_memory_offset != 0) { data = GetSharedMemoryAs<uint8_t*>(data_memory_id, data_memory_offset, data_memory_size);
diff --git a/gpu/command_buffer/service/common_decoder.h b/gpu/command_buffer/service/common_decoder.h index d6122b2..0877aab 100644 --- a/gpu/command_buffer/service/common_decoder.h +++ b/gpu/command_buffer/service/common_decoder.h
@@ -65,8 +65,8 @@ return size_; } - // Gets a pointer to a section the bucket. Returns NULL if offset or size is - // out of range. + // Gets a pointer to a section the bucket. Returns nullptr if offset or size + // is out of range. void* GetData(size_t offset, size_t size) const; template <typename T> @@ -124,7 +124,7 @@ // Creates a bucket. If the bucket already exists returns that bucket. Bucket* CreateBucket(uint32_t bucket_id); - // Gets a bucket. Returns NULL if the bucket does not exist. + // Gets a bucket. Returns nullptr if the bucket does not exist. Bucket* GetBucket(uint32_t bucket_id) const; // Gets the address of shared memory data, given a shared memory ID and an @@ -135,7 +135,7 @@ // offset: the offset of the data in the shared memory buffer. // size: the size of the data. // Returns: - // NULL if shm_id isn't a valid shared memory buffer ID or if the size + // nullptr if shm_id isn't a valid shared memory buffer ID or if the size // check fails. Return a pointer to the data otherwise. void* GetAddressAndCheckSize(unsigned int shm_id, unsigned int offset, @@ -220,4 +220,3 @@ } // namespace gpu #endif // GPU_COMMAND_BUFFER_SERVICE_COMMON_DECODER_H_ -
diff --git a/gpu/command_buffer/service/common_decoder_unittest.cc b/gpu/command_buffer/service/common_decoder_unittest.cc index 5368ae6..e3d5d05 100644 --- a/gpu/command_buffer/service/common_decoder_unittest.cc +++ b/gpu/command_buffer/service/common_decoder_unittest.cc
@@ -17,7 +17,7 @@ TEST(CommonDecoderBucket, Basic) { CommonDecoder::Bucket bucket; EXPECT_EQ(0u, bucket.size()); - EXPECT_TRUE(NULL == bucket.GetData(0, 0)); + EXPECT_TRUE(nullptr == bucket.GetData(0, 0)); } TEST(CommonDecoderBucket, Size) { @@ -32,13 +32,13 @@ CommonDecoder::Bucket bucket; bucket.SetSize(24); - EXPECT_TRUE(NULL != bucket.GetData(0, 0)); - EXPECT_TRUE(NULL != bucket.GetData(24, 0)); - EXPECT_TRUE(NULL == bucket.GetData(25, 0)); - EXPECT_TRUE(NULL != bucket.GetData(0, 24)); - EXPECT_TRUE(NULL == bucket.GetData(0, 25)); + EXPECT_TRUE(nullptr != bucket.GetData(0, 0)); + EXPECT_TRUE(nullptr != bucket.GetData(24, 0)); + EXPECT_TRUE(nullptr == bucket.GetData(25, 0)); + EXPECT_TRUE(nullptr != bucket.GetData(0, 24)); + EXPECT_TRUE(nullptr == bucket.GetData(0, 25)); bucket.SetSize(23); - EXPECT_TRUE(NULL == bucket.GetData(0, 24)); + EXPECT_TRUE(nullptr == bucket.GetData(0, 24)); } TEST(CommonDecoderBucket, SetData) { @@ -112,7 +112,7 @@ const uint32_t CommonDecoderTest::kInvalidShmId; TEST_F(CommonDecoderTest, DoCommonCommandInvalidCommand) { - EXPECT_EQ(error::kUnknownCommand, decoder_.DoCommand(999999, 0, NULL)); + EXPECT_EQ(error::kUnknownCommand, decoder_.DoCommand(999999, 0, nullptr)); } TEST_F(CommonDecoderTest, HandleNoop) { @@ -144,19 +144,19 @@ const uint32_t kBucketLength1 = 1234; const uint32_t kBucketLength2 = 78; // Check the bucket does not exist. - EXPECT_TRUE(NULL == decoder_.GetBucket(kBucketId)); + EXPECT_TRUE(nullptr == decoder_.GetBucket(kBucketId)); // Check we can create one. cmd.Init(kBucketId, kBucketLength1); EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); CommonDecoder::Bucket* bucket; bucket = decoder_.GetBucket(kBucketId); - EXPECT_TRUE(NULL != bucket); + EXPECT_TRUE(nullptr != bucket); EXPECT_EQ(kBucketLength1, bucket->size()); // Check we can change it. cmd.Init(kBucketId, kBucketLength2); EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); bucket = decoder_.GetBucket(kBucketId); - EXPECT_TRUE(NULL != bucket); + EXPECT_TRUE(nullptr != bucket); EXPECT_EQ(kBucketLength2, bucket->size()); // Check we can delete it. cmd.Init(kBucketId, 0);
diff --git a/gpu/command_buffer/service/context_group.cc b/gpu/command_buffer/service/context_group.cc index f7f2b1b75..8f9f9fd2 100644 --- a/gpu/command_buffer/service/context_group.cc +++ b/gpu/command_buffer/service/context_group.cc
@@ -576,13 +576,13 @@ ReportProgress(); } - if (renderbuffer_manager_ != NULL) { + if (renderbuffer_manager_ != nullptr) { renderbuffer_manager_->Destroy(have_context); renderbuffer_manager_.reset(); ReportProgress(); } - if (texture_manager_ != NULL) { + if (texture_manager_ != nullptr) { if (!have_context) texture_manager_->MarkContextLost(); texture_manager_->Destroy(); @@ -590,31 +590,31 @@ ReportProgress(); } - if (path_manager_ != NULL) { + if (path_manager_ != nullptr) { path_manager_->Destroy(have_context); path_manager_.reset(); ReportProgress(); } - if (program_manager_ != NULL) { + if (program_manager_ != nullptr) { program_manager_->Destroy(have_context); program_manager_.reset(); ReportProgress(); } - if (shader_manager_ != NULL) { + if (shader_manager_ != nullptr) { shader_manager_->Destroy(have_context); shader_manager_.reset(); ReportProgress(); } - if (sampler_manager_ != NULL) { + if (sampler_manager_ != nullptr) { sampler_manager_->Destroy(have_context); sampler_manager_.reset(); ReportProgress(); } - memory_tracker_ = NULL; + memory_tracker_ = nullptr; if (passthrough_resources_) { gl::GLApi* api = have_context ? gl::g_current_gl_context : nullptr;
diff --git a/gpu/command_buffer/service/context_group.h b/gpu/command_buffer/service/context_group.h index 9ea3260..bfd64f8 100644 --- a/gpu/command_buffer/service/context_group.h +++ b/gpu/command_buffer/service/context_group.h
@@ -179,9 +179,7 @@ return program_manager_.get(); } - bool has_program_cache() const { - return program_cache_ != NULL; - } + bool has_program_cache() const { return program_cache_ != nullptr; } void set_program_cache(ProgramCache* program_cache) { program_cache_ = program_cache;
diff --git a/gpu/command_buffer/service/context_group_unittest.cc b/gpu/command_buffer/service/context_group_unittest.cc index b2b5ce2..fdb57aa5 100644 --- a/gpu/command_buffer/service/context_group_unittest.cc +++ b/gpu/command_buffer/service/context_group_unittest.cc
@@ -74,11 +74,11 @@ EXPECT_EQ(0u, group_->max_fragment_uniform_vectors()); EXPECT_EQ(0u, group_->max_varying_vectors()); EXPECT_EQ(0u, group_->max_vertex_uniform_vectors()); - EXPECT_TRUE(group_->buffer_manager() == NULL); - EXPECT_TRUE(group_->renderbuffer_manager() == NULL); - EXPECT_TRUE(group_->texture_manager() == NULL); - EXPECT_TRUE(group_->program_manager() == NULL); - EXPECT_TRUE(group_->shader_manager() == NULL); + EXPECT_TRUE(group_->buffer_manager() == nullptr); + EXPECT_TRUE(group_->renderbuffer_manager() == nullptr); + EXPECT_TRUE(group_->texture_manager() == nullptr); + EXPECT_TRUE(group_->program_manager() == nullptr); + EXPECT_TRUE(group_->shader_manager() == nullptr); EXPECT_FALSE(group_->use_passthrough_cmd_decoder()); } @@ -102,18 +102,18 @@ group_->max_varying_vectors()); EXPECT_EQ(static_cast<uint32_t>(TestHelper::kMaxVertexUniformVectors), group_->max_vertex_uniform_vectors()); - EXPECT_TRUE(group_->buffer_manager() != NULL); - EXPECT_TRUE(group_->renderbuffer_manager() != NULL); - EXPECT_TRUE(group_->texture_manager() != NULL); - EXPECT_TRUE(group_->program_manager() != NULL); - EXPECT_TRUE(group_->shader_manager() != NULL); + EXPECT_TRUE(group_->buffer_manager() != nullptr); + EXPECT_TRUE(group_->renderbuffer_manager() != nullptr); + EXPECT_TRUE(group_->texture_manager() != nullptr); + EXPECT_TRUE(group_->program_manager() != nullptr); + EXPECT_TRUE(group_->shader_manager() != nullptr); group_->Destroy(decoder_.get(), false); - EXPECT_TRUE(group_->buffer_manager() == NULL); - EXPECT_TRUE(group_->renderbuffer_manager() == NULL); - EXPECT_TRUE(group_->texture_manager() == NULL); - EXPECT_TRUE(group_->program_manager() == NULL); - EXPECT_TRUE(group_->shader_manager() == NULL); + EXPECT_TRUE(group_->buffer_manager() == nullptr); + EXPECT_TRUE(group_->renderbuffer_manager() == nullptr); + EXPECT_TRUE(group_->texture_manager() == nullptr); + EXPECT_TRUE(group_->program_manager() == nullptr); + EXPECT_TRUE(group_->shader_manager() == nullptr); } TEST_F(ContextGroupTest, MultipleContexts) { @@ -140,27 +140,27 @@ DisallowedFeatures()), gpu::ContextResult::kSuccess); - EXPECT_TRUE(group_->buffer_manager() != NULL); - EXPECT_TRUE(group_->renderbuffer_manager() != NULL); - EXPECT_TRUE(group_->texture_manager() != NULL); - EXPECT_TRUE(group_->program_manager() != NULL); - EXPECT_TRUE(group_->shader_manager() != NULL); + EXPECT_TRUE(group_->buffer_manager() != nullptr); + EXPECT_TRUE(group_->renderbuffer_manager() != nullptr); + EXPECT_TRUE(group_->texture_manager() != nullptr); + EXPECT_TRUE(group_->program_manager() != nullptr); + EXPECT_TRUE(group_->shader_manager() != nullptr); group_->Destroy(decoder_.get(), false); - EXPECT_TRUE(group_->buffer_manager() != NULL); - EXPECT_TRUE(group_->renderbuffer_manager() != NULL); - EXPECT_TRUE(group_->texture_manager() != NULL); - EXPECT_TRUE(group_->program_manager() != NULL); - EXPECT_TRUE(group_->shader_manager() != NULL); + EXPECT_TRUE(group_->buffer_manager() != nullptr); + EXPECT_TRUE(group_->renderbuffer_manager() != nullptr); + EXPECT_TRUE(group_->texture_manager() != nullptr); + EXPECT_TRUE(group_->program_manager() != nullptr); + EXPECT_TRUE(group_->shader_manager() != nullptr); group_->Destroy(decoder2_.get(), false); - EXPECT_TRUE(group_->buffer_manager() == NULL); - EXPECT_TRUE(group_->renderbuffer_manager() == NULL); - EXPECT_TRUE(group_->texture_manager() == NULL); - EXPECT_TRUE(group_->program_manager() == NULL); - EXPECT_TRUE(group_->shader_manager() == NULL); + EXPECT_TRUE(group_->buffer_manager() == nullptr); + EXPECT_TRUE(group_->renderbuffer_manager() == nullptr); + EXPECT_TRUE(group_->texture_manager() == nullptr); + EXPECT_TRUE(group_->program_manager() == nullptr); + EXPECT_TRUE(group_->shader_manager() == nullptr); } } // namespace gles2
diff --git a/gpu/command_buffer/service/context_state.cc b/gpu/command_buffer/service/context_state.cc index c0dfbab..5ec598b 100644 --- a/gpu/command_buffer/service/context_state.cc +++ b/gpu/command_buffer/service/context_state.cc
@@ -791,42 +791,42 @@ for (size_t jj = 0; jj < texture_units.size(); ++jj) { TextureUnit& unit = texture_units[jj]; if (unit.bound_texture_2d.get() == texture) { - unit.bound_texture_2d = NULL; + unit.bound_texture_2d = nullptr; if (active_unit != jj) { api()->glActiveTextureFn(GL_TEXTURE0 + jj); active_unit = jj; } api()->glBindTextureFn(GL_TEXTURE_2D, 0); } else if (unit.bound_texture_cube_map.get() == texture) { - unit.bound_texture_cube_map = NULL; + unit.bound_texture_cube_map = nullptr; if (active_unit != jj) { api()->glActiveTextureFn(GL_TEXTURE0 + jj); active_unit = jj; } api()->glBindTextureFn(GL_TEXTURE_CUBE_MAP, 0); } else if (unit.bound_texture_external_oes.get() == texture) { - unit.bound_texture_external_oes = NULL; + unit.bound_texture_external_oes = nullptr; if (active_unit != jj) { api()->glActiveTextureFn(GL_TEXTURE0 + jj); active_unit = jj; } api()->glBindTextureFn(GL_TEXTURE_EXTERNAL_OES, 0); } else if (unit.bound_texture_rectangle_arb.get() == texture) { - unit.bound_texture_rectangle_arb = NULL; + unit.bound_texture_rectangle_arb = nullptr; if (active_unit != jj) { api()->glActiveTextureFn(GL_TEXTURE0 + jj); active_unit = jj; } api()->glBindTextureFn(GL_TEXTURE_RECTANGLE_ARB, 0); } else if (unit.bound_texture_3d.get() == texture) { - unit.bound_texture_3d = NULL; + unit.bound_texture_3d = nullptr; if (active_unit != jj) { api()->glActiveTextureFn(GL_TEXTURE0 + jj); active_unit = jj; } api()->glBindTextureFn(GL_TEXTURE_3D, 0); } else if (unit.bound_texture_2d_array.get() == texture) { - unit.bound_texture_2d_array = NULL; + unit.bound_texture_2d_array = nullptr; if (active_unit != jj) { api()->glActiveTextureFn(GL_TEXTURE0 + jj); active_unit = jj;
diff --git a/gpu/command_buffer/service/feature_info.cc b/gpu/command_buffer/service/feature_info.cc index d8c940d..5c00fcd0 100644 --- a/gpu/command_buffer/service/feature_info.cc +++ b/gpu/command_buffer/service/feature_info.cc
@@ -1084,10 +1084,8 @@ #if defined(OS_MACOSX) || defined(OS_CHROMEOS) // TODO(dcastagna): Determine ycbcr_420v_image on CrOS at runtime // querying minigbm. https://crbug.com/646148 - if (gl::GetGLImplementation() != gl::kGLImplementationOSMesaGL) { - AddExtensionString("GL_CHROMIUM_ycbcr_420v_image"); - feature_flags_.chromium_image_ycbcr_420v = true; - } + AddExtensionString("GL_CHROMIUM_ycbcr_420v_image"); + feature_flags_.chromium_image_ycbcr_420v = true; #endif if (gfx::HasExtension(extensions, "GL_APPLE_ycbcr_422")) { @@ -1637,13 +1635,13 @@ // Nearest filter needed for framebuffer completeness on some drivers. glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST); glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA32F, width, width, 0, GL_RGBA, - GL_FLOAT, NULL); + GL_FLOAT, nullptr); glBindFramebufferEXT(GL_FRAMEBUFFER, fb_id); glFramebufferTexture2DEXT(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_TEXTURE_2D, tex_id, 0); GLenum status_rgba = glCheckFramebufferStatusEXT(GL_FRAMEBUFFER); glTexImage2D(GL_TEXTURE_2D, 0, GL_RGB32F, width, width, 0, GL_RGB, GL_FLOAT, - NULL); + nullptr); GLenum status_rgb = glCheckFramebufferStatusEXT(GL_FRAMEBUFFER); // For desktop systems, check to see if we support rendering to the full @@ -1659,7 +1657,7 @@ DCHECK_EQ(arraysize(internal_formats), arraysize(formats)); for (size_t i = 0; i < arraysize(formats); ++i) { glTexImage2D(GL_TEXTURE_2D, 0, internal_formats[i], width, width, 0, - formats[i], GL_FLOAT, NULL); + formats[i], GL_FLOAT, nullptr); full_float_support &= glCheckFramebufferStatusEXT(GL_FRAMEBUFFER) == GL_FRAMEBUFFER_COMPLETE; }
diff --git a/gpu/command_buffer/service/feature_info_unittest.cc b/gpu/command_buffer/service/feature_info_unittest.cc index ae2cdfb..a3d96fb 100644 --- a/gpu/command_buffer/service/feature_info_unittest.cc +++ b/gpu/command_buffer/service/feature_info_unittest.cc
@@ -159,7 +159,7 @@ } void TearDown() override { - info_ = NULL; + info_ = nullptr; GpuServiceTest::TearDown(); }
diff --git a/gpu/command_buffer/service/framebuffer_manager.cc b/gpu/command_buffer/service/framebuffer_manager.cc index 1f20f98..bf5d384 100644 --- a/gpu/command_buffer/service/framebuffer_manager.cc +++ b/gpu/command_buffer/service/framebuffer_manager.cc
@@ -21,9 +21,8 @@ DecoderFramebufferState::DecoderFramebufferState() : clear_state_dirty(false), - bound_read_framebuffer(NULL), - bound_draw_framebuffer(NULL) { -} + bound_read_framebuffer(nullptr), + bound_draw_framebuffer(nullptr) {} DecoderFramebufferState::~DecoderFramebufferState() = default; @@ -406,7 +405,7 @@ glDeleteFramebuffersEXT(1, &id); } manager_->StopTracking(this); - manager_ = NULL; + manager_ = nullptr; } for (auto& attachment : attachments_) { @@ -908,7 +907,7 @@ if (attachment->IsRenderbuffer(renderbuffer)) { // TODO(gman): manually detach renderbuffer. // glFramebufferRenderbufferEXT(target, it->first, GL_RENDERBUFFER, 0); - AttachRenderbuffer(it->first, NULL); + AttachRenderbuffer(it->first, nullptr); done = false; break; } @@ -927,7 +926,7 @@ if (attachment->IsTexture(texture_ref)) { // TODO(gman): manually detach texture. // glFramebufferTexture2DEXT(target, it->first, GL_TEXTURE_2D, 0, 0); - AttachTexture(it->first, NULL, GL_TEXTURE_2D, 0, 0); + AttachTexture(it->first, nullptr, GL_TEXTURE_2D, 0, 0); done = false; break; } @@ -964,7 +963,7 @@ Framebuffer* FramebufferManager::GetFramebuffer( GLuint client_id) { FramebufferMap::iterator it = framebuffers_.find(client_id); - return it != framebuffers_.end() ? it->second.get() : NULL; + return it != framebuffers_.end() ? it->second.get() : nullptr; } void FramebufferManager::RemoveFramebuffer(GLuint client_id) { @@ -1040,7 +1039,7 @@ if (it != attachments_.end()) { return it->second.get(); } - return NULL; + return nullptr; } const Framebuffer::Attachment* Framebuffer::GetReadBufferAttachment() const {
diff --git a/gpu/command_buffer/service/gl_context_virtual.cc b/gpu/command_buffer/service/gl_context_virtual.cc index 046489d6..ba0bb8c 100644 --- a/gpu/command_buffer/service/gl_context_virtual.cc +++ b/gpu/command_buffer/service/gl_context_virtual.cc
@@ -30,7 +30,7 @@ void GLContextVirtual::Destroy() { shared_context_->OnReleaseVirtuallyCurrent(this); - shared_context_ = NULL; + shared_context_ = nullptr; } bool GLContextVirtual::MakeCurrent(gl::GLSurface* surface) { @@ -55,7 +55,7 @@ return shared_context_->IsCurrent(surface); // Otherwise, only insure the context itself is current. - return shared_context_->IsCurrent(NULL); + return shared_context_->IsCurrent(nullptr); } void* GLContextVirtual::GetHandle() {
diff --git a/gpu/command_buffer/service/gl_state_restorer_impl.cc b/gpu/command_buffer/service/gl_state_restorer_impl.cc index aec71ab..c04e16a 100644 --- a/gpu/command_buffer/service/gl_state_restorer_impl.cc +++ b/gpu/command_buffer/service/gl_state_restorer_impl.cc
@@ -24,13 +24,13 @@ const GLStateRestorerImpl* restorer_impl = static_cast<const GLStateRestorerImpl*>(prev_state); - decoder_->RestoreState( - restorer_impl ? restorer_impl->GetContextState() : NULL); + decoder_->RestoreState(restorer_impl ? restorer_impl->GetContextState() + : nullptr); } void GLStateRestorerImpl::RestoreAllTextureUnitAndSamplerBindings() { DCHECK(decoder_.get()); - decoder_->RestoreAllTextureUnitAndSamplerBindings(NULL); + decoder_->RestoreAllTextureUnitAndSamplerBindings(nullptr); } void GLStateRestorerImpl::RestoreActiveTexture() {
diff --git a/gpu/command_buffer/service/gles2_cmd_apply_framebuffer_attachment_cmaa_intel.cc b/gpu/command_buffer/service/gles2_cmd_apply_framebuffer_attachment_cmaa_intel.cc index 0e31468..d8ee25df 100644 --- a/gpu/command_buffer/service/gles2_cmd_apply_framebuffer_attachment_cmaa_intel.cc +++ b/gpu/command_buffer/service/gles2_cmd_apply_framebuffer_attachment_cmaa_intel.cc
@@ -600,7 +600,7 @@ GLint info_log_length; glGetProgramiv(program, GL_INFO_LOG_LENGTH, &info_log_length); std::vector<GLchar> info_log(info_log_length); - glGetProgramInfoLog(program, static_cast<GLsizei>(info_log.size()), NULL, + glGetProgramInfoLog(program, static_cast<GLsizei>(info_log.size()), nullptr, &info_log[0]); DLOG(ERROR) << "ApplyFramebufferAttachmentCMAAINTEL: " << "program link failed: " << &info_log[0]; @@ -639,7 +639,7 @@ std::string header_str = header.str(); const char* source_array[4] = {header_str.c_str(), defines, "\n", source}; - glShaderSource(shader, 4, source_array, NULL); + glShaderSource(shader, 4, source_array, nullptr); glCompileShader(shader); @@ -650,7 +650,7 @@ GLint info_log_length; glGetShaderiv(shader, GL_INFO_LOG_LENGTH, &info_log_length); std::vector<GLchar> info_log(info_log_length); - glGetShaderInfoLog(shader, static_cast<GLsizei>(info_log.size()), NULL, + glGetShaderInfoLog(shader, static_cast<GLsizei>(info_log.size()), nullptr, &info_log[0]); DLOG(ERROR) << "ApplyFramebufferAttachmentCMAAINTEL: " << "shader compilation failed: "
diff --git a/gpu/command_buffer/service/gles2_cmd_decoder.cc b/gpu/command_buffer/service/gles2_cmd_decoder.cc index 7c46d69..8c7e4f10 100644 --- a/gpu/command_buffer/service/gles2_cmd_decoder.cc +++ b/gpu/command_buffer/service/gles2_cmd_decoder.cc
@@ -16458,7 +16458,7 @@ void* mapped = api()->glMapBufferRangeFn(GL_ARRAY_BUFFER, 0, buffer->size(), GL_MAP_READ_BIT); if (!mapped) { - DLOG(ERROR) << "glMapBufferRange unexpectedly returned NULL"; + DLOG(ERROR) << "glMapBufferRange unexpectedly returned nullptr"; MarkContextLost(error::kOutOfMemory); group_->LoseContexts(error::kUnknown); return;
diff --git a/gpu/command_buffer/service/gles2_cmd_decoder_autogen.h b/gpu/command_buffer/service/gles2_cmd_decoder_autogen.h index 1ae0a8da..a584982 100644 --- a/gpu/command_buffer/service/gles2_cmd_decoder_autogen.h +++ b/gpu/command_buffer/service/gles2_cmd_decoder_autogen.h
@@ -315,7 +315,7 @@ LOCAL_SET_GL_ERROR(GL_INVALID_VALUE, "glBufferSubData", "size < 0"); return error::kNoError; } - if (data == NULL) { + if (data == nullptr) { return error::kOutOfBounds; } DoBufferSubData(target, offset, size, data); @@ -399,7 +399,7 @@ LOCAL_SET_GL_ERROR_INVALID_ENUM("glClearBufferfv", buffer, "buffer"); return error::kNoError; } - if (value == NULL) { + if (value == nullptr) { return error::kOutOfBounds; } DoClearBufferfv(buffer, drawbuffers, value); @@ -429,7 +429,7 @@ LOCAL_SET_GL_ERROR_INVALID_ENUM("glClearBufferiv", buffer, "buffer"); return error::kNoError; } - if (value == NULL) { + if (value == nullptr) { return error::kOutOfBounds; } DoClearBufferiv(buffer, drawbuffers, value); @@ -459,7 +459,7 @@ LOCAL_SET_GL_ERROR_INVALID_ENUM("glClearBufferuiv", buffer, "buffer"); return error::kNoError; } - if (value == NULL) { + if (value == nullptr) { return error::kOutOfBounds; } DoClearBufferuiv(buffer, drawbuffers, value); @@ -744,7 +744,7 @@ } volatile const GLuint* buffers = GetImmediateDataAs<volatile const GLuint*>( c, data_size, immediate_data_size); - if (buffers == NULL) { + if (buffers == nullptr) { return error::kOutOfBounds; } DeleteBuffersHelper(n, buffers); @@ -765,7 +765,7 @@ volatile const GLuint* framebuffers = GetImmediateDataAs<volatile const GLuint*>(c, data_size, immediate_data_size); - if (framebuffers == NULL) { + if (framebuffers == nullptr) { return error::kOutOfBounds; } DeleteFramebuffersHelper(n, framebuffers); @@ -786,7 +786,7 @@ volatile const GLuint* renderbuffers = GetImmediateDataAs<volatile const GLuint*>(c, data_size, immediate_data_size); - if (renderbuffers == NULL) { + if (renderbuffers == nullptr) { return error::kOutOfBounds; } DeleteRenderbuffersHelper(n, renderbuffers); @@ -808,7 +808,7 @@ } volatile const GLuint* samplers = GetImmediateDataAs<volatile const GLuint*>( c, data_size, immediate_data_size); - if (samplers == NULL) { + if (samplers == nullptr) { return error::kOutOfBounds; } DeleteSamplersHelper(n, samplers); @@ -839,7 +839,7 @@ } volatile const GLuint* textures = GetImmediateDataAs<volatile const GLuint*>( c, data_size, immediate_data_size); - if (textures == NULL) { + if (textures == nullptr) { return error::kOutOfBounds; } DeleteTexturesHelper(n, textures); @@ -862,7 +862,7 @@ } volatile const GLuint* ids = GetImmediateDataAs<volatile const GLuint*>( c, data_size, immediate_data_size); - if (ids == NULL) { + if (ids == nullptr) { return error::kOutOfBounds; } DeleteTransformFeedbacksHelper(n, ids); @@ -1116,7 +1116,7 @@ } volatile GLuint* buffers = GetImmediateDataAs<volatile GLuint*>(c, data_size, immediate_data_size); - if (buffers == NULL) { + if (buffers == nullptr) { return error::kOutOfBounds; } auto buffers_copy = std::make_unique<GLuint[]>(n); @@ -1156,7 +1156,7 @@ } volatile GLuint* framebuffers = GetImmediateDataAs<volatile GLuint*>(c, data_size, immediate_data_size); - if (framebuffers == NULL) { + if (framebuffers == nullptr) { return error::kOutOfBounds; } auto framebuffers_copy = std::make_unique<GLuint[]>(n); @@ -1182,7 +1182,7 @@ } volatile GLuint* renderbuffers = GetImmediateDataAs<volatile GLuint*>(c, data_size, immediate_data_size); - if (renderbuffers == NULL) { + if (renderbuffers == nullptr) { return error::kOutOfBounds; } auto renderbuffers_copy = std::make_unique<GLuint[]>(n); @@ -1209,7 +1209,7 @@ } volatile GLuint* samplers = GetImmediateDataAs<volatile GLuint*>(c, data_size, immediate_data_size); - if (samplers == NULL) { + if (samplers == nullptr) { return error::kOutOfBounds; } auto samplers_copy = std::make_unique<GLuint[]>(n); @@ -1234,7 +1234,7 @@ } volatile GLuint* textures = GetImmediateDataAs<volatile GLuint*>(c, data_size, immediate_data_size); - if (textures == NULL) { + if (textures == nullptr) { return error::kOutOfBounds; } auto textures_copy = std::make_unique<GLuint[]>(n); @@ -1262,7 +1262,7 @@ } volatile GLuint* ids = GetImmediateDataAs<volatile GLuint*>(c, data_size, immediate_data_size); - if (ids == NULL) { + if (ids == nullptr) { return error::kOutOfBounds; } auto ids_copy = std::make_unique<GLuint[]>(n); @@ -1289,12 +1289,12 @@ } Result* result = GetSharedMemoryAs<Result*>( c.params_shm_id, c.params_shm_offset, Result::ComputeSize(num_values)); - GLboolean* params = result ? result->GetData() : NULL; + GLboolean* params = result ? result->GetData() : nullptr; if (!validators_->g_l_state.IsValid(pname)) { LOCAL_SET_GL_ERROR_INVALID_ENUM("glGetBooleanv", pname, "pname"); return error::kNoError; } - if (params == NULL) { + if (params == nullptr) { return error::kOutOfBounds; } LOCAL_COPY_REAL_GL_ERRORS_TO_WRAPPER("GetBooleanv"); @@ -1328,7 +1328,7 @@ } Result* result = GetSharedMemoryAs<Result*>( c.params_shm_id, c.params_shm_offset, Result::ComputeSize(num_values)); - GLint64* params = result ? result->GetData() : NULL; + GLint64* params = result ? result->GetData() : nullptr; if (!validators_->buffer_target.IsValid(target)) { LOCAL_SET_GL_ERROR_INVALID_ENUM("glGetBufferParameteri64v", target, "target"); @@ -1338,7 +1338,7 @@ LOCAL_SET_GL_ERROR_INVALID_ENUM("glGetBufferParameteri64v", pname, "pname"); return error::kNoError; } - if (params == NULL) { + if (params == nullptr) { return error::kOutOfBounds; } // Check that the client initialized the result. @@ -1364,7 +1364,7 @@ } Result* result = GetSharedMemoryAs<Result*>( c.params_shm_id, c.params_shm_offset, Result::ComputeSize(num_values)); - GLint* params = result ? result->GetData() : NULL; + GLint* params = result ? result->GetData() : nullptr; if (!validators_->buffer_target.IsValid(target)) { LOCAL_SET_GL_ERROR_INVALID_ENUM("glGetBufferParameteriv", target, "target"); return error::kNoError; @@ -1373,7 +1373,7 @@ LOCAL_SET_GL_ERROR_INVALID_ENUM("glGetBufferParameteriv", pname, "pname"); return error::kNoError; } - if (params == NULL) { + if (params == nullptr) { return error::kOutOfBounds; } // Check that the client initialized the result. @@ -1411,12 +1411,12 @@ } Result* result = GetSharedMemoryAs<Result*>( c.params_shm_id, c.params_shm_offset, Result::ComputeSize(num_values)); - GLfloat* params = result ? result->GetData() : NULL; + GLfloat* params = result ? result->GetData() : nullptr; if (!validators_->g_l_state.IsValid(pname)) { LOCAL_SET_GL_ERROR_INVALID_ENUM("glGetFloatv", pname, "pname"); return error::kNoError; } - if (params == NULL) { + if (params == nullptr) { return error::kOutOfBounds; } LOCAL_COPY_REAL_GL_ERRORS_TO_WRAPPER("GetFloatv"); @@ -1451,7 +1451,7 @@ } Result* result = GetSharedMemoryAs<Result*>( c.params_shm_id, c.params_shm_offset, Result::ComputeSize(num_values)); - GLint* params = result ? result->GetData() : NULL; + GLint* params = result ? result->GetData() : nullptr; if (!validators_->framebuffer_target.IsValid(target)) { LOCAL_SET_GL_ERROR_INVALID_ENUM("glGetFramebufferAttachmentParameteriv", target, "target"); @@ -1467,7 +1467,7 @@ pname, "pname"); return error::kNoError; } - if (params == NULL) { + if (params == nullptr) { return error::kOutOfBounds; } LOCAL_COPY_REAL_GL_ERRORS_TO_WRAPPER("GetFramebufferAttachmentParameteriv"); @@ -1500,12 +1500,12 @@ } Result* result = GetSharedMemoryAs<Result*>( c.params_shm_id, c.params_shm_offset, Result::ComputeSize(num_values)); - GLint64* params = result ? result->GetData() : NULL; + GLint64* params = result ? result->GetData() : nullptr; if (!validators_->g_l_state.IsValid(pname)) { LOCAL_SET_GL_ERROR_INVALID_ENUM("glGetInteger64v", pname, "pname"); return error::kNoError; } - if (params == NULL) { + if (params == nullptr) { return error::kOutOfBounds; } LOCAL_COPY_REAL_GL_ERRORS_TO_WRAPPER("GetInteger64v"); @@ -1538,12 +1538,12 @@ } Result* result = GetSharedMemoryAs<Result*>(c.data_shm_id, c.data_shm_offset, Result::ComputeSize(num_values)); - GLint* data = result ? result->GetData() : NULL; + GLint* data = result ? result->GetData() : nullptr; if (!validators_->indexed_g_l_state.IsValid(pname)) { LOCAL_SET_GL_ERROR_INVALID_ENUM("glGetIntegeri_v", pname, "pname"); return error::kNoError; } - if (data == NULL) { + if (data == nullptr) { return error::kOutOfBounds; } // Check that the client initialized the result. @@ -1571,12 +1571,12 @@ } Result* result = GetSharedMemoryAs<Result*>(c.data_shm_id, c.data_shm_offset, Result::ComputeSize(num_values)); - GLint64* data = result ? result->GetData() : NULL; + GLint64* data = result ? result->GetData() : nullptr; if (!validators_->indexed_g_l_state.IsValid(pname)) { LOCAL_SET_GL_ERROR_INVALID_ENUM("glGetInteger64i_v", pname, "pname"); return error::kNoError; } - if (data == NULL) { + if (data == nullptr) { return error::kOutOfBounds; } // Check that the client initialized the result. @@ -1601,12 +1601,12 @@ } Result* result = GetSharedMemoryAs<Result*>( c.params_shm_id, c.params_shm_offset, Result::ComputeSize(num_values)); - GLint* params = result ? result->GetData() : NULL; + GLint* params = result ? result->GetData() : nullptr; if (!validators_->g_l_state.IsValid(pname)) { LOCAL_SET_GL_ERROR_INVALID_ENUM("glGetIntegerv", pname, "pname"); return error::kNoError; } - if (params == NULL) { + if (params == nullptr) { return error::kOutOfBounds; } LOCAL_COPY_REAL_GL_ERRORS_TO_WRAPPER("GetIntegerv"); @@ -1637,12 +1637,12 @@ } Result* result = GetSharedMemoryAs<Result*>( c.params_shm_id, c.params_shm_offset, Result::ComputeSize(num_values)); - GLint* params = result ? result->GetData() : NULL; + GLint* params = result ? result->GetData() : nullptr; if (!validators_->program_parameter.IsValid(pname)) { LOCAL_SET_GL_ERROR_INVALID_ENUM("glGetProgramiv", pname, "pname"); return error::kNoError; } - if (params == NULL) { + if (params == nullptr) { return error::kOutOfBounds; } LOCAL_COPY_REAL_GL_ERRORS_TO_WRAPPER("GetProgramiv"); @@ -1675,7 +1675,7 @@ } Result* result = GetSharedMemoryAs<Result*>( c.params_shm_id, c.params_shm_offset, Result::ComputeSize(num_values)); - GLint* params = result ? result->GetData() : NULL; + GLint* params = result ? result->GetData() : nullptr; if (!validators_->render_buffer_target.IsValid(target)) { LOCAL_SET_GL_ERROR_INVALID_ENUM("glGetRenderbufferParameteriv", target, "target"); @@ -1686,7 +1686,7 @@ "pname"); return error::kNoError; } - if (params == NULL) { + if (params == nullptr) { return error::kOutOfBounds; } LOCAL_COPY_REAL_GL_ERRORS_TO_WRAPPER("GetRenderbufferParameteriv"); @@ -1720,12 +1720,12 @@ } Result* result = GetSharedMemoryAs<Result*>( c.params_shm_id, c.params_shm_offset, Result::ComputeSize(num_values)); - GLfloat* params = result ? result->GetData() : NULL; + GLfloat* params = result ? result->GetData() : nullptr; if (!validators_->sampler_parameter.IsValid(pname)) { LOCAL_SET_GL_ERROR_INVALID_ENUM("glGetSamplerParameterfv", pname, "pname"); return error::kNoError; } - if (params == NULL) { + if (params == nullptr) { return error::kOutOfBounds; } LOCAL_COPY_REAL_GL_ERRORS_TO_WRAPPER("GetSamplerParameterfv"); @@ -1759,12 +1759,12 @@ } Result* result = GetSharedMemoryAs<Result*>( c.params_shm_id, c.params_shm_offset, Result::ComputeSize(num_values)); - GLint* params = result ? result->GetData() : NULL; + GLint* params = result ? result->GetData() : nullptr; if (!validators_->sampler_parameter.IsValid(pname)) { LOCAL_SET_GL_ERROR_INVALID_ENUM("glGetSamplerParameteriv", pname, "pname"); return error::kNoError; } - if (params == NULL) { + if (params == nullptr) { return error::kOutOfBounds; } LOCAL_COPY_REAL_GL_ERRORS_TO_WRAPPER("GetSamplerParameteriv"); @@ -1795,12 +1795,12 @@ } Result* result = GetSharedMemoryAs<Result*>( c.params_shm_id, c.params_shm_offset, Result::ComputeSize(num_values)); - GLint* params = result ? result->GetData() : NULL; + GLint* params = result ? result->GetData() : nullptr; if (!validators_->shader_parameter.IsValid(pname)) { LOCAL_SET_GL_ERROR_INVALID_ENUM("glGetShaderiv", pname, "pname"); return error::kNoError; } - if (params == NULL) { + if (params == nullptr) { return error::kOutOfBounds; } LOCAL_COPY_REAL_GL_ERRORS_TO_WRAPPER("GetShaderiv"); @@ -1832,12 +1832,12 @@ } Result* result = GetSharedMemoryAs<Result*>( c.values_shm_id, c.values_shm_offset, Result::ComputeSize(num_values)); - GLint* values = result ? result->GetData() : NULL; + GLint* values = result ? result->GetData() : nullptr; if (!validators_->sync_parameter.IsValid(pname)) { LOCAL_SET_GL_ERROR_INVALID_ENUM("glGetSynciv", pname, "pname"); return error::kNoError; } - if (values == NULL) { + if (values == nullptr) { return error::kOutOfBounds; } LOCAL_COPY_REAL_GL_ERRORS_TO_WRAPPER("GetSynciv"); @@ -1868,7 +1868,7 @@ } Result* result = GetSharedMemoryAs<Result*>( c.params_shm_id, c.params_shm_offset, Result::ComputeSize(num_values)); - GLfloat* params = result ? result->GetData() : NULL; + GLfloat* params = result ? result->GetData() : nullptr; if (!validators_->get_tex_param_target.IsValid(target)) { LOCAL_SET_GL_ERROR_INVALID_ENUM("glGetTexParameterfv", target, "target"); return error::kNoError; @@ -1877,7 +1877,7 @@ LOCAL_SET_GL_ERROR_INVALID_ENUM("glGetTexParameterfv", pname, "pname"); return error::kNoError; } - if (params == NULL) { + if (params == nullptr) { return error::kOutOfBounds; } LOCAL_COPY_REAL_GL_ERRORS_TO_WRAPPER("GetTexParameterfv"); @@ -1908,7 +1908,7 @@ } Result* result = GetSharedMemoryAs<Result*>( c.params_shm_id, c.params_shm_offset, Result::ComputeSize(num_values)); - GLint* params = result ? result->GetData() : NULL; + GLint* params = result ? result->GetData() : nullptr; if (!validators_->get_tex_param_target.IsValid(target)) { LOCAL_SET_GL_ERROR_INVALID_ENUM("glGetTexParameteriv", target, "target"); return error::kNoError; @@ -1917,7 +1917,7 @@ LOCAL_SET_GL_ERROR_INVALID_ENUM("glGetTexParameteriv", pname, "pname"); return error::kNoError; } - if (params == NULL) { + if (params == nullptr) { return error::kOutOfBounds; } LOCAL_COPY_REAL_GL_ERRORS_TO_WRAPPER("GetTexParameteriv"); @@ -1948,12 +1948,12 @@ } Result* result = GetSharedMemoryAs<Result*>( c.params_shm_id, c.params_shm_offset, Result::ComputeSize(num_values)); - GLfloat* params = result ? result->GetData() : NULL; + GLfloat* params = result ? result->GetData() : nullptr; if (!validators_->vertex_attribute.IsValid(pname)) { LOCAL_SET_GL_ERROR_INVALID_ENUM("glGetVertexAttribfv", pname, "pname"); return error::kNoError; } - if (params == NULL) { + if (params == nullptr) { return error::kOutOfBounds; } LOCAL_COPY_REAL_GL_ERRORS_TO_WRAPPER("GetVertexAttribfv"); @@ -1984,12 +1984,12 @@ } Result* result = GetSharedMemoryAs<Result*>( c.params_shm_id, c.params_shm_offset, Result::ComputeSize(num_values)); - GLint* params = result ? result->GetData() : NULL; + GLint* params = result ? result->GetData() : nullptr; if (!validators_->vertex_attribute.IsValid(pname)) { LOCAL_SET_GL_ERROR_INVALID_ENUM("glGetVertexAttribiv", pname, "pname"); return error::kNoError; } - if (params == NULL) { + if (params == nullptr) { return error::kOutOfBounds; } LOCAL_COPY_REAL_GL_ERRORS_TO_WRAPPER("GetVertexAttribiv"); @@ -2022,12 +2022,12 @@ } Result* result = GetSharedMemoryAs<Result*>( c.params_shm_id, c.params_shm_offset, Result::ComputeSize(num_values)); - GLint* params = result ? result->GetData() : NULL; + GLint* params = result ? result->GetData() : nullptr; if (!validators_->vertex_attribute.IsValid(pname)) { LOCAL_SET_GL_ERROR_INVALID_ENUM("glGetVertexAttribIiv", pname, "pname"); return error::kNoError; } - if (params == NULL) { + if (params == nullptr) { return error::kOutOfBounds; } LOCAL_COPY_REAL_GL_ERRORS_TO_WRAPPER("GetVertexAttribIiv"); @@ -2060,12 +2060,12 @@ } Result* result = GetSharedMemoryAs<Result*>( c.params_shm_id, c.params_shm_offset, Result::ComputeSize(num_values)); - GLuint* params = result ? result->GetData() : NULL; + GLuint* params = result ? result->GetData() : nullptr; if (!validators_->vertex_attribute.IsValid(pname)) { LOCAL_SET_GL_ERROR_INVALID_ENUM("glGetVertexAttribIuiv", pname, "pname"); return error::kNoError; } - if (params == NULL) { + if (params == nullptr) { return error::kOutOfBounds; } LOCAL_COPY_REAL_GL_ERRORS_TO_WRAPPER("GetVertexAttribIuiv"); @@ -2156,7 +2156,7 @@ "count < 0"); return error::kNoError; } - if (attachments == NULL) { + if (attachments == nullptr) { return error::kOutOfBounds; } DoInvalidateFramebuffer(target, count, attachments); @@ -2198,7 +2198,7 @@ "count < 0"); return error::kNoError; } - if (attachments == NULL) { + if (attachments == nullptr) { return error::kOutOfBounds; } if (width < 0) { @@ -2542,7 +2542,7 @@ LOCAL_SET_GL_ERROR_INVALID_ENUM("glSamplerParameterfv", pname, "pname"); return error::kNoError; } - if (params == NULL) { + if (params == nullptr) { return error::kOutOfBounds; } DoSamplerParameterfv(sampler, pname, params); @@ -2590,7 +2590,7 @@ LOCAL_SET_GL_ERROR_INVALID_ENUM("glSamplerParameteriv", pname, "pname"); return error::kNoError; } - if (params == NULL) { + if (params == nullptr) { return error::kOutOfBounds; } DoSamplerParameteriv(sampler, pname, params); @@ -2642,9 +2642,9 @@ return error::kInvalidArguments; } const char** str = - strs.size() > 0 ? const_cast<const char**>(&strs[0]) : NULL; + strs.size() > 0 ? const_cast<const char**>(&strs[0]) : nullptr; const GLint* length = - len.size() > 0 ? const_cast<const GLint*>(&len[0]) : NULL; + len.size() > 0 ? const_cast<const GLint*>(&len[0]) : nullptr; (void)length; DoShaderSource(shader, count, str, length); return error::kNoError; @@ -2902,7 +2902,7 @@ LOCAL_SET_GL_ERROR_INVALID_ENUM("glTexParameterfv", pname, "pname"); return error::kNoError; } - if (params == NULL) { + if (params == nullptr) { return error::kOutOfBounds; } DoTexParameterfv(target, pname, params); @@ -2954,7 +2954,7 @@ LOCAL_SET_GL_ERROR_INVALID_ENUM("glTexParameteriv", pname, "pname"); return error::kNoError; } - if (params == NULL) { + if (params == nullptr) { return error::kOutOfBounds; } DoTexParameteriv(target, pname, params); @@ -3023,9 +3023,9 @@ return error::kInvalidArguments; } const char** varyings = - strs.size() > 0 ? const_cast<const char**>(&strs[0]) : NULL; + strs.size() > 0 ? const_cast<const char**>(&strs[0]) : nullptr; const GLint* length = - len.size() > 0 ? const_cast<const GLint*>(&len[0]) : NULL; + len.size() > 0 ? const_cast<const GLint*>(&len[0]) : nullptr; (void)length; GLenum buffermode = static_cast<GLenum>(c.buffermode); if (!validators_->buffer_mode.IsValid(buffermode)) { @@ -3071,7 +3071,7 @@ LOCAL_SET_GL_ERROR(GL_INVALID_VALUE, "glUniform1fv", "count < 0"); return error::kNoError; } - if (v == NULL) { + if (v == nullptr) { return error::kOutOfBounds; } DoUniform1fv(location, count, v); @@ -3108,7 +3108,7 @@ LOCAL_SET_GL_ERROR(GL_INVALID_VALUE, "glUniform1iv", "count < 0"); return error::kNoError; } - if (v == NULL) { + if (v == nullptr) { return error::kOutOfBounds; } DoUniform1iv(location, count, v); @@ -3152,7 +3152,7 @@ LOCAL_SET_GL_ERROR(GL_INVALID_VALUE, "glUniform1uiv", "count < 0"); return error::kNoError; } - if (v == NULL) { + if (v == nullptr) { return error::kOutOfBounds; } DoUniform1uiv(location, count, v); @@ -3194,7 +3194,7 @@ LOCAL_SET_GL_ERROR(GL_INVALID_VALUE, "glUniform2fv", "count < 0"); return error::kNoError; } - if (v == NULL) { + if (v == nullptr) { return error::kOutOfBounds; } DoUniform2fv(location, count, v); @@ -3235,7 +3235,7 @@ LOCAL_SET_GL_ERROR(GL_INVALID_VALUE, "glUniform2iv", "count < 0"); return error::kNoError; } - if (v == NULL) { + if (v == nullptr) { return error::kOutOfBounds; } DoUniform2iv(location, count, v); @@ -3280,7 +3280,7 @@ LOCAL_SET_GL_ERROR(GL_INVALID_VALUE, "glUniform2uiv", "count < 0"); return error::kNoError; } - if (v == NULL) { + if (v == nullptr) { return error::kOutOfBounds; } DoUniform2uiv(location, count, v); @@ -3323,7 +3323,7 @@ LOCAL_SET_GL_ERROR(GL_INVALID_VALUE, "glUniform3fv", "count < 0"); return error::kNoError; } - if (v == NULL) { + if (v == nullptr) { return error::kOutOfBounds; } DoUniform3fv(location, count, v); @@ -3365,7 +3365,7 @@ LOCAL_SET_GL_ERROR(GL_INVALID_VALUE, "glUniform3iv", "count < 0"); return error::kNoError; } - if (v == NULL) { + if (v == nullptr) { return error::kOutOfBounds; } DoUniform3iv(location, count, v); @@ -3411,7 +3411,7 @@ LOCAL_SET_GL_ERROR(GL_INVALID_VALUE, "glUniform3uiv", "count < 0"); return error::kNoError; } - if (v == NULL) { + if (v == nullptr) { return error::kOutOfBounds; } DoUniform3uiv(location, count, v); @@ -3455,7 +3455,7 @@ LOCAL_SET_GL_ERROR(GL_INVALID_VALUE, "glUniform4fv", "count < 0"); return error::kNoError; } - if (v == NULL) { + if (v == nullptr) { return error::kOutOfBounds; } DoUniform4fv(location, count, v); @@ -3498,7 +3498,7 @@ LOCAL_SET_GL_ERROR(GL_INVALID_VALUE, "glUniform4iv", "count < 0"); return error::kNoError; } - if (v == NULL) { + if (v == nullptr) { return error::kOutOfBounds; } DoUniform4iv(location, count, v); @@ -3545,7 +3545,7 @@ LOCAL_SET_GL_ERROR(GL_INVALID_VALUE, "glUniform4uiv", "count < 0"); return error::kNoError; } - if (v == NULL) { + if (v == nullptr) { return error::kOutOfBounds; } DoUniform4uiv(location, count, v); @@ -3575,7 +3575,7 @@ LOCAL_SET_GL_ERROR(GL_INVALID_VALUE, "glUniformMatrix2fv", "count < 0"); return error::kNoError; } - if (value == NULL) { + if (value == nullptr) { return error::kOutOfBounds; } DoUniformMatrix2fv(location, count, transpose, value); @@ -3607,7 +3607,7 @@ LOCAL_SET_GL_ERROR(GL_INVALID_VALUE, "glUniformMatrix2x3fv", "count < 0"); return error::kNoError; } - if (value == NULL) { + if (value == nullptr) { return error::kOutOfBounds; } DoUniformMatrix2x3fv(location, count, transpose, value); @@ -3639,7 +3639,7 @@ LOCAL_SET_GL_ERROR(GL_INVALID_VALUE, "glUniformMatrix2x4fv", "count < 0"); return error::kNoError; } - if (value == NULL) { + if (value == nullptr) { return error::kOutOfBounds; } DoUniformMatrix2x4fv(location, count, transpose, value); @@ -3669,7 +3669,7 @@ LOCAL_SET_GL_ERROR(GL_INVALID_VALUE, "glUniformMatrix3fv", "count < 0"); return error::kNoError; } - if (value == NULL) { + if (value == nullptr) { return error::kOutOfBounds; } DoUniformMatrix3fv(location, count, transpose, value); @@ -3701,7 +3701,7 @@ LOCAL_SET_GL_ERROR(GL_INVALID_VALUE, "glUniformMatrix3x2fv", "count < 0"); return error::kNoError; } - if (value == NULL) { + if (value == nullptr) { return error::kOutOfBounds; } DoUniformMatrix3x2fv(location, count, transpose, value); @@ -3733,7 +3733,7 @@ LOCAL_SET_GL_ERROR(GL_INVALID_VALUE, "glUniformMatrix3x4fv", "count < 0"); return error::kNoError; } - if (value == NULL) { + if (value == nullptr) { return error::kOutOfBounds; } DoUniformMatrix3x4fv(location, count, transpose, value); @@ -3763,7 +3763,7 @@ LOCAL_SET_GL_ERROR(GL_INVALID_VALUE, "glUniformMatrix4fv", "count < 0"); return error::kNoError; } - if (value == NULL) { + if (value == nullptr) { return error::kOutOfBounds; } DoUniformMatrix4fv(location, count, transpose, value); @@ -3795,7 +3795,7 @@ LOCAL_SET_GL_ERROR(GL_INVALID_VALUE, "glUniformMatrix4x2fv", "count < 0"); return error::kNoError; } - if (value == NULL) { + if (value == nullptr) { return error::kOutOfBounds; } DoUniformMatrix4x2fv(location, count, transpose, value); @@ -3827,7 +3827,7 @@ LOCAL_SET_GL_ERROR(GL_INVALID_VALUE, "glUniformMatrix4x3fv", "count < 0"); return error::kNoError; } - if (value == NULL) { + if (value == nullptr) { return error::kOutOfBounds; } DoUniformMatrix4x3fv(location, count, transpose, value); @@ -3880,7 +3880,7 @@ } volatile const GLfloat* values = GetImmediateDataAs<volatile const GLfloat*>( c, data_size, immediate_data_size); - if (values == NULL) { + if (values == nullptr) { return error::kOutOfBounds; } DoVertexAttrib1fv(indx, values); @@ -3915,7 +3915,7 @@ } volatile const GLfloat* values = GetImmediateDataAs<volatile const GLfloat*>( c, data_size, immediate_data_size); - if (values == NULL) { + if (values == nullptr) { return error::kOutOfBounds; } DoVertexAttrib2fv(indx, values); @@ -3951,7 +3951,7 @@ } volatile const GLfloat* values = GetImmediateDataAs<volatile const GLfloat*>( c, data_size, immediate_data_size); - if (values == NULL) { + if (values == nullptr) { return error::kOutOfBounds; } DoVertexAttrib3fv(indx, values); @@ -3988,7 +3988,7 @@ } volatile const GLfloat* values = GetImmediateDataAs<volatile const GLfloat*>( c, data_size, immediate_data_size); - if (values == NULL) { + if (values == nullptr) { return error::kOutOfBounds; } DoVertexAttrib4fv(indx, values); @@ -4029,7 +4029,7 @@ } volatile const GLint* values = GetImmediateDataAs<volatile const GLint*>( c, data_size, immediate_data_size); - if (values == NULL) { + if (values == nullptr) { return error::kOutOfBounds; } DoVertexAttribI4iv(indx, values); @@ -4070,7 +4070,7 @@ } volatile const GLuint* values = GetImmediateDataAs<volatile const GLuint*>( c, data_size, immediate_data_size); - if (values == NULL) { + if (values == nullptr) { return error::kOutOfBounds; } DoVertexAttribI4uiv(indx, values); @@ -4322,7 +4322,7 @@ } volatile GLuint* queries = GetImmediateDataAs<volatile GLuint*>(c, data_size, immediate_data_size); - if (queries == NULL) { + if (queries == nullptr) { return error::kOutOfBounds; } auto queries_copy = std::make_unique<GLuint[]>(n); @@ -4348,7 +4348,7 @@ } volatile const GLuint* queries = GetImmediateDataAs<volatile const GLuint*>( c, data_size, immediate_data_size); - if (queries == NULL) { + if (queries == nullptr) { return error::kOutOfBounds; } DeleteQueriesEXTHelper(n, queries); @@ -4440,7 +4440,7 @@ } volatile GLuint* arrays = GetImmediateDataAs<volatile GLuint*>(c, data_size, immediate_data_size); - if (arrays == NULL) { + if (arrays == nullptr) { return error::kOutOfBounds; } auto arrays_copy = std::make_unique<GLuint[]>(n); @@ -4466,7 +4466,7 @@ } volatile const GLuint* arrays = GetImmediateDataAs<volatile const GLuint*>( c, data_size, immediate_data_size); - if (arrays == NULL) { + if (arrays == nullptr) { return error::kOutOfBounds; } DeleteVertexArraysOESHelper(n, arrays); @@ -4736,7 +4736,7 @@ } volatile GLbyte* mailbox = GetImmediateDataAs<volatile GLbyte*>(c, data_size, immediate_data_size); - if (mailbox == NULL) { + if (mailbox == nullptr) { return error::kOutOfBounds; } DoProduceTextureDirectCHROMIUM(texture, mailbox); @@ -4759,7 +4759,7 @@ } volatile const GLbyte* mailbox = GetImmediateDataAs<volatile const GLbyte*>( c, data_size, immediate_data_size); - if (mailbox == NULL) { + if (mailbox == nullptr) { return error::kOutOfBounds; } DoCreateAndConsumeTextureINTERNAL(texture, mailbox); @@ -4863,7 +4863,7 @@ "count < 0"); return error::kNoError; } - if (attachments == NULL) { + if (attachments == nullptr) { return error::kOutOfBounds; } DoDiscardFramebufferEXT(target, count, attachments); @@ -4941,7 +4941,7 @@ LOCAL_SET_GL_ERROR(GL_INVALID_VALUE, "glDrawBuffersEXT", "count < 0"); return error::kNoError; } - if (bufs == NULL) { + if (bufs == nullptr) { return error::kOutOfBounds; } DoDrawBuffersEXT(count, bufs); @@ -4969,7 +4969,7 @@ "count < 0"); return error::kNoError; } - if (textures == NULL) { + if (textures == nullptr) { return error::kOutOfBounds; } DoScheduleCALayerInUseQueryCHROMIUM(count, textures); @@ -5025,7 +5025,7 @@ "matrixMode"); return error::kNoError; } - if (m == NULL) { + if (m == nullptr) { return error::kOutOfBounds; } DoMatrixLoadfCHROMIUM(matrixMode, m); @@ -5164,7 +5164,7 @@ volatile const GLfloat* transform = GetImmediateDataAs<volatile const GLfloat*>(c, data_size, immediate_data_size); - if (transform == NULL) { + if (transform == nullptr) { return error::kOutOfBounds; } DoUniformMatrix4fvStreamTextureMatrixCHROMIUM(location, transpose, transform); @@ -5212,7 +5212,7 @@ "count < 0"); return error::kNoError; } - if (rects == NULL) { + if (rects == nullptr) { return error::kOutOfBounds; } if (!validators_->swap_buffers_flags.IsValid(flags)) { @@ -5316,7 +5316,7 @@ LOCAL_SET_GL_ERROR_INVALID_ENUM("glWindowRectanglesEXT", mode, "mode"); return error::kNoError; } - if (box == NULL) { + if (box == nullptr) { return error::kOutOfBounds; } DoWindowRectanglesEXT(mode, count, box);
diff --git a/gpu/command_buffer/service/gles2_cmd_decoder_passthrough_handlers_autogen.cc b/gpu/command_buffer/service/gles2_cmd_decoder_passthrough_handlers_autogen.cc index 8b98c63..15e2ee28 100644 --- a/gpu/command_buffer/service/gles2_cmd_decoder_passthrough_handlers_autogen.cc +++ b/gpu/command_buffer/service/gles2_cmd_decoder_passthrough_handlers_autogen.cc
@@ -1112,8 +1112,8 @@ typedef cmds::GetBooleanv::Result Result; Result* result = GetSharedMemoryAndSizeAs<Result*>( c.params_shm_id, c.params_shm_offset, sizeof(Result), &buffer_size); - GLboolean* params = result ? result->GetData() : NULL; - if (params == NULL) { + GLboolean* params = result ? result->GetData() : nullptr; + if (params == nullptr) { return error::kOutOfBounds; } GLsizei bufsize = Result::ComputeMaxResults(buffer_size); @@ -1144,8 +1144,8 @@ typedef cmds::GetBufferParameteri64v::Result Result; Result* result = GetSharedMemoryAndSizeAs<Result*>( c.params_shm_id, c.params_shm_offset, sizeof(Result), &buffer_size); - GLint64* params = result ? result->GetData() : NULL; - if (params == NULL) { + GLint64* params = result ? result->GetData() : nullptr; + if (params == nullptr) { return error::kOutOfBounds; } GLsizei bufsize = Result::ComputeMaxResults(buffer_size); @@ -1174,8 +1174,8 @@ typedef cmds::GetBufferParameteriv::Result Result; Result* result = GetSharedMemoryAndSizeAs<Result*>( c.params_shm_id, c.params_shm_offset, sizeof(Result), &buffer_size); - GLint* params = result ? result->GetData() : NULL; - if (params == NULL) { + GLint* params = result ? result->GetData() : nullptr; + if (params == nullptr) { return error::kOutOfBounds; } GLsizei bufsize = Result::ComputeMaxResults(buffer_size); @@ -1221,8 +1221,8 @@ typedef cmds::GetFloatv::Result Result; Result* result = GetSharedMemoryAndSizeAs<Result*>( c.params_shm_id, c.params_shm_offset, sizeof(Result), &buffer_size); - GLfloat* params = result ? result->GetData() : NULL; - if (params == NULL) { + GLfloat* params = result ? result->GetData() : nullptr; + if (params == nullptr) { return error::kOutOfBounds; } GLsizei bufsize = Result::ComputeMaxResults(buffer_size); @@ -1254,8 +1254,8 @@ typedef cmds::GetFramebufferAttachmentParameteriv::Result Result; Result* result = GetSharedMemoryAndSizeAs<Result*>( c.params_shm_id, c.params_shm_offset, sizeof(Result), &buffer_size); - GLint* params = result ? result->GetData() : NULL; - if (params == NULL) { + GLint* params = result ? result->GetData() : nullptr; + if (params == nullptr) { return error::kOutOfBounds; } GLsizei bufsize = Result::ComputeMaxResults(buffer_size); @@ -1285,8 +1285,8 @@ typedef cmds::GetInteger64v::Result Result; Result* result = GetSharedMemoryAndSizeAs<Result*>( c.params_shm_id, c.params_shm_offset, sizeof(Result), &buffer_size); - GLint64* params = result ? result->GetData() : NULL; - if (params == NULL) { + GLint64* params = result ? result->GetData() : nullptr; + if (params == nullptr) { return error::kOutOfBounds; } GLsizei bufsize = Result::ComputeMaxResults(buffer_size); @@ -1316,8 +1316,8 @@ typedef cmds::GetIntegeri_v::Result Result; Result* result = GetSharedMemoryAndSizeAs<Result*>( c.data_shm_id, c.data_shm_offset, sizeof(Result), &buffer_size); - GLint* data = result ? result->GetData() : NULL; - if (data == NULL) { + GLint* data = result ? result->GetData() : nullptr; + if (data == nullptr) { return error::kOutOfBounds; } GLsizei bufsize = Result::ComputeMaxResults(buffer_size); @@ -1347,8 +1347,8 @@ typedef cmds::GetInteger64i_v::Result Result; Result* result = GetSharedMemoryAndSizeAs<Result*>( c.data_shm_id, c.data_shm_offset, sizeof(Result), &buffer_size); - GLint64* data = result ? result->GetData() : NULL; - if (data == NULL) { + GLint64* data = result ? result->GetData() : nullptr; + if (data == nullptr) { return error::kOutOfBounds; } GLsizei bufsize = Result::ComputeMaxResults(buffer_size); @@ -1375,8 +1375,8 @@ typedef cmds::GetIntegerv::Result Result; Result* result = GetSharedMemoryAndSizeAs<Result*>( c.params_shm_id, c.params_shm_offset, sizeof(Result), &buffer_size); - GLint* params = result ? result->GetData() : NULL; - if (params == NULL) { + GLint* params = result ? result->GetData() : nullptr; + if (params == nullptr) { return error::kOutOfBounds; } GLsizei bufsize = Result::ComputeMaxResults(buffer_size); @@ -1404,8 +1404,8 @@ typedef cmds::GetProgramiv::Result Result; Result* result = GetSharedMemoryAndSizeAs<Result*>( c.params_shm_id, c.params_shm_offset, sizeof(Result), &buffer_size); - GLint* params = result ? result->GetData() : NULL; - if (params == NULL) { + GLint* params = result ? result->GetData() : nullptr; + if (params == nullptr) { return error::kOutOfBounds; } GLsizei bufsize = Result::ComputeMaxResults(buffer_size); @@ -1434,8 +1434,8 @@ typedef cmds::GetRenderbufferParameteriv::Result Result; Result* result = GetSharedMemoryAndSizeAs<Result*>( c.params_shm_id, c.params_shm_offset, sizeof(Result), &buffer_size); - GLint* params = result ? result->GetData() : NULL; - if (params == NULL) { + GLint* params = result ? result->GetData() : nullptr; + if (params == nullptr) { return error::kOutOfBounds; } GLsizei bufsize = Result::ComputeMaxResults(buffer_size); @@ -1467,8 +1467,8 @@ typedef cmds::GetSamplerParameterfv::Result Result; Result* result = GetSharedMemoryAndSizeAs<Result*>( c.params_shm_id, c.params_shm_offset, sizeof(Result), &buffer_size); - GLfloat* params = result ? result->GetData() : NULL; - if (params == NULL) { + GLfloat* params = result ? result->GetData() : nullptr; + if (params == nullptr) { return error::kOutOfBounds; } GLsizei bufsize = Result::ComputeMaxResults(buffer_size); @@ -1500,8 +1500,8 @@ typedef cmds::GetSamplerParameteriv::Result Result; Result* result = GetSharedMemoryAndSizeAs<Result*>( c.params_shm_id, c.params_shm_offset, sizeof(Result), &buffer_size); - GLint* params = result ? result->GetData() : NULL; - if (params == NULL) { + GLint* params = result ? result->GetData() : nullptr; + if (params == nullptr) { return error::kOutOfBounds; } GLsizei bufsize = Result::ComputeMaxResults(buffer_size); @@ -1530,8 +1530,8 @@ typedef cmds::GetShaderiv::Result Result; Result* result = GetSharedMemoryAndSizeAs<Result*>( c.params_shm_id, c.params_shm_offset, sizeof(Result), &buffer_size); - GLint* params = result ? result->GetData() : NULL; - if (params == NULL) { + GLint* params = result ? result->GetData() : nullptr; + if (params == nullptr) { return error::kOutOfBounds; } GLsizei bufsize = Result::ComputeMaxResults(buffer_size); @@ -1561,8 +1561,8 @@ typedef cmds::GetSynciv::Result Result; Result* result = GetSharedMemoryAndSizeAs<Result*>( c.values_shm_id, c.values_shm_offset, sizeof(Result), &buffer_size); - GLint* values = result ? result->GetData() : NULL; - if (values == NULL) { + GLint* values = result ? result->GetData() : nullptr; + if (values == nullptr) { return error::kOutOfBounds; } GLsizei bufsize = Result::ComputeMaxResults(buffer_size); @@ -1590,8 +1590,8 @@ typedef cmds::GetTexParameterfv::Result Result; Result* result = GetSharedMemoryAndSizeAs<Result*>( c.params_shm_id, c.params_shm_offset, sizeof(Result), &buffer_size); - GLfloat* params = result ? result->GetData() : NULL; - if (params == NULL) { + GLfloat* params = result ? result->GetData() : nullptr; + if (params == nullptr) { return error::kOutOfBounds; } GLsizei bufsize = Result::ComputeMaxResults(buffer_size); @@ -1620,8 +1620,8 @@ typedef cmds::GetTexParameteriv::Result Result; Result* result = GetSharedMemoryAndSizeAs<Result*>( c.params_shm_id, c.params_shm_offset, sizeof(Result), &buffer_size); - GLint* params = result ? result->GetData() : NULL; - if (params == NULL) { + GLint* params = result ? result->GetData() : nullptr; + if (params == nullptr) { return error::kOutOfBounds; } GLsizei bufsize = Result::ComputeMaxResults(buffer_size); @@ -1650,8 +1650,8 @@ typedef cmds::GetVertexAttribfv::Result Result; Result* result = GetSharedMemoryAndSizeAs<Result*>( c.params_shm_id, c.params_shm_offset, sizeof(Result), &buffer_size); - GLfloat* params = result ? result->GetData() : NULL; - if (params == NULL) { + GLfloat* params = result ? result->GetData() : nullptr; + if (params == nullptr) { return error::kOutOfBounds; } GLsizei bufsize = Result::ComputeMaxResults(buffer_size); @@ -1680,8 +1680,8 @@ typedef cmds::GetVertexAttribiv::Result Result; Result* result = GetSharedMemoryAndSizeAs<Result*>( c.params_shm_id, c.params_shm_offset, sizeof(Result), &buffer_size); - GLint* params = result ? result->GetData() : NULL; - if (params == NULL) { + GLint* params = result ? result->GetData() : nullptr; + if (params == nullptr) { return error::kOutOfBounds; } GLsizei bufsize = Result::ComputeMaxResults(buffer_size); @@ -1712,8 +1712,8 @@ typedef cmds::GetVertexAttribIiv::Result Result; Result* result = GetSharedMemoryAndSizeAs<Result*>( c.params_shm_id, c.params_shm_offset, sizeof(Result), &buffer_size); - GLint* params = result ? result->GetData() : NULL; - if (params == NULL) { + GLint* params = result ? result->GetData() : nullptr; + if (params == nullptr) { return error::kOutOfBounds; } GLsizei bufsize = Result::ComputeMaxResults(buffer_size); @@ -1744,8 +1744,8 @@ typedef cmds::GetVertexAttribIuiv::Result Result; Result* result = GetSharedMemoryAndSizeAs<Result*>( c.params_shm_id, c.params_shm_offset, sizeof(Result), &buffer_size); - GLuint* params = result ? result->GetData() : NULL; - if (params == NULL) { + GLuint* params = result ? result->GetData() : nullptr; + if (params == nullptr) { return error::kOutOfBounds; } GLsizei bufsize = Result::ComputeMaxResults(buffer_size); @@ -2286,9 +2286,9 @@ return error::kInvalidArguments; } const char** str = - strs.size() > 0 ? const_cast<const char**>(&strs[0]) : NULL; + strs.size() > 0 ? const_cast<const char**>(&strs[0]) : nullptr; const GLint* length = - len.size() > 0 ? const_cast<const GLint*>(&len[0]) : NULL; + len.size() > 0 ? const_cast<const GLint*>(&len[0]) : nullptr; (void)length; error::Error error = DoShaderSource(shader, count, str, length); if (error != error::kNoError) { @@ -2511,9 +2511,9 @@ return error::kInvalidArguments; } const char** varyings = - strs.size() > 0 ? const_cast<const char**>(&strs[0]) : NULL; + strs.size() > 0 ? const_cast<const char**>(&strs[0]) : nullptr; const GLint* length = - len.size() > 0 ? const_cast<const GLint*>(&len[0]) : NULL; + len.size() > 0 ? const_cast<const GLint*>(&len[0]) : nullptr; (void)length; GLenum buffermode = static_cast<GLenum>(c.buffermode); error::Error error =
diff --git a/gpu/command_buffer/service/gles2_cmd_decoder_unittest.cc b/gpu/command_buffer/service/gles2_cmd_decoder_unittest.cc index fe72f2c..b4708ca8 100644 --- a/gpu/command_buffer/service/gles2_cmd_decoder_unittest.cc +++ b/gpu/command_buffer/service/gles2_cmd_decoder_unittest.cc
@@ -632,7 +632,7 @@ EXPECT_EQ(error::kNoError, ExecuteImmediateCmd(*cmd, sizeof(temp))); EXPECT_EQ(GL_NO_ERROR, GetGLError()); QueryManager* query_manager = decoder_->GetQueryManager(); - ASSERT_TRUE(query_manager != NULL); + ASSERT_TRUE(query_manager != nullptr); EXPECT_TRUE(query_manager->IsValidQuery(kNewClientId)); } @@ -643,7 +643,7 @@ cmd->Init(3, temp); EXPECT_EQ(error::kInvalidArguments, ExecuteImmediateCmd(*cmd, sizeof(temp))); QueryManager* query_manager = decoder_->GetQueryManager(); - ASSERT_TRUE(query_manager != NULL); + ASSERT_TRUE(query_manager != nullptr); EXPECT_FALSE(query_manager->IsValidQuery(kNewClientId)); EXPECT_FALSE(query_manager->IsValidQuery(kNewClientId + 1)); GLuint null_id[2] = {kNewClientId, 0}; @@ -697,9 +697,9 @@ // Query object should not be created untill BeginQueriesEXT. QueryManager* query_manager = decoder_->GetQueryManager(); - ASSERT_TRUE(query_manager != NULL); + ASSERT_TRUE(query_manager != nullptr); QueryManager::Query* query = query_manager->GetQuery(kNewClientId); - EXPECT_TRUE(query == NULL); + EXPECT_TRUE(query == nullptr); // BeginQueryEXT should fail if id is not generated from GenQueriesEXT. begin_cmd.Init(GL_ANY_SAMPLES_PASSED_EXT, kInvalidClientId, shared_memory_id_, @@ -714,7 +714,7 @@ // After BeginQueriesEXT id name should have query object associated with it. query = query_manager->GetQuery(kNewClientId); - ASSERT_TRUE(query != NULL); + ASSERT_TRUE(query != nullptr); EXPECT_FALSE(query->IsPending()); // Test trying begin again fails @@ -1019,9 +1019,9 @@ EXPECT_EQ(GL_NO_ERROR, GetGLError()); QueryManager* query_manager = decoder_->GetQueryManager(); - ASSERT_TRUE(query_manager != NULL); + ASSERT_TRUE(query_manager != nullptr); QueryManager::Query* query = query_manager->GetQuery(kNewClientId); - ASSERT_TRUE(query != NULL); + ASSERT_TRUE(query != nullptr); EXPECT_FALSE(query->IsPending()); // Test end succeeds @@ -1044,9 +1044,9 @@ EXPECT_EQ(GL_NO_ERROR, GetGLError()); QueryManager* query_manager = decoder_->GetQueryManager(); - ASSERT_TRUE(query_manager != NULL); + ASSERT_TRUE(query_manager != nullptr); QueryManager::Query* query = query_manager->GetQuery(kNewClientId); - ASSERT_TRUE(query != NULL); + ASSERT_TRUE(query != nullptr); EXPECT_FALSE(query->IsPending()); // Test end succeeds @@ -1102,9 +1102,9 @@ EXPECT_EQ(GL_NO_ERROR, GetGLError()); QueryManager* query_manager = decoder_->GetQueryManager(); - ASSERT_TRUE(query_manager != NULL); + ASSERT_TRUE(query_manager != nullptr); QueryManager::Query* query = query_manager->GetQuery(kNewClientId); - ASSERT_TRUE(query != NULL); + ASSERT_TRUE(query != nullptr); EXPECT_FALSE(query->IsPending()); EXPECT_CALL(*gl_, Flush()).RetiresOnSaturation(); @@ -1221,9 +1221,9 @@ EXPECT_EQ(GL_NO_ERROR, GetGLError()); QueryManager* query_manager = decoder_->GetQueryManager(); - ASSERT_TRUE(query_manager != NULL); + ASSERT_TRUE(query_manager != nullptr); QueryManager::Query* query = query_manager->GetQuery(kNewClientId); - ASSERT_TRUE(query != NULL); + ASSERT_TRUE(query != nullptr); EXPECT_TRUE(query->IsPending()); }
diff --git a/gpu/command_buffer/service/gles2_cmd_decoder_unittest_1_autogen.h b/gpu/command_buffer/service/gles2_cmd_decoder_unittest_1_autogen.h index dd9df69..3d55531 100644 --- a/gpu/command_buffer/service/gles2_cmd_decoder_unittest_1_autogen.h +++ b/gpu/command_buffer/service/gles2_cmd_decoder_unittest_1_autogen.h
@@ -39,7 +39,7 @@ cmd.Init(GL_ARRAY_BUFFER, kNewClientId); EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); EXPECT_EQ(GL_NO_ERROR, GetGLError()); - EXPECT_TRUE(GetBuffer(kNewClientId) != NULL); + EXPECT_TRUE(GetBuffer(kNewClientId) != nullptr); } TEST_P(GLES2DecoderTest1, BindBufferInvalidArgs0_0) { @@ -69,7 +69,7 @@ cmd.Init(GL_FRAMEBUFFER, kNewClientId); EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); EXPECT_EQ(GL_NO_ERROR, GetGLError()); - EXPECT_TRUE(GetFramebuffer(kNewClientId) != NULL); + EXPECT_TRUE(GetFramebuffer(kNewClientId) != nullptr); } TEST_P(GLES2DecoderTest1, BindFramebufferInvalidArgs0_0) { @@ -100,7 +100,7 @@ cmd.Init(GL_RENDERBUFFER, kNewClientId); EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); EXPECT_EQ(GL_NO_ERROR, GetGLError()); - EXPECT_TRUE(GetRenderbuffer(kNewClientId) != NULL); + EXPECT_TRUE(GetRenderbuffer(kNewClientId) != nullptr); } TEST_P(GLES2DecoderTest1, BindRenderbufferInvalidArgs0_0) { @@ -349,7 +349,7 @@ EXPECT_EQ(error::kNoError, ExecuteImmediateCmd(cmd, sizeof(client_buffer_id_))); EXPECT_EQ(GL_NO_ERROR, GetGLError()); - EXPECT_TRUE(GetBuffer(client_buffer_id_) == NULL); + EXPECT_TRUE(GetBuffer(client_buffer_id_) == nullptr); } TEST_P(GLES2DecoderTest1, DeleteBuffersImmediateInvalidArgs) { @@ -371,7 +371,7 @@ EXPECT_EQ(error::kNoError, ExecuteImmediateCmd(cmd, sizeof(client_framebuffer_id_))); EXPECT_EQ(GL_NO_ERROR, GetGLError()); - EXPECT_TRUE(GetFramebuffer(client_framebuffer_id_) == NULL); + EXPECT_TRUE(GetFramebuffer(client_framebuffer_id_) == nullptr); } TEST_P(GLES2DecoderTest1, DeleteFramebuffersImmediateInvalidArgs) { @@ -402,7 +402,7 @@ EXPECT_EQ(error::kNoError, ExecuteImmediateCmd(cmd, sizeof(client_renderbuffer_id_))); EXPECT_EQ(GL_NO_ERROR, GetGLError()); - EXPECT_TRUE(GetRenderbuffer(client_renderbuffer_id_) == NULL); + EXPECT_TRUE(GetRenderbuffer(client_renderbuffer_id_) == nullptr); } TEST_P(GLES2DecoderTest1, DeleteRenderbuffersImmediateInvalidArgs) { @@ -423,7 +423,7 @@ EXPECT_EQ(error::kNoError, ExecuteImmediateCmd(cmd, sizeof(client_sampler_id_))); EXPECT_EQ(GL_NO_ERROR, GetGLError()); - EXPECT_TRUE(GetSampler(client_sampler_id_) == NULL); + EXPECT_TRUE(GetSampler(client_sampler_id_) == nullptr); } TEST_P(GLES3DecoderTest1, DeleteSamplersImmediateInvalidArgs) { @@ -462,7 +462,7 @@ EXPECT_EQ(error::kNoError, ExecuteImmediateCmd(cmd, sizeof(client_texture_id_))); EXPECT_EQ(GL_NO_ERROR, GetGLError()); - EXPECT_TRUE(GetTexture(client_texture_id_) == NULL); + EXPECT_TRUE(GetTexture(client_texture_id_) == nullptr); } TEST_P(GLES2DecoderTest1, DeleteTexturesImmediateInvalidArgs) { @@ -645,7 +645,7 @@ cmd->Init(1, &temp); EXPECT_EQ(error::kNoError, ExecuteImmediateCmd(*cmd, sizeof(temp))); EXPECT_EQ(GL_NO_ERROR, GetGLError()); - EXPECT_TRUE(GetBuffer(kNewClientId) != NULL); + EXPECT_TRUE(GetBuffer(kNewClientId) != nullptr); } TEST_P(GLES2DecoderTest1, GenBuffersImmediateDuplicateOrNullIds) { @@ -655,12 +655,12 @@ SpecializedSetup<cmds::GenBuffersImmediate, 1>(true); cmd->Init(3, temp); EXPECT_EQ(error::kInvalidArguments, ExecuteImmediateCmd(*cmd, sizeof(temp))); - EXPECT_TRUE(GetBuffer(kNewClientId) == NULL); - EXPECT_TRUE(GetBuffer(kNewClientId + 1) == NULL); + EXPECT_TRUE(GetBuffer(kNewClientId) == nullptr); + EXPECT_TRUE(GetBuffer(kNewClientId + 1) == nullptr); GLuint null_id[2] = {kNewClientId, 0}; cmd->Init(2, null_id); EXPECT_EQ(error::kInvalidArguments, ExecuteImmediateCmd(*cmd, sizeof(temp))); - EXPECT_TRUE(GetBuffer(kNewClientId) == NULL); + EXPECT_TRUE(GetBuffer(kNewClientId) == nullptr); } TEST_P(GLES2DecoderTest1, GenBuffersImmediateInvalidArgs) { @@ -709,7 +709,7 @@ cmd->Init(1, &temp); EXPECT_EQ(error::kNoError, ExecuteImmediateCmd(*cmd, sizeof(temp))); EXPECT_EQ(GL_NO_ERROR, GetGLError()); - EXPECT_TRUE(GetFramebuffer(kNewClientId) != NULL); + EXPECT_TRUE(GetFramebuffer(kNewClientId) != nullptr); } TEST_P(GLES2DecoderTest1, GenFramebuffersImmediateDuplicateOrNullIds) { @@ -720,12 +720,12 @@ SpecializedSetup<cmds::GenFramebuffersImmediate, 1>(true); cmd->Init(3, temp); EXPECT_EQ(error::kInvalidArguments, ExecuteImmediateCmd(*cmd, sizeof(temp))); - EXPECT_TRUE(GetFramebuffer(kNewClientId) == NULL); - EXPECT_TRUE(GetFramebuffer(kNewClientId + 1) == NULL); + EXPECT_TRUE(GetFramebuffer(kNewClientId) == nullptr); + EXPECT_TRUE(GetFramebuffer(kNewClientId + 1) == nullptr); GLuint null_id[2] = {kNewClientId, 0}; cmd->Init(2, null_id); EXPECT_EQ(error::kInvalidArguments, ExecuteImmediateCmd(*cmd, sizeof(temp))); - EXPECT_TRUE(GetFramebuffer(kNewClientId) == NULL); + EXPECT_TRUE(GetFramebuffer(kNewClientId) == nullptr); } TEST_P(GLES2DecoderTest1, GenFramebuffersImmediateInvalidArgs) { @@ -748,7 +748,7 @@ cmd->Init(1, &temp); EXPECT_EQ(error::kNoError, ExecuteImmediateCmd(*cmd, sizeof(temp))); EXPECT_EQ(GL_NO_ERROR, GetGLError()); - EXPECT_TRUE(GetRenderbuffer(kNewClientId) != NULL); + EXPECT_TRUE(GetRenderbuffer(kNewClientId) != nullptr); } TEST_P(GLES2DecoderTest1, GenRenderbuffersImmediateDuplicateOrNullIds) { @@ -759,12 +759,12 @@ SpecializedSetup<cmds::GenRenderbuffersImmediate, 1>(true); cmd->Init(3, temp); EXPECT_EQ(error::kInvalidArguments, ExecuteImmediateCmd(*cmd, sizeof(temp))); - EXPECT_TRUE(GetRenderbuffer(kNewClientId) == NULL); - EXPECT_TRUE(GetRenderbuffer(kNewClientId + 1) == NULL); + EXPECT_TRUE(GetRenderbuffer(kNewClientId) == nullptr); + EXPECT_TRUE(GetRenderbuffer(kNewClientId + 1) == nullptr); GLuint null_id[2] = {kNewClientId, 0}; cmd->Init(2, null_id); EXPECT_EQ(error::kInvalidArguments, ExecuteImmediateCmd(*cmd, sizeof(temp))); - EXPECT_TRUE(GetRenderbuffer(kNewClientId) == NULL); + EXPECT_TRUE(GetRenderbuffer(kNewClientId) == nullptr); } TEST_P(GLES2DecoderTest1, GenRenderbuffersImmediateInvalidArgs) { @@ -787,7 +787,7 @@ cmd->Init(1, &temp); EXPECT_EQ(error::kNoError, ExecuteImmediateCmd(*cmd, sizeof(temp))); EXPECT_EQ(GL_NO_ERROR, GetGLError()); - EXPECT_TRUE(GetSampler(kNewClientId) != NULL); + EXPECT_TRUE(GetSampler(kNewClientId) != nullptr); } TEST_P(GLES3DecoderTest1, GenSamplersImmediateDuplicateOrNullIds) { @@ -798,12 +798,12 @@ SpecializedSetup<cmds::GenSamplersImmediate, 1>(true); cmd->Init(3, temp); EXPECT_EQ(error::kInvalidArguments, ExecuteImmediateCmd(*cmd, sizeof(temp))); - EXPECT_TRUE(GetSampler(kNewClientId) == NULL); - EXPECT_TRUE(GetSampler(kNewClientId + 1) == NULL); + EXPECT_TRUE(GetSampler(kNewClientId) == nullptr); + EXPECT_TRUE(GetSampler(kNewClientId + 1) == nullptr); GLuint null_id[2] = {kNewClientId, 0}; cmd->Init(2, null_id); EXPECT_EQ(error::kInvalidArguments, ExecuteImmediateCmd(*cmd, sizeof(temp))); - EXPECT_TRUE(GetSampler(kNewClientId) == NULL); + EXPECT_TRUE(GetSampler(kNewClientId) == nullptr); } TEST_P(GLES3DecoderTest1, GenSamplersImmediateInvalidArgs) { @@ -826,7 +826,7 @@ cmd->Init(1, &temp); EXPECT_EQ(error::kNoError, ExecuteImmediateCmd(*cmd, sizeof(temp))); EXPECT_EQ(GL_NO_ERROR, GetGLError()); - EXPECT_TRUE(GetTexture(kNewClientId) != NULL); + EXPECT_TRUE(GetTexture(kNewClientId) != nullptr); } TEST_P(GLES2DecoderTest1, GenTexturesImmediateDuplicateOrNullIds) { @@ -837,12 +837,12 @@ SpecializedSetup<cmds::GenTexturesImmediate, 1>(true); cmd->Init(3, temp); EXPECT_EQ(error::kInvalidArguments, ExecuteImmediateCmd(*cmd, sizeof(temp))); - EXPECT_TRUE(GetTexture(kNewClientId) == NULL); - EXPECT_TRUE(GetTexture(kNewClientId + 1) == NULL); + EXPECT_TRUE(GetTexture(kNewClientId) == nullptr); + EXPECT_TRUE(GetTexture(kNewClientId + 1) == nullptr); GLuint null_id[2] = {kNewClientId, 0}; cmd->Init(2, null_id); EXPECT_EQ(error::kInvalidArguments, ExecuteImmediateCmd(*cmd, sizeof(temp))); - EXPECT_TRUE(GetTexture(kNewClientId) == NULL); + EXPECT_TRUE(GetTexture(kNewClientId) == nullptr); } TEST_P(GLES2DecoderTest1, GenTexturesImmediateInvalidArgs) { @@ -865,7 +865,7 @@ cmd->Init(1, &temp); EXPECT_EQ(error::kNoError, ExecuteImmediateCmd(*cmd, sizeof(temp))); EXPECT_EQ(GL_NO_ERROR, GetGLError()); - EXPECT_TRUE(GetTransformFeedback(kNewClientId) != NULL); + EXPECT_TRUE(GetTransformFeedback(kNewClientId) != nullptr); } TEST_P(GLES3DecoderTest1, GenTransformFeedbacksImmediateDuplicateOrNullIds) { @@ -876,12 +876,12 @@ SpecializedSetup<cmds::GenTransformFeedbacksImmediate, 1>(true); cmd->Init(3, temp); EXPECT_EQ(error::kInvalidArguments, ExecuteImmediateCmd(*cmd, sizeof(temp))); - EXPECT_TRUE(GetTransformFeedback(kNewClientId) == NULL); - EXPECT_TRUE(GetTransformFeedback(kNewClientId + 1) == NULL); + EXPECT_TRUE(GetTransformFeedback(kNewClientId) == nullptr); + EXPECT_TRUE(GetTransformFeedback(kNewClientId + 1) == nullptr); GLuint null_id[2] = {kNewClientId, 0}; cmd->Init(2, null_id); EXPECT_EQ(error::kInvalidArguments, ExecuteImmediateCmd(*cmd, sizeof(temp))); - EXPECT_TRUE(GetTransformFeedback(kNewClientId) == NULL); + EXPECT_TRUE(GetTransformFeedback(kNewClientId) == nullptr); } TEST_P(GLES3DecoderTest1, GenTransformFeedbacksImmediateInvalidArgs) {
diff --git a/gpu/command_buffer/service/gles2_cmd_decoder_unittest_2.cc b/gpu/command_buffer/service/gles2_cmd_decoder_unittest_2.cc index 0886f44..c6f2b75 100644 --- a/gpu/command_buffer/service/gles2_cmd_decoder_unittest_2.cc +++ b/gpu/command_buffer/service/gles2_cmd_decoder_unittest_2.cc
@@ -625,7 +625,7 @@ .WillOnce(SetArgPointee<2>(0)); Program* program = GetProgram(client_program_id_); - ASSERT_TRUE(program != NULL); + ASSERT_TRUE(program != nullptr); cmds::AttachShader attach_cmd; attach_cmd.Init(client_program_id_, kClientVertexShaderId); @@ -634,7 +634,7 @@ attach_cmd.Init(client_program_id_, kClientFragmentShaderId); EXPECT_EQ(error::kNoError, ExecuteCmd(attach_cmd)); - program->Link(NULL, Program::kCountOnlyStaticallyUsed, this); + program->Link(nullptr, Program::kCountOnlyStaticallyUsed, this); }; template <>
diff --git a/gpu/command_buffer/service/gles2_cmd_decoder_unittest_2_autogen.h b/gpu/command_buffer/service/gles2_cmd_decoder_unittest_2_autogen.h index e7fac11..64dc8f9f 100644 --- a/gpu/command_buffer/service/gles2_cmd_decoder_unittest_2_autogen.h +++ b/gpu/command_buffer/service/gles2_cmd_decoder_unittest_2_autogen.h
@@ -21,7 +21,7 @@ cmd.Init(client_program_id_, kBucketId); EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); CommonDecoder::Bucket* bucket = decoder_->GetBucket(kBucketId); - ASSERT_TRUE(bucket != NULL); + ASSERT_TRUE(bucket != nullptr); EXPECT_EQ(strlen(kInfo) + 1, bucket->size()); EXPECT_EQ(0, memcmp(bucket->GetData(0, bucket->size()), kInfo, bucket->size()));
diff --git a/gpu/command_buffer/service/gles2_cmd_decoder_unittest_attribs.cc b/gpu/command_buffer/service/gles2_cmd_decoder_unittest_attribs.cc index f5e32107..c3199d3b 100644 --- a/gpu/command_buffer/service/gles2_cmd_decoder_unittest_attribs.cc +++ b/gpu/command_buffer/service/gles2_cmd_decoder_unittest_attribs.cc
@@ -311,7 +311,7 @@ cmd->Init(1, &temp); EXPECT_EQ(error::kNoError, ExecuteImmediateCmd(*cmd, sizeof(temp))); EXPECT_EQ(GL_NO_ERROR, GetGLError()); - EXPECT_TRUE(GetVertexArrayInfo(kNewClientId) != NULL); + EXPECT_TRUE(GetVertexArrayInfo(kNewClientId) != nullptr); AddExpectationsForDeleteVertexArraysOES(); } @@ -322,13 +322,13 @@ cmd->Init(3, temp); EXPECT_EQ(error::kInvalidArguments, ExecuteImmediateCmd(*cmd, sizeof(temp))); - EXPECT_TRUE(GetVertexArrayInfo(kNewClientId) == NULL); - EXPECT_TRUE(GetVertexArrayInfo(kNewClientId + 1) == NULL); + EXPECT_TRUE(GetVertexArrayInfo(kNewClientId) == nullptr); + EXPECT_TRUE(GetVertexArrayInfo(kNewClientId + 1) == nullptr); GLuint null_id[2] = {kNewClientId, 0}; cmd->Init(2, null_id); EXPECT_EQ(error::kInvalidArguments, ExecuteImmediateCmd(*cmd, sizeof(temp))); - EXPECT_TRUE(GetVertexArrayInfo(kNewClientId) == NULL); + EXPECT_TRUE(GetVertexArrayInfo(kNewClientId) == nullptr); } void GenVertexArraysOESImmediateInvalidArgs() { @@ -348,7 +348,7 @@ EXPECT_EQ(error::kNoError, ExecuteImmediateCmd(cmd, sizeof(client_vertexarray_id_))); EXPECT_EQ(GL_NO_ERROR, GetGLError()); - EXPECT_TRUE(GetVertexArrayInfo(client_vertexarray_id_) == NULL); + EXPECT_TRUE(GetVertexArrayInfo(client_vertexarray_id_) == nullptr); vertex_array_deleted_manually_ = true; } @@ -370,7 +370,7 @@ EXPECT_EQ(error::kNoError, ExecuteImmediateCmd(cmd, sizeof(client_vertexarray_id_))); EXPECT_EQ(GL_NO_ERROR, GetGLError()); - EXPECT_TRUE(GetVertexArrayInfo(client_vertexarray_id_) == NULL); + EXPECT_TRUE(GetVertexArrayInfo(client_vertexarray_id_) == nullptr); vertex_array_deleted_manually_ = true; } @@ -525,7 +525,7 @@ DoBindBuffer(GL_ARRAY_BUFFER, client_buffer_id_, kServiceBufferId); BufferManager* manager = group().buffer_manager(); Buffer* buffer = manager->GetBuffer(client_buffer_id_); - ASSERT_TRUE(buffer != NULL); + ASSERT_TRUE(buffer != nullptr); EXPECT_EQ(0, buffer->size()); EXPECT_CALL(*gl_, GetError()) .WillOnce(Return(GL_NO_ERROR))
diff --git a/gpu/command_buffer/service/gles2_cmd_decoder_unittest_base.cc b/gpu/command_buffer/service/gles2_cmd_decoder_unittest_base.cc index b9e8a93..2993a83 100644 --- a/gpu/command_buffer/service/gles2_cmd_decoder_unittest_base.cc +++ b/gpu/command_buffer/service/gles2_cmd_decoder_unittest_base.cc
@@ -99,8 +99,8 @@ namespace gles2 { GLES2DecoderTestBase::GLES2DecoderTestBase() - : surface_(NULL), - context_(NULL), + : surface_(nullptr), + context_(nullptr), client_buffer_id_(100), client_framebuffer_id_(101), client_program_id_(102), @@ -300,7 +300,7 @@ EXPECT_CALL(*gl_, BindBuffer(GL_ARRAY_BUFFER, kServiceAttrib0BufferId)) .Times(1) .RetiresOnSaturation(); - EXPECT_CALL(*gl_, VertexAttribPointer(0, 1, GL_FLOAT, GL_FALSE, 0, NULL)) + EXPECT_CALL(*gl_, VertexAttribPointer(0, 1, GL_FLOAT, GL_FALSE, 0, nullptr)) .Times(1) .RetiresOnSaturation(); EXPECT_CALL(*gl_, BindBuffer(GL_ARRAY_BUFFER, 0)) @@ -603,7 +603,7 @@ decoder_.reset(); group_->Destroy(mock_decoder_.get(), false); command_buffer_service_.reset(); - ::gl::MockGLInterface::SetGLInterface(NULL); + ::gl::MockGLInterface::SetGLInterface(nullptr); gl_.reset(); gl::init::ShutdownGL(false); } @@ -2281,7 +2281,7 @@ GL_ARRAY_BUFFER, 0, num_vertices * sizeof(GLfloat) * 4, _)) .Times(1) .RetiresOnSaturation(); - EXPECT_CALL(*gl_, VertexAttribPointer(0, 4, GL_FLOAT, GL_FALSE, 0, NULL)) + EXPECT_CALL(*gl_, VertexAttribPointer(0, 4, GL_FLOAT, GL_FALSE, 0, nullptr)) .Times(1) .RetiresOnSaturation(); EXPECT_CALL(*gl_, VertexAttribDivisorANGLE(0, 0)) @@ -2308,7 +2308,7 @@ .WillByDefault(WithArg<1>(Invoke( &gl_states_, &GLES2DecoderTestBase::MockGLStates::OnBindArrayBuffer))); - ON_CALL(*gl_, VertexAttribPointer(_, _, _, _, _, NULL)) + ON_CALL(*gl_, VertexAttribPointer(_, _, _, _, _, nullptr)) .WillByDefault(InvokeWithoutArgs( &gl_states_, &GLES2DecoderTestBase::MockGLStates::OnVertexAttribNullPointer)); @@ -2405,7 +2405,7 @@ uint32_t flags) {} void GLES2DecoderPassthroughTestBase::SetUp() { - base::CommandLine::Init(0, NULL); + base::CommandLine::Init(0, nullptr); auto* command_line = base::CommandLine::ForCurrentProcess(); command_line->AppendSwitchASCII(switches::kUseGL, gl::kGLImplementationANGLEName);
diff --git a/gpu/command_buffer/service/gles2_cmd_decoder_unittest_base.h b/gpu/command_buffer/service/gles2_cmd_decoder_unittest_base.h index cd0bca4..8f6b2a6 100644 --- a/gpu/command_buffer/service/gles2_cmd_decoder_unittest_base.h +++ b/gpu/command_buffer/service/gles2_cmd_decoder_unittest_base.h
@@ -527,7 +527,9 @@ void DoLockDiscardableTextureCHROMIUM(GLuint texture_id); bool IsDiscardableTextureUnlocked(GLuint texture_id); - GLvoid* BufferOffset(unsigned i) { return static_cast<int8_t*>(NULL) + (i); } + GLvoid* BufferOffset(unsigned i) { + return static_cast<int8_t*>(nullptr) + (i); + } template <typename Command, typename Result> bool IsObjectHelper(GLuint client_id) { @@ -780,7 +782,7 @@ // When a vertex array object is bound, some drivers (AMD Linux, // Qualcomm, etc.) have a bug where it incorrectly generates an // GL_INVALID_OPERATION on glVertexAttribPointer() if pointer - // is NULL, no buffer is bound on GL_ARRAY_BUFFER. + // is nullptr, no buffer is bound on GL_ARRAY_BUFFER. // Make sure we don't trigger this bug. if (bound_vertex_array_object_ != 0) EXPECT_TRUE(bound_array_buffer_object_ != 0);
diff --git a/gpu/command_buffer/service/gles2_cmd_decoder_unittest_buffers.cc b/gpu/command_buffer/service/gles2_cmd_decoder_unittest_buffers.cc index c614726..06faf0d 100644 --- a/gpu/command_buffer/service/gles2_cmd_decoder_unittest_buffers.cc +++ b/gpu/command_buffer/service/gles2_cmd_decoder_unittest_buffers.cc
@@ -41,7 +41,7 @@ cmd.Init(GL_TRANSFORM_FEEDBACK_BUFFER, 2, kNewClientId); EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); EXPECT_EQ(GL_NO_ERROR, GetGLError()); - EXPECT_TRUE(GetBuffer(kNewClientId) != NULL); + EXPECT_TRUE(GetBuffer(kNewClientId) != nullptr); } TEST_P(GLES3DecoderTest, BindBufferRangeValidArgs) { @@ -99,7 +99,7 @@ cmd.Init(GL_TRANSFORM_FEEDBACK_BUFFER, 2, kNewClientId, 4, 4); EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); EXPECT_EQ(GL_NO_ERROR, GetGLError()); - EXPECT_TRUE(GetBuffer(kNewClientId) != NULL); + EXPECT_TRUE(GetBuffer(kNewClientId) != nullptr); } TEST_P(GLES3DecoderTest, MapBufferRangeUnmapBufferReadSucceeds) {
diff --git a/gpu/command_buffer/service/gles2_cmd_decoder_unittest_context_state.cc b/gpu/command_buffer/service/gles2_cmd_decoder_unittest_context_state.cc index 78c1832..6c11caac 100644 --- a/gpu/command_buffer/service/gles2_cmd_decoder_unittest_context_state.cc +++ b/gpu/command_buffer/service/gles2_cmd_decoder_unittest_context_state.cc
@@ -163,7 +163,7 @@ // Expect to restore the active texture unit to GL_TEXTURE0. AddExpectationsForActiveTexture(GL_TEXTURE0); - GetDecoder()->RestoreAllTextureUnitAndSamplerBindings(NULL); + GetDecoder()->RestoreAllTextureUnitAndSamplerBindings(nullptr); } TEST_P(GLES2DecoderRestoreStateTest, NullPreviousState) { @@ -187,7 +187,7 @@ // Expect to restore the active texture unit to GL_TEXTURE0. AddExpectationsForActiveTexture(GL_TEXTURE0); - GetDecoder()->RestoreAllTextureUnitAndSamplerBindings(NULL); + GetDecoder()->RestoreAllTextureUnitAndSamplerBindings(nullptr); } TEST_P(GLES2DecoderRestoreStateTest, WithPreviousStateBGR) { @@ -198,7 +198,7 @@ // Construct a previous ContextState with all texture bindings // set to default textures. - ContextState prev_state(NULL, NULL, NULL); + ContextState prev_state(nullptr, nullptr, nullptr); InitializeContextState(&prev_state, std::numeric_limits<uint32_t>::max(), 0); InSequence sequence; @@ -221,7 +221,7 @@ // Construct a previous ContextState with all texture bindings // set to default textures. - ContextState prev_state(NULL, NULL, NULL); + ContextState prev_state(nullptr, nullptr, nullptr); InitializeContextState(&prev_state, std::numeric_limits<uint32_t>::max(), 0); InSequence sequence; @@ -251,7 +251,7 @@ // Construct a previous ContextState with all texture bindings // set to default textures. - ContextState prev_state(NULL, NULL, NULL); + ContextState prev_state(nullptr, nullptr, nullptr); InitializeContextState(&prev_state, std::numeric_limits<uint32_t>::max(), 0); InSequence sequence; @@ -284,7 +284,7 @@ // Construct a previous ContextState with GL_TEXTURE_2D target in // GL_TEXTURE0 unit bound to a non-default texture and the rest // set to default textures. - ContextState prev_state(NULL, NULL, NULL); + ContextState prev_state(nullptr, nullptr, nullptr); InitializeContextState(&prev_state, 0, kServiceTextureId); InSequence sequence; @@ -316,7 +316,7 @@ // Construct a previous ContextState with GL_TEXTURE_2D target in // GL_TEXTURE1 unit bound to a non-default texture and the rest // set to default textures. - ContextState prev_state(NULL, NULL, NULL); + ContextState prev_state(nullptr, nullptr, nullptr); InitializeContextState(&prev_state, 1, kServiceTextureId); InSequence sequence; @@ -353,7 +353,7 @@ // Construct a previous ContextState with GL_TEXTURE_2D target in // GL_TEXTURE0 unit bound to a non-default texture and the rest // set to default textures. - ContextState prev_state(NULL, NULL, NULL); + ContextState prev_state(nullptr, nullptr, nullptr); InitializeContextState(&prev_state, 0, kServiceTextureId); InSequence sequence; @@ -383,7 +383,7 @@ // Construct a previous ContextState with GL_TEXTURE_2D target in // GL_TEXTURE1 unit bound to a non-default texture and the rest // set to default textures. - ContextState prev_state(NULL, NULL, NULL); + ContextState prev_state(nullptr, nullptr, nullptr); InitializeContextState(&prev_state, 1, kServiceTextureId); InSequence sequence; @@ -436,7 +436,7 @@ // Expect to restore the active texture unit to GL_TEXTURE0. AddExpectationsForActiveTexture(GL_TEXTURE0); - GetDecoder()->RestoreAllTextureUnitAndSamplerBindings(NULL); + GetDecoder()->RestoreAllTextureUnitAndSamplerBindings(nullptr); } TEST_P(GLES2DecoderRestoreStateTest, ES3RestoreExistingSampler) { @@ -447,7 +447,7 @@ // Construct a previous ContextState assuming an ES3 context and with all // texture bindings set to default textures. - ContextState prev_state(feature_info.get(), NULL, NULL); + ContextState prev_state(feature_info.get(), nullptr, nullptr); InitializeContextState(&prev_state, std::numeric_limits<uint32_t>::max(), 0); InSequence sequence; @@ -468,7 +468,7 @@ // Construct a previous ContextState assuming an ES3 context and with all // texture bindings set to default textures. SamplerManager sampler_manager(feature_info.get()); - ContextState prev_state(feature_info.get(), NULL, NULL); + ContextState prev_state(feature_info.get(), nullptr, nullptr); InitializeContextState(&prev_state, std::numeric_limits<uint32_t>::max(), 0); // Set up a sampler in the previous state. The client_id and service_id // don't matter except that they're non-zero.
diff --git a/gpu/command_buffer/service/gles2_cmd_decoder_unittest_extensions.cc b/gpu/command_buffer/service/gles2_cmd_decoder_unittest_extensions.cc index 25c55ba..f700b99 100644 --- a/gpu/command_buffer/service/gles2_cmd_decoder_unittest_extensions.cc +++ b/gpu/command_buffer/service/gles2_cmd_decoder_unittest_extensions.cc
@@ -210,8 +210,8 @@ // ok, even if there is nothing in the actual path object. To remain // compatible with the API, we allocate path object state even when using // the mock API. - EXPECT_CALL(*gl_, - PathCommandsNV(kServicePathId, 0, NULL, 0, GL_FLOAT, NULL)) + EXPECT_CALL( + *gl_, PathCommandsNV(kServicePathId, 0, nullptr, 0, GL_FLOAT, nullptr)) .RetiresOnSaturation(); cmds::PathCommandsCHROMIUM pcmd; pcmd.Init(client_path_id_, 0, 0, 0, 0, GL_FLOAT, 0, 0); @@ -248,10 +248,10 @@ bool copy_paths = false; // Paths are copied for each call that has paths, // since the implementation modifies the memory // area. - void* paths = NULL; + void* paths = nullptr; uint32_t paths_shm_id = 0; uint32_t paths_shm_offset = 0; - GLfloat* transforms = NULL; + GLfloat* transforms = nullptr; uint32_t transforms_shm_id = 0; uint32_t transforms_shm_offset = 0; @@ -960,7 +960,8 @@ TEST_P(GLES2DecoderTestWithCHROMIUMPathRendering, PathCommandsCHROMIUMEmptyCommands) { - EXPECT_CALL(*gl_, PathCommandsNV(kServicePathId, 0, NULL, 0, GL_FLOAT, NULL)) + EXPECT_CALL(*gl_, + PathCommandsNV(kServicePathId, 0, nullptr, 0, GL_FLOAT, nullptr)) .RetiresOnSaturation(); cmds::PathCommandsCHROMIUM cmd; cmd.Init(client_path_id_, 0, 0, 0, 0, GL_FLOAT, 0, 0); @@ -1430,9 +1431,9 @@ for (size_t i = 0; i < arraysize(kFillModes); ++i) { memcpy(paths, kPaths, sizeof(kPaths)); - EXPECT_CALL(*gl_, - StencilFillPathInstancedNV(kPathCount, GL_UNSIGNED_INT, _, 0, - kFillModes[i], kMask, GL_NONE, NULL)) + EXPECT_CALL(*gl_, StencilFillPathInstancedNV(kPathCount, GL_UNSIGNED_INT, _, + 0, kFillModes[i], kMask, + GL_NONE, nullptr)) .RetiresOnSaturation(); sfi_cmd.Init(kPathCount, GL_UNSIGNED_INT, shared_memory_id_, shared_memory_offset_, 0, kFillModes[i], kMask, GL_NONE, 0, 0); @@ -1443,7 +1444,7 @@ EXPECT_CALL(*gl_, StencilThenCoverFillPathInstancedNV( kPathCount, GL_UNSIGNED_INT, _, 0, kFillModes[i], kMask, - GL_BOUNDING_BOX_OF_BOUNDING_BOXES_NV, GL_NONE, NULL)) + GL_BOUNDING_BOX_OF_BOUNDING_BOXES_NV, GL_NONE, nullptr)) .RetiresOnSaturation(); stcfi_cmd.Init(kPathCount, GL_UNSIGNED_INT, shared_memory_id_, shared_memory_offset_, 0, kFillModes[i], kMask, @@ -1495,10 +1496,10 @@ InstancedTestcase testcases[] = { // Test a normal call. {kPathCount, GL_UNSIGNED_INT, kPaths, 0, kFillMode, kReference, kMask, - GL_NONE, NULL, sizeof(kPaths), 0, error::kNoError, GL_NO_ERROR, true}, + GL_NONE, nullptr, sizeof(kPaths), 0, error::kNoError, GL_NO_ERROR, true}, // Test that the path base is applied correctly for each instanced call. {kPathCount, GL_UNSIGNED_INT, kPathsWithBase, kPathBase, kFillMode, - kReference, kMask, GL_NONE, NULL, sizeof(kPaths), 0, error::kNoError, + kReference, kMask, GL_NONE, nullptr, sizeof(kPaths), 0, error::kNoError, GL_NO_ERROR, true}, {kPathCount, GL_UNSIGNED_INT, kPathsWithBase, kPathBase, kFillMode, kReference, kMask, @@ -1587,8 +1588,8 @@ InstancedTestcase testcases[] = { // Zero path count produces no error, no call. - {0, GL_UNSIGNED_INT, NULL, 0, kFillMode, kReference, kMask, GL_NONE, NULL, - 0, 0, error::kNoError, GL_NO_ERROR, false}, + {0, GL_UNSIGNED_INT, nullptr, 0, kFillMode, kReference, kMask, GL_NONE, + nullptr, 0, 0, error::kNoError, GL_NO_ERROR, false}, // Zero path count, even with path data, produces no error, no call. {0, GL_UNSIGNED_INT, kPaths, 0, kFillMode, kReference, kMask, @@ -1601,7 +1602,7 @@ sizeof(transform_values), error::kNoError, GL_INVALID_VALUE, false}, // Passing paths count but not having the shm data is a connection error. - {kPathCount, GL_UNSIGNED_INT, NULL, 0, kFillMode, kReference, kMask, + {kPathCount, GL_UNSIGNED_INT, nullptr, 0, kFillMode, kReference, kMask, GL_TRANSLATE_X_CHROMIUM, transform_values, 0, sizeof(transform_values), error::kOutOfBounds, GL_NO_ERROR, false}, @@ -1629,7 +1630,7 @@ // Test that if we have transform, not having the shm data is a connection // error. {kPathCount, GL_UNSIGNED_INT, kPaths, 0, kFillMode, kReference, kMask, - GL_TRANSLATE_X_CHROMIUM, NULL, sizeof(kPaths), 0, error::kOutOfBounds, + GL_TRANSLATE_X_CHROMIUM, nullptr, sizeof(kPaths), 0, error::kOutOfBounds, GL_NO_ERROR, false}, };
diff --git a/gpu/command_buffer/service/gles2_cmd_decoder_unittest_framebuffers.cc b/gpu/command_buffer/service/gles2_cmd_decoder_unittest_framebuffers.cc index 423bf119..f15105d 100644 --- a/gpu/command_buffer/service/gles2_cmd_decoder_unittest_framebuffers.cc +++ b/gpu/command_buffer/service/gles2_cmd_decoder_unittest_framebuffers.cc
@@ -1290,7 +1290,7 @@ EXPECT_CALL(*gl_, DeleteBuffersARB(1, _)).Times(1); EXPECT_CALL(*gl_, BindBuffer(GL_PIXEL_PACK_BUFFER_ARB, _)).Times(2); EXPECT_CALL(*gl_, - BufferData(GL_PIXEL_PACK_BUFFER_ARB, _, NULL, GL_STREAM_READ)) + BufferData(GL_PIXEL_PACK_BUFFER_ARB, _, nullptr, GL_STREAM_READ)) .Times(1); ReadPixels cmd; @@ -1336,7 +1336,7 @@ EXPECT_CALL(*gl_, BindBuffer(GL_PIXEL_PACK_BUFFER_ARB, kServiceBufferId)) .Times(1); EXPECT_CALL(*gl_, BindBuffer(GL_PIXEL_PACK_BUFFER_ARB, 0)).Times(1); - EXPECT_CALL(*gl_, BufferData(GL_PIXEL_PACK_BUFFER_ARB, kBufferSize, NULL, + EXPECT_CALL(*gl_, BufferData(GL_PIXEL_PACK_BUFFER_ARB, kBufferSize, nullptr, GL_STREAM_READ)) .Times(1); GLsync sync = reinterpret_cast<GLsync>(kServiceSyncId); @@ -3053,7 +3053,7 @@ Framebuffer* framebuffer = framebuffer_manager->GetFramebuffer(client_framebuffer_id_); - ASSERT_TRUE(framebuffer != NULL); + ASSERT_TRUE(framebuffer != nullptr); framebuffer_manager->MarkAsComplete(framebuffer); EXPECT_TRUE(framebuffer_manager->IsComplete(framebuffer)); @@ -3142,7 +3142,7 @@ Framebuffer* framebuffer = framebuffer_manager->GetFramebuffer(client_framebuffer_id_); - ASSERT_TRUE(framebuffer != NULL); + ASSERT_TRUE(framebuffer != nullptr); framebuffer_manager->MarkAsComplete(framebuffer); EXPECT_TRUE(framebuffer_manager->IsComplete(framebuffer));
diff --git a/gpu/command_buffer/service/gles2_cmd_decoder_unittest_programs.cc b/gpu/command_buffer/service/gles2_cmd_decoder_unittest_programs.cc index 18cd68f1..9b739b9 100644 --- a/gpu/command_buffer/service/gles2_cmd_decoder_unittest_programs.cc +++ b/gpu/command_buffer/service/gles2_cmd_decoder_unittest_programs.cc
@@ -62,13 +62,13 @@ TEST_P(GLES2DecoderWithShaderTest, GetProgramInfoCHROMIUMInvalidArgs) { const uint32_t kBucketId = 123; CommonDecoder::Bucket* bucket = decoder_->GetBucket(kBucketId); - EXPECT_TRUE(bucket == NULL); + EXPECT_TRUE(bucket == nullptr); GetProgramInfoCHROMIUM cmd; cmd.Init(kInvalidClientId, kBucketId); EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); EXPECT_EQ(GL_NO_ERROR, GetGLError()); bucket = decoder_->GetBucket(kBucketId); - ASSERT_TRUE(bucket != NULL); + ASSERT_TRUE(bucket != nullptr); EXPECT_EQ(sizeof(ProgramInfoHeader), bucket->size()); ProgramInfoHeader* info = bucket->GetDataAs<ProgramInfoHeader*>(0, sizeof(ProgramInfoHeader)); @@ -94,24 +94,24 @@ EXPECT_EQ(sizeof(UniformBlocksHeader), bucket->size()); UniformBlocksHeader* header = bucket->GetDataAs<UniformBlocksHeader*>(0, sizeof(UniformBlocksHeader)); - EXPECT_TRUE(header != NULL); + EXPECT_TRUE(header != nullptr); EXPECT_EQ(0u, header->num_uniform_blocks); } TEST_P(GLES3DecoderWithShaderTest, GetUniformBlocksCHROMIUMInvalidArgs) { const uint32_t kBucketId = 123; CommonDecoder::Bucket* bucket = decoder_->GetBucket(kBucketId); - EXPECT_TRUE(bucket == NULL); + EXPECT_TRUE(bucket == nullptr); GetUniformBlocksCHROMIUM cmd; cmd.Init(kInvalidClientId, kBucketId); EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); EXPECT_EQ(GL_NO_ERROR, GetGLError()); bucket = decoder_->GetBucket(kBucketId); - ASSERT_TRUE(bucket != NULL); + ASSERT_TRUE(bucket != nullptr); EXPECT_EQ(sizeof(UniformBlocksHeader), bucket->size()); UniformBlocksHeader* header = bucket->GetDataAs<UniformBlocksHeader*>(0, sizeof(UniformBlocksHeader)); - ASSERT_TRUE(header != NULL); + ASSERT_TRUE(header != nullptr); EXPECT_EQ(0u, header->num_uniform_blocks); } @@ -131,24 +131,24 @@ EXPECT_EQ(sizeof(UniformsES3Header), bucket->size()); UniformsES3Header* header = bucket->GetDataAs<UniformsES3Header*>(0, sizeof(UniformsES3Header)); - EXPECT_TRUE(header != NULL); + EXPECT_TRUE(header != nullptr); EXPECT_EQ(0u, header->num_uniforms); } TEST_P(GLES3DecoderWithShaderTest, GetUniformsES3CHROMIUMInvalidArgs) { const uint32_t kBucketId = 123; CommonDecoder::Bucket* bucket = decoder_->GetBucket(kBucketId); - EXPECT_TRUE(bucket == NULL); + EXPECT_TRUE(bucket == nullptr); GetUniformsES3CHROMIUM cmd; cmd.Init(kInvalidClientId, kBucketId); EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); EXPECT_EQ(GL_NO_ERROR, GetGLError()); bucket = decoder_->GetBucket(kBucketId); - ASSERT_TRUE(bucket != NULL); + ASSERT_TRUE(bucket != nullptr); EXPECT_EQ(sizeof(UniformsES3Header), bucket->size()); UniformsES3Header* header = bucket->GetDataAs<UniformsES3Header*>(0, sizeof(UniformsES3Header)); - ASSERT_TRUE(header != NULL); + ASSERT_TRUE(header != nullptr); EXPECT_EQ(0u, header->num_uniforms); } @@ -177,7 +177,7 @@ TransformFeedbackVaryingsHeader* header = bucket->GetDataAs<TransformFeedbackVaryingsHeader*>( 0, sizeof(TransformFeedbackVaryingsHeader)); - EXPECT_TRUE(header != NULL); + EXPECT_TRUE(header != nullptr); EXPECT_EQ(static_cast<uint32_t>(GL_INTERLEAVED_ATTRIBS), header->transform_feedback_buffer_mode); EXPECT_EQ(0u, header->num_transform_feedback_varyings); @@ -187,18 +187,18 @@ GetTransformFeedbackVaryingsCHROMIUMInvalidArgs) { const uint32_t kBucketId = 123; CommonDecoder::Bucket* bucket = decoder_->GetBucket(kBucketId); - EXPECT_TRUE(bucket == NULL); + EXPECT_TRUE(bucket == nullptr); GetTransformFeedbackVaryingsCHROMIUM cmd; cmd.Init(kInvalidClientId, kBucketId); EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); EXPECT_EQ(GL_NO_ERROR, GetGLError()); bucket = decoder_->GetBucket(kBucketId); - ASSERT_TRUE(bucket != NULL); + ASSERT_TRUE(bucket != nullptr); EXPECT_EQ(sizeof(TransformFeedbackVaryingsHeader), bucket->size()); TransformFeedbackVaryingsHeader* header = bucket->GetDataAs<TransformFeedbackVaryingsHeader*>( 0, sizeof(TransformFeedbackVaryingsHeader)); - ASSERT_TRUE(header != NULL); + ASSERT_TRUE(header != nullptr); EXPECT_EQ(0u, header->num_transform_feedback_varyings); } @@ -639,7 +639,7 @@ EXPECT_EQ(kUniform2Type, result->type); EXPECT_EQ(GL_NO_ERROR, GetGLError()); CommonDecoder::Bucket* bucket = decoder_->GetBucket(kBucketId); - ASSERT_TRUE(bucket != NULL); + ASSERT_TRUE(bucket != nullptr); EXPECT_EQ( 0, memcmp( @@ -753,7 +753,7 @@ EXPECT_NE(0, *result); EXPECT_EQ(GL_NO_ERROR, GetGLError()); CommonDecoder::Bucket* bucket = decoder_->GetBucket(kBucketId); - ASSERT_TRUE(bucket != NULL); + ASSERT_TRUE(bucket != nullptr); EXPECT_EQ(0, memcmp(bucket->GetData(0, bucket->size()), kName, bucket->size())); } @@ -992,7 +992,7 @@ EXPECT_EQ(kAttrib2Type, result->type); EXPECT_EQ(GL_NO_ERROR, GetGLError()); CommonDecoder::Bucket* bucket = decoder_->GetBucket(kBucketId); - ASSERT_TRUE(bucket != NULL); + ASSERT_TRUE(bucket != nullptr); EXPECT_EQ( 0, memcmp(bucket->GetData(0, bucket->size()), kAttrib2Name, bucket->size())); @@ -1366,7 +1366,7 @@ EXPECT_EQ(error::kNoError, ExecuteCmd(compile_cmd)); EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); CommonDecoder::Bucket* bucket = decoder_->GetBucket(kBucketId); - ASSERT_TRUE(bucket != NULL); + ASSERT_TRUE(bucket != nullptr); EXPECT_EQ(strlen(kInfo) + 1, bucket->size()); EXPECT_EQ(0, memcmp(bucket->GetData(0, bucket->size()), kInfo, bucket->size())); @@ -1423,7 +1423,7 @@ EXPECT_EQ(kType, static_cast<GLenum>(result->type)); EXPECT_EQ(GL_NO_ERROR, GetGLError()); CommonDecoder::Bucket* bucket = decoder_->GetBucket(kBucketId); - ASSERT_TRUE(bucket != NULL); + ASSERT_TRUE(bucket != nullptr); EXPECT_EQ( 0, memcmp(bucket->GetData(0, bucket->size()), kName, bucket->size())); } @@ -1572,7 +1572,7 @@ get_cmd.Init(client_shader_id_, kOutBucketId); EXPECT_EQ(error::kNoError, ExecuteCmd(get_cmd)); CommonDecoder::Bucket* bucket = decoder_->GetBucket(kOutBucketId); - ASSERT_TRUE(bucket != NULL); + ASSERT_TRUE(bucket != nullptr); EXPECT_EQ(sizeof(kSource0), bucket->size()); EXPECT_EQ(0, memcmp(bucket->GetData(0, bucket->size()), kSource0, bucket->size())); @@ -1803,7 +1803,7 @@ cmd.Init(client_program_id_, kLocation, kBucketId); EXPECT_NE(error::kNoError, ExecuteCmd(cmd)); // check bucket is empty. - SetBucketAsCString(kBucketId, NULL); + SetBucketAsCString(kBucketId, nullptr); cmd.Init(client_program_id_, kLocation, kBucketId); EXPECT_NE(error::kNoError, ExecuteCmd(cmd)); // Check bad program id
diff --git a/gpu/command_buffer/service/gpu_service_test.cc b/gpu/command_buffer/service/gpu_service_test.cc index 234c532..18a4347 100644 --- a/gpu/command_buffer/service/gpu_service_test.cc +++ b/gpu/command_buffer/service/gpu_service_test.cc
@@ -47,7 +47,7 @@ DCHECK(ran_setup_); context_ = nullptr; surface_ = nullptr; - ::gl::MockGLInterface::SetGLInterface(NULL); + ::gl::MockGLInterface::SetGLInterface(nullptr); gl_.reset(); gl::init::ShutdownGL(false); ran_teardown_ = true;
diff --git a/gpu/command_buffer/service/gpu_tracer.cc b/gpu/command_buffer/service/gpu_tracer.cc index 80a7f01..2376e8d 100644 --- a/gpu/command_buffer/service/gpu_tracer.cc +++ b/gpu/command_buffer/service/gpu_tracer.cc
@@ -35,10 +35,7 @@ "Trace source names must match enumeration."); TraceMarker::TraceMarker(const std::string& category, const std::string& name) - : category_(category), - name_(name), - trace_(NULL) { -} + : category_(category), name_(name), trace_(nullptr) {} TraceMarker::TraceMarker(const TraceMarker& other) = default;
diff --git a/gpu/command_buffer/service/gpu_tracer_unittest.cc b/gpu/command_buffer/service/gpu_tracer_unittest.cc index 7983c65..9be02124 100644 --- a/gpu/command_buffer/service/gpu_tracer_unittest.cc +++ b/gpu/command_buffer/service/gpu_tracer_unittest.cc
@@ -105,7 +105,7 @@ } void TearDown() override { - gpu_timing_client_ = NULL; + gpu_timing_client_ = nullptr; gl_fake_queries_.Reset(); GpuServiceTest::TearDown(); }
diff --git a/gpu/command_buffer/service/image_manager.cc b/gpu/command_buffer/service/image_manager.cc index 5a0611c..64d454c8 100644 --- a/gpu/command_buffer/service/image_manager.cc +++ b/gpu/command_buffer/service/image_manager.cc
@@ -31,7 +31,7 @@ if (iter != images_.end()) return iter->second.get(); - return NULL; + return nullptr; } } // namespace gles2
diff --git a/gpu/command_buffer/service/mailbox_manager_sync.cc b/gpu/command_buffer/service/mailbox_manager_sync.cc index 5924465..872fe7cd 100644 --- a/gpu/command_buffer/service/mailbox_manager_sync.cc +++ b/gpu/command_buffer/service/mailbox_manager_sync.cc
@@ -87,7 +87,7 @@ const Mailbox& name) { MailboxToGroupMap::iterator it = mailbox_to_group_.Get().find(name); if (it == mailbox_to_group_.Get().end()) - return NULL; + return nullptr; return it->second.get(); } @@ -158,7 +158,7 @@ if (it->first == manager) return it->second; } - return NULL; + return nullptr; } MailboxManagerSync::TextureGroupRef::TextureGroupRef(unsigned version, @@ -198,7 +198,7 @@ scoped_allow_cross_thread_ref_count_access; TextureGroup* group = TextureGroup::FromName(mailbox); if (!group) - return NULL; + return nullptr; // Check if a texture already exists in this share group. Texture* texture = group->FindTexture(this); @@ -247,7 +247,7 @@ TextureDefinition definition; if (!SkipTextureWorkarounds(texture)) { base::AutoUnlock unlock(g_lock.Get()); - definition = TextureDefinition(texture, kNewTextureVersion, NULL); + definition = TextureDefinition(texture, kNewTextureVersion, nullptr); } group_for_texture = new TextureGroup(definition); group_for_texture->AddTexture(this, texture); @@ -307,7 +307,7 @@ } group->SetDefinition(TextureDefinition(texture, ++group_ref->version, - image ? image_buffer : NULL)); + image ? image_buffer : nullptr)); } void MailboxManagerSync::PushTextureUpdates(const SyncToken& token) {
diff --git a/gpu/command_buffer/service/mailbox_manager_unittest.cc b/gpu/command_buffer/service/mailbox_manager_unittest.cc index 1efa4f0c..871e8764 100644 --- a/gpu/command_buffer/service/mailbox_manager_unittest.cc +++ b/gpu/command_buffer/service/mailbox_manager_unittest.cc
@@ -102,7 +102,7 @@ // Destroy should cleanup the mailbox. DestroyTexture(texture); - EXPECT_EQ(NULL, manager_->ConsumeTexture(name)); + EXPECT_EQ(nullptr, manager_->ConsumeTexture(name)); } // Tests behavior with multiple produce on the same texture. @@ -128,8 +128,8 @@ // Destroy should cleanup all mailboxes. DestroyTexture(texture); - EXPECT_EQ(NULL, manager_->ConsumeTexture(name1)); - EXPECT_EQ(NULL, manager_->ConsumeTexture(name2)); + EXPECT_EQ(nullptr, manager_->ConsumeTexture(name1)); + EXPECT_EQ(nullptr, manager_->ConsumeTexture(name2)); } // Tests behavior with multiple produce on the same mailbox with different @@ -153,7 +153,7 @@ // Destroying the texture that's bound should clean up. DestroyTexture(texture1); - EXPECT_EQ(NULL, manager_->ConsumeTexture(name)); + EXPECT_EQ(nullptr, manager_->ConsumeTexture(name)); } const GLsizei kMaxTextureWidth = 64; @@ -219,7 +219,7 @@ } void TearDown() override { - context_->ReleaseCurrent(NULL); + context_->ReleaseCurrent(nullptr); MailboxManagerTest::TearDown(); } @@ -240,8 +240,8 @@ EXPECT_EQ(texture, manager_->ConsumeTexture(name)); DestroyTexture(texture); - EXPECT_EQ(NULL, manager_->ConsumeTexture(name)); - EXPECT_EQ(NULL, manager2_->ConsumeTexture(name)); + EXPECT_EQ(nullptr, manager_->ConsumeTexture(name)); + EXPECT_EQ(nullptr, manager2_->ConsumeTexture(name)); } TEST_F(MailboxManagerSyncTest, ProduceSyncDestroy) { @@ -258,8 +258,8 @@ manager2_->PullTextureUpdates(g_sync_token); DestroyTexture(texture); - EXPECT_EQ(NULL, manager_->ConsumeTexture(name)); - EXPECT_EQ(NULL, manager2_->ConsumeTexture(name)); + EXPECT_EQ(nullptr, manager_->ConsumeTexture(name)); + EXPECT_EQ(nullptr, manager2_->ConsumeTexture(name)); } TEST_F(MailboxManagerSyncTest, ProduceSyncMultipleMailbox) { @@ -279,8 +279,8 @@ DestroyTexture(old_texture); DestroyTexture(texture); - EXPECT_EQ(NULL, manager_->ConsumeTexture(name)); - EXPECT_EQ(NULL, manager2_->ConsumeTexture(name)); + EXPECT_EQ(nullptr, manager_->ConsumeTexture(name)); + EXPECT_EQ(nullptr, manager2_->ConsumeTexture(name)); } // Duplicates a texture into a second manager instance, and then @@ -312,7 +312,7 @@ SetLevelInfo(texture, GL_TEXTURE_2D, 0, GL_RGBA, 16, 32, 1, 0, GL_RGBA, GL_UNSIGNED_BYTE, gfx::Rect(16, 32)); // Should have been orphaned - EXPECT_TRUE(texture->GetLevelImage(GL_TEXTURE_2D, 0) == NULL); + EXPECT_TRUE(texture->GetLevelImage(GL_TEXTURE_2D, 0) == nullptr); // Synchronize again manager_->PushTextureUpdates(g_sync_token); @@ -325,7 +325,7 @@ EXPECT_EQ(32, height); // Should have gotten a new attachment - EXPECT_TRUE(texture->GetLevelImage(GL_TEXTURE_2D, 0) != NULL); + EXPECT_TRUE(texture->GetLevelImage(GL_TEXTURE_2D, 0) != nullptr); // Resize original texture again.... SetLevelInfo(texture, GL_TEXTURE_2D, 0, GL_RGBA, 64, 64, 1, 0, GL_RGBA, GL_UNSIGNED_BYTE, gfx::Rect(64, 64)); @@ -345,8 +345,8 @@ EXPECT_EQ(64, height); DestroyTexture(new_texture); - EXPECT_EQ(NULL, manager_->ConsumeTexture(name)); - EXPECT_EQ(NULL, manager2_->ConsumeTexture(name)); + EXPECT_EQ(nullptr, manager_->ConsumeTexture(name)); + EXPECT_EQ(nullptr, manager2_->ConsumeTexture(name)); } // Makes sure changes are correctly published even when updates are @@ -360,8 +360,8 @@ Mailbox name1 = Mailbox::Generate(); Texture* texture2 = DefineTexture(); Mailbox name2 = Mailbox::Generate(); - TextureBase* new_texture1 = NULL; - TextureBase* new_texture2 = NULL; + TextureBase* new_texture1 = nullptr; + TextureBase* new_texture2 = nullptr; manager_->ProduceTexture(name1, texture1); manager2_->ProduceTexture(name2, texture2); @@ -463,8 +463,8 @@ DestroyTexture(texture); DestroyTexture(new_texture); - EXPECT_EQ(NULL, manager_->ConsumeTexture(name)); - EXPECT_EQ(NULL, manager2_->ConsumeTexture(name)); + EXPECT_EQ(nullptr, manager_->ConsumeTexture(name)); + EXPECT_EQ(nullptr, manager2_->ConsumeTexture(name)); } TEST_F(MailboxManagerSyncTest, SyncIncompleteTexture) { @@ -514,8 +514,8 @@ DestroyTexture(texture); DestroyTexture(new_texture); - EXPECT_EQ(NULL, manager_->ConsumeTexture(name)); - EXPECT_EQ(NULL, manager2_->ConsumeTexture(name)); + EXPECT_EQ(nullptr, manager_->ConsumeTexture(name)); + EXPECT_EQ(nullptr, manager2_->ConsumeTexture(name)); } // Putting the same texture into multiple mailboxes should result in sharing
diff --git a/gpu/command_buffer/service/memory_program_cache.cc b/gpu/command_buffer/service/memory_program_cache.cc index 14c5ca4c..a824e44 100644 --- a/gpu/command_buffer/service/memory_program_cache.cc +++ b/gpu/command_buffer/service/memory_program_cache.cc
@@ -414,7 +414,7 @@ return; } std::vector<uint8_t> binary(length); - glGetProgramBinary(program, length, NULL, &format, + glGetProgramBinary(program, length, nullptr, &format, reinterpret_cast<char*>(binary.data())); if (compress_program_binaries_) {
diff --git a/gpu/command_buffer/service/memory_program_cache_unittest.cc b/gpu/command_buffer/service/memory_program_cache_unittest.cc index 60a57cb4d..d221cb7 100644 --- a/gpu/command_buffer/service/memory_program_cache_unittest.cc +++ b/gpu/command_buffer/service/memory_program_cache_unittest.cc
@@ -114,8 +114,8 @@ kFragmentShaderClientId, kFragmentShaderServiceId, GL_FRAGMENT_SHADER); - ASSERT_TRUE(vertex_shader_ != NULL); - ASSERT_TRUE(fragment_shader_ != NULL); + ASSERT_TRUE(vertex_shader_ != nullptr); + ASSERT_TRUE(fragment_shader_ != nullptr); AttributeMap vertex_attrib_map; UniformMap vertex_uniform_map; VaryingMap vertex_varying_map; @@ -217,13 +217,14 @@ ProgramBinaryEmulator emulator(kBinaryLength, kFormat, test_binary); SetExpectationsForSaveLinkedProgram(kProgramId, &emulator); - cache_->SaveLinkedProgram(kProgramId, vertex_shader_, fragment_shader_, NULL, - varyings_, GL_NONE, this); + cache_->SaveLinkedProgram(kProgramId, vertex_shader_, fragment_shader_, + nullptr, varyings_, GL_NONE, this); - EXPECT_EQ(ProgramCache::LINK_SUCCEEDED, cache_->GetLinkedProgramStatus( - vertex_shader_->last_compiled_signature(), - fragment_shader_->last_compiled_signature(), - NULL, varyings_, GL_NONE)); + EXPECT_EQ(ProgramCache::LINK_SUCCEEDED, + cache_->GetLinkedProgramStatus( + vertex_shader_->last_compiled_signature(), + fragment_shader_->last_compiled_signature(), nullptr, varyings_, + GL_NONE)); EXPECT_EQ(1, shader_cache_count()); } @@ -238,23 +239,25 @@ ProgramBinaryEmulator emulator(kBinaryLength, kFormat, test_binary); SetExpectationsForSaveLinkedProgram(kProgramId, &emulator); - cache_->SaveLinkedProgram(kProgramId, vertex_shader_, fragment_shader_, NULL, - varyings_, GL_NONE, this); + cache_->SaveLinkedProgram(kProgramId, vertex_shader_, fragment_shader_, + nullptr, varyings_, GL_NONE, this); - EXPECT_EQ(ProgramCache::LINK_SUCCEEDED, cache_->GetLinkedProgramStatus( - vertex_shader_->last_compiled_signature(), - fragment_shader_->last_compiled_signature(), - NULL, varyings_, GL_NONE)); + EXPECT_EQ(ProgramCache::LINK_SUCCEEDED, + cache_->GetLinkedProgramStatus( + vertex_shader_->last_compiled_signature(), + fragment_shader_->last_compiled_signature(), nullptr, varyings_, + GL_NONE)); EXPECT_EQ(1, shader_cache_count()); cache_->Clear(); std::string blank; cache_->LoadProgram(blank, shader_cache_shader()); - EXPECT_EQ(ProgramCache::LINK_SUCCEEDED, cache_->GetLinkedProgramStatus( - vertex_shader_->last_compiled_signature(), - fragment_shader_->last_compiled_signature(), - NULL, varyings_, GL_NONE)); + EXPECT_EQ(ProgramCache::LINK_SUCCEEDED, + cache_->GetLinkedProgramStatus( + vertex_shader_->last_compiled_signature(), + fragment_shader_->last_compiled_signature(), nullptr, varyings_, + GL_NONE)); } TEST_F(MemoryProgramCacheTest, CacheLoadMatchesSave) { @@ -268,8 +271,8 @@ ProgramBinaryEmulator emulator(kBinaryLength, kFormat, test_binary); SetExpectationsForSaveLinkedProgram(kProgramId, &emulator); - cache_->SaveLinkedProgram(kProgramId, vertex_shader_, fragment_shader_, NULL, - varyings_, GL_NONE, this); + cache_->SaveLinkedProgram(kProgramId, vertex_shader_, fragment_shader_, + nullptr, varyings_, GL_NONE, this); EXPECT_EQ(1, shader_cache_count()); AttributeMap vertex_attrib_map = vertex_shader_->attrib_map(); @@ -296,7 +299,7 @@ EXPECT_EQ( ProgramCache::PROGRAM_LOAD_SUCCESS, cache_->LoadLinkedProgram(kProgramId, vertex_shader_, fragment_shader_, - NULL, varyings_, GL_NONE, this)); + nullptr, varyings_, GL_NONE, this)); // apparently the hash_map implementation on android doesn't have the // equality operator @@ -325,8 +328,8 @@ ProgramBinaryEmulator emulator(kBinaryLength, kFormat, test_binary); SetExpectationsForSaveLinkedProgram(kProgramId, &emulator); - cache_->SaveLinkedProgram(kProgramId, vertex_shader_, fragment_shader_, NULL, - varyings_, GL_NONE, this); + cache_->SaveLinkedProgram(kProgramId, vertex_shader_, fragment_shader_, + nullptr, varyings_, GL_NONE, this); EXPECT_EQ(1, shader_cache_count()); AttributeMap vertex_attrib_map = vertex_shader_->attrib_map(); @@ -358,7 +361,7 @@ EXPECT_EQ( ProgramCache::PROGRAM_LOAD_SUCCESS, cache_->LoadLinkedProgram(kProgramId, vertex_shader_, fragment_shader_, - NULL, varyings_, GL_NONE, this)); + nullptr, varyings_, GL_NONE, this)); // apparently the hash_map implementation on android doesn't have the // equality operator @@ -387,14 +390,14 @@ ProgramBinaryEmulator emulator(kBinaryLength, kFormat, test_binary); SetExpectationsForSaveLinkedProgram(kProgramId, &emulator); - cache_->SaveLinkedProgram(kProgramId, vertex_shader_, fragment_shader_, NULL, - varyings_, GL_NONE, this); + cache_->SaveLinkedProgram(kProgramId, vertex_shader_, fragment_shader_, + nullptr, varyings_, GL_NONE, this); SetExpectationsForLoadLinkedProgramFailure(kProgramId, &emulator); EXPECT_EQ( ProgramCache::PROGRAM_LOAD_FAILURE, cache_->LoadLinkedProgram(kProgramId, vertex_shader_, fragment_shader_, - NULL, varyings_, GL_NONE, this)); + nullptr, varyings_, GL_NONE, this)); } TEST_F(MemoryProgramCacheTest, LoadFailOnDifferentSource) { @@ -408,8 +411,8 @@ ProgramBinaryEmulator emulator(kBinaryLength, kFormat, test_binary); SetExpectationsForSaveLinkedProgram(kProgramId, &emulator); - cache_->SaveLinkedProgram(kProgramId, vertex_shader_, fragment_shader_, NULL, - varyings_, GL_NONE, this); + cache_->SaveLinkedProgram(kProgramId, vertex_shader_, fragment_shader_, + nullptr, varyings_, GL_NONE, this); const std::string vertex_orig_source = vertex_shader_->last_compiled_source(); vertex_shader_->set_source("different!"); @@ -417,7 +420,7 @@ EXPECT_EQ( ProgramCache::PROGRAM_LOAD_FAILURE, cache_->LoadLinkedProgram(kProgramId, vertex_shader_, fragment_shader_, - NULL, varyings_, GL_NONE, this)); + nullptr, varyings_, GL_NONE, this)); vertex_shader_->set_source(vertex_orig_source); TestHelper::SetShaderStates(gl_.get(), vertex_shader_, true); @@ -426,7 +429,7 @@ EXPECT_EQ( ProgramCache::PROGRAM_LOAD_FAILURE, cache_->LoadLinkedProgram(kProgramId, vertex_shader_, fragment_shader_, - NULL, varyings_, GL_NONE, this)); + nullptr, varyings_, GL_NONE, this)); } TEST_F(MemoryProgramCacheTest, LoadFailOnDifferentMap) { @@ -453,7 +456,7 @@ EXPECT_EQ( ProgramCache::PROGRAM_LOAD_FAILURE, cache_->LoadLinkedProgram(kProgramId, vertex_shader_, fragment_shader_, - NULL, varyings_, GL_NONE, this)); + nullptr, varyings_, GL_NONE, this)); } TEST_F(MemoryProgramCacheTest, LoadFailOnDifferentTransformFeedbackVaryings) { @@ -468,19 +471,19 @@ SetExpectationsForSaveLinkedProgram(kProgramId, &emulator); varyings_.push_back("test"); - cache_->SaveLinkedProgram(kProgramId, vertex_shader_, fragment_shader_, NULL, - varyings_, GL_INTERLEAVED_ATTRIBS, this); + cache_->SaveLinkedProgram(kProgramId, vertex_shader_, fragment_shader_, + nullptr, varyings_, GL_INTERLEAVED_ATTRIBS, this); EXPECT_EQ( ProgramCache::PROGRAM_LOAD_FAILURE, cache_->LoadLinkedProgram(kProgramId, vertex_shader_, fragment_shader_, - NULL, varyings_, GL_SEPARATE_ATTRIBS, this)); + nullptr, varyings_, GL_SEPARATE_ATTRIBS, this)); varyings_.push_back("different!"); - EXPECT_EQ( - ProgramCache::PROGRAM_LOAD_FAILURE, - cache_->LoadLinkedProgram(kProgramId, vertex_shader_, fragment_shader_, - NULL, varyings_, GL_INTERLEAVED_ATTRIBS, this)); + EXPECT_EQ(ProgramCache::PROGRAM_LOAD_FAILURE, + cache_->LoadLinkedProgram(kProgramId, vertex_shader_, + fragment_shader_, nullptr, varyings_, + GL_INTERLEAVED_ATTRIBS, this)); } TEST_F(MemoryProgramCacheTest, LoadFailIfTransformFeedbackCachingDisabled) { @@ -498,12 +501,12 @@ cache_.reset(new MemoryProgramCache(kCacheSizeBytes, kDisableGpuDiskCache, true, &activity_flags_)); varyings_.push_back("test"); - cache_->SaveLinkedProgram(kProgramId, vertex_shader_, fragment_shader_, NULL, - varyings_, GL_INTERLEAVED_ATTRIBS, this); - EXPECT_EQ( - ProgramCache::PROGRAM_LOAD_FAILURE, - cache_->LoadLinkedProgram(kProgramId, vertex_shader_, fragment_shader_, - NULL, varyings_, GL_INTERLEAVED_ATTRIBS, this)); + cache_->SaveLinkedProgram(kProgramId, vertex_shader_, fragment_shader_, + nullptr, varyings_, GL_INTERLEAVED_ATTRIBS, this); + EXPECT_EQ(ProgramCache::PROGRAM_LOAD_FAILURE, + cache_->LoadLinkedProgram(kProgramId, vertex_shader_, + fragment_shader_, nullptr, varyings_, + GL_INTERLEAVED_ATTRIBS, this)); } TEST_F(MemoryProgramCacheTest, MemoryProgramCacheEviction) { @@ -518,8 +521,8 @@ SetExpectationsForSaveLinkedProgram(kProgramId, &emulator1); - cache_->SaveLinkedProgram(kProgramId, vertex_shader_, fragment_shader_, NULL, - varyings_, GL_NONE, this); + cache_->SaveLinkedProgram(kProgramId, vertex_shader_, fragment_shader_, + nullptr, varyings_, GL_NONE, this); const int kEvictingProgramId = 11; const GLuint kEvictingBinaryLength = kCacheSizeBytes - kBinaryLength + 1; @@ -540,16 +543,18 @@ SetExpectationsForSaveLinkedProgram(kEvictingProgramId, &emulator2); cache_->SaveLinkedProgram(kEvictingProgramId, vertex_shader_, - fragment_shader_, NULL, varyings_, GL_NONE, this); + fragment_shader_, nullptr, varyings_, GL_NONE, + this); - EXPECT_EQ(ProgramCache::LINK_SUCCEEDED, cache_->GetLinkedProgramStatus( - vertex_shader_->last_compiled_signature(), - fragment_shader_->last_compiled_signature(), - NULL, varyings_, GL_NONE)); + EXPECT_EQ(ProgramCache::LINK_SUCCEEDED, + cache_->GetLinkedProgramStatus( + vertex_shader_->last_compiled_signature(), + fragment_shader_->last_compiled_signature(), nullptr, varyings_, + GL_NONE)); EXPECT_EQ( ProgramCache::LINK_UNKNOWN, cache_->GetLinkedProgramStatus(vertex_shader_->last_compiled_signature(), - old_sig, NULL, varyings_, GL_NONE)); + old_sig, nullptr, varyings_, GL_NONE)); } TEST_F(MemoryProgramCacheTest, SaveCorrectProgram) { @@ -564,13 +569,14 @@ vertex_shader_->set_source("different!"); SetExpectationsForSaveLinkedProgram(kProgramId, &emulator1); - cache_->SaveLinkedProgram(kProgramId, vertex_shader_, fragment_shader_, NULL, - varyings_, GL_NONE, this); + cache_->SaveLinkedProgram(kProgramId, vertex_shader_, fragment_shader_, + nullptr, varyings_, GL_NONE, this); - EXPECT_EQ(ProgramCache::LINK_SUCCEEDED, cache_->GetLinkedProgramStatus( - vertex_shader_->last_compiled_signature(), - fragment_shader_->last_compiled_signature(), - NULL, varyings_, GL_NONE)); + EXPECT_EQ(ProgramCache::LINK_SUCCEEDED, + cache_->GetLinkedProgramStatus( + vertex_shader_->last_compiled_signature(), + fragment_shader_->last_compiled_signature(), nullptr, varyings_, + GL_NONE)); } TEST_F(MemoryProgramCacheTest, LoadCorrectProgram) { @@ -584,13 +590,14 @@ ProgramBinaryEmulator emulator(kBinaryLength, kFormat, test_binary); SetExpectationsForSaveLinkedProgram(kProgramId, &emulator); - cache_->SaveLinkedProgram(kProgramId, vertex_shader_, fragment_shader_, NULL, - varyings_, GL_NONE, this); + cache_->SaveLinkedProgram(kProgramId, vertex_shader_, fragment_shader_, + nullptr, varyings_, GL_NONE, this); - EXPECT_EQ(ProgramCache::LINK_SUCCEEDED, cache_->GetLinkedProgramStatus( - vertex_shader_->last_compiled_signature(), - fragment_shader_->last_compiled_signature(), - NULL, varyings_, GL_NONE)); + EXPECT_EQ(ProgramCache::LINK_SUCCEEDED, + cache_->GetLinkedProgramStatus( + vertex_shader_->last_compiled_signature(), + fragment_shader_->last_compiled_signature(), nullptr, varyings_, + GL_NONE)); SetExpectationsForLoadLinkedProgram(kProgramId, &emulator); @@ -598,7 +605,7 @@ EXPECT_EQ( ProgramCache::PROGRAM_LOAD_SUCCESS, cache_->LoadLinkedProgram(kProgramId, vertex_shader_, fragment_shader_, - NULL, varyings_, GL_NONE, this)); + nullptr, varyings_, GL_NONE, this)); } TEST_F(MemoryProgramCacheTest, OverwriteOnNewSave) { @@ -612,8 +619,8 @@ ProgramBinaryEmulator emulator(kBinaryLength, kFormat, test_binary); SetExpectationsForSaveLinkedProgram(kProgramId, &emulator); - cache_->SaveLinkedProgram(kProgramId, vertex_shader_, fragment_shader_, NULL, - varyings_, GL_NONE, this); + cache_->SaveLinkedProgram(kProgramId, vertex_shader_, fragment_shader_, + nullptr, varyings_, GL_NONE, this); char test_binary2[kBinaryLength]; for (int i = 0; i < kBinaryLength; ++i) { @@ -621,14 +628,14 @@ } ProgramBinaryEmulator emulator2(kBinaryLength, kFormat, test_binary2); SetExpectationsForSaveLinkedProgram(kProgramId, &emulator2); - cache_->SaveLinkedProgram(kProgramId, vertex_shader_, fragment_shader_, NULL, - varyings_, GL_NONE, this); + cache_->SaveLinkedProgram(kProgramId, vertex_shader_, fragment_shader_, + nullptr, varyings_, GL_NONE, this); SetExpectationsForLoadLinkedProgram(kProgramId, &emulator2); EXPECT_EQ( ProgramCache::PROGRAM_LOAD_SUCCESS, cache_->LoadLinkedProgram(kProgramId, vertex_shader_, fragment_shader_, - NULL, varyings_, GL_NONE, this)); + nullptr, varyings_, GL_NONE, this)); } TEST_F(MemoryProgramCacheTest, MemoryProgramCacheTrim) { @@ -643,8 +650,8 @@ ProgramBinaryEmulator emulator1(kBinaryLength, kFormat, test_binary); SetExpectationsForSaveLinkedProgram(kProgramId, &emulator1); - cache_->SaveLinkedProgram(kProgramId, vertex_shader_, fragment_shader_, NULL, - varyings_, GL_NONE, this); + cache_->SaveLinkedProgram(kProgramId, vertex_shader_, fragment_shader_, + nullptr, varyings_, GL_NONE, this); // Insert a second 20 byte program. const int kSecondProgramId = 11; @@ -656,42 +663,42 @@ SetExpectationsForSaveLinkedProgram(kSecondProgramId, &emulator2); cache_->SaveLinkedProgram(kSecondProgramId, vertex_shader_, fragment_shader_, - NULL, varyings_, GL_NONE, this); + nullptr, varyings_, GL_NONE, this); // Both programs should be present. EXPECT_EQ(ProgramCache::LINK_SUCCEEDED, cache_->GetLinkedProgramStatus( vertex_shader_->last_compiled_signature(), - fragment_shader_->last_compiled_signature(), NULL, varyings_, + fragment_shader_->last_compiled_signature(), nullptr, varyings_, GL_NONE)); EXPECT_EQ( ProgramCache::LINK_SUCCEEDED, cache_->GetLinkedProgramStatus(vertex_shader_->last_compiled_signature(), - first_sig, NULL, varyings_, GL_NONE)); + first_sig, nullptr, varyings_, GL_NONE)); // Trim cache to 20 bytes - this should evict the first program. cache_->Trim(20); EXPECT_EQ(ProgramCache::LINK_SUCCEEDED, cache_->GetLinkedProgramStatus( vertex_shader_->last_compiled_signature(), - fragment_shader_->last_compiled_signature(), NULL, varyings_, + fragment_shader_->last_compiled_signature(), nullptr, varyings_, GL_NONE)); EXPECT_EQ( ProgramCache::LINK_UNKNOWN, cache_->GetLinkedProgramStatus(vertex_shader_->last_compiled_signature(), - first_sig, NULL, varyings_, GL_NONE)); + first_sig, nullptr, varyings_, GL_NONE)); // Trim cache to 0 bytes - this should evict both programs. cache_->Trim(0); EXPECT_EQ(ProgramCache::LINK_UNKNOWN, cache_->GetLinkedProgramStatus( vertex_shader_->last_compiled_signature(), - fragment_shader_->last_compiled_signature(), NULL, varyings_, + fragment_shader_->last_compiled_signature(), nullptr, varyings_, GL_NONE)); EXPECT_EQ( ProgramCache::LINK_UNKNOWN, cache_->GetLinkedProgramStatus(vertex_shader_->last_compiled_signature(), - first_sig, NULL, varyings_, GL_NONE)); + first_sig, nullptr, varyings_, GL_NONE)); } } // namespace gles2
diff --git a/gpu/command_buffer/service/program_cache_unittest.cc b/gpu/command_buffer/service/program_cache_unittest.cc index 2830329..27bee7d5 100644 --- a/gpu/command_buffer/service/program_cache_unittest.cc +++ b/gpu/command_buffer/service/program_cache_unittest.cc
@@ -107,69 +107,65 @@ std::string shader_a = shader1; std::string shader_b = shader2; EXPECT_EQ(ProgramCache::LINK_UNKNOWN, - cache_->GetLinkedProgramStatus( - shader_a, shader_b, NULL, varyings_, GL_NONE)); - cache_->SaySuccessfullyCached(shader_a, shader_b, NULL, varyings_, GL_NONE); + cache_->GetLinkedProgramStatus(shader_a, shader_b, nullptr, + varyings_, GL_NONE)); + cache_->SaySuccessfullyCached(shader_a, shader_b, nullptr, varyings_, + GL_NONE); shader_a.clear(); shader_b.clear(); } // make sure it was copied EXPECT_EQ(ProgramCache::LINK_SUCCEEDED, - cache_->GetLinkedProgramStatus( - shader1, shader2, NULL, varyings_, GL_NONE)); + cache_->GetLinkedProgramStatus(shader1, shader2, nullptr, varyings_, + GL_NONE)); } TEST_F(ProgramCacheTest, LinkUnknownOnFragmentSourceChange) { const std::string shader1 = "abcd1234"; std::string shader2 = "abcda sda b1~#4 bbbbb1234"; - cache_->SaySuccessfullyCached(shader1, shader2, NULL, varyings_, GL_NONE); + cache_->SaySuccessfullyCached(shader1, shader2, nullptr, varyings_, GL_NONE); shader2 = "different!"; EXPECT_EQ(ProgramCache::LINK_UNKNOWN, - cache_->GetLinkedProgramStatus(shader1, shader2, NULL, - varyings_, GL_NONE)); + cache_->GetLinkedProgramStatus(shader1, shader2, nullptr, varyings_, + GL_NONE)); } TEST_F(ProgramCacheTest, LinkUnknownOnVertexSourceChange) { std::string shader1 = "abcd1234"; const std::string shader2 = "abcda sda b1~#4 bbbbb1234"; - cache_->SaySuccessfullyCached(shader1, shader2, NULL, varyings_, GL_NONE); + cache_->SaySuccessfullyCached(shader1, shader2, nullptr, varyings_, GL_NONE); shader1 = "different!"; EXPECT_EQ(ProgramCache::LINK_UNKNOWN, - cache_->GetLinkedProgramStatus(shader1, shader2, NULL, - varyings_, GL_NONE)); + cache_->GetLinkedProgramStatus(shader1, shader2, nullptr, varyings_, + GL_NONE)); } TEST_F(ProgramCacheTest, StatusEviction) { const std::string shader1 = "abcd1234"; const std::string shader2 = "abcda sda b1~#4 bbbbb1234"; - cache_->SaySuccessfullyCached(shader1, shader2, NULL, varyings_, GL_NONE); + cache_->SaySuccessfullyCached(shader1, shader2, nullptr, varyings_, GL_NONE); char a_sha[ProgramCache::kHashLength]; char b_sha[ProgramCache::kHashLength]; cache_->ComputeShaderHash(shader1, a_sha); cache_->ComputeShaderHash(shader2, b_sha); char sha[ProgramCache::kHashLength]; - cache_->ComputeProgramHash(a_sha, - b_sha, - NULL, - varyings_, - GL_NONE, - sha); + cache_->ComputeProgramHash(a_sha, b_sha, nullptr, varyings_, GL_NONE, sha); cache_->Evict(std::string(sha, ProgramCache::kHashLength)); EXPECT_EQ(ProgramCache::LINK_UNKNOWN, - cache_->GetLinkedProgramStatus(shader1, shader2, NULL, - varyings_, GL_NONE)); + cache_->GetLinkedProgramStatus(shader1, shader2, nullptr, varyings_, + GL_NONE)); } TEST_F(ProgramCacheTest, EvictionWithReusedShader) { const std::string shader1 = "abcd1234"; const std::string shader2 = "abcda sda b1~#4 bbbbb1234"; const std::string shader3 = "asbjbbjj239a"; - cache_->SaySuccessfullyCached(shader1, shader2, NULL, varyings_, GL_NONE); - cache_->SaySuccessfullyCached(shader1, shader3, NULL, varyings_, GL_NONE); + cache_->SaySuccessfullyCached(shader1, shader2, nullptr, varyings_, GL_NONE); + cache_->SaySuccessfullyCached(shader1, shader3, nullptr, varyings_, GL_NONE); char a_sha[ProgramCache::kHashLength]; char b_sha[ProgramCache::kHashLength]; @@ -179,66 +175,55 @@ cache_->ComputeShaderHash(shader3, c_sha); char sha[ProgramCache::kHashLength]; - cache_->ComputeProgramHash(a_sha, - b_sha, - NULL, - varyings_, - GL_NONE, - sha); + cache_->ComputeProgramHash(a_sha, b_sha, nullptr, varyings_, GL_NONE, sha); cache_->Evict(std::string(sha, ProgramCache::kHashLength)); EXPECT_EQ(ProgramCache::LINK_UNKNOWN, - cache_->GetLinkedProgramStatus(shader1, shader2, NULL, - varyings_, GL_NONE)); + cache_->GetLinkedProgramStatus(shader1, shader2, nullptr, varyings_, + GL_NONE)); EXPECT_EQ(ProgramCache::LINK_SUCCEEDED, - cache_->GetLinkedProgramStatus(shader1, shader3, NULL, - varyings_, GL_NONE)); + cache_->GetLinkedProgramStatus(shader1, shader3, nullptr, varyings_, + GL_NONE)); - - cache_->ComputeProgramHash(a_sha, - c_sha, - NULL, - varyings_, - GL_NONE, - sha); + cache_->ComputeProgramHash(a_sha, c_sha, nullptr, varyings_, GL_NONE, sha); cache_->Evict(std::string(sha, ProgramCache::kHashLength)); EXPECT_EQ(ProgramCache::LINK_UNKNOWN, - cache_->GetLinkedProgramStatus(shader1, shader2, NULL, - varyings_, GL_NONE)); + cache_->GetLinkedProgramStatus(shader1, shader2, nullptr, varyings_, + GL_NONE)); EXPECT_EQ(ProgramCache::LINK_UNKNOWN, - cache_->GetLinkedProgramStatus(shader1, shader3, NULL, - varyings_, GL_NONE)); + cache_->GetLinkedProgramStatus(shader1, shader3, nullptr, varyings_, + GL_NONE)); } TEST_F(ProgramCacheTest, StatusClear) { const std::string shader1 = "abcd1234"; const std::string shader2 = "abcda sda b1~#4 bbbbb1234"; const std::string shader3 = "asbjbbjj239a"; - cache_->SaySuccessfullyCached(shader1, shader2, NULL, varyings_, GL_NONE); - cache_->SaySuccessfullyCached(shader1, shader3, NULL, varyings_, GL_NONE); + cache_->SaySuccessfullyCached(shader1, shader2, nullptr, varyings_, GL_NONE); + cache_->SaySuccessfullyCached(shader1, shader3, nullptr, varyings_, GL_NONE); cache_->Clear(); EXPECT_EQ(ProgramCache::LINK_UNKNOWN, - cache_->GetLinkedProgramStatus(shader1, shader2, NULL, - varyings_, GL_NONE)); + cache_->GetLinkedProgramStatus(shader1, shader2, nullptr, varyings_, + GL_NONE)); EXPECT_EQ(ProgramCache::LINK_UNKNOWN, - cache_->GetLinkedProgramStatus(shader1, shader3, NULL, - varyings_, GL_NONE)); + cache_->GetLinkedProgramStatus(shader1, shader3, nullptr, varyings_, + GL_NONE)); } TEST_F(ProgramCacheTest, LinkUnknownOnTransformFeedbackChange) { const std::string shader1 = "abcd1234"; std::string shader2 = "abcda sda b1~#4 bbbbb1234"; varyings_.push_back("a"); - cache_->SaySuccessfullyCached(shader1, shader2, NULL, varyings_, + cache_->SaySuccessfullyCached(shader1, shader2, nullptr, varyings_, GL_INTERLEAVED_ATTRIBS); EXPECT_EQ(ProgramCache::LINK_UNKNOWN, - cache_->GetLinkedProgramStatus(shader1, shader2, NULL, - varyings_, GL_SEPARATE_ATTRIBS)); + cache_->GetLinkedProgramStatus(shader1, shader2, nullptr, varyings_, + GL_SEPARATE_ATTRIBS)); varyings_.push_back("b"); EXPECT_EQ(ProgramCache::LINK_UNKNOWN, - cache_->GetLinkedProgramStatus(shader1, shader2, NULL, - varyings_, GL_INTERLEAVED_ATTRIBS)); + cache_->GetLinkedProgramStatus(shader1, shader2, nullptr, varyings_, + GL_INTERLEAVED_ATTRIBS)); } } // namespace gles2
diff --git a/gpu/command_buffer/service/program_manager.cc b/gpu/command_buffer/service/program_manager.cc index b124e21..5fc3e24 100644 --- a/gpu/command_buffer/service/program_manager.cc +++ b/gpu/command_buffer/service/program_manager.cc
@@ -1716,7 +1716,7 @@ Program::GetUniformInfo( GLint index) const { if (static_cast<size_t>(index) >= uniform_infos_.size()) { - return NULL; + return nullptr; } return &uniform_infos_[index]; } @@ -1795,7 +1795,7 @@ DCHECK(shader_manager); DCHECK(shader); int index = ShaderTypeToIndex(shader->shader_type()); - if (attached_shaders_[index].get() != NULL) { + if (attached_shaders_[index].get() != nullptr) { return false; } attached_shaders_[index] = scoped_refptr<Shader>(shader); @@ -1814,7 +1814,7 @@ DCHECK(shader_manager); DCHECK(shader); DCHECK(IsShaderAttached(shader)); - attached_shaders_[ShaderTypeToIndex(shader->shader_type())] = NULL; + attached_shaders_[ShaderTypeToIndex(shader->shader_type())] = nullptr; shader_manager->UnuseShader(shader); } @@ -1872,7 +1872,7 @@ std::set<GLint> location_binding_used; for (const auto& key_value : bind_attrib_location_map_) { // Find out if an attribute is statically used in this program's shaders. - const sh::Attribute* attrib = NULL; + const sh::Attribute* attrib = nullptr; const std::string* mapped_name = GetAttribMappedName(key_value.first); if (!mapped_name) continue; @@ -1884,7 +1884,7 @@ if (attrib->staticUse) break; else - attrib = NULL; + attrib = nullptr; } } if (attrib) { @@ -2586,7 +2586,7 @@ glDeleteProgram(service_id()); } manager_->StopTracking(this); - manager_ = NULL; + manager_ = nullptr; } } @@ -2644,7 +2644,7 @@ Program* ProgramManager::GetProgram(GLuint client_id) { ProgramMap::iterator it = programs_.find(client_id); - return it != programs_.end() ? it->second.get() : NULL; + return it != programs_.end() ? it->second.get() : nullptr; } bool ProgramManager::GetClientId(GLuint service_id, GLuint* client_id) const {
diff --git a/gpu/command_buffer/service/program_manager.h b/gpu/command_buffer/service/program_manager.h index cbd2f02..77f79eb 100644 --- a/gpu/command_buffer/service/program_manager.h +++ b/gpu/command_buffer/service/program_manager.h
@@ -213,8 +213,9 @@ } const VertexAttrib* GetAttribInfo(GLint index) const { - return (static_cast<size_t>(index) < attrib_infos_.size()) ? - &attrib_infos_[index] : NULL; + return (static_cast<size_t>(index) < attrib_infos_.size()) + ? &attrib_infos_[index] + : nullptr; } GLint GetAttribLocation(const std::string& original_name) const; @@ -226,28 +227,28 @@ return &attrib_infos_[index]; } } - return NULL; + return nullptr; } const UniformInfo* GetUniformInfo(GLint index) const; - // If the original name is not found, return NULL. + // If the original name is not found, return nullptr. const std::string* GetAttribMappedName( const std::string& original_name) const; - // If the original name is not found, return NULL. + // If the original name is not found, return nullptr. const std::string* GetUniformMappedName( const std::string& original_name) const; - // If the hashed name name is not found, return NULL. + // If the hashed name name is not found, return nullptr. // Use this only when one of the more specific Get*Info methods can't be used. const std::string* GetOriginalNameFromHashedName( const std::string& hashed_name) const; - // If the hashed name is not found, return NULL. + // If the hashed name is not found, return nullptr. const sh::Varying* GetVaryingInfo(const std::string& hashed_name) const; - // If the hashed name is not found, return NULL. + // If the hashed name is not found, return nullptr. const sh::InterfaceBlock* GetInterfaceBlockInfo( const std::string& hashed_name) const; @@ -466,7 +467,7 @@ ~Program(); void set_log_info(const char* str) { - log_info_.reset(str ? new std::string(str) : NULL); + log_info_.reset(str ? new std::string(str) : nullptr); } void ClearLinkStatus() {
diff --git a/gpu/command_buffer/service/program_manager_unittest.cc b/gpu/command_buffer/service/program_manager_unittest.cc index 8bcc4f9..a6a1e4c 100644 --- a/gpu/command_buffer/service/program_manager_unittest.cc +++ b/gpu/command_buffer/service/program_manager_unittest.cc
@@ -111,12 +111,12 @@ manager_->CreateProgram(kClient1Id, kService1Id); // Check program got created. Program* program1 = manager_->GetProgram(kClient1Id); - ASSERT_TRUE(program1 != NULL); + ASSERT_TRUE(program1 != nullptr); GLuint client_id = 0; EXPECT_TRUE(manager_->GetClientId(program1->service_id(), &client_id)); EXPECT_EQ(kClient1Id, client_id); // Check we get nothing for a non-existent program. - EXPECT_TRUE(manager_->GetProgram(kClient2Id) == NULL); + EXPECT_TRUE(manager_->GetProgram(kClient2Id) == nullptr); } TEST_F(ProgramManagerTest, Destroy) { @@ -124,7 +124,7 @@ const GLuint kService1Id = 11; // Check we can create program. Program* program0 = manager_->CreateProgram(kClient1Id, kService1Id); - ASSERT_TRUE(program0 != NULL); + ASSERT_TRUE(program0 != nullptr); // Check program got created. Program* program1 = manager_->GetProgram(kClient1Id); ASSERT_EQ(program0, program1); @@ -134,7 +134,7 @@ manager_->Destroy(true); // Check the resources were released. program1 = manager_->GetProgram(kClient1Id); - ASSERT_TRUE(program1 == NULL); + ASSERT_TRUE(program1 == nullptr); } TEST_F(ProgramManagerTest, DeleteBug) { @@ -173,7 +173,7 @@ EXPECT_FALSE(program1->IsValid()); EXPECT_FALSE(program1->IsDeleted()); EXPECT_FALSE(program1->CanLink()); - EXPECT_TRUE(program1->log_info() == NULL); + EXPECT_TRUE(program1->log_info() == nullptr); } class ProgramManagerWithShaderTest : public ProgramManagerTestBase { @@ -287,18 +287,18 @@ shader_manager_.CreateShader( kFragmentShaderClientId, kFragmentShaderServiceId, GL_FRAGMENT_SHADER); - EXPECT_TRUE(vertex_shader != NULL); - EXPECT_TRUE(fragment_shader != NULL); + EXPECT_TRUE(vertex_shader != nullptr); + EXPECT_TRUE(fragment_shader != nullptr); TestHelper::SetShaderStates(gl_.get(), vertex_shader, true); TestHelper::SetShaderStates(gl_.get(), fragment_shader, true); Program* program = manager_->CreateProgram(kClientProgramId, kServiceProgramId); - EXPECT_TRUE(program != NULL); + EXPECT_TRUE(program != nullptr); program->AttachShader(&shader_manager_, vertex_shader); program->AttachShader(&shader_manager_, fragment_shader); - program->Link(NULL, Program::kCountOnlyStaticallyUsed, this); + program->Link(nullptr, Program::kCountOnlyStaticallyUsed, this); return program; } @@ -326,7 +326,7 @@ SetupShaderExpectations(kAttribs, kNumAttribs, kUniforms, kNumUniforms, service_id); } - program->Link(NULL, Program::kCountOnlyStaticallyUsed, this); + program->Link(nullptr, Program::kCountOnlyStaticallyUsed, this); GLint link_status; program->GetProgramiv(GL_LINK_STATUS, &link_status); return (static_cast<bool>(link_status) == expected_link_status); @@ -435,7 +435,7 @@ Shader* fshader = shader_manager_.CreateShader( kFragmentShaderClientId, kFragmentShaderServiceId, GL_FRAGMENT_SHADER); // Check shader got created. - EXPECT_TRUE(vshader != NULL && fshader != NULL); + EXPECT_TRUE(vshader != nullptr && fshader != nullptr); // Set Status TestHelper::SetShaderStates(gl_.get(), vshader, true, nullptr, nullptr, shader_version, &vertex_attrib_map, @@ -449,7 +449,7 @@ // Set up program Program* program = manager_->CreateProgram(kClientProgramId, kServiceProgramId); - EXPECT_TRUE(program != NULL); + EXPECT_TRUE(program != nullptr); EXPECT_TRUE(program->AttachShader(&shader_manager_, vshader)); EXPECT_TRUE(program->AttachShader(&shader_manager_, fshader)); return program; @@ -572,7 +572,7 @@ TEST_F(ProgramManagerWithShaderTest, GetAttribInfos) { const Program* program = SetupDefaultProgram(); - ASSERT_TRUE(program != NULL); + ASSERT_TRUE(program != nullptr); const Program::AttribInfoVector& infos = program->GetAttribInfos(); ASSERT_EQ(kNumAttribs, infos.size()); @@ -590,21 +590,21 @@ const GLint kValidIndex = 1; const GLint kInvalidIndex = 1000; const Program* program = SetupDefaultProgram(); - ASSERT_TRUE(program != NULL); + ASSERT_TRUE(program != nullptr); const Program::VertexAttrib* info = program->GetAttribInfo(kValidIndex); - ASSERT_TRUE(info != NULL); + ASSERT_TRUE(info != nullptr); EXPECT_EQ(kAttrib2Size, info->size); EXPECT_EQ(kAttrib2Type, info->type); EXPECT_EQ(kAttrib2Location, info->location); EXPECT_STREQ(kAttrib2Name, info->name.c_str()); - EXPECT_TRUE(program->GetAttribInfo(kInvalidIndex) == NULL); + EXPECT_TRUE(program->GetAttribInfo(kInvalidIndex) == nullptr); } TEST_F(ProgramManagerWithShaderTest, GetAttribInfoByLocation) { const GLint kInvalidLocation = 1000; const Program* program = SetupDefaultProgram(); - ASSERT_TRUE(program != NULL); + ASSERT_TRUE(program != nullptr); // attrib2 is a vec2, takes 1 location const Program::VertexAttrib* expected_info = program->GetAttribInfo(1); @@ -623,20 +623,20 @@ info = program->GetAttribInfoByLocation(kAttrib4Location + 2); EXPECT_EQ(expected_info, info); - EXPECT_TRUE(program->GetAttribInfoByLocation(kInvalidLocation) == NULL); + EXPECT_TRUE(program->GetAttribInfoByLocation(kInvalidLocation) == nullptr); } TEST_F(ProgramManagerWithShaderTest, GetAttribLocation) { const char* kInvalidName = "foo"; const Program* program = SetupDefaultProgram(); - ASSERT_TRUE(program != NULL); + ASSERT_TRUE(program != nullptr); EXPECT_EQ(kAttrib2Location, program->GetAttribLocation(kAttrib2Name)); EXPECT_EQ(-1, program->GetAttribLocation(kInvalidName)); } TEST_F(ProgramManagerWithShaderTest, VertexArrayMasks) { const Program* program = SetupDefaultProgram(); - ASSERT_TRUE(program != NULL); + ASSERT_TRUE(program != nullptr); std::vector<uint32_t> active_mask = program->vertex_input_active_mask(); ASSERT_EQ(1u, active_mask.size()); @@ -658,16 +658,16 @@ TEST_F(ProgramManagerWithShaderTest, GetUniformInfo) { const GLint kInvalidIndex = 1000; const Program* program = SetupDefaultProgram(); - ASSERT_TRUE(program != NULL); + ASSERT_TRUE(program != nullptr); const Program::UniformInfo* info = program->GetUniformInfo(0); - ASSERT_TRUE(info != NULL); + ASSERT_TRUE(info != nullptr); EXPECT_EQ(kUniform1Size, info->size); EXPECT_EQ(kUniform1Type, info->type); EXPECT_EQ(kUniform1RealLocation, info->element_locations[0]); EXPECT_STREQ(kUniform1Name, info->name.c_str()); info = program->GetUniformInfo(1); - ASSERT_TRUE(info != NULL); + ASSERT_TRUE(info != nullptr); EXPECT_EQ(kUniform2Size, info->size); EXPECT_EQ(kUniform2Type, info->type); EXPECT_EQ(kUniform2RealLocation, info->element_locations[0]); @@ -675,26 +675,26 @@ info = program->GetUniformInfo(2); // We emulate certain OpenGL drivers by supplying the name without // the array spec. Our implementation should correctly add the required spec. - ASSERT_TRUE(info != NULL); + ASSERT_TRUE(info != nullptr); EXPECT_EQ(kUniform3Size, info->size); EXPECT_EQ(kUniform3Type, info->type); EXPECT_EQ(kUniform3RealLocation, info->element_locations[0]); EXPECT_STREQ(kUniform3NameWithArrayIndex, info->name.c_str()); - EXPECT_TRUE(program->GetUniformInfo(kInvalidIndex) == NULL); + EXPECT_TRUE(program->GetUniformInfo(kInvalidIndex) == nullptr); } TEST_F(ProgramManagerWithShaderTest, AttachDetachShader) { Program* program = manager_->CreateProgram(kClientProgramId, kServiceProgramId); - ASSERT_TRUE(program != NULL); + ASSERT_TRUE(program != nullptr); EXPECT_FALSE(program->CanLink()); Shader* vshader = shader_manager_.CreateShader( kVertexShaderClientId, kVertexShaderServiceId, GL_VERTEX_SHADER); - ASSERT_TRUE(vshader != NULL); + ASSERT_TRUE(vshader != nullptr); TestHelper::SetShaderStates(gl_.get(), vshader, true); Shader* fshader = shader_manager_.CreateShader( kFragmentShaderClientId, kFragmentShaderServiceId, GL_FRAGMENT_SHADER); - ASSERT_TRUE(fshader != NULL); + ASSERT_TRUE(fshader != nullptr); TestHelper::SetShaderStates(gl_.get(), fshader, true); EXPECT_TRUE(program->AttachShader(&shader_manager_, vshader)); EXPECT_FALSE(program->CanLink()); @@ -725,12 +725,12 @@ TEST_F(ProgramManagerWithShaderTest, GetUniformFakeLocation) { const Program* program = SetupDefaultProgram(); - ASSERT_TRUE(program != NULL); + ASSERT_TRUE(program != nullptr); // Emulate the situation that uniform3[1] isn't used and optimized out by // a driver, so it's location is -1. Program::UniformInfo* uniform = const_cast<Program::UniformInfo*>( program->GetUniformInfo(2)); - ASSERT_TRUE(uniform != NULL && kUniform3Size == 2); + ASSERT_TRUE(uniform != nullptr && kUniform3Size == 2); EXPECT_EQ(kUniform3Size, uniform->size); uniform->element_locations[1] = -1; EXPECT_EQ(kUniform1FakeLocation, @@ -763,24 +763,24 @@ const Program* program = SetupDefaultProgram(); GLint real_location = -1; GLint array_index = -1; - ASSERT_TRUE(program != NULL); + ASSERT_TRUE(program != nullptr); info = program->GetUniformInfoByFakeLocation( kUniform2FakeLocation, &real_location, &array_index); EXPECT_EQ(kUniform2RealLocation, real_location); EXPECT_EQ(0, array_index); - ASSERT_TRUE(info != NULL); + ASSERT_TRUE(info != nullptr); EXPECT_EQ(kUniform2Type, info->type); real_location = -1; array_index = -1; info = program->GetUniformInfoByFakeLocation( kInvalidLocation, &real_location, &array_index); - EXPECT_TRUE(info == NULL); + EXPECT_TRUE(info == nullptr); EXPECT_EQ(-1, real_location); EXPECT_EQ(-1, array_index); GLint loc = program->GetUniformFakeLocation("uniform2[2]"); info = program->GetUniformInfoByFakeLocation( loc, &real_location, &array_index); - ASSERT_TRUE(info != NULL); + ASSERT_TRUE(info != nullptr); EXPECT_EQ(kUniform2RealLocation + 2 * 2, real_location); EXPECT_EQ(2, array_index); } @@ -823,18 +823,18 @@ kServiceProgramId); Shader* vshader = shader_manager_.CreateShader( kVertexShaderClientId, kVertexShaderServiceId, GL_VERTEX_SHADER); - ASSERT_TRUE(vshader != NULL); + ASSERT_TRUE(vshader != nullptr); TestHelper::SetShaderStates(gl_.get(), vshader, true); Shader* fshader = shader_manager_.CreateShader( kFragmentShaderClientId, kFragmentShaderServiceId, GL_FRAGMENT_SHADER); - ASSERT_TRUE(fshader != NULL); + ASSERT_TRUE(fshader != nullptr); TestHelper::SetShaderStates(gl_.get(), fshader, true); Program* program = manager_->CreateProgram(kClientProgramId, kServiceProgramId); - ASSERT_TRUE(program != NULL); + ASSERT_TRUE(program != nullptr); EXPECT_TRUE(program->AttachShader(&shader_manager_, vshader)); EXPECT_TRUE(program->AttachShader(&shader_manager_, fshader)); - program->Link(NULL, Program::kCountOnlyStaticallyUsed, this); + program->Link(nullptr, Program::kCountOnlyStaticallyUsed, this); GLint value = 0; program->GetProgramiv(GL_ACTIVE_ATTRIBUTES, &value); EXPECT_EQ(4, value); @@ -887,18 +887,18 @@ kServiceProgramId); Shader* vshader = shader_manager_.CreateShader( kVertexShaderClientId, kVertexShaderServiceId, GL_VERTEX_SHADER); - ASSERT_TRUE(vshader != NULL); + ASSERT_TRUE(vshader != nullptr); TestHelper::SetShaderStates(gl_.get(), vshader, true); Shader* fshader = shader_manager_.CreateShader( kFragmentShaderClientId, kFragmentShaderServiceId, GL_FRAGMENT_SHADER); - ASSERT_TRUE(fshader != NULL); + ASSERT_TRUE(fshader != nullptr); TestHelper::SetShaderStates(gl_.get(), fshader, true); Program* program = manager_->CreateProgram(kClientProgramId, kServiceProgramId); - ASSERT_TRUE(program != NULL); + ASSERT_TRUE(program != nullptr); EXPECT_TRUE(program->AttachShader(&shader_manager_, vshader)); EXPECT_TRUE(program->AttachShader(&shader_manager_, fshader)); - program->Link(NULL, Program::kCountOnlyStaticallyUsed, this); + program->Link(nullptr, Program::kCountOnlyStaticallyUsed, this); // Check that we get the correct locations. EXPECT_EQ(kUniform2FakeLocation, @@ -942,13 +942,13 @@ Shader* vshader = shader_manager_.CreateShader( kVertexShaderClientId, kVertexShaderServiceId, GL_VERTEX_SHADER); - ASSERT_TRUE(vshader != NULL); + ASSERT_TRUE(vshader != nullptr); TestHelper::SetShaderStates(gl_.get(), vshader, true, nullptr, nullptr, nullptr, &attrib_map, &uniform_map, &varying_map, nullptr, &output_variable_list, nullptr); Shader* fshader = shader_manager_.CreateShader( kFragmentShaderClientId, kFragmentShaderServiceId, GL_FRAGMENT_SHADER); - ASSERT_TRUE(fshader != NULL); + ASSERT_TRUE(fshader != nullptr); TestHelper::SetShaderStates(gl_.get(), fshader, true, nullptr, nullptr, nullptr, &attrib_map, &uniform_map, &varying_map, nullptr, &output_variable_list, nullptr); @@ -989,16 +989,16 @@ kServiceProgramId); Program* program = manager_->CreateProgram(kClientProgramId, kServiceProgramId); - ASSERT_TRUE(program!= NULL); + ASSERT_TRUE(program != nullptr); EXPECT_TRUE(program->AttachShader(&shader_manager_, vshader)); EXPECT_TRUE(program->AttachShader(&shader_manager_, fshader)); - program->Link(NULL, Program::kCountOnlyStaticallyUsed, this); + program->Link(nullptr, Program::kCountOnlyStaticallyUsed, this); // Check that we got the good type, not the bad. // Check Attribs for (unsigned index = 0; index < kNumAttribs; ++index) { const Program::VertexAttrib* attrib_info = program->GetAttribInfo(index); - ASSERT_TRUE(attrib_info != NULL); + ASSERT_TRUE(attrib_info != nullptr); size_t pos = attrib_info->name.find_first_of("[."); std::string top_name; if (pos == std::string::npos) @@ -1019,7 +1019,7 @@ // Check Uniforms for (unsigned index = 0; index < kNumUniforms; ++index) { const Program::UniformInfo* uniform_info = program->GetUniformInfo(index); - ASSERT_TRUE(uniform_info != NULL); + ASSERT_TRUE(uniform_info != nullptr); size_t pos = uniform_info->name.find_first_of("[."); std::string top_name; if (pos == std::string::npos) @@ -1042,15 +1042,15 @@ TEST_F(ProgramManagerWithShaderTest, ProgramInfoUseCount) { Program* program = manager_->CreateProgram(kClientProgramId, kServiceProgramId); - ASSERT_TRUE(program != NULL); + ASSERT_TRUE(program != nullptr); EXPECT_FALSE(program->CanLink()); Shader* vshader = shader_manager_.CreateShader( kVertexShaderClientId, kVertexShaderServiceId, GL_VERTEX_SHADER); - ASSERT_TRUE(vshader != NULL); + ASSERT_TRUE(vshader != nullptr); TestHelper::SetShaderStates(gl_.get(), vshader, true); Shader* fshader = shader_manager_.CreateShader( kFragmentShaderClientId, kFragmentShaderServiceId, GL_FRAGMENT_SHADER); - ASSERT_TRUE(fshader != NULL); + ASSERT_TRUE(fshader != nullptr); TestHelper::SetShaderStates(gl_.get(), fshader, true); EXPECT_FALSE(vshader->InUse()); EXPECT_FALSE(fshader->InUse()); @@ -1077,7 +1077,7 @@ .RetiresOnSaturation(); manager_->UnuseProgram(&shader_manager_, program); info2 = manager_->GetProgram(kClientProgramId); - EXPECT_TRUE(info2 == NULL); + EXPECT_TRUE(info2 == nullptr); EXPECT_FALSE(vshader->InUse()); EXPECT_FALSE(fshader->InUse()); } @@ -1085,15 +1085,15 @@ TEST_F(ProgramManagerWithShaderTest, ProgramInfoUseCount2) { Program* program = manager_->CreateProgram(kClientProgramId, kServiceProgramId); - ASSERT_TRUE(program != NULL); + ASSERT_TRUE(program != nullptr); EXPECT_FALSE(program->CanLink()); Shader* vshader = shader_manager_.CreateShader( kVertexShaderClientId, kVertexShaderServiceId, GL_VERTEX_SHADER); - ASSERT_TRUE(vshader != NULL); + ASSERT_TRUE(vshader != nullptr); TestHelper::SetShaderStates(gl_.get(), vshader, true); Shader* fshader = shader_manager_.CreateShader( kFragmentShaderClientId, kFragmentShaderServiceId, GL_FRAGMENT_SHADER); - ASSERT_TRUE(fshader != NULL); + ASSERT_TRUE(fshader != nullptr); TestHelper::SetShaderStates(gl_.get(), fshader, true); EXPECT_FALSE(vshader->InUse()); EXPECT_FALSE(fshader->InUse()); @@ -1120,7 +1120,7 @@ .RetiresOnSaturation(); manager_->MarkAsDeleted(&shader_manager_, program); info2 = manager_->GetProgram(kClientProgramId); - EXPECT_TRUE(info2 == NULL); + EXPECT_TRUE(info2 == nullptr); EXPECT_FALSE(vshader->InUse()); EXPECT_FALSE(fshader->InUse()); } @@ -1128,18 +1128,18 @@ TEST_F(ProgramManagerWithShaderTest, ProgramInfoGetProgramInfo) { CommonDecoder::Bucket bucket; const Program* program = SetupDefaultProgram(); - ASSERT_TRUE(program != NULL); + ASSERT_TRUE(program != nullptr); program->GetProgramInfo(manager_.get(), &bucket); ProgramInfoHeader* header = bucket.GetDataAs<ProgramInfoHeader*>(0, sizeof(ProgramInfoHeader)); - ASSERT_TRUE(header != NULL); + ASSERT_TRUE(header != nullptr); EXPECT_EQ(1u, header->link_status); EXPECT_EQ(arraysize(kAttribs), header->num_attribs); EXPECT_EQ(arraysize(kUniforms), header->num_uniforms); const ProgramInput* inputs = bucket.GetDataAs<const ProgramInput*>( sizeof(*header), sizeof(ProgramInput) * (header->num_attribs + header->num_uniforms)); - ASSERT_TRUE(inputs != NULL); + ASSERT_TRUE(inputs != nullptr); const ProgramInput* input = inputs; // TODO(gman): Don't assume these are in order. for (uint32_t ii = 0; ii < header->num_attribs; ++ii) { @@ -1148,11 +1148,11 @@ EXPECT_EQ(expected.type, input->type); const int32_t* location = bucket.GetDataAs<const int32_t*>( input->location_offset, sizeof(int32_t)); - ASSERT_TRUE(location != NULL); + ASSERT_TRUE(location != nullptr); EXPECT_EQ(expected.location, *location); const char* name_buf = bucket.GetDataAs<const char*>( input->name_offset, input->name_length); - ASSERT_TRUE(name_buf != NULL); + ASSERT_TRUE(name_buf != nullptr); std::string name(name_buf, input->name_length); EXPECT_STREQ(expected.name, name.c_str()); ++input; @@ -1164,7 +1164,7 @@ EXPECT_EQ(expected.type, input->type); const int32_t* locations = bucket.GetDataAs<const int32_t*>( input->location_offset, sizeof(int32_t) * input->size); - ASSERT_TRUE(locations != NULL); + ASSERT_TRUE(locations != nullptr); for (int32_t jj = 0; jj < input->size; ++jj) { EXPECT_EQ( ProgramManager::MakeFakeLocation(expected.fake_location, jj), @@ -1172,7 +1172,7 @@ } const char* name_buf = bucket.GetDataAs<const char*>( input->name_offset, input->name_length); - ASSERT_TRUE(name_buf != NULL); + ASSERT_TRUE(name_buf != nullptr); std::string name(name_buf, input->name_length); EXPECT_STREQ(expected.good_name, name.c_str()); ++input; @@ -1184,7 +1184,7 @@ TEST_F(ProgramManagerWithShaderTest, ProgramInfoGetUniformBlocksNone) { CommonDecoder::Bucket bucket; const Program* program = SetupDefaultProgram(); - ASSERT_TRUE(program != NULL); + ASSERT_TRUE(program != nullptr); // The program's previous link failed. EXPECT_CALL(*(gl_.get()), GetProgramiv(kServiceProgramId, GL_LINK_STATUS, _)) @@ -1194,7 +1194,7 @@ EXPECT_EQ(sizeof(UniformBlocksHeader), bucket.size()); UniformBlocksHeader* header = bucket.GetDataAs<UniformBlocksHeader*>(0, sizeof(UniformBlocksHeader)); - EXPECT_TRUE(header != NULL); + EXPECT_TRUE(header != nullptr); EXPECT_EQ(0u, header->num_uniform_blocks); // Zero uniform blocks. EXPECT_CALL(*(gl_.get()), @@ -1209,14 +1209,14 @@ EXPECT_EQ(sizeof(UniformBlocksHeader), bucket.size()); header = bucket.GetDataAs<UniformBlocksHeader*>(0, sizeof(UniformBlocksHeader)); - EXPECT_TRUE(header != NULL); + EXPECT_TRUE(header != nullptr); EXPECT_EQ(0u, header->num_uniform_blocks); } TEST_F(ProgramManagerWithShaderTest, ProgramInfoGetUniformBlocksValid) { CommonDecoder::Bucket bucket; const Program* program = SetupDefaultProgram(); - ASSERT_TRUE(program != NULL); + ASSERT_TRUE(program != nullptr); struct Data { UniformBlocksHeader header; UniformBlockInfo entry[2]; @@ -1324,7 +1324,7 @@ program->GetUniformBlocks(&bucket); EXPECT_EQ(sizeof(Data), bucket.size()); Data* bucket_data = bucket.GetDataAs<Data*>(0, sizeof(Data)); - EXPECT_TRUE(bucket_data != NULL); + EXPECT_TRUE(bucket_data != nullptr); EXPECT_EQ(0, memcmp(&data, bucket_data, sizeof(Data))); } @@ -1332,7 +1332,7 @@ ProgramInfoGetTransformFeedbackVaryingsNone) { CommonDecoder::Bucket bucket; const Program* program = SetupDefaultProgram(); - ASSERT_TRUE(program != NULL); + ASSERT_TRUE(program != nullptr); // The program's previous link failed. EXPECT_CALL(*(gl_.get()), GetProgramiv(kServiceProgramId, @@ -1349,7 +1349,7 @@ TransformFeedbackVaryingsHeader* header = bucket.GetDataAs<TransformFeedbackVaryingsHeader*>( 0, sizeof(TransformFeedbackVaryingsHeader)); - EXPECT_TRUE(header != NULL); + EXPECT_TRUE(header != nullptr); EXPECT_EQ(0u, header->num_transform_feedback_varyings); EXPECT_EQ(static_cast<uint32_t>(GL_INTERLEAVED_ATTRIBS), header->transform_feedback_buffer_mode); @@ -1373,7 +1373,7 @@ EXPECT_EQ(sizeof(TransformFeedbackVaryingsHeader), bucket.size()); header = bucket.GetDataAs<TransformFeedbackVaryingsHeader*>( 0, sizeof(TransformFeedbackVaryingsHeader)); - EXPECT_TRUE(header != NULL); + EXPECT_TRUE(header != nullptr); EXPECT_EQ(static_cast<uint32_t>(GL_SEPARATE_ATTRIBS), header->transform_feedback_buffer_mode); EXPECT_EQ(0u, header->num_transform_feedback_varyings); @@ -1383,7 +1383,7 @@ ProgramInfoGetTransformFeedbackVaryingsValid) { CommonDecoder::Bucket bucket; const Program* program = SetupDefaultProgram(); - ASSERT_TRUE(program != NULL); + ASSERT_TRUE(program != nullptr); struct Data { TransformFeedbackVaryingsHeader header; TransformFeedbackVaryingInfo entry[2]; @@ -1445,14 +1445,14 @@ program->GetTransformFeedbackVaryings(&bucket); EXPECT_EQ(sizeof(Data), bucket.size()); Data* bucket_data = bucket.GetDataAs<Data*>(0, sizeof(Data)); - EXPECT_TRUE(bucket_data != NULL); + EXPECT_TRUE(bucket_data != nullptr); EXPECT_EQ(0, memcmp(&data, bucket_data, sizeof(Data))); } TEST_F(ProgramManagerWithShaderTest, ProgramInfoGetUniformsES3None) { CommonDecoder::Bucket bucket; const Program* program = SetupDefaultProgram(); - ASSERT_TRUE(program != NULL); + ASSERT_TRUE(program != nullptr); // The program's previous link failed. EXPECT_CALL(*(gl_.get()), GetProgramiv(kServiceProgramId, GL_LINK_STATUS, _)) @@ -1462,7 +1462,7 @@ EXPECT_EQ(sizeof(UniformsES3Header), bucket.size()); UniformsES3Header* header = bucket.GetDataAs<UniformsES3Header*>(0, sizeof(UniformsES3Header)); - EXPECT_TRUE(header != NULL); + EXPECT_TRUE(header != nullptr); EXPECT_EQ(0u, header->num_uniforms); // Zero uniform blocks. EXPECT_CALL(*(gl_.get()), @@ -1477,14 +1477,14 @@ EXPECT_EQ(sizeof(UniformsES3Header), bucket.size()); header = bucket.GetDataAs<UniformsES3Header*>(0, sizeof(UniformsES3Header)); - EXPECT_TRUE(header != NULL); + EXPECT_TRUE(header != nullptr); EXPECT_EQ(0u, header->num_uniforms); } TEST_F(ProgramManagerWithShaderTest, ProgramInfoGetUniformsES3Valid) { CommonDecoder::Bucket bucket; const Program* program = SetupDefaultProgram(); - ASSERT_TRUE(program != NULL); + ASSERT_TRUE(program != nullptr); struct Data { UniformsES3Header header; UniformES3Info entry[2]; @@ -1541,7 +1541,7 @@ program->GetUniformsES3(&bucket); EXPECT_EQ(sizeof(Data), bucket.size()); Data* bucket_data = bucket.GetDataAs<Data*>(0, sizeof(Data)); - EXPECT_TRUE(bucket_data != NULL); + EXPECT_TRUE(bucket_data != nullptr); EXPECT_EQ(0, memcmp(&data, bucket_data, sizeof(Data))); } @@ -1550,13 +1550,13 @@ TEST_F(ProgramManagerWithShaderTest, UnusedUniformArrayElements) { CommonDecoder::Bucket bucket; const Program* program = SetupDefaultProgram(); - ASSERT_TRUE(program != NULL); + ASSERT_TRUE(program != nullptr); // Emulate the situation that only the first element has a valid location. // TODO(zmo): Don't assume these are in order. for (size_t ii = 0; ii < arraysize(kUniforms); ++ii) { Program::UniformInfo* uniform = const_cast<Program::UniformInfo*>( program->GetUniformInfo(ii)); - ASSERT_TRUE(uniform != NULL); + ASSERT_TRUE(uniform != nullptr); EXPECT_EQ(static_cast<size_t>(kUniforms[ii].size), uniform->element_locations.size()); for (GLsizei jj = 1; jj < uniform->size; ++jj) @@ -1565,21 +1565,21 @@ program->GetProgramInfo(manager_.get(), &bucket); ProgramInfoHeader* header = bucket.GetDataAs<ProgramInfoHeader*>(0, sizeof(ProgramInfoHeader)); - ASSERT_TRUE(header != NULL); + ASSERT_TRUE(header != nullptr); EXPECT_EQ(1u, header->link_status); EXPECT_EQ(arraysize(kAttribs), header->num_attribs); EXPECT_EQ(arraysize(kUniforms), header->num_uniforms); const ProgramInput* inputs = bucket.GetDataAs<const ProgramInput*>( sizeof(*header), sizeof(ProgramInput) * (header->num_attribs + header->num_uniforms)); - ASSERT_TRUE(inputs != NULL); + ASSERT_TRUE(inputs != nullptr); const ProgramInput* input = inputs + header->num_attribs; for (uint32_t ii = 0; ii < header->num_uniforms; ++ii) { const UniformInfo& expected = kUniforms[ii]; EXPECT_EQ(expected.size, input->size); const int32_t* locations = bucket.GetDataAs<const int32_t*>( input->location_offset, sizeof(int32_t) * input->size); - ASSERT_TRUE(locations != NULL); + ASSERT_TRUE(locations != nullptr); EXPECT_EQ( ProgramManager::MakeFakeLocation(expected.fake_location, 0), locations[0]); @@ -1613,7 +1613,7 @@ Shader* fshader = shader_manager_.CreateShader( kFragmentShaderClientId, kFragmentShaderServiceId, GL_FRAGMENT_SHADER); // Check shader got created. - ASSERT_TRUE(vshader != NULL && fshader != NULL); + ASSERT_TRUE(vshader != nullptr && fshader != nullptr); // Set Status TestHelper::SetShaderStates(gl_.get(), vshader, true, nullptr, nullptr, nullptr, &attrib_map, nullptr, nullptr, nullptr, @@ -1623,7 +1623,7 @@ it != attrib_map.end(); ++it) { const sh::Attribute* variable_info = vshader->GetAttribInfo(it->first); - ASSERT_TRUE(variable_info != NULL); + ASSERT_TRUE(variable_info != nullptr); EXPECT_EQ(it->second.type, variable_info->type); EXPECT_EQ(it->second.getOutermostArraySize(), variable_info->getOutermostArraySize()); @@ -1637,7 +1637,7 @@ // Set up program Program* program = manager_->CreateProgram(kClientProgramId, kServiceProgramId); - ASSERT_TRUE(program != NULL); + ASSERT_TRUE(program != nullptr); EXPECT_TRUE(program->AttachShader(&shader_manager_, vshader)); EXPECT_TRUE(program->AttachShader(&shader_manager_, fshader)); @@ -1697,7 +1697,7 @@ Shader* fshader = shader_manager_.CreateShader( kFragmentShaderClientId, kFragmentShaderServiceId, GL_FRAGMENT_SHADER); // Check shader got created. - ASSERT_TRUE(vshader != NULL && fshader != NULL); + ASSERT_TRUE(vshader != nullptr && fshader != nullptr); // Set Status TestHelper::SetShaderStates(gl_.get(), vshader, true, nullptr, nullptr, nullptr, nullptr, &vertex_uniform_map, nullptr, @@ -1708,7 +1708,7 @@ // Set up program Program* program = manager_->CreateProgram(kClientProgramId, kServiceProgramId); - ASSERT_TRUE(program != NULL); + ASSERT_TRUE(program != nullptr); EXPECT_TRUE(program->AttachShader(&shader_manager_, vshader)); EXPECT_TRUE(program->AttachShader(&shader_manager_, fshader)); @@ -1991,15 +1991,15 @@ TEST_F(ProgramManagerWithShaderTest, ClearWithSamplerTypes) { Shader* vshader = shader_manager_.CreateShader( kVertexShaderClientId, kVertexShaderServiceId, GL_VERTEX_SHADER); - ASSERT_TRUE(vshader != NULL); + ASSERT_TRUE(vshader != nullptr); TestHelper::SetShaderStates(gl_.get(), vshader, true); Shader* fshader = shader_manager_.CreateShader( kFragmentShaderClientId, kFragmentShaderServiceId, GL_FRAGMENT_SHADER); - ASSERT_TRUE(fshader != NULL); + ASSERT_TRUE(fshader != nullptr); TestHelper::SetShaderStates(gl_.get(), fshader, true); Program* program = manager_->CreateProgram(kClientProgramId, kServiceProgramId); - ASSERT_TRUE(program != NULL); + ASSERT_TRUE(program != nullptr); EXPECT_TRUE(program->AttachShader(&shader_manager_, vshader)); EXPECT_TRUE(program->AttachShader(&shader_manager_, fshader)); @@ -2047,7 +2047,7 @@ const size_t kNumUniforms = arraysize(kUniforms); SetupShaderExpectations(kAttribs, kNumAttribs, kUniforms, kNumUniforms, kServiceProgramId); - program->Link(NULL, Program::kCountOnlyStaticallyUsed, this); + program->Link(nullptr, Program::kCountOnlyStaticallyUsed, this); SetupExpectationsForClearingUniforms(kUniforms, kNumUniforms); manager_->ClearUniforms(program); } @@ -2060,15 +2060,15 @@ Shader* vshader = shader_manager_.CreateShader( kVertexShaderClientId, kVertexShaderServiceId, GL_VERTEX_SHADER); - ASSERT_TRUE(vshader != NULL); + ASSERT_TRUE(vshader != nullptr); TestHelper::SetShaderStates(gl_.get(), vshader, true); Shader* fshader = shader_manager_.CreateShader( kFragmentShaderClientId, kFragmentShaderServiceId, GL_FRAGMENT_SHADER); - ASSERT_TRUE(fshader != NULL); + ASSERT_TRUE(fshader != nullptr); TestHelper::SetShaderStates(gl_.get(), fshader, true); Program* program = manager_->CreateProgram(kClientProgramId, kServiceProgramId); - ASSERT_TRUE(program != NULL); + ASSERT_TRUE(program != nullptr); EXPECT_TRUE(program->AttachShader(&shader_manager_, vshader)); EXPECT_TRUE(program->AttachShader(&shader_manager_, fshader)); EXPECT_TRUE(program->SetUniformLocationBinding( @@ -2112,7 +2112,7 @@ const size_t kNumUniforms = arraysize(kUniforms); SetupShaderExpectations(kAttribs, kNumAttribs, kUniforms, kNumUniforms, kServiceProgramId); - program->Link(NULL, Program::kCountOnlyStaticallyUsed, this); + program->Link(nullptr, Program::kCountOnlyStaticallyUsed, this); EXPECT_EQ(kUniform1DesiredLocation, program->GetUniformFakeLocation(kUniform1Name)); @@ -2139,17 +2139,17 @@ kVertexShaderClientId, kVertexShaderServiceId, GL_VERTEX_SHADER); Shader* fragment_shader = shader_manager_.CreateShader( kFragmentShaderClientId, kFragmentShaderServiceId, GL_FRAGMENT_SHADER); - EXPECT_TRUE(vertex_shader != NULL); - EXPECT_TRUE(fragment_shader != NULL); + EXPECT_TRUE(vertex_shader != nullptr); + EXPECT_TRUE(fragment_shader != nullptr); TestHelper::SetShaderStates(gl_.get(), vertex_shader, true); TestHelper::SetShaderStates(gl_.get(), fragment_shader, true); Program* program = manager_->CreateProgram(kClientProgramId, kServiceProgramId); - ASSERT_TRUE(program != NULL); + ASSERT_TRUE(program != nullptr); program->AttachShader(&shader_manager_, vertex_shader); program->AttachShader(&shader_manager_, fragment_shader); - program->Link(NULL, Program::kCountOnlyStaticallyUsed, this); + program->Link(nullptr, Program::kCountOnlyStaticallyUsed, this); EXPECT_FALSE(program->IsValid()); } @@ -2185,13 +2185,13 @@ kVertexShaderClientId, kVertexShaderServiceId, GL_VERTEX_SHADER); fragment_shader_ = shader_manager_.CreateShader( kFragmentShaderClientId, kFragmentShaderServiceId, GL_FRAGMENT_SHADER); - ASSERT_TRUE(vertex_shader_ != NULL); - ASSERT_TRUE(fragment_shader_ != NULL); + ASSERT_TRUE(vertex_shader_ != nullptr); + ASSERT_TRUE(fragment_shader_ != nullptr); vertex_shader_->set_source("lka asjf bjajsdfj"); fragment_shader_->set_source("lka asjf a fasgag 3rdsf3 bjajsdfj"); program_ = manager_->CreateProgram(kClientProgramId, kServiceProgramId); - ASSERT_TRUE(program_ != NULL); + ASSERT_TRUE(program_ != nullptr); program_->AttachShader(&shader_manager_, vertex_shader_); program_->AttachShader(&shader_manager_, fragment_shader_); @@ -2322,8 +2322,8 @@ const Shader* shader) { const GLuint shader_id = shader->service_id(); const char* src = shader->source().c_str(); - EXPECT_CALL(*gl_.get(), - ShaderSource(shader_id, 1, Pointee(src), NULL)).Times(1); + EXPECT_CALL(*gl_.get(), ShaderSource(shader_id, 1, Pointee(src), nullptr)) + .Times(1); EXPECT_CALL(*gl_.get(), CompileShader(shader_id)).Times(1); EXPECT_CALL(*gl_.get(), GetShaderiv(shader_id, GL_COMPILE_STATUS, _)) .WillOnce(SetArgPointee<2>(GL_TRUE)); @@ -2332,8 +2332,8 @@ void SetExpectationsForNoCompile(const Shader* shader) { const GLuint shader_id = shader->service_id(); const char* src = shader->source().c_str(); - EXPECT_CALL(*gl_.get(), - ShaderSource(shader_id, 1, Pointee(src), NULL)).Times(0); + EXPECT_CALL(*gl_.get(), ShaderSource(shader_id, 1, Pointee(src), nullptr)) + .Times(0); EXPECT_CALL(*gl_.get(), CompileShader(shader_id)).Times(0); EXPECT_CALL(*gl_.get(), GetShaderiv(shader_id, GL_COMPILE_STATUS, _)) .Times(0); @@ -2342,8 +2342,8 @@ void SetExpectationsForErrorCompile(const Shader* shader) { const GLuint shader_id = shader->service_id(); const char* src = shader->source().c_str(); - EXPECT_CALL(*gl_.get(), - ShaderSource(shader_id, 1, Pointee(src), NULL)).Times(1); + EXPECT_CALL(*gl_.get(), ShaderSource(shader_id, 1, Pointee(src), nullptr)) + .Times(1); EXPECT_CALL(*gl_.get(), CompileShader(shader_id)).Times(1); EXPECT_CALL(*gl_.get(), GetShaderiv(shader_id, GL_COMPILE_STATUS, _)) .WillOnce(SetArgPointee<2>(GL_FALSE)); @@ -2375,7 +2375,7 @@ SetShadersCompiled(); SetExpectationsForProgramLink(); SetExpectationsForProgramCached(); - EXPECT_TRUE(program_->Link(NULL, Program::kCountOnlyStaticallyUsed, this)); + EXPECT_TRUE(program_->Link(nullptr, Program::kCountOnlyStaticallyUsed, this)); } TEST_F(ProgramManagerWithCacheTest, LoadProgramOnProgramCacheHit) { @@ -2388,7 +2388,7 @@ SetExpectationsForNotCachingProgram(); SetExpectationsForProgramLoadSuccess(); - EXPECT_TRUE(program_->Link(NULL, Program::kCountOnlyStaticallyUsed, this)); + EXPECT_TRUE(program_->Link(nullptr, Program::kCountOnlyStaticallyUsed, this)); } TEST_F(ProgramManagerWithCacheTest, RelinkOnChangedCompileOptions) { @@ -2399,7 +2399,7 @@ SetShadersCompiled("b"); SetExpectationsForProgramLink(); SetExpectationsForProgramNotLoaded(); - EXPECT_TRUE(program_->Link(NULL, Program::kCountOnlyStaticallyUsed, this)); + EXPECT_TRUE(program_->Link(nullptr, Program::kCountOnlyStaticallyUsed, this)); } class ProgramManagerWithPathRenderingTest @@ -2472,10 +2472,10 @@ Shader* vshader = shader_manager_.CreateShader( kVertexShaderClientId, kVertexShaderServiceId, GL_VERTEX_SHADER); - ASSERT_TRUE(vshader != NULL); + ASSERT_TRUE(vshader != nullptr); Shader* fshader = shader_manager_.CreateShader( kFragmentShaderClientId, kFragmentShaderServiceId, GL_FRAGMENT_SHADER); - ASSERT_TRUE(fshader != NULL); + ASSERT_TRUE(fshader != nullptr); VaryingMap varying_map; varying_map[kFragmentInput1Name] = TestHelper::ConstructVarying( kFragmentInput1Type, kFragmentInput1Size, kFragmentInput1Precision, @@ -2494,7 +2494,7 @@ nullptr, nullptr); Program* program = manager_->CreateProgram(kClientProgramId, kServiceProgramId); - ASSERT_TRUE(program != NULL); + ASSERT_TRUE(program != nullptr); EXPECT_TRUE(program->AttachShader(&shader_manager_, vshader)); EXPECT_TRUE(program->AttachShader(&shader_manager_, fshader)); program->SetFragmentInputLocationBinding(kFragmentInput1Name, @@ -2522,7 +2522,7 @@ gl_.get(), feature_info_.get(), nullptr, 0, nullptr, 0, kFragmentInputExpectationInfos, arraysize(kFragmentInputExpectationInfos), nullptr, 0, kServiceProgramId); - program->Link(NULL, Program::kCountOnlyStaticallyUsed, this); + program->Link(nullptr, Program::kCountOnlyStaticallyUsed, this); const Program::FragmentInputInfo* info1 = program->GetFragmentInputInfoByFakeLocation( kFragmentInput1DesiredLocation);
diff --git a/gpu/command_buffer/service/query_manager.cc b/gpu/command_buffer/service/query_manager.cc index 8b074cb..994898de 100644 --- a/gpu/command_buffer/service/query_manager.cc +++ b/gpu/command_buffer/service/query_manager.cc
@@ -309,7 +309,7 @@ RunCallbacks(); if (manager_) { manager_->StopTracking(this); - manager_ = NULL; + manager_ = nullptr; } }
diff --git a/gpu/command_buffer/service/query_manager_unittest.cc b/gpu/command_buffer/service/query_manager_unittest.cc index 053d89b..55508cd75 100644 --- a/gpu/command_buffer/service/query_manager_unittest.cc +++ b/gpu/command_buffer/service/query_manager_unittest.cc
@@ -160,18 +160,18 @@ scoped_refptr<QueryManager::Query> query( CreateQuery(GL_ANY_SAMPLES_PASSED_EXT, kClient1Id, shared_memory_id_, kSharedMemoryOffset, kService1Id)); - ASSERT_TRUE(query.get() != NULL); + ASSERT_TRUE(query.get() != nullptr); // Check we can get the same Query. EXPECT_EQ(query.get(), manager_->GetQuery(kClient1Id)); // Check we get nothing for a non-existent query. - EXPECT_TRUE(manager_->GetQuery(kClient2Id) == NULL); + EXPECT_TRUE(manager_->GetQuery(kClient2Id) == nullptr); // Check we can delete the query. EXPECT_CALL(*gl_, DeleteQueries(1, ::testing::Pointee(kService1Id))) .Times(1) .RetiresOnSaturation(); manager_->RemoveQuery(kClient1Id); // Check we get nothing for a non-existent query. - EXPECT_TRUE(manager_->GetQuery(kClient1Id) == NULL); + EXPECT_TRUE(manager_->GetQuery(kClient1Id) == nullptr); // Check query is deleted EXPECT_TRUE(query->IsDeleted()); EXPECT_FALSE(manager_->HavePendingQueries()); @@ -185,13 +185,13 @@ scoped_refptr<QueryManager::Query> query( CreateQuery(GL_ANY_SAMPLES_PASSED_EXT, kClient1Id, shared_memory_id_, kSharedMemoryOffset, kService1Id)); - ASSERT_TRUE(query.get() != NULL); + ASSERT_TRUE(query.get() != nullptr); EXPECT_CALL(*gl_, DeleteQueries(1, ::testing::Pointee(kService1Id))) .Times(1) .RetiresOnSaturation(); manager_->Destroy(true); // Check we get nothing for a non-existent query. - EXPECT_TRUE(manager_->GetQuery(kClient1Id) == NULL); + EXPECT_TRUE(manager_->GetQuery(kClient1Id) == nullptr); // Check query is deleted EXPECT_TRUE(query->IsDeleted()); } @@ -205,7 +205,7 @@ scoped_refptr<QueryManager::Query> query( CreateQuery(kTarget, kClient1Id, shared_memory_id_, kSharedMemoryOffset, kService1Id)); - ASSERT_TRUE(query.get() != NULL); + ASSERT_TRUE(query.get() != nullptr); EXPECT_TRUE(query->IsValid()); EXPECT_FALSE(query->IsDeleted()); @@ -227,12 +227,12 @@ scoped_refptr<QueryManager::Query> query( CreateQuery(kTarget, kClient1Id, shared_memory_id_, kSharedMemoryOffset, kService1Id)); - ASSERT_TRUE(query.get() != NULL); + ASSERT_TRUE(query.get() != nullptr); // Setup shared memory like client would. QuerySync* sync = decoder_->GetSharedMemoryAs<QuerySync*>( shared_memory_id_, kSharedMemoryOffset, sizeof(*sync)); - ASSERT_TRUE(sync != NULL); + ASSERT_TRUE(sync != nullptr); sync->Reset(); // Queue it @@ -289,7 +289,7 @@ // Setup shared memory like client would. QuerySync* sync1 = decoder_->GetSharedMemoryAs<QuerySync*>( shared_memory_id_, kSharedMemoryOffset, sizeof(*sync1) * 3); - ASSERT_TRUE(sync1 != NULL); + ASSERT_TRUE(sync1 != nullptr); QuerySync* sync2 = sync1 + 1; QuerySync* sync3 = sync2 + 1; @@ -303,9 +303,9 @@ scoped_refptr<QueryManager::Query> query3( CreateQuery(kTarget, kClient3Id, shared_memory_id_, kSharedMemoryOffset + sizeof(*sync1) * 2, kService3Id)); - ASSERT_TRUE(query1.get() != NULL); - ASSERT_TRUE(query2.get() != NULL); - ASSERT_TRUE(query3.get() != NULL); + ASSERT_TRUE(query1.get() != nullptr); + ASSERT_TRUE(query2.get() != nullptr); + ASSERT_TRUE(query3.get() != nullptr); EXPECT_FALSE(manager_->HavePendingQueries()); sync1->Reset(); @@ -394,7 +394,7 @@ scoped_refptr<QueryManager::Query> query( CreateQuery(kTarget, kClient1Id, shared_memory_id_, kSharedMemoryOffset, kService1Id)); - ASSERT_TRUE(query.get() != NULL); + ASSERT_TRUE(query.get() != nullptr); // Queue it QueueQuery(query.get(), kService1Id, kSubmitCount); @@ -419,7 +419,7 @@ QueryManager::Query* query = CreateQueryOnManager(manager.get(), kTarget, kClient1Id, shared_memory_id_, kSharedMemoryOffset, kService1Id); - ASSERT_TRUE(query != NULL); + ASSERT_TRUE(query != nullptr); EXPECT_CALL(*gl_, BeginQuery(GL_ANY_SAMPLES_PASSED_EXT, kService1Id)) .Times(1) @@ -451,7 +451,7 @@ QueryManager::Query* query = CreateQueryOnManager(manager.get(), kTarget, kClient1Id, shared_memory_id_, kSharedMemoryOffset, kService1Id); - ASSERT_TRUE(query != NULL); + ASSERT_TRUE(query != nullptr); EXPECT_CALL(*gl_, BeginQuery(GL_SAMPLES_PASSED_ARB, kService1Id)) .Times(1) @@ -482,7 +482,7 @@ QueryManager::Query* query = CreateQueryOnManager(manager.get(), kTarget, kClient1Id, shared_memory_id_, kSharedMemoryOffset, kService1Id); - ASSERT_TRUE(query != NULL); + ASSERT_TRUE(query != nullptr); EXPECT_CALL(*gl_, BeginQuery(GL_SAMPLES_PASSED_ARB, kService1Id)) .Times(1) @@ -565,7 +565,7 @@ QueryManager::Query* query = CreateQuery( kTarget, kClient1Id, shared_memory_id_, kSharedMemoryOffset, 0); - ASSERT_TRUE(query != NULL); + ASSERT_TRUE(query != nullptr); fake_timing_queries.ExpectGPUTimerQuery(*gl_, true); fake_timing_queries.SetCurrentGLTime( @@ -597,7 +597,7 @@ QueryManager::Query* query = CreateQuery( kTarget, kClient1Id, shared_memory_id_, kSharedMemoryOffset, 0); - ASSERT_TRUE(query != NULL); + ASSERT_TRUE(query != nullptr); fake_timing_queries.ExpectGPUTimerQuery(*gl_, true); fake_timing_queries.SetCurrentGLTime( @@ -665,7 +665,7 @@ QueryManager::Query* query = CreateQuery( kTarget, kClient1Id, shared_memory_id_, kSharedMemoryOffset, 0); - ASSERT_TRUE(query != NULL); + ASSERT_TRUE(query != nullptr); // Disjoint happening before the query should not trigger a disjoint event. fake_timing_queries.SetDisjoint(); @@ -702,7 +702,7 @@ QueryManager::Query* query = CreateQuery( kTarget, kClient1Id, shared_memory_id_, kSharedMemoryOffset, 0); - ASSERT_TRUE(query != NULL); + ASSERT_TRUE(query != nullptr); const uint64_t expected_result = 100u * base::Time::kNanosecondsPerMicrosecond; @@ -729,7 +729,7 @@ QueryManager::Query* query = CreateQuery( kTarget, kClient1Id, shared_memory_id_, kSharedMemoryOffset, 0); - ASSERT_TRUE(query != NULL); + ASSERT_TRUE(query != nullptr); const uint64_t expected_result = 100u * base::Time::kNanosecondsPerMicrosecond; @@ -769,7 +769,7 @@ QueryManager::Query* query = CreateQuery( kTarget, kClient1Id, shared_memory_id_, kSharedMemoryOffset, 0); - ASSERT_TRUE(query != NULL); + ASSERT_TRUE(query != nullptr); // Disjoint happening before the query should not trigger a disjoint event. fake_timing_queries.SetDisjoint(); @@ -819,7 +819,7 @@ QueryManager::Query* query = CreateQuery( kTarget, kClient1Id, shared_memory_id_, kSharedMemoryOffset, 0); - ASSERT_TRUE(query != NULL); + ASSERT_TRUE(query != nullptr); fake_timing_queries.ExpectGPUTimeStampQuery(*gl_, false); manager_->QueryCounter(query, kSubmitCount); @@ -847,12 +847,12 @@ QueryManager::Query* query = CreateQueryOnManager(manager.get(), kTarget, kClient1Id, shared_memory_id_, kSharedMemoryOffset, 0); - ASSERT_TRUE(query != NULL); + ASSERT_TRUE(query != nullptr); // Setup shared memory like client would. QuerySync* sync = decoder_->GetSharedMemoryAs<QuerySync*>( shared_memory_id_, kSharedMemoryOffset, sizeof(*sync)); - ASSERT_TRUE(sync != NULL); + ASSERT_TRUE(sync != nullptr); sync->Reset(); manager->BeginQuery(query); @@ -889,7 +889,7 @@ QueryManager::Query* query = CreateQueryOnManager(manager.get(), kTarget, kClient1Id, shared_memory_id_, kSharedMemoryOffset, kService1Id); - ASSERT_TRUE(query != NULL); + ASSERT_TRUE(query != nullptr); EXPECT_CALL(*gl_, BeginQuery(GL_SAMPLES_PASSED_ARB, kService1Id)) .Times(1)
diff --git a/gpu/command_buffer/service/raster_decoder.cc b/gpu/command_buffer/service/raster_decoder.cc index 582f4b7..a6b1863 100644 --- a/gpu/command_buffer/service/raster_decoder.cc +++ b/gpu/command_buffer/service/raster_decoder.cc
@@ -1090,7 +1090,7 @@ if (group_.get()) { group_->Destroy(this, have_context); - group_ = NULL; + group_ = nullptr; } // Destroy the surface before the context, some surface destructors make GL @@ -1098,8 +1098,8 @@ surface_ = nullptr; if (context_.get()) { - context_->ReleaseCurrent(NULL); - context_ = NULL; + context_->ReleaseCurrent(nullptr); + context_ = nullptr; } } @@ -1633,10 +1633,10 @@ bool RasterDecoderImpl::GetNumValuesReturnedForGLGet(GLenum pname, GLsizei* num_values) { *num_values = 0; - if (state_.GetStateAsGLint(pname, NULL, num_values)) { + if (state_.GetStateAsGLint(pname, nullptr, num_values)) { return true; } - return GetHelper(pname, NULL, num_values); + return GetHelper(pname, nullptr, num_values); } base::StringPiece RasterDecoderImpl::GetLogPrefix() {
diff --git a/gpu/command_buffer/service/raster_decoder_autogen.h b/gpu/command_buffer/service/raster_decoder_autogen.h index 30754b2..64fa569 100644 --- a/gpu/command_buffer/service/raster_decoder_autogen.h +++ b/gpu/command_buffer/service/raster_decoder_autogen.h
@@ -26,7 +26,7 @@ volatile const GLuint* textures = gles2::GetImmediateDataAs<volatile const GLuint*>(c, data_size, immediate_data_size); - if (textures == NULL) { + if (textures == nullptr) { return error::kOutOfBounds; } DeleteTexturesHelper(n, textures); @@ -73,12 +73,12 @@ } Result* result = GetSharedMemoryAs<Result*>( c.params_shm_id, c.params_shm_offset, Result::ComputeSize(num_values)); - GLint* params = result ? result->GetData() : NULL; + GLint* params = result ? result->GetData() : nullptr; if (!validators_->g_l_state.IsValid(pname)) { LOCAL_SET_GL_ERROR_INVALID_ENUM("glGetIntegerv", pname, "pname"); return error::kNoError; } - if (params == NULL) { + if (params == nullptr) { return error::kOutOfBounds; } LOCAL_COPY_REAL_GL_ERRORS_TO_WRAPPER("GetIntegerv"); @@ -107,7 +107,7 @@ } volatile GLuint* queries = gles2::GetImmediateDataAs<volatile GLuint*>( c, data_size, immediate_data_size); - if (queries == NULL) { + if (queries == nullptr) { return error::kOutOfBounds; } auto queries_copy = std::make_unique<GLuint[]>(n); @@ -134,7 +134,7 @@ volatile const GLuint* queries = gles2::GetImmediateDataAs<volatile const GLuint*>(c, data_size, immediate_data_size); - if (queries == NULL) { + if (queries == nullptr) { return error::kOutOfBounds; } DeleteQueriesEXTHelper(n, queries); @@ -222,7 +222,7 @@ volatile const GLbyte* mailbox = gles2::GetImmediateDataAs<volatile const GLbyte*>(c, data_size, immediate_data_size); - if (mailbox == NULL) { + if (mailbox == nullptr) { return error::kOutOfBounds; } DoBeginRasterCHROMIUM(sk_color, msaa_sample_count, can_use_lcd_text, @@ -357,7 +357,7 @@ } volatile GLbyte* mailbox = gles2::GetImmediateDataAs<volatile GLbyte*>( c, data_size, immediate_data_size); - if (mailbox == NULL) { + if (mailbox == nullptr) { return error::kOutOfBounds; } DoProduceTextureDirect(texture, mailbox); @@ -394,7 +394,7 @@ "format"); return error::kNoError; } - if (mailbox == NULL) { + if (mailbox == nullptr) { return error::kOutOfBounds; } DoCreateAndConsumeTextureINTERNAL(texture_id, use_buffer, buffer_usage,
diff --git a/gpu/command_buffer/service/raster_decoder_unittest.cc b/gpu/command_buffer/service/raster_decoder_unittest.cc index 968736e..f118fc9 100644 --- a/gpu/command_buffer/service/raster_decoder_unittest.cc +++ b/gpu/command_buffer/service/raster_decoder_unittest.cc
@@ -453,7 +453,7 @@ gles2::TextureManager* manager = group().texture_manager(); gles2::TextureRef* texture_ref = manager->GetTexture(client_texture_id_); - ASSERT_TRUE(texture_ref != NULL); + ASSERT_TRUE(texture_ref != nullptr); gles2::Texture* texture = texture_ref->texture(); EXPECT_TRUE(texture->SafeToRenderFrom()); }
diff --git a/gpu/command_buffer/service/raster_decoder_unittest_1_autogen.h b/gpu/command_buffer/service/raster_decoder_unittest_1_autogen.h index 67c9fa0..8afffc17 100644 --- a/gpu/command_buffer/service/raster_decoder_unittest_1_autogen.h +++ b/gpu/command_buffer/service/raster_decoder_unittest_1_autogen.h
@@ -21,7 +21,7 @@ EXPECT_EQ(error::kNoError, ExecuteImmediateCmd(cmd, sizeof(client_texture_id_))); EXPECT_EQ(GL_NO_ERROR, GetGLError()); - EXPECT_TRUE(GetTexture(client_texture_id_) == NULL); + EXPECT_TRUE(GetTexture(client_texture_id_) == nullptr); } TEST_P(RasterDecoderTest1, DeleteTexturesImmediateInvalidArgs) {
diff --git a/gpu/command_buffer/service/raster_decoder_unittest_base.h b/gpu/command_buffer/service/raster_decoder_unittest_base.h index e4be1a1..086642b 100644 --- a/gpu/command_buffer/service/raster_decoder_unittest_base.h +++ b/gpu/command_buffer/service/raster_decoder_unittest_base.h
@@ -209,7 +209,9 @@ GLsizei height, GLuint bound_pixel_unpack_buffer); - GLvoid* BufferOffset(unsigned i) { return static_cast<int8_t*>(NULL) + (i); } + GLvoid* BufferOffset(unsigned i) { + return static_cast<int8_t*>(nullptr) + (i); + } protected: static const GLint kMaxTextureSize = 2048;
diff --git a/gpu/command_buffer/service/renderbuffer_manager.cc b/gpu/command_buffer/service/renderbuffer_manager.cc index 722330a..598620e4 100644 --- a/gpu/command_buffer/service/renderbuffer_manager.cc +++ b/gpu/command_buffer/service/renderbuffer_manager.cc
@@ -206,7 +206,7 @@ glDeleteRenderbuffersEXT(1, &id); } manager_->StopTracking(this); - manager_ = NULL; + manager_ = nullptr; } } @@ -272,7 +272,7 @@ Renderbuffer* RenderbufferManager::GetRenderbuffer( GLuint client_id) { RenderbufferMap::iterator it = renderbuffers_.find(client_id); - return it != renderbuffers_.end() ? it->second.get() : NULL; + return it != renderbuffers_.end() ? it->second.get() : nullptr; } void RenderbufferManager::RemoveRenderbuffer(GLuint client_id) {
diff --git a/gpu/command_buffer/service/renderbuffer_manager_unittest.cc b/gpu/command_buffer/service/renderbuffer_manager_unittest.cc index 8e9a545..de693bb 100644 --- a/gpu/command_buffer/service/renderbuffer_manager_unittest.cc +++ b/gpu/command_buffer/service/renderbuffer_manager_unittest.cc
@@ -58,7 +58,7 @@ void SetUp() override { bool depth24_supported = false; bool use_gles = false; - SetUpBase(NULL, depth24_supported, use_gles); + SetUpBase(nullptr, depth24_supported, use_gles); } }; @@ -99,11 +99,11 @@ // Check renderbuffer got created. scoped_refptr<Renderbuffer> renderbuffer1 = manager_->GetRenderbuffer(kClient1Id); - ASSERT_TRUE(renderbuffer1.get() != NULL); + ASSERT_TRUE(renderbuffer1.get() != nullptr); EXPECT_FALSE(manager_->HaveUnclearedRenderbuffers()); EXPECT_EQ(kClient1Id, renderbuffer1->client_id()); // Check we get nothing for a non-existent renderbuffer. - EXPECT_TRUE(manager_->GetRenderbuffer(kClient2Id) == NULL); + EXPECT_TRUE(manager_->GetRenderbuffer(kClient2Id) == nullptr); // Check trying to a remove non-existent renderbuffers does not crash. manager_->RemoveRenderbuffer(kClient2Id); // Check that the renderbuffer is deleted when the last ref is released. @@ -112,7 +112,7 @@ .RetiresOnSaturation(); // Check we can't get the renderbuffer after we remove it. manager_->RemoveRenderbuffer(kClient1Id); - EXPECT_TRUE(manager_->GetRenderbuffer(kClient1Id) == NULL); + EXPECT_TRUE(manager_->GetRenderbuffer(kClient1Id) == nullptr); EXPECT_FALSE(manager_->HaveUnclearedRenderbuffers()); EXPECT_EQ(0u, renderbuffer1->client_id()); } @@ -125,13 +125,13 @@ // Check renderbuffer got created. Renderbuffer* renderbuffer1 = manager_->GetRenderbuffer(kClient1Id); - ASSERT_TRUE(renderbuffer1 != NULL); + ASSERT_TRUE(renderbuffer1 != nullptr); EXPECT_CALL(*gl_, DeleteRenderbuffersEXT(1, ::testing::Pointee(kService1Id))) .Times(1) .RetiresOnSaturation(); manager_->Destroy(true); renderbuffer1 = manager_->GetRenderbuffer(kClient1Id); - ASSERT_TRUE(renderbuffer1 == NULL); + ASSERT_TRUE(renderbuffer1 == nullptr); } TEST_F(RenderbufferManagerTest, Renderbuffer) { @@ -142,7 +142,7 @@ // Check renderbuffer got created. Renderbuffer* renderbuffer1 = manager_->GetRenderbuffer(kClient1Id); - ASSERT_TRUE(renderbuffer1 != NULL); + ASSERT_TRUE(renderbuffer1 != nullptr); EXPECT_EQ(kService1Id, renderbuffer1->service_id()); EXPECT_EQ(0, renderbuffer1->samples()); EXPECT_EQ(static_cast<GLenum>(GL_RGBA4), renderbuffer1->internal_format()); @@ -189,7 +189,7 @@ manager_->CreateRenderbuffer(kClient1Id, kService1Id); Renderbuffer* renderbuffer1 = manager_->GetRenderbuffer(kClient1Id); - ASSERT_TRUE(renderbuffer1 != NULL); + ASSERT_TRUE(renderbuffer1 != nullptr); const GLsizei kSamples = 4; const GLenum kFormat = GL_RGBA4; @@ -221,7 +221,7 @@ manager_->CreateRenderbuffer(kClient1Id, kService1Id); scoped_refptr<Renderbuffer> renderbuffer1( manager_->GetRenderbuffer(kClient1Id)); - ASSERT_TRUE(renderbuffer1.get() != NULL); + ASSERT_TRUE(renderbuffer1.get() != nullptr); // Remove it. manager_->RemoveRenderbuffer(kClient1Id); // Use after removing. @@ -239,7 +239,7 @@ EXPECT_CALL(*gl_, DeleteRenderbuffersEXT(1, ::testing::Pointee(kService1Id))) .Times(1) .RetiresOnSaturation(); - renderbuffer1 = NULL; + renderbuffer1 = nullptr; } namespace { @@ -258,7 +258,7 @@ manager_->CreateRenderbuffer(kClient1Id, kService1Id); scoped_refptr<Renderbuffer> renderbuffer1( manager_->GetRenderbuffer(kClient1Id)); - ASSERT_TRUE(renderbuffer1.get() != NULL); + ASSERT_TRUE(renderbuffer1.get() != nullptr); const GLsizei kSamples = 4; const GLenum kFormat = GL_RGBA4; const GLsizei kWidth = 128; @@ -316,7 +316,7 @@ void SetUp() override { bool depth24_supported = true; bool use_gles = true; - SetUpBase(NULL, depth24_supported, use_gles); + SetUpBase(nullptr, depth24_supported, use_gles); } }; @@ -332,7 +332,7 @@ void SetUp() override { bool depth24_supported = true; bool use_gles = false; - SetUpBase(NULL, depth24_supported, use_gles); + SetUpBase(nullptr, depth24_supported, use_gles); } };
diff --git a/gpu/command_buffer/service/shader_manager.cc b/gpu/command_buffer/service/shader_manager.cc index 3ec5927..4889a7f 100644 --- a/gpu/command_buffer/service/shader_manager.cc +++ b/gpu/command_buffer/service/shader_manager.cc
@@ -37,7 +37,7 @@ GLint info_log_length; glGetShaderiv(shader, GL_INFO_LOG_LENGTH, &info_log_length); std::vector<GLchar> info_log(info_log_length); - glGetShaderInfoLog(shader, info_log_length, NULL, &info_log[0]); + glGetShaderInfoLog(shader, info_log_length, nullptr, &info_log[0]); std::string log(&info_log[0], info_log_length - 1); DLOG(ERROR) << "Error compiling shader: " << log; DLOG(ERROR) << "Shader compilation failure."; @@ -99,7 +99,7 @@ source_for_driver = translated_source_.c_str(); } - glShaderSource(service_id_, 1, &source_for_driver, NULL); + glShaderSource(service_id_, 1, &source_for_driver, nullptr); glCompileShader(service_id_); if (source_type_ == kANGLE) { @@ -179,7 +179,7 @@ // 4.3.4, "Input Variables"), so |name| is the top level name used as // the AttributeMap key. AttributeMap::const_iterator it = attrib_map_.find(name); - return it != attrib_map_.end() ? &it->second : NULL; + return it != attrib_map_.end() ? &it->second : nullptr; } const std::string* Shader::GetAttribMappedName( @@ -207,7 +207,7 @@ if (it->second.name == original_name) return &(it->first); } - return NULL; + return nullptr; } const std::string* Shader::GetInterfaceBlockMappedName( @@ -216,7 +216,7 @@ if (key_value.second.name == original_name) return &(key_value.first); } - return NULL; + return nullptr; } const std::string* Shader::GetOutputVariableMappedName( @@ -250,19 +250,19 @@ const sh::Uniform* Shader::GetUniformInfo(const std::string& name) const { UniformMap::const_iterator it = uniform_map_.find(GetTopVariableName(name)); - return it != uniform_map_.end() ? &it->second : NULL; + return it != uniform_map_.end() ? &it->second : nullptr; } const sh::Varying* Shader::GetVaryingInfo(const std::string& name) const { VaryingMap::const_iterator it = varying_map_.find(GetTopVariableName(name)); - return it != varying_map_.end() ? &it->second : NULL; + return it != varying_map_.end() ? &it->second : nullptr; } const sh::InterfaceBlock* Shader::GetInterfaceBlockInfo( const std::string& name) const { InterfaceBlockMap::const_iterator it = interface_block_map_.find(GetTopVariableName(name)); - return it != interface_block_map_.end() ? &it->second : NULL; + return it != interface_block_map_.end() ? &it->second : nullptr; } const sh::OutputVariable* Shader::GetOutputVariableInfo( @@ -310,7 +310,7 @@ Shader* ShaderManager::GetShader(GLuint client_id) { ShaderMap::iterator it = shaders_.find(client_id); - return it != shaders_.end() ? it->second.get() : NULL; + return it != shaders_.end() ? it->second.get() : nullptr; } bool ShaderManager::GetClientId(GLuint service_id, GLuint* client_id) const {
diff --git a/gpu/command_buffer/service/shader_manager.h b/gpu/command_buffer/service/shader_manager.h index 97a8038..f36aa32 100644 --- a/gpu/command_buffer/service/shader_manager.h +++ b/gpu/command_buffer/service/shader_manager.h
@@ -106,27 +106,27 @@ const sh::OutputVariable* GetOutputVariableInfo( const std::string& name) const; - // If the original_name is not found, return NULL. + // If the original_name is not found, return nullptr. const std::string* GetAttribMappedName( const std::string& original_name) const; - // If the original_name is not found, return NULL. + // If the original_name is not found, return nullptr. const std::string* GetUniformMappedName( const std::string& original_name) const; - // If the original_name is not found, return NULL. + // If the original_name is not found, return nullptr. const std::string* GetVaryingMappedName( const std::string& original_name) const; - // If the original_name is not found, return NULL. + // If the original_name is not found, return nullptr. const std::string* GetInterfaceBlockMappedName( const std::string& original_name) const; - // If the original_name is not found, return NULL. + // If the original_name is not found, return nullptr. const std::string* GetOutputVariableMappedName( const std::string& original_name) const; - // If the hashed_name is not found, return NULL. + // If the hashed_name is not found, return nullptr. // Use this only when one of the more specific Get*Info methods can't be used. const std::string* GetOriginalNameFromHashedName( const std::string& hashed_name) const; @@ -291,8 +291,8 @@ GLuint service_id, GLenum shader_type); - // Gets an existing shader info for the given shader ID. Returns NULL if none - // exists. + // Gets an existing shader info for the given shader ID. Returns nullptr if + // none exists. Shader* GetShader(GLuint client_id); // Gets a client id for a given service id.
diff --git a/gpu/command_buffer/service/shader_manager_unittest.cc b/gpu/command_buffer/service/shader_manager_unittest.cc index 0e3ab0f..074e0b9 100644 --- a/gpu/command_buffer/service/shader_manager_unittest.cc +++ b/gpu/command_buffer/service/shader_manager_unittest.cc
@@ -35,17 +35,17 @@ Shader* info0 = manager_.CreateShader( kClient1Id, kService1Id, kShader1Type); // Check shader got created. - ASSERT_TRUE(info0 != NULL); + ASSERT_TRUE(info0 != nullptr); Shader* shader1 = manager_.GetShader(kClient1Id); ASSERT_EQ(info0, shader1); // Check we get nothing for a non-existent shader. - EXPECT_TRUE(manager_.GetShader(kClient2Id) == NULL); + EXPECT_TRUE(manager_.GetShader(kClient2Id) == nullptr); // Check we can't get the shader after we remove it. EXPECT_CALL(*gl_, DeleteShader(kService1Id)) .Times(1) .RetiresOnSaturation(); manager_.Delete(shader1); - EXPECT_TRUE(manager_.GetShader(kClient1Id) == NULL); + EXPECT_TRUE(manager_.GetShader(kClient1Id) == nullptr); } TEST_F(ShaderManagerTest, Destroy) { @@ -56,14 +56,14 @@ Shader* shader1 = manager_.CreateShader( kClient1Id, kService1Id, kShader1Type); // Check shader got created. - ASSERT_TRUE(shader1 != NULL); + ASSERT_TRUE(shader1 != nullptr); EXPECT_CALL(*gl_, DeleteShader(kService1Id)) .Times(1) .RetiresOnSaturation(); manager_.Destroy(true); // Check that resources got freed. shader1 = manager_.GetShader(kClient1Id); - ASSERT_TRUE(shader1 == NULL); + ASSERT_TRUE(shader1 == nullptr); } TEST_F(ShaderManagerTest, DeleteBug) { @@ -146,7 +146,7 @@ Shader* shader1 = manager_.CreateShader( kClient1Id, kService1Id, kShader1Type); // Check shader got created. - ASSERT_TRUE(shader1 != NULL); + ASSERT_TRUE(shader1 != nullptr); EXPECT_EQ(kService1Id, shader1->service_id()); // Check if the shader has correct type. EXPECT_EQ(kShader1Type, shader1->shader_type()); @@ -236,7 +236,7 @@ for (AttributeMap::const_iterator it = attrib_map.begin(); it != attrib_map.end(); ++it) { const sh::Attribute* variable_info = shader1->GetAttribInfo(it->first); - ASSERT_TRUE(variable_info != NULL); + ASSERT_TRUE(variable_info != nullptr); EXPECT_EQ(it->second.type, variable_info->type); EXPECT_EQ(it->second.getOutermostArraySize(), variable_info->getOutermostArraySize()); @@ -251,7 +251,7 @@ for (UniformMap::const_iterator it = uniform_map.begin(); it != uniform_map.end(); ++it) { const sh::Uniform* variable_info = shader1->GetUniformInfo(it->first); - ASSERT_TRUE(variable_info != NULL); + ASSERT_TRUE(variable_info != nullptr); EXPECT_EQ(it->second.type, variable_info->type); EXPECT_EQ(it->second.getOutermostArraySize(), variable_info->getOutermostArraySize()); @@ -266,7 +266,7 @@ for (VaryingMap::const_iterator it = varying_map.begin(); it != varying_map.end(); ++it) { const sh::Varying* variable_info = shader1->GetVaryingInfo(it->first); - ASSERT_TRUE(variable_info != NULL); + ASSERT_TRUE(variable_info != nullptr); EXPECT_EQ(it->second.type, variable_info->type); EXPECT_EQ(it->second.getOutermostArraySize(), variable_info->getOutermostArraySize()); @@ -281,7 +281,7 @@ for (const auto& it : interface_block_map) { const sh::InterfaceBlock* block_info = shader1->GetInterfaceBlockInfo(it.first); - ASSERT_TRUE(block_info != NULL); + ASSERT_TRUE(block_info != nullptr); EXPECT_EQ(it.second.arraySize, block_info->arraySize); EXPECT_EQ(it.second.layout, block_info->layout); EXPECT_EQ(it.second.isRowMajorLayout, block_info->isRowMajorLayout); @@ -351,7 +351,7 @@ Shader* shader1 = manager_.CreateShader( kClient1Id, kService1Id, kShader1Type); // Check shader got created. - ASSERT_TRUE(shader1 != NULL); + ASSERT_TRUE(shader1 != nullptr); EXPECT_FALSE(shader1->InUse()); EXPECT_FALSE(shader1->IsDeleted()); manager_.UseShader(shader1); @@ -369,10 +369,10 @@ EXPECT_TRUE(shader1->InUse()); manager_.UnuseShader(shader1); // this should delete the info. shader2 = manager_.GetShader(kClient1Id); - EXPECT_TRUE(shader2 == NULL); + EXPECT_TRUE(shader2 == nullptr); shader1 = manager_.CreateShader(kClient1Id, kService1Id, kShader1Type); - ASSERT_TRUE(shader1 != NULL); + ASSERT_TRUE(shader1 != nullptr); EXPECT_FALSE(shader1->InUse()); manager_.UseShader(shader1); EXPECT_TRUE(shader1->InUse()); @@ -389,7 +389,7 @@ .RetiresOnSaturation(); manager_.Delete(shader1); // this should delete the shader. shader2 = manager_.GetShader(kClient1Id); - EXPECT_TRUE(shader2 == NULL); + EXPECT_TRUE(shader2 == nullptr); } } // namespace gles2
diff --git a/gpu/command_buffer/service/shader_translator.cc b/gpu/command_buffer/service/shader_translator.cc index aa847a0..628d2eea 100644 --- a/gpu/command_buffer/service/shader_translator.cc +++ b/gpu/command_buffer/service/shader_translator.cc
@@ -141,9 +141,7 @@ ShaderTranslator::DestructionObserver::~DestructionObserver() = default; ShaderTranslator::ShaderTranslator() - : compiler_(NULL), - compile_options_(0) { -} + : compiler_(nullptr), compile_options_(0) {} bool ShaderTranslator::Init(GLenum shader_type, ShShaderSpec shader_spec, @@ -152,11 +150,11 @@ ShCompileOptions driver_bug_workarounds, bool gl_shader_interm_output) { // Make sure Init is called only once. - DCHECK(compiler_ == NULL); + DCHECK(compiler_ == nullptr); DCHECK(shader_type == GL_FRAGMENT_SHADER || shader_type == GL_VERTEX_SHADER); DCHECK(shader_spec == SH_GLES2_SPEC || shader_spec == SH_WEBGL_SPEC || shader_spec == SH_GLES3_SPEC || shader_spec == SH_WEBGL2_SPEC); - DCHECK(resources != NULL); + DCHECK(resources != nullptr); g_translator_initializer.Get(); @@ -191,7 +189,7 @@ sh::GetBuiltInResourcesString(compiler_)); } - return compiler_ != NULL; + return compiler_ != nullptr; } ShCompileOptions ShaderTranslator::GetCompileOptions() const { @@ -209,7 +207,7 @@ InterfaceBlockMap* interface_block_map, OutputVariableList* output_variable_list) const { // Make sure this instance is initialized. - DCHECK(compiler_ != NULL); + DCHECK(compiler_ != nullptr); bool success = false; { @@ -262,7 +260,7 @@ for (auto& observer : destruction_observers_) observer.OnDestruct(this); - if (compiler_ != NULL) + if (compiler_ != nullptr) sh::Destruct(compiler_); }
diff --git a/gpu/command_buffer/service/shader_translator_cache.cc b/gpu/command_buffer/service/shader_translator_cache.cc index 21eb9d12b..a9dfbe30 100644 --- a/gpu/command_buffer/service/shader_translator_cache.cc +++ b/gpu/command_buffer/service/shader_translator_cache.cc
@@ -49,7 +49,7 @@ translator->AddDestructionObserver(this); return translator; } else { - return NULL; + return nullptr; } }
diff --git a/gpu/command_buffer/service/shader_translator_unittest.cc b/gpu/command_buffer/service/shader_translator_unittest.cc index 528ef11..214725c8 100644 --- a/gpu/command_buffer/service/shader_translator_unittest.cc +++ b/gpu/command_buffer/service/shader_translator_unittest.cc
@@ -40,8 +40,8 @@ false)); } void TearDown() override { - vertex_translator_ = NULL; - fragment_translator_ = NULL; + vertex_translator_ = nullptr; + fragment_translator_ = nullptr; } scoped_refptr<ShaderTranslator> vertex_translator_; @@ -79,8 +79,8 @@ false)); } void TearDown() override { - vertex_translator_ = NULL; - fragment_translator_ = NULL; + vertex_translator_ = nullptr; + fragment_translator_ = nullptr; } scoped_refptr<ShaderTranslator> vertex_translator_;
diff --git a/gpu/command_buffer/service/test_helper.cc b/gpu/command_buffer/service/test_helper.cc index 7f2df5f..4c4cccf 100644 --- a/gpu/command_buffer/service/test_helper.cc +++ b/gpu/command_buffer/service/test_helper.cc
@@ -130,7 +130,7 @@ kServiceBlackRectangleTextureId, kServiceDefaultRectangleTextureId }; - const GLuint* texture_ids = NULL; + const GLuint* texture_ids = nullptr; switch (target) { case GL_TEXTURE_2D: texture_ids = &texture_2d_ids[0]; @@ -1149,7 +1149,7 @@ .WillOnce(Return(options_affecting_compilation)) .RetiresOnSaturation(); if (expected_valid) { - EXPECT_CALL(*gl, ShaderSource(shader->service_id(), 1, _, NULL)) + EXPECT_CALL(*gl, ShaderSource(shader->service_id(), 1, _, nullptr)) .Times(1) .RetiresOnSaturation(); EXPECT_CALL(*gl, CompileShader(shader->service_id()))
diff --git a/gpu/command_buffer/service/texture_definition.cc b/gpu/command_buffer/service/texture_definition.cc index 5fe70fd..9b364cf 100644 --- a/gpu/command_buffer/service/texture_definition.cc +++ b/gpu/command_buffer/service/texture_definition.cc
@@ -175,7 +175,7 @@ if (egl_image == EGL_NO_IMAGE_KHR) { LOG(ERROR) << "eglCreateImageKHR for cross-thread sharing failed: 0x" << std::hex << eglGetError(); - return NULL; + return nullptr; } return new NativeImageBufferEGL(egl_display, egl_image); @@ -191,7 +191,7 @@ : NativeImageBuffer(), egl_display_(display), egl_image_(image), - write_client_(NULL) { + write_client_(nullptr) { DCHECK(egl_display_ != EGL_NO_DISPLAY); DCHECK(egl_image_ != EGL_NO_IMAGE_KHR); } @@ -210,7 +210,7 @@ void NativeImageBufferEGL::RemoveClient(gl::GLImage* client) { base::AutoLock lock(lock_); if (write_client_ == client) - write_client_ = NULL; + write_client_ = nullptr; for (std::list<ClientInfo>::iterator it = client_infos_.begin(); it != client_infos_.end(); it++) { @@ -272,7 +272,7 @@ return new NativeImageBufferStub; default: NOTREACHED(); - return NULL; + return nullptr; } } @@ -435,7 +435,7 @@ if (bound_id == static_cast<GLint>(old_service_id)) { glBindTexture(target_, service_id); } - texture->SetLevelImage(target_, 0, NULL, Texture::UNBOUND); + texture->SetLevelImage(target_, 0, nullptr, Texture::UNBOUND); } UpdateTextureInternal(texture);
diff --git a/gpu/command_buffer/service/texture_manager.cc b/gpu/command_buffer/service/texture_manager.cc index 7ee97ef51..970bc16 100644 --- a/gpu/command_buffer/service/texture_manager.cc +++ b/gpu/command_buffer/service/texture_manager.cc
@@ -489,7 +489,7 @@ progress_reporter_->ReportProgress(); } for (int ii = 0; ii < kNumDefaultTextures; ++ii) { - default_textures_[ii] = NULL; + default_textures_[ii] = nullptr; if (progress_reporter_) progress_reporter_->ReportProgress(); } @@ -771,24 +771,12 @@ const Texture::LevelInfo& info = face_infos_[face_index].level_infos[level]; - TextureSignature signature_data(target, - level, - sampler_state_, - usage_, - info.internal_format, - info.width, - info.height, - info.depth, - base_level_, - info.border, - max_level_, - info.format, - info.type, - info.image.get() != NULL, - CanRender(feature_info), - CanRenderTo(feature_info, level), - npot_, - emulating_rgb_); + TextureSignature signature_data( + target, level, sampler_state_, usage_, info.internal_format, info.width, + info.height, info.depth, base_level_, info.border, max_level_, + info.format, info.type, info.image.get() != nullptr, + CanRender(feature_info), CanRenderTo(feature_info, level), npot_, + emulating_rgb_); signature->append(TextureTag, sizeof(TextureTag)); signature->append(reinterpret_cast<const char*>(&signature_data), @@ -1068,7 +1056,7 @@ for (size_t ii = 0; ii < face_infos_.size(); ++ii) { for (size_t jj = 0; jj < face_infos_[ii].level_infos.size(); ++jj) { const Texture::LevelInfo& info = face_infos_[ii].level_infos[jj]; - if (info.image.get() != NULL) { + if (info.image.get() != nullptr) { has_images = true; break; } @@ -1211,7 +1199,7 @@ ScopedMemTrackerChange change(this); estimated_size_ -= info.estimated_size; GLES2Util::ComputeImageDataSizes(width, height, depth, format, type, 4, - &info.estimated_size, NULL, NULL); + &info.estimated_size, nullptr, nullptr); estimated_size_ += info.estimated_size; } @@ -1802,7 +1790,7 @@ GLint level) const { if (target != GL_TEXTURE_2D && target != GL_TEXTURE_EXTERNAL_OES && target != GL_TEXTURE_RECTANGLE_ARB) { - return NULL; + return nullptr; } size_t face_index = GLES2Util::GLTargetToFaceIndex(target); @@ -1812,7 +1800,7 @@ if (info.target != 0) return &info; } - return NULL; + return nullptr; } gl::GLImage* Texture::GetLevelImage(GLint target, @@ -1954,7 +1942,7 @@ manager_->StopTracking(this); texture_->RemoveTextureRef( this, force_context_lost_ ? false : manager_->have_context_); - manager_ = NULL; + manager_ = nullptr; } void TextureRef::ForceContextLost() { @@ -2288,7 +2276,7 @@ TextureRef* TextureManager::GetTexture( GLuint client_id) const { TextureMap::const_iterator it = textures_.find(client_id); - return it != textures_.end() ? it->second.get() : NULL; + return it != textures_.end() ? it->second.get() : nullptr; } scoped_refptr<TextureRef> TextureManager::TakeTexture(GLuint client_id) { @@ -2372,7 +2360,7 @@ if (texture->service_id() == service_id) return texture; } - return NULL; + return nullptr; } GLsizei TextureManager::ComputeMipMapCount(GLenum target, @@ -2505,7 +2493,7 @@ TextureRef* TextureManager::GetTextureInfoForTarget( ContextState* state, GLenum target) { TextureUnit& unit = state->texture_units[state->active_texture_unit]; - TextureRef* texture = NULL; + TextureRef* texture = nullptr; switch (target) { case GL_TEXTURE_2D: texture = unit.bound_texture_2d.get(); @@ -2533,7 +2521,7 @@ break; default: NOTREACHED(); - return NULL; + return nullptr; } return texture; } @@ -2542,9 +2530,9 @@ ContextState* state, GLenum target) { TextureRef* texture = GetTextureInfoForTarget(state, target); if (!texture) - return NULL; + return nullptr; if (texture == GetDefaultTextureInfo(target)) - return NULL; + return nullptr; return texture; }
diff --git a/gpu/command_buffer/service/texture_manager.h b/gpu/command_buffer/service/texture_manager.h index 2445739..9edf717 100644 --- a/gpu/command_buffer/service/texture_manager.h +++ b/gpu/command_buffer/service/texture_manager.h
@@ -922,7 +922,7 @@ return default_textures_[kRectangleARB].get(); default: NOTREACHED(); - return NULL; + return nullptr; } }
diff --git a/gpu/command_buffer/service/texture_manager_unittest.cc b/gpu/command_buffer/service/texture_manager_unittest.cc index c0f2094f..8e16e45 100644 --- a/gpu/command_buffer/service/texture_manager_unittest.cc +++ b/gpu/command_buffer/service/texture_manager_unittest.cc
@@ -83,7 +83,7 @@ void SetUp() override { GpuServiceTest::SetUp(); manager_.reset(new TextureManager( - NULL, feature_info_.get(), kMaxTextureSize, kMaxCubeMapTextureSize, + nullptr, feature_info_.get(), kMaxTextureSize, kMaxCubeMapTextureSize, kMaxRectangleTextureSize, kMax3DTextureSize, kMaxArrayTextureLayers, kUseDefaultTextures, nullptr, &discardable_manager_)); SetupFeatureInfo("", "OpenGL ES 2.0", CONTEXT_TYPE_OPENGLES2); @@ -155,13 +155,13 @@ manager_->CreateTexture(kClient1Id, kService1Id); // Check texture got created. scoped_refptr<TextureRef> texture = manager_->GetTexture(kClient1Id); - ASSERT_TRUE(texture.get() != NULL); + ASSERT_TRUE(texture.get() != nullptr); EXPECT_EQ(kService1Id, texture->service_id()); EXPECT_EQ(kClient1Id, texture->client_id()); EXPECT_EQ(texture->texture(), manager_->GetTextureForServiceId( texture->service_id())); // Check we get nothing for a non-existent texture. - EXPECT_TRUE(manager_->GetTexture(kClient2Id) == NULL); + EXPECT_TRUE(manager_->GetTexture(kClient2Id) == nullptr); // Check trying to a remove non-existent textures does not crash. manager_->RemoveTexture(kClient2Id); // Check that it gets deleted when the last reference is released. @@ -170,7 +170,7 @@ .RetiresOnSaturation(); // Check we can't get the texture after we remove it. manager_->RemoveTexture(kClient1Id); - EXPECT_TRUE(manager_->GetTexture(kClient1Id) == NULL); + EXPECT_TRUE(manager_->GetTexture(kClient1Id) == nullptr); EXPECT_EQ(0u, texture->client_id()); } @@ -181,7 +181,7 @@ manager_->CreateTexture(kClient1Id, kService1Id); // Check texture got created. TextureRef* texture_ref = manager_->GetTexture(kClient1Id); - ASSERT_TRUE(texture_ref != NULL); + ASSERT_TRUE(texture_ref != nullptr); Texture* texture = texture_ref->texture(); manager_->SetTarget(texture_ref, GL_TEXTURE_2D); SetParameter(texture_ref, GL_TEXTURE_MIN_FILTER, GL_NEAREST, GL_NO_ERROR); @@ -220,8 +220,8 @@ use_default_textures, nullptr, &discardable_manager_); manager.Initialize(); - EXPECT_TRUE(manager.GetDefaultTextureInfo(GL_TEXTURE_2D) != NULL); - EXPECT_TRUE(manager.GetDefaultTextureInfo(GL_TEXTURE_CUBE_MAP) != NULL); + EXPECT_TRUE(manager.GetDefaultTextureInfo(GL_TEXTURE_2D) != nullptr); + EXPECT_TRUE(manager.GetDefaultTextureInfo(GL_TEXTURE_CUBE_MAP) != nullptr); // TODO(vmiura): Test GL_TEXTURE_EXTERNAL_OES & GL_TEXTURE_RECTANGLE_ARB. @@ -240,8 +240,8 @@ use_default_textures, nullptr, &discardable_manager_); manager.Initialize(); - EXPECT_TRUE(manager.GetDefaultTextureInfo(GL_TEXTURE_2D) == NULL); - EXPECT_TRUE(manager.GetDefaultTextureInfo(GL_TEXTURE_CUBE_MAP) == NULL); + EXPECT_TRUE(manager.GetDefaultTextureInfo(GL_TEXTURE_2D) == nullptr); + EXPECT_TRUE(manager.GetDefaultTextureInfo(GL_TEXTURE_CUBE_MAP) == nullptr); // TODO(vmiura): Test GL_TEXTURE_EXTERNAL_OES & GL_TEXTURE_RECTANGLE_ARB. @@ -260,8 +260,8 @@ use_default_textures, nullptr, &discardable_manager_); manager.Initialize(); - EXPECT_TRUE(manager.GetDefaultTextureInfo(GL_TEXTURE_3D) != NULL); - EXPECT_TRUE(manager.GetDefaultTextureInfo(GL_TEXTURE_2D_ARRAY) != NULL); + EXPECT_TRUE(manager.GetDefaultTextureInfo(GL_TEXTURE_3D) != nullptr); + EXPECT_TRUE(manager.GetDefaultTextureInfo(GL_TEXTURE_2D_ARRAY) != nullptr); manager.MarkContextLost(); manager.Destroy(); @@ -278,8 +278,8 @@ use_default_textures, nullptr, &discardable_manager_); manager.Initialize(); - EXPECT_TRUE(manager.GetDefaultTextureInfo(GL_TEXTURE_3D) == NULL); - EXPECT_TRUE(manager.GetDefaultTextureInfo(GL_TEXTURE_2D_ARRAY) == NULL); + EXPECT_TRUE(manager.GetDefaultTextureInfo(GL_TEXTURE_3D) == nullptr); + EXPECT_TRUE(manager.GetDefaultTextureInfo(GL_TEXTURE_2D_ARRAY) == nullptr); manager.MarkContextLost(); manager.Destroy(); @@ -300,7 +300,7 @@ manager.CreateTexture(kClient1Id, kService1Id); // Check texture got created. TextureRef* texture_ref = manager.GetTexture(kClient1Id); - ASSERT_TRUE(texture_ref != NULL); + ASSERT_TRUE(texture_ref != nullptr); TestHelper::SetTexParameteriWithExpectations( gl_.get(), error_state_.get(), &manager, texture_ref, GL_TEXTURE_USAGE_ANGLE, GL_FRAMEBUFFER_ATTACHMENT_ANGLE, GL_NO_ERROR); @@ -324,7 +324,7 @@ manager.CreateTexture(kClient1Id, kService1Id); // Check texture got created. TextureRef* texture = manager.GetTexture(kClient1Id); - ASSERT_TRUE(texture != NULL); + ASSERT_TRUE(texture != nullptr); EXPECT_CALL(*gl_, DeleteTextures(1, ::testing::Pointee(kService1Id))) .Times(1) .RetiresOnSaturation(); @@ -333,7 +333,7 @@ manager.Destroy(); // Check that resources got freed. texture = manager.GetTexture(kClient1Id); - ASSERT_TRUE(texture == NULL); + ASSERT_TRUE(texture == nullptr); } TEST_F(TextureManagerTest, MaxValues) { @@ -640,7 +640,7 @@ TextureTestBase() : feature_info_(new FeatureInfo()) { } - ~TextureTestBase() override { texture_ref_ = NULL; } + ~TextureTestBase() override { texture_ref_ = nullptr; } protected: void SetUpBase(MemoryTracker* memory_tracker, const std::string& extensions) { @@ -659,12 +659,12 @@ error_state_.reset(new ::testing::StrictMock<MockErrorState>()); manager_->CreateTexture(kClient1Id, kService1Id); texture_ref_ = manager_->GetTexture(kClient1Id); - ASSERT_TRUE(texture_ref_.get() != NULL); + ASSERT_TRUE(texture_ref_.get() != nullptr); } void TearDown() override { if (texture_ref_.get()) { - // If it's not in the manager then setting texture_ref_ to NULL will + // If it's not in the manager then setting texture_ref_ to nullptr will // delete the texture. if (!texture_ref_->client_id()) { // Check that it gets deleted when the last reference is released. @@ -673,7 +673,7 @@ .Times(1) .RetiresOnSaturation(); } - texture_ref_ = NULL; + texture_ref_ = nullptr; } manager_->MarkContextLost(); manager_->Destroy(); @@ -700,7 +700,7 @@ class TextureTest : public TextureTestBase { protected: - void SetUp() override { SetUpBase(NULL, std::string()); } + void SetUp() override { SetUpBase(nullptr, std::string()); } }; class TextureMemoryTrackerTest : public TextureTestBase { @@ -1034,7 +1034,7 @@ kUseDefaultTextures, nullptr, &discardable_manager_); manager.CreateTexture(kClient1Id, kService1Id); TextureRef* texture_ref = manager.GetTexture(kClient1Id); - ASSERT_TRUE(texture_ref != NULL); + ASSERT_TRUE(texture_ref != nullptr); Texture* texture = texture_ref->texture(); manager.SetTarget(texture_ref, GL_TEXTURE_2D); @@ -1333,7 +1333,7 @@ kUseDefaultTextures, nullptr, &discardable_manager_); manager.CreateTexture(kClient1Id, kService1Id); TextureRef* texture_ref = manager.GetTexture(kClient1Id); - ASSERT_TRUE(texture_ref != NULL); + ASSERT_TRUE(texture_ref != nullptr); manager.SetTarget(texture_ref, GL_TEXTURE_2D); Texture* texture = texture_ref->texture(); EXPECT_EQ(static_cast<GLenum>(GL_TEXTURE_2D), texture->target()); @@ -1363,7 +1363,7 @@ kUseDefaultTextures, nullptr, &discardable_manager_); manager.CreateTexture(kClient1Id, kService1Id); TextureRef* texture_ref = manager.GetTexture(kClient1Id); - ASSERT_TRUE(texture_ref != NULL); + ASSERT_TRUE(texture_ref != nullptr); manager.SetTarget(texture_ref, GL_TEXTURE_2D); Texture* texture = texture_ref->texture(); EXPECT_EQ(static_cast<GLenum>(GL_TEXTURE_2D), texture->target()); @@ -1385,7 +1385,7 @@ kUseDefaultTextures, nullptr, &discardable_manager_); manager.CreateTexture(kClient1Id, kService1Id); TextureRef* texture_ref = manager.GetTexture(kClient1Id); - ASSERT_TRUE(texture_ref != NULL); + ASSERT_TRUE(texture_ref != nullptr); manager.SetTarget(texture_ref, GL_TEXTURE_2D); Texture* texture = texture_ref->texture(); EXPECT_EQ(static_cast<GLenum>(GL_TEXTURE_2D), texture->target()); @@ -1415,7 +1415,7 @@ kUseDefaultTextures, nullptr, &discardable_manager_); manager.CreateTexture(kClient1Id, kService1Id); TextureRef* texture_ref = manager.GetTexture(kClient1Id); - ASSERT_TRUE(texture_ref != NULL); + ASSERT_TRUE(texture_ref != nullptr); manager.SetTarget(texture_ref, GL_TEXTURE_2D); Texture* texture = texture_ref->texture(); EXPECT_EQ(static_cast<GLenum>(GL_TEXTURE_2D), texture->target()); @@ -1437,7 +1437,7 @@ kUseDefaultTextures, nullptr, &discardable_manager_); manager.CreateTexture(kClient1Id, kService1Id); TextureRef* texture_ref = manager.GetTexture(kClient1Id); - ASSERT_TRUE(texture_ref != NULL); + ASSERT_TRUE(texture_ref != nullptr); manager.SetTarget(texture_ref, GL_TEXTURE_EXTERNAL_OES); Texture* texture = texture_ref->texture(); EXPECT_EQ(static_cast<GLenum>(GL_TEXTURE_EXTERNAL_OES), texture->target()); @@ -1457,7 +1457,7 @@ kUseDefaultTextures, nullptr, &discardable_manager_); manager.CreateTexture(kClient1Id, kService1Id); TextureRef* texture_ref = manager.GetTexture(kClient1Id); - ASSERT_TRUE(texture_ref != NULL); + ASSERT_TRUE(texture_ref != nullptr); manager.SetTarget(texture_ref, GL_TEXTURE_2D); manager.SetLevelInfo(texture_ref, GL_TEXTURE_2D, 0, GL_DEPTH_COMPONENT, 4, 4, 1, 0, GL_DEPTH_COMPONENT, GL_UNSIGNED_INT, gfx::Rect()); @@ -1531,7 +1531,7 @@ manager_->CreateTexture(kClient2Id, kService2Id); scoped_refptr<TextureRef> texture_ref2( manager_->GetTexture(kClient2Id)); - ASSERT_TRUE(texture_ref2.get() != NULL); + ASSERT_TRUE(texture_ref2.get() != nullptr); manager_->SetTarget(texture_ref2.get(), GL_TEXTURE_2D); EXPECT_FALSE(manager_->HaveUnsafeTextures()); EXPECT_FALSE(manager_->HaveUnclearedMips()); @@ -1551,7 +1551,7 @@ manager_->CreateTexture(kClient3Id, kService3Id); scoped_refptr<TextureRef> texture_ref3( manager_->GetTexture(kClient3Id)); - ASSERT_TRUE(texture_ref3.get() != NULL); + ASSERT_TRUE(texture_ref3.get() != nullptr); manager_->SetTarget(texture_ref3.get(), GL_TEXTURE_2D); manager_->SetLevelInfo(texture_ref3.get(), GL_TEXTURE_2D, 0, GL_RGBA, 8, 8, 1, 0, GL_RGBA, GL_UNSIGNED_BYTE, gfx::Rect(2, 2)); @@ -1585,13 +1585,13 @@ EXPECT_CALL(*gl_, DeleteTextures(1, ::testing::Pointee(kService2Id))) .Times(1) .RetiresOnSaturation(); - texture_ref2 = NULL; + texture_ref2 = nullptr; EXPECT_TRUE(manager_->HaveUnsafeTextures()); EXPECT_TRUE(manager_->HaveUnclearedMips()); EXPECT_CALL(*gl_, DeleteTextures(1, ::testing::Pointee(kService3Id))) .Times(1) .RetiresOnSaturation(); - texture_ref3 = NULL; + texture_ref3 = nullptr; EXPECT_FALSE(manager_->HaveUnsafeTextures()); EXPECT_FALSE(manager_->HaveUnclearedMips()); } @@ -1665,7 +1665,7 @@ EXPECT_CALL(*gl_, DeleteTextures(1, ::testing::Pointee(kService2Id))) .Times(1) .RetiresOnSaturation(); - texture_ref = NULL; + texture_ref = nullptr; } TEST_F(TextureTest, GetLevelImage) { @@ -1673,24 +1673,24 @@ manager_->SetLevelInfo(texture_ref_.get(), GL_TEXTURE_2D, 1, GL_RGBA, 2, 2, 1, 0, GL_RGBA, GL_UNSIGNED_BYTE, gfx::Rect(2, 2)); Texture* texture = texture_ref_->texture(); - EXPECT_TRUE(texture->GetLevelImage(GL_TEXTURE_2D, 1) == NULL); + EXPECT_TRUE(texture->GetLevelImage(GL_TEXTURE_2D, 1) == nullptr); // Set image. scoped_refptr<gl::GLImage> image(new gl::GLImageStub); manager_->SetLevelImage(texture_ref_.get(), GL_TEXTURE_2D, 1, image.get(), Texture::BOUND); - EXPECT_FALSE(texture->GetLevelImage(GL_TEXTURE_2D, 1) == NULL); - EXPECT_TRUE(texture->GetLevelStreamTextureImage(GL_TEXTURE_2D, 1) == NULL); + EXPECT_FALSE(texture->GetLevelImage(GL_TEXTURE_2D, 1) == nullptr); + EXPECT_TRUE(texture->GetLevelStreamTextureImage(GL_TEXTURE_2D, 1) == nullptr); // Remove it. manager_->SetLevelImage(texture_ref_.get(), GL_TEXTURE_2D, 1, nullptr, Texture::UNBOUND); - EXPECT_TRUE(texture->GetLevelImage(GL_TEXTURE_2D, 1) == NULL); + EXPECT_TRUE(texture->GetLevelImage(GL_TEXTURE_2D, 1) == nullptr); manager_->SetLevelImage(texture_ref_.get(), GL_TEXTURE_2D, 1, image.get(), Texture::UNBOUND); // Image should be reset when SetLevelInfo is called. manager_->SetLevelInfo(texture_ref_.get(), GL_TEXTURE_2D, 1, GL_RGBA, 2, 2, 1, 0, GL_RGBA, GL_UNSIGNED_BYTE, gfx::Rect(2, 2)); - EXPECT_TRUE(texture->GetLevelImage(GL_TEXTURE_2D, 1) == NULL); - EXPECT_TRUE(texture->GetLevelStreamTextureImage(GL_TEXTURE_2D, 1) == NULL); + EXPECT_TRUE(texture->GetLevelImage(GL_TEXTURE_2D, 1) == nullptr); + EXPECT_TRUE(texture->GetLevelStreamTextureImage(GL_TEXTURE_2D, 1) == nullptr); } TEST_F(TextureTest, GetLevelStreamTextureImage) { @@ -1705,17 +1705,17 @@ manager_->SetLevelStreamTextureImage(texture_ref_.get(), GL_TEXTURE_EXTERNAL_OES, 0, image.get(), Texture::BOUND, 0); - EXPECT_FALSE(texture->GetLevelImage(GL_TEXTURE_EXTERNAL_OES, 0) == NULL); - EXPECT_FALSE( - texture->GetLevelStreamTextureImage(GL_TEXTURE_EXTERNAL_OES, 0) == NULL); + EXPECT_FALSE(texture->GetLevelImage(GL_TEXTURE_EXTERNAL_OES, 0) == nullptr); + EXPECT_FALSE(texture->GetLevelStreamTextureImage(GL_TEXTURE_EXTERNAL_OES, + 0) == nullptr); // Replace it as a normal image. scoped_refptr<gl::GLImage> image2(new gl::GLImageStub); manager_->SetLevelImage(texture_ref_.get(), GL_TEXTURE_EXTERNAL_OES, 0, image2.get(), Texture::BOUND); - EXPECT_FALSE(texture->GetLevelImage(GL_TEXTURE_EXTERNAL_OES, 0) == NULL); + EXPECT_FALSE(texture->GetLevelImage(GL_TEXTURE_EXTERNAL_OES, 0) == nullptr); EXPECT_TRUE(texture->GetLevelStreamTextureImage(GL_TEXTURE_EXTERNAL_OES, 0) == - NULL); + nullptr); // Image should be reset when SetLevelInfo is called. manager_->SetLevelStreamTextureImage(texture_ref_.get(), @@ -1724,9 +1724,9 @@ manager_->SetLevelInfo(texture_ref_.get(), GL_TEXTURE_EXTERNAL_OES, 0, GL_RGBA, 2, 2, 1, 0, GL_RGBA, GL_UNSIGNED_BYTE, gfx::Rect(2, 2)); - EXPECT_TRUE(texture->GetLevelImage(GL_TEXTURE_EXTERNAL_OES, 0) == NULL); + EXPECT_TRUE(texture->GetLevelImage(GL_TEXTURE_EXTERNAL_OES, 0) == nullptr); EXPECT_TRUE(texture->GetLevelStreamTextureImage(GL_TEXTURE_EXTERNAL_OES, 0) == - NULL); + nullptr); } TEST_F(TextureTest, SetLevelImageState) { @@ -1918,7 +1918,7 @@ public ::testing::WithParamInterface<GLenum> { public: void SetUp() override { - TextureTest::SetUpBase(NULL, "GL_OES_EGL_image_external"); + TextureTest::SetUpBase(nullptr, "GL_OES_EGL_image_external"); manager_->CreateTexture(kClient2Id, kService2Id); texture2_ = manager_->GetTexture(kClient2Id); @@ -1937,7 +1937,7 @@ DeleteTextures(1, ::testing::Pointee(texture2_->service_id()))) .Times(1).RetiresOnSaturation(); } - texture2_ = NULL; + texture2_ = nullptr; } TextureTest::TearDown(); } @@ -2281,14 +2281,14 @@ texture_manager2_->Consume(20, ref1->texture()); EXPECT_CALL(*gl_, DeleteTextures(1, _)) .Times(0); - ref1 = NULL; + ref1 = nullptr; texture_manager1_->RemoveTexture(10); testing::Mock::VerifyAndClearExpectations(gl_.get()); EXPECT_CALL(*gl_, DeleteTextures(1, _)) .Times(1) .RetiresOnSaturation(); - ref2 = NULL; + ref2 = nullptr; texture_manager2_->RemoveTexture(20); testing::Mock::VerifyAndClearExpectations(gl_.get()); } @@ -2432,7 +2432,7 @@ // Delete the texture, memory should go to the remaining tracker. texture_manager1_->RemoveTexture(10); - ref1 = NULL; + ref1 = nullptr; EXPECT_EQ(initial_memory1, memory_tracker1_.GetSize()); EXPECT_EQ(initial_memory2 + ref2->texture()->estimated_size(), memory_tracker2_.GetSize()); @@ -2440,7 +2440,7 @@ EXPECT_CALL(*gl_, DeleteTextures(1, _)) .Times(1) .RetiresOnSaturation(); - ref2 = NULL; + ref2 = nullptr; texture_manager2_->RemoveTexture(20); EXPECT_EQ(initial_memory2, memory_tracker2_.GetSize()); }
diff --git a/gpu/command_buffer/service/transfer_buffer_manager.cc b/gpu/command_buffer/service/transfer_buffer_manager.cc index c4a3a45..f0538f9 100644 --- a/gpu/command_buffer/service/transfer_buffer_manager.cc +++ b/gpu/command_buffer/service/transfer_buffer_manager.cc
@@ -89,11 +89,11 @@ scoped_refptr<Buffer> TransferBufferManager::GetTransferBuffer(int32_t id) { if (id == 0) - return NULL; + return nullptr; BufferMap::iterator it = registered_buffers_.find(id); if (it == registered_buffers_.end()) - return NULL; + return nullptr; return it->second; }
diff --git a/gpu/command_buffer/service/transfer_buffer_manager_unittest.cc b/gpu/command_buffer/service/transfer_buffer_manager_unittest.cc index 08e3439d..d88361d 100644 --- a/gpu/command_buffer/service/transfer_buffer_manager_unittest.cc +++ b/gpu/command_buffer/service/transfer_buffer_manager_unittest.cc
@@ -25,15 +25,15 @@ }; TEST_F(TransferBufferManagerTest, ZeroHandleMapsToNull) { - EXPECT_TRUE(NULL == transfer_buffer_manager_->GetTransferBuffer(0).get()); + EXPECT_TRUE(nullptr == transfer_buffer_manager_->GetTransferBuffer(0).get()); } TEST_F(TransferBufferManagerTest, NegativeHandleMapsToNull) { - EXPECT_TRUE(NULL == transfer_buffer_manager_->GetTransferBuffer(-1).get()); + EXPECT_TRUE(nullptr == transfer_buffer_manager_->GetTransferBuffer(-1).get()); } TEST_F(TransferBufferManagerTest, OutOfRangeHandleMapsToNull) { - EXPECT_TRUE(NULL == transfer_buffer_manager_->GetTransferBuffer(1).get()); + EXPECT_TRUE(nullptr == transfer_buffer_manager_->GetTransferBuffer(1).get()); } TEST_F(TransferBufferManagerTest, CanRegisterTransferBuffer) {
diff --git a/gpu/command_buffer/service/vertex_array_manager.cc b/gpu/command_buffer/service/vertex_array_manager.cc index c3f5400..72100fc 100644 --- a/gpu/command_buffer/service/vertex_array_manager.cc +++ b/gpu/command_buffer/service/vertex_array_manager.cc
@@ -59,7 +59,8 @@ GLuint client_id) { VertexAttribManagerMap::iterator it = client_vertex_attrib_managers_.find(client_id); - return it != client_vertex_attrib_managers_.end() ? it->second.get() : NULL; + return it != client_vertex_attrib_managers_.end() ? it->second.get() + : nullptr; } void VertexArrayManager::RemoveVertexAttribManager(GLuint client_id) {
diff --git a/gpu/command_buffer/service/vertex_array_manager_unittest.cc b/gpu/command_buffer/service/vertex_array_manager_unittest.cc index daa37434..4dc5cbb 100644 --- a/gpu/command_buffer/service/vertex_array_manager_unittest.cc +++ b/gpu/command_buffer/service/vertex_array_manager_unittest.cc
@@ -58,13 +58,13 @@ kNumVertexAttribs, true, false); // Check creation success VertexAttribManager* info1 = manager_->GetVertexAttribManager(kClient1Id); - ASSERT_TRUE(info1 != NULL); + ASSERT_TRUE(info1 != nullptr); EXPECT_EQ(kService1Id, info1->service_id()); GLuint client_id = 0; EXPECT_TRUE(manager_->GetClientId(info1->service_id(), &client_id)); EXPECT_EQ(kClient1Id, client_id); // Check we get nothing for a non-existent name. - EXPECT_TRUE(manager_->GetVertexAttribManager(kClient2Id) == NULL); + EXPECT_TRUE(manager_->GetVertexAttribManager(kClient2Id) == nullptr); // Check trying to a remove non-existent name does not crash. manager_->RemoveVertexAttribManager(kClient2Id); // Check that it gets deleted when the last reference is released. @@ -73,7 +73,7 @@ .RetiresOnSaturation(); // Check we can't get the texture after we remove it. manager_->RemoveVertexAttribManager(kClient1Id); - EXPECT_TRUE(manager_->GetVertexAttribManager(kClient1Id) == NULL); + EXPECT_TRUE(manager_->GetVertexAttribManager(kClient1Id) == nullptr); } TEST_F(VertexArrayManagerTest, Destroy) { @@ -85,14 +85,14 @@ true, false); // Check creation success VertexAttribManager* info1 = manager.GetVertexAttribManager(kClient1Id); - ASSERT_TRUE(info1 != NULL); + ASSERT_TRUE(info1 != nullptr); EXPECT_CALL(*gl_, DeleteVertexArraysOES(1, ::testing::Pointee(kService1Id))) .Times(1) .RetiresOnSaturation(); manager.Destroy(true); // Check that resources got freed. info1 = manager.GetVertexAttribManager(kClient1Id); - ASSERT_TRUE(info1 == NULL); + ASSERT_TRUE(info1 == nullptr); } } // namespace gles2
diff --git a/gpu/command_buffer/service/vertex_attrib_manager.cc b/gpu/command_buffer/service/vertex_attrib_manager.cc index 1bddb1fba..4b09b0f 100644 --- a/gpu/command_buffer/service/vertex_attrib_manager.cc +++ b/gpu/command_buffer/service/vertex_attrib_manager.cc
@@ -39,7 +39,7 @@ divisor_(0), integer_(GL_FALSE), is_client_side_array_(false), - list_(NULL) {} + list_(nullptr) {} VertexAttrib::VertexAttrib(const VertexAttrib& other) = default; @@ -86,8 +86,8 @@ VertexAttribManager::VertexAttribManager(bool do_buffer_refcounting) : num_fixed_attribs_(0), - element_array_buffer_(NULL), - manager_(NULL), + element_array_buffer_(nullptr), + manager_(nullptr), deleted_(false), is_bound_(false), do_buffer_refcounting_(do_buffer_refcounting), @@ -98,7 +98,7 @@ uint32_t num_vertex_attribs, bool do_buffer_refcounting) : num_fixed_attribs_(0), - element_array_buffer_(NULL), + element_array_buffer_(nullptr), manager_(manager), deleted_(false), is_bound_(false), @@ -115,7 +115,7 @@ glDeleteVertexArraysOES(1, &service_id_); } manager_->StopTracking(this); - manager_ = NULL; + manager_ = nullptr; } }
diff --git a/gpu/command_buffer/service/vertex_attrib_manager.h b/gpu/command_buffer/service/vertex_attrib_manager.h index d87fb9ce..fe296d8 100644 --- a/gpu/command_buffer/service/vertex_attrib_manager.h +++ b/gpu/command_buffer/service/vertex_attrib_manager.h
@@ -201,7 +201,7 @@ if (index < vertex_attribs_.size()) { return &vertex_attribs_[index]; } - return NULL; + return nullptr; } void UpdateAttribBaseTypeAndMask(GLuint loc, GLenum base_type) {
diff --git a/gpu/command_buffer/service/vertex_attrib_manager_unittest.cc b/gpu/command_buffer/service/vertex_attrib_manager_unittest.cc index c0eb67c..3195cc71 100644 --- a/gpu/command_buffer/service/vertex_attrib_manager_unittest.cc +++ b/gpu/command_buffer/service/vertex_attrib_manager_unittest.cc
@@ -52,7 +52,7 @@ #endif TEST_F(VertexAttribManagerTest, Basic) { - EXPECT_TRUE(manager_->GetVertexAttrib(kNumVertexAttribs) == NULL); + EXPECT_TRUE(manager_->GetVertexAttrib(kNumVertexAttribs) == nullptr); EXPECT_FALSE(manager_->HaveFixedAttribs()); const VertexAttribManager::VertexAttribList& enabled_attribs = @@ -61,9 +61,9 @@ for (uint32_t ii = 0; ii < kNumVertexAttribs; ii += kNumVertexAttribs - 1) { VertexAttrib* attrib = manager_->GetVertexAttrib(ii); - ASSERT_TRUE(attrib != NULL); + ASSERT_TRUE(attrib != nullptr); EXPECT_EQ(ii, attrib->index()); - EXPECT_TRUE(attrib->buffer() == NULL); + EXPECT_TRUE(attrib->buffer() == nullptr); EXPECT_EQ(0, attrib->offset()); EXPECT_EQ(4, attrib->size()); EXPECT_EQ(static_cast<GLenum>(GL_FLOAT), attrib->type()); @@ -99,10 +99,10 @@ } TEST_F(VertexAttribManagerTest, SetAttribInfo) { - BufferManager buffer_manager(NULL, NULL); + BufferManager buffer_manager(nullptr, nullptr); buffer_manager.CreateBuffer(1, 2); Buffer* buffer = buffer_manager.GetBuffer(1); - ASSERT_TRUE(buffer != NULL); + ASSERT_TRUE(buffer != nullptr); VertexAttrib* attrib = manager_->GetVertexAttrib(1); @@ -118,30 +118,34 @@ // The VertexAttribManager must be destroyed before the BufferManager // so it releases its buffers. - manager_ = NULL; + manager_ = nullptr; buffer_manager.MarkContextLost(); buffer_manager.Destroy(); } TEST_F(VertexAttribManagerTest, HaveFixedAttribs) { EXPECT_FALSE(manager_->HaveFixedAttribs()); - manager_->SetAttribInfo(1, NULL, 4, GL_FIXED, GL_FALSE, 0, 16, 0, GL_FALSE); + manager_->SetAttribInfo(1, nullptr, 4, GL_FIXED, GL_FALSE, 0, 16, 0, + GL_FALSE); EXPECT_TRUE(manager_->HaveFixedAttribs()); - manager_->SetAttribInfo(3, NULL, 4, GL_FIXED, GL_FALSE, 0, 16, 0, GL_FALSE); + manager_->SetAttribInfo(3, nullptr, 4, GL_FIXED, GL_FALSE, 0, 16, 0, + GL_FALSE); EXPECT_TRUE(manager_->HaveFixedAttribs()); - manager_->SetAttribInfo(1, NULL, 4, GL_FLOAT, GL_FALSE, 0, 16, 0, GL_FALSE); + manager_->SetAttribInfo(1, nullptr, 4, GL_FLOAT, GL_FALSE, 0, 16, 0, + GL_FALSE); EXPECT_TRUE(manager_->HaveFixedAttribs()); - manager_->SetAttribInfo(3, NULL, 4, GL_FLOAT, GL_FALSE, 0, 16, 0, GL_FALSE); + manager_->SetAttribInfo(3, nullptr, 4, GL_FLOAT, GL_FALSE, 0, 16, 0, + GL_FALSE); EXPECT_FALSE(manager_->HaveFixedAttribs()); } TEST_F(VertexAttribManagerTest, CanAccess) { const GLenum kTarget = GL_ARRAY_BUFFER; MockErrorState error_state; - BufferManager buffer_manager(NULL, NULL); + BufferManager buffer_manager(nullptr, nullptr); buffer_manager.CreateBuffer(1, 2); Buffer* buffer = buffer_manager.GetBuffer(1); - ASSERT_TRUE(buffer != NULL); + ASSERT_TRUE(buffer != nullptr); VertexAttrib* attrib = manager_->GetVertexAttrib(1); @@ -152,23 +156,20 @@ EXPECT_FALSE(attrib->CanAccess(0)); EXPECT_TRUE(buffer_manager.SetTarget(buffer, kTarget)); - TestHelper::DoBufferData( - gl_.get(), &error_state, &buffer_manager, buffer, - kTarget, 15, GL_STATIC_DRAW, NULL, GL_NO_ERROR); + TestHelper::DoBufferData(gl_.get(), &error_state, &buffer_manager, buffer, + kTarget, 15, GL_STATIC_DRAW, nullptr, GL_NO_ERROR); EXPECT_FALSE(attrib->CanAccess(0)); - TestHelper::DoBufferData( - gl_.get(), &error_state, &buffer_manager, buffer, - kTarget, 16, GL_STATIC_DRAW, NULL, GL_NO_ERROR); + TestHelper::DoBufferData(gl_.get(), &error_state, &buffer_manager, buffer, + kTarget, 16, GL_STATIC_DRAW, nullptr, GL_NO_ERROR); EXPECT_TRUE(attrib->CanAccess(0)); EXPECT_FALSE(attrib->CanAccess(1)); manager_->SetAttribInfo(1, buffer, 4, GL_FLOAT, GL_FALSE, 0, 16, 1, GL_FALSE); EXPECT_FALSE(attrib->CanAccess(0)); - TestHelper::DoBufferData( - gl_.get(), &error_state, &buffer_manager, buffer, - kTarget, 32, GL_STATIC_DRAW, NULL, GL_NO_ERROR); + TestHelper::DoBufferData(gl_.get(), &error_state, &buffer_manager, buffer, + kTarget, 32, GL_STATIC_DRAW, nullptr, GL_NO_ERROR); EXPECT_TRUE(attrib->CanAccess(0)); EXPECT_FALSE(attrib->CanAccess(1)); manager_->SetAttribInfo(1, buffer, 4, GL_FLOAT, GL_FALSE, 0, 16, 0, GL_FALSE); @@ -179,19 +180,19 @@ // The VertexAttribManager must be destroyed before the BufferManager // so it releases its buffers. - manager_ = NULL; + manager_ = nullptr; buffer_manager.MarkContextLost(); buffer_manager.Destroy(); } TEST_F(VertexAttribManagerTest, Unbind) { - BufferManager buffer_manager(NULL, NULL); + BufferManager buffer_manager(nullptr, nullptr); buffer_manager.CreateBuffer(1, 2); buffer_manager.CreateBuffer(3, 4); Buffer* buffer1 = buffer_manager.GetBuffer(1); Buffer* buffer2 = buffer_manager.GetBuffer(3); - ASSERT_TRUE(buffer1 != NULL); - ASSERT_TRUE(buffer2 != NULL); + ASSERT_TRUE(buffer1 != nullptr); + ASSERT_TRUE(buffer2 != nullptr); VertexAttrib* attrib1 = manager_->GetVertexAttrib(1); VertexAttrib* attrib3 = manager_->GetVertexAttrib(3); @@ -212,12 +213,12 @@ // Unbind buffer. manager_->Unbind(buffer1, nullptr); // Check they were detached - EXPECT_TRUE(NULL == attrib1->buffer()); - EXPECT_TRUE(NULL == attrib3->buffer()); + EXPECT_TRUE(nullptr == attrib1->buffer()); + EXPECT_TRUE(nullptr == attrib3->buffer()); // The VertexAttribManager must be destroyed before the BufferManager // so it releases its buffers. - manager_ = NULL; + manager_ = nullptr; buffer_manager.MarkContextLost(); buffer_manager.Destroy(); }
diff --git a/gpu/command_buffer/tests/compressed_texture_test.cc b/gpu/command_buffer/tests/compressed_texture_test.cc index 80bf37fb..b941fb6 100644 --- a/gpu/command_buffer/tests/compressed_texture_test.cc +++ b/gpu/command_buffer/tests/compressed_texture_test.cc
@@ -47,7 +47,7 @@ default: NOTREACHED(); } - return NULL; + return nullptr; } // Index that chooses the given colors (color_0 and color_1),
diff --git a/gpu/command_buffer/tests/fuzzer_main.cc b/gpu/command_buffer/tests/fuzzer_main.cc index 28ae5bc..33a3a84 100644 --- a/gpu/command_buffer/tests/fuzzer_main.cc +++ b/gpu/command_buffer/tests/fuzzer_main.cc
@@ -294,7 +294,7 @@ share_group_(new gl::GLShareGroup), translator_cache_(gpu_preferences_) { logging::SetMinLogLevel(logging::LOG_FATAL); - base::CommandLine::Init(0, NULL); + base::CommandLine::Init(0, nullptr); auto* command_line = base::CommandLine::ForCurrentProcess(); ALLOW_UNUSED_LOCAL(command_line);
diff --git a/gpu/command_buffer/tests/gl_chromium_framebuffer_mixed_samples_unittest.cc b/gpu/command_buffer/tests/gl_chromium_framebuffer_mixed_samples_unittest.cc index 4a84ab9f..e422f04e 100644 --- a/gpu/command_buffer/tests/gl_chromium_framebuffer_mixed_samples_unittest.cc +++ b/gpu/command_buffer/tests/gl_chromium_framebuffer_mixed_samples_unittest.cc
@@ -83,7 +83,7 @@ glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST); glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, kWidth, kHeight, 0, GL_RGBA, - GL_UNSIGNED_BYTE, NULL); + GL_UNSIGNED_BYTE, nullptr); glBindTexture(GL_TEXTURE_2D, 0); GLuint stencil_rb = 0;
diff --git a/gpu/command_buffer/tests/gl_chromium_path_rendering_unittest.cc b/gpu/command_buffer/tests/gl_chromium_path_rendering_unittest.cc index 6481a0ba..4b19fdd 100644 --- a/gpu/command_buffer/tests/gl_chromium_path_rendering_unittest.cc +++ b/gpu/command_buffer/tests/gl_chromium_path_rendering_unittest.cc
@@ -444,7 +444,7 @@ glPathCommandsCHROMIUM(path, arraysize(commands), commands, arraysize(coords), GL_FLOAT, coords); EXPECT_TRUE(glIsPathCHROMIUM(path)); - glPathCommandsCHROMIUM(path, 0, NULL, 0, GL_FLOAT, NULL); + glPathCommandsCHROMIUM(path, 0, nullptr, 0, GL_FLOAT, nullptr); EXPECT_TRUE(glIsPathCHROMIUM(path)); // The surprise. TryAllDrawFunctions(path, GL_NO_ERROR); glDeletePathsCHROMIUM(path, 1); @@ -453,7 +453,7 @@ // path to acquire state. path = glGenPathsCHROMIUM(1); EXPECT_FALSE(glIsPathCHROMIUM(path)); - glPathCommandsCHROMIUM(path, 0, NULL, 0, GL_FLOAT, NULL); + glPathCommandsCHROMIUM(path, 0, nullptr, 0, GL_FLOAT, nullptr); EXPECT_TRUE(glIsPathCHROMIUM(path)); // The surprise. glDeletePathsCHROMIUM(path, 1); @@ -526,7 +526,7 @@ return; GLuint path = glGenPathsCHROMIUM(1); - glPathCommandsCHROMIUM(path, 0, NULL, 0, GL_FLOAT, NULL); + glPathCommandsCHROMIUM(path, 0, nullptr, 0, GL_FLOAT, nullptr); // Verify that normal calls work. glStencilFillPathCHROMIUM(path, GL_COUNT_UP_CHROMIUM, 0x7F); @@ -556,11 +556,11 @@ << path_count); glStencilFillPathInstancedCHROMIUM(path_count, GL_UNSIGNED_INT, &path, 0, GL_COUNT_UP_CHROMIUM - 1, 0x7F, GL_NONE, - NULL); + nullptr); EXPECT_EQ(static_cast<GLenum>(GL_INVALID_ENUM), glGetError()); glStencilThenCoverFillPathInstancedCHROMIUM( path_count, GL_UNSIGNED_INT, &path, 0, GL_COUNT_UP_CHROMIUM - 1, 0x7F, - GL_BOUNDING_BOX_OF_BOUNDING_BOXES_CHROMIUM, GL_NONE, NULL); + GL_BOUNDING_BOX_OF_BOUNDING_BOXES_CHROMIUM, GL_NONE, nullptr); EXPECT_EQ(static_cast<GLenum>(GL_INVALID_ENUM), glGetError()); } @@ -577,11 +577,11 @@ << path_count); glStencilFillPathInstancedCHROMIUM(path_count, GL_UNSIGNED_INT, &path, 0, GL_COUNT_UP_CHROMIUM, 0x30, GL_NONE, - NULL); + nullptr); EXPECT_EQ(static_cast<GLenum>(GL_INVALID_VALUE), glGetError()); glStencilThenCoverFillPathInstancedCHROMIUM( path_count, GL_UNSIGNED_INT, &path, 0, GL_COUNT_DOWN_CHROMIUM, 0xFE, - GL_BOUNDING_BOX_OF_BOUNDING_BOXES_CHROMIUM, GL_NONE, NULL); + GL_BOUNDING_BOX_OF_BOUNDING_BOXES_CHROMIUM, GL_NONE, nullptr); EXPECT_EQ(static_cast<GLenum>(GL_INVALID_VALUE), glGetError()); } @@ -1273,7 +1273,7 @@ // Test that using invalid (not linked) program is an invalid operation. // See similar calls at the end of the test for discussion about the // arguments. - glProgramPathFragmentInputGenCHROMIUM(program, -1, GL_NONE, 0, NULL); + glProgramPathFragmentInputGenCHROMIUM(program, -1, GL_NONE, 0, nullptr); EXPECT_EQ(static_cast<GLenum>(GL_INVALID_OPERATION), glGetError()); glLinkProgram(program);
diff --git a/gpu/command_buffer/tests/gl_depth_texture_unittest.cc b/gpu/command_buffer/tests/gl_depth_texture_unittest.cc index 6a76065..1f3fdc8 100644 --- a/gpu/command_buffer/tests/gl_depth_texture_unittest.cc +++ b/gpu/command_buffer/tests/gl_depth_texture_unittest.cc
@@ -107,9 +107,8 @@ glGenTextures(1, &color_texture); glBindTexture(GL_TEXTURE_2D, color_texture); - glTexImage2D( - GL_TEXTURE_2D, 0, GL_RGBA, kResolution, kResolution, - 0, GL_RGBA, GL_UNSIGNED_BYTE, NULL); + glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, kResolution, kResolution, 0, GL_RGBA, + GL_UNSIGNED_BYTE, nullptr); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR); @@ -144,9 +143,8 @@ } glBindTexture(GL_TEXTURE_2D, depth_texture); - glTexImage2D( - GL_TEXTURE_2D, 0, format, kResolution, kResolution, - 0, format, type, NULL); + glTexImage2D(GL_TEXTURE_2D, 0, format, kResolution, kResolution, 0, format, + type, nullptr); glBindFramebuffer(GL_FRAMEBUFFER, fbo); GLenum status = glCheckFramebufferStatus(GL_FRAMEBUFFER);
diff --git a/gpu/command_buffer/tests/gl_deschedule_unittest.cc b/gpu/command_buffer/tests/gl_deschedule_unittest.cc index 80ba4e8..c39e7ab 100644 --- a/gpu/command_buffer/tests/gl_deschedule_unittest.cc +++ b/gpu/command_buffer/tests/gl_deschedule_unittest.cc
@@ -33,7 +33,7 @@ glGenTextures(1, &tex); glBindTexture(GL_TEXTURE_2D, tex); glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, 1, 1, 0, GL_RGBA, GL_UNSIGNED_BYTE, - NULL); + nullptr); GLuint fbo = 0; glGenFramebuffers(1, &fbo);
diff --git a/gpu/command_buffer/tests/gl_ext_multisample_compatibility_unittest.cc b/gpu/command_buffer/tests/gl_ext_multisample_compatibility_unittest.cc index 608735a..4f256c73 100644 --- a/gpu/command_buffer/tests/gl_ext_multisample_compatibility_unittest.cc +++ b/gpu/command_buffer/tests/gl_ext_multisample_compatibility_unittest.cc
@@ -79,7 +79,7 @@ glGenTextures(1, &resolve_tex); glBindTexture(GL_TEXTURE_2D, resolve_tex); glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, kWidth, kHeight, 0, GL_RGBA, - GL_UNSIGNED_BYTE, NULL); + GL_UNSIGNED_BYTE, nullptr); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
diff --git a/gpu/command_buffer/tests/gl_gpu_memory_buffer_unittest.cc b/gpu/command_buffer/tests/gl_gpu_memory_buffer_unittest.cc index 0c635456..90feca4 100644 --- a/gpu/command_buffer/tests/gl_gpu_memory_buffer_unittest.cc +++ b/gpu/command_buffer/tests/gl_gpu_memory_buffer_unittest.cc
@@ -291,7 +291,7 @@ InternalFormat(GetParam())); ASSERT_NE(0u, image_id); ASSERT_TRUE(gl_.decoder()->GetImageManagerForTest()->LookupImage(image_id) != - NULL); + nullptr); // Bind the image. glBindTexImage2DCHROMIUM(GL_TEXTURE_2D, image_id); @@ -395,7 +395,7 @@ // ImageManager. I.e. for the tests the ImageManager lives in the client side // so there is no need to call glShallowFinishCHROMIUM(). EXPECT_TRUE(gl_.decoder()->GetImageManagerForTest()->LookupImage(image_id) != - NULL); + nullptr); ASSERT_TRUE(glGetError() == GL_NO_ERROR); // Need a texture to bind the image.
diff --git a/gpu/command_buffer/tests/gl_manager.cc b/gpu/command_buffer/tests/gl_manager.cc index 877a6d1..f0f2c69 100644 --- a/gpu/command_buffer/tests/gl_manager.cc +++ b/gpu/command_buffer/tests/gl_manager.cc
@@ -238,15 +238,15 @@ if (!use_count_) { if (base_share_group_) { delete base_share_group_; - base_share_group_ = NULL; + base_share_group_ = nullptr; } if (base_surface_) { delete base_surface_; - base_surface_ = NULL; + base_surface_ = nullptr; } if (base_context_) { delete base_context_; - base_context_ = NULL; + base_context_ = nullptr; } } } @@ -300,14 +300,14 @@ mailbox_manager_ = &owned_mailbox_manager_; } - gl::GLShareGroup* share_group = NULL; + gl::GLShareGroup* share_group = nullptr; if (options.share_group_manager) { share_group = options.share_group_manager->share_group(); } else if (options.share_mailbox_manager) { share_group = options.share_mailbox_manager->share_group(); } - gles2::ContextGroup* context_group = NULL; + gles2::ContextGroup* context_group = nullptr; scoped_refptr<gles2::ShareGroup> client_share_group; if (options.share_group_manager) { context_group = options.share_group_manager->decoder_->GetContextGroup(); @@ -315,7 +315,7 @@ options.share_group_manager->gles2_implementation()->share_group(); } - gl::GLContext* real_gl_context = NULL; + gl::GLContext* real_gl_context = nullptr; if (options.virtual_manager && !gpu_preferences_.use_passthrough_cmd_decoder) { real_gl_context = options.virtual_manager->context(); @@ -370,7 +370,8 @@ command_buffer_->set_handler(decoder_.get()); surface_ = gl::init::CreateOffscreenGLSurface(gfx::Size()); - ASSERT_TRUE(surface_.get() != NULL) << "could not create offscreen surface"; + ASSERT_TRUE(surface_.get() != nullptr) + << "could not create offscreen surface"; if (base_context_) { context_ = scoped_refptr<gl::GLContext>(new gpu::GLContextVirtual( @@ -390,7 +391,7 @@ g_gpu_feature_info.ApplyToGLContext(context_.get()); } } - ASSERT_TRUE(context_.get() != NULL) << "could not create GL context"; + ASSERT_TRUE(context_.get() != nullptr) << "could not create GL context"; ASSERT_TRUE(context_->MakeCurrent(surface_.get()));
diff --git a/gpu/command_buffer/tests/gl_readback_unittest.cc b/gpu/command_buffer/tests/gl_readback_unittest.cc index 6b7222e..1faa50a 100644 --- a/gpu/command_buffer/tests/gl_readback_unittest.cc +++ b/gpu/command_buffer/tests/gl_readback_unittest.cc
@@ -65,9 +65,7 @@ glGenQueriesEXT(1, &q); glBindBuffer(GL_PIXEL_PACK_TRANSFER_BUFFER_CHROMIUM, b); glBufferData(GL_PIXEL_PACK_TRANSFER_BUFFER_CHROMIUM, - kWidth * kHeight * kBytesPerPixel, - NULL, - GL_STREAM_READ); + kWidth * kHeight * kBytesPerPixel, nullptr, GL_STREAM_READ); glBeginQueryEXT(GL_ASYNC_PIXEL_PACK_COMPLETED_CHROMIUM, q); glReadPixels(0, 0, kWidth, kHeight, GL_RGBA, GL_UNSIGNED_BYTE, 0); glEndQueryEXT(GL_ASYNC_PIXEL_PACK_COMPLETED_CHROMIUM); @@ -129,7 +127,7 @@ const char *shaderStrings[1] = { data }; GLuint shader = glCreateShader(type); - glShaderSource(shader, 1, shaderStrings, NULL); + glShaderSource(shader, 1, shaderStrings, nullptr); glCompileShader(shader); GLint compile_status = 0; @@ -165,19 +163,19 @@ size_t test_count = 0; const char *extensions = reinterpret_cast<const char*>( glGetString(GL_EXTENSIONS)); - if (strstr(extensions, "GL_OES_texture_half_float") != NULL) { - TestFormat rgb16f = { GL_RGB, GL_HALF_FLOAT_OES, 3 }; - test_formats[test_count++] = rgb16f; + if (strstr(extensions, "GL_OES_texture_half_float") != nullptr) { + TestFormat rgb16f = {GL_RGB, GL_HALF_FLOAT_OES, 3}; + test_formats[test_count++] = rgb16f; - TestFormat rgba16f = { GL_RGBA, GL_HALF_FLOAT_OES, 4 }; - test_formats[test_count++] = rgba16f; + TestFormat rgba16f = {GL_RGBA, GL_HALF_FLOAT_OES, 4}; + test_formats[test_count++] = rgba16f; } - if (strstr(extensions, "GL_OES_texture_float") != NULL) { - TestFormat rgb32f = { GL_RGB, GL_FLOAT, 3 }; - test_formats[test_count++] = rgb32f; + if (strstr(extensions, "GL_OES_texture_float") != nullptr) { + TestFormat rgb32f = {GL_RGB, GL_FLOAT, 3}; + test_formats[test_count++] = rgb32f; - TestFormat rgba32f = { GL_RGBA, GL_FLOAT, 4 }; - test_formats[test_count++] = rgba32f; + TestFormat rgba32f = {GL_RGBA, GL_FLOAT, 4}; + test_formats[test_count++] = rgba32f; } const char *vs_source = @@ -232,8 +230,8 @@ reinterpret_cast<void*>(quad_vertices), GL_STATIC_DRAW); GLint position_location = glGetAttribLocation(program, "a_position"); - glVertexAttribPointer( - position_location, 2, GL_FLOAT, GL_FALSE, 2 * sizeof(float), NULL); + glVertexAttribPointer(position_location, 2, GL_FLOAT, GL_FALSE, + 2 * sizeof(float), nullptr); glEnableVertexAttribArray(position_location); glUseProgram(program); @@ -245,9 +243,9 @@ GLuint texture_id = 0; glGenTextures(1, &texture_id); glBindTexture(GL_TEXTURE_2D, texture_id); - glTexImage2D( - GL_TEXTURE_2D, 0, test_formats[ii].format, kTextureSize, kTextureSize, - 0, test_formats[ii].format, test_formats[ii].type, NULL); + glTexImage2D(GL_TEXTURE_2D, 0, test_formats[ii].format, kTextureSize, + kTextureSize, 0, test_formats[ii].format, + test_formats[ii].type, nullptr); GLuint framebuffer = 0; glGenFramebuffers(1, &framebuffer);
diff --git a/gpu/command_buffer/tests/gl_test_utils.cc b/gpu/command_buffer/tests/gl_test_utils.cc index da2a51e..d9253b3 100644 --- a/gpu/command_buffer/tests/gl_test_utils.cc +++ b/gpu/command_buffer/tests/gl_test_utils.cc
@@ -89,7 +89,7 @@ GLuint GLTestHelper::CompileShader(GLenum type, const char* shaderSrc) { GLuint shader = glCreateShader(type); // Load the shader source - glShaderSource(shader, 1, &shaderSrc, NULL); + glShaderSource(shader, 1, &shaderSrc, nullptr); // Compile the shader glCompileShader(shader); @@ -280,7 +280,7 @@ bool GLTestHelper::SaveBackbufferAsBMP( const char* filename, int width, int height) { FILE* fp = fopen(filename, "wb"); - EXPECT_TRUE(fp != NULL); + EXPECT_TRUE(fp != nullptr); glPixelStorei(GL_PACK_ALIGNMENT, 1); int num_pixels = width * height; int size = num_pixels * 4;
diff --git a/gpu/command_buffer/tests/gl_unittests_android.cc b/gpu/command_buffer/tests/gl_unittests_android.cc index a4aa828..655c8505 100644 --- a/gpu/command_buffer/tests/gl_unittests_android.cc +++ b/gpu/command_buffer/tests/gl_unittests_android.cc
@@ -38,11 +38,11 @@ scoped_refptr<gl::SurfaceTexture> surface_texture( gl::SurfaceTexture::Create(texture)); gfx::AcceleratedWidget window = surface_texture->CreateSurface(); - EXPECT_TRUE(window != NULL); + EXPECT_TRUE(window != nullptr); scoped_refptr<gl::GLSurface> gl_surface = gl::init::CreateViewGLSurface(window); - EXPECT_TRUE(gl_surface.get() != NULL); + EXPECT_TRUE(gl_surface.get() != nullptr); gl_.SetSurface(gl_surface.get());
diff --git a/gpu/config/BUILD.gn b/gpu/config/BUILD.gn index 47f44e86..02bbb2b 100644 --- a/gpu/config/BUILD.gn +++ b/gpu/config/BUILD.gn
@@ -160,7 +160,7 @@ ] # Prefer mesa GL headers to system headers, which cause problems on Win. - include_dirs = [ "//third_party/mesa/src/include" ] + include_dirs = [ "//third_party/mesa_headers" ] if (is_win) { libs = [
diff --git a/gpu/config/gpu_driver_bug_list_unittest.cc b/gpu/config/gpu_driver_bug_list_unittest.cc index ff5bf3a9..88646b3 100644 --- a/gpu/config/gpu_driver_bug_list_unittest.cc +++ b/gpu/config/gpu_driver_bug_list_unittest.cc
@@ -41,7 +41,7 @@ #endif // OS_ANDROID TEST_F(GpuDriverBugListTest, AppendSingleWorkaround) { - base::CommandLine command_line(0, NULL); + base::CommandLine command_line(0, nullptr); command_line.AppendSwitch(GpuDriverBugWorkaroundTypeToString( DISABLE_CHROMIUM_FRAMEBUFFER_MULTISAMPLE)); std::set<int> workarounds; @@ -55,7 +55,7 @@ } TEST_F(GpuDriverBugListTest, AppendForceGPUWorkaround) { - base::CommandLine command_line(0, NULL); + base::CommandLine command_line(0, nullptr); command_line.AppendSwitch( GpuDriverBugWorkaroundTypeToString(FORCE_DISCRETE_GPU)); std::set<int> workarounds;
diff --git a/gpu/config/gpu_dx_diagnostics_win.cc b/gpu/config/gpu_dx_diagnostics_win.cc index e36ecfe0..cd239609 100644 --- a/gpu/config/gpu_dx_diagnostics_win.cc +++ b/gpu/config/gpu_dx_diagnostics_win.cc
@@ -77,7 +77,7 @@ std::string child_name8 = base::WideToUTF8(child_name16); DxDiagNode* output_child = &output->children[child_name8]; - IDxDiagContainer* child_container = NULL; + IDxDiagContainer* child_container = nullptr; hr = container->GetChildContainer(child_name16, &child_container); if (SUCCEEDED(hr)) { RecurseDiagnosticTree(output_child, child_container, depth - 1); @@ -97,24 +97,24 @@ HRESULT hr; bool success = false; - IDxDiagProvider* provider = NULL; - hr = CoCreateInstance(CLSID_DxDiagProvider, NULL, CLSCTX_INPROC_SERVER, + IDxDiagProvider* provider = nullptr; + hr = CoCreateInstance(CLSID_DxDiagProvider, nullptr, CLSCTX_INPROC_SERVER, IID_IDxDiagProvider, reinterpret_cast<void**>(&provider)); if (SUCCEEDED(hr)) { DXDIAG_INIT_PARAMS params = { sizeof(params) }; params.dwDxDiagHeaderVersion = DXDIAG_DX9_SDK_VERSION; params.bAllowWHQLChecks = FALSE; - params.pReserved = NULL; + params.pReserved = nullptr; hr = provider->Initialize(¶ms); if (SUCCEEDED(hr)) { - IDxDiagContainer* root = NULL; + IDxDiagContainer* root = nullptr; hr = provider->GetRootContainer(&root); if (SUCCEEDED(hr)) { // Limit to the DisplayDevices subtree. The tree in its entirity is // enormous and only this branch contains useful information. - IDxDiagContainer* display_devices = NULL; + IDxDiagContainer* display_devices = nullptr; hr = root->GetChildContainer(L"DxDiag_DisplayDevices", &display_devices); if (SUCCEEDED(hr)) {
diff --git a/gpu/config/gpu_info_collector.cc b/gpu/config/gpu_info_collector.cc index 848ad44..af06601 100644 --- a/gpu/config/gpu_info_collector.cc +++ b/gpu/config/gpu_info_collector.cc
@@ -48,7 +48,7 @@ gl::init::CreateOffscreenGLSurface(gfx::Size())); if (!surface.get()) { LOG(ERROR) << "gl::GLContext::CreateOffscreenGLSurface failed"; - return NULL; + return nullptr; } return surface; @@ -61,12 +61,12 @@ gl::init::CreateGLContext(nullptr, surface, attribs)); if (!context.get()) { LOG(ERROR) << "gl::init::CreateGLContext failed"; - return NULL; + return nullptr; } if (!context->MakeCurrent(surface)) { LOG(ERROR) << "gl::GLContext::MakeCurrent() failed"; - return NULL; + return nullptr; } return context;
diff --git a/gpu/config/gpu_info_collector_unittest.cc b/gpu/config/gpu_info_collector_unittest.cc index 8e600b4..c73e99e 100644 --- a/gpu/config/gpu_info_collector_unittest.cc +++ b/gpu/config/gpu_info_collector_unittest.cc
@@ -177,7 +177,7 @@ } void TearDown() override { - ::gl::MockGLInterface::SetGLInterface(NULL); + ::gl::MockGLInterface::SetGLInterface(nullptr); gl_.reset(); gl::init::ShutdownGL(false);
diff --git a/gpu/config/gpu_info_collector_win.cc b/gpu/config/gpu_info_collector_win.cc index 41a2834..d940d59 100644 --- a/gpu/config/gpu_info_collector_win.cc +++ b/gpu/config/gpu_info_collector_win.cc
@@ -159,7 +159,7 @@ // create device info for the display device HDEVINFO device_info = - ::SetupDiGetClassDevs(&display_class, NULL, NULL, DIGCF_PRESENT); + ::SetupDiGetClassDevs(&display_class, nullptr, nullptr, DIGCF_PRESENT); if (device_info == INVALID_HANDLE_VALUE) { LOG(ERROR) << "Creating device info failed"; return false; @@ -178,8 +178,8 @@ while (SetupDiEnumDeviceInfo(device_info, index++, &device_info_data)) { WCHAR value[255]; if (SetupDiGetDeviceRegistryPropertyW( - device_info, &device_info_data, SPDRP_DRIVER, NULL, - reinterpret_cast<PBYTE>(value), sizeof(value), NULL)) { + device_info, &device_info_data, SPDRP_DRIVER, nullptr, + reinterpret_cast<PBYTE>(value), sizeof(value), nullptr)) { HKEY key; std::wstring driver_key = L"System\\CurrentControlSet\\Control\\Class\\"; driver_key += value; @@ -188,19 +188,19 @@ if (result == ERROR_SUCCESS) { GPUInfo::GPUDevice device; DWORD dwcb_data = sizeof(value); - result = RegQueryValueExW(key, L"DriverVersion", NULL, NULL, + result = RegQueryValueExW(key, L"DriverVersion", nullptr, nullptr, reinterpret_cast<LPBYTE>(value), &dwcb_data); if (result == ERROR_SUCCESS) device.driver_version = base::UTF16ToASCII(std::wstring(value)); dwcb_data = sizeof(value); - result = RegQueryValueExW(key, L"DriverDate", NULL, NULL, + result = RegQueryValueExW(key, L"DriverDate", nullptr, nullptr, reinterpret_cast<LPBYTE>(value), &dwcb_data); if (result == ERROR_SUCCESS) device.driver_date = base::UTF16ToASCII(std::wstring(value)); dwcb_data = sizeof(value); - result = RegQueryValueExW(key, L"ProviderName", NULL, NULL, + result = RegQueryValueExW(key, L"ProviderName", nullptr, nullptr, reinterpret_cast<LPBYTE>(value), &dwcb_data); if (result == ERROR_SUCCESS) device.driver_vendor = base::UTF16ToASCII(std::wstring(value)); @@ -645,7 +645,7 @@ DISPLAY_DEVICE dd; dd.cb = sizeof(DISPLAY_DEVICE); std::wstring id; - for (int i = 0; EnumDisplayDevices(NULL, i, &dd, 0); ++i) { + for (int i = 0; EnumDisplayDevices(nullptr, i, &dd, 0); ++i) { if (dd.StateFlags & DISPLAY_DEVICE_PRIMARY_DEVICE) { id = dd.DeviceID; break;
diff --git a/gpu/config/gpu_test_config.cc b/gpu/config/gpu_test_config.cc index 6d4fd89..b82d701 100644 --- a/gpu/config/gpu_test_config.cc +++ b/gpu/config/gpu_test_config.cc
@@ -279,7 +279,7 @@ // static bool GPUTestBotConfig::CurrentConfigMatches(const std::string& config_data) { GPUTestBotConfig my_config; - if (!my_config.LoadCurrentConfig(NULL)) + if (!my_config.LoadCurrentConfig(nullptr)) return false; return my_config.Matches(config_data); } @@ -288,7 +288,7 @@ bool GPUTestBotConfig::CurrentConfigMatches( const std::vector<std::string>& configs) { GPUTestBotConfig my_config; - if (!my_config.LoadCurrentConfig(NULL)) + if (!my_config.LoadCurrentConfig(nullptr)) return false; for (size_t i = 0 ; i < configs.size(); ++i) { if (my_config.Matches(configs[i]))
diff --git a/gpu/config/gpu_test_config.h b/gpu/config/gpu_test_config.h index ba8e662..2be4242 100644 --- a/gpu/config/gpu_test_config.h +++ b/gpu/config/gpu_test_config.h
@@ -125,7 +125,7 @@ bool Matches(const std::string& config_data) const; // Setup the config with the current gpu testing environment. - // If gpu_info is NULL, collect GPUInfo first. + // If gpu_info is nullptr, collect GPUInfo first. bool LoadCurrentConfig(const GPUInfo* gpu_info); // Check if this bot's config matches |config_data| or any of the |configs|.
diff --git a/gpu/gles2_conform_support/gles2_conform_test.cc b/gpu/gles2_conform_support/gles2_conform_test.cc index 380df33..22a23d3 100644 --- a/gpu/gles2_conform_support/gles2_conform_test.cc +++ b/gpu/gles2_conform_support/gles2_conform_test.cc
@@ -52,7 +52,7 @@ return false; } gpu::GPUTestBotConfig bot_config; - if (!bot_config.LoadCurrentConfig(NULL)) { + if (!bot_config.LoadCurrentConfig(nullptr)) { LOG(ERROR) << "Fail to load bot configuration"; return false; }
diff --git a/gpu/gles2_conform_support/native/egl_native_win.cc b/gpu/gles2_conform_support/native/egl_native_win.cc index 0ad73ad1..679a3fb8 100644 --- a/gpu/gles2_conform_support/native/egl_native_win.cc +++ b/gpu/gles2_conform_support/native/egl_native_win.cc
@@ -54,7 +54,7 @@ const char* title, int width, int height, EGLNativeWindowType *pNativeWindow) { WNDCLASS wnd_class = {0}; - HINSTANCE instance = GetModuleHandle(NULL); + HINSTANCE instance = GetModuleHandle(nullptr); wnd_class.style = CS_OWNDC; wnd_class.lpfnWndProc = WindowProc; wnd_class.hInstance = instance; @@ -80,19 +80,11 @@ const std::string wnd_title = title; #endif // UNICODE - HWND hwnd = CreateWindow( - wnd_class.lpszClassName, - wnd_title.c_str(), - wnd_style, - 0, - 0, - wnd_rect.right - wnd_rect.left, - wnd_rect.bottom - wnd_rect.top, - NULL, - NULL, - instance, - NULL); - if (hwnd == NULL) + HWND hwnd = CreateWindow(wnd_class.lpszClassName, wnd_title.c_str(), + wnd_style, 0, 0, wnd_rect.right - wnd_rect.left, + wnd_rect.bottom - wnd_rect.top, nullptr, nullptr, + instance, nullptr); + if (hwnd == nullptr) return GTFfalse; ShowWindow(hwnd, SW_SHOWNORMAL); @@ -103,12 +95,12 @@ void GTFNativeDestroyWindow(EGLNativeDisplayType nativeDisplay, EGLNativeWindowType nativeWindow) { DestroyWindow(nativeWindow); - UnregisterClass(kWindowClassName, GetModuleHandle(NULL)); + UnregisterClass(kWindowClassName, GetModuleHandle(nullptr)); } EGLImageKHR GTFCreateEGLImage(int width, int height, GLenum format, GLenum type) { - return (EGLImageKHR)NULL; + return (EGLImageKHR) nullptr; } void GTFDestroyEGLImage(EGLImageKHR image) {
diff --git a/gpu/ipc/common/android/surface_owner_android.cc b/gpu/ipc/common/android/surface_owner_android.cc index 211eb88..088aa98 100644 --- a/gpu/ipc/common/android/surface_owner_android.cc +++ b/gpu/ipc/common/android/surface_owner_android.cc
@@ -112,8 +112,9 @@ if (return_code != AMEDIA_OK) { LOG(ERROR) << " Image reader creation failed."; if (return_code == AMEDIA_ERROR_INVALID_PARAMETER) { - LOG(ERROR) << "Either reader is NULL, or one or more of width, height, " - "format, maxImages arguments is not supported"; + LOG(ERROR) + << "Either reader is nullptr, or one or more of width, height, " + "format, maxImages arguments is not supported"; } else LOG(ERROR) << "unknown error"; return; @@ -153,7 +154,7 @@ } ImageReader::~ImageReader() { - loader_.AImageReader_setImageListener(image_reader_, NULL); + loader_.AImageReader_setImageListener(image_reader_, nullptr); // Delete the image before closing the associated image reader. if (current_image_) @@ -204,7 +205,7 @@ // just return if error occurs. switch (return_code) { case AMEDIA_ERROR_INVALID_PARAMETER: - LOG(ERROR) << " Image is NULL"; + LOG(ERROR) << " Image is nullptr"; return; case AMEDIA_IMGREADER_MAX_IMAGES_ACQUIRED: LOG(ERROR)
diff --git a/gpu/ipc/common/gpu_command_buffer_traits.cc b/gpu/ipc/common/gpu_command_buffer_traits.cc index 5f58b24..da79b60b 100644 --- a/gpu/ipc/common/gpu_command_buffer_traits.cc +++ b/gpu/ipc/common/gpu_command_buffer_traits.cc
@@ -106,7 +106,7 @@ bool ParamTraits<gpu::Mailbox>::Read(const base::Pickle* m, base::PickleIterator* iter, param_type* p) { - const char* bytes = NULL; + const char* bytes = nullptr; if (!iter->ReadBytes(&bytes, sizeof(p->name))) return false; DCHECK(bytes);
diff --git a/gpu/ipc/common/gpu_memory_buffer_impl_io_surface.cc b/gpu/ipc/common/gpu_memory_buffer_impl_io_surface.cc index f648f6a..e12dada 100644 --- a/gpu/ipc/common/gpu_memory_buffer_impl_io_surface.cc +++ b/gpu/ipc/common/gpu_memory_buffer_impl_io_surface.cc
@@ -100,7 +100,7 @@ bool GpuMemoryBufferImplIOSurface::Map() { DCHECK(!mapped_); - IOReturn status = IOSurfaceLock(io_surface_, lock_flags_, NULL); + IOReturn status = IOSurfaceLock(io_surface_, lock_flags_, nullptr); DCHECK_NE(status, kIOReturnCannotLock); mapped_ = true; return true; @@ -114,7 +114,7 @@ void GpuMemoryBufferImplIOSurface::Unmap() { DCHECK(mapped_); - IOSurfaceUnlock(io_surface_, lock_flags_, NULL); + IOSurfaceUnlock(io_surface_, lock_flags_, nullptr); mapped_ = false; }
diff --git a/gpu/ipc/common/gpu_surface_lookup.cc b/gpu/ipc/common/gpu_surface_lookup.cc index 6ab1c91..042a281 100644 --- a/gpu/ipc/common/gpu_surface_lookup.cc +++ b/gpu/ipc/common/gpu_surface_lookup.cc
@@ -9,7 +9,7 @@ namespace gpu { namespace { -GpuSurfaceLookup* g_instance = NULL; +GpuSurfaceLookup* g_instance = nullptr; } // anonymous namespace // static
diff --git a/gpu/ipc/common/gpu_surface_tracker.cc b/gpu/ipc/common/gpu_surface_tracker.cc index a93ea2c..4547d4a 100644 --- a/gpu/ipc/common/gpu_surface_tracker.cc +++ b/gpu/ipc/common/gpu_surface_tracker.cc
@@ -37,7 +37,7 @@ } GpuSurfaceTracker::~GpuSurfaceTracker() { - gpu::GpuSurfaceLookup::InitInstance(NULL); + gpu::GpuSurfaceLookup::InitInstance(nullptr); } GpuSurfaceTracker* GpuSurfaceTracker::GetInstance() {
diff --git a/gpu/ipc/host/gpu_memory_buffer_support.cc b/gpu/ipc/host/gpu_memory_buffer_support.cc index 812ba4b9..d35beb1 100644 --- a/gpu/ipc/host/gpu_memory_buffer_support.cc +++ b/gpu/ipc/host/gpu_memory_buffer_support.cc
@@ -11,18 +11,10 @@ #include "gpu/ipc/common/gpu_memory_buffer_support.h" #include "gpu/ipc/host/gpu_switches.h" #include "ui/gl/gl_bindings.h" -#include "ui/gl/gl_implementation.h" -#include "ui/gl/gl_switches.h" namespace gpu { bool AreNativeGpuMemoryBuffersEnabled() { - // Disable native buffers when using OSMesa. - if (base::CommandLine::ForCurrentProcess()->GetSwitchValueASCII( - switches::kUseGL) == gl::kGLImplementationOSMesaName) { - return false; - } - #if defined(OS_MACOSX) return !base::CommandLine::ForCurrentProcess()->HasSwitch( switches::kDisableNativeGpuMemoryBuffers); @@ -70,29 +62,23 @@ } } - // Disable native buffers only when using OSMesa. - bool force_native_gpu_read_write_formats = - base::CommandLine::ForCurrentProcess()->GetSwitchValueASCII( - switches::kUseGL) != gl::kGLImplementationOSMesaName; - if (force_native_gpu_read_write_formats) { - const gfx::BufferFormat kGPUReadWriteFormats[] = { - gfx::BufferFormat::BGR_565, gfx::BufferFormat::RGBA_8888, - gfx::BufferFormat::RGBX_8888, gfx::BufferFormat::BGRA_8888, - gfx::BufferFormat::BGRX_8888, gfx::BufferFormat::UYVY_422, - gfx::BufferFormat::YVU_420, gfx::BufferFormat::YUV_420_BIPLANAR, - gfx::BufferFormat::R_8}; - const gfx::BufferUsage kGPUReadWriteUsages[] = { - gfx::BufferUsage::GPU_READ, gfx::BufferUsage::SCANOUT, - gfx::BufferUsage::SCANOUT_CAMERA_READ_WRITE, - gfx::BufferUsage::CAMERA_AND_CPU_READ_WRITE, - gfx::BufferUsage::SCANOUT_CPU_READ_WRITE, - gfx::BufferUsage::SCANOUT_VDA_WRITE}; - for (auto format : kGPUReadWriteFormats) { - for (auto usage : kGPUReadWriteUsages) { - if (support->IsNativeGpuMemoryBufferConfigurationSupported(format, - usage)) - configurations.insert(std::make_pair(format, usage)); - } + const gfx::BufferFormat kGPUReadWriteFormats[] = { + gfx::BufferFormat::BGR_565, gfx::BufferFormat::RGBA_8888, + gfx::BufferFormat::RGBX_8888, gfx::BufferFormat::BGRA_8888, + gfx::BufferFormat::BGRX_8888, gfx::BufferFormat::UYVY_422, + gfx::BufferFormat::YVU_420, gfx::BufferFormat::YUV_420_BIPLANAR, + gfx::BufferFormat::R_8}; + const gfx::BufferUsage kGPUReadWriteUsages[] = { + gfx::BufferUsage::GPU_READ, + gfx::BufferUsage::SCANOUT, + gfx::BufferUsage::SCANOUT_CAMERA_READ_WRITE, + gfx::BufferUsage::CAMERA_AND_CPU_READ_WRITE, + gfx::BufferUsage::SCANOUT_CPU_READ_WRITE, + gfx::BufferUsage::SCANOUT_VDA_WRITE}; + for (auto format : kGPUReadWriteFormats) { + for (auto usage : kGPUReadWriteUsages) { + if (support->IsNativeGpuMemoryBufferConfigurationSupported(format, usage)) + configurations.insert(std::make_pair(format, usage)); } } #endif // defined(USE_OZONE) || defined(OS_MACOSX) || defined(OS_WIN)
diff --git a/gpu/ipc/host/shader_disk_cache.cc b/gpu/ipc/host/shader_disk_cache.cc index 08c5f0c..3a33f6b 100644 --- a/gpu/ipc/host/shader_disk_cache.cc +++ b/gpu/ipc/host/shader_disk_cache.cc
@@ -281,8 +281,8 @@ : cache_(cache), shader_loaded_callback_(callback), op_type_(OPEN_NEXT), - buf_(NULL), - entry_(NULL), + buf_(nullptr), + entry_(nullptr), weak_ptr_factory_(this) {} ShaderDiskReadHelper::~ShaderDiskReadHelper() { @@ -367,9 +367,9 @@ std::string(buf_->data(), buf_->size())); } - buf_ = NULL; + buf_ = nullptr; entry_->Close(); - entry_ = NULL; + entry_ = nullptr; op_type_ = OPEN_NEXT; return net::OK; @@ -457,7 +457,7 @@ DCHECK(CalledOnValidThread()); ClientIdToPathMap::iterator iter = client_id_to_path_map_.find(client_id); if (iter == client_id_to_path_map_.end()) - return NULL; + return nullptr; return ShaderCacheFactory::GetByPath(iter->second); }
diff --git a/gpu/ipc/host/shader_disk_cache_unittest.cc b/gpu/ipc/host/shader_disk_cache_unittest.cc index c69fafe9..0dd1a59c7 100644 --- a/gpu/ipc/host/shader_disk_cache_unittest.cc +++ b/gpu/ipc/host/shader_disk_cache_unittest.cc
@@ -54,7 +54,7 @@ InitCache(); scoped_refptr<ShaderDiskCache> cache = factory()->Get(kDefaultClientId); - ASSERT_TRUE(cache.get() != NULL); + ASSERT_TRUE(cache.get() != nullptr); net::TestCompletionCallback available_cb; int rv = cache->SetAvailableCallback(available_cb.callback()); @@ -81,7 +81,7 @@ // Create a cache and wait for it to open. scoped_refptr<ShaderDiskCache> cache = factory()->Get(kDefaultClientId); - ASSERT_TRUE(cache.get() != NULL); + ASSERT_TRUE(cache.get() != nullptr); net::TestCompletionCallback available_cb; int rv = cache->SetAvailableCallback(available_cb.callback()); ASSERT_EQ(net::OK, available_cb.GetResult(rv)); @@ -96,7 +96,7 @@ // Open a new cache (to pass time on the cache thread) and verify all is // well. cache = factory()->Get(kDefaultClientId); - ASSERT_TRUE(cache.get() != NULL); + ASSERT_TRUE(cache.get() != nullptr); net::TestCompletionCallback available_cb2; int rv2 = cache->SetAvailableCallback(available_cb2.callback()); ASSERT_EQ(net::OK, available_cb2.GetResult(rv2));
diff --git a/gpu/ipc/service/child_window_win.cc b/gpu/ipc/service/child_window_win.cc index d531234..0f432fe 100644 --- a/gpu/ipc/service/child_window_win.cc +++ b/gpu/ipc/service/child_window_win.cc
@@ -134,7 +134,7 @@ HWND window = CreateWindowEx( WS_EX_NOPARENTNOTIFY, reinterpret_cast<wchar_t*>(g_window_class), L"", WS_CHILDWINDOW | WS_DISABLED | WS_VISIBLE, 0, 0, size.width(), - size.height(), *parent_window, NULL, NULL, NULL); + size.height(), *parent_window, nullptr, nullptr, nullptr); CHECK(window); *child_window = window; gfx::SetWindowUserData(window, shared_data);
diff --git a/gpu/ipc/service/gpu_channel_manager.cc b/gpu/ipc/service/gpu_channel_manager.cc index 8d414c6..9237b226 100644 --- a/gpu/ipc/service/gpu_channel_manager.cc +++ b/gpu/ipc/service/gpu_channel_manager.cc
@@ -101,7 +101,7 @@ gpu_channels_.clear(); if (default_offscreen_surface_.get()) { default_offscreen_surface_->Destroy(); - default_offscreen_surface_ = NULL; + default_offscreen_surface_ = nullptr; } }
diff --git a/gpu/ipc/service/gpu_watchdog_thread.cc b/gpu/ipc/service/gpu_watchdog_thread.cc index 96cbee2..95ada2e 100644 --- a/gpu/ipc/service/gpu_watchdog_thread.cc +++ b/gpu/ipc/service/gpu_watchdog_thread.cc
@@ -67,7 +67,7 @@ #endif suspension_counter_(this), #if defined(USE_X11) - display_(NULL), + display_(nullptr), window_(0), atom_(x11::None), host_tty_(-1), @@ -509,11 +509,11 @@ #if defined(USE_X11) void GpuWatchdogThread::SetupXServer() { - display_ = XOpenDisplay(NULL); + display_ = XOpenDisplay(nullptr); if (display_) { window_ = XCreateWindow(display_, DefaultRootWindow(display_), 0, 0, 1, 1, 0, - CopyFromParent, InputOutput, CopyFromParent, 0, NULL); + CopyFromParent, InputOutput, CopyFromParent, 0, nullptr); atom_ = XInternAtom(display_, "CHECK", x11::False); } host_tty_ = GetActiveTTY();
diff --git a/gpu/ipc/service/image_transport_surface_mac.mm b/gpu/ipc/service/image_transport_surface_mac.mm index ccd0633..356a3a8 100644 --- a/gpu/ipc/service/image_transport_surface_mac.mm +++ b/gpu/ipc/service/image_transport_surface_mac.mm
@@ -9,49 +9,10 @@ #include "gpu/ipc/service/image_transport_surface_overlay_mac.h" #include "gpu/ipc/service/pass_through_image_transport_surface.h" #include "ui/gfx/native_widget_types.h" -#include "ui/gl/gl_surface_osmesa.h" #include "ui/gl/gl_surface_stub.h" namespace gpu { -namespace { - -// A subclass of GLSurfaceOSMesa that doesn't print an error message when -// SwapBuffers() is called. -class DRTSurfaceOSMesa : public gl::GLSurfaceOSMesa { - public: - // Size doesn't matter, the surface is resized to the right size later. - DRTSurfaceOSMesa() - : GLSurfaceOSMesa( - gl::GLSurfaceFormat(gl::GLSurfaceFormat::PIXEL_LAYOUT_RGBA), - gfx::Size(1, 1)) {} - - // Implement a subset of GLSurface. - gfx::SwapResult SwapBuffers(const PresentationCallback& callback) override; - bool SupportsPresentationCallback() override; - - private: - ~DRTSurfaceOSMesa() override {} - DISALLOW_COPY_AND_ASSIGN(DRTSurfaceOSMesa); -}; - -gfx::SwapResult DRTSurfaceOSMesa::SwapBuffers( - const PresentationCallback& callback) { - gfx::PresentationFeedback feedback(base::TimeTicks::Now(), base::TimeDelta(), - 0 /* flags */); - base::ThreadTaskRunnerHandle::Get()->PostTask( - FROM_HERE, base::BindOnce(callback, std::move(feedback))); - return gfx::SwapResult::SWAP_ACK; -} - -bool DRTSurfaceOSMesa::SupportsPresentationCallback() { - return true; -} - -bool g_allow_os_mesa = false; - -} // namespace - // static scoped_refptr<gl::GLSurface> ImageTransportSurface::CreateNativeSurface( base::WeakPtr<ImageTransportSurfaceDelegate> delegate, @@ -71,24 +32,8 @@ case gl::kGLImplementationStubGL: return base::WrapRefCounted<gl::GLSurface>(new gl::GLSurfaceStub); default: - // Content shell in DRT mode spins up a gpu process which needs an - // image transport surface, but that surface isn't used to read pixel - // baselines. So this is mostly a dummy surface. - if (!g_allow_os_mesa) { - NOTREACHED(); - return nullptr; - } - scoped_refptr<gl::GLSurface> surface(new DRTSurfaceOSMesa()); - if (!surface.get() || !surface->Initialize(format)) - return surface; - return base::WrapRefCounted<gl::GLSurface>( - new PassThroughImageTransportSurface(delegate, surface.get(), false)); + return nullptr; } } -// static -void ImageTransportSurface::SetAllowOSMesaForTesting(bool allow) { - g_allow_os_mesa = allow; -} - } // namespace gpu
diff --git a/gpu/ipc/service/stream_texture_android.cc b/gpu/ipc/service/stream_texture_android.cc index 7bff3841..a1dc375 100644 --- a/gpu/ipc/service/stream_texture_android.cc +++ b/gpu/ipc/service/stream_texture_android.cc
@@ -92,17 +92,17 @@ owner_stub_->RemoveDestructionObserver(this); owner_stub_->channel()->RemoveRoute(route_id_); - owner_stub_ = NULL; + owner_stub_ = nullptr; // If the owner goes away, there is no need to keep the SurfaceTexture around. // The GL texture will keep working regardless with the currently bound frame. - surface_owner_ = NULL; + surface_owner_ = nullptr; } std::unique_ptr<ui::ScopedMakeCurrent> StreamTexture::MakeStubCurrent() { std::unique_ptr<ui::ScopedMakeCurrent> scoped_make_current; bool needs_make_current = - !owner_stub_->decoder_context()->GetGLContext()->IsCurrent(NULL); + !owner_stub_->decoder_context()->GetGLContext()->IsCurrent(nullptr); if (needs_make_current) { scoped_make_current.reset(new ui::ScopedMakeCurrent( owner_stub_->decoder_context()->GetGLContext(),
diff --git a/gpu/khronos_glcts_support/khronos_glcts_test.cc b/gpu/khronos_glcts_support/khronos_glcts_test.cc index 5662972e..4d508f5 100644 --- a/gpu/khronos_glcts_support/khronos_glcts_test.cc +++ b/gpu/khronos_glcts_support/khronos_glcts_test.cc
@@ -42,7 +42,7 @@ return false; } gpu::GPUTestBotConfig bot_config; - if (!bot_config.LoadCurrentConfig(NULL)) { + if (!bot_config.LoadCurrentConfig(nullptr)) { LOG(ERROR) << "Fail to load bot configuration"; return false; }
diff --git a/gpu/khronos_glcts_support/native/egl_native_windowless.cc b/gpu/khronos_glcts_support/native/egl_native_windowless.cc index 548f90b..15e0fc1 100644 --- a/gpu/khronos_glcts_support/native/egl_native_windowless.cc +++ b/gpu/khronos_glcts_support/native/egl_native_windowless.cc
@@ -23,7 +23,7 @@ int height) : tcu::egl::WindowSurface(display, config, - (EGLNativeWindowType)NULL, + (EGLNativeWindowType) nullptr, attribList), width_(width), height_(height) {}
diff --git a/gpu/khronos_glcts_support/native/main.cc b/gpu/khronos_glcts_support/native/main.cc index 62d9b11..fc6c14d 100644 --- a/gpu/khronos_glcts_support/native/main.cc +++ b/gpu/khronos_glcts_support/native/main.cc
@@ -20,7 +20,7 @@ tcu::Platform* createPlatform (); void GTFMain(int argc, char* argv[]) { - setvbuf(stdout, DE_NULL, _IOLBF, 4*1024); + setvbuf(stdout, DE_nullptr, _IOLBF, 4 * 1024); try { tcu::CommandLine cmdLine(argc, argv);
diff --git a/gpu/perftests/texture_upload_perftest.cc b/gpu/perftests/texture_upload_perftest.cc index bc683b1..ff91cff 100644 --- a/gpu/perftests/texture_upload_perftest.cc +++ b/gpu/perftests/texture_upload_perftest.cc
@@ -72,7 +72,7 @@ GLuint shader = 0; shader = glCreateShader(type); CHECK_NE(0u, shader); - glShaderSource(shader, 1, &src, NULL); + glShaderSource(shader, 1, &src, nullptr); glCompileShader(shader); GLint compiled = 0; @@ -82,7 +82,7 @@ glGetShaderiv(shader, GL_INFO_LOG_LENGTH, &len); if (len > 1) { std::unique_ptr<char[]> error_log(new char[len]); - glGetShaderInfoLog(shader, len, NULL, error_log.get()); + glGetShaderInfoLog(shader, len, nullptr, error_log.get()); LOG(ERROR) << "Error compiling shader: " << error_log.get(); } }
diff --git a/gpu/tools/compositor_model_bench/shaders.cc b/gpu/tools/compositor_model_bench/shaders.cc index 864f1e2..c27166bc 100644 --- a/gpu/tools/compositor_model_bench/shaders.cc +++ b/gpu/tools/compositor_model_bench/shaders.cc
@@ -239,7 +239,7 @@ GLsizei length; glGetShaderiv(shader, GL_INFO_LOG_LENGTH, &length); std::unique_ptr<GLchar[]> log(new GLchar[length + 1]); - glGetShaderInfoLog(shader, length, NULL, log.get()); + glGetShaderInfoLog(shader, length, nullptr, log.get()); LOG(ERROR) << log.get() << " in shader " << ShaderNameFromID(id); }
diff --git a/gpu/vulkan/vulkan_device_queue.cc b/gpu/vulkan/vulkan_device_queue.cc index 4d3c3976..bf9a3ed 100644 --- a/gpu/vulkan/vulkan_device_queue.cc +++ b/gpu/vulkan/vulkan_device_queue.cc
@@ -96,8 +96,7 @@ result = vkEnumerateDeviceLayerProperties(vk_physical_device_, &num_device_layers, nullptr); if (VK_SUCCESS != result) { - DLOG(ERROR) << "vkEnumerateDeviceLayerProperties(NULL) failed: " - << result; + DLOG(ERROR) << "vkEnumerateDeviceLayerProperties(NULL) failed: " << result; return false; }
diff --git a/infra/config/global/cr-buildbucket-dev.cfg b/infra/config/global/cr-buildbucket-dev.cfg index 6eaa6108..bea01791 100644 --- a/infra/config/global/cr-buildbucket-dev.cfg +++ b/infra/config/global/cr-buildbucket-dev.cfg
@@ -1,4 +1,4 @@ -# Defines buckets on cr-buildbucket.appspot.com, used by to schedule builds +# Defines buckets on cr-buildbucket-dev.appspot.com, used by to schedule builds # on buildbot. In particular, CQ uses some of these buckets to schedule tryjobs. # # See http://luci-config.appspot.com/schemas/projects:buildbucket.cfg for @@ -7,18 +7,6 @@ # Please keep this list sorted by bucket name. acl_sets { - name: "waterfall" - acls { - role: READER - group: "all" - } - acls { - role: SCHEDULER - identity: "luci-scheduler-dev@appspot.gserviceaccount.com" - } -} - -acl_sets { # This is pure-LUCI CI w/o buildbot. name: "ci" acls { @@ -32,7 +20,7 @@ acls { role: SCHEDULER # Support builder triggering other builders in the same bucket. - identity: "chromium-ci-builder@chops-service-accounts.iam.gserviceaccount.com" + identity: "chromium-ci-builder-dev@chops-service-accounts.iam.gserviceaccount.com" } acls { # Allow task force to bump next build number. @@ -41,54 +29,6 @@ } } -acl_sets { - name: "tryserver" - acls { - role: READER - group: "all" - } - acls { - role: SCHEDULER - group: "project-chromium-tryjob-access" - } - acls { - role: SCHEDULER - group: "service-account-cq" - } - acls { - role: SCHEDULER - identity: "findit-for-me@appspot.gserviceaccount.com" - } - acls { - role: SCHEDULER - identity: "luci-migration-dev@appspot.gserviceaccount.com" - } -} - -builder_mixins { - name: "linux" - dimensions: "os:Ubuntu-14.04" -} - -builder_mixins { - name: "mac" - dimensions: "os:Mac" -} - -builder_mixins { - name: "win" - dimensions: "os:Windows" -} - -builder_mixins { - name: "findit" - # This category is meant for Findit to trigger tryjobs on. - category: "Chromium Variable" - recipe { - name: "findit/chromium/compile" - } -} - builder_mixins { name: "swarm-ci" recipe { @@ -108,9 +48,8 @@ builder_defaults { category: "Chromium" dimensions: "cpu:x86-64" - dimensions: "pool:Chrome" execution_timeout_secs: 10800 # 3h - service_account: "chromium-ci-builder@chops-service-accounts.iam.gserviceaccount.com" + service_account: "chromium-ci-builder-dev@chops-service-accounts.iam.gserviceaccount.com" build_numbers: YES recipe { cipd_package: "infra/recipe_bundles/chromium.googlesource.com/chromium/tools/build" @@ -119,8 +58,8 @@ } } builders { - name: "Windows Swarm" - dimensions: "os:Windows-10" + name: "Android N5 Swarm" + dimensions: "os:Ubuntu-14.04" mixins: "swarm-ci" } builders { @@ -134,180 +73,19 @@ mixins: "swarm-ci" } builders { - name: "Mac Swarm" - dimensions: "os:Mac-10.13" - mixins: "swarm-ci" - } - builders { name: "Linux Swarm" dimensions: "os:Ubuntu-14.04" mixins: "swarm-ci" } builders { - name: "Android N5 Swarm" - dimensions: "os:Ubuntu-14.04" + name: "Mac Swarm" + dimensions: "os:Mac-10.13" mixins: "swarm-ci" } - } -} - -buckets { - name: "luci.chromium.try" - - acl_sets: "tryserver" - - swarming { - hostname: "chromium-swarm.appspot.com" - task_template_canary_percentage { value: 100 } - - builder_defaults { - category: "Chromium CQ" - dimensions: "cpu:x86-64" - dimensions: "pool:Chrome" - execution_timeout_secs: 10800 # 3h - build_numbers: YES - recipe { - cipd_package: "infra/recipe_bundles/chromium.googlesource.com/chromium/tools/build" - cipd_version: "refs/heads/master" - - properties: "mastername:luci.chromium.try" - name: "chromium_trybot" - } - } - - # Keep builders sorted by OS, then name. - builders { mixins: "linux" name: "LUCI cast_shell_audio_linux" } - builders { mixins: "linux" name: "LUCI cast_shell_linux" } - builders { mixins: "linux" name: "LUCI chromeos_amd64-generic_chromium_compile_only_ng" } - builders { mixins: "linux" name: "LUCI chromeos_amd64-generic_variable" } - builders { mixins: "linux" name: "LUCI chromeos_daisy_chromium_compile_only_ng" } - builders { mixins: "linux" name: "LUCI chromeos_daisy_variable" } - builders { mixins: "linux" name: "LUCI chromeos_x86-generic_chromium_compile_only_ng" } - builders { mixins: "linux" name: "LUCI chromeos_x86-generic_variable" } - builders { mixins: "linux" name: "LUCI chromium_devtools" } - builders { mixins: "linux" name: "LUCI chromium_presubmit" } - builders { mixins: "linux" name: "LUCI closure_compilation" } - builders { mixins: "linux" name: "LUCI linux_arm" } - builders { mixins: "linux" name: "LUCI linux_chromium_analysis" } - builders { mixins: "linux" name: "LUCI linux_chromium_archive_rel_ng" } - builders { mixins: "linux" name: "LUCI linux_chromium_asan_rel_ng" } - builders { mixins: "linux" name: "LUCI linux_chromium_asan_variable" } - builders { mixins: "linux" name: "LUCI linux_chromium_cast_variable" } - builders { mixins: "linux" name: "LUCI linux_chromium_cfi_rel_ng" } - builders { mixins: "linux" name: "LUCI linux_chromium_chromeos_asan_rel_ng" } - builders { mixins: "linux" name: "LUCI linux_chromium_chromeos_asan_variable" } - builders { mixins: "linux" name: "LUCI linux_chromium_chromeos_compile_dbg_ng" } - builders { mixins: "linux" name: "LUCI linux_chromium_chromeos_compile_rel_ng" } - builders { mixins: "linux" name: "LUCI linux_chromium_chromeos_dbg_ng" } - builders { mixins: "linux" name: "LUCI linux_chromium_chromeos_msan_rel_ng" } - builders { mixins: "linux" name: "LUCI linux_chromium_chromeos_msan_variable" } - builders { mixins: "linux" name: "LUCI linux_chromium_chromeos_ozone_rel_ng" } - builders { mixins: "linux" name: "LUCI linux_chromium_chromeos_rel_ng" } - builders { mixins: "linux" name: "LUCI linux_chromium_chromeos_variable" } - builders { mixins: "linux" name: "LUCI linux_chromium_chromeos_variable_chrome" } - builders { mixins: "linux" name: "LUCI linux_chromium_chromeos_variable_deflake" } - builders { mixins: "linux" name: "LUCI linux_chromium_clobber_deterministic" } - builders { mixins: "linux" name: "LUCI linux_chromium_clobber_rel_ng" } - builders { mixins: "linux" name: "LUCI linux_chromium_compile_dbg_32_ng" } - builders { mixins: "linux" name: "LUCI linux_chromium_compile_dbg_ng" } - builders { mixins: "linux" name: "LUCI linux_chromium_compile_rel_ng" } - builders { mixins: "linux" name: "LUCI linux_chromium_component_updater" } - builders { mixins: "linux" name: "LUCI linux_chromium_dbg_32_ng" } - builders { mixins: "linux" name: "LUCI linux_chromium_dbg_ng" } - builders { mixins: "linux" name: "LUCI linux_chromium_gn_upload" } - builders { mixins: "linux" name: "LUCI linux_chromium_headless_rel" } - builders { mixins: "linux" name: "LUCI linux_chromium_msan_rel_ng" } - builders { mixins: "linux" name: "LUCI linux_chromium_msan_variable" } - builders { mixins: "linux" name: "LUCI linux_chromium_ozone_compile_only_ng" } - builders { mixins: "linux" name: "LUCI linux_chromium_rel_ng" } - builders { mixins: "linux" name: "LUCI linux_chromium_tsan_rel_ng" } - builders { mixins: "linux" name: "LUCI linux_chromium_tsan_variable" } - builders { mixins: "linux" name: "LUCI linux_chromium_ubsan_rel_ng" } builders { - mixins: "linux" - mixins: "findit" - name: "LUCI linux_chromium_variable" + name: "Windows Swarm" + dimensions: "os:Windows-10" + mixins: "swarm-ci" } - builders { mixins: "linux" name: "LUCI linux_chromium_variable_32" } - builders { mixins: "linux" name: "LUCI linux_chromium_variable_chrome" } - builders { mixins: "linux" name: "LUCI linux_chromium_variable_clobber" } - builders { mixins: "linux" name: "LUCI linux_chromium_variable_deflake" } - builders { mixins: "linux" name: "LUCI linux_chromium_webkit_asan_variable" } - builders { mixins: "linux" name: "LUCI linux_chromium_webkit_leak_variable" } - builders { mixins: "linux" name: "LUCI linux_chromium_webkit_msan_variable" } - builders { mixins: "linux" name: "LUCI linux_chromium_webkit_variable" } - builders { mixins: "linux" name: "LUCI linux_chromiumos_full_variable" } - builders { mixins: "linux" name: "LUCI linux_layout_tests_layout_ng" } - builders { mixins: "linux" name: "LUCI linux_layout_tests_slimming_paint_v2" } - builders { mixins: "linux" name: "LUCI linux_mojo" } - builders { mixins: "linux" name: "LUCI linux_mojo_chromeos" } - builders { mixins: "linux" name: "LUCI linux_nacl_sdk" } - builders { mixins: "linux" name: "LUCI linux_nacl_sdk_build" } - builders { mixins: "linux" name: "LUCI linux_optional_gpu_tests_rel" } - builders { mixins: "linux" name: "LUCI linux_upload_clang" } - - builders { mixins: "mac" name: "LUCI ios-device" } - builders { mixins: "mac" name: "LUCI ios-device-xcode-clang" } - builders { mixins: "mac" name: "LUCI ios-simulator" } - builders { mixins: "mac" name: "LUCI ios-simulator-cronet" } - builders { mixins: "mac" name: "LUCI ios-simulator-eg" } - builders { mixins: "mac" name: "LUCI ios-simulator-xcode-clang" } - builders { mixins: "mac" name: "LUCI mac_chromium_10.10" } - builders { mixins: "mac" name: "LUCI mac_chromium_10.12_rel_ng" } - builders { mixins: "mac" name: "LUCI mac_chromium_archive_rel_ng" } - builders { mixins: "mac" name: "LUCI mac_chromium_asan_rel_ng" } - builders { mixins: "mac" name: "LUCI mac_chromium_asan_variable" } - builders { mixins: "mac" name: "LUCI mac_chromium_compile_dbg_ng" } - builders { mixins: "mac" name: "LUCI mac_chromium_compile_rel_ng" } - builders { mixins: "mac" name: "LUCI mac_chromium_dbg_ng" } - builders { mixins: "mac" name: "LUCI mac_chromium_gn_upload" } - builders { mixins: "mac" name: "LUCI mac_chromium_rel_ng" } - builders { mixins: "mac" name: "LUCI mac_chromium_variable" } - builders { mixins: "mac" name: "LUCI mac_chromium_variable_10.10" } - builders { mixins: "mac" name: "LUCI mac_chromium_variable_10.10_layout" } - builders { mixins: "mac" name: "LUCI mac_chromium_variable_10.11" } - builders { mixins: "mac" name: "LUCI mac_chromium_variable_10.11_layout" } - builders { mixins: "mac" name: "LUCI mac_chromium_variable_10.12" } - builders { mixins: "mac" name: "LUCI mac_chromium_variable_archive" } - builders { mixins: "mac" name: "LUCI mac_chromium_variable_chrome" } - builders { mixins: "mac" name: "LUCI mac_chromium_variable_deflake" } - builders { mixins: "mac" name: "LUCI mac_chromium_variable_layout" } - builders { mixins: "mac" name: "LUCI mac_nacl_sdk" } - builders { mixins: "mac" name: "LUCI mac_nacl_sdk_build" } - builders { mixins: "mac" name: "LUCI mac_optional_gpu_tests_rel" } - builders { mixins: "mac" name: "LUCI mac_upload_clang" } - builders { mixins: "mac" name: "LUCI mac-views-rel" } - - builders { mixins: "win" name: "LUCI win10_chromium_x64_rel_ng" } - builders { mixins: "win" name: "LUCI win10_chromium_x64_rel_ng_exp" } - builders { mixins: "win" name: "LUCI win8_chromium_gn_upload" } - builders { mixins: "win" name: "LUCI win_archive" } - builders { mixins: "win" name: "LUCI win_chrome_official" } - builders { mixins: "win" name: "LUCI win_chromium_compile_dbg_ng" } - builders { mixins: "win" name: "LUCI win_chromium_compile_rel_ng" } - builders { mixins: "win" name: "LUCI win_chromium_dbg_ng" } - builders { mixins: "win" name: "LUCI win_chromium_rel_ng" } - builders { mixins: "win" name: "LUCI win_chromium_syzyasan_rel" } - builders { mixins: "win" name: "LUCI win_chromium_variable" } - builders { mixins: "win" name: "LUCI win_chromium_variable_archive" } - builders { mixins: "win" name: "LUCI win_chromium_variable_chrome" } - builders { mixins: "win" name: "LUCI win_chromium_variable_clang" } - builders { mixins: "win" name: "LUCI win_chromium_variable_deflake" } - builders { mixins: "win" name: "LUCI win_chromium_variable_webkit_builder" } - builders { mixins: "win" name: "LUCI win_chromium_variable_webkit_win7_builder" } - builders { mixins: "win" name: "LUCI win_chromium_variable_webkit_win7_builder_x64" } - builders { mixins: "win" name: "LUCI win_chromium_x64_rel_ng" } - builders { mixins: "win" name: "LUCI win_clang" } - builders { mixins: "win" name: "LUCI win_clang_dbg" } - builders { mixins: "win" name: "LUCI win_clang_rel" } - builders { mixins: "win" name: "LUCI win_clang_x64_dbg" } - builders { mixins: "win" name: "LUCI win_clang_x64_rel" } - builders { mixins: "win" name: "LUCI win_mojo" } - builders { mixins: "win" name: "LUCI win_nacl_sdk" } - builders { mixins: "win" name: "LUCI win_nacl_sdk_build" } - builders { mixins: "win" name: "LUCI win_optional_gpu_tests_rel" } - builders { mixins: "win" name: "LUCI win_upload_clang" } - builders { mixins: "win" name: "LUCI win_x64_archive" } - builders { mixins: "win" name: "LUCI win_x64_chromium_variable_builder" } } }
diff --git a/infra/config/global/luci-logdog-dev.cfg b/infra/config/global/luci-logdog-dev.cfg deleted file mode 100644 index 7057d02..0000000 --- a/infra/config/global/luci-logdog-dev.cfg +++ /dev/null
@@ -1,16 +0,0 @@ -# Copyright (c) 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. -# -# For the schema of this file and documentation, see ProjectConfig message in -# https://luci-config.appspot.com/schemas/projects:luci-logdog.cfg - -# Auth groups who can read log streams. -reader_auth_groups: "all" -# Auth groups who can register and emit new log streams. -writer_auth_groups: "luci-logdog-chromium-dev-writers" - -# The base Google Storage archival path for this project. -# -# Archived LogDog logs will be written to this bucket/path. -archive_gs_bucket: "chromium-luci-logdog"
diff --git a/infra/config/global/luci-milo-dev.cfg b/infra/config/global/luci-milo-dev.cfg index 76e0df3..0ae07464 100644 --- a/infra/config/global/luci-milo-dev.cfg +++ b/infra/config/global/luci-milo-dev.cfg
@@ -116,83 +116,14 @@ links: { name: "Consoles" links: { - text: "android" - url: "/p/chromium/g/chromium.android" - alt: "Chromium Android console" + text: "swarm" + url: "/p/chromium/g/chromium.swarm" + alt: "Chromium Swarm console" } links: { - text: "chromedriver" - url: "/p/chromium/g/chromium.chromedriver" - alt: "Chromium Chromedriver console" - } - links: { - text: "fyi" - url: "/p/chromium/g/chromium.fyi" - alt: "Chromium FYI console" - } - links: { - text: "gpu" - url: "/p/chromium/g/chromium.gpu" - alt: "Chromium GPU console" - } - links: { - text: "perf" - url: "/p/chromium/g/chromium.perf" - alt: "Chromium Perf console" - } - links: { - text: "perf.fyi" - url: "/p/chromium/g/chromium.perf.fyi" - alt: "Chromium Perf FYI console" - } - links: { - text: "webkit" - url: "/p/chromium/g/chromium.webkit" - alt: "Chromium WebKit console" - } - links: { - text: "webrtc" - url: "/p/chromium/g/chromium.webrtc" - alt: "Chromium WebRTC console" - } - links: { - text: "chromiumos" - url: "/p/chromium/g/chromium.chromiumos" - alt: "ChromiumOS console" - } - } - - links: { - name: "Tryservers" - links: { - text: "android" - url: "/p/chromium/g/tryserver.chromium.android/builders" - alt: "Android" - } - links: { - text: "angle" - url: "/p/chromium/g/tryserver.chromium.angle/builders" - alt: "Angle" - } - links: { - text: "linux" - url: "/p/chromium/g/tryserver.chromium.linux/builders" - alt: "Linux" - } - links: { - text: "mac" - url: "/p/chromium/g/tryserver.chromium.mac/builders" - alt: "Mac" - } - links: { - text: "win" - url: "/p/chromium/g/tryserver.chromium.win/builders" - alt: "Win" - } - links: { - text: "blink" - url: "/p/chromium/g/tryserver.blink/builders" - alt: "Blink" + text: "prod" + url: "https://luci-milo.appspot.com/p/chromium/g/main/console" + alt: "Main luci-milo console" } } @@ -205,2541 +136,14 @@ } links: { text: "customize" - url: "https://chromium.googlesource.com/infra/experimental/+/infra/config/luci-milo-dev.cfg" + url: "https://chromium.googlesource.com/chromium/src/+/master/infra/config/global/luci-milo-dev.cfg" alt: "Customize this console" } } - console_groups: { - title: { - text: "Tree Closers" - url: "https://chromium-status.appspot.com/" - } - console_ids: "chromium/chromium" - console_ids: "chromium/chromium.win" - console_ids: "chromium/chromium.mac" - console_ids: "chromium/chromium.linux" - console_ids: "chromium/chromium.chromiumos" - console_ids: "chromium/chromium.chrome" - console_ids: "chromium/chromium.memory" - console_ids: "chromium/chromium.gpu" - console_ids: "chromium/chromium.webkit" - } - console_groups: { - console_ids: "chromium/chromium.android" - console_ids: "chromium/chromium.perf" - console_ids: "chromium/chromium.gpu.fyi" - console_ids: "chromium/chromium.lkgr" - } tree_status_host: "chromium-status.appspot.com" } -consoles: { - id: "main" - name: "Chromium Main Console" - repo_url: "https://chromium.googlesource.com/chromium/src" - refs: "refs/heads/master" - manifest_name: "REVISION" - header_id: "chromium" - - builders: { - name: "buildbot/chromium/Win" - category: "chromium|win" - short_name: "32" - } - builders: { - name: "buildbot/chromium/Win x64" - category: "chromium|win" - short_name: "64" - } - builders: { - name: "buildbot/chromium/Mac" - category: "chromium" - short_name: "mac" - } - builders: { - name: "buildbot/chromium/Linux x64" - category: "chromium" - short_name: "lin" - } - builders: { - name: "buildbot/chromium/Android" - category: "chromium" - short_name: "and" - } - - builders: { - name: "buildbot/chromium.win/Win Builder" - name: "buildbucket/luci.chromium.ci/Win Builder" - category: "chromium.win|release|builder" - short_name: "32" - } - builders: { - name: "buildbot/chromium.win/Win x64 Builder" - category: "chromium.win|release|builder" - short_name: "64" - } - builders: { - name: "buildbot/chromium.win/Win7 (32) Tests" - name: "buildbucket/luci.chromium.ci/Win7 (32) Tests" - category: "chromium.win|release|tester" - short_name: "32" - } - builders: { - name: "buildbot/chromium.win/Win7 Tests (1)" - name: "buildbucket/luci.chromium.ci/Win7 Tests (1)" - category: "chromium.win|release|tester" - short_name: "32" - } - builders: { - name: "buildbot/chromium.win/Win 7 Tests x64 (1)" - category: "chromium.win|release|tester" - short_name: "64" - } - builders: { - name: "buildbot/chromium.win/Win x64 Builder (dbg)" - category: "chromium.win|debug|builder" - short_name: "64" - } - builders: { - name: "buildbot/chromium.win/Win Builder (dbg)" - name: "buildbucket/luci.chromium.ci/Win Builder (dbg)" - category: "chromium.win|debug|builder" - short_name: "32d" - } - builders: { - name: "buildbot/chromium.win/Win7 Tests (dbg)(1)" - name: "buildbucket/luci.chromium.ci/Win7 Tests (dbg)(1)" - category: "chromium.win|debug|tester" - short_name: "7d" - } - builders: { - name: "buildbot/chromium.win/Win10 Tests x64" - category: "chromium.win|debug|tester" - short_name: "w10" - } - - builders: { - name: "buildbot/chromium.mac/Mac Builder" - category: "chromium.mac|release" - short_name: "bld" - } - builders: { - name: "buildbot/chromium.mac/Mac10.13 Tests" - category: "chromium.mac|release|tester" - short_name: "13" - } - builders: { - name: "buildbot/chromium.mac/Mac10.10 Tests" - category: "chromium.mac|release|tester" - short_name: "10" - } - builders: { - name: "buildbot/chromium.mac/Mac10.11 Tests" - category: "chromium.mac|release|tester" - short_name: "11" - } - builders: { - name: "buildbot/chromium.mac/Mac10.12 Tests" - category: "chromium.mac|release|tester" - short_name: "12" - } - builders: { - name: "buildbot/chromium.mac/Mac Builder (dbg)" - category: "chromium.mac|debug" - short_name: "bld" - } - builders: { - name: "buildbot/chromium.mac/Mac10.13 Tests (dbg)" - category: "chromium.mac|debug" - short_name: "13" - } - builders: { - name: "buildbot/chromium.mac/ios-device" - category: "chromium.mac|ios" - short_name: "dev" - } - builders: { - name: "buildbot/chromium.mac/ios-simulator" - category: "chromium.mac|ios" - short_name: "sim" - } - builders: { - name: "buildbot/chromium.mac/ios-simulator-full-configs" - category: "chromium.mac|ios" - short_name: "ful" - } - builders: { - name: "buildbot/chromium.mac/ios-device-xcode-clang" - category: "chromium.mac|ios|xcode" - short_name: "dev" - } - builders: { - name: "buildbot/chromium.mac/ios-simulator-xcode-clang" - category: "chromium.mac|ios|xcode" - short_name: "sim" - } - - builders: { - name: "buildbot/chromium.linux/Linux Builder" - name: "buildbucket/luci.chromium.ci/Linux Builder" - category: "chromium.linux|release" - short_name: "bld" - } - builders: { - name: "buildbot/chromium.linux/Linux Tests" - name: "buildbucket/luci.chromium.ci/Linux Tests" - category: "chromium.linux|release" - short_name: "tst" - } - builders: { - name: "buildbot/chromium.linux/linux-gcc-rel" - category: "chromium.linux|release" - short_name: "gcc" - } - builders: { - name: "buildbucket/luci.chromium.ci/Linux Builder (dbg)(32)" - category: "chromium.linux|debug|builder" - short_name: "32" - } - builders: { - name: "buildbot/chromium.linux/Linux Builder (dbg)" - name: "buildbucket/luci.chromium.ci/Linux Builder (dbg)" - category: "chromium.linux|debug|builder" - short_name: "64" - } - builders: { - name: "buildbucket/luci.chromium.ci/Linux Tests (dbg)(1)(32)" - category: "chromium.linux|debug|tester" - short_name: "32" - } - builders: { - name: "buildbot/chromium.linux/Linux Tests (dbg)(1)" - name: "buildbucket/luci.chromium.ci/Linux Tests (dbg)(1)" - category: "chromium.linux|debug|tester" - short_name: "64" - } - builders: { - name: "buildbucket/luci.chromium.ci/Deterministic Linux" - category: "chromium.linux" - short_name: "det" - } - builders: { - name: "buildbot/chromium.linux/Leak Detection Linux" - category: "chromium.linux" - short_name: "lk" - } - builders: { - name: "buildbot/chromium.linux/Cast Linux" - name: "buildbucket/luci.chromium.ci/Cast Linux" - category: "chromium.linux|cast" - short_name: "vid" - } - builders: { - name: "buildbot/chromium.linux/Cast Audio Linux" - category: "chromium.linux|cast" - short_name: "aud" - } - builders: { - name: "buildbot/chromium.linux/Fuchsia ARM64 Cast Audio" - category: "chromium.linux|fuchsia|Cast" - short_name: "a64" - } - builders: { - name: "buildbot/chromium.linux/Fuchsia x64 Cast Audio" - category: "chromium.linux|fuchsia|Cast" - short_name: "x64" - } - builders: { - name: "buildbot/chromium.linux/Fuchsia ARM64" - category: "chromium.linux|fuchsia" - short_name: "a64" - } - builders: { - name: "buildbot/chromium.linux/Fuchsia x64" - category: "chromium.linux|fuchsia" - short_name: "x64" - } - builders: { - name: "buildbot/chromium.linux/Ozone Linux" - category: "chromium.linux|ozone" - short_name: "bld" - } - - builders: { - name: "buildbot/chromium.chromiumos/Linux ChromiumOS Full" - category: "chromium.chromiumos|default" - short_name: "ful" - } - builders: { - name: "buildbot/chromium.chromiumos/linux-chromeos-rel" - category: "chromium.chromiumos|default" - short_name: "rel" - } - builders: { - name: "buildbot/chromium.chromiumos/linux-chromeos-dbg" - category: "chromium.chromiumos" - short_name: "dbg" - } - builders: { - name: "buildbot/chromium.chromiumos/chromeos-amd64-generic-rel" - category: "chromium.chromiumos|simple|release" - short_name: "x64" - } - builders: { - name: "buildbot/chromium.chromiumos/chromeos-daisy-rel" - category: "chromium.chromiumos|simple|release" - short_name: "dsy" - } - - builders: { - name: "buildbot/chromium.chrome/Google Chrome Win" - category: "chromium.chrome" - short_name: "win" - } - builders: { - name: "buildbot/chromium.chrome/Google Chrome Linux x64" - category: "chromium.chrome" - short_name: "lnx" - } - builders: { - name: "buildbot/chromium.chrome/Google Chrome Mac" - category: "chromium.chrome" - short_name: "mac" - } - builders: { - name: "buildbot/chromium.chrome/Google Chrome ChromeOS" - category: "chromium.chrome" - short_name: "cro" - } - - builders: { - name: "buildbot/chromium.memory/Linux TSan Builder" - category: "chromium.memory|linux|TSan v2" - short_name: "bld" - } - builders: { - name: "buildbot/chromium.memory/Linux TSan Tests" - category: "chromium.memory|linux|TSan v2" - short_name: "tst" - } - builders: { - name: "buildbot/chromium.memory/Linux ASan LSan Builder" - category: "chromium.memory|linux|asan lsan" - short_name: "bld" - } - builders: { - name: "buildbot/chromium.memory/Linux ASan LSan Tests (1)" - category: "chromium.memory|linux|asan lsan" - short_name: "tst" - } - builders: { - name: "buildbot/chromium.memory/Linux ASan Tests (sandboxed)" - category: "chromium.memory|linux|asan lsan" - short_name: "sbx" - } - builders: { - name: "buildbot/chromium.memory/Linux ChromiumOS MSan Builder" - category: "chromium.memory|linux|cros" - short_name: "bld" - } - builders: { - name: "buildbot/chromium.memory/Linux ChromiumOS MSan Tests" - category: "chromium.memory|linux|cros" - short_name: "tst" - } - builders: { - name: "buildbot/chromium.memory/Linux MSan Builder" - category: "chromium.memory|linux|msan" - short_name: "bld" - } - builders: { - name: "buildbot/chromium.memory/Linux MSan Tests" - category: "chromium.memory|linux|msan" - short_name: "tst" - } - builders: { - name: "buildbot/chromium.memory/Linux CFI" - category: "chromium.memory|linux" - short_name: "cfi" - } - builders: { - name: "buildbot/chromium.memory/Mac ASan 64 Builder" - category: "chromium.memory|asan|mac" - short_name: "bld" - } - builders: { - name: "buildbot/chromium.memory/Mac ASan 64 Tests (1)" - category: "chromium.memory|asan|mac" - short_name: "tst" - } - builders: { - name: "buildbot/chromium.memory/Linux Chromium OS ASan LSan Builder" - category: "chromium.memory|asan|cros" - short_name: "bld" - } - builders: { - name: "buildbot/chromium.memory/Linux Chromium OS ASan LSan Tests (1)" - category: "chromium.memory|asan|cros" - short_name: "tst" - } - - builders: { - name: "buildbot/chromium.webkit/WebKit Win Builder" - category: "chromium.webkit|win rel|builder" - short_name: "32" - } - builders: { - name: "buildbot/chromium.webkit/WebKit Win10" - category: "chromium.webkit|win rel|tester" - short_name: "10" - } - builders: { - name: "buildbot/chromium.webkit/WebKit Mac Builder" - category: "chromium.webkit|mac|release" - short_name: "bld" - } - builders: { - name: "buildbot/chromium.webkit/WebKit Mac10.13 (retina)" - category: "chromium.webkit|mac|release" - short_name: "13r" - } - builders: { - name: "buildbot/chromium.webkit/WebKit Linux Trusty ASAN" - category: "chromium.webkit|linux|release" - short_name: "asn" - } - builders: { - name: "buildbot/chromium.webkit/WebKit Linux Trusty MSAN" - category: "chromium.webkit|linux|release" - short_name: "msn" - } - builders: { - name: "buildbot/chromium.webkit/WebKit Linux Trusty Leak" - category: "chromium.webkit|linux|release" - short_name: "lk" - } - builders: { - name: "buildbot/chromium.webkit/Android Builder" - category: "chromium.webkit|android" - short_name: "bld" - } - builders: { - name: "buildbot/chromium.webkit/WebKit Android (Nexus4)" - category: "chromium.webkit|android" - short_name: "n4" - } - -} - -consoles: { - id: "chromium.win" - name: "chromium.win" - repo_url: "https://chromium.googlesource.com/chromium/src" - refs: "refs/heads/master" - manifest_name: "REVISION" - header_id: "chromium" - - builders: { - name: "buildbot/chromium.win/Win Builder" - name: "buildbucket/luci.chromium.ci/Win Builder" - category: "release|builder" - short_name: "32" - } - builders: { - name: "buildbot/chromium.win/Win x64 Builder" - category: "release|builder" - short_name: "64" - } - builders: { - name: "buildbot/chromium.win/Win7 (32) Tests" - name: "buildbucket/luci.chromium.ci/Win7 (32) Tests" - category: "release|tester" - short_name: "32" - } - builders: { - name: "buildbot/chromium.win/Win7 Tests (1)" - name: "buildbucket/luci.chromium.ci/Win7 Tests (1)" - category: "release|tester" - short_name: "32" - } - builders: { - name: "buildbot/chromium.win/Win 7 Tests x64 (1)" - category: "release|tester" - short_name: "64" - } - builders: { - name: "buildbot/chromium.win/Win10 Tests x64" - category: "release|tester" - short_name: "w10" - } - builders: { - name: "buildbot/chromium.win/Win x64 Builder (dbg)" - category: "debug|builder" - short_name: "64" - } - builders: { - name: "buildbot/chromium.win/Win Builder (dbg)" - name: "buildbucket/luci.chromium.ci/Win Builder (dbg)" - category: "debug|builder" - short_name: "32" - } - builders: { - name: "buildbot/chromium.win/Win7 Tests (dbg)(1)" - name: "buildbucket/luci.chromium.ci/Win7 Tests (dbg)(1)" - category: "debug|tester" - short_name: "7" - } -} - -consoles: { - id: "chromium.mac" - name: "chromium.mac" - repo_url: "https://chromium.googlesource.com/chromium/src" - refs: "refs/heads/master" - manifest_name: "REVISION" - header_id: "chromium" - - builders: { - name: "buildbot/chromium.mac/Mac Builder" - category: "release" - short_name: "bld" - } - builders: { - name: "buildbot/chromium.mac/Mac10.13 Tests" - category: "release|tester" - short_name: "13" - } - builders: { - name: "buildbot/chromium.mac/Mac10.10 Tests" - category: "release|tester" - short_name: "10" - } - builders: { - name: "buildbot/chromium.mac/Mac10.11 Tests" - category: "release|tester" - short_name: "11" - } - builders: { - name: "buildbot/chromium.mac/Mac10.12 Tests" - category: "release|tester" - short_name: "12" - } - builders: { - name: "buildbot/chromium.mac/Mac Builder (dbg)" - category: "debug" - short_name: "bld" - } - builders: { - name: "buildbot/chromium.mac/Mac10.13 Tests (dbg)" - category: "debug" - short_name: "13" - } - builders: { - name: "buildbot/chromium.mac/ios-device" - category: "ios" - short_name: "dev" - } - builders: { - name: "buildbot/chromium.mac/ios-simulator" - category: "ios" - short_name: "sim" - } - builders: { - name: "buildbot/chromium.mac/ios-simulator-full-configs" - category: "ios" - short_name: "ful" - } - builders: { - name: "buildbot/chromium.mac/ios-device-xcode-clang" - category: "ios|xcode" - short_name: "dev" - } - builders: { - name: "buildbot/chromium.mac/ios-simulator-xcode-clang" - category: "ios|xcode" - short_name: "sim" - } -} - -consoles: { - id: "chromium.linux" - name: "chromium.linux" - repo_url: "https://chromium.googlesource.com/chromium/src" - refs: "refs/heads/master" - manifest_name: "REVISION" - header_id: "chromium" - - builders: { - name: "buildbot/chromium.linux/Linux Builder" - name: "buildbucket/luci.chromium.ci/Linux Builder" - category: "release" - short_name: "bld" - } - builders: { - name: "buildbot/chromium.linux/linux-gcc-rel" - category: "release" - short_name: "gcc" - } - builders: { - name: "buildbot/chromium.linux/Linux Tests" - name: "buildbucket/luci.chromium.ci/Linux Tests" - category: "release" - short_name: "tst" - } - builders: { - name: "buildbucket/luci.chromium.ci/Linux Builder (dbg)(32)" - category: "debug|builder" - short_name: "32" - } - builders: { - name: "buildbot/chromium.linux/Linux Builder (dbg)" - category: "debug|builder" - short_name: "64" - } - builders: { - name: "buildbucket/luci.chromium.ci/Linux Tests (dbg)(1)(32)" - category: "debug|tester" - short_name: "32" - } - builders: { - name: "buildbot/chromium.linux/Linux Tests (dbg)(1)" - category: "debug|tester" - short_name: "64" - } - builders: { - name: "buildbucket/luci.chromium.ci/Deterministic Linux" - short_name: "det" - } - builders: { - name: "buildbot/chromium.linux/Leak Detection Linux" - short_name: "lk" - } - builders: { - name: "buildbot/chromium.linux/Cast Linux" - category: "cast" - short_name: "lnx" - } - builders: { - name: "buildbot/chromium.linux/Cast Audio Linux" - category: "cast" - short_name: "vid" - } - builders: { - name: "buildbot/chromium.linux/Fuchsia ARM64 Cast Audio" - category: "fuchsia|Cast" - short_name: "a64" - } - builders: { - name: "buildbot/chromium.linux/Fuchsia x64 Cast Audio" - category: "fuchsia|Cast" - short_name: "x64" - } - builders: { - name: "buildbot/chromium.linux/Fuchsia ARM64" - category: "fuchsia" - short_name: "a64" - } - builders: { - name: "buildbot/chromium.linux/Fuchsia x64" - category: "fuchsia" - short_name: "x64" - } - builders: { - name: "buildbot/chromium.linux/Ozone Linux" - category: "ozone" - short_name: "bld" - } -} - -consoles: { - id: "chromium.chromiumos" - name: "chromium.chromiumos" - repo_url: "https://chromium.googlesource.com/chromium/src" - refs: "refs/heads/master" - manifest_name: "REVISION" - header_id: "chromium" - - builders: { - name: "buildbot/chromium.chromiumos/Linux ChromiumOS Full" - category: "default" - short_name: "ful" - } - builders: { - name: "buildbot/chromium.chromiumos/linux-chromeos-rel" - category: "default" - short_name: "rel" - } - builders: { - name: "buildbot/chromium.chromiumos/linux-chromeos-dbg" - category: "debug" - short_name: "dbg" - } - builders: { - name: "buildbot/chromium.chromiumos/chromeos-amd64-generic-rel" - category: "simple" - short_name: "x64" - } - builders: { - name: "buildbot/chromium.chromiumos/chromeos-daisy-rel" - category: "simple" - short_name: "dsy" - } -} - -consoles: { - id: "chromium.chrome" - name: "chromium.chrome" - repo_url: "https://chromium.googlesource.com/chromium/src" - refs: "refs/heads/master" - manifest_name: "REVISION" - header_id: "chromium" - - builders: { - name: "buildbot/chromium.chrome/Google Chrome Win" - short_name: "win" - } - builders: { - name: "buildbot/chromium.chrome/Google Chrome Linux x64" - short_name: "lnx" - } - builders: { - name: "buildbot/chromium.chrome/Google Chrome Mac" - short_name: "mac" - } - builders: { - name: "buildbot/chromium.chrome/Google Chrome ChromeOS" - short_name: "cro" - } -} - -consoles: { - id: "chromium.memory" - name: "chromium.memory" - repo_url: "https://chromium.googlesource.com/chromium/src" - refs: "refs/heads/master" - manifest_name: "REVISION" - header_id: "chromium" - - builders: { - name: "buildbot/chromium.memory/Linux TSan Builder" - category: "linux|TSan v2" - short_name: "bld" - } - builders: { - name: "buildbot/chromium.memory/Linux TSan Tests" - category: "linux|TSan v2" - short_name: "tst" - } - builders: { - name: "buildbot/chromium.memory/Linux ASan LSan Builder" - category: "linux|asan lsan" - short_name: "bld" - } - builders: { - name: "buildbot/chromium.memory/Linux ASan LSan Tests (1)" - category: "linux|asan lsan" - short_name: "tst" - } - builders: { - name: "buildbot/chromium.memory/Linux ASan Tests (sandboxed)" - category: "linux|asan lsan" - short_name: "sbx" - } - builders: { - name: "buildbot/chromium.memory/Linux ChromiumOS MSan Builder" - category: "linux|msan|cros" - short_name: "bld" - } - builders: { - name: "buildbot/chromium.memory/Linux ChromiumOS MSan Tests" - category: "linux|msan|cros" - short_name: "tst" - } - builders: { - name: "buildbot/chromium.memory/Linux MSan Builder" - category: "linux|msan" - short_name: "bld" - } - builders: { - name: "buildbot/chromium.memory/Linux MSan Tests" - category: "linux|msan" - short_name: "tst" - } - builders: { - name: "buildbot/chromium.memory/Linux CFI" - category: "linux" - short_name: "cfi" - } - builders: { - name: "buildbot/chromium.memory/Mac ASan 64 Builder" - category: "asan|mac" - short_name: "bld" - } - builders: { - name: "buildbot/chromium.memory/Mac ASan 64 Tests (1)" - category: "asan|mac" - short_name: "tst" - } - builders: { - name: "buildbot/chromium.memory/Linux Chromium OS ASan LSan Builder" - category: "asan|cros" - short_name: "bld" - } - builders: { - name: "buildbot/chromium.memory/Linux Chromium OS ASan LSan Tests (1)" - category: "asan|cros" - short_name: "tst" - } -} - -consoles: { - id: "chromium.webkit" - name: "chromium.webkit" - repo_url: "https://chromium.googlesource.com/chromium/src" - refs: "refs/heads/master" - manifest_name: "REVISION" - header_id: "chromium" - - builders: { - name: "buildbot/chromium.webkit/WebKit Win Builder" - category: "win|release|builder" - short_name: "32" - } - builders: { - name: "buildbot/chromium.webkit/WebKit Win10" - category: "win|release|tester" - short_name: "10" - } - builders: { - name: "buildbot/chromium.webkit/WebKit Mac Builder" - category: "mac|release" - short_name: "bld" - } - builders: { - name: "buildbot/chromium.webkit/WebKit Mac10.13 (retina)" - category: "mac|release" - short_name: "13r" - } - builders: { - name: "buildbot/chromium.webkit/WebKit Linux Trusty ASAN" - category: "linux|release" - short_name: "asn" - } - builders: { - name: "buildbot/chromium.webkit/WebKit Linux Trusty MSAN" - category: "linux|release" - short_name: "msn" - } - builders: { - name: "buildbot/chromium.webkit/WebKit Linux Trusty Leak" - category: "linux|release" - short_name: "lk" - } - builders: { - name: "buildbot/chromium.webkit/Android Builder" - category: "android" - short_name: "bld" - } - builders: { - name: "buildbot/chromium.webkit/WebKit Android (Nexus4)" - category: "android" - short_name: "n4" - } -} - - -consoles: { - id: "chromium.perf" - name: "chromium.perf" - repo_url: "https://chromium.googlesource.com/chromium/src" - refs: "refs/heads/master" - manifest_name: "REVISION" - header_id: "chromium" - - builders: { - name: "buildbot/chromium.perf/Android Builder Perf" - category: "builder|android" - short_name: "arm" - } - builders: { - name: "buildbot/chromium.perf/Android arm64 Builder Perf" - category: "builder|android" - short_name: "a64" - } - builders: { - name: "buildbot/chromium.perf/Android Compile Perf" - category: "builder|android|compile" - short_name: "arm" - } - builders: { - name: "buildbot/chromium.perf/Android arm64 Compile Perf" - category: "builder|android|compile" - short_name: "a64" - } - builders: { - name: "buildbot/chromium.perf/Win Builder Perf" - category: "builder|win" - short_name: "32" - } - builders: { - name: "buildbot/chromium.perf/Win x64 Builder Perf" - category: "builder|win" - short_name: "64" - } - builders: { - name: "buildbot/chromium.perf/Mac Builder Perf" - category: "builder" - short_name: "mac" - } - builders: { - name: "buildbot/chromium.perf/Linux Builder Perf" - category: "builder" - short_name: "lnx" - } - builders: { - name: "buildbot/chromium.perf/Android Nexus5 Perf" - category: "perf|android" - short_name: "N5" - } - builders: { - name: "buildbot/chromium.perf/android-nexus5x-perf" - category: "perf|android" - short_name: "N5X" - } - builders { - name: "buildbot/chromium.perf/android-go-perf" - name: "buildbucket/luci.chromium.ci/android-go-perf" - category: "perf|android" - short_name: "go" - } - builders: { - name: "buildbot/chromium.perf/Android Nexus5X WebView Perf" - category: "perf|android|webview" - short_name: "N5X" - } - builders: { - name: "buildbot/chromium.perf/Android Nexus6 WebView Perf" - category: "perf|android|webview" - short_name: "N6" - } - builders: { - name: "buildbot/chromium.perf/win-10-perf" - category: "perf|win|10" - short_name: "desktop" - } - builders: { - name: "buildbot/chromium.perf/Win 7 Perf" - category: "perf|win|7" - short_name: "32" - } - builders: { - name: "buildbot/chromium.perf/Win 7 Nvidia GPU Perf" - category: "perf|win|7" - short_name: "nvi" - } - builders: { - name: "buildbot/chromium.perf/mac-10_12_laptop_low_end-perf" - category: "perf|mac" - short_name: "low" - } - builders: { - name: "buildbot/chromium.perf/mac-10_13_laptop_high_end-perf" - category: "perf|mac" - short_name: "high" - } - builders: { - name: "buildbot/chromium.perf/linux-perf" - category: "perf" - short_name: "lnx" - } -} - -consoles: { - id: "chromium.lkgr" - name: "chromium.lkgr" - repo_url: "https://chromium.googlesource.com/chromium/src" - refs: "refs/heads/master" - manifest_name: "REVISION" - header_id: "chromium" - - builders: { - name: "buildbot/chromium.lkgr/Win ASan Release" - category: "win asan" - short_name: "rel" - } - builders: { - name: "buildbot/chromium.lkgr/Win ASan Release Media" - category: "win asan" - short_name: "med" - } - builders: { - name: "buildbot/chromium.lkgr/Mac ASAN Debug" - category: "mac asan" - short_name: "dbg" - } - builders: { - name: "buildbot/chromium.lkgr/Mac ASAN Release" - category: "mac asan" - short_name: "rel" - } - builders: { - name: "buildbot/chromium.lkgr/Mac ASAN Release Media" - category: "mac asan" - short_name: "med" - } - builders: { - name: "buildbot/chromium.lkgr/ChromiumOS ASAN Release" - short_name: "cro" - } - builders: { - name: "buildbot/chromium.lkgr/ASAN Debug" - category: "linux asan" - short_name: "dbg" - } - builders: { - name: "buildbot/chromium.lkgr/ASAN Release" - category: "linux asan" - short_name: "rel" - } - builders: { - name: "buildbot/chromium.lkgr/ASAN Release Media" - category: "linux asan" - short_name: "med" - } - builders: { - name: "buildbot/chromium.lkgr/ASan Debug (32-bit x86 with V8-ARM)" - category: "linux asan|x64 v8-ARM" - short_name: "dbg" - } - builders: { - name: "buildbot/chromium.lkgr/ASan Release (32-bit x86 with V8-ARM)" - category: "linux asan|x64 v8-ARM" - short_name: "rel" - } - builders: { - name: "buildbot/chromium.lkgr/ASan Release Media (32-bit x86 with V8-ARM)" - category: "linux asan|x64 v8-ARM" - short_name: "med" - } - builders: { - name: "buildbot/chromium.lkgr/MSAN Release (chained origins)" - category: "linux msan" - short_name: "org" - } - builders: { - name: "buildbot/chromium.lkgr/MSAN Release (no origins)" - category: "linux msan" - short_name: "rel" - } - builders: { - name: "buildbot/chromium.lkgr/TSAN Debug" - category: "linux tsan" - short_name: "dbg" - } - builders: { - name: "buildbot/chromium.lkgr/TSAN Release" - category: "linux tsan" - short_name: "rel" - } - builders: { - name: "buildbot/chromium.lkgr/UBSan Release" - category: "linux UBSan" - short_name: "rel" - } - builders: { - name: "buildbot/chromium.lkgr/UBSan vptr Release" - category: "linux UBSan" - short_name: "vpt" - } -} - -consoles: { - id: "migration-side-by-side" - name: "LUCI CI Migration Comparison Console" - repo_url: "https://chromium.googlesource.com/chromium/src" - refs: "refs/heads/master" - manifest_name: "REVISION" - header_id: "chromium" - include_experimental_builds: true - - builders: { - name: "buildbucket/luci.chromium.ci/Win Builder" - category: "win|release|builder|32" - short_name: "ᕕ(ᐛ)ᕗ" - } - builders: { - name: "buildbot/chromium.win/Win Builder" - category: "win|release|builder|32" - short_name: "(ಥ_ಥ)" - } - - builders: { - name: "buildbucket/luci.chromium.ci/Win7 (32) Tests" - category: "win|release|tester|7" - short_name: "ᕕ(ᐛ)ᕗ" - } - builders: { - name: "buildbot/chromium.win/Win7 (32) Tests" - category: "win|release|tester|7" - short_name: "(ಥ_ಥ)" - } - - builders: { - name: "buildbucket/luci.chromium.ci/Win7 Tests (1)" - category: "win|release|tester|7" - short_name: "ᕕ(ᐛ)ᕗ" - } - builders: { - name: "buildbot/chromium.win/Win7 Tests (1)" - category: "win|release|tester|7" - short_name: "(ಥ_ಥ)" - } -} - -# Everything below was generated from buildermap.json. -consoles: { - id: "chromium" - name: "chromium" - repo_url: "https://chromium.googlesource.com/chromium/src" - refs: "refs/heads/master" - manifest_name: "REVISION" - header_id: "chromium" - - builders: { - name: "buildbot/chromium/Android" - short_name: "an" - } - builders: { - name: "buildbot/chromium/Linux x64" - short_name: "lnx" - } - builders: { - name: "buildbot/chromium/Mac" - short_name: "mac" - } - builders: { - name: "buildbot/chromium/Win" - category: "win" - short_name: "32" - } - builders: { - name: "buildbot/chromium/Win x64" - category: "win" - short_name: "64" - } -} - -consoles: { - id: "chromium.android" - name: "chromium.android" - repo_url: "https://chromium.googlesource.com/chromium/src" - refs: "refs/heads/master" - manifest_name: "REVISION" - header_id: "chromium" - - builders: { - name: "buildbot/chromium.android/Android Cronet ARM64 Builder" - category: "cronet" - short_name: "rel" - } - builders: { - name: "buildbot/chromium.android/Android Cronet ARM64 Builder (dbg)" - category: "cronet" - short_name: "dbg" - } - builders: { - name: "buildbot/chromium.android/Android Cronet Builder" - category: "cronet" - short_name: "rel" - } - builders: { - name: "buildbot/chromium.android/Android Cronet Builder (dbg)" - category: "cronet" - short_name: "dbg" - } - builders: { - name: "buildbot/chromium.android/Android Cronet Builder Asan" - category: "cronet" - short_name: "asn" - } - builders: { - name: "buildbot/chromium.android/Android Cronet KitKat Builder" - category: "cronet" - short_name: "kit" - } - builders: { - name: "buildbot/chromium.android/Android Cronet Lollipop Builder" - category: "cronet" - short_name: "lol" - } - builders: { - name: "buildbot/chromium.android/Android Cronet Marshmallow 64bit Builder" - category: "cronet" - short_name: "mar" - } - builders: { - name: "buildbot/chromium.android/Android Cronet x86 Builder" - category: "cronet" - short_name: "rel" - } - builders: { - name: "buildbot/chromium.android/Android Cronet x86 Builder (dbg)" - category: "cronet" - short_name: "dbg" - } - builders: { - name: "buildbot/chromium.android/Android Cronet Marshmallow 64bit Perf" - category: "cronet" - short_name: "prf" - } - builders: { - name: "buildbot/chromium.android/Android arm Builder (dbg)" - category: "builder|arm" - short_name: "32" - } - builders: { - name: "buildbot/chromium.android/Android arm64 Builder (dbg)" - category: "builder|arm" - short_name: "64" - } - builders: { - name: "buildbot/chromium.android/Android x86 Builder (dbg)" - category: "builder|x86" - short_name: "32" - } - builders: { - name: "buildbot/chromium.android/Android x64 Builder (dbg)" - category: "builder|x86" - short_name: "64" - } - builders: { - name: "buildbot/chromium.android/KitKat Phone Tester (dbg)" - category: "tester|phone" - short_name: "K" - } - builders: { - name: "buildbot/chromium.android/Lollipop Phone Tester" - category: "tester|phone" - short_name: "L" - } - builders: { - name: "buildbot/chromium.android/Marshmallow 64 bit Tester" - category: "tester|phone" - short_name: "M" - } - builders: { - name: "buildbot/chromium.android/Nougat Phone Tester" - category: "tester|phone" - short_name: "N" - } - builders: { - name: "buildbot/chromium.android/KitKat Tablet Tester" - category: "tester|tablet" - short_name: "K" - } - builders: { - name: "buildbot/chromium.android/Lollipop Tablet Tester" - category: "tester|tablet" - short_name: "L" - } - builders: { - name: "buildbot/chromium.android/Marshmallow Tablet Tester" - category: "tester|tablet" - short_name: "M" - } - builders: { - name: "buildbot/chromium.android/Android WebView L (dbg)" - category: "webview" - short_name: "L" - } - builders: { - name: "buildbot/chromium.android/Android WebView M (dbg)" - category: "webview" - short_name: "M" - } - builders: { - name: "buildbot/chromium.android/Android WebView N (dbg)" - category: "webview" - short_name: "N" - } - builders: { - name: "buildbot/chromium.android/KitKat Phone Tester (rel)" - category: "on_cq" - short_name: "K" - } - builders: { - name: "buildbot/chromium.android/Marshmallow Phone Tester (rel)" - category: "on_cq" - short_name: "M" - } - builders: { - name: "buildbot/chromium.android/Cast Android (dbg)" - category: "on_cq" - short_name: "cst" - } - builders: { - name: "buildbot/chromium.android/Android ASAN (dbg)" - category: "on_cq" - short_name: "san" - } -} - -consoles: { - id: "chromium.android.fyi" - name: "chromium.android.fyi" - repo_url: "https://chromium.googlesource.com/chromium/src" - refs: "refs/heads/master" - manifest_name: "REVISION" - header_id: "chromium" - - builders: { - name: "buildbot/chromium.android.fyi/Android Tests (trial)(dbg)" - category: "Testers" - short_name: "tri" - } - builders: { - name: "buildbot/chromium.android.fyi/Android Tests with Tracing" - category: "Testers" - short_name: "trc" - } - builders: { - name: "buildbot/chromium.android.fyi/Jelly Bean Tester" - category: "Testers" - short_name: "JB" - } - builders: { - name: "buildbot/chromium.android.fyi/Lollipop Consumer Tester" - category: "Testers" - short_name: "con" - } - builders: { - name: "buildbot/chromium.android.fyi/Lollipop Low-end Tester" - category: "Testers" - short_name: "low" - } - builders: { - name: "buildbot/chromium.android.fyi/Nougat Phone Tester" - category: "Testers" - short_name: "N" - } - builders: { - name: "buildbot/chromium.android.fyi/Oreo Phone Tester" - category: "Testers" - short_name: "O" - } - builders: { - name: "buildbot/chromium.android.fyi/x64 Device Tester" - category: "Testers" - short_name: "x64" - } - builders: { - name: "buildbot/chromium.android.fyi/x86 Cloud Tester" - category: "Testers" - short_name: "cld" - } - builders: { - name: "buildbot/chromium.android.fyi/x86 Emulator Tester" - category: "Testers" - short_name: "emu" - } - builders: { - name: "buildbot/chromium.android.fyi/NDK Next arm Builder" - category: "NDK Builders" - short_name: "a32" - } - builders: { - name: "buildbot/chromium.android.fyi/NDK Next arm64 Builder" - category: "NDK Builders" - short_name: "a64" - } - builders: { - name: "buildbot/chromium.android.fyi/NDK Next x64 Builder" - category: "NDK Builders" - short_name: "x64" - } - builders: { - name: "buildbot/chromium.android.fyi/NDK Next x86 Builder" - category: "NDK Builders" - short_name: "x86" - } - builders: { - name: "buildbot/chromium.android.fyi/Memory Infra Tester" - category: "Memory" - } - - builders: { - name: "buildbot/chromium.android.fyi/Android Cronet Builder (dbg)" - category: "Cronet" - short_name: "dbg" - } - builders: { - name: "buildbot/chromium.android.fyi/Android Cronet KitKat Builder" - category: "Cronet" - short_name: "K" - } -} - -consoles: { - id: "chromium.chromedriver" - name: "chromium.chromedriver" - repo_url: "https://chromium.googlesource.com/chromium/src" - refs: "refs/heads/master" - manifest_name: "REVISION" - header_id: "chromium" - - builders: { - name: "buildbot/chromium.chromedriver/Linux" - } - builders: { - name: "buildbot/chromium.chromedriver/Linux32" - } - builders: { - name: "buildbot/chromium.chromedriver/Mac 10.6" - } - builders: { - name: "buildbot/chromium.chromedriver/Win7" - } -} - -consoles: { - id: "chromium.clang" - name: "chromium.clang" - repo_url: "https://chromium.googlesource.com/chromium/src" - refs: "refs/heads/master" - manifest_name: "REVISION" - header_id: "chromium" - - builders: { - name: "buildbot/chromium.clang/ToTLinux" - category: "ToT Linux" - short_name: "rel" - } - builders: { - name: "buildbot/chromium.clang/ToTLinux (dbg)" - category: "ToT Linux" - short_name: "dbg" - } - builders: { - name: "buildbot/chromium.clang/ToTLinuxASan" - category: "ToT Linux" - short_name: "asn" - } - builders: { - name: "buildbot/chromium.clang/ToTLinuxASanLibfuzzer" - category: "ToT Linux" - short_name: "fuz" - } - builders: { - name: "buildbot/chromium.clang/ToTLinuxMSan" - category: "ToT Linux" - short_name: "msn" - } - builders: { - name: "buildbot/chromium.clang/ToTLinuxThinLTO" - category: "ToT Linux" - short_name: "lto" - } - builders: { - name: "buildbot/chromium.clang/ToTLinuxUBSanVptr" - category: "ToT Linux" - short_name: "usn" - } - builders: { - name: "buildbot/chromium.clang/ToTAndroid" - category: "ToT Android" - short_name: "rel" - } - builders: { - name: "buildbot/chromium.clang/ToTAndroid (dbg)" - category: "ToT Android" - short_name: "dbg" - } - builders: { - name: "buildbot/chromium.clang/ToTAndroid x64" - category: "ToT Android" - short_name: "x64" - } - builders: { - name: "buildbot/chromium.clang/ToTAndroid64" - category: "ToT Android" - short_name: "a64" - } - builders: { - name: "buildbot/chromium.clang/ToTAndroidASan" - category: "ToT Android" - short_name: "asn" - } - builders: { - name: "buildbot/chromium.clang/ToTAndroidCFI" - category: "ToT Android" - short_name: "cfi" - } - builders: { - name: "buildbot/chromium.clang/ToTMac" - category: "ToT Mac" - short_name: "rel" - } - builders: { - name: "buildbot/chromium.clang/ToTMac (dbg)" - category: "ToT Mac" - short_name: "dbg" - } - builders: { - name: "buildbot/chromium.clang/ToTMacASan" - category: "ToT Mac" - short_name: "asn" - } - builders: { - name: "buildbot/chromium.clang/ToTWin" - category: "ToT Windows" - short_name: "rel" - } - builders: { - name: "buildbot/chromium.clang/ToTWin(dbg)" - category: "ToT Windows" - short_name: "dbg" - } - builders: { - name: "buildbot/chromium.clang/ToTWin(dll)" - category: "ToT Windows" - short_name: "dll" - } - builders: { - name: "buildbot/chromium.clang/ToTWin64" - category: "ToT Windows|x64" - short_name: "rel" - } - builders: { - name: "buildbot/chromium.clang/ToTWin64(dbg)" - category: "ToT Windows|x64" - short_name: "dbg" - } - builders: { - name: "buildbot/chromium.clang/ToTWin64(dll)" - category: "ToT Windows|x64" - short_name: "dll" - } - builders: { - name: "buildbot/chromium.clang/ToTWinThinLTO64" - category: "ToT Windows|x64" - short_name: "lto" - } - builders: { - name: "buildbot/chromium.clang/CrWinAsan" - category: "ToT Windows|Asan" - short_name: "asn" - } - builders: { - name: "buildbot/chromium.clang/CrWinAsan(dll)" - category: "ToT Windows|Asan" - short_name: "dll" - } - builders: { - name: "buildbot/chromium.clang/CrWinAsanCov" - category: "ToT Windows|Asan" - short_name: "cov" - } - builders: { - name: "buildbot/chromium.clang/linux-win_cross-rel" - category: "ToT Windows" - short_name: "lxw" - } - builders: { - name: "buildbot/chromium.clang/CFI Linux (icall)" - category: "CFI|Linux" - short_name: "icl" - } - builders: { - name: "buildbot/chromium.clang/CFI Linux CF" - category: "CFI|Linux" - short_name: "CF" - } - builders: { - name: "buildbot/chromium.clang/CFI Linux ToT" - category: "CFI|Linux" - short_name: "ToT" - } - builders: { - name: "buildbot/chromium.clang/ToTWinCFI" - category: "CFI|Win" - short_name: "x86" - } - builders: { - name: "buildbot/chromium.clang/ToTWinCFI64" - category: "CFI|Win" - short_name: "x64" - } - builders: { - name: "buildbot/chromium.clang/ToTiOS" - short_name: "iOS" - } - builders: { - name: "buildbot/chromium.clang/UBSanVptr Linux" - short_name: "usn" - } -} - -consoles: { - id: "chromium.fyi.goma" - name: "chromium.fyi.goma" - repo_url: "https://chromium.googlesource.com/chromium/src" - refs: "refs/heads/master" - manifest_name: "REVISION" - header_id: "chromium" - - builders: { - name: "buildbot/chromium.fyi/Win Builder Goma Canary" - } - builders: { - name: "buildbot/chromium.fyi/Win Builder (dbg) Goma Canary" - } - builders: { - name: "buildbot/chromium.fyi/Win Goma Canary LocalOutputCache" - } - builders: { - name: "buildbot/chromium.fyi/Win cl.exe Goma Canary LocalOutputCache" - } - builders: { - name: "buildbot/chromium.fyi/Win7 Builder Goma Canary" - } - builders: { - name: "buildbot/chromium.fyi/Win7 Builder (dbg) Goma Canary" - } - builders: { - name: "buildbot/chromium.fyi/WinMSVC64 Goma Canary" - } - builders: { - name: "buildbot/chromium.fyi/Mac Builder Goma Canary" - } - builders: { - name: "buildbot/chromium.fyi/Mac Builder (dbg) Goma Canary" - } - builders: { - name: "buildbot/chromium.fyi/Mac Goma Canary (clobber)" - } - builders: { - name: "buildbot/chromium.fyi/Mac Builder (dbg) Goma Canary (clobber)" - } - builders: { - name: "buildbot/chromium.fyi/Mac Goma Canary LocalOutputCache" - } - builders: { - name: "buildbot/chromium.fyi/chromeos-amd64-generic-rel-goma-canary" - } - builders: { - name: "buildbot/chromium.fyi/Linux Builder Goma Canary" - } - builders: { - name: "buildbot/chromium.fyi/Linux x64 Goma Canary (clobber)" - } - builders: { - name: "buildbot/chromium.fyi/Linux x64 Goma Canary LocalOutputCache" - } - builders: { - name: "buildbot/chromium.fyi/Android Builder (dbg) Goma Canary" - } - builders: { - name: "buildbot/chromium.fyi/ios-device-goma-canary-clobber" - } -} - -consoles: { - id: "chromium.fyi" - name: "chromium.fyi" - repo_url: "https://chromium.googlesource.com/chromium/src" - refs: "refs/heads/master" - manifest_name: "REVISION" - header_id: "chromium" - - builders: { - name: "buildbot/chromium.fyi/Android Builder (dbg)" - category: "android_builder" - } - builders: { - name: "buildbot/chromium.fyi/Android Remoting Tests" - category: "android_tests" - } - builders: { - name: "buildbot/chromium.fyi/Android Find Annotated Test" - category: "android_tests" - } - builders: { - name: "buildbot/chromium.fyi/Android VR Tests" - category: "android_tests" - } - builders: { - name: "buildbot/chromium.fyi/Android ChromeDriver Tests (dbg)" - category: "android_tests" - } - builders: { - name: "buildbot/chromium.fyi/Afl Upload Linux ASan" - category: "chromium_afl" - } - builders: { - name: "buildbot/chromium.fyi/Libfuzzer Upload Linux ASan" - category: "chromium_libfuzzer" - } - builders: { - name: "buildbot/chromium.fyi/Libfuzzer Upload Linux ASan Debug" - category: "chromium_libfuzzer" - } - builders: { - name: "buildbot/chromium.fyi/Libfuzzer Upload Linux MSan" - category: "chromium_libfuzzer" - } - builders: { - name: "buildbot/chromium.fyi/Libfuzzer Upload Linux UBSan" - category: "chromium_libfuzzer" - } - builders: { - name: "buildbot/chromium.fyi/Libfuzzer Upload Mac ASan" - category: "chromium_libfuzzer" - } - builders: { - name: "buildbot/chromium.fyi/Linux Clang Analyzer" - category: "clang tot" - } - builders: { - name: "buildbot/chromium.fyi/Closure Compilation Linux" - category: "closure_compilation" - } - builders: { - name: "buildbot/chromium.fyi/ios-simulator-cronet" - category: "cronet" - } - builders: { - name: "buildbot/chromium.fyi/mac-views-rel" - category: "default" - } - builders: { - name: "buildbot/chromium.fyi/Chromium Mac 10.13" - category: "default" - } - builders: { - name: "buildbot/chromium.fyi/Chromium Windows Analyze" - category: "default" - } - builders: { - name: "buildbot/chromium.fyi/Mac deterministic" - category: "deterministic" - } - builders: { - name: "buildbot/chromium.fyi/Windows deterministic" - category: "deterministic" - } - builders: { - name: "buildbot/chromium.fyi/Windows Clang deterministic" - category: "deterministic" - } - builders: { - name: "buildbot/chromium.fyi/Mac deterministic (dbg)" - category: "deterministic" - } - builders: { - name: "buildbot/chromium.fyi/Fuchsia" - category: "fuchsia" - } - builders: { - name: "buildbot/chromium.fyi/Fuchsia (dbg)" - category: "fuchsia" - } - builders: { - name: "buildbot/chromium.fyi/Fuchsia ARM64" - category: "fuchsia" - } - builders: { - name: "buildbot/chromium.fyi/Android Builder (dbg) Goma Canary" - category: "goma" - } - builders: { - name: "buildbot/chromium.fyi/Linux Builder Goma Canary" - category: "goma" - } - builders: { - name: "buildbot/chromium.fyi/Linux x64 Goma Canary (clobber)" - category: "goma" - } - builders: { - name: "buildbot/chromium.fyi/Linux x64 Goma Canary LocalOutputCache" - category: "goma" - } - builders: { - name: "buildbot/chromium.fyi/Mac Builder (dbg) Goma Canary" - category: "goma" - } - builders: { - name: "buildbot/chromium.fyi/Mac Builder (dbg) Goma Canary (clobber)" - category: "goma" - } - builders: { - name: "buildbot/chromium.fyi/Mac Builder Goma Canary" - category: "goma" - } - builders: { - name: "buildbot/chromium.fyi/Mac Goma Canary (clobber)" - category: "goma" - } - builders: { - name: "buildbot/chromium.fyi/Mac Goma Canary LocalOutputCache" - category: "goma" - } - builders: { - name: "buildbot/chromium.fyi/Win Builder (dbg) Goma Canary" - category: "goma" - } - builders: { - name: "buildbot/chromium.fyi/Win Builder Goma Canary" - category: "goma" - } - builders: { - name: "buildbot/chromium.fyi/Win Goma Canary LocalOutputCache" - category: "goma" - } - builders: { - name: "buildbot/chromium.fyi/Win cl.exe Goma Canary LocalOutputCache" - category: "goma" - } - builders: { - name: "buildbot/chromium.fyi/Win7 Builder (dbg) Goma Canary" - category: "goma" - } - builders: { - name: "buildbot/chromium.fyi/Win7 Builder Goma Canary" - category: "goma" - } - builders: { - name: "buildbot/chromium.fyi/WinMSVC64 Goma Canary" - category: "goma" - } - builders: { - name: "buildbot/chromium.fyi/chromeos-amd64-generic-rel-goma-canary" - category: "goma" - } - builders: { - name: "buildbot/chromium.fyi/ios-device-goma-canary-clobber" - category: "goma" - } - builders: { - name: "buildbot/chromium.fyi/ios-simulator" - category: "iOS" - } - builders: { - name: "buildbot/chromium.fyi/Jumbo Linux x64" - category: "jumbo" - } - builders: { - name: "buildbot/chromium.fyi/Jumbo Mac" - category: "jumbo" - } - builders: { - name: "buildbot/chromium.fyi/Jumbo Win x64" - category: "jumbo" - } - builders: { - name: "buildbucket/luci.chromium.ci/linux-blink-heap-incremental-marking" - category: "linux|blink" - short_name: "IM" - } - builders: { - name: "buildbot/chromium.fyi/Linux ARM" - category: "linux" - } - builders: { - name: "buildbot/chromium.fyi/Headless Linux (dbg)" - category: "linux" - } - builders: { - name: "buildbot/chromium.fyi/VR Linux" - category: "linux" - } - builders: { - name: "buildbot/chromium.fyi/Mojo Android" - category: "mojo" - } - builders: { - name: "buildbot/chromium.fyi/Mojo ChromiumOS" - category: "mojo" - } - builders: { - name: "buildbot/chromium.fyi/Mojo Linux" - category: "mojo" - } - builders: { - name: "buildbot/chromium.fyi/Mojo Windows" - category: "mojo" - } - builders: { - name: "buildbot/chromium.fyi/Linux remote_run Builder" - category: "remote_run" - } - builders: { - name: "buildbot/chromium.fyi/Linux remote_run Tester" - category: "remote_run" - } - builders: { - name: "buildbot/chromium.fyi/Site Isolation Android" - category: "site_isolation" - } - builders: { - name: "buildbot/chromium.fyi/Linux Viz" - category: "viz" - } - builders: { - name: "buildbot/chromium.fyi/ios-webview" - category: "web_view" - } - builders: { - name: "buildbot/chromium.fyi/Win 10 Fast Ring" - category: "win10" - } -} - -consoles: { - id: "chromium.gatekeeper" - name: "chromium.gatekeeper" - repo_url: "https://chromium.googlesource.com/chromium/src" - refs: "refs/heads/master" - manifest_name: "REVISION" - header_id: "chromium" - - builders: { - name: "buildbot/chromium.gatekeeper/Chromium Gatekeeper" - } - builders: { - name: "buildbot/chromium.gatekeeper/Chromium Gatekeeper Failure" - } -} - -consoles: { - id: "chromium.goma" - name: "chromium.goma" - repo_url: "https://chromium.googlesource.com/chromium/src" - refs: "refs/heads/master" - manifest_name: "REVISION" - header_id: "chromium" - - builders: { - name: "buildbot/chromium.goma/Chromium Linux Goma Staging" - category: "builders" - } - builders: { - name: "buildbot/chromium.goma/Chromium Mac Goma Staging" - category: "builders" - } - builders: { - name: "buildbot/chromium.goma/CrWinGomaStaging" - category: "builders" - } - builders: { - name: "buildbot/chromium.goma/Chromium Linux Goma GCE Staging" - category: "gce" - } - builders: { - name: "buildbot/chromium.goma/Chromium Mac Goma GCE Staging" - category: "gce" - } - builders: { - name: "buildbot/chromium.goma/CrWinClangGomaGCEStaging" - category: "gce" - } - builders: { - name: "buildbot/chromium.goma/Chromium Linux Goma RBE Staging (clobber)" - category: "rbe" - } - builders: { - name: "buildbot/chromium.goma/Chromium Linux Goma RBE Staging" - category: "rbe" - } - builders: { - name: "buildbot/chromium.goma/Chromium Linux Goma RBE Staging (dbg) (clobber)" - category: "rbe" - } - builders: { - name: "buildbot/chromium.goma/Chromium Linux Goma RBE Staging (dbg)" - category: "rbe" - } -} - -consoles: { - id: "chromium.gpu" - name: "chromium.gpu" - repo_url: "https://chromium.googlesource.com/chromium/src" - refs: "refs/heads/master" - manifest_name: "REVISION" - header_id: "chromium" - - builders: { - name: "buildbot/chromium.gpu/GPU Win Builder" - category: "Windows" - } - builders: { - name: "buildbot/chromium.gpu/GPU Win Builder (dbg)" - category: "Windows" - } - builders: { - name: "buildbot/chromium.gpu/Win10 Debug (NVIDIA)" - category: "Windows" - } - builders: { - name: "buildbot/chromium.gpu/Win10 Release (NVIDIA)" - category: "Windows" - } - builders: { - name: "buildbot/chromium.gpu/GPU Mac Builder" - category: "Mac" - } - builders: { - name: "buildbot/chromium.gpu/GPU Mac Builder (dbg)" - category: "Mac" - } - builders: { - name: "buildbot/chromium.gpu/Mac Debug (Intel)" - category: "Mac" - } - builders: { - name: "buildbot/chromium.gpu/Mac Release (Intel)" - category: "Mac" - } - builders: { - name: "buildbot/chromium.gpu/Mac Retina Debug (AMD)" - category: "Mac" - } - builders: { - name: "buildbot/chromium.gpu/Mac Retina Release (AMD)" - category: "Mac" - } - builders: { - name: "buildbot/chromium.gpu/GPU Linux Builder" - name: "buildbucket/luci.chromium.ci/GPU Linux Builder" - category: "Linux" - } - builders: { - name: "buildbot/chromium.gpu/GPU Linux Builder (dbg)" - category: "Linux" - } - builders: { - name: "buildbot/chromium.gpu/Linux Debug (NVIDIA)" - category: "Linux" - } - builders: { - name: "buildbot/chromium.gpu/Linux Release (NVIDIA)" - name: "buildbucket/luci.chromium.ci/Linux Release (NVIDIA)" - category: "Linux" - } - builders: { - name: "buildbot/chromium.gpu/Android Release (Nexus 5X)" - category: "Android" - } -} - -consoles: { - id: "chromium.gpu.fyi" - name: "chromium.gpu.fyi" - repo_url: "https://chromium.googlesource.com/chromium/src" - refs: "refs/heads/master" - manifest_name: "REVISION" - header_id: "chromium" - - builders: { - name: "buildbot/chromium.gpu.fyi/GPU FYI Win Builder" - category: "Windows|Builder" - short_name: "x86" - } - builders: { - name: "buildbot/chromium.gpu.fyi/GPU FYI Win x64 Builder" - category: "Windows|Builder" - short_name: "x64" - } - builders: { - name: "buildbot/chromium.gpu.fyi/GPU FYI Win dEQP Builder" - category: "Windows|Builder|dEQP" - short_name: "x86" - } - builders: { - name: "buildbot/chromium.gpu.fyi/GPU FYI Win x64 dEQP Builder" - category: "Windows|Builder|dEQP" - short_name: "x64" - } - builders: { - name: "buildbot/chromium.gpu.fyi/GPU FYI Win Builder (dbg)" - category: "Windows|Builder|Debug" - short_name: "x86" - } - builders: { - name: "buildbot/chromium.gpu.fyi/GPU FYI Win x64 Builder (dbg)" - category: "Windows|Builder|Debug" - short_name: "x64" - } - builders: { - name: "buildbot/chromium.gpu.fyi/GPU FYI Win Clang Builder (dbg)" - category: "Windows|Builder|Debug" - short_name: "clg" - } - builders: { - name: "buildbot/chromium.gpu.fyi/Win10 FYI Debug (NVIDIA)" - category: "Windows|10" - short_name: "nvi" - } - builders: { - name: "buildbot/chromium.gpu.fyi/Win10 FYI Release (Intel HD 630)" - category: "Windows|10|Release" - short_name: "int" - } - builders: { - name: "buildbot/chromium.gpu.fyi/Win10 FYI Release (NVIDIA)" - category: "Windows|10|Release" - short_name: "nvi" - } - builders: { - name: "buildbot/chromium.gpu.fyi/Win7 FYI Debug (AMD)" - category: "Windows|7|AMD" - short_name: "dbg" - } - builders: { - name: "buildbot/chromium.gpu.fyi/Win7 FYI dEQP Release (AMD)" - category: "Windows|7|AMD" - short_name: "dqp" - } - builders: { - name: "buildbot/chromium.gpu.fyi/Win7 FYI Release (AMD)" - category: "Windows|7|AMD" - short_name: "rel" - } - builders: { - name: "buildbot/chromium.gpu.fyi/Win10 FYI Exp Release (NVIDIA)" - category: "Windows|10|Nvidia" - short_name: "exp" - } - builders: { - name: "buildbot/chromium.gpu.fyi/Win7 FYI Release (NVIDIA)" - category: "Windows|7|Nvidia" - short_name: "rel" - } - builders: { - name: "buildbot/chromium.gpu.fyi/Win10 FYI dEQP Release (NVIDIA)" - category: "Windows|10|Nvidia" - short_name: "dqp" - } - builders: { - name: "buildbot/chromium.gpu.fyi/Win7 FYI x64 Release (NVIDIA)" - category: "Windows|7|Nvidia|x64" - short_name: "rel" - } - builders: { - name: "buildbot/chromium.gpu.fyi/Win7 FYI x64 dEQP Release (NVIDIA)" - category: "Windows|7|Nvidia|x64" - short_name: "dqp" - } - builders: { - name: "buildbot/chromium.gpu.fyi/GPU FYI Mac Builder" - category: "Mac|Builder" - short_name: "rel" - } - builders: { - name: "buildbot/chromium.gpu.fyi/GPU FYI Mac Builder (dbg)" - category: "Mac|Builder" - short_name: "dbg" - } - builders: { - name: "buildbot/chromium.gpu.fyi/GPU FYI Mac dEQP Builder" - category: "Mac|Builder" - short_name: "dqp" - } - builders: { - name: "buildbot/chromium.gpu.fyi/Mac FYI Debug (Intel)" - category: "Mac|Intel" - short_name: "dbg" - } - builders: { - name: "buildbot/chromium.gpu.fyi/Mac FYI Experimental Release (Intel)" - category: "Mac|Intel" - short_name: "exp" - } - builders: { - name: "buildbot/chromium.gpu.fyi/Mac FYI dEQP Release Intel" - category: "Mac|Intel" - short_name: "dqp" - } - builders: { - name: "buildbot/chromium.gpu.fyi/Mac FYI Release (Intel)" - category: "Mac|Intel" - short_name: "rel" - } - builders: { - name: "buildbot/chromium.gpu.fyi/Mac Pro FYI Release (AMD)" - category: "Mac|AMD|Pro" - short_name: "rel" - } - builders: { - name: "buildbot/chromium.gpu.fyi/Mac FYI dEQP Release AMD" - category: "Mac|AMD" - short_name: "dqp" - } - builders: { - name: "buildbot/chromium.gpu.fyi/Mac FYI Retina Debug (AMD)" - category: "Mac|AMD|Retina" - short_name: "dbg" - } - builders: { - name: "buildbot/chromium.gpu.fyi/Mac FYI Retina Release (AMD)" - category: "Mac|AMD|Retina" - short_name: "rel" - } - builders: { - name: "buildbot/chromium.gpu.fyi/Mac FYI Experimental Retina Release (AMD)" - category: "Mac|AMD|Retina" - short_name: "exp" - } - builders: { - name: "buildbot/chromium.gpu.fyi/Mac FYI Retina Debug (NVIDIA)" - category: "Mac|Nvidia" - short_name: "dbg" - } - builders: { - name: "buildbot/chromium.gpu.fyi/Mac FYI Retina Release (NVIDIA)" - category: "Mac|Nvidia" - short_name: "rel" - } - builders: { - name: "buildbot/chromium.gpu.fyi/Mac FYI Experimental Retina Release (NVIDIA)" - category: "Mac|Nvidia" - short_name: "exp" - } - builders: { - name: "buildbot/chromium.gpu.fyi/Mac FYI GPU ASAN Release" - category: "Mac" - short_name: "asn" - } - builders: { - name: "buildbot/chromium.gpu.fyi/GPU FYI Linux Builder" - category: "Linux|Builder" - short_name: "rel" - } - builders: { - name: "buildbot/chromium.gpu.fyi/GPU FYI Linux Builder (dbg)" - category: "Linux|Builder" - short_name: "dbg" - } - builders: { - name: "buildbot/chromium.gpu.fyi/GPU FYI Linux Ozone Builder" - category: "Linux|Builder" - short_name: "ozn" - } - builders: { - name: "buildbot/chromium.gpu.fyi/GPU FYI Linux dEQP Builder" - category: "Linux|Builder" - short_name: "dqp" - } - builders: { - name: "buildbot/chromium.gpu.fyi/Linux FYI Release (Intel HD 630)" - category: "Linux|Intel" - short_name: "630" - } - builders: { - name: "buildbot/chromium.gpu.fyi/Linux FYI Ozone (Intel)" - category: "Linux|Intel" - short_name: "ozn" - } - builders: { - name: "buildbot/chromium.gpu.fyi/Linux FYI Release (AMD R7 240)" - category: "Linux" - short_name: "amd" - } - builders: { - name: "buildbot/chromium.gpu.fyi/Linux FYI Release (NVIDIA)" - category: "Linux|Nvidia" - short_name: "rel" - } - builders: { - name: "buildbot/chromium.gpu.fyi/Linux FYI Debug (NVIDIA)" - category: "Linux|Nvidia" - short_name: "dbg" - } - builders: { - name: "buildbot/chromium.gpu.fyi/Linux FYI dEQP Release (NVIDIA)" - category: "Linux|Nvidia" - short_name: "dqp" - } - builders: { - name: "buildbot/chromium.gpu.fyi/Linux FYI GPU TSAN Release" - category: "Linux" - short_name: "tsn" - } - builders: { - name: "buildbot/chromium.gpu.fyi/Android FYI Release (Nexus 5)" - category: "Android|L32" - short_name: "N5" - } - builders: { - name: "buildbot/chromium.gpu.fyi/Android FYI Release (Nexus 6)" - category: "Android|L32" - short_name: "N6" - } - builders: { - name: "buildbot/chromium.gpu.fyi/Android FYI Release (Nexus 5X)" - category: "Android|M64|QCOM" - short_name: "N5X" - } - builders: { - name: "buildbot/chromium.gpu.fyi/Android FYI Release (Nexus 6P)" - category: "Android|M64|QCOM" - short_name: "N6P" - } - builders: { - name: "buildbot/chromium.gpu.fyi/Android FYI Release (Nexus 9)" - category: "Android|M64|NVDA" - short_name: "N9" - } - builders: { - name: "buildbot/chromium.gpu.fyi/Android FYI Release (NVIDIA Shield TV)" - category: "Android|N64|NVDA" - short_name: "STV" - } - builders: { - name: "buildbot/chromium.gpu.fyi/Android FYI dEQP Release (Nexus 5X)" - category: "Android|dqp|M64" - short_name: "N5X" - } - builders: { - name: "buildbot/chromium.gpu.fyi/Android FYI 32 Vk Release (Nexus 5X)" - category: "Android|vk|O32" - short_name: "N5X" - } - builders: { - name: "buildbot/chromium.gpu.fyi/Android FYI 64 Vk Release (Nexus 5X)" - category: "Android|vk|O64" - short_name: "N5X" - } -} - -consoles: { - id: "chromium.infra" - name: "chromium.infra" - repo_url: "https://chromium.googlesource.com/infra/infra" - refs: "refs/heads/master" - manifest_name: "REVISION" - header_id: "chromium" - - builders: { - name: "buildbot/chromium.infra/conda-cipd-pkg-mac-10.9-64" - } - builders: { - name: "buildbot/chromium.infra/conda-cipd-pkg-trusty-64" - } - builders: { - name: "buildbot/chromium.infra/conda-cipd-pkg-win-64" - } - builders: { - name: "buildbot/chromium.infra/depot_tools zip uploader" - } - builders: { - name: "buildbot/chromium.infra/depot_tools-recipes-tests" - } - builders: { - name: "buildbot/chromium.infra/infra-continuous-mac-10.10-64" - } - builders: { - name: "buildbot/chromium.infra/infra-continuous-mac-10.11-64" - } - builders: { - name: "buildbot/chromium.infra/infra-continuous-mac-10.12-64" - } - builders: { - name: "buildbot/chromium.infra/infra-continuous-mac-10.13-64" - } - builders: { - name: "buildbot/chromium.infra/infra-continuous-mac-10.9-64" - } - builders: { - name: "buildbot/chromium.infra/infra-continuous-precise-32" - } - builders: { - name: "buildbot/chromium.infra/infra-continuous-precise-64" - } - builders: { - name: "buildbot/chromium.infra/infra-continuous-trusty-32" - } - builders: { - name: "buildbot/chromium.infra/infra-continuous-trusty-64" - } - builders: { - name: "buildbot/chromium.infra/infra-continuous-trusty-64-perf" - } - builders: { - name: "buildbot/chromium.infra/infra-continuous-win-32" - } - builders: { - name: "buildbot/chromium.infra/infra-continuous-win-64" - } - builders: { - name: "buildbot/chromium.infra/infra-continuous-xenial-64" - } - builders: { - name: "buildbot/chromium.infra/infra-continuous-yakkety-64" - } - builders: { - name: "buildbot/chromium.infra/infra-continuous-zesty-64" - } - builders: { - name: "buildbot/chromium.infra/luci-gae-trusty64" - } - builders: { - name: "buildbot/chromium.infra/luci-go-osx" - } - builders: { - name: "buildbot/chromium.infra/luci-go-precise32" - } - builders: { - name: "buildbot/chromium.infra/luci-go-trusty64" - } - builders: { - name: "buildbot/chromium.infra/luci-go-win64" - } - builders: { - name: "buildbot/chromium.infra/recipe_engine-recipes-tests" - } - builders: { - name: "buildbot/chromium.infra/recipes-py-continuous" - } -} - -consoles: { - id: "chromium.infra.codesearch" - name: "chromium.infra.codesearch" - repo_url: "https://chromium.googlesource.com/chromium/src" - refs: "refs/heads/master" - manifest_name: "REVISION" - header_id: "chromium" - - builders: { - name: "buildbot/chromium.infra.codesearch/codesearch-gen-chromium-chromiumos" - } - builders: { - name: "buildbot/chromium.infra.codesearch/codesearch-gen-chromium-linux" - } - builders: { - name: "buildbot/chromium.infra.codesearch/codesearch-submodules-build" - } - builders: { - name: "buildbot/chromium.infra.codesearch/codesearch-submodules-chromium" - } - builders: { - name: "buildbot/chromium.infra.codesearch/codesearch-submodules-infra" - } -} - -consoles: { - id: "chromium.infra.cron" - name: "chromium.infra.cron" - repo_url: "https://chromium.googlesource.com/chromium/src" - refs: "refs/heads/master" - manifest_name: "REVISION" - header_id: "chromium" - - builders: { - name: "buildbot/chromium.infra.cron/GAE SDK CIPD Packager" - } - builders: { - name: "buildbot/chromium.infra.cron/git-hash-metrics" - } - builders: { - name: "buildbot/chromium.infra.cron/gsubtreed" - } - builders: { - name: "buildbot/chromium.infra.cron/gsubtreed-aosp-platform-system-core" - } - builders: { - name: "buildbot/chromium.infra.cron/gsubtreed-infra" - } - builders: { - name: "buildbot/chromium.infra.cron/gsubtreed-llvm-clang" - } - builders: { - name: "buildbot/chromium.infra.cron/gsubtreed-luci-py" - } - builders: { - name: "buildbot/chromium.infra.cron/lkgr-tag-pusher" - } - builders: { - name: "buildbot/chromium.infra.cron/publish_tarball" - } - builders: { - name: "buildbot/chromium.infra.cron/third-party-packages-linux-386" - } - builders: { - name: "buildbot/chromium.infra.cron/third-party-packages-linux-amd64" - } - builders: { - name: "buildbot/chromium.infra.cron/third-party-packages-mac-amd64" - } - builders: { - name: "buildbot/chromium.infra.cron/third-party-packages-windows-386" - } - builders: { - name: "buildbot/chromium.infra.cron/third-party-packages-windows-amd64" - } - builders: { - name: "buildbot/chromium.infra.cron/wpt-exporter" - } - builders: { - name: "buildbot/chromium.infra.cron/wpt-importer" - } - builders: { - name: "buildbot/chromium.infra.cron/Build From Tarball" - } -} - -consoles: { - id: "chromium.perf.fyi" - name: "chromium.perf.fyi" - repo_url: "https://chromium.googlesource.com/chromium/src" - refs: "refs/heads/master" - manifest_name: "REVISION" - header_id: "chromium" - - builders: { - name: "buildbot/chromium.perf.fyi/Android Builder Perf FYI" - category: "android" - } - builders: { - name: "buildbot/chromium.perf.fyi/Android arm64 Builder Perf FYI" - category: "android" - } - builders: { - name: "buildbot/chromium.perf.fyi/Linux Compile Perf FYI" - category: "linux" - } - builders: { - name: "buildbot/chromium.perf.fyi/Mac Builder Perf FYI" - category: "mac" - } - builders: { - name: "buildbot/chromium.perf.fyi/Android Nexus 5X Perf FYI" - category: "android" - } - builders: { - name: "buildbot/chromium.perf.fyi/android-pixel2-perf" - category: "android" - } - builders: { - name: "buildbot/chromium.perf.fyi/android-pixel2_webview-perf" - category: "android" - } - builders: { - name: "buildbot/chromium.perf.fyi/Mojo Linux Perf" - category: "linux" - } - builders: { - name: "buildbot/chromium.perf.fyi/Histogram Pipeline Linux Perf" - category: "linux" - } - builders: { - name: "buildbot/chromium.perf.fyi/One Buildbot Step Test Builder" - category: "linux" - } -} - consoles { header_id: "chromium" id: "chromium.swarm" @@ -2766,1076 +170,3 @@ name: "buildbucket/luci.chromium.ci/Windows Swarm" } } - -consoles: { - id: "chromium.tools.build" - name: "chromium.tools.build" - repo_url: "https://chromium.googlesource.com/chromium/src" - refs: "refs/heads/master" - manifest_name: "REVISION" - header_id: "chromium" - - builders: { - name: "buildbot/chromium.tools.build/build-repo-real-try_mac" - category: "real-try" - } - builders: { - name: "buildbot/chromium.tools.build/build-repo-real-try_trusty64" - category: "real-try" - } - builders: { - name: "buildbot/chromium.tools.build/build-repo-real-try_win64" - category: "real-try" - } - builders: { - name: "buildbot/chromium.tools.build/recipe-simulation_mac" - category: "simulation" - } - builders: { - name: "buildbot/chromium.tools.build/recipe-simulation_trusty64" - category: "simulation" - } - builders: { - name: "buildbot/chromium.tools.build/v8-linux-end-to-end" - category: "v8" - } -} - -consoles: { - id: "chromium.webrtc" - name: "chromium.webrtc" - repo_url: "https://chromium.googlesource.com/chromium/src" - refs: "refs/heads/master" - manifest_name: "REVISION" - header_id: "chromium" - - builders: { - name: "buildbot/chromium.webrtc/Linux Builder" - category: "linux" - short_name: "bld" - } - builders: { - name: "buildbot/chromium.webrtc/Linux Tester" - category: "linux" - short_name: "tst" - } - builders: { - name: "buildbot/chromium.webrtc/Mac Builder" - category: "mac" - short_name: "bld" - } - builders: { - name: "buildbot/chromium.webrtc/Mac Tester" - category: "mac" - short_name: "tst" - } - builders: { - name: "buildbot/chromium.webrtc/Mac Tester (long-running)" - category: "mac" - short_name: "lng" - } - builders: { - name: "buildbot/chromium.webrtc/Win Builder" - category: "win" - short_name: "bld" - } - builders: { - name: "buildbot/chromium.webrtc/Win10 Tester" - category: "win" - short_name: "10" - } - builders: { - name: "buildbot/chromium.webrtc/Win7 Tester" - category: "win" - short_name: "7" - } - builders: { - name: "buildbot/chromium.webrtc/Win7 Tester (long-running)" - category: "win" - short_name: "lng" - } - builders: { - name: "buildbot/chromium.webrtc/Win8 Tester" - category: "win" - short_name: "8" - } -} - -consoles: { - id: "chromium.webrtc.fyi" - name: "chromium.webrtc.fyi" - repo_url: "https://webrtc.googlesource.com/src" - refs: "refs/heads/master" - manifest_name: "REVISION" - header_id: "chromium" - - builders: { - name: "buildbot/chromium.webrtc.fyi/Android Builder (dbg)" - category: "android|debug|builder" - short_name: "32" - } - builders: { - name: "buildbot/chromium.webrtc.fyi/Android Builder ARM64 (dbg)" - category: "android|debug|builder" - short_name: "64" - } - builders: { - name: "buildbot/chromium.webrtc.fyi/Android Tests (dbg) (K Nexus5)" - category: "android|debug|tester" - short_name: "K" - } - builders: { - name: "buildbot/chromium.webrtc.fyi/Android Tests (dbg) (M Nexus5X)" - category: "android|debug|tester" - short_name: "M" - } - builders: { - name: "buildbot/chromium.webrtc.fyi/Android Builder" - category: "android|release" - short_name: "32" - } - builders: { - name: "buildbot/chromium.webrtc.fyi/Linux Builder (dbg)" - category: "linux|debug" - short_name: "bld" - } - builders: { - name: "buildbot/chromium.webrtc.fyi/Linux Builder" - category: "linux|release" - short_name: "bld" - } - builders: { - name: "buildbot/chromium.webrtc.fyi/Linux Tester" - category: "linux|release" - short_name: "tst" - } - builders: { - name: "buildbot/chromium.webrtc.fyi/Mac Builder (dbg)" - category: "mac|debug" - short_name: "bld" - } - builders: { - name: "buildbot/chromium.webrtc.fyi/Mac Builder" - category: "mac|release" - short_name: "bld" - } - builders: { - name: "buildbot/chromium.webrtc.fyi/Mac Tester" - category: "mac|release" - short_name: "tst" - } - builders: { - name: "buildbot/chromium.webrtc.fyi/Win Builder (dbg)" - short_name: "bld" - category: "win|debug" - } - builders: { - name: "buildbot/chromium.webrtc.fyi/Win Builder" - category: "win|release|builder" - short_name: "32" - } - builders: { - name: "buildbot/chromium.webrtc.fyi/Win10 Tester" - category: "win|release|tester" - short_name: "10" - } - builders: { - name: "buildbot/chromium.webrtc.fyi/Win7 Tester" - category: "win|release|tester" - short_name: "7" - } - builders: { - name: "buildbot/chromium.webrtc.fyi/Win8 Tester" - category: "win|release|tester" - short_name: "8" - } - builders: { - name: "buildbot/chromium.webrtc.fyi/ios-device" - category: "ios" - short_name: "dev" - } - builders: { - name: "buildbot/chromium.webrtc.fyi/ios-simulator" - category: "ios" - short_name: "sim" - } -} - -headers: { - id: "chromiumos" - oncalls: { - name: "Sheriff" - url: "https://build.chromium.org/p/chromiumos/sheriff.json" - } - oncalls: { - name: "Sheriff 2" - url: "https://build.chromium.org/p/chromiumos/sheriff2.json" - } - oncalls: { - name: "Gardeners" - url: "URL:https://build.chromium.org/p/chromiumos/sheriff_cr_cros_gardeners.js" - } - - links: { - name: "Builds" - links: { - text: "status" - url: "https://chromiumos-status.appspot.com/" - alt: "Chromium OS status page" - } - } - - links: { - name: "ChromiumOS" - links: { - text: "sources" - url: "https://chromium.googlesource.com/" - alt: "Source code project" - } - links: { - text: "reviews" - url: "https://chromium-review.googlesource.com" - alt: "Chromium code review tool" - } - links: { - text: "bugs" - url: "https://crbug.com" - alt: "Chromium bug tracker" - } - links: { - text: "dev" - url: "http://dev.chromium.org/chromium-os" - alt: "ChromiumOS developer home page" - } - } - - links: { - name: "Navigate" - links: { - text: "about" - url: "http://dev.chromium.org/developers/testing/chromium-build-infrastructure/tour-of-the-chromium-buildbot" - alt: "Tour of the console" - } - links: { - text: "customize" - url: "https://chromium.googlesource.com/infra/experimental/+/infra/config/luci-milo-dev.cfg" - alt: "Customize this console" - } - } - - console_groups: { - console_ids: "chromium/chromiumos-Closers" - console_ids: "chromium/chromiumos-Full" - console_ids: "chromium/chromiumos-Incremental" - console_ids: "chromium/chromiumos-ASAN" - console_ids: "chromium/chromiumos-CommitQueue" - console_ids: "chromium/chromiumos.chromium" - } - tree_status_host: "chromiumos-status.appspot.com" -} - -consoles: { - id: "chromiumos-Closers" - name: "chromiumos: Closers" - repo_url: "https://chromium.googlesource.com/chromium/src" - refs: "refs/heads/master" - manifest_name: "REVISION" - header_id: "chromiumos" - - builders: { - name: "buildbot/chromiumos/amd64-generic-incremental" - } - builders: { - name: "buildbot/chromiumos/daisy-incremental" - } - builders: { - name: "buildbot/chromiumos/amd64-generic-full" - } - builders: { - name: "buildbot/chromiumos/arm-generic-full" - } - builders: { - name: "buildbot/chromiumos/daisy-full" - } - builders: { - name: "buildbot/chromiumos/lakitu-full" - } - builders: { - name: "buildbot/chromiumos/oak-full" - } - builders: { - name: "buildbot/chromiumos/tatl-paladin" - } - builders: { - name: "buildbot/chromiumos/amd64-generic-asan" - } -} - -consoles: { - id: "chromiumos-Full" - name: "chromiumos: Full" - repo_url: "https://chromium.googlesource.com/chromium/src" - refs: "refs/heads/master" - manifest_name: "REVISION" - header_id: "chromiumos" - - builders: { - name: "buildbot/chromiumos/amd64-generic-full" - } - builders: { - name: "buildbot/chromiumos/arm-generic-full" - } - builders: { - name: "buildbot/chromiumos/daisy-full" - } - builders: { - name: "buildbot/chromiumos/lakitu-full" - } - builders: { - name: "buildbot/chromiumos/oak-full" - } - builders: { - name: "buildbot/chromiumos/tatl-paladin" - } -} - -consoles: { - id: "chromiumos-Incremental" - name: "chromiumos: Incremental" - repo_url: "https://chromium.googlesource.com/chromium/src" - refs: "refs/heads/master" - manifest_name: "REVISION" - header_id: "chromiumos" - - builders: { - name: "buildbot/chromiumos/amd64-generic-incremental" - } - builders: { - name: "buildbot/chromiumos/daisy-incremental" - } -} - -consoles: { - id: "chromiumos-ASAN" - name: "chromiumos: ASAN" - repo_url: "https://chromium.googlesource.com/chromium/src" - refs: "refs/heads/master" - manifest_name: "REVISION" - header_id: "chromiumos" - - builders: { - name: "buildbot/chromiumos/amd64-generic-asan" - } -} - -consoles: { - id: "chromiumos-CommitQueue" - name: "chromiumos: Commit Queue" - repo_url: "https://chromium.googlesource.com/chromium/src" - refs: "refs/heads/master" - manifest_name: "REVISION" - header_id: "chromiumos" - - builders: { - name: "buildbot/chromiumos/amd64-generic-paladin" - } - builders: { - name: "buildbot/chromiumos/arm-generic-paladin" - } - builders: { - name: "buildbot/chromiumos/moblab-generic-vm-paladin" - } - builders: { - name: "buildbot/chromiumos/tatl-paladin" - } -} - -consoles: { - id: "chromiumos" - name: "chromiumos" - repo_url: "https://chromium.googlesource.com/chromium/src" - refs: "refs/heads/master" - manifest_name: "REVISION" - header_id: "chromiumos" - - builders: { - name: "buildbot/chromiumos/amd64-generic-asan" - } - builders: { - name: "buildbot/chromiumos/amd64-generic-full" - } - builders: { - name: "buildbot/chromiumos/amd64-generic-incremental" - } - builders: { - name: "buildbot/chromiumos/amd64-generic-paladin" - } - builders: { - name: "buildbot/chromiumos/amd64-generic-fuzzer" - } - builders: { - name: "buildbot/chromiumos/arm-generic-full" - } - builders: { - name: "buildbot/chromiumos/arm-generic-paladin" - } - builders: { - name: "buildbot/chromiumos/chromeos-infra-go" - } - builders: { - name: "buildbot/chromiumos/chromiumos-sdk" - } - builders: { - name: "buildbot/chromiumos/daisy-full" - } - builders: { - name: "buildbot/chromiumos/daisy-incremental" - } - builders: { - name: "buildbot/chromiumos/lakitu-full" - } - builders: { - name: "buildbot/chromiumos/moblab-generic-vm-paladin" - } - builders: { - name: "buildbot/chromiumos/oak-full" - } - builders: { - name: "buildbot/chromiumos/tatl-full" - } - builders: { - name: "buildbot/chromiumos/tatl-paladin" - } - builders: { - name: "buildbot/chromiumos/unallocated-slave-pool" - } -} - -consoles: { - id: "chromiumos.chromium" - name: "chromiumos.chromium" - repo_url: "https://chromium.googlesource.com/chromium/src" - refs: "refs/heads/master" - manifest_name: "REVISION" - header_id: "chromiumos" - - builders: { - name: "buildbot/chromiumos.chromium/amd64-generic-telemetry" - category: "chromiumos perf" - } - builders: { - name: "buildbot/chromiumos.chromium/amd64-generic-tot-asan-informational" - category: "chromeos asan" - } - builders: { - name: "buildbot/chromiumos.chromium/amd64-generic-tot-chromium-pfq-informational" - category: "chromium" - } - builders: { - name: "buildbot/chromiumos.chromium/daisy-tot-chromium-pfq-informational" - category: "chromium" - } -} - -consoles: { - id: "tryserver.chromium.android" - name: "tryserver.chromium.android" - repo_url: "https://chromium.googlesource.com/chromium/src" - refs: "refs/heads/master" - manifest_name: "REVISION" - header_id: "chromium" - builder_view_only: true - - builders: { - name: "buildbot/tryserver.chromium.android/android_archive_rel_ng" - } - builders: { - name: "buildbot/tryserver.chromium.android/android_arm64_dbg_recipe" - } - builders: { - name: "buildbot/tryserver.chromium.android/android_blink_rel" - } - builders: { - name: "buildbot/tryserver.chromium.android/android_chromium_variable" - } - builders: { - name: "buildbot/tryserver.chromium.android/android_chromium_variable_archive" - } - builders: { - name: "buildbot/tryserver.chromium.android/android_chromium_variable_arm64" - } - builders: { - name: "buildbot/tryserver.chromium.android/android_chromium_variable_cast_shell" - } - builders: { - name: "buildbot/tryserver.chromium.android/android_chromium_variable_clang" - } - builders: { - name: "buildbot/tryserver.chromium.android/android_chromium_variable_deflake" - } - builders: { - name: "buildbot/tryserver.chromium.android/android_chromium_variable_nexus4" - } - builders: { - name: "buildbot/tryserver.chromium.android/android_clang_dbg_recipe" - } - builders: { - name: "buildbot/tryserver.chromium.android/android_compile_dbg" - } - builders: { - name: "buildbot/tryserver.chromium.android/android_compile_rel" - } - builders: { - name: "buildbot/tryserver.chromium.android/android_compile_x64_dbg" - } - builders: { - name: "buildbot/tryserver.chromium.android/android_compile_x86_dbg" - } - builders: { - name: "buildbot/tryserver.chromium.android/android_coverage" - } - builders: { - name: "buildbot/tryserver.chromium.android/android_cronet" - } - builders: { - name: "buildbot/tryserver.chromium.android/android_cronet_tester" - } - builders: { - name: "buildbot/tryserver.chromium.android/android_mojo" - } - builders: { - name: "buildbot/tryserver.chromium.android/android_n5x_swarming_dbg" - } - builders: { - name: "buildbot/tryserver.chromium.android/android_n5x_swarming_rel" - } - builders: { - name: "buildbot/tryserver.chromium.android/android_optional_gpu_tests_rel" - } - builders: { - name: "buildbot/tryserver.chromium.android/cast_shell_android" - } - builders: { - name: "buildbot/tryserver.chromium.android/linux_android_dbg_ng" - } - builders: { - name: "buildbot/tryserver.chromium.android/linux_android_rel_ng" - } -} - -consoles: { - id: "tryserver.chromium.angle" - name: "tryserver.chromium.angle" - repo_url: "https://chromium.googlesource.com/chromium/src" - refs: "refs/heads/master" - manifest_name: "REVISION" - header_id: "chromium" - builder_view_only: true - - builders: { - name: "buildbot/tryserver.chromium.angle/android_angle_deqp_rel_ng" - } - builders: { - name: "buildbot/tryserver.chromium.angle/android_angle_rel_ng" - } - builders: { - name: "buildbot/tryserver.chromium.angle/linux_angle_dbg_ng" - } - builders: { - name: "buildbot/tryserver.chromium.angle/linux_angle_deqp_rel_ng" - } - builders: { - name: "buildbot/tryserver.chromium.angle/linux_angle_ozone_rel_ng" - } - builders: { - name: "buildbot/tryserver.chromium.angle/linux_angle_rel_ng" - } - builders: { - name: "buildbot/tryserver.chromium.angle/mac_angle_dbg_ng" - } - builders: { - name: "buildbot/tryserver.chromium.angle/mac_angle_rel_ng" - } - builders: { - name: "buildbot/tryserver.chromium.angle/win_angle_dbg_ng" - } - builders: { - name: "buildbot/tryserver.chromium.angle/win_angle_deqp_rel_ng" - } - builders: { - name: "buildbot/tryserver.chromium.angle/win_angle_rel_ng" - } - builders: { - name: "buildbot/tryserver.chromium.angle/win_angle_x64_dbg_ng" - } - builders: { - name: "buildbot/tryserver.chromium.angle/win_angle_x64_deqp_rel_ng" - } - builders: { - name: "buildbot/tryserver.chromium.angle/win_angle_x64_rel_ng" - } -} - -consoles: { - id: "tryserver.chromium.chromiumos" - name: "tryserver.chromium.chromiumos" - repo_url: "https://chromium.googlesource.com/chromium/src" - refs: "refs/heads/master" - manifest_name: "REVISION" - header_id: "chromium" - builder_view_only: true - - builders: { - name: "buildbot/tryserver.chromium.chromiumos/chromeos-amd64-generic-rel" - } - builders: { - name: "buildbot/tryserver.chromium.chromiumos/chromeos-daisy-rel" - } - builders: { - name: "buildbot/tryserver.chromium.chromiumos/linux-chromeos-compile-dbg" - } - builders: { - name: "buildbot/tryserver.chromium.chromiumos/linux-chromeos-dbg" - } - builders: { - name: "buildbot/tryserver.chromium.chromiumos/linux-chromeos-rel" - } -} - -consoles: { - id: "tryserver.chromium.linux" - name: "tryserver.chromium.linux" - repo_url: "https://chromium.googlesource.com/chromium/src" - refs: "refs/heads/master" - manifest_name: "REVISION" - header_id: "chromium" - builder_view_only: true - - builders: { - name: "buildbot/tryserver.chromium.linux/cast_shell_audio_linux" - } - builders: { - name: "buildbot/tryserver.chromium.linux/cast_shell_linux" - } - builders: { - name: "buildbot/tryserver.chromium.linux/chromium_presubmit" - } - builders: { - name: "buildbot/tryserver.chromium.linux/closure_compilation" - } - builders: { - name: "buildbot/tryserver.chromium.linux/fuchsia_arm64" - } - builders: { - name: "buildbot/tryserver.chromium.linux/fuchsia_arm64_cast_audio" - } - builders: { - name: "buildbot/tryserver.chromium.linux/fuchsia_x64" - } - builders: { - name: "buildbot/tryserver.chromium.linux/fuchsia_x64_cast_audio" - } - builders: { - name: "buildbot/tryserver.chromium.linux/leak_detection_linux" - } - builders: { - name: "buildbot/tryserver.chromium.linux/linux_arm" - } - builders: { - name: "buildbot/tryserver.chromium.linux/linux_chromium_analysis" - } - builders: { - name: "buildbot/tryserver.chromium.linux/linux_chromium_archive_rel_ng" - } - builders: { - name: "buildbot/tryserver.chromium.linux/linux_chromium_asan_rel_ng" - } - builders: { - name: "buildbot/tryserver.chromium.linux/linux_chromium_cfi_rel_ng" - } - builders: { - name: "buildbot/tryserver.chromium.linux/linux_chromium_chromeos_asan_rel_ng" - } - builders: { - name: "buildbot/tryserver.chromium.linux/linux_chromium_chromeos_msan_rel_ng" - } - builders: { - name: "buildbucket/luci.chromium.try/linux_chromium_clobber_deterministic" - } - builders: { - name: "buildbot/tryserver.chromium.linux/linux_chromium_clobber_rel_ng" - } - builders: { - name: "buildbot/tryserver.chromium.linux/linux_chromium_compile_dbg_32_ng" - } - builders: { - name: "buildbot/tryserver.chromium.linux/linux_chromium_compile_dbg_ng" - } - builders: { - name: "buildbot/tryserver.chromium.linux/linux_chromium_compile_rel_ng" - } - builders: { - name: "buildbot/tryserver.chromium.linux/linux_chromium_component_updater" - } - builders: { - name: "buildbot/tryserver.chromium.linux/linux_chromium_dbg_32_ng" - } - builders: { - name: "buildbot/tryserver.chromium.linux/linux_chromium_dbg_ng" - } - builders: { - name: "buildbot/tryserver.chromium.linux/linux_chromium_gn_upload" - } - builders: { - name: "buildbot/tryserver.chromium.linux/linux_chromium_headless_rel" - } - builders: { - name: "buildbot/tryserver.chromium.linux/linux_chromium_msan_rel_ng" - } - builders: { - name: "buildbot/tryserver.chromium.linux/linux_chromium_ozone_compile_only_ng" - } - builders: { - name: "buildbot/tryserver.chromium.linux/linux_chromium_rel_ng" - } - builders: { - name: "buildbot/tryserver.chromium.linux/linux_chromium_tsan_rel_ng" - } - builders: { - name: "buildbot/tryserver.chromium.linux/linux_chromium_ubsan_rel_ng" - } - builders: { - name: "buildbot/tryserver.chromium.linux/linux-gcc-rel" - } - builders: { - name: "buildbot/tryserver.chromium.linux/layout_test_leak_detection" - } - builders: { - name: "buildbot/tryserver.chromium.linux/linux_layout_tests_layout_ng" - } - builders: { - name: "buildbot/tryserver.chromium.linux/linux_layout_tests_root_layer_scrolls" - } - builders: { - name: "buildbot/tryserver.chromium.linux/linux_layout_tests_slimming_paint_v2" - } - builders: { - name: "buildbot/tryserver.chromium.linux/linux_mojo" - } - builders: { - name: "buildbot/tryserver.chromium.linux/linux_mojo_chromeos" - } - builders: { - name: "buildbot/tryserver.chromium.linux/linux_nacl_sdk" - } - builders: { - name: "buildbot/tryserver.chromium.linux/linux_nacl_sdk_build" - } - builders: { - name: "buildbot/tryserver.chromium.linux/linux_optional_gpu_tests_rel" - } - builders: { - name: "buildbot/tryserver.chromium.linux/linux_upload_clang" - } - builders: { - name: "buildbot/tryserver.chromium.linux/linux_vr" - } -} - -consoles: { - id: "tryserver.chromium.mac" - name: "tryserver.chromium.mac" - repo_url: "https://chromium.googlesource.com/chromium/src" - refs: "refs/heads/master" - manifest_name: "REVISION" - header_id: "chromium" - builder_view_only: true - - builders: { - name: "buildbot/tryserver.chromium.mac/ios-device" - } - builders: { - name: "buildbot/tryserver.chromium.mac/ios-device-xcode-clang" - } - builders: { - name: "buildbot/tryserver.chromium.mac/ios-simulator" - } - builders: { - name: "buildbot/tryserver.chromium.mac/ios-simulator-cronet" - } - builders: { - name: "buildbot/tryserver.chromium.mac/ios-simulator-full-configs" - } - builders: { - name: "buildbot/tryserver.chromium.mac/ios-simulator-xcode-clang" - } - builders: { - name: "buildbot/tryserver.chromium.mac/mac_chromium_10.10" - } - builders: { - name: "buildbot/tryserver.chromium.mac/mac_chromium_10.10_macviews" - } - builders: { - name: "buildbot/tryserver.chromium.mac/mac_chromium_10.12_rel_ng" - } - builders: { - name: "buildbot/tryserver.chromium.mac/mac_chromium_10.13_rel_ng" - } - builders: { - name: "buildbot/tryserver.chromium.mac/mac_chromium_archive_rel_ng" - } - builders: { - name: "buildbot/tryserver.chromium.mac/mac_chromium_asan_rel_ng" - } - builders: { - name: "buildbot/tryserver.chromium.mac/mac_chromium_asan_variable" - } - builders: { - name: "buildbot/tryserver.chromium.mac/mac_chromium_compile_dbg_ng" - } - builders: { - name: "buildbot/tryserver.chromium.mac/mac_chromium_compile_rel_ng" - } - builders: { - name: "buildbot/tryserver.chromium.mac/mac_chromium_dbg_ng" - } - builders: { - name: "buildbot/tryserver.chromium.mac/mac_chromium_gn_upload" - } - builders: { - name: "buildbot/tryserver.chromium.mac/mac_chromium_rel_ng" - } - builders: { - name: "buildbot/tryserver.chromium.mac/mac_chromium_variable" - } - builders: { - name: "buildbot/tryserver.chromium.mac/mac_chromium_variable_10.10" - } - builders: { - name: "buildbot/tryserver.chromium.mac/mac_chromium_variable_10.10_layout" - } - builders: { - name: "buildbot/tryserver.chromium.mac/mac_chromium_variable_10.11" - } - builders: { - name: "buildbot/tryserver.chromium.mac/mac_chromium_variable_10.11_layout" - } - builders: { - name: "buildbot/tryserver.chromium.mac/mac_chromium_variable_10.12" - } - builders: { - name: "buildbot/tryserver.chromium.mac/mac_chromium_10.13_rel_ng" - } - builders: { - name: "buildbot/tryserver.chromium.mac/mac_chromium_variable_archive" - } - builders: { - name: "buildbot/tryserver.chromium.mac/mac_chromium_variable_chrome" - } - builders: { - name: "buildbot/tryserver.chromium.mac/mac_chromium_variable_deflake" - } - builders: { - name: "buildbot/tryserver.chromium.mac/mac_chromium_variable_layout" - } - builders: { - name: "buildbot/tryserver.chromium.mac/mac_nacl_sdk" - } - builders: { - name: "buildbot/tryserver.chromium.mac/mac_nacl_sdk_build" - } - builders: { - name: "buildbot/tryserver.chromium.mac/mac_optional_gpu_tests_rel" - } - builders: { - name: "buildbot/tryserver.chromium.mac/mac_upload_clang" - } -} - -consoles: { - id: "tryserver.chromium.perf" - name: "tryserver.chromium.perf" - repo_url: "https://chromium.googlesource.com/chromium/src" - refs: "refs/heads/master" - manifest_name: "REVISION" - header_id: "chromium" - builder_view_only: true - - builders: { - name: "buildbot/tryserver.chromium.perf/Android Compile Perf" - } - builders: { - name: "buildbot/tryserver.chromium.perf/Android arm64 Compile Perf" - } - builders: { - name: "buildbot/tryserver.chromium.perf/Linux Builder Perf" - } - builders: { - name: "buildbot/tryserver.chromium.perf/Mac Builder Perf" - } - builders: { - name: "buildbot/tryserver.chromium.perf/Win Builder Perf" - } - builders: { - name: "buildbot/tryserver.chromium.perf/Win x64 Builder Perf" - } - builders: { - name: "buildbot/tryserver.chromium.perf/linux_fyi_perf_bisect" - } - builders: { - name: "buildbot/tryserver.chromium.perf/linux_perf_bisect" - } - builders: { - name: "buildbot/tryserver.chromium.perf/linux_perf_bisect_builder" - } - builders: { - name: "buildbot/tryserver.chromium.perf/obbs_fyi" - } - builders: { - name: "buildbot/tryserver.chromium.perf/staging_linux_perf_bisect" - } -} - -consoles: { - id: "tryserver.chromium.win" - name: "tryserver.chromium.win" - repo_url: "https://chromium.googlesource.com/chromium/src" - refs: "refs/heads/master" - manifest_name: "REVISION" - header_id: "chromium" - builder_view_only: true - - builders: { - name: "buildbot/tryserver.chromium.win/win10_chromium_x64_rel_ng" - } - builders: { - name: "buildbot/tryserver.chromium.win/win7_chromium_rel_loc_exp" - } - builders: { - name: "buildbot/tryserver.chromium.win/win7_chromium_rel_ng" - } - builders: { - name: "buildbot/tryserver.chromium.win/win_archive" - } - builders: { - name: "buildbot/tryserver.chromium.win/win_chrome_official" - } - builders: { - name: "buildbot/tryserver.chromium.win/win_chromium_compile_dbg_ng" - } - builders: { - name: "buildbot/tryserver.chromium.win/win_chromium_compile_rel_ng" - } - builders: { - name: "buildbot/tryserver.chromium.win/win_chromium_dbg_ng" - } - builders: { - name: "buildbot/tryserver.chromium.win/win_chromium_gn_upload" - } - builders: { - name: "buildbot/tryserver.chromium.win/win_chromium_variable" - } - builders: { - name: "buildbot/tryserver.chromium.win/win_chromium_variable_archive" - } - builders: { - name: "buildbot/tryserver.chromium.win/win_chromium_variable_chrome" - } - builders: { - name: "buildbot/tryserver.chromium.win/win_chromium_variable_clang" - } - builders: { - name: "buildbot/tryserver.chromium.win/win_chromium_variable_deflake" - } - builders: { - name: "buildbot/tryserver.chromium.win/win_chromium_variable_webkit_builder" - } - builders: { - name: "buildbot/tryserver.chromium.win/win_chromium_variable_webkit_win7_builder" - } - builders: { - name: "buildbot/tryserver.chromium.win/win_chromium_variable_webkit_win7_builder_x64" - } - builders: { - name: "buildbot/tryserver.chromium.win/win_chromium_x64_rel_ng" - } - builders: { - name: "buildbot/tryserver.chromium.win/win_mojo" - } - builders: { - name: "buildbot/tryserver.chromium.win/win_nacl_sdk" - } - builders: { - name: "buildbot/tryserver.chromium.win/win_nacl_sdk_build" - } - builders: { - name: "buildbot/tryserver.chromium.win/win_optional_gpu_tests_rel" - } - builders: { - name: "buildbot/tryserver.chromium.win/win_upload_clang" - } - builders: { - name: "buildbot/tryserver.chromium.win/win_x64_archive" - } - builders: { - name: "buildbot/tryserver.chromium.win/win_x64_chromium_variable_builder" - } -} - -consoles: { - id: "tryserver.blink" - name: "tryserver.blink" - repo_url: "https://chromium.googlesource.com/chromium/src" - refs: "refs/heads/master" - manifest_name: "REVISION" - builder_view_only: true - - builders: { - name: "buildbot/tryserver.blink/linux-blink-rel" - } - builders: { - name: "buildbot/tryserver.blink/mac10.10-blink-rel" - } - builders: { - name: "buildbot/tryserver.blink/mac10.11-blink-rel" - } - builders: { - name: "buildbot/tryserver.blink/mac10.12-blink-rel" - } - builders: { - name: "buildbot/tryserver.blink/mac10.13-blink-rel" - } - builders: { - name: "buildbot/tryserver.blink/mac10.13_retina-blink-rel" - } - builders: { - name: "buildbot/tryserver.blink/win10-blink-rel" - } - builders: { - name: "buildbot/tryserver.blink/win7-blink-rel" - } - builders: { - name: "buildbot/tryserver.blink/linux_trusty_blink_rel" - } - builders: { - name: "buildbot/tryserver.blink/mac10.10_blink_rel" - } - builders: { - name: "buildbot/tryserver.blink/mac10.11_blink_rel" - } - builders: { - name: "buildbot/tryserver.blink/mac10.12_blink_rel" - } - builders: { - name: "buildbot/tryserver.blink/mac10.13_blink_rel" - } - builders: { - name: "buildbot/tryserver.blink/mac10.13_retina_blink_rel" - } - builders: { - name: "buildbot/tryserver.blink/win10_blink_rel" - } - builders: { - name: "buildbot/tryserver.blink/win7_blink_rel" - } -}
diff --git a/infra/config/global/luci-milo.cfg b/infra/config/global/luci-milo.cfg index cdbc382..f2f28d1 100644 --- a/infra/config/global/luci-milo.cfg +++ b/infra/config/global/luci-milo.cfg
@@ -209,7 +209,7 @@ } links { text: "customize" - url: "https://chromium.googlesource.com/infra/experimental/+/infra/config/luci-milo.cfg" + url: "https://chromium.googlesource.com/chromium/src/+/master/infra/config/global/luci-milo.cfg" alt: "Customize this console" } } @@ -3328,33 +3328,6 @@ consoles { header_id: "chromium" - id: "chromium.swarm" - name: "chromium.swarm" - repo_url: "https://chromium.googlesource.com/chromium/src" - refs: "refs/heads/master" - manifest_name: "REVISION" - builders { - name: "buildbucket/luci.chromium.ci/Android N5 Swarm" - } - builders { - name: "buildbucket/luci.chromium.ci/Android N5X Swarm" - } - builders { - name: "buildbucket/luci.chromium.ci/ChromeOS Swarm" - } - builders { - name: "buildbucket/luci.chromium.ci/Linux Swarm" - } - builders { - name: "buildbucket/luci.chromium.ci/Mac Swarm" - } - builders { - name: "buildbucket/luci.chromium.ci/Windows Swarm" - } -} - -consoles { - header_id: "chromium" id: "chromium.tools.build" name: "chromium.tools.build" repo_url: "https://chromium.googlesource.com/chromium/src"
diff --git a/ios/chrome/app/application_delegate/app_state.mm b/ios/chrome/app/application_delegate/app_state.mm index 8dea8142..5c3a9059 100644 --- a/ios/chrome/app/application_delegate/app_state.mm +++ b/ios/chrome/app/application_delegate/app_state.mm
@@ -361,7 +361,7 @@ BOOL incognito = bvc == [[_browserLauncher browserViewInformation] otrBVC]; [bvc.dispatcher - openURL:[OpenNewTabCommand commandWithIncognito:incognito]]; + openURLInNewTab:[OpenNewTabCommand commandWithIncognito:incognito]]; } } else { [[[_browserLauncher browserViewInformation] currentBVC]
diff --git a/ios/chrome/app/application_delegate/app_state_unittest.mm b/ios/chrome/app/application_delegate/app_state_unittest.mm index 0d09516..132858f 100644 --- a/ios/chrome/app/application_delegate/app_state_unittest.mm +++ b/ios/chrome/app/application_delegate/app_state_unittest.mm
@@ -690,7 +690,7 @@ [[mainTabModel expect] resetSessionMetrics]; id dispatcher = [OCMockObject mockForProtocol:@protocol(ApplicationCommands)]; - [((id<ApplicationCommands>)[dispatcher expect]) openURL:[OCMArg any]]; + [((id<ApplicationCommands>)[dispatcher expect]) openURLInNewTab:[OCMArg any]]; id currentBVC = [OCMockObject mockForClass:[BrowserViewController class]]; stubBrowserState(currentBVC);
diff --git a/ios/chrome/app/main_controller.mm b/ios/chrome/app/main_controller.mm index 30cd9028..64dd26d 100644 --- a/ios/chrome/app/main_controller.mm +++ b/ios/chrome/app/main_controller.mm
@@ -1343,7 +1343,7 @@ OpenNewTabCommand* command = [OpenNewTabCommand commandWithIncognito:(self.currentBVC == self.otrBVC)]; command.userInitiated = NO; - [self.currentBVC.dispatcher openURL:command]; + [self.currentBVC.dispatcher openURLInNewTab:command]; } if (firstRun) { @@ -1544,7 +1544,7 @@ }); } -- (void)openURL:(OpenNewTabCommand*)command { +- (void)openURLInNewTab:(OpenNewTabCommand*)command { if (command.URL.is_valid()) { if ([command fromChrome]) { [self dismissModalsAndOpenSelectedTabInMode:ApplicationMode::NORMAL @@ -1555,11 +1555,9 @@ } else { [self dismissModalDialogsWithCompletion:^{ self.currentBVC = [command inIncognito] ? self.otrBVC : self.mainBVC; - [self.currentBVC webPageOrderedOpen:[command URL] - referrer:[command referrer] - inBackground:[command inBackground] - originPoint:[command originPoint] - appendTo:[command appendTo]]; + DCHECK(self.currentBVC.browserState->IsOffTheRecord() == + command.inIncognito); + [self.currentBVC webPageOrderedOpen:command]; } dismissOmnibox:YES]; } @@ -1883,7 +1881,7 @@ DCHECK(bvc); [bvc expectNewForegroundTab]; self.currentBVC = bvc; - [self openURL:command]; + [self openURLInNewTab:command]; } - (void)startVoiceSearch {
diff --git a/ios/chrome/app/strings/resources/ios_chromium_strings_bn.xtb b/ios/chrome/app/strings/resources/ios_chromium_strings_bn.xtb index f230237..53127ff7 100644 --- a/ios/chrome/app/strings/resources/ios_chromium_strings_bn.xtb +++ b/ios/chrome/app/strings/resources/ios_chromium_strings_bn.xtb
@@ -17,6 +17,7 @@ <translation id="2647554856022461007">Chromium আপনার ব্রাউজিংয়ের অভিজ্ঞতাকে উন্নত করতে ওয়েব পরিষেবাগুলি ব্যবহার করতে পারে৷ আপনি আপনার ইচ্ছা অনুযায়ী এই পরিষেবাগুলিকে অক্ষম করতে পারেন৷ <ph name="BEGIN_LINK" />আরও জানুন<ph name="END_LINK" /></translation> <translation id="2687023731466035790">Chromium-এ Google স্মার্ট পান</translation> <translation id="2730884209570016437">Chromium আপনার ক্যামেরা ব্যবহার করতে পারছে না কারণ এটি অন্য একটি অ্যাপ্লিকেশান দ্বারা ব্যবহার করা হচ্ছে</translation> +<translation id="2797210818057553964">আপনি যেকোনও সময়ে Chromium সেটিংসে এটি কাস্টমাইজ করতে পারেন</translation> <translation id="3256316712990552818">Chromium-এ প্রতিলিপি করা হয়েছে</translation> <translation id="3413120535237193088">সব ডিভাইসে আপনার বুকমার্কগুলি পেতে, Chromium এ প্রবেশ করুন।</translation> <translation id="3473048256428424907">Chromium QR স্ক্যানার চালু করুন</translation> @@ -45,6 +46,7 @@ <translation id="7337881442233988129">Chromium</translation> <translation id="7357211569052832586">Chromium এবং সিঙ্ক করা ডিভাইসগুলি থেকে নির্বাচিত ডেটা সরিয়ে ফেলা হয়েছে। আপনার Google অ্যাকাউন্টের সার্চ এবং অন্যান্য Google পরিষেবাগুলি থেকে অ্যাক্টিভিটির মত অন্যান্য ধরনের ব্রাউজিং ইতিহাস history.google.com এ থাকতে পারে।</translation> <translation id="7400689562045506105">সব জায়গায় Chromium ব্যবহার করুন</translation> +<translation id="7499048969477415415">Chromium-এর মধ্যে যে সেটিংসের মাধ্যমে সিঙ্ক, নিজের মতন করে সাজিয়ে নেওয়া এবং অন্যান্য Google পরিষেবাগুলি নিয়ন্ত্রিত হয় সেটিতে পরিবর্তন করা হয়েছে। এর ফলে আপনার বর্তমান সেটিংস প্রভাবিত হতে পারে।</translation> <translation id="7674213385180944843">সেটিংস > গোপনীয়তা > ক্যামেরা > Chromium খুলুন এবং ক্যামেরা চালু করুন।</translation> <translation id="7746854981345936341">Chromium টিপ। কিছু বোতাম এখন আপনার স্ক্রিনে নিচের দিকে রয়েছে যেমন, ব্যাক, ফরওয়ার্ড এবং সার্চ বোতাম।</translation> <translation id="786327964234957808">আপনি সিঙ্ক অ্যাকাউন্টগুলিকে <ph name="USER_EMAIL1" /> থেকে <ph name="USER_EMAIL2" /> এ সুইচ করছেন। আপনার বিদ্যমান Chromium ডেটা <ph name="DOMAIN" /> দ্বারা পরিচালিত হয়। এটি এই ডিভাইস থেকে আপনার ডেটা মুছে দেবে, কিন্তু <ph name="USER_EMAIL1" /> এ আপনার ডেটা থাকবে।</translation>
diff --git a/ios/chrome/app/strings/resources/ios_chromium_strings_hi.xtb b/ios/chrome/app/strings/resources/ios_chromium_strings_hi.xtb index 08791ced..3e1cdc0d 100644 --- a/ios/chrome/app/strings/resources/ios_chromium_strings_hi.xtb +++ b/ios/chrome/app/strings/resources/ios_chromium_strings_hi.xtb
@@ -5,11 +5,11 @@ <translation id="1185134272377778587">क्रोमियम के बारे में</translation> <translation id="1289966288285062467">क्रोमियम निजता सूचना</translation> <translation id="1341317949260424055">Google को सिस्टम और इस्तेमाल का डेटा भेजकर 'क्रोमियम' और उसकी सुरक्षा को बेहतर बनाएं</translation> -<translation id="1472013873724362412">आपका खाता Chromium पर कार्य नहीं करता. कृपया प्रवेश करने के लिए अपने डोमेन व्यवस्थापक से संपर्क करें या नियमित Google खाते का उपयोग करें.</translation> +<translation id="1472013873724362412">आपका खाता क्रोमियम पर काम नहीं करता. कृपया साइन इन करने के लिए अपने डोमेन व्यवस्थापक से संपर्क करें या नियमित Google खाते का उपयोग करें.</translation> <translation id="1736662517232558588">क्रोमियम का डेटा साफ़ हो गया</translation> <translation id="1838412507805038478">क्रोमियम ने सत्यापित किया है कि इस वेबसाइट का प्रमाणपत्र <ph name="ISSUER" /> ने जारी किया है.</translation> <translation id="1843424232666537147">क्रोमियम में ऐसी सुविधाएं हैं जो आपको अपने इंटरनेट डेटा को प्रबंधित करने और वेबपृष्ठों को तेज़ी से लोड करने में आपकी सहायता करती हैं. <ph name="BEGIN_LINK" />अधिक जानें<ph name="END_LINK" /></translation> -<translation id="2075400798887076382">अपने कंप्यूटर पर खोले गए टैब सीधे यहां से एक्सेस करें. बस अपने कंप्यूटर पर क्रोमियम खोलें, मेनू पर जाएं और “क्रोमियम में प्रवेश करें…” चुनें</translation> +<translation id="2075400798887076382">अपने कंप्यूटर पर खोले गए टैब सीधे यहां से एक्सेस करें. बस अपने कंप्यूटर पर क्रोमियम खोलें, मेनू पर जाएं और “क्रोमियम में साइन इन करें…” चुनें</translation> <translation id="2168108852149185974">कुछ ऐड-ऑन के कारण क्रोमियम क्रैश हो जाता है. कृपया इन्हें अनइंस्टॉल करें:</translation> <translation id="2178608107313874732">क्रोमियम इस समय आपके कैमरे का उपयोग नहीं कर सकता</translation> <translation id="2195025571279539885">क्या आप चाहते हैं कि Chromium अगली बार इस साइट के <ph name="LANGUAGE_NAME" /> पृष्ठों का अनुवाद करने का ऑफ़र दे?</translation> @@ -22,7 +22,7 @@ <translation id="3473048256428424907">क्रोमियम QR स्कैनर चालू करें</translation> <translation id="3605252743693911722">अपने सभी डिवाइस पर अपने बुकमार्क, पासवर्ड आदि पाने के लिए क्रोमियम में प्रवेश करें.</translation> <translation id="3805899903892079518">Chromium के पास आपकी फ़ोटो या वीडियो का एक्सेस नहीं है. iOS सेटिंग > निजता > फ़ोटो में एक्सेस सक्षम करें.</translation> -<translation id="4024541897090868497">अपने सभी डिवाइस पर अपने टैब पाने के लिए, क्रोमियम में प्रवेश करें.</translation> +<translation id="4024541897090868497">अपने सभी डिवाइस पर अपने टैब पाने के लिए, क्रोमियम में साइन इन करें.</translation> <translation id="4157467675761413638">क्रोमियम के लिए सलाह. ज़्यादा टैब विकल्पोंं के लिए, टूलबार में 'टैब दिखाएं' बटन को दबाकर रखें, जो आपकी स्क्रीन में सबसे नीचे या सबसे ऊपर होगा.</translation> <translation id="4241912885070669028">आप <ph name="SIGNOUT_MANAGED_DOMAIN" /> द्वारा प्रबंधित खाते से प्रस्थान कर रहे हैं. इससे आपका क्रोमियम डेटा इस डिवाइस से हट जाएगा, लेकिन आपका डेटा आपके Google खाते में बना रहेगा.</translation> <translation id="4272892696084633551">क्रोमियम की सुविधाओं और प्रदर्शन को बेहतर बनाने में सहायता करें</translation> @@ -55,6 +55,6 @@ <translation id="8508544542427105412"><ph name="BEGIN_LINK" />सेटिंग<ph name="END_LINK" /> कभी भी पसंद के मुताबिक बनाई जा सकती हैं. Google उन साइटों की सामग्री, जिन पर आप जाते हैं, आपकी ब्राउज़िंग गतिविधि और इंटरैक्शन का इस्तेमाल 'क्रोमियम' और दूसरी 'Google सेवाओं', जैसे कि अनुवाद, खोज और विज्ञापनों को आपकी पसंद के मुताबिक बनाने के लिए कर सकता है.</translation> <translation id="8586442755830160949">कॉपीराइट <ph name="YEAR" /> The Chromium Authors. सर्वाधिकार सुरक्षित.</translation> <translation id="8809780021347235332">चित्रों को सहेजने हेतु, क्रोमियम को अपने फ़ोटो का उपयोग करने देने के लिए सेटिंग पर टैप करें</translation> -<translation id="9022552996538154597">क्रोमियम में प्रवेश करें</translation> +<translation id="9022552996538154597">क्रोमियम में साइन इन करें</translation> <translation id="985602178874221306">क्रोमियम लेखक</translation> </translationbundle> \ No newline at end of file
diff --git a/ios/chrome/app/strings/resources/ios_chromium_strings_iw.xtb b/ios/chrome/app/strings/resources/ios_chromium_strings_iw.xtb index b3eb7a7f..2743c3d7 100644 --- a/ios/chrome/app/strings/resources/ios_chromium_strings_iw.xtb +++ b/ios/chrome/app/strings/resources/ios_chromium_strings_iw.xtb
@@ -17,6 +17,7 @@ <translation id="2647554856022461007">Chromium עשוי להשתמש בשירותי אינטרנט לשיפור חוויית הגלישה. ניתן להשבית את השירותים האלה. <ph name="BEGIN_LINK" />למידע נוסף<ph name="END_LINK" /></translation> <translation id="2687023731466035790">קבלת גישה אל תכונות חכמות של Google ב-Chromium</translation> <translation id="2730884209570016437">Chromium לא יכול להשתמש במצלמה כי אפליקציה אחרת משתמשת בה</translation> +<translation id="2797210818057553964">אפשר תמיד להתאים אישית דרך הגדרות Chromium</translation> <translation id="3256316712990552818">הועתק אל Chromium</translation> <translation id="3413120535237193088">היכנס ל-Chromium כדי לקבל גישה אל הסימניות שלך בכל המכשירים.</translation> <translation id="3473048256428424907">הפעלת סורק ה-QR של Chromium</translation> @@ -45,6 +46,7 @@ <translation id="7337881442233988129">Chromium</translation> <translation id="7357211569052832586">הנתונים שבחרת הוסרו מ-Chromium ומהמכשירים המסונכרנים. ייתכן שבכתובת history.google.com תוכל לגשת לסוגים אחרים של היסטוריית גלישה בחשבון Google, כמו חיפושים ופעילות משירותי Google אחרים.</translation> <translation id="7400689562045506105">אפשר להשתמש ב-Chromium בכל מקום</translation> +<translation id="7499048969477415415">ההגדרות ששולטות בסנכרון, בהתאמה אישית ובשירותים אחרים של Google ב-Chromium השתנו. השינוי עשוי להשפיע על ההגדרות הנוכחיות שלך.</translation> <translation id="7674213385180944843">עבור אל 'הגדרות' > 'פרטיות' > 'מצלמה' > Chromium והפעל את המצלמה.</translation> <translation id="7746854981345936341">טיפ למשתמשי Chromium. חלק מהלחצנים נמצאים עכשיו בחלק התחתון של המסך, כמו 'הקודם', 'קדימה' ו'חיפוש'.</translation> <translation id="786327964234957808">אתה עובר מחשבון סינכרון <ph name="USER_EMAIL1" /> אל <ph name="USER_EMAIL2" />. נתוני Chromium הקיימים שלך מנוהלים על-ידי <ph name="DOMAIN" />. פעולה זו תמחק את הנתונים שלך מהמכשיר הזה, אבל הם יישארו ב-<ph name="USER_EMAIL1" />.</translation>
diff --git a/ios/chrome/app/strings/resources/ios_chromium_strings_no.xtb b/ios/chrome/app/strings/resources/ios_chromium_strings_no.xtb index 4d59d0d..239d0715 100644 --- a/ios/chrome/app/strings/resources/ios_chromium_strings_no.xtb +++ b/ios/chrome/app/strings/resources/ios_chromium_strings_no.xtb
@@ -17,6 +17,7 @@ <translation id="2647554856022461007">Chromium kan bruke nettjenester for å forbedre brukeropplevelsen din på nettet. Du kan slå av disse tjenestene. <ph name="BEGIN_LINK" />Finn ut mer<ph name="END_LINK" /></translation> <translation id="2687023731466035790">Få smarte funksjoner fra Google i Chromium</translation> <translation id="2730884209570016437">Chromium kan ikke bruke kameraet fordi det brukes av en annen app</translation> +<translation id="2797210818057553964">Du kan når som helst tilpasse dette i Chromium-innstillingene</translation> <translation id="3256316712990552818">Kopiert til Chromium</translation> <translation id="3413120535237193088">Logg på Chromium for å få bokmerkene dine på alle enhetene du bruker.</translation> <translation id="3473048256428424907">Slå på Chromium QR-skanneren</translation> @@ -45,6 +46,7 @@ <translation id="7337881442233988129">Chromium</translation> <translation id="7357211569052832586">De valgte dataene er fjernet fra Chromium og alle synkroniserte enheter. Det kan hende Google-kontoen din har andre typer nettlesingslogger, for eksempel for søk og aktivitet fra andre Google-tjenester, på history.google.com.</translation> <translation id="7400689562045506105">Bruk Chromium overalt</translation> +<translation id="7499048969477415415">Innstillingene som kontrollerer synkronisering, personlig tilpasning og andre Google-tjenester i Chromium, er blitt endret. Dette kan påvirke de nåværende innstillingene dine.</translation> <translation id="7674213385180944843">Åpne Innstillinger > Personvern > Kamera > Chromium, og slå på kameraet.</translation> <translation id="7746854981345936341">Chromium-tips. Noen knapper, slik som Tilbake, Frem og Søk, er nå nederst på skjermen.</translation> <translation id="786327964234957808">Du bytter synkroniseringskonto fra <ph name="USER_EMAIL1" /> til <ph name="USER_EMAIL2" />. De eksisterende Chromium-dataene dine administreres av <ph name="DOMAIN" />. Dette fører til at dataene dine slettes fra denne enheten, men de blir værende i <ph name="USER_EMAIL1" />.</translation>
diff --git a/ios/chrome/app/strings/resources/ios_google_chrome_strings_hi.xtb b/ios/chrome/app/strings/resources/ios_google_chrome_strings_hi.xtb index 484a759f..1c97aac5 100644 --- a/ios/chrome/app/strings/resources/ios_google_chrome_strings_hi.xtb +++ b/ios/chrome/app/strings/resources/ios_google_chrome_strings_hi.xtb
@@ -2,7 +2,7 @@ <!DOCTYPE translationbundle> <translationbundle lang="hi"> <translation id="114721135501989771">Chrome में Google स्मार्ट पाएं</translation> -<translation id="1326317727527857210">अपने अन्य डिवाइस से अपने टैब प्राप्त करने के लिए, Chrome में प्रवेश करें.</translation> +<translation id="1326317727527857210">अपने अन्य डिवाइस से अपने टैब पाने के लिए, Chrome में साइन इन करें.</translation> <translation id="1759842336958782510">Chrome</translation> <translation id="1816764564654397850">Google Chrome निजता सूचना</translation> <translation id="1863312987075920112">इस ऐप्लिकेशन का इस्तेमाल करके, आप Chrome की <ph name="BEGIN_LINK_TOS" />सेवा की शर्तों<ph name="END_LINK_TOS" /> और <ph name="BEGIN_LINK_PRIVACY" />निजता सूचना<ph name="END_LINK_PRIVACY" /> से सहमत होते हैं.</translation> @@ -18,7 +18,7 @@ <translation id="2943166482989655199">Google को सिस्टम और इस्तेमाल का डेटा भेजकर Chrome और उसकी सुरक्षा को बेहतर बनाएं</translation> <translation id="3148434565183091099">अपने सभी डिवाइस पर अपने बुकमार्क प्राप्त करने के लिए, Chrome में प्रवेश करें.</translation> <translation id="3148688391461398285">अपने स्थान के आधार पर Chrome में बेहतर अनुभव प्राप्त करें.</translation> -<translation id="3167189358072330585">आपका खाता Google Chrome पर कार्य नहीं करता. कृपया प्रवेश करने के लिए अपने डोमेन व्यवस्थापक से संपर्क करें या नियमित Google खाते का उपयोग करें.</translation> +<translation id="3167189358072330585">आपका खाता Google Chrome पर काम नहीं करता. कृपया साइन इन करने के लिए अपने डोमेन व्यवस्थापक से संपर्क करें या नियमित Google खाते का उपयोग करें.</translation> <translation id="3196546062792660320">Chrome आपके खातों को वेब पर लाकर आपका समय बचाता है. आप सेटिंग में खाते जोड़ सकते हैं या उन्हें निकाल सकते हैं.</translation> <translation id="3282568296779691940">Chrome में प्रवेश करें</translation> <translation id="3345341804167540816">Chrome का सभी जगह उपयोग करना</translation> @@ -47,7 +47,7 @@ <translation id="690638524486313356">Google Chrome सेवा की शर्तें</translation> <translation id="7165736900384873061">Google Chrome QR स्कैनर उपयोग शुरू करें</translation> <translation id="7172660552945675509">टिप्स: <ph name="BEGIN_LINK" />Chrome को अपने डॉक में ले जाएं<ph name="END_LINK" /></translation> -<translation id="7265369419224458312">अपने कंप्यूटर पर आपके द्वारा खोले गए टैब सीधे यहां से एेक्सेस करें. बस अपने कंप्यूटर पर Chrome खोलें, मेनू पर जाएं और "Chrome में प्रवेश करें…" चुनें</translation> +<translation id="7265369419224458312">अपने कंप्यूटर पर आपके खोले हुए टैब सीधे यहां से एेक्सेस करें. बस अपने कंप्यूटर पर Chrome खोलें, मेनू पर जाएं और "Chrome में साइन इन करें…" चुनें</translation> <translation id="728488472449859922">Google Chrome QR स्कैनर चालू करें</translation> <translation id="7400722733683201933">Google Chrome के बारे में</translation> <translation id="7437998757836447326">Chrome से प्रस्थान करें</translation>
diff --git a/ios/chrome/app/strings/resources/ios_strings_bn.xtb b/ios/chrome/app/strings/resources/ios_strings_bn.xtb index a5ffd76b..9cf02d4 100644 --- a/ios/chrome/app/strings/resources/ios_strings_bn.xtb +++ b/ios/chrome/app/strings/resources/ios_strings_bn.xtb
@@ -167,6 +167,7 @@ <translation id="3588820906588687999">নতুন ট্যাবে ছবি খুলুন</translation> <translation id="3603009562372709545">লিঙ্ক URL কপি করুন</translation> <translation id="3607167657931203000">ডেটা স্বতঃপূর্ণ করুন</translation> +<translation id="360930808415985584">সিঙ্ক, নিজের মতন করে সাজিয়ে নেওয়া এবং আরও অনেক কিছু নিয়ন্ত্রণ করুন</translation> <translation id="3609785682760573515">সিঙ্ক হচ্ছে...</translation> <translation id="3628119975092896051">আপনার পড়ার তালিকা অফলাইনে উপলব্ধ। আপনার পড়ার তালিকায় কোনো পৃষ্ঠা যোগ করতে <ph name="SHARE_OPENING_ICON" /> আলতো চাপুন।</translation> <translation id="3638472932233958418">পূর্বলোড ওয়েবপৃষ্ঠা</translation> @@ -213,6 +214,7 @@ <translation id="4508750114462689118">সাইন-ইন প্রচার বন্ধ করুন</translation> <translation id="4526249700380860531"><ph name="BEGIN_LINK" />passwords.google.com<ph name="END_LINK" /> এ গিয়ে সংরক্ষণ করা পাসওয়ার্ডগুলি দেখুন ও পরিচালনা করুন</translation> <translation id="4536418791685807335">আবার সাইন ইন করার চেষ্টা করুন।</translation> +<translation id="4541241553780729349">Google-এ সিঙ্ক করা ডেটা এবং আপনার ব্যবহার করা বৈশিষ্ট্য পরিবর্তন হবে না</translation> <translation id="457386861538956877">আরও...</translation> <translation id="461440297010471931">Google এর মাধ্যমে সার্চ করা হচ্ছে</translation> <translation id="4619615317237390068">অন্যান্য ডিভাইসগুলি থেকে ট্যাব</translation>
diff --git a/ios/chrome/app/strings/resources/ios_strings_hi.xtb b/ios/chrome/app/strings/resources/ios_strings_hi.xtb index e2365dd4..0a50ca89 100644 --- a/ios/chrome/app/strings/resources/ios_strings_hi.xtb +++ b/ios/chrome/app/strings/resources/ios_strings_hi.xtb
@@ -66,7 +66,7 @@ <translation id="1886928167269928266">शुरुआत से</translation> <translation id="1911619930368729126">Google डिस्क पर अपलोड करें</translation> <translation id="1941314575388338491">कॉपी करने के लिए डबल टैप करें.</translation> -<translation id="1952728750904661634">प्रबंधित खाते से प्रवेश करें</translation> +<translation id="1952728750904661634">प्रबंधित खाते से साइन इन करें</translation> <translation id="1974060860693918893">उन्नत</translation> <translation id="1989112275319619282">ब्राउज़ करें</translation> <translation id="2015722694326466240">पासवर्ड देखने के लिए, आपको सबसे पहले अपने डिवाइस पर एक पासकोड सेट करना होगा.</translation> @@ -128,7 +128,7 @@ <translation id="2923448633003185837">चिपकाएं और जाएं</translation> <translation id="292639812446257861">अपठित चिह्नित करें</translation> <translation id="2933759065870693102">टॉर्च</translation> -<translation id="2969979262385602596">प्रवेश करने में विफल. बाद में पुन: प्रयास करें.</translation> +<translation id="2969979262385602596">साइन इन करने में विफल. बाद में फिर से प्रयास करें.</translation> <translation id="2989805286512600854">नए टैब में खोलें</translation> <translation id="3024255823539804759">पिछला दिन</translation> <translation id="3037605927509011580">हे भगवान!</translation> @@ -180,7 +180,7 @@ <translation id="3897092660631435901">मेनू</translation> <translation id="3915450441834151894">साइट की जानकारी</translation> <translation id="3928666092801078803">मेरा डेटा संयोजित करें</translation> -<translation id="3950820424414687140">प्रवेश करें</translation> +<translation id="3950820424414687140">साइन इन करें</translation> <translation id="3963231839620026525">नया गुप्त टैब</translation> <translation id="3967822245660637423">डाउनलोड पूर्ण</translation> <translation id="3989635538409502728">प्रस्थान करें</translation> @@ -211,7 +211,7 @@ <translation id="441868831736628555">निजता सूचना</translation> <translation id="4460091562821778167">मुझसे हर बार पूछें कि कौन से ऐप का उपयोग करना है</translation> <translation id="4496373720959965247">टैब जोड़ें और पेज के बीच स्विच करें</translation> -<translation id="4508750114462689118">प्रवेश प्रोमो बंद करें</translation> +<translation id="4508750114462689118">साइन इन प्रोमो बंद करें</translation> <translation id="4526249700380860531">सहेजे गए पासवर्ड <ph name="BEGIN_LINK" />passwords.google.com<ph name="END_LINK" /> पर देखें और प्रबंधित करें</translation> <translation id="4536418791685807335">फिर से प्रवेश करके देखें.</translation> <translation id="4541241553780729349">Google में आपके सिंक किए गए डेटा और आपकी इस्तेमाल की जा रही सुविधाओं में कोई बदलाव नहीं होगा</translation> @@ -235,7 +235,7 @@ <translation id="4904877109095351937">पढ़ी गईं चिह्नित करें</translation> <translation id="4930268273022498155">मौजूदा डेटा हटाएं. आप <ph name="USER_EMAIL1" /> पर वापस जाकर उसे पुनर्प्राप्त कर सकते हैं.</translation> <translation id="4941089862236492464">क्षमा करें, आपके आइटम को शेयर करने में कोई समस्या हुई.</translation> -<translation id="4979397965658815378">अपने सभी डिवाइस पर अपने बुकमार्क, पासवर्ड, इतिहास और अन्य सेटिंग प्राप्त करने के लिए अपने Google खाते से प्रवेश करें</translation> +<translation id="4979397965658815378">अपने सभी डिवाइस पर अपने बुकमार्क, पासवर्ड, इतिहास और अन्य सेटिंग पाने के लिए अपने Google खाते से साइन इन करें</translation> <translation id="5004416275253351869">Google गतिविधि नियंत्रण</translation> <translation id="5005498671520578047">पासवर्ड कॉपी करें</translation> <translation id="5010803260590204777">निजी रूप से वेब ब्राउज़ करने के लिए गुप्त टैब खोलें.</translation> @@ -314,7 +314,7 @@ <translation id="6255097610484507482">क्रेडिट कार्ड संपादित करें</translation> <translation id="6308436439357671616">इससे आप फ़ोटो ले सकते हैं और अपलोड कर सकते हैं.</translation> <translation id="6324528485781869530">सिंक खाता स्विच करें</translation> -<translation id="6324669097367352121">सेटिंग में प्रवेश करें</translation> +<translation id="6324669097367352121">सेटिंग में साइन इन करें</translation> <translation id="6337234675334993532">सुरक्षित तरीका</translation> <translation id="633809752005859102">वास्तव में कुछ गलत हो गया है. हम उस पर काम करेंगे.</translation> <translation id="6342069812937806050">अभी</translation> @@ -408,7 +408,7 @@ <translation id="7918293828610777738">आपकी पढ़ने की सूची ऑफ़लाइन उपलब्ध है. अपनी पढ़ने की सूची में कोई पेज जोड़ने के लिए, पहले <ph name="SHARE_OPENING_ICON" /> पर और फिर <ph name="READ_LATER_TEXT" /> पर टैप करें.</translation> <translation id="7938254975914653459">FaceTime</translation> <translation id="7939128259257418052">पासवर्ड निर्यात करें...</translation> -<translation id="7947953824732555851">स्वीकार करें और प्रवेश करें</translation> +<translation id="7947953824732555851">स्वीकार करें और साइन इन करें</translation> <translation id="7961015016161918242">कभी नहीं</translation> <translation id="7971521879845308059">पॉप-अप अवरोधित करें</translation> <translation id="7981313251711023384">ज़्यादा तेज़ी से ब्राउज़ करने और खोजने के लिए पेज पहले से लोड करें</translation>
diff --git a/ios/chrome/app/strings/resources/ios_strings_iw.xtb b/ios/chrome/app/strings/resources/ios_strings_iw.xtb index 0e24ce9..856e2715 100644 --- a/ios/chrome/app/strings/resources/ios_strings_iw.xtb +++ b/ios/chrome/app/strings/resources/ios_strings_iw.xtb
@@ -167,6 +167,7 @@ <translation id="3588820906588687999">פתח את התמונה בכרטיסייה חדשה</translation> <translation id="3603009562372709545">העתק כתובת אתר של קישור</translation> <translation id="3607167657931203000">נתוני מילוי אוטומטי</translation> +<translation id="360930808415985584">שליטה בסנכרון, התאמה אישית ועוד</translation> <translation id="3609785682760573515">מסנכרן ...</translation> <translation id="3628119975092896051">אפשר לגשת לרשימת הקריאה במצב לא מקוון. כדי להוסיף דף לרשימת הקריאה, הקש על <ph name="SHARE_OPENING_ICON" />.</translation> <translation id="3638472932233958418">טעינה מראש של דפי אינטרנט</translation> @@ -213,6 +214,7 @@ <translation id="4508750114462689118">סגירת קידום הכניסה</translation> <translation id="4526249700380860531">הצג ונהל סיסמאות שמורות ב-<ph name="BEGIN_LINK" />passwords.google.com<ph name="END_LINK" /></translation> <translation id="4536418791685807335">נסה להיכנס שוב.</translation> +<translation id="4541241553780729349">סנכרון הנתונים עם Google והתכונות שבהן בחרת להשתמש לא ישתנו</translation> <translation id="457386861538956877">עוד...</translation> <translation id="461440297010471931">חיפוש באמצעות Google</translation> <translation id="4619615317237390068">כרטיסיות ממכשירים אחרים</translation>
diff --git a/ios/chrome/app/strings/resources/ios_strings_no.xtb b/ios/chrome/app/strings/resources/ios_strings_no.xtb index f98808b..ecc174c 100644 --- a/ios/chrome/app/strings/resources/ios_strings_no.xtb +++ b/ios/chrome/app/strings/resources/ios_strings_no.xtb
@@ -167,6 +167,7 @@ <translation id="3588820906588687999">Åpne bildet i en ny fane</translation> <translation id="3603009562372709545">Kopiér linkadressen</translation> <translation id="3607167657931203000">Autofylldata</translation> +<translation id="360930808415985584">Kontrollér synkronisering, personlig tilpasning med mer</translation> <translation id="3609785682760573515">Synkroniserer …</translation> <translation id="3628119975092896051">Leselisten din er tilgjengelig uten nett. Du kan legge til sider i leselisten ved å trykke på <ph name="SHARE_OPENING_ICON" />.</translation> <translation id="3638472932233958418">Last inn nettsider på forhånd</translation> @@ -213,6 +214,7 @@ <translation id="4508750114462689118">Lukk påloggingskampanjen</translation> <translation id="4526249700380860531">Se på og administrer lagrede passord på <ph name="BEGIN_LINK" />passwords.google.com<ph name="END_LINK" /></translation> <translation id="4536418791685807335">Prøv å logge på igjen.</translation> +<translation id="4541241553780729349">Dataen som synkroniseres til Google og funksjonene du bruker, endres ikke</translation> <translation id="457386861538956877">Mer</translation> <translation id="461440297010471931">Søker med Google</translation> <translation id="4619615317237390068">Faner fra andre enheter</translation>
diff --git a/ios/chrome/app/strings/resources/ios_strings_sr.xtb b/ios/chrome/app/strings/resources/ios_strings_sr.xtb index ccc5796..acca328 100644 --- a/ios/chrome/app/strings/resources/ios_strings_sr.xtb +++ b/ios/chrome/app/strings/resources/ios_strings_sr.xtb
@@ -214,7 +214,7 @@ <translation id="4508750114462689118">Затвори промоцију за пријављивање</translation> <translation id="4526249700380860531">Прегледајте сачуване лозинке и управљајте њима на <ph name="BEGIN_LINK" />passwords.google.com<ph name="END_LINK" /></translation> <translation id="4536418791685807335">Пробајте поново да се пријавите.</translation> -<translation id="4541241553780729349">Подаци које синхронизујете са Google-ом и функције које користите неће се мењати</translation> +<translation id="4541241553780729349">Подаци које синхронизујете са Google-ом и функције које користите се неће мењати</translation> <translation id="457386861538956877">Још...</translation> <translation id="461440297010471931">Претражујете помоћу Google-а</translation> <translation id="4619615317237390068">Картице са других уређаја</translation>
diff --git a/ios/chrome/browser/bookmarks/bookmark_sync_service_factory.cc b/ios/chrome/browser/bookmarks/bookmark_sync_service_factory.cc index ed02486..672d50e 100644 --- a/ios/chrome/browser/bookmarks/bookmark_sync_service_factory.cc +++ b/ios/chrome/browser/bookmarks/bookmark_sync_service_factory.cc
@@ -41,7 +41,8 @@ ios::ChromeBrowserState::FromBrowserState(context); std::unique_ptr<sync_bookmarks::BookmarkSyncService> bookmark_sync_service( new sync_bookmarks::BookmarkSyncService( - BookmarkUndoServiceFactory::GetForBrowserState(browser_state))); + BookmarkUndoServiceFactory::GetForBrowserStateIfExists( + browser_state))); return bookmark_sync_service; }
diff --git a/ios/chrome/browser/passwords/ios_chrome_password_manager_infobar_delegate.mm b/ios/chrome/browser/passwords/ios_chrome_password_manager_infobar_delegate.mm index 44fa56f..379236c 100644 --- a/ios/chrome/browser/passwords/ios_chrome_password_manager_infobar_delegate.mm +++ b/ios/chrome/browser/passwords/ios_chrome_password_manager_infobar_delegate.mm
@@ -52,6 +52,6 @@ inIncognito:NO inBackground:NO appendTo:kCurrentTab]; - [dispatcher_ openURL:command]; + [dispatcher_ openURLInNewTab:command]; return true; };
diff --git a/ios/chrome/browser/sync/ios_chrome_sync_client.mm b/ios/chrome/browser/sync/ios_chrome_sync_client.mm index 617f1d5b..c485c80 100644 --- a/ios/chrome/browser/sync/ios_chrome_sync_client.mm +++ b/ios/chrome/browser/sync/ios_chrome_sync_client.mm
@@ -50,6 +50,7 @@ #include "ios/chrome/browser/application_context.h" #include "ios/chrome/browser/autofill/personal_data_manager_factory.h" #include "ios/chrome/browser/bookmarks/bookmark_model_factory.h" +#include "ios/chrome/browser/bookmarks/bookmark_sync_service_factory.h" #include "ios/chrome/browser/browser_state/chrome_browser_state.h" #include "ios/chrome/browser/browser_state/chrome_browser_state_manager.h" #include "ios/chrome/browser/chrome_url_constants.h" @@ -182,7 +183,8 @@ ui::GetDeviceFormFactor() == ui::DEVICE_FORM_FACTOR_TABLET, prefs::kSavingBrowserHistoryDisabled, web::WebThread::GetTaskRunnerForThread(web::WebThread::UI), db_thread_, - profile_web_data_service_, account_web_data_service_, password_store_)); + profile_web_data_service_, account_web_data_service_, password_store_, + ios::BookmarkSyncServiceFactory::GetForBrowserState(browser_state_))); } } @@ -369,6 +371,7 @@ case syncer::AUTOFILL_PROFILE: case syncer::AUTOFILL_WALLET_DATA: case syncer::AUTOFILL_WALLET_METADATA: + case syncer::BOOKMARKS: case syncer::TYPED_URLS: NOTREACHED(); return base::WeakPtr<syncer::ModelTypeControllerDelegate>();
diff --git a/ios/chrome/browser/sync/profile_sync_service_factory.cc b/ios/chrome/browser/sync/profile_sync_service_factory.cc index 5e483061..4653da9 100644 --- a/ios/chrome/browser/sync/profile_sync_service_factory.cc +++ b/ios/chrome/browser/sync/profile_sync_service_factory.cc
@@ -19,6 +19,7 @@ #include "ios/chrome/browser/application_context.h" #include "ios/chrome/browser/autofill/personal_data_manager_factory.h" #include "ios/chrome/browser/bookmarks/bookmark_model_factory.h" +#include "ios/chrome/browser/bookmarks/bookmark_sync_service_factory.h" #include "ios/chrome/browser/browser_state/chrome_browser_state.h" #include "ios/chrome/browser/favicon/favicon_service_factory.h" #include "ios/chrome/browser/gcm/ios_chrome_gcm_profile_service_factory.h" @@ -102,6 +103,7 @@ DependsOn(ConsentAuditorFactory::GetInstance()); DependsOn(ios::AboutSigninInternalsFactory::GetInstance()); DependsOn(ios::BookmarkModelFactory::GetInstance()); + DependsOn(ios::BookmarkSyncServiceFactory::GetInstance()); DependsOn(ios::BookmarkUndoServiceFactory::GetInstance()); DependsOn(ios::FaviconServiceFactory::GetInstance()); DependsOn(ios::HistoryServiceFactory::GetInstance());
diff --git a/ios/chrome/browser/ui/authentication/authentication_constants.mm b/ios/chrome/browser/ui/authentication/authentication_constants.mm index 8257d4c..d805cc41b 100644 --- a/ios/chrome/browser/ui/authentication/authentication_constants.mm +++ b/ios/chrome/browser/ui/authentication/authentication_constants.mm
@@ -12,7 +12,7 @@ const CGFloat kAuthenticationHeaderImageWidth = 360.; const UIFontTextStyle kAuthenticationTitleFontStyle = UIFontTextStyleTitle2; -const UIFontTextStyle kAuthenticationTextFontStyle = UIFontTextStyleCaption1; +const UIFontTextStyle kAuthenticationTextFontStyle = UIFontTextStyleFootnote; const int kAuthenticationHeaderBackgroundColor = 0xf8f9fa; const CGFloat kAuthenticationHorizontalMargin = 16.;
diff --git a/ios/chrome/browser/ui/authentication/unified_consent/identity_chooser/BUILD.gn b/ios/chrome/browser/ui/authentication/unified_consent/identity_chooser/BUILD.gn index ff6de94b0..c5f60913 100644 --- a/ios/chrome/browser/ui/authentication/unified_consent/identity_chooser/BUILD.gn +++ b/ios/chrome/browser/ui/authentication/unified_consent/identity_chooser/BUILD.gn
@@ -28,12 +28,18 @@ sources = [ "identity_chooser_add_account_item.h", "identity_chooser_add_account_item.mm", + "identity_chooser_animator.h", + "identity_chooser_animator.mm", "identity_chooser_cell.h", "identity_chooser_cell.mm", "identity_chooser_header_item.h", "identity_chooser_header_item.mm", "identity_chooser_item.h", "identity_chooser_item.mm", + "identity_chooser_presentation_controller.h", + "identity_chooser_presentation_controller.mm", + "identity_chooser_transition_delegate.h", + "identity_chooser_transition_delegate.mm", "identity_chooser_view_controller.h", "identity_chooser_view_controller.mm", "identity_chooser_view_controller_presentation_delegate.h", @@ -49,6 +55,8 @@ "//ios/chrome/browser", "//ios/chrome/browser/ui:ui_util", "//ios/chrome/browser/ui/colors", + "//ios/chrome/browser/ui/image_util", + "//ios/chrome/browser/ui/resources:menu_shadow", "//ios/chrome/browser/ui/table_view/cells", "//ios/chrome/browser/ui/util", "//ios/chrome/common",
diff --git a/ios/chrome/browser/ui/authentication/unified_consent/identity_chooser/identity_chooser_animator.h b/ios/chrome/browser/ui/authentication/unified_consent/identity_chooser/identity_chooser_animator.h new file mode 100644 index 0000000..10ab3cdc --- /dev/null +++ b/ios/chrome/browser/ui/authentication/unified_consent/identity_chooser/identity_chooser_animator.h
@@ -0,0 +1,23 @@ +// 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 IOS_CHROME_BROWSER_UI_AUTHENTICATION_UNIFIED_CONSENT_IDENTITY_CHOOSER_IDENTITY_CHOOSER_ANIMATOR_H_ +#define IOS_CHROME_BROWSER_UI_AUTHENTICATION_UNIFIED_CONSENT_IDENTITY_CHOOSER_IDENTITY_CHOOSER_ANIMATOR_H_ + +#import <UIKit/UIKit.h> + +// Animator, taking care of the animation of the IdentityChooser. +@interface IdentityChooserAnimator + : NSObject<UIViewControllerAnimatedTransitioning> + +// Whether the IdentityChooser is |appearing|. +@property(nonatomic, assign) BOOL appearing; + +// Origin of the animation, in window coordinates. Only user if |appearing| is +// true. Not user if equals to CGPointZero. +@property(nonatomic, assign) CGPoint origin; + +@end + +#endif // IOS_CHROME_BROWSER_UI_AUTHENTICATION_UNIFIED_CONSENT_IDENTITY_CHOOSER_IDENTITY_CHOOSER_ANIMATOR_H_
diff --git a/ios/chrome/browser/ui/authentication/unified_consent/identity_chooser/identity_chooser_animator.mm b/ios/chrome/browser/ui/authentication/unified_consent/identity_chooser/identity_chooser_animator.mm new file mode 100644 index 0000000..26acc9c --- /dev/null +++ b/ios/chrome/browser/ui/authentication/unified_consent/identity_chooser/identity_chooser_animator.mm
@@ -0,0 +1,78 @@ +// 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. + +#import "ios/chrome/browser/ui/authentication/unified_consent/identity_chooser/identity_chooser_animator.h" + +#if !defined(__has_feature) || !__has_feature(objc_arc) +#error "This file requires ARC support." +#endif + +namespace { +const CGFloat kAnimationDuration = 0.25; +const CGFloat kDamping = 0.85; +const CGFloat kScaleFactor = 0.1; +} // namespace + +@implementation IdentityChooserAnimator + +@synthesize appearing = _appearing; +@synthesize origin = _origin; + +#pragma mark - UIViewControllerAnimatedTransitioning + +- (void)animateTransition: + (id<UIViewControllerContextTransitioning>)transitionContext { + // The VC being presented/dismissed and its view. + UIViewController* presentedViewController = [transitionContext + viewControllerForKey:self.appearing + ? UITransitionContextToViewControllerKey + : UITransitionContextFromViewControllerKey]; + UIView* presentedView = [transitionContext + viewForKey:self.appearing ? UITransitionContextToViewKey + : UITransitionContextFromViewKey]; + + UIView* containerView = [transitionContext containerView]; + if (self.appearing) { + [containerView addSubview:presentedView]; + presentedView.frame = + [transitionContext finalFrameForViewController:presentedViewController]; + } + CGPoint endCenter = presentedView.center; + CGAffineTransform finalTransform; + CGAffineTransform scaleDown = + CGAffineTransformMakeScale(kScaleFactor, kScaleFactor); + + if (self.appearing) { + if (!CGPointEqualToPoint(self.origin, CGPointZero)) { + presentedView.center = + [containerView convertPoint:self.origin fromView:nil]; + } + presentedView.alpha = 0; + presentedView.transform = scaleDown; + finalTransform = CGAffineTransformIdentity; + } else { + finalTransform = scaleDown; + } + + [UIView animateWithDuration:kAnimationDuration + delay:0 + usingSpringWithDamping:kDamping + initialSpringVelocity:0 + options:0 + animations:^{ + presentedView.center = endCenter; + presentedView.transform = finalTransform; + presentedView.alpha = self.appearing ? 1 : 0; + } + completion:^(BOOL finished) { + [transitionContext completeTransition:YES]; + }]; +} + +- (NSTimeInterval)transitionDuration: + (id<UIViewControllerContextTransitioning>)transitionContext { + return kAnimationDuration; +} + +@end
diff --git a/ios/chrome/browser/ui/authentication/unified_consent/identity_chooser/identity_chooser_coordinator.h b/ios/chrome/browser/ui/authentication/unified_consent/identity_chooser/identity_chooser_coordinator.h index f49328e..468c5f1680 100644 --- a/ios/chrome/browser/ui/authentication/unified_consent/identity_chooser/identity_chooser_coordinator.h +++ b/ios/chrome/browser/ui/authentication/unified_consent/identity_chooser/identity_chooser_coordinator.h
@@ -19,6 +19,8 @@ @property(nonatomic, strong) ChromeIdentity* selectedIdentity; // Delegate. @property(nonatomic, weak) id<IdentityChooserCoordinatorDelegate> delegate; +// Origin of the animation for the IdentityChooser. +@property(nonatomic, assign) CGPoint origin; @end
diff --git a/ios/chrome/browser/ui/authentication/unified_consent/identity_chooser/identity_chooser_coordinator.mm b/ios/chrome/browser/ui/authentication/unified_consent/identity_chooser/identity_chooser_coordinator.mm index 2d341246..0aa318d 100644 --- a/ios/chrome/browser/ui/authentication/unified_consent/identity_chooser/identity_chooser_coordinator.mm +++ b/ios/chrome/browser/ui/authentication/unified_consent/identity_chooser/identity_chooser_coordinator.mm
@@ -7,6 +7,7 @@ #include "base/logging.h" #import "ios/chrome/browser/ui/authentication/unified_consent/identity_chooser/identity_chooser_coordinator_delegate.h" #import "ios/chrome/browser/ui/authentication/unified_consent/identity_chooser/identity_chooser_mediator.h" +#import "ios/chrome/browser/ui/authentication/unified_consent/identity_chooser/identity_chooser_transition_delegate.h" #import "ios/chrome/browser/ui/authentication/unified_consent/identity_chooser/identity_chooser_view_controller.h" #import "ios/chrome/browser/ui/authentication/unified_consent/identity_chooser/identity_chooser_view_controller_presentation_delegate.h" @@ -42,23 +43,38 @@ IdentityChooserViewController* identityChooserViewController; // Coordinator state. @property(nonatomic, assign) IdentityChooserCoordinatorState state; +// Transition delegate for the view controller presentation. +@property(nonatomic, strong) + IdentityChooserTransitionDelegate* transitionController; @end @implementation IdentityChooserCoordinator @synthesize delegate = _delegate; +@synthesize origin = _origin; @synthesize identityChooserMediator = _identityChooserMediator; @synthesize identityChooserViewController = _identityChooserViewController; @synthesize state = _state; +@synthesize transitionController = _transitionController; - (void)start { [super start]; DCHECK_EQ(IdentityChooserCoordinatorStateNotStarted, self.state); self.state = IdentityChooserCoordinatorStateStarted; // Creates the controller. - self.identityChooserViewController = - [[IdentityChooserViewController alloc] init]; + self.identityChooserViewController = [[IdentityChooserViewController alloc] + initWithTableViewStyle:UITableViewStylePlain + appBarStyle:ChromeTableViewControllerStyleNoAppBar]; + self.identityChooserViewController.modalPresentationStyle = + UIModalPresentationCustom; + self.transitionController = [[IdentityChooserTransitionDelegate alloc] init]; + self.transitionController.origin = self.origin; + self.identityChooserViewController.transitioningDelegate = + self.transitionController; + self.identityChooserViewController.modalPresentationStyle = + UIModalPresentationCustom; + // Creates the mediator. self.identityChooserMediator = [[IdentityChooserMediator alloc] init]; self.identityChooserMediator.identityChooserViewController =
diff --git a/ios/chrome/browser/ui/authentication/unified_consent/identity_chooser/identity_chooser_header_item.mm b/ios/chrome/browser/ui/authentication/unified_consent/identity_chooser/identity_chooser_header_item.mm index a41ae4c..cd32dc2 100644 --- a/ios/chrome/browser/ui/authentication/unified_consent/identity_chooser/identity_chooser_header_item.mm +++ b/ios/chrome/browser/ui/authentication/unified_consent/identity_chooser/identity_chooser_header_item.mm
@@ -14,11 +14,10 @@ namespace { // Top margin for the label. -CGFloat kTopMargin = 24.; +CGFloat kTopMargin = 20.; +CGFloat kBottomMargin = 15; // Leading margin for the label. CGFloat kLeadingMargin = 24.; -// Label font size. -CGFloat kTitleFontSize = 14.; // Label font color alpha. CGFloat kFontAlpha = .87; } // namespace @@ -35,7 +34,7 @@ label.translatesAutoresizingMaskIntoConstraints = NO; label.text = l10n_util::GetNSString(IDS_IOS_ACCOUNT_IDENTITY_CHOOSER_CHOOSE_ACCOUNT); - label.font = [UIFont boldSystemFontOfSize:kTitleFontSize]; + label.font = [UIFont preferredFontForTextStyle:UIFontTextStyleHeadline]; label.textColor = [UIColor colorWithWhite:0. alpha:kFontAlpha]; [self.contentView addSubview:label]; NSDictionary* views = @{ @@ -44,12 +43,13 @@ NSDictionary* metrics = @{ @"LeadingMargin" : @(kLeadingMargin), @"TopMargin" : @(kTopMargin), + @"BottomMargin" : @(kBottomMargin), }; NSArray* constraints = @[ // Horitizontal constraints. @"H:|-(LeadingMargin)-[label]-(>=0)-|", // Vertical constraints. - @"V:|-(TopMargin)-[label]", + @"V:|-(TopMargin)-[label]-(BottomMargin)-|", ]; ApplyVisualConstraintsWithMetrics(constraints, views, metrics);
diff --git a/ios/chrome/browser/ui/authentication/unified_consent/identity_chooser/identity_chooser_mediator.mm b/ios/chrome/browser/ui/authentication/unified_consent/identity_chooser/identity_chooser_mediator.mm index 375b4fa8..b9b4b16 100644 --- a/ios/chrome/browser/ui/authentication/unified_consent/identity_chooser/identity_chooser_mediator.mm +++ b/ios/chrome/browser/ui/authentication/unified_consent/identity_chooser/identity_chooser_mediator.mm
@@ -11,6 +11,7 @@ #import "ios/chrome/browser/ui/authentication/unified_consent/identity_chooser/identity_chooser_header_item.h" #import "ios/chrome/browser/ui/authentication/unified_consent/identity_chooser/identity_chooser_item.h" #import "ios/chrome/browser/ui/authentication/unified_consent/identity_chooser/identity_chooser_view_controller.h" +#import "ios/chrome/browser/ui/table_view/cells/table_view_header_footer_item.h" #import "ios/chrome/browser/ui/table_view/table_view_model.h" #import "ios/public/provider/chrome/browser/signin/chrome_identity.h" #include "ios/public/provider/chrome/browser/signin/chrome_identity_service.h"
diff --git a/ios/chrome/browser/ui/authentication/unified_consent/identity_chooser/identity_chooser_presentation_controller.h b/ios/chrome/browser/ui/authentication/unified_consent/identity_chooser/identity_chooser_presentation_controller.h new file mode 100644 index 0000000..56da67b --- /dev/null +++ b/ios/chrome/browser/ui/authentication/unified_consent/identity_chooser/identity_chooser_presentation_controller.h
@@ -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. + +#ifndef IOS_CHROME_BROWSER_UI_AUTHENTICATION_UNIFIED_CONSENT_IDENTITY_CHOOSER_IDENTITY_CHOOSER_PRESENTATION_CONTROLLER_H_ +#define IOS_CHROME_BROWSER_UI_AUTHENTICATION_UNIFIED_CONSENT_IDENTITY_CHOOSER_IDENTITY_CHOOSER_PRESENTATION_CONTROLLER_H_ + +#import <UIKit/UIKit.h> + +// Presentation controller for presenting the IdentityChooser. It is presenting +// it as a Modal. +@interface IdentityChooserPresentationController : UIPresentationController + +@end + +#endif // IOS_CHROME_BROWSER_UI_AUTHENTICATION_UNIFIED_CONSENT_IDENTITY_CHOOSER_IDENTITY_CHOOSER_PRESENTATION_CONTROLLER_H_
diff --git a/ios/chrome/browser/ui/authentication/unified_consent/identity_chooser/identity_chooser_presentation_controller.mm b/ios/chrome/browser/ui/authentication/unified_consent/identity_chooser/identity_chooser_presentation_controller.mm new file mode 100644 index 0000000..7ae18ee --- /dev/null +++ b/ios/chrome/browser/ui/authentication/unified_consent/identity_chooser/identity_chooser_presentation_controller.mm
@@ -0,0 +1,114 @@ +// 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. + +#import "ios/chrome/browser/ui/authentication/unified_consent/identity_chooser/identity_chooser_presentation_controller.h" + +#import "ios/chrome/browser/ui/image_util/image_util.h" +#import "ios/chrome/browser/ui/uikit_ui_util.h" + +#if !defined(__has_feature) || !__has_feature(objc_arc) +#error "This file requires ARC support." +#endif + +namespace { +const CGFloat kMaxWidth = 350; +const CGFloat kMaxHeight = 350; +const CGFloat kMinimumMarginHorizontal = 25; +const CGFloat kMinimumMarginVertical = 35; + +const CGFloat kShadowMargin = 196; +const CGFloat kContainerCornerRadius = 13.0; +} // namespace + +@interface IdentityChooserPresentationController () + +@property(nonatomic, strong) UIView* shieldView; +@property(nonatomic, strong) UIView* shadowContainer; + +@end + +@implementation IdentityChooserPresentationController + +@synthesize shieldView = _shieldView; +@synthesize shadowContainer = _shadowContainer; + +#pragma mark - UIPresentationController + +- (CGRect)frameOfPresentedViewInContainerView { + CGRect safeAreaFrame = UIEdgeInsetsInsetRect( + self.containerView.bounds, SafeAreaInsetsForView(self.containerView)); + + CGFloat availableWidth = CGRectGetWidth(safeAreaFrame); + CGFloat availableHeight = CGRectGetHeight(safeAreaFrame); + + CGFloat width = MIN(kMaxWidth, availableWidth - 2 * kMinimumMarginHorizontal); + CGFloat height = + MIN(kMaxHeight, availableHeight - 2 * kMinimumMarginVertical); + + CGRect presentedViewFrame = safeAreaFrame; + presentedViewFrame.origin.x += (availableWidth - width) / 2; + presentedViewFrame.origin.y += (availableHeight - height) / 2; + presentedViewFrame.size.width = width; + presentedViewFrame.size.height = height; + + return presentedViewFrame; +} + +- (UIView*)presentedView { + return self.shadowContainer; +} + +- (void)presentationTransitionWillBegin { + self.shieldView = [[UIView alloc] init]; + self.shieldView.frame = self.containerView.bounds; + [self.containerView addSubview:self.shieldView]; + [self.shieldView + addGestureRecognizer:[[UITapGestureRecognizer alloc] + initWithTarget:self + action:@selector(handleShieldTap)]]; + + self.shadowContainer = [[UIView alloc] init]; + + UIView* contentClippingView = [[UIView alloc] init]; + contentClippingView.layer.cornerRadius = kContainerCornerRadius; + contentClippingView.layer.masksToBounds = YES; + contentClippingView.clipsToBounds = YES; + + UIImageView* shadowView = + [[UIImageView alloc] initWithImage:StretchableImageNamed(@"menu_shadow")]; + + shadowView.autoresizingMask = + UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight; + self.presentedViewController.view.autoresizingMask = + UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight; + contentClippingView.autoresizingMask = + UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight; + + [contentClippingView addSubview:self.presentedViewController.view]; + [self.shadowContainer addSubview:shadowView]; + [self.shadowContainer addSubview:contentClippingView]; + + [self.containerView addSubview:self.shadowContainer]; + + self.shadowContainer.frame = [self frameOfPresentedViewInContainerView]; + contentClippingView.frame = self.shadowContainer.bounds; + self.presentedViewController.view.frame = self.shadowContainer.bounds; + shadowView.frame = + CGRectInset(self.shadowContainer.bounds, -kShadowMargin, -kShadowMargin); +} + +- (void)containerViewWillLayoutSubviews { + self.shieldView.frame = self.containerView.bounds; + + self.shadowContainer.frame = [self frameOfPresentedViewInContainerView]; +} + +#pragma mark - Private + +- (void)handleShieldTap { + [self.presentedViewController dismissViewControllerAnimated:YES + completion:nil]; +} + +@end
diff --git a/ios/chrome/browser/ui/authentication/unified_consent/identity_chooser/identity_chooser_transition_delegate.h b/ios/chrome/browser/ui/authentication/unified_consent/identity_chooser/identity_chooser_transition_delegate.h new file mode 100644 index 0000000..6b69597e --- /dev/null +++ b/ios/chrome/browser/ui/authentication/unified_consent/identity_chooser/identity_chooser_transition_delegate.h
@@ -0,0 +1,19 @@ +// 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 IOS_CHROME_BROWSER_UI_AUTHENTICATION_UNIFIED_CONSENT_IDENTITY_CHOOSER_IDENTITY_CHOOSER_TRANSITION_DELEGATE_H_ +#define IOS_CHROME_BROWSER_UI_AUTHENTICATION_UNIFIED_CONSENT_IDENTITY_CHOOSER_IDENTITY_CHOOSER_TRANSITION_DELEGATE_H_ + +#import <UIKit/UIKit.h> + +// Transition Delegate for the IdentityChooser. It is presenting it as a modal. +@interface IdentityChooserTransitionDelegate + : NSObject<UIViewControllerTransitioningDelegate> + +// Origin of the animation. Must be in the window coordinates. +@property(nonatomic, assign) CGPoint origin; + +@end + +#endif // IOS_CHROME_BROWSER_UI_AUTHENTICATION_UNIFIED_CONSENT_IDENTITY_CHOOSER_IDENTITY_CHOOSER_TRANSITION_DELEGATE_H_
diff --git a/ios/chrome/browser/ui/authentication/unified_consent/identity_chooser/identity_chooser_transition_delegate.mm b/ios/chrome/browser/ui/authentication/unified_consent/identity_chooser/identity_chooser_transition_delegate.mm new file mode 100644 index 0000000..58814315 --- /dev/null +++ b/ios/chrome/browser/ui/authentication/unified_consent/identity_chooser/identity_chooser_transition_delegate.mm
@@ -0,0 +1,46 @@ +// 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. + +#import "ios/chrome/browser/ui/authentication/unified_consent/identity_chooser/identity_chooser_transition_delegate.h" + +#import "ios/chrome/browser/ui/authentication/unified_consent/identity_chooser/identity_chooser_animator.h" +#import "ios/chrome/browser/ui/authentication/unified_consent/identity_chooser/identity_chooser_presentation_controller.h" + +#if !defined(__has_feature) || !__has_feature(objc_arc) +#error "This file requires ARC support." +#endif + +@implementation IdentityChooserTransitionDelegate + +@synthesize origin = _origin; + +#pragma mark - UIViewControllerTransitioningDelegate + +- (UIPresentationController*) +presentationControllerForPresentedViewController:(UIViewController*)presented + presentingViewController:(UIViewController*)presenting + sourceViewController:(UIViewController*)source { + return [[IdentityChooserPresentationController alloc] + initWithPresentedViewController:presented + presentingViewController:presenting]; +} + +- (id<UIViewControllerAnimatedTransitioning>) +animationControllerForPresentedController:(UIViewController*)presented + presentingController:(UIViewController*)presenting + sourceController:(UIViewController*)source { + IdentityChooserAnimator* animator = [[IdentityChooserAnimator alloc] init]; + animator.appearing = YES; + animator.origin = self.origin; + return animator; +} + +- (id<UIViewControllerAnimatedTransitioning>) +animationControllerForDismissedController:(UIViewController*)dismissed { + IdentityChooserAnimator* animator = [[IdentityChooserAnimator alloc] init]; + animator.appearing = NO; + return animator; +} + +@end
diff --git a/ios/chrome/browser/ui/authentication/unified_consent/identity_chooser/identity_chooser_view_controller.h b/ios/chrome/browser/ui/authentication/unified_consent/identity_chooser/identity_chooser_view_controller.h index 594ad9d..f8f7bb5 100644 --- a/ios/chrome/browser/ui/authentication/unified_consent/identity_chooser/identity_chooser_view_controller.h +++ b/ios/chrome/browser/ui/authentication/unified_consent/identity_chooser/identity_chooser_view_controller.h
@@ -20,15 +20,6 @@ @property(nonatomic, weak) id<IdentityChooserViewControllerPresentationDelegate> presentationDelegate; -// Initialises IdentityChooserViewController. -- (instancetype)init NS_DESIGNATED_INITIALIZER; - -// -[IdentityChooserViewController init] should be used. -- (instancetype)initWithTableViewStyle:(UITableViewStyle)style - appBarStyle: - (ChromeTableViewControllerStyle)appBarStyle - NS_UNAVAILABLE; - @end #endif // IOS_CHROME_BROWSER_UI_AUTHENTICATION_UNIFIED_CONSENT_IDENTITY_CHOOSER_IDENTITY_CHOOSER_VIEW_CONTROLLER_H_
diff --git a/ios/chrome/browser/ui/authentication/unified_consent/identity_chooser/identity_chooser_view_controller.mm b/ios/chrome/browser/ui/authentication/unified_consent/identity_chooser/identity_chooser_view_controller.mm index 34acbde..7b4800e 100644 --- a/ios/chrome/browser/ui/authentication/unified_consent/identity_chooser/identity_chooser_view_controller.mm +++ b/ios/chrome/browser/ui/authentication/unified_consent/identity_chooser/identity_chooser_view_controller.mm
@@ -25,29 +25,9 @@ const CGFloat kFooterHeight = 17.; } // namespace -@interface IdentityChooserViewController () - -@property(nonatomic, strong) - MDCDialogTransitionController* transitionController; - -@end - @implementation IdentityChooserViewController @synthesize presentationDelegate = _presentationDelegate; -@synthesize transitionController = _transitionController; - -- (instancetype)init { - self = [super initWithTableViewStyle:UITableViewStylePlain - appBarStyle:ChromeTableViewControllerStyleNoAppBar]; - if (self) { - self.modalPresentationStyle = UIModalPresentationCustom; - _transitionController = [[MDCDialogTransitionController alloc] init]; - self.transitioningDelegate = _transitionController; - self.modalPresentationStyle = UIModalPresentationCustom; - } - return self; -} - (void)viewDidLoad { [super viewDidLoad]; @@ -58,7 +38,7 @@ self.tableView.sectionFooterHeight = 0; // Setting -UITableView.rowHeight is required for iOS 10. On iOS 11, the row // height is automatically set. - self.tableView.rowHeight = kRowHeight; + self.tableView.estimatedRowHeight = kRowHeight; } - (void)viewDidDisappear:(BOOL)animated { @@ -95,4 +75,11 @@ } } +#pragma mark UIAccessibilityAction + +- (BOOL)accessibilityPerformEscape { + [self dismissViewControllerAnimated:YES completion:nil]; + return YES; +} + @end
diff --git a/ios/chrome/browser/ui/authentication/unified_consent/identity_chooser/identity_view.mm b/ios/chrome/browser/ui/authentication/unified_consent/identity_chooser/identity_view.mm index d7de844..900b658 100644 --- a/ios/chrome/browser/ui/authentication/unified_consent/identity_chooser/identity_view.mm +++ b/ios/chrome/browser/ui/authentication/unified_consent/identity_chooser/identity_view.mm
@@ -16,10 +16,8 @@ // Sizes. const CGFloat kAvatarSize = 40.; -const CGFloat kTitleFontSize = 14.; -const CGFloat kSubtitleFontSize = 12.; // Distances/margins. -const CGFloat kTitleOffset = 2; +const CGFloat kTitleOffset = 4; const CGFloat kHorizontalAvatarMargin = 16.; const CGFloat kVerticalMargin = 12.; // Colors @@ -66,22 +64,28 @@ // Title. _title = [[UILabel alloc] init]; _title.translatesAutoresizingMaskIntoConstraints = NO; + _title.numberOfLines = 0; _title.textColor = [UIColor colorWithWhite:0 alpha:kTitleTextColorAlpha]; - _title.font = [UIFont systemFontOfSize:kTitleFontSize]; + _title.font = [UIFont preferredFontForTextStyle:UIFontTextStyleSubheadline]; [self addSubview:_title]; // Subtitle. _subtitle = [[UILabel alloc] init]; _subtitle.translatesAutoresizingMaskIntoConstraints = NO; + _subtitle.numberOfLines = 0; _subtitle.textColor = [UIColor colorWithWhite:0 alpha:kSubtitleTextColorAlpha]; - _subtitle.font = [UIFont systemFontOfSize:kSubtitleFontSize]; + _subtitle.font = [UIFont preferredFontForTextStyle:UIFontTextStyleCaption1]; [self addSubview:_subtitle]; + // Text container. + UILayoutGuide* textContainerGuide = [[UILayoutGuide alloc] init]; + [self addLayoutGuide:textContainerGuide]; + // Layout constraints. NSDictionary* views = @{ @"avatar" : _avatarView, - @"title" : _title, + @"container" : textContainerGuide, @"subtitle" : _subtitle, }; NSDictionary* metrics = @{ @@ -91,7 +95,7 @@ }; NSArray* constraints = @[ // Horizontal constraints. - @"H:|-(HAvatarMargin)-[avatar]-(HAvatarMargin)-[title]|", + @"H:|-(HAvatarMargin)-[avatar]-(HAvatarMargin)-[container]|", // Vertical constraints. // Size constraints. @"H:[avatar(AvatarSize)]", @@ -102,22 +106,39 @@ AddSameConstraintsToSides(_title, _subtitle, LayoutSides::kLeading | LayoutSides::kTrailing); _titleConstraintForNameAndEmail = - [self.centerYAnchor constraintEqualToAnchor:_title.bottomAnchor - constant:kTitleOffset]; - _titleConstraintForEmailOnly = - [self.centerYAnchor constraintEqualToAnchor:_title.centerYAnchor]; - [self.centerYAnchor constraintEqualToAnchor:_subtitle.topAnchor - constant:-kTitleOffset] - .active = YES; + [_subtitle.topAnchor constraintEqualToAnchor:_title.bottomAnchor + constant:kTitleOffset]; + _titleConstraintForEmailOnly = [textContainerGuide.bottomAnchor + constraintEqualToAnchor:_title.bottomAnchor]; + + [NSLayoutConstraint activateConstraints:@[ + [self.centerYAnchor + constraintEqualToAnchor:textContainerGuide.centerYAnchor], + [textContainerGuide.leadingAnchor + constraintEqualToAnchor:_title.leadingAnchor], + [textContainerGuide.leadingAnchor + constraintEqualToAnchor:_subtitle.leadingAnchor], + [textContainerGuide.trailingAnchor + constraintEqualToAnchor:_title.trailingAnchor], + [textContainerGuide.trailingAnchor + constraintEqualToAnchor:_subtitle.trailingAnchor], + [textContainerGuide.topAnchor constraintEqualToAnchor:_title.topAnchor], + [textContainerGuide.bottomAnchor + constraintEqualToAnchor:_subtitle.bottomAnchor], + ]]; + _verticalConstraints = @[ - [_avatarView.topAnchor constraintEqualToAnchor:self.topAnchor - constant:kVerticalMargin], - [self.bottomAnchor constraintEqualToAnchor:_avatarView.bottomAnchor - constant:kVerticalMargin], - [_title.topAnchor constraintGreaterThanOrEqualToAnchor:self.topAnchor - constant:kVerticalMargin], + [_avatarView.topAnchor + constraintGreaterThanOrEqualToAnchor:self.topAnchor + constant:kVerticalMargin], [self.bottomAnchor - constraintGreaterThanOrEqualToAnchor:_subtitle.bottomAnchor + constraintGreaterThanOrEqualToAnchor:_avatarView.bottomAnchor + constant:kVerticalMargin], + [textContainerGuide.topAnchor + constraintGreaterThanOrEqualToAnchor:self.topAnchor + constant:kVerticalMargin], + [self.bottomAnchor + constraintGreaterThanOrEqualToAnchor:textContainerGuide.bottomAnchor constant:kVerticalMargin], ]; [NSLayoutConstraint activateConstraints:_verticalConstraints];
diff --git a/ios/chrome/browser/ui/authentication/unified_consent/unified_consent_coordinator.mm b/ios/chrome/browser/ui/authentication/unified_consent/unified_consent_coordinator.mm index fdc109a3..225970a 100644 --- a/ios/chrome/browser/ui/authentication/unified_consent/unified_consent_coordinator.mm +++ b/ios/chrome/browser/ui/authentication/unified_consent/unified_consent_coordinator.mm
@@ -89,11 +89,13 @@ } - (void)unifiedConsentViewControllerDidTapIdentityPickerView: - (UnifiedConsentViewController*)controller { + (UnifiedConsentViewController*)controller + atPoint:(CGPoint)point { DCHECK_EQ(self.unifiedConsentViewController, controller); self.identityChooserCoordinator = [[IdentityChooserCoordinator alloc] initWithBaseViewController:self.unifiedConsentViewController]; self.identityChooserCoordinator.delegate = self; + self.identityChooserCoordinator.origin = point; [self.identityChooserCoordinator start]; self.identityChooserCoordinator.selectedIdentity = self.selectedIdentity; }
diff --git a/ios/chrome/browser/ui/authentication/unified_consent/unified_consent_view_controller.h b/ios/chrome/browser/ui/authentication/unified_consent/unified_consent_view_controller.h index 8e8efa9..f39ee6a5 100644 --- a/ios/chrome/browser/ui/authentication/unified_consent/unified_consent_view_controller.h +++ b/ios/chrome/browser/ui/authentication/unified_consent/unified_consent_view_controller.h
@@ -21,9 +21,11 @@ - (void)unifiedConsentViewControllerDidTapSettingsLink: (UnifiedConsentViewController*)controller; -// Called when the user taps on the IdentityPickerView. +// Called when the user taps at |point| on the IdentityPickerView. |point| is in +// the window coordinates. - (void)unifiedConsentViewControllerDidTapIdentityPickerView: - (UnifiedConsentViewController*)controller; + (UnifiedConsentViewController*)controller + atPoint:(CGPoint)point; // Called when the user scrolls down to the bottom (or when the view controller // is loaded with no scroll needed).
diff --git a/ios/chrome/browser/ui/authentication/unified_consent/unified_consent_view_controller.mm b/ios/chrome/browser/ui/authentication/unified_consent/unified_consent_view_controller.mm index 4954719..5539323 100644 --- a/ios/chrome/browser/ui/authentication/unified_consent/unified_consent_view_controller.mm +++ b/ios/chrome/browser/ui/authentication/unified_consent/unified_consent_view_controller.mm
@@ -125,10 +125,12 @@ } - (void)scrollToBottom { + // Add one point to make sure that it is actually scrolled to the bottom (as + // there are some issues when the fonts are increased). CGPoint bottomOffset = CGPointMake(0, self.scrollView.contentSize.height - self.scrollView.bounds.size.height + - self.scrollView.contentInset.bottom); + self.scrollView.contentInset.bottom + 1); [self.scrollView setContentOffset:bottomOffset animated:YES]; } @@ -203,7 +205,7 @@ self.identityPickerView.canChangeIdentity = self.interactable; self.identityPickerView.translatesAutoresizingMaskIntoConstraints = NO; [self.identityPickerView addTarget:self - action:@selector(identityPickerAction:) + action:@selector(identityPickerAction:forEvent:) forControlEvents:UIControlEventTouchUpInside]; [container addSubview:self.identityPickerView]; @@ -354,8 +356,13 @@ #pragma mark - UI actions -- (void)identityPickerAction:(id)sender { - [self.delegate unifiedConsentViewControllerDidTapIdentityPickerView:self]; +- (void)identityPickerAction:(id)sender forEvent:(UIEvent*)event { + UITouch* touch = event.allTouches.anyObject; + [self.delegate + unifiedConsentViewControllerDidTapIdentityPickerView:self + atPoint: + [touch + locationInView:nil]]; } #pragma mark - Private
diff --git a/ios/chrome/browser/ui/bookmarks/bookmark_edit_view_controller.mm b/ios/chrome/browser/ui/bookmarks/bookmark_edit_view_controller.mm index f03c0dca..eb3fb9b3 100644 --- a/ios/chrome/browser/ui/bookmarks/bookmark_edit_view_controller.mm +++ b/ios/chrome/browser/ui/bookmarks/bookmark_edit_view_controller.mm
@@ -476,6 +476,10 @@ selectedFolder:self.folder]; folderViewController.delegate = self; self.folderViewController = folderViewController; + if (@available(iOS 11, *)) { + self.folderViewController.navigationItem.largeTitleDisplayMode = + UINavigationItemLargeTitleDisplayModeNever; + } [self.navigationController pushViewController:self.folderViewController animated:YES];
diff --git a/ios/chrome/browser/ui/bookmarks/bookmark_folder_view_controller.mm b/ios/chrome/browser/ui/bookmarks/bookmark_folder_view_controller.mm index f243ee7..b7175de9 100644 --- a/ios/chrome/browser/ui/bookmarks/bookmark_folder_view_controller.mm +++ b/ios/chrome/browser/ui/bookmarks/bookmark_folder_view_controller.mm
@@ -155,9 +155,6 @@ [super viewDidLoad]; [super loadModel]; - if ([self respondsToSelector:@selector(setEdgesForExtendedLayout:)]) { - [self setEdgesForExtendedLayout:UIRectEdgeNone]; - } self.view.accessibilityIdentifier = kBookmarkFolderPickerViewContainerIdentifier; self.title = l10n_util::GetNSString(IDS_IOS_BOOKMARK_CHOOSE_GROUP_BUTTON); @@ -173,6 +170,7 @@ doneItem.accessibilityIdentifier = kBookmarkFolderEditNavigationBarDoneButtonIdentifier; self.navigationItem.rightBarButtonItem = doneItem; + [self setEdgesForExtendedLayout:UIRectEdgeNone]; } if (self.allowsCancel) {
diff --git a/ios/chrome/browser/ui/bookmarks/bookmark_interaction_controller.mm b/ios/chrome/browser/ui/bookmarks/bookmark_interaction_controller.mm index 7474a230..3a547559 100644 --- a/ios/chrome/browser/ui/bookmarks/bookmark_interaction_controller.mm +++ b/ios/chrome/browser/ui/bookmarks/bookmark_interaction_controller.mm
@@ -30,6 +30,7 @@ #import "ios/chrome/browser/ui/bookmarks/bookmark_transitioning_delegate.h" #import "ios/chrome/browser/ui/bookmarks/bookmark_utils_ios.h" #import "ios/chrome/browser/ui/commands/application_commands.h" +#import "ios/chrome/browser/ui/commands/open_new_tab_command.h" #import "ios/chrome/browser/ui/table_view/table_view_navigation_controller.h" #import "ios/chrome/browser/ui/table_view/table_view_navigation_controller_delegate.h" #import "ios/chrome/browser/ui/table_view/table_view_presentation_controller.h" @@ -563,12 +564,13 @@ inBackground:(BOOL)inBackground { // TODO(crbug.com/695749): Open bookmarklet in new tab doesn't work. See how // to deal with this later. - [_loader webPageOrderedOpen:url - referrer:web::Referrer() - inIncognito:inIncognito - inBackground:inBackground - originPoint:CGPointZero - appendTo:kLastTab]; + OpenNewTabCommand* command = + [[OpenNewTabCommand alloc] initWithURL:url + referrer:web::Referrer() + inIncognito:inIncognito + inBackground:inBackground + appendTo:kLastTab]; + [_loader webPageOrderedOpen:command]; } @end
diff --git a/ios/chrome/browser/ui/browser_view_controller.h b/ios/chrome/browser/ui/browser_view_controller.h index 1904432..4412f5c 100644 --- a/ios/chrome/browser/ui/browser_view_controller.h +++ b/ios/chrome/browser/ui/browser_view_controller.h
@@ -110,6 +110,7 @@ // deallocated soon. - (void)browserStateDestroyed; +// Opens a new tab as if originating from |originPoint| and |focusOmnibox|. - (void)openNewTabFromOriginPoint:(CGPoint)originPoint focusOmnibox:(BOOL)focusOmnibox;
diff --git a/ios/chrome/browser/ui/browser_view_controller.mm b/ios/chrome/browser/ui/browser_view_controller.mm index a26b77c..207c377 100644 --- a/ios/chrome/browser/ui/browser_view_controller.mm +++ b/ios/chrome/browser/ui/browser_view_controller.mm
@@ -3598,12 +3598,19 @@ // The "New Tab" item in the context menu opens a new tab in the current // browser state. |isOffTheRecord| indicates whether or not the current // browser state is incognito. - [weakSelf webPageOrderedOpen:link - referrer:referrer - inIncognito:weakSelf.isOffTheRecord - inBackground:YES - originPoint:originPoint - appendTo:kCurrentTab]; + BrowserViewController* strongSelf = weakSelf; + if (!strongSelf) + return; + + OpenNewTabCommand* command = + [[OpenNewTabCommand alloc] initWithURL:link + referrer:referrer + inIncognito:strongSelf.isOffTheRecord + inBackground:YES + + appendTo:kCurrentTab]; + command.originPoint = originPoint; + [strongSelf webPageOrderedOpen:command]; }; [_contextMenuCoordinator addItemWithTitle:title action:action]; if (!_isOffTheRecord) { @@ -3612,12 +3619,15 @@ IDS_IOS_CONTENT_CONTEXT_OPENLINKNEWINCOGNITOTAB); action = ^{ Record(ACTION_OPEN_IN_INCOGNITO_TAB, isImage, isLink); - [weakSelf webPageOrderedOpen:link - referrer:referrer - inIncognito:YES - inBackground:NO - originPoint:CGPointZero - appendTo:kCurrentTab]; + + OpenNewTabCommand* command = + [[OpenNewTabCommand alloc] initWithURL:link + referrer:referrer + inIncognito:YES + inBackground:NO + + appendTo:kCurrentTab]; + [weakSelf webPageOrderedOpen:command]; }; [_contextMenuCoordinator addItemWithTitle:title action:action]; } @@ -3675,11 +3685,19 @@ IDS_IOS_CONTENT_CONTEXT_OPENIMAGENEWTAB); action = ^{ Record(ACTION_OPEN_IMAGE_IN_NEW_TAB, isImage, isLink); - [weakSelf webPageOrderedOpen:imageUrl - referrer:referrer - inBackground:true - originPoint:originPoint - appendTo:kCurrentTab]; + BrowserViewController* strongSelf = weakSelf; + if (!strongSelf) + return; + + OpenNewTabCommand* command = + [[OpenNewTabCommand alloc] initWithURL:imageUrl + referrer:referrer + inIncognito:strongSelf.isOffTheRecord + inBackground:YES + + appendTo:kCurrentTab]; + command.originPoint = originPoint; + [strongSelf openNewTabInCurrentMode:command]; }; [_contextMenuCoordinator addItemWithTitle:title action:action]; @@ -3849,7 +3867,8 @@ switch (action) { case OverscrollAction::NEW_TAB: [self.dispatcher - openURL:[OpenNewTabCommand commandWithIncognito:self.isOffTheRecord]]; + openURLInNewTab:[OpenNewTabCommand + commandWithIncognito:self.isOffTheRecord]]; break; case OverscrollAction::CLOSE_TAB: [self.dispatcher closeCurrentTab]; @@ -4337,7 +4356,7 @@ if (entry->type != sessions::TabRestoreService::TAB) return; - [self.dispatcher openURL:[OpenNewTabCommand command]]; + [self.dispatcher openURLInNewTab:[OpenNewTabCommand command]]; [self restoreTabWithSessionID:entry->id]; } @@ -4437,12 +4456,13 @@ // Some URLs are not allowed while in incognito. If we are in incognito and // load a disallowed URL, instead create a new tab not in the incognito state. if (_isOffTheRecord && !IsURLAllowedInIncognito(params.url)) { - [self webPageOrderedOpen:params.url - referrer:web::Referrer() - inIncognito:NO - inBackground:NO - originPoint:CGPointZero - appendTo:kCurrentTab]; + OpenNewTabCommand* command = + [[OpenNewTabCommand alloc] initWithURL:params.url + referrer:web::Referrer() + inIncognito:NO + inBackground:NO + appendTo:kCurrentTab]; + [self webPageOrderedOpen:command]; return; } @@ -4484,67 +4504,22 @@ self.currentWebState->ExecuteUserJavaScript(script); } -// Load a new URL on a new page/tab. -- (void)webPageOrderedOpen:(const GURL&)URL - referrer:(const web::Referrer&)referrer - inBackground:(BOOL)inBackground - originPoint:(CGPoint)originPoint - appendTo:(OpenPosition)appendTo { - Tab* adjacentTab = nil; - if (appendTo == kCurrentTab) - adjacentTab = [_model currentTab]; - - GURL capturedURL = URL; - web::Referrer capturedReferrer = referrer; - auto openTab = ^{ - [_model insertTabWithURL:capturedURL - referrer:capturedReferrer - transition:ui::PAGE_TRANSITION_LINK - opener:adjacentTab - openedByDOM:NO - atIndex:TabModelConstants::kTabPositionAutomatically - inBackground:inBackground]; - }; - - if (!IsUIRefreshPhase1Enabled() || !inBackground || [self canShowTabStrip] || - CGPointEqualToPoint(originPoint, CGPointZero)) { - openTab(); - } else { - [self animateNewTabInBackgroundFromPoint:originPoint - withCompletion:openTab]; - } -} - -- (void)webPageOrderedOpen:(const GURL&)url - referrer:(const web::Referrer&)referrer - inIncognito:(BOOL)inIncognito - inBackground:(BOOL)inBackground - originPoint:(CGPoint)originPoint - appendTo:(OpenPosition)appendTo { +- (void)webPageOrderedOpen:(OpenNewTabCommand*)command { // Send either the "New Tab Opened" or "New Incognito Tab" opened to the // feature_engagement::Tracker based on |inIncognito|. - feature_engagement::NotifyNewTabEvent(_model.browserState, inIncognito); + feature_engagement::NotifyNewTabEvent(_model.browserState, + command.inIncognito); - if (inIncognito == _isOffTheRecord) { - [self webPageOrderedOpen:url - referrer:referrer - inBackground:inBackground - originPoint:originPoint - appendTo:appendTo]; + if (command.inIncognito == _isOffTheRecord) { + [self openNewTabInCurrentMode:command]; return; } // When sending an open command that switches modes, ensure the tab // ends up appended to the end of the model, not just next to what is // currently selected in the other mode. This is done with the |append| // parameter. - OpenNewTabCommand* command = [[OpenNewTabCommand alloc] - initWithURL:url - referrer:web::Referrer() // Strip referrer when switching modes. - inIncognito:inIncognito - inBackground:inBackground - appendTo:kLastTab]; - command.originPoint = originPoint; - [self.dispatcher openURL:command]; + command.appendTo = kLastTab; + [self.dispatcher openURLInNewTab:command]; } - (void)loadSessionTab:(const sessions::SessionTab*)sessionTab { @@ -4569,6 +4544,35 @@ #pragma mark - UrlLoader helpers +// Opens a new tab in the current mode, following |command| parameters. The +// |inIncognito| parameter is not taken into account. +- (void)openNewTabInCurrentMode:(OpenNewTabCommand*)command { + Tab* adjacentTab = nil; + if (command.appendTo == kCurrentTab) + adjacentTab = [_model currentTab]; + + GURL capturedURL = command.URL; + web::Referrer capturedReferrer = command.referrer; + auto openTab = ^{ + [self.tabModel insertTabWithURL:capturedURL + referrer:capturedReferrer + transition:ui::PAGE_TRANSITION_LINK + opener:adjacentTab + openedByDOM:NO + atIndex:TabModelConstants::kTabPositionAutomatically + inBackground:command.inBackground]; + }; + + if (!IsUIRefreshPhase1Enabled() || !command.inBackground || + [self canShowTabStrip] || + CGPointEqualToPoint(command.originPoint, CGPointZero)) { + openTab(); + } else { + [self animateNewTabInBackgroundFromPoint:command.originPoint + withCompletion:openTab]; + } +} + // Induce an intentional crash in the browser process. - (void)induceBrowserCrash { CHECK(false); @@ -4761,7 +4765,7 @@ } - (void)openNewTab:(OpenNewTabCommand*)command { - [self.dispatcher openURL:command]; + [self.dispatcher openURLInNewTab:command]; } - (void)printTab { @@ -4950,11 +4954,13 @@ - (void)showHelpPage { GURL helpUrl(l10n_util::GetStringUTF16(IDS_IOS_TOOLS_MENU_HELP_URL)); - [self webPageOrderedOpen:helpUrl - referrer:web::Referrer() - inBackground:NO - originPoint:CGPointZero - appendTo:kCurrentTab]; + OpenNewTabCommand* command = + [[OpenNewTabCommand alloc] initWithURL:helpUrl + referrer:web::Referrer() + inIncognito:NO + inBackground:NO + appendTo:kCurrentTab]; + [self openNewTabInCurrentMode:command]; } - (void)showBookmarksManager { @@ -5051,6 +5057,8 @@ [[ConsentBumpCoordinator alloc] initWithBaseViewController:self]; self.consentBumpCoordinator.delegate = self; [self.consentBumpCoordinator start]; + self.consentBumpCoordinator.viewController.modalPresentationStyle = + UIModalPresentationPageSheet; [self presentViewController:self.consentBumpCoordinator.viewController animated:YES completion:nil]; @@ -5950,9 +5958,9 @@ inIncognito:YES inBackground:NO appendTo:kLastTab]; - [self.dispatcher openURL:command]; + [self.dispatcher openURLInNewTab:command]; } else { - [self.dispatcher openURL:[OpenNewTabCommand command]]; + [self.dispatcher openURLInNewTab:[OpenNewTabCommand command]]; } }
diff --git a/ios/chrome/browser/ui/commands/application_commands.h b/ios/chrome/browser/ui/commands/application_commands.h index bae9da69..f09fbf2 100644 --- a/ios/chrome/browser/ui/commands/application_commands.h +++ b/ios/chrome/browser/ui/commands/application_commands.h
@@ -85,9 +85,8 @@ - (void)showReportAnIssueFromViewController: (UIViewController*)baseViewController; -// TODO(crbug.com/861729): Rename this to openURLInNewTab. // Opens the |command| URL in a new tab. -- (void)openURL:(OpenNewTabCommand*)command; +- (void)openURLInNewTab:(OpenNewTabCommand*)command; // TODO(crbug.com/779791) : Do not pass baseViewController through dispatcher. // Shows the signin UI, presenting from |baseViewController|.
diff --git a/ios/chrome/browser/ui/commands/open_new_tab_command.h b/ios/chrome/browser/ui/commands/open_new_tab_command.h index 5ccfc55..e1f86c8 100644 --- a/ios/chrome/browser/ui/commands/open_new_tab_command.h +++ b/ios/chrome/browser/ui/commands/open_new_tab_command.h
@@ -7,7 +7,17 @@ #import <UIKit/UIKit.h> -#import "ios/chrome/browser/ui/url_loader.h" +class GURL; + +namespace web { +struct Referrer; +} + +// Describes the intended position for a new tab. +enum OpenPosition { + kCurrentTab, // Relative to currently selected tab. + kLastTab // Always at end of tab model. +}; // Command sent to open a new tab, optionally including a point (in UIWindow // coordinates). @@ -83,7 +93,7 @@ @property(nonatomic, readonly, assign) BOOL fromChrome; // Location where the new tab should be opened. -@property(nonatomic, readonly, assign) OpenPosition appendTo; +@property(nonatomic, assign) OpenPosition appendTo; @end
diff --git a/ios/chrome/browser/ui/content_suggestions/content_suggestions_coordinator.mm b/ios/chrome/browser/ui/content_suggestions/content_suggestions_coordinator.mm index 42d6dee..de90a0d 100644 --- a/ios/chrome/browser/ui/content_suggestions/content_suggestions_coordinator.mm +++ b/ios/chrome/browser/ui/content_suggestions/content_suggestions_coordinator.mm
@@ -231,7 +231,7 @@ didTriggerAction:(OverscrollAction)action { switch (action) { case OverscrollAction::NEW_TAB: { - [_dispatcher openURL:[OpenNewTabCommand command]]; + [_dispatcher openURLInNewTab:[OpenNewTabCommand command]]; } break; case OverscrollAction::CLOSE_TAB: { [_dispatcher closeCurrentTab];
diff --git a/ios/chrome/browser/ui/content_suggestions/ntp_home_mediator.mm b/ios/chrome/browser/ui/content_suggestions/ntp_home_mediator.mm index fd19838..30c46eb8 100644 --- a/ios/chrome/browser/ui/content_suggestions/ntp_home_mediator.mm +++ b/ios/chrome/browser/ui/content_suggestions/ntp_home_mediator.mm
@@ -342,11 +342,13 @@ [self.NTPMetrics recordAction:new_tab_page_uma::ACTION_OPENED_PROMO]; if (notificationPromo->IsURLPromo()) { - [self.dispatcher webPageOrderedOpen:notificationPromo->url() - referrer:web::Referrer() - inBackground:NO - originPoint:CGPointZero - appendTo:kCurrentTab]; + OpenNewTabCommand* command = + [[OpenNewTabCommand alloc] initWithURL:notificationPromo->url() + referrer:web::Referrer() + inIncognito:NO + inBackground:NO + appendTo:kCurrentTab]; + [self.dispatcher webPageOrderedOpen:command]; return; } @@ -533,12 +535,14 @@ incognito:(BOOL)incognito originPoint:(CGPoint)originPoint { // Open the tab in background if it is non-incognito only. - [self.dispatcher webPageOrderedOpen:URL - referrer:web::Referrer() - inIncognito:incognito - inBackground:!incognito - originPoint:originPoint - appendTo:kCurrentTab]; + OpenNewTabCommand* command = + [[OpenNewTabCommand alloc] initWithURL:URL + referrer:web::Referrer() + inIncognito:incognito + inBackground:!incognito + appendTo:kCurrentTab]; + command.originPoint = originPoint; + [self.dispatcher webPageOrderedOpen:command]; } // Logs a histogram due to a Most Visited item being opened.
diff --git a/ios/chrome/browser/ui/fullscreen/fullscreen_features.h b/ios/chrome/browser/ui/fullscreen/fullscreen_features.h index e9da9cb6..05013034 100644 --- a/ios/chrome/browser/ui/fullscreen/fullscreen_features.h +++ b/ios/chrome/browser/ui/fullscreen/fullscreen_features.h
@@ -17,7 +17,7 @@ // The available viewport adjustment experiments. The choices in this array // correspond with the ViewportAdjustmentExperiment values. extern const flags_ui::FeatureEntry::Choice - kViewportAdjustmentExperimentChoices[4]; + kViewportAdjustmentExperimentChoices[5]; // Enum type describing viewport adjustment experiments. enum class ViewportAdjustmentExperiment : short { @@ -28,6 +28,8 @@ // container view. HYBRID, // Translates the web view up and down and updates the viewport using // safe area insets. + SMOOTH_SCROLLING, // Adjusts the viewport using the smooth scrolling + // workaround. }; // Convenience method for retrieving the active viewport adjustment experiment
diff --git a/ios/chrome/browser/ui/fullscreen/fullscreen_features.mm b/ios/chrome/browser/ui/fullscreen/fullscreen_features.mm index dae133c..4f87268 100644 --- a/ios/chrome/browser/ui/fullscreen/fullscreen_features.mm +++ b/ios/chrome/browser/ui/fullscreen/fullscreen_features.mm
@@ -16,6 +16,7 @@ const char kContentInsetChoiceValue[] = "content-inset"; const char kSafeAreaChoiceValue[] = "safe-area"; const char kHybridChoiceValue[] = "hybrid"; +const char kSmoothScrollingChoiceValue[] = "smooth"; } namespace fullscreen { @@ -32,7 +33,8 @@ "safe-area"}, {"Use Hybrid Implementation", kViewportAdjustmentExperimentCommandLineSwitch, "hybrid"}, -}; + {"Use Smooth Scrolling Workaround", + kViewportAdjustmentExperimentCommandLineSwitch, "smooth"}}; ViewportAdjustmentExperiment GetActiveViewportExperiment() { const base::CommandLine* command_line = @@ -46,6 +48,8 @@ return ViewportAdjustmentExperiment::SAFE_AREA; if (viewport_experiment == std::string(kHybridChoiceValue)) return ViewportAdjustmentExperiment::HYBRID; + if (viewport_experiment == std::string(kSmoothScrollingChoiceValue)) + return ViewportAdjustmentExperiment::SMOOTH_SCROLLING; } return ViewportAdjustmentExperiment::FRAME; }
diff --git a/ios/chrome/browser/ui/history/BUILD.gn b/ios/chrome/browser/ui/history/BUILD.gn index e5eec1d7..e6cca71 100644 --- a/ios/chrome/browser/ui/history/BUILD.gn +++ b/ios/chrome/browser/ui/history/BUILD.gn
@@ -128,6 +128,7 @@ "//ios/chrome/browser/sync", "//ios/chrome/browser/ui", "//ios/chrome/browser/ui/collection_view/cells", + "//ios/chrome/browser/ui/commands", "//ios/chrome/browser/ui/context_menu", "//ios/chrome/browser/ui/list_model", "//ios/chrome/browser/ui/table_view", @@ -150,6 +151,7 @@ ":history_ui", "//base", "//ios/chrome/browser/ui", + "//ios/chrome/browser/ui/commands", "//ios/chrome/browser/ui/coordinators:chrome_coordinators", "//ios/chrome/browser/ui/history/public", "//ios/chrome/browser/ui/settings",
diff --git a/ios/chrome/browser/ui/history/history_clear_browsing_data_coordinator.mm b/ios/chrome/browser/ui/history/history_clear_browsing_data_coordinator.mm index e7ab25f9..c86c92f 100644 --- a/ios/chrome/browser/ui/history/history_clear_browsing_data_coordinator.mm +++ b/ios/chrome/browser/ui/history/history_clear_browsing_data_coordinator.mm
@@ -7,6 +7,7 @@ #import <UIKit/UIKit.h> #include "base/mac/foundation_util.h" +#import "ios/chrome/browser/ui/commands/open_new_tab_command.h" #include "ios/chrome/browser/ui/history/history_local_commands.h" #import "ios/chrome/browser/ui/history/public/history_presentation_delegate.h" #import "ios/chrome/browser/ui/settings/clear_browsing_data_local_commands.h" @@ -79,15 +80,15 @@ #pragma mark - ClearBrowsingDataLocalCommands - (void)openURL:(const GURL&)URL { - GURL copiedURL(URL); + OpenNewTabCommand* command = + [[OpenNewTabCommand alloc] initWithURL:URL + referrer:web::Referrer() + inIncognito:NO + inBackground:NO + appendTo:kLastTab]; [self dismissClearBrowsingDataWithCompletion:^() { [self.localDispatcher dismissHistoryWithCompletion:^{ - [self.loader webPageOrderedOpen:copiedURL - referrer:web::Referrer() - inIncognito:NO - inBackground:NO - originPoint:CGPointZero - appendTo:kLastTab]; + [self.loader webPageOrderedOpen:command]; [self.presentationDelegate showActiveRegularTabFromHistory]; }]; }];
diff --git a/ios/chrome/browser/ui/history/history_coordinator.mm b/ios/chrome/browser/ui/history/history_coordinator.mm index 1e24fd0..423e625b 100644 --- a/ios/chrome/browser/ui/history/history_coordinator.mm +++ b/ios/chrome/browser/ui/history/history_coordinator.mm
@@ -108,6 +108,8 @@ dismissViewControllerAnimated:YES completion:completionHandler]; self.historyNavigationController = nil; + _browsingHistoryDriver = nullptr; + _browsingHistoryService = nullptr; }; if (self.historyClearBrowsingDataCoordinator) { [self.historyClearBrowsingDataCoordinator stopWithCompletion:^() {
diff --git a/ios/chrome/browser/ui/history/history_table_view_controller.mm b/ios/chrome/browser/ui/history/history_table_view_controller.mm index 59e3b6e..33ff886 100644 --- a/ios/chrome/browser/ui/history/history_table_view_controller.mm +++ b/ios/chrome/browser/ui/history/history_table_view_controller.mm
@@ -16,6 +16,7 @@ #import "ios/chrome/browser/metrics/new_tab_page_uma.h" #include "ios/chrome/browser/sync/sync_setup_service.h" #include "ios/chrome/browser/sync/sync_setup_service_factory.h" +#import "ios/chrome/browser/ui/commands/open_new_tab_command.h" #import "ios/chrome/browser/ui/context_menu/context_menu_coordinator.h" #include "ios/chrome/browser/ui/history/history_entries_status_item.h" #import "ios/chrome/browser/ui/history/history_entries_status_item_delegate.h" @@ -955,28 +956,29 @@ // Opens URL in a new non-incognito tab and dismisses the history view. - (void)openURLInNewTab:(const GURL&)URL { - GURL copiedURL(URL); + OpenNewTabCommand* command = + [[OpenNewTabCommand alloc] initWithURL:URL + referrer:web::Referrer() + inIncognito:NO + inBackground:NO + appendTo:kLastTab]; + [self.localDispatcher dismissHistoryWithCompletion:^{ - [self.loader webPageOrderedOpen:copiedURL - referrer:web::Referrer() - inIncognito:NO - inBackground:NO - originPoint:CGPointZero - appendTo:kLastTab]; + [self.loader webPageOrderedOpen:command]; [self.presentationDelegate showActiveRegularTabFromHistory]; }]; } // Opens URL in a new incognito tab and dismisses the history view. - (void)openURLInNewIncognitoTab:(const GURL&)URL { - GURL copiedURL(URL); + OpenNewTabCommand* command = + [[OpenNewTabCommand alloc] initWithURL:URL + referrer:web::Referrer() + inIncognito:YES + inBackground:NO + appendTo:kLastTab]; [self.localDispatcher dismissHistoryWithCompletion:^{ - [self.loader webPageOrderedOpen:copiedURL - referrer:web::Referrer() - inIncognito:YES - inBackground:NO - originPoint:CGPointZero - appendTo:kLastTab]; + [self.loader webPageOrderedOpen:command]; [self.presentationDelegate showActiveIncognitoTabFromHistory]; }]; }
diff --git a/ios/chrome/browser/ui/history/history_ui_egtest.mm b/ios/chrome/browser/ui/history/history_ui_egtest.mm index de369f4..c4739e7 100644 --- a/ios/chrome/browser/ui/history/history_ui_egtest.mm +++ b/ios/chrome/browser/ui/history/history_ui_egtest.mm
@@ -129,19 +129,11 @@ id<GREYMatcher> CancelButton() { return grey_accessibilityID(kHistoryToolbarCancelButtonIdentifier); } -// Matcher for the button to open the clear browsing data panel. -id<GREYMatcher> OpenClearBrowsingDataButton() { - return grey_accessibilityID(kHistoryToolbarClearBrowsingButtonIdentifier); -} // Matcher for the Open in New Incognito Tab option in the context menu. id<GREYMatcher> OpenInNewIncognitoTabButton() { return ButtonWithAccessibilityLabelId( IDS_IOS_CONTENT_CONTEXT_OPENLINKNEWINCOGNITOTAB); } -// Matcher for the clear browsing data button on the clear browsing data panel. -id<GREYMatcher> ClearBrowsingDataButton() { - return ButtonWithAccessibilityLabelId(IDS_IOS_CLEAR_BUTTON); -} } // namespace @@ -156,8 +148,6 @@ - (void)loadTestURLs; // Displays the history UI. - (void)openHistoryPanel; -// Asserts that the history UI displays no history entries. -- (void)assertNoHistoryShown; // Resets which data is selected in the Clear Browsing Data UI. - (void)resetBrowsingDataPrefs; @@ -213,7 +203,7 @@ // Tests that no history is shown if there has been no navigation. - (void)testDisplayNoHistory { [self openHistoryPanel]; - [self assertNoHistoryShown]; + [ChromeEarlGreyUI assertHistoryHasNoEntries]; } // Tests that the history panel displays navigation history. @@ -321,7 +311,7 @@ [[EarlGrey selectElementWithMatcher:DeleteHistoryEntriesButton()] performAction:grey_tap()]; - [self assertNoHistoryShown]; + [ChromeEarlGreyUI assertHistoryHasNoEntries]; } // Tests clear browsing history. @@ -329,31 +319,8 @@ [self loadTestURLs]; [self openHistoryPanel]; - // Open the Clear Browsing Data dialog. - [[EarlGrey selectElementWithMatcher:OpenClearBrowsingDataButton()] - performAction:grey_tap()]; - - // Uncheck "Cookies, Site Data" and "Cached Images and Files," which are - // checked by default, and press "Clear Browsing Data" - [[EarlGrey selectElementWithMatcher:chrome_test_util::ClearCookiesButton()] - performAction:grey_tap()]; - [[EarlGrey selectElementWithMatcher:chrome_test_util::ClearCacheButton()] - performAction:grey_tap()]; - [[EarlGrey selectElementWithMatcher:ClearBrowsingDataButton()] - performAction:grey_tap()]; - [[EarlGrey selectElementWithMatcher:chrome_test_util:: - ConfirmClearBrowsingDataButton()] - performAction:grey_tap()]; - - // Include sufficientlyVisible condition for the case of the clear browsing - // dialog, which also has a "Done" button and is displayed over the history - // panel. - id<GREYMatcher> visibleDoneButton = grey_allOf( - chrome_test_util::SettingsDoneButton(), grey_sufficientlyVisible(), nil); - [[EarlGrey selectElementWithMatcher:visibleDoneButton] - performAction:grey_tap()]; - - [self assertNoHistoryShown]; + [ChromeEarlGreyUI openAndClearBrowsingDataFromHistory]; + [ChromeEarlGreyUI assertHistoryHasNoEntries]; } // Tests display and selection of 'Open in New Tab' in a context menu on a @@ -459,28 +426,6 @@ [ChromeEarlGreyUI tapToolsMenuButton:HistoryButton()]; } -- (void)assertNoHistoryShown { - id<GREYMatcher> noHistoryMessageMatcher = - grey_allOf(grey_text(l10n_util::GetNSString(IDS_HISTORY_NO_RESULTS)), - grey_sufficientlyVisible(), nil); - [[EarlGrey selectElementWithMatcher:noHistoryMessageMatcher] - assertWithMatcher:grey_notNil()]; - - if (IsUIRefreshPhase1Enabled()) { - id<GREYMatcher> historyEntryMatcher = - grey_allOf(grey_kindOfClass([TableViewURLCell class]), - grey_sufficientlyVisible(), nil); - [[EarlGrey selectElementWithMatcher:historyEntryMatcher] - assertWithMatcher:grey_nil()]; - } else { - id<GREYMatcher> historyEntryMatcher = - grey_allOf(grey_kindOfClass([LegacyHistoryEntryCell class]), - grey_sufficientlyVisible(), nil); - [[EarlGrey selectElementWithMatcher:historyEntryMatcher] - assertWithMatcher:grey_nil()]; - } -} - - (void)resetBrowsingDataPrefs { PrefService* prefs = chrome_test_util::GetOriginalBrowserState()->GetPrefs(); prefs->ClearPref(browsing_data::prefs::kDeleteBrowsingHistory);
diff --git a/ios/chrome/browser/ui/history/legacy_history_collection_view_controller.mm b/ios/chrome/browser/ui/history/legacy_history_collection_view_controller.mm index 88682ce..3bcfddc5 100644 --- a/ios/chrome/browser/ui/history/legacy_history_collection_view_controller.mm +++ b/ios/chrome/browser/ui/history/legacy_history_collection_view_controller.mm
@@ -29,6 +29,7 @@ #import "ios/chrome/browser/ui/collection_view/cells/collection_view_item.h" #import "ios/chrome/browser/ui/collection_view/cells/collection_view_text_item.h" #import "ios/chrome/browser/ui/collection_view/collection_view_model.h" +#import "ios/chrome/browser/ui/commands/open_new_tab_command.h" #import "ios/chrome/browser/ui/context_menu/context_menu_coordinator.h" #import "ios/chrome/browser/ui/history/features.h" #import "ios/chrome/browser/ui/history/history_entries_status_item_delegate.h" @@ -882,28 +883,28 @@ } - (void)openURLInNewTab:(const GURL&)URL { - GURL copiedURL(URL); + OpenNewTabCommand* command = + [[OpenNewTabCommand alloc] initWithURL:URL + referrer:web::Referrer() + inIncognito:NO + inBackground:NO + appendTo:kLastTab]; [self.delegate historyCollectionViewController:self shouldCloseWithCompletion:^{ - [self.URLLoader webPageOrderedOpen:copiedURL - referrer:web::Referrer() - inIncognito:NO - inBackground:NO - originPoint:CGPointZero - appendTo:kLastTab]; + [self.URLLoader webPageOrderedOpen:command]; }]; } - (void)openURLInNewIncognitoTab:(const GURL&)URL { - GURL copiedURL(URL); + OpenNewTabCommand* command = + [[OpenNewTabCommand alloc] initWithURL:URL + referrer:web::Referrer() + inIncognito:YES + inBackground:NO + appendTo:kLastTab]; [self.delegate historyCollectionViewController:self shouldCloseWithCompletion:^{ - [self.URLLoader webPageOrderedOpen:copiedURL - referrer:web::Referrer() - inIncognito:YES - inBackground:NO - originPoint:CGPointZero - appendTo:kLastTab]; + [self.URLLoader webPageOrderedOpen:command]; }]; }
diff --git a/ios/chrome/browser/ui/key_commands_provider.mm b/ios/chrome/browser/ui/key_commands_provider.mm index 743321b2..a28c2a4 100644 --- a/ios/chrome/browser/ui/key_commands_provider.mm +++ b/ios/chrome/browser/ui/key_commands_provider.mm
@@ -67,14 +67,14 @@ void (^newTab)() = ^{ OpenNewTabCommand* newTabCommand = [OpenNewTabCommand command]; newTabCommand.shouldFocusOmnibox = YES; - [weakDispatcher openURL:newTabCommand]; + [weakDispatcher openURLInNewTab:newTabCommand]; }; void (^newIncognitoTab)() = ^{ OpenNewTabCommand* newIncognitoTabCommand = [OpenNewTabCommand incognitoTabCommand]; newIncognitoTabCommand.shouldFocusOmnibox = YES; - [weakDispatcher openURL:newIncognitoTabCommand]; + [weakDispatcher openURLInNewTab:newIncognitoTabCommand]; }; const int browseLeftDescriptionID = useRTLLayout
diff --git a/ios/chrome/browser/ui/ntp/new_tab_page_perftest.mm b/ios/chrome/browser/ui/ntp/new_tab_page_perftest.mm index ffd6ca1..7f92e03 100644 --- a/ios/chrome/browser/ui/ntp/new_tab_page_perftest.mm +++ b/ios/chrome/browser/ui/ntp/new_tab_page_perftest.mm
@@ -40,7 +40,7 @@ } base::TimeDelta TimedNewTab() { base::Time startTime = base::Time::NowFromSystemTime(); - [[bvc_ dispatcher] openURL:[OpenNewTabCommand command]]; + [[bvc_ dispatcher] openURLInNewTab:[OpenNewTabCommand command]]; return base::Time::NowFromSystemTime() - startTime; } void SettleUI() {
diff --git a/ios/chrome/browser/ui/ntp/recent_tabs/legacy_recent_tabs_table_view_controller.mm b/ios/chrome/browser/ui/ntp/recent_tabs/legacy_recent_tabs_table_view_controller.mm index b2e4fda..a8c9b9f7 100644 --- a/ios/chrome/browser/ui/ntp/recent_tabs/legacy_recent_tabs_table_view_controller.mm +++ b/ios/chrome/browser/ui/ntp/recent_tabs/legacy_recent_tabs_table_view_controller.mm
@@ -24,6 +24,7 @@ #import "ios/chrome/browser/ui/authentication/signin_promo_view_consumer.h" #import "ios/chrome/browser/ui/authentication/signin_promo_view_mediator.h" #include "ios/chrome/browser/ui/commands/application_commands.h" +#import "ios/chrome/browser/ui/commands/open_new_tab_command.h" #import "ios/chrome/browser/ui/commands/show_signin_command.h" #import "ios/chrome/browser/ui/context_menu/context_menu_coordinator.h" #import "ios/chrome/browser/ui/ntp/recent_tabs/legacy_recent_tabs_table_view_controller_delegate.h" @@ -639,11 +640,13 @@ [self sessionAtIndexPath:indexPath]; [self dismissRecentTabsModal]; for (auto const& tab : session->tabs) { - [_loader webPageOrderedOpen:tab->virtual_url - referrer:web::Referrer() - inBackground:YES - originPoint:CGPointZero - appendTo:kLastTab]; + OpenNewTabCommand* command = + [[OpenNewTabCommand alloc] initWithURL:tab->virtual_url + referrer:web::Referrer() + inIncognito:NO + inBackground:YES + appendTo:kLastTab]; + [_loader webPageOrderedOpen:command]; } }
diff --git a/ios/chrome/browser/ui/page_info/BUILD.gn b/ios/chrome/browser/ui/page_info/BUILD.gn index 92a6704..38ad8ba6 100644 --- a/ios/chrome/browser/ui/page_info/BUILD.gn +++ b/ios/chrome/browser/ui/page_info/BUILD.gn
@@ -45,6 +45,7 @@ ":page_info", "//base", "//ios/chrome/browser", + "//ios/chrome/browser/browser_state", "//ios/chrome/browser/reading_list", "//ios/chrome/browser/tabs", "//ios/chrome/browser/ui",
diff --git a/ios/chrome/browser/ui/page_info/page_info_legacy_coordinator.mm b/ios/chrome/browser/ui/page_info/page_info_legacy_coordinator.mm index a8e8c8c7..32df63d 100644 --- a/ios/chrome/browser/ui/page_info/page_info_legacy_coordinator.mm +++ b/ios/chrome/browser/ui/page_info/page_info_legacy_coordinator.mm
@@ -8,11 +8,13 @@ #include "base/metrics/user_metrics.h" #include "base/metrics/user_metrics_action.h" +#include "ios/chrome/browser/browser_state/chrome_browser_state.h" #include "ios/chrome/browser/chrome_url_constants.h" #include "ios/chrome/browser/reading_list/offline_url_utils.h" #import "ios/chrome/browser/tabs/tab.h" #import "ios/chrome/browser/tabs/tab_model.h" #import "ios/chrome/browser/ui/commands/command_dispatcher.h" +#import "ios/chrome/browser/ui/commands/open_new_tab_command.h" #import "ios/chrome/browser/ui/commands/page_info_commands.h" #import "ios/chrome/browser/ui/fullscreen/chrome_coordinator+fullscreen_disabling.h" #include "ios/chrome/browser/ui/page_info/page_info_model.h" @@ -142,11 +144,14 @@ } - (void)showSecurityHelpPage { - [self.loader webPageOrderedOpen:GURL(kPageInfoHelpCenterURL) - referrer:web::Referrer() - inBackground:NO - originPoint:CGPointZero - appendTo:kCurrentTab]; + OpenNewTabCommand* command = + [[OpenNewTabCommand alloc] initWithURL:GURL(kPageInfoHelpCenterURL) + referrer:web::Referrer() + inIncognito:self.browserState->IsOffTheRecord() + inBackground:NO + appendTo:kLastTab]; + + [self.loader webPageOrderedOpen:command]; [self hidePageInfo]; }
diff --git a/ios/chrome/browser/ui/popup_menu/popup_menu_table_view_controller.mm b/ios/chrome/browser/ui/popup_menu/popup_menu_table_view_controller.mm index 49c1dc6..658ccd7 100644 --- a/ios/chrome/browser/ui/popup_menu/popup_menu_table_view_controller.mm +++ b/ios/chrome/browser/ui/popup_menu/popup_menu_table_view_controller.mm
@@ -171,14 +171,14 @@ [self.tableViewModel itemsInSectionWithIdentifier:sectionIdentifier]) { CGSize sizeForCell = [item cellSizeForWidth:self.view.bounds.size.width]; width = MAX(width, ceil(sizeForCell.width)); - height += ceil(sizeForCell.height); + height += sizeForCell.height; } // Add the separator height (only available the non-final sections). height += [self tableView:self.tableView heightForFooterInSection:section]; } height += self.tableView.contentInset.top + self.tableView.contentInset.bottom; - return CGSizeMake(width, height); + return CGSizeMake(width, ceil(height)); } #pragma mark - UITableViewDelegate @@ -273,13 +273,15 @@ break; case PopupMenuActionOpenNewTab: base::RecordAction(UserMetricsAction("MobileMenuNewTab")); - [self.dispatcher openURL:[OpenNewTabCommand commandWithIncognito:NO - originPoint:origin]]; + [self.dispatcher + openURLInNewTab:[OpenNewTabCommand commandWithIncognito:NO + originPoint:origin]]; break; case PopupMenuActionOpenNewIncognitoTab: base::RecordAction(UserMetricsAction("MobileMenuNewIncognitoTab")); - [self.dispatcher openURL:[OpenNewTabCommand commandWithIncognito:YES - originPoint:origin]]; + [self.dispatcher + openURLInNewTab:[OpenNewTabCommand commandWithIncognito:YES + originPoint:origin]]; break; case PopupMenuActionReadLater: base::RecordAction(UserMetricsAction("MobileMenuReadLater"));
diff --git a/ios/chrome/browser/ui/reading_list/BUILD.gn b/ios/chrome/browser/ui/reading_list/BUILD.gn index 3b0b68ee..d085e7ea 100644 --- a/ios/chrome/browser/ui/reading_list/BUILD.gn +++ b/ios/chrome/browser/ui/reading_list/BUILD.gn
@@ -49,6 +49,7 @@ "//ios/chrome/browser/tabs", "//ios/chrome/browser/ui", "//ios/chrome/browser/ui/alert_coordinator", + "//ios/chrome/browser/ui/commands", "//ios/chrome/browser/ui/coordinators:chrome_coordinators", "//ios/chrome/browser/ui/favicon", "//ios/chrome/browser/ui/reading_list/context_menu",
diff --git a/ios/chrome/browser/ui/reading_list/legacy_reading_list_coordinator.mm b/ios/chrome/browser/ui/reading_list/legacy_reading_list_coordinator.mm index 32fd2d81..6a45e0e2 100644 --- a/ios/chrome/browser/ui/reading_list/legacy_reading_list_coordinator.mm +++ b/ios/chrome/browser/ui/reading_list/legacy_reading_list_coordinator.mm
@@ -21,6 +21,7 @@ #include "ios/chrome/browser/reading_list/reading_list_download_service.h" #include "ios/chrome/browser/reading_list/reading_list_download_service_factory.h" #include "ios/chrome/browser/reading_list/reading_list_model_factory.h" +#import "ios/chrome/browser/ui/commands/open_new_tab_command.h" #import "ios/chrome/browser/ui/reading_list/context_menu/reading_list_context_menu_commands.h" #import "ios/chrome/browser/ui/reading_list/context_menu/reading_list_context_menu_coordinator.h" #import "ios/chrome/browser/ui/reading_list/context_menu/reading_list_context_menu_params.h" @@ -303,17 +304,18 @@ // Prepare the collection for dismissal. [self.collectionViewController willBeDismissed]; - // Use a referrer with a specific URL to signal that this entry should not be - // taken into account for the Most Visited tiles. - web::Referrer referrer = - web::Referrer(GURL(kReadingListReferrerURL), web::ReferrerPolicyDefault); if (newTab) { - [self.URLLoader webPageOrderedOpen:loadURL - referrer:referrer - inIncognito:incognito - inBackground:NO - originPoint:CGPointZero - appendTo:kLastTab]; + // Use a referrer with a specific URL to signal that this entry should not + // be taken into account for the Most Visited tiles. + web::Referrer referrer = web::Referrer(GURL(kReadingListReferrerURL), + web::ReferrerPolicyDefault); + OpenNewTabCommand* command = + [[OpenNewTabCommand alloc] initWithURL:loadURL + referrer:referrer + inIncognito:incognito + inBackground:NO + appendTo:kLastTab]; + [self.URLLoader webPageOrderedOpen:command]; } else { web::NavigationManager::WebLoadParams params(loadURL); params.transition_type = ui::PAGE_TRANSITION_AUTO_BOOKMARK;
diff --git a/ios/chrome/browser/ui/reading_list/reading_list_coordinator.mm b/ios/chrome/browser/ui/reading_list/reading_list_coordinator.mm index fad745f..b2af5cf2 100644 --- a/ios/chrome/browser/ui/reading_list/reading_list_coordinator.mm +++ b/ios/chrome/browser/ui/reading_list/reading_list_coordinator.mm
@@ -17,6 +17,7 @@ #import "ios/chrome/browser/metrics/new_tab_page_uma.h" #include "ios/chrome/browser/reading_list/offline_url_utils.h" #include "ios/chrome/browser/reading_list/reading_list_model_factory.h" +#import "ios/chrome/browser/ui/commands/open_new_tab_command.h" #import "ios/chrome/browser/ui/reading_list/context_menu/reading_list_context_menu_commands.h" #import "ios/chrome/browser/ui/reading_list/context_menu/reading_list_context_menu_coordinator.h" #import "ios/chrome/browser/ui/reading_list/context_menu/reading_list_context_menu_params.h" @@ -364,15 +365,16 @@ // Use a referrer with a specific URL to signal that this entry should not be // taken into account for the Most Visited tiles. - web::Referrer referrer = - web::Referrer(GURL(kReadingListReferrerURL), web::ReferrerPolicyDefault); if (newTab) { - [self.loader webPageOrderedOpen:loadURL - referrer:referrer - inIncognito:incognito - inBackground:NO - originPoint:CGPointZero - appendTo:kLastTab]; + web::Referrer referrer = web::Referrer(GURL(kReadingListReferrerURL), + web::ReferrerPolicyDefault); + OpenNewTabCommand* command = + [[OpenNewTabCommand alloc] initWithURL:loadURL + referrer:referrer + inIncognito:incognito + inBackground:NO + appendTo:kLastTab]; + [self.loader webPageOrderedOpen:command]; } else { web::NavigationManager::WebLoadParams params(loadURL); params.transition_type = ui::PAGE_TRANSITION_AUTO_BOOKMARK;
diff --git a/ios/chrome/browser/ui/recent_tabs/recent_tabs_table_view_controller.mm b/ios/chrome/browser/ui/recent_tabs/recent_tabs_table_view_controller.mm index 426f850..2eee0b1 100644 --- a/ios/chrome/browser/ui/recent_tabs/recent_tabs_table_view_controller.mm +++ b/ios/chrome/browser/ui/recent_tabs/recent_tabs_table_view_controller.mm
@@ -24,6 +24,7 @@ #import "ios/chrome/browser/ui/authentication/signin_promo_view_consumer.h" #import "ios/chrome/browser/ui/authentication/signin_promo_view_mediator.h" #include "ios/chrome/browser/ui/commands/application_commands.h" +#import "ios/chrome/browser/ui/commands/open_new_tab_command.h" #import "ios/chrome/browser/ui/commands/show_signin_command.h" #import "ios/chrome/browser/ui/context_menu/context_menu_coordinator.h" #import "ios/chrome/browser/ui/ntp/recent_tabs/legacy_recent_tabs_table_view_controller_delegate.h" @@ -1026,11 +1027,14 @@ synced_sessions::DistantSession const* session = [self sessionForSection:section]; for (auto const& tab : session->tabs) { - [self.loader webPageOrderedOpen:tab->virtual_url - referrer:web::Referrer() - inBackground:YES - originPoint:CGPointZero - appendTo:kLastTab]; + OpenNewTabCommand* command = + [[OpenNewTabCommand alloc] initWithURL:tab->virtual_url + referrer:web::Referrer() + inIncognito:NO + inBackground:YES + appendTo:kLastTab]; + + [self.loader webPageOrderedOpen:command]; } [self.presentationDelegate showActiveRegularTabFromRecentTabs]; }
diff --git a/ios/chrome/browser/ui/sad_tab/sad_tab_view.mm b/ios/chrome/browser/ui/sad_tab/sad_tab_view.mm index 2f9444f..a7a92a11 100644 --- a/ios/chrome/browser/ui/sad_tab/sad_tab_view.mm +++ b/ios/chrome/browser/ui/sad_tab/sad_tab_view.mm
@@ -310,7 +310,7 @@ action:^(const GURL& URL) { OpenNewTabCommand* command = [OpenNewTabCommand commandWithURLFromChrome:URL]; - [weakSelf.dispatcher openURL:command]; + [weakSelf.dispatcher openURLInNewTab:command]; }]; _footerLabelLinkController.linkFont =
diff --git a/ios/chrome/browser/ui/settings/block_popups_collection_view_controller.mm b/ios/chrome/browser/ui/settings/block_popups_collection_view_controller.mm index 273fbc9..de0467d 100644 --- a/ios/chrome/browser/ui/settings/block_popups_collection_view_controller.mm +++ b/ios/chrome/browser/ui/settings/block_popups_collection_view_controller.mm
@@ -92,10 +92,6 @@ return self; } -- (void)dealloc { - [_disablePopupsSetting setObserver:nil]; -} - #pragma mark - SettingsRootCollectionViewController - (void)loadModel {
diff --git a/ios/chrome/browser/ui/settings/content_settings_collection_view_controller.mm b/ios/chrome/browser/ui/settings/content_settings_collection_view_controller.mm index 8cf21a1f4..bb15f72a 100644 --- a/ios/chrome/browser/ui/settings/content_settings_collection_view_controller.mm +++ b/ios/chrome/browser/ui/settings/content_settings_collection_view_controller.mm
@@ -122,10 +122,6 @@ return self; } -- (void)dealloc { - [_disablePopupsSetting setObserver:nil]; -} - - (void)loadModel { [super loadModel];
diff --git a/ios/chrome/browser/ui/settings/google_services_settings_coordinator.mm b/ios/chrome/browser/ui/settings/google_services_settings_coordinator.mm index 2fccaf2..efb32db 100644 --- a/ios/chrome/browser/ui/settings/google_services_settings_coordinator.mm +++ b/ios/chrome/browser/ui/settings/google_services_settings_coordinator.mm
@@ -4,29 +4,43 @@ #import "ios/chrome/browser/ui/settings/google_services_settings_coordinator.h" +#include "base/metrics/user_metrics.h" +#include "base/metrics/user_metrics_action.h" +#include "components/browser_sync/profile_sync_service.h" #include "components/google/core/common/google_util.h" #include "ios/chrome/browser/application_context.h" #include "ios/chrome/browser/browser_state/chrome_browser_state.h" #include "ios/chrome/browser/chrome_url_constants.h" +#include "ios/chrome/browser/signin/authentication_service.h" #import "ios/chrome/browser/signin/authentication_service_factory.h" #include "ios/chrome/browser/sync/profile_sync_service_factory.h" #include "ios/chrome/browser/sync/sync_setup_service_factory.h" #import "ios/chrome/browser/ui/commands/application_commands.h" #import "ios/chrome/browser/ui/commands/open_new_tab_command.h" +#import "ios/chrome/browser/ui/icons/chrome_icon.h" #import "ios/chrome/browser/ui/settings/google_services_settings_local_commands.h" #import "ios/chrome/browser/ui/settings/google_services_settings_mediator.h" #import "ios/chrome/browser/ui/settings/google_services_settings_view_controller.h" +#import "ios/chrome/browser/ui/settings/sync_encryption_collection_view_controller.h" +#import "ios/chrome/browser/ui/settings/sync_encryption_passphrase_collection_view_controller.h" +#include "ios/public/provider/chrome/browser/chrome_browser_provider.h" +#import "ios/public/provider/chrome/browser/signin/chrome_identity_browser_opener.h" +#include "ios/public/provider/chrome/browser/signin/chrome_identity_service.h" +#include "net/base/mac/url_conversions.h" #if !defined(__has_feature) || !__has_feature(objc_arc) #error "This file requires ARC support." #endif @interface GoogleServicesSettingsCoordinator ()< + ChromeIdentityBrowserOpener, GoogleServicesSettingsLocalCommands, GoogleServicesSettingsViewControllerPresentationDelegate> // Google services settings mediator. @property(nonatomic, strong) GoogleServicesSettingsMediator* mediator; +// Returns the authentication service. +@property(nonatomic, assign, readonly) AuthenticationService* authService; @end @@ -55,8 +69,7 @@ syncService:syncService syncSetupService:syncSetupService]; self.mediator.consumer = viewController; - self.mediator.authService = - AuthenticationServiceFactory::GetForBrowserState(self.browserState); + self.mediator.authService = self.authService; viewController.modelDelegate = self.mediator; viewController.serviceDelegate = self.mediator; DCHECK(self.navigationController); @@ -64,14 +77,54 @@ animated:YES]; } +#pragma mark - Private + +- (void)closeGoogleActivitySettings:(id)sender { + [self.navigationController dismissViewControllerAnimated:YES completion:nil]; +} + +#pragma mark - Properties + +- (AuthenticationService*)authService { + return AuthenticationServiceFactory::GetForBrowserState(self.browserState); +} + #pragma mark - GoogleServicesSettingsLocalCommands - (void)openGoogleActivityControlsDialog { - // Needs to be implemented. + base::RecordAction(base::UserMetricsAction( + "Signin_AccountSettings_GoogleActivityControlsClicked")); + UINavigationController* settingsDetails = + ios::GetChromeBrowserProvider() + ->GetChromeIdentityService() + ->CreateWebAndAppSettingDetailsController( + self.authService->GetAuthenticatedIdentity(), self); + UIImage* closeIcon = [ChromeIcon closeIcon]; + SEL action = @selector(closeGoogleActivitySettings:); + [settingsDetails.topViewController navigationItem].leftBarButtonItem = + [ChromeIcon templateBarButtonItemWithImage:closeIcon + target:self + action:action]; + [self.navigationController presentViewController:settingsDetails + animated:YES + completion:nil]; } - (void)openEncryptionDialog { - // Needs to be implemented. + browser_sync::ProfileSyncService* syncService = + ProfileSyncServiceFactory::GetForBrowserState(self.browserState); + SettingsRootCollectionViewController* controllerToPush; + // If there was a sync error, prompt the user to enter the passphrase. + // Otherwise, show the full encryption options. + if (syncService->IsPassphraseRequired()) { + controllerToPush = [[SyncEncryptionPassphraseCollectionViewController alloc] + initWithBrowserState:self.browserState]; + } else { + controllerToPush = [[SyncEncryptionCollectionViewController alloc] + initWithBrowserState:self.browserState]; + } + controllerToPush.dispatcher = self.dispatcher; + [self.navigationController pushViewController:controllerToPush animated:YES]; } - (void)openManageSyncedDataWebPage { @@ -91,4 +144,14 @@ [self.delegate googleServicesSettingsCoordinatorDidRemove:self]; } +#pragma mark - ChromeIdentityBrowserOpener + +- (void)openURL:(NSURL*)URL + view:(UIView*)view + viewController:(UIViewController*)viewController { + OpenNewTabCommand* command = + [OpenNewTabCommand commandWithURLFromChrome:net::GURLWithNSURL(URL)]; + [self.dispatcher closeSettingsUIAndOpenURL:command]; +} + @end
diff --git a/ios/chrome/browser/ui/settings/google_services_settings_mediator.mm b/ios/chrome/browser/ui/settings/google_services_settings_mediator.mm index 2bf95d0..a36d7ef2 100644 --- a/ios/chrome/browser/ui/settings/google_services_settings_mediator.mm +++ b/ios/chrome/browser/ui/settings/google_services_settings_mediator.mm
@@ -11,6 +11,7 @@ #include "components/prefs/pref_change_registrar.h" #include "components/prefs/pref_service.h" #include "components/unified_consent/pref_names.h" +#include "ios/chrome/browser/pref_names.h" #import "ios/chrome/browser/signin/authentication_service.h" #import "ios/chrome/browser/signin/authentication_service_factory.h" #include "ios/chrome/browser/sync/sync_observer_bridge.h" @@ -19,6 +20,8 @@ #import "ios/chrome/browser/ui/collection_view/cells/collection_view_text_item.h" #import "ios/chrome/browser/ui/settings/cells/settings_collapsible_item.h" #import "ios/chrome/browser/ui/settings/cells/sync_switch_item.h" +#import "ios/chrome/browser/ui/settings/utils/observable_boolean.h" +#import "ios/chrome/browser/ui/settings/utils/pref_backed_boolean.h" #include "ios/chrome/grit/ios_chromium_strings.h" #include "ios/chrome/grit/ios_strings.h" #import "ios/third_party/material_components_ios/src/components/Palettes/src/MaterialPalettes.h" @@ -75,7 +78,8 @@ } // namespace -@interface GoogleServicesSettingsMediator ()<PrefObserverDelegate, +@interface GoogleServicesSettingsMediator ()<BooleanObserver, + PrefObserverDelegate, SyncObserverModelBridge> { // Bridge to listen to pref changes. std::unique_ptr<PrefObserverBridge> prefObserverBridge_; @@ -92,6 +96,12 @@ @property(nonatomic, assign, readonly) PrefService* prefService; // Sync setup service. @property(nonatomic, assign, readonly) SyncSetupService* syncSetupService; +// Preference value for the "Autocomplete searches and URLs" feature. +@property(nonatomic, strong, readonly) + PrefBackedBoolean* autocompleteSearchPreference; +// Preference value for the "Make searches and browsing better" feature. +@property(nonatomic, strong, readonly) + PrefBackedBoolean* anonymizedDataCollectionPreference; // YES if the switch for |syncEverythingItem| is currently animating from one // state to another. @@ -120,6 +130,9 @@ @synthesize authService = _authService; @synthesize prefService = _prefService; @synthesize syncSetupService = _syncSetupService; +@synthesize autocompleteSearchPreference = _autocompleteSearchPreference; +@synthesize anonymizedDataCollectionPreference = + _anonymizedDataCollectionPreference; @synthesize syncEverythingSwitchBeingAnimated = _syncEverythingSwitchBeingAnimated; @synthesize personalizedSectionBeingAnimated = @@ -148,6 +161,15 @@ prefChangeRegistrar_.Init(prefService); prefObserverBridge_->ObserveChangesForPreference(kUnifiedConsentGiven, &prefChangeRegistrar_); + _autocompleteSearchPreference = [[PrefBackedBoolean alloc] + initWithPrefService:prefService + prefName:prefs::kSearchSuggestEnabled]; + [_autocompleteSearchPreference setObserver:self]; + _anonymizedDataCollectionPreference = [[PrefBackedBoolean alloc] + initWithPrefService:prefService + prefName:unified_consent::prefs:: + kUrlKeyedAnonymizedDataCollectionEnabled]; + [_anonymizedDataCollectionPreference setObserver:self]; } return self; } @@ -435,15 +457,6 @@ enabled:enabled]; } -// Updates |item.on| and |item.enabled| according to its data type. -- (void)updateSwitchValueWithItem:(SyncSwitchItem*)item enabled:(BOOL)enabled { - SyncSetupService::SyncableDatatype dataType = - static_cast<SyncSetupService::SyncableDatatype>(item.dataType); - syncer::ModelType modelType = self.syncSetupService->GetModelType(dataType); - item.on = self.syncSetupService->IsDataTypePreferred(modelType); - item.enabled = enabled; -} - // Updates the non-personalized section according to the user consent. - (void)updateNonPersonalizedSection { BOOL enabled = !self.isAuthenticated || !self.isConsentGiven; @@ -463,14 +476,33 @@ for (CollectionViewItem* item in items) { if ([item isKindOfClass:[SyncSwitchItem class]]) { SyncSwitchItem* switchItem = base::mac::ObjCCast<SyncSwitchItem>(item); - if (switchItem.commandID == - GoogleServicesSettingsCommandIDToggleDataTypeSync) { - SyncSetupService::SyncableDatatype dataType = - static_cast<SyncSetupService::SyncableDatatype>( - switchItem.dataType); - syncer::ModelType modelType = - self.syncSetupService->GetModelType(dataType); - switchItem.on = self.syncSetupService->IsDataTypePreferred(modelType); + switch (switchItem.commandID) { + case GoogleServicesSettingsCommandIDToggleDataTypeSync: { + SyncSetupService::SyncableDatatype dataType = + static_cast<SyncSetupService::SyncableDatatype>( + switchItem.dataType); + syncer::ModelType modelType = + self.syncSetupService->GetModelType(dataType); + switchItem.on = self.syncSetupService->IsDataTypePreferred(modelType); + break; + } + case GoogleServicesSettingsCommandIDToggleAutocompleteSearchesService: + switchItem.on = self.autocompleteSearchPreference.value; + break; + case GoogleServicesSettingsCommandIDTogglePreloadPagesService: + // Needs to be implemented. + break; + case GoogleServicesSettingsCommandIDToggleImproveChromeService: + // Needs to be implemented. + break; + case GoogleServicesSettingsCommandIDToggleBetterSearchAndBrowsingService: + switchItem.on = self.anonymizedDataCollectionPreference.value; + break; + case GoogleServicesSettingsCommandIDOpenGoogleActivityControlsDialog: + case GoogleServicesSettingsCommandIDOpenEncryptionDialog: + case GoogleServicesSettingsCommandIDOpenManageSyncedDataWebPage: + NOTREACHED(); + break; } switchItem.enabled = enabled; } else if ([item isKindOfClass:[CollectionViewTextItem class]]) { @@ -515,7 +547,7 @@ } - (void)toggleAutocompleteSearchesServiceWithValue:(BOOL)value { - // Needs to be implemented. + self.autocompleteSearchPreference.value = value; } - (void)togglePreloadPagesServiceWithValue:(BOOL)value { @@ -527,7 +559,7 @@ } - (void)toggleBetterSearchAndBrowsingServiceWithValue:(BOOL)value { - // Needs to be implemented. + self.anonymizedDataCollectionPreference.value = value; } #pragma mark - PrefObserverDelegate @@ -578,4 +610,15 @@ } } +#pragma mark - BooleanObserver + +- (void)booleanDidChange:(id<ObservableBoolean>)observableBoolean { + [self updateNonPersonalizedSection]; + CollectionViewModel* model = self.consumer.collectionViewModel; + NSUInteger index = + [model sectionForSectionIdentifier:NonPersonalizedSectionIdentifier]; + NSIndexSet* sectionIndexToReload = [NSIndexSet indexSetWithIndex:index]; + [self.consumer reloadSections:sectionIndexToReload]; +} + @end
diff --git a/ios/chrome/browser/ui/settings/privacy_collection_view_controller.mm b/ios/chrome/browser/ui/settings/privacy_collection_view_controller.mm index 3cf5bd3..ed75bb9d 100644 --- a/ios/chrome/browser/ui/settings/privacy_collection_view_controller.mm +++ b/ios/chrome/browser/ui/settings/privacy_collection_view_controller.mm
@@ -147,10 +147,6 @@ return self; } -- (void)dealloc { - [_suggestionsEnabled setObserver:nil]; -} - #pragma mark - SettingsRootCollectionViewController - (void)loadModel {
diff --git a/ios/chrome/browser/ui/settings/save_passwords_collection_view_controller.mm b/ios/chrome/browser/ui/settings/save_passwords_collection_view_controller.mm index 8cfb367..3367ec1 100644 --- a/ios/chrome/browser/ui/settings/save_passwords_collection_view_controller.mm +++ b/ios/chrome/browser/ui/settings/save_passwords_collection_view_controller.mm
@@ -233,10 +233,6 @@ return self; } -- (void)dealloc { - [passwordManagerEnabled_ setObserver:nil]; -} - - (void)viewDidLoad { [super viewDidLoad]; self.collectionView.prefetchingEnabled = NO;
diff --git a/ios/chrome/browser/ui/settings/translate_collection_view_controller.mm b/ios/chrome/browser/ui/settings/translate_collection_view_controller.mm index 54dec21..2ba3bd6 100644 --- a/ios/chrome/browser/ui/settings/translate_collection_view_controller.mm +++ b/ios/chrome/browser/ui/settings/translate_collection_view_controller.mm
@@ -89,10 +89,6 @@ return self; } -- (void)dealloc { - [_translationEnabled setObserver:nil]; -} - #pragma mark - SettingsRootCollectionViewController - (void)loadModel {
diff --git a/ios/chrome/browser/ui/settings/utils/observable_boolean.h b/ios/chrome/browser/ui/settings/utils/observable_boolean.h index 4bc6073..a6f0bc7 100644 --- a/ios/chrome/browser/ui/settings/utils/observable_boolean.h +++ b/ios/chrome/browser/ui/settings/utils/observable_boolean.h
@@ -16,7 +16,7 @@ @property(nonatomic, assign) BOOL value; // The observer subscribing to this observable boolean's changes notifications. -@property(nonatomic, assign) id<BooleanObserver> observer; +@property(nonatomic, weak) id<BooleanObserver> observer; @end
diff --git a/ios/chrome/browser/ui/signin_interaction/signin_interaction_controller_egtest.mm b/ios/chrome/browser/ui/signin_interaction/signin_interaction_controller_egtest.mm index c151f63..ba0b402b 100644 --- a/ios/chrome/browser/ui/signin_interaction/signin_interaction_controller_egtest.mm +++ b/ios/chrome/browser/ui/signin_interaction/signin_interaction_controller_egtest.mm
@@ -325,7 +325,8 @@ // Open new tab to cancel sign-in. OpenNewTabCommand* command = [OpenNewTabCommand commandWithURLFromChrome:GURL("about:blank")]; - [chrome_test_util::DispatcherForActiveViewController() openURL:command]; + [chrome_test_util::DispatcherForActiveViewController() + openURLInNewTab:command]; // Re-open the sign-in screen. If it wasn't correctly dismissed previously, // this will fail. @@ -366,7 +367,8 @@ // Open new tab to cancel sign-in. OpenNewTabCommand* command = [OpenNewTabCommand commandWithURLFromChrome:GURL("about:blank")]; - [chrome_test_util::DispatcherForActiveViewController() openURL:command]; + [chrome_test_util::DispatcherForActiveViewController() + openURLInNewTab:command]; // Re-open the sign-in screen. If it wasn't correctly dismissed previously, // this will fail. @@ -425,7 +427,8 @@ // Open new tab to cancel sign-in. OpenNewTabCommand* command = [OpenNewTabCommand commandWithURLFromChrome:GURL("about:blank")]; - [chrome_test_util::DispatcherForActiveViewController() openURL:command]; + [chrome_test_util::DispatcherForActiveViewController() + openURLInNewTab:command]; // Re-open the sign-in screen. If it wasn't correctly dismissed previously, // this will fail. @@ -467,7 +470,8 @@ // Open new tab to cancel sign-in. OpenNewTabCommand* command = [OpenNewTabCommand commandWithURLFromChrome:GURL("about:blank")]; - [chrome_test_util::DispatcherForActiveViewController() openURL:command]; + [chrome_test_util::DispatcherForActiveViewController() + openURLInNewTab:command]; // Re-open the sign-in screen. If it wasn't correctly dismissed previously, // this will fail.
diff --git a/ios/chrome/browser/ui/tab_grid/tab_grid_mediator_unittest.mm b/ios/chrome/browser/ui/tab_grid/tab_grid_mediator_unittest.mm index 533fc18..522821e 100644 --- a/ios/chrome/browser/ui/tab_grid/tab_grid_mediator_unittest.mm +++ b/ios/chrome/browser/ui/tab_grid/tab_grid_mediator_unittest.mm
@@ -272,7 +272,12 @@ // Tests that the |web_state_list_| is restored to 3 items when // |-undoCloseAllItems| is called. +// TODO(crbug.com/873632): This test is flaky on devices. +// TODO(crbug.com/873633): What introduced flakyness was cherry picked in M-69. TEST_F(TabGridMediatorTest, UndoCloseAllItemsCommand) { +#if !TARGET_IPHONE_SIMULATOR + return; +#endif // Previously there were 3 items. [mediator_ saveAndCloseAllItems]; [mediator_ undoCloseAllItems];
diff --git a/ios/chrome/browser/ui/tab_grid/tab_grid_page_control.mm b/ios/chrome/browser/ui/tab_grid/tab_grid_page_control.mm index 1b2df4c..ec308a16 100644 --- a/ios/chrome/browser/ui/tab_grid/tab_grid_page_control.mm +++ b/ios/chrome/browser/ui/tab_grid/tab_grid_page_control.mm
@@ -108,15 +108,6 @@ return CGPointMake(CGRectGetMidX(rect), CGRectGetMidY(rect)); } -// Returns the string to use for a numeric item count. -NSString* StringForItemCount(long count) { - if (count == 0) - return @""; - if (count > 99) - return @":-)"; - return [NSString stringWithFormat:@"%ld", count]; -} - // Convenience method that composes an asset name and returns the correct image // (in template rendering mode) based on the segment name (one of "regular", // "incognito, "remote") and whether the selected state image is needed or not. @@ -240,7 +231,7 @@ // visible when the slider is over a segment), and an ivar to store values that // are set before the labels are created. - (void)setRegularTabCount:(NSUInteger)regularTabCount { - NSString* regularText = StringForItemCount(regularTabCount); + NSString* regularText = TextForTabCount(regularTabCount); self.regularLabel.text = regularText; self.regularSelectedLabel.text = regularText; _regularTabCount = regularTabCount;
diff --git a/ios/chrome/browser/ui/tab_grid/tab_grid_url_loader.mm b/ios/chrome/browser/ui/tab_grid/tab_grid_url_loader.mm index 5564d0f..32dd7af 100644 --- a/ios/chrome/browser/ui/tab_grid/tab_grid_url_loader.mm +++ b/ios/chrome/browser/ui/tab_grid/tab_grid_url_loader.mm
@@ -11,6 +11,7 @@ #include "ios/chrome/browser/sessions/session_util.h" #include "ios/chrome/browser/sessions/tab_restore_service_delegate_impl_ios.h" #include "ios/chrome/browser/sessions/tab_restore_service_delegate_impl_ios_factory.h" +#include "ios/chrome/browser/ui/commands/open_new_tab_command.h" #import "ios/chrome/browser/web_state_list/web_state_list.h" #include "ios/chrome/browser/web_state_list/web_state_opener.h" #include "ios/web/public/web_state/web_state.h" @@ -69,33 +70,14 @@ AppendAndActivateWebState(self.regularWebStateList, std::move(webState)); } -// Opens |URL| in a new regular tab. -- (void)webPageOrderedOpen:(const GURL&)URL - referrer:(const web::Referrer&)referrer - inBackground:(BOOL)inBackground - originPoint:(CGPoint)originPoint - appendTo:(OpenPosition)appendTo { - [self webPageOrderedOpen:URL - referrer:referrer - inIncognito:NO - inBackground:inBackground - originPoint:originPoint - appendTo:appendTo]; -} - // In tab grid, |inBackground| is ignored, which means that the new WebState is // activated. |appendTo| is also ignored, so the new WebState is always appended // at the end of the list. The page transition type is explicit rather than // linked. -- (void)webPageOrderedOpen:(const GURL&)URL - referrer:(const web::Referrer&)referrer - inIncognito:(BOOL)inIncognito - inBackground:(BOOL)inBackground - originPoint:(CGPoint)originPoint - appendTo:(OpenPosition)appendTo { +- (void)webPageOrderedOpen:(OpenNewTabCommand*)command { WebStateList* webStateList; ios::ChromeBrowserState* browserState; - if (inIncognito) { + if (command.inIncognito) { webStateList = self.incognitoWebStateList; browserState = self.incognitoBrowserState; } else { @@ -106,8 +88,8 @@ DCHECK(browserState); web::WebState::CreateParams params(browserState); std::unique_ptr<web::WebState> webState = web::WebState::Create(params); - web::NavigationManager::WebLoadParams loadParams(URL); - loadParams.referrer = referrer; + web::NavigationManager::WebLoadParams loadParams(command.URL); + loadParams.referrer = command.referrer; loadParams.transition_type = ui::PAGE_TRANSITION_TYPED; webState->GetNavigationManager()->LoadURLWithParams(loadParams); AppendAndActivateWebState(webStateList, std::move(webState));
diff --git a/ios/chrome/browser/ui/table_view/cells/table_view_disclosure_header_footer_item.mm b/ios/chrome/browser/ui/table_view/cells/table_view_disclosure_header_footer_item.mm index 6c44017..3ef32da 100644 --- a/ios/chrome/browser/ui/table_view/cells/table_view_disclosure_header_footer_item.mm +++ b/ios/chrome/browser/ui/table_view/cells/table_view_disclosure_header_footer_item.mm
@@ -45,9 +45,6 @@ DisclosureDirection direction = self.collapsed ? DisclosureDirectionUp : DisclosureDirectionDown; [header setInitialDirection:direction]; - // Use colors from styler if available. - if (styler.tableViewBackgroundColor) - header.contentView.backgroundColor = styler.tableViewBackgroundColor; if (styler.headerFooterTitleColor) header.titleLabel.textColor = styler.headerFooterTitleColor; }
diff --git a/ios/chrome/browser/ui/table_view/cells/table_view_header_footer_item.mm b/ios/chrome/browser/ui/table_view/cells/table_view_header_footer_item.mm index 8b1a37cc..a3997e6 100644 --- a/ios/chrome/browser/ui/table_view/cells/table_view_header_footer_item.mm +++ b/ios/chrome/browser/ui/table_view/cells/table_view_header_footer_item.mm
@@ -25,9 +25,18 @@ DCHECK([headerFooter class] == self.cellClass); headerFooter.accessibilityTraits = self.accessibilityTraits; headerFooter.accessibilityIdentifier = self.accessibilityIdentifier; - UIVisualEffectView* visualEffect = [[UIVisualEffectView alloc] - initWithEffect:styler.tableViewSectionHeaderBlurEffect]; - headerFooter.backgroundView = visualEffect; + // Use the styler tableViewSectionHeaderBlurEffect if available, if not use + // the styler tableViewBackgroundColor (as a performance optimization) if + // available. + if (styler.tableViewSectionHeaderBlurEffect) { + UIVisualEffectView* visualEffect = [[UIVisualEffectView alloc] + initWithEffect:styler.tableViewSectionHeaderBlurEffect]; + headerFooter.backgroundView = visualEffect; + } else if (styler.tableViewBackgroundColor) { + UIView* backgroundView = [[UIView alloc] init]; + backgroundView.backgroundColor = styler.tableViewBackgroundColor; + headerFooter.backgroundView = backgroundView; + } } - (CGFloat)headerHeightForWidth:(CGFloat)width {
diff --git a/ios/chrome/browser/ui/tabs/tab_strip_controller.mm b/ios/chrome/browser/ui/tabs/tab_strip_controller.mm index e323749..d20676a 100644 --- a/ios/chrome/browser/ui/tabs/tab_strip_controller.mm +++ b/ios/chrome/browser/ui/tabs/tab_strip_controller.mm
@@ -127,15 +127,6 @@ return [UIColor colorWithRed:0.149 green:0.149 blue:0.164 alpha:1]; } -// Returns the string to use for a numeric item count. -NSString* StringForItemCount(long count) { - if (count == 0) - return @""; - if (count > 99) - return @":-)"; - return [NSString stringWithFormat:@"%ld", count]; -} - } // namespace // Helper class to display a UIButton with the image and text centered @@ -1103,7 +1094,7 @@ - (void)tabModelDidChangeTabCount:(TabModel*)model { if (IsUIRefreshPhase1Enabled()) { - [_tabSwitcherButton setTitle:StringForItemCount(model.count) + [_tabSwitcherButton setTitle:TextForTabCount(model.count) forState:UIControlStateNormal]; } } @@ -1703,7 +1694,7 @@ inIncognito:_isIncognito inBackground:NO appendTo:kLastTab]; - [self.dispatcher openURL:command]; + [self.dispatcher openURLInNewTab:command]; } #pragma mark - TabViewDelegate
diff --git a/ios/chrome/browser/ui/toolbar/buttons/toolbar_tab_grid_button.mm b/ios/chrome/browser/ui/toolbar/buttons/toolbar_tab_grid_button.mm index 6dc3a17..bc75a53 100644 --- a/ios/chrome/browser/ui/toolbar/buttons/toolbar_tab_grid_button.mm +++ b/ios/chrome/browser/ui/toolbar/buttons/toolbar_tab_grid_button.mm
@@ -8,6 +8,7 @@ #import "ios/chrome/browser/ui/toolbar/buttons/toolbar_constants.h" #import "ios/chrome/browser/ui/toolbar/public/features.h" #include "ios/chrome/browser/ui/ui_util.h" +#import "ios/chrome/browser/ui/uikit_ui_util.h" #import "ios/chrome/common/ui_util/constraints_ui_util.h" #if !defined(__has_feature) || !__has_feature(objc_arc) @@ -37,14 +38,7 @@ // the button's title may be empty or contain an easter egg, but the // accessibility value will always be equal to |tabCount|. NSString* tabStripButtonValue = [NSString stringWithFormat:@"%d", tabCount]; - NSString* tabStripButtonTitle = tabStripButtonValue; - if (tabCount <= 0) { - tabStripButtonTitle = @""; - } else if (tabCount > kShowTabStripButtonMaxTabCount) { - // As an easter egg, show a smiley face instead of the count if the user has - // more than 99 tabs open. - tabStripButtonTitle = @":)"; - } + NSString* tabStripButtonTitle = TextForTabCount(tabCount); // TODO(crbug.com/799601): Delete this once its not needed. if (base::FeatureList::IsEnabled(kMemexTabSwitcher)) {
diff --git a/ios/chrome/browser/ui/uikit_ui_util.h b/ios/chrome/browser/ui/uikit_ui_util.h index 26cde61f..480f4a33 100644 --- a/ios/chrome/browser/ui/uikit_ui_util.h +++ b/ios/chrome/browser/ui/uikit_ui_util.h
@@ -236,4 +236,9 @@ // Returns the safeAreaInsets for a given view. UIEdgeInsets SafeAreaInsetsForView(UIView* view); +// Returns the text for tabs count to be displayed in toolbar and tab_grid. +// As an easter egg, show a smiley face instead of the count if the user has +// more than 99 tabs open. +NSString* TextForTabCount(long count); + #endif // IOS_CHROME_BROWSER_UI_UIKIT_UI_UTIL_H_
diff --git a/ios/chrome/browser/ui/uikit_ui_util.mm b/ios/chrome/browser/ui/uikit_ui_util.mm index 6c2abbb3..e5a0e5b0 100644 --- a/ios/chrome/browser/ui/uikit_ui_util.mm +++ b/ios/chrome/browser/ui/uikit_ui_util.mm
@@ -661,3 +661,11 @@ return UIEdgeInsetsZero; } } + +NSString* TextForTabCount(long count) { + if (count <= 0) + return @""; + if (count > 99) + return @":)"; + return [NSString stringWithFormat:@"%ld", count]; +}
diff --git a/ios/chrome/browser/ui/url_loader.h b/ios/chrome/browser/ui/url_loader.h index 4ee69be..43c6507 100644 --- a/ios/chrome/browser/ui/url_loader.h +++ b/ios/chrome/browser/ui/url_loader.h
@@ -11,22 +11,12 @@ #include "components/sessions/core/session_id.h" #import "ios/web/public/navigation_manager.h" -class GURL; +@class OpenNewTabCommand; namespace sessions { struct SessionTab; } -namespace web { -struct Referrer; -} - -// Describes the intended position for a new tab. -enum OpenPosition { - kCurrentTab, // Relative to currently selected tab. - kLastTab // Always at end of tab model. -}; - @protocol UrlLoader<NSObject> // Load a new request. @@ -36,22 +26,7 @@ // placed in the model according to |appendTo|. |originPoint| is used when the // tab is opened in background as the origin point for the animation, it is not // used if the tab is opened in foreground. -- (void)webPageOrderedOpen:(const GURL&)url - referrer:(const web::Referrer&)referrer - inBackground:(BOOL)inBackground - originPoint:(CGPoint)originPoint - appendTo:(OpenPosition)appendTo; - -// Load a new URL on a new page/tab. The |referrer| is optional. The tab will be -// placed in the model according to |appendTo|. |originPoint| is used when the -// tab is opened in background as the origin point for the animation, it is not -// used if the tab is opened in foreground. -- (void)webPageOrderedOpen:(const GURL&)url - referrer:(const web::Referrer&)referrer - inIncognito:(BOOL)inIncognito - inBackground:(BOOL)inBackground - originPoint:(CGPoint)originPoint - appendTo:(OpenPosition)appendTo; +- (void)webPageOrderedOpen:(OpenNewTabCommand*)command; // Load a tab with the given session. - (void)loadSessionTab:(const sessions::SessionTab*)sessionTab;
diff --git a/ios/chrome/browser/upgrade/upgrade_center.mm b/ios/chrome/browser/upgrade/upgrade_center.mm index 04ca9795..90b0096 100644 --- a/ios/chrome/browser/upgrade/upgrade_center.mm +++ b/ios/chrome/browser/upgrade/upgrade_center.mm
@@ -358,7 +358,7 @@ // This URL can be opened in the application, just open in a new tab. OpenNewTabCommand* command = [OpenNewTabCommand commandWithURLFromChrome:URL]; - [self.dispatcher openURL:command]; + [self.dispatcher openURLInNewTab:command]; } else { // This URL scheme is not understood, ask the system to open it. NSURL* launchURL = [NSURL URLWithString:urlString];
diff --git a/ios/chrome/test/OWNERS b/ios/chrome/test/OWNERS index a659271..bd6fe7d6 100644 --- a/ios/chrome/test/OWNERS +++ b/ios/chrome/test/OWNERS
@@ -1,4 +1,3 @@ -shenghuazhang@chromium.org eugenebut@chromium.org # TEAM: ios-directory-owners@chromium.org
diff --git a/ios/chrome/test/earl_grey/BUILD.gn b/ios/chrome/test/earl_grey/BUILD.gn index 5264e0ef..3b2bbc6 100644 --- a/ios/chrome/test/earl_grey/BUILD.gn +++ b/ios/chrome/test/earl_grey/BUILD.gn
@@ -243,6 +243,7 @@ "//ios/chrome/browser/ui/collection_view/cells", "//ios/chrome/browser/ui/commands:commands", "//ios/chrome/browser/ui/content_suggestions:content_suggestions_ui", + "//ios/chrome/browser/ui/history:history_ui", "//ios/chrome/browser/ui/location_bar:location_bar", "//ios/chrome/browser/ui/omnibox:omnibox_internal", "//ios/chrome/browser/ui/payments:payments_ui", @@ -250,6 +251,7 @@ "//ios/chrome/browser/ui/settings:settings", "//ios/chrome/browser/ui/settings/cells", "//ios/chrome/browser/ui/static_content", + "//ios/chrome/browser/ui/table_view/cells", "//ios/chrome/browser/ui/toolbar/buttons", "//ios/chrome/browser/ui/toolbar/legacy", "//ios/chrome/browser/ui/toolbar/public",
diff --git a/ios/chrome/test/earl_grey/OWNERS b/ios/chrome/test/earl_grey/OWNERS index a659271..bd6fe7d6 100644 --- a/ios/chrome/test/earl_grey/OWNERS +++ b/ios/chrome/test/earl_grey/OWNERS
@@ -1,4 +1,3 @@ -shenghuazhang@chromium.org eugenebut@chromium.org # TEAM: ios-directory-owners@chromium.org
diff --git a/ios/chrome/test/earl_grey/chrome_earl_grey_ui.h b/ios/chrome/test/earl_grey/chrome_earl_grey_ui.h index 584b72f..99bfaaa 100644 --- a/ios/chrome/test/earl_grey/chrome_earl_grey_ui.h +++ b/ios/chrome/test/earl_grey/chrome_earl_grey_ui.h
@@ -58,6 +58,12 @@ // Open a new incognito tab via the tools menu. + (void)openNewIncognitoTab; +// Open and clear browsing data from history. ++ (void)openAndClearBrowsingDataFromHistory; + +// Assert that history is empty. ++ (void)assertHistoryHasNoEntries; + // Reloads the page via the reload button, and does not wait for the page to // finish loading. + (void)reload;
diff --git a/ios/chrome/test/earl_grey/chrome_earl_grey_ui.mm b/ios/chrome/test/earl_grey/chrome_earl_grey_ui.mm index 6d80ee7..6ef1a93 100644 --- a/ios/chrome/test/earl_grey/chrome_earl_grey_ui.mm +++ b/ios/chrome/test/earl_grey/chrome_earl_grey_ui.mm
@@ -6,9 +6,12 @@ #import "base/test/ios/wait_util.h" #include "components/strings/grit/components_strings.h" +#import "ios/chrome/browser/ui/history/history_ui_constants.h" #import "ios/chrome/browser/ui/settings/accounts_collection_view_controller.h" +#import "ios/chrome/browser/ui/settings/clear_browsing_data_ui_constants.h" #import "ios/chrome/browser/ui/settings/privacy_collection_view_controller.h" #import "ios/chrome/browser/ui/settings/settings_collection_view_controller.h" +#import "ios/chrome/browser/ui/table_view/cells/table_view_url_item.h" #import "ios/chrome/browser/ui/tools_menu/public/tools_menu_constants.h" #import "ios/chrome/browser/ui/tools_menu/tools_popup_controller.h" #import "ios/chrome/browser/ui/uikit_ui_util.h" @@ -18,6 +21,7 @@ #import "ios/chrome/test/earl_grey/chrome_matchers.h" #import "ios/web/public/test/earl_grey/js_test_util.h" #import "ios/web/public/test/earl_grey/web_view_matchers.h" +#include "ui/base/l10n/l10n_util.h" #if !defined(__has_feature) || !__has_feature(objc_arc) #error "This file requires ARC support." @@ -88,6 +92,49 @@ performAction:grey_tap()]; } ++ (void)openAndClearBrowsingDataFromHistory { + // Open Clear Browsing Data Button + [[EarlGrey + selectElementWithMatcher: + grey_accessibilityID(kHistoryToolbarClearBrowsingButtonIdentifier)] + performAction:grey_tap()]; + + // Uncheck "Cookies, Site Data" and "Cached Images and Files," which are + // checked by default, and press "Clear Browsing Data" + [[EarlGrey selectElementWithMatcher:chrome_test_util::ClearCookiesButton()] + performAction:grey_tap()]; + [[EarlGrey selectElementWithMatcher:chrome_test_util::ClearCacheButton()] + performAction:grey_tap()]; + [[EarlGrey selectElementWithMatcher:grey_accessibilityID( + kClearBrowsingDataButtonIdentifier)] + performAction:grey_tap()]; + [[EarlGrey selectElementWithMatcher:chrome_test_util:: + ConfirmClearBrowsingDataButton()] + performAction:grey_tap()]; + + // Include sufficientlyVisible condition for the case of the clear browsing + // dialog, which also has a "Done" button and is displayed over the history + // panel. + id<GREYMatcher> visibleDoneButton = grey_allOf( + chrome_test_util::SettingsDoneButton(), grey_sufficientlyVisible(), nil); + [[EarlGrey selectElementWithMatcher:visibleDoneButton] + performAction:grey_tap()]; +} + ++ (void)assertHistoryHasNoEntries { + id<GREYMatcher> noHistoryMessageMatcher = + grey_allOf(grey_text(l10n_util::GetNSString(IDS_HISTORY_NO_RESULTS)), + grey_sufficientlyVisible(), nil); + [[EarlGrey selectElementWithMatcher:noHistoryMessageMatcher] + assertWithMatcher:grey_notNil()]; + + id<GREYMatcher> historyEntryMatcher = + grey_allOf(grey_kindOfClass([TableViewURLCell class]), + grey_sufficientlyVisible(), nil); + [[EarlGrey selectElementWithMatcher:historyEntryMatcher] + assertWithMatcher:grey_nil()]; +} + + (void)tapPrivacyMenuButton:(id<GREYMatcher>)buttonMatcher { id<GREYMatcher> interactableButtonMatcher = grey_allOf(buttonMatcher, grey_interactable(), nil);
diff --git a/ios/chrome/test/fakes/BUILD.gn b/ios/chrome/test/fakes/BUILD.gn index 61a7571..6c92812f 100644 --- a/ios/chrome/test/fakes/BUILD.gn +++ b/ios/chrome/test/fakes/BUILD.gn
@@ -30,6 +30,7 @@ "//ios/chrome/browser/download", "//ios/chrome/browser/store_kit", "//ios/chrome/browser/ui", + "//ios/chrome/browser/ui/commands", "//ios/chrome/browser/ui/download", "//ios/chrome/browser/ui/presenters", "//ios/web/public",
diff --git a/ios/chrome/test/fakes/fake_url_loader.mm b/ios/chrome/test/fakes/fake_url_loader.mm index 98757c3..f47749c7 100644 --- a/ios/chrome/test/fakes/fake_url_loader.mm +++ b/ios/chrome/test/fakes/fake_url_loader.mm
@@ -4,6 +4,8 @@ #import "ios/chrome/test/fakes/fake_url_loader.h" +#import "ios/chrome/browser/ui/commands/open_new_tab_command.h" + #if !defined(__has_feature) || !__has_feature(objc_arc) #error "This file requires ARC support." #endif @@ -34,22 +36,10 @@ self.extraHeaders = params.extra_headers; } -- (void)webPageOrderedOpen:(const GURL&)url - referrer:(const web::Referrer&)referrer - inBackground:(BOOL)inBackground - originPoint:(CGPoint)originPoint - appendTo:(OpenPosition)appendTo { -} - -- (void)webPageOrderedOpen:(const GURL&)url - referrer:(const web::Referrer&)referrer - inIncognito:(BOOL)inIncognito - inBackground:(BOOL)inBackground - originPoint:(CGPoint)originPoint - appendTo:(OpenPosition)appendTo { - _url = url; - _referrer = referrer; - self.inIncognito = inIncognito; +- (void)webPageOrderedOpen:(OpenNewTabCommand*)command { + _url = command.URL; + _referrer = command.referrer; + self.inIncognito = command.inIncognito; } - (void)loadSessionTab:(const sessions::SessionTab*)sessionTab {
diff --git a/ios/testing/earl_grey/OWNERS b/ios/testing/earl_grey/OWNERS index a659271..bd6fe7d6 100644 --- a/ios/testing/earl_grey/OWNERS +++ b/ios/testing/earl_grey/OWNERS
@@ -1,4 +1,3 @@ -shenghuazhang@chromium.org eugenebut@chromium.org # TEAM: ios-directory-owners@chromium.org
diff --git a/ios/web/navigation/wk_navigation_util_unittest.mm b/ios/web/navigation/wk_navigation_util_unittest.mm index 93d7eaba..7671fda6 100644 --- a/ios/web/navigation/wk_navigation_util_unittest.mm +++ b/ios/web/navigation/wk_navigation_util_unittest.mm
@@ -7,10 +7,15 @@ #include <memory> #include <vector> +#include "base/json/json_reader.h" +#include "base/strings/stringprintf.h" +#include "base/strings/sys_string_conversions.h" #include "base/strings/utf_string_conversions.h" +#include "base/values.h" #import "ios/web/navigation/navigation_item_impl.h" #include "ios/web/test/test_url_constants.h" #include "net/base/escape.h" +#import "net/base/mac/url_conversions.h" #include "testing/gtest/include/gtest/gtest.h" #include "testing/platform_test.h" @@ -57,6 +62,49 @@ session_json); } +// Verifies that large session can be stored in NSURL. GURL is converted to +// NSURL, because NSURL is passed to WKWebView during the session restoration. +TEST_F(WKNavigationUtilTest, CreateRestoreSessionUrlForLargeSession) { + // Create restore session URL with large number of items. + const size_t kItemCount = 5000; + std::vector<std::unique_ptr<NavigationItem>> items; + for (size_t i = 0; i < kItemCount; i++) { + auto item = std::make_unique<NavigationItemImpl>(); + item->SetURL(GURL(base::StringPrintf("http://www.%zu.com", i))); + item->SetTitle(base::ASCIIToUTF16(base::StringPrintf("Test%zu", i))); + items.push_back(std::move(item)); + } + GURL restore_session_url = + CreateRestoreSessionUrl(/*last_committed_item_index=*/0, items); + ASSERT_TRUE(IsRestoreSessionUrl(restore_session_url)); + + // Extract session JSON from restoration URL. + NSString* fragment = net::NSURLWithGURL(restore_session_url).fragment; + NSString* encoded_session = [fragment substringFromIndex:strlen("session=")]; + std::string session_json = net::UnescapeURLComponent( + base::SysNSStringToUTF8(encoded_session), + net::UnescapeRule::URL_SPECIAL_CHARS_EXCEPT_PATH_SEPARATORS); + + // Parse JSON to get the session dictionary. + int error_code = 0; + std::unique_ptr<base::Value> session_value( + base::JSONReader::ReadAndReturnError(session_json, base::JSON_PARSE_RFC, + &error_code, nullptr)); + ASSERT_EQ(0, error_code); + ASSERT_TRUE(session_value.get()); + + // Verify that all titles and URLs are present. + base::Value* titles_value = session_value->FindKey("titles"); + ASSERT_TRUE(titles_value); + ASSERT_TRUE(titles_value->is_list()); + ASSERT_EQ(kItemCount, titles_value->GetList().size()); + + base::Value* urls_value = session_value->FindKey("urls"); + ASSERT_TRUE(urls_value); + ASSERT_TRUE(urls_value->is_list()); + ASSERT_EQ(kItemCount, urls_value->GetList().size()); +} + TEST_F(WKNavigationUtilTest, IsNotRestoreSessionUrl) { EXPECT_FALSE(IsRestoreSessionUrl(GURL())); EXPECT_FALSE(IsRestoreSessionUrl(GURL("file://somefile")));
diff --git a/ios/web/web_state/js/context_menu_js_unittest.mm b/ios/web/web_state/js/context_menu_js_unittest.mm index 070498d..581adb8 100644 --- a/ios/web/web_state/js/context_menu_js_unittest.mm +++ b/ios/web/web_state/js/context_menu_js_unittest.mm
@@ -135,7 +135,13 @@ } // Tests that __gCrWeb.getElementFromPoint function returns correct title. -TEST_F(ContextMenuJsTest, GetImageTitleAtPoint) { +// TODO(crbug.com/796418): This test is flaky on devices. +#if TARGET_IPHONE_SIMULATOR +#define MAYBE_GetImageTitleAtPoint GetImageTitleAtPoint +#else +#define MAYBE_GetImageTitleAtPoint FLAKY_GetImageTitleAtPoint +#endif +TEST_F(ContextMenuJsTest, MAYBE_GetImageTitleAtPoint) { NSString* html = @"<img id='foo' title='Hello world!'" "style='width:200;height:200;' src='file:///bogus'/>"; @@ -370,7 +376,13 @@ // Tests that no callout information about a link is displayed when // -webkit-touch-callout property is set to none. Please see: // https://developer.mozilla.org/en-US/docs/Web/CSS/-webkit-touch-callout -TEST_F(ContextMenuJsTest, LinkOfTextWithCalloutNone) { +// TODO(crbug.com/873662): This test is flaky on iOS 11 device. +#if TARGET_IPHONE_SIMULATOR +#define MAYBE_LinkOfTextWithCalloutNone LinkOfTextWithCalloutNone +#else +#define MAYBE_LinkOfTextWithCalloutNone FLAKY_LinkOfTextWithCalloutNone +#endif +TEST_F(ContextMenuJsTest, MAYBE_LinkOfTextWithCalloutNone) { const char kLinkHtml[] = "<a href='%s' style='-webkit-touch-callout:none;'>link</a>"; @@ -400,7 +412,13 @@ // Tests that setting -webkit-touch-callout property can override the value // inherited from ancester. Please see: // https://developer.mozilla.org/en-US/docs/Web/CSS/-webkit-touch-callout -TEST_F(ContextMenuJsTest, LinkOfTextWithCalloutOverride) { +// TODO(crbug.com/873660): This test is flaky on iOS 11 device. +#if TARGET_IPHONE_SIMULATOR +#define MAYBE_LinkOfTextWithCalloutOverride LinkOfTextWithCalloutOverride +#else +#define MAYBE_LinkOfTextWithCalloutOverride FLAKY_LinkOfTextWithCalloutOverride +#endif +TEST_F(ContextMenuJsTest, MAYBE_LinkOfTextWithCalloutOverride) { const char kLinkHtml[] = "<body style='-webkit-touch-callout: none'>" " <a href='%s' style='-webkit-touch-callout: default'>link</a>" @@ -532,8 +550,17 @@ } // Tests that image details are not reutrned for a point outside of the element. +// TODO(crbug.com/796418): This test is flaky on devices. +#if TARGET_IPHONE_SIMULATOR +#define MAYBE_FindImageElementAtPointOutsideElement \ + FindImageElementAtPointOutsideElement +#else +#define MAYBE_FindImageElementAtPointOutsideElement \ + FLAKY_FindImageElementAtPointOutsideElement +#endif + TEST_F(ContextMenuJsFindElementAtPointTest, - FindImageElementAtPointOutsideElement) { + MAYBE_FindImageElementAtPointOutsideElement) { NSString* image = @"<img id='foo' style='width:200;height:200;' src='file:///bogus'/>"; @@ -599,8 +626,16 @@ // Tests that an image link does not return image and link details for a point // outside the element. +// TODO(crbug.com/796418): This test is flaky on devices. +#if TARGET_IPHONE_SIMULATOR +#define MAYBE_FindLinkImageAtPointOutsideElement \ + FindLinkImageAtPointOutsideElement +#else +#define MAYBE_FindLinkImageAtPointOutsideElement \ + FLAKY_FindLinkImageAtPointOutsideElement +#endif TEST_F(ContextMenuJsFindElementAtPointTest, - FindLinkImageAtPointOutsideElement) { + MAYBE_FindLinkImageAtPointOutsideElement) { NSString* link_image = @"<a href='file:///linky'>" "<img id='foo' style='width:200;height:200;' src='file:///bogus'/>" @@ -828,7 +863,15 @@ // Tests that a callout information about a link is displayed when // -webkit-touch-callout property is not specified. Please see: // https://developer.mozilla.org/en-US/docs/Web/CSS/-webkit-touch-callout -TEST_F(ContextMenuJsFindElementAtPointTest, LinkOfTextWithoutCalloutProperty) { +// TODO(crbug.com/796418): This test is flaky on devices. +#if TARGET_IPHONE_SIMULATOR +#define MAYBE_LinkOfTextWithoutCalloutProperty LinkOfTextWithoutCalloutProperty +#else +#define MAYBE_LinkOfTextWithoutCalloutProperty \ + FLAKY_LinkOfTextWithoutCalloutProperty +#endif +TEST_F(ContextMenuJsFindElementAtPointTest, + MAYBE_LinkOfTextWithoutCalloutProperty) { NSString* kLinkDest = @"http://destination/"; NSString* kLinkHtml = @"<a href='%@'>link</a>";
diff --git a/ios/web/web_state/js/resources/frame_messaging.js b/ios/web/web_state/js/resources/frame_messaging.js index 36a9969b..150fa52f 100644 --- a/ios/web/web_state/js/resources/frame_messaging.js +++ b/ios/web/web_state/js/resources/frame_messaging.js
@@ -24,28 +24,125 @@ (function() { /** -* Unique identifier for this frame. -* @type {string} -* @private -*/ -var frameId_ = ""; + * Unique identifier for this frame. + * @type {?string} + * @private + */ +var frameId_ = null; + +/** + * The encryption key to decrypt messages received from native code. + * @type {?webCrypto.CryptoKey} + * @private + */ +var frameSymmetricKey_ = null; /** * Returns the frameId associated with this frame. A new value will be created - * the first time this function is called for this frame. + * for this frame the first time it is called. The frameId will persist as long + * as this JavaScript context lives. For example, the frameId will be the same + * when navigating 'back' to this frame. * @return {string} A string representing a unique identifier for this frame. */ __gCrWeb.frameMessaging['getFrameId'] = function() { - if (frameId_ === "") { + if (!frameId_) { // Generate 128 bit unique identifier. var components = new Uint32Array(4); window.crypto.getRandomValues(components); + frameId_ = ''; for (var i = 0; i < components.length; i++) { // Convert value to base16 string and append to the |frameId_|. frameId_ += components[i].toString(16); } } - return frameId_; + return /** @type {string} */ (frameId_); +}; + +/** + * Exports |frameSymmetricKey_| as a base64 string. Key will be created if it + * does not already exist. + * @param {function(string)} callback A callback to be run with the exported + * base64 key. + */ +var exportKey_ = function(callback) { + // Early return with an empty key string if encryption is not supported in + // this frame. + // - Insecure contexts do not support the crypto.subtle API. + // - Even though iOS 10 supports window.crypto.webkitSubtle instead of + // window.crypto.subtle, the AES-GCM cipher suite is not supported, so + // support will only be used from the official WebCrypto API. + // TODO(crbug.com/872818): Remove comment once only iOS 11+ is supported. + if (!window.isSecureContext || !window.crypto.subtle) { + callback(""); + return; + } + getFrameSymmetricKey_(function(key) { + window.crypto.subtle.exportKey('raw', key) + .then(function(/** @type {ArrayBuffer} */ k) { + var keyBytes = new Uint8Array(k); + var key64 = btoa(String.fromCharCode.apply(null, keyBytes)); + callback(key64); + }); + }); +}; + +/** + * Runs |callback| with the key associated with this frame. The key will be + * created if necessary. The key will persist as long as this JavaScript context + * lives. For example, the key will be the same when navigating 'back' to this + * frame. + * @param {function(!webCrypto.CryptoKey)} callback A callback to be run with + * the key. + */ +var getFrameSymmetricKey_ = function(callback) { + if (frameSymmetricKey_) { + callback(frameSymmetricKey_); + return; + } + window.crypto.subtle.generateKey( + {'name': 'AES-GCM', 'length': 256}, + true, + ['decrypt', 'encrypt'] + ).then(function(/** @type {!webCrypto.CryptoKey} */ key) { + frameSymmetricKey_ = key; + callback(frameSymmetricKey_); + }); +}; + +/** + * Creates (or gets the existing) encryption key and sends it to the native + * application. + */ +__gCrWeb.frameMessaging['registerFrame'] = function() { + exportKey_(function(frameKey) { + __gCrWeb.common.sendWebKitMessage('FrameBecameAvailable', { + 'crwFrameId': __gCrWeb.frameMessaging['getFrameId'](), + 'crwFrameKey': frameKey + }); + }); +}; + +/** + * Registers this frame with the native code and forwards the message to any + * child frames. + * This needs to be called by the native application on each navigation + * because no JavaScript events are fired reliably when a page is displayed and + * hidden. This is especially important when a page remains alive and is re-used + * from the WebKit page cache. + * TODO(crbug.com/872134): In iOS 12, the JavaScript pageshow and pagehide + * events seem reliable, so replace this exposed + * function with a pageshow event listener. + */ +__gCrWeb.frameMessaging['getExistingFrames'] = function() { + __gCrWeb.frameMessaging['registerFrame'](); + + var framecount = window['frames']['length']; + for (var i = 0; i < framecount; i++) { + window.frames[i].postMessage( + {type: 'org.chromium.registerForFrameMessaging',}, + '*' + ); + } }; }()); // End of anonymous object
diff --git a/ios/web/web_state/js/resources/setup_frame.js b/ios/web/web_state/js/resources/setup_frame.js index 2a32015..d98c354 100644 --- a/ios/web/web_state/js/resources/setup_frame.js +++ b/ios/web/web_state/js/resources/setup_frame.js
@@ -23,8 +23,22 @@ __gCrWeb.frameMessaging.getFrameId()); }); -__gCrWeb.common.sendWebKitMessage('FrameBecameAvailable', { - 'crwFrameId': __gCrWeb.frameMessaging.getFrameId() +/** + * Listens for messages received by the parent frame to initialize messaging + * state. + */ +window.addEventListener('message', function(message) { + var payload = message.data; + if (payload.hasOwnProperty('type') && + payload.type == 'org.chromium.registerForFrameMessaging') { + __gCrWeb.frameMessaging['getExistingFrames'](); + } }); +// Frame registration must be delayed until Document End script injection time. +// (This file is injected at that time, but the frameMessaging API is defined at +// Document Start time.) +// TODO(crbug.com/873730): Stop exposing registerFrame API. +__gCrWeb.frameMessaging['registerFrame'](); + }()); // End of anonymous object
diff --git a/ios/web/web_state/ui/crw_web_controller.mm b/ios/web/web_state/ui/crw_web_controller.mm index 1ca827e..bd9ccceb 100644 --- a/ios/web/web_state/ui/crw_web_controller.mm +++ b/ios/web/web_state/ui/crw_web_controller.mm
@@ -14,6 +14,7 @@ #include <utility> #include <vector> +#include "base/base64.h" #include "base/bind.h" #include "base/callback.h" #include "base/containers/mru_cache.h" @@ -35,6 +36,7 @@ #include "base/strings/utf_string_conversions.h" #include "base/time/time.h" #include "base/values.h" +#include "crypto/symmetric_key.h" #import "ios/net/http_response_headers_util.h" #include "ios/web/history_state_util.h" #import "ios/web/interstitials/web_interstitial_impl.h" @@ -2437,9 +2439,14 @@ } - (void)frameBecameAvailableWithMessage:(WKScriptMessage*)message { + // Validate all expected message components because any frame could falsify + // this message. if (_isBeingDestroyed || ![message.body isKindOfClass:[NSDictionary class]] || - ![message.body[@"crwFrameId"] isKindOfClass:[NSString class]]) { - // WebController is being destroyed or message is invalid. + ![message.body[@"crwFrameId"] isKindOfClass:[NSString class]] || + ![message.body[@"crwFrameKey"] isKindOfClass:[NSString class]] || + [message.body[@"crwFrameKey"] length] == 0) { + // WebController is being destroyed, message is invalid, or frame does not + // have a key. return; } @@ -2447,13 +2454,23 @@ web::WebFramesManagerImpl::FromWebState([self webState]); std::string frameID = base::SysNSStringToUTF8(message.body[@"crwFrameId"]); + std::string encodedFrameKeyString = + base::SysNSStringToUTF8(message.body[@"crwFrameKey"]); if (!framesManager->GetFrameWithId(frameID)) { GURL messageFrameOrigin = web::GURLOriginWithWKSecurityOrigin(message.frameInfo.securityOrigin); - auto newFrame = std::make_unique<web::WebFrameImpl>( - frameID, message.frameInfo.mainFrame, messageFrameOrigin, - self.webState); - framesManager->AddFrame(std::move(newFrame)); + + std::string decodedFrameKeyString; + base::Base64Decode(encodedFrameKeyString, &decodedFrameKeyString); + std::unique_ptr<crypto::SymmetricKey> frameKey = + crypto::SymmetricKey::Import(crypto::SymmetricKey::Algorithm::AES, + decodedFrameKeyString); + if (frameKey) { + auto newFrame = std::make_unique<web::WebFrameImpl>( + frameID, std::move(frameKey), message.frameInfo.mainFrame, + messageFrameOrigin, self.webState); + framesManager->AddFrame(std::move(newFrame)); + } } } @@ -4678,6 +4695,8 @@ // notify web view delegate about received response, so web controller does // not get a chance to properly update MIME type. [_windowIDJSManager inject]; + web::WebFramesManagerImpl::FromWebState(self.webState) + ->RegisterExistingFrames(); } if (committedNavigation) {
diff --git a/ios/web/web_state/web_frame_impl.h b/ios/web/web_state/web_frame_impl.h index 77ee82c..ac13c82d 100644 --- a/ios/web/web_state/web_frame_impl.h +++ b/ios/web/web_state/web_frame_impl.h
@@ -10,6 +10,7 @@ #include <string> #include "base/macros.h" +#include "crypto/symmetric_key.h" #include "url/gurl.h" namespace web { @@ -19,6 +20,7 @@ class WebFrameImpl : public WebFrame { public: WebFrameImpl(const std::string& frame_id, + std::unique_ptr<crypto::SymmetricKey> frame_key, bool is_main_frame, GURL security_origin, web::WebState* web_state); @@ -36,6 +38,9 @@ // The frame identifier which uniquely identifies this frame across the // application's lifetime. std::string frame_id_; + // The symmetric encryption key used to encrypt messages addressed to the + // frame. Stored in a base64 encoded string. + std::unique_ptr<crypto::SymmetricKey> frame_key_; // Whether or not the receiver represents the main frame. bool is_main_frame_ = false; // The security origin associated with this frame.
diff --git a/ios/web/web_state/web_frame_impl.mm b/ios/web/web_state/web_frame_impl.mm index 62b221f..271fbf6 100644 --- a/ios/web/web_state/web_frame_impl.mm +++ b/ios/web/web_state/web_frame_impl.mm
@@ -13,13 +13,17 @@ namespace web { WebFrameImpl::WebFrameImpl(const std::string& frame_id, + std::unique_ptr<crypto::SymmetricKey> frame_key, bool is_main_frame, GURL security_origin, web::WebState* web_state) : frame_id_(frame_id), + frame_key_(std::move(frame_key)), is_main_frame_(is_main_frame), security_origin_(security_origin), - web_state_(web_state) {} + web_state_(web_state) { + DCHECK(frame_key_); +} WebFrameImpl::~WebFrameImpl() = default;
diff --git a/ios/web/web_state/web_frame_impl_unittest.mm b/ios/web/web_state/web_frame_impl_unittest.mm index 33e4f724..6088edf6 100644 --- a/ios/web/web_state/web_frame_impl_unittest.mm +++ b/ios/web/web_state/web_frame_impl_unittest.mm
@@ -4,6 +4,7 @@ #include "ios/web/web_state/web_frame_impl.h" +#import "base/base64.h" #import "ios/web/public/test/fakes/test_web_state.h" #include "testing/gtest/include/gtest/gtest.h" #include "testing/platform_test.h" @@ -12,8 +13,23 @@ #error "This file requires ARC support." #endif +using crypto::SymmetricKey; + namespace { -const char kFrameId[] = "frameId"; + +const char kFrameId[] = "12345678910ABCDEF12345678910ABCDEF"; + +// A base64 encoded sample key. +const char kFrameKey[] = "d1uJzdvOFIUT5kEpK4o+x5JCaSlYT/a45ISU7S9EzTo="; + +// Returns a key which can be used to create a WebFrame. +std::unique_ptr<SymmetricKey> CreateKey() { + std::string decoded_frame_key_string; + base::Base64Decode(kFrameKey, &decoded_frame_key_string); + return crypto::SymmetricKey::Import(crypto::SymmetricKey::Algorithm::AES, + decoded_frame_key_string); +} + } // namespace namespace web { @@ -24,8 +40,8 @@ TEST_F(WebFrameImplTest, CreateWebFrameForMainFrame) { TestWebState test_web_state; GURL security_origin; - WebFrameImpl web_frame(kFrameId, /*is_main_frame=*/true, security_origin, - &test_web_state); + WebFrameImpl web_frame(kFrameId, CreateKey(), /*is_main_frame=*/true, + security_origin, &test_web_state); EXPECT_EQ(&test_web_state, web_frame.GetWebState()); EXPECT_TRUE(web_frame.IsMainFrame()); @@ -37,8 +53,8 @@ TEST_F(WebFrameImplTest, CreateWebFrameForIFrame) { TestWebState test_web_state; GURL security_origin; - WebFrameImpl web_frame(kFrameId, /*is_main_frame=*/false, security_origin, - &test_web_state); + WebFrameImpl web_frame(kFrameId, CreateKey(), /*is_main_frame=*/false, + security_origin, &test_web_state); EXPECT_EQ(&test_web_state, web_frame.GetWebState()); EXPECT_FALSE(web_frame.IsMainFrame());
diff --git a/ios/web/web_state/web_frames_manager_impl.h b/ios/web/web_state/web_frames_manager_impl.h index 5e866d9..bef7fe3 100644 --- a/ios/web/web_state/web_frames_manager_impl.h +++ b/ios/web/web_state/web_frames_manager_impl.h
@@ -26,6 +26,9 @@ void RemoveFrameWithId(const std::string& frame_id); // Removes all web frames from the list of associated web frames. void RemoveAllWebFrames(); + // Broadcasts a (not encrypted) JavaScript message to get the identifiers + // and keys of existing frames. + void RegisterExistingFrames(); // Returns the web frame with |frame_id|, if one exisits, from the list of // associated web frames. @@ -45,6 +48,7 @@ // Reference to the current main web frame. WebFrame* main_web_frame_ = nullptr; + WebState* web_state_ = nullptr; }; } // namespace web
diff --git a/ios/web/web_state/web_frames_manager_impl.mm b/ios/web/web_state/web_frames_manager_impl.mm index 8bad16a..0d83ba1 100644 --- a/ios/web/web_state/web_frames_manager_impl.mm +++ b/ios/web/web_state/web_frames_manager_impl.mm
@@ -4,7 +4,9 @@ #include "ios/web/web_state/web_frames_manager_impl.h" +#include "base/strings/utf_string_conversions.h" #include "ios/web/public/web_state/web_frame.h" +#include "ios/web/public/web_state/web_state.h" #if !defined(__has_feature) || !__has_feature(objc_arc) #error "This file requires ARC support." @@ -33,7 +35,8 @@ WebFramesManagerImpl::~WebFramesManagerImpl() = default; -WebFramesManagerImpl::WebFramesManagerImpl(web::WebState* web_state) {} +WebFramesManagerImpl::WebFramesManagerImpl(web::WebState* web_state) + : web_state_(web_state) {} void WebFramesManagerImpl::AddFrame(std::unique_ptr<WebFrame> frame) { if (frame->IsMainFrame()) { @@ -78,4 +81,9 @@ return main_web_frame_; } +void WebFramesManagerImpl::RegisterExistingFrames() { + web_state_->ExecuteJavaScript( + base::UTF8ToUTF16("__gCrWeb.frameMessaging.getExistingFrames();")); +} + } // namespace
diff --git a/ios/web/web_state/web_frames_manager_impl_unittest.mm b/ios/web/web_state/web_frames_manager_impl_unittest.mm index 665d781..6baf7af 100644 --- a/ios/web/web_state/web_frames_manager_impl_unittest.mm +++ b/ios/web/web_state/web_frames_manager_impl_unittest.mm
@@ -4,6 +4,7 @@ #include "ios/web/web_state/web_frames_manager_impl.h" +#include "base/base64.h" #import "ios/web/public/test/fakes/test_web_state.h" #include "ios/web/web_state/web_frame_impl.h" #include "testing/gtest/include/gtest/gtest.h" @@ -13,14 +14,27 @@ #error "This file requires ARC support." #endif +using crypto::SymmetricKey; + namespace { +// A base64 encoded sample key. +const char kFrameKey[] = "d1uJzdvOFIUT5kEpK4o+x5JCaSlYT/a45ISU7S9EzTo="; + // Returns true if |web_frame| is contained in |frames|. bool ContainsWebFrame(std::vector<web::WebFrame*> frames, web::WebFrame* web_frame) { return frames.end() != std::find(frames.begin(), frames.end(), web_frame); } +// Returns a key which can be used to create a WebFrame. +std::unique_ptr<SymmetricKey> CreateKey() { + std::string decoded_frame_key_string; + base::Base64Decode(kFrameKey, &decoded_frame_key_string); + return crypto::SymmetricKey::Import(crypto::SymmetricKey::Algorithm::AES, + decoded_frame_key_string); +} + } // namespace namespace web { @@ -40,7 +54,8 @@ TEST_F(WebFramesManagerImplTest, GetMainWebFrame) { GURL security_origin; auto web_frame = std::make_unique<WebFrameImpl>( - "web_frame", /*is_main_frame=*/true, security_origin, &test_web_state_); + "web_frame", CreateKey(), /*is_main_frame=*/true, security_origin, + &test_web_state_); WebFrameImpl* web_frame_ptr = web_frame.get(); frames_manager_->AddFrame(std::move(web_frame)); @@ -57,9 +72,9 @@ GURL security_origin; const std::string web_frame_frame_id = "web_frame"; - auto web_frame = - std::make_unique<WebFrameImpl>(web_frame_frame_id, /*is_main_frame=*/true, - security_origin, &test_web_state_); + auto web_frame = std::make_unique<WebFrameImpl>( + web_frame_frame_id, CreateKey(), /*is_main_frame=*/true, security_origin, + &test_web_state_); frames_manager_->AddFrame(std::move(web_frame)); frames_manager_->RemoveFrameWithId(web_frame_frame_id); @@ -72,15 +87,15 @@ // objects. TEST_F(WebFramesManagerImplTest, AddFrames) { GURL security_origin; - auto main_web_frame = - std::make_unique<WebFrameImpl>("main_web_frame", /*is_main_frame=*/true, - security_origin, &test_web_state_); + auto main_web_frame = std::make_unique<WebFrameImpl>( + "main_web_frame", CreateKey(), /*is_main_frame=*/true, security_origin, + &test_web_state_); WebFrameImpl* main_web_frame_ptr = main_web_frame.get(); frames_manager_->AddFrame(std::move(main_web_frame)); - auto child_web_frame = - std::make_unique<WebFrameImpl>("child_web_frame", /*is_main_frame=*/false, - security_origin, &test_web_state_); + auto child_web_frame = std::make_unique<WebFrameImpl>( + "child_web_frame", CreateKey(), /*is_main_frame=*/false, security_origin, + &test_web_state_); WebFrameImpl* child_web_frame_ptr = child_web_frame.get(); frames_manager_->AddFrame(std::move(child_web_frame)); @@ -93,21 +108,21 @@ // Tests that the WebFramesManagerImpl correctly removes a WebFrame instance. TEST_F(WebFramesManagerImplTest, RemoveFrame) { GURL security_origin; - auto main_web_frame = - std::make_unique<WebFrameImpl>("main_web_frame", /*is_main_frame=*/true, - security_origin, &test_web_state_); + auto main_web_frame = std::make_unique<WebFrameImpl>( + "main_web_frame", CreateKey(), /*is_main_frame=*/true, security_origin, + &test_web_state_); WebFrameImpl* main_web_frame_ptr = main_web_frame.get(); frames_manager_->AddFrame(std::move(main_web_frame)); const std::string child_web_frame_1_frame_id = "child_web_frame_1_frame_id"; auto child_web_frame_1 = std::make_unique<WebFrameImpl>( - child_web_frame_1_frame_id, + child_web_frame_1_frame_id, CreateKey(), /*is_main_frame=*/false, security_origin, &test_web_state_); frames_manager_->AddFrame(std::move(child_web_frame_1)); auto child_web_frame_2 = std::make_unique<WebFrameImpl>( - "child_web_frame_2", /*is_main_frame=*/false, security_origin, - &test_web_state_); + "child_web_frame_2", CreateKey(), /*is_main_frame=*/false, + security_origin, &test_web_state_); WebFrameImpl* child_web_frame_2_ptr = child_web_frame_2.get(); frames_manager_->AddFrame(std::move(child_web_frame_2)); @@ -122,11 +137,12 @@ // Tests that all frames are removed after a call to |RemoveAllFrames|. TEST_F(WebFramesManagerImplTest, RemoveAllFrames) { GURL security_origin; - frames_manager_->AddFrame( - std::make_unique<WebFrameImpl>("main_web_frame", /*is_main_frame=*/true, - security_origin, &test_web_state_)); frames_manager_->AddFrame(std::make_unique<WebFrameImpl>( - "web_frame", /*is_main_frame=*/false, security_origin, &test_web_state_)); + "main_web_frame", CreateKey(), /*is_main_frame=*/true, security_origin, + &test_web_state_)); + frames_manager_->AddFrame(std::make_unique<WebFrameImpl>( + "web_frame", CreateKey(), /*is_main_frame=*/false, security_origin, + &test_web_state_)); ASSERT_EQ(2ul, frames_manager_->GetAllWebFrames().size()); frames_manager_->RemoveAllWebFrames(); @@ -140,8 +156,8 @@ GURL security_origin; const std::string main_web_frame_frame_id = "main_web_frame"; auto main_web_frame = std::make_unique<WebFrameImpl>( - main_web_frame_frame_id, /*is_main_frame=*/true, security_origin, - &test_web_state_); + main_web_frame_frame_id, CreateKey(), /*is_main_frame=*/true, + security_origin, &test_web_state_); WebFrameImpl* main_web_frame_ptr = main_web_frame.get(); frames_manager_->AddFrame(std::move(main_web_frame)); @@ -161,7 +177,7 @@ const std::string web_frame_frame_id = "web_frame_frame_id"; auto web_frame = std::make_unique<WebFrameImpl>( - web_frame_frame_id, /*is_main_frame=*/false, security_origin, + web_frame_frame_id, CreateKey(), /*is_main_frame=*/false, security_origin, &test_web_state_); WebFrameImpl* web_frame_ptr = web_frame.get(); frames_manager_->AddFrame(std::move(web_frame));
diff --git a/ios/web/web_state/web_frames_manager_inttest.mm b/ios/web/web_state/web_frames_manager_inttest.mm index 1eb11e9..a81223f 100644 --- a/ios/web/web_state/web_frames_manager_inttest.mm +++ b/ios/web/web_state/web_frames_manager_inttest.mm
@@ -4,6 +4,7 @@ #import "ios/web/public/test/web_test_with_web_state.h" +#include "base/ios/ios_util.h" #include "ios/web/public/web_state/web_frame.h" #include "ios/web/web_state/web_frames_manager_impl.h" @@ -22,9 +23,18 @@ WebFramesManagerImpl* frames_manager = WebFramesManagerImpl::FromWebState(web_state()); - EXPECT_EQ(1ul, frames_manager->GetAllWebFrames().size()); WebFrame* main_web_frame = frames_manager->GetMainWebFrame(); + if (!base::ios::IsRunningOnIOS11OrLater()) { + // No WebFrame is created on iOS 10. + // TODO(crbug.com/872818): Cleanup once iOS 10 support is dropped. + EXPECT_EQ(0ul, frames_manager->GetAllWebFrames().size()); + ASSERT_FALSE(main_web_frame); + return; + } + + EXPECT_EQ(1ul, frames_manager->GetAllWebFrames().size()); + ASSERT_TRUE(main_web_frame); EXPECT_TRUE(main_web_frame->IsMainFrame()); EXPECT_FALSE(main_web_frame->GetFrameId().empty());
diff --git a/ios/web/web_state/web_state_unittest.mm b/ios/web/web_state/web_state_unittest.mm index eaaf4b3..3fdc8da 100644 --- a/ios/web/web_state/web_state_unittest.mm +++ b/ios/web/web_state/web_state_unittest.mm
@@ -10,6 +10,8 @@ #include "base/strings/utf_string_conversions.h" #import "base/test/ios/wait_util.h" #include "base/values.h" +#import "ios/web/public/crw_navigation_item_storage.h" +#import "ios/web/public/crw_session_storage.h" #import "ios/web/public/navigation_manager.h" #import "ios/web/public/test/fakes/test_web_state_delegate.h" #import "ios/web/public/test/web_test_with_web_state.h" @@ -22,6 +24,7 @@ using base::test::ios::WaitUntilConditionOrTimeout; using base::test::ios::kWaitForJSCompletionTimeout; +using base::test::ios::kWaitForPageLoadTimeout; namespace web { @@ -253,4 +256,37 @@ EXPECT_TRUE(web_state()->HasOpener()); } +// Verifies that large session can be restored. The max supported session length +// is 100. Pushing more entries will cause the following JavaScript error: +// "SecurityError: Attempt to use history.pushState() more than 100 times per +// 30.000000 seconds raw session history". +TEST_F(WebStateTest, RestoreLargeSession) { + // Create session storage with large number of items. + const int kItemCount = 100; + NSMutableArray<CRWNavigationItemStorage*>* item_storages = + [NSMutableArray arrayWithCapacity:kItemCount]; + for (unsigned int i = 0; i < kItemCount; i++) { + CRWNavigationItemStorage* item = [[CRWNavigationItemStorage alloc] init]; + item.virtualURL = GURL(base::StringPrintf("http://www.%u.com", i)); + item.title = base::ASCIIToUTF16(base::StringPrintf("Test%u", i)); + [item_storages addObject:item]; + } + + // Restore the session. + WebState::CreateParams params(GetBrowserState()); + CRWSessionStorage* session_storage = [[CRWSessionStorage alloc] init]; + session_storage.itemStorages = item_storages; + auto web_state = WebState::CreateWithStorageSession(params, session_storage); + NavigationManager* navigation_manager = web_state->GetNavigationManager(); + // TODO(crbug.com/873729): The session will not be restored until + // LoadIfNecessary call. Fix the bug and remove extra call. + navigation_manager->LoadIfNecessary(); + + // Verify that session was fully restored. + EXPECT_TRUE(WaitUntilConditionOrTimeout(kWaitForPageLoadTimeout, ^{ + return navigation_manager->GetItemCount() == kItemCount; + })); + EXPECT_EQ(kItemCount, navigation_manager->GetItemCount()); +} + } // namespace web
diff --git a/ios/web_view/BUILD.gn b/ios/web_view/BUILD.gn index 68f7fbd..5bf710c 100644 --- a/ios/web_view/BUILD.gn +++ b/ios/web_view/BUILD.gn
@@ -157,10 +157,16 @@ "internal/signin/web_view_signin_error_controller_factory.mm", "internal/signin/web_view_signin_manager_factory.h", "internal/signin/web_view_signin_manager_factory.mm", + "internal/sync/web_view_model_type_store_service_factory.h", + "internal/sync/web_view_model_type_store_service_factory.mm", "internal/sync/web_view_gcm_profile_service_factory.h", "internal/sync/web_view_gcm_profile_service_factory.mm", "internal/sync/web_view_profile_invalidation_provider_factory.h", "internal/sync/web_view_profile_invalidation_provider_factory.mm", + "internal/sync/web_view_profile_sync_service_factory.h", + "internal/sync/web_view_profile_sync_service_factory.mm", + "internal/sync/web_view_sync_client.h", + "internal/sync/web_view_sync_client.mm", "internal/translate/cwv_translation_controller.mm", "internal/translate/cwv_translation_controller_internal.h", "internal/translate/cwv_translation_language_internal.h", @@ -228,6 +234,7 @@ "//components/autofill/core/common", "//components/autofill/ios/browser", "//components/autofill/ios/form_util", + "//components/browser_sync", "//components/content_settings/core/browser", "//components/flags_ui", "//components/gcm_driver", @@ -239,7 +246,6 @@ "//components/language/core/browser", "//components/language/core/common", "//components/net_log", - "//components/network_time", "//components/password_manager/core/browser", "//components/password_manager/core/browser/form_parsing:form_parsing", "//components/password_manager/core/common", @@ -255,6 +261,8 @@ "//components/translate/core/browser", "//components/translate/core/common", "//components/translate/ios/browser", + "//components/version_info", + "//components/version_info:version_string", "//components/web_resource", "//components/webdata_services", "//google_apis",
diff --git a/ios/web_view/internal/DEPS b/ios/web_view/internal/DEPS index f533982..560a264 100644 --- a/ios/web_view/internal/DEPS +++ b/ios/web_view/internal/DEPS
@@ -1,6 +1,7 @@ include_rules = [ "+base", "+components/autofill", + "+components/browser_sync", "+components/content_settings/core", "+components/flags_ui", "+components/gcm_driver", @@ -12,7 +13,8 @@ "+components/language/core/browser", "+components/language/core/common", "+components/net_log", - "+components/password_manager", + "+components/password_manager/core", + "+components/password_manager/sync", "+components/pref_registry", "+components/prefs", "+components/proxy_config", @@ -22,6 +24,7 @@ "+components/sync", "+components/translate/core", "+components/translate/ios", + "+components/version_info", "+components/webdata_services", "+components/web_resource", "+google_apis",
diff --git a/ios/web_view/internal/passwords/web_view_password_store_factory.mm b/ios/web_view/internal/passwords/web_view_password_store_factory.mm index d396258..3cbff5c 100644 --- a/ios/web_view/internal/passwords/web_view_password_store_factory.mm +++ b/ios/web_view/internal/passwords/web_view_password_store_factory.mm
@@ -13,6 +13,7 @@ #include "base/sequenced_task_runner.h" #include "base/task/post_task.h" #include "base/threading/sequenced_task_runner_handle.h" +#include "components/browser_sync/profile_sync_service.h" #include "components/keyed_service/core/service_access_type.h" #include "components/keyed_service/ios/browser_state_dependency_manager.h" #include "components/password_manager/core/browser/android_affiliation/affiliated_match_helper.h" @@ -21,6 +22,7 @@ #include "components/password_manager/core/browser/login_database.h" #include "components/password_manager/core/browser/password_store_default.h" #include "components/password_manager/core/browser/password_store_factory_util.h" +#import "ios/web_view/internal/sync/web_view_profile_sync_service_factory.h" #include "ios/web_view/internal/web_view_browser_state.h" #include "ios/web_view/internal/webdata_services/web_view_web_data_service_wrapper_factory.h" @@ -51,6 +53,19 @@ return base::Singleton<WebViewPasswordStoreFactory>::get(); } +// static +void WebViewPasswordStoreFactory::OnPasswordsSyncedStatePotentiallyChanged( + WebViewBrowserState* browser_state) { + scoped_refptr<password_manager::PasswordStore> password_store = + GetForBrowserState(browser_state, ServiceAccessType::EXPLICIT_ACCESS); + syncer::SyncService* sync_service = + WebViewProfileSyncServiceFactory::GetForBrowserState(browser_state); + password_manager::ToggleAffiliationBasedMatchingBasedOnPasswordSyncedState( + password_store.get(), sync_service, + browser_state->GetSharedURLLoaderFactory(), + browser_state->GetStatePath()); +} + WebViewPasswordStoreFactory::WebViewPasswordStoreFactory() : RefcountedBrowserStateKeyedServiceFactory( "PasswordStore",
diff --git a/ios/web_view/internal/pref_names.cc b/ios/web_view/internal/pref_names.cc index a56767a..321cb2ac 100644 --- a/ios/web_view/internal/pref_names.cc +++ b/ios/web_view/internal/pref_names.cc
@@ -6,8 +6,8 @@ namespace prefs { -// The value to use for Accept-Languages HTTP header when making an HTTP -// request. const char kAcceptLanguages[] = "intl.accept_languages"; +const char kSavingBrowserHistoryDisabled[] = "history.saving_disabled"; + } // namespace prefs
diff --git a/ios/web_view/internal/pref_names.h b/ios/web_view/internal/pref_names.h index 227ffb7..89eee32 100644 --- a/ios/web_view/internal/pref_names.h +++ b/ios/web_view/internal/pref_names.h
@@ -7,8 +7,13 @@ namespace prefs { +// The value to use for Accept-Languages HTTP header when making an HTTP +// request. Currently only used for Translate related requests. extern const char kAcceptLanguages[]; +// Boolean controlling whether history saving is disabled. +extern const char kSavingBrowserHistoryDisabled[]; + } // namespace prefs #endif // IOS_WEB_VIEW_INTERNAL_PREF_NAMES_H_
diff --git a/ios/web_view/internal/sync/web_view_model_type_store_service_factory.h b/ios/web_view/internal/sync/web_view_model_type_store_service_factory.h new file mode 100644 index 0000000..1c35dcb5 --- /dev/null +++ b/ios/web_view/internal/sync/web_view_model_type_store_service_factory.h
@@ -0,0 +1,53 @@ +// 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 IOS_WEB_VIEW_INTERNAL_SYNC_WEB_VIEW_MODEL_TYPE_STORE_SERVICE_FACTORY_H_ +#define IOS_WEB_VIEW_INTERNAL_SYNC_WEB_VIEW_MODEL_TYPE_STORE_SERVICE_FACTORY_H_ + +#include <memory> + +#include "base/macros.h" +#include "components/keyed_service/ios/browser_state_keyed_service_factory.h" + +namespace base { +template <typename T> +struct DefaultSingletonTraits; +} // namespace base + +namespace syncer { +class ModelTypeStoreService; +} // namespace syncer + +namespace ios_web_view { +class WebViewBrowserState; + +// Singleton that owns all ModelTypeStoreService and associates them with +// WebViewBrowserState +class WebViewModelTypeStoreServiceFactory + : public BrowserStateKeyedServiceFactory { + public: + static syncer::ModelTypeStoreService* GetForBrowserState( + WebViewBrowserState* browser_state); + + static WebViewModelTypeStoreServiceFactory* GetInstance(); + + private: + friend struct base::DefaultSingletonTraits< + WebViewModelTypeStoreServiceFactory>; + + WebViewModelTypeStoreServiceFactory(); + ~WebViewModelTypeStoreServiceFactory() override; + + // BrowserStateKeyedServiceFactory implementation. + std::unique_ptr<KeyedService> BuildServiceInstanceFor( + web::BrowserState* context) const override; + web::BrowserState* GetBrowserStateToUse( + web::BrowserState* context) const override; + + DISALLOW_COPY_AND_ASSIGN(WebViewModelTypeStoreServiceFactory); +}; + +} // namespace ios_web_view + +#endif // IOS_WEB_VIEW_INTERNAL_SYNC_WEB_VIEW_MODEL_TYPE_STORE_SERVICE_FACTORY_H_
diff --git a/ios/web_view/internal/sync/web_view_model_type_store_service_factory.mm b/ios/web_view/internal/sync/web_view_model_type_store_service_factory.mm new file mode 100644 index 0000000..66594be --- /dev/null +++ b/ios/web_view/internal/sync/web_view_model_type_store_service_factory.mm
@@ -0,0 +1,57 @@ +// 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. + +#import "ios/web_view/internal/sync/web_view_model_type_store_service_factory.h" + +#include <utility> + +#include "base/memory/singleton.h" +#include "components/keyed_service/ios/browser_state_dependency_manager.h" +#include "components/sync/model_impl/model_type_store_service_impl.h" +#include "ios/web_view/internal/web_view_browser_state.h" + +#if !defined(__has_feature) || !__has_feature(objc_arc) +#error "This file requires ARC support." +#endif + +namespace ios_web_view { + +// static +WebViewModelTypeStoreServiceFactory* +WebViewModelTypeStoreServiceFactory::GetInstance() { + return base::Singleton<WebViewModelTypeStoreServiceFactory>::get(); +} + +// static +syncer::ModelTypeStoreService* +WebViewModelTypeStoreServiceFactory::GetForBrowserState( + WebViewBrowserState* browser_state) { + return static_cast<syncer::ModelTypeStoreService*>( + GetInstance()->GetServiceForBrowserState(browser_state, true)); +} + +WebViewModelTypeStoreServiceFactory::WebViewModelTypeStoreServiceFactory() + : BrowserStateKeyedServiceFactory( + "ModelTypeStoreService", + BrowserStateDependencyManager::GetInstance()) {} + +WebViewModelTypeStoreServiceFactory::~WebViewModelTypeStoreServiceFactory() {} + +std::unique_ptr<KeyedService> +WebViewModelTypeStoreServiceFactory::BuildServiceInstanceFor( + web::BrowserState* context) const { + WebViewBrowserState* browser_state = + WebViewBrowserState::FromBrowserState(context); + return std::make_unique<syncer::ModelTypeStoreServiceImpl>( + browser_state->GetStatePath()); +} + +web::BrowserState* WebViewModelTypeStoreServiceFactory::GetBrowserStateToUse( + web::BrowserState* context) const { + WebViewBrowserState* browser_state = + WebViewBrowserState::FromBrowserState(context); + return browser_state->GetRecordingBrowserState(); +} + +} // namespace ios_web_view
diff --git a/ios/web_view/internal/sync/web_view_profile_sync_service_factory.h b/ios/web_view/internal/sync/web_view_profile_sync_service_factory.h new file mode 100644 index 0000000..798ce13b --- /dev/null +++ b/ios/web_view/internal/sync/web_view_profile_sync_service_factory.h
@@ -0,0 +1,50 @@ +// 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 IOS_WEB_VIEW_INTERNAL_SYNC_WEB_VIEW_PROFILE_SYNC_SERVICE_FACTORY_H_ +#define IOS_WEB_VIEW_INTERNAL_SYNC_WEB_VIEW_PROFILE_SYNC_SERVICE_FACTORY_H_ + +#include <memory> + +#include "base/macros.h" +#include "components/keyed_service/ios/browser_state_keyed_service_factory.h" + +namespace base { +template <typename T> +struct DefaultSingletonTraits; +} // namespace base + +namespace browser_sync { +class ProfileSyncService; +} // namespace browser_sync + +namespace ios_web_view { +class WebViewBrowserState; + +// Singleton that owns all ProfileSyncService and associates them with +// WebViewBrowserState. +class WebViewProfileSyncServiceFactory + : public BrowserStateKeyedServiceFactory { + public: + static browser_sync::ProfileSyncService* GetForBrowserState( + WebViewBrowserState* browser_state); + + static WebViewProfileSyncServiceFactory* GetInstance(); + + private: + friend struct base::DefaultSingletonTraits<WebViewProfileSyncServiceFactory>; + + WebViewProfileSyncServiceFactory(); + ~WebViewProfileSyncServiceFactory() override; + + // BrowserStateKeyedServiceFactory implementation. + std::unique_ptr<KeyedService> BuildServiceInstanceFor( + web::BrowserState* context) const override; + + DISALLOW_COPY_AND_ASSIGN(WebViewProfileSyncServiceFactory); +}; + +} // namespace ios_web_view + +#endif // IOS_WEB_VIEW_INTERNAL_SYNC_WEB_VIEW_PROFILE_SYNC_SERVICE_FACTORY_H_
diff --git a/ios/web_view/internal/sync/web_view_profile_sync_service_factory.mm b/ios/web_view/internal/sync/web_view_profile_sync_service_factory.mm new file mode 100644 index 0000000..52aac30 --- /dev/null +++ b/ios/web_view/internal/sync/web_view_profile_sync_service_factory.mm
@@ -0,0 +1,115 @@ +// 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. + +#import "ios/web_view/internal/sync/web_view_profile_sync_service_factory.h" + +#include <utility> + +#include "base/memory/singleton.h" +#include "base/time/time.h" +#include "components/browser_sync/profile_sync_service.h" +#include "components/keyed_service/ios/browser_state_dependency_manager.h" +#include "components/signin/core/browser/profile_oauth2_token_service.h" +#include "components/signin/core/browser/signin_manager.h" +#include "components/sync/base/model_type.h" +#include "components/sync/driver/signin_manager_wrapper.h" +#include "components/sync/driver/startup_controller.h" +#include "components/sync/driver/sync_util.h" +#include "ios/web/public/web_thread.h" +#include "ios/web_view/internal/app/application_context.h" +#include "ios/web_view/internal/autofill/web_view_personal_data_manager_factory.h" +#include "ios/web_view/internal/passwords/web_view_password_store_factory.h" +#include "ios/web_view/internal/signin/ios_web_view_signin_client.h" +#include "ios/web_view/internal/signin/web_view_identity_manager_factory.h" +#include "ios/web_view/internal/signin/web_view_oauth2_token_service_factory.h" +#include "ios/web_view/internal/signin/web_view_signin_client_factory.h" +#include "ios/web_view/internal/signin/web_view_signin_manager_factory.h" +#import "ios/web_view/internal/sync/web_view_gcm_profile_service_factory.h" +#import "ios/web_view/internal/sync/web_view_model_type_store_service_factory.h" +#import "ios/web_view/internal/sync/web_view_profile_invalidation_provider_factory.h" +#import "ios/web_view/internal/sync/web_view_sync_client.h" +#include "ios/web_view/internal/web_view_browser_state.h" +#include "ios/web_view/internal/webdata_services/web_view_web_data_service_wrapper_factory.h" +#include "services/identity/public/cpp/identity_manager.h" +#include "services/network/public/cpp/shared_url_loader_factory.h" +#include "url/gurl.h" + +#if !defined(__has_feature) || !__has_feature(objc_arc) +#error "This file requires ARC support." +#endif + +namespace ios_web_view { + +using browser_sync::ProfileSyncService; + +// static +WebViewProfileSyncServiceFactory* +WebViewProfileSyncServiceFactory::GetInstance() { + return base::Singleton<WebViewProfileSyncServiceFactory>::get(); +} + +// static +ProfileSyncService* WebViewProfileSyncServiceFactory::GetForBrowserState( + WebViewBrowserState* browser_state) { + return static_cast<ProfileSyncService*>( + GetInstance()->GetServiceForBrowserState(browser_state, true)); +} + +WebViewProfileSyncServiceFactory::WebViewProfileSyncServiceFactory() + : BrowserStateKeyedServiceFactory( + "ProfileSyncService", + BrowserStateDependencyManager::GetInstance()) { + // The ProfileSyncService depends on various SyncableServices being around + // when it is shut down. Specify those dependencies here to build the proper + // destruction order. + DependsOn(WebViewIdentityManagerFactory::GetInstance()); + DependsOn(WebViewSigninManagerFactory::GetInstance()); + DependsOn(WebViewOAuth2TokenServiceFactory::GetInstance()); + DependsOn(WebViewSigninClientFactory::GetInstance()); + DependsOn(WebViewPersonalDataManagerFactory::GetInstance()); + DependsOn(WebViewWebDataServiceWrapperFactory::GetInstance()); + DependsOn(WebViewPasswordStoreFactory::GetInstance()); + DependsOn(WebViewGCMProfileServiceFactory::GetInstance()); + DependsOn(WebViewProfileInvalidationProviderFactory::GetInstance()); + DependsOn(WebViewModelTypeStoreServiceFactory::GetInstance()); +} + +WebViewProfileSyncServiceFactory::~WebViewProfileSyncServiceFactory() {} + +std::unique_ptr<KeyedService> +WebViewProfileSyncServiceFactory::BuildServiceInstanceFor( + web::BrowserState* context) const { + WebViewBrowserState* browser_state = + WebViewBrowserState::FromBrowserState(context); + + identity::IdentityManager* identity_manager = + WebViewIdentityManagerFactory::GetForBrowserState(browser_state); + SigninManagerBase* signin = + WebViewSigninManagerFactory::GetForBrowserState(browser_state); + IOSWebViewSigninClient* signin_client = + WebViewSigninClientFactory::GetForBrowserState(browser_state); + WebViewGCMProfileServiceFactory::GetForBrowserState(browser_state); + + ProfileSyncService::InitParams init_params; + init_params.signin_wrapper = + std::make_unique<SigninManagerWrapper>(identity_manager, signin); + init_params.start_behavior = ProfileSyncService::MANUAL_START; + init_params.sync_client = std::make_unique<WebViewSyncClient>(browser_state); + init_params.url_request_context = browser_state->GetRequestContext(); + init_params.url_loader_factory = browser_state->GetSharedURLLoaderFactory(); + // ios/web_view has no need to update network time. + init_params.network_time_update_callback = base::DoNothing(); + init_params.signin_scoped_device_id_callback = + base::BindRepeating(&IOSWebViewSigninClient::GetSigninScopedDeviceId, + base::Unretained(signin_client)); + + auto profile_sync_service = + std::make_unique<ProfileSyncService>(std::move(init_params)); + // Will also initialize the sync client. + profile_sync_service->Initialize(); + + return profile_sync_service; +} + +} // namespace ios_web_view
diff --git a/ios/web_view/internal/sync/web_view_sync_client.h b/ios/web_view/internal/sync/web_view_sync_client.h new file mode 100644 index 0000000..311e722 --- /dev/null +++ b/ios/web_view/internal/sync/web_view_sync_client.h
@@ -0,0 +1,75 @@ +// 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 IOS_WEB_VIEW_INTERNAL_SYNC_WEB_VIEW_SYNC_CLIENT_H_ +#define IOS_WEB_VIEW_INTERNAL_SYNC_WEB_VIEW_SYNC_CLIENT_H_ + +#include "base/macros.h" +#include "base/memory/weak_ptr.h" +#include "base/single_thread_task_runner.h" +#include "components/sync/driver/sync_client.h" + +namespace autofill { +class AutofillWebDataService; +} // namespace autofill + +namespace password_manager { +class PasswordStore; +} // namespace password_manager + +namespace syncer { +class SyncApiComponentFactory; +class SyncService; +} // namespace syncer + +namespace ios_web_view { + +class WebViewBrowserState; + +class WebViewSyncClient : public syncer::SyncClient { + public: + WebViewSyncClient(WebViewBrowserState* browser_state); + ~WebViewSyncClient() override; + + // SyncClient implementation. + void Initialize() override; + syncer::SyncService* GetSyncService() override; + PrefService* GetPrefService() override; + base::FilePath GetLocalSyncBackendFolder() override; + syncer::ModelTypeStoreService* GetModelTypeStoreService() override; + bookmarks::BookmarkModel* GetBookmarkModel() override; + favicon::FaviconService* GetFaviconService() override; + history::HistoryService* GetHistoryService() override; + bool HasPasswordStore() override; + base::RepeatingClosure GetPasswordStateChangedCallback() override; + syncer::DataTypeController::TypeVector CreateDataTypeControllers( + syncer::LocalDeviceInfoProvider* local_device_info_provider) override; + autofill::PersonalDataManager* GetPersonalDataManager() override; + invalidation::InvalidationService* GetInvalidationService() override; + BookmarkUndoService* GetBookmarkUndoServiceIfExists() override; + scoped_refptr<syncer::ExtensionsActivity> GetExtensionsActivity() override; + sync_sessions::SyncSessionsClient* GetSyncSessionsClient() override; + base::WeakPtr<syncer::SyncableService> GetSyncableServiceForType( + syncer::ModelType type) override; + base::WeakPtr<syncer::ModelTypeControllerDelegate> + GetControllerDelegateForModelType(syncer::ModelType type) override; + scoped_refptr<syncer::ModelSafeWorker> CreateModelWorkerForGroup( + syncer::ModelSafeGroup group) override; + syncer::SyncApiComponentFactory* GetSyncApiComponentFactory() override; + + private: + WebViewBrowserState* browser_state_ = nullptr; + scoped_refptr<autofill::AutofillWebDataService> profile_web_data_service_; + scoped_refptr<autofill::AutofillWebDataService> account_web_data_service_; + scoped_refptr<password_manager::PasswordStore> password_store_; + + std::unique_ptr<syncer::SyncApiComponentFactory> component_factory_; + scoped_refptr<base::SingleThreadTaskRunner> db_thread_; + + DISALLOW_COPY_AND_ASSIGN(WebViewSyncClient); +}; + +} // namespace ios_web_view + +#endif // IOS_WEB_VIEW_INTERNAL_SYNC_WEB_VIEW_SYNC_CLIENT_H_
diff --git a/ios/web_view/internal/sync/web_view_sync_client.mm b/ios/web_view/internal/sync/web_view_sync_client.mm new file mode 100644 index 0000000..63bca2fb --- /dev/null +++ b/ios/web_view/internal/sync/web_view_sync_client.mm
@@ -0,0 +1,238 @@ +// 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. + +#import "ios/web_view/internal/sync/web_view_sync_client.h" + +#include "base/command_line.h" +#include "base/logging.h" +#include "components/autofill/core/browser/webdata/autofill_profile_sync_bridge.h" +#include "components/autofill/core/browser/webdata/autofill_profile_syncable_service.h" +#include "components/autofill/core/browser/webdata/autofill_wallet_metadata_syncable_service.h" +#include "components/autofill/core/browser/webdata/autofill_wallet_syncable_service.h" +#include "components/autofill/core/browser/webdata/autofill_webdata_service.h" +#include "components/autofill/core/common/autofill_features.h" +#include "components/browser_sync/browser_sync_switches.h" +#include "components/browser_sync/profile_sync_components_factory_impl.h" +#include "components/browser_sync/profile_sync_service.h" +#include "components/invalidation/impl/profile_invalidation_provider.h" +#include "components/keyed_service/core/service_access_type.h" +#include "components/password_manager/core/browser/password_store.h" +#include "components/password_manager/sync/browser/password_model_worker.h" +#include "components/sync/driver/sync_api_component_factory.h" +#include "components/sync/driver/sync_util.h" +#include "components/sync/engine/passive_model_worker.h" +#include "components/sync/engine/sequenced_model_worker.h" +#include "components/sync/engine/ui_model_worker.h" +#include "components/sync/user_events/user_event_service.h" +#include "components/version_info/version_info.h" +#include "components/version_info/version_string.h" +#include "ios/web/public/web_thread.h" +#include "ios/web_view/internal/autofill/web_view_personal_data_manager_factory.h" +#include "ios/web_view/internal/passwords/web_view_password_store_factory.h" +#include "ios/web_view/internal/pref_names.h" +#import "ios/web_view/internal/sync/web_view_model_type_store_service_factory.h" +#import "ios/web_view/internal/sync/web_view_profile_invalidation_provider_factory.h" +#import "ios/web_view/internal/sync/web_view_profile_sync_service_factory.h" +#include "ios/web_view/internal/web_view_browser_state.h" +#include "ios/web_view/internal/webdata_services/web_view_web_data_service_wrapper_factory.h" +#include "ui/base/device_form_factor.h" + +#if !defined(__has_feature) || !__has_feature(objc_arc) +#error "This file requires ARC support." +#endif + +namespace ios_web_view { + +namespace { +syncer::ModelTypeSet GetDisabledTypes() { + syncer::ModelTypeSet disabled_types = syncer::UserSelectableTypes(); + // Don't need to sync preferences. + disabled_types.Put(syncer::PRIORITY_PREFERENCES); + // Only want autofill and passwords. + disabled_types.Remove(syncer::AUTOFILL); + disabled_types.Remove(syncer::PASSWORDS); + return disabled_types; +} +} // namespace + +WebViewSyncClient::WebViewSyncClient(WebViewBrowserState* browser_state) + : browser_state_(browser_state) {} + +WebViewSyncClient::~WebViewSyncClient() {} + +void WebViewSyncClient::Initialize() { + DCHECK_CURRENTLY_ON(web::WebThread::UI); + + profile_web_data_service_ = + WebViewWebDataServiceWrapperFactory::GetAutofillWebDataForBrowserState( + browser_state_, ServiceAccessType::IMPLICIT_ACCESS); + account_web_data_service_ = + base::FeatureList::IsEnabled( + autofill::features::kAutofillEnableAccountWalletStorage) + ? WebViewWebDataServiceWrapperFactory::GetAutofillWebDataForAccount( + browser_state_, ServiceAccessType::IMPLICIT_ACCESS) + : nullptr; + + db_thread_ = profile_web_data_service_ + ? profile_web_data_service_->GetDBTaskRunner() + : nullptr; + + password_store_ = WebViewPasswordStoreFactory::GetForBrowserState( + browser_state_, ServiceAccessType::IMPLICIT_ACCESS); + + component_factory_.reset(new browser_sync::ProfileSyncComponentsFactoryImpl( + this, version_info::Channel::UNKNOWN, version_info::GetVersionNumber(), + ui::GetDeviceFormFactor() == ui::DEVICE_FORM_FACTOR_TABLET, + prefs::kSavingBrowserHistoryDisabled, + web::WebThread::GetTaskRunnerForThread(web::WebThread::UI), db_thread_, + profile_web_data_service_, account_web_data_service_, password_store_, + /*bookmark_sync_service=*/nullptr)); +} + +syncer::SyncService* WebViewSyncClient::GetSyncService() { + DCHECK_CURRENTLY_ON(web::WebThread::UI); + return WebViewProfileSyncServiceFactory::GetForBrowserState(browser_state_); +} + +PrefService* WebViewSyncClient::GetPrefService() { + DCHECK_CURRENTLY_ON(web::WebThread::UI); + return browser_state_->GetPrefs(); +} + +base::FilePath WebViewSyncClient::GetLocalSyncBackendFolder() { + return base::FilePath(); +} + +syncer::ModelTypeStoreService* WebViewSyncClient::GetModelTypeStoreService() { + return WebViewModelTypeStoreServiceFactory::GetForBrowserState( + browser_state_); +} + +bookmarks::BookmarkModel* WebViewSyncClient::GetBookmarkModel() { + return nullptr; +} + +favicon::FaviconService* WebViewSyncClient::GetFaviconService() { + return nullptr; +} + +history::HistoryService* WebViewSyncClient::GetHistoryService() { + return nullptr; +} + +bool WebViewSyncClient::HasPasswordStore() { + return true; +} + +autofill::PersonalDataManager* WebViewSyncClient::GetPersonalDataManager() { + DCHECK_CURRENTLY_ON(web::WebThread::UI); + return WebViewPersonalDataManagerFactory::GetForBrowserState(browser_state_); +} + +base::RepeatingClosure WebViewSyncClient::GetPasswordStateChangedCallback() { + return base::BindRepeating( + &WebViewPasswordStoreFactory::OnPasswordsSyncedStatePotentiallyChanged, + base::Unretained(browser_state_)); +} + +syncer::DataTypeController::TypeVector +WebViewSyncClient::CreateDataTypeControllers( + syncer::LocalDeviceInfoProvider* local_device_info_provider) { + // The iOS port does not have any platform-specific datatypes. + return component_factory_->CreateCommonDataTypeControllers( + GetDisabledTypes(), local_device_info_provider); +} + +BookmarkUndoService* WebViewSyncClient::GetBookmarkUndoServiceIfExists() { + return nullptr; +} + +invalidation::InvalidationService* WebViewSyncClient::GetInvalidationService() { + invalidation::ProfileInvalidationProvider* provider = + WebViewProfileInvalidationProviderFactory::GetForBrowserState( + browser_state_); + if (provider) { + return provider->GetInvalidationService(); + } + return nullptr; +} + +scoped_refptr<syncer::ExtensionsActivity> +WebViewSyncClient::GetExtensionsActivity() { + return nullptr; +} + +sync_sessions::SyncSessionsClient* WebViewSyncClient::GetSyncSessionsClient() { + return nullptr; +} + +base::WeakPtr<syncer::SyncableService> +WebViewSyncClient::GetSyncableServiceForType(syncer::ModelType type) { + if (!profile_web_data_service_) { + NOTREACHED(); + return base::WeakPtr<syncer::SyncableService>(); + } + switch (type) { + case syncer::AUTOFILL_PROFILE: + return autofill::AutofillProfileSyncableService::FromWebDataService( + profile_web_data_service_.get()) + ->AsWeakPtr(); + case syncer::AUTOFILL_WALLET_DATA: + return autofill::AutofillWalletSyncableService::FromWebDataService( + profile_web_data_service_.get()) + ->AsWeakPtr(); + case syncer::AUTOFILL_WALLET_METADATA: + return autofill::AutofillWalletMetadataSyncableService:: + FromWebDataService(profile_web_data_service_.get()) + ->AsWeakPtr(); + case syncer::PASSWORDS: + return password_store_ ? password_store_->GetPasswordSyncableService() + : base::WeakPtr<syncer::SyncableService>(); + default: + NOTREACHED(); + return base::WeakPtr<syncer::SyncableService>(); + } +} + +base::WeakPtr<syncer::ModelTypeControllerDelegate> +WebViewSyncClient::GetControllerDelegateForModelType(syncer::ModelType type) { + switch (type) { + case syncer::DEVICE_INFO: + // TODO(crbug.com/872420): Distinguish ios/web_view from ios/chrome. + return WebViewProfileSyncServiceFactory::GetForBrowserState( + browser_state_) + ->GetDeviceInfoSyncControllerDelegate(); + default: + NOTREACHED(); + // TODO(crbug.com/873790): Figure out if USER_CONSENTS need to be enabled. + return base::WeakPtr<syncer::ModelTypeControllerDelegate>(); + } +} + +scoped_refptr<syncer::ModelSafeWorker> +WebViewSyncClient::CreateModelWorkerForGroup(syncer::ModelSafeGroup group) { + DCHECK_CURRENTLY_ON(web::WebThread::UI); + switch (group) { + case syncer::GROUP_DB: + return new syncer::SequencedModelWorker(db_thread_, syncer::GROUP_DB); + case syncer::GROUP_UI: + return new syncer::UIModelWorker( + web::WebThread::GetTaskRunnerForThread(web::WebThread::UI)); + case syncer::GROUP_PASSIVE: + return new syncer::PassiveModelWorker(); + case syncer::GROUP_PASSWORD: + if (!password_store_) + return nullptr; + return new browser_sync::PasswordModelWorker(password_store_); + default: + return nullptr; + } +} + +syncer::SyncApiComponentFactory* +WebViewSyncClient::GetSyncApiComponentFactory() { + return component_factory_.get(); +} + +} // namespace ios_web_view
diff --git a/ios/web_view/internal/web_view_browser_state.mm b/ios/web_view/internal/web_view_browser_state.mm index 81e7d01..d0fde647 100644 --- a/ios/web_view/internal/web_view_browser_state.mm +++ b/ios/web_view/internal/web_view_browser_state.mm
@@ -21,6 +21,8 @@ #include "components/prefs/pref_filter.h" #include "components/prefs/pref_service_factory.h" #include "components/signin/ios/browser/active_state_manager.h" +#include "components/sync/base/pref_names.h" +#include "components/sync/base/sync_prefs.h" #include "components/translate/core/browser/translate_pref_names.h" #include "components/translate/core/browser/translate_prefs.h" #include "ios/web/public/web_thread.h" @@ -42,7 +44,9 @@ #include "ios/web_view/internal/signin/web_view_signin_error_controller_factory.h" #include "ios/web_view/internal/signin/web_view_signin_manager_factory.h" #import "ios/web_view/internal/sync/web_view_gcm_profile_service_factory.h" +#import "ios/web_view/internal/sync/web_view_model_type_store_service_factory.h" #import "ios/web_view/internal/sync/web_view_profile_invalidation_provider_factory.h" +#import "ios/web_view/internal/sync/web_view_profile_sync_service_factory.h" #include "ios/web_view/internal/translate/web_view_translate_accept_languages_factory.h" #include "ios/web_view/internal/translate/web_view_translate_ranker_factory.h" #include "ios/web_view/internal/web_view_url_request_context_getter.h" @@ -160,6 +164,8 @@ pref_registry->RegisterStringPref(prefs::kAcceptLanguages, l10n_util::GetLocaleOverride()); pref_registry->RegisterBooleanPref(prefs::kOfferTranslateEnabled, true); + pref_registry->RegisterBooleanPref(prefs::kSavingBrowserHistoryDisabled, + true); translate::TranslatePrefs::RegisterProfilePrefs(pref_registry); #if BUILDFLAG(IOS_WEB_VIEW_ENABLE_AUTOFILL) @@ -169,6 +175,7 @@ #if BUILDFLAG(IOS_WEB_VIEW_ENABLE_SYNC) gcm::GCMChannelStatusSyncer::RegisterProfilePrefs(pref_registry); + syncer::SyncPrefs::RegisterProfilePrefs(pref_registry); #endif // BUILDFLAG(IOS_WEB_VIEW_ENABLE_SYNC) // Instantiate all factories to setup dependency graph for pref registration. @@ -197,6 +204,8 @@ WebViewIdentityManagerFactory::GetInstance(); WebViewGCMProfileServiceFactory::GetInstance(); WebViewProfileInvalidationProviderFactory::GetInstance(); + WebViewProfileSyncServiceFactory::GetInstance(); + WebViewModelTypeStoreServiceFactory::GetInstance(); #endif // BUILDFLAG(IOS_WEB_VIEW_ENABLE_SYNC) BrowserStateDependencyManager::GetInstance()
diff --git a/ios/web_view/internal/webdata_services/web_view_web_data_service_wrapper_factory.cc b/ios/web_view/internal/webdata_services/web_view_web_data_service_wrapper_factory.cc index 3cd8a29..7110b22 100644 --- a/ios/web_view/internal/webdata_services/web_view_web_data_service_wrapper_factory.cc +++ b/ios/web_view/internal/webdata_services/web_view_web_data_service_wrapper_factory.cc
@@ -42,6 +42,16 @@ } // static +scoped_refptr<autofill::AutofillWebDataService> +WebViewWebDataServiceWrapperFactory::GetAutofillWebDataForAccount( + WebViewBrowserState* browser_state, + ServiceAccessType access_type) { + WebDataServiceWrapper* wrapper = + GetForBrowserState(browser_state, access_type); + return wrapper ? wrapper->GetAccountAutofillWebData() : nullptr; +} + +// static scoped_refptr<TokenWebData> WebViewWebDataServiceWrapperFactory::GetTokenWebDataForBrowserState( WebViewBrowserState* browser_state,
diff --git a/ios/web_view/internal/webdata_services/web_view_web_data_service_wrapper_factory.h b/ios/web_view/internal/webdata_services/web_view_web_data_service_wrapper_factory.h index f62af673..965a7f6 100644 --- a/ios/web_view/internal/webdata_services/web_view_web_data_service_wrapper_factory.h +++ b/ios/web_view/internal/webdata_services/web_view_web_data_service_wrapper_factory.h
@@ -46,6 +46,12 @@ GetAutofillWebDataForBrowserState(WebViewBrowserState* browser_state, ServiceAccessType access_type); + // Returns the account-scoped AutofillWebDataService associated with the + // |browser_state|. + static scoped_refptr<autofill::AutofillWebDataService> + GetAutofillWebDataForAccount(WebViewBrowserState* browser_state, + ServiceAccessType access_type); + // Returns the TokenWebData associated with |browser_state|. static scoped_refptr<TokenWebData> GetTokenWebDataForBrowserState( WebViewBrowserState* browser_state,
diff --git a/ipc/BUILD.gn b/ipc/BUILD.gn index bfebba7..7471d18 100644 --- a/ipc/BUILD.gn +++ b/ipc/BUILD.gn
@@ -171,7 +171,7 @@ ] public_deps = [ ":message_support", - "//mojo/public/interfaces/bindings:bindings_shared__generator", + "//mojo/public/interfaces/bindings:bindings_headers", ] }
diff --git a/media/audio/audio_output_unittest.cc b/media/audio/audio_output_unittest.cc index 4503fc7..d1e80b7 100644 --- a/media/audio/audio_output_unittest.cc +++ b/media/audio/audio_output_unittest.cc
@@ -11,6 +11,7 @@ #include "base/run_loop.h" #include "base/threading/thread_task_runner_handle.h" #include "base/time/time.h" +#include "build/build_config.h" #include "media/audio/audio_device_info_accessor_for_tests.h" #include "media/audio/audio_io.h" #include "media/audio/audio_manager.h" @@ -97,7 +98,13 @@ } // This test produces actual audio for .25 seconds on the default device. -TEST_F(AudioOutputTest, Play200HzTone) { +#if defined(OS_FUCHSIA) +// TODO(https://crbug.com/873676): Test flakes started when SDK rolled. +#define MAYBE_Play200HzTone DISABLED_Play200HzTone +#else +#define MAYBE_Play200HzTone Play200HzTone +#endif +TEST_F(AudioOutputTest, MAYBE_Play200HzTone) { ABORT_AUDIO_TEST_IF_NOT(audio_manager_device_info_->HasAudioOutputDevices()); stream_params_ =
diff --git a/media/gpu/BUILD.gn b/media/gpu/BUILD.gn index 83412296..1512ff1 100644 --- a/media/gpu/BUILD.gn +++ b/media/gpu/BUILD.gn
@@ -114,7 +114,7 @@ "//base", "//gpu", "//media", - "//third_party/mesa:mesa_headers", + "//third_party/mesa_headers", "//ui/gfx/geometry", ] deps = [
diff --git a/media/gpu/ipc/service/BUILD.gn b/media/gpu/ipc/service/BUILD.gn index 77a9f50..e50a46b 100644 --- a/media/gpu/ipc/service/BUILD.gn +++ b/media/gpu/ipc/service/BUILD.gn
@@ -28,7 +28,7 @@ "vda_video_decoder.h", ] - include_dirs = [ "//third_party/mesa/src/include" ] + include_dirs = [ "//third_party/mesa_headers" ] public_deps = [ "//base", @@ -44,7 +44,7 @@ "//media/gpu", "//media/gpu:buildflags", "//media/gpu/ipc/common", - "//third_party/mesa:mesa_headers", + "//third_party/mesa_headers", "//ui/gfx/ipc/color", ]
diff --git a/media/gpu/windows/dxva_picture_buffer_win.h b/media/gpu/windows/dxva_picture_buffer_win.h index 23d234e..9212d3e 100644 --- a/media/gpu/windows/dxva_picture_buffer_win.h +++ b/media/gpu/windows/dxva_picture_buffer_win.h
@@ -16,6 +16,7 @@ #include "media/video/picture.h" #include "third_party/angle/include/EGL/egl.h" #include "third_party/angle/include/EGL/eglext.h" +#include "ui/gfx/geometry/rect.h" #include "ui/gl/gl_fence.h" #include "ui/gl/gl_image.h" @@ -57,6 +58,11 @@ scoped_refptr<gl::GLImage> gl_image() { return gl_image_; } + const gfx::Rect& visible_rect() const { return visible_rect_; } + void set_visible_rect(const gfx::Rect& visible_rect) { + visible_rect_ = visible_rect; + } + const gfx::ColorSpace& color_space() const { return color_space_; } void set_color_space(const gfx::ColorSpace& color_space) { color_space_ = color_space; @@ -86,6 +92,7 @@ State state_ = UNUSED; PictureBuffer picture_buffer_; + gfx::Rect visible_rect_; gfx::ColorSpace color_space_; scoped_refptr<gl::GLImage> gl_image_;
diff --git a/media/gpu/windows/dxva_video_decode_accelerator_win.cc b/media/gpu/windows/dxva_video_decode_accelerator_win.cc index 6488310..640f5d9 100644 --- a/media/gpu/windows/dxva_video_decode_accelerator_win.cc +++ b/media/gpu/windows/dxva_video_decode_accelerator_win.cc
@@ -456,6 +456,8 @@ // Detects stream configuration changes. // Returns false on failure. bool DetectConfig(const uint8_t* stream, unsigned int size) override; + gfx::Rect current_visible_rect( + const gfx::Rect& container_visible_rect) const override; VideoColorSpace current_color_space( const VideoColorSpace& container_color_space) const override; @@ -581,6 +583,17 @@ return true; } +gfx::Rect H264ConfigChangeDetector::current_visible_rect( + const gfx::Rect& container_visible_rect) const { + if (!parser_) + return container_visible_rect; + // TODO(hubbe): Is using last_sps_id_ correct here? + const H264SPS* sps = parser_->GetSPS(last_sps_id_); + if (!sps) + return container_visible_rect; + return sps->GetVisibleRect().value_or(container_visible_rect); +} + VideoColorSpace H264ConfigChangeDetector::current_color_space( const VideoColorSpace& container_color_space) const { if (!parser_) @@ -593,7 +606,7 @@ return container_color_space; } -// Doesn't actually detect config changes, only color spaces. +// Doesn't actually detect config changes, only stream metadata. class VP9ConfigChangeDetector : public ConfigChangeDetector { public: VP9ConfigChangeDetector() : ConfigChangeDetector(), parser_(false) {} @@ -605,6 +618,8 @@ parser_.SetStream(stream, size); Vp9FrameHeader fhdr; while (parser_.ParseNextFrame(&fhdr) == Vp9Parser::kOk) { + visible_rect_ = gfx::Rect(fhdr.render_width, fhdr.render_height); + // TODO(hubbe): move the conversion from Vp9FrameHeader to VideoColorSpace // into a common, reusable location. color_space_.range = fhdr.color_range ? gfx::ColorSpace::RangeID::FULL @@ -664,6 +679,12 @@ DVLOG(3) << "Deferring config change until next keyframe..."; return true; } + + gfx::Rect current_visible_rect( + const gfx::Rect& container_visible_rect) const override { + return visible_rect_.IsEmpty() ? container_visible_rect : visible_rect_; + } + VideoColorSpace current_color_space( const VideoColorSpace& container_color_space) const override { // For VP9, container color spaces override video stream color spaces. @@ -676,6 +697,7 @@ private: gfx::Size size_; bool pending_config_changed_ = false; + gfx::Rect visible_rect_; VideoColorSpace color_space_; Vp9Parser parser_; }; @@ -683,9 +705,11 @@ DXVAVideoDecodeAccelerator::PendingSampleInfo::PendingSampleInfo( int32_t buffer_id, Microsoft::WRL::ComPtr<IMFSample> sample, + const gfx::Rect& visible_rect, const gfx::ColorSpace& color_space) : input_buffer_id(buffer_id), picture_buffer_id(-1), + visible_rect(visible_rect), color_space(color_space), output_sample(sample) {} @@ -1894,7 +1918,8 @@ return true; } -void DXVAVideoDecodeAccelerator::DoDecode(const gfx::ColorSpace& color_space) { +void DXVAVideoDecodeAccelerator::DoDecode(const gfx::Rect& visible_rect, + const gfx::ColorSpace& color_space) { TRACE_EVENT0("media", "DXVAVideoDecodeAccelerator::DoDecode"); DCHECK(decoder_thread_task_runner_->BelongsToCurrentThread()); // This function is also called from FlushInternal in a loop which could @@ -1972,13 +1997,14 @@ inputs_before_decode_ = 0; - RETURN_AND_NOTIFY_ON_FAILURE(ProcessOutputSample(output_sample, color_space), - "Failed to process output sample.", - PLATFORM_FAILURE, ); + RETURN_AND_NOTIFY_ON_FAILURE( + ProcessOutputSample(output_sample, visible_rect, color_space), + "Failed to process output sample.", PLATFORM_FAILURE, ); } bool DXVAVideoDecodeAccelerator::ProcessOutputSample( Microsoft::WRL::ComPtr<IMFSample> sample, + const gfx::Rect& visible_rect, const gfx::ColorSpace& color_space) { RETURN_ON_FAILURE(sample, "Decode succeeded with NULL output sample", false); @@ -1991,7 +2017,7 @@ base::AutoLock lock(decoder_lock_); DCHECK(pending_output_samples_.empty()); pending_output_samples_.push_back( - PendingSampleInfo(input_buffer_id, sample, color_space)); + PendingSampleInfo(input_buffer_id, sample, visible_rect, color_space)); } if (pictures_requested_) { @@ -2063,6 +2089,7 @@ pending_sample->picture_buffer_id = index->second->id(); index->second->set_bound(); + index->second->set_visible_rect(pending_sample->visible_rect); index->second->set_color_space(pending_sample->color_space); if (index->second->CanBindSamples()) { @@ -2249,14 +2276,13 @@ void DXVAVideoDecodeAccelerator::NotifyPictureReady( int picture_buffer_id, int input_buffer_id, + const gfx::Rect& visible_rect, const gfx::ColorSpace& color_space, bool allow_overlay) { DCHECK(main_thread_task_runner_->BelongsToCurrentThread()); // This task could execute after the decoder has been torn down. if (GetState() != kUninitialized && client_) { - // TODO(henryhsu): Use correct visible size instead of (0, 0). We can't use - // coded size here so use (0, 0) intentionally to have the client choose. - Picture picture(picture_buffer_id, input_buffer_id, gfx::Rect(0, 0), + Picture picture(picture_buffer_id, input_buffer_id, visible_rect, color_space, allow_overlay); client_->PictureReady(picture); } @@ -2335,10 +2361,7 @@ // Attempt to retrieve an output frame from the decoder. If we have one, // return and proceed when the output frame is processed. If we don't have a // frame then we are done. - VideoColorSpace color_space = config_.container_color_space; - if (config_change_detector_) - color_space = config_change_detector_->current_color_space(color_space); - DoDecode(color_space.ToGfxColorSpace()); + DoDecode(current_visible_rect_, current_color_space_.ToGfxColorSpace()); if (OutputSamplesPresent()) return; @@ -2387,9 +2410,14 @@ return; } + gfx::Rect visible_rect; VideoColorSpace color_space = config_.container_color_space; - if (config_change_detector_) + if (config_change_detector_) { + visible_rect = config_change_detector_->current_visible_rect(visible_rect); color_space = config_change_detector_->current_color_space(color_space); + } + current_visible_rect_ = visible_rect; + current_color_space_ = color_space; if (!inputs_before_decode_) { TRACE_EVENT_ASYNC_BEGIN0("gpu", "DXVAVideoDecodeAccelerator.Decoding", @@ -2407,7 +2435,7 @@ // process the input again. Failure in either of these steps is treated as a // decoder failure. if (hr == MF_E_NOTACCEPTING) { - DoDecode(color_space.ToGfxColorSpace()); + DoDecode(visible_rect, color_space.ToGfxColorSpace()); // If the DoDecode call resulted in an output frame then we should not // process any more input until that frame is copied to the target surface. if (!OutputSamplesPresent()) { @@ -2439,7 +2467,7 @@ RETURN_AND_NOTIFY_ON_HR_FAILURE(hr, "Failed to process input sample", PLATFORM_FAILURE, ); - DoDecode(color_space.ToGfxColorSpace()); + DoDecode(visible_rect, color_space.ToGfxColorSpace()); State state = GetState(); RETURN_AND_NOTIFY_ON_FAILURE( @@ -2673,9 +2701,9 @@ RETURN_AND_NOTIFY_ON_FAILURE(result, "Failed to complete copying surface", PLATFORM_FAILURE, ); - NotifyPictureReady(picture_buffer->id(), input_buffer_id, - picture_buffer->color_space(), - picture_buffer->AllowOverlay()); + NotifyPictureReady( + picture_buffer->id(), input_buffer_id, picture_buffer->visible_rect(), + picture_buffer->color_space(), picture_buffer->AllowOverlay()); { base::AutoLock lock(decoder_lock_); @@ -2727,9 +2755,9 @@ RETURN_AND_NOTIFY_ON_FAILURE(result, "Failed to complete copying surface", PLATFORM_FAILURE, ); - NotifyPictureReady(picture_buffer->id(), input_buffer_id, - picture_buffer->color_space(), - picture_buffer->AllowOverlay()); + NotifyPictureReady( + picture_buffer->id(), input_buffer_id, picture_buffer->visible_rect(), + picture_buffer->color_space(), picture_buffer->AllowOverlay()); { base::AutoLock lock(decoder_lock_);
diff --git a/media/gpu/windows/dxva_video_decode_accelerator_win.h b/media/gpu/windows/dxva_video_decode_accelerator_win.h index 4aa0068..0eeaadb4 100644 --- a/media/gpu/windows/dxva_video_decode_accelerator_win.h +++ b/media/gpu/windows/dxva_video_decode_accelerator_win.h
@@ -36,6 +36,7 @@ #include "media/gpu/media_gpu_export.h" #include "media/video/video_decode_accelerator.h" #include "ui/gfx/color_space.h" +#include "ui/gfx/geometry/rect.h" interface IMFSample; interface IDirect3DSurface9; @@ -64,6 +65,8 @@ public: virtual ~ConfigChangeDetector(); virtual bool DetectConfig(const uint8_t* stream, unsigned int size) = 0; + virtual gfx::Rect current_visible_rect( + const gfx::Rect& container_visible_rect) const = 0; virtual VideoColorSpace current_color_space( const VideoColorSpace& container_color_space) const = 0; bool config_changed() const { return config_changed_; } @@ -194,12 +197,14 @@ // The bulk of the decoding happens here. This function handles errors, // format changes and processes decoded output. - void DoDecode(const gfx::ColorSpace& color_space); + void DoDecode(const gfx::Rect& visible_rect, + const gfx::ColorSpace& color_space); // Invoked when we have a valid decoded output sample. Retrieves the D3D // surface and maintains a copy of it which is passed eventually to the // client when we have a picture buffer to copy the surface contents to. bool ProcessOutputSample(Microsoft::WRL::ComPtr<IMFSample> sample, + const gfx::Rect& visible_rect, const gfx::ColorSpace& color_space); // Processes pending output samples by copying them to available picture @@ -232,6 +237,7 @@ // Notifies the client about the availability of a picture. void NotifyPictureReady(int picture_buffer_id, int input_buffer_id, + const gfx::Rect& visible_rect, const gfx::ColorSpace& color_space, bool allow_overlay); @@ -427,6 +433,7 @@ struct PendingSampleInfo { PendingSampleInfo(int32_t buffer_id, Microsoft::WRL::ComPtr<IMFSample> sample, + const gfx::Rect& visible_rect, const gfx::ColorSpace& color_space); PendingSampleInfo(const PendingSampleInfo& other); ~PendingSampleInfo(); @@ -437,6 +444,8 @@ // Defaults to -1. int picture_buffer_id; + gfx::Rect visible_rect; + // The color space of this picture. gfx::ColorSpace color_space; @@ -569,6 +578,11 @@ // Set to true if we are processing a video configuration change. bool processing_config_changed_; + // Contain the visible rect and color space of frames that are currently being + // fed into the decoder. These may change at a config change. + gfx::Rect current_visible_rect_; + VideoColorSpace current_color_space_; + // WeakPtrFactory for posting tasks back to |this|. base::WeakPtrFactory<DXVAVideoDecodeAccelerator> weak_this_factory_;
diff --git a/mojo/public/tools/bindings/mojom.gni b/mojo/public/tools/bindings/mojom.gni index 3329631..fa17798 100644 --- a/mojo/public/tools/bindings/mojom.gni +++ b/mojo/public/tools/bindings/mojom.gni
@@ -593,6 +593,7 @@ ] generator_shared_target_name = "${target_name}_shared__generator" action(generator_shared_target_name) { + visibility = [ ":*" ] script = mojom_generator_script inputs = mojom_generator_sources + jinja2_sources sources = invoker.sources @@ -780,6 +781,7 @@ generator_target_name = "${target_name}${variant_suffix}__generator" action(generator_target_name) { + visibility = [ ":*" ] script = mojom_generator_script inputs = mojom_generator_sources + jinja2_sources sources = invoker.sources @@ -925,6 +927,21 @@ } } + group("${target_name}${variant_suffix}_headers") { + public_deps = [] + if (enabled_sources != []) { + public_deps += [ + ":$generator_cpp_message_ids_target_name", + ":$generator_shared_target_name", + ":$generator_target_name", + ] + } + foreach(d, all_deps) { + full_name = get_label_info("$d", "label_no_toolchain") + public_deps += [ "${full_name}${variant_suffix}_headers" ] + } + } + if (defined(invoker.component_macro_prefix)) { output_target_type = "component" } else { @@ -958,8 +975,7 @@ deps = [ ":$generator_cpp_message_ids_target_name", "//mojo/public/cpp/bindings:struct_traits", - "//mojo/public/interfaces/bindings:bindings__generator", - "//mojo/public/interfaces/bindings:bindings_shared__generator", + "//mojo/public/interfaces/bindings:bindings_headers", ] public_deps = [ ":$shared_cpp_library_target_name",
diff --git a/net/BUILD.gn b/net/BUILD.gn index be36d39..2ff04a5 100644 --- a/net/BUILD.gn +++ b/net/BUILD.gn
@@ -625,6 +625,8 @@ "cookies/cookie_monster.h", "cookies/cookie_monster_change_dispatcher.cc", "cookies/cookie_monster_change_dispatcher.h", + "cookies/cookie_monster_netlog_params.cc", + "cookies/cookie_monster_netlog_params.h", "cookies/cookie_options.cc", "cookies/cookie_options.h", "cookies/cookie_store.cc", @@ -5261,7 +5263,6 @@ "//third_party/pyftpdlib/", "//third_party/pywebsocket/src/mod_pywebsocket/", "//third_party/tlslite/", - "$root_out_dir/pyproto/google/", ] }
diff --git a/net/cert/nss_cert_database.cc b/net/cert/nss_cert_database.cc index 90c632fb0..ef6d740 100644 --- a/net/cert/nss_cert_database.cc +++ b/net/cert/nss_cert_database.cc
@@ -133,7 +133,7 @@ PK11_GetAllTokens(CKM_INVALID_MECHANISM, need_rw ? PR_TRUE : PR_FALSE, // needRW PR_TRUE, // loadCerts (unused) - NULL)); // wincx + nullptr)); // wincx if (!slot_list) { LOG(ERROR) << "PK11_GetAllTokens failed: " << PORT_GetError(); return; @@ -386,6 +386,9 @@ return slot && PK11_IsHW(slot); } +void NSSCertDatabase::LogUserCertificates(const std::string& log_reason) const { +} + void NSSCertDatabase::AddObserver(Observer* observer) { observer_list_->AddObserver(observer); } @@ -404,11 +407,11 @@ base::ScopedBlockingCall scoped_blocking_call(base::BlockingType::MAY_BLOCK); ScopedCERTCertificateList certs; - CERTCertList* cert_list = NULL; + CERTCertList* cert_list = nullptr; if (slot) cert_list = PK11_ListCertsInSlot(slot.get()); else - cert_list = PK11_ListCerts(PK11CertListUnique, NULL); + cert_list = PK11_ListCerts(PK11CertListUnique, nullptr); CERTCertListNode* node; for (node = CERT_LIST_HEAD(cert_list); !CERT_LIST_END(node, cert_list); @@ -428,10 +431,25 @@ } void NSSCertDatabase::NotifyObserversCertDBChanged() { + LogUserCertificates("DBChanged"); + observer_list_->Notify(FROM_HERE, &Observer::OnCertDBChanged); } // static +std::string NSSCertDatabase::GetCertIssuerCommonName( + const CERTCertificate* cert) { + char* nss_issuer_name = CERT_GetCommonName(&cert->issuer); + if (!nss_issuer_name) + return std::string(); + + std::string issuer_name = nss_issuer_name; + PORT_Free(nss_issuer_name); + + return issuer_name; +} + +// static bool NSSCertDatabase::DeleteCertAndKeyImpl(CERTCertificate* cert) { // This method may acquire the NSS lock or reenter this code via extension // hooks (such as smart card UI). To ensure threads are not starved or @@ -439,14 +457,22 @@ // capacity if this method takes too much time to run. base::ScopedBlockingCall scoped_blocking_call(base::BlockingType::MAY_BLOCK); +#if defined(OS_CHROMEOS) + // TODO(https://crbug.com/844537): Remove this after we've collected logs that + // show device-wide certificates disappearing. + std::string issuer_name = GetCertIssuerCommonName(cert); + VLOG(0) << "UserCertLogging: Deleting a certificate with issuer_name=" + << issuer_name; +#endif // defined(OS_CHROMEOS) + // For some reason, PK11_DeleteTokenCertAndKey only calls // SEC_DeletePermCertificate if the private key is found. So, we check // whether a private key exists before deciding which function to call to // delete the cert. - SECKEYPrivateKey* privKey = PK11_FindKeyByAnyCert(cert, NULL); + SECKEYPrivateKey* privKey = PK11_FindKeyByAnyCert(cert, nullptr); if (privKey) { SECKEY_DestroyPrivateKey(privKey); - if (PK11_DeleteTokenCertAndKey(cert, NULL)) { + if (PK11_DeleteTokenCertAndKey(cert, nullptr)) { LOG(ERROR) << "PK11_DeleteTokenCertAndKey failed: " << PORT_GetError(); return false; }
diff --git a/net/cert/nss_cert_database.h b/net/cert/nss_cert_database.h index a146f9ae..d2baedd 100644 --- a/net/cert/nss_cert_database.h +++ b/net/cert/nss_cert_database.h
@@ -232,6 +232,13 @@ // Check whether cert is stored in a hardware slot. bool IsHardwareBacked(const CERTCertificate* cert) const; + // TODO(https://crbug.com/844537): Remove this after we've collected logs that + // show device-wide certificates disappearing. Does nothing in the default + // implementation, but can be used in subclasses for logging user + // certificates. Will be called when the DB has changed. |log_reason| says why + // this has been invoked. + virtual void LogUserCertificates(const std::string& log_reason) const; + protected: // Certificate listing implementation used by |ListCerts*| and // |ListCertsSync|. Static so it may safely be used on the worker thread. @@ -239,10 +246,13 @@ // |slot|. static ScopedCERTCertificateList ListCertsImpl(crypto::ScopedPK11Slot slot); - protected: // Broadcasts notifications to all registered observers. void NotifyObserversCertDBChanged(); + // TODO(https://crbug.com/844537): Remove this after we've collected logs that + // show device-wide certificates disappearing. + static std::string GetCertIssuerCommonName(const CERTCertificate* cert); + private: // Registers |observer| to receive notifications of certificate changes. The // thread on which this is called is the thread on which |observer| will be
diff --git a/net/cert/nss_cert_database_chromeos.cc b/net/cert/nss_cert_database_chromeos.cc index 8f29d9f..b35d1f66 100644 --- a/net/cert/nss_cert_database_chromeos.cc +++ b/net/cert/nss_cert_database_chromeos.cc
@@ -5,6 +5,7 @@ #include "net/cert/nss_cert_database_chromeos.h" #include <cert.h> +#include <certdb.h> #include <pk11pub.h> #include <algorithm> @@ -15,7 +16,9 @@ #include "base/callback.h" #include "base/location.h" #include "base/stl_util.h" +#include "base/strings/string_number_conversions.h" #include "base/task/post_task.h" +#include "base/task/task_scheduler/task_scheduler.h" #include "base/threading/scoped_blocking_call.h" namespace net { @@ -40,11 +43,13 @@ } ScopedCERTCertificateList NSSCertDatabaseChromeOS::ListCertsSync() { + LogUserCertificates("ListCertsSync"); return ListCertsImpl(profile_filter_); } void NSSCertDatabaseChromeOS::ListCerts( const NSSCertDatabase::ListCertsCallback& callback) { + LogUserCertificates("ListCerts"); base::PostTaskWithTraitsAndReplyWithResult( FROM_HERE, {base::MayBlock(), base::TaskShutdownBehavior::CONTINUE_ON_SHUTDOWN}, @@ -58,6 +63,21 @@ return crypto::ScopedPK11Slot(); } +void NSSCertDatabaseChromeOS::LogUserCertificates( + const std::string& log_reason) const { + // Unit tests may not have a TaskScheduler instance. + if (!base::TaskScheduler::GetInstance()) + return; + + crypto::ScopedPK11Slot system_slot(GetSystemSlot()); + + base::PostTaskWithTraits( + FROM_HERE, + {base::MayBlock(), base::TaskShutdownBehavior::CONTINUE_ON_SHUTDOWN}, + base::BindOnce(&NSSCertDatabaseChromeOS::LogUserCertificatesImpl, + log_reason, base::Passed(&system_slot))); +} + void NSSCertDatabaseChromeOS::ListModules( std::vector<crypto::ScopedPK11Slot>* modules, bool need_rw) const { @@ -91,4 +111,72 @@ return certs; } +// static +void NSSCertDatabaseChromeOS::LogUserCertificatesImpl( + const std::string& log_reason, + crypto::ScopedPK11Slot system_slot) { + // See ListCertsImpl for details on why we use |MAY_BLOCK|. + base::ScopedBlockingCall scoped_blocking_call(base::BlockingType::MAY_BLOCK); + + bool system_slot_present = system_slot != nullptr; + VLOG(0) << "UserCertLogging: Invoked with log_reason=" << log_reason + << ", system_slot_present=" << system_slot_present; + + CERTCertList* cert_list = PK11_ListCerts(PK11CertListUnique, nullptr); + CERTCertListNode* node; + for (node = CERT_LIST_HEAD(cert_list); !CERT_LIST_END(node, cert_list); + node = CERT_LIST_NEXT(node)) { + CERTCertificate* cert = node->cert; + + // Skip if the certificate is not a user certificate, or if this can't be + // determined. + CERTCertTrust nss_trust; + SECStatus rv = CERT_GetCertTrust(cert, &nss_trust); + if (rv != SECSuccess) { + LOG(ERROR) << "CERT_GetCertTrust failed with error " << PORT_GetError(); + continue; + } + unsigned int all_flags = nss_trust.sslFlags | nss_trust.emailFlags | + nss_trust.objectSigningFlags; + // This logic is from |mozilla_security_manager::GetCertType|. + bool is_user_cert = cert->nickname && (all_flags & CERTDB_USER); + if (!is_user_cert) + continue; + + // Get names from the certificate. Only log issuer CommonName for now. + std::string issuer_name = GetCertIssuerCommonName(cert); + + // Get information about the slot the certificate is on. + PK11SlotInfo* slot = cert->slot; + bool is_hardware_backed = slot && PK11_IsHW(slot); + bool is_on_system_slot = slot == system_slot.get(); + int cert_slot_id = static_cast<int>(PK11_GetSlotID(slot)); + + // Get information about the corresponding private key: the slot id it is on + // and the pkcs11 object ID. + int key_slot_id = -1; + std::string key_pkcs11_id; + SECKEYPrivateKey* private_key = + PK11_FindKeyByAnyCert(cert, nullptr /* wincx */); + if (private_key) { + key_slot_id = static_cast<int>(PK11_GetSlotID(private_key->pkcs11Slot)); + // Get the CKA_ID attribute for a key. + SECItem* sec_item = PK11_GetLowLevelKeyIDForPrivateKey(private_key); + if (sec_item) { + key_pkcs11_id = base::HexEncode(sec_item->data, sec_item->len); + SECITEM_FreeItem(sec_item, PR_TRUE); + } + SECKEY_DestroyPrivateKey(private_key); + } + + VLOG(0) << "UserCertLogging: Cert with issuer=" << issuer_name + << ", cert_slot_id=" << cert_slot_id + << ", is_hw_backed=" << is_hardware_backed + << ", is_on_system_slot=" << is_on_system_slot + << ", key_slot_id=" << key_slot_id + << ", key_pkcs11_id=" << key_pkcs11_id; + } + CERT_DestroyCertList(cert_list); +} + } // namespace net
diff --git a/net/cert/nss_cert_database_chromeos.h b/net/cert/nss_cert_database_chromeos.h index adc28be..205df05 100644 --- a/net/cert/nss_cert_database_chromeos.h +++ b/net/cert/nss_cert_database_chromeos.h
@@ -36,6 +36,11 @@ // in multiple slots. // TODO(mattm): handle trust setting correctly for certs in read-only slots. + // TODO(https://crbug.com/844537): Remove this after we've collected logs that + // show device-wide certificates disappearing. Logs basic information about + // known user certificates. + void LogUserCertificates(const std::string& log_reason) const override; + private: // Certificate listing implementation used by |ListCerts| and |ListCertsSync|. // The certificate list normally returned by NSSCertDatabase::ListCertsImpl @@ -44,6 +49,11 @@ static ScopedCERTCertificateList ListCertsImpl( const NSSProfileFilterChromeOS& profile_filter); + // TODO(https://crbug.com/844537): Remove this after we've collected logs that + // show device-wide certificates disappearing. + static void LogUserCertificatesImpl(const std::string& log_reason, + crypto::ScopedPK11Slot system_slot); + NSSProfileFilterChromeOS profile_filter_; crypto::ScopedPK11Slot system_slot_;
diff --git a/net/cert/nss_cert_database_chromeos_unittest.cc b/net/cert/nss_cert_database_chromeos_unittest.cc index f0a748b..f7739ec 100644 --- a/net/cert/nss_cert_database_chromeos_unittest.cc +++ b/net/cert/nss_cert_database_chromeos_unittest.cc
@@ -286,6 +286,20 @@ EXPECT_TRUE(IsCertInCertificateList(cert_2.get(), certs)); } +// TODO(https://crbug.com/844537): Remove this after we've collected logs that +// show device-wide certificates disappearing. +TEST_F(NSSCertDatabaseChromeOSTest, LogUserCerts) { + scoped_refptr<X509Certificate> cert_1(ImportClientCertAndKeyFromFile( + GetTestCertsDirectory(), "client_1.pem", "client_1.pk8", + db_1_->GetPublicSlot().get())); + + scoped_refptr<X509Certificate> cert_2(ImportClientCertAndKeyFromFile( + GetTestCertsDirectory(), "client_2.pem", "client_2.pk8", + db_1_->GetSystemSlot().get())); + db_1_->LogUserCertificates("UnitTest"); + RunUntilIdle(); +} + TEST_F(NSSCertDatabaseChromeOSTest, ListCertsDoesNotCrossReadSystemSlot) { scoped_refptr<X509Certificate> cert_1( ImportClientCertAndKeyFromFile(GetTestCertsDirectory(),
diff --git a/net/cookies/cookie_change_dispatcher.cc b/net/cookies/cookie_change_dispatcher.cc index 4bb4e5f..c6cdf324 100644 --- a/net/cookies/cookie_change_dispatcher.cc +++ b/net/cookies/cookie_change_dispatcher.cc
@@ -6,6 +6,34 @@ namespace net { +const char* CookieChangeCauseToString(CookieChangeCause cause) { + const char* cause_string = "INVALID"; + switch (cause) { + case CookieChangeCause::INSERTED: + cause_string = "inserted"; + break; + case CookieChangeCause::EXPLICIT: + cause_string = "explicit"; + break; + case CookieChangeCause::UNKNOWN_DELETION: + cause_string = "unknown"; + break; + case CookieChangeCause::OVERWRITE: + cause_string = "overwrite"; + break; + case CookieChangeCause::EXPIRED: + cause_string = "expired"; + break; + case CookieChangeCause::EVICTED: + cause_string = "evicted"; + break; + case CookieChangeCause::EXPIRED_OVERWRITE: + cause_string = "expired_overwrite"; + break; + } + return cause_string; +} + bool CookieChangeCauseIsDeletion(CookieChangeCause cause) { return cause != CookieChangeCause::INSERTED; }
diff --git a/net/cookies/cookie_change_dispatcher.h b/net/cookies/cookie_change_dispatcher.h index 8b48c04..c05a6db5 100644 --- a/net/cookies/cookie_change_dispatcher.h +++ b/net/cookies/cookie_change_dispatcher.h
@@ -38,9 +38,12 @@ EXPIRED_OVERWRITE }; +// Return a string corresponding to the change cause. For debugging/logging. +NET_EXPORT const char* CookieChangeCauseToString(CookieChangeCause cause); + // Returns whether |cause| is one that could be a reason for deleting a cookie. // This function assumes that ChangeCause::EXPLICIT is a reason for deletion. -bool NET_EXPORT CookieChangeCauseIsDeletion(CookieChangeCause cause); +NET_EXPORT bool CookieChangeCauseIsDeletion(CookieChangeCause cause); // Called when a cookie is changed in a CookieStore. //
diff --git a/net/cookies/cookie_constants.cc b/net/cookies/cookie_constants.cc index b618261..14140d3 100644 --- a/net/cookies/cookie_constants.cc +++ b/net/cookies/cookie_constants.cc
@@ -17,6 +17,7 @@ const char kSameSiteLax[] = "lax"; const char kSameSiteStrict[] = "strict"; +const char kSameSiteDefault[] = "default"; } // namespace @@ -47,6 +48,18 @@ return COOKIE_PRIORITY_DEFAULT; } +std::string CookieSameSiteToString(CookieSameSite same_site) { + switch (same_site) { + case CookieSameSite::LAX_MODE: + return kSameSiteLax; + case CookieSameSite::STRICT_MODE: + return kSameSiteStrict; + case CookieSameSite::DEFAULT_MODE: + return kSameSiteDefault; + } + return "INVALID"; +} + CookieSameSite StringToCookieSameSite(const std::string& same_site) { if (base::EqualsCaseInsensitiveASCII(same_site, kSameSiteLax)) return CookieSameSite::LAX_MODE;
diff --git a/net/cookies/cookie_constants.h b/net/cookies/cookie_constants.h index 3f5b3cf..d4f82af 100644 --- a/net/cookies/cookie_constants.h +++ b/net/cookies/cookie_constants.h
@@ -37,6 +37,10 @@ // Defaults to COOKIE_PRIORITY_DEFAULT for empty or unrecognized strings. NET_EXPORT CookiePriority StringToCookiePriority(const std::string& priority); +// Returns a string corresponding to the value of the |same_site| token. +// Intended only for debugging/logging. +NET_EXPORT std::string CookieSameSiteToString(CookieSameSite same_site); + // Converts the Set-Cookie header SameSite token |same_site| to a // CookieSameSite. Defaults to CookieSameSite::DEFAULT_MODE for empty or // unrecognized strings.
diff --git a/net/cookies/cookie_monster.cc b/net/cookies/cookie_monster.cc index 3f70956..c2e03b2 100644 --- a/net/cookies/cookie_monster.cc +++ b/net/cookies/cookie_monster.cc
@@ -67,8 +67,10 @@ #include "net/base/registry_controlled_domains/registry_controlled_domain.h" #include "net/cookies/canonical_cookie.h" #include "net/cookies/cookie_monster_change_dispatcher.h" +#include "net/cookies/cookie_monster_netlog_params.h" #include "net/cookies/cookie_util.h" #include "net/cookies/parsed_cookie.h" +#include "net/log/net_log.h" #include "net/ssl/channel_id_service.h" #include "url/origin.h" @@ -372,6 +374,9 @@ started_fetching_all_cookies_(false), finished_fetching_all_cookies_(false), seen_global_task_(false), + // TODO(https://crbug.com/801910): Hook up Cookies logging by using a + // non-null NetLog. + net_log_(NetLogWithSource::Make(nullptr, NetLogSourceType::COOKIE_STORE)), store_(std::move(store)), last_access_threshold_(last_access_threshold), channel_id_service_(channel_id_service), @@ -393,6 +398,10 @@ base::Bind(&ChannelIDStore::Flush, base::Unretained(channel_id_service_->GetChannelIDStore()))); } + net_log_.BeginEvent( + NetLogEventType::COOKIE_STORE_ALIVE, + base::BindRepeating(&NetLogCookieMonsterConstructorCallback, + store != nullptr, channel_id_service != nullptr)); } // Asynchronous CookieMonster API @@ -551,6 +560,9 @@ void CookieMonster::SetPersistSessionCookies(bool persist_session_cookies) { DCHECK(thread_checker_.CalledOnValidThread()); DCHECK(!initialized_); + net_log_.AddEvent( + NetLogEventType::COOKIE_STORE_SESSION_PERSISTENCE, + NetLog::BoolCallback("persistence", persist_session_cookies)); persist_session_cookies_ = persist_session_cookies; } @@ -615,6 +627,7 @@ InternalDeleteCookie(current_cookie_it, false /* sync_to_store */, DELETE_COOKIE_DONT_RECORD); } + net_log_.EndEvent(NetLogEventType::COOKIE_STORE_ALIVE); } void CookieMonster::GetAllCookies(GetCookieListCallback callback) { @@ -1142,6 +1155,10 @@ skipped_secure_cookie = true; histogram_cookie_delete_equivalent_->Add( COOKIE_DELETE_EQUIVALENT_SKIPPING_SECURE); + net_log_.AddEvent( + NetLogEventType::COOKIE_STORE_COOKIE_REJECTED_SECURE, + base::BindRepeating(&NetLogCookieMonsterCookieRejectedSecure, cc, + &ecc)); // If the cookie is equivalent to the new cookie and wouldn't have been // skipped for being HTTP-only, record that it is a skipped secure cookie // that would have been deleted otherwise. @@ -1162,6 +1179,10 @@ << "Duplicate equivalent cookies found, cookie store is corrupted."; if (skip_httponly && cc->IsHttpOnly()) { skipped_httponly = true; + net_log_.AddEvent( + NetLogEventType::COOKIE_STORE_COOKIE_REJECTED_HTTPONLY, + base::BindRepeating(&NetLogCookieMonsterCookieRejectedHttponly, cc, + &ecc)); } else { histogram_cookie_delete_equivalent_->Add( COOKIE_DELETE_EQUIVALENT_FOUND); @@ -1187,6 +1208,9 @@ DCHECK(thread_checker_.CalledOnValidThread()); CanonicalCookie* cc_ptr = cc.get(); + net_log_.AddEvent(NetLogEventType::COOKIE_STORE_COOKIE_ADDED, + base::BindRepeating(&NetLogCookieMonsterCookieAdded, + cc.get(), sync_to_store)); if ((cc_ptr->IsPersistent() || persist_session_cookies_) && store_.get() && sync_to_store) store_->AddCookie(*cc_ptr); @@ -1362,10 +1386,16 @@ << "InternalDeleteCookie()" << ", cause:" << deletion_cause << ", cc: " << cc->DebugString(); + ChangeCausePair mapping = kChangeCauseMapping[deletion_cause]; + if (deletion_cause != DELETE_COOKIE_DONT_RECORD) { + net_log_.AddEvent(NetLogEventType::COOKIE_STORE_COOKIE_DELETED, + base::BindRepeating(&NetLogCookieMonsterCookieDeleted, cc, + mapping.cause, sync_to_store)); + } + if ((cc->IsPersistent() || persist_session_cookies_) && store_.get() && sync_to_store) store_->DeleteCookie(*cc); - ChangeCausePair mapping = kChangeCauseMapping[deletion_cause]; change_dispatcher_.DispatchChange(*cc, mapping.cause, mapping.notify); cookies_.erase(it); }
diff --git a/net/cookies/cookie_monster.h b/net/cookies/cookie_monster.h index 11a4ff17..a251ed74 100644 --- a/net/cookies/cookie_monster.h +++ b/net/cookies/cookie_monster.h
@@ -31,6 +31,7 @@ #include "net/cookies/cookie_constants.h" #include "net/cookies/cookie_monster_change_dispatcher.h" #include "net/cookies/cookie_store.h" +#include "net/log/net_log_with_source.h" #include "url/gurl.h" namespace base { @@ -617,6 +618,8 @@ // for typical use. bool seen_global_task_; + NetLogWithSource net_log_; + scoped_refptr<PersistentCookieStore> store_; base::Time last_time_seen_;
diff --git a/net/cookies/cookie_monster_netlog_params.cc b/net/cookies/cookie_monster_netlog_params.cc new file mode 100644 index 0000000..e4f358c2 --- /dev/null +++ b/net/cookies/cookie_monster_netlog_params.cc
@@ -0,0 +1,100 @@ +// 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 "net/cookies/cookie_monster_netlog_params.h" + +#include "net/cookies/cookie_constants.h" +#include "net/cookies/cookie_store.h" + +namespace net { + +std::unique_ptr<base::Value> NetLogCookieMonsterConstructorCallback( + bool persistent_store, + bool channel_id_service, + NetLogCaptureMode /* capture_mode */) { + std::unique_ptr<base::Value> dict = + std::make_unique<base::Value>(base::Value::Type::DICTIONARY); + dict->SetKey("persistent_store", base::Value(persistent_store)); + dict->SetKey("channel_id_service", base::Value(channel_id_service)); + return dict; +} + +std::unique_ptr<base::Value> NetLogCookieMonsterCookieAdded( + const CanonicalCookie* cookie, + bool sync_requested, + NetLogCaptureMode capture_mode) { + if (!capture_mode.include_cookies_and_credentials()) + return nullptr; + + std::unique_ptr<base::Value> dict = + std::make_unique<base::Value>(base::Value::Type::DICTIONARY); + dict->SetKey("name", base::Value(cookie->Name())); + dict->SetKey("value", base::Value(cookie->Value())); + dict->SetKey("domain", base::Value(cookie->Domain())); + dict->SetKey("path", base::Value(cookie->Path())); + dict->SetKey("httponly", base::Value(cookie->IsHttpOnly())); + dict->SetKey("secure", base::Value(cookie->IsSecure())); + dict->SetKey("priority", + base::Value(CookiePriorityToString(cookie->Priority()))); + dict->SetKey("same_site", + base::Value(CookieSameSiteToString(cookie->SameSite()))); + dict->SetKey("is_persistent", base::Value(cookie->IsPersistent())); + dict->SetKey("sync_requested", base::Value(sync_requested)); + return dict; +} + +std::unique_ptr<base::Value> NetLogCookieMonsterCookieDeleted( + const CanonicalCookie* cookie, + CookieChangeCause cause, + bool sync_requested, + NetLogCaptureMode capture_mode) { + if (!capture_mode.include_cookies_and_credentials()) + return nullptr; + + std::unique_ptr<base::Value> dict = + std::make_unique<base::Value>(base::Value::Type::DICTIONARY); + dict->SetKey("name", base::Value(cookie->Name())); + dict->SetKey("value", base::Value(cookie->Value())); + dict->SetKey("domain", base::Value(cookie->Domain())); + dict->SetKey("path", base::Value(cookie->Path())); + dict->SetKey("is_persistent", base::Value(cookie->IsPersistent())); + dict->SetKey("deletion_cause", base::Value(CookieChangeCauseToString(cause))); + dict->SetKey("sync_requested", base::Value(sync_requested)); + return dict; +} + +std::unique_ptr<base::Value> NetLogCookieMonsterCookieRejectedSecure( + const CanonicalCookie* old_cookie, + const CanonicalCookie* new_cookie, + NetLogCaptureMode capture_mode) { + if (!capture_mode.include_cookies_and_credentials()) + return nullptr; + std::unique_ptr<base::Value> dict = + std::make_unique<base::Value>(base::Value::Type::DICTIONARY); + dict->SetKey("name", base::Value(old_cookie->Name())); + dict->SetKey("domain", base::Value(old_cookie->Domain())); + dict->SetKey("oldpath", base::Value(old_cookie->Path())); + dict->SetKey("newpath", base::Value(new_cookie->Path())); + dict->SetKey("oldvalue", base::Value(old_cookie->Value())); + dict->SetKey("newvalue", base::Value(new_cookie->Value())); + return dict; +} + +std::unique_ptr<base::Value> NetLogCookieMonsterCookieRejectedHttponly( + const CanonicalCookie* old_cookie, + const CanonicalCookie* new_cookie, + NetLogCaptureMode capture_mode) { + if (!capture_mode.include_cookies_and_credentials()) + return nullptr; + std::unique_ptr<base::Value> dict = + std::make_unique<base::Value>(base::Value::Type::DICTIONARY); + dict->SetKey("name", base::Value(old_cookie->Name())); + dict->SetKey("domain", base::Value(old_cookie->Domain())); + dict->SetKey("path", base::Value(old_cookie->Path())); + dict->SetKey("oldvalue", base::Value(old_cookie->Value())); + dict->SetKey("newvalue", base::Value(new_cookie->Value())); + return dict; +} + +} // namespace net
diff --git a/net/cookies/cookie_monster_netlog_params.h b/net/cookies/cookie_monster_netlog_params.h new file mode 100644 index 0000000..fa8b0571 --- /dev/null +++ b/net/cookies/cookie_monster_netlog_params.h
@@ -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. + +#ifndef NET_COOKIES_COOKIE_MONSTER_NETLOG_PARAMS_H_ +#define NET_COOKIES_COOKIE_MONSTER_NETLOG_PARAMS_H_ + +#include <memory> + +#include "base/values.h" +#include "net/cookies/canonical_cookie.h" +#include "net/cookies/cookie_change_dispatcher.h" +#include "net/cookies/cookie_monster.h" +#include "net/cookies/cookie_store.h" +#include "net/log/net_log_capture_mode.h" + +namespace net { + +// Returns a Value containing NetLog parameters for constructing +// a CookieMonster. +std::unique_ptr<base::Value> NetLogCookieMonsterConstructorCallback( + bool persistent_store, + bool channel_id_service, + NetLogCaptureMode capture_mode); + +// Returns a Value containing NetLog parameters for adding a cookie. +std::unique_ptr<base::Value> NetLogCookieMonsterCookieAdded( + const CanonicalCookie* cookie, + bool sync_requested, + NetLogCaptureMode capture_mode); + +// Returns a Value containing NetLog parameters for deleting a cookie. +std::unique_ptr<base::Value> NetLogCookieMonsterCookieDeleted( + const CanonicalCookie* cookie, + CookieChangeCause cause, + bool sync_requested, + NetLogCaptureMode capture_mode); + +// Returns a Value containing NetLog parameters for when a cookie addition +// is rejected because of a conflict with a secure cookie. +std::unique_ptr<base::Value> NetLogCookieMonsterCookieRejectedSecure( + const CanonicalCookie* old_cookie, + const CanonicalCookie* new_cookie, + NetLogCaptureMode capture_mode); + +// Returns a Value containing NetLog parameters for when a cookie addition +// is rejected because of a conflict with an httponly cookie. +std::unique_ptr<base::Value> NetLogCookieMonsterCookieRejectedHttponly( + const CanonicalCookie* old_cookie, + const CanonicalCookie* new_cookie, + NetLogCaptureMode capture_mode); + +} // namespace net + +#endif // NET_COOKIES_COOKIE_MONSTER_NETLOG_PARAMS_H_
diff --git a/net/dns/notify_watcher_mac.cc b/net/dns/notify_watcher_mac.cc index 09fae02..d456e3ff 100644 --- a/net/dns/notify_watcher_mac.cc +++ b/net/dns/notify_watcher_mac.cc
@@ -7,13 +7,38 @@ #include <notify.h> #include "base/logging.h" +#include "base/mac/mac_util.h" #include "base/message_loop/message_loop_current.h" #include "base/posix/eintr_wrapper.h" namespace net { +namespace { + +// Registers a dummy file descriptor to workaround a bug in libnotify +// in macOS 10.12 +// See https://bugs.chromium.org/p/chromium/issues/detail?id=783148. +class NotifyFileDescriptorsGlobalsHolder { + public: + NotifyFileDescriptorsGlobalsHolder() { + int notify_fd = -1; + int notify_token = -1; + notify_register_file_descriptor("notify_file_descriptor_holder", ¬ify_fd, + 0, ¬ify_token); + } +}; + +void HoldNotifyFileDescriptorsGlobals() { + if (base::mac::IsAtMostOS10_12()) { + static NotifyFileDescriptorsGlobalsHolder holder; + } +} +} // namespace + NotifyWatcherMac::NotifyWatcherMac() - : notify_fd_(-1), notify_token_(-1), watcher_(FROM_HERE) {} + : notify_fd_(-1), notify_token_(-1), watcher_(FROM_HERE) { + HoldNotifyFileDescriptorsGlobals(); +} NotifyWatcherMac::~NotifyWatcherMac() { Cancel();
diff --git a/net/log/net_log_event_type_list.h b/net/log/net_log_event_type_list.h index c76a2d9..a6587a9 100644 --- a/net/log/net_log_event_type_list.h +++ b/net/log/net_log_event_type_list.h
@@ -3067,3 +3067,70 @@ // This event is emitted if the wait timer for remaining fetchers fires. It // has no parameters. EVENT_TYPE(WPAD_DHCP_WIN_ON_WAIT_TIMER) + +// ----------------------------------------------------------------------------- +// CookieStore related events +// ----------------------------------------------------------------------------- + +// Event emitted on store creation/deletion +// { +// "persistent_store": <Whether there is an attached persistent store>, +// "channel_id_services": <Whether there is an attached channel id service>, +// } +EVENT_TYPE(COOKIE_STORE_ALIVE) + +// Event emitted on cookie addition +// { +// "name": <Name of the cookie added> +// "value": <Value of the cookie added> +// "domain": <Domain of the cookie added> +// "path": <Path of the cookie added> +// "is_persistent": <Whether or not the cookie is persistent> +// "sync_requested": <Whether sync to the backing store was requested> +// } +EVENT_TYPE(COOKIE_STORE_COOKIE_ADDED) + +// Event emitted on cookie deletion +// { +// "name": <Name of the cookie added> +// "value": <Value of the cookie added> +// "domain": <Domain of the cookie added> +// "path": <Path of the cookie added> +// "deletion_cause": <Reason the cookie was deleted> +// "httponly": <httponly field of the cookie> +// "secure": <If the cookie is a secure cookie> +// "priority": <priority of the cookie> +// "samesite": <SameSite setting for the cookie> +// "is_persistent": <Whether or not the cookie is persistent> +// "sync_requested": <Whether sync to the backing store was requested> +// } +EVENT_TYPE(COOKIE_STORE_COOKIE_DELETED) + +// Event emitted on rejection of a cookie addition because of a conflict +// with a secure cookie that would have been deleted. +// { +// "name": <Name of the cookies> +// "domain": <Domain of the cookies> +// "oldpath": <Path of the cookie that would have been deleted> +// "newpath": <Path of the cookie that would have been added> +// "oldvalue": <Value of the cookie that would have been deleted> +// "newvalue": <Value of the cookie that would have been added> +// } +EVENT_TYPE(COOKIE_STORE_COOKIE_REJECTED_SECURE) + +// Event emitted on rejection of a cookie addition because of a conflict +// with an httponly cookie. +// { +// "name": <Name of the cookies> +// "domain": <Domain of the cookies> +// "path": <Path of the cookies> +// "oldvalue": <Value of the cookie that would have been deleted> +// "newvalue": <Value of the cookie that would have been added> +// } +EVENT_TYPE(COOKIE_STORE_COOKIE_REJECTED_HTTPONLY) + +// Event emitted on setting store session persistence +// { +// "persistence" : <Session persistence setting for the store> +// } +EVENT_TYPE(COOKIE_STORE_SESSION_PERSISTENCE)
diff --git a/net/log/net_log_source_type_list.h b/net/log/net_log_source_type_list.h index 0302d1ef..f3dd25b0 100644 --- a/net/log/net_log_source_type_list.h +++ b/net/log/net_log_source_type_list.h
@@ -41,3 +41,4 @@ SOURCE_TYPE(HTTP_SERVER_PROPERTIES) SOURCE_TYPE(HOST_CACHE_PERSISTENCE_MANAGER) SOURCE_TYPE(TRIAL_CERT_VERIFIER_JOB) +SOURCE_TYPE(COOKIE_STORE)
diff --git a/net/nqe/network_quality_estimator.cc b/net/nqe/network_quality_estimator.cc index 569238a..6fad39f 100644 --- a/net/nqe/network_quality_estimator.cc +++ b/net/nqe/network_quality_estimator.cc
@@ -216,6 +216,7 @@ std::unique_ptr<NetworkQualityEstimatorParams> params, NetLog* net_log) : params_(std::move(params)), + end_to_end_rtt_observation_count_at_last_ect_computation_(0), use_localhost_requests_(false), disable_offline_check_(false), tick_clock_(base::DefaultTickClock::GetInstance()), @@ -236,7 +237,6 @@ rtt_observations_size_at_last_ect_computation_(0), throughput_observations_size_at_last_ect_computation_(0), transport_rtt_observation_count_last_ect_computation_(0), - end_to_end_rtt_observation_count_at_last_ect_computation_(0), new_rtt_observations_since_last_ect_computation_(0), new_throughput_observations_since_last_ect_computation_(0), increase_in_transport_rtt_updater_posted_(false), @@ -371,6 +371,23 @@ base::TimeDelta observed_http_rtt) const { DCHECK(thread_checker_.CalledOnValidThread()); + // If there are sufficient number of end to end RTT samples available, use + // the end to end RTT estimate to determine if the request is hanging. + // If |observed_http_rtt| is within a fixed multiplier of |end_to_end_rtt_|, + // then |observed_http_rtt| is determined to be not a hanging-request RTT. + if (params_->use_end_to_end_rtt() && end_to_end_rtt_.has_value() && + end_to_end_rtt_observation_count_at_last_ect_computation_ >= + params_->http_rtt_transport_rtt_min_count() && + params_->hanging_request_http_rtt_upper_bound_transport_rtt_multiplier() > + 0 && + observed_http_rtt < + params_->hanging_request_http_rtt_upper_bound_transport_rtt_multiplier() * + end_to_end_rtt_.value()) { + UMA_HISTOGRAM_TIMES("NQE.RTT.NotAHangingRequest.EndToEndRTT", + observed_http_rtt); + return false; + } + if (transport_rtt_observation_count_last_ect_computation_ >= params_->http_rtt_transport_rtt_min_count() && (params_->hanging_request_http_rtt_upper_bound_transport_rtt_multiplier() <= @@ -1191,6 +1208,18 @@ } } + // Put lower bound on |http_rtt| using |end_to_end_rtt|. + if (params_->use_end_to_end_rtt() && + *end_to_end_rtt != nqe::internal::InvalidRTT() && + end_to_end_rtt_observation_count_at_last_ect_computation_ >= + params_->http_rtt_transport_rtt_min_count() && + params_->lower_bound_http_rtt_transport_rtt_multiplier() > 0) { + *http_rtt = + std::max(*http_rtt, + *end_to_end_rtt * + params_->lower_bound_http_rtt_transport_rtt_multiplier()); + } + if (!GetRecentDownlinkThroughputKbps(start_time, downstream_throughput_kbps)) *downstream_throughput_kbps = nqe::internal::INVALID_RTT_THROUGHPUT;
diff --git a/net/nqe/network_quality_estimator.h b/net/nqe/network_quality_estimator.h index 39f0f56..59f9a1a 100644 --- a/net/nqe/network_quality_estimator.h +++ b/net/nqe/network_quality_estimator.h
@@ -373,6 +373,9 @@ // Params to configure the network quality estimator. const std::unique_ptr<NetworkQualityEstimatorParams> params_; + // Number of end to end RTT samples available when the ECT was last computed. + size_t end_to_end_rtt_observation_count_at_last_ect_computation_; + private: FRIEND_TEST_ALL_PREFIXES(NetworkQualityEstimatorTest, AdaptiveRecomputationEffectiveConnectionType); @@ -602,7 +605,6 @@ // Number of transport RTT samples available when the ECT was last computed. size_t transport_rtt_observation_count_last_ect_computation_; - size_t end_to_end_rtt_observation_count_at_last_ect_computation_; // Number of RTT observations received since the effective connection type was // last computed.
diff --git a/net/nqe/network_quality_estimator_params.cc b/net/nqe/network_quality_estimator_params.cc index 9b3e1b4..8b50c89 100644 --- a/net/nqe/network_quality_estimator_params.cc +++ b/net/nqe/network_quality_estimator_params.cc
@@ -485,6 +485,10 @@ params_, "socket_watchers_min_notification_interval_msec", 200))), + use_end_to_end_rtt_( + GetStringValueForVariationParamWithDefaultValue(params_, + "use_end_to_end_rtt", + "false") == "true"), use_small_responses_(false) { DCHECK(hanging_request_http_rtt_upper_bound_transport_rtt_multiplier_ == -1 || hanging_request_http_rtt_upper_bound_transport_rtt_multiplier_ > 0);
diff --git a/net/nqe/network_quality_estimator_params.h b/net/nqe/network_quality_estimator_params.h index cd551c22..6add5a6 100644 --- a/net/nqe/network_quality_estimator_params.h +++ b/net/nqe/network_quality_estimator_params.h
@@ -214,6 +214,10 @@ return socket_watchers_min_notification_interval_; } + // Returns true if end-to-end RTT estimates can be used for computing network + // quality estimate. + bool use_end_to_end_rtt() const { return use_end_to_end_rtt_; } + // Sets the forced effective connection type as |type|. void SetForcedEffectiveConnectionTypeForTesting(EffectiveConnectionType type); @@ -243,6 +247,7 @@ const base::TimeDelta hanging_request_min_duration_; const bool add_default_platform_observations_; const base::TimeDelta socket_watchers_min_notification_interval_; + const bool use_end_to_end_rtt_; bool use_small_responses_;
diff --git a/net/nqe/network_quality_estimator_test_util.cc b/net/nqe/network_quality_estimator_test_util.cc index e3812139..dc3f79df 100644 --- a/net/nqe/network_quality_estimator_test_util.cc +++ b/net/nqe/network_quality_estimator_test_util.cc
@@ -196,6 +196,10 @@ } break; case nqe::internal::OBSERVATION_CATEGORY_END_TO_END: + if (start_time_null_end_to_end_rtt_) { + *rtt = start_time_null_end_to_end_rtt_.value(); + return true; + } break; case nqe::internal::OBSERVATION_CATEGORY_COUNT: NOTREACHED();
diff --git a/net/nqe/network_quality_estimator_test_util.h b/net/nqe/network_quality_estimator_test_util.h index 45b7507..21ec983 100644 --- a/net/nqe/network_quality_estimator_test_util.h +++ b/net/nqe/network_quality_estimator_test_util.h
@@ -176,6 +176,17 @@ rtt_estimate_internal_ = value; } + void set_start_time_null_end_to_end_rtt(const base::TimeDelta rtt) { + // Callers should not set effective connection type along with the + // lower-layer metrics. + DCHECK(!effective_connection_type_ && !recent_effective_connection_type_); + start_time_null_end_to_end_rtt_ = rtt; + } + + void set_start_time_null_end_to_end_rtt_observation_count(size_t count) { + end_to_end_rtt_observation_count_at_last_ect_computation_ = count; + } + void SetAccuracyRecordingIntervals( const std::vector<base::TimeDelta>& accuracy_recording_intervals); @@ -272,6 +283,9 @@ // If set, GetRTTEstimateInternal() would return the set value. base::Optional<base::TimeDelta> rtt_estimate_internal_; + // If set, GetRTTEstimateInternal() would return the set value. + base::Optional<base::TimeDelta> start_time_null_end_to_end_rtt_; + // If set, GetBandwidthDelayProductKbits() would return its set value. // Otherwise, the base implementation is called. base::Optional<int32_t> bandwidth_delay_product_kbits_;
diff --git a/net/nqe/network_quality_estimator_unittest.cc b/net/nqe/network_quality_estimator_unittest.cc index a230dfc..f3a41e6 100644 --- a/net/nqe/network_quality_estimator_unittest.cc +++ b/net/nqe/network_quality_estimator_unittest.cc
@@ -1414,6 +1414,73 @@ } } +// Tests that the end to end RTT is used for computing the lower bound for HTTP +// RTT. +TEST_F(NetworkQualityEstimatorTest, TestEndToEndRttUsedForHttpRttComputation) { + const struct { + base::TimeDelta http_rtt; + base::TimeDelta end_to_end_rtt; + bool is_end_to_end_rtt_sample_count_enough; + base::TimeDelta expected_http_rtt; + EffectiveConnectionType expected_type; + } tests[] = { + { + base::TimeDelta::FromMilliseconds(200), + base::TimeDelta::FromMilliseconds(100), true, + base::TimeDelta::FromMilliseconds(200), EFFECTIVE_CONNECTION_TYPE_4G, + }, + { + // |http_rtt| is lower than |end_to_end_rtt|. The HTTP RTT estimate + // should be set to |end_to_end_rtt|. + base::TimeDelta::FromMilliseconds(100), + base::TimeDelta::FromMilliseconds(200), true, + base::TimeDelta::FromMilliseconds(200), EFFECTIVE_CONNECTION_TYPE_4G, + }, + { + // Not enough samples. End to End RTT should not be used. + base::TimeDelta::FromMilliseconds(100), + base::TimeDelta::FromMilliseconds(200), false, + base::TimeDelta::FromMilliseconds(100), EFFECTIVE_CONNECTION_TYPE_4G, + }, + { + base::TimeDelta::FromMilliseconds(100), + base::TimeDelta::FromMilliseconds(4000), true, + base::TimeDelta::FromMilliseconds(4000), + EFFECTIVE_CONNECTION_TYPE_SLOW_2G, + }, + }; + + for (const auto& test : tests) { + std::map<std::string, std::string> variation_params; + variation_params["add_default_platform_observations"] = "false"; + variation_params["use_end_to_end_rtt"] = "true"; + TestNetworkQualityEstimator estimator(variation_params); + + base::SimpleTestTickClock tick_clock; + tick_clock.Advance(base::TimeDelta::FromSeconds(1)); + estimator.SetTickClockForTesting(&tick_clock); + + estimator.SetStartTimeNullHttpRtt(test.http_rtt); + estimator.set_start_time_null_end_to_end_rtt(test.end_to_end_rtt); + + // Minimum number of end to end RTT samples that should be present before + // transport RTT estimate can be used to clamp the HTTP RTT. + if (test.is_end_to_end_rtt_sample_count_enough) { + estimator.set_start_time_null_end_to_end_rtt_observation_count( + estimator.params()->http_rtt_transport_rtt_min_count()); + } else { + estimator.set_start_time_null_end_to_end_rtt_observation_count( + estimator.params()->http_rtt_transport_rtt_min_count() - 1); + } + + // Ensure ECT is recomputed. + estimator.RunOneRequest(); + + EXPECT_EQ(test.expected_http_rtt, estimator.GetHttpRTT().value()); + EXPECT_EQ(test.expected_type, estimator.GetEffectiveConnectionType()); + } +} + // Tests that the network quality is computed at the specified interval, and // that the network quality observers are notified of any change. TEST_F(NetworkQualityEstimatorTest, TestRTTAndThroughputEstimatesObserver) { @@ -2936,6 +3003,78 @@ histogram_tester.ExpectTotalCount("NQE.RTT.HangingRequest", 2); } +// Tests that the hanging request is correctly detected using end-to-end RTT. +TEST_F(NetworkQualityEstimatorTest, HangingRequestEndToEndUsingHttpOnly) { + std::map<std::string, std::string> variation_params; + variation_params["add_default_platform_observations"] = "false"; + variation_params["hanging_request_http_rtt_upper_bound_http_rtt_multiplier"] = + "6"; + variation_params["hanging_request_upper_bound_min_http_rtt_msec"] = "500"; + variation_params["use_end_to_end_rtt"] = "true"; + + int end_to_end_rtt_milliseconds = 1000; + int hanging_request_http_rtt_upper_bound_transport_rtt_multiplier = 8; + + TestNetworkQualityEstimator estimator(variation_params); + estimator.SetStartTimeNullHttpRtt(base::TimeDelta::FromMilliseconds(10)); + + base::RunLoop().RunUntilIdle(); + estimator.set_start_time_null_end_to_end_rtt( + base::TimeDelta::FromMilliseconds(end_to_end_rtt_milliseconds)); + estimator.SimulateNetworkChange( + NetworkChangeNotifier::ConnectionType::CONNECTION_UNKNOWN, "test"); + + const struct { + base::TimeDelta observed_http_rtt; + bool is_end_to_end_rtt_sample_count_enough; + bool expect_hanging_request; + std::string histogram_name; + } tests[] = { + {base::TimeDelta::FromMilliseconds(10), true, false, + "NQE.RTT.NotAHangingRequest.EndToEndRTT"}, + {base::TimeDelta::FromMilliseconds(10), false, false, + "NQE.RTT.NotAHangingRequest.HttpRTT"}, + {base::TimeDelta::FromMilliseconds(100), true, false, + "NQE.RTT.NotAHangingRequest.EndToEndRTT"}, + // |observed_http_rtt| is not large enough. Request is expected to be + // classified as not hanging. + {base::TimeDelta::FromMilliseconds( + (end_to_end_rtt_milliseconds * + hanging_request_http_rtt_upper_bound_transport_rtt_multiplier) - + 1), + true, false, "NQE.RTT.NotAHangingRequest.EndToEndRTT"}, + // |observed_http_rtt| is large. Request is expected to be classified as + // hanging. + {base::TimeDelta::FromMilliseconds( + (end_to_end_rtt_milliseconds * + hanging_request_http_rtt_upper_bound_transport_rtt_multiplier) + + 1), + true, true, "NQE.RTT.HangingRequest"}, + // Not enough end-to-end RTT samples. Request is expected to be classified + // as hanging. + {base::TimeDelta::FromMilliseconds( + end_to_end_rtt_milliseconds * + hanging_request_http_rtt_upper_bound_transport_rtt_multiplier - + 1), + false, true, "NQE.RTT.HangingRequest"}, + }; + + for (const auto& test : tests) { + base::HistogramTester histogram_tester; + if (test.is_end_to_end_rtt_sample_count_enough) { + estimator.set_start_time_null_end_to_end_rtt_observation_count( + estimator.params()->http_rtt_transport_rtt_min_count()); + } else { + estimator.set_start_time_null_end_to_end_rtt_observation_count( + estimator.params()->http_rtt_transport_rtt_min_count() - 1); + } + EXPECT_EQ(test.expect_hanging_request, + estimator.IsHangingRequest(test.observed_http_rtt)); + histogram_tester.ExpectBucketCount( + test.histogram_name, test.observed_http_rtt.InMilliseconds(), 1); + } +} + TEST_F(NetworkQualityEstimatorTest, HangingRequestUsingTransportAndHttpOnly) { base::HistogramTester histogram_tester;
diff --git a/net/quic/quic_flags_list.h b/net/quic/quic_flags_list.h index ce03b593..7a3c93e 100644 --- a/net/quic/quic_flags_list.h +++ b/net/quic/quic_flags_list.h
@@ -149,7 +149,7 @@ // When you\'re app-limited entering recovery, stay app-limited until you exit // recovery in QUIC BBR. -QUIC_FLAG(bool, FLAGS_quic_reloadable_flag_quic_bbr_app_limited_recovery, true) +QUIC_FLAG(bool, FLAGS_quic_reloadable_flag_quic_bbr_app_limited_recovery, false) // If true, mark QUIC as app-limited after sending queued packets or // retransmisssions and we then become congestion control blocked. @@ -191,3 +191,32 @@ // If true, QuicCryptoServerConfig::EvaluateClientHello will use GetCertChain // instead of the more expensive GetProof. QUIC_FLAG(bool, FLAGS_quic_reloadable_flag_quic_use_get_cert_chain, false) + +// If true, try to aggregate acked stream frames. +QUIC_FLAG(bool, + FLAGS_quic_reloadable_flag_quic_aggregate_acked_stream_frames, + false) + +// If true, only process stateless reset packets on the client side. +QUIC_FLAG( + bool, + FLAGS_quic_reloadable_flag_quic_process_stateless_reset_at_client_only, + false) + +// If true, do not retransmit old window update frames. +QUIC_FLAG(bool, + FLAGS_quic_reloadable_flag_quic_donot_retransmit_old_window_update2, + false) + +// If ture, make QuicSession::GetStream faster by skipping the lookup into +// static stream map, when possible. +QUIC_FLAG(bool, + FLAGS_quic_reloadable_flag_quic_session_faster_get_stream, + false) + +// If true, when session decides what to write, set a approximate retransmission +// for packets to be retransmitted. Also check packet state in +// IsPacketUsefulForRetransmittableData. +QUIC_FLAG(bool, + FLAGS_quic_reloadable_flag_quic_fix_is_useful_for_retrans, + false)
diff --git a/net/quic/quic_stream_factory.cc b/net/quic/quic_stream_factory.cc index a65e9457..9db78c5 100644 --- a/net/quic/quic_stream_factory.cc +++ b/net/quic/quic_stream_factory.cc
@@ -321,8 +321,7 @@ ~Job(); - int Run(CompletionOnceCallback host_resolution_callback, - CompletionOnceCallback callback); + int Run(CompletionOnceCallback callback); int DoLoop(int rv); int DoResolveHost(); @@ -445,13 +444,10 @@ // non-null. } -int QuicStreamFactory::Job::Run(CompletionOnceCallback host_resolution_callback, - CompletionOnceCallback callback) { +int QuicStreamFactory::Job::Run(CompletionOnceCallback callback) { int rv = DoLoop(OK); - if (rv == ERR_IO_PENDING) { - host_resolution_callback_ = std::move(host_resolution_callback); + if (rv == ERR_IO_PENDING) callback_ = std::move(callback); - } return rv > 0 ? OK : rv; } @@ -492,8 +488,10 @@ DCHECK_EQ(STATE_RESOLVE_HOST_COMPLETE, io_state_); rv = DoLoop(rv); - if (!host_resolution_callback_.is_null()) - base::ResetAndReturn(&host_resolution_callback_).Run(rv); + + for (auto* request : stream_requests_) { + request->OnHostResolutionComplete(rv); + } if (rv != ERR_IO_PENDING && !callback_.is_null()) base::ResetAndReturn(&callback_).Run(rv); @@ -1053,8 +1051,6 @@ WasQuicRecentlyBroken(session_key.server_id()), priority, cert_verify_flags, net_log); int rv = job->Run( - base::BindRepeating(&QuicStreamFactory::OnJobHostResolutionComplete, - base::Unretained(this), job.get()), base::BindRepeating(&QuicStreamFactory::OnJobComplete, base::Unretained(this), job.get())); if (rv == ERR_IO_PENDING) { @@ -1123,14 +1119,6 @@ return false; } -void QuicStreamFactory::OnJobHostResolutionComplete(Job* job, int rv) { - auto iter = active_jobs_.find(job->key().session_key()); - DCHECK(iter != active_jobs_.end()); - for (auto* request : iter->second->stream_requests()) { - request->OnHostResolutionComplete(rv); - } -} - void QuicStreamFactory::OnJobComplete(Job* job, int rv) { auto iter = active_jobs_.find(job->key().session_key()); DCHECK(iter != active_jobs_.end());
diff --git a/net/quic/quic_stream_factory.h b/net/quic/quic_stream_factory.h index 43058068..ca5e01c 100644 --- a/net/quic/quic_stream_factory.h +++ b/net/quic/quic_stream_factory.h
@@ -404,7 +404,6 @@ bool HasMatchingIpSession(const QuicSessionAliasKey& key, const AddressList& address_list); - void OnJobHostResolutionComplete(Job* job, int rv); void OnJobComplete(Job* job, int rv); void OnCertVerifyJobComplete(CertVerifierJob* job, int rv); bool HasActiveSession(const QuicSessionKey& session_key) const;
diff --git a/net/third_party/quic/core/congestion_control/bbr_sender.cc b/net/third_party/quic/core/congestion_control/bbr_sender.cc index 90e5db9..1b18fc7 100644 --- a/net/third_party/quic/core/congestion_control/bbr_sender.cc +++ b/net/third_party/quic/core/congestion_control/bbr_sender.cc
@@ -81,12 +81,13 @@ const QuicUnackedPacketMap* unacked_packets, QuicPacketCount initial_tcp_congestion_window, QuicPacketCount max_tcp_congestion_window, - QuicRandom* random) + QuicRandom* random, + BandwidthSamplerInterface* sampler) : rtt_stats_(rtt_stats), unacked_packets_(unacked_packets), random_(random), mode_(STARTUP), - sampler_(new BandwidthSampler()), + sampler_(sampler), round_trip_count_(0), last_sent_packet_(0), current_round_trip_end_(0),
diff --git a/net/third_party/quic/core/congestion_control/bbr_sender.h b/net/third_party/quic/core/congestion_control/bbr_sender.h index f91ad14..1411eb6 100644 --- a/net/third_party/quic/core/congestion_control/bbr_sender.h +++ b/net/third_party/quic/core/congestion_control/bbr_sender.h
@@ -91,13 +91,32 @@ QuicPacketNumber end_of_app_limited_phase; }; - BbrSender(const RttStats* rtt_stats, - const QuicUnackedPacketMap* unacked_packets, - QuicPacketCount initial_tcp_congestion_window, - QuicPacketCount max_tcp_congestion_window, - QuicRandom* random); - BbrSender(const BbrSender&) = delete; - BbrSender& operator=(const BbrSender&) = delete; + template <typename BandwidthSamplerT = BandwidthSampler> + static BbrSender* Create(const RttStats* rtt_stats, + const QuicUnackedPacketMap* unacked_packets, + QuicPacketCount initial_tcp_congestion_window, + QuicPacketCount max_tcp_congestion_window, + QuicRandom* random) { + struct SenderSamplerBundle : public BbrSender { + SenderSamplerBundle(const RttStats* rtt_stats, + const QuicUnackedPacketMap* unacked_packets, + QuicPacketCount initial_tcp_congestion_window, + QuicPacketCount max_tcp_congestion_window, + QuicRandom* random) + : BbrSender(rtt_stats, + unacked_packets, + initial_tcp_congestion_window, + max_tcp_congestion_window, + random, + &sampler) {} + BandwidthSamplerT sampler; + }; + + return new SenderSamplerBundle(rtt_stats, unacked_packets, + initial_tcp_congestion_window, + max_tcp_congestion_window, random); + } + ~BbrSender() override; // Start implementation of SendAlgorithmInterface. @@ -167,6 +186,16 @@ DebugState ExportDebugState() const; + protected: + BbrSender(const RttStats* rtt_stats, + const QuicUnackedPacketMap* unacked_packets, + QuicPacketCount initial_tcp_congestion_window, + QuicPacketCount max_tcp_congestion_window, + QuicRandom* random, + BandwidthSamplerInterface* sampler); + BbrSender(const BbrSender&) = delete; + BbrSender& operator=(const BbrSender&) = delete; + private: typedef WindowedFilter<QuicBandwidth, MaxFilter<QuicBandwidth>, @@ -252,7 +281,7 @@ // Bandwidth sampler provides BBR with the bandwidth measurements at // individual points. - std::unique_ptr<BandwidthSamplerInterface> sampler_; + BandwidthSamplerInterface* sampler_; // Not owned. // The number of the round trips that have occurred during the connection. QuicRoundTripCount round_trip_count_;
diff --git a/net/third_party/quic/core/congestion_control/bbr_sender_test.cc b/net/third_party/quic/core/congestion_control/bbr_sender_test.cc index 600a9db..849378b 100644 --- a/net/third_party/quic/core/congestion_control/bbr_sender_test.cc +++ b/net/third_party/quic/core/congestion_control/bbr_sender_test.cc
@@ -126,7 +126,7 @@ const RttStats* rtt_stats = endpoint->connection()->sent_packet_manager().GetRttStats(); // Ownership of the sender will be overtaken by the endpoint. - BbrSender* sender = new BbrSender( + BbrSender* sender = BbrSender::Create( rtt_stats, QuicSentPacketManagerPeer::GetUnackedPacketMap( QuicConnectionPeer::GetSentPacketManager(endpoint->connection())), @@ -330,7 +330,7 @@ TEST_F(BbrSenderTest, SimpleTransferAckDecimation) { // Decrease the CWND gain so extra CWND is required with stretch acks. FLAGS_quic_bbr_cwnd_gain = 1.0; - sender_ = new BbrSender( + sender_ = BbrSender::Create( rtt_stats_, QuicSentPacketManagerPeer::GetUnackedPacketMap( QuicConnectionPeer::GetSentPacketManager(bbr_sender_.connection())),
diff --git a/net/third_party/quic/core/congestion_control/send_algorithm_interface.cc b/net/third_party/quic/core/congestion_control/send_algorithm_interface.cc index 5e4b47154..a2027108 100644 --- a/net/third_party/quic/core/congestion_control/send_algorithm_interface.cc +++ b/net/third_party/quic/core/congestion_control/send_algorithm_interface.cc
@@ -29,9 +29,9 @@ QuicPacketCount max_congestion_window = kDefaultMaxCongestionWindowPackets; switch (congestion_control_type) { case kBBR: - return new BbrSender(rtt_stats, unacked_packets, - initial_congestion_window, max_congestion_window, - random); + return BbrSender::Create(rtt_stats, unacked_packets, + initial_congestion_window, max_congestion_window, + random); case kPCC: if (GetQuicReloadableFlag(quic_enable_pcc3)) { return CreatePccSender(clock, rtt_stats, unacked_packets, random, stats,
diff --git a/net/third_party/quic/core/http/end_to_end_test.cc b/net/third_party/quic/core/http/end_to_end_test.cc index de85732..030d12d 100644 --- a/net/third_party/quic/core/http/end_to_end_test.cc +++ b/net/third_party/quic/core/http/end_to_end_test.cc
@@ -874,6 +874,37 @@ VerifyCleanConnection(true); } +// Regression test for b/80090281. +TEST_P(EndToEndTest, LargePostWithPacketLossAndAlwaysBundleWindowUpdates) { + ASSERT_TRUE(Initialize()); + + // Wait for the server SHLO before upping the packet loss. + EXPECT_TRUE(client_->client()->WaitForCryptoHandshakeConfirmed()); + server_thread_->WaitForCryptoHandshakeConfirmed(); + + // Normally server only bundles a retransmittable frame once every other + // kMaxConsecutiveNonRetransmittablePackets ack-only packets. Setting the max + // to 0 to reliably reproduce b/80090281. + server_thread_->Schedule([this]() { + QuicConnectionPeer::SetMaxConsecutiveNumPacketsWithNoRetransmittableFrames( + GetServerConnection(), 0); + }); + + SetPacketLossPercentage(30); + + // 10 KB body. + QuicString body(1024 * 10, 'a'); + SpdyHeaderBlock headers; + headers[":method"] = "POST"; + headers[":path"] = "/foo"; + headers[":scheme"] = "https"; + headers[":authority"] = server_hostname_; + + EXPECT_EQ(kFooResponseBody, + client_->SendCustomSynchronousRequest(headers, body)); + VerifyCleanConnection(true); +} + TEST_P(EndToEndTest, LargePostWithPacketLossAndBlockedSocket) { if (!BothSidesSupportStatelessRejects()) { // Connect with lower fake packet loss than we'd like to test. Until
diff --git a/net/third_party/quic/core/http/quic_spdy_session.cc b/net/third_party/quic/core/http/quic_spdy_session.cc index d600c519..da1fdbd 100644 --- a/net/third_party/quic/core/http/quic_spdy_session.cc +++ b/net/third_party/quic/core/http/quic_spdy_session.cc
@@ -342,7 +342,7 @@ headers_stream_ = QuicMakeUnique<QuicHeadersStream>((this)); DCHECK_EQ(kHeadersStreamId, headers_stream_->id()); - static_streams()[kHeadersStreamId] = headers_stream_.get(); + RegisterStaticStream(kHeadersStreamId, headers_stream_.get()); set_max_uncompressed_header_bytes(max_inbound_header_list_size_);
diff --git a/net/third_party/quic/core/http/quic_spdy_stream_test.cc b/net/third_party/quic/core/http/quic_spdy_stream_test.cc index 394a180..ad7c5f71 100644 --- a/net/third_party/quic/core/http/quic_spdy_stream_test.cc +++ b/net/third_party/quic/core/http/quic_spdy_stream_test.cc
@@ -1047,6 +1047,16 @@ EXPECT_EQ(kV3HighestPriority, stream_->priority()); } +TEST_P(QuicSpdyStreamTest, OnPriorityFrameAfterSendingData) { + Initialize(kShouldProcessData); + + EXPECT_CALL(*session_, WritevData(_, _, _, _, _)) + .WillOnce(Return(QuicConsumedData(4, true))); + stream_->WriteOrBufferData("data", true, nullptr); + stream_->OnPriorityFrame(kV3HighestPriority); + EXPECT_EQ(kV3HighestPriority, stream_->priority()); +} + TEST_P(QuicSpdyStreamTest, SetPriorityBeforeUpdateStreamPriority) { MockQuicConnection* connection = new testing::StrictMock<MockQuicConnection>( &helper_, &alarm_factory_, Perspective::IS_SERVER,
diff --git a/net/third_party/quic/core/quic_connection.cc b/net/third_party/quic/core/quic_connection.cc index 25a2fe4..43e7ef47 100644 --- a/net/third_party/quic/core/quic_connection.cc +++ b/net/third_party/quic/core/quic_connection.cc
@@ -313,6 +313,8 @@ write_error_occurred_(false), no_stop_waiting_frames_(transport_version() > QUIC_VERSION_43), consecutive_num_packets_with_no_retransmittable_frames_(0), + max_consecutive_num_packets_with_no_retransmittable_frames_( + kMaxConsecutiveNonRetransmittablePackets), fill_up_link_during_probing_(false), probing_retransmission_pending_(false), stateless_reset_token_received_(false), @@ -326,7 +328,8 @@ GetQuicReloadableFlag(quic_add_to_blocked_list_if_writer_blocked)), ack_reordered_packets_(GetQuicReloadableFlag(quic_ack_reordered_packets)), retransmissions_app_limited_( - GetQuicReloadableFlag(quic_retransmissions_app_limited)) { + GetQuicReloadableFlag(quic_retransmissions_app_limited)), + donot_retransmit_old_window_updates_(false) { if (ack_mode_ == ACK_DECIMATION) { QUIC_FLAG_COUNT(quic_reloadable_flag_quic_enable_ack_decimation); } @@ -2072,14 +2075,14 @@ QuicTime packet_send_time = clock_->Now(); if (supports_release_time_ && per_packet_options_ != nullptr) { QuicTime next_release_time = sent_packet_manager_.GetNextReleaseTime(); - uint64_t release_time_delay_ns = 0; + QuicTime::Delta release_time_delay = QuicTime::Delta::Zero(); QuicTime now = packet_send_time; if (next_release_time > now) { - release_time_delay_ns = (next_release_time - now).ToMicroseconds() * 1000; + release_time_delay = next_release_time - now; // Set packet_send_time to the future to make the RTT estimation accurate. packet_send_time = next_release_time; } - per_packet_options_->SetReleaseTimeDelay(release_time_delay_ns); + per_packet_options_->release_time_delay = release_time_delay; } WriteResult result = writer_->WritePacket( packet->encrypted_buffer, encrypted_length, self_address().host(), @@ -2351,11 +2354,13 @@ packet_generator_.SetShouldSendAck(!no_stop_waiting_frames_); if (consecutive_num_packets_with_no_retransmittable_frames_ < - kMaxConsecutiveNonRetransmittablePackets) { + max_consecutive_num_packets_with_no_retransmittable_frames_) { return; } consecutive_num_packets_with_no_retransmittable_frames_ = 0; - if (packet_generator_.HasRetransmittableFrames()) { + if (packet_generator_.HasRetransmittableFrames() || + (donot_retransmit_old_window_updates_ && + visitor_->WillingAndAbleToWrite())) { // There are pending retransmittable frames. return; }
diff --git a/net/third_party/quic/core/quic_connection.h b/net/third_party/quic/core/quic_connection.h index a0d370b..01d3966 100644 --- a/net/third_party/quic/core/quic_connection.h +++ b/net/third_party/quic/core/quic_connection.h
@@ -146,9 +146,9 @@ virtual void PostProcessAfterData() = 0; // Called when the connection sends ack after - // kMaxConsecutiveNonRetransmittablePackets consecutive not retransmittable - // packets sent. To instigate an ack from peer, a retransmittable frame needs - // to be added. + // max_consecutive_num_packets_with_no_retransmittable_frames_ consecutive not + // retransmittable packets sent. To instigate an ack from peer, a + // retransmittable frame needs to be added. virtual void OnAckNeedsRetransmittableFrame() = 0; // Called when a ping needs to be sent. @@ -770,6 +770,12 @@ bool IsPathDegrading() const { return is_path_degrading_; } + // TODO(wub): Remove this function once + // quic_reloadable_flag_quic_donot_retransmit_old_window_update is deprecated. + void set_donot_retransmit_old_window_updates(bool value) { + donot_retransmit_old_window_updates_ = value; + } + protected: // Calls cancel() on all the alarms owned by this connection. void CancelAllAlarms(); @@ -1254,6 +1260,10 @@ // Consecutive number of sent packets which have no retransmittable frames. size_t consecutive_num_packets_with_no_retransmittable_frames_; + // After this many packets sent without retransmittable frames, an artificial + // retransmittable frame(a WINDOW_UPDATE) will be created to solicit an ack + // from the peer. Default to kMaxConsecutiveNonRetransmittablePackets. + size_t max_consecutive_num_packets_with_no_retransmittable_frames_; // If true, the connection will fill up the pipe with extra data whenever the // congestion controller needs it in order to make a bandwidth estimate. This @@ -1297,6 +1307,10 @@ // Latched value of quic_reloadable_flag_quic_retransmissions_app_limited. const bool retransmissions_app_limited_; + + // Latched value of + // quic_reloadable_flag_quic_donot_retransmit_old_window_update. + bool donot_retransmit_old_window_updates_; }; } // namespace quic
diff --git a/net/third_party/quic/core/quic_control_frame_manager.cc b/net/third_party/quic/core/quic_control_frame_manager.cc index 8d15ba36..db954a2 100644 --- a/net/third_party/quic/core/quic_control_frame_manager.cc +++ b/net/third_party/quic/core/quic_control_frame_manager.cc
@@ -7,6 +7,7 @@ #include "net/third_party/quic/core/quic_constants.h" #include "net/third_party/quic/core/quic_session.h" #include "net/third_party/quic/platform/api/quic_bug_tracker.h" +#include "net/third_party/quic/platform/api/quic_flag_utils.h" #include "net/third_party/quic/platform/api/quic_map_util.h" #include "net/third_party/quic/platform/api/quic_string.h" @@ -16,7 +17,9 @@ : last_control_frame_id_(kInvalidControlFrameId), least_unacked_(1), least_unsent_(1), - session_(session) {} + session_(session), + donot_retransmit_old_window_updates_( + GetQuicReloadableFlag(quic_donot_retransmit_old_window_update2)) {} QuicControlFrameManager::~QuicControlFrameManager() { while (!control_frames_.empty()) { @@ -97,6 +100,18 @@ << "Send or retransmit a control frame with invalid control frame id"; return; } + if (donot_retransmit_old_window_updates_ && + frame.type == WINDOW_UPDATE_FRAME) { + QuicStreamId stream_id = frame.window_update_frame->stream_id; + if (QuicContainsKey(window_update_frames_, stream_id) && + id > window_update_frames_[stream_id]) { + // Consider the older window update of the same stream as acked. + QUIC_FLAG_COUNT( + quic_reloadable_flag_quic_donot_retransmit_old_window_update2); + OnControlFrameIdAcked(window_update_frames_[stream_id]); + } + window_update_frames_[stream_id] = id; + } if (QuicContainsKey(pending_retransmissions_, id)) { // This is retransmitted control frame. pending_retransmissions_.erase(id); @@ -116,36 +131,16 @@ bool QuicControlFrameManager::OnControlFrameAcked(const QuicFrame& frame) { QuicControlFrameId id = GetControlFrameId(frame); - if (id == kInvalidControlFrameId) { - // Frame does not have a valid control frame ID, ignore it. + if (!OnControlFrameIdAcked(id)) { return false; } - if (id >= least_unsent_) { - QUIC_BUG << "Try to ack unsent control frame"; - session_->connection()->CloseConnection( - QUIC_INTERNAL_ERROR, "Try to ack unsent control frame", - ConnectionCloseBehavior::SEND_CONNECTION_CLOSE_PACKET); - RecordInternalErrorLocation(QUIC_CONTROL_FRAME_MANAGER_CONTROL_FRAME_ACKED); - return false; - } - if (id < least_unacked_ || - GetControlFrameId(control_frames_.at(id - least_unacked_)) == - kInvalidControlFrameId) { - // This frame has already been acked. - return false; - } - - // Set control frame ID of acked frames to 0. - SetControlFrameId(kInvalidControlFrameId, - &control_frames_.at(id - least_unacked_)); - // Remove acked control frames from pending retransmissions. - pending_retransmissions_.erase(id); - // Clean up control frames queue and increment least_unacked_. - while (!control_frames_.empty() && - GetControlFrameId(control_frames_.front()) == kInvalidControlFrameId) { - DeleteFrame(&control_frames_.front()); - control_frames_.pop_front(); - ++least_unacked_; + if (donot_retransmit_old_window_updates_ && + frame.type == WINDOW_UPDATE_FRAME) { + QuicStreamId stream_id = frame.window_update_frame->stream_id; + if (QuicContainsKey(window_update_frames_, stream_id) && + window_update_frames_[stream_id] == id) { + window_update_frames_.erase(stream_id); + } } return true; } @@ -275,6 +270,40 @@ } } +bool QuicControlFrameManager::OnControlFrameIdAcked(QuicControlFrameId id) { + if (id == kInvalidControlFrameId) { + // Frame does not have a valid control frame ID, ignore it. + return false; + } + if (id >= least_unsent_) { + QUIC_BUG << "Try to ack unsent control frame"; + session_->connection()->CloseConnection( + QUIC_INTERNAL_ERROR, "Try to ack unsent control frame", + ConnectionCloseBehavior::SEND_CONNECTION_CLOSE_PACKET); + return false; + } + if (id < least_unacked_ || + GetControlFrameId(control_frames_.at(id - least_unacked_)) == + kInvalidControlFrameId) { + // This frame has already been acked. + return false; + } + + // Set control frame ID of acked frames to 0. + SetControlFrameId(kInvalidControlFrameId, + &control_frames_.at(id - least_unacked_)); + // Remove acked control frames from pending retransmissions. + pending_retransmissions_.erase(id); + // Clean up control frames queue and increment least_unacked_. + while (!control_frames_.empty() && + GetControlFrameId(control_frames_.front()) == kInvalidControlFrameId) { + DeleteFrame(&control_frames_.front()); + control_frames_.pop_front(); + ++least_unacked_; + } + return true; +} + bool QuicControlFrameManager::HasBufferedFrames() const { return least_unsent_ < least_unacked_ + control_frames_.size(); }
diff --git a/net/third_party/quic/core/quic_control_frame_manager.h b/net/third_party/quic/core/quic_control_frame_manager.h index e5b89cb..e15383d4 100644 --- a/net/third_party/quic/core/quic_control_frame_manager.h +++ b/net/third_party/quic/core/quic_control_frame_manager.h
@@ -83,6 +83,12 @@ // sent. bool WillingToWrite() const; + // TODO(wub): Remove this function once + // quic_reloadable_flag_quic_donot_retransmit_old_window_update is deprecated. + bool donot_retransmit_old_window_updates() const { + return donot_retransmit_old_window_updates_; + } + private: friend class test::QuicControlFrameManagerPeer; @@ -95,6 +101,10 @@ // Writes pending retransmissions if any. void WritePendingRetransmission(); + // Called when frame with |id| gets acked. Returns true if |id| gets acked for + // the first time, return false otherwise. + bool OnControlFrameIdAcked(QuicControlFrameId id); + // Retrieves the next pending retransmission. This must only be called when // there are pending retransmissions. QuicFrame NextPendingRetransmission() const; @@ -121,6 +131,13 @@ // Pointer to the owning QuicSession object. QuicSession* session_; + + // Last sent window update frame for each stream. + QuicSmallMap<QuicStreamId, QuicControlFrameId, 10> window_update_frames_; + + // Latched value of + // FLAGS_quic_reloadable_flag_quic_donot_retransmit_old_window_update2. + const bool donot_retransmit_old_window_updates_; }; } // namespace quic
diff --git a/net/third_party/quic/core/quic_control_frame_manager_test.cc b/net/third_party/quic/core/quic_control_frame_manager_test.cc index 92be10c3..23e1fb1 100644 --- a/net/third_party/quic/core/quic_control_frame_manager_test.cc +++ b/net/third_party/quic/core/quic_control_frame_manager_test.cc
@@ -34,6 +34,10 @@ DeleteFrame(&const_cast<QuicFrame&>(frame)); return true; } + bool SaveControlFrame(const QuicFrame& frame) { + frame_ = frame; + return true; + } protected: void Initialize() { @@ -74,6 +78,7 @@ MockQuicConnection* connection_; std::unique_ptr<StrictMock<MockQuicSession>> session_; std::unique_ptr<QuicControlFrameManager> manager_; + QuicFrame frame_; }; TEST_F(QuicControlFrameManagerTest, OnControlFrameAcked) { @@ -206,6 +211,72 @@ EXPECT_FALSE(manager_->WillingToWrite()); } +TEST_F(QuicControlFrameManagerTest, DonotRetransmitOldWindowUpdates) { + SetQuicReloadableFlag(quic_donot_retransmit_old_window_update2, true); + Initialize(); + // Send two more window updates of the same stream. + manager_->WriteOrBufferWindowUpdate(kTestStreamId, 200); + QuicWindowUpdateFrame window_update2(5, kTestStreamId, 200); + + manager_->WriteOrBufferWindowUpdate(kTestStreamId, 300); + QuicWindowUpdateFrame window_update3(6, kTestStreamId, 300); + InSequence s; + // Flush all buffered control frames. + EXPECT_CALL(*connection_, SendControlFrame(_)) + .WillRepeatedly( + Invoke(this, &QuicControlFrameManagerTest::ClearControlFrame)); + manager_->OnCanWrite(); + + // Mark all 3 window updates as lost. + manager_->OnControlFrameLost(QuicFrame(&window_update_)); + manager_->OnControlFrameLost(QuicFrame(&window_update2)); + manager_->OnControlFrameLost(QuicFrame(&window_update3)); + EXPECT_TRUE(manager_->HasPendingRetransmission()); + EXPECT_TRUE(manager_->WillingToWrite()); + + // Verify only the latest window update gets retransmitted. + EXPECT_CALL(*connection_, SendControlFrame(_)) + .WillOnce(Invoke(this, &QuicControlFrameManagerTest::SaveControlFrame)); + manager_->OnCanWrite(); + EXPECT_EQ(6u, frame_.window_update_frame->control_frame_id); + EXPECT_FALSE(manager_->HasPendingRetransmission()); + EXPECT_FALSE(manager_->WillingToWrite()); + DeleteFrame(&frame_); +} + +TEST_F(QuicControlFrameManagerTest, RetransmitWindowUpdateOfDifferentStreams) { + SetQuicReloadableFlag(quic_donot_retransmit_old_window_update2, true); + Initialize(); + // Send two more window updates of different streams. + manager_->WriteOrBufferWindowUpdate(kTestStreamId + 2, 200); + QuicWindowUpdateFrame window_update2(5, kTestStreamId + 2, 200); + + manager_->WriteOrBufferWindowUpdate(kTestStreamId + 4, 300); + QuicWindowUpdateFrame window_update3(6, kTestStreamId + 4, 300); + InSequence s; + // Flush all buffered control frames. + EXPECT_CALL(*connection_, SendControlFrame(_)) + .WillRepeatedly( + Invoke(this, &QuicControlFrameManagerTest::ClearControlFrame)); + manager_->OnCanWrite(); + + // Mark all 3 window updates as lost. + manager_->OnControlFrameLost(QuicFrame(&window_update_)); + manager_->OnControlFrameLost(QuicFrame(&window_update2)); + manager_->OnControlFrameLost(QuicFrame(&window_update3)); + EXPECT_TRUE(manager_->HasPendingRetransmission()); + EXPECT_TRUE(manager_->WillingToWrite()); + + // Verify all 3 window updates get retransmitted. + EXPECT_CALL(*connection_, SendControlFrame(_)) + .Times(3) + .WillRepeatedly( + Invoke(this, &QuicControlFrameManagerTest::ClearControlFrame)); + manager_->OnCanWrite(); + EXPECT_FALSE(manager_->HasPendingRetransmission()); + EXPECT_FALSE(manager_->WillingToWrite()); +} + } // namespace } // namespace test } // namespace quic
diff --git a/net/third_party/quic/core/quic_framer.cc b/net/third_party/quic/core/quic_framer.cc index 9c05cf5..14b7485 100644 --- a/net/third_party/quic/core/quic_framer.cc +++ b/net/third_party/quic/core/quic_framer.cc
@@ -256,7 +256,9 @@ alternative_decrypter_latch_(false), perspective_(perspective), validate_flags_(true), - data_producer_(nullptr) { + data_producer_(nullptr), + process_stateless_reset_at_client_only_( + GetQuicReloadableFlag(quic_process_stateless_reset_at_client_only)) { DCHECK(!supported_versions.empty()); version_ = supported_versions_[0]; decrypter_ = QuicMakeUnique<NullDecrypter>(perspective); @@ -1182,15 +1184,37 @@ const QuicEncryptedPacket& packet, char* decrypted_buffer, size_t buffer_length) { + DCHECK(!header->has_possible_stateless_reset_token); if (header->form == SHORT_HEADER) { - // Peak possible stateless reset token. Will only be used on decryption - // failure. - QuicStringPiece remaining = encrypted_reader->PeekRemainingPayload(); - if (remaining.length() >= sizeof(header->possible_stateless_reset_token)) { - remaining.copy( - reinterpret_cast<char*>(&header->possible_stateless_reset_token), - sizeof(header->possible_stateless_reset_token), - remaining.length() - sizeof(header->possible_stateless_reset_token)); + if (!process_stateless_reset_at_client_only_) { + // Peak possible stateless reset token. Will only be used on decryption + // failure. + QuicStringPiece remaining = encrypted_reader->PeekRemainingPayload(); + if (remaining.length() >= + sizeof(header->possible_stateless_reset_token)) { + remaining.copy( + reinterpret_cast<char*>(&header->possible_stateless_reset_token), + sizeof(header->possible_stateless_reset_token), + remaining.length() - + sizeof(header->possible_stateless_reset_token)); + } + } else { + QUIC_FLAG_COUNT( + quic_reloadable_flag_quic_process_stateless_reset_at_client_only); + if (perspective_ == Perspective::IS_CLIENT) { + // Peek possible stateless reset token. Will only be used on decryption + // failure. + QuicStringPiece remaining = encrypted_reader->PeekRemainingPayload(); + if (remaining.length() >= + sizeof(header->possible_stateless_reset_token)) { + header->has_possible_stateless_reset_token = true; + memcpy( + &header->possible_stateless_reset_token, + &remaining.data()[remaining.length() - + sizeof(header->possible_stateless_reset_token)], + sizeof(header->possible_stateless_reset_token)); + } + } } } @@ -1386,6 +1410,8 @@ const QuicPacketHeader& header) const { return perspective_ == Perspective::IS_CLIENT && header.form == SHORT_HEADER && + (!process_stateless_reset_at_client_only_ || + header.has_possible_stateless_reset_token) && visitor_->IsValidStatelessResetToken( header.possible_stateless_reset_token); }
diff --git a/net/third_party/quic/core/quic_framer.h b/net/third_party/quic/core/quic_framer.h index 8242091..61cd65d 100644 --- a/net/third_party/quic/core/quic_framer.h +++ b/net/third_party/quic/core/quic_framer.h
@@ -769,6 +769,10 @@ // If not null, framer asks data_producer_ to write stream frame data. Not // owned. TODO(fayang): Consider add data producer to framer's constructor. QuicStreamFrameDataProducer* data_producer_; + + // Latched value of + // quic_reloadable_flag_quic_process_stateless_reset_at_client_only. + const bool process_stateless_reset_at_client_only_; }; } // namespace quic
diff --git a/net/third_party/quic/core/quic_packet_writer.h b/net/third_party/quic/core/quic_packet_writer.h index 0399a8b9a..cf17b83 100644 --- a/net/third_party/quic/core/quic_packet_writer.h +++ b/net/third_party/quic/core/quic_packet_writer.h
@@ -9,28 +9,27 @@ #include "net/third_party/quic/core/quic_packets.h" #include "net/third_party/quic/platform/api/quic_export.h" +#include "net/third_party/quic/platform/api/quic_ptr_util.h" #include "net/third_party/quic/platform/api/quic_socket_address.h" namespace quic { struct WriteResult; -class QUIC_EXPORT_PRIVATE PerPacketOptions { - public: - PerPacketOptions() = default; +struct QUIC_EXPORT_PRIVATE PerPacketOptions { virtual ~PerPacketOptions() {} // Returns a heap-allocated copy of |this|. - virtual PerPacketOptions* Clone() const = 0; + // + // The subclass implementation of this method should look like this: + // return QuicMakeUnique<MyAwesomePerPacketOptions>(*this); + // + // This method is declared pure virtual in order to ensure the subclasses + // would not forget to override it. + virtual std::unique_ptr<PerPacketOptions> Clone() const = 0; - // Sets release time delay in ns for this packet. - virtual void SetReleaseTimeDelay(uint64_t release_time_delay_ns) = 0; - - private: - PerPacketOptions(PerPacketOptions&& other) = delete; - PerPacketOptions(const PerPacketOptions&) = delete; - PerPacketOptions& operator=(const PerPacketOptions&) = delete; - PerPacketOptions& operator=(PerPacketOptions&& other) = delete; + // Specifies release time delay for this packet. + QuicTime::Delta release_time_delay = QuicTime::Delta::Zero(); }; // An interface between writers and the entity managing the
diff --git a/net/third_party/quic/core/quic_packets.cc b/net/third_party/quic/core/quic_packets.cc index 0cc59a7..d5f35d1 100644 --- a/net/third_party/quic/core/quic_packets.cc +++ b/net/third_party/quic/core/quic_packets.cc
@@ -70,6 +70,7 @@ source_connection_id_length(PACKET_0BYTE_CONNECTION_ID), reset_flag(false), version_flag(false), + has_possible_stateless_reset_token(false), packet_number_length(PACKET_4BYTE_PACKET_NUMBER), version( ParsedQuicVersion(PROTOCOL_UNSUPPORTED, QUIC_VERSION_UNSUPPORTED)),
diff --git a/net/third_party/quic/core/quic_packets.h b/net/third_party/quic/core/quic_packets.h index e558340..e39db998 100644 --- a/net/third_party/quic/core/quic_packets.h +++ b/net/third_party/quic/core/quic_packets.h
@@ -78,6 +78,9 @@ // For Google QUIC, version flag in packets from the server means version // negotiation packet. For IETF QUIC, version flag means long header. bool version_flag; + // Indicates whether |possible_stateless_reset_token| contains a valid value + // parsed from the packet buffer. IETF QUIC only, always false for GQUIC. + bool has_possible_stateless_reset_token; QuicPacketNumberLength packet_number_length; ParsedQuicVersion version; // nonce contains an optional, 32-byte nonce value. If not included in the @@ -88,6 +91,7 @@ QuicIetfPacketHeaderForm form; // Short packet type is reflected in packet_number_length. QuicLongHeaderType long_packet_type; + // Only valid if |has_possible_stateless_reset_token| is true. // Stores last 16 bytes of a this packet, used to check whether this packet is // a stateless reset packet on decryption failure. QuicUint128 possible_stateless_reset_token;
diff --git a/net/third_party/quic/core/quic_sent_packet_manager.cc b/net/third_party/quic/core/quic_sent_packet_manager.cc index 0f55c57..1b5422a3 100644 --- a/net/third_party/quic/core/quic_sent_packet_manager.cc +++ b/net/third_party/quic/core/quic_sent_packet_manager.cc
@@ -91,7 +91,9 @@ delayed_ack_time_( QuicTime::Delta::FromMilliseconds(kDefaultDelayedAckTimeMs)), rtt_updated_(false), - acked_packets_iter_(last_ack_frame_.packets.rbegin()) { + acked_packets_iter_(last_ack_frame_.packets.rbegin()), + aggregate_acked_stream_frames_( + GetQuicReloadableFlag(quic_aggregate_acked_stream_frames)) { SetSendAlgorithm(congestion_control_type); } @@ -239,6 +241,10 @@ QuicTime ack_receive_time, bool rtt_updated, QuicByteCount prior_bytes_in_flight) { + if (aggregate_acked_stream_frames_ && session_decides_what_to_write()) { + unacked_packets_.NotifyAggregatedStreamFrameAcked( + last_ack_frame_.ack_delay_time); + } InvokeLossDetection(ack_receive_time); // Ignore losses in RTO mode. if (consecutive_rto_count_ > 0 && !use_new_rto_) { @@ -389,6 +395,18 @@ unacked_packets_.RetransmitFrames(*transmission_info, transmission_type); } else { unacked_packets_.NotifyFramesLost(*transmission_info, transmission_type); + if (unacked_packets_.fix_is_useful_for_retransmission()) { + if (transmission_type == LOSS_RETRANSMISSION) { + // Record the first packet sent after loss, which allows to wait 1 + // more RTT before giving up on this lost packet. + transmission_info->retransmission = + unacked_packets_.largest_sent_packet() + 1; + } else { + // Clear the recorded first packet sent after loss when version or + // encryption changes. + transmission_info->retransmission = 0; + } + } } // Update packet state according to transmission type. transmission_info->state = @@ -474,6 +492,10 @@ QuicPacketNumber QuicSentPacketManager::GetNewestRetransmission( QuicPacketNumber packet_number, const QuicTransmissionInfo& transmission_info) const { + if (unacked_packets_.fix_is_useful_for_retransmission() && + session_decides_what_to_write()) { + return packet_number; + } QuicPacketNumber retransmission = transmission_info.retransmission; while (retransmission != 0) { packet_number = retransmission; @@ -492,17 +514,29 @@ pending_retransmissions_.erase(newest_transmission); if (newest_transmission == packet_number) { - const bool new_data_acked = - unacked_packets_.NotifyFramesAcked(*info, ack_delay_time); - if (session_decides_what_to_write() && !new_data_acked && - info->transmission_type != NOT_RETRANSMISSION) { - // Record as a spurious retransmission if this packet is a retransmission - // and no new data gets acked. - QUIC_DVLOG(1) << "Detect spurious retransmitted packet " << packet_number - << " transmission type: " - << QuicUtils::TransmissionTypeToString( - info->transmission_type); - RecordSpuriousRetransmissions(*info, packet_number); + // Try to aggregate acked stream frames if acked packet is not a + // retransmission. + const bool fast_path = aggregate_acked_stream_frames_ && + session_decides_what_to_write() && + info->transmission_type == NOT_RETRANSMISSION; + if (fast_path) { + unacked_packets_.MaybeAggregateAckedStreamFrame(*info, ack_delay_time); + } else { + if (aggregate_acked_stream_frames_ && session_decides_what_to_write()) { + unacked_packets_.NotifyAggregatedStreamFrameAcked(ack_delay_time); + } + const bool new_data_acked = + unacked_packets_.NotifyFramesAcked(*info, ack_delay_time); + if (session_decides_what_to_write() && !new_data_acked && + info->transmission_type != NOT_RETRANSMISSION) { + // Record as a spurious retransmission if this packet is a + // retransmission and no new data gets acked. + QUIC_DVLOG(1) << "Detect spurious retransmitted packet " + << packet_number << " transmission type: " + << QuicUtils::TransmissionTypeToString( + info->transmission_type); + RecordSpuriousRetransmissions(*info, packet_number); + } } } else { DCHECK(!session_decides_what_to_write());
diff --git a/net/third_party/quic/core/quic_sent_packet_manager.h b/net/third_party/quic/core/quic_sent_packet_manager.h index 85e7b48..b8be28a 100644 --- a/net/third_party/quic/core/quic_sent_packet_manager.h +++ b/net/third_party/quic/core/quic_sent_packet_manager.h
@@ -553,6 +553,9 @@ // A reverse iterator of last_ack_frame_.packets. This is reset in // OnAckRangeStart, and gradually moves in OnAckRange.. PacketNumberQueue::const_reverse_iterator acked_packets_iter_; + + // Latched value of quic_reloadable_flag_quic_aggregate_acked_stream_frames. + const bool aggregate_acked_stream_frames_; }; } // namespace quic
diff --git a/net/third_party/quic/core/quic_session.cc b/net/third_party/quic/core/quic_session.cc index 41a1d65..e3bdb1d 100644 --- a/net/third_party/quic/core/quic_session.cc +++ b/net/third_party/quic/core/quic_session.cc
@@ -49,9 +49,15 @@ perspective() == Perspective::IS_SERVER, nullptr), currently_writing_stream_id_(0), + largest_static_stream_id_(0), goaway_sent_(false), goaway_received_(false), - control_frame_manager_(this) {} + faster_get_stream_(GetQuicReloadableFlag(quic_session_faster_get_stream)), + control_frame_manager_(this) { + if (faster_get_stream_) { + QUIC_FLAG_COUNT(quic_reloadable_flag_quic_session_faster_get_stream); + } +} void QuicSession::Initialize() { connection_->set_visitor(this); @@ -59,8 +65,12 @@ connection_->SetDataProducer(this); connection_->SetFromConfig(config_); + // Make sure connection and control frame manager latch the same flag values. + connection_->set_donot_retransmit_old_window_updates( + control_frame_manager_.donot_retransmit_old_window_updates()); + DCHECK_EQ(kCryptoStreamId, GetMutableCryptoStream()->id()); - static_stream_map_[kCryptoStreamId] = GetMutableCryptoStream(); + RegisterStaticStream(kCryptoStreamId, GetMutableCryptoStream()); } QuicSession::~QuicSession() { @@ -77,6 +87,14 @@ QUIC_LOG_IF(WARNING, !zombie_streams_.empty()) << "Still have zombie streams"; } +void QuicSession::RegisterStaticStream(QuicStreamId id, QuicStream* stream) { + static_stream_map_[id] = stream; + + if (faster_get_stream_) { + largest_static_stream_id_ = std::max(id, largest_static_stream_id_); + } +} + void QuicSession::OnStreamFrame(const QuicStreamFrame& frame) { // TODO(rch) deal with the error case of stream id 0. QuicStreamId stream_id = frame.stream_id; @@ -1012,9 +1030,18 @@ } QuicStream* QuicSession::GetStream(QuicStreamId id) const { - auto static_stream = static_stream_map_.find(id); - if (static_stream != static_stream_map_.end()) { - return static_stream->second; + if (faster_get_stream_) { + if (id <= largest_static_stream_id_) { + auto static_stream = static_stream_map_.find(id); + if (static_stream != static_stream_map_.end()) { + return static_stream->second; + } + } + } else { + auto static_stream = static_stream_map_.find(id); + if (static_stream != static_stream_map_.end()) { + return static_stream->second; + } } auto active_stream = dynamic_stream_map_.find(id); if (active_stream != dynamic_stream_map_.end()) {
diff --git a/net/third_party/quic/core/quic_session.h b/net/third_party/quic/core/quic_session.h index b5093e6e..00ce187 100644 --- a/net/third_party/quic/core/quic_session.h +++ b/net/third_party/quic/core/quic_session.h
@@ -372,7 +372,9 @@ // Return true if given stream is peer initiated. bool IsIncomingStream(QuicStreamId id) const; - StaticStreamMap& static_streams() { return static_stream_map_; } + // Register (|id|, |stream|) with the static stream map. Override previous + // registrations with the same id. + void RegisterStaticStream(QuicStreamId id, QuicStream* stream); const StaticStreamMap& static_streams() const { return static_stream_map_; } DynamicStreamMap& dynamic_streams() { return dynamic_stream_map_; } @@ -541,12 +543,18 @@ // call stack of OnCanWrite. QuicStreamId currently_writing_stream_id_; + // The largest stream id in |static_stream_map_|. + QuicStreamId largest_static_stream_id_; + // Whether a GoAway has been sent. bool goaway_sent_; // Whether a GoAway has been received. bool goaway_received_; + // Latched value of quic_reloadable_flag_quic_session_faster_get_stream. + const bool faster_get_stream_; + QuicControlFrameManager control_frame_manager_; // TODO(fayang): switch to linked_hash_set when chromium supports it. The bool
diff --git a/net/third_party/quic/core/quic_stream.cc b/net/third_party/quic/core/quic_stream.cc index 98c4be6..7f7d0a6c 100644 --- a/net/third_party/quic/core/quic_stream.cc +++ b/net/third_party/quic/core/quic_stream.cc
@@ -230,7 +230,6 @@ } void QuicStream::SetPriority(SpdyPriority priority) { - DCHECK_EQ(0u, stream_bytes_written()); priority_ = priority; session_->UpdateStreamPriority(id(), priority); }
diff --git a/net/third_party/quic/core/quic_transmission_info.h b/net/third_party/quic/core/quic_transmission_info.h index 1d93be2..b82b2c6 100644 --- a/net/third_party/quic/core/quic_transmission_info.h +++ b/net/third_party/quic/core/quic_transmission_info.h
@@ -50,6 +50,8 @@ int16_t num_padding_bytes; // Stores the packet number of the next retransmission of this packet. // Zero if the packet has not been retransmitted. + // TODO(fayang): rename this to first_sent_after_loss_ when deprecating + // QUIC_VERSION_41. QuicPacketNumber retransmission; // The largest_acked in the ack frame, if the packet contains an ack. QuicPacketNumber largest_acked;
diff --git a/net/third_party/quic/core/quic_unacked_packet_map.cc b/net/third_party/quic/core/quic_unacked_packet_map.cc index a707bcf7..f4692a2 100644 --- a/net/third_party/quic/core/quic_unacked_packet_map.cc +++ b/net/third_party/quic/core/quic_unacked_packet_map.cc
@@ -7,6 +7,7 @@ #include "net/third_party/quic/core/quic_connection_stats.h" #include "net/third_party/quic/core/quic_utils.h" #include "net/third_party/quic/platform/api/quic_bug_tracker.h" +#include "net/third_party/quic/platform/api/quic_flag_utils.h" namespace quic { @@ -20,7 +21,9 @@ pending_crypto_packet_count_(0), last_crypto_packet_sent_time_(QuicTime::Zero()), session_notifier_(nullptr), - session_decides_what_to_write_(false) {} + session_decides_what_to_write_(false), + fix_is_useful_for_retransmission_( + GetQuicReloadableFlag(quic_fix_is_useful_for_retrans)) {} QuicUnackedPacketMap::~QuicUnackedPacketMap() { for (QuicTransmissionInfo& transmission_info : unacked_packets_) { @@ -170,6 +173,9 @@ QuicTransmissionInfo* info) { if (session_decides_what_to_write_) { DeleteFrames(&info->retransmittable_frames); + if (fix_is_useful_for_retransmission_) { + info->retransmission = 0; + } return; } while (info->retransmission != 0) { @@ -218,11 +224,20 @@ bool QuicUnackedPacketMap::IsPacketUsefulForRetransmittableData( const QuicTransmissionInfo& info) const { - // Packet may have retransmittable frames, or the data may have been - // retransmitted with a new packet number. - return HasRetransmittableFrames(info) || - // Allow for an extra 1 RTT before stopping to track old packets. - info.retransmission > largest_acked_; + if (!session_decides_what_to_write_ || !fix_is_useful_for_retransmission_) { + // Packet may have retransmittable frames, or the data may have been + // retransmitted with a new packet number. + // Allow for an extra 1 RTT before stopping to track old packets. + return info.retransmission > largest_acked_ || + HasRetransmittableFrames(info); + } + + // Wait for 1 RTT before giving up on the lost packet. + if (info.retransmission > largest_acked_) { + QUIC_FLAG_COUNT(quic_reloadable_flag_quic_fix_is_useful_for_retrans); + return true; + } + return false; } bool QuicUnackedPacketMap::IsPacketUseless( @@ -395,6 +410,59 @@ session_notifier_->RetransmitFrames(info.retransmittable_frames, type); } +void QuicUnackedPacketMap::MaybeAggregateAckedStreamFrame( + const QuicTransmissionInfo& info, + QuicTime::Delta ack_delay) { + if (session_notifier_ == nullptr) { + return; + } + for (const auto& frame : info.retransmittable_frames) { + // Determine whether acked stream frame can be aggregated. + const bool can_aggregate = + frame.type == STREAM_FRAME && + frame.stream_frame->stream_id == aggregated_stream_frame_.stream_id && + frame.stream_frame->offset == aggregated_stream_frame_.offset + + aggregated_stream_frame_.data_length; + if (can_aggregate) { + // Aggregate stream frame. + aggregated_stream_frame_.data_length += frame.stream_frame->data_length; + aggregated_stream_frame_.fin = frame.stream_frame->fin; + if (aggregated_stream_frame_.fin) { + // Notify session notifier aggregated stream frame gets acked if fin is + // acked. + NotifyAggregatedStreamFrameAcked(ack_delay); + } + continue; + } + + NotifyAggregatedStreamFrameAcked(ack_delay); + if (frame.type != STREAM_FRAME || frame.stream_frame->fin) { + session_notifier_->OnFrameAcked(frame, ack_delay); + continue; + } + + // Delay notifying session notifier stream frame gets acked in case it can + // be aggregated with following acked ones. + aggregated_stream_frame_.stream_id = frame.stream_frame->stream_id; + aggregated_stream_frame_.offset = frame.stream_frame->offset; + aggregated_stream_frame_.data_length = frame.stream_frame->data_length; + aggregated_stream_frame_.fin = frame.stream_frame->fin; + } +} + +void QuicUnackedPacketMap::NotifyAggregatedStreamFrameAcked( + QuicTime::Delta ack_delay) { + if (aggregated_stream_frame_.stream_id == kInvalidStreamId || + session_notifier_ == nullptr) { + // Aggregated stream frame is empty. + return; + } + session_notifier_->OnFrameAcked(QuicFrame(&aggregated_stream_frame_), + ack_delay); + // Clear aggregated stream frame. + aggregated_stream_frame_.stream_id = kInvalidStreamId; +} + void QuicUnackedPacketMap::SetSessionDecideWhatToWrite( bool session_decides_what_to_write) { if (largest_sent_packet_ > 0) {
diff --git a/net/third_party/quic/core/quic_unacked_packet_map.h b/net/third_party/quic/core/quic_unacked_packet_map.h index 656fbca..a12436d 100644 --- a/net/third_party/quic/core/quic_unacked_packet_map.h +++ b/net/third_party/quic/core/quic_unacked_packet_map.h
@@ -165,6 +165,17 @@ // RTT measurement purposes. void RemoveObsoletePackets(); + // Try to aggregate acked contiguous stream frames. For noncontiguous stream + // frames or control frames, notify the session notifier they get acked + // immediately. + void MaybeAggregateAckedStreamFrame(const QuicTransmissionInfo& info, + QuicTime::Delta ack_delay); + + // Notify the session notifier of any stream data aggregated in + // aggregated_stream_frame_. No effect if the stream frame has an invalid + // stream id. + void NotifyAggregatedStreamFrameAcked(QuicTime::Delta ack_delay); + // Called to start/stop letting session decide what to write. void SetSessionDecideWhatToWrite(bool session_decides_what_to_write); @@ -174,6 +185,10 @@ return session_decides_what_to_write_; } + bool fix_is_useful_for_retransmission() const { + return fix_is_useful_for_retransmission_; + } + private: // Called when a packet is retransmitted with a new packet number. // |old_packet_number| will remain unacked, but will have no @@ -228,11 +243,18 @@ // Time that the last unacked crypto packet was sent. QuicTime last_crypto_packet_sent_time_; + // Aggregates acked stream data across multiple acked sent packets to save CPU + // by reducing the number of calls to the session notifier. + QuicStreamFrame aggregated_stream_frame_; + // Receives notifications of frames being retransmitted or acknowledged. SessionNotifierInterface* session_notifier_; // If true, let session decides what to write. bool session_decides_what_to_write_; + + // Latched value of quic_reloadable_flag_quic_fix_is_useful_for_retrans. + const bool fix_is_useful_for_retransmission_; }; } // namespace quic
diff --git a/net/third_party/quic/core/quic_unacked_packet_map_test.cc b/net/third_party/quic/core/quic_unacked_packet_map_test.cc index 296d313..8fefd321 100644 --- a/net/third_party/quic/core/quic_unacked_packet_map_test.cc +++ b/net/third_party/quic/core/quic_unacked_packet_map_test.cc
@@ -132,10 +132,10 @@ transmission_type, now_, true); return; } - const QuicTransmissionInfo& info = - unacked_packets_.GetTransmissionInfo(old_packet_number); + QuicTransmissionInfo* info = + unacked_packets_.GetMutableTransmissionInfo(old_packet_number); QuicStreamId stream_id = kHeadersStreamId; - for (const auto& frame : info.retransmittable_frames) { + for (const auto& frame : info->retransmittable_frames) { if (frame.type == STREAM_FRAME) { stream_id = frame.stream_frame->stream_id; break; @@ -144,6 +144,7 @@ UpdatePacketState( old_packet_number, QuicUtils::RetransmissionTypeToPacketState(transmission_type)); + info->retransmission = new_packet_number; SerializedPacket packet( CreateRetransmittablePacketForStream(new_packet_number, stream_id)); unacked_packets_.AddSentPacket(&packet, 0, transmission_type, now_, true); @@ -355,8 +356,13 @@ std::vector<QuicPacketNumber> unacked3; std::vector<QuicPacketNumber> retransmittable3; if (unacked_packets_.session_decides_what_to_write()) { - unacked3 = {1, 3, 5, 6}; - retransmittable3 = {1, 3, 5, 6}; + if (unacked_packets_.fix_is_useful_for_retransmission()) { + unacked3 = {3, 5, 6}; + retransmittable3 = {3, 5, 6}; + } else { + unacked3 = {1, 3, 5, 6}; + retransmittable3 = {1, 3, 5, 6}; + } } else { unacked3 = {3, 5, 6}; retransmittable3 = {5, 6}; @@ -375,8 +381,13 @@ std::vector<QuicPacketNumber> unacked4; std::vector<QuicPacketNumber> retransmittable4; if (unacked_packets_.session_decides_what_to_write()) { - unacked4 = {1, 3, 5, 7}; - retransmittable4 = {1, 3, 5, 7}; + if (unacked_packets_.fix_is_useful_for_retransmission()) { + unacked4 = {3, 5, 7}; + retransmittable4 = {3, 5, 7}; + } else { + unacked4 = {1, 3, 5, 7}; + retransmittable4 = {1, 3, 5, 7}; + } } else { unacked4 = {3, 5, 7}; retransmittable4 = {7}; @@ -453,7 +464,11 @@ std::vector<QuicPacketNumber> unacked4; if (unacked_packets_.session_decides_what_to_write()) { - unacked4 = {1, 3, 4, 6}; + if (unacked_packets_.fix_is_useful_for_retransmission()) { + unacked4 = {4, 6}; + } else { + unacked4 = {1, 3, 4, 6}; + } } else { unacked4 = {4, 6}; } @@ -462,7 +477,11 @@ VerifyInFlightPackets(pending4, QUIC_ARRAYSIZE(pending4)); std::vector<QuicPacketNumber> retransmittable4; if (unacked_packets_.session_decides_what_to_write()) { - retransmittable4 = {1, 3, 4, 6}; + if (unacked_packets_.fix_is_useful_for_retransmission()) { + retransmittable4 = {4, 6}; + } else { + retransmittable4 = {1, 3, 4, 6}; + } } else { retransmittable4 = {6}; } @@ -487,6 +506,74 @@ EXPECT_EQ(5u, unacked_packets_.largest_sent_packet()); } +TEST_P(QuicUnackedPacketMapTest, AggregateContiguousAckedStreamFrames) { + testing::InSequence s; + EXPECT_CALL(notifier_, OnFrameAcked(_, _)).Times(0); + unacked_packets_.NotifyAggregatedStreamFrameAcked(QuicTime::Delta::Zero()); + + QuicTransmissionInfo info1; + QuicStreamFrame stream_frame1(3, false, 0, 100); + info1.retransmittable_frames.push_back(QuicFrame(&stream_frame1)); + + QuicTransmissionInfo info2; + QuicStreamFrame stream_frame2(3, false, 100, 100); + info2.retransmittable_frames.push_back(QuicFrame(&stream_frame2)); + + QuicTransmissionInfo info3; + QuicStreamFrame stream_frame3(3, false, 200, 100); + info3.retransmittable_frames.push_back(QuicFrame(&stream_frame3)); + + QuicTransmissionInfo info4; + QuicStreamFrame stream_frame4(3, true, 300, 0); + info4.retransmittable_frames.push_back(QuicFrame(&stream_frame4)); + + // Verify stream frames are aggregated. + EXPECT_CALL(notifier_, OnFrameAcked(_, _)).Times(0); + unacked_packets_.MaybeAggregateAckedStreamFrame(info1, + QuicTime::Delta::Zero()); + EXPECT_CALL(notifier_, OnFrameAcked(_, _)).Times(0); + unacked_packets_.MaybeAggregateAckedStreamFrame(info2, + QuicTime::Delta::Zero()); + EXPECT_CALL(notifier_, OnFrameAcked(_, _)).Times(0); + unacked_packets_.MaybeAggregateAckedStreamFrame(info3, + QuicTime::Delta::Zero()); + + // Verify aggregated stream frame gets acked since fin is acked. + EXPECT_CALL(notifier_, OnFrameAcked(_, _)).Times(1); + unacked_packets_.MaybeAggregateAckedStreamFrame(info4, + QuicTime::Delta::Zero()); +} + +TEST_P(QuicUnackedPacketMapTest, CannotAggregateAckedControlFrames) { + testing::InSequence s; + QuicWindowUpdateFrame window_update(1, 5, 100); + QuicStreamFrame stream_frame1(3, false, 0, 100); + QuicStreamFrame stream_frame2(3, false, 100, 100); + QuicBlockedFrame blocked(2, 5); + QuicGoAwayFrame go_away(3, QUIC_PEER_GOING_AWAY, 5, "Going away."); + + QuicTransmissionInfo info1; + info1.retransmittable_frames.push_back(QuicFrame(&window_update)); + info1.retransmittable_frames.push_back(QuicFrame(&stream_frame1)); + info1.retransmittable_frames.push_back(QuicFrame(&stream_frame2)); + + QuicTransmissionInfo info2; + info2.retransmittable_frames.push_back(QuicFrame(&blocked)); + info2.retransmittable_frames.push_back(QuicFrame(&go_away)); + + // Verify 2 contiguous stream frames are aggregated. + EXPECT_CALL(notifier_, OnFrameAcked(_, _)).Times(1); + unacked_packets_.MaybeAggregateAckedStreamFrame(info1, + QuicTime::Delta::Zero()); + // Verify aggregated stream frame gets acked. + EXPECT_CALL(notifier_, OnFrameAcked(_, _)).Times(3); + unacked_packets_.MaybeAggregateAckedStreamFrame(info2, + QuicTime::Delta::Zero()); + + EXPECT_CALL(notifier_, OnFrameAcked(_, _)).Times(0); + unacked_packets_.NotifyAggregatedStreamFrameAcked(QuicTime::Delta::Zero()); +} + } // namespace } // namespace test } // namespace quic
diff --git a/net/third_party/quic/quartc/quartc_packet_writer.cc b/net/third_party/quic/quartc/quartc_packet_writer.cc index ba1709d..340f23e 100644 --- a/net/third_party/quic/quartc/quartc_packet_writer.cc +++ b/net/third_party/quic/quartc/quartc_packet_writer.cc
@@ -64,4 +64,9 @@ return WriteResult(WRITE_STATUS_OK, 0); } +void QuartcPacketWriter::SetPacketTransportDelegate( + QuartcPacketTransport::Delegate* delegate) { + packet_transport_->SetDelegate(delegate); +} + } // namespace quic
diff --git a/net/third_party/quic/quartc/quartc_packet_writer.h b/net/third_party/quic/quartc/quartc_packet_writer.h index a4dca96..cc7b7074 100644 --- a/net/third_party/quic/quartc/quartc_packet_writer.h +++ b/net/third_party/quic/quartc/quartc_packet_writer.h
@@ -21,6 +21,20 @@ QuicPacketNumber packet_number; }; + // Delegate for packet transport callbacks. Note that the delegate is not + // thread-safe. Packet transport implementations must ensure that callbacks + // are synchronized with all other work done by QUIC. + class Delegate { + public: + virtual ~Delegate() = default; + + // Called whenever the transport can write. + virtual void OnTransportCanWrite() = 0; + + // Called when the transport receives a packet. + virtual void OnTransportReceived(const char* data, size_t data_len) = 0; + }; + virtual ~QuartcPacketTransport() {} // Called by the QuartcPacketWriter when writing packets to the network. @@ -28,6 +42,13 @@ virtual int Write(const char* buffer, size_t buf_len, const PacketInfo& info) = 0; + + // Sets the delegate which must be called when the transport can write or + // a packet is received. QUIC sets |delegate| to a nonnull pointer when it + // is ready to process incoming packets and sets |delegate| to nullptr before + // QUIC is deleted. Implementations may assume |delegate| remains valid until + // it is set to nullptr. + virtual void SetDelegate(Delegate* delegate) = 0; }; // Implements a QuicPacketWriter using a QuartcPacketTransport, which allows a @@ -75,6 +96,8 @@ // be set in order to attach packet info (eg. packet numbers) to writes. void set_connection(QuicConnection* connection) { connection_ = connection; } + void SetPacketTransportDelegate(QuartcPacketTransport::Delegate* delegate); + private: // QuartcPacketWriter will not own the transport. QuartcPacketTransport* packet_transport_;
diff --git a/net/third_party/quic/quartc/quartc_session.cc b/net/third_party/quic/quartc/quartc_session.cc index 602ea19..a45bfda 100644 --- a/net/third_party/quic/quartc/quartc_session.cc +++ b/net/third_party/quic/quartc/quartc_session.cc
@@ -203,12 +203,33 @@ } } +void QuartcSession::OnCongestionWindowChange(QuicTime now) { + DCHECK(session_delegate_); + const RttStats* rtt_stats = connection_->sent_packet_manager().GetRttStats(); + + QuicBandwidth bandwidth_estimate = + connection_->sent_packet_manager().BandwidthEstimate(); + + QuicByteCount in_flight = + connection_->sent_packet_manager().GetBytesInFlight(); + QuicBandwidth pacing_rate = + connection_->sent_packet_manager().GetSendAlgorithm()->PacingRate( + in_flight); + + session_delegate_->OnCongestionControlChange(bandwidth_estimate, pacing_rate, + rtt_stats->latest_rtt()); +} + void QuartcSession::OnConnectionClosed(QuicErrorCode error, const QuicString& error_details, ConnectionCloseSource source) { QuicSession::OnConnectionClosed(error, error_details, source); DCHECK(session_delegate_); session_delegate_->OnConnectionClosed(error, error_details, source); + + // The session may be deleted after OnConnectionClosed(), so |this| must be + // removed from the packet transport's delegate before it is deleted. + packet_writer_->SetPacketTransportDelegate(nullptr); } void QuartcSession::SetPreSharedKey(QuicStringPiece key) { @@ -240,6 +261,10 @@ crypto_stream_.reset(crypto_stream); QuicSession::Initialize(); } + + // QUIC is ready to process incoming packets after QuicSession::Initialize(). + // Set the packet transport delegate to begin receiving packets. + packet_writer_->SetPacketTransportDelegate(this); } void QuartcSession::CloseConnection(const QuicString& details) { @@ -263,11 +288,10 @@ } } -bool QuartcSession::OnTransportReceived(const char* data, size_t data_len) { +void QuartcSession::OnTransportReceived(const char* data, size_t data_len) { QuicReceivedPacket packet(data, data_len, clock_->Now()); ProcessUdpPacket(connection()->self_address(), connection()->peer_address(), packet); - return true; } void QuartcSession::OnProofValid(
diff --git a/net/third_party/quic/quartc/quartc_session.h b/net/third_party/quic/quartc/quartc_session.h index 82a43338..edd3802 100644 --- a/net/third_party/quic/quartc/quartc_session.h +++ b/net/third_party/quic/quartc/quartc_session.h
@@ -32,6 +32,7 @@ // QuartcSession owns and manages a QUIC connection. class QUIC_EXPORT_PRIVATE QuartcSession : public QuicSession, + public QuartcPacketTransport::Delegate, public QuicCryptoClientStream::ProofHandler { public: QuartcSession(std::unique_ptr<QuicConnection> connection, @@ -55,6 +56,8 @@ void OnCryptoHandshakeEvent(CryptoHandshakeEvent event) override; // QuicConnectionVisitorInterface overrides. + void OnCongestionWindowChange(QuicTime now) override; + void OnConnectionClosed(QuicErrorCode error, const QuicString& error_details, ConnectionCloseSource source) override; @@ -97,6 +100,11 @@ // Called when a new stream is received from the remote endpoint. virtual void OnIncomingStream(QuartcStream* stream) = 0; + // Called when network parameters change in response to an ack frame. + virtual void OnCongestionControlChange(QuicBandwidth bandwidth_estimate, + QuicBandwidth pacing_rate, + QuicTime::Delta latest_rtt) = 0; + // Called when the connection is closed. This means all of the streams will // be closed and no new streams can be created. virtual void OnConnectionClosed(QuicErrorCode error_code, @@ -110,11 +118,11 @@ void SetDelegate(Delegate* session_delegate); // Called when CanWrite() changes from false to true. - void OnTransportCanWrite(); + void OnTransportCanWrite() override; // Called when a packet has been received and should be handled by the // QuicConnection. - bool OnTransportReceived(const char* data, size_t data_len); + void OnTransportReceived(const char* data, size_t data_len) override; // ProofHandler overrides. void OnProofValid(const QuicCryptoClientConfig::CachedState& cached) override;
diff --git a/net/third_party/quic/quartc/quartc_session_test.cc b/net/third_party/quic/quartc/quartc_session_test.cc index f098b07..1b2d988e 100644 --- a/net/third_party/quic/quartc/quartc_session_test.cc +++ b/net/third_party/quic/quartc/quartc_session_test.cc
@@ -110,38 +110,41 @@ alarms_{alarm_later_}; }; -// Used by the FakeTransportChannel. -class FakeTransportChannelObserver { +// Fake QuartcPacketTransport. Assumes all methods run on the main test thread. +class FakePacketTransport : public QuartcPacketTransport { public: - virtual ~FakeTransportChannelObserver() {} - - // Called when the other peer is trying to send message. - virtual void OnTransportChannelReadPacket(const QuicString& data) = 0; -}; - -// Simulate the P2P communication transport. Used by the -// QuartcSession::Transport. -class FakeTransportChannel : QuicAlarm::Delegate { - public: - explicit FakeTransportChannel(QuicAlarmFactory* alarm_factory, - MockClock* clock) + explicit FakePacketTransport(QuicAlarmFactory* alarm_factory, + MockClock* clock) : alarm_(alarm_factory->CreateAlarm(new AlarmDelegate(this))), clock_(clock) {} - void SetDestination(FakeTransportChannel* dest) { + void SetDestination(FakePacketTransport* dest) { if (!dest_) { dest_ = dest; dest_->SetDestination(this); } + if (delegate_) { + delegate_->OnTransportCanWrite(); + } } - int SendPacket(const char* data, size_t len) { + int Write(const char* data, + size_t len, + const QuartcPacketTransport::PacketInfo& info) { // If the destination is not set. if (!dest_) { return -1; } + // Advance the time 10us to ensure the RTT is never 0ms. clock_->AdvanceTime(QuicTime::Delta::FromMicroseconds(10)); + + if (packets_to_lose_ > 0) { + --packets_to_lose_; + return len; + } + last_packet_number_ = info.packet_number; + if (async_) { packet_queue_.emplace_back(data, len); alarm_->Cancel(); @@ -152,32 +155,40 @@ return static_cast<int>(len); } - FakeTransportChannelObserver* observer() { return observer_; } + QuartcPacketTransport::Delegate* delegate() { return delegate_; } - void SetObserver(FakeTransportChannelObserver* observer) { - observer_ = observer; + void SetDelegate(QuartcPacketTransport::Delegate* delegate) override { + delegate_ = delegate; + if (dest_ && delegate_) { + delegate_->OnTransportCanWrite(); + } } void SetAsync(bool async) { async_ = async; } + QuicPacketNumber last_packet_number() { return last_packet_number_; } + + void set_packets_to_lose(QuicPacketCount count) { packets_to_lose_ = count; } + private: class AlarmDelegate : public QuicAlarm::Delegate { public: - explicit AlarmDelegate(FakeTransportChannel* channel) : channel_(channel) {} + explicit AlarmDelegate(FakePacketTransport* transport) + : transport_(transport) {} - void OnAlarm() override { channel_->OnAlarm(); } + void OnAlarm() override { transport_->OnAlarm(); } private: - FakeTransportChannel* channel_; + FakePacketTransport* transport_; }; void Send(const QuicString& data) { DCHECK(dest_); - DCHECK(dest_->observer()); - dest_->observer()->OnTransportChannelReadPacket(data); + DCHECK(dest_->delegate()); + dest_->delegate()->OnTransportReceived(data.data(), data.size()); } - void OnAlarm() override { + void OnAlarm() { QUIC_LOG(WARNING) << "Sending packet: " << packet_queue_.front(); Send(packet_queue_.front()); packet_queue_.pop_front(); @@ -189,9 +200,9 @@ } // The writing destination of this channel. - FakeTransportChannel* dest_ = nullptr; - // The observer of this channel. Called when the received the data. - FakeTransportChannelObserver* observer_ = nullptr; + FakePacketTransport* dest_ = nullptr; + // Packet transport delegate. Called when data is received. + QuartcPacketTransport::Delegate* delegate_ = nullptr; // If async, will send packets by running asynchronous tasks. bool async_ = false; // If async, packets are queued here to send. @@ -200,31 +211,7 @@ QuicArenaScopedPtr<QuicAlarm> alarm_; // The test clock. Used to ensure the RTT is not 0. MockClock* clock_; -}; -// Used by the QuartcPacketWriter. -class FakeTransport : public QuartcPacketTransport { - public: - explicit FakeTransport(FakeTransportChannel* channel) : channel_(channel) {} - - int Write(const char* buffer, - size_t buf_len, - const PacketInfo& info) override { - DCHECK(channel_); - if (packets_to_lose_ > 0) { - --packets_to_lose_; - return buf_len; - } - last_packet_number_ = info.packet_number; - return channel_->SendPacket(buffer, buf_len); - } - - QuicPacketNumber last_packet_number() { return last_packet_number_; } - - void set_packets_to_lose(QuicPacketCount count) { packets_to_lose_ = count; } - - private: - FakeTransportChannel* channel_; QuicPacketNumber last_packet_number_; QuicPacketCount packets_to_lose_ = 0; }; @@ -249,6 +236,10 @@ last_incoming_stream_->SetDelegate(stream_delegate_); } + void OnCongestionControlChange(QuicBandwidth bandwidth_estimate, + QuicBandwidth pacing_rate, + QuicTime::Delta latest_rtt) override {} + QuartcStream* incoming_stream() { return last_incoming_stream_; } bool connected() { return connected_; } @@ -273,6 +264,7 @@ void OnBufferChanged(QuartcStream* stream) override {} + bool has_data() { return !received_data_.empty(); } std::map<QuicStreamId, QuicString> data() { return received_data_; } QuicRstStreamErrorCode stream_error(QuicStreamId id) { return errors_[id]; } @@ -282,50 +274,6 @@ std::map<QuicStreamId, QuicRstStreamErrorCode> errors_; }; -class QuartcSessionForTest : public QuartcSession, - public FakeTransportChannelObserver { - public: - QuartcSessionForTest(std::unique_ptr<QuicConnection> connection, - const QuicConfig& config, - const QuicString& remote_fingerprint_value, - Perspective perspective, - QuicConnectionHelperInterface* helper, - QuicClock* clock, - std::unique_ptr<QuartcPacketWriter> writer) - : QuartcSession(std::move(connection), - config, - remote_fingerprint_value, - perspective, - helper, - clock, - std::move(writer)) { - stream_delegate_ = QuicMakeUnique<FakeQuartcStreamDelegate>(); - session_delegate_ = - QuicMakeUnique<FakeQuartcSessionDelegate>((stream_delegate_.get())); - - SetDelegate(session_delegate_.get()); - } - - // QuartcPacketWriter override. - void OnTransportChannelReadPacket(const QuicString& data) override { - OnTransportReceived(data.c_str(), data.length()); - } - - std::map<QuicStreamId, QuicString> data() { return stream_delegate_->data(); } - - bool has_data() { return !data().empty(); } - - FakeQuartcSessionDelegate* session_delegate() { - return session_delegate_.get(); - } - - FakeQuartcStreamDelegate* stream_delegate() { return stream_delegate_.get(); } - - private: - std::unique_ptr<FakeQuartcStreamDelegate> stream_delegate_; - std::unique_ptr<FakeQuartcSessionDelegate> session_delegate_; -}; - class QuartcSessionTest : public QuicTest, public QuicConnectionHelperInterface { public: @@ -334,25 +282,27 @@ void Init() { // Quic crashes if packets are sent at time 0, and the clock defaults to 0. clock_.AdvanceTime(QuicTime::Delta::FromMilliseconds(1000)); - client_channel_ = - QuicMakeUnique<FakeTransportChannel>(&alarm_factory_, &clock_); - server_channel_ = - QuicMakeUnique<FakeTransportChannel>(&alarm_factory_, &clock_); + client_transport_ = + QuicMakeUnique<FakePacketTransport>(&alarm_factory_, &clock_); + server_transport_ = + QuicMakeUnique<FakePacketTransport>(&alarm_factory_, &clock_); // Make the channel asynchronous so that two peer will not keep calling each // other when they exchange information. - client_channel_->SetAsync(true); - client_channel_->SetDestination(server_channel_.get()); - - client_transport_ = QuicMakeUnique<FakeTransport>(client_channel_.get()); - server_transport_ = QuicMakeUnique<FakeTransport>(server_channel_.get()); + client_transport_->SetAsync(true); + client_transport_->SetDestination(server_transport_.get()); client_writer_ = QuicMakeUnique<QuartcPacketWriter>(client_transport_.get(), kDefaultMaxPacketSize); server_writer_ = QuicMakeUnique<QuartcPacketWriter>(server_transport_.get(), kDefaultMaxPacketSize); - client_writer_->SetWritable(); - server_writer_->SetWritable(); + client_stream_delegate_ = QuicMakeUnique<FakeQuartcStreamDelegate>(); + client_session_delegate_ = QuicMakeUnique<FakeQuartcSessionDelegate>( + client_stream_delegate_.get()); + + server_stream_delegate_ = QuicMakeUnique<FakeQuartcStreamDelegate>(); + server_session_delegate_ = QuicMakeUnique<FakeQuartcSessionDelegate>( + server_stream_delegate_.get()); } // The parameters are used to control whether the handshake will success or @@ -361,23 +311,22 @@ Init(); client_peer_ = CreateSession(Perspective::IS_CLIENT, std::move(client_writer_)); + client_peer_->SetDelegate(client_session_delegate_.get()); server_peer_ = CreateSession(Perspective::IS_SERVER, std::move(server_writer_)); - - client_channel_->SetObserver(client_peer_.get()); - server_channel_->SetObserver(server_peer_.get()); + server_peer_->SetDelegate(server_session_delegate_.get()); } - std::unique_ptr<QuartcSessionForTest> CreateSession( + std::unique_ptr<QuartcSession> CreateSession( Perspective perspective, std::unique_ptr<QuartcPacketWriter> writer) { std::unique_ptr<QuicConnection> quic_connection = CreateConnection(perspective, writer.get()); QuicString remote_fingerprint_value = "value"; QuicConfig config; - return QuicMakeUnique<QuartcSessionForTest>( - std::move(quic_connection), config, remote_fingerprint_value, - perspective, this, &clock_, std::move(writer)); + return QuicMakeUnique<QuartcSession>(std::move(quic_connection), config, + remote_fingerprint_value, perspective, + this, &clock_, std::move(writer)); } std::unique_ptr<QuicConnection> CreateConnection(Perspective perspective, @@ -413,7 +362,7 @@ ASSERT_NE(nullptr, outgoing_stream); EXPECT_TRUE(server_peer_->HasOpenDynamicStreams()); - outgoing_stream->SetDelegate(server_peer_->stream_delegate()); + outgoing_stream->SetDelegate(server_stream_delegate_.get()); // Send a test message from peer 1 to peer 2. char kTestMessage[] = "Hello"; @@ -423,15 +372,14 @@ RunTasks(); // Wait for peer 2 to receive messages. - ASSERT_TRUE(client_peer_->has_data()); + ASSERT_TRUE(client_stream_delegate_->has_data()); - QuartcStream* incoming = - client_peer_->session_delegate()->incoming_stream(); + QuartcStream* incoming = client_session_delegate_->incoming_stream(); ASSERT_TRUE(incoming); EXPECT_EQ(incoming->id(), stream_id); EXPECT_TRUE(client_peer_->HasOpenDynamicStreams()); - EXPECT_EQ(client_peer_->data()[stream_id], kTestMessage); + EXPECT_EQ(client_stream_delegate_->data()[stream_id], kTestMessage); // Send a test message from peer 2 to peer 1. char kTestResponse[] = "Response"; test::QuicTestMemSliceVector response( @@ -439,15 +387,15 @@ incoming->WriteMemSlices(response.span(), /*fin=*/false); RunTasks(); // Wait for peer 1 to receive messages. - ASSERT_TRUE(server_peer_->has_data()); + ASSERT_TRUE(server_stream_delegate_->has_data()); - EXPECT_EQ(server_peer_->data()[stream_id], kTestResponse); + EXPECT_EQ(server_stream_delegate_->data()[stream_id], kTestResponse); } // Test that client and server are not connected after handshake failure. void TestDisconnectAfterFailedHandshake() { - EXPECT_TRUE(!client_peer_->session_delegate()->connected()); - EXPECT_TRUE(!server_peer_->session_delegate()->connected()); + EXPECT_TRUE(!client_session_delegate_->connected()); + EXPECT_TRUE(!server_session_delegate_->connected()); EXPECT_FALSE(client_peer_->IsEncryptionEstablished()); EXPECT_FALSE(client_peer_->IsCryptoHandshakeConfirmed()); @@ -471,14 +419,17 @@ FakeAlarmFactory alarm_factory_{&clock_}; SimpleBufferAllocator buffer_allocator_; - std::unique_ptr<FakeTransportChannel> client_channel_; - std::unique_ptr<FakeTransportChannel> server_channel_; - std::unique_ptr<FakeTransport> client_transport_; - std::unique_ptr<FakeTransport> server_transport_; + std::unique_ptr<FakePacketTransport> client_transport_; + std::unique_ptr<FakePacketTransport> server_transport_; std::unique_ptr<QuartcPacketWriter> client_writer_; std::unique_ptr<QuartcPacketWriter> server_writer_; - std::unique_ptr<QuartcSessionForTest> client_peer_; - std::unique_ptr<QuartcSessionForTest> server_peer_; + std::unique_ptr<QuartcSession> client_peer_; + std::unique_ptr<QuartcSession> server_peer_; + + std::unique_ptr<FakeQuartcStreamDelegate> client_stream_delegate_; + std::unique_ptr<FakeQuartcSessionDelegate> client_session_delegate_; + std::unique_ptr<FakeQuartcStreamDelegate> server_stream_delegate_; + std::unique_ptr<FakeQuartcSessionDelegate> server_session_delegate_; }; TEST_F(QuartcSessionTest, StreamConnection) { @@ -513,7 +464,7 @@ uint32_t id = stream->id(); EXPECT_FALSE(client_peer_->IsClosedStream(id)); - stream->SetDelegate(client_peer_->stream_delegate()); + stream->SetDelegate(client_stream_delegate_.get()); client_peer_->CancelStream(id); EXPECT_EQ(stream->stream_error(), QuicRstStreamErrorCode::QUIC_STREAM_CANCELLED); @@ -527,7 +478,7 @@ ASSERT_TRUE(server_peer_->IsCryptoHandshakeConfirmed()); QuartcStream* stream = client_peer_->CreateOutgoingDynamicStream(); - stream->SetDelegate(client_peer_->stream_delegate()); + stream->SetDelegate(client_stream_delegate_.get()); char kClientMessage[] = "Hello"; test::QuicTestMemSliceVector stream_data( @@ -548,9 +499,9 @@ ASSERT_TRUE(server_peer_->IsCryptoHandshakeConfirmed()); client_peer_->CloseConnection("Connection closed by client"); - EXPECT_FALSE(client_peer_->session_delegate()->connected()); + EXPECT_FALSE(client_session_delegate_->connected()); RunTasks(); - EXPECT_FALSE(server_peer_->session_delegate()->connected()); + EXPECT_FALSE(server_session_delegate_->connected()); } TEST_F(QuartcSessionTest, StreamRetransmissionEnabled) { @@ -561,7 +512,7 @@ QuartcStream* stream = client_peer_->CreateOutgoingDynamicStream(); QuicStreamId stream_id = stream->id(); - stream->SetDelegate(client_peer_->stream_delegate()); + stream->SetDelegate(client_stream_delegate_.get()); stream->set_cancel_on_loss(false); client_transport_->set_packets_to_lose(1); @@ -573,8 +524,8 @@ RunTasks(); // Stream data should make it despite packet loss. - ASSERT_TRUE(server_peer_->has_data()); - EXPECT_EQ(server_peer_->data()[stream_id], kClientMessage); + ASSERT_TRUE(server_stream_delegate_->has_data()); + EXPECT_EQ(server_stream_delegate_->data()[stream_id], kClientMessage); } TEST_F(QuartcSessionTest, StreamRetransmissionDisabled) { @@ -585,7 +536,7 @@ QuartcStream* stream = client_peer_->CreateOutgoingDynamicStream(); QuicStreamId stream_id = stream->id(); - stream->SetDelegate(client_peer_->stream_delegate()); + stream->SetDelegate(client_stream_delegate_.get()); stream->set_cancel_on_loss(true); client_transport_->set_packets_to_lose(1); @@ -598,7 +549,7 @@ // Send another packet to trigger loss detection. QuartcStream* stream_1 = client_peer_->CreateOutgoingDynamicStream(); - stream_1->SetDelegate(client_peer_->stream_delegate()); + stream_1->SetDelegate(client_stream_delegate_.get()); char kMessage1[] = "Second message"; test::QuicTestMemSliceVector stream_data_1( @@ -608,13 +559,13 @@ // QUIC should try to retransmit the first stream by loss detection. Instead, // it will cancel itself. - EXPECT_THAT(server_peer_->data()[stream_id], testing::IsEmpty()); + EXPECT_THAT(server_stream_delegate_->data()[stream_id], testing::IsEmpty()); EXPECT_TRUE(client_peer_->IsClosedStream(stream_id)); EXPECT_TRUE(server_peer_->IsClosedStream(stream_id)); - EXPECT_EQ(client_peer_->stream_delegate()->stream_error(stream_id), + EXPECT_EQ(client_stream_delegate_->stream_error(stream_id), QUIC_STREAM_CANCELLED); - EXPECT_EQ(server_peer_->stream_delegate()->stream_error(stream_id), + EXPECT_EQ(server_stream_delegate_->stream_error(stream_id), QUIC_STREAM_CANCELLED); }
diff --git a/net/third_party/quic/test_tools/packet_dropping_test_writer.cc b/net/third_party/quic/test_tools/packet_dropping_test_writer.cc index 5f76151..921d0f8 100644 --- a/net/third_party/quic/test_tools/packet_dropping_test_writer.cc +++ b/net/third_party/quic/test_tools/packet_dropping_test_writer.cc
@@ -144,7 +144,7 @@ } std::unique_ptr<PerPacketOptions> delayed_options; if (options != nullptr) { - delayed_options.reset(options->Clone()); + delayed_options = options->Clone(); } delayed_packets_.push_back( DelayedWrite(buffer, buf_len, self_address, peer_address,
diff --git a/net/third_party/quic/test_tools/packet_reordering_writer.cc b/net/third_party/quic/test_tools/packet_reordering_writer.cc index f14ae43..c4436be 100644 --- a/net/third_party/quic/test_tools/packet_reordering_writer.cc +++ b/net/third_party/quic/test_tools/packet_reordering_writer.cc
@@ -37,7 +37,7 @@ delayed_self_address_ = self_address; delayed_peer_address_ = peer_address; if (options != nullptr) { - delayed_options_.reset(options->Clone()); + delayed_options_ = options->Clone(); } delay_next_ = false; return WriteResult(WRITE_STATUS_OK, buf_len);
diff --git a/net/third_party/quic/test_tools/quic_connection_peer.cc b/net/third_party/quic/test_tools/quic_connection_peer.cc index b7615fe..902c7036 100644 --- a/net/third_party/quic/test_tools/quic_connection_peer.cc +++ b/net/third_party/quic/test_tools/quic_connection_peer.cc
@@ -312,5 +312,13 @@ connection->version_negotiation_state_ = QuicConnection::NEGOTIATED_VERSION; } +// static +void QuicConnectionPeer::SetMaxConsecutiveNumPacketsWithNoRetransmittableFrames( + QuicConnection* connection, + size_t new_value) { + connection->max_consecutive_num_packets_with_no_retransmittable_frames_ = + new_value; +} + } // namespace test } // namespace quic
diff --git a/net/third_party/quic/test_tools/quic_connection_peer.h b/net/third_party/quic/test_tools/quic_connection_peer.h index b5ad7ae..eaaa0d48 100644 --- a/net/third_party/quic/test_tools/quic_connection_peer.h +++ b/net/third_party/quic/test_tools/quic_connection_peer.h
@@ -130,6 +130,9 @@ QuicPacketCount max_tracked_packets); static void SetSessionDecidesWhatToWrite(QuicConnection* connection); static void SetNegotiatedVersion(QuicConnection* connection); + static void SetMaxConsecutiveNumPacketsWithNoRetransmittableFrames( + QuicConnection* connection, + size_t new_value); }; } // namespace test
diff --git a/net/third_party/quic/test_tools/quic_server_session_base_peer.h b/net/third_party/quic/test_tools/quic_server_session_base_peer.h index 6f129f45..60ee7e1 100644 --- a/net/third_party/quic/test_tools/quic_server_session_base_peer.h +++ b/net/third_party/quic/test_tools/quic_server_session_base_peer.h
@@ -19,7 +19,7 @@ static void SetCryptoStream(QuicServerSessionBase* s, QuicCryptoServerStream* crypto_stream) { s->crypto_stream_.reset(crypto_stream); - s->static_streams()[kCryptoStreamId] = crypto_stream; + s->RegisterStaticStream(kCryptoStreamId, crypto_stream); } static bool IsBandwidthResumptionEnabled(QuicServerSessionBase* s) { return s->bandwidth_resumption_enabled_;
diff --git a/net/third_party/quic/test_tools/quic_session_peer.cc b/net/third_party/quic/test_tools/quic_session_peer.cc index a5202e9..ff9faf1 100644 --- a/net/third_party/quic/test_tools/quic_session_peer.cc +++ b/net/third_party/quic/test_tools/quic_session_peer.cc
@@ -61,7 +61,7 @@ // static QuicSession::StaticStreamMap& QuicSessionPeer::static_streams( QuicSession* session) { - return session->static_streams(); + return session->static_stream_map_; } // static
diff --git a/net/third_party/quic/test_tools/quic_spdy_session_peer.cc b/net/third_party/quic/test_tools/quic_spdy_session_peer.cc index 60b0359..aa7301ed 100644 --- a/net/third_party/quic/test_tools/quic_spdy_session_peer.cc +++ b/net/third_party/quic/test_tools/quic_spdy_session_peer.cc
@@ -20,7 +20,7 @@ QuicHeadersStream* headers_stream) { session->headers_stream_.reset(headers_stream); if (headers_stream != nullptr) { - session->static_streams()[headers_stream->id()] = headers_stream; + session->RegisterStaticStream(headers_stream->id(), headers_stream); } }
diff --git a/net/third_party/quic/tools/quic_simple_server_session_test.cc b/net/third_party/quic/tools/quic_simple_server_session_test.cc index c9c76aa..47bf5ba 100644 --- a/net/third_party/quic/tools/quic_simple_server_session_test.cc +++ b/net/third_party/quic/tools/quic_simple_server_session_test.cc
@@ -55,7 +55,7 @@ static void SetCryptoStream(QuicSimpleServerSession* s, QuicCryptoServerStream* crypto_stream) { s->crypto_stream_.reset(crypto_stream); - s->static_streams()[kCryptoStreamId] = crypto_stream; + s->RegisterStaticStream(kCryptoStreamId, crypto_stream); } static QuicSpdyStream* CreateIncomingDynamicStream(QuicSimpleServerSession* s,
diff --git a/ppapi/shared_impl/ppb_opengles2_shared.cc b/ppapi/shared_impl/ppb_opengles2_shared.cc index f269a7c..020b45c 100644 --- a/ppapi/shared_impl/ppb_opengles2_shared.cc +++ b/ppapi/shared_impl/ppb_opengles2_shared.cc
@@ -690,7 +690,7 @@ if (enter.succeeded()) { return ToGles2Impl(&enter)->GetString(name); } else { - return NULL; + return nullptr; } } @@ -1514,7 +1514,7 @@ return ToGles2Impl(&enter)->MapBufferSubDataCHROMIUM(target, offset, size, access); } else { - return NULL; + return nullptr; } } @@ -1540,7 +1540,7 @@ return ToGles2Impl(&enter)->MapTexSubImage2DCHROMIUM( target, level, xoffset, yoffset, width, height, format, type, access); } else { - return NULL; + return nullptr; } }
diff --git a/remoting/client/chromoting_session.cc b/remoting/client/chromoting_session.cc index 4576ac4..7536d57 100644 --- a/remoting/client/chromoting_session.cc +++ b/remoting/client/chromoting_session.cc
@@ -87,9 +87,7 @@ } } -} // namespace - -struct ChromotingSession::SessionContext { +struct SessionContext { ChromotingClientRuntime* runtime; base::WeakPtr<ChromotingSession::Delegate> delegate; base::WeakPtr<ClientTelemetryLogger> logger; @@ -102,6 +100,8 @@ ConnectToHostInfo info; }; +} // namespace + class ChromotingSession::Core : public ClientUserInterface, public protocol::ClipboardStub { public: @@ -121,7 +121,7 @@ void EnableVideoChannel(bool enable); void SendClientMessage(const std::string& type, const std::string& data); - // Logs the disconnect event and invalidates weak pointers. + // Logs the disconnect event and invalidates the instance. void Disconnect(); // ClientUserInterface implementation. @@ -144,6 +144,10 @@ base::WeakPtr<Core> GetWeakPtr(); private: + // Destroys the client and invalidates weak pointers. This doesn't destroy the + // instance itself. + void Invalidate(); + void ConnectOnNetworkThread(); void LogPerfStats(); @@ -166,20 +170,25 @@ const std::string& shared_secret); scoped_refptr<AutoThreadTaskRunner> ui_task_runner() { - return session_context_->runtime->ui_task_runner(); + DCHECK(runtime_); + return runtime_->ui_task_runner(); } scoped_refptr<AutoThreadTaskRunner> network_task_runner() { - return session_context_->runtime->network_task_runner(); + DCHECK(runtime_); + return runtime_->network_task_runner(); } + // Storing |runtime_| out of |session_context_| so that we can still use the + // task runners after |session_context_| is destroyed. + ChromotingClientRuntime* const runtime_; + std::unique_ptr<SessionContext> session_context_; std::unique_ptr<ClientContext> client_context_; std::unique_ptr<protocol::PerformanceTracker> perf_tracker_; - // |signaling_| must outlive |client_|, so it must be declared above - // |client_|. + // |signaling_| must outlive |client_|. std::unique_ptr<XmppSignalStrategy> signaling_; std::unique_ptr<OAuthTokenGetter> token_getter_; std::unique_ptr<ChromotingClient> client_; @@ -193,14 +202,23 @@ base::RepeatingTimer perf_stats_logging_timer_; + // weak_factory_.GetWeakPtr() creates new valid WeakPtrs after + // weak_factory_.InvalidateWeakPtrs() is called. We store and return + // |weak_ptr_| in GetWeakPtr() so that its copies are still invalidated once + // InvalidateWeakPtrs() is called. + base::WeakPtr<Core> weak_ptr_; base::WeakPtrFactory<Core> weak_factory_; DISALLOW_COPY_AND_ASSIGN(Core); }; ChromotingSession::Core::Core(std::unique_ptr<SessionContext> session_context) - : session_context_(std::move(session_context)), weak_factory_(this) { + : runtime_(session_context->runtime), + session_context_(std::move(session_context)), + weak_factory_(this) { DCHECK(ui_task_runner()->BelongsToCurrentThread()); + weak_ptr_ = weak_factory_.GetWeakPtr(); + network_task_runner()->PostTask( FROM_HERE, base::BindOnce(&Core::ConnectOnNetworkThread, GetWeakPtr())); } @@ -315,8 +333,8 @@ session_context_->logger->LogSessionStateChange( session_state_to_log, ChromotingEvent::ConnectionError::NONE); session_state_ = protocol::ConnectionToHost::CLOSED; - // Prevent all pending and future calls from ChromotingSession. - weak_factory_.InvalidateWeakPtrs(); + + Invalidate(); } } @@ -351,7 +369,7 @@ if (state == protocol::ConnectionToHost::CLOSED || state == protocol::ConnectionToHost::FAILED) { - weak_factory_.InvalidateWeakPtrs(); + Invalidate(); } } @@ -417,7 +435,19 @@ } base::WeakPtr<ChromotingSession::Core> ChromotingSession::Core::GetWeakPtr() { - return weak_factory_.GetWeakPtr(); + return weak_ptr_; +} + +void ChromotingSession::Core::Invalidate() { + // Prevent all pending and future calls from ChromotingSession. + weak_factory_.InvalidateWeakPtrs(); + + client_.reset(); + token_getter_.reset(); + signaling_.reset(); + perf_tracker_.reset(); + client_context_.reset(); + session_context_.reset(); } void ChromotingSession::Core::ConnectOnNetworkThread() { @@ -450,18 +480,18 @@ xmpp_config.username = session_context_->info.username; xmpp_config.auth_token = session_context_->info.auth_token; - signaling_.reset(new XmppSignalStrategy( - net::ClientSocketFactory::GetDefaultFactory(), - session_context_->runtime->url_requester(), xmpp_config)); + signaling_.reset( + new XmppSignalStrategy(net::ClientSocketFactory::GetDefaultFactory(), + runtime_->url_requester(), xmpp_config)); - token_getter_ = session_context_->runtime->CreateOAuthTokenGetter(); + token_getter_ = runtime_->CreateOAuthTokenGetter(); scoped_refptr<protocol::TransportContext> transport_context = new protocol::TransportContext( signaling_.get(), std::make_unique<protocol::ChromiumPortAllocatorFactory>(), std::make_unique<ChromiumUrlRequestFactory>( - session_context_->runtime->url_requester()), + runtime_->url_requester()), protocol::NetworkSettings( protocol::NetworkSettings::NAT_TRAVERSAL_FULL), protocol::TransportRole::CLIENT); @@ -587,13 +617,13 @@ std::unique_ptr<protocol::CursorShapeStub> cursor_shape_stub, std::unique_ptr<protocol::VideoRenderer> video_renderer, std::unique_ptr<protocol::AudioStub> audio_player, - const ConnectToHostInfo& info) { + const ConnectToHostInfo& info) + : runtime_(ChromotingClientRuntime::GetInstance()) { DCHECK(delegate); DCHECK(cursor_shape_stub); DCHECK(video_renderer); // Don't DCHECK audio_player since it will bind audio_player to the ui thread. - runtime_ = ChromotingClientRuntime::GetInstance(); DCHECK(runtime_->ui_task_runner()->BelongsToCurrentThread()); logger_ = std::make_unique<ClientTelemetryLogger>( @@ -601,38 +631,28 @@ info.session_entry_point); // logger is set when connection is started. - session_context_ = std::make_unique<SessionContext>(); - session_context_->runtime = runtime_; - session_context_->delegate = delegate; - session_context_->logger = logger_->GetWeakPtr(); - session_context_->audio_player = std::move(audio_player); - session_context_->audio_player_weak_factory = + auto session_context = std::make_unique<SessionContext>(); + session_context->runtime = runtime_; + session_context->delegate = delegate; + session_context->logger = logger_->GetWeakPtr(); + session_context->audio_player = std::move(audio_player); + session_context->audio_player_weak_factory = std::make_unique<base::WeakPtrFactory<protocol::AudioStub>>( - session_context_->audio_player.get()); - session_context_->cursor_shape_stub = std::move(cursor_shape_stub); - session_context_->video_renderer = std::move(video_renderer); - session_context_->info = info; + session_context->audio_player.get()); + session_context->cursor_shape_stub = std::move(cursor_shape_stub); + session_context->video_renderer = std::move(video_renderer); + session_context->info = info; + + core_ = std::make_unique<Core>(std::move(session_context)); } ChromotingSession::~ChromotingSession() { DCHECK(runtime_->ui_task_runner()->BelongsToCurrentThread()); - if (core_) { - runtime_->network_task_runner()->DeleteSoon(FROM_HERE, core_.release()); - } + runtime_->network_task_runner()->DeleteSoon(FROM_HERE, core_.release()); runtime_->network_task_runner()->DeleteSoon(FROM_HERE, logger_.release()); } -void ChromotingSession::Connect() { - DCHECK(runtime_->ui_task_runner()->BelongsToCurrentThread()); - DCHECK(session_context_) << "Session has already been connected before."; - core_ = std::make_unique<Core>(std::move(session_context_)); -} - -void ChromotingSession::Disconnect() { - RunCoreTaskOnNetworkThread(FROM_HERE, &Core::Disconnect); -} - void ChromotingSession::GetFeedbackData( GetFeedbackDataCallback callback) const { DCHECK(runtime_->ui_task_runner()->BelongsToCurrentThread()); @@ -713,11 +733,6 @@ Args&&... args) { DCHECK(runtime_->ui_task_runner()->BelongsToCurrentThread()); - if (!core_) { - LOG(WARNING) << "Session is not connected."; - return; - } - runtime_->network_task_runner()->PostTask( FROM_HERE, base::BindOnce(std::forward<Functor>(core_functor), core_->GetWeakPtr(),
diff --git a/remoting/client/chromoting_session.h b/remoting/client/chromoting_session.h index c1fde4af..cfff528 100644 --- a/remoting/client/chromoting_session.h +++ b/remoting/client/chromoting_session.h
@@ -86,7 +86,8 @@ using GetFeedbackDataCallback = base::OnceCallback<void(std::unique_ptr<FeedbackData>)>; - // Initiates a connection with the specified host. + // Initiates a connection with the specified host. This will start the + // connection immediately. ChromotingSession(base::WeakPtr<ChromotingSession::Delegate> delegate, std::unique_ptr<protocol::CursorShapeStub> cursor_stub, std::unique_ptr<protocol::VideoRenderer> video_renderer, @@ -95,13 +96,6 @@ ~ChromotingSession() override; - // Starts the connection. Can be called no more than once. - void Connect(); - - // Terminates the current connection (if it hasn't already failed) and cleans - // up. - void Disconnect(); - // Gets the current feedback data and returns it to the callback on the // UI thread. If the session is never connected, then an empty feedback // will be returned, otherwise feedback for current session (either still @@ -134,7 +128,6 @@ void SendClientMessage(const std::string& type, const std::string& data); private: - struct SessionContext; class Core; template <typename Functor, typename... Args> @@ -143,16 +136,14 @@ Args&&... args); // Used to obtain task runner references. - ChromotingClientRuntime* runtime_; - - // Becomes null after the session is connected, and thereafter will not be - // reassigned. - std::unique_ptr<SessionContext> session_context_; + ChromotingClientRuntime* const runtime_; // Created when the session is connected, then used, and destroyed on the // network thread when the instance is destroyed. std::unique_ptr<Core> core_; + // TODO(yuweih): Looks like we should be able to move this into the Core and + // post a task to base::Unretained(core_) to get back the feedback. // Created when the session is created, then used, and destroyed on the // network thread when the instance is destroyed. This is stored out of // |core_| to allow accessing logs after |core_| becomes invalid.
diff --git a/remoting/client/display/renderer_proxy.cc b/remoting/client/display/renderer_proxy.cc index dd5cfe5..9276ebb 100644 --- a/remoting/client/display/renderer_proxy.cc +++ b/remoting/client/display/renderer_proxy.cc
@@ -15,12 +15,12 @@ RendererProxy::RendererProxy( scoped_refptr<base::SingleThreadTaskRunner> task_runner) : task_runner_(task_runner), - ui_task_poster_(new remoting::QueuedTaskPoster(task_runner_)), - weak_factory_(this) {} + ui_task_poster_(new remoting::QueuedTaskPoster(task_runner_)) {} RendererProxy::~RendererProxy() = default; void RendererProxy::Initialize(base::WeakPtr<GlRenderer> renderer) { + DCHECK_CALLED_ON_VALID_THREAD(thread_checker_); renderer_ = renderer; } @@ -49,12 +49,9 @@ false); } -base::WeakPtr<RendererProxy> RendererProxy::GetWeakPtr() { - return weak_factory_.GetWeakPtr(); -} - void RendererProxy::RunTaskOnProperThread(const base::Closure& task, bool needs_synchronization) { + DCHECK_CALLED_ON_VALID_THREAD(thread_checker_); if (task_runner_->BelongsToCurrentThread()) { task.Run(); return;
diff --git a/remoting/client/display/renderer_proxy.h b/remoting/client/display/renderer_proxy.h index bbcdb25d..18d1e9e 100644 --- a/remoting/client/display/renderer_proxy.h +++ b/remoting/client/display/renderer_proxy.h
@@ -5,9 +5,11 @@ #ifndef REMOTING_CLIENT_UI_RENDERER_PROXY_H_ #define REMOTING_CLIENT_UI_RENDERER_PROXY_H_ +#include "base/macros.h" #include "base/memory/ref_counted.h" #include "base/memory/weak_ptr.h" #include "base/single_thread_task_runner.h" +#include "base/threading/thread_checker.h" namespace remoting { @@ -15,7 +17,8 @@ class QueuedTaskPoster; class ViewMatrix; -// A class to proxy calls to GlRenderer from one thread to another. +// A class to proxy calls to GlRenderer from one thread to another. Must be +// created and used on the same thread. // TODO(yuweih): This should be removed once we have moved Drawables out of // GlRenderer. class RendererProxy { @@ -32,8 +35,6 @@ void SetCursorVisibility(bool visible); void StartInputFeedback(float x, float y, float diameter); - base::WeakPtr<RendererProxy> GetWeakPtr(); - private: // Runs the |task| on the thread of |task_runner_|. All tasks run with // |needs_synchronization| set to true inside the same tick will be run on @@ -45,11 +46,9 @@ scoped_refptr<base::SingleThreadTaskRunner> task_runner_; std::unique_ptr<remoting::QueuedTaskPoster> ui_task_poster_; - base::WeakPtrFactory<RendererProxy> weak_factory_; + THREAD_CHECKER(thread_checker_); - // RenderStubProxy is neither copyable nor movable. - RendererProxy(const RendererProxy&) = delete; - RendererProxy& operator=(const RendererProxy&) = delete; + DISALLOW_COPY_AND_ASSIGN(RendererProxy); }; } // namespace remoting
diff --git a/remoting/client/jni/jni_client.cc b/remoting/client/jni/jni_client.cc index 11cf4a1d..41f3512 100644 --- a/remoting/client/jni/jni_client.cc +++ b/remoting/client/jni/jni_client.cc
@@ -50,7 +50,6 @@ weak_ptr_, display_handler_->CreateCursorShapeStub(), display_handler_->CreateVideoRenderer(), std::make_unique<AudioPlayerAndroid>(), info)); - session_->Connect(); } void JniClient::DisconnectFromHost() {
diff --git a/remoting/client/queued_task_poster.cc b/remoting/client/queued_task_poster.cc index 54bb9a9..7830791 100644 --- a/remoting/client/queued_task_poster.cc +++ b/remoting/client/queued_task_poster.cc
@@ -16,7 +16,11 @@ : target_task_runner_(target_task_runner), weak_factory_(this) {} -QueuedTaskPoster::~QueuedTaskPoster() = default; +QueuedTaskPoster::~QueuedTaskPoster() { + if (source_task_runner_) { + DCHECK(source_task_runner_->BelongsToCurrentThread()); + } +} void QueuedTaskPoster::AddTask(const base::Closure& closure) { if (!source_task_runner_) {
diff --git a/remoting/credits/credits.gni b/remoting/credits/credits.gni index 5b53725..c75b299 100644 --- a/remoting/credits/credits.gni +++ b/remoting/credits/credits.gni
@@ -38,7 +38,7 @@ "--gn-target", invoker.gn_target, "--gn-out-dir", - rebase_path(root_build_dir), + ".", ] }
diff --git a/remoting/host/installer/win/BUILD.gn b/remoting/host/installer/win/BUILD.gn index 52aff83..abd7cbab 100644 --- a/remoting/host/installer/win/BUILD.gn +++ b/remoting/host/installer/win/BUILD.gn
@@ -71,7 +71,8 @@ ] _generated_files = rebase_path(inputs, root_build_dir) - _generated_files += [ rebase_path("//remoting/resources/chromoting.ico") ] + _generated_files += + [ rebase_path("//remoting/resources/chromoting.ico", root_build_dir) ] # _generated_dst_files must contain the same files in the same order as # _generated_files, otherwise the Windows MSI will not be built correctly. @@ -95,10 +96,12 @@ rebase_path("$root_gen_dir/remoting_installation", root_build_dir), rebase_path(_output, root_build_dir), "--source-file-roots", - rebase_path("//remoting/host/installer/win"), + rebase_path("//remoting/host/installer/win", root_build_dir), "--source-files", - rebase_path("//remoting/host/installer/win/chromoting.wxs"), - rebase_path("//remoting/host/installer/win/parameters.json"), + rebase_path("//remoting/host/installer/win/chromoting.wxs", + root_build_dir), + rebase_path("//remoting/host/installer/win/parameters.json", + root_build_dir), # Input files "--generated-files", @@ -133,7 +136,7 @@ ] args = [ "--wix_path", - rebase_path("//third_party/wix"), + rebase_path("//third_party/wix", root_build_dir), "--intermediate_dir", rebase_path("$root_gen_dir/remoting_installation", root_build_dir), "--target_arch",
diff --git a/remoting/ios/display/gl_display_handler.h b/remoting/ios/display/gl_display_handler.h index 3aacd0e..ce5723b 100644 --- a/remoting/ios/display/gl_display_handler.h +++ b/remoting/ios/display/gl_display_handler.h
@@ -54,9 +54,10 @@ - (void)setSurfaceSize:(const CGRect&)frame; // Must be called immediately after the object is constructed. -- (std::unique_ptr<remoting::RendererProxy>)CreateRendererProxy; -- (std::unique_ptr<remoting::protocol::VideoRenderer>)CreateVideoRenderer; -- (std::unique_ptr<remoting::protocol::CursorShapeStub>)CreateCursorShapeStub; +- (std::unique_ptr<remoting::protocol::VideoRenderer>)createVideoRenderer; +- (std::unique_ptr<remoting::protocol::CursorShapeStub>)createCursorShapeStub; + +@property(readonly) remoting::RendererProxy* rendererProxy; // This is write-only but @property doesn't support write-only modifier. @property id<GlDisplayHandlerDelegate> delegate;
diff --git a/remoting/ios/display/gl_display_handler.mm b/remoting/ios/display/gl_display_handler.mm index 38f0788b..eed2696 100644 --- a/remoting/ios/display/gl_display_handler.mm +++ b/remoting/ios/display/gl_display_handler.mm
@@ -44,8 +44,6 @@ void SetHandlerDelegate(id<GlDisplayHandlerDelegate> delegate); - std::unique_ptr<RendererProxy> GrabRendererProxy(); - // CursorShapeStub interface. void SetCursorShape(const protocol::CursorShapeInfo& cursor_shape) override; @@ -62,16 +60,15 @@ std::unique_ptr<protocol::FrameConsumer> GrabFrameConsumer(); + // The renderer proxy should be used on the UI thread. + RendererProxy* renderer_proxy() { return renderer_proxy_.get(); } + // Returns a weak pointer to be used on the display thread. base::WeakPtr<Core> GetWeakPtr(); private: remoting::ChromotingClientRuntime* runtime_; - // Will be std::move'd when GrabRendererProxy() is called. - std::unique_ptr<RendererProxy> owned_renderer_proxy_; - base::WeakPtr<RendererProxy> renderer_proxy_; - // Will be std::move'd when GrabFrameConsumer() is called. std::unique_ptr<DualBufferFrameConsumer> owned_frame_consumer_; base::WeakPtr<DualBufferFrameConsumer> frame_consumer_; @@ -80,6 +77,9 @@ std::unique_ptr<GlRenderer> renderer_; __weak id<GlDisplayHandlerDelegate> handler_delegate_; + // This should be used and deleted on the UI thread. + std::unique_ptr<RendererProxy> renderer_proxy_; + // Valid only when the surface is created. __weak EAGLView* view_; @@ -92,7 +92,7 @@ Core::Core() : weak_factory_(this) { runtime_ = ChromotingClientRuntime::GetInstance(); - DCHECK(!runtime_->display_task_runner()->BelongsToCurrentThread()); + DCHECK(runtime_->ui_task_runner()->BelongsToCurrentThread()); weak_ptr_ = weak_factory_.GetWeakPtr(); @@ -103,9 +103,8 @@ protocol::FrameConsumer::PixelFormat::FORMAT_RGBA)); frame_consumer_ = owned_frame_consumer_->GetWeakPtr(); - owned_renderer_proxy_.reset( - new RendererProxy(runtime_->display_task_runner())); - renderer_proxy_ = owned_renderer_proxy_->GetWeakPtr(); + renderer_proxy_ = + std::make_unique<RendererProxy>(runtime_->display_task_runner()); runtime_->display_task_runner()->PostTask( FROM_HERE, base::Bind(&Core::Initialize, GetWeakPtr())); @@ -113,6 +112,7 @@ Core::~Core() { DCHECK(runtime_->display_task_runner()->BelongsToCurrentThread()); + runtime_->ui_task_runner()->DeleteSoon(FROM_HERE, renderer_proxy_.release()); } void Core::Initialize() { @@ -134,9 +134,14 @@ renderer_ = remoting::GlRenderer::CreateGlRendererWithDesktop(); - renderer_proxy_->Initialize(renderer_->GetWeakPtr()); - renderer_->SetDelegate(weak_ptr_); + + // Safe to use base::Unretained because |renderer_proxy_| is destroyed on UI + // after Core is destroyed. + runtime_->ui_task_runner()->PostTask( + FROM_HERE, base::BindOnce(&RendererProxy::Initialize, + base::Unretained(renderer_proxy_.get()), + renderer_->GetWeakPtr())); } void Core::SetHandlerDelegate(id<GlDisplayHandlerDelegate> delegate) { @@ -144,11 +149,6 @@ handler_delegate_ = delegate; } -std::unique_ptr<RendererProxy> Core::GrabRendererProxy() { - DCHECK(owned_renderer_proxy_); - return std::move(owned_renderer_proxy_); -} - void Core::SetCursorShape(const protocol::CursorShapeInfo& cursor_shape) { DCHECK(runtime_->display_task_runner()->BelongsToCurrentThread()); renderer_->OnCursorShapeChanged(cursor_shape); @@ -265,16 +265,12 @@ #pragma mark - Public -- (std::unique_ptr<remoting::RendererProxy>)CreateRendererProxy { - return _core->GrabRendererProxy(); -} - -- (std::unique_ptr<remoting::protocol::VideoRenderer>)CreateVideoRenderer { +- (std::unique_ptr<remoting::protocol::VideoRenderer>)createVideoRenderer { return std::make_unique<remoting::SoftwareVideoRenderer>( _core->GrabFrameConsumer()); } -- (std::unique_ptr<remoting::protocol::CursorShapeStub>)CreateCursorShapeStub { +- (std::unique_ptr<remoting::protocol::CursorShapeStub>)createCursorShapeStub { return std::make_unique<remoting::CursorShapeStubProxy>( _core->GetWeakPtr(), _runtime->display_task_runner()); } @@ -302,6 +298,10 @@ #pragma mark - Properties +- (remoting::RendererProxy*)rendererProxy { + return _core->renderer_proxy(); +} + - (void)setDelegate:(id<GlDisplayHandlerDelegate>)delegate { _runtime->display_task_runner()->PostTask( FROM_HERE,
diff --git a/remoting/ios/session/remoting_client.mm b/remoting/ios/session/remoting_client.mm index 255a6d7..f22680ca 100644 --- a/remoting/ios/session/remoting_client.mm +++ b/remoting/ios/session/remoting_client.mm
@@ -23,7 +23,6 @@ #include "remoting/client/chromoting_client_runtime.h" #include "remoting/client/chromoting_session.h" #include "remoting/client/connect_to_host_info.h" -#include "remoting/client/display/renderer_proxy.h" #include "remoting/client/gesture_interpreter.h" #include "remoting/client/input/keyboard_interpreter.h" #import "remoting/ios/facade/remoting_authentication.h" @@ -67,7 +66,6 @@ remoting::protocol::SecretFetchedCallback _secretFetchedCallback; remoting::GestureInterpreter _gestureInterpreter; remoting::KeyboardInterpreter _keyboardInterpreter; - std::unique_ptr<remoting::RendererProxy> _renderer; // _session is valid only when the session is connected. std::unique_ptr<remoting::ChromotingSession> _session; @@ -142,13 +140,10 @@ _displayHandler.delegate = self; _session.reset(new remoting::ChromotingSession( - _sessonDelegate->GetWeakPtr(), [_displayHandler CreateCursorShapeStub], - [_displayHandler CreateVideoRenderer], std::move(audioStream), info)); - _renderer = [_displayHandler CreateRendererProxy]; - _gestureInterpreter.SetContext(_renderer.get(), _session.get()); + _sessonDelegate->GetWeakPtr(), [_displayHandler createCursorShapeStub], + [_displayHandler createVideoRenderer], std::move(audioStream), info)); + _gestureInterpreter.SetContext(_displayHandler.rendererProxy, _session.get()); _keyboardInterpreter.SetContext(_session.get()); - - _session->Connect(); } - (void)disconnectFromHost { @@ -156,14 +151,6 @@ _displayHandler = nil; - // This needs to be deleted on the display thread since GlDisplayHandler binds - // its WeakPtrFactory to the display thread. - // TODO(yuweih): Ideally this constraint can be removed once we allow - // GlRenderer to be created on the UI thread before being used. - if (_renderer) { - _runtime->display_task_runner()->DeleteSoon(FROM_HERE, _renderer.release()); - } - _gestureInterpreter.SetContext(nullptr, nullptr); _keyboardInterpreter.SetContext(nullptr); }
diff --git a/remoting/resources/remoting_strings_hi.xtb b/remoting/resources/remoting_strings_hi.xtb index 67870649..36f4c55 100644 --- a/remoting/resources/remoting_strings_hi.xtb +++ b/remoting/resources/remoting_strings_hi.xtb
@@ -89,7 +89,7 @@ • अपने iOS डिवाइस पर, ऐप खोलें और कनेक्ट करने के लिए अपने किसी भी ऑनलाइन कंप्यूटर पर टैप करें.</translation> <translation id="2894654864775534701">यह कंप्यूटर वर्तमान में किसी भिन्न खाते के अंतर्गत शेयर किया गया है.</translation> <translation id="2919669478609886916">आप फ़िलहाल में किसी अन्य उपयोगकर्ता के साथ यह मशीन शेयर कर रहे हैं. क्या आप शेयर करना जारी रखना चाहते हैं?</translation> -<translation id="2921543551052660690">आपने पूर्व में <ph name="USER_NAME" /> (<ph name="USER_EMAIL" />) के रूप में प्रवेश किया था. उस खाते में अपने कंप्यूटर एक्सेस करने के लिए, उस खाते से <ph name="LINK_BEGIN" />क्रोमियम में प्रवेश करें<ph name="LINK_END" /> और Chromoting को पुन: इंस्टॉल करें.</translation> +<translation id="2921543551052660690">आपने पहले <ph name="USER_NAME" /> (<ph name="USER_EMAIL" />) के रूप में साइन इन किया था. उस खाते में अपने कंप्यूटर एक्सेस करने के लिए, उस खाते से <ph name="LINK_BEGIN" />क्रोमियम में साइन इन करें<ph name="LINK_END" /> और Chromoting को फिर से इंस्टॉल करें.</translation> <translation id="2926340305933667314">इस कंप्यूटर के लिए दूर से एक्सेस की सुविधा बंद नहीं की जा सकी. कृपया बाद में फिर से कोशिश करें.</translation> <translation id="2930135165929238380">कुछ आवश्यक घटक अनुपलब्ध हैं. कृपया chrome://plugins पर जाएं और सुनिश्चित करें कि नेटिव क्लाइंट सक्षम है.</translation> <translation id="2939145106548231838">होस्ट करने के लिए प्रमाणीकृत करें</translation> @@ -130,7 +130,7 @@ <translation id="3908017899227008678">फ़िट करने के लिए सिकोड़ें</translation> <translation id="3931191050278863510">होस्ट बंद हो गया है.</translation> <translation id="3933246213702324812"><ph name="HOSTNAME" /> पर Chromoting पुराना हो गया है और इसे अपडेट किया जाना आवश्यक है.</translation> -<translation id="3950820424414687140">प्रवेश करें</translation> +<translation id="3950820424414687140">साइन इन करें</translation> <translation id="3989511127559254552">जारी रखने के लिए सबसे पहले आपको अपने कंप्यूटर को विस्तृत एक्सेस अनुमतियां देनी होंगी. आपको ऐसा केवल एक बार करना है.</translation> <translation id="4006787130661126000">यदि आप इस कंप्यूटर को एक्सेस करने के लिए Chrome दूरस्थ डेस्कटॉप का उपयोग करना चाहते हैं, तो आपको दूरस्थ कनेक्शन सक्षम करने होंगे.</translation> <translation id="405887016757208221">दूर का कंप्यूटर सत्र शुरू नहीं कर पाया. अगर समस्या बनी रहती है तो, कृपया होस्ट को फिर से कॉन्फ़िगर करने की कोशिश करें.</translation> @@ -328,7 +328,7 @@ <translation id="8509907436388546015">डेस्कटॉप एकीकरण प्रोसेस</translation> <translation id="8513093439376855948">होस्ट प्रबंधन को दूरस्थ बनाने के लिए स्थानीय संदेश सेवा होस्ट</translation> <translation id="8525306231823319788">पूर्ण स्क्रीन</translation> -<translation id="8548209692293300397">आपने पूर्व में <ph name="USER_NAME" /> (<ph name="USER_EMAIL" />) के रूप में प्रवेश किया था. उस खाते में अपने कंप्यूटर एक्सेस करने के लिए, उस खाते से <ph name="LINK_BEGIN" />Google Chrome में प्रवेश करें<ph name="LINK_END" /> और Chrome दूरस्थ डेस्कटॉप को पुन: इंस्टॉल करें.</translation> +<translation id="8548209692293300397">आपने पहले <ph name="USER_NAME" /> (<ph name="USER_EMAIL" />) के रूप में साइन इन किया था. उस खाते में अपने कंप्यूटर एक्सेस करने के लिए, उस खाते से <ph name="LINK_BEGIN" />Google Chrome में साइन इन करें<ph name="LINK_END" /> और Chrome दूरस्थ डेस्कटॉप को फिर से इंस्टॉल करें.</translation> <translation id="8642984861538780905">ठीक</translation> <translation id="8712909229180978490">मैं Google डिस्क में अपनी सहेजी गई फ़ाइलों को ऑनलाइन नहीं देख सकता/सकती.</translation> <translation id="8743328882720071828">क्या आप <ph name="CLIENT_USERNAME" /> को अपना कंप्यूटर देखने और नियंत्रित करने देना चाहते हैं?</translation>
diff --git a/rlz/BUILD.gn b/rlz/BUILD.gn index 59d4816..99c8263 100644 --- a/rlz/BUILD.gn +++ b/rlz/BUILD.gn
@@ -80,6 +80,8 @@ "//base", "//base/third_party/dynamic_annotations", "//net", + "//services/network/public/cpp:cpp", + "//services/network/public/mojom", "//url", ] @@ -121,6 +123,7 @@ ":rlz_lib", "//base", "//base/test:test_support", + "//services/network/public/cpp:cpp", "//testing/gtest", ] if (is_chromeos) { @@ -149,7 +152,9 @@ ":rlz_utils", ":test_support", "//base", + "//mojo/core/embedder", "//net:test_support", + "//services/network:test_support", "//testing/gmock", "//testing/gtest", "//third_party/zlib",
diff --git a/rlz/DEPS b/rlz/DEPS index a42d5f3..a7e2515 100644 --- a/rlz/DEPS +++ b/rlz/DEPS
@@ -58,8 +58,11 @@ "+build", "+chromeos/dbus", "+chromeos/system", + "+mojo/core/embedder", "+net", # This is only used when force_rlz_use_chrome_net=1 is passed to gyp. "+third_party/zlib", + "+services/network/public", + "+services/network/test", ] hooks = [
diff --git a/rlz/lib/financial_ping.cc b/rlz/lib/financial_ping.cc index 13b6775..3a0e2cb5 100644 --- a/rlz/lib/financial_ping.cc +++ b/rlz/lib/financial_ping.cc
@@ -29,6 +29,8 @@ #include "rlz/lib/rlz_lib.h" #include "rlz/lib/rlz_value_store.h" #include "rlz/lib/string_utils.h" +#include "services/network/public/cpp/shared_url_loader_factory.h" +#include "services/network/public/cpp/simple_url_loader.h" #if !defined(OS_WIN) #include "base/time/time.h" @@ -61,10 +63,6 @@ #include "base/time/time.h" #include "net/base/load_flags.h" #include "net/traffic_annotation/network_traffic_annotation.h" -#include "net/url_request/url_fetcher.h" -#include "net/url_request/url_fetcher_delegate.h" -#include "net/url_request/url_request_context.h" -#include "net/url_request/url_request_context_getter.h" #include "url/gurl.h" #endif @@ -169,12 +167,12 @@ // The pointer to URLRequestContextGetter used by FinancialPing::PingServer(). // It is atomic pointer because it can be accessed and modified by multiple // threads. -AtomicWord g_context; +AtomicWord g_URLLoaderFactory; -bool FinancialPing::SetURLRequestContext( - net::URLRequestContextGetter* context) { - base::subtle::Release_Store( - &g_context, reinterpret_cast<AtomicWord>(context)); +bool FinancialPing::SetURLLoaderFactory( + network::mojom::URLLoaderFactory* factory) { + base::subtle::Release_Store(&g_URLLoaderFactory, + reinterpret_cast<AtomicWord>(factory)); return true; } @@ -225,31 +223,26 @@ base::WaitableEvent event_; base::Lock lock_; std::string response_; - int response_code_ = net::URLFetcher::RESPONSE_CODE_INVALID; + int response_code_ = -1; }; -// A fetcher delegate that signals an instance of RefCountedWaitableEvent when -// the fetch completes. -class FinancialPingUrlFetcherDelegate : public net::URLFetcherDelegate { - public: - FinancialPingUrlFetcherDelegate(scoped_refptr<RefCountedWaitableEvent> event) - : event_(std::move(event)) {} - - void SetFetcher(std::unique_ptr<net::URLFetcher> fetcher) { - fetcher_ = std::move(fetcher); +// The URL load complete callback signals an instance of +// RefCountedWaitableEvent when the load completes. +void OnURLLoadComplete(std::unique_ptr<network::SimpleURLLoader> url_loader, + scoped_refptr<RefCountedWaitableEvent> event, + std::unique_ptr<std::string> response_body) { + int response_code = -1; + if (url_loader->ResponseInfo() && url_loader->ResponseInfo()->headers) { + response_code = url_loader->ResponseInfo()->headers->response_code(); } - private: - void OnURLFetchComplete(const net::URLFetcher* source) override { - std::string response; - source->GetResponseAsString(&response); - event_->SignalFetchComplete(source->GetResponseCode(), std::move(response)); - base::SequencedTaskRunnerHandle::Get()->DeleteSoon(FROM_HERE, this); + std::string response; + if (response_body) { + response = std::move(*response_body); } - scoped_refptr<RefCountedWaitableEvent> event_; - std::unique_ptr<net::URLFetcher> fetcher_; -}; + event->SignalFetchComplete(response_code, std::move(response)); +} bool send_financial_ping_interrupted_for_test = false; @@ -260,7 +253,7 @@ if (base::subtle::Acquire_Load(&g_cancelShutdownCheck)) return; - if (!base::subtle::Acquire_Load(&g_context)) { + if (!base::subtle::Acquire_Load(&g_URLLoaderFactory)) { send_financial_ping_interrupted_for_test = true; event->SignalShutdown(); return; @@ -276,22 +269,18 @@ void PingRlzServer(std::string url, scoped_refptr<RefCountedWaitableEvent> event) { - // Copy the pointer to stack because g_context may be set to NULL + // Copy the pointer to stack because g_URLLoaderFactory may be set to NULL // in different thread. The instance is guaranteed to exist while // the method is running. - net::URLRequestContextGetter* context = - reinterpret_cast<net::URLRequestContextGetter*>( - base::subtle::Acquire_Load(&g_context)); + network::mojom::URLLoaderFactory* url_loader_factory = + reinterpret_cast<network::mojom::URLLoaderFactory*>( + base::subtle::Acquire_Load(&g_URLLoaderFactory)); - // Browser shutdown will cause the context to be reset to NULL. + // Browser shutdown will cause the factory to be reset to NULL. // ShutdownCheck will catch this. - if (!context) + if (!url_loader_factory) return; - // Delegate will delete itself when the fetch completes. - FinancialPingUrlFetcherDelegate* delegate = - new FinancialPingUrlFetcherDelegate(event); - net::NetworkTrafficAnnotationTag traffic_annotation = net::DefineNetworkTrafficAnnotation("rlz_ping", R"( semantics { @@ -315,21 +304,22 @@ setting: "This feature cannot be disabled in settings." policy_exception_justification: "Not implemented." })"); - std::unique_ptr<net::URLFetcher> fetcher = net::URLFetcher::Create( - GURL(url), net::URLFetcher::GET, delegate, traffic_annotation); - - fetcher->SetLoadFlags( + auto resource_request = std::make_unique<network::ResourceRequest>(); + resource_request->url = GURL(url); + resource_request->load_flags = net::LOAD_DISABLE_CACHE | net::LOAD_DO_NOT_SEND_AUTH_DATA | - net::LOAD_DO_NOT_SEND_COOKIES | net::LOAD_DO_NOT_SAVE_COOKIES); + net::LOAD_DO_NOT_SEND_COOKIES | net::LOAD_DO_NOT_SAVE_COOKIES; - // Ensure rlz_lib::SetURLRequestContext() has been called before sending - // pings. - fetcher->SetRequestContext(context); - fetcher->Start(); + auto url_loader = network::SimpleURLLoader::Create( + std::move(resource_request), traffic_annotation); - // Pass ownership of the fetcher to the delegate. Otherwise the fetch will - // be canceled when the URLFetcher object is destroyed. - delegate->SetFetcher(std::move(fetcher)); + // Pass ownership of the loader to the bound function. Otherwise the load will + // be canceled when the SimpleURLLoader object is destroyed. + auto* url_loader_ptr = url_loader.get(); + url_loader_ptr->DownloadToStringOfUnboundedSizeUntilCrashAndDie( + url_loader_factory, + base::BindOnce(&OnURLLoadComplete, std::move(url_loader), + std::move(event))); } #endif @@ -426,7 +416,7 @@ if (!is_signaled) return PING_FAILURE; - if (event->GetResponseCode() == net::URLFetcher::RESPONSE_CODE_INVALID) { + if (event->GetResponseCode() == -1) { return PING_SHUTDOWN; } else if (event->GetResponseCode() != 200) { return PING_FAILURE;
diff --git a/rlz/lib/financial_ping.h b/rlz/lib/financial_ping.h index c3132ae..7fae9546 100644 --- a/rlz/lib/financial_ping.h +++ b/rlz/lib/financial_ping.h
@@ -11,9 +11,11 @@ #include "rlz/lib/rlz_enums.h" #if defined(RLZ_NETWORK_IMPLEMENTATION_CHROME_NET) -namespace net { -class URLRequestContextGetter; -} // namespace net +namespace network { +namespace mojom { +class URLLoaderFactory; +} +} // namespace network #endif namespace rlz_lib { @@ -62,7 +64,7 @@ static int64_t GetSystemTimeAsInt64(); #if defined(RLZ_NETWORK_IMPLEMENTATION_CHROME_NET) - static bool SetURLRequestContext(net::URLRequestContextGetter* context); + static bool SetURLLoaderFactory(network::mojom::URLLoaderFactory* factory); #endif private:
diff --git a/rlz/lib/rlz_lib.cc b/rlz/lib/rlz_lib.cc index 493ae90..703d144 100644 --- a/rlz/lib/rlz_lib.cc +++ b/rlz/lib/rlz_lib.cc
@@ -22,6 +22,7 @@ #include "rlz/lib/net_response_check.h" #include "rlz/lib/rlz_value_store.h" #include "rlz/lib/string_utils.h" +#include "services/network/public/mojom/url_loader_factory.mojom.h" namespace { @@ -216,8 +217,8 @@ namespace rlz_lib { #if defined(RLZ_NETWORK_IMPLEMENTATION_CHROME_NET) -bool SetURLRequestContext(net::URLRequestContextGetter* context) { - return FinancialPing::SetURLRequestContext(context); +bool SetURLLoaderFactory(network::mojom::URLLoaderFactory* factory) { + return FinancialPing::SetURLLoaderFactory(factory); } #endif @@ -429,7 +430,6 @@ std::string response; #if defined(OS_CHROMEOS) - const net::BackoffEntry::Policy policy = { 0, // Number of initial errors to ignore. base::TimeDelta::FromSeconds(5).InMilliseconds(), // Initial delay. @@ -473,14 +473,11 @@ } SYSLOG(INFO) << "Succeeded in sending RLZ ping"; - #else - FinancialPing::PingResponse res = FinancialPing::PingServer(request.c_str(), &response); if (res != FinancialPing::PING_SUCCESSFUL) return false; - #endif return ParsePingResponse(product, response.c_str());
diff --git a/rlz/lib/rlz_lib.h b/rlz/lib/rlz_lib.h index 886bd0c..f645825 100644 --- a/rlz/lib/rlz_lib.h +++ b/rlz/lib/rlz_lib.h
@@ -24,7 +24,7 @@ // Define one of // + RLZ_NETWORK_IMPLEMENTATION_WIN_INET: Uses win inet to send financial pings. // + RLZ_NETWORK_IMPLEMENTATION_CHROME_NET: Uses chrome's network stack to send -// financial pings. rlz_lib::SetURLRequestContext() must be called before +// financial pings. rlz_lib::SetURLLoaderFactory() must be called before // any calls to SendFinancialPing(). #if defined(RLZ_NETWORK_IMPLEMENTATION_WIN_INET) && \ defined(RLZ_NETWORK_IMPLEMENTATION_CHROME_NET) @@ -41,9 +41,11 @@ #endif #if defined(RLZ_NETWORK_IMPLEMENTATION_CHROME_NET) -namespace net { -class URLRequestContextGetter; -} // namespace net +namespace network { +namespace mojom { +class URLLoaderFactory; +} // namespace mojom +} // namespace network #endif namespace rlz_lib { @@ -74,10 +76,8 @@ const size_t kMaxCgiLength = 2048; #if defined(RLZ_NETWORK_IMPLEMENTATION_CHROME_NET) -// Set the URLRequestContextGetter used by SendFinancialPing(). The IO message -// loop returned by this context will be used for the IO done by -// SendFinancialPing(). -bool RLZ_LIB_API SetURLRequestContext(net::URLRequestContextGetter* context); +// Set the URLLoaderFactory used by SendFinancialPing(). +bool RLZ_LIB_API SetURLLoaderFactory(network::mojom::URLLoaderFactory* factory); #endif // RLZ storage functions. @@ -182,7 +182,7 @@ // This ping method should be called daily. (More frequent calls will fail). // Also, if there are no events, the call will succeed only once a week. // -// If RLZ_NETWORK_IMPLEMENTATION_CHROME_NET is set, SetURLRequestContext() needs +// If RLZ_NETWORK_IMPLEMENTATION_CHROME_NET is set, SetURLLoaderFactory() needs // to be called before calling this function. // // product : The product to ping for.
diff --git a/rlz/lib/rlz_lib_test.cc b/rlz/lib/rlz_lib_test.cc index 5de04ff9..3febb0e5 100644 --- a/rlz/lib/rlz_lib_test.cc +++ b/rlz/lib/rlz_lib_test.cc
@@ -43,6 +43,9 @@ #include "base/mac/scoped_nsautorelease_pool.h" #include "base/threading/thread.h" #include "net/url_request/url_request_test_util.h" +#include "services/network/public/cpp/weak_wrapper_shared_url_loader_factory.h" +#include "services/network/public/mojom/url_loader_factory.mojom.h" +#include "services/network/test/test_url_loader_factory.h" #endif #if defined(OS_CHROMEOS) @@ -79,7 +82,7 @@ const char* product_id, const char* product_lang, bool exclude_machine_id, - net::FakeURLFetcherFactory* factory) { + network::TestURLLoaderFactory* url_loader_factory) { const char kGoodPingResponses[] = "version: 3.0.914.7250\r\n" "url: " @@ -97,10 +100,9 @@ EXPECT_TRUE(rlz_lib::FinancialPing::FormRequest( product, access_points, product_signature, product_brand, product_id, product_lang, exclude_machine_id, &request)); - GURL url = GURL(base::StringPrintf( - "https://%s%s", rlz_lib::kFinancialServer, request.c_str())); - factory->SetFakeResponse(url, kGoodPingResponses, net::HTTP_OK, - net::URLRequestStatus::SUCCESS); + std::string url = base::StringPrintf( + "https://%s%s", rlz_lib::kFinancialServer, request.c_str()); + url_loader_factory->AddResponse(url, kGoodPingResponses); } base::test::ScopedTaskEnvironment scoped_task_environment_; @@ -483,14 +485,12 @@ EXPECT_STREQ("events=W1I", value); } -class URLRequestRAII { +class URLLoaderFactoryRAII { public: - URLRequestRAII(net::URLRequestContextGetter* context) { - rlz_lib::SetURLRequestContext(context); + URLLoaderFactoryRAII(network::mojom::URLLoaderFactory* factory) { + rlz_lib::SetURLLoaderFactory(factory); } - ~URLRequestRAII() { - rlz_lib::SetURLRequestContext(NULL); - } + ~URLLoaderFactoryRAII() { rlz_lib::SetURLLoaderFactory(nullptr); } }; TEST_F(RlzLibTest, SendFinancialPing) { @@ -503,15 +503,13 @@ base::mac::ScopedNSAutoreleasePool pool; #endif - base::Thread::Options options; - options.message_loop_type = base::MessageLoop::TYPE_IO; + network::TestURLLoaderFactory test_url_loader_factory; + scoped_refptr<network::SharedURLLoaderFactory> + test_shared_url_loader_factory = + base::MakeRefCounted<network::WeakWrapperSharedURLLoaderFactory>( + &test_url_loader_factory); - base::Thread io_thread("rlz_unittest_io_thread"); - ASSERT_TRUE(io_thread.StartWithOptions(options)); - - scoped_refptr<net::TestURLRequestContextGetter> context = - new net::TestURLRequestContextGetter(io_thread.task_runner()); - URLRequestRAII set_context(context.get()); + URLLoaderFactoryRAII set_factory(test_shared_url_loader_factory.get()); #endif MachineDealCodeHelper::Clear(); @@ -533,23 +531,21 @@ rlz_lib::NO_ACCESS_POINT}; // Excluding machine id from requests so that a stable URL is used and - // this test can use FakeURLFetcherFactory. - net::FakeURLFetcherFactory factory(nullptr); + // this test can use TestURLLoaderFactory. FakeGoodPingResponse(rlz_lib::TOOLBAR_NOTIFIER, points, "swg", "GGLA", "SwgProductId1234", "en-UK", - /* exclude_machine_id */ true, &factory); + /* exclude_machine_id */ true, &test_url_loader_factory); - EXPECT_TRUE(rlz_lib::SendFinancialPing(rlz_lib::TOOLBAR_NOTIFIER, points, - "swg", "GGLA", "SwgProductId1234", - "en-UK", - /* exclude_machine_id */ true, - /* skip_time_check */true)); + rlz_lib::SendFinancialPing(rlz_lib::TOOLBAR_NOTIFIER, points, "swg", "GGLA", + "SwgProductId1234", "en-UK", + /* exclude_machine_id */ true, + /* skip_time_check */ true); } #if defined(RLZ_NETWORK_IMPLEMENTATION_CHROME_NET) -void ResetContext() { - rlz_lib::SetURLRequestContext(NULL); +void ResetURLLoaderFactory() { + rlz_lib::SetURLLoaderFactory(nullptr); } TEST_F(RlzLibTest, SendFinancialPingDuringShutdown) { @@ -567,9 +563,12 @@ base::Thread io_thread("rlz_unittest_io_thread"); ASSERT_TRUE(io_thread.StartWithOptions(options)); - scoped_refptr<net::TestURLRequestContextGetter> context = - new net::TestURLRequestContextGetter(io_thread.task_runner()); - URLRequestRAII set_context(context.get()); + network::TestURLLoaderFactory test_url_loader_factory; + scoped_refptr<network::SharedURLLoaderFactory> + test_shared_url_loader_factory = + base::MakeRefCounted<network::WeakWrapperSharedURLLoaderFactory>( + &test_url_loader_factory); + URLLoaderFactoryRAII set_factory(test_shared_url_loader_factory.get()); rlz_lib::AccessPoint points[] = {rlz_lib::IETB_SEARCH_BOX, rlz_lib::NO_ACCESS_POINT, @@ -577,11 +576,13 @@ rlz_lib::test::ResetSendFinancialPingInterrupted(); EXPECT_FALSE(rlz_lib::test::WasSendFinancialPingInterrupted()); - io_thread.task_runner()->PostTask(FROM_HERE, base::BindOnce(&ResetContext)); - std::string request; - EXPECT_FALSE(rlz_lib::SendFinancialPing(rlz_lib::TOOLBAR_NOTIFIER, points, - "swg", "GGLA", "SwgProductId1234", "en-UK", false, - /*skip_time_check=*/true)); + io_thread.task_runner()->PostTask(FROM_HERE, + base::BindOnce(&ResetURLLoaderFactory)); + + rlz_lib::SendFinancialPing(rlz_lib::TOOLBAR_NOTIFIER, points, "swg", "GGLA", + "SwgProductId1234", "en-UK", + /* exclude_machine_id */ false, + /* skip_time_check */ true); EXPECT_TRUE(rlz_lib::test::WasSendFinancialPingInterrupted()); rlz_lib::test::ResetSendFinancialPingInterrupted();
diff --git a/rlz/test/rlz_unittest_main.cc b/rlz/test/rlz_unittest_main.cc index b7a41ca9..e109ead3 100644 --- a/rlz/test/rlz_unittest_main.cc +++ b/rlz/test/rlz_unittest_main.cc
@@ -7,6 +7,7 @@ #include "base/at_exit.h" #include "base/command_line.h" #include "build/build_config.h" +#include "mojo/core/embedder/embedder.h" #include "rlz/lib/rlz_lib.h" #include "testing/gmock/include/gmock/gmock.h" #include "testing/gtest/include/gtest/gtest.h" @@ -24,6 +25,8 @@ testing::InitGoogleMock(&argc, argv); testing::InitGoogleTest(&argc, argv); + mojo::core::Init(); + int ret = RUN_ALL_TESTS(); if (ret == 0) { // Now re-run all the tests using a supplementary brand code. This brand
diff --git a/services/identity/public/cpp/access_token_fetcher.cc b/services/identity/public/cpp/access_token_fetcher.cc index 0ae6c1f..9edb6ac 100644 --- a/services/identity/public/cpp/access_token_fetcher.cc +++ b/services/identity/public/cpp/access_token_fetcher.cc
@@ -15,12 +15,46 @@ const std::string& oauth_consumer_name, OAuth2TokenService* token_service, const OAuth2TokenService::ScopeSet& scopes, - TokenCallback callback) + TokenCallback callback, + Mode mode) : OAuth2TokenService::Consumer(oauth_consumer_name), account_id_(account_id), token_service_(token_service), scopes_(scopes), - callback_(std::move(callback)) { + mode_(mode), + callback_(std::move(callback)), + token_service_observer_(this) { + if (mode_ == Mode::kImmediate || IsRefreshTokenAvailable()) { + StartAccessTokenRequest(); + return; + } + + // Start observing the IdentityManager. This observer will be removed either + // when a refresh token is obtained and an access token request is started or + // when this object is destroyed. + token_service_observer_.Add(token_service_); +} + +AccessTokenFetcher::~AccessTokenFetcher() {} + +bool AccessTokenFetcher::IsRefreshTokenAvailable() const { + DCHECK_EQ(Mode::kWaitUntilRefreshTokenAvailable, mode_); + + return token_service_->RefreshTokenIsAvailable(account_id_); +} + +void AccessTokenFetcher::StartAccessTokenRequest() { + DCHECK(mode_ == Mode::kImmediate || IsRefreshTokenAvailable()); + + // By the time of starting an access token request, we should no longer be + // listening for signin-related events. + DCHECK(!token_service_observer_.IsObserving(token_service_)); + + // Note: We might get here even in cases where we know that there's no refresh + // token. We're requesting an access token anyway, so that the token service + // will generate an appropriate error code that we can return to the client. + DCHECK(!access_token_request_); + // TODO(843510): Consider making the request to ProfileOAuth2TokenService // asynchronously once there are no direct clients of PO2TS (i.e., PO2TS is // used only by this class and IdentityManager). @@ -28,7 +62,17 @@ token_service_->StartRequest(account_id_, scopes_, this); } -AccessTokenFetcher::~AccessTokenFetcher() {} +void AccessTokenFetcher::OnRefreshTokenAvailable( + const std::string& account_id) { + DCHECK_EQ(Mode::kWaitUntilRefreshTokenAvailable, mode_); + + if (!IsRefreshTokenAvailable()) + return; + + token_service_observer_.Remove(token_service_); + + StartAccessTokenRequest(); +} void AccessTokenFetcher::OnGetTokenSuccess( const OAuth2TokenService::Request* request,
diff --git a/services/identity/public/cpp/access_token_fetcher.h b/services/identity/public/cpp/access_token_fetcher.h index fdc7e90..1718f42e 100644 --- a/services/identity/public/cpp/access_token_fetcher.h +++ b/services/identity/public/cpp/access_token_fetcher.h
@@ -10,6 +10,7 @@ #include "base/callback.h" #include "base/macros.h" +#include "base/scoped_observer.h" #include "google_apis/gaia/google_service_auth_error.h" #include "google_apis/gaia/oauth2_token_service.h" #include "services/identity/public/cpp/access_token_info.h" @@ -22,6 +23,14 @@ class AccessTokenFetcher : public OAuth2TokenService::Observer, public OAuth2TokenService::Consumer { public: + // Specifies how this instance should behave: + // |kImmediate|: Makes one-shot immediate request. + // |kWaitUntilRefreshTokenAvailable|: Waits for the account to have a refresh + // token before making the request. + // Note that using |kWaitUntilRefreshTokenAvailable| can result in waiting + // forever if the user is not signed in and doesn't sign in. + enum class Mode { kImmediate, kWaitUntilRefreshTokenAvailable }; + // Callback for when a request completes (successful or not). On successful // requests, |error| is NONE and |access_token_info| contains info of the // obtained OAuth2 access token. On failed requests, |error| contains the @@ -40,11 +49,21 @@ const std::string& oauth_consumer_name, OAuth2TokenService* token_service, const OAuth2TokenService::ScopeSet& scopes, - TokenCallback callback); + TokenCallback callback, + Mode mode); ~AccessTokenFetcher() override; private: + // Returns true iff a refresh token is available for |account_id_|. Should + // only be called in mode |kWaitUntilAvailable|. + bool IsRefreshTokenAvailable() const; + + void StartAccessTokenRequest(); + + // OAuth2TokenService::Observer implementation. + void OnRefreshTokenAvailable(const std::string& account_id) override; + // OAuth2TokenService::Consumer implementation. void OnGetTokenSuccess(const OAuth2TokenService::Request* request, const std::string& access_token, @@ -59,15 +78,19 @@ void RunCallbackAndMaybeDie(GoogleServiceAuthError error, AccessTokenInfo access_token_info); - std::string account_id_; + const std::string account_id_; OAuth2TokenService* token_service_; - OAuth2TokenService::ScopeSet scopes_; + const OAuth2TokenService::ScopeSet scopes_; + const Mode mode_; // NOTE: This callback should only be invoked from |RunCallbackAndMaybeDie|, // as invoking it has the potential to destroy this object per this class's // contract. TokenCallback callback_; + ScopedObserver<OAuth2TokenService, AccessTokenFetcher> + token_service_observer_; + std::unique_ptr<OAuth2TokenService::Request> access_token_request_; DISALLOW_COPY_AND_ASSIGN(AccessTokenFetcher);
diff --git a/services/identity/public/cpp/access_token_fetcher_unittest.cc b/services/identity/public/cpp/access_token_fetcher_unittest.cc index 42c2a74..bdbfa3d 100644 --- a/services/identity/public/cpp/access_token_fetcher_unittest.cc +++ b/services/identity/public/cpp/access_token_fetcher_unittest.cc
@@ -21,6 +21,7 @@ using base::MockCallback; using sync_preferences::TestingPrefServiceSyncable; +using testing::_; using testing::StrictMock; namespace identity { @@ -63,11 +64,12 @@ std::unique_ptr<AccessTokenFetcher> CreateFetcher( const std::string& account_id, - AccessTokenFetcher::TokenCallback callback) { + AccessTokenFetcher::TokenCallback callback, + AccessTokenFetcher::Mode mode) { std::set<std::string> scopes{"scope"}; return std::make_unique<AccessTokenFetcher>(account_id, "test_consumer", &token_service_, scopes, - std::move(callback)); + std::move(callback), mode); } AccountTrackerService* account_tracker() { return account_tracker_.get(); } @@ -102,7 +104,7 @@ base::OnceClosure on_access_token_request_callback_; }; -TEST_F(AccessTokenFetcherTest, CallsBackOnFulfilledRequest) { +TEST_F(AccessTokenFetcherTest, OneShotShouldCallBackOnFulfilledRequest) { TestTokenCallback callback; base::RunLoop run_loop; @@ -112,7 +114,8 @@ token_service()->UpdateCredentials(account_id, "refresh token"); // This should result in a request for an access token. - auto fetcher = CreateFetcher(account_id, callback.Get()); + auto fetcher = CreateFetcher(account_id, callback.Get(), + AccessTokenFetcher::Mode::kImmediate); run_loop.Run(); @@ -126,6 +129,95 @@ access_token_info().expiration_time); } +TEST_F(AccessTokenFetcherTest, + WaitUntilAvailableShouldCallBackOnFulfilledRequest) { + TestTokenCallback callback; + + base::RunLoop run_loop; + set_on_access_token_request_callback(run_loop.QuitClosure()); + + std::string account_id = AddAccount(kTestGaiaId, kTestEmail); + token_service()->UpdateCredentials(account_id, "refresh token"); + + // Since the refresh token is already available, this should result in an + // immediate request for an access token. + auto fetcher = + CreateFetcher(account_id, callback.Get(), + AccessTokenFetcher::Mode::kWaitUntilRefreshTokenAvailable); + + run_loop.Run(); + + // Once the access token request is fulfilled, we should get called back with + // the access token. + EXPECT_CALL(callback, Run(GoogleServiceAuthError::AuthErrorNone(), + access_token_info())); + + token_service()->IssueAllTokensForAccount( + account_id, access_token_info().token, + access_token_info().expiration_time); +} + +TEST_F(AccessTokenFetcherTest, + WaitUntilAvailableShouldCallBackOnFulfilledRequestAfterTokenAvailable) { + TestTokenCallback callback; + + base::RunLoop run_loop; + set_on_access_token_request_callback(run_loop.QuitClosure()); + + std::string account_id = AddAccount(kTestGaiaId, kTestEmail); + + // Since the refresh token is not available yet, this should just start + // waiting for it. + auto fetcher = + CreateFetcher(account_id, callback.Get(), + AccessTokenFetcher::Mode::kWaitUntilRefreshTokenAvailable); + + // Before the refresh token is available, the callback shouldn't get called. + EXPECT_CALL(callback, Run(_, _)).Times(0); + token_service()->IssueAllTokensForAccount( + account_id, access_token_info().token, + access_token_info().expiration_time); + + // Once the refresh token becomes available, we should get an access token + // request. + token_service()->UpdateCredentials(account_id, "refresh token"); + + run_loop.Run(); + + // Once the access token request is fulfilled, we should get called back with + // the access token. + EXPECT_CALL(callback, Run(GoogleServiceAuthError::AuthErrorNone(), + access_token_info())); + + token_service()->IssueAllTokensForAccount( + account_id, access_token_info().token, + access_token_info().expiration_time); +} + +TEST_F(AccessTokenFetcherTest, + WaitUntilAvailableShouldIgnoreRefreshTokenForDifferentAccount) { + TestTokenCallback callback; + + MockCallback<base::OnceClosure> access_token_request_callback; + set_on_access_token_request_callback(access_token_request_callback.Get()); + + std::string account_id = AddAccount(kTestGaiaId, kTestEmail); + std::string other_account_id = AddAccount(kTestGaiaId2, kTestEmail2); + + // Since the refresh token is not available yet, this should just start + // waiting for it. + auto fetcher = + CreateFetcher(account_id, callback.Get(), + AccessTokenFetcher::Mode::kWaitUntilRefreshTokenAvailable); + + // A refresh token for a different account should make no difference. + EXPECT_CALL(callback, Run(_, _)).Times(0); + EXPECT_CALL(access_token_request_callback, Run()).Times(0); + token_service()->UpdateCredentials(other_account_id, "refresh token"); + + base::RunLoop().RunUntilIdle(); +} + TEST_F(AccessTokenFetcherTest, ShouldNotReplyIfDestroyed) { TestTokenCallback callback; @@ -136,7 +228,8 @@ token_service()->UpdateCredentials(account_id, "refresh token"); // This should result in a request for an access token. - auto fetcher = CreateFetcher(account_id, callback.Get()); + auto fetcher = CreateFetcher(account_id, callback.Get(), + AccessTokenFetcher::Mode::kImmediate); run_loop.Run(); @@ -155,7 +248,8 @@ base::RunLoop run_loop; // Account not present -> we should get called back. - auto fetcher = CreateFetcher("dummy_account_id", callback.Get()); + auto fetcher = CreateFetcher("dummy_account_id", callback.Get(), + AccessTokenFetcher::Mode::kImmediate); EXPECT_CALL(callback, Run(GoogleServiceAuthError( @@ -174,7 +268,8 @@ std::string account_id = AddAccount(kTestGaiaId, kTestEmail); // Account has no refresh token -> we should get called back. - auto fetcher = CreateFetcher(account_id, callback.Get()); + auto fetcher = CreateFetcher(account_id, callback.Get(), + AccessTokenFetcher::Mode::kImmediate); EXPECT_CALL(callback, Run(GoogleServiceAuthError( @@ -195,7 +290,8 @@ token_service()->UpdateCredentials(account_id, "refresh token"); // This should result in a request for an access token. - auto fetcher = CreateFetcher(account_id, callback.Get()); + auto fetcher = CreateFetcher(account_id, callback.Get(), + AccessTokenFetcher::Mode::kImmediate); run_loop.Run(); @@ -224,7 +320,8 @@ token_service()->UpdateCredentials(account_id, "refresh token"); // This should result in a request for an access token. - auto fetcher = CreateFetcher(account_id, callback.Get()); + auto fetcher = CreateFetcher(account_id, callback.Get(), + AccessTokenFetcher::Mode::kImmediate); run_loop.Run(); @@ -248,7 +345,8 @@ // Signed in and refresh token already exists, so this should result in a // request for an access token. - auto fetcher = CreateFetcher(account_id, callback.Get()); + auto fetcher = CreateFetcher(account_id, callback.Get(), + AccessTokenFetcher::Mode::kImmediate); run_loop.Run(); @@ -272,7 +370,8 @@ token_service()->UpdateCredentials(account_id, "refresh token"); // This should result in a request for an access token. - auto fetcher = CreateFetcher(account_id, callback.Get()); + auto fetcher = CreateFetcher(account_id, callback.Get(), + AccessTokenFetcher::Mode::kImmediate); run_loop.Run(); @@ -280,7 +379,8 @@ TestTokenCallback callback2; base::RunLoop run_loop2; set_on_access_token_request_callback(run_loop2.QuitClosure()); - auto fetcher2 = CreateFetcher(account_id, callback2.Get()); + auto fetcher2 = CreateFetcher(account_id, callback2.Get(), + AccessTokenFetcher::Mode::kImmediate); run_loop2.Run(); // Once the access token request is fulfilled, both requests should get @@ -304,7 +404,8 @@ token_service()->UpdateCredentials(account_id, "refresh token"); // This should result in a request for an access token. - auto fetcher = CreateFetcher(account_id, callback.Get()); + auto fetcher = CreateFetcher(account_id, callback.Get(), + AccessTokenFetcher::Mode::kImmediate); run_loop.Run(); @@ -314,7 +415,8 @@ TestTokenCallback callback2; base::RunLoop run_loop2; set_on_access_token_request_callback(run_loop2.QuitClosure()); - auto fetcher2 = CreateFetcher(account_id2, callback2.Get()); + auto fetcher2 = CreateFetcher(account_id2, callback2.Get(), + AccessTokenFetcher::Mode::kImmediate); run_loop2.Run(); // Once the first access token request is fulfilled, it should get @@ -345,7 +447,8 @@ token_service()->UpdateCredentials(account_id, "refresh token"); // This should result in a request for an access token. - auto fetcher = CreateFetcher(account_id, callback.Get()); + auto fetcher = CreateFetcher(account_id, callback.Get(), + AccessTokenFetcher::Mode::kImmediate); run_loop.Run(); // Add a second account and request an access token for it. @@ -356,7 +459,8 @@ set_on_access_token_request_callback(run_loop2.QuitClosure()); TestTokenCallback callback2; - auto fetcher2 = CreateFetcher(account_id2, callback2.Get()); + auto fetcher2 = CreateFetcher(account_id2, callback2.Get(), + AccessTokenFetcher::Mode::kImmediate); run_loop2.Run(); // Cancel the first access token request: This should result in a callback
diff --git a/services/identity/public/cpp/identity_manager.cc b/services/identity/public/cpp/identity_manager.cc index fe234cd..6bfbe19 100644 --- a/services/identity/public/cpp/identity_manager.cc +++ b/services/identity/public/cpp/identity_manager.cc
@@ -220,10 +220,11 @@ const std::string& account_id, const std::string& oauth_consumer_name, const OAuth2TokenService::ScopeSet& scopes, - AccessTokenFetcher::TokenCallback callback) { + AccessTokenFetcher::TokenCallback callback, + AccessTokenFetcher::Mode mode) { return std::make_unique<AccessTokenFetcher>(account_id, oauth_consumer_name, token_service_, scopes, - std::move(callback)); + std::move(callback), mode); } void IdentityManager::RemoveAccessTokenFromCache(
diff --git a/services/identity/public/cpp/identity_manager.h b/services/identity/public/cpp/identity_manager.h index 862931ee..9a37ae6 100644 --- a/services/identity/public/cpp/identity_manager.h +++ b/services/identity/public/cpp/identity_manager.h
@@ -186,7 +186,8 @@ const std::string& account_id, const std::string& oauth_consumer_name, const OAuth2TokenService::ScopeSet& scopes, - AccessTokenFetcher::TokenCallback callback); + AccessTokenFetcher::TokenCallback callback, + AccessTokenFetcher::Mode mode); // If an entry exists in the Identity Service's cache corresponding to the // given information, removes that entry; in this case, the next access token
diff --git a/services/identity/public/cpp/identity_manager_unittest.cc b/services/identity/public/cpp/identity_manager_unittest.cc index 33b1706..4f7f98e 100644 --- a/services/identity/public/cpp/identity_manager_unittest.cc +++ b/services/identity/public/cpp/identity_manager_unittest.cc
@@ -1173,7 +1173,8 @@ std::unique_ptr<AccessTokenFetcher> token_fetcher = identity_manager()->CreateAccessTokenFetcherForAccount( identity_manager()->GetPrimaryAccountInfo().account_id, - "dummy_consumer", scopes, std::move(callback)); + "dummy_consumer", scopes, std::move(callback), + AccessTokenFetcher::Mode::kImmediate); EXPECT_TRUE(token_fetcher); } @@ -1192,7 +1193,8 @@ std::unique_ptr<AccessTokenFetcher> token_fetcher = identity_manager()->CreateAccessTokenFetcherForAccount( identity_manager()->GetPrimaryAccountInfo().account_id, - "dummy_consumer", scopes, std::move(callback)); + "dummy_consumer", scopes, std::move(callback), + AccessTokenFetcher::Mode::kImmediate); run_loop.Run();
diff --git a/services/identity/public/cpp/primary_account_access_token_fetcher.cc b/services/identity/public/cpp/primary_account_access_token_fetcher.cc index 8386345..627a233 100644 --- a/services/identity/public/cpp/primary_account_access_token_fetcher.cc +++ b/services/identity/public/cpp/primary_account_access_token_fetcher.cc
@@ -55,12 +55,19 @@ // will generate an appropriate error code that we can return to the client. DCHECK(!access_token_fetcher_); + // NOTE: This class does not utilize AccessTokenFetcher in its + // |kWaitUntilRefreshTokenAvailable| mode because the PAATF semantics specify + // that when used in *its* |kWaitUntilAvailable| mode, the access token + // request should be started when the account is primary AND has a refresh + // token available. AccessTokenFetcher used in + // |kWaitUntilRefreshTokenAvailable| mode would guarantee only the latter. access_token_fetcher_ = identity_manager_->CreateAccessTokenFetcherForAccount( identity_manager_->GetPrimaryAccountInfo().account_id, oauth_consumer_name_, scopes_, base::BindOnce( &PrimaryAccountAccessTokenFetcher::OnAccessTokenFetchComplete, - base::Unretained(this))); + base::Unretained(this)), + AccessTokenFetcher::Mode::kImmediate); } void PrimaryAccountAccessTokenFetcher::OnPrimaryAccountSet(
diff --git a/services/identity/public/cpp/primary_account_access_token_fetcher.h b/services/identity/public/cpp/primary_account_access_token_fetcher.h index ad5df04..9de4cd76 100644 --- a/services/identity/public/cpp/primary_account_access_token_fetcher.h +++ b/services/identity/public/cpp/primary_account_access_token_fetcher.h
@@ -28,7 +28,12 @@ // Specifies how this instance should behave: // |kImmediate|: Makes one-shot immediate request. // |kWaitUntilAvailable|: Waits for the primary account to be available - // before making the request. + // before making the request. In particular, "available" is defined as the + // moment when (a) there is a primary account and (b) that account has a + // refresh token. This semantics is richer than using an AccessTokenFetcher in + // kWaitUntilRefreshTokenAvailable mode, as the latter will make a request + // once the specified account has a refresh token, regardless of whether it's + // the primary account at that point. // Note that using |kWaitUntilAvailable| can result in waiting forever // if the user is not signed in and doesn't sign in. enum class Mode { kImmediate, kWaitUntilAvailable };
diff --git a/services/network/BUILD.gn b/services/network/BUILD.gn index a7f4e76ed..d51f7509 100644 --- a/services/network/BUILD.gn +++ b/services/network/BUILD.gn
@@ -128,6 +128,8 @@ "throttling/throttling_upload_data_stream.h", "tls_client_socket.cc", "tls_client_socket.h", + "transitional_url_loader_factory_owner.cc", + "transitional_url_loader_factory_owner.h", "udp_socket.cc", "udp_socket.h", "upload_progress_tracker.cc", @@ -258,6 +260,7 @@ "test_chunked_data_pipe_getter.h", "throttling/throttling_controller_unittest.cc", "tls_client_socket_unittest.cc", + "transitional_url_loader_factory_owner_unittest.cc", "udp_socket_unittest.cc", "upload_progress_tracker_unittest.cc", "url_loader_unittest.cc",
diff --git a/services/network/network_service_network_delegate.cc b/services/network/network_service_network_delegate.cc index e4b3b93e..0025e8d 100644 --- a/services/network/network_service_network_delegate.cc +++ b/services/network/network_service_network_delegate.cc
@@ -52,4 +52,36 @@ return true; } +bool NetworkServiceNetworkDelegate::OnCanQueueReportingReport( + const url::Origin& origin) const { + // TODO(crbug.com/845559): Disable all Reporting uploads until we can perform + // a BACKGROUND_SYNC permissions check across service boundaries. + return false; +} + +void NetworkServiceNetworkDelegate::OnCanSendReportingReports( + std::set<url::Origin> origins, + base::OnceCallback<void(std::set<url::Origin>)> result_callback) const { + // TODO(crbug.com/845559): Disable all Reporting uploads until we can perform + // a BACKGROUND_SYNC permissions check across service boundaries. + origins.clear(); + std::move(result_callback).Run(std::move(origins)); +} + +bool NetworkServiceNetworkDelegate::OnCanSetReportingClient( + const url::Origin& origin, + const GURL& endpoint) const { + // TODO(crbug.com/845559): Disable all Reporting uploads until we can perform + // a BACKGROUND_SYNC permissions check across service boundaries. + return false; +} + +bool NetworkServiceNetworkDelegate::OnCanUseReportingClient( + const url::Origin& origin, + const GURL& endpoint) const { + // TODO(crbug.com/845559): Disable all Reporting uploads until we can perform + // a BACKGROUND_SYNC permissions check across service boundaries. + return false; +} + } // namespace network
diff --git a/services/network/network_service_network_delegate.h b/services/network/network_service_network_delegate.h index 6508413..6ac7fdd 100644 --- a/services/network/network_service_network_delegate.h +++ b/services/network/network_service_network_delegate.h
@@ -32,6 +32,15 @@ const base::FilePath& original_path, const base::FilePath& absolute_path) const override; + bool OnCanQueueReportingReport(const url::Origin& origin) const override; + void OnCanSendReportingReports(std::set<url::Origin> origins, + base::OnceCallback<void(std::set<url::Origin>)> + result_callback) const override; + bool OnCanSetReportingClient(const url::Origin& origin, + const GURL& endpoint) const override; + bool OnCanUseReportingClient(const url::Origin& origin, + const GURL& endpoint) const override; + NetworkContext* network_context_; DISALLOW_COPY_AND_ASSIGN(NetworkServiceNetworkDelegate);
diff --git a/services/network/transitional_url_loader_factory_owner.cc b/services/network/transitional_url_loader_factory_owner.cc new file mode 100644 index 0000000..908451d7 --- /dev/null +++ b/services/network/transitional_url_loader_factory_owner.cc
@@ -0,0 +1,117 @@ +// 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/network/transitional_url_loader_factory_owner.h" + +#include "base/memory/ptr_util.h" +#include "base/memory/ref_counted.h" +#include "base/memory/ref_counted_delete_on_sequence.h" +#include "base/no_destructor.h" +#include "base/synchronization/atomic_flag.h" +#include "net/url_request/url_request_context_getter.h" +#include "services/network/network_context.h" +#include "services/network/public/cpp/shared_url_loader_factory.h" +#include "services/network/public/cpp/weak_wrapper_shared_url_loader_factory.h" + +namespace network { + +// Portion of TransitionalURLLoaderFactoryOwner that lives on the network +// task runner associated with the URLRequestContextGetter. +class TransitionalURLLoaderFactoryOwner::Core { + public: + Core(scoped_refptr<net::URLRequestContextGetter> url_request_context_getter) + : url_request_context_getter_(std::move(url_request_context_getter)), + task_runner_(url_request_context_getter_->GetNetworkTaskRunner()) {} + + void CreateNetworkContext(mojom::NetworkContextRequest request) { + if (task_runner_->RunsTasksInCurrentSequence()) { + // This must be synchronous since in same-runner case deletes are + // synchronous as well. + CreateNetworkContextOnNetworkThread(std::move(request)); + } else { + // Unretained is safe since cross-thread deletes will also be posted. + task_runner_->PostTask( + FROM_HERE, + base::BindOnce(&Core::CreateNetworkContextOnNetworkThread, + base::Unretained(this), std::move(request))); + } + } + + static void DeleteOnRightThread(std::unique_ptr<Core> instance) { + scoped_refptr<base::SequencedTaskRunner> task_runner = + instance->task_runner_; + if (!task_runner->RunsTasksInCurrentSequence()) + task_runner->DeleteSoon(FROM_HERE, std::move(instance)); + // otherwise |instance| going out of scope will do the right thing. + } + + private: + friend class base::DeleteHelper<Core>; + friend struct std::default_delete<Core>; + + ~Core() { + DCHECK(url_request_context_getter_->GetURLRequestContext()); + DCHECK(task_runner_->RunsTasksInCurrentSequence()); + } + + void CreateNetworkContextOnNetworkThread( + mojom::NetworkContextRequest request) { + network_context_ = std::make_unique<network::NetworkContext>( + nullptr /* network_service */, std::move(request), + url_request_context_getter_->GetURLRequestContext()); + } + + scoped_refptr<net::URLRequestContextGetter> url_request_context_getter_; + scoped_refptr<base::SequencedTaskRunner> task_runner_; + std::unique_ptr<network::NetworkContext> network_context_; +}; + +TransitionalURLLoaderFactoryOwner::TransitionalURLLoaderFactoryOwner( + scoped_refptr<net::URLRequestContextGetter> url_request_context_getter) + : core_(std::make_unique<Core>(std::move(url_request_context_getter))) { + DCHECK(!disallowed_in_process().IsSet()); +} + +TransitionalURLLoaderFactoryOwner::~TransitionalURLLoaderFactoryOwner() { + DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_); + DCHECK(!disallowed_in_process().IsSet()); + + if (shared_url_loader_factory_) + shared_url_loader_factory_->Detach(); + + Core::DeleteOnRightThread(std::move(core_)); +} + +scoped_refptr<network::SharedURLLoaderFactory> +TransitionalURLLoaderFactoryOwner::GetURLLoaderFactory() { + DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_); + DCHECK(!disallowed_in_process().IsSet()); + + if (!shared_url_loader_factory_) { + core_->CreateNetworkContext(mojo::MakeRequest(&network_context_pipe_)); + auto url_loader_factory_params = + network::mojom::URLLoaderFactoryParams::New(); + url_loader_factory_params->process_id = mojom::kBrowserProcessId; + url_loader_factory_params->is_corb_enabled = false; + network_context_pipe_->CreateURLLoaderFactory( + mojo::MakeRequest(&url_loader_factory_), + std::move(url_loader_factory_params)); + shared_url_loader_factory_ = + base::MakeRefCounted<network::WeakWrapperSharedURLLoaderFactory>( + url_loader_factory_.get()); + } + + return shared_url_loader_factory_; +} + +void TransitionalURLLoaderFactoryOwner::DisallowUsageInProcess() { + disallowed_in_process().Set(); +} + +base::AtomicFlag& TransitionalURLLoaderFactoryOwner::disallowed_in_process() { + static base::NoDestructor<base::AtomicFlag> instance; + return *instance; +} + +} // namespace network
diff --git a/services/network/transitional_url_loader_factory_owner.h b/services/network/transitional_url_loader_factory_owner.h new file mode 100644 index 0000000..5bdeb7d --- /dev/null +++ b/services/network/transitional_url_loader_factory_owner.h
@@ -0,0 +1,66 @@ +// 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_NETWORK_TRANSITIONAL_URL_LOADER_FACTORY_OWNER_H_ +#define SERVICES_NETWORK_TRANSITIONAL_URL_LOADER_FACTORY_OWNER_H_ + +#include <memory> + +#include "base/component_export.h" +#include "base/macros.h" +#include "base/memory/scoped_refptr.h" +#include "base/sequence_checker.h" +#include "base/sequenced_task_runner.h" +#include "base/synchronization/atomic_flag.h" +#include "services/network/public/mojom/network_context.mojom.h" +#include "services/network/public/mojom/url_loader_factory.mojom.h" + +namespace net { +class URLRequestContextGetter; +} + +namespace network { + +class SharedURLLoaderFactory; +class WeakWrapperSharedURLLoaderFactory; + +// This class is intended for stand-alone executables that use net/ and also +// components that use Network Service APIs, and therefore need a +// SharedURLLoaderFactory for fetching. This provides it on top of the existing +// URLRequestContextGetter. This should not be used within the browser process. +// +// All of the methods must be called from the same sequence, which may be +// different from |url_request_context_getter|'s network thread. +class COMPONENT_EXPORT(NETWORK_SERVICE) TransitionalURLLoaderFactoryOwner { + public: + // |this| must outlive the URLRequestContext underlying + // |url_request_context_getter|. + explicit TransitionalURLLoaderFactoryOwner( + scoped_refptr<net::URLRequestContextGetter> url_request_context_getter); + ~TransitionalURLLoaderFactoryOwner(); + + scoped_refptr<network::SharedURLLoaderFactory> GetURLLoaderFactory(); + + // If this is called, any creation, use, or destruction of a + // TransitionalURLLoaderFactoryOwner will DCHECK-fail. + static void DisallowUsageInProcess(); + + private: + class Core; + + static base::AtomicFlag& disallowed_in_process(); + + std::unique_ptr<Core> core_; // deleted cross-thread + network::mojom::NetworkContextPtr network_context_pipe_; + network::mojom::URLLoaderFactoryPtr url_loader_factory_; + scoped_refptr<network::WeakWrapperSharedURLLoaderFactory> + shared_url_loader_factory_; + SEQUENCE_CHECKER(sequence_checker_); + + DISALLOW_COPY_AND_ASSIGN(TransitionalURLLoaderFactoryOwner); +}; + +} // namespace network + +#endif // SERVICES_NETWORK_TRANSITIONAL_URL_LOADER_FACTORY_OWNER_H_
diff --git a/services/network/transitional_url_loader_factory_owner_unittest.cc b/services/network/transitional_url_loader_factory_owner_unittest.cc new file mode 100644 index 0000000..332e76a1 --- /dev/null +++ b/services/network/transitional_url_loader_factory_owner_unittest.cc
@@ -0,0 +1,92 @@ +// 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/network/transitional_url_loader_factory_owner.h" + +#include <memory> +#include <string> + +#include "base/run_loop.h" +#include "base/test/bind_test_util.h" +#include "base/test/scoped_task_environment.h" +#include "base/threading/thread.h" +#include "net/test/embedded_test_server/default_handlers.h" +#include "net/test/embedded_test_server/embedded_test_server.h" +#include "net/traffic_annotation/network_traffic_annotation_test_helper.h" +#include "net/url_request/url_request_test_util.h" +#include "services/network/public/cpp/resource_request.h" +#include "services/network/public/cpp/shared_url_loader_factory.h" +#include "services/network/public/cpp/simple_url_loader.h" +#include "testing/gtest/include/gtest/gtest.h" + +namespace network { +namespace { + +class TransitionalURLLoaderFactoryOwnerTest : public ::testing::Test { + public: + TransitionalURLLoaderFactoryOwnerTest() + : scoped_task_environment_( + base::test::ScopedTaskEnvironment::MainThreadType::IO) {} + + void SetUp() override { + net::test_server::RegisterDefaultHandlers(&test_server_); + ASSERT_TRUE(test_server_.Start()); + } + + void TestOnTaskRunner(scoped_refptr<base::SingleThreadTaskRunner> task_runner, + base::OnceClosure flush_thread) { + auto url_request_context_getter = + base::MakeRefCounted<net::TestURLRequestContextGetter>(task_runner); + auto owner = std::make_unique<TransitionalURLLoaderFactoryOwner>( + url_request_context_getter); + + scoped_refptr<network::SharedURLLoaderFactory> url_loader_factory = + owner->GetURLLoaderFactory(); + ASSERT_TRUE(url_loader_factory != nullptr); + + // Try fetching something --- see if |url_loader_factory| is usable. + auto request = std::make_unique<ResourceRequest>(); + request->url = test_server_.GetURL("/cachetime"); + std::unique_ptr<SimpleURLLoader> loader = SimpleURLLoader::Create( + std::move(request), TRAFFIC_ANNOTATION_FOR_TESTS); + + base::RunLoop run_loop; + loader->DownloadToStringOfUnboundedSizeUntilCrashAndDie( + url_loader_factory.get(), + base::BindLambdaForTesting([&](std::unique_ptr<std::string> body) { + ASSERT_TRUE(body); + EXPECT_NE(std::string::npos, body->find("<title>Cache:")) << *body; + run_loop.Quit(); + })); + run_loop.Run(); + + // Clean stuff up, should be clean on lsan. + owner = nullptr; + std::move(flush_thread).Run(); + } + + protected: + base::test::ScopedTaskEnvironment scoped_task_environment_; + net::EmbeddedTestServer test_server_; +}; + +TEST_F(TransitionalURLLoaderFactoryOwnerTest, CrossThread) { + base::Thread io_thread("IO"); + base::Thread::Options options; + options.message_loop_type = base::MessageLoop::TYPE_IO; + ASSERT_TRUE(io_thread.StartWithOptions(options)); + + TestOnTaskRunner(io_thread.task_runner(), base::BindLambdaForTesting([&]() { + io_thread.FlushForTesting(); + })); +} + +TEST_F(TransitionalURLLoaderFactoryOwnerTest, SameThread) { + TestOnTaskRunner(scoped_task_environment_.GetMainThreadTaskRunner(), + base::BindLambdaForTesting( + [&]() { scoped_task_environment_.RunUntilIdle(); })); +} + +} // namespace +} // namespace network
diff --git a/services/service_manager/runner/host/service_process_launcher.cc b/services/service_manager/runner/host/service_process_launcher.cc index 8353cc47..7139b21 100644 --- a/services/service_manager/runner/host/service_process_launcher.cc +++ b/services/service_manager/runner/host/service_process_launcher.cc
@@ -11,15 +11,21 @@ #include "base/command_line.h" #include "base/location.h" #include "base/logging.h" +#include "base/memory/ptr_util.h" #include "base/path_service.h" #include "base/process/kill.h" #include "base/process/launch.h" +#include "base/run_loop.h" +#include "base/sequence_checker.h" #include "base/synchronization/lock.h" #include "base/task/post_task.h" -#include "base/threading/thread_restrictions.h" +#include "base/task_runner_util.h" +#include "base/threading/thread.h" #include "build/build_config.h" #include "mojo/public/cpp/bindings/interface_ptr_info.h" +#include "mojo/public/cpp/platform/platform_channel.h" #include "mojo/public/cpp/system/core.h" +#include "mojo/public/cpp/system/invitation.h" #include "services/service_manager/public/cpp/standalone_service/switches.h" #include "services/service_manager/runner/common/client_util.h" #include "services/service_manager/runner/common/switches.h" @@ -39,30 +45,57 @@ namespace service_manager { +// Thread-safe owner of state related to a service process. This facilitates +// safely scheduling the launching and joining of a service process in the +// background. +class ServiceProcessLauncher::ProcessState + : public base::RefCountedThreadSafe<ProcessState> { + public: + ProcessState() { DETACH_FROM_SEQUENCE(sequence_checker_); } + + base::ProcessId LaunchInBackground( + const Identity& target, + SandboxType sandbox_type, + std::unique_ptr<base::CommandLine> child_command_line, + mojo::PlatformChannel::HandlePassingInfo handle_passing_info, + mojo::PlatformChannel channel, + mojo::OutgoingInvitation invitation); + + void StopInBackground(); + + private: + friend class base::RefCountedThreadSafe<ProcessState>; + + ~ProcessState() = default; + + base::Process child_process_; + SEQUENCE_CHECKER(sequence_checker_); + + DISALLOW_COPY_AND_ASSIGN(ProcessState); +}; + ServiceProcessLauncher::ServiceProcessLauncher( ServiceProcessLauncherDelegate* delegate, const base::FilePath& service_path) : delegate_(delegate), - service_path_(service_path), - start_child_process_event_( - base::WaitableEvent::ResetPolicy::AUTOMATIC, - base::WaitableEvent::InitialState::NOT_SIGNALED), - weak_factory_(this) { - if (service_path_.empty()) - service_path_ = base::CommandLine::ForCurrentProcess()->GetProgram(); -} + service_path_(service_path.empty() + ? base::CommandLine::ForCurrentProcess()->GetProgram() + : service_path), + background_task_runner_(base::CreateSequencedTaskRunnerWithTraits( + {base::TaskPriority::USER_VISIBLE, base::WithBaseSyncPrimitives(), + base::MayBlock()})) {} ServiceProcessLauncher::~ServiceProcessLauncher() { - Join(); + // We don't really need to wait for the process to be joined, as long as it + // eventually happens. Schedule a task to do it, and move on. + background_task_runner_->PostTask( + FROM_HERE, base::BindOnce(&ProcessState::StopInBackground, state_)); } mojom::ServicePtr ServiceProcessLauncher::Start(const Identity& target, SandboxType sandbox_type, ProcessReadyCallback callback) { - DCHECK(!child_process_.IsValid()); - - sandbox_type_ = sandbox_type; - target_ = target; + DCHECK(!state_); const base::CommandLine& parent_command_line = *base::CommandLine::ForCurrentProcess(); @@ -76,65 +109,48 @@ child_command_line->AppendSwitchASCII("u", target.user_id()); #endif - if (!IsUnsandboxedSandboxType(sandbox_type_)) { + if (!IsUnsandboxedSandboxType(sandbox_type)) { child_command_line->AppendSwitchASCII( switches::kServiceSandboxType, - StringFromUtilitySandboxType(sandbox_type_)); + StringFromUtilitySandboxType(sandbox_type)); } - channel_.emplace(); - channel_->PrepareToPassRemoteEndpoint(&handle_passing_info_, - child_command_line.get()); + mojo::PlatformChannel::HandlePassingInfo handle_passing_info; + mojo::PlatformChannel channel; + channel.PrepareToPassRemoteEndpoint(&handle_passing_info, + child_command_line.get()); + mojo::OutgoingInvitation invitation; mojom::ServicePtr client = - PassServiceRequestOnCommandLine(&invitation_, child_command_line.get()); + PassServiceRequestOnCommandLine(&invitation, child_command_line.get()); - base::PostTaskWithTraitsAndReply( - FROM_HERE, {base::TaskPriority::USER_BLOCKING, base::MayBlock()}, - base::BindOnce(&ServiceProcessLauncher::DoLaunch, base::Unretained(this), - base::Passed(&child_command_line)), - base::BindOnce(&ServiceProcessLauncher::DidStart, - weak_factory_.GetWeakPtr(), std::move(callback))); + if (delegate_) { + delegate_->AdjustCommandLineArgumentsForTarget(target, + child_command_line.get()); + } + + state_ = base::WrapRefCounted(new ProcessState); + base::PostTaskAndReplyWithResult( + background_task_runner_.get(), FROM_HERE, + base::BindOnce(&ProcessState::LaunchInBackground, state_, target, + sandbox_type, std::move(child_command_line), + std::move(handle_passing_info), std::move(channel), + std::move(invitation)), + std::move(callback)); return client; } -void ServiceProcessLauncher::Join() { - // TODO: This code runs on the IO thread where Wait() is not allowed. This - // needs to be fixed: https://crbug.com/844078. - base::ScopedAllowBaseSyncPrimitivesOutsideBlockingScope allow_sync; - if (channel_) - start_child_process_event_.Wait(); - channel_.reset(); - if (child_process_.IsValid()) { - int rv = -1; - LOG_IF(ERROR, !child_process_.WaitForExit(&rv)) - << "Failed to wait for child process"; - child_process_.Close(); - } -} - -void ServiceProcessLauncher::DidStart(ProcessReadyCallback callback) { - if (child_process_.IsValid()) { - std::move(callback).Run(child_process_.Pid()); - } else { - LOG(ERROR) << "Failed to start child process"; - channel_.reset(); - std::move(callback).Run(base::kNullProcessId); - } -} - -void ServiceProcessLauncher::DoLaunch( - std::unique_ptr<base::CommandLine> child_command_line) { - DCHECK(channel_); - - if (delegate_) { - delegate_->AdjustCommandLineArgumentsForTarget(target_, - child_command_line.get()); - } - +base::ProcessId ServiceProcessLauncher::ProcessState::LaunchInBackground( + const Identity& target, + SandboxType sandbox_type, + std::unique_ptr<base::CommandLine> child_command_line, + mojo::PlatformChannel::HandlePassingInfo handle_passing_info, + mojo::PlatformChannel channel, + mojo::OutgoingInvitation invitation) { + DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_); base::LaunchOptions options; #if defined(OS_WIN) - options.handles_to_inherit = handle_passing_info_; + options.handles_to_inherit = handle_passing_info; options.stdin_handle = INVALID_HANDLE_VALUE; options.stdout_handle = GetStdHandle(STD_OUTPUT_HANDLE); options.stderr_handle = GetStdHandle(STD_ERROR_HANDLE); @@ -160,19 +176,19 @@ } #elif defined(OS_FUCHSIA) // LaunchProcess will share stdin/out/err with the child process by default. - if (!IsUnsandboxedSandboxType(sandbox_type_)) + if (!IsUnsandboxedSandboxType(sandbox_type)) NOTIMPLEMENTED(); - options.handles_to_transfer = std::move(handle_passing_info_); + options.handles_to_transfer = std::move(handle_passing_info); #elif defined(OS_POSIX) - handle_passing_info_.push_back(std::make_pair(STDIN_FILENO, STDIN_FILENO)); - handle_passing_info_.push_back(std::make_pair(STDOUT_FILENO, STDOUT_FILENO)); - handle_passing_info_.push_back(std::make_pair(STDERR_FILENO, STDERR_FILENO)); - options.fds_to_remap = handle_passing_info_; + handle_passing_info.push_back(std::make_pair(STDIN_FILENO, STDIN_FILENO)); + handle_passing_info.push_back(std::make_pair(STDOUT_FILENO, STDOUT_FILENO)); + handle_passing_info.push_back(std::make_pair(STDERR_FILENO, STDERR_FILENO)); + options.fds_to_remap = handle_passing_info; #endif DVLOG(2) << "Launching child with command line: " << child_command_line->GetCommandLineString(); #if defined(OS_LINUX) - if (!IsUnsandboxedSandboxType(sandbox_type_)) { + if (!IsUnsandboxedSandboxType(sandbox_type)) { child_process_ = sandbox::NamespaceSandbox::LaunchProcess(*child_command_line, options); if (!child_process_.IsValid()) @@ -190,26 +206,40 @@ #endif } - channel_->RemoteProcessLaunchAttempted(); - - if (child_process_.IsValid()) { -#if defined(OS_CHROMEOS) - // Always log instead of DVLOG because knowing which pid maps to which - // service is vital for interpreting crashes after-the-fact and Chrome OS - // devices generally run release builds, even in development. - VLOG(0) -#else - DVLOG(0) -#endif - << "Launched child process pid=" << child_process_.Pid() - << ", instance=" << target_.instance() << ", name=" << target_.name() - << ", user_id=" << target_.user_id(); - - mojo::OutgoingInvitation::Send(std::move(invitation_), - child_process_.Handle(), - channel_->TakeLocalEndpoint()); + channel.RemoteProcessLaunchAttempted(); + if (!child_process_.IsValid()) { + LOG(ERROR) << "Failed to start child process for service: " + << target.name(); + return base::kNullProcessId; } - start_child_process_event_.Signal(); + +#if defined(OS_CHROMEOS) + // Always log instead of DVLOG because knowing which pid maps to which + // service is vital for interpreting crashes after-the-fact and Chrome OS + // devices generally run release builds, even in development. + VLOG(0) +#else + DVLOG(0) +#endif + << "Launched child process pid=" << child_process_.Pid() + << ", instance=" << target.instance() << ", name=" << target.name() + << ", user_id=" << target.user_id(); + + mojo::OutgoingInvitation::Send(std::move(invitation), child_process_.Handle(), + channel.TakeLocalEndpoint()); + + return child_process_.Pid(); +} + +void ServiceProcessLauncher::ProcessState::StopInBackground() { + DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_); + if (!child_process_.IsValid()) + return; + + int rv = -1; + LOG_IF(ERROR, !child_process_.WaitForExit(&rv)) + << "Failed to wait for child process"; + child_process_.Close(); } } // namespace service_manager
diff --git a/services/service_manager/runner/host/service_process_launcher.h b/services/service_manager/runner/host/service_process_launcher.h index bb8f612..2c2f283 100644 --- a/services/service_manager/runner/host/service_process_launcher.h +++ b/services/service_manager/runner/host/service_process_launcher.h
@@ -11,20 +11,14 @@ #include "base/callback.h" #include "base/files/file_path.h" #include "base/macros.h" +#include "base/memory/ref_counted.h" #include "base/memory/weak_ptr.h" -#include "base/optional.h" #include "base/process/process.h" -#include "base/synchronization/waitable_event.h" -#include "mojo/public/cpp/platform/platform_channel.h" -#include "mojo/public/cpp/system/invitation.h" +#include "base/sequenced_task_runner.h" #include "services/service_manager/public/mojom/service_factory.mojom.h" #include "services/service_manager/runner/host/service_process_launcher_delegate.h" #include "services/service_manager/sandbox/sandbox_type.h" -namespace base { -class CommandLine; -} - namespace service_manager { class Identity; @@ -36,8 +30,6 @@ // // This class is not thread-safe. It should be created/used/destroyed on a // single thread. -// -// Note: Does not currently work on Windows before Vista. class ServiceProcessLauncher { public: using ProcessReadyCallback = base::OnceCallback<void(base::ProcessId)>; @@ -55,29 +47,13 @@ SandboxType sandbox_type, ProcessReadyCallback callback); - // Waits for the child process to terminate. - void Join(); - private: - void DidStart(ProcessReadyCallback callback); - void DoLaunch(std::unique_ptr<base::CommandLine> child_command_line); + class ProcessState; - ServiceProcessLauncherDelegate* delegate_ = nullptr; - SandboxType sandbox_type_ = SANDBOX_TYPE_NO_SANDBOX; - Identity target_; - base::FilePath service_path_; - base::Process child_process_; - - // Used to initialize the Mojo IPC channel between parent and child. - base::Optional<mojo::PlatformChannel> channel_; - mojo::PlatformChannel::HandlePassingInfo handle_passing_info_; - mojo::OutgoingInvitation invitation_; - - // Since Start() calls a method on another thread, we use an event to block - // the main thread if it tries to destruct |this| while launching the process. - base::WaitableEvent start_child_process_event_; - - base::WeakPtrFactory<ServiceProcessLauncher> weak_factory_; + ServiceProcessLauncherDelegate* const delegate_; + const base::FilePath service_path_; + const scoped_refptr<base::SequencedTaskRunner> background_task_runner_; + scoped_refptr<ProcessState> state_; DISALLOW_COPY_AND_ASSIGN(ServiceProcessLauncher); };
diff --git a/services/service_manager/runner/host/service_process_launcher_unittest.cc b/services/service_manager/runner/host/service_process_launcher_unittest.cc index ea372f0..25282245 100644 --- a/services/service_manager/runner/host/service_process_launcher_unittest.cc +++ b/services/service_manager/runner/host/service_process_launcher_unittest.cc
@@ -12,6 +12,7 @@ #include "base/command_line.h" #include "base/logging.h" #include "base/macros.h" +#include "base/optional.h" #include "base/path_service.h" #include "base/run_loop.h" #include "base/test/scoped_task_environment.h" @@ -83,16 +84,16 @@ .AddExtension(kServiceExtension); ServiceProcessLauncherDelegateImpl service_process_launcher_delegate; - ServiceProcessLauncher launcher(&service_process_launcher_delegate, - test_service_path); + base::Optional<ServiceProcessLauncher> launcher( + base::in_place, &service_process_launcher_delegate, test_service_path); base::RunLoop run_loop; - launcher.Start( + launcher->Start( Identity(), SANDBOX_TYPE_NO_SANDBOX, base::BindOnce(&ProcessReadyCallbackAdapter, true /*expect_process_id_valid*/, run_loop.QuitClosure())); run_loop.Run(); - launcher.Join(); + launcher.reset(); scoped_task_environment.RunUntilIdle(); EXPECT_EQ(1u, service_process_launcher_delegate.get_and_clear_adjust_count()); @@ -112,16 +113,16 @@ base::FilePath test_service_path(FILE_PATH_LITERAL("rockot@_rules.service")); ServiceProcessLauncherDelegateImpl service_process_launcher_delegate; - ServiceProcessLauncher launcher(&service_process_launcher_delegate, - test_service_path); + base::Optional<ServiceProcessLauncher> launcher( + base::in_place, &service_process_launcher_delegate, test_service_path); base::RunLoop run_loop; - launcher.Start(Identity(), SANDBOX_TYPE_NO_SANDBOX, - base::BindOnce(&ProcessReadyCallbackAdapter, - false /*expect_process_id_valid*/, - run_loop.QuitClosure())); + launcher->Start(Identity(), SANDBOX_TYPE_NO_SANDBOX, + base::BindOnce(&ProcessReadyCallbackAdapter, + false /*expect_process_id_valid*/, + run_loop.QuitClosure())); run_loop.Run(); - launcher.Join(); + launcher.reset(); scoped_task_environment.RunUntilIdle(); } #endif // !defined(OS_POSIX) || defined(OS_MACOSX)
diff --git a/services/tracing/perfetto/json_trace_exporter.cc b/services/tracing/perfetto/json_trace_exporter.cc index 239cdf4..bc19b9bb 100644 --- a/services/tracing/perfetto/json_trace_exporter.cc +++ b/services/tracing/perfetto/json_trace_exporter.cc
@@ -184,11 +184,7 @@ perfetto::TracingService* service) : config_(config), metadata_(std::make_unique<base::DictionaryValue>()) { consumer_endpoint_ = service->ConnectConsumer(this); -} -JSONTraceExporter::~JSONTraceExporter() = default; - -void JSONTraceExporter::OnConnect() { // Start tracing. perfetto::TraceConfig trace_config; trace_config.add_buffers()->set_size_kb(4096 * 100); @@ -207,6 +203,10 @@ consumer_endpoint_->EnableTracing(trace_config); } +JSONTraceExporter::~JSONTraceExporter() = default; + +void JSONTraceExporter::OnConnect() {} + void JSONTraceExporter::OnDisconnect() {} void JSONTraceExporter::OnTracingDisabled() {
diff --git a/services/ui/gpu_host/BUILD.gn b/services/ui/gpu_host/BUILD.gn index 4c48cd8..043bfdd 100644 --- a/services/ui/gpu_host/BUILD.gn +++ b/services/ui/gpu_host/BUILD.gn
@@ -91,7 +91,7 @@ "//services/ui/public/cpp", "//services/ui/public/interfaces", "//testing/gtest", - "//third_party/mesa:osmesa", + "//third_party/mesa_headers", "//ui/aura", "//ui/aura:test_support", "//ui/events",
diff --git a/services/ui/manifest.json b/services/ui/manifest.json index 041faca..ee9e61e 100644 --- a/services/ui/manifest.json +++ b/services/ui/manifest.json
@@ -71,9 +71,6 @@ "ui.mojom.InputDeviceServer", "ui.mojom.TouchDeviceServer", "ui.mojom.UserActivityMonitor" - ], - "window_tree_host_factory": [ - "ui.mojom.WindowTreeHostFactory" ] }, "requires": {
diff --git a/services/ui/public/interfaces/BUILD.gn b/services/ui/public/interfaces/BUILD.gn index 01c3be31..e7187b03 100644 --- a/services/ui/public/interfaces/BUILD.gn +++ b/services/ui/public/interfaces/BUILD.gn
@@ -19,8 +19,6 @@ "window_server_test.mojom", "window_tree.mojom", "window_tree_constants.mojom", - "window_tree_host.mojom", - "window_tree_host_factory.mojom", ] import_dirs = [
diff --git a/services/ui/public/interfaces/window_tree_host.mojom b/services/ui/public/interfaces/window_tree_host.mojom deleted file mode 100644 index dc6d466..0000000 --- a/services/ui/public/interfaces/window_tree_host.mojom +++ /dev/null
@@ -1,17 +0,0 @@ -// Copyright 2015 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -module ui.mojom; - -import "ui/gfx/geometry/mojo/geometry.mojom"; - -// WindowTreeHost encapsulates a unique underlying platform window, with a tree -// of windows. -interface WindowTreeHost { - // Sets the size of the platform window. - SetSize(gfx.mojom.Size size); - - // Sets a title string to be displayed on the platform window. - SetTitle(string title); -};
diff --git a/services/ui/public/interfaces/window_tree_host_factory.mojom b/services/ui/public/interfaces/window_tree_host_factory.mojom deleted file mode 100644 index cb5c16f..0000000 --- a/services/ui/public/interfaces/window_tree_host_factory.mojom +++ /dev/null
@@ -1,15 +0,0 @@ -// Copyright 2017 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -module ui.mojom; - -import "services/ui/public/interfaces/window_tree.mojom"; -import "services/ui/public/interfaces/window_tree_host.mojom"; - -interface WindowTreeHostFactory { - // Creates a new WindowTreeHost. |tree_client| is queried for the - // WindowManager. - CreateWindowTreeHost(WindowTreeHost& window_tree_host, - WindowTreeClient tree_client); -};
diff --git a/services/ui/test_ws/test_ws.cc b/services/ui/test_ws/test_ws.cc index e930a24..bb6ad48 100644 --- a/services/ui/test_ws/test_ws.cc +++ b/services/ui/test_ws/test_ws.cc
@@ -9,7 +9,6 @@ #include "base/callback.h" #include "base/message_loop/message_loop.h" #include "components/discardable_memory/service/discardable_shared_memory_manager.h" -#include "mojo/public/cpp/bindings/binding.h" #include "mojo/public/cpp/bindings/binding_set.h" #include "services/service_manager/public/c/main.h" #include "services/service_manager/public/cpp/binder_registry.h" @@ -21,16 +20,10 @@ #include "services/ui/gpu_host/gpu_host.h" #include "services/ui/gpu_host/gpu_host_delegate.h" #include "services/ui/public/interfaces/constants.mojom.h" -#include "services/ui/public/interfaces/window_tree_host_factory.mojom.h" #include "services/ui/test_ws/test_drag_drop_client.h" #include "services/ui/test_ws/test_gpu_interface_provider.h" #include "services/ui/ws2/window_service.h" #include "services/ui/ws2/window_service_delegate.h" -#include "services/ui/ws2/window_tree.h" -#include "services/ui/ws2/window_tree_binding.h" -#include "ui/aura/client/aura_constants.h" -#include "ui/aura/client/default_capture_client.h" -#include "ui/aura/env.h" #include "ui/aura/test/aura_test_helper.h" #include "ui/aura/window.h" #include "ui/aura/window_tree_host.h" @@ -43,73 +36,6 @@ namespace ui { namespace test { -class TestWS; - -// See description in README.md for details on what this code is intended for. - -// Holds the data for a single client connected via WindowTreeHostFactory. Each -// client has an aura::Window. -class Client { - public: - Client(ws2::WindowService* window_service, - aura::Window* root, - mojom::WindowTreeClientPtr tree_client_ptr) { - window_ = std::make_unique<aura::Window>(nullptr); - window_->Init(LAYER_NOT_DRAWN); - window_->set_owned_by_parent(false); - root->AddChild(window_.get()); - binding_ = std::make_unique<ws2::WindowTreeBinding>(); - mojom::WindowTreeClient* tree_client = tree_client_ptr.get(); - binding_->InitForEmbed( - window_service, std::move(tree_client_ptr), tree_client, window_.get(), - base::BindOnce(&Client::OnConnectionLost, base::Unretained(this))); - } - - ~Client() = default; - - private: - void OnConnectionLost() { - binding_.reset(); - window_.reset(); - } - - std::unique_ptr<aura::Window> window_; - std::unique_ptr<ws2::WindowTreeBinding> binding_; - - DISALLOW_COPY_AND_ASSIGN(Client); -}; - -// mojom::WindowTreeHostFactory implementation that creates an instance of -// Client for all WindowTreeHost requests. -class WindowTreeHostFactory : public mojom::WindowTreeHostFactory { - public: - WindowTreeHostFactory(ws2::WindowService* window_service, aura::Window* root) - : window_service_(window_service), root_(root) {} - - ~WindowTreeHostFactory() override = default; - - void AddBinding(mojom::WindowTreeHostFactoryRequest request) { - window_tree_host_factory_bindings_.AddBinding(this, std::move(request)); - } - - private: - // mojom::WindowTreeHostFactory implementation. - void CreateWindowTreeHost(mojom::WindowTreeHostRequest host, - mojom::WindowTreeClientPtr tree_client) override { - // |host| is unused. - clients_.push_back(std::make_unique<Client>(window_service_, root_, - std::move(tree_client))); - } - - ws2::WindowService* window_service_; - aura::Window* root_; - mojo::BindingSet<mojom::WindowTreeHostFactory> - window_tree_host_factory_bindings_; - std::vector<std::unique_ptr<Client>> clients_; - - DISALLOW_COPY_AND_ASSIGN(WindowTreeHostFactory); -}; - // Service implementation that brings up the Window Service on top of aura. // Uses ws2::WindowService to provide the Window Service and // WindowTreeHostFactory to service requests for connections to the Window @@ -223,11 +149,6 @@ std::make_unique<TestGpuInterfaceProvider>( gpu_host_.get(), discardable_shared_memory_manager_.get()), aura_test_helper_->focus_client()); - window_tree_host_factory_ = std::make_unique<WindowTreeHostFactory>( - window_service.get(), aura_test_helper_->root_window()); - window_service->registry()->AddInterface( - base::BindRepeating(&WindowTreeHostFactory::AddBinding, - base::Unretained(window_tree_host_factory_.get()))); service_context_ = std::make_unique<service_manager::ServiceContext>( std::move(window_service), std::move(request)); pid_receiver->SetPID(base::GetCurrentProcId()); @@ -280,7 +201,6 @@ std::unique_ptr<service_manager::ServiceContext> service_context_; std::unique_ptr<aura::test::AuraTestHelper> aura_test_helper_; - std::unique_ptr<WindowTreeHostFactory> window_tree_host_factory_; std::unique_ptr<discardable_memory::DiscardableSharedMemoryManager> discardable_shared_memory_manager_;
diff --git a/services/ui/ws2/BUILD.gn b/services/ui/ws2/BUILD.gn index 5d31877..2d695cfa 100644 --- a/services/ui/ws2/BUILD.gn +++ b/services/ui/ws2/BUILD.gn
@@ -202,7 +202,7 @@ "//services/ui/public/cpp", "//services/ui/public/interfaces", "//testing/gtest", - "//third_party/mesa:osmesa", + "//third_party/mesa_headers", "//ui/aura:test_support", "//ui/events:test_support", "//ui/platform_window",
diff --git a/services/ui/ws2/test_manifest.json b/services/ui/ws2/test_manifest.json index d67bc2e..4eb70d6 100644 --- a/services/ui/ws2/test_manifest.json +++ b/services/ui/ws2/test_manifest.json
@@ -11,7 +11,6 @@ "requires": { "*": [ "app" ], "ui_ws2_service_unittests": [ "ui:window_tree_client" ], - "ui": [ "window_tree_host_factory" ], "viz": [ "viz_host" ] } }
diff --git a/services/ui/ws2/test_window_tree_client.cc b/services/ui/ws2/test_window_tree_client.cc index 388e2c5..4e63ce1 100644 --- a/services/ui/ws2/test_window_tree_client.cc +++ b/services/ui/ws2/test_window_tree_client.cc
@@ -56,6 +56,11 @@ return event; } +void TestWindowTreeClient::SetWindowTree(mojom::WindowTreePtr tree) { + DCHECK(!tree_); + tree_ = std::move(tree); +} + bool TestWindowTreeClient::AckFirstEvent(WindowTree* tree, mojom::EventResult result) { if (input_events_.empty())
diff --git a/services/ui/ws2/test_window_tree_client.h b/services/ui/ws2/test_window_tree_client.h index 8b56c2d..186948c 100644 --- a/services/ui/ws2/test_window_tree_client.h +++ b/services/ui/ws2/test_window_tree_client.h
@@ -72,6 +72,10 @@ // in the returned object is null. ObservedPointerEvent PopObservedPointerEvent(); + // Sets the mojom::WindowTree for this client. Used when creating a client + // using mojom::WindowTreeFactory. + void SetWindowTree(mojom::WindowTreePtr tree); + mojom::WindowTree* tree() { return tree_.get(); } TestChangeTracker* tracker() { return &tracker_; } Id root_window_id() const { return root_window_id_; }
diff --git a/services/ui/ws2/window_tree_client_unittest.cc b/services/ui/ws2/window_tree_client_unittest.cc index 0b162fd..b2482be 100644 --- a/services/ui/ws2/window_tree_client_unittest.cc +++ b/services/ui/ws2/window_tree_client_unittest.cc
@@ -17,7 +17,6 @@ #include "services/ui/common/util.h" #include "services/ui/public/interfaces/constants.mojom.h" #include "services/ui/public/interfaces/window_tree.mojom.h" -#include "services/ui/public/interfaces/window_tree_host_factory.mojom.h" #include "services/ui/ws2/ids.h" #include "services/ui/ws2/test_window_tree_client.h" #include "services/ui/ws2/window_server_service_test_base.h" @@ -601,25 +600,23 @@ WindowServerServiceTestBase::SetUp(); - mojom::WindowTreeHostFactoryPtr factory; + mojom::WindowTreeFactoryPtr factory; // TODO: figure out better way to isolate this! connector()->BindInterface("ui", &factory); + // Connect |wt_client_1| as the first client. mojom::WindowTreeClientPtr tree_client_ptr; wt_client1_ = std::make_unique<TestWindowTreeClient2>(); wt_client1_->Bind(MakeRequest(&tree_client_ptr)); - factory->CreateWindowTreeHost(MakeRequest(&host_), - std::move(tree_client_ptr)); + mojom::WindowTreePtr tree_ptr; + factory->CreateWindowTree(MakeRequest(&tree_ptr), + std::move(tree_client_ptr)); + wt_client1_->SetWindowTree(std::move(tree_ptr)); - // Next we should get an embed call on the "window manager" client. - wt_client1_->WaitForOnEmbed(); - - ASSERT_EQ(1u, changes1()->size()); - EXPECT_EQ(CHANGE_TYPE_EMBED, (*changes1())[0].type); - ASSERT_FALSE((*changes1())[0].windows.empty()); - root_window_id_ = (*changes1())[0].windows[0].window_id; - ASSERT_EQ(root_window_id_, wt_client1_->root_window_id()); + // Creates a window to use as root window. 1000 is an arbitrary ID not used + // in any test cases. + root_window_id_ = wt_client1_->NewWindow(1000); changes1()->clear(); } @@ -637,8 +634,6 @@ std::unique_ptr<TestWindowTreeClient2> wt_client2_; std::unique_ptr<TestWindowTreeClient2> wt_client3_; - mojom::WindowTreeHostPtr host_; - private: std::unique_ptr<WindowTreeClientFactory> client_factory_; const ClientSpecificId client_id_1_ = kWindowServerClientId + 1;
diff --git a/services/viz/public/cpp/compositing/compositor_frame_metadata_struct_traits.cc b/services/viz/public/cpp/compositing/compositor_frame_metadata_struct_traits.cc index 7b66ce2..a77e6f8 100644 --- a/services/viz/public/cpp/compositing/compositor_frame_metadata_struct_traits.cc +++ b/services/viz/public/cpp/compositing/compositor_frame_metadata_struct_traits.cc
@@ -42,11 +42,13 @@ out->send_frame_token_to_embedder = data.send_frame_token_to_embedder(); out->request_presentation_feedback = data.request_presentation_feedback(); out->root_background_color = data.root_background_color(); - return data.ReadSelection(&out->selection) && - data.ReadLatencyInfo(&out->latency_info) && + return data.ReadLatencyInfo(&out->latency_info) && data.ReadReferencedSurfaces(&out->referenced_surfaces) && data.ReadDeadline(&out->deadline) && data.ReadActivationDependencies(&out->activation_dependencies) && +#if defined(OS_ANDROID) + data.ReadSelection(&out->selection) && +#endif // defined(OS_ANDROID) data.ReadBeginFrameAck(&out->begin_frame_ack); }
diff --git a/services/viz/public/cpp/compositing/compositor_frame_metadata_struct_traits.h b/services/viz/public/cpp/compositing/compositor_frame_metadata_struct_traits.h index 2330d436..5c2fc5e 100644 --- a/services/viz/public/cpp/compositing/compositor_frame_metadata_struct_traits.h +++ b/services/viz/public/cpp/compositing/compositor_frame_metadata_struct_traits.h
@@ -7,6 +7,7 @@ #include <vector> +#include "build/build_config.h" #include "components/viz/common/quads/compositor_frame_metadata.h" #include "services/viz/public/cpp/compositing/begin_frame_args_struct_traits.h" #include "services/viz/public/cpp/compositing/frame_deadline_struct_traits.h" @@ -91,11 +92,6 @@ return metadata.root_background_color; } - static const viz::Selection<gfx::SelectionBound>& selection( - const viz::CompositorFrameMetadata& metadata) { - return metadata.selection; - } - static const std::vector<ui::LatencyInfo>& latency_info( const viz::CompositorFrameMetadata& metadata) { return metadata.latency_info; @@ -140,6 +136,13 @@ return metadata.request_presentation_feedback; } +#if defined(OS_ANDROID) + static const viz::Selection<gfx::SelectionBound>& selection( + const viz::CompositorFrameMetadata& metadata) { + return metadata.selection; + } +#endif // defined(OS_ANDROID) + static bool Read(viz::mojom::CompositorFrameMetadataDataView data, viz::CompositorFrameMetadata* out); };
diff --git a/services/viz/public/cpp/compositing/struct_traits_unittest.cc b/services/viz/public/cpp/compositing/struct_traits_unittest.cc index 2d0f620..f67821b5 100644 --- a/services/viz/public/cpp/compositing/struct_traits_unittest.cc +++ b/services/viz/public/cpp/compositing/struct_traits_unittest.cc
@@ -625,15 +625,6 @@ const float bottom_bar_height(1234.5f); const float bottom_bar_shown_ratio(1.0f); const uint32_t root_background_color = 1337; - Selection<gfx::SelectionBound> selection; - selection.start.SetEdge(gfx::PointF(1234.5f, 67891.f), - gfx::PointF(5432.1f, 1987.6f)); - selection.start.set_visible(true); - selection.start.set_type(gfx::SelectionBound::CENTER); - selection.end.SetEdge(gfx::PointF(1337.5f, 52124.f), - gfx::PointF(1234.3f, 8765.6f)); - selection.end.set_visible(false); - selection.end.set_type(gfx::SelectionBound::RIGHT); ui::LatencyInfo latency_info; latency_info.set_trace_id(5); latency_info.AddLatencyNumber( @@ -650,6 +641,17 @@ uint32_t frame_token = 0xdeadbeef; uint64_t begin_frame_ack_sequence_number = 0xdeadbeef; FrameDeadline frame_deadline(base::TimeTicks(), 4u, base::TimeDelta(), true); +#if defined(OS_ANDROID) + Selection<gfx::SelectionBound> selection; + selection.start.SetEdge(gfx::PointF(1234.5f, 67891.f), + gfx::PointF(5432.1f, 1987.6f)); + selection.start.set_visible(true); + selection.start.set_type(gfx::SelectionBound::CENTER); + selection.end.SetEdge(gfx::PointF(1337.5f, 52124.f), + gfx::PointF(1234.3f, 8765.6f)); + selection.end.set_visible(false); + selection.end.set_type(gfx::SelectionBound::RIGHT); +#endif // defined(OS_ANDROID) CompositorFrameMetadata input; input.device_scale_factor = device_scale_factor; @@ -668,13 +670,15 @@ input.bottom_controls_height = bottom_bar_height; input.bottom_controls_shown_ratio = bottom_bar_shown_ratio; input.root_background_color = root_background_color; - input.selection = selection; input.latency_info = latency_infos; input.referenced_surfaces = referenced_surfaces; input.activation_dependencies = activation_dependencies; input.deadline = frame_deadline; input.frame_token = frame_token; input.begin_frame_ack.sequence_number = begin_frame_ack_sequence_number; +#if defined(OS_ANDROID) + input.selection = selection; +#endif // defined(OS_ANDROID) CompositorFrameMetadata output; SerializeAndDeserialize<mojom::CompositorFrameMetadata>(input, &output); @@ -694,7 +698,6 @@ EXPECT_EQ(bottom_bar_height, output.bottom_controls_height); EXPECT_EQ(bottom_bar_shown_ratio, output.bottom_controls_shown_ratio); EXPECT_EQ(root_background_color, output.root_background_color); - EXPECT_EQ(selection, output.selection); EXPECT_EQ(latency_infos.size(), output.latency_info.size()); EXPECT_TRUE(output.latency_info[0].FindLatency( ui::LATENCY_BEGIN_SCROLL_LISTENER_UPDATE_MAIN_COMPONENT, nullptr)); @@ -709,6 +712,9 @@ EXPECT_EQ(frame_token, output.frame_token); EXPECT_EQ(begin_frame_ack_sequence_number, output.begin_frame_ack.sequence_number); +#if defined(OS_ANDROID) + EXPECT_EQ(selection, output.selection); +#endif // defined(OS_ANDROID) } TEST_F(StructTraitsTest, RenderPass) {
diff --git a/services/viz/public/interfaces/compositing/compositor_frame_metadata.mojom b/services/viz/public/interfaces/compositing/compositor_frame_metadata.mojom index 6119b79..a1bccf0c 100644 --- a/services/viz/public/interfaces/compositing/compositor_frame_metadata.mojom +++ b/services/viz/public/interfaces/compositing/compositor_frame_metadata.mojom
@@ -29,7 +29,6 @@ float bottom_controls_height; float bottom_controls_shown_ratio; uint32 root_background_color; - Selection selection; array<ui.mojom.LatencyInfo> latency_info; array<SurfaceRange> referenced_surfaces; FrameDeadline deadline; @@ -39,4 +38,7 @@ uint32 frame_token; bool send_frame_token_to_embedder; bool request_presentation_feedback; + + [EnableIf=is_android] + Selection selection; };
diff --git a/storage/common/BUILD.gn b/storage/common/BUILD.gn index 56863a2..a7f41a35 100644 --- a/storage/common/BUILD.gn +++ b/storage/common/BUILD.gn
@@ -18,6 +18,7 @@ "fileapi/file_system_info.cc", "fileapi/file_system_info.h", "fileapi/file_system_mount_option.h", + "fileapi/file_system_type_converters.h", "fileapi/file_system_types.h", "fileapi/file_system_util.cc", "fileapi/file_system_util.h",
diff --git a/storage/common/fileapi/OWNERS b/storage/common/fileapi/OWNERS index 3cf9e69..aaa27af5 100644 --- a/storage/common/fileapi/OWNERS +++ b/storage/common/fileapi/OWNERS
@@ -1,5 +1,8 @@ tzik@chromium.org nhiroki@chromium.org +per-file *_type_converter*.*=set noparent +per-file *_type_converter*.*=file://ipc/SECURITY_OWNERS + # TEAM: storage-dev@chromium.org # COMPONENT: Blink>Storage>FileSystem
diff --git a/storage/common/fileapi/file_system_type_converters.h b/storage/common/fileapi/file_system_type_converters.h new file mode 100644 index 0000000..b0adc21 --- /dev/null +++ b/storage/common/fileapi/file_system_type_converters.h
@@ -0,0 +1,96 @@ +// 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 STORAGE_COMMON_FILEAPI_FILE_SYSTEM_TYPE_CONVERTERS_H_ +#define STORAGE_COMMON_FILEAPI_FILE_SYSTEM_TYPE_CONVERTERS_H_ + +#include "storage/common/fileapi/file_system_types.h" +#include "third_party/blink/public/mojom/filesystem/file_system.mojom.h" + +namespace mojo { + +template <> +struct TypeConverter<blink::mojom::FileSystemType, storage::FileSystemType> { + static blink::mojom::FileSystemType Convert( + const storage::FileSystemType& type) { + switch (type) { + case storage::FileSystemType::kFileSystemTypeTemporary: + return blink::mojom::FileSystemType::kTemporary; + case storage::FileSystemType::kFileSystemTypePersistent: + return blink::mojom::FileSystemType::kPersistent; + case storage::FileSystemType::kFileSystemTypeIsolated: + return blink::mojom::FileSystemType::kIsolated; + case storage::FileSystemType::kFileSystemTypeExternal: + return blink::mojom::FileSystemType::kExternal; + // Internal enum types + case storage::FileSystemType::kFileSystemTypeUnknown: + case storage::FileSystemType::kFileSystemInternalTypeEnumStart: + case storage::FileSystemType::kFileSystemTypeTest: + case storage::FileSystemType::kFileSystemTypeNativeLocal: + case storage::FileSystemType::kFileSystemTypeRestrictedNativeLocal: + case storage::FileSystemType::kFileSystemTypeDragged: + case storage::FileSystemType::kFileSystemTypeNativeMedia: + case storage::FileSystemType::kFileSystemTypeDeviceMedia: + case storage::FileSystemType::kFileSystemTypeDrive: + case storage::FileSystemType::kFileSystemTypeSyncable: + case storage::FileSystemType::kFileSystemTypeSyncableForInternalSync: + case storage::FileSystemType::kFileSystemTypeNativeForPlatformApp: + case storage::FileSystemType::kFileSystemTypeForTransientFile: + case storage::FileSystemType::kFileSystemTypePluginPrivate: + case storage::FileSystemType::kFileSystemTypeCloudDevice: + case storage::FileSystemType::kFileSystemTypeProvided: + case storage::FileSystemType::kFileSystemTypeDeviceMediaAsFileStorage: + case storage::FileSystemType::kFileSystemTypeArcContent: + case storage::FileSystemType::kFileSystemTypeArcDocumentsProvider: + case storage::FileSystemType::kFileSystemInternalTypeEnumEnd: + NOTREACHED(); + return blink::mojom::FileSystemType::kTemporary; + } + NOTREACHED(); + return blink::mojom::FileSystemType::kTemporary; + } +}; + +template <> +struct TypeConverter<storage::FileSystemType, blink::mojom::FileSystemType> { + static storage::FileSystemType Convert( + const blink::mojom::FileSystemType& type) { + switch (type) { + case blink::mojom::FileSystemType::kTemporary: + return storage::FileSystemType::kFileSystemTypeTemporary; + case blink::mojom::FileSystemType::kPersistent: + return storage::FileSystemType::kFileSystemTypePersistent; + case blink::mojom::FileSystemType::kIsolated: + return storage::FileSystemType::kFileSystemTypeIsolated; + case blink::mojom::FileSystemType::kExternal: + return storage::FileSystemType::kFileSystemTypeExternal; + } + NOTREACHED(); + return storage::FileSystemType::kFileSystemTypeTemporary; + } +}; + +template <> +struct TypeConverter<blink::mojom::FileSystemInfoPtr, storage::FileSystemInfo> { + static blink::mojom::FileSystemInfoPtr Convert( + const storage::FileSystemInfo& info) { + return blink::mojom::FileSystemInfo::New( + info.name, info.root_url, + mojo::ConvertTo<blink::mojom::FileSystemType>(info.mount_type)); + } +}; + +template <> +struct TypeConverter<storage::FileSystemInfo, blink::mojom::FileSystemInfoPtr> { + static storage::FileSystemInfo Convert( + const blink::mojom::FileSystemInfoPtr& info) { + return storage::FileSystemInfo( + info->name, info->root_url, + mojo::ConvertTo<storage::FileSystemType>(info->mount_type)); + } +}; + +} // namespace mojo + +#endif // STORAGE_COMMON_FILEAPI_FILE_SYSTEM_TYPE_CONVERTERS_H_
diff --git a/testing/buildbot/filters/mojo.fyi.network_browser_tests.filter b/testing/buildbot/filters/mojo.fyi.network_browser_tests.filter index 329d9e6b5..d89e0a8 100644 --- a/testing/buildbot/filters/mojo.fyi.network_browser_tests.filter +++ b/testing/buildbot/filters/mojo.fyi.network_browser_tests.filter
@@ -14,15 +14,6 @@ -SubresourceFilterBrowserTest.FailedProvisionalLoadInMainframe -WebViewTest.WebViewInBackgroundPage - -# These tests uses net::URLRequestFilter (through TestRequestInterceptor) to -# mock out network responses, and use URLFetcherDownloader to issue requests, -# which has yet to be switched from URLFetcher. -# https://crbug.com/871542 --PolicyUpdateServiceTest.Backoff --PolicyUpdateServiceTest.FailedUpdateRetries --PolicyUpdateServiceTest.PolicyCorruptedOnStartup - # Domain Reliability has yet to be hookup to the NetworkService. # https://crbug.com/853251 -DomainReliabilityBrowserTest.Upload @@ -40,11 +31,6 @@ -ProfileBrowserTest.URLFetcherUsingMediaContextDuringShutdown -ProfileWithoutMediaCacheBrowserTest.NoSeparateMediaCache -# components/update_client/ still uses URLFetcher. -# After bug 844973 was fixed, these two still fail/crash: --UpdateServiceTest.PolicyCorrupted --UpdateServiceTest.SuccessfulUpdate - # about:net-internals should be largely removed before shipping the network # service. # https://crbug.com/678391
diff --git a/testing/libfuzzer/fuzzer_test.gni b/testing/libfuzzer/fuzzer_test.gni index 71bae180..01d26d50 100644 --- a/testing/libfuzzer/fuzzer_test.gni +++ b/testing/libfuzzer/fuzzer_test.gni
@@ -178,6 +178,10 @@ configs -= invoker.suppressed_configs } + if (defined(invoker.generated_sources)) { + sources += invoker.generated_sources + } + if (is_mac) { sources += [ "//testing/libfuzzer/libfuzzer_exports.h" ] }
diff --git a/testing/libfuzzer/fuzzers/BUILD.gn b/testing/libfuzzer/fuzzers/BUILD.gn index 7dde300..4a8934f 100644 --- a/testing/libfuzzer/fuzzers/BUILD.gn +++ b/testing/libfuzzer/fuzzers/BUILD.gn
@@ -459,8 +459,8 @@ } fuzzer_test("javascript_parser_proto_fuzzer") { + generated_sources = [ "$target_gen_dir/javascript_parser_proto_to_string.cc" ] sources = [ - "$target_gen_dir/javascript_parser_proto_to_string.cc", "javascript_parser_proto_fuzzer.cc", "javascript_parser_proto_to_string.h", ]
diff --git a/testing/variations/fieldtrial_testing_config.json b/testing/variations/fieldtrial_testing_config.json index 39fd5b1..055e1280 100644 --- a/testing/variations/fieldtrial_testing_config.json +++ b/testing/variations/fieldtrial_testing_config.json
@@ -1240,7 +1240,9 @@ "name": "Enabled", "params": { "bypass_missing_via_disabled": "true", - "warmup_fetch_callback_enabled": "true" + "warmup_fetch_callback_enabled": "true", + "warmup_url_fetch_init_http_rtt_multiplier": "12", + "warmup_url_fetch_min_timeout_seconds": "30" }, "enable_features": [ "DataReductionProxyRobustConnection" @@ -1301,7 +1303,8 @@ "DefaultEnableOopRasterization": [ { "platforms": [ - "android" + "android", + "chromeos" ], "experiments": [ { @@ -1388,21 +1391,6 @@ ] } ], - "DirectCompositionPreferNV12Overlays": [ - { - "platforms": [ - "windows" - ], - "experiments": [ - { - "name": "Enabled", - "enable_features": [ - "DirectCompositionPreferNV12Overlays" - ] - } - ] - } - ], "DownloadHomeMoreButton": [ { "platforms": [
diff --git a/third_party/WebKit/LayoutTests/FlagExpectations/enable-blink-features=LayoutNG b/third_party/WebKit/LayoutTests/FlagExpectations/enable-blink-features=LayoutNG index 92177cf..bcf3190 100644 --- a/third_party/WebKit/LayoutTests/FlagExpectations/enable-blink-features=LayoutNG +++ b/third_party/WebKit/LayoutTests/FlagExpectations/enable-blink-features=LayoutNG
@@ -1,7 +1,6 @@ # These tests currently fail when they run with --enable-blink-features=LayoutNG # See https://crbug.com/591099. - # Non-interoperable behavior not worth to fix. crbug.com/591099 fast/text/apply-start-width-after-skipped-text.html [ Skip ] @@ -23,7 +22,6 @@ crbug.com/591099 fast/block/marquee-width-shrinks-to-fit-in-fixed-size-container.html [ Failure ] # Whitespace differences only -crbug.com/854889 accessibility/canvas-fallback-content-2.html [ Failure ] # Wrong quirks mode line height for pattern <div><a><img></a></div> crbug.com/854840 fast/table/backgr_border-table-quirks-collapsed-border.html [ Failure ] @@ -63,7 +61,7 @@ crbug.com/591099 animations/rotate-transform-equivalent.html [ Failure ] crbug.com/728378 compositing/culling/tile-occlusion-boundaries.html [ Failure ] crbug.com/591099 compositing/iframes/floating-self-painting-frame.html [ Failure ] -crbug.com/591099 compositing/layer-creation/overlap-animation.html [ Crash Pass ] +crbug.com/591099 compositing/layer-creation/overlap-animation.html [ Crash ] crbug.com/869265 compositing/layer-creation/stacking-context-overlap-nested.html [ Failure ] crbug.com/591099 css3/filters/composited-layer-child-bounds-after-composited-to-sw-shadow-change.html [ Failure ] crbug.com/591099 css3/flexbox/bug646288.html [ Failure ] @@ -72,9 +70,6 @@ crbug.com/591099 css3/flexbox/line-wrapping.html [ Failure ] crbug.com/714962 css3/masking/clip-path-reference-box-inline.html [ Failure ] crbug.com/591099 editing/selection/paint-hyphen.html [ Pass ] -crbug.com/591099 external/wpt/2dcontext/drawing-images-to-the-canvas/drawimage_html_image_11.html [ Pass ] -crbug.com/591099 external/wpt/background-fetch/get-ids.https.window.html [ Failure ] -crbug.com/591099 external/wpt/background-fetch/get.https.window.html [ Failure ] crbug.com/591099 external/wpt/css/CSS2/floats/floats-line-wrap-shifted-001.html [ Pass ] crbug.com/591099 external/wpt/css/CSS2/normal-flow/block-in-inline-empty-001.xht [ Pass ] crbug.com/591099 external/wpt/css/CSS2/normal-flow/block-in-inline-empty-004.xht [ Pass ] @@ -84,7 +79,6 @@ crbug.com/591099 external/wpt/css/CSS2/normal-flow/block-in-inline-nested-002.xht [ Pass ] crbug.com/591099 external/wpt/css/CSS2/normal-flow/block-in-inline-remove-006.xht [ Pass ] crbug.com/591099 external/wpt/css/CSS2/text/white-space-mixed-003.xht [ Pass ] -crbug.com/591099 external/wpt/css/css-backgrounds/box-shadow-syntax-001.xht [ Failure ] crbug.com/591099 external/wpt/css/css-contain/contain-paint-001.html [ Pass ] crbug.com/714962 external/wpt/css/css-fonts/font-features-across-space-1.html [ Pass ] crbug.com/714962 external/wpt/css/css-fonts/font-features-across-space-3.html [ Pass ] @@ -102,13 +96,11 @@ crbug.com/591099 external/wpt/css/css-text/line-breaking/line-breaking-011.html [ Pass ] crbug.com/591099 external/wpt/css/css-text/line-breaking/line-breaking-ic-002.html [ Pass ] crbug.com/591099 external/wpt/css/css-text/line-breaking/line-breaking-ic-003.html [ Pass ] -crbug.com/591099 external/wpt/css/css-text/overflow-wrap/overflow-wrap-break-word-004.html [ Failure ] crbug.com/591099 external/wpt/css/css-text/overflow-wrap/overflow-wrap-min-content-size-002.html [ Pass ] crbug.com/591099 external/wpt/css/css-text/overflow-wrap/overflow-wrap-min-content-size-003.html [ Pass ] crbug.com/591099 external/wpt/css/css-text/white-space/pre-wrap-002.html [ Pass ] crbug.com/40634 external/wpt/css/css-text/white-space/trailing-space-before-br-001.html [ Pass ] crbug.com/591099 external/wpt/css/css-text/word-break/word-break-break-all-004.html [ Pass ] -crbug.com/591099 external/wpt/css/css-text/word-break/word-break-break-all-011.html [ Failure ] crbug.com/591099 external/wpt/css/css-transforms/transform-transformed-tr-percent-height-child.html [ Failure ] crbug.com/591099 external/wpt/css/css-transitions/properties-value-003.html [ Pass ] crbug.com/591099 external/wpt/css/css-transitions/properties-value-implicit-001.html [ Pass ] @@ -261,7 +253,6 @@ crbug.com/591099 external/wpt/encoding/eof-utf-8-three.html [ Failure ] crbug.com/591099 external/wpt/encoding/eof-utf-8-two.html [ Failure ] crbug.com/591099 external/wpt/encoding/legacy-mb-korean/euc-kr/euckr-decode-ksc_5601.html [ Timeout ] -crbug.com/591099 external/wpt/fetch/cross-origin-resource-policy/fetch.any.html [ Timeout ] crbug.com/591099 external/wpt/fetch/http-cache/basic-auth-cache-test.html [ Timeout ] crbug.com/591099 external/wpt/fullscreen/api/document-exit-fullscreen-nested-in-iframe-manual.html [ Pass ] crbug.com/591099 external/wpt/geolocation-API/PositionOptions.https.html [ Failure ] @@ -272,7 +263,6 @@ crbug.com/591099 external/wpt/html/browsers/the-window-object/window-open-noopener.html?_parent [ Timeout ] crbug.com/591099 external/wpt/html/browsers/the-window-object/window-open-noopener.html?_self [ Timeout ] crbug.com/591099 external/wpt/html/editing/focus/sequential-focus-navigation-and-the-tabindex-attribute/focus-tabindex-positive.html [ Timeout ] -crbug.com/591099 external/wpt/html/infrastructure/safe-passing-of-structured-data/shared-array-buffers/serialization-via-idb.any.worker.html [ Failure ] crbug.com/591099 external/wpt/html/infrastructure/safe-passing-of-structured-data/shared-array-buffers/window-domain-success.sub.html [ Failure ] crbug.com/591099 external/wpt/html/rendering/non-replaced-elements/the-hr-element-0/color.html [ Failure ] crbug.com/591099 external/wpt/html/rendering/non-replaced-elements/the-page/body-margin-2j.html [ Failure ] @@ -291,24 +281,7 @@ crbug.com/591099 external/wpt/media-source/mediasource-config-change-mp4-av-audio-bitrate.html [ Failure ] crbug.com/591099 external/wpt/media-source/mediasource-config-change-mp4-av-video-bitrate.html [ Failure ] crbug.com/591099 external/wpt/media-source/mediasource-config-change-mp4-v-bitrate.html [ Failure ] -crbug.com/591099 external/wpt/mimesniff/mime-types/parsing.any.html [ Pass ] -crbug.com/591099 external/wpt/mimesniff/mime-types/parsing.any.worker.html [ Pass ] crbug.com/591099 external/wpt/offscreen-canvas/convert-to-blob/offscreencanvas.convert.to.blob.html [ Pass ] -crbug.com/591099 external/wpt/offscreen-canvas/drawing-images-to-the-canvas/2d.drawImage.9arg.basic.worker.html [ Pass ] -crbug.com/591099 external/wpt/offscreen-canvas/drawing-images-to-the-canvas/2d.drawImage.9arg.sourcesize.worker.html [ Pass ] -crbug.com/591099 external/wpt/offscreen-canvas/drawing-images-to-the-canvas/2d.drawImage.animated.poster.worker.html [ Pass ] -crbug.com/591099 external/wpt/offscreen-canvas/drawing-images-to-the-canvas/2d.drawImage.broken.worker.html [ Pass ] -crbug.com/591099 external/wpt/offscreen-canvas/drawing-images-to-the-canvas/2d.drawImage.canvas.worker.html [ Pass ] -crbug.com/591099 external/wpt/offscreen-canvas/drawing-images-to-the-canvas/2d.drawImage.null.worker.html [ Pass ] -crbug.com/591099 external/wpt/offscreen-canvas/drawing-images-to-the-canvas/2d.drawImage.path.worker.html [ Pass ] -crbug.com/591099 external/wpt/offscreen-canvas/drawing-images-to-the-canvas/2d.drawImage.transform.worker.html [ Pass ] -crbug.com/591099 external/wpt/offscreen-canvas/drawing-images-to-the-canvas/2d.drawImage.zerocanvas.worker.html [ Pass ] -crbug.com/591099 external/wpt/offscreen-canvas/path-objects/2d.path.stroke.prune.arc.worker.html [ Failure ] -crbug.com/591099 external/wpt/offscreen-canvas/path-objects/2d.path.stroke.prune.curve.worker.html [ Failure ] -crbug.com/591099 external/wpt/offscreen-canvas/pixel-manipulation/2d.imageData.get.tiny.worker.html [ Failure ] -crbug.com/591099 external/wpt/offscreen-canvas/the-offscreen-canvas/size.attributes.idl.worker.html [ Failure ] -crbug.com/591099 external/wpt/payment-request/payment-allowed-by-feature-policy.https.sub.html [ Pass ] -crbug.com/591099 external/wpt/payment-request/payment-disabled-by-feature-policy.https.sub.html [ Pass ] crbug.com/591099 external/wpt/performance-timeline/po-observe.html [ Timeout ] crbug.com/591099 external/wpt/picture-in-picture/request-picture-in-picture-twice.html [ Pass ] crbug.com/591099 external/wpt/pointerevents/pointerevent_click_during_capture-manual.html [ Crash Timeout ] @@ -318,13 +291,11 @@ crbug.com/591099 external/wpt/requestidlecallback/callback-timeout.html [ Timeout ] crbug.com/591099 external/wpt/service-workers/service-worker/navigation-preload/broken-chunked-encoding.https.html [ Failure ] crbug.com/591099 external/wpt/speech-api/SpeechSynthesis-speak-twice.html [ Timeout ] +crbug.com/591099 external/wpt/svg/painting/reftests/markers-orient-001.svg [ Pass ] crbug.com/591099 external/wpt/svg/painting/reftests/paint-context-001.svg [ Failure ] crbug.com/591099 external/wpt/svg/painting/reftests/paint-context-002.svg [ Failure ] crbug.com/591099 external/wpt/svg/path/bearing/zero.svg [ Failure ] -crbug.com/591099 external/wpt/user-timing/invoke_with_timing_attributes.worker.html [ Failure ] crbug.com/591099 external/wpt/webrtc/RTCPeerConnection-setLocalDescription-answer.html [ Pass ] -crbug.com/591099 external/wpt/webrtc/interfaces.html [ Pass Timeout ] -crbug.com/591099 external/wpt/websockets/Create-Secure-extensions-empty.any.worker.html [ Timeout ] crbug.com/591099 external/wpt/webvtt/rendering/cues-with-video/processing-model/2_cues_overlapping_partially_move_down.html [ Failure ] crbug.com/591099 external/wpt/webvtt/rendering/cues-with-video/processing-model/2_tracks.html [ Failure ] crbug.com/591099 external/wpt/webvtt/rendering/cues-with-video/processing-model/align_start.html [ Failure ] @@ -370,7 +341,7 @@ crbug.com/591099 external/wpt/webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/voice_object/voice_outline_properties.html [ Failure ] crbug.com/591099 external/wpt/webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/voice_object/voice_outline_shorthand.html [ Failure ] crbug.com/591099 external/wpt/webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/voice_object/voice_white-space_normal_wrapped.html [ Failure ] -crbug.com/591099 external/wpt/workers/Worker_terminate_event_queue.htm [ Timeout ] +crbug.com/591099 external/wpt/workers/Worker_terminate_event_queue.htm [ Crash Timeout ] crbug.com/591099 external/wpt/workers/baseurl/alpha/worker-in-worker.html [ Pass ] crbug.com/591099 external/wpt/workers/constructors/Worker/same-origin.html [ Timeout ] crbug.com/591099 external/wpt/workers/semantics/interface-objects/004.html [ Failure ] @@ -438,7 +409,7 @@ crbug.com/591099 fast/table/empty-table-percent-height.html [ Failure ] crbug.com/591099 fast/table/height-percent-test-vertical.html [ Failure ] crbug.com/591099 fast/table/percent-height-overflow-auto-content-in-cell.html [ Failure ] -crbug.com/591099 fast/table/percent-height-overflow-scroll-content-in-cell.html [ Failure ] +crbug.com/591099 fast/table/percent-height-overflow-scroll-content-in-cell.html [ Failure Pass ] crbug.com/858998 fast/table/table-continuation-outline-paint-crash.html [ Failure ] crbug.com/591099 fast/table/table-display-types-vertical.html [ Failure ] crbug.com/591099 fast/table/unbreakable-images-quirk.html [ Failure ] @@ -480,10 +451,11 @@ crbug.com/591099 http/tests/security/cors-rfc1918/addressspace-document-appcache.https.html [ Crash Failure ] crbug.com/591099 http/tests/security/cors-rfc1918/addressspace-document-csp-appcache.https.html [ Crash Failure Pass ] crbug.com/591099 http/tests/security/setDomainRelaxationForbiddenForURLScheme.html [ Crash ] -crbug.com/591099 idle-callback/test-runner-run-idle-tasks.html [ Pass Timeout ] +crbug.com/591099 idle-callback/test-runner-run-idle-tasks.html [ Crash Pass Timeout ] crbug.com/714962 images/color-profile-background-clip-text.html [ Failure ] crbug.com/591099 images/color-profile-image-filter-all.html [ Failure ] crbug.com/591099 images/color-profile-munsell-adobe-to-srgb.html [ Failure ] +crbug.com/591099 images/feature-policy-max-downscaling-image-edge-cases.html [ Failure ] crbug.com/714962 inspector-protocol/css/css-get-platform-fonts.js [ Failure ] crbug.com/591099 inspector-protocol/dom-snapshot/dom-snapshot-getSnapshot-pseudo-element.js [ Failure ] crbug.com/714962 inspector-protocol/dom-snapshot/dom-snapshot-getSnapshot-viewport.js [ Failure ] @@ -517,7 +489,6 @@ crbug.com/591099 paint/invalidation/line-flow-with-floats-7.html [ Failure ] crbug.com/591099 paint/invalidation/line-flow-with-floats-9.html [ Failure ] crbug.com/824918 paint/invalidation/multicol/multicol-repaint.html [ Failure ] -crbug.com/591099 paint/invalidation/offset-change-wrong-invalidation-with-float.html [ Failure ] crbug.com/835484 paint/invalidation/outline/focus-continuations.html [ Failure ] crbug.com/835484 paint/invalidation/outline/focus-enable-continuations.html [ Failure ] crbug.com/835484 paint/invalidation/outline/focus-layers.html [ Failure ] @@ -553,6 +524,7 @@ crbug.com/591099 printing/iframe-svg-in-object-print.html [ Failure ] crbug.com/591099 scrollbars/auto-scrollbar-fit-content.html [ Failure ] crbug.com/591099 scrollbars/overflow-scrollbar-combinations.html [ Failure ] +crbug.com/591099 shadow-dom/imperative-api.html [ Pass ] crbug.com/591099 storage/indexeddb/mozilla/test_objectStore_openKeyCursor.html [ Pass ] crbug.com/591099 storage/indexeddb/objectstore-cursor.html [ Pass ] crbug.com/591099 svg/custom/object-sizing-no-width-height.xhtml [ Failure ] @@ -583,6 +555,7 @@ crbug.com/591099 virtual/feature-policy-vibrate/ [ Skip ] crbug.com/591099 virtual/gpu-rasterization/images/color-profile-image-filter-all.html [ Failure ] crbug.com/591099 virtual/gpu-rasterization/images/color-profile-munsell-adobe-to-srgb.html [ Failure ] +crbug.com/591099 virtual/gpu-rasterization/images/feature-policy-max-downscaling-image-edge-cases.html [ Failure ] crbug.com/591099 virtual/gpu/fast/canvas/canvas-blending-color-over-image.html [ Pass ] crbug.com/591099 virtual/gpu/fast/canvas/canvas-blending-gradient-over-pattern.html [ Pass Timeout ] crbug.com/591099 virtual/layout_ng/ [ Skip ]
diff --git a/third_party/WebKit/LayoutTests/FlagExpectations/enable-blink-gen-property-trees b/third_party/WebKit/LayoutTests/FlagExpectations/enable-blink-gen-property-trees index fe157aa..15e4215 100644 --- a/third_party/WebKit/LayoutTests/FlagExpectations/enable-blink-gen-property-trees +++ b/third_party/WebKit/LayoutTests/FlagExpectations/enable-blink-gen-property-trees
@@ -147,12 +147,8 @@ crbug.com/855688 transitions/transition-end-event-destroy-iframe.html [ Timeout ] crbug.com/855688 virtual/threaded/transitions/opacity-transform-transitions-inside-iframe.html [ Timeout ] crbug.com/855688 virtual/threaded/transitions/transition-end-event-destroy-iframe.html [ Timeout ] -crbug.com/855691 virtual/threaded/fast/animationworklet/animation-worklet-animator-animate.html [ Failure ] -crbug.com/855691 virtual/threaded/fast/animationworklet/animation-worklet-animator-with-options.html [ Failure ] -crbug.com/855691 virtual/threaded/fast/animationworklet/worklet-animation-currentTime.html [ Failure ] crbug.com/855702 virtual/threaded/animations/composited-filter-webkit-filter.html [ Failure ] crbug.com/855702 virtual/threaded/animations/img-element-transform.html [ Timeout Failure Pass ] -crbug.com/855702 virtual/threaded/animations/compositor-independent-transform-cancel.html [ Failure ] crbug.com/861824 virtual/threaded/fast/animationworklet/animation-worklet-inside-iframe.html [ Failure ]
diff --git a/third_party/WebKit/LayoutTests/FlagExpectations/enable-features=NetworkService b/third_party/WebKit/LayoutTests/FlagExpectations/enable-features=NetworkService index c0ff02c4..57dcc7ce 100644 --- a/third_party/WebKit/LayoutTests/FlagExpectations/enable-features=NetworkService +++ b/third_party/WebKit/LayoutTests/FlagExpectations/enable-features=NetworkService
@@ -4,7 +4,6 @@ Bug(none) external/wpt/clear-site-data/storage.https.html [ Failure ] Bug(none) external/wpt/clear-site-data/navigation.https.html [ Timeout ] crbug.com/829417 external/wpt/html/browsers/offline/appcache/workers/appcache-worker.https.html [ Timeout ] -crbug.com/771118 external/wpt/service-workers/service-worker/mime-sniffing.https.html [ Failure ] Bug(none) http/tests/misc/redirect-to-about-blank.html [ Timeout ] Bug(none) http/tests/security/cors-rfc1918 [ Crash Timeout ]
diff --git a/third_party/WebKit/LayoutTests/FlagExpectations/site-per-process b/third_party/WebKit/LayoutTests/FlagExpectations/site-per-process index 3b317e5..dde98da 100644 --- a/third_party/WebKit/LayoutTests/FlagExpectations/site-per-process +++ b/third_party/WebKit/LayoutTests/FlagExpectations/site-per-process
@@ -32,11 +32,6 @@ crbug.com/585188 http/tests/xmlhttprequest/origin-whitelisting-ip-addresses.html [ Failure ] crbug.com/585188 virtual/outofblink-cors/http/tests/xmlhttprequest/origin-whitelisting-ip-addresses.html [ Failure ] -# https://crbug.com/601584 - No OOPIF support for UserGestureIndicator triggers -# cross-origin-iframe.html layout test failure -crbug.com/601584 external/wpt/bluetooth/requestDevice/cross-origin-iframe.sub.https.html [ Skip ] -crbug.com/601584 virtual/outofblink-cors/external/wpt/bluetooth/requestDevice/cross-origin-iframe.sub.https.html [ Skip ] - # https://crbug.com/606594 - UaF of delegate_ in WebFrameTestClient::willSendRequest # https://crbug.com/786510 - test tries to access cross-origin document body crbug.com/606594 http/tests/local/serviceworker/fetch-request-body-file.html [ Skip ]
diff --git a/third_party/WebKit/LayoutTests/MSANExpectations b/third_party/WebKit/LayoutTests/MSANExpectations index 2bd01bf..72b661be 100644 --- a/third_party/WebKit/LayoutTests/MSANExpectations +++ b/third_party/WebKit/LayoutTests/MSANExpectations
@@ -32,6 +32,8 @@ crbug.com/704360 [ Linux ] shapedetection/detection-HTMLCanvasElement.html [ Timeout Pass ] crbug.com/704360 [ Linux ] shapedetection/detection-ImageData.html [ Timeout Pass ] +crbug.com/873570 [ Linux ] external/wpt/encoding/textdecoder-fatal-single-byte.any.html [ Timeout Pass ] + # Times out on MSAN crbug.com/462190 [ Linux ] inspector-protocol/heap-profiler/heap-samples-in-snapshot.js [ Timeout ] crbug.com/462190 [ Linux ] inspector-protocol/heap-profiler/heap-snapshot-merged-nodes.js [ Timeout ] @@ -98,19 +100,6 @@ crbug.com/803276 virtual/sampling-heap-profiler/inspector-protocol/memory/sampling-native-profile.js [ Skip ] crbug.com/803276 virtual/sampling-heap-profiler/inspector-protocol/memory/sampling-native-snapshot.js [ Skip ] -# CORS test crash on MSAN -crbug.com/838057 [ Linux ] virtual/outofblink-cors/external/wpt/fetch/api/cors/cors-cookies-redirect.any.html [ Crash ] -crbug.com/838057 [ Linux ] virtual/outofblink-cors/external/wpt/fetch/api/cors/cors-cookies-redirect.any.worker.html [ Crash ] -crbug.com/838057 [ Linux ] virtual/outofblink-cors/external/wpt/fetch/api/cors/cors-preflight-star.any.html [ Crash ] -crbug.com/838057 [ Linux ] virtual/outofblink-cors/external/wpt/fetch/api/cors/cors-preflight-star.any.worker.html [ Crash ] -crbug.com/838057 [ Linux ] virtual/outofblink-cors/external/wpt/fetch/api/cors/cors-preflight.any.html [ Crash ] -crbug.com/838057 [ Linux ] virtual/outofblink-cors/external/wpt/fetch/api/cors/cors-preflight.any.worker.html [ Crash ] -crbug.com/838057 [ Linux ] virtual/outofblink-cors/external/wpt/fetch/api/cors/cors-redirect-preflight.any.html [ Crash ] -crbug.com/838057 [ Linux ] virtual/outofblink-cors/external/wpt/fetch/api/cors/cors-redirect-preflight.any.worker.html [ Crash ] -# This next one is flaky as of 2018-08-09. -crbug.com/838057 [ Linux ] virtual/outofblink-cors/external/wpt/service-workers/service-worker/fetch-canvas-tainting-video-cache.https.html [ Pass Crash ] -crbug.com/838057 [ Linux ] virtual/outofblink-cors/external/wpt/service-workers/service-worker/fetch-canvas-tainting-video.https.html [ Crash ] - # Crashes on Linux Trusty MSAN crbug.com/842262 [ Linux ] virtual/enable_wasm/external/wpt/wasm/wasm_indexeddb_test.https.html [ Crash ] @@ -169,6 +158,23 @@ crbug.com/856601 [ Linux ] virtual/outofblink-cors/external/wpt/service-workers/service-worker/interfaces-sw.https.html [ Timeout Pass ] crbug.com/856601 [ Linux ] virtual/service-worker-servicification/external/wpt/service-workers/service-worker/interfaces-sw.https.html [ Timeout Pass ] crbug.com/856601 [ Linux ] virtual/video-surface-layer/external/wpt/picture-in-picture/idlharness.window.html [ Pass Timeout ] +crbug.com/856601 [ Linux ] external/wpt/fetch/api/idl.any.sharedworker.html [ Pass Timeout ] +crbug.com/856601 [ Linux ] external/wpt/fetch/cors-rfc1918/idlharness.tentative.https.any.serviceworker.html [ Pass Timeout ] +crbug.com/856601 [ Linux ] external/wpt/media-capabilities/idlharness.any.html [ Pass Timeout ] +crbug.com/856601 [ Linux ] external/wpt/orientation-event/idlharness.window.html [ Pass Timeout ] +crbug.com/856601 [ Linux ] external/wpt/pointerlock/interfaces.window.html [ Pass Timeout ] +crbug.com/856601 [ Linux ] virtual/outofblink-cors-ns/external/wpt/xhr/idlharness.any.worker.html [ Pass Timeout ] +crbug.com/856601 [ Linux ] virtual/outofblink-cors/external/wpt/xhr/idlharness.any.sharedworker.html [ Pass Timeout ] +crbug.com/856601 [ Linux ] external/wpt/bluetooth/idl/idlharness.tentative.https.window.html [ Timeout Pass ] +crbug.com/856601 [ Linux ] external/wpt/css/css-pseudo/idlharness.html [ Timeout Pass ] +crbug.com/856601 [ Linux ] external/wpt/hr-time/idlharness.any.worker.html [ Timeout Pass ] +crbug.com/856601 [ Linux ] external/wpt/media-source/idlharness.any.html [ Timeout Pass ] +crbug.com/856601 [ Linux ] external/wpt/page-visibility/idlharness.window.html [ Timeout Pass ] +crbug.com/856601 [ Linux ] virtual/new-remote-playback-pipeline/external/wpt/remote-playback/idlharness.window.html [ Timeout Pass ] +crbug.com/856601 [ Linux ] virtual/outofblink-cors-ns/external/wpt/xhr/idlharness.any.sharedworker.html [ Timeout Pass ] +crbug.com/856601 [ Linux ] virtual/outofblink-cors/external/wpt/xhr/idlharness.any.html [ Timeout Pass ] +crbug.com/856601 [ Linux ] virtual/service-worker-servicification/external/wpt/service-workers/service-worker/interfaces-window.https.html [ Timeout Pass ] +crbug.com/856601 [ Linux ] virtual/webrtc-wpt-unified-plan/external/wpt/webrtc/idlharness.https.window.html [ Timeout Pass ] # background-fetch tests crash on MSAN crbug.com/869818 [ Linux ] external/wpt/background-fetch/fetch.https.window.html [ Pass Crash ]
diff --git a/third_party/WebKit/LayoutTests/TestExpectations b/third_party/WebKit/LayoutTests/TestExpectations index 8f821c2c..59355a68d 100644 --- a/third_party/WebKit/LayoutTests/TestExpectations +++ b/third_party/WebKit/LayoutTests/TestExpectations
@@ -638,21 +638,17 @@ crbug.com/591099 virtual/layout_ng_experimental/external/wpt/css/css-multicol/multicol-rule-shorthand-2.xht [ Failure ] crbug.com/591099 virtual/layout_ng_experimental/external/wpt/css/css-multicol/multicol-rule-solid-000.xht [ Failure ] crbug.com/591099 virtual/layout_ng_experimental/external/wpt/css/css-multicol/multicol-rule-stacking-001.xht [ Failure ] -crbug.com/591099 virtual/layout_ng_experimental/external/wpt/css/css-multicol/multicol-rule-style-groove-001.xht [ Failure ] -crbug.com/591099 virtual/layout_ng_experimental/external/wpt/css/css-multicol/multicol-rule-style-ridge-001.xht [ Failure ] crbug.com/591099 virtual/layout_ng_experimental/external/wpt/css/css-multicol/multicol-shorthand-001.xht [ Failure ] crbug.com/591099 virtual/layout_ng_experimental/external/wpt/css/css-multicol/multicol-span-000.xht [ Failure ] crbug.com/591099 virtual/layout_ng_experimental/external/wpt/css/css-multicol/multicol-span-all-001.xht [ Failure ] crbug.com/591099 virtual/layout_ng_experimental/external/wpt/css/css-multicol/multicol-span-all-002.xht [ Failure ] crbug.com/591099 virtual/layout_ng_experimental/external/wpt/css/css-multicol/multicol-span-all-003.xht [ Failure ] crbug.com/591099 virtual/layout_ng_experimental/external/wpt/css/css-multicol/multicol-span-all-block-sibling-003.xht [ Failure ] -crbug.com/591099 virtual/layout_ng_experimental/external/wpt/css/css-multicol/multicol-span-all-child-001.xht [ Failure ] crbug.com/591099 virtual/layout_ng_experimental/external/wpt/css/css-multicol/multicol-span-all-margin-001.xht [ Failure ] crbug.com/591099 virtual/layout_ng_experimental/external/wpt/css/css-multicol/multicol-span-all-margin-002.xht [ Failure ] crbug.com/591099 virtual/layout_ng_experimental/external/wpt/css/css-multicol/multicol-span-all-margin-bottom-001.xht [ Failure ] crbug.com/591099 virtual/layout_ng_experimental/external/wpt/css/css-multicol/multicol-span-all-margin-nested-001.xht [ Failure ] crbug.com/636055 virtual/layout_ng_experimental/external/wpt/css/css-multicol/multicol-span-all-margin-nested-002.xht [ Failure ] -crbug.com/591099 virtual/layout_ng_experimental/external/wpt/css/css-multicol/multicol-span-all-margin-nested-003.xht [ Crash ] crbug.com/591099 virtual/layout_ng_experimental/external/wpt/css/css-multicol/multicol-span-all-margin-nested-firstchild-001.xht [ Failure ] crbug.com/792446 virtual/layout_ng_experimental/external/wpt/css/css-multicol/multicol-span-float-001.xht [ Failure ] crbug.com/591099 virtual/layout_ng_experimental/external/wpt/css/css-multicol/multicol-span-none-001.xht [ Failure ] @@ -2703,23 +2699,29 @@ crbug.com/873540 external/wpt/budget-api/idlharness.https.any.html [ Timeout Crash ] # ====== New tests from wpt-importer added here ====== +crbug.com/626703 [ Android ] virtual/media-gpu-accelerated/external/wpt/media-source/mediasource-play.html [ Crash ] +crbug.com/626703 external/wpt/payment-request/PaymentValidationErrors/retry-shows-payer-member-manual.https.html [ Skip ] +crbug.com/626703 external/wpt/payment-request/PaymentValidationErrors/retry-shows-shippingAddress-member-manual.https.html [ Skip ] +crbug.com/626703 external/wpt/payment-request/PaymentValidationErrors/retry-shows-error-member-manual.https.html [ Skip ] +crbug.com/626703 external/wpt/payment-request/payment-response/retry-method-manual.https.html [ Skip ] +crbug.com/626703 external/wpt/payment-request/payment-response/rejects_if_not_active-manual.https.html [ Skip ] crbug.com/626703 external/wpt/infrastructure/server/secure-context.https.any.serviceworker.html [ Skip ] crbug.com/626703 external/wpt/speech-api/SpeechSynthesis-speak-with-activation-succeeds.html [ Timeout ] crbug.com/626703 external/wpt/speech-api/SpeechSynthesis-speak-without-activation-fails.tentative.html [ Timeout ] crbug.com/626703 external/wpt/svg/painting/reftests/paint-order-001.svg [ Failure ] -crbug.com/626703 external/wpt/svg/text/reftests/text-inline-size-007.svg [ Failure ] -crbug.com/626703 external/wpt/svg/text/reftests/text-inline-size-005.svg [ Failure ] -crbug.com/626703 external/wpt/svg/text/reftests/text-multiline-002.svg [ Failure ] -crbug.com/626703 [ Linux Win ] external/wpt/svg/text/reftests/text-multiline-003.svg [ Failure ] -crbug.com/626703 external/wpt/svg/text/reftests/text-inline-size-201.svg [ Failure ] -crbug.com/626703 external/wpt/svg/text/reftests/text-inline-size-001.svg [ Failure ] -crbug.com/626703 external/wpt/svg/painting/reftests/markers-orient-001.svg [ Failure ] -crbug.com/626703 external/wpt/svg/text/reftests/text-inline-size-002.svg [ Failure ] +crbug.com/366553 external/wpt/svg/text/reftests/text-inline-size-007.svg [ Failure ] +crbug.com/366553 external/wpt/svg/text/reftests/text-inline-size-005.svg [ Failure ] +crbug.com/366558 external/wpt/svg/text/reftests/text-multiline-002.svg [ Failure ] +crbug.com/366558 [ Linux Win ] external/wpt/svg/text/reftests/text-multiline-003.svg [ Failure ] +crbug.com/366553 external/wpt/svg/text/reftests/text-inline-size-201.svg [ Failure ] +crbug.com/366553 external/wpt/svg/text/reftests/text-inline-size-001.svg [ Failure ] +crbug.com/872697 external/wpt/svg/painting/reftests/markers-orient-001.svg [ Failure ] +crbug.com/366553 external/wpt/svg/text/reftests/text-inline-size-002.svg [ Failure ] crbug.com/626703 external/wpt/css/css-text/overflow-wrap/overflow-wrap-min-content-size-003.html [ Failure ] -crbug.com/626703 external/wpt/svg/text/reftests/text-inline-size-006.svg [ Failure ] -crbug.com/626703 [ Linux Win ] external/wpt/svg/text/reftests/text-inline-size-003.svg [ Failure ] -crbug.com/626703 external/wpt/svg/text/reftests/text-multiline-001.svg [ Failure ] -crbug.com/626703 external/wpt/svg/text/reftests/text-inline-size-101.svg [ Failure ] +crbug.com/366553 external/wpt/svg/text/reftests/text-inline-size-006.svg [ Failure ] +crbug.com/366553 [ Linux Win ] external/wpt/svg/text/reftests/text-inline-size-003.svg [ Failure ] +crbug.com/366558 external/wpt/svg/text/reftests/text-multiline-001.svg [ Failure ] +crbug.com/366553 external/wpt/svg/text/reftests/text-inline-size-101.svg [ Failure ] crbug.com/626703 [ Linux Win ] external/wpt/css/css-contain/contain-size-025.html [ Failure ] crbug.com/626703 external/wpt/css/css-contain/contain-paint-clip-016.html [ Failure ] crbug.com/626703 external/wpt/css/css-contain/contain-layout-cell-001.html [ Failure ] @@ -2763,10 +2765,10 @@ crbug.com/626703 external/wpt/css/css-text/white-space/textarea-break-spaces-001.html [ Failure ] crbug.com/626703 external/wpt/css/css-text/white-space/textarea-break-spaces-003.html [ Failure ] crbug.com/626703 external/wpt/css/vendor-imports/mozilla/mozilla-central-reftests/flexbox/flexbox-column-row-gap-003.html [ Failure ] -crbug.com/626703 [ Mac ] external/wpt/svg/shapes/reftests/pathlength-002.svg [ Failure ] -crbug.com/626703 external/wpt/svg/shapes/reftests/pathlength-003.svg [ Failure ] -crbug.com/626703 external/wpt/svg/text/reftests/textpath-side-001.svg [ Failure ] -crbug.com/626703 external/wpt/svg/text/reftests/textpath-shape-001.svg [ Failure ] +crbug.com/863355 [ Mac ] external/wpt/svg/shapes/reftests/pathlength-002.svg [ Failure ] +crbug.com/366559 external/wpt/svg/shapes/reftests/pathlength-003.svg [ Failure ] +crbug.com/366559 external/wpt/svg/text/reftests/textpath-side-001.svg [ Failure ] +crbug.com/366559 external/wpt/svg/text/reftests/textpath-shape-001.svg [ Failure ] crbug.com/626703 [ Win7 ] external/wpt/resource-timing/resource_timing_buffer_full_eventually.html [ Timeout ] crbug.com/626703 external/wpt/svg/rendering/order/z-index.svg [ Failure ] crbug.com/626703 external/wpt/web-animations/timing-model/timelines/update-and-send-events.html [ Timeout ] @@ -3913,6 +3915,10 @@ # Sheriff failures 2018-08-13 crbug.com/873547 [ Mac ] virtual/mouseevent_fractional/fast/events/middleClickAutoscroll-event-fired.html [ Timeout Pass ] crbug.com/873547 [ Mac ] virtual/user-activation-v2/fast/events/middleClickAutoscroll-event-fired.html [ Timeout Pass ] +crbug.com/873454 css3/filters/effect-reference-image-hw.html [ Failure Pass ] + +# Sheriff failures 2018-08-14 +crbug.com/873435 virtual/user-activation-v2/fast/events/middleClickAutoscroll-in-iframe.html [ Timeout Pass ] crbug.com/715718 external/wpt/media-source/mediasource-activesourcebuffers.html [ Failure Pass ] crbug.com/715718 external/wpt/media-source/mediasource-remove.html [ Failure Pass ] @@ -4905,3 +4911,15 @@ # Sheriff 2018-08-10 crbug.com/873078 [ Win7 ] device_orientation/motion/detached-frame.html [ Failure Pass ] crbug.com/872705 [ Mac ] virtual/mouseevent_fractional/fast/events/middleClickAutoscroll-click.html [ Timeout Pass ] + +# Sheriff 2018-08-13 +crbug.com/873829 [ Mac ] virtual/user-activation-v2/fast/events/autoscroll-iframe-no-scrolling.html [ Timeout Pass ] + +crbug.com/873873 external/wpt/service-workers/service-worker/fetch-canvas-tainting-video.https.html [ Timeout Pass ] +crbug.com/873873 virtual/outofblink-cors/external/wpt/service-workers/service-worker/fetch-canvas-tainting-video.https.html [ Timeout Pass ] +crbug.com/873873 virtual/outofblink-cors-ns/external/wpt/service-workers/service-worker/fetch-canvas-tainting-video.https.html [ Timeout Pass ] +crbug.com/873873 virtual/service-worker-servicification/external/wpt/service-workers/service-worker/fetch-canvas-tainting-video.https.html [ Timeout Pass ] +crbug.com/873873 external/wpt/service-workers/service-worker/fetch-canvas-tainting-video-cache.https.html [ Timeout Pass ] +crbug.com/873873 virtual/outofblink-cors/external/wpt/service-workers/service-worker/fetch-canvas-tainting-video-cache.https.html [ Timeout Pass ] +crbug.com/873873 virtual/outofblink-cors-ns/external/wpt/service-workers/service-worker/fetch-canvas-tainting-video-cache.https.html [ Timeout Pass ] +crbug.com/873873 virtual/service-worker-servicification/external/wpt/service-workers/service-worker/fetch-canvas-tainting-video-cache.https.html [ Timeout Pass ]
diff --git a/third_party/WebKit/LayoutTests/W3CImportExpectations b/third_party/WebKit/LayoutTests/W3CImportExpectations index fe1e279..fe908042 100644 --- a/third_party/WebKit/LayoutTests/W3CImportExpectations +++ b/third_party/WebKit/LayoutTests/W3CImportExpectations
@@ -18,7 +18,6 @@ external/wpt/WebIDL/testable_assertions.txt [ Skip ] external/wpt/WebIDL/valid [ Skip ] external/wpt/accname [ Skip ] -external/wpt/ambient-light [ Skip ] external/wpt/annotation-model [ Skip ] external/wpt/annotation-protocol [ Skip ] external/wpt/annotation-vocab [ Skip ]
diff --git a/third_party/WebKit/LayoutTests/external/WPT_BASE_MANIFEST.json b/third_party/WebKit/LayoutTests/external/WPT_BASE_MANIFEST.json index 41d707e..49f6884 100644 --- a/third_party/WebKit/LayoutTests/external/WPT_BASE_MANIFEST.json +++ b/third_party/WebKit/LayoutTests/external/WPT_BASE_MANIFEST.json
@@ -85,6 +85,12 @@ {} ] ], + "ambient-light/AmbientLightSensor_onerror-manual.https.html": [ + [ + "/ambient-light/AmbientLightSensor_onerror-manual.https.html", + {} + ] + ], "audio-output/setSinkId-manual.https.html": [ [ "/audio-output/setSinkId-manual.https.html", @@ -5227,6 +5233,24 @@ {} ] ], + "payment-request/PaymentValidationErrors/retry-shows-error-member-manual.https.html": [ + [ + "/payment-request/PaymentValidationErrors/retry-shows-error-member-manual.https.html", + {} + ] + ], + "payment-request/PaymentValidationErrors/retry-shows-payer-member-manual.https.html": [ + [ + "/payment-request/PaymentValidationErrors/retry-shows-payer-member-manual.https.html", + {} + ] + ], + "payment-request/PaymentValidationErrors/retry-shows-shippingAddress-member-manual.https.html": [ + [ + "/payment-request/PaymentValidationErrors/retry-shows-shippingAddress-member-manual.https.html", + {} + ] + ], "payment-request/algorithms-manual.https.html": [ [ "/payment-request/algorithms-manual.https.html", @@ -5275,12 +5299,24 @@ {} ] ], + "payment-request/payment-response/rejects_if_not_active-manual.https.html": [ + [ + "/payment-request/payment-response/rejects_if_not_active-manual.https.html", + {} + ] + ], "payment-request/payment-response/requestId-attribute-manual.https.html": [ [ "/payment-request/payment-response/requestId-attribute-manual.https.html", {} ] ], + "payment-request/payment-response/retry-method-manual.https.html": [ + [ + "/payment-request/payment-response/retry-method-manual.https.html", + {} + ] + ], "payment-request/payment-response/shippingAddress-attribute-manual.https.html": [ [ "/payment-request/payment-response/shippingAddress-attribute-manual.https.html", @@ -104519,11 +104555,46 @@ {} ] ], + "ambient-light/AmbientLightSensor-disabled-by-feature-policy.https.html.headers": [ + [ + {} + ] + ], + "ambient-light/AmbientLightSensor-enabled-by-feature-policy.https.html.headers": [ + [ + {} + ] + ], + "ambient-light/AmbientLightSensor-enabled-on-self-origin-by-feature-policy.https.html.headers": [ + [ + {} + ] + ], + "ambient-light/META.yml": [ + [ + {} + ] + ], + "ambient-light/OWNERS": [ + [ + {} + ] + ], "animation-worklet/META.yml": [ [ {} ] ], + "animation-worklet/idlharness.any-expected.txt": [ + [ + {} + ] + ], + "animation-worklet/idlharness.any.worker-expected.txt": [ + [ + {} + ] + ], "animation-worklet/interfaces.any-expected.txt": [ [ {} @@ -104669,11 +104740,6 @@ {} ] ], - "battery-status/battery-interface-idlharness.https.window-expected.txt": [ - [ - {} - ] - ], "battery-status/support-iframe.html": [ [ {} @@ -143429,6 +143495,11 @@ {} ] ], + "encoding/remove-only-one-bom-expected.txt": [ + [ + {} + ] + ], "encoding/resources/decode-common.js": [ [ {} @@ -143469,6 +143540,21 @@ {} ] ], + "encoding/resources/two-boms-utf-16be.html": [ + [ + {} + ] + ], + "encoding/resources/two-boms-utf-16le.html": [ + [ + {} + ] + ], + "encoding/resources/two-boms-utf-8.html": [ + [ + {} + ] + ], "encoding/resources/utf-32-big-endian-bom.html": [ [ {} @@ -146709,6 +146795,11 @@ {} ] ], + "html/browsers/browsing-the-web/unloading-documents/beforeunload-synchronous-expected.txt": [ + [ + {} + ] + ], "html/browsers/browsing-the-web/unloading-documents/contains.json": [ [ {} @@ -147969,6 +148060,11 @@ {} ] ], + "html/browsers/windows/auxiliary-browsing-contexts/resources/opener-setter.html": [ + [ + {} + ] + ], "html/browsers/windows/browsing-context-expected.txt": [ [ {} @@ -161339,6 +161435,11 @@ {} ] ], + "media/video.ogv": [ + [ + {} + ] + ], "media/white.mp4": [ [ {} @@ -167434,6 +167535,11 @@ {} ] ], + "service-workers/cache-storage/resources/vary.py": [ + [ + {} + ] + ], "service-workers/cache-storage/script-tests/cache-abort.js": [ [ {} @@ -167484,11 +167590,6 @@ {} ] ], - "service-workers/cache-storage/serviceworker/cache-add.https-expected.txt": [ - [ - {} - ] - ], "service-workers/cache-storage/serviceworker/cache-keys-attributes-for-service-worker.https-expected.txt": [ [ {} @@ -167509,11 +167610,6 @@ {} ] ], - "service-workers/cache-storage/window/cache-add.https-expected.txt": [ - [ - {} - ] - ], "service-workers/cache-storage/window/cache-keys.https-expected.txt": [ [ {} @@ -167534,11 +167630,6 @@ {} ] ], - "service-workers/cache-storage/worker/cache-add.https-expected.txt": [ - [ - {} - ] - ], "service-workers/cache-storage/worker/cache-keys.https-expected.txt": [ [ {} @@ -168859,6 +168950,11 @@ {} ] ], + "service-workers/service-worker/resources/postmessage-dictionary-transferables-worker.js": [ + [ + {} + ] + ], "service-workers/service-worker/resources/postmessage-msgport-to-client-worker.js": [ [ {} @@ -170164,11 +170260,6 @@ {} ] ], - "subresource-integrity/idlharness.window-expected.txt": [ - [ - {} - ] - ], "subresource-integrity/matching-digest.js": [ [ {} @@ -172199,6 +172290,11 @@ {} ] ], + "webaudio/the-audio-api/the-delaynode-interface/delaynode-channel-count-1-expected.txt": [ + [ + {} + ] + ], "webaudio/the-audio-api/the-dynamicscompressornode-interface/.gitkeep": [ [ {} @@ -179785,6 +179881,18 @@ {} ] ], + "2dcontext/imagebitmap/canvas-createImageBitmap-resize.html": [ + [ + "/2dcontext/imagebitmap/canvas-createImageBitmap-resize.html", + {} + ] + ], + "2dcontext/imagebitmap/canvas-createImageBitmap-video-resize.html": [ + [ + "/2dcontext/imagebitmap/canvas-createImageBitmap-video-resize.html", + {} + ] + ], "2dcontext/imagebitmap/createImageBitmap-bounds.html": [ [ "/2dcontext/imagebitmap/createImageBitmap-bounds.html", @@ -185477,13 +185585,67 @@ } ] ], - "animation-worklet/interfaces.any.js": [ + "ambient-light/AmbientLightSensor-disabled-by-feature-policy.https.html": [ [ - "/animation-worklet/interfaces.any.html", + "/ambient-light/AmbientLightSensor-disabled-by-feature-policy.https.html", + {} + ] + ], + "ambient-light/AmbientLightSensor-enabled-by-feature-policy-attribute-redirect-on-load.https.html": [ + [ + "/ambient-light/AmbientLightSensor-enabled-by-feature-policy-attribute-redirect-on-load.https.html", + {} + ] + ], + "ambient-light/AmbientLightSensor-enabled-by-feature-policy-attribute.https.html": [ + [ + "/ambient-light/AmbientLightSensor-enabled-by-feature-policy-attribute.https.html", + {} + ] + ], + "ambient-light/AmbientLightSensor-enabled-by-feature-policy.https.html": [ + [ + "/ambient-light/AmbientLightSensor-enabled-by-feature-policy.https.html", + {} + ] + ], + "ambient-light/AmbientLightSensor-enabled-on-self-origin-by-feature-policy.https.html": [ + [ + "/ambient-light/AmbientLightSensor-enabled-on-self-origin-by-feature-policy.https.html", + {} + ] + ], + "ambient-light/AmbientLightSensor-iframe-access.https.html": [ + [ + "/ambient-light/AmbientLightSensor-iframe-access.https.html", + {} + ] + ], + "ambient-light/AmbientLightSensor.https.html": [ + [ + "/ambient-light/AmbientLightSensor.https.html", + {} + ] + ], + "ambient-light/AmbientLightSensor_insecure_context.html": [ + [ + "/ambient-light/AmbientLightSensor_insecure_context.html", + {} + ] + ], + "ambient-light/idlharness.https.window.js": [ + [ + "/ambient-light/idlharness.https.window.html", + {} + ] + ], + "animation-worklet/idlharness.any.js": [ + [ + "/animation-worklet/idlharness.any.html", {} ], [ - "/animation-worklet/interfaces.any.worker.html", + "/animation-worklet/idlharness.any.worker.html", {} ] ], @@ -211489,6 +211651,12 @@ } ] ], + "encoding/remove-only-one-bom.html": [ + [ + "/encoding/remove-only-one-bom.html", + {} + ] + ], "encoding/replacement-encodings.any.js": [ [ "/encoding/replacement-encodings.any.html", @@ -215285,6 +215453,12 @@ {} ] ], + "html/browsers/browsing-the-web/unloading-documents/beforeunload-synchronous.html": [ + [ + "/html/browsers/browsing-the-web/unloading-documents/beforeunload-synchronous.html", + {} + ] + ], "html/browsers/browsing-the-web/unloading-documents/navigation-within-beforeunload.html": [ [ "/html/browsers/browsing-the-web/unloading-documents/navigation-within-beforeunload.html", @@ -216439,6 +216613,12 @@ {} ] ], + "html/browsers/windows/auxiliary-browsing-contexts/opener-setter.html": [ + [ + "/html/browsers/windows/auxiliary-browsing-contexts/opener-setter.html", + {} + ] + ], "html/browsers/windows/auxiliary-browsing-contexts/opener-setter.window.js": [ [ "/html/browsers/windows/auxiliary-browsing-contexts/opener-setter.window.html", @@ -225711,6 +225891,12 @@ {} ] ], + "html/syntax/parsing/meta-inhead-insertion-mode.html": [ + [ + "/html/syntax/parsing/meta-inhead-insertion-mode.html", + {} + ] + ], "html/syntax/parsing/named-character-references.html": [ [ "/html/syntax/parsing/named-character-references.html", @@ -254363,57 +254549,9 @@ {} ] ], - "trusted-types/HTMLAnchorElement-href.tentative.html": [ + "trusted-types/HTMLElement-generic.tentative.html": [ [ - "/trusted-types/HTMLAnchorElement-href.tentative.html", - {} - ] - ], - "trusted-types/HTMLAreaElement-href.tentative.html": [ - [ - "/trusted-types/HTMLAreaElement-href.tentative.html", - {} - ] - ], - "trusted-types/HTMLBaseElement-href.tentative.html": [ - [ - "/trusted-types/HTMLBaseElement-href.tentative.html", - {} - ] - ], - "trusted-types/HTMLIFrameElement-src.tentative.html": [ - [ - "/trusted-types/HTMLIFrameElement-src.tentative.html", - {} - ] - ], - "trusted-types/HTMLImageElement-src.tentative.html": [ - [ - "/trusted-types/HTMLImageElement-src.tentative.html", - {} - ] - ], - "trusted-types/HTMLLinkElement-href.tentative.html": [ - [ - "/trusted-types/HTMLLinkElement-href.tentative.html", - {} - ] - ], - "trusted-types/HTMLMediaElement-src.tentative.html": [ - [ - "/trusted-types/HTMLMediaElement-src.tentative.html", - {} - ] - ], - "trusted-types/HTMLObjectElement.tentative.html": [ - [ - "/trusted-types/HTMLObjectElement.tentative.html", - {} - ] - ], - "trusted-types/HTMLSourceElement-src.tentative.html": [ - [ - "/trusted-types/HTMLSourceElement-src.tentative.html", + "/trusted-types/HTMLElement-generic.tentative.html", {} ] ], @@ -254447,57 +254585,9 @@ {} ] ], - "trusted-types/block-string-assignment-to-HTMLAnchorElement-href.tentative.html": [ + "trusted-types/block-string-assignment-to-HTMLElement-generic.tentative.html": [ [ - "/trusted-types/block-string-assignment-to-HTMLAnchorElement-href.tentative.html", - {} - ] - ], - "trusted-types/block-string-assignment-to-HTMLAreaElement-href.tentative.html": [ - [ - "/trusted-types/block-string-assignment-to-HTMLAreaElement-href.tentative.html", - {} - ] - ], - "trusted-types/block-string-assignment-to-HTMLBaseElement-href.tentative.html": [ - [ - "/trusted-types/block-string-assignment-to-HTMLBaseElement-href.tentative.html", - {} - ] - ], - "trusted-types/block-string-assignment-to-HTMLIFrameElement-src.tentative.html": [ - [ - "/trusted-types/block-string-assignment-to-HTMLIFrameElement-src.tentative.html", - {} - ] - ], - "trusted-types/block-string-assignment-to-HTMLImageElement-src.tentative.html": [ - [ - "/trusted-types/block-string-assignment-to-HTMLImageElement-src.tentative.html", - {} - ] - ], - "trusted-types/block-string-assignment-to-HTMLLinkElement-href.tentative.html": [ - [ - "/trusted-types/block-string-assignment-to-HTMLLinkElement-href.tentative.html", - {} - ] - ], - "trusted-types/block-string-assignment-to-HTMLMediaElement-src.tentative.html": [ - [ - "/trusted-types/block-string-assignment-to-HTMLMediaElement-src.tentative.html", - {} - ] - ], - "trusted-types/block-string-assignment-to-HTMLObjectElement.tentative.html": [ - [ - "/trusted-types/block-string-assignment-to-HTMLObjectElement.tentative.html", - {} - ] - ], - "trusted-types/block-string-assignment-to-HTMLSourceElement-src.tentative.html": [ - [ - "/trusted-types/block-string-assignment-to-HTMLSourceElement-src.tentative.html", + "/trusted-types/block-string-assignment-to-HTMLElement-generic.tentative.html", {} ] ], @@ -254507,30 +254597,12 @@ {} ] ], - "trusted-types/block-string-assignment-to-embed-src.tentative.html": [ - [ - "/trusted-types/block-string-assignment-to-embed-src.tentative.html", - {} - ] - ], - "trusted-types/block-string-assignment-to-frame-src.tentative.html": [ - [ - "/trusted-types/block-string-assignment-to-frame-src.tentative.html", - {} - ] - ], "trusted-types/block-string-assignment-to-innerHTML.tentative.html": [ [ "/trusted-types/block-string-assignment-to-innerHTML.tentative.html", {} ] ], - "trusted-types/block-string-assignment-to-input-src.tentative.html": [ - [ - "/trusted-types/block-string-assignment-to-input-src.tentative.html", - {} - ] - ], "trusted-types/block-string-assignment-to-insertAdjacentHTML.tentative.html": [ [ "/trusted-types/block-string-assignment-to-insertAdjacentHTML.tentative.html", @@ -254561,18 +254633,6 @@ {} ] ], - "trusted-types/block-string-assignment-to-script-src.tentative.html": [ - [ - "/trusted-types/block-string-assignment-to-script-src.tentative.html", - {} - ] - ], - "trusted-types/block-string-assignment-to-track-src.tentative.html": [ - [ - "/trusted-types/block-string-assignment-to-track-src.tentative.html", - {} - ] - ], "trusted-types/block-string-assignment-to-window-open.tentative.html": [ [ "/trusted-types/block-string-assignment-to-window-open.tentative.html", @@ -254591,30 +254651,12 @@ {} ] ], - "trusted-types/embed-src.tentative.html": [ - [ - "/trusted-types/embed-src.tentative.html", - {} - ] - ], - "trusted-types/frame-src.tentative.html": [ - [ - "/trusted-types/frame-src.tentative.html", - {} - ] - ], "trusted-types/innerHTML.tentative.html": [ [ "/trusted-types/innerHTML.tentative.html", {} ] ], - "trusted-types/input-src.tentative.html": [ - [ - "/trusted-types/input-src.tentative.html", - {} - ] - ], "trusted-types/insertAdjacentHTML.tentative.html": [ [ "/trusted-types/insertAdjacentHTML.tentative.html", @@ -254645,12 +254687,6 @@ {} ] ], - "trusted-types/script-src.tentative.html": [ - [ - "/trusted-types/script-src.tentative.html", - {} - ] - ], "trusted-types/srcDoc-requiresTrustedTypes.tentative.html": [ [ "/trusted-types/srcDoc-requiresTrustedTypes.tentative.html", @@ -254663,12 +254699,6 @@ {} ] ], - "trusted-types/track-src.tentative.html": [ - [ - "/trusted-types/track-src.tentative.html", - {} - ] - ], "trusted-types/window-open.tentative.html": [ [ "/trusted-types/window-open.tentative.html", @@ -254681,20 +254711,18 @@ {} ] ], + "uievents/idlharness.window.js": [ + [ + "/uievents/idlharness.window.html", + {} + ] + ], "uievents/interface/click-event.htm": [ [ "/uievents/interface/click-event.htm", {} ] ], - "uievents/interfaces.html": [ - [ - "/uievents/interfaces.html", - { - "timeout": "long" - } - ] - ], "uievents/legacy-domevents-tests/approved/ProcessingInstruction.DOMCharacterDataModified.html": [ [ "/uievents/legacy-domevents-tests/approved/ProcessingInstruction.DOMCharacterDataModified.html", @@ -255989,9 +256017,13 @@ {} ] ], - "web-locks/acquire.tentative.https.html": [ + "web-locks/acquire.tentative.https.any.js": [ [ - "/web-locks/acquire.tentative.https.html", + "/web-locks/acquire.tentative.https.any.html", + {} + ], + [ + "/web-locks/acquire.tentative.https.any.worker.html", {} ] ], @@ -256007,15 +256039,23 @@ {} ] ], - "web-locks/held.tentative.https.html": [ + "web-locks/held.tentative.https.any.js": [ [ - "/web-locks/held.tentative.https.html", + "/web-locks/held.tentative.https.any.html", + {} + ], + [ + "/web-locks/held.tentative.https.any.worker.html", {} ] ], - "web-locks/ifAvailable.tentative.https.html": [ + "web-locks/ifAvailable.tentative.https.any.js": [ [ - "/web-locks/ifAvailable.tentative.https.html", + "/web-locks/ifAvailable.tentative.https.any.html", + {} + ], + [ + "/web-locks/ifAvailable.tentative.https.any.worker.html", {} ] ], @@ -256035,33 +256075,53 @@ {} ] ], - "web-locks/lock-attributes.tentative.https.html": [ + "web-locks/lock-attributes.tentative.https.any.js": [ [ - "/web-locks/lock-attributes.tentative.https.html", + "/web-locks/lock-attributes.tentative.https.any.html", + {} + ], + [ + "/web-locks/lock-attributes.tentative.https.any.worker.html", {} ] ], - "web-locks/mode-exclusive.tentative.https.html": [ + "web-locks/mode-exclusive.tentative.https.any.js": [ [ - "/web-locks/mode-exclusive.tentative.https.html", + "/web-locks/mode-exclusive.tentative.https.any.html", + {} + ], + [ + "/web-locks/mode-exclusive.tentative.https.any.worker.html", {} ] ], - "web-locks/mode-mixed.tentative.https.html": [ + "web-locks/mode-mixed.tentative.https.any.js": [ [ - "/web-locks/mode-mixed.tentative.https.html", + "/web-locks/mode-mixed.tentative.https.any.html", + {} + ], + [ + "/web-locks/mode-mixed.tentative.https.any.worker.html", {} ] ], - "web-locks/mode-shared.tentative.https.html": [ + "web-locks/mode-shared.tentative.https.any.js": [ [ - "/web-locks/mode-shared.tentative.https.html", + "/web-locks/mode-shared.tentative.https.any.html", + {} + ], + [ + "/web-locks/mode-shared.tentative.https.any.worker.html", {} ] ], - "web-locks/non-secure-context.tentative.html": [ + "web-locks/non-secure-context.tentative.any.js": [ [ - "/web-locks/non-secure-context.tentative.html", + "/web-locks/non-secure-context.tentative.any.html", + {} + ], + [ + "/web-locks/non-secure-context.tentative.any.worker.html", {} ] ], @@ -256071,45 +256131,73 @@ {} ] ], - "web-locks/query-empty.tentative.https.html": [ + "web-locks/query-empty.tentative.https.any.js": [ [ - "/web-locks/query-empty.tentative.https.html", + "/web-locks/query-empty.tentative.https.any.html", + {} + ], + [ + "/web-locks/query-empty.tentative.https.any.worker.html", {} ] ], - "web-locks/query-order.tentative.https.html": [ + "web-locks/query-order.tentative.https.any.js": [ [ - "/web-locks/query-order.tentative.https.html", + "/web-locks/query-order.tentative.https.any.html", + {} + ], + [ + "/web-locks/query-order.tentative.https.any.worker.html", {} ] ], - "web-locks/query.tentative.https.html": [ + "web-locks/query.tentative.https.any.js": [ [ - "/web-locks/query.tentative.https.html", + "/web-locks/query.tentative.https.any.html", + {} + ], + [ + "/web-locks/query.tentative.https.any.worker.html", {} ] ], - "web-locks/resource-names.tentative.https.html": [ + "web-locks/resource-names.tentative.https.any.js": [ [ - "/web-locks/resource-names.tentative.https.html", + "/web-locks/resource-names.tentative.https.any.html", + {} + ], + [ + "/web-locks/resource-names.tentative.https.any.worker.html", {} ] ], - "web-locks/secure-context.tentative.https.html": [ + "web-locks/secure-context.tentative.https.any.js": [ [ - "/web-locks/secure-context.tentative.https.html", + "/web-locks/secure-context.tentative.https.any.html", + {} + ], + [ + "/web-locks/secure-context.tentative.https.any.worker.html", {} ] ], - "web-locks/signal.tentative.https.html": [ + "web-locks/signal.tentative.https.any.js": [ [ - "/web-locks/signal.tentative.https.html", + "/web-locks/signal.tentative.https.any.html", + {} + ], + [ + "/web-locks/signal.tentative.https.any.worker.html", {} ] ], - "web-locks/steal.tentative.https.html": [ + "web-locks/steal.tentative.https.any.js": [ [ - "/web-locks/steal.tentative.https.html", + "/web-locks/steal.tentative.https.any.html", + {} + ], + [ + "/web-locks/steal.tentative.https.any.worker.html", {} ] ], @@ -256889,6 +256977,12 @@ {} ] ], + "webaudio/the-audio-api/the-delaynode-interface/delaynode-channel-count-1.html": [ + [ + "/webaudio/the-audio-api/the-delaynode-interface/delaynode-channel-count-1.html", + {} + ] + ], "webaudio/the-audio-api/the-delaynode-interface/delaynode-max-default-delay.html": [ [ "/webaudio/the-audio-api/the-delaynode-interface/delaynode-max-default-delay.html", @@ -257459,6 +257553,12 @@ {} ] ], + "webmessaging/message-channels/dictionary-transferrable.html": [ + [ + "/webmessaging/message-channels/dictionary-transferrable.html", + {} + ] + ], "webmessaging/message-channels/worker.html": [ [ "/webmessaging/message-channels/worker.html", @@ -262005,6 +262105,12 @@ {} ] ], + "workers/interfaces/DedicatedWorkerGlobalScope/postMessage/second-argument-dictionary.html": [ + [ + "/workers/interfaces/DedicatedWorkerGlobalScope/postMessage/second-argument-dictionary.html", + {} + ] + ], "workers/interfaces/DedicatedWorkerGlobalScope/postMessage/second-argument-null-in-array.html": [ [ "/workers/interfaces/DedicatedWorkerGlobalScope/postMessage/second-argument-null-in-array.html", @@ -272692,6 +272798,14 @@ "a50b997a4c738f68360f4aa450e1ea7f12687770", "testharness" ], + "2dcontext/imagebitmap/canvas-createImageBitmap-resize.html": [ + "86dde0206ecddaf4050c8f188f0c96acb34f3c22", + "testharness" + ], + "2dcontext/imagebitmap/canvas-createImageBitmap-video-resize.html": [ + "034d6966afa626b046bad3ed94b1ed0586786e6e", + "testharness" + ], "2dcontext/imagebitmap/common.sub.js": [ "5da74cfd37ef072aa5b50c9a5fb658754984216b", "support" @@ -274437,7 +274551,7 @@ "support" ], "BackgroundSync/interfaces.https.any.js": [ - "983e811220ed51fe3be8ce5408bf74f3c3ff03a0", + "50c95505ee70bdbeafe14cc7747228463b01f447", "testharness" ], "FileAPI/BlobURL/support/file_test2.txt": [ @@ -274561,11 +274675,11 @@ "testharness" ], "FileAPI/idlharness.html": [ - "440dcecf7e94b58ff6bc0035663d673fa3a1145f", + "440640cfe75a7c2500eea9dee42a66f169c26739", "testharness" ], "FileAPI/idlharness.worker.js": [ - "c3cddfbde633d69e17bc1d37eacb3656ef51a06f", + "c1dd55d4caada5b81f9de0ba90b04710f643090d", "testharness" ], "FileAPI/reading-data-section/Determining-Encoding.html": [ @@ -275961,7 +276075,7 @@ "support" ], "IndexedDB/idlharness.any.js": [ - "dfc95449e452ba68e938247644494eeb9ac926e0", + "ca84d35b20fe6f2e51728e490a1f9c4172c0d4a1", "testharness" ], "IndexedDB/index_sort_order.htm": [ @@ -276665,7 +276779,7 @@ "testharness" ], "WebCryptoAPI/idlharness.https.any.js": [ - "fb401fe4b1aff7b76b77b6297bbca1fd3ffbb9ca", + "5f9070d696ef61106a588b411eeaff0b924d0b90", "testharness" ], "WebCryptoAPI/idlharness.https.worker-expected.txt": [ @@ -277017,11 +277131,11 @@ "support" ], "accelerometer/idlharness.https.window-expected.txt": [ - "ef02e93a64f2444abbe857b56087e2c2d1db8376", + "7a525deb2110eea4bf4ff53d88557b79c8c62d4e", "support" ], "accelerometer/idlharness.https.window.js": [ - "80f5c68be13e93686b4851871cc115bad160b633", + "b6af4af2d03e36e33d8ed3fe8c7f1ef4c3bada3f", "testharness" ], "accname/description_from_content_of_describedby_element-manual-expected.txt": [ @@ -277696,18 +277810,86 @@ "889fd09853f091aba8fea3b45cfeb36437be1c2b", "support" ], + "ambient-light/AmbientLightSensor-disabled-by-feature-policy.https.html": [ + "ba3284e35cb73c4563f802acfc00b629460f10bb", + "testharness" + ], + "ambient-light/AmbientLightSensor-disabled-by-feature-policy.https.html.headers": [ + "60c9a6457eebafad8ac6c139f80ababb6efd1ceb", + "support" + ], + "ambient-light/AmbientLightSensor-enabled-by-feature-policy-attribute-redirect-on-load.https.html": [ + "4fa0514f04f6b401c80891ee36d8e373fea2cdf1", + "testharness" + ], + "ambient-light/AmbientLightSensor-enabled-by-feature-policy-attribute.https.html": [ + "47c837324af05eed00df7238c3232e3fb5fc6797", + "testharness" + ], + "ambient-light/AmbientLightSensor-enabled-by-feature-policy.https.html": [ + "c0bfd2a51dbdd8002cd7d432448dd1a3ac7b9fba", + "testharness" + ], + "ambient-light/AmbientLightSensor-enabled-by-feature-policy.https.html.headers": [ + "00f610fe390dc2bd24b76170cf268a08483fe4aa", + "support" + ], + "ambient-light/AmbientLightSensor-enabled-on-self-origin-by-feature-policy.https.html": [ + "ee5ca4f88396b954bf739e383ad5f81bc55054d2", + "testharness" + ], + "ambient-light/AmbientLightSensor-enabled-on-self-origin-by-feature-policy.https.html.headers": [ + "9c9b554e33d34e1513dd315ecd6299f756d68b43", + "support" + ], + "ambient-light/AmbientLightSensor-iframe-access.https.html": [ + "5896b8ba40dca9f7beeab66a7b355e2aab3d6841", + "testharness" + ], + "ambient-light/AmbientLightSensor.https.html": [ + "b2811054c4835b22f3f2c9d8baa6f95921db67d8", + "testharness" + ], + "ambient-light/AmbientLightSensor_insecure_context.html": [ + "f6d9e5bd6d1ce6705835f15498ddbb5a5b82fb88", + "testharness" + ], + "ambient-light/AmbientLightSensor_onerror-manual.https.html": [ + "d4cd15ad0fd8a45e511cb636fbde8525c8147d6b", + "manual" + ], + "ambient-light/META.yml": [ + "a1f6a1ae10eeaccc4288d31a9a1c1584cfbafb22", + "support" + ], + "ambient-light/OWNERS": [ + "3f4a18cda77fd2fcb47f8892192c691cf201c574", + "support" + ], + "ambient-light/idlharness.https.window.js": [ + "516d3125f444c84ff0fbaa13be90553e31822be8", + "testharness" + ], "animation-worklet/META.yml": [ "b5e944a30de69a506b5151ac3ba86b9fb8c18dae", "support" ], + "animation-worklet/idlharness.any-expected.txt": [ + "e6e74a117c21cc1407dd18dd8b9fa5285c6344eb", + "support" + ], + "animation-worklet/idlharness.any.js": [ + "e422672b66407552d6e6f625db79f374dd73db5b", + "testharness" + ], + "animation-worklet/idlharness.any.worker-expected.txt": [ + "fa148e38c906de2a800e8079ea30d9b98420bb9f", + "support" + ], "animation-worklet/interfaces.any-expected.txt": [ "46c4f2dbc2350f8a8ca40e094cb1021fbad94108", "support" ], - "animation-worklet/interfaces.any.js": [ - "8635512a97334fda263fa76385d68522d0162a07", - "testharness" - ], "animation-worklet/interfaces.any.worker-expected.txt": [ "46c4f2dbc2350f8a8ca40e094cb1021fbad94108", "support" @@ -277737,7 +277919,7 @@ "support" ], "appmanifest/idlharness.window.js": [ - "6eb9bb3e49ba21dd5635631ad3a847ea85614697", + "ceed5020f672b8f6a8473a09e319f708ba1758c8", "testharness" ], "async-local-storage/META.yml": [ @@ -277813,11 +277995,11 @@ "support" ], "background-fetch/idlharness.https.any-expected.txt": [ - "adddfe5d5f620053d14c361792757c618b8469b1", + "4ab883226278a9601f6aac711d73ec9770f80077", "support" ], "background-fetch/idlharness.https.any.js": [ - "5c0eebc307b9cdb534003593248b03004352dacd", + "7a25725b9b627386e0a2d615b6a817b9cc030dca", "testharness" ], "background-fetch/idlharness.https.any.serviceworker-expected.txt": [ @@ -277825,11 +278007,11 @@ "support" ], "background-fetch/idlharness.https.any.sharedworker-expected.txt": [ - "aad3232c9459c4b4eb604e3d852f0fd78346fe3b", + "6768d75b8d2aa9db766ef95c62ce8d063718b6dd", "support" ], "background-fetch/idlharness.https.any.worker-expected.txt": [ - "aad3232c9459c4b4eb604e3d852f0fd78346fe3b", + "6768d75b8d2aa9db766ef95c62ce8d063718b6dd", "support" ], "background-fetch/mixed-content-and-allowed-schemes.https.window.js": [ @@ -277904,12 +278086,8 @@ "39639373d161846186cbcb7eb33466493bcc77ad", "testharness" ], - "battery-status/battery-interface-idlharness.https.window-expected.txt": [ - "2a2009d89f98be6e16fbd0cab3f0f370a32a65e4", - "support" - ], "battery-status/battery-interface-idlharness.https.window.js": [ - "a95b16677ae52391ccd2d92b40eba679664c83bd", + "3fb70ac1d4d2b1cd1d75c48ee363ed1d6d3c1e21", "testharness" ], "battery-status/battery-plugging-in-manual.https.html": [ @@ -278237,11 +278415,11 @@ "testharness" ], "bluetooth/idl/idlharness.tentative.https.window-expected.txt": [ - "afffad3c45dc06ab841cf9a8196737e6eac837f1", + "e6565d9e1bbc498c2437fc20e66c1fafabe59bad", "support" ], "bluetooth/idl/idlharness.tentative.https.window.js": [ - "93988e964522b585a2cd555f803afe1d33ce52a8", + "4630b51e221c58419bd98101312321d29efbe115", "testharness" ], "bluetooth/requestDevice/acceptAllDevices/device-with-empty-name.https.html": [ @@ -279657,7 +279835,7 @@ "testharness" ], "content-security-policy/embedded-enforcement/idlharness.window.js": [ - "a64a6a47127c3a770d9190df2d0a3ad570e32427", + "114c0f95a6bb9f7d84deaa1408eac059372e03b3", "testharness" ], "content-security-policy/embedded-enforcement/iframe-csp-attribute.html": [ @@ -281345,7 +281523,7 @@ "testharness" ], "content-security-policy/securitypolicyviolation/idlharness.window.js": [ - "f2a3d55d5fcaa14ee93d78b7f1bc4bc8ea5a9017", + "86907dadc0495cf7ebb68c4e87881336a32a9683", "testharness" ], "content-security-policy/securitypolicyviolation/img-src-redirect-upgrade-reporting.https.html": [ @@ -281413,7 +281591,7 @@ "support" ], "content-security-policy/securitypolicyviolation/targeting.html": [ - "37de17c9e37399f17662798d46970eafa2e946ec", + "5ce7b754c824840a527fd6dc13d240ecff05c82f", "testharness" ], "content-security-policy/securitypolicyviolation/upgrade-insecure-requests-reporting.https.html": [ @@ -282105,7 +282283,7 @@ "testharness" ], "cookie-store/idlharness.tentative.https.html": [ - "3bb74ba503f22a63f48858609a0603e625bbf330", + "e0de38a080dceb2c28d8a76ee84b86cb9f38fa75", "testharness" ], "cookie-store/idlharness_serviceworker.js": [ @@ -297881,11 +298059,11 @@ "testharness" ], "css/css-animations/idlharness-expected.txt": [ - "7fcc6a92b291c7388e6ed164a7a4448a8be703cb", + "6ec6c7c87a7b43ce1c8dd31475ec9094b825a357", "support" ], "css/css-animations/idlharness.html": [ - "9e516ec9211b17fd4087782326824463acbb1681", + "a1a1205602917215f472eefc9b1e7c87be707853", "testharness" ], "css/css-animations/pending-style-changes-001.html": [ @@ -306925,7 +307103,7 @@ "support" ], "css/css-font-loading/idlharness.https.html": [ - "3284f427d0cecb3337b83a6fbfd60b16e5db0600", + "f35f711ce7f0e81ed86a054050768a6d9ad2b0c4", "testharness" ], "css/css-fonts/META.yml": [ @@ -316801,7 +316979,7 @@ "reftest" ], "css/css-images/idlharness.html": [ - "43a0b8582221d2cd3838fcf6ba93bc7198cbdbf1", + "8654216fdb0cffd380594554e86a77e69b3c98e0", "testharness" ], "css/css-images/image-fit-001.xht": [ @@ -318613,11 +318791,11 @@ "support" ], "css/css-masking/idlharness-expected.txt": [ - "0e3fb1c811cc39cdb3b2c6b7413fb4d22c8a0d35", + "a813ffe5892aa78486184a546fd24095cdf3f5d7", "support" ], "css/css-masking/idlharness.html": [ - "b3db024a7684ed0d84222afaa17a04fd45c85ae3", + "e09c055ac51a8b592fa5e804929c27fe0c3ea0ea", "testharness" ], "css/css-masking/parsing/clip-invalid.html": [ @@ -320153,7 +320331,7 @@ "reftest" ], "css/css-paint-api/idlharness-expected.txt": [ - "81bf55ee7d1acb44bdb700a78227b14bff523a82", + "7cc4b35d62e78d678345369dcebf5623ce1cfaf2", "support" ], "css/css-paint-api/idlharness.html": [ @@ -320421,11 +320599,11 @@ "support" ], "css/css-parser-api/idlharness-expected.txt": [ - "099cd76465301a74bb028f10de29cd3b6c421349", + "5f4bb108265ee1c33fd2a9ac1b730468eab4655f", "support" ], "css/css-parser-api/idlharness.html": [ - "b165496eaa8e36a93f3edfac4eab88acd5bc0cd9", + "fac4278f92a71663fff610826eb4c58d2bf9d3f2", "testharness" ], "css/css-position/META.yml": [ @@ -320821,7 +320999,7 @@ "support" ], "css/css-properties-values-api/typedom.tentative.html": [ - "6448e1fc2feb5df849f4d7c8ec60c8b4540c8c2c", + "af76d90975c2be0fe4ce4db356abb623906662df", "testharness" ], "css/css-properties-values-api/unit-cycles.html": [ @@ -320837,7 +321015,7 @@ "testharness" ], "css/css-properties-values-api/var-reference-registered-properties.html": [ - "4830a313175aac4cdb30b614c9d8c8a6e4714819", + "d3d613846f037f770f555c0bbe5137355249900b", "testharness" ], "css/css-pseudo/META.yml": [ @@ -333617,11 +333795,11 @@ "testharness" ], "css/css-transitions/idlharness-expected.txt": [ - "9b7fc3ffb30b4dad450955503ae539e8ae234a16", + "30a0de47300e4ac6aaaf59885825f8a0d9bfa629", "support" ], "css/css-transitions/idlharness.html": [ - "077687d53400445c6030aa46bfa3d0a6c74759cd", + "57a4d833ae1e0e8f0b00de34ad0f32eb5038d9e9", "testharness" ], "css/css-transitions/properties-value-001-expected.txt": [ @@ -334229,11 +334407,11 @@ "testharness" ], "css/css-typed-om/interfaces-expected.txt": [ - "88189b4c2ee6e7b7ceb01a7bd0960c0b6e67b28a", + "e51e934a50744f1e7e13770413233fa8c43adea2", "support" ], "css/css-typed-om/interfaces.html": [ - "72799d69ff61fe2619530ee3c5577e70d4bffc9e", + "261ce58e83ce3441bd4fefee0fe4187ca4927c71", "testharness" ], "css/css-typed-om/resources/testhelper.js": [ @@ -345313,11 +345491,11 @@ "support" ], "css/cssom-view/interfaces-expected.txt": [ - "d39a2edf1ce543a09ea996e90691125a954a8b07", + "623e89c4b2549ddc714c5a2302c3473eb8d2602f", "support" ], "css/cssom-view/interfaces.html": [ - "32883b8919a074d6c301953f3a6a2a7d5d69976a", + "e76f7139ec274bc0078a1d91fec28952c280cc9a", "testharness" ], "css/cssom-view/matchMedia.xht": [ @@ -345909,11 +346087,11 @@ "testharness" ], "css/cssom/interfaces-expected.txt": [ - "9e7e2c9027e8ece2d166cf3c6c2593e9530845a7", + "fbc192e786f1038e31e73b4b32ffbb5f9161d726", "support" ], "css/cssom/interfaces.html": [ - "033ca163bff6dace55efb791987ee6ba9c9612cd", + "b9cdacf66c6e393d831fd010e6a2d14218ab74ea", "testharness" ], "css/cssom/medialist-dynamic-001-ref.html": [ @@ -354097,7 +354275,7 @@ "testharness" ], "dom/nodes/attributes.html": [ - "a4d3431ba8a583734ec92977e0e392407012e4bc", + "81fb47d08be708d0c95e3057a323d091a12bd1cd", "testharness" ], "dom/nodes/attributes.js": [ @@ -354613,11 +354791,11 @@ "support" ], "domparsing/interfaces.any.js": [ - "83d6ea5fc8556e7ffcd9172dee993047ffc02a57", + "91bbae9f5a2f561c6065ff796678eef43b40eab6", "testharness" ], "domparsing/interfaces.any.worker-expected.txt": [ - "cf87a8e134deb338c910811b1dbd027d06c4a098", + "441c0828d9d186f715af813ec377456ed401f3ff", "support" ], "domparsing/outerhtml-01.html": [ @@ -356388,6 +356566,14 @@ "22f0299c5a8741c6585c3f56b471d6970d0bb499", "support" ], + "encoding/remove-only-one-bom-expected.txt": [ + "af36cac197d4d1b3599ec9d337c420bacbc04408", + "support" + ], + "encoding/remove-only-one-bom.html": [ + "8cc7369ae8786c28a0b194f29f332b09fef776d1", + "testharness" + ], "encoding/replacement-encodings.any.js": [ "06219fcf2f4098266bef3c5730058644b137a942", "testharness" @@ -356424,6 +356610,18 @@ "f94642c1168f0c3d51a97c61c32ccec7627a0cf0", "support" ], + "encoding/resources/two-boms-utf-16be.html": [ + "dea701dea705e3ddd4c0c4e308e09337364eeda2", + "support" + ], + "encoding/resources/two-boms-utf-16le.html": [ + "1e5ee31897ffa8fcecb1d8b35d2fb7a8d9667e7e", + "support" + ], + "encoding/resources/two-boms-utf-8.html": [ + "dbbc083c5b6ccc9adf316af366b9ab8b8fa73b3f", + "support" + ], "encoding/resources/utf-32-big-endian-bom.html": [ "e428533955536e3cf6bbf419aeb2555f96b5ecfa", "support" @@ -358341,23 +358539,23 @@ "testharness" ], "fetch/api/idl.any-expected.txt": [ - "d919dc206dc4e1b9ab1575e549fd6111a1941386", + "9fa7b968578705214c0e9fdefccb6681a4cdcbac", "support" ], "fetch/api/idl.any.js": [ - "f201bec94eeaf5abc083cd3c669def4d917a623a", + "b959486e5ebc9765c265c61a41e2798f3716d505", "testharness" ], "fetch/api/idl.any.sharedworker-expected.txt": [ - "bdb350bc4208aeb03de9b978124eff3ed8e96839", + "7dea593b845f8864c2759adb7ff01810639af712", "support" ], "fetch/api/idl.any.worker-expected.txt": [ - "bdb350bc4208aeb03de9b978124eff3ed8e96839", + "7dea593b845f8864c2759adb7ff01810639af712", "support" ], "fetch/api/idl.https.any.serviceworker-expected.txt": [ - "966c9eaf66fcefd62d8a1f128a8565c8a9d3063e", + "4d976e73de8fe3226e0547f8ecad3cca0b65077b", "support" ], "fetch/api/policies/csp-blocked-worker-expected.txt": [ @@ -359193,23 +359391,23 @@ "testharness" ], "fetch/cors-rfc1918/idlharness.tentative.any-expected.txt": [ - "b2619f3ef9b58d803906c2e1b290b0675e289dde", + "507048b882ff98711d1d9e722480b1f1ee0a00a6", "support" ], "fetch/cors-rfc1918/idlharness.tentative.any.js": [ - "ad0cbb0dc40ce8176ad6c618d7a764134739378a", + "7b722fd51b5cfcd8d127b9f13d035cf3c17ed20a", "testharness" ], "fetch/cors-rfc1918/idlharness.tentative.any.sharedworker-expected.txt": [ - "7dce68d573729f4a1ba584d092dee46cdc781b71", + "cce67f1bc73bf58cd67fa5b183e3be1c3f99fb2a", "support" ], "fetch/cors-rfc1918/idlharness.tentative.any.worker-expected.txt": [ - "7dce68d573729f4a1ba584d092dee46cdc781b71", + "cce67f1bc73bf58cd67fa5b183e3be1c3f99fb2a", "support" ], "fetch/cors-rfc1918/idlharness.tentative.https.any.serviceworker-expected.txt": [ - "7dce68d573729f4a1ba584d092dee46cdc781b71", + "cce67f1bc73bf58cd67fa5b183e3be1c3f99fb2a", "support" ], "fetch/cross-origin-resource-policy/fetch-expected.txt": [ @@ -360369,11 +360567,11 @@ "support" ], "gamepad/idlharness.window-expected.txt": [ - "1cc0eca0ee4303b1b741f5b26bf293c0f79209c4", + "cd52c8a1e1048629ee3b9ccdfe81626ed3a86e80", "support" ], "gamepad/idlharness.window.js": [ - "30bf94fe8e091d9c0245d071c42c19e96936b4a0", + "20d70b5fbbfa2d811bd6048a7d79a81fa2efae70", "testharness" ], "generic-sensor/META.yml": [ @@ -360405,7 +360603,7 @@ "support" ], "generic-sensor/idlharness.https.window.js": [ - "b3d60e51becc6520541f152d92d4cc2db47d7137", + "5775236ded4bef256e6435ba4af8535931b53acb", "testharness" ], "generic-sensor/resources/iframe_sensor_handler.html": [ @@ -360577,11 +360775,11 @@ "support" ], "geolocation-sensor/idlharness.https.window-expected.txt": [ - "d344f8ad552ec4eabec369c8275ec0bac404246a", + "f88d2494d1e8f31221d0bcad3ec676d7f7dca6ec", "support" ], "geolocation-sensor/idlharness.https.window.js": [ - "c29a81848d39576fc68ad145216ab17c27a1f213", + "50695a94192f1299dc94018a2d26b143dc9ee4dd", "testharness" ], "graphics-aam/META.yml": [ @@ -360697,7 +360895,7 @@ "support" ], "gyroscope/idlharness.https.window.js": [ - "5d74b2071370ce6232e7ea541ca984f9b9fbf95d", + "aa99bf111f808affea0e5c719312235c9567a7e5", "testharness" ], "hr-time/META.yml": [ @@ -360829,11 +361027,11 @@ "support" ], "html-media-capture/idlharness.window-expected.txt": [ - "68c9ce8746f55bf8039e3890ac0859162f5d44e7", + "ad0ca3addb06712431227c3ddeec6347508ed206", "support" ], "html-media-capture/idlharness.window.js": [ - "234b98dab1b2840408d4cb328089991e44931855", + "14ad2716804e055a7976bb4954a17d5eda38cabd", "testharness" ], "html-media-capture/support/upload.txt": [ @@ -361568,6 +361766,14 @@ "0c261ffb5a7778ec9c847d9f9c7fec7a540cc68c", "testharness" ], + "html/browsers/browsing-the-web/unloading-documents/beforeunload-synchronous-expected.txt": [ + "50f8dac6e0a527ad5e70b3854233246e2ab71788", + "support" + ], + "html/browsers/browsing-the-web/unloading-documents/beforeunload-synchronous.html": [ + "6c117a3c816a5a239487ebd5370e7807d3f3da75", + "testharness" + ], "html/browsers/browsing-the-web/unloading-documents/contains.json": [ "a7021408900e3678d2f00e015b67133cd128dc08", "support" @@ -363356,6 +363562,10 @@ "a0c935eac75021b6dcef4e170848acbdec5b3e4a", "testharness" ], + "html/browsers/windows/auxiliary-browsing-contexts/opener-setter.html": [ + "7d04147275da2387e9ecf1d33546ee755a6ab3dd", + "testharness" + ], "html/browsers/windows/auxiliary-browsing-contexts/opener-setter.window-expected.txt": [ "2b54454955fac872825718aafe61340a7d10278d", "support" @@ -363388,6 +363598,10 @@ "6b20b15de0e385b31d4de6a9677798387f238821", "support" ], + "html/browsers/windows/auxiliary-browsing-contexts/resources/opener-setter.html": [ + "cd2cffde91d07478c6aa64522b61d8860c0ef2f7", + "support" + ], "html/browsers/windows/browsing-context-expected.txt": [ "42aff02c04c598d156c90b3b033d082f88e4319f", "support" @@ -364285,11 +364499,11 @@ "reftest" ], "html/dom/elements/global-attributes/dir_auto-contained-script-R-ref.html": [ - "b5827264f1d0abe47bf4ec8946c5608f8df7dfc3", + "caae4d15e2a399fb3445bb4f49c56bd58328f0dd", "support" ], "html/dom/elements/global-attributes/dir_auto-contained-script-R.html": [ - "92cb1878cdd76a1c254d8d7de5ddc3afdeb5163f", + "9a4dfef756c39431070c8fe180f21f21164c0c49", "reftest" ], "html/dom/elements/global-attributes/dir_auto-contained-style-L-ref.html": [ @@ -364897,7 +365111,7 @@ "support" ], "html/dom/historical.html": [ - "75fd4e5379337af2ebcb3cd7d62dbf3d726c4036", + "b3b562b8db09a29249f1133fe2fd0d817584f63f", "testharness" ], "html/dom/interactions-with-xpath-and-xslt/.gitkeep": [ @@ -364909,19 +365123,19 @@ "support" ], "html/dom/interfaces.https.html": [ - "395e9a83ecd7d36d2530e0bc2793afa5369a14f0", + "70e9ecdddd69c460d4b4048041edd98784de2804", "testharness" ], "html/dom/interfaces.https_exclude=(Document_Window_HTML._)-expected.txt": [ - "4156970554ad10c2305da9868c41cfb98ebc0fc0", + "5df546ca5e87ee6d5bfb863d7e4eef15727da642", "support" ], "html/dom/interfaces.https_include=(Document_Window)-expected.txt": [ - "4156970554ad10c2305da9868c41cfb98ebc0fc0", + "5df546ca5e87ee6d5bfb863d7e4eef15727da642", "support" ], "html/dom/interfaces.https_include=HTML._-expected.txt": [ - "4156970554ad10c2305da9868c41cfb98ebc0fc0", + "5df546ca5e87ee6d5bfb863d7e4eef15727da642", "support" ], "html/dom/interfaces.worker-expected.txt": [ @@ -375177,7 +375391,7 @@ "testharness" ], "html/semantics/forms/the-select-element/select-selectedOptions.html": [ - "81805a8f0b1f0c6dbf056d370b96472309ffe36d", + "c2f63f4c32dffc68a957154416c682199f9fb51e", "testharness" ], "html/semantics/forms/the-select-element/select-setcustomvalidity.html": [ @@ -379140,6 +379354,10 @@ "b179d2b632cdd28509813fe3786d5e8f175b0735", "testharness" ], + "html/syntax/parsing/meta-inhead-insertion-mode.html": [ + "a477155931b839c3aaddabdff1d90b235da02861", + "testharness" + ], "html/syntax/parsing/named-character-references-data.js": [ "197e260ca6b410465cecbcc9176b655b5fac66f7", "support" @@ -381405,7 +381623,7 @@ "support" ], "interfaces/SVG.idl": [ - "fdf4f8d88fc7718e1fbe025c3a4148fe1112b1b4", + "67fda1801c16d4744a4a2fe6d5d95fef1dfc2247", "support" ], "interfaces/WebCryptoAPI.idl": [ @@ -381425,7 +381643,7 @@ "support" ], "interfaces/animation-worklet.idl": [ - "65d8422a170fa4aa16cf1f7634cd017eeb54572a", + "3d077e1b73ea634c20fd1d3397a5dc92514a62a0", "support" ], "interfaces/appmanifest.idl": [ @@ -381437,7 +381655,7 @@ "support" ], "interfaces/background-fetch.idl": [ - "4f744971f4eb6fc90bfb5fa4cc7514230e5e57dd", + "aeec3754919d789229e5932e040bc199ec6236e4", "support" ], "interfaces/battery-status.idl": [ @@ -381509,7 +381727,7 @@ "support" ], "interfaces/css-paint-api.idl": [ - "9939fb7f08cab0f167e6e0762eac6ad94b2dfd9f", + "4a834cfc56889300bcd5a2a7708fbf8828ee22ca", "support" ], "interfaces/css-properties-values-api.idl": [ @@ -381705,7 +381923,7 @@ "support" ], "interfaces/payment-request.idl": [ - "8e5193372ad6f38d36fc20c454ea7b55e21b6379", + "e9c65685ac8edeedd1dfb06501bb8a05484e92ea", "support" ], "interfaces/performance-timeline.idl": [ @@ -381785,7 +382003,7 @@ "support" ], "interfaces/service-workers.idl": [ - "d219b474e3981be9cdeed598046e8002b4b48ddf", + "2ea246955b43ca1292e70e871e35b8bd48795edc", "support" ], "interfaces/shape-detection-api.idl": [ @@ -381793,7 +382011,7 @@ "support" ], "interfaces/speech-api.idl": [ - "38653faaf267c76378c5210f1ab854da5ada5765", + "b42f2606057fdc71fdc1515884dea405f9efa1a3", "support" ], "interfaces/storage.idl": [ @@ -381873,7 +382091,7 @@ "support" ], "interfaces/webrtc.idl": [ - "134da863b52d01d87a47981a536df9a9e143e32b", + "9e325c8dcd365edc6862437ed09f9c91b132f410", "support" ], "interfaces/webusb.idl": [ @@ -381885,7 +382103,7 @@ "support" ], "interfaces/webxr.idl": [ - "0323723fa749025dd8ff8ed2f9c0da897c486ce7", + "7638dd2441c5c50148dc4f6a445b32e43cac6673", "support" ], "interfaces/worklets.idl": [ @@ -381969,7 +382187,7 @@ "testharness" ], "intersection-observer/observer-exceptions.html": [ - "85d5416475091c1020e0ff92b15f841bf58c606e", + "bc72e3fd00afe7b34fb3edb103561b5fdc703e91", "testharness" ], "intersection-observer/observer-in-iframe.html": [ @@ -382053,7 +382271,7 @@ "support" ], "keyboard-lock/idlharness.https.window.js": [ - "70fb3044f9154dd97ca82c5b3f76a4e383252ff3", + "3c42e50ce7253ee8d4ac207e8f69ba6eba7fd142", "testharness" ], "keyboard-lock/navigator-keyboard-lock-blocked-from-cross-origin-iframe.https.html": [ @@ -382093,7 +382311,7 @@ "support" ], "keyboard-map/idlharness.https.window.js": [ - "30317f694273b15b2b1b6fea2fddc88c806a3303", + "f72c519f0bad69797538c447fcd2e63215e5260a", "testharness" ], "keyboard-map/navigator-keyboard-map-blocked-from-cross-origin-iframe.https.html": [ @@ -382297,11 +382515,11 @@ "support" ], "magnetometer/idlharness.https.window-expected.txt": [ - "9f26f5a91ab5a868b98857d341dd67ebc408692f", + "d701cc5a97a129ffbac49c0a0ca2ab0ce0f90e23", "support" ], "magnetometer/idlharness.https.window.js": [ - "2d163a0c50467e06311dfff5c0c3b60420e6150b", + "99928df61906b13a7ef5f3ce1c557de9c64ffb29", "testharness" ], "media-capabilities/META.yml": [ @@ -382325,15 +382543,15 @@ "support" ], "media-capabilities/idlharness.any-expected.txt": [ - "e041b518c0a7516f541f8d6d1ab773e07f142fe4", + "5a1f636d028515b59e9055e0dbf9233d11482d01", "support" ], "media-capabilities/idlharness.any.js": [ - "dabfb912aaeeb67b539a27b6ea657fd3908090b7", + "84faa70047b1d5ba87f383a5c59991da510a701c", "testharness" ], "media-capabilities/idlharness.any.worker-expected.txt": [ - "ec38b051c9b2c87fda09b643112488d84ebe72a9", + "bf7986ca6317b963552dc0bec4e7a0f268cad19d", "support" ], "media-source/META.yml": [ @@ -382964,6 +383182,10 @@ "1edab53c83e53140002aa2a6349d0226be7f5c74", "support" ], + "media/video.ogv": [ + "e3351694ee85a96aac810ae306767808165ebab0", + "support" + ], "media/white.mp4": [ "577f031289beb30fa38824950ea297818bab8e81", "support" @@ -383013,11 +383235,11 @@ "support" ], "mediacapture-fromelement/idlharness.window-expected.txt": [ - "f98ef3f1d04c7521ff58c7e9f38a67f7fed0b0cf", + "626d1019d4e381bdfc687ca2e007672d92f1bc95", "support" ], "mediacapture-fromelement/idlharness.window.js": [ - "d3057b60199fc784460cdca3fceeee2a55d935e4", + "6dbed23d132bcca02725dfc5fb20debbbf27d17d", "testharness" ], "mediacapture-image/META.yml": [ @@ -383033,7 +383255,7 @@ "support" ], "mediacapture-image/idlharness.window.js": [ - "2a422e686bd462ea9cf1d8718becac291e3da2e9", + "9bfd150de6b9f160b3c392780b959dd1e90b5d77", "testharness" ], "mediacapture-record/BlobEvent-constructor.html": [ @@ -383053,11 +383275,11 @@ "support" ], "mediacapture-record/idlharness.window-expected.txt": [ - "9e6026f817745b2a68b84eed250fe1126a1c7f6a", + "f19d3fab75aa3d6e993a56124ddbd9eb35b0ff63", "support" ], "mediacapture-record/idlharness.window.js": [ - "9555d9c716bd5185e687e516930256f4a37b431f", + "ed0f185ec48123b9a7b31739454ebc79ff0772a0", "testharness" ], "mediacapture-streams/GUM-api.https.html": [ @@ -383261,7 +383483,7 @@ "support" ], "mediasession/idlharness.window.js": [ - "5ab75d11ae3fcb7dc19971865df170cdf4e706ee", + "a2405cf0f9907940bbda3051973d401b9e01059d", "testharness" ], "mediasession/mediametadata.html": [ @@ -384825,7 +385047,7 @@ "support" ], "navigation-timing/idlharness.window.js": [ - "ec4f468da89e8339cfb9c3261bcef577bc2fc094", + "8a59f455437c624739aeb61b9c60b943c57f7518", "testharness" ], "navigation-timing/nav2_data_uri.html": [ @@ -385045,11 +385267,11 @@ "support" ], "netinfo/idlharness.any.js": [ - "0011632bd063fb72229a3a29695883dfa977c23b", + "24698c2cae354e9e13c829ad848fb4bdf2b13cb0", "testharness" ], "netinfo/idlharness.any.worker-expected.txt": [ - "56d76157c18495cceee5b6ec21b5635251e82528", + "a63691bf7115fcf6648566093d7304023a27ff04", "support" ], "netinfo/netinfo-basics.html": [ @@ -391793,7 +392015,7 @@ "support" ], "orientation-sensor/idlharness.https.window.js": [ - "0be5ccc874864dd3f1a0aeb9a79f0ddfe601b30e", + "eb7bf5bd592647b7f9f297c77a8e3669c0f119ab", "testharness" ], "orientation-sensor/orientation-sensor-tests.js": [ @@ -391825,7 +392047,7 @@ "support" ], "page-visibility/idlharness.window.js": [ - "4e83e98043b2ff914f95a33d9eefc3d6e74b6505", + "2fc5a3d98806e645d425891d3ac4c8842dbc3a43", "testharness" ], "page-visibility/iframe-unload.html": [ @@ -391945,7 +392167,7 @@ "testharness" ], "paint-timing/idlharness.window.js": [ - "947b24f0a13bbcfb7a6d6acea919a58a91b644be", + "94003290f18afd5b011fff805384e8f97c0d5706", "testharness" ], "paint-timing/paint-visited.html": [ @@ -392109,7 +392331,7 @@ "manual" ], "payment-method-basic-card/idlharness.window.js": [ - "0219c2651ea2bd20d1c694f4f450646a38b8513f", + "08f6c55f48b54554a52125ca60800184db7cf11c", "testharness" ], "payment-method-basic-card/payment-request-canmakepayment-method.https-expected.txt": [ @@ -392204,6 +392426,18 @@ "08e63c4605bfa4838984aff13a82458ca2a6bdf8", "testharness" ], + "payment-request/PaymentValidationErrors/retry-shows-error-member-manual.https.html": [ + "1120953c71c404bab0f950dbe2611a0f2935b975", + "manual" + ], + "payment-request/PaymentValidationErrors/retry-shows-payer-member-manual.https.html": [ + "cdbe7a2df6fac775c3131be3ae402422e0d101ba", + "manual" + ], + "payment-request/PaymentValidationErrors/retry-shows-shippingAddress-member-manual.https.html": [ + "14a474b7a1a66efbb6f2c1f3f0e47e54435f4f87", + "manual" + ], "payment-request/algorithms-manual.https.html": [ "f5ae0fe70b7dd2ecfb168daec103913742e0e9b7", "manual" @@ -392273,11 +392507,11 @@ "testharness" ], "payment-request/idlharness.https.window-expected.txt": [ - "8a3417e737d57c92751471506b7519d42b4037bf", + "269b4a593fce1201f2d52e6dcf2f925d01acc6ce", "support" ], "payment-request/idlharness.https.window.js": [ - "a1481e724c7881e44db341195c8cf818189cc5ec", + "88c09abe0441a205d0a071cd0f6b845508c4ee83", "testharness" ], "payment-request/interfaces.https-expected.txt": [ @@ -392384,10 +392618,18 @@ "c3a9583204786ce4feb72d7cca831403dc300bab", "manual" ], + "payment-request/payment-response/rejects_if_not_active-manual.https.html": [ + "31675372bfba644a72ad610d8cc8fbdb627f0300", + "manual" + ], "payment-request/payment-response/requestId-attribute-manual.https.html": [ "99c0d6aa4aa6e23abb45bd822cf2b7a012bd66a3", "manual" ], + "payment-request/payment-response/retry-method-manual.https.html": [ + "e07683231e87640d519888c9d17b1fa2124509fc", + "manual" + ], "payment-request/payment-response/shippingAddress-attribute-manual.https.html": [ "d4815ef62de69befb1167e657a1f15ade08f0609", "manual" @@ -392461,19 +392703,19 @@ "testharness" ], "performance-timeline/idlharness.any.js": [ - "8b359740b5da7d6fe3dc832f0ccaf4ca5e0952f5", + "42853bc2f2a4df9454da0df3888533dff5d0c9a5", "testharness" ], "performance-timeline/idlharness.any.sharedworker-expected.txt": [ - "91ef37962eb15780d0c0f17546aad7a5c2a10a4c", + "d2d0bff0293ee687827816c008da4c2c068a0ca5", "support" ], "performance-timeline/idlharness.any.worker-expected.txt": [ - "91ef37962eb15780d0c0f17546aad7a5c2a10a4c", + "d2d0bff0293ee687827816c008da4c2c068a0ca5", "support" ], "performance-timeline/idlharness.https.any.serviceworker-expected.txt": [ - "651ac0d67dd8cbccd63d61d693d13269f4db2806", + "0f82b940bec80b1c6e098724acfe5e73edebb55c", "support" ], "performance-timeline/performanceentry-tojson.any.js": [ @@ -392577,11 +392819,11 @@ "testharness" ], "picture-in-picture/idlharness.window-expected.txt": [ - "520905b18fbbb579068b01766e975ffaa35981c1", + "e62fee5c48d586cec0867c8cecf6cd19e505f928", "support" ], "picture-in-picture/idlharness.window.js": [ - "8861876d089790497afb99496c118ac24f43eadd", + "b7c07976e42054e0a1bc02ec346feb14c61c418c", "testharness" ], "picture-in-picture/leave-picture-in-picture.html": [ @@ -392629,11 +392871,11 @@ "manual" ], "pointerevents/extension/idlharness.window-expected.txt": [ - "d5e971aad0bca6be6dd86cacbd37979dce25e6e5", + "f2db9a147b7d81c5512896912c1b3aea7d352c98", "support" ], "pointerevents/extension/idlharness.window.js": [ - "ec3860925d71afeda168b89025e5ee6085e67d3e", + "91ea0702d003cf969d3e8c3d8909d176d5e39847", "testharness" ], "pointerevents/extension/pointerevent_coalesced_events_attributes-manual-expected.txt": [ @@ -392677,11 +392919,11 @@ "support" ], "pointerevents/idlharness.window-expected.txt": [ - "0eb45ccece1154a5d4ad4706dd3e25414e4c6b58", + "85607fbc90b5ced91bfb9bc55c1df5089281b723", "support" ], "pointerevents/idlharness.window.js": [ - "1e717ff6c68e7c3e7971f1296aa2824510176857", + "8192eac1d5c599226cc2fb83d01ed8b3ce9d1287", "testharness" ], "pointerevents/pointerevent_attributes_hoverable_pointers-manual.html": [ @@ -392985,7 +393227,7 @@ "support" ], "pointerlock/interfaces.window.js": [ - "0838cc19db0518e115adbe07f01b195dc8b5db6f", + "166514e34998e6433ea2fe184f1bdcce72d87fbb", "testharness" ], "pointerlock/mouse_buttons_back_forward-manual.html": [ @@ -401517,7 +401759,7 @@ "testharness" ], "remote-playback/idlharness.window.js": [ - "8405e3838a635565b39a479444ad0e7cc0c82b06", + "1e3c1322052df20e989dca44efb81571be3fdeab", "testharness" ], "remote-playback/watch-availability-initial-callback.html": [ @@ -401605,11 +401847,11 @@ "support" ], "resize-observer/idlharness.window-expected.txt": [ - "d9352039c7a9bd496413262e4195e72316d8aa37", + "867b744990fb1aadaf63656ebbdcd2248fac2c7d", "support" ], "resize-observer/idlharness.window.js": [ - "678952851933ad07531c0bebe6b9dc7be52dcdc3", + "10a514e52524ba5ca023e520263e8773b34b37e4", "testharness" ], "resize-observer/notify.html": [ @@ -401649,7 +401891,7 @@ "testharness" ], "resource-timing/idlharness.any.js": [ - "2065b03393c21199e49553ec99902aaddec74ce0", + "df2921715ffd9514fda9d7d2441acf664f96fc48", "testharness" ], "resource-timing/iframe-setdomain.sub.html": [ @@ -401965,7 +402207,7 @@ "support" ], "screen-orientation/idlharness.window.js": [ - "aa0cc22de907288f4b8a175fb9e8963f4892179f", + "912027af1f21f64d918e68d0a6139d989189b3a9", "testharness" ], "screen-orientation/lock-bad-argument.html": [ @@ -402277,11 +402519,11 @@ "testharness" ], "selection/idlharness.window-expected.txt": [ - "ea6c74fbe15d7295a270c6b92ac63e04c1adf1f3", + "26eaf483917a357583da9c3b819eaa5617f52694", "support" ], "selection/idlharness.window.js": [ - "5daa4e9321ca8fc89130a423d2f212172bfd8214", + "d28cfd124447fa2f1c6f3f44fdac10630192d1b2", "testharness" ], "selection/interfaces-expected.txt": [ @@ -403156,12 +403398,16 @@ "fc315489c4d337f7cf8395beb4005be9c12da9d6", "support" ], + "service-workers/cache-storage/resources/vary.py": [ + "fc8cb899a4a5b9fffd8ce23d5ad7bc7284cfb7d2", + "support" + ], "service-workers/cache-storage/script-tests/cache-abort.js": [ "7c381e34a8e1444ad82645caf05ec8cbfe8360f8", "support" ], "service-workers/cache-storage/script-tests/cache-add.js": [ - "5807ce231254f89d9e5f2fc43955a8dda5bd865d", + "9ae67b6c23f131695734decb39cc02722ffc4f64", "support" ], "service-workers/cache-storage/script-tests/cache-delete.js": [ @@ -403200,10 +403446,6 @@ "2d0c58dc738503b59da3eaa3778796d2c876b58e", "testharness" ], - "service-workers/cache-storage/serviceworker/cache-add.https-expected.txt": [ - "e83b055de3fc0930bbf8f5fc792462501bc9a828", - "support" - ], "service-workers/cache-storage/serviceworker/cache-add.https.html": [ "294e76cb7b067b17fc9a0850bdab1d6e169cc25a", "testharness" @@ -403268,10 +403510,6 @@ "581381044d7d6c58cf43e7a0ac910fb10898b07c", "testharness" ], - "service-workers/cache-storage/window/cache-add.https-expected.txt": [ - "094286d9389706d487ad54ff9824369b40c9d426", - "support" - ], "service-workers/cache-storage/window/cache-add.https.html": [ "d2c83935c4f413fa6f9459843a9ba669deb0e8ce", "testharness" @@ -403332,10 +403570,6 @@ "29052e0306c5000ab6f08872e04749bca5676ff0", "testharness" ], - "service-workers/cache-storage/worker/cache-add.https-expected.txt": [ - "094286d9389706d487ad54ff9824369b40c9d426", - "support" - ], "service-workers/cache-storage/worker/cache-add.https.html": [ "2cbea6be14f2f1852993be40744cac72a7fc62f6", "testharness" @@ -404153,7 +404387,7 @@ "testharness" ], "service-workers/service-worker/postmessage.https.html": [ - "1acc630c23f89611e41cf4a9ed0e17b7a8ca31b9", + "31ec5dd68d440858b694328f827d81e5f78971bc", "testharness" ], "service-workers/service-worker/ready.https-expected.txt": [ @@ -405044,6 +405278,10 @@ "728244e7f0b717aec29c3057bde7a6ba12768587", "support" ], + "service-workers/service-worker/resources/postmessage-dictionary-transferables-worker.js": [ + "b2aa10c59f3d71d52b3af4fe8efd447c24faa93b", + "support" + ], "service-workers/service-worker/resources/postmessage-msgport-to-client-worker.js": [ "11d46afb4cf17c8dcd9b49cda4e07e110a42a36d", "support" @@ -407888,12 +408126,8 @@ "40773896fa85b0ac6545d3064f7e594e4e9b4339", "support" ], - "subresource-integrity/idlharness.window-expected.txt": [ - "b381140811788a04d374a4fc0beea2ac9c222f69", - "support" - ], "subresource-integrity/idlharness.window.js": [ - "b03019b665efa5262ec9b621427cf89417babbe4", + "41e03c6501e9dbe46bfbaa8da7acc437acbe1fd8", "testharness" ], "subresource-integrity/matching-digest.js": [ @@ -408005,11 +408239,11 @@ "testharness" ], "svg/idlharness.window-expected.txt": [ - "e7fe7529d300e97240df72a64a5e660981c36a2b", + "86a37e79faae8e7bac2ba8b1332c5fe1dc1c2c16", "support" ], "svg/idlharness.window.js": [ - "df7ef720b335325da4e1f7be9ab3968002efc2af", + "31f6a2f2eebb7438d8ad95532ddecdad3187504d", "testharness" ], "svg/interfaces-expected.txt": [ @@ -408125,7 +408359,7 @@ "support" ], "svg/painting/reftests/markers-orient-001.svg": [ - "97f819fac348b0124e92b38b14939179fcd07443", + "148ef499eb0562afa9cac9d8e3662a41e9bf752d", "reftest" ], "svg/painting/reftests/paint-context-001-ref.svg": [ @@ -408821,11 +409055,11 @@ "testharness" ], "touch-events/idlharness.window-expected.txt": [ - "f1ac9f0ea334df482ef5bbd5947331fe8833d8d8", + "e390047b8e6e8cb884cabb16ca5599f0078c7309", "support" ], "touch-events/idlharness.window.js": [ - "8a4eee7d4002836a205a1cd0aceb3a8008a1a929", + "e4403d46f2ee8554a18e2691d7ab0f24b735b94a", "testharness" ], "touch-events/multi-touch-interactions.js": [ @@ -408856,40 +409090,8 @@ "95e12b63536c98404993ddf9b6b90e248f56db31", "testharness" ], - "trusted-types/HTMLAnchorElement-href.tentative.html": [ - "934ba8eeb19d9c82239d77dc10d59a5e003d5b3f", - "testharness" - ], - "trusted-types/HTMLAreaElement-href.tentative.html": [ - "1b0ffa9dfc4295fadda7b868bd0cc92e78392923", - "testharness" - ], - "trusted-types/HTMLBaseElement-href.tentative.html": [ - "bdc6593b4490bd0a1b22ef423c7fc95468acd7e5", - "testharness" - ], - "trusted-types/HTMLIFrameElement-src.tentative.html": [ - "155b17369ccd00fb16f44a74ffb5f727ae789143", - "testharness" - ], - "trusted-types/HTMLImageElement-src.tentative.html": [ - "69ff5aae0ee5d8d5776450ec09e39cdcb912c374", - "testharness" - ], - "trusted-types/HTMLLinkElement-href.tentative.html": [ - "f545330d06310062fba66359f0575b5739fbeb79", - "testharness" - ], - "trusted-types/HTMLMediaElement-src.tentative.html": [ - "c24c19db7ed389820a5f6680597e6e7c76683f7b", - "testharness" - ], - "trusted-types/HTMLObjectElement.tentative.html": [ - "e71b7ae180bc3c8b199657848c2c908ba34448c4", - "testharness" - ], - "trusted-types/HTMLSourceElement-src.tentative.html": [ - "872f3b4930d931d56069adfd97afdb4eef5fb978", + "trusted-types/HTMLElement-generic.tentative.html": [ + "7c5148f786c86e2c4002b19eae41c769e6d7ee40", "testharness" ], "trusted-types/META.yml": [ @@ -408920,62 +409122,18 @@ "8da2a72a11ce0e4dbf0722d081d7cea9f3ded637", "testharness" ], - "trusted-types/block-string-assignment-to-HTMLAnchorElement-href.tentative.html": [ - "be3b9f7c6088129389f27046de8e645786c61191", - "testharness" - ], - "trusted-types/block-string-assignment-to-HTMLAreaElement-href.tentative.html": [ - "e5f395c705a0604caa4a57b2fdc5d82f0e5dc96a", - "testharness" - ], - "trusted-types/block-string-assignment-to-HTMLBaseElement-href.tentative.html": [ - "8f09389fb792f0fb24afd34035fa9cf055c05be6", - "testharness" - ], - "trusted-types/block-string-assignment-to-HTMLIFrameElement-src.tentative.html": [ - "a1f0a7d29d75847c2ee0343ded7b58faacb9c844", - "testharness" - ], - "trusted-types/block-string-assignment-to-HTMLImageElement-src.tentative.html": [ - "3f50eeada881f742a15be93140f6d274251290d4", - "testharness" - ], - "trusted-types/block-string-assignment-to-HTMLLinkElement-href.tentative.html": [ - "c702f83e6e4ccd79fcc2795cce611cc5c3ba39a9", - "testharness" - ], - "trusted-types/block-string-assignment-to-HTMLMediaElement-src.tentative.html": [ - "4302f83ec84a7b505985cb2756ce75bf4150d600", - "testharness" - ], - "trusted-types/block-string-assignment-to-HTMLObjectElement.tentative.html": [ - "a6ef276e5e931578b9f898dcf335eecfb87756c9", - "testharness" - ], - "trusted-types/block-string-assignment-to-HTMLSourceElement-src.tentative.html": [ - "c3209381cb9dfafb16b2421b7536b225c3efd0a4", + "trusted-types/block-string-assignment-to-HTMLElement-generic.tentative.html": [ + "2923032d24a5e9b30c1ba9334a638e04a654ed3c", "testharness" ], "trusted-types/block-string-assignment-to-createContextualFragment.tentative.html": [ "9f2da1fdf1bf19b5bd86fb6526412655c3ccbfe6", "testharness" ], - "trusted-types/block-string-assignment-to-embed-src.tentative.html": [ - "67f647d655ac8c6716270ae1929f8fdb8919d8ed", - "testharness" - ], - "trusted-types/block-string-assignment-to-frame-src.tentative.html": [ - "483c47f008a2749968ece225c706ea4e3a6bbd72", - "testharness" - ], "trusted-types/block-string-assignment-to-innerHTML.tentative.html": [ "ddbdee0f12a482599ec5913f78a527127a2aeb16", "testharness" ], - "trusted-types/block-string-assignment-to-input-src.tentative.html": [ - "f22882f4e7db215b95dd9eaa1fc4f6cad5c99211", - "testharness" - ], "trusted-types/block-string-assignment-to-insertAdjacentHTML.tentative.html": [ "3c43309acf17f8f2efe37113c662ef97d07aa0de", "testharness" @@ -408996,14 +409154,6 @@ "e45a6ea12e10693fb9c77e28e76e62a0c733d3da", "testharness" ], - "trusted-types/block-string-assignment-to-script-src.tentative.html": [ - "da38712c6e43d1e6fe5892a5339a45c4bf438c7e", - "testharness" - ], - "trusted-types/block-string-assignment-to-track-src.tentative.html": [ - "7d35a420ffa057e353ba19de79c0fc59b312e32b", - "testharness" - ], "trusted-types/block-string-assignment-to-window-open.tentative.html": [ "210a8b4968f4976dca5316876228debbc3d9ddfa", "testharness" @@ -409016,22 +409166,10 @@ "d4097e6235d0a8ddd28c9cfde4b985fb61e6ace9", "testharness" ], - "trusted-types/embed-src.tentative.html": [ - "0230cba4a277809feaedecd0ac17bb6bd6b99797", - "testharness" - ], - "trusted-types/frame-src.tentative.html": [ - "ffbdebbc102c5cfa442a86457c666725dc6315b6", - "testharness" - ], "trusted-types/innerHTML.tentative.html": [ "6c2492b545f0989ba74772ff8e0f3922f6ba70da", "testharness" ], - "trusted-types/input-src.tentative.html": [ - "a52f848180ff8c9d6e44c24a61cfca2da0bef177", - "testharness" - ], "trusted-types/insertAdjacentHTML.tentative.html": [ "fd95e2fa76d567311b8875bb7481d6345e5423c2", "testharness" @@ -409052,10 +409190,6 @@ "ad67e6c1be0b93e47b26c54544f3989d28588ece", "testharness" ], - "trusted-types/script-src.tentative.html": [ - "bcebab27339a828c230ad518d1d71da3cd4cda98", - "testharness" - ], "trusted-types/srcDoc-requiresTrustedTypes.tentative.html": [ "7a7be9f8ed0bf2990f434a18169533a3a9df13ca", "testharness" @@ -409065,13 +409199,9 @@ "testharness" ], "trusted-types/support/helper.sub.js": [ - "6162bad41b15d0ae0be727b5d960bb538d430fe2", + "d8e87c19f7d4fa2f7d468cea2e8f47c253f7d20c", "support" ], - "trusted-types/track-src.tentative.html": [ - "162d357ab7f87a28e81da9d1e686eee038e268c5", - "testharness" - ], "trusted-types/window-open.tentative.html": [ "bbdc214490d471285f9b086cd0b98eb8a765691a", "testharness" @@ -409112,6 +409242,10 @@ "3da43b15eeba9e2b98835a9437c9fa57b9f65b01", "support" ], + "uievents/idlharness.window.js": [ + "f6d9f20130ca691355b3622227e55b0aaed5e395", + "testharness" + ], "uievents/interface/README.md": [ "6112502ca25230f30d0d87fc00cdb4d3dad64178", "support" @@ -409128,10 +409262,6 @@ "551486b9882d33a0ce31740809eaec0352403d69", "manual" ], - "uievents/interfaces.html": [ - "e755618e522288e9bf6dc4fc592fd6658dc97aba", - "testharness" - ], "uievents/keyboard/README.md": [ "ee83feb002acf1f134fecf618d985103c906472b", "support" @@ -409829,19 +409959,19 @@ "testharness" ], "user-timing/idlharness.any.js": [ - "62a3040dfb0508df0ef9d572a33e750cdd2b0d18", + "86ee1ddd8c743d70da74c6c3cca9e4d276c818bf", "testharness" ], "user-timing/idlharness.any.sharedworker-expected.txt": [ - "7036386533ffd4f201e04ca6145929fa7a63eff6", + "ac4f9cf8d3b1dcfadd645dd8f10c24ae30e859e4", "support" ], "user-timing/idlharness.any.worker-expected.txt": [ - "7036386533ffd4f201e04ca6145929fa7a63eff6", + "ac4f9cf8d3b1dcfadd645dd8f10c24ae30e859e4", "support" ], "user-timing/idlharness.https.any.serviceworker-expected.txt": [ - "7036386533ffd4f201e04ca6145929fa7a63eff6", + "ac4f9cf8d3b1dcfadd645dd8f10c24ae30e859e4", "support" ], "user-timing/invoke_with_timing_attributes.html": [ @@ -410872,8 +411002,8 @@ "b5e4ca22ba49d43ef513595c5f5decee3c70aee5", "support" ], - "web-locks/acquire.tentative.https.html": [ - "55af33f3d812771c1bd781778c61a0e036914c0d", + "web-locks/acquire.tentative.https.any.js": [ + "ebe3ae789b28e5ec5a6ec0b4ea159ebee3960d4a", "testharness" ], "web-locks/clientids.tentative.https-expected.txt": [ @@ -410888,12 +411018,12 @@ "a23a465d114cecaacadf907e83354f480ad3b533", "testharness" ], - "web-locks/held.tentative.https.html": [ - "ed76a0ec6c45b46f356b9a6ac7f8b186e73f74e8", + "web-locks/held.tentative.https.any.js": [ + "9e360e1f700ac68d9e16bd1983b47b13fbc392f4", "testharness" ], - "web-locks/ifAvailable.tentative.https.html": [ - "d61889ff97dbe07d93e5a712df36bb31c15e6777", + "web-locks/ifAvailable.tentative.https.any.js": [ + "1e2d00c7c421c9c5c66b0cd2ce42f186003c00e2", "testharness" ], "web-locks/interfaces-serviceworker.tentative.https.html": [ @@ -410908,44 +411038,44 @@ "679a1182e68d5f72305137415a713d233b02b267", "testharness" ], - "web-locks/lock-attributes.tentative.https.html": [ - "3b7963e5a9af29ac03b5bb8d0aa524702090c569", + "web-locks/lock-attributes.tentative.https.any.js": [ + "11f0bb3f762c1239ce0a1469ce8868052653d898", "testharness" ], - "web-locks/mode-exclusive.tentative.https.html": [ - "e1ec72ba31aa76d0ed8e5e7e441f85ac0d5dd7c6", + "web-locks/mode-exclusive.tentative.https.any.js": [ + "9833885e9c3d5e02b1d8bb7c13d3ce4308f3c1f1", "testharness" ], - "web-locks/mode-mixed.tentative.https.html": [ - "ffe9609ba92a82cb20ef4f457f0f575573386d6f", + "web-locks/mode-mixed.tentative.https.any.js": [ + "0409ac00d002f93f85a82e841d4fc4bdf2955eca", "testharness" ], - "web-locks/mode-shared.tentative.https.html": [ - "40266e7b6ec160163df1d57bf2766846774470c0", + "web-locks/mode-shared.tentative.https.any.js": [ + "2501143114a8b101e349c6d13c37aa9684e9e5c6", "testharness" ], - "web-locks/non-secure-context.tentative.html": [ - "b678e33ad7d81dc7188cd815fecf841d5a838cbe", + "web-locks/non-secure-context.tentative.any.js": [ + "be83687e0bf87972b1276501fe489916f087915d", "testharness" ], "web-locks/opaque-origin.tentative.https.html": [ "637aba11fac0f0adf4c5122ee1700532c7ef98d1", "testharness" ], - "web-locks/query-empty.tentative.https.html": [ - "780a2a734a6cd8e0c899d5d5e530135a92bfdbd6", + "web-locks/query-empty.tentative.https.any.js": [ + "2ff7ee14bf0de33adf83c18cf129eaef77175b56", "testharness" ], - "web-locks/query-order.tentative.https.html": [ - "004687dd9c2c5f52064848792f01d1fdadad0282", + "web-locks/query-order.tentative.https.any.js": [ + "5f9199c3368bc50cc67c4603182ef9e1e974758b", "testharness" ], - "web-locks/query.tentative.https.html": [ - "7388675a00c85fcf7c76b04e5a4be59c0cb0942a", + "web-locks/query.tentative.https.any.js": [ + "b024737a709e98be60c52bd8fc2116a846111cc5", "testharness" ], - "web-locks/resource-names.tentative.https.html": [ - "aebf759b8fa1e361d62a235fa8847eaaa5890b29", + "web-locks/resource-names.tentative.https.any.js": [ + "fa9b5af71a02cb850e49ac223216bacc2d20d53b", "testharness" ], "web-locks/resources/helpers.js": [ @@ -410972,16 +411102,16 @@ "d3e19eb55de0b05301ee962b5729cc192165e00b", "support" ], - "web-locks/secure-context.tentative.https.html": [ - "7adeeb443545b34b412e1607126461769b65d221", + "web-locks/secure-context.tentative.https.any.js": [ + "b518f0a253703c5a3c6c277c7328979aa20881cc", "testharness" ], - "web-locks/signal.tentative.https.html": [ - "41af19815d32f75a33d8b1d3dd07de7c024c3b9a", + "web-locks/signal.tentative.https.any.js": [ + "8f57c7cde06ae7499a2fe7f0dda42a7850975597", "testharness" ], - "web-locks/steal.tentative.https.html": [ - "f9fd42d01d865d23d9e58ebf18bc2a9cd539bd71", + "web-locks/steal.tentative.https.any.js": [ + "c597884bde6d7440d249cef12c3525bdd7b6246b", "testharness" ], "web-locks/workers.tentative.https.html": [ @@ -410997,7 +411127,7 @@ "support" ], "web-nfc/idlharness.https.window.js": [ - "211e264a2a8a1e0d7e9a08e2668507a38fb60107", + "a13ff20cb1e12e4c7522e953a94235ac00fb1ca5", "testharness" ], "web-nfc/nfc_hw_disabled-manual.https.html": [ @@ -411093,7 +411223,7 @@ "support" ], "web-share/idlharness.https.window.js": [ - "cd9160bc9790e6e734a73a1f0656f70f8583e246", + "a794c47805e49781375056a75a4572db275f0e72", "testharness" ], "web-share/resources/manual-helper.js": [ @@ -411197,11 +411327,11 @@ "support" ], "webaudio/idlharness.https.window-expected.txt": [ - "d8d0673c40d379c6cb8aa2a297acd905577fbae7", + "b0128b9fcca606562b8b1c67b577d40870fe8d71", "support" ], "webaudio/idlharness.https.window.js": [ - "cadc212b4ecb16e95581e34886f49f0357c593bc", + "972d6ddb99b9b23aecb9dd38d932385ec8f0afc7", "testharness" ], "webaudio/js/buffer-loader.js": [ @@ -411872,6 +412002,14 @@ "473c5e05ab6ee4930de9e3a3ec47075af7e9650d", "testharness" ], + "webaudio/the-audio-api/the-delaynode-interface/delaynode-channel-count-1-expected.txt": [ + "e5332a1ef7a4425180e7c9653cd68e71c8f172b9", + "support" + ], + "webaudio/the-audio-api/the-delaynode-interface/delaynode-channel-count-1.html": [ + "c3c4b12620899f434228e8fa8a7b65e3b9333829", + "testharness" + ], "webaudio/the-audio-api/the-delaynode-interface/delaynode-max-default-delay.html": [ "c732635549f5eab61f8bdce05b27f0f3e8a3f6c2", "testharness" @@ -412241,11 +412379,11 @@ "support" ], "webauthn/idlharness.https.window-expected.txt": [ - "a74ba946db291c00f819578fb4bb3e969f688f4f", + "2d08fe4aaa82014ebc6e6a65e30e652fca053be5", "support" ], "webauthn/idlharness.https.window.js": [ - "f88605935bf09559cd2324c63a1b410cdfd9ce0e", + "64af6ca8f6798484d9f6d1903871d4272178110e", "testharness" ], "webauthn/interfaces.https-expected.txt": [ @@ -412420,6 +412558,10 @@ "bcfac9e222374a485ed23433513012733551dafe", "testharness" ], + "webmessaging/message-channels/dictionary-transferrable.html": [ + "6cc23ea0c48a1f2cb200c0c37ad3b3f3dfdbdde6", + "testharness" + ], "webmessaging/message-channels/worker.html": [ "25778166691434e77f361a609742a170c4f787e8", "testharness" @@ -412773,11 +412915,11 @@ "support" ], "webrtc-stats/idlharness.window-expected.txt": [ - "8d38b82a73bdb391316426b69940cc598f73824f", + "1ceb2de0ac9b9b4c9c4d6787a272a0393da5e9b1", "support" ], "webrtc-stats/idlharness.window.js": [ - "1a083b694f3cb495d37d4f2cba2d800cc567489b", + "6c9d7333a4541862f875a333c62d8b32d68455b5", "testharness" ], "webrtc/META.yml": [ @@ -413441,7 +413583,7 @@ "support" ], "webrtc/idlharness.https.window-expected.txt": [ - "488e238f27c07937793f97474e41f3cf50e29589", + "9e39cc048f391315487749f2044fd62254435803", "support" ], "webrtc/idlharness.https.window.js": [ @@ -414673,7 +414815,7 @@ "support" ], "webstorage/idlharness.window.js": [ - "4aeab6abb761637eeb0d03e6f95dcc5c8a9e00c1", + "e71b464c111a278909c61bf3f21cad77d509343c", "testharness" ], "webstorage/missing_arguments.html": [ @@ -414841,15 +414983,15 @@ "support" ], "webusb/idlharness.https.any-expected.txt": [ - "b972cd4079bd70c4c810ef66f6351fcb603cdd43", + "c32f9ff6d6abe33c4998546f7f8d38fd9df4d30f", "support" ], "webusb/idlharness.https.any.js": [ - "00e2a9412a84b726ce75b769aff6eb772e9c998c", + "70cc80454e2129909c7135150a273fb140a0c816", "testharness" ], "webusb/idlharness.https.any.worker-expected.txt": [ - "348b39e06066d0e729bac79432855bb215945267", + "35163703149c4a6a71aaef32444dbde74e063b61", "support" ], "webusb/insecure-context.any.js": [ @@ -417889,11 +418031,11 @@ "support" ], "webxr/idlharness.https.window-expected.txt": [ - "b646c9ca97e7a2d4eb356dc5524e8a0eb2dfcf9c", + "6751073dc1d5f832445f37291ee9374780acacdb", "support" ], "webxr/idlharness.https.window.js": [ - "9444f29b752c878ad16517b866ed78419d0816d6", + "f86e1b929d4abcd5d40313aff482b1185db5168f", "testharness" ], "webxr/interfaces.https-expected.txt": [ @@ -418456,12 +418598,16 @@ "be090367fdcb3b80c519d316ba5ae67be98874e7", "testharness" ], + "workers/interfaces/DedicatedWorkerGlobalScope/postMessage/second-argument-dictionary.html": [ + "7342b4833f48159b1406c2cc0ffbd81a0e47029a", + "testharness" + ], "workers/interfaces/DedicatedWorkerGlobalScope/postMessage/second-argument-null-in-array.html": [ "340ae0b9250a68f363df2229ded12fd80e8a2fd6", "testharness" ], "workers/interfaces/DedicatedWorkerGlobalScope/postMessage/second-argument-null.html": [ - "4d942b3c4f8dfe9ff793b8e206dadce2585ba93e", + "b2e684308f501175a9a8d688810737e1aac9f1ac", "testharness" ], "workers/interfaces/DedicatedWorkerGlobalScope/postMessage/second-argument-undefined.html": [ @@ -420241,11 +420387,11 @@ "testharness" ], "xhr/overridemimetype-edge-cases.window-expected.txt": [ - "ebe76fd8a75569d356a92230037e7b021d53601d", + "8b356c3f4d063f7154efe05139c6c3504db6cecb", "support" ], "xhr/overridemimetype-edge-cases.window.js": [ - "a76e1c81a86823765be280747d2fa6994395cc25", + "1cae44236d4f35b591936beeaccba97111ffb62b", "testharness" ], "xhr/overridemimetype-headers-received-state-force-shiftjis.htm": [
diff --git a/third_party/WebKit/LayoutTests/external/wpt/2dcontext/imagebitmap/canvas-createImageBitmap-resize.html b/third_party/WebKit/LayoutTests/external/wpt/2dcontext/imagebitmap/canvas-createImageBitmap-resize.html new file mode 100644 index 0000000..ea30328 --- /dev/null +++ b/third_party/WebKit/LayoutTests/external/wpt/2dcontext/imagebitmap/canvas-createImageBitmap-resize.html
@@ -0,0 +1,159 @@ +<!DOCTYPE HTML> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script> +function checkNoCrop(imageBitmap) +{ + var canvas = document.createElement("canvas"); + canvas.width = 50; + canvas.height = 50; + var ctx = canvas.getContext("2d"); + ctx.clearRect(0, 0, canvas.width, canvas.height); + ctx.drawImage(imageBitmap, 0, 0); + var d = ctx.getImageData(0, 0, 1, 1).data; + assert_array_equals(d, [255, 0, 0, 255], "This pixel should be red."); + d = ctx.getImageData(39, 0, 1, 1).data; + assert_array_equals(d, [0, 255, 0, 255], "This pixel should be green."); + d = ctx.getImageData(0, 39, 1, 1).data; + assert_array_equals(d, [0, 0, 255, 255], "This pixel should be blue."); + d = ctx.getImageData(39, 39, 1, 1).data; + assert_array_equals(d, [0, 0, 0, 255], "This pixel should be black."); + d = ctx.getImageData(41, 41, 1, 1).data; + assert_array_equals(d, [0, 0, 0, 0], "This pixel should be transparent black."); +} + +function checkCrop(imageBitmap) +{ + var canvas = document.createElement("canvas"); + canvas.width = 50; + canvas.height = 50; + var ctx = canvas.getContext("2d"); + ctx.clearRect(0, 0, canvas.width, canvas.height); + ctx.drawImage(imageBitmap, 0, 0); + var d = ctx.getImageData(0, 0, 1, 1).data; + assert_array_equals(d, [255, 0, 0, 255], "This pixel should be red."); + d = ctx.getImageData(19, 0, 1, 1).data; + assert_array_equals(d, [0, 255, 0, 255], "This pixel should be green."); + d = ctx.getImageData(0, 19, 1, 1).data; + assert_array_equals(d, [0, 0, 255, 255], "This pixel should be blue."); + d = ctx.getImageData(19, 19, 1, 1).data; + assert_array_equals(d, [0, 0, 0, 255], "This pixel should be black."); + d = ctx.getImageData(21, 21, 1, 1).data; + assert_array_equals(d, [0, 0, 0, 0], "This pixel should be transparent black."); +} + +function compareBitmaps(bitmap1, bitmap2) +{ + var canvas1 = document.createElement("canvas"); + var canvas2 = document.createElement("canvas"); + canvas1.width = 50; + canvas1.height = 50; + canvas2.width = 50; + canvas2.height = 50; + var ctx1 = canvas1.getContext("2d"); + var ctx2 = canvas2.getContext("2d"); + ctx1.clearRect(0, 0, canvas1.width, canvas1.height); + ctx2.clearRect(0, 0, canvas2.width, canvas2.height); + ctx1.drawImage(bitmap1, 0, 0); + ctx2.drawImage(bitmap2, 0, 0); + var data1 = ctx1.getImageData(0, 0, 50, 50).data; + var data2 = ctx2.getImageData(0, 0, 50, 50).data; + var dataMatched = true; + for (var i = 0; i < data1.length; i++) { + if (data1[i] != data2[i]) { + dataMatched = false; + break; + } + } + assert_false(dataMatched); +} + +function testImageBitmap(source) +{ + return Promise.all([ + createImageBitmap(source, {resizeWidth: 40, resizeHeight: 40, resizeQuality: "high"}), + createImageBitmap(source, {resizeWidth: 40, resizeHeight: 40, resizeQuality: "medium"}), + createImageBitmap(source, {resizeWidth: 40, resizeHeight: 40, resizeQuality: "low"}), + createImageBitmap(source, {resizeWidth: 40, resizeHeight: 40, resizeQuality: "pixelated"}), + createImageBitmap(source, 5, 5, 10, 10, {resizeWidth: 20, resizeHeight: 20, resizeQuality: "high"}), + createImageBitmap(source, 5, 5, 10, 10, {resizeWidth: 20, resizeHeight: 20, resizeQuality: "medium"}), + createImageBitmap(source, 5, 5, 10, 10, {resizeWidth: 20, resizeHeight: 20, resizeQuality: "low"}), + createImageBitmap(source, 5, 5, 10, 10, {resizeWidth: 20, resizeHeight: 20, resizeQuality: "pixelated"}), + ]).then(([noCropHigh, noCropMedium, noCropLow, noCropPixelated, cropHigh, cropMedium, cropLow, cropPixelated]) => { + checkNoCrop(noCropHigh); + checkNoCrop(noCropMedium); + checkNoCrop(noCropLow); + checkNoCrop(noCropPixelated); + checkCrop(cropHigh); + checkCrop(cropMedium); + checkCrop(cropLow); + checkCrop(cropPixelated); + // Brute-force comparison among all bitmaps is too expensive + compareBitmaps(noCropHigh, noCropMedium); + compareBitmaps(noCropLow, noCropPixelated); + compareBitmaps(cropHigh, cropMedium); + compareBitmaps(cropLow, cropPixelated); + }); +} + +function initializeTestCanvas() +{ + var testCanvas = document.createElement("canvas"); + testCanvas.width = 20; + testCanvas.height = 20; + var testCtx = testCanvas.getContext("2d"); + testCtx.fillStyle = "rgb(255, 0, 0)"; + testCtx.fillRect(0, 0, 10, 10); + testCtx.fillStyle = "rgb(0, 255, 0)"; + testCtx.fillRect(10, 0, 10, 10); + testCtx.fillStyle = "rgb(0, 0, 255)"; + testCtx.fillRect(0, 10, 10, 10); + testCtx.fillStyle = "rgb(0, 0, 0)"; + testCtx.fillRect(10, 10, 10, 10); + return testCanvas; +} + +// Blob +promise_test(function() { + return new Promise((resolve, reject) => { + var xhr = new XMLHttpRequest(); + xhr.open("GET", '/images/pattern.png'); + xhr.responseType = 'blob'; + xhr.send(); + xhr.onload = function() { + resolve(xhr.response); + }; + }).then(testImageBitmap); +}, 'createImageBitmap from a Blob with resize option.'); + +// HTMLCanvasElement +promise_test(function() { + var testCanvas = initializeTestCanvas(); + return testImageBitmap(testCanvas); +}, 'createImageBitmap from a HTMLCanvasElement with resize option.'); + +// HTMLImageElement +promise_test(function() { + return new Promise((resolve, reject) => { + var image = new Image(); + image.onload = function() { + resolve(image); + } + image.src = '/images/pattern.png' + }).then(testImageBitmap); +}, 'createImageBitmap from a HTMLImageElement with resize option.'); + +// ImageBitmap +promise_test(function() { + var testCanvas = initializeTestCanvas(); + return createImageBitmap(testCanvas).then(testImageBitmap); +}, 'createImageBitmap from an ImageBitmap with resize option.'); + +// ImageData +promise_test(function() { + var canvas = initializeTestCanvas(); + var ctx = canvas.getContext("2d"); + var data = ctx.getImageData(0, 0, 20, 20); + return testImageBitmap(data); +}, 'createImageBitmap from an ImageData with resize option.'); +</script>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/2dcontext/imagebitmap/canvas-createImageBitmap-video-resize.html b/third_party/WebKit/LayoutTests/external/wpt/2dcontext/imagebitmap/canvas-createImageBitmap-video-resize.html new file mode 100644 index 0000000..366d1fd --- /dev/null +++ b/third_party/WebKit/LayoutTests/external/wpt/2dcontext/imagebitmap/canvas-createImageBitmap-video-resize.html
@@ -0,0 +1,58 @@ +<!DOCTYPE HTML> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script> +function createNewCanvas(width, height) +{ + var canvas = document.createElement("canvas"); + canvas.width = width; + canvas.height = height; + var ctx = canvas.getContext("2d"); + ctx.clearRect(0, 0, width, height); + return ctx; +} + +function checkLowResult(imageBitmap, bw, bh, video, sx, sy, sw, sh) +{ + var ctx1 = createNewCanvas(bw, bh); + var ctx2 = createNewCanvas(bw, bh); + ctx1.drawImage(imageBitmap, 0, 0); + ctx2.drawImage(video, sx, sy, sw, sh, 0, 0, bw, bh); + var data1 = ctx1.getImageData(0, 0, bw, bh).data; + var data2 = ctx2.getImageData(0, 0, bw, bh).data; + var dataMatched = true; + for (var i = 0; i < data1.length; i++) { + // data1[i] is strictly the same as data2[i] on software rendering. + // But on GPU, the difference could be quite significant. + if (Math.abs(data1[i] - data2[i]) > 18) { + dataMatched = false; + break; + } + } + assert_true(dataMatched); +} + +function generateTest() +{ + bitmapWidth = video.videoWidth/2; + bitmapHeight = video.videoHeight/2; + return Promise.all([ + createImageBitmap(video, {resizeWidth: bitmapWidth, resizeHeight: bitmapHeight, resizeQuality: "low"}), + createImageBitmap(video, 10, 10, bitmapWidth, bitmapHeight, {resizeWidth: bitmapWidth, resizeHeight: bitmapHeight, resizeQuality: "low"}), + ]).then(t.step_func_done(([noCropLow, cropLow]) => { + checkLowResult(noCropLow, bitmapWidth, bitmapHeight, video, 0, 0, video.videoWidth, video.videoHeight); + checkLowResult(cropLow, bitmapWidth, bitmapHeight, video, 10, 10, bitmapWidth, bitmapHeight); + }), t.step_func_done(function() { + assert_true(false, 'Promise rejected'); + })); +} + +var t = async_test('createImageBitmap(HTMLVideoElement) with resize option'); + +// HTMLVideoElement +var video = document.createElement("video"); +video.oncanplaythrough = t.step_func(function() { + return generateTest(); +}); +video.src = "/media/video.ogv"; +</script>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/BackgroundSync/interfaces.https.any.js b/third_party/WebKit/LayoutTests/external/wpt/BackgroundSync/interfaces.https.any.js index 325bef8e..989139e9 100644 --- a/third_party/WebKit/LayoutTests/external/wpt/BackgroundSync/interfaces.https.any.js +++ b/third_party/WebKit/LayoutTests/external/wpt/BackgroundSync/interfaces.https.any.js
@@ -10,6 +10,5 @@ ['service-workers', 'html', 'dom'], idlArray => { // TODO: Objects - }, - 'Background Sync interfaces.' + } );
diff --git a/third_party/WebKit/LayoutTests/external/wpt/FileAPI/idlharness.html b/third_party/WebKit/LayoutTests/external/wpt/FileAPI/idlharness.html index eb55b655..db6592e 100644 --- a/third_party/WebKit/LayoutTests/external/wpt/FileAPI/idlharness.html +++ b/third_party/WebKit/LayoutTests/external/wpt/FileAPI/idlharness.html
@@ -35,8 +35,7 @@ FileList: ['document.querySelector("#fileChooser").files'], FileReader: ['new FileReader()'] }); - }, - 'Test FileAPI IDL implementation' + } ); </script>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/FileAPI/idlharness.worker.js b/third_party/WebKit/LayoutTests/external/wpt/FileAPI/idlharness.worker.js index e65ee01f..5bf82e0b 100644 --- a/third_party/WebKit/LayoutTests/external/wpt/FileAPI/idlharness.worker.js +++ b/third_party/WebKit/LayoutTests/external/wpt/FileAPI/idlharness.worker.js
@@ -16,7 +16,6 @@ FileReader: ['new FileReader()'], FileReaderSync: ['new FileReaderSync()'] }); - }, - 'Test FileAPI IDL implementation' + } ); done();
diff --git a/third_party/WebKit/LayoutTests/external/wpt/IndexedDB/idlharness.any.js b/third_party/WebKit/LayoutTests/external/wpt/IndexedDB/idlharness.any.js index bf83066e..efb84661 100644 --- a/third_party/WebKit/LayoutTests/external/wpt/IndexedDB/idlharness.any.js +++ b/third_party/WebKit/LayoutTests/external/wpt/IndexedDB/idlharness.any.js
@@ -20,6 +20,5 @@ IDBVersionChangeEvent: ['new IDBVersionChangeEvent("type")'], DOMStringList: [], }); - }, - 'IndexedDB interfaces' + } );
diff --git a/third_party/WebKit/LayoutTests/external/wpt/WebCryptoAPI/idlharness.https.any.js b/third_party/WebKit/LayoutTests/external/wpt/WebCryptoAPI/idlharness.https.any.js index f5095cb..b0ccebd 100644 --- a/third_party/WebKit/LayoutTests/external/wpt/WebCryptoAPI/idlharness.https.any.js +++ b/third_party/WebKit/LayoutTests/external/wpt/WebCryptoAPI/idlharness.https.any.js
@@ -11,6 +11,5 @@ Crypto: ['crypto'], SubtleCrypto: ['crypto.subtle'] }); - }, - 'WebCryptoAPI interfaces' + } );
diff --git a/third_party/WebKit/LayoutTests/external/wpt/accelerometer/idlharness.https.window-expected.txt b/third_party/WebKit/LayoutTests/external/wpt/accelerometer/idlharness.https.window-expected.txt index 2d0af3b..7750688 100644 --- a/third_party/WebKit/LayoutTests/external/wpt/accelerometer/idlharness.https.window-expected.txt +++ b/third_party/WebKit/LayoutTests/external/wpt/accelerometer/idlharness.https.window-expected.txt
@@ -1,5 +1,5 @@ This is a testharness.js-based test. -PASS Test IDL implementation of Accelerometer Sensor +PASS idl_test setup PASS Accelerometer interface: existence and properties of interface object PASS Accelerometer interface object length PASS Accelerometer interface object name
diff --git a/third_party/WebKit/LayoutTests/external/wpt/accelerometer/idlharness.https.window.js b/third_party/WebKit/LayoutTests/external/wpt/accelerometer/idlharness.https.window.js index f6cbcd96..1e041e9 100644 --- a/third_party/WebKit/LayoutTests/external/wpt/accelerometer/idlharness.https.window.js +++ b/third_party/WebKit/LayoutTests/external/wpt/accelerometer/idlharness.https.window.js
@@ -14,6 +14,5 @@ LinearAccelerationSensor: ['new LinearAccelerationSensor();'], GravitySensor: ['new GravitySensor();'] }); - }, - 'Test IDL implementation of Accelerometer Sensor' + } );
diff --git a/third_party/WebKit/LayoutTests/external/wpt/ambient-light/AmbientLightSensor-disabled-by-feature-policy.https.html b/third_party/WebKit/LayoutTests/external/wpt/ambient-light/AmbientLightSensor-disabled-by-feature-policy.https.html new file mode 100644 index 0000000..fb20d70d --- /dev/null +++ b/third_party/WebKit/LayoutTests/external/wpt/ambient-light/AmbientLightSensor-disabled-by-feature-policy.https.html
@@ -0,0 +1,13 @@ +<!DOCTYPE html> +<body> +<title>AmbientLightSensor Feature Policy Test: Disabled</title> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="/feature-policy/resources/featurepolicy.js"></script> +<script src="/generic-sensor/generic-sensor-feature-policy-test.sub.js"></script> +<script> +"use strict"; + +run_fp_tests_disabled('AmbientLightSensor'); +</script> +</body>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/ambient-light/AmbientLightSensor-disabled-by-feature-policy.https.html.headers b/third_party/WebKit/LayoutTests/external/wpt/ambient-light/AmbientLightSensor-disabled-by-feature-policy.https.html.headers new file mode 100644 index 0000000..b8073a87 --- /dev/null +++ b/third_party/WebKit/LayoutTests/external/wpt/ambient-light/AmbientLightSensor-disabled-by-feature-policy.https.html.headers
@@ -0,0 +1 @@ +Feature-Policy: ambient-light-sensor 'none'
diff --git a/third_party/WebKit/LayoutTests/external/wpt/ambient-light/AmbientLightSensor-enabled-by-feature-policy-attribute-redirect-on-load.https.html b/third_party/WebKit/LayoutTests/external/wpt/ambient-light/AmbientLightSensor-enabled-by-feature-policy-attribute-redirect-on-load.https.html new file mode 100644 index 0000000..1d28792c --- /dev/null +++ b/third_party/WebKit/LayoutTests/external/wpt/ambient-light/AmbientLightSensor-enabled-by-feature-policy-attribute-redirect-on-load.https.html
@@ -0,0 +1,13 @@ +<!DOCTYPE html> +<body> +<title>AmbientLightSensor Feature Policy Test: Enabled by attribute redirect on load</title> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="/feature-policy/resources/featurepolicy.js"></script> +<script src="/generic-sensor/generic-sensor-feature-policy-test.sub.js"></script> +<script> +"use strict"; + +run_fp_tests_enabled_by_attribute_redirect_on_load('AmbientLightSensor'); +</script> +</body>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/ambient-light/AmbientLightSensor-enabled-by-feature-policy-attribute.https.html b/third_party/WebKit/LayoutTests/external/wpt/ambient-light/AmbientLightSensor-enabled-by-feature-policy-attribute.https.html new file mode 100644 index 0000000..4b58a262 --- /dev/null +++ b/third_party/WebKit/LayoutTests/external/wpt/ambient-light/AmbientLightSensor-enabled-by-feature-policy-attribute.https.html
@@ -0,0 +1,13 @@ +<!DOCTYPE html> +<body> +<title>AmbientLightSensor Feature Policy Test: Enabled by attribute</title> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="/feature-policy/resources/featurepolicy.js"></script> +<script src="/generic-sensor/generic-sensor-feature-policy-test.sub.js"></script> +<script> +"use strict"; + +run_fp_tests_enabled_by_attribute('AmbientLightSensor'); +</script> +</body>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/ambient-light/AmbientLightSensor-enabled-by-feature-policy.https.html b/third_party/WebKit/LayoutTests/external/wpt/ambient-light/AmbientLightSensor-enabled-by-feature-policy.https.html new file mode 100644 index 0000000..a1651b8 --- /dev/null +++ b/third_party/WebKit/LayoutTests/external/wpt/ambient-light/AmbientLightSensor-enabled-by-feature-policy.https.html
@@ -0,0 +1,13 @@ +<!DOCTYPE html> +<body> +<title>AmbientLightSensor Feature Policy Test: Enabled</title> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="/feature-policy/resources/featurepolicy.js"></script> +<script src="/generic-sensor/generic-sensor-feature-policy-test.sub.js"></script> +<script> +"use strict"; + +run_fp_tests_enabled('AmbientLightSensor'); +</script> +</body>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/ambient-light/AmbientLightSensor-enabled-by-feature-policy.https.html.headers b/third_party/WebKit/LayoutTests/external/wpt/ambient-light/AmbientLightSensor-enabled-by-feature-policy.https.html.headers new file mode 100644 index 0000000..f037f3f --- /dev/null +++ b/third_party/WebKit/LayoutTests/external/wpt/ambient-light/AmbientLightSensor-enabled-by-feature-policy.https.html.headers
@@ -0,0 +1 @@ +Feature-Policy: ambient-light-sensor *
diff --git a/third_party/WebKit/LayoutTests/external/wpt/ambient-light/AmbientLightSensor-enabled-on-self-origin-by-feature-policy.https.html b/third_party/WebKit/LayoutTests/external/wpt/ambient-light/AmbientLightSensor-enabled-on-self-origin-by-feature-policy.https.html new file mode 100644 index 0000000..ab9848cb --- /dev/null +++ b/third_party/WebKit/LayoutTests/external/wpt/ambient-light/AmbientLightSensor-enabled-on-self-origin-by-feature-policy.https.html
@@ -0,0 +1,13 @@ +<!DOCTYPE html> +<body> +<title>AmbientLightSensor Feature Policy Test: Enabled on self origin</title> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="/feature-policy/resources/featurepolicy.js"></script> +<script src="/generic-sensor/generic-sensor-feature-policy-test.sub.js"></script> +<script> +"use strict"; + +run_fp_tests_enabled_on_self_origin('AmbientLightSensor'); +</script> +</body>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/ambient-light/AmbientLightSensor-enabled-on-self-origin-by-feature-policy.https.html.headers b/third_party/WebKit/LayoutTests/external/wpt/ambient-light/AmbientLightSensor-enabled-on-self-origin-by-feature-policy.https.html.headers new file mode 100644 index 0000000..1d22667 --- /dev/null +++ b/third_party/WebKit/LayoutTests/external/wpt/ambient-light/AmbientLightSensor-enabled-on-self-origin-by-feature-policy.https.html.headers
@@ -0,0 +1 @@ +Feature-Policy: ambient-light-sensor 'self'
diff --git a/third_party/WebKit/LayoutTests/external/wpt/ambient-light/AmbientLightSensor-iframe-access.https.html b/third_party/WebKit/LayoutTests/external/wpt/ambient-light/AmbientLightSensor-iframe-access.https.html new file mode 100644 index 0000000..9600843 --- /dev/null +++ b/third_party/WebKit/LayoutTests/external/wpt/ambient-light/AmbientLightSensor-iframe-access.https.html
@@ -0,0 +1,14 @@ +<!DOCTYPE html> +<meta charset="utf-8"> +<title>AmbientLightSensor iframe test</title> +<link rel="author" title="Intel" href="http://www.intel.com"> +<link rel="help" href="https://w3c.github.io/ambient-light/"> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="/generic-sensor/generic-sensor-tests.js"></script> +<script src="/generic-sensor/generic-sensor-iframe-tests.sub.js"></script> +<script src="/generic-sensor/generic-sensor-feature-policy-test.sub.js"></script> +<div id="log"></div> +<script> +run_generic_sensor_iframe_tests('AmbientLightSensor'); +</script>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/ambient-light/AmbientLightSensor.https.html b/third_party/WebKit/LayoutTests/external/wpt/ambient-light/AmbientLightSensor.https.html new file mode 100644 index 0000000..8fcc4c7c --- /dev/null +++ b/third_party/WebKit/LayoutTests/external/wpt/ambient-light/AmbientLightSensor.https.html
@@ -0,0 +1,14 @@ +<!DOCTYPE html> +<meta charset="utf-8"> +<title>AmbientLightSensor Test</title> +<link rel="author" title="Intel" href="http://www.intel.com"> +<link rel="help" href="https://www.w3.org/TR/ambient-light/"> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="/generic-sensor/generic-sensor-tests.js"></script> +<div id="log"></div> +<script> + +runGenericSensorTests('AmbientLightSensor'); + +</script>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/ambient-light/AmbientLightSensor_insecure_context.html b/third_party/WebKit/LayoutTests/external/wpt/ambient-light/AmbientLightSensor_insecure_context.html new file mode 100644 index 0000000..9a7c9149 --- /dev/null +++ b/third_party/WebKit/LayoutTests/external/wpt/ambient-light/AmbientLightSensor_insecure_context.html
@@ -0,0 +1,20 @@ +<!DOCTYPE html> +<meta charset="utf-8"> +<title>AmbientLightSensor Test: insecure context</title> +<link rel="author" title="Intel" href="http://www.intel.com"> +<link rel="help" href="https://www.w3.org/TR/ambient-light/"> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="/generic-sensor/generic-sensor-tests.js"></script> +<div id="log"></div> +<h2>Precondition</h2> +<ol> + <li> + Run test in an insecure context, e.g. http://example.com/. + </li> +</ol> +<script> + +runGenericSensorInsecureContext("AmbientLightSensor"); + +</script>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/ambient-light/AmbientLightSensor_onerror-manual.https.html b/third_party/WebKit/LayoutTests/external/wpt/ambient-light/AmbientLightSensor_onerror-manual.https.html new file mode 100644 index 0000000..139e76f --- /dev/null +++ b/third_party/WebKit/LayoutTests/external/wpt/ambient-light/AmbientLightSensor_onerror-manual.https.html
@@ -0,0 +1,20 @@ +<!DOCTYPE html> +<meta charset="utf-8"> +<title>AmbientLightSensor Test: onerror</title> +<link rel="author" title="Intel" href="http://www.intel.com"> +<link rel="help" href="https://www.w3.org/TR/ambient-light/"> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="/generic-sensor/generic-sensor-tests.js"></script> +<div id="log"></div> +<h2>Precondition</h2> +<ol> + <li> + Disable the Ambient Light Sensor or run test on a device without Amibent Light Sensor. + </li> +</ol> +<script> + +runGenericSensorOnerror('AmbientLightSensor'); + +</script>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/ambient-light/META.yml b/third_party/WebKit/LayoutTests/external/wpt/ambient-light/META.yml new file mode 100644 index 0000000..d35c2c53 --- /dev/null +++ b/third_party/WebKit/LayoutTests/external/wpt/ambient-light/META.yml
@@ -0,0 +1,8 @@ +spec: https://w3c.github.io/ambient-light/ +suggested_reviewers: + - zqzhang + - dontcallmedom + - riju + - alexshalamov + - rakuco + - Honry
diff --git a/third_party/WebKit/LayoutTests/external/wpt/ambient-light/OWNERS b/third_party/WebKit/LayoutTests/external/wpt/ambient-light/OWNERS new file mode 100644 index 0000000..614fe922 --- /dev/null +++ b/third_party/WebKit/LayoutTests/external/wpt/ambient-light/OWNERS
@@ -0,0 +1 @@ +file://third_party/blink/renderer/modules/sensor/OWNERS
diff --git a/third_party/WebKit/LayoutTests/external/wpt/ambient-light/idlharness.https.window.js b/third_party/WebKit/LayoutTests/external/wpt/ambient-light/idlharness.https.window.js new file mode 100644 index 0000000..211e6aa0 --- /dev/null +++ b/third_party/WebKit/LayoutTests/external/wpt/ambient-light/idlharness.https.window.js
@@ -0,0 +1,16 @@ +// META: script=/resources/WebIDLParser.js +// META: script=/resources/idlharness.js + +// https://w3c.github.io/ambient-light/ + +'use strict'; + +idl_test( + ['ambient-light'], + ['generic-sensor', 'dom'], + idl_array => { + idl_array.add_objects({ + AmbientLightSensor: ['new AmbientLightSensor()'] + }); + } +);
diff --git a/third_party/WebKit/LayoutTests/external/wpt/animation-worklet/idlharness.any-expected.txt b/third_party/WebKit/LayoutTests/external/wpt/animation-worklet/idlharness.any-expected.txt new file mode 100644 index 0000000..8bf12c874 --- /dev/null +++ b/third_party/WebKit/LayoutTests/external/wpt/animation-worklet/idlharness.any-expected.txt
@@ -0,0 +1,29 @@ +This is a testharness.js-based test. +PASS idl_test setup +PASS Partial namespace CSS: original namespace defined +PASS Partial interface AnimationEffect: original interface defined +FAIL Partial interface AnimationEffect: valid exposure set Partial AnimationEffect interface is exposed to 'AnimationWorklet', the original interface is not. +PASS AnimationWorkletGlobalScope interface: existence and properties of interface object +FAIL WorkletAnimation interface: existence and properties of interface object assert_equals: prototype of WorkletAnimation is not Animation expected function "function Animation() { [native code] }" but got function "function () { [native code] }" +FAIL WorkletAnimation interface object length assert_equals: wrong value for WorkletAnimation.length expected 1 but got 2 +PASS WorkletAnimation interface object name +FAIL WorkletAnimation interface: existence and properties of interface prototype object assert_equals: prototype of WorkletAnimation.prototype is not Animation.prototype expected object "[object Animation]" but got object "[object Object]" +PASS WorkletAnimation interface: existence and properties of interface prototype object's "constructor" property +PASS WorkletAnimation interface: existence and properties of interface prototype object's @@unscopables property +FAIL WorkletAnimation interface: attribute animatorName assert_true: The prototype object must have a property "animatorName" expected true got false +FAIL WorkletAnimation must be primary interface of new WorkletAnimation("name") assert_equals: Unexpected exception when evaluating object expected null but got object "TypeError: Failed to construct 'WorkletAnimation': 2 arguments required, but only 1 present." +FAIL Stringification of new WorkletAnimation("name") assert_equals: Unexpected exception when evaluating object expected null but got object "TypeError: Failed to construct 'WorkletAnimation': 2 arguments required, but only 1 present." +FAIL WorkletAnimation interface: new WorkletAnimation("name") must inherit property "animatorName" with the proper type assert_equals: Unexpected exception when evaluating object expected null but got object "TypeError: Failed to construct 'WorkletAnimation': 2 arguments required, but only 1 present." +FAIL WorkletGroupEffect interface: existence and properties of interface object assert_own_property: self does not have own property "WorkletGroupEffect" expected property "WorkletGroupEffect" missing +FAIL WorkletGroupEffect interface object length assert_own_property: self does not have own property "WorkletGroupEffect" expected property "WorkletGroupEffect" missing +FAIL WorkletGroupEffect interface object name assert_own_property: self does not have own property "WorkletGroupEffect" expected property "WorkletGroupEffect" missing +FAIL WorkletGroupEffect interface: existence and properties of interface prototype object assert_own_property: self does not have own property "WorkletGroupEffect" expected property "WorkletGroupEffect" missing +FAIL WorkletGroupEffect interface: existence and properties of interface prototype object's "constructor" property assert_own_property: self does not have own property "WorkletGroupEffect" expected property "WorkletGroupEffect" missing +FAIL WorkletGroupEffect interface: existence and properties of interface prototype object's @@unscopables property assert_own_property: self does not have own property "WorkletGroupEffect" expected property "WorkletGroupEffect" missing +FAIL WorkletGroupEffect interface: operation getChildren() assert_own_property: self does not have own property "WorkletGroupEffect" expected property "WorkletGroupEffect" missing +PASS WorkletGlobalScope interface: existence and properties of interface object +PASS AnimationEffect interface: member localTime +PASS CSS namespace: operation escape(CSSOMString) +FAIL CSS namespace: attribute animationWorklet assert_own_property: CSS does not have property "animationWorklet" expected property "animationWorklet" missing +Harness: the test ran to completion. +
diff --git a/third_party/WebKit/LayoutTests/external/wpt/animation-worklet/idlharness.any.js b/third_party/WebKit/LayoutTests/external/wpt/animation-worklet/idlharness.any.js new file mode 100644 index 0000000..e821a2fee --- /dev/null +++ b/third_party/WebKit/LayoutTests/external/wpt/animation-worklet/idlharness.any.js
@@ -0,0 +1,17 @@ +// META: script=/resources/WebIDLParser.js +// META: script=/resources/idlharness.js + +'use strict'; + +// https://wicg.github.io/animation-worklet/ + +idl_test( + ['animation-worklet'], + ['worklets', 'web-animations', 'html', 'cssom', 'dom'], + idl_array => { + idl_array.add_objects({ + WorkletAnimation: ['new WorkletAnimation("name")'], + // TODO: WorkletGroupEffect + }); + } +);
diff --git a/third_party/WebKit/LayoutTests/external/wpt/animation-worklet/idlharness.any.worker-expected.txt b/third_party/WebKit/LayoutTests/external/wpt/animation-worklet/idlharness.any.worker-expected.txt new file mode 100644 index 0000000..f73208c --- /dev/null +++ b/third_party/WebKit/LayoutTests/external/wpt/animation-worklet/idlharness.any.worker-expected.txt
@@ -0,0 +1,19 @@ +This is a testharness.js-based test. +PASS idl_test setup +PASS Partial namespace CSS: original namespace defined +PASS Partial interface AnimationEffect: original interface defined +FAIL Partial interface AnimationEffect: valid exposure set Partial AnimationEffect interface is exposed to 'AnimationWorklet', the original interface is not. +PASS AnimationWorkletGlobalScope interface: existence and properties of interface object +PASS WorkletAnimation interface: existence and properties of interface object +FAIL WorkletAnimation must be primary interface of new WorkletAnimation("name") assert_equals: Unexpected exception when evaluating object expected null but got object "ReferenceError: WorkletAnimation is not defined" +FAIL Stringification of new WorkletAnimation("name") assert_equals: Unexpected exception when evaluating object expected null but got object "ReferenceError: WorkletAnimation is not defined" +FAIL WorkletAnimation interface: new WorkletAnimation("name") must not have property "animatorName" assert_equals: Unexpected exception when evaluating object expected null but got object "ReferenceError: WorkletAnimation is not defined" +PASS WorkletGroupEffect interface: existence and properties of interface object +PASS WorkletGlobalScope interface: existence and properties of interface object +PASS Worklet interface: existence and properties of interface object +PASS Animation interface: existence and properties of interface object +PASS AnimationEffect interface: existence and properties of interface object +FAIL CSS namespace: operation escape(CSSOMString) Cannot read property 'hasOwnProperty' of undefined +FAIL CSS namespace: attribute animationWorklet Cannot read property 'hasOwnProperty' of undefined +Harness: the test ran to completion. +
diff --git a/third_party/WebKit/LayoutTests/external/wpt/animation-worklet/interfaces.any.js b/third_party/WebKit/LayoutTests/external/wpt/animation-worklet/interfaces.any.js deleted file mode 100644 index 9b1d75649..0000000 --- a/third_party/WebKit/LayoutTests/external/wpt/animation-worklet/interfaces.any.js +++ /dev/null
@@ -1,16 +0,0 @@ -// META: script=/resources/WebIDLParser.js -// META: script=/resources/idlharness.js - -'use strict'; - -// https://wicg.github.io/animation-worklet/ - -promise_test(async () => { - const idl = await (await fetch('/interfaces/animation-worklet.idl')).text(); - const html = await (await fetch('/interfaces/html.idl')).text(); - const idlArray = new IdlArray(); - idlArray.add_idls(idl); - idlArray.add_dependency_idls(html); - idlArray.test(); - done(); -}, 'Test driver');
diff --git a/third_party/WebKit/LayoutTests/external/wpt/appmanifest/idlharness.window.js b/third_party/WebKit/LayoutTests/external/wpt/appmanifest/idlharness.window.js index a877c76..55e8b98 100644 --- a/third_party/WebKit/LayoutTests/external/wpt/appmanifest/idlharness.window.js +++ b/third_party/WebKit/LayoutTests/external/wpt/appmanifest/idlharness.window.js
@@ -13,6 +13,5 @@ Window: ['window'], BeforeInstallPromptEvent: ['new BeforeInstallPromptEvent("type")'], }); - }, - 'appmanifest interfaces' + } );
diff --git a/third_party/WebKit/LayoutTests/external/wpt/background-fetch/fetch.https.window.js b/third_party/WebKit/LayoutTests/external/wpt/background-fetch/fetch.https.window.js index cca6328..f146212 100644 --- a/third_party/WebKit/LayoutTests/external/wpt/background-fetch/fetch.https.window.js +++ b/third_party/WebKit/LayoutTests/external/wpt/background-fetch/fetch.https.window.js
@@ -74,7 +74,7 @@ // Skip `downloaded`, as the transfer may have started already. const {type, results} = await getMessageFromServiceWorker(); - assert_equals('backgroundfetched', type); + assert_equals('backgroundfetchsuccess', type); assert_equals(results.length, 1); assert_true(results[0].url.includes('resources/feature-name.txt'));
diff --git a/third_party/WebKit/LayoutTests/external/wpt/background-fetch/idlharness.https.any-expected.txt b/third_party/WebKit/LayoutTests/external/wpt/background-fetch/idlharness.https.any-expected.txt index 79ea026..0ea3fdf9 100644 --- a/third_party/WebKit/LayoutTests/external/wpt/background-fetch/idlharness.https.any-expected.txt +++ b/third_party/WebKit/LayoutTests/external/wpt/background-fetch/idlharness.https.any-expected.txt
@@ -1,5 +1,5 @@ This is a testharness.js-based test. -PASS background-fetch interfaces +PASS idl_test setup PASS Partial interface ServiceWorkerGlobalScope: original interface defined PASS Partial interface ServiceWorkerRegistration: original interface defined PASS BackgroundFetchManager interface: existence and properties of interface object @@ -22,38 +22,22 @@ PASS BackgroundFetchRegistration interface: attribute uploaded PASS BackgroundFetchRegistration interface: attribute downloadTotal PASS BackgroundFetchRegistration interface: attribute downloaded -FAIL BackgroundFetchRegistration interface: attribute activeFetches assert_true: The prototype object must have a property "activeFetches" expected true got false +FAIL BackgroundFetchRegistration interface: attribute state assert_true: The prototype object must have a property "state" expected true got false +FAIL BackgroundFetchRegistration interface: attribute failureReason assert_true: The prototype object must have a property "failureReason" expected true got false PASS BackgroundFetchRegistration interface: attribute onprogress PASS BackgroundFetchRegistration interface: operation abort() -FAIL BackgroundFetchActiveFetches interface: existence and properties of interface object assert_own_property: self does not have own property "BackgroundFetchActiveFetches" expected property "BackgroundFetchActiveFetches" missing -FAIL BackgroundFetchActiveFetches interface object length assert_own_property: self does not have own property "BackgroundFetchActiveFetches" expected property "BackgroundFetchActiveFetches" missing -FAIL BackgroundFetchActiveFetches interface object name assert_own_property: self does not have own property "BackgroundFetchActiveFetches" expected property "BackgroundFetchActiveFetches" missing -FAIL BackgroundFetchActiveFetches interface: existence and properties of interface prototype object assert_own_property: self does not have own property "BackgroundFetchActiveFetches" expected property "BackgroundFetchActiveFetches" missing -FAIL BackgroundFetchActiveFetches interface: existence and properties of interface prototype object's "constructor" property assert_own_property: self does not have own property "BackgroundFetchActiveFetches" expected property "BackgroundFetchActiveFetches" missing -FAIL BackgroundFetchActiveFetches interface: existence and properties of interface prototype object's @@unscopables property assert_own_property: self does not have own property "BackgroundFetchActiveFetches" expected property "BackgroundFetchActiveFetches" missing -FAIL BackgroundFetchActiveFetches interface: operation match(RequestInfo, CacheQueryOptions) assert_own_property: self does not have own property "BackgroundFetchActiveFetches" expected property "BackgroundFetchActiveFetches" missing -FAIL BackgroundFetchActiveFetches interface: operation matchAll(RequestInfo, CacheQueryOptions) assert_own_property: self does not have own property "BackgroundFetchActiveFetches" expected property "BackgroundFetchActiveFetches" missing -FAIL BackgroundFetchActiveFetches interface: operation values() assert_own_property: self does not have own property "BackgroundFetchActiveFetches" expected property "BackgroundFetchActiveFetches" missing -FAIL BackgroundFetchActiveFetch interface: existence and properties of interface object assert_own_property: self does not have own property "BackgroundFetchActiveFetch" expected property "BackgroundFetchActiveFetch" missing -FAIL BackgroundFetchActiveFetch interface object length assert_own_property: self does not have own property "BackgroundFetchActiveFetch" expected property "BackgroundFetchActiveFetch" missing -FAIL BackgroundFetchActiveFetch interface object name assert_own_property: self does not have own property "BackgroundFetchActiveFetch" expected property "BackgroundFetchActiveFetch" missing -FAIL BackgroundFetchActiveFetch interface: existence and properties of interface prototype object assert_own_property: self does not have own property "BackgroundFetchActiveFetch" expected property "BackgroundFetchActiveFetch" missing -FAIL BackgroundFetchActiveFetch interface: existence and properties of interface prototype object's "constructor" property assert_own_property: self does not have own property "BackgroundFetchActiveFetch" expected property "BackgroundFetchActiveFetch" missing -FAIL BackgroundFetchActiveFetch interface: existence and properties of interface prototype object's @@unscopables property assert_own_property: self does not have own property "BackgroundFetchActiveFetch" expected property "BackgroundFetchActiveFetch" missing -FAIL BackgroundFetchActiveFetch interface: attribute responseReady assert_own_property: self does not have own property "BackgroundFetchActiveFetch" expected property "BackgroundFetchActiveFetch" missing -PASS BackgroundFetchFetch interface: existence and properties of interface object -PASS BackgroundFetchFetch interface object length -PASS BackgroundFetchFetch interface object name -PASS BackgroundFetchFetch interface: existence and properties of interface prototype object -PASS BackgroundFetchFetch interface: existence and properties of interface prototype object's "constructor" property -PASS BackgroundFetchFetch interface: existence and properties of interface prototype object's @@unscopables property -PASS BackgroundFetchFetch interface: attribute request +FAIL BackgroundFetchRegistration interface: operation match(RequestInfo, CacheQueryOptions) assert_own_property: interface prototype object missing non-static operation expected property "match" missing +FAIL BackgroundFetchRegistration interface: operation matchAll(RequestInfo, CacheQueryOptions) assert_own_property: interface prototype object missing non-static operation expected property "matchAll" missing +FAIL BackgroundFetchRecord interface: existence and properties of interface object assert_own_property: self does not have own property "BackgroundFetchRecord" expected property "BackgroundFetchRecord" missing +FAIL BackgroundFetchRecord interface object length assert_own_property: self does not have own property "BackgroundFetchRecord" expected property "BackgroundFetchRecord" missing +FAIL BackgroundFetchRecord interface object name assert_own_property: self does not have own property "BackgroundFetchRecord" expected property "BackgroundFetchRecord" missing +FAIL BackgroundFetchRecord interface: existence and properties of interface prototype object assert_own_property: self does not have own property "BackgroundFetchRecord" expected property "BackgroundFetchRecord" missing +FAIL BackgroundFetchRecord interface: existence and properties of interface prototype object's "constructor" property assert_own_property: self does not have own property "BackgroundFetchRecord" expected property "BackgroundFetchRecord" missing +FAIL BackgroundFetchRecord interface: existence and properties of interface prototype object's @@unscopables property assert_own_property: self does not have own property "BackgroundFetchRecord" expected property "BackgroundFetchRecord" missing +FAIL BackgroundFetchRecord interface: attribute request assert_own_property: self does not have own property "BackgroundFetchRecord" expected property "BackgroundFetchRecord" missing +FAIL BackgroundFetchRecord interface: attribute responseReady assert_own_property: self does not have own property "BackgroundFetchRecord" expected property "BackgroundFetchRecord" missing PASS BackgroundFetchEvent interface: existence and properties of interface object -PASS BackgroundFetchSettledEvent interface: existence and properties of interface object -PASS BackgroundFetchSettledFetches interface: existence and properties of interface object -PASS BackgroundFetchSettledFetch interface: existence and properties of interface object -PASS BackgroundFetchUpdateEvent interface: existence and properties of interface object -PASS BackgroundFetchClickEvent interface: existence and properties of interface object +PASS BackgroundFetchUpdateUIEvent interface: existence and properties of interface object PASS ServiceWorkerRegistration interface: attribute backgroundFetch PASS ServiceWorkerGlobalScope interface: existence and properties of interface object PASS ExtendableEvent interface: existence and properties of interface object
diff --git a/third_party/WebKit/LayoutTests/external/wpt/background-fetch/idlharness.https.any.js b/third_party/WebKit/LayoutTests/external/wpt/background-fetch/idlharness.https.any.js index ad20477..f2c8a565 100644 --- a/third_party/WebKit/LayoutTests/external/wpt/background-fetch/idlharness.https.any.js +++ b/third_party/WebKit/LayoutTests/external/wpt/background-fetch/idlharness.https.any.js
@@ -20,6 +20,5 @@ BackgroundFetchUpdateEvent: ['new BackgroundFetchUpdateEvent("type")'], }); } - }, - 'background-fetch interfaces' + } );
diff --git a/third_party/WebKit/LayoutTests/external/wpt/background-fetch/idlharness.https.any.serviceworker-expected.txt b/third_party/WebKit/LayoutTests/external/wpt/background-fetch/idlharness.https.any.serviceworker-expected.txt index 927b830..6ab1b7fa 100644 --- a/third_party/WebKit/LayoutTests/external/wpt/background-fetch/idlharness.https.any.serviceworker-expected.txt +++ b/third_party/WebKit/LayoutTests/external/wpt/background-fetch/idlharness.https.any.serviceworker-expected.txt
@@ -54,14 +54,14 @@ PASS BackgroundFetchEvent interface: existence and properties of interface prototype object PASS BackgroundFetchEvent interface: existence and properties of interface prototype object's "constructor" property PASS BackgroundFetchEvent interface: existence and properties of interface prototype object's @@unscopables property -PASS BackgroundFetchEvent interface: attribute id -PASS BackgroundFetchSettledEvent interface: existence and properties of interface object -PASS BackgroundFetchSettledEvent interface object length -PASS BackgroundFetchSettledEvent interface object name -PASS BackgroundFetchSettledEvent interface: existence and properties of interface prototype object -PASS BackgroundFetchSettledEvent interface: existence and properties of interface prototype object's "constructor" property -PASS BackgroundFetchSettledEvent interface: existence and properties of interface prototype object's @@unscopables property -PASS BackgroundFetchSettledEvent interface: attribute fetches +FAIL BackgroundFetchEvent interface: attribute id assert_true: The prototype object must have a property "id" expected true got false +FAIL BackgroundFetchSettledEvent interface: existence and properties of interface object assert_own_property: self does not have own property "BackgroundFetchSettledEvent" expected property "BackgroundFetchSettledEvent" missing +FAIL BackgroundFetchSettledEvent interface object length assert_own_property: self does not have own property "BackgroundFetchSettledEvent" expected property "BackgroundFetchSettledEvent" missing +FAIL BackgroundFetchSettledEvent interface object name assert_own_property: self does not have own property "BackgroundFetchSettledEvent" expected property "BackgroundFetchSettledEvent" missing +FAIL BackgroundFetchSettledEvent interface: existence and properties of interface prototype object assert_own_property: self does not have own property "BackgroundFetchSettledEvent" expected property "BackgroundFetchSettledEvent" missing +FAIL BackgroundFetchSettledEvent interface: existence and properties of interface prototype object's "constructor" property assert_own_property: self does not have own property "BackgroundFetchSettledEvent" expected property "BackgroundFetchSettledEvent" missing +FAIL BackgroundFetchSettledEvent interface: existence and properties of interface prototype object's @@unscopables property assert_own_property: self does not have own property "BackgroundFetchSettledEvent" expected property "BackgroundFetchSettledEvent" missing +FAIL BackgroundFetchSettledEvent interface: attribute fetches assert_own_property: self does not have own property "BackgroundFetchSettledEvent" expected property "BackgroundFetchSettledEvent" missing PASS BackgroundFetchSettledFetches interface: existence and properties of interface object PASS BackgroundFetchSettledFetches interface object length PASS BackgroundFetchSettledFetches interface object name @@ -78,22 +78,22 @@ PASS BackgroundFetchSettledFetch interface: existence and properties of interface prototype object's "constructor" property PASS BackgroundFetchSettledFetch interface: existence and properties of interface prototype object's @@unscopables property PASS BackgroundFetchSettledFetch interface: attribute response -PASS BackgroundFetchUpdateEvent interface: existence and properties of interface object -PASS BackgroundFetchUpdateEvent interface object length -PASS BackgroundFetchUpdateEvent interface object name -PASS BackgroundFetchUpdateEvent interface: existence and properties of interface prototype object -PASS BackgroundFetchUpdateEvent interface: existence and properties of interface prototype object's "constructor" property -PASS BackgroundFetchUpdateEvent interface: existence and properties of interface prototype object's @@unscopables property -FAIL BackgroundFetchUpdateEvent interface: operation updateUI(DOMString) assert_equals: property has wrong .length expected 1 but got 0 -PASS BackgroundFetchClickEvent interface: existence and properties of interface object -PASS BackgroundFetchClickEvent interface object length -PASS BackgroundFetchClickEvent interface object name -PASS BackgroundFetchClickEvent interface: existence and properties of interface prototype object -PASS BackgroundFetchClickEvent interface: existence and properties of interface prototype object's "constructor" property -PASS BackgroundFetchClickEvent interface: existence and properties of interface prototype object's @@unscopables property -PASS BackgroundFetchClickEvent interface: attribute state +FAIL BackgroundFetchUpdateEvent interface: existence and properties of interface object assert_own_property: self does not have own property "BackgroundFetchUpdateEvent" expected property "BackgroundFetchUpdateEvent" missing +FAIL BackgroundFetchUpdateEvent interface object length assert_own_property: self does not have own property "BackgroundFetchUpdateEvent" expected property "BackgroundFetchUpdateEvent" missing +FAIL BackgroundFetchUpdateEvent interface object name assert_own_property: self does not have own property "BackgroundFetchUpdateEvent" expected property "BackgroundFetchUpdateEvent" missing +FAIL BackgroundFetchUpdateEvent interface: existence and properties of interface prototype object assert_own_property: self does not have own property "BackgroundFetchUpdateEvent" expected property "BackgroundFetchUpdateEvent" missing +FAIL BackgroundFetchUpdateEvent interface: existence and properties of interface prototype object's "constructor" property assert_own_property: self does not have own property "BackgroundFetchUpdateEvent" expected property "BackgroundFetchUpdateEvent" missing +FAIL BackgroundFetchUpdateEvent interface: existence and properties of interface prototype object's @@unscopables property assert_own_property: self does not have own property "BackgroundFetchUpdateEvent" expected property "BackgroundFetchUpdateEvent" missing +FAIL BackgroundFetchUpdateEvent interface: operation updateUI(DOMString) assert_own_property: self does not have own property "BackgroundFetchUpdateEvent" expected property "BackgroundFetchUpdateEvent" missing +FAIL BackgroundFetchClickEvent interface: existence and properties of interface object assert_own_property: self does not have own property "BackgroundFetchClickEvent" expected property "BackgroundFetchClickEvent" missing +FAIL BackgroundFetchClickEvent interface object length assert_own_property: self does not have own property "BackgroundFetchClickEvent" expected property "BackgroundFetchClickEvent" missing +FAIL BackgroundFetchClickEvent interface object name assert_own_property: self does not have own property "BackgroundFetchClickEvent" expected property "BackgroundFetchClickEvent" missing +FAIL BackgroundFetchClickEvent interface: existence and properties of interface prototype object assert_own_property: self does not have own property "BackgroundFetchClickEvent" expected property "BackgroundFetchClickEvent" missing +FAIL BackgroundFetchClickEvent interface: existence and properties of interface prototype object's "constructor" property assert_own_property: self does not have own property "BackgroundFetchClickEvent" expected property "BackgroundFetchClickEvent" missing +FAIL BackgroundFetchClickEvent interface: existence and properties of interface prototype object's @@unscopables property assert_own_property: self does not have own property "BackgroundFetchClickEvent" expected property "BackgroundFetchClickEvent" missing +FAIL BackgroundFetchClickEvent interface: attribute state assert_own_property: self does not have own property "BackgroundFetchClickEvent" expected property "BackgroundFetchClickEvent" missing PASS ServiceWorkerRegistration interface: attribute backgroundFetch -PASS ServiceWorkerGlobalScope interface: attribute onbackgroundfetched +PASS ServiceWorkerGlobalScope interface: attribute onbackgroundfetchsuccess PASS ServiceWorkerGlobalScope interface: attribute onbackgroundfetchfail PASS ServiceWorkerGlobalScope interface: attribute onbackgroundfetchabort PASS ServiceWorkerGlobalScope interface: attribute onbackgroundfetchclick
diff --git a/third_party/WebKit/LayoutTests/external/wpt/background-fetch/idlharness.https.any.sharedworker-expected.txt b/third_party/WebKit/LayoutTests/external/wpt/background-fetch/idlharness.https.any.sharedworker-expected.txt index a7a6e7dd..c4caab2 100644 --- a/third_party/WebKit/LayoutTests/external/wpt/background-fetch/idlharness.https.any.sharedworker-expected.txt +++ b/third_party/WebKit/LayoutTests/external/wpt/background-fetch/idlharness.https.any.sharedworker-expected.txt
@@ -1,5 +1,5 @@ This is a testharness.js-based test. -PASS background-fetch interfaces +PASS idl_test setup PASS Partial interface ServiceWorkerGlobalScope: original interface defined PASS Partial interface ServiceWorkerRegistration: original interface defined PASS BackgroundFetchManager interface: existence and properties of interface object @@ -22,38 +22,22 @@ PASS BackgroundFetchRegistration interface: attribute uploaded PASS BackgroundFetchRegistration interface: attribute downloadTotal PASS BackgroundFetchRegistration interface: attribute downloaded -FAIL BackgroundFetchRegistration interface: attribute activeFetches assert_true: The prototype object must have a property "activeFetches" expected true got false +FAIL BackgroundFetchRegistration interface: attribute state assert_true: The prototype object must have a property "state" expected true got false +FAIL BackgroundFetchRegistration interface: attribute failureReason assert_true: The prototype object must have a property "failureReason" expected true got false PASS BackgroundFetchRegistration interface: attribute onprogress PASS BackgroundFetchRegistration interface: operation abort() -FAIL BackgroundFetchActiveFetches interface: existence and properties of interface object assert_own_property: self does not have own property "BackgroundFetchActiveFetches" expected property "BackgroundFetchActiveFetches" missing -FAIL BackgroundFetchActiveFetches interface object length assert_own_property: self does not have own property "BackgroundFetchActiveFetches" expected property "BackgroundFetchActiveFetches" missing -FAIL BackgroundFetchActiveFetches interface object name assert_own_property: self does not have own property "BackgroundFetchActiveFetches" expected property "BackgroundFetchActiveFetches" missing -FAIL BackgroundFetchActiveFetches interface: existence and properties of interface prototype object assert_own_property: self does not have own property "BackgroundFetchActiveFetches" expected property "BackgroundFetchActiveFetches" missing -FAIL BackgroundFetchActiveFetches interface: existence and properties of interface prototype object's "constructor" property assert_own_property: self does not have own property "BackgroundFetchActiveFetches" expected property "BackgroundFetchActiveFetches" missing -FAIL BackgroundFetchActiveFetches interface: existence and properties of interface prototype object's @@unscopables property assert_own_property: self does not have own property "BackgroundFetchActiveFetches" expected property "BackgroundFetchActiveFetches" missing -FAIL BackgroundFetchActiveFetches interface: operation match(RequestInfo, CacheQueryOptions) assert_own_property: self does not have own property "BackgroundFetchActiveFetches" expected property "BackgroundFetchActiveFetches" missing -FAIL BackgroundFetchActiveFetches interface: operation matchAll(RequestInfo, CacheQueryOptions) assert_own_property: self does not have own property "BackgroundFetchActiveFetches" expected property "BackgroundFetchActiveFetches" missing -FAIL BackgroundFetchActiveFetches interface: operation values() assert_own_property: self does not have own property "BackgroundFetchActiveFetches" expected property "BackgroundFetchActiveFetches" missing -FAIL BackgroundFetchActiveFetch interface: existence and properties of interface object assert_own_property: self does not have own property "BackgroundFetchActiveFetch" expected property "BackgroundFetchActiveFetch" missing -FAIL BackgroundFetchActiveFetch interface object length assert_own_property: self does not have own property "BackgroundFetchActiveFetch" expected property "BackgroundFetchActiveFetch" missing -FAIL BackgroundFetchActiveFetch interface object name assert_own_property: self does not have own property "BackgroundFetchActiveFetch" expected property "BackgroundFetchActiveFetch" missing -FAIL BackgroundFetchActiveFetch interface: existence and properties of interface prototype object assert_own_property: self does not have own property "BackgroundFetchActiveFetch" expected property "BackgroundFetchActiveFetch" missing -FAIL BackgroundFetchActiveFetch interface: existence and properties of interface prototype object's "constructor" property assert_own_property: self does not have own property "BackgroundFetchActiveFetch" expected property "BackgroundFetchActiveFetch" missing -FAIL BackgroundFetchActiveFetch interface: existence and properties of interface prototype object's @@unscopables property assert_own_property: self does not have own property "BackgroundFetchActiveFetch" expected property "BackgroundFetchActiveFetch" missing -FAIL BackgroundFetchActiveFetch interface: attribute responseReady assert_own_property: self does not have own property "BackgroundFetchActiveFetch" expected property "BackgroundFetchActiveFetch" missing -PASS BackgroundFetchFetch interface: existence and properties of interface object -PASS BackgroundFetchFetch interface object length -PASS BackgroundFetchFetch interface object name -PASS BackgroundFetchFetch interface: existence and properties of interface prototype object -PASS BackgroundFetchFetch interface: existence and properties of interface prototype object's "constructor" property -PASS BackgroundFetchFetch interface: existence and properties of interface prototype object's @@unscopables property -PASS BackgroundFetchFetch interface: attribute request +FAIL BackgroundFetchRegistration interface: operation match(RequestInfo, CacheQueryOptions) assert_own_property: interface prototype object missing non-static operation expected property "match" missing +FAIL BackgroundFetchRegistration interface: operation matchAll(RequestInfo, CacheQueryOptions) assert_own_property: interface prototype object missing non-static operation expected property "matchAll" missing +FAIL BackgroundFetchRecord interface: existence and properties of interface object assert_own_property: self does not have own property "BackgroundFetchRecord" expected property "BackgroundFetchRecord" missing +FAIL BackgroundFetchRecord interface object length assert_own_property: self does not have own property "BackgroundFetchRecord" expected property "BackgroundFetchRecord" missing +FAIL BackgroundFetchRecord interface object name assert_own_property: self does not have own property "BackgroundFetchRecord" expected property "BackgroundFetchRecord" missing +FAIL BackgroundFetchRecord interface: existence and properties of interface prototype object assert_own_property: self does not have own property "BackgroundFetchRecord" expected property "BackgroundFetchRecord" missing +FAIL BackgroundFetchRecord interface: existence and properties of interface prototype object's "constructor" property assert_own_property: self does not have own property "BackgroundFetchRecord" expected property "BackgroundFetchRecord" missing +FAIL BackgroundFetchRecord interface: existence and properties of interface prototype object's @@unscopables property assert_own_property: self does not have own property "BackgroundFetchRecord" expected property "BackgroundFetchRecord" missing +FAIL BackgroundFetchRecord interface: attribute request assert_own_property: self does not have own property "BackgroundFetchRecord" expected property "BackgroundFetchRecord" missing +FAIL BackgroundFetchRecord interface: attribute responseReady assert_own_property: self does not have own property "BackgroundFetchRecord" expected property "BackgroundFetchRecord" missing PASS BackgroundFetchEvent interface: existence and properties of interface object -PASS BackgroundFetchSettledEvent interface: existence and properties of interface object -PASS BackgroundFetchSettledFetches interface: existence and properties of interface object -PASS BackgroundFetchSettledFetch interface: existence and properties of interface object -PASS BackgroundFetchUpdateEvent interface: existence and properties of interface object -PASS BackgroundFetchClickEvent interface: existence and properties of interface object +PASS BackgroundFetchUpdateUIEvent interface: existence and properties of interface object PASS ServiceWorkerRegistration interface: attribute backgroundFetch PASS ServiceWorkerGlobalScope interface: existence and properties of interface object PASS ExtendableEvent interface: existence and properties of interface object
diff --git a/third_party/WebKit/LayoutTests/external/wpt/background-fetch/idlharness.https.any.worker-expected.txt b/third_party/WebKit/LayoutTests/external/wpt/background-fetch/idlharness.https.any.worker-expected.txt index a7a6e7dd..c4caab2 100644 --- a/third_party/WebKit/LayoutTests/external/wpt/background-fetch/idlharness.https.any.worker-expected.txt +++ b/third_party/WebKit/LayoutTests/external/wpt/background-fetch/idlharness.https.any.worker-expected.txt
@@ -1,5 +1,5 @@ This is a testharness.js-based test. -PASS background-fetch interfaces +PASS idl_test setup PASS Partial interface ServiceWorkerGlobalScope: original interface defined PASS Partial interface ServiceWorkerRegistration: original interface defined PASS BackgroundFetchManager interface: existence and properties of interface object @@ -22,38 +22,22 @@ PASS BackgroundFetchRegistration interface: attribute uploaded PASS BackgroundFetchRegistration interface: attribute downloadTotal PASS BackgroundFetchRegistration interface: attribute downloaded -FAIL BackgroundFetchRegistration interface: attribute activeFetches assert_true: The prototype object must have a property "activeFetches" expected true got false +FAIL BackgroundFetchRegistration interface: attribute state assert_true: The prototype object must have a property "state" expected true got false +FAIL BackgroundFetchRegistration interface: attribute failureReason assert_true: The prototype object must have a property "failureReason" expected true got false PASS BackgroundFetchRegistration interface: attribute onprogress PASS BackgroundFetchRegistration interface: operation abort() -FAIL BackgroundFetchActiveFetches interface: existence and properties of interface object assert_own_property: self does not have own property "BackgroundFetchActiveFetches" expected property "BackgroundFetchActiveFetches" missing -FAIL BackgroundFetchActiveFetches interface object length assert_own_property: self does not have own property "BackgroundFetchActiveFetches" expected property "BackgroundFetchActiveFetches" missing -FAIL BackgroundFetchActiveFetches interface object name assert_own_property: self does not have own property "BackgroundFetchActiveFetches" expected property "BackgroundFetchActiveFetches" missing -FAIL BackgroundFetchActiveFetches interface: existence and properties of interface prototype object assert_own_property: self does not have own property "BackgroundFetchActiveFetches" expected property "BackgroundFetchActiveFetches" missing -FAIL BackgroundFetchActiveFetches interface: existence and properties of interface prototype object's "constructor" property assert_own_property: self does not have own property "BackgroundFetchActiveFetches" expected property "BackgroundFetchActiveFetches" missing -FAIL BackgroundFetchActiveFetches interface: existence and properties of interface prototype object's @@unscopables property assert_own_property: self does not have own property "BackgroundFetchActiveFetches" expected property "BackgroundFetchActiveFetches" missing -FAIL BackgroundFetchActiveFetches interface: operation match(RequestInfo, CacheQueryOptions) assert_own_property: self does not have own property "BackgroundFetchActiveFetches" expected property "BackgroundFetchActiveFetches" missing -FAIL BackgroundFetchActiveFetches interface: operation matchAll(RequestInfo, CacheQueryOptions) assert_own_property: self does not have own property "BackgroundFetchActiveFetches" expected property "BackgroundFetchActiveFetches" missing -FAIL BackgroundFetchActiveFetches interface: operation values() assert_own_property: self does not have own property "BackgroundFetchActiveFetches" expected property "BackgroundFetchActiveFetches" missing -FAIL BackgroundFetchActiveFetch interface: existence and properties of interface object assert_own_property: self does not have own property "BackgroundFetchActiveFetch" expected property "BackgroundFetchActiveFetch" missing -FAIL BackgroundFetchActiveFetch interface object length assert_own_property: self does not have own property "BackgroundFetchActiveFetch" expected property "BackgroundFetchActiveFetch" missing -FAIL BackgroundFetchActiveFetch interface object name assert_own_property: self does not have own property "BackgroundFetchActiveFetch" expected property "BackgroundFetchActiveFetch" missing -FAIL BackgroundFetchActiveFetch interface: existence and properties of interface prototype object assert_own_property: self does not have own property "BackgroundFetchActiveFetch" expected property "BackgroundFetchActiveFetch" missing -FAIL BackgroundFetchActiveFetch interface: existence and properties of interface prototype object's "constructor" property assert_own_property: self does not have own property "BackgroundFetchActiveFetch" expected property "BackgroundFetchActiveFetch" missing -FAIL BackgroundFetchActiveFetch interface: existence and properties of interface prototype object's @@unscopables property assert_own_property: self does not have own property "BackgroundFetchActiveFetch" expected property "BackgroundFetchActiveFetch" missing -FAIL BackgroundFetchActiveFetch interface: attribute responseReady assert_own_property: self does not have own property "BackgroundFetchActiveFetch" expected property "BackgroundFetchActiveFetch" missing -PASS BackgroundFetchFetch interface: existence and properties of interface object -PASS BackgroundFetchFetch interface object length -PASS BackgroundFetchFetch interface object name -PASS BackgroundFetchFetch interface: existence and properties of interface prototype object -PASS BackgroundFetchFetch interface: existence and properties of interface prototype object's "constructor" property -PASS BackgroundFetchFetch interface: existence and properties of interface prototype object's @@unscopables property -PASS BackgroundFetchFetch interface: attribute request +FAIL BackgroundFetchRegistration interface: operation match(RequestInfo, CacheQueryOptions) assert_own_property: interface prototype object missing non-static operation expected property "match" missing +FAIL BackgroundFetchRegistration interface: operation matchAll(RequestInfo, CacheQueryOptions) assert_own_property: interface prototype object missing non-static operation expected property "matchAll" missing +FAIL BackgroundFetchRecord interface: existence and properties of interface object assert_own_property: self does not have own property "BackgroundFetchRecord" expected property "BackgroundFetchRecord" missing +FAIL BackgroundFetchRecord interface object length assert_own_property: self does not have own property "BackgroundFetchRecord" expected property "BackgroundFetchRecord" missing +FAIL BackgroundFetchRecord interface object name assert_own_property: self does not have own property "BackgroundFetchRecord" expected property "BackgroundFetchRecord" missing +FAIL BackgroundFetchRecord interface: existence and properties of interface prototype object assert_own_property: self does not have own property "BackgroundFetchRecord" expected property "BackgroundFetchRecord" missing +FAIL BackgroundFetchRecord interface: existence and properties of interface prototype object's "constructor" property assert_own_property: self does not have own property "BackgroundFetchRecord" expected property "BackgroundFetchRecord" missing +FAIL BackgroundFetchRecord interface: existence and properties of interface prototype object's @@unscopables property assert_own_property: self does not have own property "BackgroundFetchRecord" expected property "BackgroundFetchRecord" missing +FAIL BackgroundFetchRecord interface: attribute request assert_own_property: self does not have own property "BackgroundFetchRecord" expected property "BackgroundFetchRecord" missing +FAIL BackgroundFetchRecord interface: attribute responseReady assert_own_property: self does not have own property "BackgroundFetchRecord" expected property "BackgroundFetchRecord" missing PASS BackgroundFetchEvent interface: existence and properties of interface object -PASS BackgroundFetchSettledEvent interface: existence and properties of interface object -PASS BackgroundFetchSettledFetches interface: existence and properties of interface object -PASS BackgroundFetchSettledFetch interface: existence and properties of interface object -PASS BackgroundFetchUpdateEvent interface: existence and properties of interface object -PASS BackgroundFetchClickEvent interface: existence and properties of interface object +PASS BackgroundFetchUpdateUIEvent interface: existence and properties of interface object PASS ServiceWorkerRegistration interface: attribute backgroundFetch PASS ServiceWorkerGlobalScope interface: existence and properties of interface object PASS ExtendableEvent interface: existence and properties of interface object
diff --git a/third_party/WebKit/LayoutTests/external/wpt/background-fetch/service_workers/sw-update-ui.js b/third_party/WebKit/LayoutTests/external/wpt/background-fetch/service_workers/sw-update-ui.js index ae0ed09..5dec087 100644 --- a/third_party/WebKit/LayoutTests/external/wpt/background-fetch/service_workers/sw-update-ui.js +++ b/third_party/WebKit/LayoutTests/external/wpt/background-fetch/service_workers/sw-update-ui.js
@@ -2,7 +2,7 @@ async function updateUI(event) { let updateParams = []; - switch (event.id) { + switch (event.registration.id) { case 'update-once': updateParams = [{title: 'Title1'}]; break; @@ -16,7 +16,7 @@ .catch(e => e.message); } -self.addEventListener('backgroundfetched', event => { +self.addEventListener('backgroundfetchsuccess', event => { event.waitUntil(updateUI(event) .then(update => sendMessageToDocument({ type: event.type, update }))) });
diff --git a/third_party/WebKit/LayoutTests/external/wpt/background-fetch/service_workers/sw.js b/third_party/WebKit/LayoutTests/external/wpt/background-fetch/service_workers/sw.js index 34ea5d4f..10e17f5 100644 --- a/third_party/WebKit/LayoutTests/external/wpt/background-fetch/service_workers/sw.js +++ b/third_party/WebKit/LayoutTests/external/wpt/background-fetch/service_workers/sw.js
@@ -1,3 +1,4 @@ + importScripts('sw-helpers.js'); async function getFetchResult(settledFetch) { @@ -11,7 +12,7 @@ }; } -self.addEventListener('backgroundfetched', event => { +self.addEventListener('backgroundfetchsuccess', event => { event.waitUntil( event.fetches.values() .then(fetches => Promise.all(fetches.map(fetch => getFetchResult(fetch))))
diff --git a/third_party/WebKit/LayoutTests/external/wpt/background-fetch/update-ui.https.window.js b/third_party/WebKit/LayoutTests/external/wpt/background-fetch/update-ui.https.window.js index d561267..aed0bb8 100644 --- a/third_party/WebKit/LayoutTests/external/wpt/background-fetch/update-ui.https.window.js +++ b/third_party/WebKit/LayoutTests/external/wpt/background-fetch/update-ui.https.window.js
@@ -2,7 +2,7 @@ // META: script=resources/utils.js 'use strict'; -// Covers functionality provided by BackgroundFetchUpdateEvent.updateUI(). +// Covers functionality provided by BackgroundFetchUpdateUIEvent.updateUI(). // // https://wicg.github.io/background-fetch/#backgroundfetchupdateuievent
diff --git a/third_party/WebKit/LayoutTests/external/wpt/battery-status/battery-interface-idlharness.https.window-expected.txt b/third_party/WebKit/LayoutTests/external/wpt/battery-status/battery-interface-idlharness.https.window-expected.txt deleted file mode 100644 index 0d7b7da3..0000000 --- a/third_party/WebKit/LayoutTests/external/wpt/battery-status/battery-interface-idlharness.https.window-expected.txt +++ /dev/null
@@ -1,31 +0,0 @@ -This is a testharness.js-based test. -FAIL Test IDL implementation of Battery Status API promise_test: Unhandled rejection with value: object "Got an error before parsing any named definition: Unrecognised tokens, line 1 (tokens: "{\"error\": {\"message\"") -[ - { - "type": "{", - "value": "{", - "trivia": "" - }, - { - "type": "string", - "value": "\"error\"", - "trivia": "" - }, - { - "type": ":", - "value": ":", - "trivia": "" - }, - { - "type": "{", - "value": "{", - "trivia": " " - }, - { - "type": "string", - "value": "\"message\"", - "trivia": "" - } -]" -Harness: the test ran to completion. -
diff --git a/third_party/WebKit/LayoutTests/external/wpt/battery-status/battery-interface-idlharness.https.window.js b/third_party/WebKit/LayoutTests/external/wpt/battery-status/battery-interface-idlharness.https.window.js index 3db3e16e..b33c82e 100644 --- a/third_party/WebKit/LayoutTests/external/wpt/battery-status/battery-interface-idlharness.https.window.js +++ b/third_party/WebKit/LayoutTests/external/wpt/battery-status/battery-interface-idlharness.https.window.js
@@ -6,7 +6,7 @@ 'use strict'; idl_test( - ['battery'], + ['battery-status'], ['dom', 'html'], async idl_array => { idl_array.add_objects({ @@ -15,6 +15,5 @@ }) self.manager = await navigator.getBattery(); - }, - 'Test IDL implementation of Battery Status API' + } );
diff --git a/third_party/WebKit/LayoutTests/external/wpt/bluetooth/idl/idlharness.tentative.https.window-expected.txt b/third_party/WebKit/LayoutTests/external/wpt/bluetooth/idl/idlharness.tentative.https.window-expected.txt index d5eaf23..4a16e4f 100644 --- a/third_party/WebKit/LayoutTests/external/wpt/bluetooth/idl/idlharness.tentative.https.window-expected.txt +++ b/third_party/WebKit/LayoutTests/external/wpt/bluetooth/idl/idlharness.tentative.https.window-expected.txt
@@ -1,5 +1,5 @@ This is a testharness.js-based test. -PASS web-bluetooth interfaces. +PASS idl_test setup PASS Partial interface Navigator: original interface defined FAIL Bluetooth interface: existence and properties of interface object assert_equals: prototype of Bluetooth is not EventTarget expected function "function EventTarget() { [native code] }" but got function "function () { [native code] }" PASS Bluetooth interface object length
diff --git a/third_party/WebKit/LayoutTests/external/wpt/bluetooth/idl/idlharness.tentative.https.window.js b/third_party/WebKit/LayoutTests/external/wpt/bluetooth/idl/idlharness.tentative.https.window.js index 4bacd56..f4e6d95 100644 --- a/third_party/WebKit/LayoutTests/external/wpt/bluetooth/idl/idlharness.tentative.https.window.js +++ b/third_party/WebKit/LayoutTests/external/wpt/bluetooth/idl/idlharness.tentative.https.window.js
@@ -20,6 +20,5 @@ Bluetooth: ['navigator.bluetooth'], BluetoothAdvertisingEvent: ['event'], }); - }, - 'web-bluetooth interfaces.' + } );
diff --git a/third_party/WebKit/LayoutTests/external/wpt/content-security-policy/embedded-enforcement/idlharness.window.js b/third_party/WebKit/LayoutTests/external/wpt/content-security-policy/embedded-enforcement/idlharness.window.js index 6ac306c..2845f82 100644 --- a/third_party/WebKit/LayoutTests/external/wpt/content-security-policy/embedded-enforcement/idlharness.window.js +++ b/third_party/WebKit/LayoutTests/external/wpt/content-security-policy/embedded-enforcement/idlharness.window.js
@@ -12,6 +12,5 @@ idl_array.add_objects({ HTMLIFrameElement: ['document.createElement("iframe")'], }); - }, - 'csp-embedded-enforcement IDL' + } );
diff --git a/third_party/WebKit/LayoutTests/external/wpt/content-security-policy/securitypolicyviolation/idlharness.window.js b/third_party/WebKit/LayoutTests/external/wpt/content-security-policy/securitypolicyviolation/idlharness.window.js index 361282a..fc5e65d6c 100644 --- a/third_party/WebKit/LayoutTests/external/wpt/content-security-policy/securitypolicyviolation/idlharness.window.js +++ b/third_party/WebKit/LayoutTests/external/wpt/content-security-policy/securitypolicyviolation/idlharness.window.js
@@ -14,6 +14,5 @@ 'new SecurityPolicyViolationEvent("securitypolicyviolation")' ] }) - }, - 'Test Content Security Policy IDL implementation' + } );
diff --git a/third_party/WebKit/LayoutTests/external/wpt/content-security-policy/securitypolicyviolation/targeting.html b/third_party/WebKit/LayoutTests/external/wpt/content-security-policy/securitypolicyviolation/targeting.html index 10b96e9..28ca32e 100644 --- a/third_party/WebKit/LayoutTests/external/wpt/content-security-policy/securitypolicyviolation/targeting.html +++ b/third_party/WebKit/LayoutTests/external/wpt/content-security-policy/securitypolicyviolation/targeting.html
@@ -43,7 +43,7 @@ .then(t.step_func(e => { assert_equals(e.blockedURI, "inline"); assert_equals(e.lineNumber, 131); - assert_equals(e.columnNumber, 4); + assert_in_array(e.columnNumber, [4, 59]); assert_equals(e.target, document, "Elements created in this document, but pushed into a same-origin frame trigger on that frame's document, not on this frame's document."); return watcher.wait_for('securitypolicyviolation'); }))
diff --git a/third_party/WebKit/LayoutTests/external/wpt/cookie-store/idlharness.tentative.https.html b/third_party/WebKit/LayoutTests/external/wpt/cookie-store/idlharness.tentative.https.html index 864b699..fafe79a 100644 --- a/third_party/WebKit/LayoutTests/external/wpt/cookie-store/idlharness.tentative.https.html +++ b/third_party/WebKit/LayoutTests/external/wpt/cookie-store/idlharness.tentative.https.html
@@ -17,7 +17,6 @@ CookieStore: ['cookieStore'], CookieChangeEvent: ['new CookieChangeEvent("change")'], }); - }, - 'Interface test' + } ); </script>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/css-animations/idlharness-expected.txt b/third_party/WebKit/LayoutTests/external/wpt/css/css-animations/idlharness-expected.txt index 6522477..50b4cddb 100644 --- a/third_party/WebKit/LayoutTests/external/wpt/css/css-animations/idlharness-expected.txt +++ b/third_party/WebKit/LayoutTests/external/wpt/css/css-animations/idlharness-expected.txt
@@ -1,6 +1,6 @@ This is a testharness.js-based test. Found 71 tests; 62 PASS, 9 FAIL, 0 TIMEOUT, 0 NOTRUN. -PASS Test css-animations IDL implementation +PASS idl_test setup PASS Partial interface CSSRule: original interface defined PASS Partial interface mixin GlobalEventHandlers: original interface mixin defined PASS AnimationEvent interface: existence and properties of interface object
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/css-animations/idlharness.html b/third_party/WebKit/LayoutTests/external/wpt/css/css-animations/idlharness.html index b25b9704..1d3ed2b9 100644 --- a/third_party/WebKit/LayoutTests/external/wpt/css/css-animations/idlharness.html +++ b/third_party/WebKit/LayoutTests/external/wpt/css/css-animations/idlharness.html
@@ -39,8 +39,8 @@ CSSKeyframesRule: ['keyframes'], CSSKeyframeRule: ['keyframes.cssRules[0]'], }); - }, - 'Test css-animations IDL implementation'); + } + ); </script> </body>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/css-font-loading/idlharness.https.html b/third_party/WebKit/LayoutTests/external/wpt/css/css-font-loading/idlharness.https.html index 9e3d45fb..61a99e0 100644 --- a/third_party/WebKit/LayoutTests/external/wpt/css/css-font-loading/idlharness.https.html +++ b/third_party/WebKit/LayoutTests/external/wpt/css/css-font-loading/idlharness.https.html
@@ -18,7 +18,6 @@ FontFaceSetLoadEvent: ['new FontFaceSetLoadEvent("type")'], FontFaceSet: ['document.fonts'], }); - }, - 'css-font-loading interfaces' + } ); </script>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/css-images/idlharness.html b/third_party/WebKit/LayoutTests/external/wpt/css/css-images/idlharness.html index ec9c358..17bccbd 100644 --- a/third_party/WebKit/LayoutTests/external/wpt/css/css-images/idlharness.html +++ b/third_party/WebKit/LayoutTests/external/wpt/css/css-images/idlharness.html
@@ -13,7 +13,6 @@ ['cssom'], idl_array => { // No objects, - }, - 'Test IDL implementation of css-masking' + } ); </script>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/css-logical/animation-004.html b/third_party/WebKit/LayoutTests/external/wpt/css/css-logical/animation-004.html new file mode 100644 index 0000000..48cb58a --- /dev/null +++ b/third_party/WebKit/LayoutTests/external/wpt/css/css-logical/animation-004.html
@@ -0,0 +1,250 @@ +<!doctype html> +<meta charset=utf-8> +<title>Animating CSS logical properties using CSS Transitions</title> +<link rel="help" href="https://drafts.csswg.org/css-logical/#box"> +<meta name="assert" content="The specified values of these properties are separate from the specified values of the parallel physical properties, but the flow-relative and physical properties share computed values."> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="../css-animations/support/testcommon.js"></script> + +<div id="log"></div> +<div id="test"></div> +<script> +'use strict'; + +const testEl = document.getElementById("test"); + +function makeDeclaration(object = {}) { + return Object.entries(object).map(([prop, val]) => prop + ": " + val).join("; "); +} + +/** + * Starts a CSS transition in testEl. By default, the transition will affect the properies + * specified in finalStyles, be linear, last 10 seconds and start halfway, but this can be + * overridden in baseStyles. + * + * @param t The testharness.js Test object. + * @param baseStyles A dictionary object with property names and values to set on the + * element before starting the transition. + * @param finalStyles A dictionary object with property names and values towards which + * the element will transition. + */ +function transition(t, baseStyles, finalStyles) { + // Clear styles from previous test. + testEl.style.cssText = ""; + testEl.className = ""; + getComputedStyle(testEl).height; + + // Set base styles + const defaultTransition = { + "transition-property": Object.keys(finalStyles).join(", "), + "transition-timing-function": "linear", + "transition-duration": "10s", + "transition-delay": "-5s", + }; + addStyle(t, { + "#test": makeDeclaration(Object.assign(defaultTransition, baseStyles)), + "#test.transition": makeDeclaration(finalStyles), + }); + getComputedStyle(testEl).height; + + // Start the transition + testEl.className = "transition"; +} + +test(t => { + transition(t, { + "block-size": "0px", + }, { + "block-size": "100px", + }); + assert_equals(getComputedStyle(testEl).height, '50px'); +}, 'Logical properties can be transitioned'); + +test(t => { + transition(t, { + "block-size": "0px", + "writing-mode": "vertical-rl", + }, { + "block-size": "100px", + }); + assert_equals(getComputedStyle(testEl).width, '50px'); + assert_equals(getComputedStyle(testEl).height, '0px'); +}, 'Logical properties in transitions respect the writing-mode'); + +test(t => { + transition(t, { + "margin-inline-start": "0px", + "direction": "rtl", + }, { + "margin-inline-start": "100px", + }); + assert_equals(getComputedStyle(testEl).marginLeft, '0px'); + assert_equals(getComputedStyle(testEl).marginRight, '50px'); +}, 'Logical properties in transitions respect the direction'); + +test(t => { + transition(t, { + "block-size": "0px", + "height": "200px", + }, { + "block-size": "100px", + "height": "300px", + }); + assert_equals(getComputedStyle(testEl).height, '250px'); +}, 'Declaration order is respected within declaration blocks'); + +test(t => { + transition(t, { + "transition-timing-function": "step-start", + }, { + "margin-top": "200px", + "margin-block-start": "100px" + }); + assert_equals(getComputedStyle(testEl).marginTop, '100px'); +}, 'Logical properties are able to override physical properties in declaration blocks'); + +test(t => { + transition(t, { + "transition-timing-function": "step-start", + }, { + "margin-inline": "200px", + "margin-inline-start": "0px", + "margin-inline-start": "100px", + }); + assert_equals(getComputedStyle(testEl).marginLeft, '100px'); +}, 'Declaration order is respected amongst logical properties within declaration blocks'); + +test(t => { + transition(t, { + "block-size": "200px", + }, { + "height": "300px", + }); + assert_equals(getComputedStyle(testEl).height, '250px'); +}, 'Physical properties and logical properties can be mixed'); + +test(t => { + transition(t, { + "height": "100px", + "block-size": "200px", + }, { + "block-size": "100px", + "height": "300px", + }); + assert_equals(getComputedStyle(testEl).height, '250px'); +}, 'Declaration order is respected on each keyframe individually'); + +test(t => { + transition(t, { + "width": "0px", + "height": "0px", + "block-size": "0px", + }, { + "block-size": "100px", + }); + assert_equals(getComputedStyle(testEl).width, '0px'); + assert_equals(getComputedStyle(testEl).height, '50px'); + + testEl.style.writingMode = 'vertical-rl'; + assert_equals(getComputedStyle(testEl).width, '50px'); + assert_equals(getComputedStyle(testEl).height, '0px'); +}, 'Transitions update when the writing-mode is changed'); + +promise_test(async t => { + transition(t, { + "transition-delay": "-9.9s", + "width": "0px", + "height": "0px", + "block-size": "0px", + }, { + "block-size": "100px", + }); + const watcher = new EventWatcher(t, testEl, [ 'transitionend' ]); + await watcher.wait_for('transitionend'); + + assert_equals(getComputedStyle(testEl).width, '0px'); + assert_equals(getComputedStyle(testEl).height, '100px'); + + testEl.style.transition = 'none'; + testEl.style.writingMode = 'vertical-rl'; + assert_equals(getComputedStyle(testEl).width, '100px'); + assert_equals(getComputedStyle(testEl).height, '0px'); +}, 'Filling transitions update when the writing-mode is changed'); + +test(t => { + transition(t, { + "width": "0px", + "height": "0px", + }, { + "block-size": "100px", + "height": "200px", + }); + + // Initially we are interpolating the height from 0 to 200px + assert_equals(getComputedStyle(testEl).width, '0px'); + assert_equals(getComputedStyle(testEl).height, '100px'); + + // But once we change the writing-mode, we will be interpolating *both* + // the height (from 0px to 200px) *and* the width (from 0px to 100px). + testEl.style.writingMode = 'vertical-rl'; + assert_equals(getComputedStyle(testEl).width, '50px'); + assert_equals(getComputedStyle(testEl).height, '100px'); +}, 'The number of interpolating properties can be increased when the' + + ' writing-mode is changed'); + +test(t => { + transition(t, { + "width": "100px", + "height": "100px", + }, { + "width": "500px", + "block-size": "200px", + }); + + // Initially we are interpolating the width (100px -> 500px) and the height + // (100px -> 200px). + assert_equals(getComputedStyle(testEl).width, '300px'); + assert_equals(getComputedStyle(testEl).height, '150px'); + + // Once we change the writing-mode, we will be interpolating *only* the + // width (300px -> 200px). + testEl.style.writingMode = 'vertical-rl'; + assert_equals(getComputedStyle(testEl).width, '250px'); + assert_equals(getComputedStyle(testEl).height, '100px'); +}, 'The number of interpolating properties can be decreased when the' + + ' writing-mode is changed'); + +test(t => { + addStyle(t, { ':root': '--writingMode: horizontal-tb' }); + transition(t, { + "width": "0px", + "height": "0px", + "writing-mode": "var(--writingMode)", + "block-size": "0px", + }, { + "block-size": "100px" + }); + assert_equals(getComputedStyle(testEl).width, '0px'); + assert_equals(getComputedStyle(testEl).height, '50px'); + + testEl.style.setProperty('--writingMode', 'vertical-rl'); + assert_equals(getComputedStyle(testEl).width, '50px'); + assert_equals(getComputedStyle(testEl).height, '0px'); +}, 'Transitions update when the writing-mode is changed through a CSS variable'); + +test(t => { + transition(t, { + "margin-inline-start": "0px", + }, { + "margin-inline-start": "100px", + }); + assert_equals(getComputedStyle(testEl).marginLeft, '50px'); + assert_equals(getComputedStyle(testEl).marginRight, '0px'); + + testEl.style.direction = 'rtl'; + assert_equals(getComputedStyle(testEl).marginLeft, '0px'); + assert_equals(getComputedStyle(testEl).marginRight, '50px'); +}, 'Transitions update when the direction is changed'); + +</script>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/css-masking/idlharness-expected.txt b/third_party/WebKit/LayoutTests/external/wpt/css/css-masking/idlharness-expected.txt index 968bafc..002bd39 100644 --- a/third_party/WebKit/LayoutTests/external/wpt/css/css-masking/idlharness-expected.txt +++ b/third_party/WebKit/LayoutTests/external/wpt/css/css-masking/idlharness-expected.txt
@@ -1,5 +1,5 @@ This is a testharness.js-based test. -PASS Test IDL implementation of css-masking +PASS idl_test setup FAIL SVGClipPathElement interface: existence and properties of interface object assert_equals: prototype of SVGClipPathElement is not SVGElement expected function "function SVGElement() { [native code] }" but got function "function SVGGraphicsElement() { [native code] }" PASS SVGClipPathElement interface object length PASS SVGClipPathElement interface object name
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/css-masking/idlharness.html b/third_party/WebKit/LayoutTests/external/wpt/css/css-masking/idlharness.html index 41bab663..c415eaaa 100644 --- a/third_party/WebKit/LayoutTests/external/wpt/css/css-masking/idlharness.html +++ b/third_party/WebKit/LayoutTests/external/wpt/css/css-masking/idlharness.html
@@ -17,8 +17,7 @@ SVGClipPathElement: [document.querySelector('#clip1')], SVGMaskElement: [document.querySelector('#mask1')], }); - }, - 'Test IDL implementation of css-masking' + } ); </script>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/css-paint-api/idlharness-expected.txt b/third_party/WebKit/LayoutTests/external/wpt/css/css-paint-api/idlharness-expected.txt index f20efbb..338b395f 100644 --- a/third_party/WebKit/LayoutTests/external/wpt/css/css-paint-api/idlharness-expected.txt +++ b/third_party/WebKit/LayoutTests/external/wpt/css/css-paint-api/idlharness-expected.txt
@@ -1,6 +1,6 @@ This is a testharness.js-based test. PASS Test IDL implementation of CSS Painting API -FAIL Partial interface CSS: original interface defined assert_true: Original CSS definition should have type interface expected true got false +PASS Partial namespace CSS: original namespace defined PASS PaintWorkletGlobalScope interface: existence and properties of interface object PASS PaintRenderingContext2D interface: existence and properties of interface object PASS PaintSize interface: existence and properties of interface object
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/css-parser-api/idlharness-expected.txt b/third_party/WebKit/LayoutTests/external/wpt/css/css-parser-api/idlharness-expected.txt index db70925..9b41e082 100644 --- a/third_party/WebKit/LayoutTests/external/wpt/css/css-parser-api/idlharness-expected.txt +++ b/third_party/WebKit/LayoutTests/external/wpt/css/css-parser-api/idlharness-expected.txt
@@ -1,6 +1,6 @@ This is a testharness.js-based test. Found 69 tests; 3 PASS, 66 FAIL, 0 TIMEOUT, 0 NOTRUN. -PASS CSS-Parser-API interfaces +PASS idl_test setup PASS Partial namespace CSS: original namespace defined FAIL CSSParserRule interface: existence and properties of interface object assert_own_property: self does not have own property "CSSParserRule" expected property "CSSParserRule" missing FAIL CSSParserRule interface object length assert_own_property: self does not have own property "CSSParserRule" expected property "CSSParserRule" missing
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/css-parser-api/idlharness.html b/third_party/WebKit/LayoutTests/external/wpt/css/css-parser-api/idlharness.html index 79b6079..078a108 100644 --- a/third_party/WebKit/LayoutTests/external/wpt/css/css-parser-api/idlharness.html +++ b/third_party/WebKit/LayoutTests/external/wpt/css/css-parser-api/idlharness.html
@@ -13,7 +13,6 @@ ['cssom'], idl_array => { // No objects - }, - 'CSS-Parser-API interfaces' + } ); </script>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/css-properties-values-api/typedom.tentative.html b/third_party/WebKit/LayoutTests/external/wpt/css/css-properties-values-api/typedom.tentative.html index 9fff080..0652806 100644 --- a/third_party/WebKit/LayoutTests/external/wpt/css/css-properties-values-api/typedom.tentative.html +++ b/third_party/WebKit/LayoutTests/external/wpt/css/css-properties-values-api/typedom.tentative.html
@@ -13,16 +13,22 @@ // Properties are generated on demand, as `--prop-${g_counter}`. let g_counter = 1; +// Generate a new property name. +function gen_name() { + let name = `--prop-${g_counter}`; + g_counter++; + return name; +} + // Generate a property and return its name. function gen_prop(syntax, initialValue) { - let name = `--prop-${g_counter}`; + let name = gen_name(); CSS.registerProperty({ name: name, syntax: syntax, initialValue: initialValue, inherits: false }); - g_counter++; return name; } @@ -50,6 +56,28 @@ } } +function assert_attribute_get_type(syntax, value, expected) { + let name = gen_name(); + target.style = `${name}: ${value}`; + + assert_true(target.attributeStyleMap.get(name) instanceof CSSUnparsedValue); + + CSS.registerProperty({ + name: name, + syntax: syntax, + initialValue: value, + inherits: false + }); + + if (expected == CSSStyleValue) { + assert_false(target.attributeStyleMap.get(name) instanceof CSSUnparsedValue); + } + + assert_true(target.attributeStyleMap.get(name) instanceof expected); +} + +// computedStyleMap + test(function(){ let name = gen_prop('*', 'if(){}'); assert_true(target.computedStyleMap().get(name) instanceof CSSUnparsedValue); @@ -164,4 +192,110 @@ assert_true(target.computedStyleMap().getAll(name).every(x => x instanceof CSSUnitValue)); }, 'All computed values correctly reified in comma-separated list'); +// attributeStyleMap.get + +test(function(){ + let name1 = gen_prop('<length>', '100px'); + let name2 = gen_prop('<length>', '0px'); + target.style = `${name2}: var(${name1})`; + assert_true(target.attributeStyleMap.get(name2) instanceof CSSUnparsedValue); +}, 'attributeStyleMap.get returns CSSUnparsedValue for value with var references'); + +test(function(){ + let name1 = gen_prop('<length>', '100px'); + let name2 = gen_prop('<length>#', '0px'); + target.style = `${name2}: 1px, var(${name1}), 3px`; + assert_true(target.attributeStyleMap.get(name2) instanceof CSSUnparsedValue); +}, 'attributeStyleMap.get returns CSSUnparsedValue for value with var reference in list'); + +test(function(){ + assert_attribute_get_type('*', 'if(){}', CSSUnparsedValue); +}, 'attributeStyleMap.get returns CSSUnparsedValue for *'); + +test(function(){ + assert_attribute_get_type('<angle>', '42deg', CSSUnitValue); +}, 'attributeStyleMap.get returns CSSUnitValue for <angle>'); + +test(function(){ + assert_attribute_get_type('<color>', '#fefefe', CSSStyleValue); +}, 'attributeStyleMap.get returns CSSStyleValue for <color>'); + +test(function(){ + assert_attribute_get_type('<custom-ident>', 'none', CSSKeywordValue); +}, 'attributeStyleMap.get returns CSSKeywordValue for <custom-ident>'); + +test(function(){ + assert_attribute_get_type('<image>', 'url(thing.png)', CSSImageValue); +}, 'attributeStyleMap.get returns CSSImageValue for <image>'); + +test(function(){ + assert_attribute_get_type('<integer>', '100', CSSUnitValue); +}, 'attributeStyleMap.get returns CSSUnitValue for <integer>'); + +test(function(){ + assert_attribute_get_type('<length-percentage>', '10%', CSSUnitValue); +}, 'attributeStyleMap.get returns CSSUnitValue for <length-percentage> [10%]'); + +test(function(){ + assert_attribute_get_type('<length-percentage>', '10px', CSSUnitValue); +}, 'attributeStyleMap.get returns CSSUnitValue for <length-percentage> [10px]'); + +test(function(){ + assert_attribute_get_type('<length-percentage>', 'calc(10px + 10%)', CSSMathSum); +}, 'attributeStyleMap.get returns CSSMathSum for <length-percentage> [calc(10px + 10%)]'); + +test(function(){ + assert_attribute_get_type('<length>', '10px', CSSUnitValue); +}, 'attributeStyleMap.get returns CSSUnitValue for <length>'); + +test(function(){ + assert_attribute_get_type('<number>', '42', CSSUnitValue); +}, 'attributeStyleMap.get returns CSSUnitValue for <number>'); + +test(function(){ + assert_attribute_get_type('<percentage>', '10%', CSSUnitValue); +}, 'attributeStyleMap.get returns CSSUnitValue for <percentage>'); + +test(function(){ + assert_attribute_get_type('<resolution>', '300dpi', CSSUnitValue); +}, 'attributeStyleMap.get returns CSSUnitValue for <resolution>'); + +test(function(){ + assert_attribute_get_type('<time>', '42s', CSSUnitValue); +}, 'attributeStyleMap.get returns CSSUnitValue for <time>'); + +test(function(){ + assert_attribute_get_type('<url>', 'url(a)', CSSStyleValue); +}, 'attributeStyleMap.get returns CSSStyleValue for <url>'); + +test(function(){ + assert_attribute_get_type('thing1 | THING2', 'thing1', CSSKeywordValue); +}, 'attributeStyleMap.get returns CSSKeywordValue for thing1 | THING2'); + +test(function(){ + assert_attribute_get_type('<length>+', '10px 20px', CSSUnitValue); +}, 'attributeStyleMap.get returns CSSUnitValue for <length>+'); + +test(function(){ + assert_attribute_get_type('<length>#', '10px 20px', CSSUnitValue); +}, 'attributeStyleMap.get returns CSSUnitValue for <length>#'); + +// attributeStyleMap.getAll + +test(function(){ + let name = gen_prop('<length>+', '0px'); + target.attributeStyleMap.clear(); + target.attributeStyleMap.set(name, '10px 20px 30px'); + assert_equals(target.attributeStyleMap.getAll(name).length, 3); + assert_true(target.attributeStyleMap.getAll(name).every(x => x instanceof CSSUnitValue)); +}, 'attributeStyleMap.getAll returns a list of CSSUnitValues for <length>+'); + +test(function(){ + let name = gen_prop('<length>#', '0px'); + target.attributeStyleMap.clear(); + target.attributeStyleMap.set(name, '10px, 20px, 30px'); + assert_equals(target.attributeStyleMap.getAll(name).length, 3); + assert_true(target.attributeStyleMap.getAll(name).every(x => x instanceof CSSUnitValue)); +}, 'attributeStyleMap.getAll returns a list of CSSUnitValues for <length>#'); + </script>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/css-properties-values-api/var-reference-registered-properties.html b/third_party/WebKit/LayoutTests/external/wpt/css/css-properties-values-api/var-reference-registered-properties.html index 77ae299..d8a83157 100644 --- a/third_party/WebKit/LayoutTests/external/wpt/css/css-properties-values-api/var-reference-registered-properties.html +++ b/third_party/WebKit/LayoutTests/external/wpt/css/css-properties-values-api/var-reference-registered-properties.html
@@ -22,6 +22,10 @@ --registered-token-stream-1:var(--invalid); --registered-token-stream-2:var(--invalid,fallback); --token-stream-1:var(--registered-token-stream-1,moo); + + --registered-length-list-1: 1px, var(--registered-length-1), 2px; + --registered-length-list-2: 1px, var(--length-1), var(--registered-length-1), 2px; + --registered-length-list-3: var(--registered-length-list-1), var(--registered-length-list-2); } </style> <div id=element></div> @@ -58,4 +62,39 @@ assert_equals(computedStyle.getPropertyValue('--registered-token-stream-2'), 'fallback'); assert_equals(computedStyle.getPropertyValue('--token-stream-1'), 'moo'); }, "var() references work with registered properties"); + +test(function(){ + CSS.registerProperty({ + name: '--registered-length-list-1', + syntax: '<length>#', + initialValue: '0px', + inherits: false + }); + let computedStyle = getComputedStyle(element); + assert_equals(computedStyle.getPropertyValue('--registered-length-list-1'), '1px, 10px, 2px'); +}, 'References to registered var()-properties work in registered lists'); + +test(function(){ + CSS.registerProperty({ + name: '--registered-length-list-2', + syntax: '<length>#', + initialValue: '0px', + inherits: false + }); + let computedStyle = getComputedStyle(element); + assert_equals(computedStyle.getPropertyValue('--registered-length-list-2'), '1px, 20px, 10px, 2px'); +}, 'References to mixed registered and unregistered var()-properties work in registered lists'); + +test(function(){ + CSS.registerProperty({ + name: '--registered-length-list-3', + syntax: '<length>#', + initialValue: '0px', + inherits: false + }); + let computedStyle = getComputedStyle(element); + assert_equals(computedStyle.getPropertyValue('--registered-length-list-3'), '1px, 10px, 2px, 1px, 20px, 10px, 2px'); +}, 'Registered lists may be concatenated'); + + </script>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/css-transitions/idlharness-expected.txt b/third_party/WebKit/LayoutTests/external/wpt/css/css-transitions/idlharness-expected.txt index 658befc..74256a1 100644 --- a/third_party/WebKit/LayoutTests/external/wpt/css/css-transitions/idlharness-expected.txt +++ b/third_party/WebKit/LayoutTests/external/wpt/css/css-transitions/idlharness-expected.txt
@@ -1,5 +1,5 @@ This is a testharness.js-based test. -PASS Test IDL implementation of css-transitions API +PASS idl_test setup PASS Partial interface GlobalEventHandlers: original interface defined PASS TransitionEvent interface: existence and properties of interface object PASS TransitionEvent interface object length
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/css-transitions/idlharness.html b/third_party/WebKit/LayoutTests/external/wpt/css/css-transitions/idlharness.html index 6856952c..4cc7ee5 100644 --- a/third_party/WebKit/LayoutTests/external/wpt/css/css-transitions/idlharness.html +++ b/third_party/WebKit/LayoutTests/external/wpt/css/css-transitions/idlharness.html
@@ -19,7 +19,6 @@ HTMLElement: ['document'], Window: ['window'], }) - }, - 'Test IDL implementation of css-transitions API' + } ); </script>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/css-typed-om/interfaces-expected.txt b/third_party/WebKit/LayoutTests/external/wpt/css/css-typed-om/interfaces-expected.txt index a1eac73..a52cd08 100644 --- a/third_party/WebKit/LayoutTests/external/wpt/css/css-typed-om/interfaces-expected.txt +++ b/third_party/WebKit/LayoutTests/external/wpt/css/css-typed-om/interfaces-expected.txt
@@ -1,6 +1,6 @@ This is a testharness.js-based test. Found 447 tests; 414 PASS, 33 FAIL, 0 TIMEOUT, 0 NOTRUN. -PASS CSS Typed OM IDL test +PASS idl_test setup PASS Partial interface Element: original interface defined PASS Partial interface CSSStyleRule: original interface defined PASS Partial interface ElementCSSInlineStyle: original interface defined
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/css-typed-om/interfaces.html b/third_party/WebKit/LayoutTests/external/wpt/css/css-typed-om/interfaces.html index d21f3f46..976bb32 100644 --- a/third_party/WebKit/LayoutTests/external/wpt/css/css-typed-om/interfaces.html +++ b/third_party/WebKit/LayoutTests/external/wpt/css/css-typed-om/interfaces.html
@@ -72,7 +72,6 @@ CSSPerspective: ['perspective'], CSSMatrixComponent: ['matrix'], }); - }, - 'CSS Typed OM IDL test' + } ); </script>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/cssom-view/interfaces-expected.txt b/third_party/WebKit/LayoutTests/external/wpt/css/cssom-view/interfaces-expected.txt index cc6fb85..eb20004 100644 --- a/third_party/WebKit/LayoutTests/external/wpt/css/cssom-view/interfaces-expected.txt +++ b/third_party/WebKit/LayoutTests/external/wpt/css/cssom-view/interfaces-expected.txt
@@ -1,6 +1,6 @@ This is a testharness.js-based test. Found 322 tests; 243 PASS, 79 FAIL, 0 TIMEOUT, 0 NOTRUN. -PASS cssom-view interfaces +PASS idl_test setup PASS Partial interface Window: original interface defined PASS Partial interface Document: original interface defined PASS Partial interface Element: original interface defined
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/cssom-view/interfaces.html b/third_party/WebKit/LayoutTests/external/wpt/css/cssom-view/interfaces.html index c545e32c..d3de0cfa 100644 --- a/third_party/WebKit/LayoutTests/external/wpt/css/cssom-view/interfaces.html +++ b/third_party/WebKit/LayoutTests/external/wpt/css/cssom-view/interfaces.html
@@ -40,7 +40,6 @@ }); await waitForLoad; - }, - 'cssom-view interfaces' + } ); </script>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/cssom/interfaces-expected.txt b/third_party/WebKit/LayoutTests/external/wpt/css/cssom/interfaces-expected.txt index fbc962c5..8c816a18 100644 --- a/third_party/WebKit/LayoutTests/external/wpt/css/cssom/interfaces-expected.txt +++ b/third_party/WebKit/LayoutTests/external/wpt/css/cssom/interfaces-expected.txt
@@ -1,6 +1,6 @@ This is a testharness.js-based test. Found 377 tests; 322 PASS, 55 FAIL, 0 TIMEOUT, 0 NOTRUN. -PASS Test driver +PASS idl_test setup PASS Partial interface Document: original interface defined PASS Partial interface Window: original interface defined PASS MediaList interface: existence and properties of interface object
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/cssom/interfaces.html b/third_party/WebKit/LayoutTests/external/wpt/css/cssom/interfaces.html index d409e481..3204fb8 100644 --- a/third_party/WebKit/LayoutTests/external/wpt/css/cssom/interfaces.html +++ b/third_party/WebKit/LayoutTests/external/wpt/css/cssom/interfaces.html
@@ -70,8 +70,7 @@ self.sheet = style_element.sheet; self.svg_element = document.getElementById('svgElement'); self.xmlss_pi = document.getElementById('xmlssPiIframe').contentDocument.firstChild; - }, - 'Test driver' + } ); </script>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/dom/nodes/attributes.html b/third_party/WebKit/LayoutTests/external/wpt/dom/nodes/attributes.html index 21188933..dac191b5 100644 --- a/third_party/WebKit/LayoutTests/external/wpt/dom/nodes/attributes.html +++ b/third_party/WebKit/LayoutTests/external/wpt/dom/nodes/attributes.html
@@ -604,7 +604,7 @@ test(function() { var el = document.createElement("div"); var other = document.createElement("div"); - attr = document.createAttribute("foo"); + var attr = document.createAttribute("foo"); assert_equals(el.setAttributeNode(attr), null); assert_equals(attr.ownerElement, el); assert_throws("INUSE_ATTRIBUTE_ERR", @@ -614,7 +614,7 @@ test(function() { var el = document.createElement("div"); - attr = document.createAttribute("foo"); + var attr = document.createAttribute("foo"); assert_equals(el.setAttributeNode(attr), null); el.setAttribute("bar", "qux"); assert_equals(el.setAttributeNode(attr), attr);
diff --git a/third_party/WebKit/LayoutTests/external/wpt/domparsing/interfaces.any.js b/third_party/WebKit/LayoutTests/external/wpt/domparsing/interfaces.any.js index f01aff0..870c165 100644 --- a/third_party/WebKit/LayoutTests/external/wpt/domparsing/interfaces.any.js +++ b/third_party/WebKit/LayoutTests/external/wpt/domparsing/interfaces.any.js
@@ -15,5 +15,5 @@ Range: ['new Range()'], XMLSerializer: ['new XMLSerializer()'], }) - }, - 'DOM-Parsing interfaces'); + } +);
diff --git a/third_party/WebKit/LayoutTests/external/wpt/domparsing/interfaces.any.worker-expected.txt b/third_party/WebKit/LayoutTests/external/wpt/domparsing/interfaces.any.worker-expected.txt index d87eba3..a7bebc63 100644 --- a/third_party/WebKit/LayoutTests/external/wpt/domparsing/interfaces.any.worker-expected.txt +++ b/third_party/WebKit/LayoutTests/external/wpt/domparsing/interfaces.any.worker-expected.txt
@@ -1,5 +1,5 @@ This is a testharness.js-based test. -PASS DOM-Parsing interfaces +PASS idl_test setup PASS Partial interface Element: original interface defined PASS Partial interface Range: original interface defined PASS DOMParser interface: existence and properties of interface object
diff --git a/third_party/WebKit/LayoutTests/external/wpt/encoding/remove-only-one-bom-expected.txt b/third_party/WebKit/LayoutTests/external/wpt/encoding/remove-only-one-bom-expected.txt new file mode 100644 index 0000000..4840591 --- /dev/null +++ b/third_party/WebKit/LayoutTests/external/wpt/encoding/remove-only-one-bom-expected.txt
@@ -0,0 +1,6 @@ +This is a testharness.js-based test. +PASS Should have removed only one BOM from frame 0 +FAIL Should have removed only one BOM from frame 1 assert_equals: expected "" but got "\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd" +FAIL Should have removed only one BOM from frame 2 assert_equals: expected "" but got "\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd" +Harness: the test ran to completion. +
diff --git a/third_party/WebKit/LayoutTests/external/wpt/encoding/remove-only-one-bom.html b/third_party/WebKit/LayoutTests/external/wpt/encoding/remove-only-one-bom.html new file mode 100644 index 0000000..8b91f7f3 --- /dev/null +++ b/third_party/WebKit/LayoutTests/external/wpt/encoding/remove-only-one-bom.html
@@ -0,0 +1,20 @@ +<!doctype html> +<meta charset=utf-8> +<title></title> +<script src=/resources/testharness.js></script> +<script src=/resources/testharnessreport.js></script> +<script> +setup({explicit_done:true}); +function runTests() { + for (var i = 0; i < window.frames.length; i++) { + test(function() { + assert_equals(window.frames[i].window.document.body.textContent, "\uFEFF"); + }, "Should have removed only one BOM from frame " + i); + } + done(); +} +</script> +<body onload="runTests()"> +<iframe src="resources/two-boms-utf-8.html"></iframe> +<iframe src="resources/two-boms-utf-16le.html"></iframe> +<iframe src="resources/two-boms-utf-16be.html"></iframe>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/encoding/resources/two-boms-utf-16be.html b/third_party/WebKit/LayoutTests/external/wpt/encoding/resources/two-boms-utf-16be.html new file mode 100644 index 0000000..b8c055b --- /dev/null +++ b/third_party/WebKit/LayoutTests/external/wpt/encoding/resources/two-boms-utf-16be.html
@@ -0,0 +1 @@ +í³¾í³¿í³¾í³¿ \ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/encoding/resources/two-boms-utf-16le.html b/third_party/WebKit/LayoutTests/external/wpt/encoding/resources/two-boms-utf-16le.html new file mode 100644 index 0000000..8042f33 --- /dev/null +++ b/third_party/WebKit/LayoutTests/external/wpt/encoding/resources/two-boms-utf-16le.html
@@ -0,0 +1 @@ +í³¿í³¾í³¿í³¾ \ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/encoding/resources/two-boms-utf-8.html b/third_party/WebKit/LayoutTests/external/wpt/encoding/resources/two-boms-utf-8.html new file mode 100644 index 0000000..83ea941 --- /dev/null +++ b/third_party/WebKit/LayoutTests/external/wpt/encoding/resources/two-boms-utf-8.html
@@ -0,0 +1 @@ + \ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/fetch/api/idl.any-expected.txt b/third_party/WebKit/LayoutTests/external/wpt/fetch/api/idl.any-expected.txt index e8cf3cca..b013c5c 100644 --- a/third_party/WebKit/LayoutTests/external/wpt/fetch/api/idl.any-expected.txt +++ b/third_party/WebKit/LayoutTests/external/wpt/fetch/api/idl.any-expected.txt
@@ -1,6 +1,6 @@ This is a testharness.js-based test. Found 139 tests; 133 PASS, 6 FAIL, 0 TIMEOUT, 0 NOTRUN. -PASS Fetch Standard IDL +PASS idl_test setup PASS Partial interface mixin WindowOrWorkerGlobalScope: original interface mixin defined PASS Headers interface: existence and properties of interface object PASS Headers interface object length
diff --git a/third_party/WebKit/LayoutTests/external/wpt/fetch/api/idl.any.js b/third_party/WebKit/LayoutTests/external/wpt/fetch/api/idl.any.js index a3dec79..ccd4d2c 100644 --- a/third_party/WebKit/LayoutTests/external/wpt/fetch/api/idl.any.js +++ b/third_party/WebKit/LayoutTests/external/wpt/fetch/api/idl.any.js
@@ -16,6 +16,5 @@ } else if (self.GLOBAL.isWorker()) { idl_array.add_objects({ WorkerGlobalScope: ['self'] }); } - }, - 'Fetch Standard IDL' + } );
diff --git a/third_party/WebKit/LayoutTests/external/wpt/fetch/api/idl.any.sharedworker-expected.txt b/third_party/WebKit/LayoutTests/external/wpt/fetch/api/idl.any.sharedworker-expected.txt index 1afc369..20b02f1 100644 --- a/third_party/WebKit/LayoutTests/external/wpt/fetch/api/idl.any.sharedworker-expected.txt +++ b/third_party/WebKit/LayoutTests/external/wpt/fetch/api/idl.any.sharedworker-expected.txt
@@ -1,6 +1,6 @@ This is a testharness.js-based test. Found 150 tests; 144 PASS, 6 FAIL, 0 TIMEOUT, 0 NOTRUN. -PASS Fetch Standard IDL +PASS idl_test setup PASS Partial interface mixin WindowOrWorkerGlobalScope: original interface mixin defined PASS Headers interface: existence and properties of interface object PASS Headers interface object length
diff --git a/third_party/WebKit/LayoutTests/external/wpt/fetch/api/idl.any.worker-expected.txt b/third_party/WebKit/LayoutTests/external/wpt/fetch/api/idl.any.worker-expected.txt index 1afc369..20b02f1 100644 --- a/third_party/WebKit/LayoutTests/external/wpt/fetch/api/idl.any.worker-expected.txt +++ b/third_party/WebKit/LayoutTests/external/wpt/fetch/api/idl.any.worker-expected.txt
@@ -1,6 +1,6 @@ This is a testharness.js-based test. Found 150 tests; 144 PASS, 6 FAIL, 0 TIMEOUT, 0 NOTRUN. -PASS Fetch Standard IDL +PASS idl_test setup PASS Partial interface mixin WindowOrWorkerGlobalScope: original interface mixin defined PASS Headers interface: existence and properties of interface object PASS Headers interface object length
diff --git a/third_party/WebKit/LayoutTests/external/wpt/fetch/api/idl.https.any.serviceworker-expected.txt b/third_party/WebKit/LayoutTests/external/wpt/fetch/api/idl.https.any.serviceworker-expected.txt index e50aaa3..cf90de4 100644 --- a/third_party/WebKit/LayoutTests/external/wpt/fetch/api/idl.https.any.serviceworker-expected.txt +++ b/third_party/WebKit/LayoutTests/external/wpt/fetch/api/idl.https.any.serviceworker-expected.txt
@@ -1,5 +1,5 @@ This is a testharness.js-based test. -PASS Fetch Standard IDL +PASS idl_test setup PASS Partial interface mixin WindowOrWorkerGlobalScope: original interface mixin defined PASS Headers interface: existence and properties of interface object PASS Headers interface object length
diff --git a/third_party/WebKit/LayoutTests/external/wpt/fetch/cors-rfc1918/idlharness.tentative.any-expected.txt b/third_party/WebKit/LayoutTests/external/wpt/fetch/cors-rfc1918/idlharness.tentative.any-expected.txt index d4f8b849..afd0947 100644 --- a/third_party/WebKit/LayoutTests/external/wpt/fetch/cors-rfc1918/idlharness.tentative.any-expected.txt +++ b/third_party/WebKit/LayoutTests/external/wpt/fetch/cors-rfc1918/idlharness.tentative.any-expected.txt
@@ -1,5 +1,5 @@ This is a testharness.js-based test. -PASS Test CORS RFC1918 interfaces +PASS idl_test setup PASS Partial interface Document: original interface defined PASS Partial interface WorkerGlobalScope: original interface defined PASS WorkerGlobalScope interface: existence and properties of interface object
diff --git a/third_party/WebKit/LayoutTests/external/wpt/fetch/cors-rfc1918/idlharness.tentative.any.js b/third_party/WebKit/LayoutTests/external/wpt/fetch/cors-rfc1918/idlharness.tentative.any.js index b3b6f2b..88468dc1 100644 --- a/third_party/WebKit/LayoutTests/external/wpt/fetch/cors-rfc1918/idlharness.tentative.any.js +++ b/third_party/WebKit/LayoutTests/external/wpt/fetch/cors-rfc1918/idlharness.tentative.any.js
@@ -19,6 +19,5 @@ Document: ['document'], }); } - }, - 'Test CORS RFC1918 interfaces' + } );
diff --git a/third_party/WebKit/LayoutTests/external/wpt/fetch/cors-rfc1918/idlharness.tentative.any.sharedworker-expected.txt b/third_party/WebKit/LayoutTests/external/wpt/fetch/cors-rfc1918/idlharness.tentative.any.sharedworker-expected.txt index a01899d..2d89b44 100644 --- a/third_party/WebKit/LayoutTests/external/wpt/fetch/cors-rfc1918/idlharness.tentative.any.sharedworker-expected.txt +++ b/third_party/WebKit/LayoutTests/external/wpt/fetch/cors-rfc1918/idlharness.tentative.any.sharedworker-expected.txt
@@ -1,5 +1,5 @@ This is a testharness.js-based test. -PASS Test CORS RFC1918 interfaces +PASS idl_test setup PASS Partial interface Document: original interface defined PASS Partial interface WorkerGlobalScope: original interface defined PASS HTMLElement interface: existence and properties of interface object
diff --git a/third_party/WebKit/LayoutTests/external/wpt/fetch/cors-rfc1918/idlharness.tentative.any.worker-expected.txt b/third_party/WebKit/LayoutTests/external/wpt/fetch/cors-rfc1918/idlharness.tentative.any.worker-expected.txt index a01899d..2d89b44 100644 --- a/third_party/WebKit/LayoutTests/external/wpt/fetch/cors-rfc1918/idlharness.tentative.any.worker-expected.txt +++ b/third_party/WebKit/LayoutTests/external/wpt/fetch/cors-rfc1918/idlharness.tentative.any.worker-expected.txt
@@ -1,5 +1,5 @@ This is a testharness.js-based test. -PASS Test CORS RFC1918 interfaces +PASS idl_test setup PASS Partial interface Document: original interface defined PASS Partial interface WorkerGlobalScope: original interface defined PASS HTMLElement interface: existence and properties of interface object
diff --git a/third_party/WebKit/LayoutTests/external/wpt/fetch/cors-rfc1918/idlharness.tentative.https.any.serviceworker-expected.txt b/third_party/WebKit/LayoutTests/external/wpt/fetch/cors-rfc1918/idlharness.tentative.https.any.serviceworker-expected.txt index a01899d..2d89b44 100644 --- a/third_party/WebKit/LayoutTests/external/wpt/fetch/cors-rfc1918/idlharness.tentative.https.any.serviceworker-expected.txt +++ b/third_party/WebKit/LayoutTests/external/wpt/fetch/cors-rfc1918/idlharness.tentative.https.any.serviceworker-expected.txt
@@ -1,5 +1,5 @@ This is a testharness.js-based test. -PASS Test CORS RFC1918 interfaces +PASS idl_test setup PASS Partial interface Document: original interface defined PASS Partial interface WorkerGlobalScope: original interface defined PASS HTMLElement interface: existence and properties of interface object
diff --git a/third_party/WebKit/LayoutTests/external/wpt/gamepad/idlharness.window-expected.txt b/third_party/WebKit/LayoutTests/external/wpt/gamepad/idlharness.window-expected.txt index 2822972..dc95c50 100644 --- a/third_party/WebKit/LayoutTests/external/wpt/gamepad/idlharness.window-expected.txt +++ b/third_party/WebKit/LayoutTests/external/wpt/gamepad/idlharness.window-expected.txt
@@ -1,5 +1,5 @@ This is a testharness.js-based test. -PASS Test IDL implementation of Gamepad API +PASS idl_test setup PASS Partial interface Navigator: original interface defined PASS Partial interface Navigator: valid exposure set PASS Gamepad interface: existence and properties of interface object
diff --git a/third_party/WebKit/LayoutTests/external/wpt/gamepad/idlharness.window.js b/third_party/WebKit/LayoutTests/external/wpt/gamepad/idlharness.window.js index e2c0e2b..7943520 100644 --- a/third_party/WebKit/LayoutTests/external/wpt/gamepad/idlharness.window.js +++ b/third_party/WebKit/LayoutTests/external/wpt/gamepad/idlharness.window.js
@@ -13,6 +13,5 @@ GamepadEvent: ['new GamepadEvent("gamepad")'], Navigator: ['navigator'] }); - }, - 'Test IDL implementation of Gamepad API' + } );
diff --git a/third_party/WebKit/LayoutTests/external/wpt/generic-sensor/idlharness.https.window.js b/third_party/WebKit/LayoutTests/external/wpt/generic-sensor/idlharness.https.window.js index 8da0307..f591d755 100644 --- a/third_party/WebKit/LayoutTests/external/wpt/generic-sensor/idlharness.https.window.js +++ b/third_party/WebKit/LayoutTests/external/wpt/generic-sensor/idlharness.https.window.js
@@ -19,5 +19,5 @@ 'new SensorErrorEvent("error", { error: new DOMException });' ], }); - }, - 'Test IDL implementation of Generic Sensor'); + } +);
diff --git a/third_party/WebKit/LayoutTests/external/wpt/geolocation-sensor/idlharness.https.window-expected.txt b/third_party/WebKit/LayoutTests/external/wpt/geolocation-sensor/idlharness.https.window-expected.txt index b226e5e..d195a7fe 100644 --- a/third_party/WebKit/LayoutTests/external/wpt/geolocation-sensor/idlharness.https.window-expected.txt +++ b/third_party/WebKit/LayoutTests/external/wpt/geolocation-sensor/idlharness.https.window-expected.txt
@@ -1,5 +1,5 @@ This is a testharness.js-based test. -PASS Test IDL implementation of Geolocation Sensor +PASS idl_test setup FAIL GeolocationSensor interface: existence and properties of interface object assert_own_property: self does not have own property "GeolocationSensor" expected property "GeolocationSensor" missing FAIL GeolocationSensor interface object length assert_own_property: self does not have own property "GeolocationSensor" expected property "GeolocationSensor" missing FAIL GeolocationSensor interface object name assert_own_property: self does not have own property "GeolocationSensor" expected property "GeolocationSensor" missing
diff --git a/third_party/WebKit/LayoutTests/external/wpt/geolocation-sensor/idlharness.https.window.js b/third_party/WebKit/LayoutTests/external/wpt/geolocation-sensor/idlharness.https.window.js index eb3da34f..d843dc6 100644 --- a/third_party/WebKit/LayoutTests/external/wpt/geolocation-sensor/idlharness.https.window.js +++ b/third_party/WebKit/LayoutTests/external/wpt/geolocation-sensor/idlharness.https.window.js
@@ -12,6 +12,5 @@ idl_array.add_objects({ GeolocationSensor: ['new GeolocationSensor'], }); - }, - 'Test IDL implementation of Geolocation Sensor' + } );
diff --git a/third_party/WebKit/LayoutTests/external/wpt/gyroscope/idlharness.https.window.js b/third_party/WebKit/LayoutTests/external/wpt/gyroscope/idlharness.https.window.js index dfdac4e1..00f6696 100644 --- a/third_party/WebKit/LayoutTests/external/wpt/gyroscope/idlharness.https.window.js +++ b/third_party/WebKit/LayoutTests/external/wpt/gyroscope/idlharness.https.window.js
@@ -12,6 +12,5 @@ idl_array.add_objects({ Gyroscope: ['new Gyroscope();'] }); - }, - 'Test IDL implementation of Gyroscope Sensor' + } );
diff --git a/third_party/WebKit/LayoutTests/external/wpt/html-media-capture/idlharness.window-expected.txt b/third_party/WebKit/LayoutTests/external/wpt/html-media-capture/idlharness.window-expected.txt index dc579f49..b887ef5 100644 --- a/third_party/WebKit/LayoutTests/external/wpt/html-media-capture/idlharness.window-expected.txt +++ b/third_party/WebKit/LayoutTests/external/wpt/html-media-capture/idlharness.window-expected.txt
@@ -1,5 +1,5 @@ This is a testharness.js-based test. -PASS html-media-capture interfaces. +PASS idl_test setup PASS Partial interface HTMLInputElement: original interface defined FAIL HTMLInputElement interface: attribute capture assert_true: The prototype object must have a property "capture" expected true got false FAIL HTMLInputElement interface: input must inherit property "capture" with the proper type assert_inherits: property "capture" not found in prototype chain
diff --git a/third_party/WebKit/LayoutTests/external/wpt/html-media-capture/idlharness.window.js b/third_party/WebKit/LayoutTests/external/wpt/html-media-capture/idlharness.window.js index 5382f53..50faf835 100644 --- a/third_party/WebKit/LayoutTests/external/wpt/html-media-capture/idlharness.window.js +++ b/third_party/WebKit/LayoutTests/external/wpt/html-media-capture/idlharness.window.js
@@ -14,5 +14,5 @@ }); self.input = document.createElement('input'); - }, - 'html-media-capture interfaces.'); + } +);
diff --git a/third_party/WebKit/LayoutTests/external/wpt/html/browsers/browsing-the-web/unloading-documents/beforeunload-synchronous-expected.txt b/third_party/WebKit/LayoutTests/external/wpt/html/browsers/browsing-the-web/unloading-documents/beforeunload-synchronous-expected.txt new file mode 100644 index 0000000..06da69d --- /dev/null +++ b/third_party/WebKit/LayoutTests/external/wpt/html/browsers/browsing-the-web/unloading-documents/beforeunload-synchronous-expected.txt
@@ -0,0 +1,4 @@ +This is a testharness.js-based test. +FAIL beforeunload event is emitted synchronously assert_equals: invoked synchronously exactly once expected 1 but got 0 +Harness: the test ran to completion. +
diff --git a/third_party/WebKit/LayoutTests/external/wpt/html/browsers/browsing-the-web/unloading-documents/beforeunload-synchronous.html b/third_party/WebKit/LayoutTests/external/wpt/html/browsers/browsing-the-web/unloading-documents/beforeunload-synchronous.html new file mode 100644 index 0000000..6806eaf --- /dev/null +++ b/third_party/WebKit/LayoutTests/external/wpt/html/browsers/browsing-the-web/unloading-documents/beforeunload-synchronous.html
@@ -0,0 +1,33 @@ +<!DOCTYPE html> +<meta charset="utf-8"> +<title>beforeunload event is emitted synchronously</title> +<link rel="help" href="https://html.spec.whatwg.org/multipage/webappapis.html#the-event-handler-processing-algorithm"> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<body> +<script> +'use strict'; +// "navigate a browsing context" synchronously calls "prompt to unload", which +// synchronously calls "dispatch an event". + +async_test(function(t) { + var iframe = document.createElement('iframe'); + + iframe.onload = t.step_func(function() { + var callCount = 0; + + iframe.contentWindow.onbeforeunload = function() { + callCount += 1; + }; + + iframe.contentWindow.location.href = '/common/blank.html'; + + assert_equals(callCount, 1, 'invoked synchronously exactly once'); + + t.done(); + }); + + document.body.appendChild(iframe); +}); +</script> +</body>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/html/browsers/windows/auxiliary-browsing-contexts/opener-setter.html b/third_party/WebKit/LayoutTests/external/wpt/html/browsers/windows/auxiliary-browsing-contexts/opener-setter.html new file mode 100644 index 0000000..85c52e0b --- /dev/null +++ b/third_party/WebKit/LayoutTests/external/wpt/html/browsers/windows/auxiliary-browsing-contexts/opener-setter.html
@@ -0,0 +1,32 @@ +<!doctype html> +<html> + <head> + <title>Auxiliary Browing Contexts: window.opener setter</title> + <script src="/resources/testharness.js"></script> + <script src="/resources/testharnessreport.js"></script> + <script src="/common/PrefixedLocalStorage.js"></script> + </head> + <body> + <div id="log"></div> + <script> + var prefixedLocalStorage; + setup(() => prefixedLocalStorage = new PrefixedLocalStorageTest()); + async_test(t => { + t.add_cleanup(() => prefixedLocalStorage.cleanup()); + prefixedLocalStorage.onSet('openerIsNull', t.step_func_done(e => { + assert_equals(e.newValue, 'true'); + })); + window.open(prefixedLocalStorage.url('resources/opener-setter.html'), + 'iShouldSetOpenerToNull'); + }, 'Auxiliary browsing context created via `window.open` and setting `window.opener` to `null` should report `window.opener` `null`'); + async_test(t => { + t.add_cleanup(() => prefixedLocalStorage.cleanup()); + prefixedLocalStorage.onSet('openerIsTest', t.step_func_done(e => { + assert_equals(e.newValue, 'true'); + })); + window.open(prefixedLocalStorage.url('resources/opener-setter.html'), + 'iShouldSetOpenerToTest'); + }, 'Auxiliary browsing context created via `window.open` and setting `window.opener` to `test` should report `test`'); + </script> + </body> +</html>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/html/browsers/windows/auxiliary-browsing-contexts/resources/opener-setter.html b/third_party/WebKit/LayoutTests/external/wpt/html/browsers/windows/auxiliary-browsing-contexts/resources/opener-setter.html new file mode 100644 index 0000000..4112dae --- /dev/null +++ b/third_party/WebKit/LayoutTests/external/wpt/html/browsers/windows/auxiliary-browsing-contexts/resources/opener-setter.html
@@ -0,0 +1,23 @@ +<!doctype html> +<meta charset="utf-8"> +<html> +<p>This window should set the window.opener attribute</p> +<script src="/common/PrefixedLocalStorage.js"></script> +<script> +var prefixedLocalStorage = new PrefixedLocalStorageResource({ + close_on_cleanup: true +}); +function checkOpener () { + if (window.name == 'iShouldSetOpenerToNull') { + window.opener = null; + return prefixedLocalStorage.setItem('openerIsNull', window.opener === null); + } + if (window.name == 'iShouldSetOpenerToTest') { + window.opener = 'test'; + return prefixedLocalStorage.setItem('openerIsTest', window.opener === "test"); + } +} +</script> +<body onload="checkOpener()"> +</body> +</html>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/html/dom/elements/global-attributes/dir_auto-contained-script-R-ref.html b/third_party/WebKit/LayoutTests/external/wpt/html/dom/elements/global-attributes/dir_auto-contained-script-R-ref.html index 921f10a..aa27d2f 100644 --- a/third_party/WebKit/LayoutTests/external/wpt/html/dom/elements/global-attributes/dir_auto-contained-script-R-ref.html +++ b/third_party/WebKit/LayoutTests/external/wpt/html/dom/elements/global-attributes/dir_auto-contained-script-R-ref.html
@@ -28,6 +28,7 @@ display: none; } </style> + <script>var x;</script> </head> <body> <div class="instructions"><p>Test passes if the two boxes below look exactly the same.</p></div>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/html/dom/elements/global-attributes/dir_auto-contained-script-R.html b/third_party/WebKit/LayoutTests/external/wpt/html/dom/elements/global-attributes/dir_auto-contained-script-R.html index a76515d..ee00276 100644 --- a/third_party/WebKit/LayoutTests/external/wpt/html/dom/elements/global-attributes/dir_auto-contained-script-R.html +++ b/third_party/WebKit/LayoutTests/external/wpt/html/dom/elements/global-attributes/dir_auto-contained-script-R.html
@@ -29,6 +29,7 @@ display: none; } </style> + <script>var x;</script> </head> <body> <div class="instructions"><p>Test passes if the two boxes below look exactly the same.</p></div>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/html/dom/historical.html b/third_party/WebKit/LayoutTests/external/wpt/html/dom/historical.html index a36b4b2..b79d35f 100644 --- a/third_party/WebKit/LayoutTests/external/wpt/html/dom/historical.html +++ b/third_party/WebKit/LayoutTests/external/wpt/html/dom/historical.html
@@ -30,4 +30,13 @@ test(() => { assert_equals(self.getComputedStyle(document.getElementsByTagName("applet")[0], "").cssFloat, "none"); }, "applet is not styled") + +// removed in https://github.com/whatwg/html/commit/e383ae23776362cafb2fb4bbba70c8c9080d4b0f +test(() => { + assert_false("HTMLTableDataCellElement" in window); +}, "HTMLTableDataCellElement interface is removed") + +test(() => { + assert_false("HTMLTableHeaderCellElement" in window); +}, "HTMLTableHeaderCellElement interface is removed") </script>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/html/dom/interfaces.https.html b/third_party/WebKit/LayoutTests/external/wpt/html/dom/interfaces.https.html index 78f7d13..6b7e37bf 100644 --- a/third_party/WebKit/LayoutTests/external/wpt/html/dom/interfaces.https.html +++ b/third_party/WebKit/LayoutTests/external/wpt/html/dom/interfaces.https.html
@@ -216,8 +216,7 @@ }); idlArray.prevent_multiple_testing('HTMLElement'); await waitForLoad; - }, - 'html interfaces' + } ); </script>
diff --git "a/third_party/WebKit/LayoutTests/external/wpt/html/dom/interfaces.https_exclude=\050Document_Window_HTML._\051-expected.txt" "b/third_party/WebKit/LayoutTests/external/wpt/html/dom/interfaces.https_exclude=\050Document_Window_HTML._\051-expected.txt" index ec0075917..38d949359 100644 --- "a/third_party/WebKit/LayoutTests/external/wpt/html/dom/interfaces.https_exclude=\050Document_Window_HTML._\051-expected.txt" +++ "b/third_party/WebKit/LayoutTests/external/wpt/html/dom/interfaces.https_exclude=\050Document_Window_HTML._\051-expected.txt"
@@ -1,5 +1,5 @@ This is a testharness.js-based test. -FAIL html interfaces promise_test: Unhandled rejection with value: object "Got an error before parsing any named definition: Unrecognised tokens, line 1 (tokens: "{\"error\": {\"message\"") +FAIL idl_test setup promise_test: Unhandled rejection with value: object "Got an error before parsing any named definition: Unrecognised tokens, line 1 (tokens: "{\"error\": {\"message\"") [ { "type": "{",
diff --git "a/third_party/WebKit/LayoutTests/external/wpt/html/dom/interfaces.https_include=\050Document_Window\051-expected.txt" "b/third_party/WebKit/LayoutTests/external/wpt/html/dom/interfaces.https_include=\050Document_Window\051-expected.txt" index ec0075917..38d949359 100644 --- "a/third_party/WebKit/LayoutTests/external/wpt/html/dom/interfaces.https_include=\050Document_Window\051-expected.txt" +++ "b/third_party/WebKit/LayoutTests/external/wpt/html/dom/interfaces.https_include=\050Document_Window\051-expected.txt"
@@ -1,5 +1,5 @@ This is a testharness.js-based test. -FAIL html interfaces promise_test: Unhandled rejection with value: object "Got an error before parsing any named definition: Unrecognised tokens, line 1 (tokens: "{\"error\": {\"message\"") +FAIL idl_test setup promise_test: Unhandled rejection with value: object "Got an error before parsing any named definition: Unrecognised tokens, line 1 (tokens: "{\"error\": {\"message\"") [ { "type": "{",
diff --git a/third_party/WebKit/LayoutTests/external/wpt/html/dom/interfaces.https_include=HTML._-expected.txt b/third_party/WebKit/LayoutTests/external/wpt/html/dom/interfaces.https_include=HTML._-expected.txt index ec0075917..38d949359 100644 --- a/third_party/WebKit/LayoutTests/external/wpt/html/dom/interfaces.https_include=HTML._-expected.txt +++ b/third_party/WebKit/LayoutTests/external/wpt/html/dom/interfaces.https_include=HTML._-expected.txt
@@ -1,5 +1,5 @@ This is a testharness.js-based test. -FAIL html interfaces promise_test: Unhandled rejection with value: object "Got an error before parsing any named definition: Unrecognised tokens, line 1 (tokens: "{\"error\": {\"message\"") +FAIL idl_test setup promise_test: Unhandled rejection with value: object "Got an error before parsing any named definition: Unrecognised tokens, line 1 (tokens: "{\"error\": {\"message\"") [ { "type": "{",
diff --git a/third_party/WebKit/LayoutTests/external/wpt/html/semantics/forms/the-select-element/select-selectedOptions.html b/third_party/WebKit/LayoutTests/external/wpt/html/semantics/forms/the-select-element/select-selectedOptions.html index f8e577a8..6a5c75f 100644 --- a/third_party/WebKit/LayoutTests/external/wpt/html/semantics/forms/the-select-element/select-selectedOptions.html +++ b/third_party/WebKit/LayoutTests/external/wpt/html/semantics/forms/the-select-element/select-selectedOptions.html
@@ -114,12 +114,15 @@ test(() => { const select = document.getElementById("select-same-object-change"); const before = select.selectedOptions; + assert_equals(before.length, 3); select.selectedOptions[1].selected = false; const after = select.selectedOptions; assert_equals(before, after); + assert_equals(before.length, 2); + assert_equals(after.length, 2); }, ".selectedOptions should return the same object after selection changes - [SameObject]"); </script>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/html/syntax/parsing/meta-inhead-insertion-mode.html b/third_party/WebKit/LayoutTests/external/wpt/html/syntax/parsing/meta-inhead-insertion-mode.html new file mode 100644 index 0000000..4317e4eb --- /dev/null +++ b/third_party/WebKit/LayoutTests/external/wpt/html/syntax/parsing/meta-inhead-insertion-mode.html
@@ -0,0 +1,15 @@ +<!DOCTYPE html> +<html> +<head> +<title>Encoding specified in the "charset" attribute should have precedence over "content" attribute.</title> +<meta http-equiv="Content-Type" content="text/html; charset=koi8-r" charset="iso-8859-15"> +<link rel="help" href="https://html.spec.whatwg.org/multipage/parsing.html#parsing-main-inhead"> +<script src=/resources/testharness.js></script> +<script src=/resources/testharnessreport.js></script> +<script> +test(function () { + assert_equals(document.characterSet, "ISO-8859-15"); +}, "Encoding specified in the 'charset' attribute should have precedence over 'content' attribute."); +</script> +</body> +</html>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/interfaces/SVG.idl b/third_party/WebKit/LayoutTests/external/wpt/interfaces/SVG.idl index 2ab3741..01d87b86 100644 --- a/third_party/WebKit/LayoutTests/external/wpt/interfaces/SVG.idl +++ b/third_party/WebKit/LayoutTests/external/wpt/interfaces/SVG.idl
@@ -673,11 +673,16 @@ [Exposed=Window] interface SVGAElement : SVGGraphicsElement { [SameObject] readonly attribute SVGAnimatedString target; - [SameObject] readonly attribute SVGAnimatedString download; - [SameObject] readonly attribute SVGAnimatedString rel; - [SameObject] readonly attribute SVGAnimatedString relList; - [SameObject] readonly attribute SVGAnimatedString hreflang; - [SameObject] readonly attribute SVGAnimatedString type; + attribute DOMString download; + attribute USVString ping; + attribute DOMString rel; + [SameObject, PutsForward=value] readonly attribute DOMTokenList relList; + attribute DOMString hreflang; + attribute DOMString type; + + attribute DOMString text; + + attribute DOMString referrerPolicy; }; SVGAElement includes SVGURIReference;
diff --git a/third_party/WebKit/LayoutTests/external/wpt/interfaces/animation-worklet.idl b/third_party/WebKit/LayoutTests/external/wpt/interfaces/animation-worklet.idl index e0f5fc2..58d0bc5 100644 --- a/third_party/WebKit/LayoutTests/external/wpt/interfaces/animation-worklet.idl +++ b/third_party/WebKit/LayoutTests/external/wpt/interfaces/animation-worklet.idl
@@ -1,35 +1,31 @@ // GENERATED CONTENT - DO NOT EDIT -// Content of this file was automatically extracted from the -// "CSS Animation Worklet API" spec. -// See: https://wicg.github.io/animation-worklet/ +// Content was automatically extracted by Reffy into reffy-reports +// (https://github.com/tidoust/reffy-reports) +// Source: CSS Animation Worklet API (https://wicg.github.io/animation-worklet/) -partial interface Window { +partial namespace CSS { [SameObject] readonly attribute Worklet animationWorklet; }; -callback VoidFunction = void (); - [ Exposed=AnimationWorklet, Global=AnimationWorklet ] interface AnimationWorkletGlobalScope : WorkletGlobalScope { void registerAnimator(DOMString name, VoidFunction animatorCtor); }; [Constructor (DOMString animatorName, - optional (AnimationEffectReadOnly or sequence)? effects = null, + optional (AnimationEffect or sequence<AnimationEffect>)? effects = null, optional AnimationTimeline? timeline, optional any options)] interface WorkletAnimation : Animation { readonly attribute DOMString animatorName; }; -interface WorkletGroupEffectReadOnly : GroupEffectReadOnly {}; - -interface WorkletGroupEffect : WorkletGroupEffectReadOnly {}; -WorkletGroupEffect implements AnimationEffectMutable; -WorkletGroupEffect implements GroupEffectMutable; +interface WorkletGroupEffect { + sequence<AnimationEffect> getChildren(); +}; [Exposed=AnimationWorklet] -partial interface AnimationEffectReadOnly { +partial interface AnimationEffect { // Intended for use inside Animation Worklet scope to drive the effect. attribute double localTime; };
diff --git a/third_party/WebKit/LayoutTests/external/wpt/interfaces/background-fetch.idl b/third_party/WebKit/LayoutTests/external/wpt/interfaces/background-fetch.idl index fc3ed8d..6957604 100644 --- a/third_party/WebKit/LayoutTests/external/wpt/interfaces/background-fetch.idl +++ b/third_party/WebKit/LayoutTests/external/wpt/interfaces/background-fetch.idl
@@ -1,10 +1,10 @@ // GENERATED CONTENT - DO NOT EDIT -// Content of this file was automatically extracted from the -// "Background Fetch" spec. -// See: https://wicg.github.io/background-fetch/ +// Content was automatically extracted by Reffy into reffy-reports +// (https://github.com/tidoust/reffy-reports) +// Source: Background Fetch (https://wicg.github.io/background-fetch/) partial interface ServiceWorkerGlobalScope { - attribute EventHandler onbackgroundfetched; + attribute EventHandler onbackgroundfetchsuccess; attribute EventHandler onbackgroundfetchfail; attribute EventHandler onbackgroundfetchabort; attribute EventHandler onbackgroundfetchclick; @@ -22,9 +22,12 @@ // TODO: in future this should become an async iterator for BackgroundFetchRegistration objects }; -dictionary BackgroundFetchOptions { +dictionary BackgroundFetchUIOptions { sequence<IconDefinition> icons = []; DOMString title = ""; +}; + +dictionary BackgroundFetchOptions : BackgroundFetchUIOptions { unsigned long long downloadTotal = 0; }; @@ -43,73 +46,50 @@ readonly attribute unsigned long long uploaded; readonly attribute unsigned long long downloadTotal; readonly attribute unsigned long long downloaded; - readonly attribute BackgroundFetchActiveFetches activeFetches; + readonly attribute BackgroundFetchState state; + readonly attribute BackgroundFetchFailureReason failureReason; attribute EventHandler onprogress; Promise<boolean> abort(); + Promise<BackgroundFetchRecord> match(RequestInfo request, optional CacheQueryOptions options); + Promise<sequence<BackgroundFetchRecord>> matchAll(optional RequestInfo request, optional CacheQueryOptions options); +}; + +enum BackgroundFetchState { "pending", "success", "failure" }; + +enum BackgroundFetchFailureReason { + "", + // The operation was aborted by the user, or abort() was called. + "aborted", + // A response had a not-ok-status. + "bad-status", + // A fetch failed for other reasons, e.g. CORS, MIX, an invalid partial response, + // or a general network failure for a fetch that cannot be retried. + "fetch-error", + // Storage quota was reached during the operation. + "quota-exceeded", + // The provided downloadTotal was exceeded. + "total-download-exceeded" }; [Exposed=(Window,Worker)] -interface BackgroundFetchActiveFetches { - Promise<BackgroundFetchActiveFetch> match(RequestInfo request, optional CacheQueryOptions options); - Promise<sequence<BackgroundFetchActiveFetch>> matchAll(RequestInfo request, optional CacheQueryOptions options); - Promise<sequence<BackgroundFetchActiveFetch>> values(); -}; - -[Exposed=(Window,Worker)] -interface BackgroundFetchActiveFetch : BackgroundFetchFetch { - readonly attribute Promise<Response> responseReady; - // In future this will include a fetch observer -}; - -[Exposed=(Window,Worker)] -interface BackgroundFetchFetch { +interface BackgroundFetchRecord { readonly attribute Request request; + readonly attribute Promise<Response> responseReady; + // TODO: In future this will include a fetch observer }; [Constructor(DOMString type, BackgroundFetchEventInit init), Exposed=ServiceWorker] interface BackgroundFetchEvent : ExtendableEvent { - readonly attribute DOMString id; + readonly attribute BackgroundFetchRegistration registration; }; dictionary BackgroundFetchEventInit : ExtendableEventInit { - required DOMString id; + required BackgroundFetchRegistration registration; }; -[Constructor(DOMString type, BackgroundFetchSettledEventInit init), Exposed=ServiceWorker] -interface BackgroundFetchSettledEvent : BackgroundFetchEvent { - readonly attribute BackgroundFetchSettledFetches fetches; +[Constructor(DOMString type, BackgroundFetchEventInit init), Exposed=ServiceWorker] +interface BackgroundFetchUpdateUIEvent : BackgroundFetchEvent { + Promise<void> updateUI(optional BackgroundFetchUIOptions options); }; - -dictionary BackgroundFetchSettledEventInit : BackgroundFetchEventInit { - required BackgroundFetchSettledFetches fetches; -}; - -[Exposed=ServiceWorker] -interface BackgroundFetchSettledFetches { - Promise<BackgroundFetchSettledFetch> match(RequestInfo request, optional CacheQueryOptions options); - Promise<sequence<BackgroundFetchSettledFetch>> matchAll(RequestInfo request, optional CacheQueryOptions options); - Promise<sequence<BackgroundFetchSettledFetch>> values(); -}; - -[Exposed=ServiceWorker] -interface BackgroundFetchSettledFetch : BackgroundFetchFetch { - readonly attribute Response? response; -}; - -[Constructor(DOMString type, BackgroundFetchSettledEventInit init), Exposed=ServiceWorker] -interface BackgroundFetchUpdateEvent : BackgroundFetchSettledEvent { - Promise<void> updateUI(DOMString title); -}; - -[Constructor(DOMString type, BackgroundFetchClickEventInit init), Exposed=ServiceWorker] -interface BackgroundFetchClickEvent : BackgroundFetchEvent { - readonly attribute BackgroundFetchState state; -}; - -dictionary BackgroundFetchClickEventInit : BackgroundFetchEventInit { - required BackgroundFetchState state; -}; - -enum BackgroundFetchState { "pending", "succeeded", "failed" };
diff --git a/third_party/WebKit/LayoutTests/external/wpt/interfaces/css-paint-api.idl b/third_party/WebKit/LayoutTests/external/wpt/interfaces/css-paint-api.idl index 442bbfa..c636e2e 100644 --- a/third_party/WebKit/LayoutTests/external/wpt/interfaces/css-paint-api.idl +++ b/third_party/WebKit/LayoutTests/external/wpt/interfaces/css-paint-api.idl
@@ -1,9 +1,9 @@ // GENERATED CONTENT - DO NOT EDIT -// Content of this file was automatically extracted from the -// "CSS Painting API Level 1" spec. -// See: https://drafts.css-houdini.org/css-paint-api-1/ +// Content was automatically extracted by Reffy into reffy-reports +// (https://github.com/tidoust/reffy-reports) +// Source: CSS Painting API Level 1 (https://drafts.css-houdini.org/css-paint-api-1/) -partial interface CSS { +partial namespace CSS { [SameObject] readonly attribute Worklet paintWorklet; };
diff --git a/third_party/WebKit/LayoutTests/external/wpt/interfaces/payment-request.idl b/third_party/WebKit/LayoutTests/external/wpt/interfaces/payment-request.idl index 1018ecc..3717d79 100644 --- a/third_party/WebKit/LayoutTests/external/wpt/interfaces/payment-request.idl +++ b/third_party/WebKit/LayoutTests/external/wpt/interfaces/payment-request.idl
@@ -1,7 +1,7 @@ // GENERATED CONTENT - DO NOT EDIT -// Content of this file was automatically extracted from the -// "Payment Request API" spec. -// See: https://w3c.github.io/payment-request/ +// Content was automatically extracted by Reffy into reffy-reports +// (https://github.com/tidoust/reffy-reports) +// Source: Payment Request API (https://w3c.github.io/payment-request/) [Constructor(sequence<PaymentMethodData> methodData, PaymentDetailsInit details, optional PaymentOptions options), SecureContext, Exposed=Window] @@ -167,6 +167,8 @@ dictionary PaymentValidationErrors { PayerErrorFields payer; AddressErrors shippingAddress; + DOMString error; + object paymentMethod; }; dictionary PayerErrorFields {
diff --git a/third_party/WebKit/LayoutTests/external/wpt/interfaces/service-workers.idl b/third_party/WebKit/LayoutTests/external/wpt/interfaces/service-workers.idl index 38d22c6..2c9cbf6 100644 --- a/third_party/WebKit/LayoutTests/external/wpt/interfaces/service-workers.idl +++ b/third_party/WebKit/LayoutTests/external/wpt/interfaces/service-workers.idl
@@ -1,7 +1,7 @@ // GENERATED CONTENT - DO NOT EDIT -// Content of this file was automatically extracted from the -// "Service Workers 1" spec. -// See: https://w3c.github.io/ServiceWorker/v1/ +// Content was automatically extracted by Reffy into reffy-reports +// (https://github.com/tidoust/reffy-reports) +// Source: Service Workers 1 (https://w3c.github.io/ServiceWorker/v1/) [SecureContext, Exposed=(Window,Worker)] interface ServiceWorker : EventTarget {
diff --git a/third_party/WebKit/LayoutTests/external/wpt/interfaces/speech-api.idl b/third_party/WebKit/LayoutTests/external/wpt/interfaces/speech-api.idl index 5ffa04fc..8e998df 100644 --- a/third_party/WebKit/LayoutTests/external/wpt/interfaces/speech-api.idl +++ b/third_party/WebKit/LayoutTests/external/wpt/interfaces/speech-api.idl
@@ -1,7 +1,7 @@ // GENERATED CONTENT - DO NOT EDIT -// Content of this file was automatically extracted from the -// "Web Speech API" spec. -// See: https://w3c.github.io/speech-api/ +// Content was automatically extracted by Reffy into reffy-reports +// (https://github.com/tidoust/reffy-reports) +// Source: Web Speech API (https://w3c.github.io/speech-api/) [Exposed=Window, Constructor] interface SpeechRecognition : EventTarget { @@ -157,6 +157,7 @@ "voice-unavailable", "text-too-long", "invalid-argument", + "not-allowed", }; [Exposed=Window]
diff --git a/third_party/WebKit/LayoutTests/external/wpt/interfaces/webrtc.idl b/third_party/WebKit/LayoutTests/external/wpt/interfaces/webrtc.idl index 2849a7d..c06e91e 100644 --- a/third_party/WebKit/LayoutTests/external/wpt/interfaces/webrtc.idl +++ b/third_party/WebKit/LayoutTests/external/wpt/interfaces/webrtc.idl
@@ -1,7 +1,7 @@ // GENERATED CONTENT - DO NOT EDIT -// Content of this file was automatically extracted from the -// "WebRTC 1.0: Real-time Communication Between Browsers" spec. -// See: https://w3c.github.io/webrtc-pc/ +// Content was automatically extracted by Reffy into reffy-reports +// (https://github.com/tidoust/reffy-reports) +// Source: WebRTC 1.0: Real-time Communication Between Browsers (https://w3c.github.io/webrtc-pc/) dictionary RTCConfiguration { sequence<RTCIceServer> iceServers; @@ -105,7 +105,7 @@ readonly attribute RTCSessionDescription? remoteDescription; readonly attribute RTCSessionDescription? currentRemoteDescription; readonly attribute RTCSessionDescription? pendingRemoteDescription; - Promise<void> addIceCandidate((RTCIceCandidateInit or RTCIceCandidate) candidate); + Promise<void> addIceCandidate(RTCIceCandidateInit candidate); readonly attribute RTCSignalingState signalingState; readonly attribute RTCIceGatheringState iceGatheringState; readonly attribute RTCIceConnectionState iceConnectionState; @@ -129,7 +129,7 @@ Promise<void> setLocalDescription(RTCSessionDescriptionInit description, VoidFunction successCallback, RTCPeerConnectionErrorCallback failureCallback); Promise<void> createAnswer(RTCSessionDescriptionCallback successCallback, RTCPeerConnectionErrorCallback failureCallback); Promise<void> setRemoteDescription(RTCSessionDescriptionInit description, VoidFunction successCallback, RTCPeerConnectionErrorCallback failureCallback); - Promise<void> addIceCandidate((RTCIceCandidateInit or RTCIceCandidate) candidate, VoidFunction successCallback, RTCPeerConnectionErrorCallback failureCallback); + Promise<void> addIceCandidate(RTCIceCandidateInit candidate, VoidFunction successCallback, RTCPeerConnectionErrorCallback failureCallback); }; callback RTCPeerConnectionErrorCallback = void (DOMException error);
diff --git a/third_party/WebKit/LayoutTests/external/wpt/interfaces/webxr.idl b/third_party/WebKit/LayoutTests/external/wpt/interfaces/webxr.idl index 563c4e0..00839eed 100644 --- a/third_party/WebKit/LayoutTests/external/wpt/interfaces/webxr.idl +++ b/third_party/WebKit/LayoutTests/external/wpt/interfaces/webxr.idl
@@ -97,12 +97,7 @@ }; [SecureContext, Exposed=Window] interface XRStageBounds { - readonly attribute FrozenArray<XRStageBoundsPoint> geometry; -}; - -[SecureContext, Exposed=Window] interface XRStageBoundsPoint { - readonly attribute double x; - readonly attribute double z; + readonly attribute FrozenArray<DOMPointReadOnly> geometry; }; enum XREye {
diff --git a/third_party/WebKit/LayoutTests/external/wpt/intersection-observer/observer-exceptions.html b/third_party/WebKit/LayoutTests/external/wpt/intersection-observer/observer-exceptions.html index d4f178b..5d29234 100644 --- a/third_party/WebKit/LayoutTests/external/wpt/intersection-observer/observer-exceptions.html +++ b/third_party/WebKit/LayoutTests/external/wpt/intersection-observer/observer-exceptions.html
@@ -19,7 +19,7 @@ assert_throws("SYNTAX_ERR", function() { new IntersectionObserver(e => {}, {rootMargin: "1"}) }) -}, 'IntersectionObserver constructor witth { rootMargin: "1" }'); +}, 'IntersectionObserver constructor with { rootMargin: "1" }'); test(function () { assert_throws("SYNTAX_ERR", function() {
diff --git a/third_party/WebKit/LayoutTests/external/wpt/keyboard-lock/idlharness.https.window.js b/third_party/WebKit/LayoutTests/external/wpt/keyboard-lock/idlharness.https.window.js index 27573bd..7a20d8b 100644 --- a/third_party/WebKit/LayoutTests/external/wpt/keyboard-lock/idlharness.https.window.js +++ b/third_party/WebKit/LayoutTests/external/wpt/keyboard-lock/idlharness.https.window.js
@@ -13,6 +13,5 @@ Navigator: ['navigator'], Keyboard: ['navigator.keyboard'], }); - }, - 'keyboard-lock interfaces' + } );
diff --git a/third_party/WebKit/LayoutTests/external/wpt/keyboard-map/idlharness.https.window.js b/third_party/WebKit/LayoutTests/external/wpt/keyboard-map/idlharness.https.window.js index d800166..18421368 100644 --- a/third_party/WebKit/LayoutTests/external/wpt/keyboard-map/idlharness.https.window.js +++ b/third_party/WebKit/LayoutTests/external/wpt/keyboard-map/idlharness.https.window.js
@@ -16,6 +16,5 @@ }); self.layout_map = await navigator.keyboard.getLayoutMap(); - }, - 'Test IDL implementation of Keyboard Map API' + } );
diff --git a/third_party/WebKit/LayoutTests/external/wpt/magnetometer/idlharness.https.window-expected.txt b/third_party/WebKit/LayoutTests/external/wpt/magnetometer/idlharness.https.window-expected.txt index 661776fd..4021339 100644 --- a/third_party/WebKit/LayoutTests/external/wpt/magnetometer/idlharness.https.window-expected.txt +++ b/third_party/WebKit/LayoutTests/external/wpt/magnetometer/idlharness.https.window-expected.txt
@@ -1,5 +1,5 @@ This is a testharness.js-based test. -PASS Test IDL implementation of Magnetometer Sensor +PASS idl_test setup PASS Magnetometer interface: existence and properties of interface object PASS Magnetometer interface object length PASS Magnetometer interface object name
diff --git a/third_party/WebKit/LayoutTests/external/wpt/magnetometer/idlharness.https.window.js b/third_party/WebKit/LayoutTests/external/wpt/magnetometer/idlharness.https.window.js index 97a3c85e..e6b8f7d 100644 --- a/third_party/WebKit/LayoutTests/external/wpt/magnetometer/idlharness.https.window.js +++ b/third_party/WebKit/LayoutTests/external/wpt/magnetometer/idlharness.https.window.js
@@ -13,6 +13,5 @@ Magnetometer: ['new Magnetometer();'], UncalibratedMagnetometer: ['new UncalibratedMagnetometer();'] }); - }, - 'Test IDL implementation of Magnetometer Sensor' + } );
diff --git a/third_party/WebKit/LayoutTests/external/wpt/media-capabilities/idlharness.any-expected.txt b/third_party/WebKit/LayoutTests/external/wpt/media-capabilities/idlharness.any-expected.txt index 686525e2..b7140a9 100644 --- a/third_party/WebKit/LayoutTests/external/wpt/media-capabilities/idlharness.any-expected.txt +++ b/third_party/WebKit/LayoutTests/external/wpt/media-capabilities/idlharness.any-expected.txt
@@ -1,7 +1,7 @@ This is a testharness.js-based test. Found 63 tests; 43 PASS, 20 FAIL, 0 TIMEOUT, 0 NOTRUN. PASS idlharness -PASS Test IDL implementation of Media Capabilities +PASS idl_test setup PASS Partial interface Navigator: original interface defined PASS Partial interface Navigator: valid exposure set PASS Partial interface WorkerNavigator: original interface defined
diff --git a/third_party/WebKit/LayoutTests/external/wpt/media-capabilities/idlharness.any.js b/third_party/WebKit/LayoutTests/external/wpt/media-capabilities/idlharness.any.js index 0be4674..bd20d5b4 100644 --- a/third_party/WebKit/LayoutTests/external/wpt/media-capabilities/idlharness.any.js +++ b/third_party/WebKit/LayoutTests/external/wpt/media-capabilities/idlharness.any.js
@@ -41,7 +41,6 @@ Screen: ['screen'], ScreenLuminance: ['screen.luminance'], }); - }, - 'Test IDL implementation of Media Capabilities' + } ); });
diff --git a/third_party/WebKit/LayoutTests/external/wpt/media-capabilities/idlharness.any.worker-expected.txt b/third_party/WebKit/LayoutTests/external/wpt/media-capabilities/idlharness.any.worker-expected.txt index 3f3eb88..5aeee8b 100644 --- a/third_party/WebKit/LayoutTests/external/wpt/media-capabilities/idlharness.any.worker-expected.txt +++ b/third_party/WebKit/LayoutTests/external/wpt/media-capabilities/idlharness.any.worker-expected.txt
@@ -1,7 +1,7 @@ This is a testharness.js-based test. Found 53 tests; 10 PASS, 43 FAIL, 0 TIMEOUT, 0 NOTRUN. PASS idlharness -PASS Test IDL implementation of Media Capabilities +PASS idl_test setup PASS Partial interface Navigator: original interface defined PASS Partial interface Navigator: valid exposure set PASS Partial interface WorkerNavigator: original interface defined
diff --git a/third_party/WebKit/LayoutTests/external/wpt/media/video.ogv b/third_party/WebKit/LayoutTests/external/wpt/media/video.ogv new file mode 100644 index 0000000..5cb5f87 --- /dev/null +++ b/third_party/WebKit/LayoutTests/external/wpt/media/video.ogv Binary files differ
diff --git a/third_party/WebKit/LayoutTests/external/wpt/mediacapture-fromelement/idlharness.window-expected.txt b/third_party/WebKit/LayoutTests/external/wpt/mediacapture-fromelement/idlharness.window-expected.txt index aca657e..1243572 100644 --- a/third_party/WebKit/LayoutTests/external/wpt/mediacapture-fromelement/idlharness.window-expected.txt +++ b/third_party/WebKit/LayoutTests/external/wpt/mediacapture-fromelement/idlharness.window-expected.txt
@@ -1,5 +1,5 @@ This is a testharness.js-based test. -PASS Test mediacapture-fromelement IDL interfaces +PASS idl_test setup PASS Partial interface HTMLMediaElement: original interface defined PASS Partial interface HTMLCanvasElement: original interface defined PASS CanvasCaptureMediaStreamTrack interface: existence and properties of interface object
diff --git a/third_party/WebKit/LayoutTests/external/wpt/mediacapture-fromelement/idlharness.window.js b/third_party/WebKit/LayoutTests/external/wpt/mediacapture-fromelement/idlharness.window.js index 25c8233f..c58e63ff1 100644 --- a/third_party/WebKit/LayoutTests/external/wpt/mediacapture-fromelement/idlharness.window.js +++ b/third_party/WebKit/LayoutTests/external/wpt/mediacapture-fromelement/idlharness.window.js
@@ -28,6 +28,5 @@ HTMLCanvasElement: ['canvas'], CanvasCaptureMediaStreamTrack: ['track'], }); - }, - 'Test mediacapture-fromelement IDL interfaces' + } );
diff --git a/third_party/WebKit/LayoutTests/external/wpt/mediacapture-image/idlharness.window.js b/third_party/WebKit/LayoutTests/external/wpt/mediacapture-image/idlharness.window.js index 0c06405a..9d8f7ee 100644 --- a/third_party/WebKit/LayoutTests/external/wpt/mediacapture-image/idlharness.window.js +++ b/third_party/WebKit/LayoutTests/external/wpt/mediacapture-image/idlharness.window.js
@@ -22,6 +22,5 @@ const track = canvas.captureStream().getVideoTracks()[0]; self.capture = new ImageCapture(track); self.capabilities = await capture.getPhotoCapabilities(); - }, - 'Test mediacapture-image IDL interfaces' + } );
diff --git a/third_party/WebKit/LayoutTests/external/wpt/mediacapture-record/idlharness.window-expected.txt b/third_party/WebKit/LayoutTests/external/wpt/mediacapture-record/idlharness.window-expected.txt index 89bdb2f..ba8977f 100644 --- a/third_party/WebKit/LayoutTests/external/wpt/mediacapture-record/idlharness.window-expected.txt +++ b/third_party/WebKit/LayoutTests/external/wpt/mediacapture-record/idlharness.window-expected.txt
@@ -1,6 +1,6 @@ This is a testharness.js-based test. Found 67 tests; 57 PASS, 10 FAIL, 0 TIMEOUT, 0 NOTRUN. -PASS mediastream-recording interfaces +PASS idl_test setup PASS MediaRecorder interface: existence and properties of interface object PASS MediaRecorder interface object length PASS MediaRecorder interface object name
diff --git a/third_party/WebKit/LayoutTests/external/wpt/mediacapture-record/idlharness.window.js b/third_party/WebKit/LayoutTests/external/wpt/mediacapture-record/idlharness.window.js index 3b794743..86f5a15 100644 --- a/third_party/WebKit/LayoutTests/external/wpt/mediacapture-record/idlharness.window.js +++ b/third_party/WebKit/LayoutTests/external/wpt/mediacapture-record/idlharness.window.js
@@ -34,6 +34,5 @@ error = new MediaRecorderErrorEvent("type", {}); } catch(e) {} idl_array.add_objects({ MediaRecorderErrorEvent: [error] }); - }, - 'mediastream-recording interfaces' + } );
diff --git a/third_party/WebKit/LayoutTests/external/wpt/mediasession/idlharness.window.js b/third_party/WebKit/LayoutTests/external/wpt/mediasession/idlharness.window.js index f9ac62d..5fa0d22 100644 --- a/third_party/WebKit/LayoutTests/external/wpt/mediasession/idlharness.window.js +++ b/third_party/WebKit/LayoutTests/external/wpt/mediasession/idlharness.window.js
@@ -14,6 +14,5 @@ MediaSession: ['navigator.mediaSession'], Navigator: ['navigator'] }); - }, - 'Test IDL implementation of Media Session' + } );
diff --git a/third_party/WebKit/LayoutTests/external/wpt/navigation-timing/idlharness.window.js b/third_party/WebKit/LayoutTests/external/wpt/navigation-timing/idlharness.window.js index a782773e..8cc3546b 100644 --- a/third_party/WebKit/LayoutTests/external/wpt/navigation-timing/idlharness.window.js +++ b/third_party/WebKit/LayoutTests/external/wpt/navigation-timing/idlharness.window.js
@@ -17,6 +17,5 @@ 'performance.getEntriesByType("navigation")[0]' ] }); - }, - 'navigation-timing interfaces' + } );
diff --git a/third_party/WebKit/LayoutTests/external/wpt/netinfo/idlharness.any.js b/third_party/WebKit/LayoutTests/external/wpt/netinfo/idlharness.any.js index d8e1561..4610508 100644 --- a/third_party/WebKit/LayoutTests/external/wpt/netinfo/idlharness.any.js +++ b/third_party/WebKit/LayoutTests/external/wpt/netinfo/idlharness.any.js
@@ -15,5 +15,5 @@ } else { idl_array.add_objects({ Navigator: ['navigator'] }); } - }, - 'netinfo interfaces.'); + } +);
diff --git a/third_party/WebKit/LayoutTests/external/wpt/netinfo/idlharness.any.worker-expected.txt b/third_party/WebKit/LayoutTests/external/wpt/netinfo/idlharness.any.worker-expected.txt index 6479d468..7680600c 100644 --- a/third_party/WebKit/LayoutTests/external/wpt/netinfo/idlharness.any.worker-expected.txt +++ b/third_party/WebKit/LayoutTests/external/wpt/netinfo/idlharness.any.worker-expected.txt
@@ -1,5 +1,5 @@ This is a testharness.js-based test. -PASS netinfo interfaces. +PASS idl_test setup PASS NetworkInformation interface: existence and properties of interface object PASS NetworkInformation interface object length PASS NetworkInformation interface object name
diff --git a/third_party/WebKit/LayoutTests/external/wpt/orientation-sensor/idlharness.https.window.js b/third_party/WebKit/LayoutTests/external/wpt/orientation-sensor/idlharness.https.window.js index 39217fc..86f2774 100644 --- a/third_party/WebKit/LayoutTests/external/wpt/orientation-sensor/idlharness.https.window.js +++ b/third_party/WebKit/LayoutTests/external/wpt/orientation-sensor/idlharness.https.window.js
@@ -14,6 +14,5 @@ RelativeOrientationSensor: ['new RelativeOrientationSensor();'] }); idl_array.prevent_multiple_testing('OrientationSensor'); - }, - 'Test IDL implementation of Orientation Sensor' + } );
diff --git a/third_party/WebKit/LayoutTests/external/wpt/page-visibility/idlharness.window.js b/third_party/WebKit/LayoutTests/external/wpt/page-visibility/idlharness.window.js index 8ef2561b..8cc2f830 100644 --- a/third_party/WebKit/LayoutTests/external/wpt/page-visibility/idlharness.window.js +++ b/third_party/WebKit/LayoutTests/external/wpt/page-visibility/idlharness.window.js
@@ -12,6 +12,5 @@ idl_array.add_objects({ Document: ['document'], }); - }, - 'page-visibility interfaces' + } );
diff --git a/third_party/WebKit/LayoutTests/external/wpt/paint-timing/idlharness.window.js b/third_party/WebKit/LayoutTests/external/wpt/paint-timing/idlharness.window.js index f108cc4..115af73 100644 --- a/third_party/WebKit/LayoutTests/external/wpt/paint-timing/idlharness.window.js +++ b/third_party/WebKit/LayoutTests/external/wpt/paint-timing/idlharness.window.js
@@ -24,5 +24,5 @@ t.step_timeout(() => reject('Timed out waiting for paint event'), 3000); }); return Promise.race([awaitPaint, timeout]); - }, - 'paint-timing interfaces.'); + } +);
diff --git a/third_party/WebKit/LayoutTests/external/wpt/payment-method-basic-card/idlharness.window.js b/third_party/WebKit/LayoutTests/external/wpt/payment-method-basic-card/idlharness.window.js index a1078c6..cd158a6 100644 --- a/third_party/WebKit/LayoutTests/external/wpt/payment-method-basic-card/idlharness.window.js +++ b/third_party/WebKit/LayoutTests/external/wpt/payment-method-basic-card/idlharness.window.js
@@ -9,4 +9,4 @@ ['payment-method-basic-card'], [], // No deps null, // No objects - 'payment-method-basic-card interfaces.'); +);
diff --git a/third_party/WebKit/LayoutTests/external/wpt/payment-request/PaymentValidationErrors/retry-shows-error-member-manual.https.html b/third_party/WebKit/LayoutTests/external/wpt/payment-request/PaymentValidationErrors/retry-shows-error-member-manual.https.html new file mode 100644 index 0000000..b3a539e --- /dev/null +++ b/third_party/WebKit/LayoutTests/external/wpt/payment-request/PaymentValidationErrors/retry-shows-error-member-manual.https.html
@@ -0,0 +1,50 @@ +<!doctype html> +<meta charset="utf8"> +<link rel="help" href="https://w3c.github.io/payment-request/#dom-paymentvalidationerrors-error"> +<title> + PaymentValidationErrors' `error` member +</title> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="../payment-response/helpers.js"></script> +<script> +function retryShowsErrorMember(button) { + button.disabled = true; + promise_test(async t => { + const { response } = await getPaymentRequestResponse(); + await response.retry({ error: "PASS" }); + await response.complete("success"); + }, button.textContent.trim()); +} +</script> +<h2> + Manual Test for PaymentValidationErrors's `error` member - Please run in order! +</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 presented with the payment sheet, use any card and select to "Pay". + You will be asked to retry the payment and an error should be shown somewhere + in the UI. The expected error string is described in each individual test. + If you see the error, hit "Pay" again. If you don't see the error, + abort the payment request by hitting "esc" - which means that particular test + has failed. +</p> +<ol> + <li> + <button onclick="retryShowsErrorMember(this);"> + The payment sheet shows the error "PASS" somewhere in the UI. + </button> + </li> + <li> + <button onclick="done();"> + Done! + </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/payment-request/PaymentValidationErrors/retry-shows-payer-member-manual.https.html b/third_party/WebKit/LayoutTests/external/wpt/payment-request/PaymentValidationErrors/retry-shows-payer-member-manual.https.html new file mode 100644 index 0000000..8dbc760f --- /dev/null +++ b/third_party/WebKit/LayoutTests/external/wpt/payment-request/PaymentValidationErrors/retry-shows-payer-member-manual.https.html
@@ -0,0 +1,65 @@ +<!doctype html> +<meta charset="utf8"> +<link rel="help" href="https://w3c.github.io/payment-request/#dom-paymentvalidationerrors-payer"> +<title> + PaymentValidationErrors' `payer` member +</title> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="../payment-response/helpers.js"></script> +<script> +function retryShowsPayerMember(button, error) { + button.disabled = true; + promise_test(async t => { + const options = { + requestPayerName: true, + requestPayerEmail: true, + requestPayerPhone: true, + } + const { response } = await getPaymentRequestResponse(options); + await response.retry({ payer: error }); + await response.complete("success"); + }, button.textContent.trim()); +} +</script> +<h2> + Manual Test for PaymentValidationErrors' `payer` member - Please run in order! +</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 presented with the payment sheet, use any card and select to "Pay". + You will be asked to retry the payment and an error should be shown somewhere + in the UI. The expected error string is described in each individual test. + If you see the error, hit "Pay" again. If you don't see the error, + abort the payment request by hitting "esc" - which means that particular test + has failed. +</p> +<ol> + <li> + <button onclick="retryShowsPayerMember(this, { email: 'EMAIL ERROR' });"> + The payment sheet shows "EMAIL ERROR" for the payer's email. + </button> + </li> + <li> + <button onclick="retryShowsPayerMember(this, { name: 'NAME ERROR' });"> + The payment sheet shows "NAME ERROR" for the payer's name. + </button> + </li> + <li> + <button onclick="retryShowsPayerMember(this, { phone: 'PHONE ERROR' });"> + The payment sheet shows "PHONE ERROR" for the payer's phone number. + </button> + </li> + <li> + <button onclick="done();"> + Done! + </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/payment-request/PaymentValidationErrors/retry-shows-shippingAddress-member-manual.https.html b/third_party/WebKit/LayoutTests/external/wpt/payment-request/PaymentValidationErrors/retry-shows-shippingAddress-member-manual.https.html new file mode 100644 index 0000000..cdc8d353 --- /dev/null +++ b/third_party/WebKit/LayoutTests/external/wpt/payment-request/PaymentValidationErrors/retry-shows-shippingAddress-member-manual.https.html
@@ -0,0 +1,108 @@ +<!doctype html> +<meta charset="utf8"> +<link rel="help" href="https://w3c.github.io/payment-request/#dom-paymentvalidationerrors-shippingaddress"> +<title> + PaymentValidationErrors' `shippingAddress` member (AddressErrors) +</title> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="../payment-response/helpers.js"></script> +<script> +function retryShowsShippingAddressMember(button, error) { + button.disabled = true; + promise_test(async t => { + const options = { + requestShipping: true, + } + const { response } = await getPaymentRequestResponse(options); + await response.retry({ shippingAddress: error }); + await response.complete("success"); + }, button.textContent.trim()); +} +</script> +<h2> + Manual Test for PaymentValidationErrors' `shippingAddress` member - Please run in order! +</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 presented with the payment sheet, use any card and select to "Pay". + You will be asked to retry the payment and an error should be shown somewhere + in the UI. The expected error string is described in each individual test. + If you see the error, hit "Pay" again. If you don't see the error, + abort the payment request by hitting "esc" - which means that particular test + has failed. +</p> +<ol> + <li> + <button onclick="retryShowsShippingAddressMember(this, { addressLine: 'ADDRESSLINE ERROR' });"> + The payment sheet shows "ADDRESSLINE ERROR" for the shipping address' addressLine. + </button> + </li> + <li> + <button onclick="retryShowsShippingAddressMember(this, { city: 'CITY ERROR' });"> + The payment sheet shows "CITY ERROR" for the shipping address' city. + </button> + </li> + <li> + <button onclick="retryShowsShippingAddressMember(this, { country: 'COUNTRY ERROR' });"> + The payment sheet shows "COUNTRY ERROR" for the shipping address' country. + </button> + </li> + <li> + <button onclick="retryShowsShippingAddressMember(this, { dependentLocality: 'DEPENDENTLOCALITY ERROR' });"> + The payment sheet shows "DEPENDENTLOCALITY ERROR" for the shipping address' dependentLocality. + </button> + </li> + <li> + <button onclick="retryShowsShippingAddressMember(this, { languageCode: 'LANGUAGECODE ERROR' });"> + The payment sheet shows "LANGUAGECODE ERROR" for the shipping address' languageCode. + </button> + </li> + <li> + <button onclick="retryShowsShippingAddressMember(this, { organization: 'ORGANIZATION ERROR' });"> + The payment sheet shows "ORGANIZATION ERROR" for the shipping address' organization. + </button> + </li> + <li> + <button onclick="retryShowsShippingAddressMember(this, { phone: 'PHONE ERROR' });"> + The payment sheet shows "PHONE ERROR" for the shipping address' phone. + </button> + </li> + <li> + <button onclick="retryShowsShippingAddressMember(this, { postalCode: 'POSTALCODE ERROR' });"> + The payment sheet shows "POSTALCODE ERROR" for the shipping address' postal code. + </button> + </li> + <li> + <button onclick="retryShowsShippingAddressMember(this, { recipient: 'RECIPIENT ERROR' });"> + The payment sheet shows "RECIPIENT ERROR" for the shipping address' recipient. + </button> + </li> + <li> + <button onclick="retryShowsShippingAddressMember(this, { region: 'REGION ERROR' });"> + The payment sheet shows "REGION ERROR" for the shipping address' region. + </button> + </li> + <li> + <button onclick="retryShowsShippingAddressMember(this, { regionCode: 'REGIONCODE ERROR' });"> + The payment sheet shows "REGIONCODE ERROR" for the shipping address' region code. + </button> + </li> + <li> + <button onclick="retryShowsShippingAddressMember(this, { sortingCode: 'SORTINGCODE ERROR' });"> + The payment sheet shows "SORTINGCODE ERROR" for the shipping address' sorting code. + </button> + </li> + <li> + <button onclick="done();"> + Done! + </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/payment-request/idlharness.https.window-expected.txt b/third_party/WebKit/LayoutTests/external/wpt/payment-request/idlharness.https.window-expected.txt index c1a2b1b..799a45e 100644 --- a/third_party/WebKit/LayoutTests/external/wpt/payment-request/idlharness.https.window-expected.txt +++ b/third_party/WebKit/LayoutTests/external/wpt/payment-request/idlharness.https.window-expected.txt
@@ -1,5 +1,5 @@ This is a testharness.js-based test. -PASS Setup for Payment Request API IDL tests. +PASS idl_test setup PASS PaymentRequest interface: existence and properties of interface object PASS PaymentRequest interface object length PASS PaymentRequest interface object name
diff --git a/third_party/WebKit/LayoutTests/external/wpt/payment-request/idlharness.https.window.js b/third_party/WebKit/LayoutTests/external/wpt/payment-request/idlharness.https.window.js index 57a2c942..9a068c6 100644 --- a/third_party/WebKit/LayoutTests/external/wpt/payment-request/idlharness.https.window.js +++ b/third_party/WebKit/LayoutTests/external/wpt/payment-request/idlharness.https.window.js
@@ -26,6 +26,5 @@ PaymentMethodChangeEvent: ['new PaymentMethodChangeEvent("paymentmethodchange")'], PaymentRequestUpdateEvent: ['new PaymentRequestUpdateEvent("paymentrequestupdate")'], }); - }, - 'Setup for Payment Request API IDL tests.' + } );
diff --git a/third_party/WebKit/LayoutTests/external/wpt/payment-request/payment-response/rejects_if_not_active-manual.https.html b/third_party/WebKit/LayoutTests/external/wpt/payment-request/payment-response/rejects_if_not_active-manual.https.html new file mode 100644 index 0000000..60dd965 --- /dev/null +++ b/third_party/WebKit/LayoutTests/external/wpt/payment-request/payment-response/rejects_if_not_active-manual.https.html
@@ -0,0 +1,150 @@ +<!DOCTYPE html> +<meta charset=utf-8> +<link rel="help" href="https://w3c.github.io/payment-request/#retry-method"> +<title>PaymentResponse retry() rejects if doc is not fully active</title> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<link rel="help" href="https://w3c.github.io/payment-request/#dom-paymentresponse-retry"> +<body> +<script> +setup({ explicit_done: true, explicit_timeout: true }); +const validMethod = Object.freeze({ + supportedMethods: "basic-card", +}); +const validMethods = Object.freeze([validMethod]); +const validAmount = Object.freeze({ + currency: "USD", + value: "5.00", +}); +const validTotal = Object.freeze({ + label: "Total due", + amount: validAmount, +}); +const validDetails = Object.freeze({ + total: validTotal, +}); + +function getLoadedPaymentResponse(iframe, url) { + return new Promise(resolve => { + iframe.addEventListener( + "load", + async () => { + const { PaymentRequest } = iframe.contentWindow; + const response = await new PaymentRequest( + validMethods, + validDetails + ).show(); + resolve(response); + }, + { once: true } + ); + iframe.src = url; + }); +} + +function methodNotFullyActive(button, method, ...args) { + const text = button.textContent.trim(); + promise_test(async t => { + const iframe = document.createElement("iframe"); + iframe.allowPaymentRequest = true; + document.body.appendChild(iframe); + + // We first got to page1.html, grab a PaymentResponse instance. + const response = await getLoadedPaymentResponse( + iframe, + "/payment-request/resources/page1.html" + ); + // We navigate the iframe again, putting response's document into an inactive state. + await new Promise(resolve => { + iframe.addEventListener("load", resolve); + iframe.src = "/payment-request/resources/page2.html"; + }); + // Now, response's relevant global object's document is no longer active. + // So, promise needs to reject appropriately. + const promise = response[methodName](...args); + await promise_rejects( + t, + "AbortError", + promise, + "Inactive document, so must throw AbortError" + ); + // We are done, so clean up. + iframe.remove(); + }, text); +} + +function methodBecomesNotFullyActive(button, methodName, ...args) { + const text = button.textContent.trim(); + promise_test(async t => { + const iframe = document.createElement("iframe"); + iframe.allowPaymentRequest = true; + document.body.appendChild(iframe); + + // We first got to page1.html, grab a PaymentResponse instance. + const response = await getLoadedPaymentResponse( + iframe, + "/payment-request/resources/page1.html" + ); + + // we get the promise from page1.html, while it's active! + const promise = response[methodName](...args); + + // We navigate the iframe again, putting response's document into an inactive state. + await new Promise(resolve => { + iframe.addEventListener("load", resolve); + iframe.src = "/payment-request/resources/page2.html"; + }); + + // Now, response's relevant global object's document is no longer active. + // So, promise needs to reject appropriately. + await promise_rejects( + t, + "AbortError", + promise, + "Inactive document, so must throw AbortError" + ); + // We are done, so clean up. + iframe.remove(); + }, text); +} +</script> +<section> + <p> + For each test, when the payment sheet is shown, select a payment method and hit "Pay". + </p> + <h2>retry() and document active state</h2> + <p>Manual Tests for PaymentResponse.retry() - Please run in order!</p> + <ol> + <li> + <button onclick="methodNotFullyActive(this, 'retry', {});"> + retry()'s retryPromise rejects if document is not fully active. + </button> + </li> + <li> + <button onclick="methodBecomesNotFullyActive(this, 'retry', {});"> + retry()'s retryPromise rejects if the document becomes not fully active. + </button> + </li> + </ol> + <h2>complete() and document active state</h2> + <p>Manual Tests for PaymentResponse.complete() - Please run in order!</p> + <ol> + <li> + <button onclick="methodNotFullyActive(this, 'complete', 'success');"> + complete()'s completePromise rejects if document is not fully active. + </button> + </li> + <li> + <button onclick="methodBecomesNotFullyActive(this, 'complete', 'success');"> + complete()'s completePromise rejects if the document becomes not fully active. + </button> + </li> + <li> + <button onclick="done();">Done</button> + </li> + </ol> +</section> +<small> + If you find a buggy test, please <a href="https://github.com/web-platform-tests/wpt/issues">file a bug</a> + and tag one of the <a href="https://github.com/web-platform-tests/wpt/blob/master/payment-request/META.yml">suggested reviewers</a>. +</small>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/payment-request/payment-response/retry-method-manual.https.html b/third_party/WebKit/LayoutTests/external/wpt/payment-request/payment-response/retry-method-manual.https.html new file mode 100644 index 0000000..288a32b3 --- /dev/null +++ b/third_party/WebKit/LayoutTests/external/wpt/payment-request/payment-response/retry-method-manual.https.html
@@ -0,0 +1,262 @@ +<!doctype html> +<meta charset="utf8"> +<link rel="help" href="https://w3c.github.io/payment-request/#dom-paymentresponse-retry"> +<title> + PaymentResponse.prototype.retry() method +</title> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="helpers.js"></script> +<script> +test(() => { + assert_true( + "retry" in PaymentResponse.prototype, + "retry must be in prototype" + ); + assert_true( + PaymentResponse.prototype.retry instanceof Function, + "retry must be a function" + ); +}, "PaymentResponse.prototype must have a retry() function (smoke test)."); + +function checkCompletedCantRetry(button) { + button.disabled = true; + promise_test(async t => { + const { response } = await getPaymentRequestResponse(); + // sets response.[[complete]] to true. + await response.complete("success"); + return promise_rejects( + t, + "InvalidStateError", + response.retry({}), + "response.[[complete]] is true, so rejects with InvalidStateError." + ); + }, button.textContent.trim()); +} + +function repeatedCallsToRetry(button) { + button.disabled = true; + promise_test(async t => { + const { response } = await getPaymentRequestResponse(); + const retryPromise = response.retry({}); + await promise_rejects( + t, + "InvalidStateError", + response.retry({}), + "Calling retry() again rejects with an InvalidStateError" + ); + await retryPromise; + await response.complete("success"); + }, button.textContent.trim()); +} + +function callCompleteWhileRetrying(button) { + button.disabled = true; + promise_test(async t => { + const { response } = await getPaymentRequestResponse(); + const retryPromise = response.retry({}); + await promise_rejects( + t, + "InvalidStateError", + response.complete("success"), + "Calling complete() while retrying rejects with an InvalidStateError" + ); + await retryPromise; + await response.complete("success"); + }, button.textContent.trim()); +} + +function callingRequestAbortMustNotAbort(button) { + button.disabled = true; + promise_test(async t => { + const { response, request } = await getPaymentRequestResponse(); + const retryPromise = response.retry({}); + await promise_rejects( + t, + "InvalidStateError", + request.abort(), + "Calling request.abort() while retrying rejects with an InvalidStateError" + ); + await retryPromise; + await response.complete("success"); + }, button.textContent.trim()); +} + +function canRetryMultipleTimes(button) { + button.disabled = true; + promise_test(async t => { + const { response } = await getPaymentRequestResponse(); + assert_equals( + await response.retry({}), + undefined, + "Expected undefined as the resolve value" + ); + assert_equals( + await response.retry({}), + undefined, + "Expected undefined as the resolve value" + ); + await response.complete("success"); + await promise_rejects( + t, + "InvalidStateError", + response.retry({}), + "Calling retry() after complete() rejects with a InvalidStateError" + ); + }, button.textContent.trim()); +} + +function userCanAbortARetry(button) { + button.disabled = true; + promise_test(async t => { + const { response } = await getPaymentRequestResponse(); + await promise_rejects( + t, + "AbortError", + response.retry({}), + "The user aborting a retry rejects with a AbortError" + ); + await promise_rejects( + t, + "InvalidStateError", + response.retry({}), + "After the user aborts, response [[complete]] is true so retry() must reject with InvalidStateError" + ); + await promise_rejects( + t, + "InvalidStateError", + response.complete("success"), + "After the user aborts, response [[complete]] is true, so complete() rejects with a InvalidStateError" + ); + }, button.textContent.trim()); +} + +function abortTheUpdate(button) { + button.disabled = true; + promise_test(async t => { + const { response, request } = await getPaymentRequestResponse(); + // causes "abort the update" to run + const shippingChangedPromise = new Promise(resolve => { + request.onshippingoptionchange = () => { + event.updateWith({ total: { amount: { currency: "USD", value: "INVALID" } }}); + resolve(); + }; + }); + const retryPromise = response.retry({}); + await shippingChangedPromise; + await promise_rejects( + t, + "TypeError", + retryPromise, + "retry() aborts with a TypeError, because totals' value is invalid" + ); + await promise_rejects( + t, + "InvalidStateError", + response.complete("success"), + "After the user aborts, response [[complete]] is true, so complete() rejects with a InvalidStateError" + ); + }, button.textContent.trim()); +} + +function callingRetryReturnsUniquePromise(button){ + button.disabled = true; + promise_test(async t => { + const request = new PaymentRequest(defaultMethods, defaultDetails); + const retryPromise = request.retry(); + const promises = new Set([ + retryPromise, + request.retry(), + request.retry(), + ]); + assert_equals(promises.size, 3, "Must have three unique objects"); + await retryPromise; + await response.complete(); + }, button.textContent.trim()); +}; + + +</script> +<h2> + Manual Tests for PaymentResponse.retry() - Please run in order! +</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 presented with the payment sheet, use any credit card select to "Pay" multiple times. +</p> +<ol> + <li> + <button onclick="checkCompletedCantRetry(this);"> + A completed payment request cannot be retried. + </button> + </li> + <li> + <button onclick="repeatedCallsToRetry(this);"> + Calling retry() more than once yield a rejected promise, but the + retryPromise resolves independently. + </button> + </li> + <li> + <button onclick="callCompleteWhileRetrying(this);"> + Calling complete() while a retry() is in progress results in an InvalidStateError. + </button> + </li> + <li> + <button onclick="callingRequestAbortMustNotAbort(this);"> + Trying to abort() via PaymentRequest is not possible. + </button> + </li> + <li> + <button onclick="canRetryMultipleTimes(this);"> + It's possible to retry() multiple times and eventually complete(). + After complete(), however, retry() rejects with an InvalidStateError. + </button> + </li> + <li> + <p> + When shown the payment sheet, hit pay once, then abort retrying the payment. + </p> + <button onclick="userCanAbortARetry(this);"> + The user aborting retrying a payment causes the retryPromise to reject with AbortError. + Aborting a payment is causes it complete. + </button> + </li> + <li> + <p> + When shown the payment sheet, hit pay once. Check payment sheet for error fields. + Then hit escape or otherwise abort the payment. + </p> + <button onclick="userIsShownErrorsFields(this);"> + When retrying, the user is shown error fields to fix. + </button> + </li> + <li> + <p> + When shown the payment sheet, hit pay once. Then retry once. + </p> + <button onclick="abortTheUpdate(this);"> + When "abort the update" occurs because of an update error, + the `retryPromise` is rejected and response.[[complete]] becomes true. + </button> + </li> + <li> + <p> + When shown the payment sheet, hit pay once. Then retry once. + </p> + <button onclick="callingRetryReturnsUniquePromise(this);"> + Calling retry() multiple times is always a new object. + </button> + </li> + <li> + <button onclick="done();"> + Done! + </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/performance-timeline/idlharness.any.js b/third_party/WebKit/LayoutTests/external/wpt/performance-timeline/idlharness.any.js index a1a6343..585bda92 100644 --- a/third_party/WebKit/LayoutTests/external/wpt/performance-timeline/idlharness.any.js +++ b/third_party/WebKit/LayoutTests/external/wpt/performance-timeline/idlharness.any.js
@@ -37,8 +37,7 @@ PerformanceObserver: ['observer'], PerformanceObserverEntryList: ['entryList'], }); - }, - 'Test IDL implementation of performance-timeline API' + } ); };
diff --git a/third_party/WebKit/LayoutTests/external/wpt/performance-timeline/idlharness.any.sharedworker-expected.txt b/third_party/WebKit/LayoutTests/external/wpt/performance-timeline/idlharness.any.sharedworker-expected.txt index 70531df2..0e17d27 100644 --- a/third_party/WebKit/LayoutTests/external/wpt/performance-timeline/idlharness.any.sharedworker-expected.txt +++ b/third_party/WebKit/LayoutTests/external/wpt/performance-timeline/idlharness.any.sharedworker-expected.txt
@@ -1,7 +1,7 @@ This is a testharness.js-based test. Found 67 tests; 60 PASS, 7 FAIL, 0 TIMEOUT, 0 NOTRUN. PASS idlharness -PASS Test IDL implementation of performance-timeline API +PASS idl_test setup PASS Partial interface Performance: original interface defined PASS PerformanceEntry interface: existence and properties of interface object PASS PerformanceEntry interface object length
diff --git a/third_party/WebKit/LayoutTests/external/wpt/performance-timeline/idlharness.any.worker-expected.txt b/third_party/WebKit/LayoutTests/external/wpt/performance-timeline/idlharness.any.worker-expected.txt index 70531df2..0e17d27 100644 --- a/third_party/WebKit/LayoutTests/external/wpt/performance-timeline/idlharness.any.worker-expected.txt +++ b/third_party/WebKit/LayoutTests/external/wpt/performance-timeline/idlharness.any.worker-expected.txt
@@ -1,7 +1,7 @@ This is a testharness.js-based test. Found 67 tests; 60 PASS, 7 FAIL, 0 TIMEOUT, 0 NOTRUN. PASS idlharness -PASS Test IDL implementation of performance-timeline API +PASS idl_test setup PASS Partial interface Performance: original interface defined PASS PerformanceEntry interface: existence and properties of interface object PASS PerformanceEntry interface object length
diff --git a/third_party/WebKit/LayoutTests/external/wpt/performance-timeline/idlharness.https.any.serviceworker-expected.txt b/third_party/WebKit/LayoutTests/external/wpt/performance-timeline/idlharness.https.any.serviceworker-expected.txt index de60137..e15018b 100644 --- a/third_party/WebKit/LayoutTests/external/wpt/performance-timeline/idlharness.https.any.serviceworker-expected.txt +++ b/third_party/WebKit/LayoutTests/external/wpt/performance-timeline/idlharness.https.any.serviceworker-expected.txt
@@ -1,6 +1,6 @@ This is a testharness.js-based test. PASS idlharness -PASS Test IDL implementation of performance-timeline API +PASS idl_test setup PASS Partial interface Performance: original interface defined PASS PerformanceEntry interface: existence and properties of interface object PASS PerformanceEntry interface object length
diff --git a/third_party/WebKit/LayoutTests/external/wpt/picture-in-picture/idlharness.window-expected.txt b/third_party/WebKit/LayoutTests/external/wpt/picture-in-picture/idlharness.window-expected.txt index 62fc381..d911941b 100644 --- a/third_party/WebKit/LayoutTests/external/wpt/picture-in-picture/idlharness.window-expected.txt +++ b/third_party/WebKit/LayoutTests/external/wpt/picture-in-picture/idlharness.window-expected.txt
@@ -1,5 +1,5 @@ This is a testharness.js-based test. -FAIL picture-in-picture interfaces. promise_test: Unhandled rejection with value: object "NotSupportedError: Picture-in-Picture is not available." +FAIL idl_test setup promise_test: Unhandled rejection with value: object "NotSupportedError: Picture-in-Picture is not available." PASS Partial interface HTMLVideoElement: original interface defined PASS Partial interface Document: original interface defined PASS Partial interface DocumentOrShadowRoot: original interface defined
diff --git a/third_party/WebKit/LayoutTests/external/wpt/picture-in-picture/idlharness.window.js b/third_party/WebKit/LayoutTests/external/wpt/picture-in-picture/idlharness.window.js index ac4c0bf..a7f25e3b 100644 --- a/third_party/WebKit/LayoutTests/external/wpt/picture-in-picture/idlharness.window.js +++ b/third_party/WebKit/LayoutTests/external/wpt/picture-in-picture/idlharness.window.js
@@ -21,6 +21,5 @@ self.video = await loadVideo(); self.pipw = await requestPictureInPictureWithTrustedClick(video); - }, - 'picture-in-picture interfaces.' + } );
diff --git a/third_party/WebKit/LayoutTests/external/wpt/pointerevents/extension/idlharness.window-expected.txt b/third_party/WebKit/LayoutTests/external/wpt/pointerevents/extension/idlharness.window-expected.txt index fd8d0406..25ba595a 100644 --- a/third_party/WebKit/LayoutTests/external/wpt/pointerevents/extension/idlharness.window-expected.txt +++ b/third_party/WebKit/LayoutTests/external/wpt/pointerevents/extension/idlharness.window-expected.txt
@@ -1,5 +1,5 @@ This is a testharness.js-based test. -PASS pointerevents extension interfaces +PASS idl_test setup PASS Partial dictionary PointerEventInit: original dictionary defined PASS Partial interface PointerEvent: original interface defined PASS PointerEvent interface: operation getCoalescedEvents()
diff --git a/third_party/WebKit/LayoutTests/external/wpt/pointerevents/extension/idlharness.window.js b/third_party/WebKit/LayoutTests/external/wpt/pointerevents/extension/idlharness.window.js index 703e1c4..895a8910 100644 --- a/third_party/WebKit/LayoutTests/external/wpt/pointerevents/extension/idlharness.window.js +++ b/third_party/WebKit/LayoutTests/external/wpt/pointerevents/extension/idlharness.window.js
@@ -10,6 +10,5 @@ idl_array.add_objects({ PointerEvent: ['new PointerEvent("pointer")'], }) - }, - 'pointerevents extension interfaces' + } );
diff --git a/third_party/WebKit/LayoutTests/external/wpt/pointerevents/idlharness.window-expected.txt b/third_party/WebKit/LayoutTests/external/wpt/pointerevents/idlharness.window-expected.txt index f6eba18..fb85fa0 100644 --- a/third_party/WebKit/LayoutTests/external/wpt/pointerevents/idlharness.window-expected.txt +++ b/third_party/WebKit/LayoutTests/external/wpt/pointerevents/idlharness.window-expected.txt
@@ -1,6 +1,6 @@ This is a testharness.js-based test. Found 85 tests; 79 PASS, 6 FAIL, 0 TIMEOUT, 0 NOTRUN. -PASS pointerevents interfaces +PASS idl_test setup PASS Partial interface Element: original interface defined PASS Partial interface GlobalEventHandlers: original interface defined PASS Partial interface Navigator: original interface defined
diff --git a/third_party/WebKit/LayoutTests/external/wpt/pointerevents/idlharness.window.js b/third_party/WebKit/LayoutTests/external/wpt/pointerevents/idlharness.window.js index aa9b11c..89a994a 100644 --- a/third_party/WebKit/LayoutTests/external/wpt/pointerevents/idlharness.window.js +++ b/third_party/WebKit/LayoutTests/external/wpt/pointerevents/idlharness.window.js
@@ -15,6 +15,5 @@ Navigator: ['navigator'], PointerEvent: ['new PointerEvent("type")'] }); - }, - 'pointerevents interfaces' + } );
diff --git a/third_party/WebKit/LayoutTests/external/wpt/pointerlock/interfaces.window.js b/third_party/WebKit/LayoutTests/external/wpt/pointerlock/interfaces.window.js index 99e2b44..f176343a 100644 --- a/third_party/WebKit/LayoutTests/external/wpt/pointerlock/interfaces.window.js +++ b/third_party/WebKit/LayoutTests/external/wpt/pointerlock/interfaces.window.js
@@ -14,5 +14,5 @@ Element: ["window.document.documentElement"], MouseEvent: ["new MouseEvent('foo')"] }); - }, - 'pointerlock interfaces.'); + } +);
diff --git a/third_party/WebKit/LayoutTests/external/wpt/remote-playback/idlharness.window.js b/third_party/WebKit/LayoutTests/external/wpt/remote-playback/idlharness.window.js index 7309f8cc..73bc998f 100644 --- a/third_party/WebKit/LayoutTests/external/wpt/remote-playback/idlharness.window.js +++ b/third_party/WebKit/LayoutTests/external/wpt/remote-playback/idlharness.window.js
@@ -24,6 +24,5 @@ HTMLVideoElement: ['media'], RemotePlayback: ['media.remote'] }); - }, - 'remote-playback interfaces' + } );
diff --git a/third_party/WebKit/LayoutTests/external/wpt/resize-observer/idlharness.window-expected.txt b/third_party/WebKit/LayoutTests/external/wpt/resize-observer/idlharness.window-expected.txt index 616aca4..45105ba 100644 --- a/third_party/WebKit/LayoutTests/external/wpt/resize-observer/idlharness.window-expected.txt +++ b/third_party/WebKit/LayoutTests/external/wpt/resize-observer/idlharness.window-expected.txt
@@ -1,5 +1,5 @@ This is a testharness.js-based test. -PASS Test IDL implementation of ResizeObserver +PASS idl_test setup PASS ResizeObserverEntry creator PASS ResizeObserver interface: existence and properties of interface object PASS ResizeObserver interface object length
diff --git a/third_party/WebKit/LayoutTests/external/wpt/resize-observer/idlharness.window.js b/third_party/WebKit/LayoutTests/external/wpt/resize-observer/idlharness.window.js index 240f5ec..592af2e 100644 --- a/third_party/WebKit/LayoutTests/external/wpt/resize-observer/idlharness.window.js +++ b/third_party/WebKit/LayoutTests/external/wpt/resize-observer/idlharness.window.js
@@ -33,6 +33,5 @@ } ]); await helper.start(); - }, - 'Test IDL implementation of ResizeObserver' + } );
diff --git a/third_party/WebKit/LayoutTests/external/wpt/resource-timing/idlharness.any.js b/third_party/WebKit/LayoutTests/external/wpt/resource-timing/idlharness.any.js index 6dff5e85..a7542f1 100644 --- a/third_party/WebKit/LayoutTests/external/wpt/resource-timing/idlharness.any.js +++ b/third_party/WebKit/LayoutTests/external/wpt/resource-timing/idlharness.any.js
@@ -19,6 +19,5 @@ Performance: ['performance'], PerformanceResourceTiming: ['resource'] }); - }, - 'Test server-timing IDL implementation' + } );
diff --git a/third_party/WebKit/LayoutTests/external/wpt/resources/idlharness.js b/third_party/WebKit/LayoutTests/external/wpt/resources/idlharness.js index 91818ef..368c96d 100644 --- a/third_party/WebKit/LayoutTests/external/wpt/resources/idlharness.js +++ b/third_party/WebKit/LayoutTests/external/wpt/resources/idlharness.js
@@ -3197,7 +3197,7 @@ * as adding objects. Do not call idl_array.test() in the setup; it is * called by this function (idl_test). */ -function idl_test(srcs, deps, idl_setup_func, test_name) { +function idl_test(srcs, deps, idl_setup_func) { return promise_test(function (t) { var idl_array = new IdlArray(); srcs = (srcs instanceof Array) ? srcs : [srcs] || []; @@ -3221,7 +3221,7 @@ } }) .catch(function(e) { setup_error = e || 'IDL setup failed.'; }) - .finally(function () { + .then(function () { var error = setup_error; try { idl_array.test(); // Test what we can. @@ -3234,7 +3234,7 @@ throw error; } }); - }, test_name || 'idl_test setup'); + }, 'idl_test setup'); } /**
diff --git a/third_party/WebKit/LayoutTests/external/wpt/screen-orientation/idlharness.window.js b/third_party/WebKit/LayoutTests/external/wpt/screen-orientation/idlharness.window.js index d4b80de3..115f6cc 100644 --- a/third_party/WebKit/LayoutTests/external/wpt/screen-orientation/idlharness.window.js +++ b/third_party/WebKit/LayoutTests/external/wpt/screen-orientation/idlharness.window.js
@@ -13,6 +13,5 @@ Screen: ['screen'], ScreenOrientation: ['screen.orientation'] }); - }, - 'Test IDL implementation of Screen Orientation API' + } );
diff --git a/third_party/WebKit/LayoutTests/external/wpt/selection/idlharness.window-expected.txt b/third_party/WebKit/LayoutTests/external/wpt/selection/idlharness.window-expected.txt index a9110b7f..be537210 100644 --- a/third_party/WebKit/LayoutTests/external/wpt/selection/idlharness.window-expected.txt +++ b/third_party/WebKit/LayoutTests/external/wpt/selection/idlharness.window-expected.txt
@@ -1,6 +1,6 @@ This is a testharness.js-based test. Found 79 tests; 73 PASS, 6 FAIL, 0 TIMEOUT, 0 NOTRUN. -PASS selection-api interfaces +PASS idl_test setup PASS Partial interface Document: original interface defined PASS Partial interface Window: original interface defined PASS Partial interface GlobalEventHandlers: original interface defined
diff --git a/third_party/WebKit/LayoutTests/external/wpt/selection/idlharness.window.js b/third_party/WebKit/LayoutTests/external/wpt/selection/idlharness.window.js index 7322a771..b2117977 100644 --- a/third_party/WebKit/LayoutTests/external/wpt/selection/idlharness.window.js +++ b/third_party/WebKit/LayoutTests/external/wpt/selection/idlharness.window.js
@@ -14,6 +14,5 @@ Document: ['document'], Selection: ['getSelection()'], }); - }, - 'selection-api interfaces' + } );
diff --git a/third_party/WebKit/LayoutTests/external/wpt/service-workers/cache-storage/resources/vary.py b/third_party/WebKit/LayoutTests/external/wpt/service-workers/cache-storage/resources/vary.py new file mode 100644 index 0000000..59e39bc --- /dev/null +++ b/third_party/WebKit/LayoutTests/external/wpt/service-workers/cache-storage/resources/vary.py
@@ -0,0 +1,25 @@ +def main(request, response): + if "clear-vary-value-override-cookie" in request.GET: + response.unset_cookie("vary-value-override") + return "vary cookie cleared" + + set_cookie_vary = request.GET.first("set-vary-value-override-cookie", + default="") + if set_cookie_vary: + response.set_cookie("vary-value-override", set_cookie_vary) + return "vary cookie set" + + # If there is a vary-value-override cookie set, then use its value + # for the VARY header no matter what the query string is set to. This + # override is necessary to test the case when two URLs are identical + # (including query), but differ by VARY header. + cookie_vary = request.cookies.get("vary-value-override"); + if cookie_vary: + response.headers.set("vary", cookie_vary) + else: + # If there is no cookie, then use the query string value, if present. + query_vary = request.GET.first("vary", default="") + if query_vary: + response.headers.set("vary", query_vary) + + return "vary response"
diff --git a/third_party/WebKit/LayoutTests/external/wpt/service-workers/cache-storage/script-tests/cache-add.js b/third_party/WebKit/LayoutTests/external/wpt/service-workers/cache-storage/script-tests/cache-add.js index c03faeb..a482c42e 100644 --- a/third_party/WebKit/LayoutTests/external/wpt/service-workers/cache-storage/script-tests/cache-add.js +++ b/third_party/WebKit/LayoutTests/external/wpt/service-workers/cache-storage/script-tests/cache-add.js
@@ -267,4 +267,84 @@ 'twice.'); }, 'Cache.addAll called with the same Request object specified twice'); +cache_test(async function(cache, test) { + const url = '../resources/vary.py?vary=x-shape'; + let requests = [ + new Request(url, { headers: { 'x-shape': 'circle' }}), + new Request(url, { headers: { 'x-shape': 'square' }}), + ]; + let result = await cache.addAll(requests); + assert_equals(result, undefined, 'Cache.addAll() should succeed'); + }, 'Cache.addAll should succeed when entries differ by vary header'); + +cache_test(async function(cache, test) { + const url = '../resources/vary.py?vary=x-shape'; + let requests = [ + new Request(url, { headers: { 'x-shape': 'circle' }}), + new Request(url, { headers: { 'x-shape': 'circle' }}), + ]; + await promise_rejects( + test, + 'InvalidStateError', + cache.addAll(requests), + 'Cache.addAll() should reject when entries are duplicate by vary header'); + }, 'Cache.addAll should reject when entries are duplicate by vary header'); + +// VARY header matching is asymmetric. Determining if two entries are duplicate +// depends on which entry's response is used in the comparison. The target +// response's VARY header determines what request headers are examined. This +// test verifies that Cache.addAll() duplicate checking handles this asymmetric +// behavior correctly. +cache_test(async function(cache, test) { + const base_url = '../resources/vary.py'; + + // Define a request URL that sets a VARY header in the + // query string to be echoed back by the server. + const url = base_url + '?vary=x-size'; + + // Set a cookie to override the VARY header of the response + // when the request is made with credentials. This will + // take precedence over the query string vary param. This + // is a bit confusing, but it's necessary to construct a test + // where the URL is the same, but the VARY headers differ. + // + // Note, the test could also pass this information in additional + // request headers. If the cookie approach becomes too unwieldy + // this test could be rewritten to use that technique. + await fetch(base_url + '?set-vary-value-override-cookie=x-shape'); + test.add_cleanup(_ => fetch(base_url + '?clear-vary-value-override-cookie')); + + let requests = [ + // This request will result in a Response with a "Vary: x-shape" + // header. This *will not* result in a duplicate match with the + // other entry. + new Request(url, { headers: { 'x-shape': 'circle', + 'x-size': 'big' }, + credentials: 'same-origin' }), + + // This request will result in a Response with a "Vary: x-size" + // header. This *will* result in a duplicate match with the other + // entry. + new Request(url, { headers: { 'x-shape': 'square', + 'x-size': 'big' }, + credentials: 'omit' }), + ]; + await promise_rejects( + test, + 'InvalidStateError', + cache.addAll(requests), + 'Cache.addAll() should reject when one entry has a vary header ' + + 'matching an earlier entry.'); + + // Test the reverse order now. + await promise_rejects( + test, + 'InvalidStateError', + cache.addAll(requests.reverse()), + 'Cache.addAll() should reject when one entry has a vary header ' + + 'matching a later entry.'); + + }, 'Cache.addAll should reject when one entry has a vary header ' + + 'matching another entry'); + done();
diff --git a/third_party/WebKit/LayoutTests/external/wpt/service-workers/cache-storage/serviceworker/cache-add.https-expected.txt b/third_party/WebKit/LayoutTests/external/wpt/service-workers/cache-storage/serviceworker/cache-add.https-expected.txt deleted file mode 100644 index a1555dcb8..0000000 --- a/third_party/WebKit/LayoutTests/external/wpt/service-workers/cache-storage/serviceworker/cache-add.https-expected.txt +++ /dev/null
@@ -1,22 +0,0 @@ -This is a testharness.js-based test. -PASS Cache.add and Cache.addAll -PASS Cache.add called with no arguments -PASS Cache.add called with relative URL specified as a string -PASS Cache.add called with non-HTTP/HTTPS URL -PASS Cache.add called with Request object -PASS Cache.add called with POST request -PASS Cache.add called twice with the same Request object -PASS Cache.add with request with null body (not consumed) -PASS Cache.add with 206 response -PASS Cache.addAll with 206 response -PASS Cache.add with request that results in a status of 404 -PASS Cache.add with request that results in a status of 500 -PASS Cache.addAll with no arguments -PASS Cache.addAll with a mix of valid and undefined arguments -PASS Cache.addAll with an empty array -PASS Cache.addAll with string URL arguments -PASS Cache.addAll with Request arguments -PASS Cache.addAll with a mix of succeeding and failing requests -FAIL Cache.addAll called with the same Request object specified twice assert_unreached: Should have rejected: Cache.addAll should throw InvalidStateError if the same request is added twice. Reached unreachable code -Harness: the test ran to completion. -
diff --git a/third_party/WebKit/LayoutTests/external/wpt/service-workers/cache-storage/window/cache-add.https-expected.txt b/third_party/WebKit/LayoutTests/external/wpt/service-workers/cache-storage/window/cache-add.https-expected.txt deleted file mode 100644 index 3f3f278..0000000 --- a/third_party/WebKit/LayoutTests/external/wpt/service-workers/cache-storage/window/cache-add.https-expected.txt +++ /dev/null
@@ -1,21 +0,0 @@ -This is a testharness.js-based test. -PASS Cache.add called with no arguments -PASS Cache.add called with relative URL specified as a string -PASS Cache.add called with non-HTTP/HTTPS URL -PASS Cache.add called with Request object -PASS Cache.add called with POST request -PASS Cache.add called twice with the same Request object -PASS Cache.add with request with null body (not consumed) -PASS Cache.add with 206 response -PASS Cache.addAll with 206 response -PASS Cache.add with request that results in a status of 404 -PASS Cache.add with request that results in a status of 500 -PASS Cache.addAll with no arguments -PASS Cache.addAll with a mix of valid and undefined arguments -PASS Cache.addAll with an empty array -PASS Cache.addAll with string URL arguments -PASS Cache.addAll with Request arguments -PASS Cache.addAll with a mix of succeeding and failing requests -FAIL Cache.addAll called with the same Request object specified twice assert_unreached: Should have rejected: Cache.addAll should throw InvalidStateError if the same request is added twice. Reached unreachable code -Harness: the test ran to completion. -
diff --git a/third_party/WebKit/LayoutTests/external/wpt/service-workers/cache-storage/worker/cache-add.https-expected.txt b/third_party/WebKit/LayoutTests/external/wpt/service-workers/cache-storage/worker/cache-add.https-expected.txt deleted file mode 100644 index 3f3f278..0000000 --- a/third_party/WebKit/LayoutTests/external/wpt/service-workers/cache-storage/worker/cache-add.https-expected.txt +++ /dev/null
@@ -1,21 +0,0 @@ -This is a testharness.js-based test. -PASS Cache.add called with no arguments -PASS Cache.add called with relative URL specified as a string -PASS Cache.add called with non-HTTP/HTTPS URL -PASS Cache.add called with Request object -PASS Cache.add called with POST request -PASS Cache.add called twice with the same Request object -PASS Cache.add with request with null body (not consumed) -PASS Cache.add with 206 response -PASS Cache.addAll with 206 response -PASS Cache.add with request that results in a status of 404 -PASS Cache.add with request that results in a status of 500 -PASS Cache.addAll with no arguments -PASS Cache.addAll with a mix of valid and undefined arguments -PASS Cache.addAll with an empty array -PASS Cache.addAll with string URL arguments -PASS Cache.addAll with Request arguments -PASS Cache.addAll with a mix of succeeding and failing requests -FAIL Cache.addAll called with the same Request object specified twice assert_unreached: Should have rejected: Cache.addAll should throw InvalidStateError if the same request is added twice. Reached unreachable code -Harness: the test ran to completion. -
diff --git a/third_party/WebKit/LayoutTests/external/wpt/service-workers/service-worker/postmessage.https.html b/third_party/WebKit/LayoutTests/external/wpt/service-workers/service-worker/postmessage.https.html index 6b2f6d78..3d73afe 100644 --- a/third_party/WebKit/LayoutTests/external/wpt/service-workers/service-worker/postmessage.https.html +++ b/third_party/WebKit/LayoutTests/external/wpt/service-workers/service-worker/postmessage.https.html
@@ -148,4 +148,46 @@ }); }, 'postMessage a transferable ArrayBuffer between ServiceWorker and Client' + ' over MessagePort'); + + promise_test(t => { + var script = 'resources/postmessage-dictionary-transferables-worker.js'; + var scope = 'resources/blank.html'; + var sw = navigator.serviceWorker; + + var message = 'Hello, world!'; + var text_encoder = new TextEncoder; + var text_decoder = new TextDecoder; + + return service_worker_unregister_and_register(t, script, scope) + .then(r => { + t.add_cleanup(() => r.unregister()); + + var ab = text_encoder.encode(message); + assert_equals(ab.byteLength, message.length); + r.installing.postMessage(ab, {transfer: [ab.buffer]}); + assert_equals(text_decoder.decode(ab), ''); + assert_equals(ab.byteLength, 0); + + return new Promise(resolve => { sw.onmessage = resolve; }); + }) + .then(e => { + // Verify the integrity of the transferred array buffer. + assert_equals(e.data.content, message); + assert_equals(e.data.byteLength, message.length); + return new Promise(resolve => { sw.onmessage = resolve; }); + }) + .then(e => { + // Verify the integrity of the array buffer sent back from + // ServiceWorker via Client.postMessage. + assert_equals(text_decoder.decode(e.data), message); + assert_equals(e.data.byteLength, message.length); + return new Promise(resolve => { sw.onmessage = resolve; }); + }) + .then(e => { + // Verify that the array buffer on ServiceWorker is neutered. + assert_equals(e.data.content, ''); + assert_equals(e.data.byteLength, 0); + }); + }, 'postMessage with dictionary a transferable ArrayBuffer between ServiceWorker and Client'); + </script>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/service-workers/service-worker/resources/postmessage-dictionary-transferables-worker.js b/third_party/WebKit/LayoutTests/external/wpt/service-workers/service-worker/resources/postmessage-dictionary-transferables-worker.js new file mode 100644 index 0000000..87a4500 --- /dev/null +++ b/third_party/WebKit/LayoutTests/external/wpt/service-workers/service-worker/resources/postmessage-dictionary-transferables-worker.js
@@ -0,0 +1,24 @@ +var messageHandler = function(port, e) { + var text_decoder = new TextDecoder; + port.postMessage({ + content: text_decoder.decode(e.data), + byteLength: e.data.byteLength + }); + + // Send back the array buffer via Client.postMessage. + port.postMessage(e.data, {transfer: [e.data.buffer]}); + + port.postMessage({ + content: text_decoder.decode(e.data), + byteLength: e.data.byteLength + }); +}; + +self.addEventListener('message', e => { + if (e.ports[0]) { + // Wait for messages sent via MessagePort. + e.ports[0].onmessage = messageHandler.bind(null, e.ports[0]); + return; + } + messageHandler(e.source, e); + });
diff --git a/third_party/WebKit/LayoutTests/external/wpt/subresource-integrity/idlharness.window-expected.txt b/third_party/WebKit/LayoutTests/external/wpt/subresource-integrity/idlharness.window-expected.txt deleted file mode 100644 index 17cac98..0000000 --- a/third_party/WebKit/LayoutTests/external/wpt/subresource-integrity/idlharness.window-expected.txt +++ /dev/null
@@ -1,6 +0,0 @@ -This is a testharness.js-based test. -FAIL webappsec-subresource-integrity interfaces promise_test: Unhandled rejection with value: "ProcessingInstruction includes LinkStyle, but ProcessingInstruction is undefined." -PASS Partial interface HTMLLinkElement: original interface defined -PASS Partial interface HTMLScriptElement: original interface defined -Harness: the test ran to completion. -
diff --git a/third_party/WebKit/LayoutTests/external/wpt/subresource-integrity/idlharness.window.js b/third_party/WebKit/LayoutTests/external/wpt/subresource-integrity/idlharness.window.js index d4a6efd..d2997e5 100644 --- a/third_party/WebKit/LayoutTests/external/wpt/subresource-integrity/idlharness.window.js +++ b/third_party/WebKit/LayoutTests/external/wpt/subresource-integrity/idlharness.window.js
@@ -7,11 +7,11 @@ idl_test( ['SRI'], - ['html', 'dom', 'cssom'], + ['html', 'cssom', 'dom'], idl_array => { idl_array.add_objects({ HTMLScriptElement: ['document.createElement("script")'], HTMLLinkElement: ['document.createElement("link")'], }); - }, - 'webappsec-subresource-integrity interfaces'); + } +);
diff --git a/third_party/WebKit/LayoutTests/external/wpt/svg/idlharness.window-expected.txt b/third_party/WebKit/LayoutTests/external/wpt/svg/idlharness.window-expected.txt index c3f83f1..7de371d 100644 --- a/third_party/WebKit/LayoutTests/external/wpt/svg/idlharness.window-expected.txt +++ b/third_party/WebKit/LayoutTests/external/wpt/svg/idlharness.window-expected.txt
@@ -1,6 +1,6 @@ This is a testharness.js-based test. -Found 1595 tests; 1467 PASS, 128 FAIL, 0 TIMEOUT, 0 NOTRUN. -PASS SVG interfaces +Found 1601 tests; 1467 PASS, 134 FAIL, 0 TIMEOUT, 0 NOTRUN. +PASS idl_test setup PASS Partial interface Document: original interface defined PASS SVGElement interface: existence and properties of interface object PASS SVGElement interface object length @@ -1539,19 +1539,25 @@ PASS SVGAElement interface: existence and properties of interface prototype object's @@unscopables property PASS SVGAElement interface: attribute target FAIL SVGAElement interface: attribute download assert_true: The prototype object must have a property "download" expected true got false +FAIL SVGAElement interface: attribute ping assert_true: The prototype object must have a property "ping" expected true got false FAIL SVGAElement interface: attribute rel assert_true: The prototype object must have a property "rel" expected true got false FAIL SVGAElement interface: attribute relList assert_true: The prototype object must have a property "relList" expected true got false FAIL SVGAElement interface: attribute hreflang assert_true: The prototype object must have a property "hreflang" expected true got false FAIL SVGAElement interface: attribute type assert_true: The prototype object must have a property "type" expected true got false +FAIL SVGAElement interface: attribute text assert_true: The prototype object must have a property "text" expected true got false +FAIL SVGAElement interface: attribute referrerPolicy assert_true: The prototype object must have a property "referrerPolicy" expected true got false PASS SVGAElement interface: attribute href PASS SVGAElement must be primary interface of objects.a PASS Stringification of objects.a PASS SVGAElement interface: objects.a must inherit property "target" with the proper type FAIL SVGAElement interface: objects.a must inherit property "download" with the proper type assert_inherits: property "download" not found in prototype chain +FAIL SVGAElement interface: objects.a must inherit property "ping" with the proper type assert_inherits: property "ping" not found in prototype chain FAIL SVGAElement interface: objects.a must inherit property "rel" with the proper type assert_inherits: property "rel" not found in prototype chain FAIL SVGAElement interface: objects.a must inherit property "relList" with the proper type assert_inherits: property "relList" not found in prototype chain FAIL SVGAElement interface: objects.a must inherit property "hreflang" with the proper type assert_inherits: property "hreflang" not found in prototype chain FAIL SVGAElement interface: objects.a must inherit property "type" with the proper type assert_inherits: property "type" not found in prototype chain +FAIL SVGAElement interface: objects.a must inherit property "text" with the proper type assert_inherits: property "text" not found in prototype chain +FAIL SVGAElement interface: objects.a must inherit property "referrerPolicy" with the proper type assert_inherits: property "referrerPolicy" not found in prototype chain PASS SVGAElement interface: objects.a must inherit property "href" with the proper type PASS SVGGraphicsElement interface: objects.a must inherit property "transform" with the proper type PASS SVGGraphicsElement interface: objects.a must inherit property "getBBox(SVGBoundingBoxOptions)" with the proper type
diff --git a/third_party/WebKit/LayoutTests/external/wpt/svg/idlharness.window.js b/third_party/WebKit/LayoutTests/external/wpt/svg/idlharness.window.js index d71807a..e08adf8 100644 --- a/third_party/WebKit/LayoutTests/external/wpt/svg/idlharness.window.js +++ b/third_party/WebKit/LayoutTests/external/wpt/svg/idlharness.window.js
@@ -232,6 +232,5 @@ SVGFETileElement: ['objects.feTile'], SVGFETurbulenceElement: ['objects.feTurbulence'] }); - }, - 'SVG interfaces' + } );
diff --git a/third_party/WebKit/LayoutTests/external/wpt/svg/painting/reftests/markers-orient-001.svg b/third_party/WebKit/LayoutTests/external/wpt/svg/painting/reftests/markers-orient-001.svg index 55c2394..190423f 100644 --- a/third_party/WebKit/LayoutTests/external/wpt/svg/painting/reftests/markers-orient-001.svg +++ b/third_party/WebKit/LayoutTests/external/wpt/svg/painting/reftests/markers-orient-001.svg
@@ -30,6 +30,9 @@ .label { font-size: 18px; } + #reference { + display: none; + } </style> <defs>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/touch-events/idlharness.window-expected.txt b/third_party/WebKit/LayoutTests/external/wpt/touch-events/idlharness.window-expected.txt index c003740..9119f81e 100644 --- a/third_party/WebKit/LayoutTests/external/wpt/touch-events/idlharness.window-expected.txt +++ b/third_party/WebKit/LayoutTests/external/wpt/touch-events/idlharness.window-expected.txt
@@ -1,6 +1,6 @@ This is a testharness.js-based test. Found 106 tests; 90 PASS, 16 FAIL, 0 TIMEOUT, 0 NOTRUN. -PASS Test IDL implementation of touch-events API +PASS idl_test setup PASS Partial interface GlobalEventHandlers: original interface defined PASS Partial interface Document: original interface defined PASS Touch interface: existence and properties of interface object
diff --git a/third_party/WebKit/LayoutTests/external/wpt/touch-events/idlharness.window.js b/third_party/WebKit/LayoutTests/external/wpt/touch-events/idlharness.window.js index dbea07a..f88c9aa 100644 --- a/third_party/WebKit/LayoutTests/external/wpt/touch-events/idlharness.window.js +++ b/third_party/WebKit/LayoutTests/external/wpt/touch-events/idlharness.window.js
@@ -15,6 +15,5 @@ Touch: ['new Touch({identifier: 1, target: document})'], TouchEvent: ['new TouchEvent("name")'], }); - }, - 'Test IDL implementation of touch-events API' + } );
diff --git a/third_party/WebKit/LayoutTests/external/wpt/trusted-types/HTMLAnchorElement-href.tentative.html b/third_party/WebKit/LayoutTests/external/wpt/trusted-types/HTMLAnchorElement-href.tentative.html deleted file mode 100644 index 33c89896..0000000 --- a/third_party/WebKit/LayoutTests/external/wpt/trusted-types/HTMLAnchorElement-href.tentative.html +++ /dev/null
@@ -1,21 +0,0 @@ -<!DOCTYPE html> -<script src="/resources/testharness.js"></script> -<script src="/resources/testharnessreport.js"></script> -<script src="support/helper.sub.js"></script> -<body> -<script> - //helper function for the tests - function testHref(str, url) { - var a = document.createElement('a'); - a.href = url; - assert_equals(a.href, str); - } - - test(t => { - testHref(URLS.safe, TrustedURL.create(URLS.safe)); - }, "a.href = URLS.safe, TrustedURL.create"); - - test(t => { - testHref(URLS.safe, TrustedURL.unsafelyCreate(URLS.safe)); - }, "a.href = URLS.safe, TrustedURL.unsafelyCreate"); -</script>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/trusted-types/HTMLAreaElement-href.tentative.html b/third_party/WebKit/LayoutTests/external/wpt/trusted-types/HTMLAreaElement-href.tentative.html deleted file mode 100644 index 8ac509d..0000000 --- a/third_party/WebKit/LayoutTests/external/wpt/trusted-types/HTMLAreaElement-href.tentative.html +++ /dev/null
@@ -1,25 +0,0 @@ -<!DOCTYPE html> -<script src="/resources/testharness.js"></script> -<script src="/resources/testharnessreport.js"></script> -<script src="support/helper.sub.js"></script> -<body> - <map> - <script> - //helper function for the tests - function testHref(str, url) { - var area = document.createElement('area'); - area.href = url; - area.alt = "Area"; - assert_equals(area.href, str); - } - - test(t => { - testHref(URLS.safe, TrustedURL.create(URLS.safe)); - }, "area.href = URLS.safe, TrustedURL.create"); - - test(t => { - testHref(URLS.safe, TrustedURL.unsafelyCreate(URLS.safe)); - }, "area.href = URLS.safe, TrustedURL.unsafelyCreate"); - </script> - </map> -</body>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/trusted-types/HTMLBaseElement-href.tentative.html b/third_party/WebKit/LayoutTests/external/wpt/trusted-types/HTMLBaseElement-href.tentative.html deleted file mode 100644 index 80bed80..0000000 --- a/third_party/WebKit/LayoutTests/external/wpt/trusted-types/HTMLBaseElement-href.tentative.html +++ /dev/null
@@ -1,24 +0,0 @@ -<!DOCTYPE html> -<html> -<head> - <script src="/resources/testharness.js"></script> - <script src="/resources/testharnessreport.js"></script> - <script src="support/helper.sub.js"></script> - - <script> - //helper function for the tests - function testHref(str, url) { - var base = document.createElement('base'); - base.href = url; - assert_equals(base.href, str); - } - - test(t => { - testHref(URLS.safe, TrustedURL.create(URLS.safe)); - }, "base.href = URLS.safe, TrustedURL.create"); - - test(t => { - testHref(URLS.safe, TrustedURL.unsafelyCreate(URLS.safe)); - }, "base.href = URLS.safe, TrustedURL.unsafelyCreate"); - </script> -</head>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/trusted-types/HTMLElement-generic.tentative.html b/third_party/WebKit/LayoutTests/external/wpt/trusted-types/HTMLElement-generic.tentative.html new file mode 100644 index 0000000..486b008 --- /dev/null +++ b/third_party/WebKit/LayoutTests/external/wpt/trusted-types/HTMLElement-generic.tentative.html
@@ -0,0 +1,43 @@ +<!DOCTYPE html> +<head> + <script src="/resources/testharness.js"></script> + <script src="/resources/testharnessreport.js"></script> + <script src="support/helper.sub.js"></script> +</head> +<body> +<script> + //TrustedURL Assignments + let testCases = [ + [ 'a', 'href' ], + [ 'area', 'href' ], + [ 'base', 'href' ], + [ 'frame', 'src' ], + [ 'iframe', 'src' ], + [ 'img', 'src' ], + [ 'input', 'src' ], + [ 'link', 'href' ], + [ 'video', 'src' ], + [ 'object', 'data' ], + [ 'object', 'codeBase' ], + [ 'source', 'src' ], + [ 'track', 'src' ] + ]; + + testCases.forEach(c => { + test(t => { + assert_accepts_trusted_url(c[0], c[1]); + }, c[0] + "." + c[1] + " accepts TrustedURL"); + }); + + //TrustedScriptURL Assignments + let scriptTestCases = [ + [ 'embed', 'src' ], + [ 'script', 'src' ] + ]; + + scriptTestCases.forEach(c => { + test(t => { + assert_accepts_trusted_script_url(c[0], c[1]); + }, c[0] + "." + c[1] + " accepts TrustedScriptURL"); + }); +</script>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/trusted-types/HTMLIFrameElement-src.tentative.html b/third_party/WebKit/LayoutTests/external/wpt/trusted-types/HTMLIFrameElement-src.tentative.html deleted file mode 100644 index 6e89a0f3..0000000 --- a/third_party/WebKit/LayoutTests/external/wpt/trusted-types/HTMLIFrameElement-src.tentative.html +++ /dev/null
@@ -1,23 +0,0 @@ -<!DOCTYPE html> -<script src="/resources/testharness.js"></script> -<script src="/resources/testharnessreport.js"></script> -<script src="./support/helper.sub.js"></script> - -<body> -<script> - test(t => { - var url = TrustedURL.create(URLS.safe); - - var d = document.createElement('iframe'); - d.src = url; - assert_equals("" + d.src, URLS.safe); - }, "src = TrustedURL.create()."); - - test(t => { - var url = TrustedURL.unsafelyCreate(URLS.safe); - - var d = document.createElement('iframe'); - d.src = url; - assert_equals("" + d.src, URLS.safe); - }, "src = TrustedURL.unsafelyCreate()."); -</script>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/trusted-types/HTMLImageElement-src.tentative.html b/third_party/WebKit/LayoutTests/external/wpt/trusted-types/HTMLImageElement-src.tentative.html deleted file mode 100644 index 5797aa5..0000000 --- a/third_party/WebKit/LayoutTests/external/wpt/trusted-types/HTMLImageElement-src.tentative.html +++ /dev/null
@@ -1,24 +0,0 @@ -<!DOCTYPE html> -<script src="/resources/testharness.js"></script> -<script src="/resources/testharnessreport.js"></script> -<script src="./support/helper.sub.js"></script> - -<body> -<script> - test(t => { - var url = TrustedURL.create(URLS.safe); - - var d = document.createElement('image'); - d.src = url; - assert_equals("" + d.src, URLS.safe); - }, "src = TrustedURL.create()."); - - test(t => { - var url = TrustedURL.unsafelyCreate(URLS.safe); - - var d = document.createElement('image'); - d.src = url; - assert_equals("" + d.src, URLS.safe); - }, "src = TrustedURL.unsafelyCreate()."); -</script> -
diff --git a/third_party/WebKit/LayoutTests/external/wpt/trusted-types/HTMLLinkElement-href.tentative.html b/third_party/WebKit/LayoutTests/external/wpt/trusted-types/HTMLLinkElement-href.tentative.html deleted file mode 100644 index 7f6e7e23..0000000 --- a/third_party/WebKit/LayoutTests/external/wpt/trusted-types/HTMLLinkElement-href.tentative.html +++ /dev/null
@@ -1,21 +0,0 @@ -<!DOCTYPE html> -<script src="/resources/testharness.js"></script> -<script src="/resources/testharnessreport.js"></script> -<script src="support/helper.sub.js"></script> -<body> -<script> - //helper function for the tests - function testHref(str, url) { - var link = document.createElement('link'); - link.href = url; - assert_equals(link.href, str); - } - - test(t => { - testHref(URLS.safe, TrustedURL.create(URLS.safe)); - }, "link.href = URLS.safe, TrustedURL.create"); - - test(t => { - testHref(URLS.safe, TrustedURL.unsafelyCreate(URLS.safe)); - }, "link.href = URLS.safe, TrustedURL.unsafelyCreate"); -</script>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/trusted-types/HTMLMediaElement-src.tentative.html b/third_party/WebKit/LayoutTests/external/wpt/trusted-types/HTMLMediaElement-src.tentative.html deleted file mode 100644 index c54dfdd..0000000 --- a/third_party/WebKit/LayoutTests/external/wpt/trusted-types/HTMLMediaElement-src.tentative.html +++ /dev/null
@@ -1,23 +0,0 @@ -<!DOCTYPE html> -<script src="/resources/testharness.js"></script> -<script src="/resources/testharnessreport.js"></script> -<script src="./support/helper.sub.js"></script> - -<body> -<script> - test(t => { - var url = TrustedURL.create(URLS.safe); - - var d = document.createElement('video'); - d.src = url; - assert_equals("" + d.src, URLS.safe); - }, "src = TrustedURL.create()."); - - test(t => { - var url = TrustedURL.unsafelyCreate(URLS.safe); - - var d = document.createElement('video'); - d.src = url; - assert_equals("" + d.src, URLS.safe); - }, "src = TrustedURL.unsafelyCreate()."); -</script>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/trusted-types/HTMLObjectElement.tentative.html b/third_party/WebKit/LayoutTests/external/wpt/trusted-types/HTMLObjectElement.tentative.html deleted file mode 100644 index a9dcc94a..0000000 --- a/third_party/WebKit/LayoutTests/external/wpt/trusted-types/HTMLObjectElement.tentative.html +++ /dev/null
@@ -1,23 +0,0 @@ -<!DOCTYPE html> -<script src="/resources/testharness.js"></script> -<script src="/resources/testharnessreport.js"></script> -<script src="support/helper.sub.js"></script> -<body> -<script> - //helper function for the tests - function testData(str, url) { - var objectElement = document.createElement('object'); - objectElement.data = url; - objectElement.codeBase = url; - assert_equals(objectElement.data, str); - assert_equals(objectElement.codeBase,str); - } - - test(t => { - testData(URLS.safe, TrustedURL.create(URLS.safe)); - }, "Basic processing: safe URL, safe construction."); - - test(t => { - testData(URLS.safe, TrustedURL.unsafelyCreate(URLS.safe)); - }, "Basic processing: safe URL, unsafe construction."); -</script>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/trusted-types/HTMLSourceElement-src.tentative.html b/third_party/WebKit/LayoutTests/external/wpt/trusted-types/HTMLSourceElement-src.tentative.html deleted file mode 100644 index 6791a0f..0000000 --- a/third_party/WebKit/LayoutTests/external/wpt/trusted-types/HTMLSourceElement-src.tentative.html +++ /dev/null
@@ -1,22 +0,0 @@ -<!DOCTYPE html> -<script src="/resources/testharness.js"></script> -<script src="/resources/testharnessreport.js"></script> -<script src="./support/helper.sub.js"></script> -<body> -<script> - test(t => { - var url = TrustedURL.create(URLS.safe); - - var d = document.createElement('source'); - d.src = url; - assert_equals(d.src, URLS.safe); - }, "src = TrustedURL.create()."); - - test(t => { - var url = TrustedURL.unsafelyCreate(URLS.safe); - - var d = document.createElement('source'); - d.src = url; - assert_equals(d.src, URLS.safe); - }, "src = TrustedURL.unsafelyCreate()."); -</script>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/trusted-types/block-string-assignment-to-HTMLAnchorElement-href.tentative.html b/third_party/WebKit/LayoutTests/external/wpt/trusted-types/block-string-assignment-to-HTMLAnchorElement-href.tentative.html deleted file mode 100644 index 53334e2e..0000000 --- a/third_party/WebKit/LayoutTests/external/wpt/trusted-types/block-string-assignment-to-HTMLAnchorElement-href.tentative.html +++ /dev/null
@@ -1,43 +0,0 @@ -<!DOCTYPE html> -<html> -<head> - <script src="/resources/testharness.js"></script> - <script src="/resources/testharnessreport.js"></script> - <script src="support/helper.sub.js"></script> - - <meta http-equiv="Content-Security-Policy" content="require-trusted-types"> -</head> -<body> -<script> - //helper function for the tests - function testHref(str, url) { - var a = document.createElement('a'); - a.href = url; - assert_equals(a.href, str); - } - - //URL assignments do not throw. - test(t => { - testHref(URLS.safe, TrustedURL.create(URLS.safe)); - }, "a.href = URLS.safe, TrustedURL.create"); - - test(t => { - testHref(URLS.safe, TrustedURL.unsafelyCreate(URLS.safe)); - }, "a.href = URLS.safe, TrustedURL.unsafelyCreate"); - - // String assignments throw. - test(t => { - var a = document.createElement('a'); - assert_throws(new TypeError(), _ => { - a.href = "A string"; - }); - }, "`a.href = string` throws"); - - //Null assignment throws. - test(t => { - var a = document.createElement('a'); - assert_throws(new TypeError(), _ => { - a.href = null; - }); - }, "`a.href = null` throws"); -</script>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/trusted-types/block-string-assignment-to-HTMLAreaElement-href.tentative.html b/third_party/WebKit/LayoutTests/external/wpt/trusted-types/block-string-assignment-to-HTMLAreaElement-href.tentative.html deleted file mode 100644 index 5879d1c..0000000 --- a/third_party/WebKit/LayoutTests/external/wpt/trusted-types/block-string-assignment-to-HTMLAreaElement-href.tentative.html +++ /dev/null
@@ -1,46 +0,0 @@ -<!DOCTYPE html> -<html> -<head> - <script src="/resources/testharness.js"></script> - <script src="/resources/testharnessreport.js"></script> - <script src="support/helper.sub.js"></script> - - <meta http-equiv="Content-Security-Policy" content="require-trusted-types"> -</head> -<body> - <map> - <script> - //helper function for the tests - function testHref(str, url) { - var area = document.createElement('area'); - area.href = url; - area.alt = "Area"; - assert_equals(area.href, str); - } - - //URL assignments do not throw. - test(t => { - testHref(URLS.safe, TrustedURL.create(URLS.safe)); - }, "area.href = URLS.safe, TrustedURL.create"); - - test(t => { - testHref(URLS.safe, TrustedURL.unsafelyCreate(URLS.safe)); - }, "area.href = URLS.safe, TrustedURL.unsafelyCreate"); - - // String assignments throw. - test(t => { - var area = document.createElement('area'); - assert_throws(new TypeError(), _ => { - area.href = "A string"; - }); - }, "`area.href = string` throws"); - - //Null assignment throws. - test(t => { - var area = document.createElement('area'); - assert_throws(new TypeError(), _ => { - area.href = null; - }); - }, "`area.href = null` throws"); - </script> - </map>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/trusted-types/block-string-assignment-to-HTMLBaseElement-href.tentative.html b/third_party/WebKit/LayoutTests/external/wpt/trusted-types/block-string-assignment-to-HTMLBaseElement-href.tentative.html deleted file mode 100644 index a973e29..0000000 --- a/third_party/WebKit/LayoutTests/external/wpt/trusted-types/block-string-assignment-to-HTMLBaseElement-href.tentative.html +++ /dev/null
@@ -1,43 +0,0 @@ -<!DOCTYPE html> -<html> -<head> - <script src="/resources/testharness.js"></script> - <script src="/resources/testharnessreport.js"></script> - <script src="support/helper.sub.js"></script> - - <meta http-equiv="Content-Security-Policy" content="require-trusted-types"> - - <script> - //helper function for the tests - function testHref(str, url) { - var base = document.createElement('base'); - base.href = url; - assert_equals(base.href, str); - } - - //URL assignments do not throw. - test(t => { - testHref(URLS.safe, TrustedURL.create(URLS.safe)); - }, "base.href = URLS.safe, TrustedURL.create"); - - test(t => { - testHref(URLS.safe, TrustedURL.unsafelyCreate(URLS.safe)); - }, "base.href = URLS.safe, TrustedURL.unsafelyCreate"); - - // String assignments throw. - test(t => { - var base = document.createElement('base'); - assert_throws(new TypeError(), _ => { - base.href = "A string"; - }); - }, "`base.href = string` throws"); - - //Null assignment throws. - test(t => { - var base = document.createElement('base'); - assert_throws(new TypeError(), _ => { - base.href = null; - }); - }, "`base.href = null` throws"); - </script> -</head>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/trusted-types/block-string-assignment-to-HTMLElement-generic.tentative.html b/third_party/WebKit/LayoutTests/external/wpt/trusted-types/block-string-assignment-to-HTMLElement-generic.tentative.html new file mode 100644 index 0000000..79bbb24 --- /dev/null +++ b/third_party/WebKit/LayoutTests/external/wpt/trusted-types/block-string-assignment-to-HTMLElement-generic.tentative.html
@@ -0,0 +1,50 @@ +<!DOCTYPE html> +<html> +<head> + <script src="/resources/testharness.js"></script> + <script src="/resources/testharnessreport.js"></script> + <script src="support/helper.sub.js"></script> + + <meta http-equiv="Content-Security-Policy" content="require-trusted-types"> +</head> +<body> +<script> + //TrustedURL Assignments + let testCases = [ + [ 'a', 'href' ], + [ 'area', 'href' ], + [ 'base', 'href' ], + [ 'frame', 'src' ], + [ 'iframe', 'src' ], + [ 'img', 'src' ], + [ 'input', 'src' ], + [ 'link', 'href' ], + [ 'video', 'src' ], + [ 'object', 'data' ], + [ 'object', 'codeBase' ], + [ 'source', 'src' ], + [ 'track', 'src' ] + ]; + + testCases.forEach(c => { + test(t => { + assert_accepts_trusted_url(c[0], c[1]); + assert_throws_no_trusted_type(c[0], c[1], 'A string'); + assert_throws_no_trusted_type(c[0], c[1], null); + }, c[0] + "." + c[1] + " accepts TrustedURL"); + }); + + //TrustedScriptURL Assignments + let scriptTestCases = [ + [ 'embed', 'src' ], + [ 'script', 'src' ] + ]; + + scriptTestCases.forEach(c => { + test(t => { + assert_accepts_trusted_script_url(c[0], c[1]); + assert_throws_no_trusted_type(c[0], c[1], 'A string'); + assert_throws_no_trusted_type(c[0], c[1], null); + }, c[0] + "." + c[1] + " accepts TrustedScriptURL"); + }); +</script>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/trusted-types/block-string-assignment-to-HTMLIFrameElement-src.tentative.html b/third_party/WebKit/LayoutTests/external/wpt/trusted-types/block-string-assignment-to-HTMLIFrameElement-src.tentative.html deleted file mode 100644 index 8db0d60..0000000 --- a/third_party/WebKit/LayoutTests/external/wpt/trusted-types/block-string-assignment-to-HTMLIFrameElement-src.tentative.html +++ /dev/null
@@ -1,33 +0,0 @@ -<!DOCTYPE html> -<script src="/resources/testharness.js"></script> -<script src="/resources/testharnessreport.js"></script> -<script src="./support/helper.sub.js"></script> - -<meta http-equiv="Content-Security-Policy" content="require-trusted-types"> -<body> -<script> - //URL assignments don't throw - test(t => { - var url = TrustedURL.create(URLS.safe); - - var d = document.createElement('iframe'); - d.src = url; - assert_equals("" + d.src, URLS.safe); - }, "src = TrustedURL.create()."); - - test(t => { - var url = TrustedURL.unsafelyCreate(URLS.safe); - - var d = document.createElement('iframe'); - d.src = url; - assert_equals("" + d.src, URLS.safe); - }, "src = TrustedURL.unsafelyCreate()."); - - //String assignment throws - test(t => { - var d = document.createElement('iframe'); - assert_throws(new TypeError(), _ => { - d.src = "Fail."; - }); - }, "'src = string' throws."); -</script>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/trusted-types/block-string-assignment-to-HTMLImageElement-src.tentative.html b/third_party/WebKit/LayoutTests/external/wpt/trusted-types/block-string-assignment-to-HTMLImageElement-src.tentative.html deleted file mode 100644 index 44461067..0000000 --- a/third_party/WebKit/LayoutTests/external/wpt/trusted-types/block-string-assignment-to-HTMLImageElement-src.tentative.html +++ /dev/null
@@ -1,33 +0,0 @@ -<!DOCTYPE html> -<script src="/resources/testharness.js"></script> -<script src="/resources/testharnessreport.js"></script> -<script src="./support/helper.sub.js"></script> - -<meta http-equiv="Content-Security-Policy" content="require-trusted-types"> -<body> -<script> - //URL assignments don't throw - test(t => { - var url = TrustedURL.create(URLS.safe); - - var d = document.createElement('img'); - d.src = url; - assert_equals("" + d.src, URLS.safe); - }, "src = TrustedURL.create()."); - - test(t => { - var url = TrustedURL.unsafelyCreate(URLS.safe); - - var d = document.createElement('img'); - d.src = url; - assert_equals("" + d.src, URLS.safe); - }, "src = TrustedURL.unsafelyCreate()."); - - //String assignment throws - test(t => { - var d = document.createElement('img'); - assert_throws(new TypeError(), _ => { - d.src = "Fail."; - }); - }, "'src = string' throws."); -</script>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/trusted-types/block-string-assignment-to-HTMLLinkElement-href.tentative.html b/third_party/WebKit/LayoutTests/external/wpt/trusted-types/block-string-assignment-to-HTMLLinkElement-href.tentative.html deleted file mode 100644 index 11950da..0000000 --- a/third_party/WebKit/LayoutTests/external/wpt/trusted-types/block-string-assignment-to-HTMLLinkElement-href.tentative.html +++ /dev/null
@@ -1,43 +0,0 @@ -<!DOCTYPE html> -<html> -<head> - <script src="/resources/testharness.js"></script> - <script src="/resources/testharnessreport.js"></script> - <script src="support/helper.sub.js"></script> - - <meta http-equiv="Content-Security-Policy" content="require-trusted-types"> -</head> -<body> -<script> - //helper function for the tests - function testHref(str, url) { - var link = document.createElement('link'); - link.href = url; - assert_equals(link.href, str); - } - - //URL assignments do not throw. - test(t => { - testHref(URLS.safe, TrustedURL.create(URLS.safe)); - }, "link.href = URLS.safe, TrustedURL.create"); - - test(t => { - testHref(URLS.safe, TrustedURL.unsafelyCreate(URLS.safe)); - }, "link.href = URLS.safe, TrustedURL.unsafelyCreate"); - - // String assignments throw. - test(t => { - var link = document.createElement('link'); - assert_throws(new TypeError(), _ => { - link.href = "A string"; - }); - }, "`link.href = string` throws"); - - //Null assignment throws. - test(t => { - var link = document.createElement('link'); - assert_throws(new TypeError(), _ => { - link.href = null; - }); - }, "`link.href = null` throws"); -</script>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/trusted-types/block-string-assignment-to-HTMLMediaElement-src.tentative.html b/third_party/WebKit/LayoutTests/external/wpt/trusted-types/block-string-assignment-to-HTMLMediaElement-src.tentative.html deleted file mode 100644 index 38ac53f..0000000 --- a/third_party/WebKit/LayoutTests/external/wpt/trusted-types/block-string-assignment-to-HTMLMediaElement-src.tentative.html +++ /dev/null
@@ -1,33 +0,0 @@ -<!DOCTYPE html> -<script src="/resources/testharness.js"></script> -<script src="/resources/testharnessreport.js"></script> -<script src="./support/helper.sub.js"></script> - -<meta http-equiv="Content-Security-Policy" content="require-trusted-types"> -<body> -<script> - //URL assignments don't throw - test(t => { - var url = TrustedURL.create(URLS.safe); - - var d = document.createElement('video'); - d.src = url; - assert_equals("" + d.src, URLS.safe); - }, "src = TrustedURL.create()."); - - test(t => { - var url = TrustedURL.unsafelyCreate(URLS.safe); - - var d = document.createElement('video'); - d.src = url; - assert_equals("" + d.src, URLS.safe); - }, "src = TrustedURL.unsafelyCreate()."); - - //String assignment throws - test(t => { - var d = document.createElement('video'); - assert_throws(new TypeError(), _ => { - d.src = "Fail."; - }); - }, "'src = string' throws."); -</script>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/trusted-types/block-string-assignment-to-HTMLObjectElement.tentative.html b/third_party/WebKit/LayoutTests/external/wpt/trusted-types/block-string-assignment-to-HTMLObjectElement.tentative.html deleted file mode 100644 index 87e1f46..0000000 --- a/third_party/WebKit/LayoutTests/external/wpt/trusted-types/block-string-assignment-to-HTMLObjectElement.tentative.html +++ /dev/null
@@ -1,60 +0,0 @@ -<!DOCTYPE html> -<html> -<head> - <script src="/resources/testharness.js"></script> - <script src="/resources/testharnessreport.js"></script> - <script src="support/helper.sub.js"></script> - - <meta http-equiv="Content-Security-Policy" content="require-trusted-types"> -</head> -<body> -<script> - //helper function for the tests - function testData(str, url) { - var objectElement = document.createElement('object'); - objectElement.data = url; - objectElement.codeBase = url; - assert_equals(objectElement.data, str); - assert_equals(objectElement.codeBase, str); - } - - //URL assignments do not throw - test(t => { - testData(URLS.safe, TrustedURL.create(URLS.safe)); - }, "Basic processing: safe URL, safe construction."); - - test(t => { - testData(URLS.safe, TrustedURL.unsafelyCreate(URLS.safe)); - }, "Basic processing: safe URL, unsafe construction."); - - //String assignments throw - test(t => { - var objectElement = document.createElement('object'); - assert_throws(new TypeError(), _ => { - objectElement.data = "A string"; - }); - }, "`objectElement.data = string` throws"); - - test(t => { - var objectElement = document.createElement('object'); - assert_throws(new TypeError(), _ => { - objectElement.codeBase = "A string"; - }); - }, "`objectElement.codeBase = string` throws"); - - //Null assignment throws. - test(t => { - var objectElement = document.createElement('object'); - assert_throws(new TypeError(), _ => { - objectElement.data = null; - }); - }, "`objectElement.data = null` throws"); - - //Null assignment throws. - test(t => { - var objectElement = document.createElement('object'); - assert_throws(new TypeError(), _ => { - objectElement.codeBase = null; - }); - }, "`objectElement.codeBase = null` throws"); -</script>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/trusted-types/block-string-assignment-to-HTMLSourceElement-src.tentative.html b/third_party/WebKit/LayoutTests/external/wpt/trusted-types/block-string-assignment-to-HTMLSourceElement-src.tentative.html deleted file mode 100644 index 37ab90c..0000000 --- a/third_party/WebKit/LayoutTests/external/wpt/trusted-types/block-string-assignment-to-HTMLSourceElement-src.tentative.html +++ /dev/null
@@ -1,36 +0,0 @@ -<!DOCTYPE html> -<script src="/resources/testharness.js"></script> -<script src="/resources/testharnessreport.js"></script> -<script src="./support/helper.sub.js"></script> - -<meta http-equiv="Content-Security-Policy" content="require-trusted-types"> -<body> -<script> - //URL assignments don't throw - test(t => { - var url = TrustedURL.create(URLS.safe); - - var d = document.createElement('source'); - d.src = url; - assert_equals(d.src, URLS.safe); - }, "src = TrustedURL.create()."); - - test(t => { - var url = TrustedURL.unsafelyCreate(URLS.safe); - - var d = document.createElement('source'); - d.src = url; - assert_equals(d.src, URLS.safe); - }, "src = TrustedURL.unsafelyCreate()."); - - //String assignment throws - test(t => { - var url = "Fail." - - var d = document.createElement('source'); - assert_throws(new TypeError(), _ => { - d.src = url; - }); - }, "'src = string' throws."); -</script> -
diff --git a/third_party/WebKit/LayoutTests/external/wpt/trusted-types/block-string-assignment-to-embed-src.tentative.html b/third_party/WebKit/LayoutTests/external/wpt/trusted-types/block-string-assignment-to-embed-src.tentative.html deleted file mode 100644 index 005dfe2..0000000 --- a/third_party/WebKit/LayoutTests/external/wpt/trusted-types/block-string-assignment-to-embed-src.tentative.html +++ /dev/null
@@ -1,56 +0,0 @@ -<!DOCTYPE html> -<html> -<head> - <script src="/resources/testharness.js"></script> - <script src="/resources/testharnessreport.js"></script> - <script src="./support/helper.sub.js"></script> - - <meta http-equiv="Content-Security-Policy" content="require-trusted-types"> -</head> -<body> -<script> - // String assignments throw. - test(t => { - var s = document.createElement('embed'); - assert_throws(new TypeError(), _ => { - s.src = "Fail."; - }); - assert_equals('', s.src); - }, "src = 'string' assignment throws."); - - // TrustedURL assignments throw. - test(t => { - var url = TrustedURL.unsafelyCreate(URLS.safe); - - var s = document.createElement('embed'); - assert_throws(new TypeError(), _ => { - s.src = url; - }); - assert_equals('', s.src); - }, "src = TrustedURL.unsafelyCreate(URLS.safe) assignment throws"); - - // TrustedScriptURL assignments work. - test(t => { - var url = TrustedScriptURL.unsafelyCreate(URLS.safe); - - var s = document.createElement('embed'); - s.src = url; - assert_equals(url + '', s.src); - }, "src = TrustedScriptURL.unsafelyCreate(URLS.safe)"); - - test(t => { - var url = TrustedScriptURL.unsafelyCreate(URLS.javascript); - - var s = document.createElement('embed'); - s.src = url; - assert_equals(url + '', s.src); - }, "src = TrustedScriptURL.unsafelyCreate(URLS.javascript)"); - - test(t => { - var url = TrustedScriptURL.unsafelyCreate(URLS.external); - - var s = document.createElement('embed'); - s.src = url; - assert_equals(url + '', s.src); - }, "src = TrustedScriptURL.unsafelyCreate(URLS.external)"); -</script>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/trusted-types/block-string-assignment-to-frame-src.tentative.html b/third_party/WebKit/LayoutTests/external/wpt/trusted-types/block-string-assignment-to-frame-src.tentative.html deleted file mode 100644 index c915e43..0000000 --- a/third_party/WebKit/LayoutTests/external/wpt/trusted-types/block-string-assignment-to-frame-src.tentative.html +++ /dev/null
@@ -1,33 +0,0 @@ -<!DOCTYPE html> -<script src="/resources/testharness.js"></script> -<script src="/resources/testharnessreport.js"></script> -<script src="./support/helper.sub.js"></script> - -<meta http-equiv="Content-Security-Policy" content="require-trusted-types"> -<body> -<script> - //URL assignments don't throw - test(t => { - var url = TrustedURL.create(URLS.safe); - - var d = document.createElement('frame'); - d.src = url; - assert_equals("" + d.src, URLS.safe); - }, "src = TrustedURL.create()."); - - test(t => { - var url = TrustedURL.unsafelyCreate(URLS.safe); - - var d = document.createElement('frame'); - d.src = url; - assert_equals("" + d.src, URLS.safe); - }, "src = TrustedURL.unsafelyCreate()."); - - //String assignment throws - test(t => { - var d = document.createElement('frame'); - assert_throws(new TypeError(), _ => { - d.src = "Fail."; - }); - }, "'src = string' throws."); -</script>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/trusted-types/block-string-assignment-to-input-src.tentative.html b/third_party/WebKit/LayoutTests/external/wpt/trusted-types/block-string-assignment-to-input-src.tentative.html deleted file mode 100644 index 732ebe8..0000000 --- a/third_party/WebKit/LayoutTests/external/wpt/trusted-types/block-string-assignment-to-input-src.tentative.html +++ /dev/null
@@ -1,33 +0,0 @@ -<!DOCTYPE html> -<script src="/resources/testharness.js"></script> -<script src="/resources/testharnessreport.js"></script> -<script src="./support/helper.sub.js"></script> - -<meta http-equiv="Content-Security-Policy" content="require-trusted-types"> -<body> -<script> - //URL assignments don't throw - test(t => { - var url = TrustedURL.create(URLS.safe); - - var d = document.createElement('input'); - d.src = url; - assert_equals("" + d.src, URLS.safe); - }, "src = TrustedURL.create()."); - - test(t => { - var url = TrustedURL.unsafelyCreate(URLS.safe); - - var d = document.createElement('input'); - d.src = url; - assert_equals("" + d.src, URLS.safe); - }, "src = TrustedURL.unsafelyCreate()."); - - //String assignment throws - test(t => { - var d = document.createElement('input'); - assert_throws(new TypeError(), _ => { - d.src = "Fail."; - }); - }, "'src = string' throws."); -</script>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/trusted-types/block-string-assignment-to-script-src.tentative.html b/third_party/WebKit/LayoutTests/external/wpt/trusted-types/block-string-assignment-to-script-src.tentative.html deleted file mode 100644 index ade76848..0000000 --- a/third_party/WebKit/LayoutTests/external/wpt/trusted-types/block-string-assignment-to-script-src.tentative.html +++ /dev/null
@@ -1,56 +0,0 @@ -<!DOCTYPE html> -<html> -<head> - <script src="/resources/testharness.js"></script> - <script src="/resources/testharnessreport.js"></script> - <script src="support/helper.sub.js"></script> - - <meta http-equiv="Content-Security-Policy" content="require-trusted-types"> -</head> -<body> -<script> - // String assignments throw. - test(t => { - var s = document.createElement('script'); - assert_throws(new TypeError(), _ => { - s.src = URLS.safe; - }); - assert_equals('', s.src); - }, "'string'"); - - // TrustedURL assignments throw. - test(t => { - var url = TrustedURL.unsafelyCreate(URLS.safe); - - var s = document.createElement('script'); - assert_throws(new TypeError(), _ => { - s.src = url; - }); - assert_equals('', s.src); - }, "TrustedURL(safe)"); - - // TrustedScriptURL assignments work. - test(t => { - var url = TrustedScriptURL.unsafelyCreate(URLS.safe); - - var s = document.createElement('script'); - s.src = url; - assert_equals(url + '', s.src); - }, "TrustedScriptURL(safe)"); - - test(t => { - var url = TrustedScriptURL.unsafelyCreate(URLS.javascript); - - var s = document.createElement('script'); - s.src = url; - assert_equals(url + '', s.src); - }, "TrustedScriptURL(javascript)"); - - test(t => { - var url = TrustedScriptURL.unsafelyCreate(URLS.external); - - var s = document.createElement('script'); - s.src = url; - assert_equals(url + '', s.src); - }, "TrustedScriptURL(external)"); -</script>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/trusted-types/block-string-assignment-to-track-src.tentative.html b/third_party/WebKit/LayoutTests/external/wpt/trusted-types/block-string-assignment-to-track-src.tentative.html deleted file mode 100644 index b6f81e9..0000000 --- a/third_party/WebKit/LayoutTests/external/wpt/trusted-types/block-string-assignment-to-track-src.tentative.html +++ /dev/null
@@ -1,33 +0,0 @@ -<!DOCTYPE html> -<script src="/resources/testharness.js"></script> -<script src="/resources/testharnessreport.js"></script> -<script src="./support/helper.sub.js"></script> - -<meta http-equiv="Content-Security-Policy" content="require-trusted-types"> -<body> -<script> - //URL assignments don't throw - test(t => { - var url = TrustedURL.create(URLS.safe); - - var d = document.createElement('track'); - d.src = url; - assert_equals("" + d.src, URLS.safe); - }, "src = TrustedURL.create()."); - - test(t => { - var url = TrustedURL.unsafelyCreate(URLS.safe); - - var d = document.createElement('track'); - d.src = url; - assert_equals("" + d.src, URLS.safe); - }, "src = TrustedURL.unsafelyCreate()."); - - //String assignment throws - test(t => { - var d = document.createElement('track'); - assert_throws(new TypeError(), _ => { - d.src = "Fail."; - }); - }, "'src = string' throws."); -</script>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/trusted-types/embed-src.tentative.html b/third_party/WebKit/LayoutTests/external/wpt/trusted-types/embed-src.tentative.html deleted file mode 100644 index 75760278..0000000 --- a/third_party/WebKit/LayoutTests/external/wpt/trusted-types/embed-src.tentative.html +++ /dev/null
@@ -1,30 +0,0 @@ -<!DOCTYPE html> -<script src="/resources/testharness.js"></script> -<script src="/resources/testharnessreport.js"></script> -<script src="./support/helper.sub.js"></script> -<body> -<script> - test(t => { - var url = TrustedScriptURL.unsafelyCreate(URLS.safe); - - var s = document.createElement('embed'); - s.src = url; - assert_equals(url + '', s.src); - }, "src = TrustedScriptURL.unsafelyCreate(URLS.safe)"); - - test(t => { - var url = TrustedScriptURL.unsafelyCreate(URLS.javascript); - - var s = document.createElement('embed'); - s.src = url; - assert_equals(url + '', s.src); - }, "src = TrustedScriptURL.unsafelyCreate(URLS.javascript)"); - - test(t => { - var url = TrustedScriptURL.unsafelyCreate(URLS.external); - - var s = document.createElement('embed'); - s.src = url; - assert_equals(url + '', s.src); - }, "src = TrustedScriptURL.unsafelyCreate(URLS.external)"); -</script>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/trusted-types/frame-src.tentative.html b/third_party/WebKit/LayoutTests/external/wpt/trusted-types/frame-src.tentative.html deleted file mode 100644 index 31a1ce91..0000000 --- a/third_party/WebKit/LayoutTests/external/wpt/trusted-types/frame-src.tentative.html +++ /dev/null
@@ -1,23 +0,0 @@ -<!DOCTYPE html> -<script src="/resources/testharness.js"></script> -<script src="/resources/testharnessreport.js"></script> -<script src="./support/helper.sub.js"></script> - -<body> -<script> - test(t => { - var url = TrustedURL.create(URLS.safe); - - var d = document.createElement('frame'); - d.src = url; - assert_equals("" + d.src, URLS.safe); - }, "src = TrustedURL.create()."); - - test(t => { - var url = TrustedURL.unsafelyCreate(URLS.safe); - - var d = document.createElement('frame'); - d.src = url; - assert_equals("" + d.src, URLS.safe); - }, "src = TrustedURL.unsafelyCreate()."); -</script>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/trusted-types/input-src.tentative.html b/third_party/WebKit/LayoutTests/external/wpt/trusted-types/input-src.tentative.html deleted file mode 100644 index 8cbd0ad4..0000000 --- a/third_party/WebKit/LayoutTests/external/wpt/trusted-types/input-src.tentative.html +++ /dev/null
@@ -1,23 +0,0 @@ -<!DOCTYPE html> -<script src="/resources/testharness.js"></script> -<script src="/resources/testharnessreport.js"></script> -<script src="./support/helper.sub.js"></script> - -<body> -<script> - test(t => { - var url = TrustedURL.create(URLS.safe); - - var d = document.createElement('input'); - d.src = url; - assert_equals("" + d.src, URLS.safe); - }, "src = TrustedURL.create()."); - - test(t => { - var url = TrustedURL.unsafelyCreate(URLS.safe); - - var d = document.createElement('input'); - d.src = url; - assert_equals("" + d.src, URLS.safe); - }, "src = TrustedURL.unsafelyCreate()."); -</script>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/trusted-types/script-src.tentative.html b/third_party/WebKit/LayoutTests/external/wpt/trusted-types/script-src.tentative.html deleted file mode 100644 index 7235cc3..0000000 --- a/third_party/WebKit/LayoutTests/external/wpt/trusted-types/script-src.tentative.html +++ /dev/null
@@ -1,30 +0,0 @@ -<!DOCTYPE html> -<script src="/resources/testharness.js"></script> -<script src="/resources/testharnessreport.js"></script> -<script src="support/helper.sub.js"></script> -<body> -<script> - test(t => { - var url = TrustedScriptURL.unsafelyCreate(URLS.safe); - - var s = document.createElement('script'); - s.src = url; - assert_equals(url + '', s.src); - }); - - test(t => { - var url = TrustedScriptURL.unsafelyCreate(URLS.javascript); - - var s = document.createElement('script'); - s.src = url; - assert_equals(url + '', s.src); - }); - - test(t => { - var url = TrustedScriptURL.unsafelyCreate(URLS.external); - - var s = document.createElement('script'); - s.src = url; - assert_equals(url + '', s.src); - }); -</script>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/trusted-types/support/helper.sub.js b/third_party/WebKit/LayoutTests/external/wpt/trusted-types/support/helper.sub.js index 036dbed7..91112d8 100644 --- a/third_party/WebKit/LayoutTests/external/wpt/trusted-types/support/helper.sub.js +++ b/third_party/WebKit/LayoutTests/external/wpt/trusted-types/support/helper.sub.js
@@ -45,3 +45,31 @@ document.body.appendChild(i); }); } + +let trustedHTML = TrustedHTML.escape(STRINGS.unescapedHTML); +function assert_accepts_trusted_html(tag, attribute) { + let elem = document.createElement(tag); + elem[attribute] = trustedHTML; + assert_equals(elem[attribute] + "", STRINGS.unescapedHTML); +} + +let trustedURL = TrustedURL.create(URLS.safe); +function assert_accepts_trusted_url(tag, attribute) { + let elem = document.createElement(tag); + elem[attribute] = trustedURL; + assert_equals(elem[attribute] + "", URLS.safe); +} + +let trustedScriptURL = TrustedScriptURL.unsafelyCreate(URLS.safe); +function assert_accepts_trusted_script_url(tag, attribute) { + let elem = document.createElement(tag); + elem[attribute] = trustedScriptURL; + assert_equals(elem[attribute] + "", URLS.safe); +} + +function assert_throws_no_trusted_type(tag, attribute, value) { + let elem = document.createElement(tag); + assert_throws(new TypeError(), _ => { + elem[attribute] = value; + }); +}
diff --git a/third_party/WebKit/LayoutTests/external/wpt/trusted-types/track-src.tentative.html b/third_party/WebKit/LayoutTests/external/wpt/trusted-types/track-src.tentative.html deleted file mode 100644 index cfe5374e..0000000 --- a/third_party/WebKit/LayoutTests/external/wpt/trusted-types/track-src.tentative.html +++ /dev/null
@@ -1,23 +0,0 @@ -<!DOCTYPE html> -<script src="/resources/testharness.js"></script> -<script src="/resources/testharnessreport.js"></script> -<script src="./support/helper.sub.js"></script> - -<body> -<script> - test(t => { - var url = TrustedURL.create(URLS.safe); - - var d = document.createElement('track'); - d.src = url; - assert_equals("" + d.src, URLS.safe); - }, "src = TrustedURL.create()."); - - test(t => { - var url = TrustedURL.unsafelyCreate(URLS.safe); - - var d = document.createElement('track'); - d.src = url; - assert_equals("" + d.src, URLS.safe); - }, "src = TrustedURL.unsafelyCreate()."); -</script>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/uievents/idlharness.window.js b/third_party/WebKit/LayoutTests/external/wpt/uievents/idlharness.window.js new file mode 100644 index 0000000..928c8c9 --- /dev/null +++ b/third_party/WebKit/LayoutTests/external/wpt/uievents/idlharness.window.js
@@ -0,0 +1,20 @@ +// META: script=/resources/WebIDLParser.js +// META: script=/resources/idlharness.js + +'use strict'; + +idl_test( + ['uievents'], + ['dom'], + idl_array => { + idl_array.add_objects({ + FocusEvent: ['new FocusEvent("event")'], + MouseEvent: ['new MouseEvent("event")'], + WheelEvent: ['new WheelEvent("event")'], + KeyboardEvent: ['new KeyboardEvent("event")'], + CompositionEvent: ['new CompositionEvent("event")'], + UIEvent: ['new UIEvent("event")'], + InputEvent: ['new InputEvent("event")'], + }); + } +);
diff --git a/third_party/WebKit/LayoutTests/external/wpt/uievents/interfaces.html b/third_party/WebKit/LayoutTests/external/wpt/uievents/interfaces.html deleted file mode 100644 index 0d20f1d7..0000000 --- a/third_party/WebKit/LayoutTests/external/wpt/uievents/interfaces.html +++ /dev/null
@@ -1,48 +0,0 @@ -<!doctype html> -<meta charset=utf-8> -<title>UI Events IDL tests</title> -<meta name=timeout content=long> -<script src=/resources/testharness.js></script> -<script src=/resources/testharnessreport.js></script> -<script src=/resources/WebIDLParser.js></script> -<script src=/resources/idlharness.js></script> - -<h1>UI Events IDL tests</h1> -<div id=log></div> - -<script> -"use strict"; -function doTest([dom, uievents]) { - var idlArray = new IdlArray(); - idlArray.add_untested_idls(dom); - idlArray.add_idls(uievents); - - idlArray.add_objects({ - FocusEvent: ['new FocusEvent("event")'], - MouseEvent: ['new MouseEvent("event")'], - WheelEvent: ['new WheelEvent("event")'], - KeyboardEvent: ['new KeyboardEvent("event")'], - CompositionEvent: ['new CompositionEvent("event")'], - UIEvent: ['new UIEvent("event")'], - InputEvent: ['new InputEvent("event")'], - }); - idlArray.test(); -}; - -function fetchData(url) { - return fetch(url).then((response) => response.text()); -} - -function waitForLoad() { - return new Promise(function(resolve) { - addEventListener("load", resolve); - }); -} - -promise_test(function() { - return Promise.all([fetchData("/interfaces/dom.idl"), - fetchData("/interfaces/uievents.idl")]) - .then(doTest); -}, "Test driver"); - -</script>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/user-timing/idlharness.any.js b/third_party/WebKit/LayoutTests/external/wpt/user-timing/idlharness.any.js index 6c60cb55..d1cb9b5 100644 --- a/third_party/WebKit/LayoutTests/external/wpt/user-timing/idlharness.any.js +++ b/third_party/WebKit/LayoutTests/external/wpt/user-timing/idlharness.any.js
@@ -28,5 +28,5 @@ PerformanceMark: ['mark'], PerformanceMeasure: ['measure'], }); - }, - 'Test IDL implementation of user-timing API'); + } +);
diff --git a/third_party/WebKit/LayoutTests/external/wpt/user-timing/idlharness.any.sharedworker-expected.txt b/third_party/WebKit/LayoutTests/external/wpt/user-timing/idlharness.any.sharedworker-expected.txt index cf7f41d..a389976 100644 --- a/third_party/WebKit/LayoutTests/external/wpt/user-timing/idlharness.any.sharedworker-expected.txt +++ b/third_party/WebKit/LayoutTests/external/wpt/user-timing/idlharness.any.sharedworker-expected.txt
@@ -1,5 +1,5 @@ This is a testharness.js-based test. -PASS Test IDL implementation of user-timing API +PASS idl_test setup PASS Partial interface Performance: original interface defined FAIL PerformanceMark interface: existence and properties of interface object assert_own_property: self does not have own property "PerformanceMark" expected property "PerformanceMark" missing FAIL PerformanceMark interface object length assert_own_property: self does not have own property "PerformanceMark" expected property "PerformanceMark" missing
diff --git a/third_party/WebKit/LayoutTests/external/wpt/user-timing/idlharness.any.worker-expected.txt b/third_party/WebKit/LayoutTests/external/wpt/user-timing/idlharness.any.worker-expected.txt index cf7f41d..a389976 100644 --- a/third_party/WebKit/LayoutTests/external/wpt/user-timing/idlharness.any.worker-expected.txt +++ b/third_party/WebKit/LayoutTests/external/wpt/user-timing/idlharness.any.worker-expected.txt
@@ -1,5 +1,5 @@ This is a testharness.js-based test. -PASS Test IDL implementation of user-timing API +PASS idl_test setup PASS Partial interface Performance: original interface defined FAIL PerformanceMark interface: existence and properties of interface object assert_own_property: self does not have own property "PerformanceMark" expected property "PerformanceMark" missing FAIL PerformanceMark interface object length assert_own_property: self does not have own property "PerformanceMark" expected property "PerformanceMark" missing
diff --git a/third_party/WebKit/LayoutTests/external/wpt/user-timing/idlharness.https.any.serviceworker-expected.txt b/third_party/WebKit/LayoutTests/external/wpt/user-timing/idlharness.https.any.serviceworker-expected.txt index cf7f41d..a389976 100644 --- a/third_party/WebKit/LayoutTests/external/wpt/user-timing/idlharness.https.any.serviceworker-expected.txt +++ b/third_party/WebKit/LayoutTests/external/wpt/user-timing/idlharness.https.any.serviceworker-expected.txt
@@ -1,5 +1,5 @@ This is a testharness.js-based test. -PASS Test IDL implementation of user-timing API +PASS idl_test setup PASS Partial interface Performance: original interface defined FAIL PerformanceMark interface: existence and properties of interface object assert_own_property: self does not have own property "PerformanceMark" expected property "PerformanceMark" missing FAIL PerformanceMark interface object length assert_own_property: self does not have own property "PerformanceMark" expected property "PerformanceMark" missing
diff --git a/third_party/WebKit/LayoutTests/external/wpt/web-locks/acquire.tentative.https.html b/third_party/WebKit/LayoutTests/external/wpt/web-locks/acquire.tentative.https.any.js similarity index 92% rename from third_party/WebKit/LayoutTests/external/wpt/web-locks/acquire.tentative.https.html rename to third_party/WebKit/LayoutTests/external/wpt/web-locks/acquire.tentative.https.any.js index 65bf0e4..be0e837 100644 --- a/third_party/WebKit/LayoutTests/external/wpt/web-locks/acquire.tentative.https.html +++ b/third_party/WebKit/LayoutTests/external/wpt/web-locks/acquire.tentative.https.any.js
@@ -1,11 +1,6 @@ -<!DOCTYPE html> -<meta charset=utf-8> -<title>Web Locks API: navigator.locks.request method</title> -<link rel=help href="https://wicg.github.io/web-locks/"> -<script src="/resources/testharness.js"></script> -<script src="/resources/testharnessreport.js"></script> -<script src="resources/helpers.js"></script> -<script> +// META: title=Web Locks API: navigator.locks.request method +// META: script=resources/helpers.js + 'use strict'; promise_test(async t => { @@ -126,5 +121,3 @@ assert_equals(Promise.resolve(p), p, 'request() result is a Promise'); await promise_rejects(t, test_error, p, 'result should reject'); }, 'Returned Promise rejects if callback throws asynchronously'); - -</script>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/web-locks/held.tentative.https.html b/third_party/WebKit/LayoutTests/external/wpt/web-locks/held.tentative.https.any.js similarity index 88% rename from third_party/WebKit/LayoutTests/external/wpt/web-locks/held.tentative.https.html rename to third_party/WebKit/LayoutTests/external/wpt/web-locks/held.tentative.https.any.js index aecbbd3..151e3b3 100644 --- a/third_party/WebKit/LayoutTests/external/wpt/web-locks/held.tentative.https.html +++ b/third_party/WebKit/LayoutTests/external/wpt/web-locks/held.tentative.https.any.js
@@ -1,11 +1,6 @@ -<!DOCTYPE html> -<meta charset=utf-8> -<title>Web Locks API: Lock held until callback result resolves</title> -<link rel=help href="https://wicg.github.io/web-locks/"> -<script src="/resources/testharness.js"></script> -<script src="/resources/testharnessreport.js"></script> -<script src="resources/helpers.js"></script> -<script> +// META: title=Web Locks API: Lock held until callback result resolves +// META: script=resources/helpers.js + 'use strict'; // For uncaught rejections. @@ -93,5 +88,3 @@ }); assert_true(callback_called, 'callback should have executed'); }, 'held lock prevents the same client from acquiring it'); - -</script>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/web-locks/ifAvailable.tentative.https.html b/third_party/WebKit/LayoutTests/external/wpt/web-locks/ifAvailable.tentative.https.any.js similarity index 94% rename from third_party/WebKit/LayoutTests/external/wpt/web-locks/ifAvailable.tentative.https.html rename to third_party/WebKit/LayoutTests/external/wpt/web-locks/ifAvailable.tentative.https.any.js index 2b6e1ff..a63caf6 100644 --- a/third_party/WebKit/LayoutTests/external/wpt/web-locks/ifAvailable.tentative.https.html +++ b/third_party/WebKit/LayoutTests/external/wpt/web-locks/ifAvailable.tentative.https.any.js
@@ -1,11 +1,6 @@ -<!DOCTYPE html> -<meta charset=utf-8> -<title>Web Locks API: ifAvailable option</title> -<link rel=help href="https://wicg.github.io/web-locks/"> -<script src="/resources/testharness.js"></script> -<script src="/resources/testharnessreport.js"></script> -<script src="resources/helpers.js"></script> -<script> +// META: title=Web Locks API: ifAvailable option +// META: script=resources/helpers.js + 'use strict'; promise_test(async t => { @@ -165,5 +160,3 @@ }); assert_true(callback1_called, 'callback1 should be called'); }, 'Locks are available once previous release is processed'); - -</script>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/web-locks/lock-attributes.tentative.https.html b/third_party/WebKit/LayoutTests/external/wpt/web-locks/lock-attributes.tentative.https.any.js similarity index 65% rename from third_party/WebKit/LayoutTests/external/wpt/web-locks/lock-attributes.tentative.https.html rename to third_party/WebKit/LayoutTests/external/wpt/web-locks/lock-attributes.tentative.https.any.js index 89ffec41..e94fc95a 100644 --- a/third_party/WebKit/LayoutTests/external/wpt/web-locks/lock-attributes.tentative.https.html +++ b/third_party/WebKit/LayoutTests/external/wpt/web-locks/lock-attributes.tentative.https.any.js
@@ -1,10 +1,5 @@ -<!DOCTYPE html> -<meta charset=utf-8> -<title>Web Locks API: Lock Attributes</title> -<link rel=help href="https://wicg.github.io/web-locks/"> -<script src="/resources/testharness.js"></script> -<script src="/resources/testharnessreport.js"></script> -<script> +// META: title=Web Locks API: Lock Attributes + 'use strict'; promise_test(async t => { @@ -20,5 +15,3 @@ assert_equals(lock.mode, 'shared'); }); }, 'Lock attributes reflect requested properties (shared)'); - -</script>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/web-locks/mode-exclusive.tentative.https.html b/third_party/WebKit/LayoutTests/external/wpt/web-locks/mode-exclusive.tentative.https.any.js similarity index 77% rename from third_party/WebKit/LayoutTests/external/wpt/web-locks/mode-exclusive.tentative.https.html rename to third_party/WebKit/LayoutTests/external/wpt/web-locks/mode-exclusive.tentative.https.any.js index 8c6005d04..91404622 100644 --- a/third_party/WebKit/LayoutTests/external/wpt/web-locks/mode-exclusive.tentative.https.html +++ b/third_party/WebKit/LayoutTests/external/wpt/web-locks/mode-exclusive.tentative.https.any.js
@@ -1,10 +1,5 @@ -<!DOCTYPE html> -<meta charset=utf-8> -<title>Web Locks API: Exclusive Mode</title> -<link rel=help href="https://wicg.github.io/web-locks/"> -<script src="/resources/testharness.js"></script> -<script src="/resources/testharnessreport.js"></script> -<script> +// META: title=Web Locks API: Exclusive Mode + 'use strict'; promise_test(async t => { @@ -36,5 +31,3 @@ await inner_promise; assert_array_equals(granted, [2, 1]); }, 'Requests for distinct resources can be granted'); - -</script>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/web-locks/mode-mixed.tentative.https.html b/third_party/WebKit/LayoutTests/external/wpt/web-locks/mode-mixed.tentative.https.any.js similarity index 83% rename from third_party/WebKit/LayoutTests/external/wpt/web-locks/mode-mixed.tentative.https.html rename to third_party/WebKit/LayoutTests/external/wpt/web-locks/mode-mixed.tentative.https.any.js index 0ce058364..3b30494 100644 --- a/third_party/WebKit/LayoutTests/external/wpt/web-locks/mode-mixed.tentative.https.html +++ b/third_party/WebKit/LayoutTests/external/wpt/web-locks/mode-mixed.tentative.https.any.js
@@ -1,10 +1,5 @@ -<!DOCTYPE html> -<meta charset=utf-8> -<title>Web Locks API: Mixed Modes</title> -<link rel=help href="https://wicg.github.io/web-locks/"> -<script src="/resources/testharness.js"></script> -<script src="/resources/testharnessreport.js"></script> -<script> +// META: title=Web Locks API: Mixed Modes + 'use strict'; promise_test(async t => { @@ -47,5 +42,3 @@ ['a-shared-1', 'a-shared-2', 'a-shared-3', 'b-exclusive', 'a-exclusive']); }, 'Lock requests are granted in order'); - -</script>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/web-locks/mode-shared.tentative.https.html b/third_party/WebKit/LayoutTests/external/wpt/web-locks/mode-shared.tentative.https.any.js similarity index 81% rename from third_party/WebKit/LayoutTests/external/wpt/web-locks/mode-shared.tentative.https.html rename to third_party/WebKit/LayoutTests/external/wpt/web-locks/mode-shared.tentative.https.any.js index 309ee57b..7c8a8448 100644 --- a/third_party/WebKit/LayoutTests/external/wpt/web-locks/mode-shared.tentative.https.html +++ b/third_party/WebKit/LayoutTests/external/wpt/web-locks/mode-shared.tentative.https.any.js
@@ -1,10 +1,5 @@ -<!DOCTYPE html> -<meta charset=utf-8> -<title>Web Locks API: Shared Mode</title> -<link rel=help href="https://wicg.github.io/web-locks/"> -<script src="/resources/testharness.js"></script> -<script src="/resources/testharnessreport.js"></script> -<script> +// META: title=Web Locks API: Shared Mode + 'use strict'; promise_test(async t => { @@ -40,5 +35,3 @@ assert_true(a_acquired, 'first lock acquired'); assert_true(a_acquired_again, 'second lock acquired'); }, 'Shared locks are not exclusive'); - -</script>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/web-locks/non-secure-context.tentative.any.js b/third_party/WebKit/LayoutTests/external/wpt/web-locks/non-secure-context.tentative.any.js new file mode 100644 index 0000000..e9726e6 --- /dev/null +++ b/third_party/WebKit/LayoutTests/external/wpt/web-locks/non-secure-context.tentative.any.js
@@ -0,0 +1,13 @@ +// META title=Web Locks API: API not available in non-secure context + +'use strict'; + +test(t => { + assert_false(self.isSecureContext); + assert_false('locks' in navigator, + 'navigator.locks is only present in secure contexts'); + assert_false('LockManager' in self, + 'LockManager is only present in secure contexts'); + assert_false('Lock' in self, + 'Lock interface is only present in secure contexts'); +}, 'API presence in non-secure contexts');
diff --git a/third_party/WebKit/LayoutTests/external/wpt/web-locks/non-secure-context.tentative.html b/third_party/WebKit/LayoutTests/external/wpt/web-locks/non-secure-context.tentative.html deleted file mode 100644 index 568eb30e..0000000 --- a/third_party/WebKit/LayoutTests/external/wpt/web-locks/non-secure-context.tentative.html +++ /dev/null
@@ -1,19 +0,0 @@ -<!DOCTYPE html> -<meta charset=utf-8> -<title>Web Locks API: API not available in non-secure context</title> -<link rel=help href="https://wicg.github.io/web-locks/"> -<script src="/resources/testharness.js"></script> -<script src="/resources/testharnessreport.js"></script> -<script> -'use strict'; - -test(t => { - assert_false(window.isSecureContext); - assert_false('locks' in navigator, - 'navigator.locks is only present in secure contexts'); - assert_false('LockManager' in self, - 'LockManager is only present in secure contexts'); - assert_false('Lock' in self, - 'Lock interface is only present in secure contexts'); -}, 'API presence in non-secure contexts'); -</script>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/web-locks/query-empty.tentative.https.html b/third_party/WebKit/LayoutTests/external/wpt/web-locks/query-empty.tentative.https.any.js similarity index 64% rename from third_party/WebKit/LayoutTests/external/wpt/web-locks/query-empty.tentative.https.html rename to third_party/WebKit/LayoutTests/external/wpt/web-locks/query-empty.tentative.https.any.js index 38fed37..fe7e0bb 100644 --- a/third_party/WebKit/LayoutTests/external/wpt/web-locks/query-empty.tentative.https.html +++ b/third_party/WebKit/LayoutTests/external/wpt/web-locks/query-empty.tentative.https.any.js
@@ -1,11 +1,6 @@ -<!DOCTYPE html> -<meta charset=utf-8> -<title>Web Locks API: navigator.locks.query method - no locks held</title> -<link rel=help href="https://wicg.github.io/web-locks/"> -<script src="/resources/testharness.js"></script> -<script src="/resources/testharnessreport.js"></script> -<script src="resources/helpers.js"></script> -<script> +// META: title=Web Locks API: navigator.locks.query method - no locks held +// META: script=resources/helpers.js + 'use strict'; promise_test(async t => { @@ -20,5 +15,3 @@ assert_true(Array.isArray(state.held), 'State `held` property is an array'); assert_array_equals(state.held, [], 'Held array is empty'); }, 'query() returns dictionary with empty arrays when no locks are held'); - -</script>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/web-locks/query-order.tentative.https.html b/third_party/WebKit/LayoutTests/external/wpt/web-locks/query-order.tentative.https.any.js similarity index 91% rename from third_party/WebKit/LayoutTests/external/wpt/web-locks/query-order.tentative.https.html rename to third_party/WebKit/LayoutTests/external/wpt/web-locks/query-order.tentative.https.any.js index e4fb7c5..1810a96 100644 --- a/third_party/WebKit/LayoutTests/external/wpt/web-locks/query-order.tentative.https.html +++ b/third_party/WebKit/LayoutTests/external/wpt/web-locks/query-order.tentative.https.any.js
@@ -1,11 +1,6 @@ -<!DOCTYPE html> -<meta charset=utf-8> -<title>Web Locks API: navigator.locks.query ordering</title> -<link rel=help href="https://wicg.github.io/web-locks/"> -<script src="/resources/testharness.js"></script> -<script src="/resources/testharnessreport.js"></script> -<script src="resources/helpers.js"></script> -<script> +// META: title=Web Locks API: navigator.locks.query ordering +// META: script=resources/helpers.js + 'use strict'; // Grab a lock and hold until a release function is called. Resolves @@ -112,5 +107,3 @@ assert_array_equals(relevant_held_names, [res3, res1, res2], 'Held locks should appear in granted order.'); }, 'Held locks appear in state in order granted, including when stolen'); - -</script>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/web-locks/query.tentative.https.html b/third_party/WebKit/LayoutTests/external/wpt/web-locks/query.tentative.https.any.js similarity index 95% rename from third_party/WebKit/LayoutTests/external/wpt/web-locks/query.tentative.https.html rename to third_party/WebKit/LayoutTests/external/wpt/web-locks/query.tentative.https.any.js index 218e984..14fdeca7 100644 --- a/third_party/WebKit/LayoutTests/external/wpt/web-locks/query.tentative.https.html +++ b/third_party/WebKit/LayoutTests/external/wpt/web-locks/query.tentative.https.any.js
@@ -1,11 +1,6 @@ -<!DOCTYPE html> -<meta charset=utf-8> -<title>Web Locks API: navigator.locks.query method</title> -<link rel=help href="https://wicg.github.io/web-locks/"> -<script src="/resources/testharness.js"></script> -<script src="/resources/testharnessreport.js"></script> -<script src="resources/helpers.js"></script> -<script> +// META: title=Web Locks API: navigator.locks.query method +// META: script=resources/helpers.js + 'use strict'; // Returns an array of the modes for the locks with matching name. @@ -230,5 +225,3 @@ assert_equals(res1_held_clients[0], res2_pending_clients[0]); assert_equals(res2_held_clients[0], res1_pending_clients[0]); }, 'query() can observe a deadlock'); - -</script>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/web-locks/resource-names.tentative.https.html b/third_party/WebKit/LayoutTests/external/wpt/web-locks/resource-names.tentative.https.any.js similarity index 84% rename from third_party/WebKit/LayoutTests/external/wpt/web-locks/resource-names.tentative.https.html rename to third_party/WebKit/LayoutTests/external/wpt/web-locks/resource-names.tentative.https.any.js index d4ac743..dbcd986a 100644 --- a/third_party/WebKit/LayoutTests/external/wpt/web-locks/resource-names.tentative.https.html +++ b/third_party/WebKit/LayoutTests/external/wpt/web-locks/resource-names.tentative.https.any.js
@@ -1,10 +1,5 @@ -<!DOCTYPE html> -<meta charset=utf-8> -<title>Web Locks API: Resources DOMString edge cases</title> -<link rel=help href="https://wicg.github.io/web-locks/"> -<script src="/resources/testharness.js"></script> -<script src="/resources/testharnessreport.js"></script> -<script> +// META: title=Web Locks API: Resources DOMString edge cases + 'use strict'; function code_points(s) { @@ -58,5 +53,3 @@ }); assert_true(got_lock, 'Names with embedded "-" should be accepted'); }, 'Names cannot start with "-"'); - -</script>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/web-locks/secure-context.tentative.https.any.js b/third_party/WebKit/LayoutTests/external/wpt/web-locks/secure-context.tentative.https.any.js new file mode 100644 index 0000000..2e1d3912 --- /dev/null +++ b/third_party/WebKit/LayoutTests/external/wpt/web-locks/secure-context.tentative.https.any.js
@@ -0,0 +1,13 @@ +// META: title=Web Locks API: API requires secure context + +'use strict'; + +test(t => { + assert_true(self.isSecureContext); + assert_idl_attribute(navigator, 'locks', + 'navigator.locks exists in secure context'); + assert_true('LockManager' in self, + 'LockManager is present in secure contexts'); + assert_true('Lock' in self, + 'Lock interface is present in secure contexts'); +}, 'API presence in secure contexts');
diff --git a/third_party/WebKit/LayoutTests/external/wpt/web-locks/secure-context.tentative.https.html b/third_party/WebKit/LayoutTests/external/wpt/web-locks/secure-context.tentative.https.html deleted file mode 100644 index a90b55d..0000000 --- a/third_party/WebKit/LayoutTests/external/wpt/web-locks/secure-context.tentative.https.html +++ /dev/null
@@ -1,19 +0,0 @@ -<!DOCTYPE html> -<meta charset=utf-8> -<title>Web Locks API: API requires secure context</title> -<link rel=help href="https://wicg.github.io/web-locks/"> -<script src="/resources/testharness.js"></script> -<script src="/resources/testharnessreport.js"></script> -<script> -'use strict'; - -test(t => { - assert_true(window.isSecureContext); - assert_idl_attribute(navigator, 'locks', - 'navigator.locks exists in secure context'); - assert_true('LockManager' in self, - 'LockManager is present in secure contexts'); - assert_true('Lock' in self, - 'Lock interface is present in secure contexts'); -}, 'API presence in secure contexts'); -</script>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/web-locks/signal.tentative.https.html b/third_party/WebKit/LayoutTests/external/wpt/web-locks/signal.tentative.https.any.js similarity index 94% rename from third_party/WebKit/LayoutTests/external/wpt/web-locks/signal.tentative.https.html rename to third_party/WebKit/LayoutTests/external/wpt/web-locks/signal.tentative.https.any.js index a070bde2..424b219 100644 --- a/third_party/WebKit/LayoutTests/external/wpt/web-locks/signal.tentative.https.html +++ b/third_party/WebKit/LayoutTests/external/wpt/web-locks/signal.tentative.https.any.js
@@ -1,11 +1,6 @@ -<!DOCTYPE html> -<meta charset=utf-8> -<title>Web Locks API: AbortSignal integration</title> -<link rel=help href="https://wicg.github.io/web-locks/"> -<script src="/resources/testharness.js"></script> -<script src="/resources/testharnessreport.js"></script> -<script src="resources/helpers.js"></script> -<script> +// META: title=Web Locks API: AbortSignal integration +// META: script=resources/helpers.js + 'use strict'; function makePromiseAndResolveFunc() { @@ -198,5 +193,3 @@ 'Lock released promise should not reject'); }, 'Abort signaled after lock released'); - -</script>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/web-locks/steal.tentative.https.html b/third_party/WebKit/LayoutTests/external/wpt/web-locks/steal.tentative.https.any.js similarity index 88% rename from third_party/WebKit/LayoutTests/external/wpt/web-locks/steal.tentative.https.html rename to third_party/WebKit/LayoutTests/external/wpt/web-locks/steal.tentative.https.any.js index 169d849..ca99137 100644 --- a/third_party/WebKit/LayoutTests/external/wpt/web-locks/steal.tentative.https.html +++ b/third_party/WebKit/LayoutTests/external/wpt/web-locks/steal.tentative.https.any.js
@@ -1,11 +1,6 @@ -<!DOCTYPE html> -<meta charset=utf-8> -<title>Web Locks API: steal option</title> -<link rel=help href="https://wicg.github.io/web-locks/"> -<script src="/resources/testharness.js"></script> -<script src="/resources/testharnessreport.js"></script> -<script src="resources/helpers.js"></script> -<script> +// META: title=Web Locks API: steal option +// META: script=resources/helpers.js + 'use strict'; const never_settled = new Promise(resolve => { /* never */ }); @@ -93,5 +88,3 @@ assert_true(saw_abort, 'First steal should have aborted'); }, 'Last caller wins'); - -</script>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/web-nfc/idlharness.https.window.js b/third_party/WebKit/LayoutTests/external/wpt/web-nfc/idlharness.https.window.js index 1d6457b..0b3b099 100644 --- a/third_party/WebKit/LayoutTests/external/wpt/web-nfc/idlharness.https.window.js +++ b/third_party/WebKit/LayoutTests/external/wpt/web-nfc/idlharness.https.window.js
@@ -13,5 +13,5 @@ Navigator: ['navigator'], NFC: ['navigator.nfc'], }); - }, - 'Test IDL implementation of Web NFC API'); + } +);
diff --git a/third_party/WebKit/LayoutTests/external/wpt/web-share/idlharness.https.window.js b/third_party/WebKit/LayoutTests/external/wpt/web-share/idlharness.https.window.js index 6a69c8d..cbaf9d72 100644 --- a/third_party/WebKit/LayoutTests/external/wpt/web-share/idlharness.https.window.js +++ b/third_party/WebKit/LayoutTests/external/wpt/web-share/idlharness.https.window.js
@@ -12,6 +12,5 @@ idl_array.add_objects({ Navigator: ['navigator'] }); - }, - 'Test driver' + } );
diff --git a/third_party/WebKit/LayoutTests/external/wpt/webaudio/idlharness.https.window-expected.txt b/third_party/WebKit/LayoutTests/external/wpt/webaudio/idlharness.https.window-expected.txt index e2f56614..e500d09 100644 --- a/third_party/WebKit/LayoutTests/external/wpt/webaudio/idlharness.https.window-expected.txt +++ b/third_party/WebKit/LayoutTests/external/wpt/webaudio/idlharness.https.window-expected.txt
@@ -1,5 +1,5 @@ This is a testharness.js-based test. -PASS Test driver +PASS idl_test setup PASS BaseAudioContext interface: existence and properties of interface object PASS BaseAudioContext interface object length PASS BaseAudioContext interface object name
diff --git a/third_party/WebKit/LayoutTests/external/wpt/webaudio/idlharness.https.window.js b/third_party/WebKit/LayoutTests/external/wpt/webaudio/idlharness.https.window.js index eb4734b0..c2bae34 100644 --- a/third_party/WebKit/LayoutTests/external/wpt/webaudio/idlharness.https.window.js +++ b/third_party/WebKit/LayoutTests/external/wpt/webaudio/idlharness.https.window.js
@@ -70,6 +70,5 @@ await context.audioWorklet.addModule( 'the-audio-api/the-audioworklet-interface/processors/dummy-processor.js'); self.worklet_node = new AudioWorkletNode(context, 'dummy'); - }, - 'Test driver' + } );
diff --git a/third_party/WebKit/LayoutTests/external/wpt/webaudio/the-audio-api/the-delaynode-interface/delaynode-channel-count-1-expected.txt b/third_party/WebKit/LayoutTests/external/wpt/webaudio/the-audio-api/the-delaynode-interface/delaynode-channel-count-1-expected.txt new file mode 100644 index 0000000..0bc5ce3 --- /dev/null +++ b/third_party/WebKit/LayoutTests/external/wpt/webaudio/the-audio-api/the-delaynode-interface/delaynode-channel-count-1-expected.txt
@@ -0,0 +1,4 @@ +This is a testharness.js-based test. +FAIL Test that DelayNode output channelCount matches that of the delayed input assert_equals: Initial mono at 0 expected 0 but got 0.25 +Harness: the test ran to completion. +
diff --git a/third_party/WebKit/LayoutTests/external/wpt/webaudio/the-audio-api/the-delaynode-interface/delaynode-channel-count-1.html b/third_party/WebKit/LayoutTests/external/wpt/webaudio/the-audio-api/the-delaynode-interface/delaynode-channel-count-1.html new file mode 100644 index 0000000..dd964ef --- /dev/null +++ b/third_party/WebKit/LayoutTests/external/wpt/webaudio/the-audio-api/the-delaynode-interface/delaynode-channel-count-1.html
@@ -0,0 +1,104 @@ +<!DOCTYPE html> +<title>Test that DelayNode output channelCount matches that of the delayed input</title> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script> +// See https://github.com/WebAudio/web-audio-api/issues/25 + +// sampleRate is a power of two so that delay times are exact in base-2 +// floating point arithmetic. +const SAMPLE_RATE = 32768; +// Arbitrary delay time in frames (but this is assumed a multiple of block +// size below): +const DELAY_FRAMES = 3 * 128; +// Implementations may apply interpolation to input samples, which can spread +// the effect of input with larger channel counts over neighbouring blocks. +// This test ignores enough neighbouring blocks to ignore the effects of +// filter radius of up to this number of frames: +const INTERPOLATION_GRACE = 128; +// Number of frames of DelayNode output that are known to be stereo: +const STEREO_FRAMES = 128; +// The delay will be increased at this frame to switch DelayNode output back +// to mono. +const MONO_OUTPUT_START_FRAME = + DELAY_FRAMES + INTERPOLATION_GRACE + STEREO_FRAMES; +// Number of frames of output that are known to be mono after the known stereo +// and interpolation grace. +const MONO_FRAMES = 128; +// Total length allows for interpolation after effects of stereo input are +// finished and one block to test return to mono output: +const TOTAL_LENGTH = + MONO_OUTPUT_START_FRAME + INTERPOLATION_GRACE + MONO_FRAMES; +// maxDelayTime, is a multiple of block size, because the Gecko implementation +// once had a bug with delayTime = maxDelayTime in this situation: +const MAX_DELAY_FRAMES = TOTAL_LENGTH + INTERPOLATION_GRACE; + +promise_test(() => { + let context = new OfflineAudioContext({numberOfChannels: 1, + length: TOTAL_LENGTH, + sampleRate: SAMPLE_RATE}); + + // Only channel 1 of the splitter is connected to the destination. + let splitter = new ChannelSplitterNode(context, {numberOfOutputs: 2}); + splitter.connect(context.destination, 1); + + // A gain node has channelCountMode "max" and channelInterpretation + // "speakers", and so will up-mix a mono input when there is stereo input. + let gain = new GainNode(context); + gain.connect(splitter); + + // The delay node initially outputs a single channel of silence, when it + // does not have enough signal in its history to output what it has + // previously received. After the delay period, it will then output the + // stereo signal it received. + let delay = + new DelayNode(context, + {maxDelayTime: MAX_DELAY_FRAMES / context.sampleRate, + delayTime: DELAY_FRAMES / context.sampleRate}); + // Schedule an increase in the delay to return to mono silent output from + // the unfilled portion of the DelayNode's buffer. + delay.delayTime.setValueAtTime(MAX_DELAY_FRAMES / context.sampleRate, + MONO_OUTPUT_START_FRAME / context.sampleRate); + delay.connect(gain); + + let stereoMerger = new ChannelMergerNode(context, {numberOfInputs: 2}); + stereoMerger.connect(delay); + + let leftOffset = 0.125; + let rightOffset = 0.5; + let leftSource = new ConstantSourceNode(context, {offset: leftOffset}); + let rightSource = new ConstantSourceNode(context, {offset: rightOffset}); + leftSource.start(); + rightSource.start(); + leftSource.connect(stereoMerger, 0, 0); + rightSource.connect(stereoMerger, 0, 1); + // Connect a mono source directly to the gain, so that even stereo silence + // will be detected in channel 1 of the gain output because it will cause + // the mono source to be up-mixed. + let monoOffset = 0.25 + let monoSource = new ConstantSourceNode(context, {offset: monoOffset}); + monoSource.start(); + monoSource.connect(gain); + + return context.startRendering(). + then((buffer) => { + let output = buffer.getChannelData(0); + + function assert_samples_equal(startIndex, length, expected, description) + { + for (let i = startIndex; i < startIndex + length; ++i) { + assert_equals(output[i], expected, description + ` at ${i}`); + } + } + + assert_samples_equal(0, DELAY_FRAMES - INTERPOLATION_GRACE, + 0, "Initial mono"); + assert_samples_equal(DELAY_FRAMES + INTERPOLATION_GRACE, STEREO_FRAMES, + monoOffset + rightOffset, "Stereo"); + assert_samples_equal(MONO_OUTPUT_START_FRAME + INTERPOLATION_GRACE, + MONO_FRAMES, + 0, "Final mono"); + }); +}); + +</script>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/webauthn/idlharness.https.window-expected.txt b/third_party/WebKit/LayoutTests/external/wpt/webauthn/idlharness.https.window-expected.txt index d213563..3d8b620 100644 --- a/third_party/WebKit/LayoutTests/external/wpt/webauthn/idlharness.https.window-expected.txt +++ b/third_party/WebKit/LayoutTests/external/wpt/webauthn/idlharness.https.window-expected.txt
@@ -1,6 +1,6 @@ This is a testharness.js-based test. FAIL idlharness promise_test: Unhandled rejection with value: object "NotAllowedError: The operation either timed out or was not allowed. See: https://w3c.github.io/webauthn/#sec-assertion-privacy." -PASS WebAuthn interfaces. +PASS idl_test setup PASS Partial dictionary CredentialCreationOptions: original dictionary defined PASS Partial dictionary CredentialRequestOptions: original dictionary defined PASS Partial interface PublicKeyCredential: original interface defined
diff --git a/third_party/WebKit/LayoutTests/external/wpt/webauthn/idlharness.https.window.js b/third_party/WebKit/LayoutTests/external/wpt/webauthn/idlharness.https.window.js index 8ca5b99c8..060b0c11 100644 --- a/third_party/WebKit/LayoutTests/external/wpt/webauthn/idlharness.https.window.js +++ b/third_party/WebKit/LayoutTests/external/wpt/webauthn/idlharness.https.window.js
@@ -17,8 +17,7 @@ PublicKeyCredential: ['cred'], AuthenticatorAssertionResponse: ['assertionResponse'] }); - }, - 'WebAuthn interfaces.' + } ); let challengeBytes = new Uint8Array(16);
diff --git a/third_party/WebKit/LayoutTests/external/wpt/webmessaging/message-channels/dictionary-transferrable.html b/third_party/WebKit/LayoutTests/external/wpt/webmessaging/message-channels/dictionary-transferrable.html new file mode 100644 index 0000000..f7ab108 --- /dev/null +++ b/third_party/WebKit/LayoutTests/external/wpt/webmessaging/message-channels/dictionary-transferrable.html
@@ -0,0 +1,18 @@ +<!doctype html> +<title>basic messagechannel with transfer</title> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<div id="log"></div> +<script> +async_test(function(t) { + var channel = new MessageChannel(); + var ab = new ArrayBuffer(1); + channel.port1.postMessage(ab, {transfer: [ab]}); + channel.port2.onmessage = t.step_func( + function(e) { + assert_equals(e.data.byteLength, 1); + t.done(); + }); + channel.port2.start(); +}); +</script>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/webrtc-stats/idlharness.window-expected.txt b/third_party/WebKit/LayoutTests/external/wpt/webrtc-stats/idlharness.window-expected.txt index a9872fa..3710d843 100644 --- a/third_party/WebKit/LayoutTests/external/wpt/webrtc-stats/idlharness.window-expected.txt +++ b/third_party/WebKit/LayoutTests/external/wpt/webrtc-stats/idlharness.window-expected.txt
@@ -1,5 +1,5 @@ This is a testharness.js-based test. -PASS webrtc-stats interfaces. +PASS idl_test setup PASS Partial dictionary RTCIceCandidateStats: original dictionary defined PASS Partial dictionary RTCIceCandidatePairStats: original dictionary defined FAIL Partial dictionary RTCRTPStreamStats: original dictionary defined assert_true: Original dictionary should be defined expected true got false
diff --git a/third_party/WebKit/LayoutTests/external/wpt/webrtc-stats/idlharness.window.js b/third_party/WebKit/LayoutTests/external/wpt/webrtc-stats/idlharness.window.js index ead85cb..2374120 100644 --- a/third_party/WebKit/LayoutTests/external/wpt/webrtc-stats/idlharness.window.js +++ b/third_party/WebKit/LayoutTests/external/wpt/webrtc-stats/idlharness.window.js
@@ -10,5 +10,5 @@ [], // No deps idl_array => { // No interfaces to test - }, - 'webrtc-stats interfaces.'); + } +);
diff --git a/third_party/WebKit/LayoutTests/external/wpt/webrtc/idlharness.https.window-expected.txt b/third_party/WebKit/LayoutTests/external/wpt/webrtc/idlharness.https.window-expected.txt index 380e5aa3..335c5e17 100644 --- a/third_party/WebKit/LayoutTests/external/wpt/webrtc/idlharness.https.window-expected.txt +++ b/third_party/WebKit/LayoutTests/external/wpt/webrtc/idlharness.https.window-expected.txt
@@ -26,7 +26,7 @@ PASS RTCPeerConnection interface: attribute remoteDescription FAIL RTCPeerConnection interface: attribute currentRemoteDescription assert_true: The prototype object must have a property "currentRemoteDescription" expected true got false FAIL RTCPeerConnection interface: attribute pendingRemoteDescription assert_true: The prototype object must have a property "pendingRemoteDescription" expected true got false -PASS RTCPeerConnection interface: operation addIceCandidate([object Object],[object Object]) +PASS RTCPeerConnection interface: operation addIceCandidate(RTCIceCandidateInit) PASS RTCPeerConnection interface: attribute signalingState PASS RTCPeerConnection interface: attribute iceGatheringState PASS RTCPeerConnection interface: attribute iceConnectionState @@ -47,7 +47,7 @@ PASS RTCPeerConnection interface: operation setLocalDescription(RTCSessionDescriptionInit, VoidFunction, RTCPeerConnectionErrorCallback) PASS RTCPeerConnection interface: operation createAnswer(RTCSessionDescriptionCallback, RTCPeerConnectionErrorCallback) PASS RTCPeerConnection interface: operation setRemoteDescription(RTCSessionDescriptionInit, VoidFunction, RTCPeerConnectionErrorCallback) -PASS RTCPeerConnection interface: operation addIceCandidate([object Object],[object Object], VoidFunction, RTCPeerConnectionErrorCallback) +PASS RTCPeerConnection interface: operation addIceCandidate(RTCIceCandidateInit, VoidFunction, RTCPeerConnectionErrorCallback) PASS RTCPeerConnection interface: operation generateCertificate(AlgorithmIdentifier) PASS RTCPeerConnection interface: operation getSenders() PASS RTCPeerConnection interface: operation getReceivers() @@ -77,8 +77,8 @@ PASS RTCPeerConnection interface: new RTCPeerConnection() must inherit property "remoteDescription" with the proper type FAIL RTCPeerConnection interface: new RTCPeerConnection() must inherit property "currentRemoteDescription" with the proper type assert_inherits: property "currentRemoteDescription" not found in prototype chain FAIL RTCPeerConnection interface: new RTCPeerConnection() must inherit property "pendingRemoteDescription" with the proper type assert_inherits: property "pendingRemoteDescription" not found in prototype chain -PASS RTCPeerConnection interface: new RTCPeerConnection() must inherit property "addIceCandidate([object Object],[object Object])" with the proper type -PASS RTCPeerConnection interface: calling addIceCandidate([object Object],[object Object]) on new RTCPeerConnection() with too few arguments must throw TypeError +PASS RTCPeerConnection interface: new RTCPeerConnection() must inherit property "addIceCandidate(RTCIceCandidateInit)" with the proper type +PASS RTCPeerConnection interface: calling addIceCandidate(RTCIceCandidateInit) on new RTCPeerConnection() with too few arguments must throw TypeError PASS RTCPeerConnection interface: new RTCPeerConnection() must inherit property "signalingState" with the proper type PASS RTCPeerConnection interface: new RTCPeerConnection() must inherit property "iceGatheringState" with the proper type PASS RTCPeerConnection interface: new RTCPeerConnection() must inherit property "iceConnectionState" with the proper type @@ -104,8 +104,8 @@ PASS RTCPeerConnection interface: calling createAnswer(RTCSessionDescriptionCallback, RTCPeerConnectionErrorCallback) on new RTCPeerConnection() with too few arguments must throw TypeError PASS RTCPeerConnection interface: new RTCPeerConnection() must inherit property "setRemoteDescription(RTCSessionDescriptionInit, VoidFunction, RTCPeerConnectionErrorCallback)" with the proper type PASS RTCPeerConnection interface: calling setRemoteDescription(RTCSessionDescriptionInit, VoidFunction, RTCPeerConnectionErrorCallback) on new RTCPeerConnection() with too few arguments must throw TypeError -PASS RTCPeerConnection interface: new RTCPeerConnection() must inherit property "addIceCandidate([object Object],[object Object], VoidFunction, RTCPeerConnectionErrorCallback)" with the proper type -PASS RTCPeerConnection interface: calling addIceCandidate([object Object],[object Object], VoidFunction, RTCPeerConnectionErrorCallback) on new RTCPeerConnection() with too few arguments must throw TypeError +PASS RTCPeerConnection interface: new RTCPeerConnection() must inherit property "addIceCandidate(RTCIceCandidateInit, VoidFunction, RTCPeerConnectionErrorCallback)" with the proper type +PASS RTCPeerConnection interface: calling addIceCandidate(RTCIceCandidateInit, VoidFunction, RTCPeerConnectionErrorCallback) on new RTCPeerConnection() with too few arguments must throw TypeError PASS RTCPeerConnection interface: new RTCPeerConnection() must inherit property "generateCertificate(AlgorithmIdentifier)" with the proper type PASS RTCPeerConnection interface: calling generateCertificate(AlgorithmIdentifier) on new RTCPeerConnection() with too few arguments must throw TypeError PASS RTCPeerConnection interface: new RTCPeerConnection() must inherit property "getSenders()" with the proper type
diff --git a/third_party/WebKit/LayoutTests/external/wpt/webstorage/idlharness.window.js b/third_party/WebKit/LayoutTests/external/wpt/webstorage/idlharness.window.js index 7a6f16a..177eb607 100644 --- a/third_party/WebKit/LayoutTests/external/wpt/webstorage/idlharness.window.js +++ b/third_party/WebKit/LayoutTests/external/wpt/webstorage/idlharness.window.js
@@ -25,6 +25,5 @@ ], StorageEvent: ['new StorageEvent("storage")'] }); - }, - 'webstorage interfaces' + } );
diff --git a/third_party/WebKit/LayoutTests/external/wpt/webusb/idlharness.https.any-expected.txt b/third_party/WebKit/LayoutTests/external/wpt/webusb/idlharness.https.any-expected.txt index 3de160f8..4f7b670 100644 --- a/third_party/WebKit/LayoutTests/external/wpt/webusb/idlharness.https.any-expected.txt +++ b/third_party/WebKit/LayoutTests/external/wpt/webusb/idlharness.https.any-expected.txt
@@ -1,5 +1,5 @@ This is a testharness.js-based test. -PASS WebUSB IDL test +PASS idl_test setup FAIL USB device setup promise_test: Unhandled rejection with value: object "TypeError: Cannot read property 'configurations' of undefined" PASS Partial interface Navigator: original interface defined PASS Partial interface Navigator: valid exposure set
diff --git a/third_party/WebKit/LayoutTests/external/wpt/webusb/idlharness.https.any.js b/third_party/WebKit/LayoutTests/external/wpt/webusb/idlharness.https.any.js index 9ba0198a..0260be2b 100644 --- a/third_party/WebKit/LayoutTests/external/wpt/webusb/idlharness.https.any.js +++ b/third_party/WebKit/LayoutTests/external/wpt/webusb/idlharness.https.any.js
@@ -41,6 +41,5 @@ self.usbConnectionEvent = new USBConnectionEvent('connect', { device: usbDevice }); }, 'USB device setup'); - }, - 'WebUSB IDL test' + } );
diff --git a/third_party/WebKit/LayoutTests/external/wpt/webusb/idlharness.https.any.worker-expected.txt b/third_party/WebKit/LayoutTests/external/wpt/webusb/idlharness.https.any.worker-expected.txt index dd75495..59961840a 100644 --- a/third_party/WebKit/LayoutTests/external/wpt/webusb/idlharness.https.any.worker-expected.txt +++ b/third_party/WebKit/LayoutTests/external/wpt/webusb/idlharness.https.any.worker-expected.txt
@@ -1,5 +1,5 @@ This is a testharness.js-based test. -PASS WebUSB IDL test +PASS idl_test setup FAIL USB device setup promise_test: Unhandled rejection with value: object "TypeError: Cannot read property 'configurations' of undefined" PASS Partial interface Navigator: original interface defined PASS Partial interface Navigator: valid exposure set
diff --git a/third_party/WebKit/LayoutTests/external/wpt/webxr/idlharness.https.window-expected.txt b/third_party/WebKit/LayoutTests/external/wpt/webxr/idlharness.https.window-expected.txt index 447a11b8..a97d582 100644 --- a/third_party/WebKit/LayoutTests/external/wpt/webxr/idlharness.https.window-expected.txt +++ b/third_party/WebKit/LayoutTests/external/wpt/webxr/idlharness.https.window-expected.txt
@@ -1,5 +1,5 @@ This is a testharness.js-based test. -FAIL Test IDL implementation of WebXR API promise_test: Unhandled rejection with value: object "TypeError: Cannot read property 'requestDevice' of undefined" +FAIL idl_test setup promise_test: Unhandled rejection with value: object "TypeError: Cannot read property 'requestDevice' of undefined" PASS Partial interface Navigator: original interface defined PASS Partial dictionary WebGLContextAttributes: original dictionary defined PASS Partial interface mixin WebGLRenderingContextBase: original interface mixin defined @@ -111,14 +111,6 @@ PASS XRStageBounds interface: existence and properties of interface prototype object's "constructor" property PASS XRStageBounds interface: existence and properties of interface prototype object's @@unscopables property PASS XRStageBounds interface: attribute geometry -PASS XRStageBoundsPoint interface: existence and properties of interface object -PASS XRStageBoundsPoint interface object length -PASS XRStageBoundsPoint interface object name -PASS XRStageBoundsPoint interface: existence and properties of interface prototype object -PASS XRStageBoundsPoint interface: existence and properties of interface prototype object's "constructor" property -PASS XRStageBoundsPoint interface: existence and properties of interface prototype object's @@unscopables property -PASS XRStageBoundsPoint interface: attribute x -PASS XRStageBoundsPoint interface: attribute z PASS XRView interface: existence and properties of interface object PASS XRView interface object length PASS XRView interface object name
diff --git a/third_party/WebKit/LayoutTests/external/wpt/webxr/idlharness.https.window.js b/third_party/WebKit/LayoutTests/external/wpt/webxr/idlharness.https.window.js index 6ec963d..9576379 100644 --- a/third_party/WebKit/LayoutTests/external/wpt/webxr/idlharness.https.window.js +++ b/third_party/WebKit/LayoutTests/external/wpt/webxr/idlharness.https.window.js
@@ -17,6 +17,5 @@ }); self.device = await navigator.XR.requestDevice(); self.session = await device.requestSession(); - }, - 'Test IDL implementation of WebXR API' + } );
diff --git a/third_party/WebKit/LayoutTests/external/wpt/workers/interfaces/DedicatedWorkerGlobalScope/postMessage/second-argument-dictionary.html b/third_party/WebKit/LayoutTests/external/wpt/workers/interfaces/DedicatedWorkerGlobalScope/postMessage/second-argument-dictionary.html new file mode 100644 index 0000000..e086dc1 --- /dev/null +++ b/third_party/WebKit/LayoutTests/external/wpt/workers/interfaces/DedicatedWorkerGlobalScope/postMessage/second-argument-dictionary.html
@@ -0,0 +1,29 @@ +<!-- +onmessage = (event) => { + try { + postMessage(event.data, {transfer: [event.data]}); + } catch(e) { + postMessage(''+e); + } +} +/* +--> +<!doctype html> +<title>Using dictionary as postMessage's second argument</title> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<div id="log"></div> +<script> +(async_test()).step(function() { + var worker = new Worker('#'); + var ab = new ArrayBuffer(1); + worker.postMessage(ab, {transfer: [ab]}); + worker.onmessage = this.step_func(function(e) { + assert_equals(e.data.byteLength, 1); + this.done(); + }); +}); +</script> +<!-- +*/ +//-->
diff --git a/third_party/WebKit/LayoutTests/external/wpt/workers/interfaces/DedicatedWorkerGlobalScope/postMessage/second-argument-null.html b/third_party/WebKit/LayoutTests/external/wpt/workers/interfaces/DedicatedWorkerGlobalScope/postMessage/second-argument-null.html index e81a56ba..4a03c83 100644 --- a/third_party/WebKit/LayoutTests/external/wpt/workers/interfaces/DedicatedWorkerGlobalScope/postMessage/second-argument-null.html +++ b/third_party/WebKit/LayoutTests/external/wpt/workers/interfaces/DedicatedWorkerGlobalScope/postMessage/second-argument-null.html
@@ -15,7 +15,7 @@ (async_test()).step(function() { var worker = new Worker('#'); worker.onmessage = this.step_func(function(e) { - assert_true(e.data); + assert_equals(1, e.data); this.done(); }); });
diff --git a/third_party/WebKit/LayoutTests/external/wpt/xhr/overridemimetype-edge-cases.window-expected.txt b/third_party/WebKit/LayoutTests/external/wpt/xhr/overridemimetype-edge-cases.window-expected.txt index 4be0690..a936e877 100644 --- a/third_party/WebKit/LayoutTests/external/wpt/xhr/overridemimetype-edge-cases.window-expected.txt +++ b/third_party/WebKit/LayoutTests/external/wpt/xhr/overridemimetype-edge-cases.window-expected.txt
@@ -1,6 +1,6 @@ This is a testharness.js-based test. -FAIL overrideMimeType() state needs to be reset across requests assert_equals: expected "\ufffd" but got "\ufffd\ufffd" +FAIL overrideMimeType() state needs to be reset across requests assert_equals: expected "Âð" but got "\ufffd\ufffd" PASS If charset is not overridden by overrideMimeType() the original continues to be used -FAIL Charset can be overridden by overrideMimeType() with a bogus charset assert_equals: expected "\ufffd" but got "Âð" +FAIL Charset can be overridden by overrideMimeType() with a bogus charset assert_equals: expected "\ufffd\ufffd" but got "Âð" Harness: the test ran to completion.
diff --git a/third_party/WebKit/LayoutTests/external/wpt/xhr/overridemimetype-edge-cases.window.js b/third_party/WebKit/LayoutTests/external/wpt/xhr/overridemimetype-edge-cases.window.js index 6dfe755..192a696 100644 --- a/third_party/WebKit/LayoutTests/external/wpt/xhr/overridemimetype-edge-cases.window.js +++ b/third_party/WebKit/LayoutTests/external/wpt/xhr/overridemimetype-edge-cases.window.js
@@ -5,7 +5,7 @@ let secondTime = false; client.onload = t.step_func(() => { if(!secondTime) { - assert_equals(client.responseText, "\uFFFD"); + assert_equals(client.responseText, "\uFFFD\uFFFD"); secondTime = true; client.open("GET", testURL); client.send(); @@ -32,7 +32,7 @@ async_test(t => { const client = new XMLHttpRequest(); client.onload = t.step_func_done(() => { - assert_equals(client.responseText, "\uFFFD") + assert_equals(client.responseText, "\uFFFD\uFFFD") }); client.open("GET", testURL); client.overrideMimeType("text/plain;charset=342");
diff --git a/third_party/WebKit/LayoutTests/fast/events/message-port-multi-expected.txt b/third_party/WebKit/LayoutTests/fast/events/message-port-multi-expected.txt index 87726b3c..1577db2 100644 --- a/third_party/WebKit/LayoutTests/fast/events/message-port-multi-expected.txt +++ b/third_party/WebKit/LayoutTests/fast/events/message-port-multi-expected.txt
@@ -8,7 +8,6 @@ PASS channel.port1.postMessage("null port", [channel3.port1, null, channel3.port2]) threw exception TypeError: Failed to execute 'postMessage' on 'MessagePort': Value at index 1 is an untransferable 'null' value.. PASS channel.port1.postMessage("notAPort", [channel3.port1, {}, channel3.port2]) threw exception TypeError: Failed to execute 'postMessage' on 'MessagePort': Value at index 1 does not have a transferable type.. PASS channel.port1.postMessage("duplicate port", [channel3.port1, channel3.port1]) threw exception DataCloneError: Failed to execute 'postMessage' on 'MessagePort': Message port at index 1 is a duplicate of an earlier port.. -PASS channel.port1.postMessage("notAnArray", channel3.port1) threw exception TypeError: Failed to execute 'postMessage' on 'MessagePort': Iterator getter is not callable.. PASS channel.port1.postMessage("notASequence", [{length: 3}]) threw exception TypeError: Failed to execute 'postMessage' on 'MessagePort': Value at index 0 does not have a transferable type.. PASS channel.port1.postMessage("duplicate buffer", [arrayBuffer, arrayBuffer]) threw exception DataCloneError: Failed to execute 'postMessage' on 'MessagePort': ArrayBuffer at index 1 is a duplicate of an earlier ArrayBuffer.. PASS channel.port1.postMessage("largeSequence", largePortArray) threw exception RangeError: Failed to execute 'postMessage' on 'MessagePort': Array length exceeds supported limit..
diff --git a/third_party/WebKit/LayoutTests/fast/events/resources/message-port-multi.js b/third_party/WebKit/LayoutTests/fast/events/resources/message-port-multi.js index 9bc860b1..3a7e04e0 100644 --- a/third_party/WebKit/LayoutTests/fast/events/resources/message-port-multi.js +++ b/third_party/WebKit/LayoutTests/fast/events/resources/message-port-multi.js
@@ -24,7 +24,6 @@ // Should be OK to send channel3.port1 (should not have been disentangled by the previous failed calls). channel.port1.postMessage("entangled ports", [channel3.port1, channel3.port2]); -shouldThrow('channel.port1.postMessage("notAnArray", channel3.port1)', '"TypeError: Failed to execute \'postMessage\' on \'MessagePort\': Iterator getter is not callable."'); shouldThrow('channel.port1.postMessage("notASequence", [{length: 3}])', '"TypeError: Failed to execute \'postMessage\' on \'MessagePort\': Value at index 0 does not have a transferable type."'); var arrayBuffer = new ArrayBuffer(2); shouldThrow('channel.port1.postMessage("duplicate buffer", [arrayBuffer, arrayBuffer])', '"DataCloneError: Failed to execute \'postMessage\' on \'MessagePort\': ArrayBuffer at index 1 is a duplicate of an earlier ArrayBuffer."');
diff --git a/third_party/WebKit/LayoutTests/fast/workers/resources/worker-context-thread-multi-port.js b/third_party/WebKit/LayoutTests/fast/workers/resources/worker-context-thread-multi-port.js index 28eef671..06e2b2b8 100644 --- a/third_party/WebKit/LayoutTests/fast/workers/resources/worker-context-thread-multi-port.js +++ b/third_party/WebKit/LayoutTests/fast/workers/resources/worker-context-thread-multi-port.js
@@ -28,13 +28,6 @@ } try { - postMessage("notAnArray", channel3.port1); - testFailed("posting a non-array should throw"); -} catch (e) { - testPassed("posting a non-array did throw: " + e); -} - -try { postMessage("notASequence", [{length: 3}]); testFailed("posting a non-sequence should throw"); } catch (e) { @@ -54,4 +47,3 @@ function testPassed(msg) { postMessage("PASS"+msg); } -
diff --git a/third_party/WebKit/LayoutTests/fast/workers/resources/worker-multi-port.js b/third_party/WebKit/LayoutTests/fast/workers/resources/worker-multi-port.js index 1847182..d3dfa8c 100644 --- a/third_party/WebKit/LayoutTests/fast/workers/resources/worker-multi-port.js +++ b/third_party/WebKit/LayoutTests/fast/workers/resources/worker-multi-port.js
@@ -23,7 +23,6 @@ // Should be OK to send channel3.port1/2 (should not have been disentangled by the previous failed calls). worker.postMessage("failed ports", [channel3.port1, channel3.port2]); -shouldThrow('worker.postMessage("notAnArray", channel3.port1)') shouldThrow('worker.postMessage("notASequence", [{length: 3}])'); worker.postMessage("done", [channel.port2]);
diff --git a/third_party/WebKit/LayoutTests/fast/workers/worker-context-multi-port-expected.txt b/third_party/WebKit/LayoutTests/fast/workers/worker-context-multi-port-expected.txt index 7791a2f..30917da4a 100644 --- a/third_party/WebKit/LayoutTests/fast/workers/worker-context-multi-port-expected.txt +++ b/third_party/WebKit/LayoutTests/fast/workers/worker-context-multi-port-expected.txt
@@ -12,7 +12,6 @@ PASS posting a null port did throw: TypeError: Failed to execute 'postMessage' on 'DedicatedWorkerGlobalScope': Value at index 1 is an untransferable 'null' value. PASS posting a non-port did throw: TypeError: Failed to execute 'postMessage' on 'DedicatedWorkerGlobalScope': Value at index 1 does not have a transferable type. PASS event.ports contains two ports when two ports re-sent after error -PASS posting a non-array did throw: TypeError: Failed to execute 'postMessage' on 'DedicatedWorkerGlobalScope': Iterator getter is not callable. PASS posting a non-sequence did throw: TypeError: Failed to execute 'postMessage' on 'DedicatedWorkerGlobalScope': Value at index 0 does not have a transferable type. TEST COMPLETE
diff --git a/third_party/WebKit/LayoutTests/fast/workers/worker-multi-port-expected.txt b/third_party/WebKit/LayoutTests/fast/workers/worker-multi-port-expected.txt index 07f9a80..f7b6b6dc 100644 --- a/third_party/WebKit/LayoutTests/fast/workers/worker-multi-port-expected.txt +++ b/third_party/WebKit/LayoutTests/fast/workers/worker-multi-port-expected.txt
@@ -6,7 +6,6 @@ PASS worker.postMessage() threw exception TypeError: Failed to execute 'postMessage' on 'Worker': 1 argument required, but only 0 present.. PASS worker.postMessage("null port", [channel3.port1, null, channel3.port2]) threw exception TypeError: Failed to execute 'postMessage' on 'Worker': Value at index 1 is an untransferable 'null' value.. PASS worker.postMessage("notAPort", [channel3.port1, {}, channel3.port2]) threw exception TypeError: Failed to execute 'postMessage' on 'Worker': Value at index 1 does not have a transferable type.. -PASS worker.postMessage("notAnArray", channel3.port1) threw exception TypeError: Failed to execute 'postMessage' on 'Worker': Iterator getter is not callable.. PASS worker.postMessage("notASequence", [{length: 3}]) threw exception TypeError: Failed to execute 'postMessage' on 'Worker': Value at index 0 does not have a transferable type.. PASS successfullyParsed is true
diff --git a/third_party/WebKit/LayoutTests/fast/workers/worker-onerror-09-expected.txt b/third_party/WebKit/LayoutTests/fast/workers/worker-onerror-09-expected.txt index f33c98d..b5cfb07f 100644 --- a/third_party/WebKit/LayoutTests/fast/workers/worker-onerror-09-expected.txt +++ b/third_party/WebKit/LayoutTests/fast/workers/worker-onerror-09-expected.txt
@@ -5,7 +5,7 @@ Page-level worker.onerror handler triggered: -PASS errorEvent.message is "Uncaught TypeError: Failed to execute 'postMessage' on 'DedicatedWorkerGlobalScope': The provided value cannot be converted to a sequence." +PASS errorEvent.message is "Uncaught TypeError: Failed to execute 'postMessage' on 'DedicatedWorkerGlobalScope': Value at index 0 does not have a transferable type." PASS stripURL(errorEvent.filename) is "[blob: URL]" PASS errorEvent.lineno is 3 PASS errorEvent.colno is 9
diff --git a/third_party/WebKit/LayoutTests/fast/workers/worker-onerror-09.html b/third_party/WebKit/LayoutTests/fast/workers/worker-onerror-09.html index 13487ef2..1678826 100644 --- a/third_party/WebKit/LayoutTests/fast/workers/worker-onerror-09.html +++ b/third_party/WebKit/LayoutTests/fast/workers/worker-onerror-09.html
@@ -10,14 +10,14 @@ <body> <!-- This script's body will be used to build a Blob URL to use as a Worker. --> <script id="workerCode" type="text/plain"> - var not_a_sequence = 3; - postMessage(2, not_a_sequence); + var not_transferable = [{length: 3}]; + postMessage(2, not_transferable); </script> <script> description("This tests that unhandled exceptions in postMessage() are delivered to 'worker.onerror'."); checkErrorEventInHandler({ - message: "Uncaught TypeError: Failed to execute 'postMessage' on 'DedicatedWorkerGlobalScope': The provided value cannot be converted to a sequence.", + message: "Uncaught TypeError: Failed to execute 'postMessage' on 'DedicatedWorkerGlobalScope': Value at index 0 does not have a transferable type.", filename: "[blob: URL]", lineno: 3, colno: 9,
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/accessibility/canvas-fallback-content-2-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/accessibility/canvas-fallback-content-2-expected.txt new file mode 100644 index 0000000..9222bea1 --- /dev/null +++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/accessibility/canvas-fallback-content-2-expected.txt
@@ -0,0 +1,354 @@ +Link Button Button Button +Focusable +Heading +ARIA button +ARIA disabled button +ARIA enabled button +ARIA required button +ARIA toggle button +ARIA link +This tests a number of different elements in canvas fallback content to make sure their accessible attributes are essentially identical to the corresponding elements outside of canvas fallback content. + +On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE". + + +link1 +PASS document.activeElement == element1 is true +link2 +PASS document.activeElement == element2 is true +PASS axElement2.role is axElement1.role +PASS axElement2.roleDescription is axElement1.roleDescription +PASS axElement2.name is axElement1.name +PASS axElement2.description is axElement1.description +PASS axElement2.stringValue is axElement1.stringValue +PASS axElement2.isEnabled is axElement1.isEnabled +PASS axElement2.isRequired is axElement1.isRequired +PASS axElement2.isChecked is axElement1.isChecked +PASS axElement2.intValue is axElement1.intValue +PASS axElement2.minValue is axElement1.minValue +PASS axElement2.maxValue is axElement1.maxValue + +button1 +PASS document.activeElement == element1 is true +button2 +PASS document.activeElement == element2 is true +PASS axElement2.role is axElement1.role +PASS axElement2.roleDescription is axElement1.roleDescription +PASS axElement2.name is axElement1.name +PASS axElement2.description is axElement1.description +PASS axElement2.stringValue is axElement1.stringValue +PASS axElement2.isEnabled is axElement1.isEnabled +PASS axElement2.isRequired is axElement1.isRequired +PASS axElement2.isChecked is axElement1.isChecked +PASS axElement2.intValue is axElement1.intValue +PASS axElement2.minValue is axElement1.minValue +PASS axElement2.maxValue is axElement1.maxValue + +labeled-button1 +PASS document.activeElement == element1 is true +labeled-button2 +PASS document.activeElement == element2 is true +PASS axElement2.role is axElement1.role +PASS axElement2.roleDescription is axElement1.roleDescription +PASS axElement2.name is axElement1.name +PASS axElement2.description is axElement1.description +PASS axElement2.stringValue is axElement1.stringValue +PASS axElement2.isEnabled is axElement1.isEnabled +PASS axElement2.isRequired is axElement1.isRequired +PASS axElement2.isChecked is axElement1.isChecked +PASS axElement2.intValue is axElement1.intValue +PASS axElement2.minValue is axElement1.minValue +PASS axElement2.maxValue is axElement1.maxValue + +button-with-title1 +PASS document.activeElement == element1 is true +button-with-title2 +PASS document.activeElement == element2 is true +PASS axElement2.role is axElement1.role +PASS axElement2.roleDescription is axElement1.roleDescription +PASS axElement2.name is axElement1.name +PASS axElement2.description is axElement1.description +PASS axElement2.stringValue is axElement1.stringValue +PASS axElement2.isEnabled is axElement1.isEnabled +PASS axElement2.isRequired is axElement1.isRequired +PASS axElement2.isChecked is axElement1.isChecked +PASS axElement2.intValue is axElement1.intValue +PASS axElement2.minValue is axElement1.minValue +PASS axElement2.maxValue is axElement1.maxValue + +text1 +PASS document.activeElement == element1 is true +text2 +PASS document.activeElement == element2 is true +PASS axElement2.role is axElement1.role +PASS axElement2.roleDescription is axElement1.roleDescription +PASS axElement2.name is axElement1.name +PASS axElement2.description is axElement1.description +PASS axElement2.stringValue is axElement1.stringValue +PASS axElement2.isEnabled is axElement1.isEnabled +PASS axElement2.isRequired is axElement1.isRequired +PASS axElement2.isChecked is axElement1.isChecked +PASS axElement2.intValue is axElement1.intValue +PASS axElement2.minValue is axElement1.minValue +PASS axElement2.maxValue is axElement1.maxValue + +checkbox1 +PASS document.activeElement == element1 is true +checkbox2 +PASS document.activeElement == element2 is true +PASS axElement2.role is axElement1.role +PASS axElement2.roleDescription is axElement1.roleDescription +PASS axElement2.name is axElement1.name +PASS axElement2.description is axElement1.description +PASS axElement2.stringValue is axElement1.stringValue +PASS axElement2.isEnabled is axElement1.isEnabled +PASS axElement2.isRequired is axElement1.isRequired +PASS axElement2.isChecked is axElement1.isChecked +PASS axElement2.intValue is axElement1.intValue +PASS axElement2.minValue is axElement1.minValue +PASS axElement2.maxValue is axElement1.maxValue + +number1 +PASS document.activeElement == element1 is true +number2 +PASS document.activeElement == element2 is true +PASS axElement2.role is axElement1.role +PASS axElement2.roleDescription is axElement1.roleDescription +PASS axElement2.name is axElement1.name +PASS axElement2.description is axElement1.description +PASS axElement2.stringValue is axElement1.stringValue +PASS axElement2.isEnabled is axElement1.isEnabled +PASS axElement2.isRequired is axElement1.isRequired +PASS axElement2.isChecked is axElement1.isChecked +PASS axElement2.intValue is axElement1.intValue +PASS axElement2.minValue is axElement1.minValue +PASS axElement2.maxValue is axElement1.maxValue + +radio1 +PASS document.activeElement == element1 is true +radio2 +PASS document.activeElement == element2 is true +PASS axElement2.role is axElement1.role +PASS axElement2.roleDescription is axElement1.roleDescription +PASS axElement2.name is axElement1.name +PASS axElement2.description is axElement1.description +PASS axElement2.stringValue is axElement1.stringValue +PASS axElement2.isEnabled is axElement1.isEnabled +PASS axElement2.isRequired is axElement1.isRequired +PASS axElement2.isChecked is axElement1.isChecked +PASS axElement2.intValue is axElement1.intValue +PASS axElement2.minValue is axElement1.minValue +PASS axElement2.maxValue is axElement1.maxValue + +slider1 +PASS document.activeElement == element1 is true +slider2 +PASS document.activeElement == element2 is true +PASS axElement2.role is axElement1.role +PASS axElement2.roleDescription is axElement1.roleDescription +PASS axElement2.name is axElement1.name +PASS axElement2.description is axElement1.description +PASS axElement2.stringValue is axElement1.stringValue +PASS axElement2.isEnabled is axElement1.isEnabled +PASS axElement2.isRequired is axElement1.isRequired +PASS axElement2.isChecked is axElement1.isChecked +PASS axElement2.intValue is axElement1.intValue +PASS axElement2.minValue is axElement1.minValue +PASS axElement2.maxValue is axElement1.maxValue + +submit1 +PASS document.activeElement == element1 is true +submit2 +PASS document.activeElement == element2 is true +PASS axElement2.role is axElement1.role +PASS axElement2.roleDescription is axElement1.roleDescription +PASS axElement2.name is axElement1.name +PASS axElement2.description is axElement1.description +PASS axElement2.stringValue is axElement1.stringValue +PASS axElement2.isEnabled is axElement1.isEnabled +PASS axElement2.isRequired is axElement1.isRequired +PASS axElement2.isChecked is axElement1.isChecked +PASS axElement2.intValue is axElement1.intValue +PASS axElement2.minValue is axElement1.minValue +PASS axElement2.maxValue is axElement1.maxValue + +combobox1 +PASS document.activeElement == element1 is true +combobox2 +PASS document.activeElement == element2 is true +PASS axElement2.role is axElement1.role +PASS axElement2.roleDescription is axElement1.roleDescription +PASS axElement2.name is axElement1.name +PASS axElement2.description is axElement1.description +PASS axElement2.stringValue is axElement1.stringValue +PASS axElement2.isEnabled is axElement1.isEnabled +PASS axElement2.isRequired is axElement1.isRequired +PASS axElement2.isChecked is axElement1.isChecked +PASS axElement2.intValue is axElement1.intValue +PASS axElement2.minValue is axElement1.minValue +PASS axElement2.maxValue is axElement1.maxValue + +listbox1 +PASS document.activeElement == element1 is true +listbox2 +PASS document.activeElement == element2 is true +PASS axElement2.role is axElement1.role +PASS axElement2.roleDescription is axElement1.roleDescription +PASS axElement2.name is axElement1.name +PASS axElement2.description is axElement1.description +PASS axElement2.stringValue is axElement1.stringValue +PASS axElement2.isEnabled is axElement1.isEnabled +PASS axElement2.isRequired is axElement1.isRequired +PASS axElement2.isChecked is axElement1.isChecked +PASS axElement2.intValue is axElement1.intValue +PASS axElement2.minValue is axElement1.minValue +PASS axElement2.maxValue is axElement1.maxValue + +textarea1 +PASS document.activeElement == element1 is true +textarea2 +PASS document.activeElement == element2 is true +PASS axElement2.role is axElement1.role +PASS axElement2.roleDescription is axElement1.roleDescription +PASS axElement2.name is axElement1.name +PASS axElement2.description is axElement1.description +PASS axElement2.stringValue is axElement1.stringValue +PASS axElement2.isEnabled is axElement1.isEnabled +PASS axElement2.isRequired is axElement1.isRequired +PASS axElement2.isChecked is axElement1.isChecked +PASS axElement2.intValue is axElement1.intValue +PASS axElement2.minValue is axElement1.minValue +PASS axElement2.maxValue is axElement1.maxValue + +focusable1 +PASS document.activeElement == element1 is true +focusable2 +PASS document.activeElement == element2 is true +PASS axElement2.role is axElement1.role +PASS axElement2.roleDescription is axElement1.roleDescription +PASS axElement2.name is axElement1.name +PASS axElement2.description is axElement1.description +PASS axElement2.stringValue is axElement1.stringValue +PASS axElement2.isEnabled is axElement1.isEnabled +PASS axElement2.isRequired is axElement1.isRequired +PASS axElement2.isChecked is axElement1.isChecked +PASS axElement2.intValue is axElement1.intValue +PASS axElement2.minValue is axElement1.minValue +PASS axElement2.maxValue is axElement1.maxValue + +heading1 +PASS document.activeElement == element1 is true +heading2 +PASS document.activeElement == element2 is true +PASS axElement2.role is axElement1.role +PASS axElement2.roleDescription is axElement1.roleDescription +PASS axElement2.name is axElement1.name +PASS axElement2.description is axElement1.description +PASS axElement2.stringValue is axElement1.stringValue +PASS axElement2.isEnabled is axElement1.isEnabled +PASS axElement2.isRequired is axElement1.isRequired +PASS axElement2.isChecked is axElement1.isChecked +PASS axElement2.intValue is axElement1.intValue +PASS axElement2.minValue is axElement1.minValue +PASS axElement2.maxValue is axElement1.maxValue + +aria-button1 +PASS document.activeElement == element1 is true +aria-button2 +PASS document.activeElement == element2 is true +PASS axElement2.role is axElement1.role +PASS axElement2.roleDescription is axElement1.roleDescription +PASS axElement2.name is axElement1.name +PASS axElement2.description is axElement1.description +PASS axElement2.stringValue is axElement1.stringValue +PASS axElement2.isEnabled is axElement1.isEnabled +PASS axElement2.isRequired is axElement1.isRequired +PASS axElement2.isChecked is axElement1.isChecked +PASS axElement2.intValue is axElement1.intValue +PASS axElement2.minValue is axElement1.minValue +PASS axElement2.maxValue is axElement1.maxValue + +aria-disabledbutton1 +PASS document.activeElement == element1 is true +aria-disabledbutton2 +PASS document.activeElement == element2 is true +PASS axElement2.role is axElement1.role +PASS axElement2.roleDescription is axElement1.roleDescription +PASS axElement2.name is axElement1.name +PASS axElement2.description is axElement1.description +PASS axElement2.stringValue is axElement1.stringValue +PASS axElement2.isEnabled is axElement1.isEnabled +PASS axElement2.isRequired is axElement1.isRequired +PASS axElement2.isChecked is axElement1.isChecked +PASS axElement2.intValue is axElement1.intValue +PASS axElement2.minValue is axElement1.minValue +PASS axElement2.maxValue is axElement1.maxValue + +aria-enabledbutton1 +PASS document.activeElement == element1 is true +aria-enabledbutton2 +PASS document.activeElement == element2 is true +PASS axElement2.role is axElement1.role +PASS axElement2.roleDescription is axElement1.roleDescription +PASS axElement2.name is axElement1.name +PASS axElement2.description is axElement1.description +PASS axElement2.stringValue is axElement1.stringValue +PASS axElement2.isEnabled is axElement1.isEnabled +PASS axElement2.isRequired is axElement1.isRequired +PASS axElement2.isChecked is axElement1.isChecked +PASS axElement2.intValue is axElement1.intValue +PASS axElement2.minValue is axElement1.minValue +PASS axElement2.maxValue is axElement1.maxValue + +aria-requiredbutton1 +PASS document.activeElement == element1 is true +aria-requiredbutton2 +PASS document.activeElement == element2 is true +PASS axElement2.role is axElement1.role +PASS axElement2.roleDescription is axElement1.roleDescription +PASS axElement2.name is axElement1.name +PASS axElement2.description is axElement1.description +PASS axElement2.stringValue is axElement1.stringValue +PASS axElement2.isEnabled is axElement1.isEnabled +PASS axElement2.isRequired is axElement1.isRequired +PASS axElement2.isChecked is axElement1.isChecked +PASS axElement2.intValue is axElement1.intValue +PASS axElement2.minValue is axElement1.minValue +PASS axElement2.maxValue is axElement1.maxValue + +aria-togglebutton1 +PASS document.activeElement == element1 is true +aria-togglebutton2 +PASS document.activeElement == element2 is true +PASS axElement2.role is axElement1.role +PASS axElement2.roleDescription is axElement1.roleDescription +PASS axElement2.name is axElement1.name +PASS axElement2.description is axElement1.description +PASS axElement2.stringValue is axElement1.stringValue +PASS axElement2.isEnabled is axElement1.isEnabled +PASS axElement2.isRequired is axElement1.isRequired +PASS axElement2.isChecked is axElement1.isChecked +PASS axElement2.intValue is axElement1.intValue +PASS axElement2.minValue is axElement1.minValue +PASS axElement2.maxValue is axElement1.maxValue + +aria-link1 +PASS document.activeElement == element1 is true +aria-link2 +PASS document.activeElement == element2 is true +PASS axElement2.role is axElement1.role +PASS axElement2.roleDescription is axElement1.roleDescription +PASS axElement2.name is axElement1.name +PASS axElement2.description is axElement1.description +PASS axElement2.stringValue is axElement1.stringValue +PASS axElement2.isEnabled is axElement1.isEnabled +PASS axElement2.isRequired is axElement1.isRequired +PASS axElement2.isChecked is axElement1.isChecked +PASS axElement2.intValue is axElement1.intValue +PASS axElement2.minValue is axElement1.minValue +PASS axElement2.maxValue is axElement1.maxValue + +PASS successfullyParsed is true + +TEST COMPLETE +
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/paint/invalidation/box/box-inline-resize-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/paint/invalidation/box/box-inline-resize-expected.txt deleted file mode 100644 index 7c309040f..0000000 --- a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/paint/invalidation/box/box-inline-resize-expected.txt +++ /dev/null
@@ -1,39 +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": "InlineTextBox 'Chromium'", - "rect": [40, 107, 113, 27], - "reason": "geometry" - }, - { - "object": "InlineTextBox 'Chromium'", - "rect": [8, 107, 113, 27], - "reason": "geometry" - }, - { - "object": "LayoutImage IMG id='foo'", - "rect": [8, 88, 32, 32], - "reason": "appeared" - } - ] - } - ] -} -
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/paint/invalidation/details-open-repaint-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/paint/invalidation/details-open-repaint-expected.txt deleted file mode 100644 index 99f1314..0000000 --- a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/paint/invalidation/details-open-repaint-expected.txt +++ /dev/null
@@ -1,34 +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": "LayoutTextControl INPUT", - "rect": [8, 72, 181, 22], - "reason": "appeared" - }, - { - "object": "LayoutDetailsMarker DIV id='details-marker'", - "rect": [8, 56, 11, 11], - "reason": "full" - } - ] - } - ] -} -
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/paint/invalidation/multicol/multicol-with-text-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/paint/invalidation/multicol/multicol-with-text-expected.txt deleted file mode 100644 index 2487e74..0000000 --- a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/paint/invalidation/multicol/multicol-with-text-expected.txt +++ /dev/null
@@ -1,29 +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": "LayoutMultiColumnFlowThread (anonymous)", - "rect": [488, 8, 80, 20], - "reason": "chunk appeared" - } - ] - } - ] -} -
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/paint/invalidation/offset-change-wrong-invalidation-with-float-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/paint/invalidation/offset-change-wrong-invalidation-with-float-expected.txt new file mode 100644 index 0000000..e57c9bc --- /dev/null +++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/paint/invalidation/offset-change-wrong-invalidation-with-float-expected.txt
@@ -0,0 +1,52 @@ +{ + "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": "LayoutNGBlockFlow (positioned) UL id='submenu'", + "rect": [48, 94, 40, 20], + "reason": "chunk disappeared" + } + ] + }, + { + "name": "LayoutNGListItem (floating) LI id='watches'", + "position": [30, 44], + "bounds": [7, 20] + }, + { + "name": "LayoutInline (relative positioned) SPAN id='placeholder'", + "position": [48, 44], + "drawsContent": false, + "backfaceVisibility": "hidden" + }, + { + "name": "LayoutNGListItem (relative positioned) (floating) LI id='menu'", + "position": [30, 44], + "bounds": [7, 20], + "paintInvalidations": [ + { + "object": "NGPhysicalTextFragment '\u2022 '", + "rect": [0, 0, 7, 19], + "reason": "subtree" + } + ] + } + ] +} +
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/paint/invalidation/position/relative-inline-positioned-movement-repaint-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/paint/invalidation/position/relative-inline-positioned-movement-repaint-expected.txt deleted file mode 100644 index 179ee1ac..0000000 --- a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/paint/invalidation/position/relative-inline-positioned-movement-repaint-expected.txt +++ /dev/null
@@ -1,35 +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" - }, - { - "name": "LayoutInline (relative positioned) DIV id='block'", - "position": [68, 7], - "bounds": [365, 21], - "backfaceVisibility": "hidden", - "paintInvalidations": [ - { - "object": "LayoutInline (relative positioned) DIV id='block'", - "rect": [0, 0, 365, 21], - "reason": "paint property change" - } - ] - } - ] -} -
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/paint/invalidation/svg/animated-path-inside-transformed-html-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/paint/invalidation/svg/animated-path-inside-transformed-html-expected.txt deleted file mode 100644 index 1aa9090..0000000 --- a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/paint/invalidation/svg/animated-path-inside-transformed-html-expected.txt +++ /dev/null
@@ -1,54 +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": "InlineTextBox 'This is some text'", - "rect": [246, 89, 127, 46], - "reason": "disappeared" - }, - { - "object": "InlineTextBox 'This is some text'", - "rect": [203, 336, 126, 45], - "reason": "appeared" - }, - { - "object": "LayoutSVGRect rect id='rect'", - "rect": [108, 84, 105, 102], - "reason": "full" - }, - { - "object": "LayoutSVGRect rect id='rect'", - "rect": [355, 125, 104, 104], - "reason": "full" - }, - { - "object": "LayoutSVGImage image id='image'", - "rect": [352, 398, 99, 98], - "reason": "full" - }, - { - "object": "LayoutSVGImage image id='image'", - "rect": [90, 207, 98, 99], - "reason": "full" - } - ] - } - ] -} -
diff --git a/third_party/WebKit/LayoutTests/http/tests/serviceworker/webexposed/global-interface-listing-service-worker-expected.txt b/third_party/WebKit/LayoutTests/http/tests/serviceworker/webexposed/global-interface-listing-service-worker-expected.txt index 759ccea..1bdf968 100644 --- a/third_party/WebKit/LayoutTests/http/tests/serviceworker/webexposed/global-interface-listing-service-worker-expected.txt +++ b/third_party/WebKit/LayoutTests/http/tests/serviceworker/webexposed/global-interface-listing-service-worker-expected.txt
@@ -14,17 +14,9 @@ getter onabort method constructor setter onabort -interface BackgroundFetchClickEvent : BackgroundFetchEvent - attribute @@toStringTag - getter state - method constructor interface BackgroundFetchEvent : ExtendableEvent attribute @@toStringTag - getter id - method constructor -interface BackgroundFetchFailEvent : BackgroundFetchEvent - attribute @@toStringTag - getter fetches + getter registration method constructor interface BackgroundFetchFetch attribute @@toStringTag @@ -36,6 +28,11 @@ method fetch method get method getIds +interface BackgroundFetchRecord + attribute @@toStringTag + getter request + getter responseReady + method constructor interface BackgroundFetchRegistration : EventTarget attribute @@toStringTag getter downloadTotal @@ -47,10 +44,6 @@ method abort method constructor setter onprogress -interface BackgroundFetchSettledEvent : BackgroundFetchEvent - attribute @@toStringTag - getter fetches - method constructor interface BackgroundFetchSettledFetch : BackgroundFetchFetch attribute @@toStringTag getter response @@ -60,8 +53,9 @@ method constructor method match method values -interface BackgroundFetchUpdateEvent : BackgroundFetchSettledEvent +interface BackgroundFetchUpdateUIEvent : BackgroundFetchEvent attribute @@toStringTag + getter fetches method constructor method updateUI interface BarcodeDetector @@ -3511,8 +3505,8 @@ getter onactivate getter onbackgroundfetchabort getter onbackgroundfetchclick - getter onbackgroundfetched getter onbackgroundfetchfail + getter onbackgroundfetchsuccess getter oncanmakepayment getter oncookiechange getter onfetch @@ -3532,8 +3526,8 @@ setter onactivate setter onbackgroundfetchabort setter onbackgroundfetchclick - setter onbackgroundfetched setter onbackgroundfetchfail + setter onbackgroundfetchsuccess setter oncanmakepayment setter oncookiechange setter onfetch
diff --git a/third_party/WebKit/LayoutTests/images/feature-policy-max-downscaling-image-edge-cases-expected.png b/third_party/WebKit/LayoutTests/images/feature-policy-max-downscaling-image-edge-cases-expected.png new file mode 100644 index 0000000..14da788 --- /dev/null +++ b/third_party/WebKit/LayoutTests/images/feature-policy-max-downscaling-image-edge-cases-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/images/feature-policy-max-downscaling-image-edge-cases-expected.txt b/third_party/WebKit/LayoutTests/images/feature-policy-max-downscaling-image-edge-cases-expected.txt new file mode 100644 index 0000000..6ffc696 --- /dev/null +++ b/third_party/WebKit/LayoutTests/images/feature-policy-max-downscaling-image-edge-cases-expected.txt
@@ -0,0 +1,24 @@ +layer at (0,0) size 800x600 + LayoutView at (0,0) size 800x600 +layer at (0,0) size 800x525 + LayoutBlockFlow {HTML} at (0,0) size 800x525 + LayoutBlockFlow {BODY} at (8,8) size 784x509 + LayoutText {#text} at (0,0) size 0x0 +layer at (8,8) size 604x504 + LayoutIFrame {IFRAME} at (0,0) size 604x504 [border: (2px inset #EEEEEE)] + layer at (0,0) size 600x500 + LayoutView at (0,0) size 600x500 + layer at (0,0) size 600x411 + LayoutBlockFlow {HTML} at (0,0) size 600x411 + LayoutBlockFlow {BODY} at (8,8) size 584x395 + LayoutImage {IMG} at (0,0) size 256x256 + LayoutText {#text} at (256,241) size 4x19 + text run at (256,241) width 4: " " + LayoutImage {IMG} at (260,128) size 128x128 + LayoutText {#text} at (388,241) size 4x19 + text run at (388,241) width 4: " " + LayoutImage {IMG} at (392,129) size 127x127 + LayoutText {#text} at (519,241) size 4x19 + text run at (519,241) width 4: " " + LayoutImage {IMG} at (0,261) size 129x129 + LayoutText {#text} at (0,0) size 0x0
diff --git a/third_party/WebKit/LayoutTests/images/feature-policy-max-downscaling-image-edge-cases.html b/third_party/WebKit/LayoutTests/images/feature-policy-max-downscaling-image-edge-cases.html new file mode 100644 index 0000000..7e39d3f --- /dev/null +++ b/third_party/WebKit/LayoutTests/images/feature-policy-max-downscaling-image-edge-cases.html
@@ -0,0 +1,6 @@ +<!DOCTYPE html> +<body> + <iframe id="simple" src="resources/frame-with-max-downscaling-image-test-images-edge-cases.html" + allow="max-downscaling-image 'none'" width="600" height="500"> + </iframe> +</body>
diff --git a/third_party/WebKit/LayoutTests/images/resources/frame-with-max-downscaling-image-test-images-edge-cases.html b/third_party/WebKit/LayoutTests/images/resources/frame-with-max-downscaling-image-test-images-edge-cases.html new file mode 100644 index 0000000..b014b99 --- /dev/null +++ b/third_party/WebKit/LayoutTests/images/resources/frame-with-max-downscaling-image-test-images-edge-cases.html
@@ -0,0 +1,7 @@ +<!DOCTYPE html> +<body> +<img src="green-256x256.jpg"> +<img src="green-256x256.jpg" width="128" height="128" > +<img src="green-256x256.jpg" width="127" height="127" > +<img src="green-256x256.jpg" width="129" height="129" > +</body>
diff --git a/third_party/WebKit/LayoutTests/platform/mac/images/feature-policy-max-downscaling-image-edge-cases-expected.png b/third_party/WebKit/LayoutTests/platform/mac/images/feature-policy-max-downscaling-image-edge-cases-expected.png new file mode 100644 index 0000000..78127f89 --- /dev/null +++ b/third_party/WebKit/LayoutTests/platform/mac/images/feature-policy-max-downscaling-image-edge-cases-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/images/feature-policy-max-downscaling-image-edge-cases-expected.txt b/third_party/WebKit/LayoutTests/platform/mac/images/feature-policy-max-downscaling-image-edge-cases-expected.txt new file mode 100644 index 0000000..d2e0bd8 --- /dev/null +++ b/third_party/WebKit/LayoutTests/platform/mac/images/feature-policy-max-downscaling-image-edge-cases-expected.txt
@@ -0,0 +1,24 @@ +layer at (0,0) size 800x600 + LayoutView at (0,0) size 800x600 +layer at (0,0) size 800x524 + LayoutBlockFlow {HTML} at (0,0) size 800x524 + LayoutBlockFlow {BODY} at (8,8) size 784x508 + LayoutText {#text} at (0,0) size 0x0 +layer at (8,8) size 604x504 + LayoutIFrame {IFRAME} at (0,0) size 604x504 [border: (2px inset #EEEEEE)] + layer at (0,0) size 600x500 + LayoutView at (0,0) size 600x500 + layer at (0,0) size 600x409 + LayoutBlockFlow {HTML} at (0,0) size 600x409 + LayoutBlockFlow {BODY} at (8,8) size 584x393 + LayoutImage {IMG} at (0,0) size 256x256 + LayoutText {#text} at (256,242) size 4x18 + text run at (256,242) width 4: " " + LayoutImage {IMG} at (260,128) size 128x128 + LayoutText {#text} at (388,242) size 4x18 + text run at (388,242) width 4: " " + LayoutImage {IMG} at (392,129) size 127x127 + LayoutText {#text} at (519,242) size 4x18 + text run at (519,242) width 4: " " + LayoutImage {IMG} at (0,260) size 129x129 + LayoutText {#text} at (0,0) size 0x0
diff --git a/third_party/WebKit/LayoutTests/platform/mac/virtual/exotic-color-space/images/feature-policy-max-downscaling-image-edge-cases-expected.png b/third_party/WebKit/LayoutTests/platform/mac/virtual/exotic-color-space/images/feature-policy-max-downscaling-image-edge-cases-expected.png new file mode 100644 index 0000000..cf25228 --- /dev/null +++ b/third_party/WebKit/LayoutTests/platform/mac/virtual/exotic-color-space/images/feature-policy-max-downscaling-image-edge-cases-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/virtual/exotic-color-space/images/feature-policy-max-downscaling-image-edge-cases-expected.txt b/third_party/WebKit/LayoutTests/platform/mac/virtual/exotic-color-space/images/feature-policy-max-downscaling-image-edge-cases-expected.txt new file mode 100644 index 0000000..d2e0bd8 --- /dev/null +++ b/third_party/WebKit/LayoutTests/platform/mac/virtual/exotic-color-space/images/feature-policy-max-downscaling-image-edge-cases-expected.txt
@@ -0,0 +1,24 @@ +layer at (0,0) size 800x600 + LayoutView at (0,0) size 800x600 +layer at (0,0) size 800x524 + LayoutBlockFlow {HTML} at (0,0) size 800x524 + LayoutBlockFlow {BODY} at (8,8) size 784x508 + LayoutText {#text} at (0,0) size 0x0 +layer at (8,8) size 604x504 + LayoutIFrame {IFRAME} at (0,0) size 604x504 [border: (2px inset #EEEEEE)] + layer at (0,0) size 600x500 + LayoutView at (0,0) size 600x500 + layer at (0,0) size 600x409 + LayoutBlockFlow {HTML} at (0,0) size 600x409 + LayoutBlockFlow {BODY} at (8,8) size 584x393 + LayoutImage {IMG} at (0,0) size 256x256 + LayoutText {#text} at (256,242) size 4x18 + text run at (256,242) width 4: " " + LayoutImage {IMG} at (260,128) size 128x128 + LayoutText {#text} at (388,242) size 4x18 + text run at (388,242) width 4: " " + LayoutImage {IMG} at (392,129) size 127x127 + LayoutText {#text} at (519,242) size 4x18 + text run at (519,242) width 4: " " + LayoutImage {IMG} at (0,260) size 129x129 + LayoutText {#text} at (0,0) size 0x0
diff --git a/third_party/WebKit/LayoutTests/platform/mac/virtual/gpu-rasterization/images/feature-policy-max-downscaling-image-edge-cases-expected.png b/third_party/WebKit/LayoutTests/platform/mac/virtual/gpu-rasterization/images/feature-policy-max-downscaling-image-edge-cases-expected.png new file mode 100644 index 0000000..78127f89 --- /dev/null +++ b/third_party/WebKit/LayoutTests/platform/mac/virtual/gpu-rasterization/images/feature-policy-max-downscaling-image-edge-cases-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/virtual/gpu-rasterization/images/feature-policy-max-downscaling-image-edge-cases-expected.txt b/third_party/WebKit/LayoutTests/platform/mac/virtual/gpu-rasterization/images/feature-policy-max-downscaling-image-edge-cases-expected.txt new file mode 100644 index 0000000..d2e0bd8 --- /dev/null +++ b/third_party/WebKit/LayoutTests/platform/mac/virtual/gpu-rasterization/images/feature-policy-max-downscaling-image-edge-cases-expected.txt
@@ -0,0 +1,24 @@ +layer at (0,0) size 800x600 + LayoutView at (0,0) size 800x600 +layer at (0,0) size 800x524 + LayoutBlockFlow {HTML} at (0,0) size 800x524 + LayoutBlockFlow {BODY} at (8,8) size 784x508 + LayoutText {#text} at (0,0) size 0x0 +layer at (8,8) size 604x504 + LayoutIFrame {IFRAME} at (0,0) size 604x504 [border: (2px inset #EEEEEE)] + layer at (0,0) size 600x500 + LayoutView at (0,0) size 600x500 + layer at (0,0) size 600x409 + LayoutBlockFlow {HTML} at (0,0) size 600x409 + LayoutBlockFlow {BODY} at (8,8) size 584x393 + LayoutImage {IMG} at (0,0) size 256x256 + LayoutText {#text} at (256,242) size 4x18 + text run at (256,242) width 4: " " + LayoutImage {IMG} at (260,128) size 128x128 + LayoutText {#text} at (388,242) size 4x18 + text run at (388,242) width 4: " " + LayoutImage {IMG} at (392,129) size 127x127 + LayoutText {#text} at (519,242) size 4x18 + text run at (519,242) width 4: " " + LayoutImage {IMG} at (0,260) size 129x129 + LayoutText {#text} at (0,0) size 0x0
diff --git a/third_party/WebKit/LayoutTests/reporting-observer/resources/deprecation.js b/third_party/WebKit/LayoutTests/reporting-observer/resources/deprecation.js index 9ec2956..e86b736f 100644 --- a/third_party/WebKit/LayoutTests/reporting-observer/resources/deprecation.js +++ b/third_party/WebKit/LayoutTests/reporting-observer/resources/deprecation.js
@@ -23,6 +23,10 @@ }); observer.observe(); + // This ensures that ReportingObserver is traced properly. This will cause the + // test to fail otherwise. + window.gc(); + // Use two deprecated features to generate two deprecation reports. window.webkitStorageInfo; window.webkitURL;
diff --git a/third_party/WebKit/LayoutTests/shadow-dom/imperative-api.html b/third_party/WebKit/LayoutTests/shadow-dom/imperative-api.html index 5633352..ad9fc6b 100644 --- a/third_party/WebKit/LayoutTests/shadow-dom/imperative-api.html +++ b/third_party/WebKit/LayoutTests/shadow-dom/imperative-api.html
@@ -6,23 +6,21 @@ <script src="../resources/testharness.js"></script> <script src="../resources/testharnessreport.js"></script> <div id="host"> - <div id="child1"></div> +</div> +<div id="host1"> </div> <script> const host = document.querySelector('#host'); -const child1 = document.querySelector('#child1'); -const shadow_root = host.attachShadow({ mode: 'open', slotting: 'manual' }); -const slot1 = document.createElement('slot'); -shadow_root.appendChild(slot1); +const host1 = document.querySelector('#host1'); test(() => { - assert_equals(child1.assignedSlot, null); - assert_array_equals(slot1.assignedElements(), []); - - slot1.assign([child1]); - - assert_equals(child1.assignedSlot, slot1); - assert_array_equals(slot1.assignedElements(), [child1]); -}, 'slot.assign(nodes) should work'); + assert_not_equals(host.attachShadow({ mode: 'open', slotting: 'manual' }), + null, 'slotting manual should work'); + assert_not_equals(host1.attachShadow({ mode: 'open', slotting: 'auto' }), + null, 'slotting auto should work'); + assert_throws(new TypeError(), () => { + host.attachShadow({ mode: 'open', slotting: 'exceptional' })}, + 'others should throw exception'); +}, 'attachShadow can take slotting parameter'); </script>
diff --git a/third_party/WebKit/LayoutTests/virtual/exotic-color-space/images/feature-policy-max-downscaling-image-edge-cases-expected.png b/third_party/WebKit/LayoutTests/virtual/exotic-color-space/images/feature-policy-max-downscaling-image-edge-cases-expected.png new file mode 100644 index 0000000..46d004b --- /dev/null +++ b/third_party/WebKit/LayoutTests/virtual/exotic-color-space/images/feature-policy-max-downscaling-image-edge-cases-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/virtual/exotic-color-space/images/feature-policy-max-downscaling-image-edge-cases-expected.txt b/third_party/WebKit/LayoutTests/virtual/exotic-color-space/images/feature-policy-max-downscaling-image-edge-cases-expected.txt new file mode 100644 index 0000000..6ffc696 --- /dev/null +++ b/third_party/WebKit/LayoutTests/virtual/exotic-color-space/images/feature-policy-max-downscaling-image-edge-cases-expected.txt
@@ -0,0 +1,24 @@ +layer at (0,0) size 800x600 + LayoutView at (0,0) size 800x600 +layer at (0,0) size 800x525 + LayoutBlockFlow {HTML} at (0,0) size 800x525 + LayoutBlockFlow {BODY} at (8,8) size 784x509 + LayoutText {#text} at (0,0) size 0x0 +layer at (8,8) size 604x504 + LayoutIFrame {IFRAME} at (0,0) size 604x504 [border: (2px inset #EEEEEE)] + layer at (0,0) size 600x500 + LayoutView at (0,0) size 600x500 + layer at (0,0) size 600x411 + LayoutBlockFlow {HTML} at (0,0) size 600x411 + LayoutBlockFlow {BODY} at (8,8) size 584x395 + LayoutImage {IMG} at (0,0) size 256x256 + LayoutText {#text} at (256,241) size 4x19 + text run at (256,241) width 4: " " + LayoutImage {IMG} at (260,128) size 128x128 + LayoutText {#text} at (388,241) size 4x19 + text run at (388,241) width 4: " " + LayoutImage {IMG} at (392,129) size 127x127 + LayoutText {#text} at (519,241) size 4x19 + text run at (519,241) width 4: " " + LayoutImage {IMG} at (0,261) size 129x129 + LayoutText {#text} at (0,0) size 0x0
diff --git a/third_party/WebKit/LayoutTests/virtual/gpu-rasterization/images/feature-policy-max-downscaling-image-edge-cases-expected.png b/third_party/WebKit/LayoutTests/virtual/gpu-rasterization/images/feature-policy-max-downscaling-image-edge-cases-expected.png new file mode 100644 index 0000000..14da788 --- /dev/null +++ b/third_party/WebKit/LayoutTests/virtual/gpu-rasterization/images/feature-policy-max-downscaling-image-edge-cases-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/virtual/gpu-rasterization/images/feature-policy-max-downscaling-image-edge-cases-expected.txt b/third_party/WebKit/LayoutTests/virtual/gpu-rasterization/images/feature-policy-max-downscaling-image-edge-cases-expected.txt new file mode 100644 index 0000000..6ffc696 --- /dev/null +++ b/third_party/WebKit/LayoutTests/virtual/gpu-rasterization/images/feature-policy-max-downscaling-image-edge-cases-expected.txt
@@ -0,0 +1,24 @@ +layer at (0,0) size 800x600 + LayoutView at (0,0) size 800x600 +layer at (0,0) size 800x525 + LayoutBlockFlow {HTML} at (0,0) size 800x525 + LayoutBlockFlow {BODY} at (8,8) size 784x509 + LayoutText {#text} at (0,0) size 0x0 +layer at (8,8) size 604x504 + LayoutIFrame {IFRAME} at (0,0) size 604x504 [border: (2px inset #EEEEEE)] + layer at (0,0) size 600x500 + LayoutView at (0,0) size 600x500 + layer at (0,0) size 600x411 + LayoutBlockFlow {HTML} at (0,0) size 600x411 + LayoutBlockFlow {BODY} at (8,8) size 584x395 + LayoutImage {IMG} at (0,0) size 256x256 + LayoutText {#text} at (256,241) size 4x19 + text run at (256,241) width 4: " " + LayoutImage {IMG} at (260,128) size 128x128 + LayoutText {#text} at (388,241) size 4x19 + text run at (388,241) width 4: " " + LayoutImage {IMG} at (392,129) size 127x127 + LayoutText {#text} at (519,241) size 4x19 + text run at (519,241) width 4: " " + LayoutImage {IMG} at (0,261) size 129x129 + LayoutText {#text} at (0,0) size 0x0
diff --git a/third_party/WebKit/LayoutTests/virtual/paint-timing/external/wpt/paint-timing/idlharness.window-expected.txt b/third_party/WebKit/LayoutTests/virtual/paint-timing/external/wpt/paint-timing/idlharness.window-expected.txt index 979c4193..c3acfed 100644 --- a/third_party/WebKit/LayoutTests/virtual/paint-timing/external/wpt/paint-timing/idlharness.window-expected.txt +++ b/third_party/WebKit/LayoutTests/virtual/paint-timing/external/wpt/paint-timing/idlharness.window-expected.txt
@@ -1,5 +1,5 @@ This is a testharness.js-based test. -FAIL paint-timing interfaces. promise_test: Unhandled rejection with value: "Timed out waiting for paint event" +FAIL idl_test setup promise_test: Unhandled rejection with value: "Timed out waiting for paint event" PASS PerformancePaintTiming interface: existence and properties of interface object PASS PerformancePaintTiming interface object length PASS PerformancePaintTiming interface object name
diff --git a/third_party/WebKit/LayoutTests/virtual/stable/webexposed/element-instance-property-listing-expected.txt b/third_party/WebKit/LayoutTests/virtual/stable/webexposed/element-instance-property-listing-expected.txt index 42ac415..f78fb22 100644 --- a/third_party/WebKit/LayoutTests/virtual/stable/webexposed/element-instance-property-listing-expected.txt +++ b/third_party/WebKit/LayoutTests/virtual/stable/webexposed/element-instance-property-listing-expected.txt
@@ -275,7 +275,6 @@ html element abbr html element acronym html element address -html element applet html element area property alt property coords @@ -359,7 +358,6 @@ html element basefont html element bdi html element bdo -html element bgsound html element big html element blockquote property cite @@ -434,7 +432,6 @@ property span property vAlign property width -html element command html element content property getDistributedNodes property select @@ -581,7 +578,6 @@ property src property srcdoc property width -html element image html element img property align property alt @@ -670,7 +666,6 @@ property cite property dateTime html element kbd -html element keygen html element label property control property form
diff --git a/third_party/WebKit/LayoutTests/virtual/threaded/animations/composited-filter-webkit-filter.html b/third_party/WebKit/LayoutTests/virtual/threaded/animations/composited-filter-webkit-filter.html index cc13374..3cb46f9 100644 --- a/third_party/WebKit/LayoutTests/virtual/threaded/animations/composited-filter-webkit-filter.html +++ b/third_party/WebKit/LayoutTests/virtual/threaded/animations/composited-filter-webkit-filter.html
@@ -4,16 +4,19 @@ <style> @keyframes test { from { - -webkit-filter: saturate(0); - filter: none; + -webkit-filter: saturate(0.25); + filter: saturate(0.25); } to { - -webkit-filter: saturate(1); - filter: none; + -webkit-filter: saturate(0.75); + filter: saturate(0.75); } } #target { - animation: test 1e10s; + animation: test 1e3s; + height: 100px; + width: 100px; + background: green; } </style> <div id="target"></div>
diff --git a/third_party/WebKit/LayoutTests/virtual/threaded/animations/compositor-independent-transform-cancel.html b/third_party/WebKit/LayoutTests/virtual/threaded/animations/compositor-independent-transform-cancel.html index ff9c4dd..11a7e81c0 100644 --- a/third_party/WebKit/LayoutTests/virtual/threaded/animations/compositor-independent-transform-cancel.html +++ b/third_party/WebKit/LayoutTests/virtual/threaded/animations/compositor-independent-transform-cancel.html
@@ -1,6 +1,13 @@ <!DOCTYPE html> <script src="../../../resources/testharness.js"></script> <script src="../../../resources/testharnessreport.js"></script> +<style> +#parent>div { + width: 100px; + height: 100px; + background-color: green; +} +</style> <div id="parent"></div> <script>
diff --git a/third_party/WebKit/LayoutTests/virtual/threaded/fast/animationworklet/animation-worklet-visual-update-expected.html b/third_party/WebKit/LayoutTests/virtual/threaded/fast/animationworklet/animation-worklet-visual-update-expected.html deleted file mode 100644 index d544dcba1..0000000 --- a/third_party/WebKit/LayoutTests/virtual/threaded/fast/animationworklet/animation-worklet-visual-update-expected.html +++ /dev/null
@@ -1,20 +0,0 @@ -<!DOCTYPE html> -<style> -#box { - width: 100px; - height: 100px; - background-color: #00ff00; - transform: translate(0, 100px); - opacity: 0.5; - will-change: transform; /* force compositing */ -} - -#covered { - width: 100px; - height: 100px; - background-color: #ff8080; -} -</style> - -<div id="box"></div> -<div id="covered"></div>
diff --git a/third_party/WebKit/LayoutTests/virtual/threaded/fast/animationworklet/animation-worklet-animator-animate-expected.txt b/third_party/WebKit/LayoutTests/virtual/threaded/fast/animationworklet/animator-animate-expected.txt similarity index 100% rename from third_party/WebKit/LayoutTests/virtual/threaded/fast/animationworklet/animation-worklet-animator-animate-expected.txt rename to third_party/WebKit/LayoutTests/virtual/threaded/fast/animationworklet/animator-animate-expected.txt
diff --git a/third_party/WebKit/LayoutTests/virtual/threaded/fast/animationworklet/animation-worklet-animator-animate.html b/third_party/WebKit/LayoutTests/virtual/threaded/fast/animationworklet/animator-animate.html similarity index 91% rename from third_party/WebKit/LayoutTests/virtual/threaded/fast/animationworklet/animation-worklet-animator-animate.html rename to third_party/WebKit/LayoutTests/virtual/threaded/fast/animationworklet/animator-animate.html index ad8682d..d22b0fe 100644 --- a/third_party/WebKit/LayoutTests/virtual/threaded/fast/animationworklet/animation-worklet-animator-animate.html +++ b/third_party/WebKit/LayoutTests/virtual/threaded/fast/animationworklet/animator-animate.html
@@ -1,5 +1,11 @@ <!DOCTYPE html> - +<style> +#target { + width: 100px; + height: 100px; + background-color: green; +} +</style> <script id="simple_animate" type="text/worklet"> registerAnimator("test_animator", class { constructor() { @@ -36,4 +42,4 @@ }); } }); -</script> \ No newline at end of file +</script>
diff --git a/third_party/WebKit/LayoutTests/virtual/threaded/fast/animationworklet/animation-worklet-animator-registration-expected.txt b/third_party/WebKit/LayoutTests/virtual/threaded/fast/animationworklet/animator-registration-expected.txt similarity index 100% rename from third_party/WebKit/LayoutTests/virtual/threaded/fast/animationworklet/animation-worklet-animator-registration-expected.txt rename to third_party/WebKit/LayoutTests/virtual/threaded/fast/animationworklet/animator-registration-expected.txt
diff --git a/third_party/WebKit/LayoutTests/virtual/threaded/fast/animationworklet/animation-worklet-animator-registration.html b/third_party/WebKit/LayoutTests/virtual/threaded/fast/animationworklet/animator-registration.html similarity index 100% rename from third_party/WebKit/LayoutTests/virtual/threaded/fast/animationworklet/animation-worklet-animator-registration.html rename to third_party/WebKit/LayoutTests/virtual/threaded/fast/animationworklet/animator-registration.html
diff --git a/third_party/WebKit/LayoutTests/virtual/threaded/fast/animationworklet/animation-worklet-animator-with-options-expected.txt b/third_party/WebKit/LayoutTests/virtual/threaded/fast/animationworklet/animator-with-options-expected.txt similarity index 100% rename from third_party/WebKit/LayoutTests/virtual/threaded/fast/animationworklet/animation-worklet-animator-with-options-expected.txt rename to third_party/WebKit/LayoutTests/virtual/threaded/fast/animationworklet/animator-with-options-expected.txt
diff --git a/third_party/WebKit/LayoutTests/virtual/threaded/fast/animationworklet/animation-worklet-animator-with-options.html b/third_party/WebKit/LayoutTests/virtual/threaded/fast/animationworklet/animator-with-options.html similarity index 93% rename from third_party/WebKit/LayoutTests/virtual/threaded/fast/animationworklet/animation-worklet-animator-with-options.html rename to third_party/WebKit/LayoutTests/virtual/threaded/fast/animationworklet/animator-with-options.html index 6a840790..84903d4 100644 --- a/third_party/WebKit/LayoutTests/virtual/threaded/fast/animationworklet/animation-worklet-animator-with-options.html +++ b/third_party/WebKit/LayoutTests/virtual/threaded/fast/animationworklet/animator-with-options.html
@@ -1,4 +1,11 @@ <!DOCTYPE html> +<style> +#target { + width: 100px; + height: 100px; + background-color: green; +} +</style> <script id="animate_with_options" type="text/worklet"> registerAnimator("test_animator", class {
diff --git a/third_party/WebKit/LayoutTests/virtual/threaded/fast/animationworklet/animation-worklet-scroll-timeline-display-none-expected.html b/third_party/WebKit/LayoutTests/virtual/threaded/fast/animationworklet/scroll-timeline-display-none-expected.html similarity index 100% rename from third_party/WebKit/LayoutTests/virtual/threaded/fast/animationworklet/animation-worklet-scroll-timeline-display-none-expected.html rename to third_party/WebKit/LayoutTests/virtual/threaded/fast/animationworklet/scroll-timeline-display-none-expected.html
diff --git a/third_party/WebKit/LayoutTests/virtual/threaded/fast/animationworklet/animation-worklet-scroll-timeline-display-none.html b/third_party/WebKit/LayoutTests/virtual/threaded/fast/animationworklet/scroll-timeline-display-none.html similarity index 100% rename from third_party/WebKit/LayoutTests/virtual/threaded/fast/animationworklet/animation-worklet-scroll-timeline-display-none.html rename to third_party/WebKit/LayoutTests/virtual/threaded/fast/animationworklet/scroll-timeline-display-none.html
diff --git a/third_party/WebKit/LayoutTests/virtual/threaded/fast/animationworklet/animation-worklet-scroll-timeline-dispose.html b/third_party/WebKit/LayoutTests/virtual/threaded/fast/animationworklet/scroll-timeline-dispose.html similarity index 100% rename from third_party/WebKit/LayoutTests/virtual/threaded/fast/animationworklet/animation-worklet-scroll-timeline-dispose.html rename to third_party/WebKit/LayoutTests/virtual/threaded/fast/animationworklet/scroll-timeline-dispose.html
diff --git a/third_party/WebKit/LayoutTests/virtual/threaded/fast/animationworklet/animation-worklet-scroll-timeline-dynamic-update-expected.html b/third_party/WebKit/LayoutTests/virtual/threaded/fast/animationworklet/scroll-timeline-dynamic-update-expected.html similarity index 100% rename from third_party/WebKit/LayoutTests/virtual/threaded/fast/animationworklet/animation-worklet-scroll-timeline-dynamic-update-expected.html rename to third_party/WebKit/LayoutTests/virtual/threaded/fast/animationworklet/scroll-timeline-dynamic-update-expected.html
diff --git a/third_party/WebKit/LayoutTests/virtual/threaded/fast/animationworklet/animation-worklet-scroll-timeline-dynamic-update.html b/third_party/WebKit/LayoutTests/virtual/threaded/fast/animationworklet/scroll-timeline-dynamic-update.html similarity index 100% rename from third_party/WebKit/LayoutTests/virtual/threaded/fast/animationworklet/animation-worklet-scroll-timeline-dynamic-update.html rename to third_party/WebKit/LayoutTests/virtual/threaded/fast/animationworklet/scroll-timeline-dynamic-update.html
diff --git a/third_party/WebKit/LayoutTests/virtual/threaded/fast/animationworklet/animation-worklet-scroll-timeline-expected.html b/third_party/WebKit/LayoutTests/virtual/threaded/fast/animationworklet/scroll-timeline-expected.html similarity index 100% rename from third_party/WebKit/LayoutTests/virtual/threaded/fast/animationworklet/animation-worklet-scroll-timeline-expected.html rename to third_party/WebKit/LayoutTests/virtual/threaded/fast/animationworklet/scroll-timeline-expected.html
diff --git a/third_party/WebKit/LayoutTests/virtual/threaded/fast/animationworklet/animation-worklet-scroll-timeline-non-compositable-expected.html b/third_party/WebKit/LayoutTests/virtual/threaded/fast/animationworklet/scroll-timeline-non-compositable-expected.html similarity index 100% rename from third_party/WebKit/LayoutTests/virtual/threaded/fast/animationworklet/animation-worklet-scroll-timeline-non-compositable-expected.html rename to third_party/WebKit/LayoutTests/virtual/threaded/fast/animationworklet/scroll-timeline-non-compositable-expected.html
diff --git a/third_party/WebKit/LayoutTests/virtual/threaded/fast/animationworklet/animation-worklet-scroll-timeline-non-compositable.html b/third_party/WebKit/LayoutTests/virtual/threaded/fast/animationworklet/scroll-timeline-non-compositable.html similarity index 100% rename from third_party/WebKit/LayoutTests/virtual/threaded/fast/animationworklet/animation-worklet-scroll-timeline-non-compositable.html rename to third_party/WebKit/LayoutTests/virtual/threaded/fast/animationworklet/scroll-timeline-non-compositable.html
diff --git a/third_party/WebKit/LayoutTests/virtual/threaded/fast/animationworklet/animation-worklet-scroll-timeline-non-scrollable-expected.html b/third_party/WebKit/LayoutTests/virtual/threaded/fast/animationworklet/scroll-timeline-non-scrollable-expected.html similarity index 100% rename from third_party/WebKit/LayoutTests/virtual/threaded/fast/animationworklet/animation-worklet-scroll-timeline-non-scrollable-expected.html rename to third_party/WebKit/LayoutTests/virtual/threaded/fast/animationworklet/scroll-timeline-non-scrollable-expected.html
diff --git a/third_party/WebKit/LayoutTests/virtual/threaded/fast/animationworklet/animation-worklet-scroll-timeline-non-scrollable.html b/third_party/WebKit/LayoutTests/virtual/threaded/fast/animationworklet/scroll-timeline-non-scrollable.html similarity index 100% rename from third_party/WebKit/LayoutTests/virtual/threaded/fast/animationworklet/animation-worklet-scroll-timeline-non-scrollable.html rename to third_party/WebKit/LayoutTests/virtual/threaded/fast/animationworklet/scroll-timeline-non-scrollable.html
diff --git a/third_party/WebKit/LayoutTests/virtual/threaded/fast/animationworklet/animation-worklet-scroll-timeline-overflow-hidden-expected.html b/third_party/WebKit/LayoutTests/virtual/threaded/fast/animationworklet/scroll-timeline-overflow-hidden-expected.html similarity index 100% rename from third_party/WebKit/LayoutTests/virtual/threaded/fast/animationworklet/animation-worklet-scroll-timeline-overflow-hidden-expected.html rename to third_party/WebKit/LayoutTests/virtual/threaded/fast/animationworklet/scroll-timeline-overflow-hidden-expected.html
diff --git a/third_party/WebKit/LayoutTests/virtual/threaded/fast/animationworklet/animation-worklet-scroll-timeline-overflow-hidden.html b/third_party/WebKit/LayoutTests/virtual/threaded/fast/animationworklet/scroll-timeline-overflow-hidden.html similarity index 100% rename from third_party/WebKit/LayoutTests/virtual/threaded/fast/animationworklet/animation-worklet-scroll-timeline-overflow-hidden.html rename to third_party/WebKit/LayoutTests/virtual/threaded/fast/animationworklet/scroll-timeline-overflow-hidden.html
diff --git a/third_party/WebKit/LayoutTests/virtual/threaded/fast/animationworklet/animation-worklet-scroll-timeline-root-scroller-expected.html b/third_party/WebKit/LayoutTests/virtual/threaded/fast/animationworklet/scroll-timeline-root-scroller-expected.html similarity index 100% rename from third_party/WebKit/LayoutTests/virtual/threaded/fast/animationworklet/animation-worklet-scroll-timeline-root-scroller-expected.html rename to third_party/WebKit/LayoutTests/virtual/threaded/fast/animationworklet/scroll-timeline-root-scroller-expected.html
diff --git a/third_party/WebKit/LayoutTests/virtual/threaded/fast/animationworklet/animation-worklet-scroll-timeline-root-scroller.html b/third_party/WebKit/LayoutTests/virtual/threaded/fast/animationworklet/scroll-timeline-root-scroller.html similarity index 100% rename from third_party/WebKit/LayoutTests/virtual/threaded/fast/animationworklet/animation-worklet-scroll-timeline-root-scroller.html rename to third_party/WebKit/LayoutTests/virtual/threaded/fast/animationworklet/scroll-timeline-root-scroller.html
diff --git a/third_party/WebKit/LayoutTests/virtual/threaded/fast/animationworklet/animation-worklet-scroll-timeline.html b/third_party/WebKit/LayoutTests/virtual/threaded/fast/animationworklet/scroll-timeline.html similarity index 100% rename from third_party/WebKit/LayoutTests/virtual/threaded/fast/animationworklet/animation-worklet-scroll-timeline.html rename to third_party/WebKit/LayoutTests/virtual/threaded/fast/animationworklet/scroll-timeline.html
diff --git a/third_party/WebKit/LayoutTests/virtual/threaded/fast/animationworklet/visual-update-expected.html b/third_party/WebKit/LayoutTests/virtual/threaded/fast/animationworklet/visual-update-expected.html index 50c1a0c7..d544dcba1 100644 --- a/third_party/WebKit/LayoutTests/virtual/threaded/fast/animationworklet/visual-update-expected.html +++ b/third_party/WebKit/LayoutTests/virtual/threaded/fast/animationworklet/visual-update-expected.html
@@ -1,46 +1,20 @@ <!DOCTYPE html> -<!-- -Tests that a change from the worker produces a visual update. ---> <style> #box { width: 100px; height: 100px; - /* A composited DIV background is clipped differently from a non-composited - one. This causes the box to be composited in both cases - TODO(majidvp): fix this mismatch between CC and blink rendering - */ - backface-visibility: hidden; -} - -#covered, #green { - width: 85px; - height: 85px; -} - -#box, #covered { - background-color: #ff8080; - overflow: auto; -} - -#green { - position: relative; - left: 100px; - top: 100px; background-color: #00ff00; + transform: translate(0, 100px); + opacity: 0.5; + will-change: transform; /* force compositing */ } +#covered { + width: 100px; + height: 100px; + background-color: #ff8080; +} </style> -<div id="box"> - <div id="green"></div> -</div> +<div id="box"></div> <div id="covered"></div> - -<script> -var box = document.getElementById('box'); -box.style.transform = 'translate(0, 100px)'; -box.style.opacity = 0.5; -box.scrollLeft = 100; -box.scrollTop = 100; -</script>
diff --git a/third_party/WebKit/LayoutTests/virtual/threaded/fast/animationworklet/animation-worklet-visual-update.html b/third_party/WebKit/LayoutTests/virtual/threaded/fast/animationworklet/visual-update.html similarity index 100% rename from third_party/WebKit/LayoutTests/virtual/threaded/fast/animationworklet/animation-worklet-visual-update.html rename to third_party/WebKit/LayoutTests/virtual/threaded/fast/animationworklet/visual-update.html
diff --git a/third_party/WebKit/LayoutTests/virtual/threaded/fast/animationworklet/worklet-animation-currentTime.html b/third_party/WebKit/LayoutTests/virtual/threaded/fast/animationworklet/worklet-animation-currentTime.html index 752e622e..534297f 100644 --- a/third_party/WebKit/LayoutTests/virtual/threaded/fast/animationworklet/worklet-animation-currentTime.html +++ b/third_party/WebKit/LayoutTests/virtual/threaded/fast/animationworklet/worklet-animation-currentTime.html
@@ -1,4 +1,11 @@ <!DOCTYPE html> +<style> +#target { + width: 100px; + height: 100px; + background-color: green; +} +</style> <script id="simple_animate" type="text/worklet"> registerAnimator("test_animator", class { @@ -13,7 +20,7 @@ } }); </script> -<div id="target"></div> +<div id="target" style="will-change: transform, opacity;"></div> <script src="resources/animation-worklet-tests.js"></script> <script> if (window.testRunner) { @@ -36,4 +43,4 @@ }); } }); -</script> \ No newline at end of file +</script>
diff --git a/third_party/WebKit/LayoutTests/virtual/threaded/fast/animationworklet/animation-worklet-start-delay-expected.html b/third_party/WebKit/LayoutTests/virtual/threaded/fast/animationworklet/worklet-animation-start-delay-expected.html similarity index 100% rename from third_party/WebKit/LayoutTests/virtual/threaded/fast/animationworklet/animation-worklet-start-delay-expected.html rename to third_party/WebKit/LayoutTests/virtual/threaded/fast/animationworklet/worklet-animation-start-delay-expected.html
diff --git a/third_party/WebKit/LayoutTests/virtual/threaded/fast/animationworklet/animation-worklet-start-delay.html b/third_party/WebKit/LayoutTests/virtual/threaded/fast/animationworklet/worklet-animation-start-delay.html similarity index 100% rename from third_party/WebKit/LayoutTests/virtual/threaded/fast/animationworklet/animation-worklet-start-delay.html rename to third_party/WebKit/LayoutTests/virtual/threaded/fast/animationworklet/worklet-animation-start-delay.html
diff --git a/third_party/WebKit/LayoutTests/virtual/video-surface-layer/external/wpt/picture-in-picture/idlharness.window-expected.txt b/third_party/WebKit/LayoutTests/virtual/video-surface-layer/external/wpt/picture-in-picture/idlharness.window-expected.txt index 476fea1..d13e73b 100644 --- a/third_party/WebKit/LayoutTests/virtual/video-surface-layer/external/wpt/picture-in-picture/idlharness.window-expected.txt +++ b/third_party/WebKit/LayoutTests/virtual/video-surface-layer/external/wpt/picture-in-picture/idlharness.window-expected.txt
@@ -1,5 +1,5 @@ This is a testharness.js-based test. -PASS picture-in-picture interfaces. +PASS idl_test setup PASS Partial interface HTMLVideoElement: original interface defined PASS Partial interface Document: original interface defined PASS Partial interface DocumentOrShadowRoot: original interface defined
diff --git a/third_party/WebKit/LayoutTests/virtual/webrtc-wpt-unified-plan/external/wpt/webrtc/idlharness.https.window-expected.txt b/third_party/WebKit/LayoutTests/virtual/webrtc-wpt-unified-plan/external/wpt/webrtc/idlharness.https.window-expected.txt index 0dd8fb6..40d5666 100644 --- a/third_party/WebKit/LayoutTests/virtual/webrtc-wpt-unified-plan/external/wpt/webrtc/idlharness.https.window-expected.txt +++ b/third_party/WebKit/LayoutTests/virtual/webrtc-wpt-unified-plan/external/wpt/webrtc/idlharness.https.window-expected.txt
@@ -26,7 +26,7 @@ PASS RTCPeerConnection interface: attribute remoteDescription FAIL RTCPeerConnection interface: attribute currentRemoteDescription assert_true: The prototype object must have a property "currentRemoteDescription" expected true got false FAIL RTCPeerConnection interface: attribute pendingRemoteDescription assert_true: The prototype object must have a property "pendingRemoteDescription" expected true got false -PASS RTCPeerConnection interface: operation addIceCandidate([object Object],[object Object]) +PASS RTCPeerConnection interface: operation addIceCandidate(RTCIceCandidateInit) PASS RTCPeerConnection interface: attribute signalingState PASS RTCPeerConnection interface: attribute iceGatheringState PASS RTCPeerConnection interface: attribute iceConnectionState @@ -47,7 +47,7 @@ PASS RTCPeerConnection interface: operation setLocalDescription(RTCSessionDescriptionInit, VoidFunction, RTCPeerConnectionErrorCallback) PASS RTCPeerConnection interface: operation createAnswer(RTCSessionDescriptionCallback, RTCPeerConnectionErrorCallback) PASS RTCPeerConnection interface: operation setRemoteDescription(RTCSessionDescriptionInit, VoidFunction, RTCPeerConnectionErrorCallback) -PASS RTCPeerConnection interface: operation addIceCandidate([object Object],[object Object], VoidFunction, RTCPeerConnectionErrorCallback) +PASS RTCPeerConnection interface: operation addIceCandidate(RTCIceCandidateInit, VoidFunction, RTCPeerConnectionErrorCallback) PASS RTCPeerConnection interface: operation generateCertificate(AlgorithmIdentifier) PASS RTCPeerConnection interface: operation getSenders() PASS RTCPeerConnection interface: operation getReceivers() @@ -77,8 +77,8 @@ PASS RTCPeerConnection interface: new RTCPeerConnection() must inherit property "remoteDescription" with the proper type FAIL RTCPeerConnection interface: new RTCPeerConnection() must inherit property "currentRemoteDescription" with the proper type assert_inherits: property "currentRemoteDescription" not found in prototype chain FAIL RTCPeerConnection interface: new RTCPeerConnection() must inherit property "pendingRemoteDescription" with the proper type assert_inherits: property "pendingRemoteDescription" not found in prototype chain -PASS RTCPeerConnection interface: new RTCPeerConnection() must inherit property "addIceCandidate([object Object],[object Object])" with the proper type -PASS RTCPeerConnection interface: calling addIceCandidate([object Object],[object Object]) on new RTCPeerConnection() with too few arguments must throw TypeError +PASS RTCPeerConnection interface: new RTCPeerConnection() must inherit property "addIceCandidate(RTCIceCandidateInit)" with the proper type +PASS RTCPeerConnection interface: calling addIceCandidate(RTCIceCandidateInit) on new RTCPeerConnection() with too few arguments must throw TypeError PASS RTCPeerConnection interface: new RTCPeerConnection() must inherit property "signalingState" with the proper type PASS RTCPeerConnection interface: new RTCPeerConnection() must inherit property "iceGatheringState" with the proper type PASS RTCPeerConnection interface: new RTCPeerConnection() must inherit property "iceConnectionState" with the proper type @@ -104,8 +104,8 @@ PASS RTCPeerConnection interface: calling createAnswer(RTCSessionDescriptionCallback, RTCPeerConnectionErrorCallback) on new RTCPeerConnection() with too few arguments must throw TypeError PASS RTCPeerConnection interface: new RTCPeerConnection() must inherit property "setRemoteDescription(RTCSessionDescriptionInit, VoidFunction, RTCPeerConnectionErrorCallback)" with the proper type PASS RTCPeerConnection interface: calling setRemoteDescription(RTCSessionDescriptionInit, VoidFunction, RTCPeerConnectionErrorCallback) on new RTCPeerConnection() with too few arguments must throw TypeError -PASS RTCPeerConnection interface: new RTCPeerConnection() must inherit property "addIceCandidate([object Object],[object Object], VoidFunction, RTCPeerConnectionErrorCallback)" with the proper type -PASS RTCPeerConnection interface: calling addIceCandidate([object Object],[object Object], VoidFunction, RTCPeerConnectionErrorCallback) on new RTCPeerConnection() with too few arguments must throw TypeError +PASS RTCPeerConnection interface: new RTCPeerConnection() must inherit property "addIceCandidate(RTCIceCandidateInit, VoidFunction, RTCPeerConnectionErrorCallback)" with the proper type +PASS RTCPeerConnection interface: calling addIceCandidate(RTCIceCandidateInit, VoidFunction, RTCPeerConnectionErrorCallback) on new RTCPeerConnection() with too few arguments must throw TypeError PASS RTCPeerConnection interface: new RTCPeerConnection() must inherit property "generateCertificate(AlgorithmIdentifier)" with the proper type PASS RTCPeerConnection interface: calling generateCertificate(AlgorithmIdentifier) on new RTCPeerConnection() with too few arguments must throw TypeError PASS RTCPeerConnection interface: new RTCPeerConnection() must inherit property "getSenders()" with the proper type
diff --git a/third_party/WebKit/LayoutTests/webexposed/element-instance-property-listing-expected.txt b/third_party/WebKit/LayoutTests/webexposed/element-instance-property-listing-expected.txt index a08d709..f8491ae9 100644 --- a/third_party/WebKit/LayoutTests/webexposed/element-instance-property-listing-expected.txt +++ b/third_party/WebKit/LayoutTests/webexposed/element-instance-property-listing-expected.txt
@@ -326,7 +326,6 @@ html element abbr html element acronym html element address -html element applet html element area property alt property coords @@ -412,7 +411,6 @@ html element basefont html element bdi html element bdo -html element bgsound html element big html element blockquote property cite @@ -488,7 +486,6 @@ property span property vAlign property width -html element command html element content property getDistributedNodes property select @@ -636,7 +633,6 @@ property src property srcdoc property width -html element image html element img property align property alt @@ -726,7 +722,6 @@ property cite property dateTime html element kbd -html element keygen html element label property control property form
diff --git a/third_party/WebKit/LayoutTests/webexposed/resources/element-instance-property-listing.js b/third_party/WebKit/LayoutTests/webexposed/resources/element-instance-property-listing.js index 8175c7d..b0c2ce9 100644 --- a/third_party/WebKit/LayoutTests/webexposed/resources/element-instance-property-listing.js +++ b/third_party/WebKit/LayoutTests/webexposed/resources/element-instance-property-listing.js
@@ -11,7 +11,7 @@ debug('[' + type.toUpperCase() + ' NAMESPACE ELEMENT PROPERTIES]'); var namespace = internals[type + 'Namespace'](); debug('namespace ' + namespace); - var tags = internals[type + 'Tags'](); + var tags = internals[type + 'Tags']().filter(tag => !(createElement(tag) instanceof HTMLUnknownElement)); var tagProperties = {}; var commonProperties = null; // Will be a map containing the intersection of properties across all elements as keys. tags.forEach(function(tag) {
diff --git a/third_party/android_media/OWNERS b/third_party/android_media/OWNERS index 42175cf1..28f64e5 100644 --- a/third_party/android_media/OWNERS +++ b/third_party/android_media/OWNERS
@@ -1,2 +1,4 @@ -aberent@chromium.org -dgn@chromium.org +mlamouri@chromium.org + +# TEAM: media-dev@chromium.org +# COMPONENT: Internals>Media>UI
diff --git a/third_party/android_sdk/OWNERS b/third_party/android_sdk/OWNERS index 8b49e38a..f2b992a 100644 --- a/third_party/android_sdk/OWNERS +++ b/third_party/android_sdk/OWNERS
@@ -4,8 +4,6 @@ michaelbai@chromium.org primiano@chromium.org rmcilroy@chromium.org -sgurun@chromium.org -shenghuazhang@chromium.org wangxianzhu@chromium.org wnwen@chromium.org -yfriedman@chromium.org \ No newline at end of file +yfriedman@chromium.org
diff --git a/third_party/blink/common/manifest/manifest.cc b/third_party/blink/common/manifest/manifest.cc index ecb51f0..dc5e625 100644 --- a/third_party/blink/common/manifest/manifest.cc +++ b/third_party/blink/common/manifest/manifest.cc
@@ -17,6 +17,10 @@ return src == other.src && type == other.type && sizes == other.sizes; } +Manifest::ShareTargetParams::ShareTargetParams() = default; + +Manifest::ShareTargetParams::~ShareTargetParams() = default; + Manifest::ShareTarget::ShareTarget() = default; Manifest::ShareTarget::~ShareTarget() = default;
diff --git a/third_party/blink/common/manifest/manifest_mojom_traits.cc b/third_party/blink/common/manifest/manifest_mojom_traits.cc index 8dceaf0c..22178e9 100644 --- a/third_party/blink/common/manifest/manifest_mojom_traits.cc +++ b/third_party/blink/common/manifest/manifest_mojom_traits.cc
@@ -137,11 +137,35 @@ return !(out->url.is_empty() && out->id.is_null()); } +bool StructTraits<blink::mojom::ManifestShareTargetParamsDataView, + ::blink::Manifest::ShareTargetParams>:: + Read(blink::mojom::ManifestShareTargetParamsDataView data, + ::blink::Manifest::ShareTargetParams* out) { + TruncatedString16 string; + if (!data.ReadText(&string)) + return false; + out->text = base::NullableString16(std::move(string.string)); + + if (!data.ReadTitle(&string)) + return false; + out->title = base::NullableString16(std::move(string.string)); + + if (!data.ReadUrl(&string)) + return false; + out->url = base::NullableString16(std::move(string.string)); + + return true; +} + bool StructTraits<blink::mojom::ManifestShareTargetDataView, ::blink::Manifest::ShareTarget>:: Read(blink::mojom::ManifestShareTargetDataView data, ::blink::Manifest::ShareTarget* out) { - return data.ReadUrlTemplate(&out->url_template); + if (!data.ReadUrlTemplate(&out->url_template)) + return false; + if (!data.ReadAction(&out->action)) + return false; + return data.ReadParams(&out->params); } } // namespace mojo
diff --git a/third_party/blink/public/BUILD.gn b/third_party/blink/public/BUILD.gn index e289b32..508f22f 100644 --- a/third_party/blink/public/BUILD.gn +++ b/third_party/blink/public/BUILD.gn
@@ -885,17 +885,13 @@ # Blink public API exposes a number of Mojo interfaces; omitting it will # cause non-deterministic compile failures for code that uses the regular # variant of the generated files. - ":core_mojo_bindings__generator", - ":core_mojo_bindings_blink__generator", - ":embedded_frame_sink_mojo_bindings_blink__generator", - ":media_devices_mojo_bindings__generator", - ":media_devices_mojo_bindings_blink__generator", - ":mojo_bindings__generator", - ":mojo_bindings_blink__generator", - "mojom:mojom_core__generator", - "mojom:mojom_core_blink__generator", - "mojom:mojom_platform__generator", - "mojom:mojom_platform_blink__generator", + ":core_mojo_bindings_blink_headers", + ":core_mojo_bindings_headers", + ":embedded_frame_sink_mojo_bindings_blink_headers", + ":media_devices_mojo_bindings_blink_headers", + ":media_devices_mojo_bindings_headers", + ":mojo_bindings_blink_headers", + ":mojo_bindings_headers", ] } @@ -928,7 +924,7 @@ ] deps = [ ":blink_headers", - ":mojo_bindings_shared__generator", + ":mojo_bindings_headers", "//mojo/public/cpp/bindings:struct_traits", ] }
diff --git a/third_party/blink/public/common/manifest/manifest.h b/third_party/blink/public/common/manifest/manifest.h index 00d7622..84caea5 100644 --- a/third_party/blink/public/common/manifest/manifest.h +++ b/third_party/blink/public/common/manifest/manifest.h
@@ -61,6 +61,16 @@ std::vector<Purpose> purpose; }; + // Structure representing a Web Share target's query parameter keys. + struct BLINK_COMMON_EXPORT ShareTargetParams { + ShareTargetParams(); + ~ShareTargetParams(); + + base::NullableString16 title; + base::NullableString16 text; + base::NullableString16 url; + }; + // Structure representing how a Web Share target handles an incoming share. struct BLINK_COMMON_EXPORT ShareTarget { ShareTarget(); @@ -68,7 +78,13 @@ // The URL template that contains placeholders to be replaced with shared // data. Empty if the parsing failed. + // TODO(ckitagawa): Remove this once |action| has replaced it everywhere. GURL url_template; + + // The URL used for sharing. Query parameters are added to this comprised of + // keys from |params| and values from the shared data. + GURL action; + ShareTargetParams params; }; // Structure representing a related application.
diff --git a/third_party/blink/public/common/manifest/manifest_mojom_traits.h b/third_party/blink/public/common/manifest/manifest_mojom_traits.h index a4350bc..c49f80c 100644 --- a/third_party/blink/public/common/manifest/manifest_mojom_traits.h +++ b/third_party/blink/public/common/manifest/manifest_mojom_traits.h
@@ -167,12 +167,40 @@ template <> struct BLINK_COMMON_EXPORT + StructTraits<blink::mojom::ManifestShareTargetParamsDataView, + ::blink::Manifest::ShareTargetParams> { + static const base::Optional<base::StringPiece16> text( + const ::blink::Manifest::ShareTargetParams& share_target_params) { + return internal::TruncateNullableString16(share_target_params.text); + } + static const base::Optional<base::StringPiece16> title( + const ::blink::Manifest::ShareTargetParams& share_target_params) { + return internal::TruncateNullableString16(share_target_params.title); + } + static const base::Optional<base::StringPiece16> url( + const ::blink::Manifest::ShareTargetParams& share_target_params) { + return internal::TruncateNullableString16(share_target_params.url); + } + static bool Read(blink::mojom::ManifestShareTargetParamsDataView data, + ::blink::Manifest::ShareTargetParams* out); +}; + +template <> +struct BLINK_COMMON_EXPORT StructTraits<blink::mojom::ManifestShareTargetDataView, ::blink::Manifest::ShareTarget> { static const GURL& url_template( const ::blink::Manifest::ShareTarget& share_target) { return share_target.url_template; } + static const GURL& action( + const ::blink::Manifest::ShareTarget& share_target) { + return share_target.action; + } + static const ::blink::Manifest::ShareTargetParams& params( + const ::blink::Manifest::ShareTarget& share_target) { + return share_target.params; + } static bool Read(blink::mojom::ManifestShareTargetDataView data, ::blink::Manifest::ShareTarget* out); };
diff --git a/third_party/blink/public/mojom/BUILD.gn b/third_party/blink/public/mojom/BUILD.gn index a21665f..5cb13269 100644 --- a/third_party/blink/public/mojom/BUILD.gn +++ b/third_party/blink/public/mojom/BUILD.gn
@@ -25,6 +25,7 @@ "feature_policy/feature_policy.mojom", "fetch/fetch_api_response.mojom", "file/file_utilities.mojom", + "filesystem/file_system.mojom", "frame/find_in_page.mojom", "leak_detector/leak_detector.mojom", "loader/navigation_predictor.mojom", @@ -61,6 +62,7 @@ public_deps = [ ":speech_recognition_error_code", + "//components/services/filesystem/public/interfaces", "//mojo/public/mojom/base", "//services/device/public/mojom", "//services/network/public/mojom",
diff --git a/third_party/blink/public/mojom/filesystem/OWNERS b/third_party/blink/public/mojom/filesystem/OWNERS new file mode 100644 index 0000000..4de3ede8 --- /dev/null +++ b/third_party/blink/public/mojom/filesystem/OWNERS
@@ -0,0 +1,7 @@ +file://third_party/blink/renderer/modules/filesystem/OWNERS + +per-file *.mojom=set noparent +per-file *.mojom=file://ipc/SECURITY_OWNERS + +# TEAM: storage-dev@chromium.org +# COMPONENT: Blink>Storage>FileSystem
diff --git a/third_party/blink/public/mojom/filesystem/file_system.mojom b/third_party/blink/public/mojom/filesystem/file_system.mojom new file mode 100644 index 0000000..2b060977 --- /dev/null +++ b/third_party/blink/public/mojom/filesystem/file_system.mojom
@@ -0,0 +1,182 @@ +// 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. + +module blink.mojom; + +import "components/services/filesystem/public/interfaces/types.mojom"; +import "url/mojom/url.mojom"; +import "mojo/public/mojom/base/file_error.mojom"; +import "mojo/public/mojom/base/file_path.mojom"; +import "mojo/public/mojom/base/file_info.mojom"; +import "mojo/public/mojom/base/time.mojom"; + +enum FileSystemType { + kTemporary, + kPersistent, + kIsolated, + kExternal +}; + +struct FileSystemInfo { + string name; + url.mojom.Url root_url; + FileSystemType mount_type = kTemporary; +}; + +// Interface for renderers to cancel running file system operations. A +// FileSystemCancellableOperationRequest is passed as a parameter for any +// operation that can be cancelled. +interface FileSystemCancellableOperation { + // Cancels the associated operation. It may not always be possible to cancel + // an operation, and partial writes are possible. |error_code| indicates if + // the operation was successfully canceled. + Cancel() => (mojo_base.mojom.FileError error_code); +}; + +// Operations that need to repeatedly call a particular callback use this +// interface. For example, the Write operation needs to call DidWrite +// repeatedly, and uses a FileSystemOperationListenerPtr passed from the +// renderer to call it. +// Note: For operations that only need a callback called once, we can directly +// use mojo return value callbacks. +interface FileSystemOperationListener { + // Called by ReadDirectory when entries have been obtained. |has_more| is + // false when all the entries are obtained, and indicates that the callback + // will not be called again. + ResultsRetrieved(array<filesystem.mojom.DirectoryEntry> entries, + bool has_more); + + // Called repeatedly by Write to indicate progress. If |complete| is true, + // the operation is complete and the callback will not be called again. + DidWrite(int64 byte_count, bool complete); + + // Called by all operations that use a listener to indicate an error. No + // other listener callbacks will be called after this. + ErrorOccurred(mojo_base.mojom.FileError error_code); +}; + +// Used by the renderer to notify the browser that it has received a snapshot +// after calling CreateSnapshotFile. The browser sends an interface ptr along +// with the result of the CreateSnapshotFile call. +interface ReceivedSnapshotListener { + DidReceiveSnapshotFile(); +}; + +// Interface provided by the browser to the renderer to carry out filesystem +// operations. +interface FileSystemManager { + // Opens a new filesystem and returns a name and root path for the requested + // filesystem and a success error code if the operation succeeds. If the + // operation fails, |error_code| indicates the reason for failure. + // TODO(https://crbug.com/873661): Make interface per frame/worker and remove + // |origin_url|. + Open(url.mojom.Url origin_url, blink.mojom.FileSystemType file_system_type) => + (string name, + url.mojom.Url root_url, + mojo_base.mojom.FileError error_code); + + // Resolves a filesystem URL and returns the filesystem information and + // metadata (file path and type) if the operation is successful. |error_code| + // indicates the reason for failure if the operation fails. + ResolveURL(url.mojom.Url filesystem_url) => + (FileSystemInfo info, + mojo_base.mojom.FilePath file_path, + bool is_directory, + mojo_base.mojom.FileError error_code); + + // Moves a file or directory at |src_path| to |dest_path|. Returns + // |error_code| after completion to indicate if the operation succeeded or + // failed. + Move(url.mojom.Url src_path, url.mojom.Url dest_path) => + (mojo_base.mojom.FileError error_code); + + // Copies a file or directory at |src_path| to |dest_path|. Returns + // |error_code| after completion to indicate if the operation succeeded or + // failed. + Copy(url.mojom.Url src_path, url.mojom.Url dest_path) => + (mojo_base.mojom.FileError error_code); + + // Deletes a file or directory at the given |path|. To delete recursively, set + // |recursive| to true. Returns |error_code| after completion to indicate if + // the operation succeeded or failed. + Remove(url.mojom.Url path, bool recursive) => + (mojo_base.mojom.FileError error_code); + + // Retrieves the metadata information of the file or directory at the given + // |path|. This may not always return the local platform path in remote + // filesystem cases. Returns valid metadata if the retrieval is successful, + // and uses |error_code| to indicate if the operation was successful. + ReadMetadata(url.mojom.Url path) => + (mojo_base.mojom.FileInfo file_info, + mojo_base.mojom.FileError error_code); + + // Creates a file or directory at the given |path| (based on |is_directory|). + // If |exclusive| is true, the operation fails if the |path| already exists. + // Returns |error_code| after completion to indicate if the operation + // succeeded or failed. + Create(url.mojom.Url path, + bool exclusive, + bool is_directory, + bool recursive) => + (mojo_base.mojom.FileError error_code); + + // Checks if a file exists at the given |path| if |is_directory| is false or + // checks if a directory exists at the given |path| otherwise. Returns + // |error_code| to indicate if the file was successfully found or if an error + // occurred. + Exists(url.mojom.Url path, bool is_directory) => + (mojo_base.mojom.FileError error_code); + + // Reads directory entries of a given directory at |path|. Calls + // ResultsRetrieved on |listener| when results are ready, or ErrorOccurred + // if the operation fails. + ReadDirectory(url.mojom.Url path, FileSystemOperationListener listener); + + // Write data (indicated by |blob_uuid|) to the given file at |file_path|, + // at |position|. Calls DidWrite on |listener| to provide progress updates on + // the write, and |ErrorOccurred| if the operation fails. The operation can + // also be cancelled using the interface ptr associated with |op_request|. + Write(url.mojom.Url file_path, + string blob_uuid, + int64 position, + FileSystemCancellableOperation& op_request, + FileSystemOperationListener listener); + + // Changes the file length of the file at |file_path| to the |length| + // indicated. Returns |error_code| after completion to indicate if the + // operation succeeded or failed. The operation can also be cancelled using + // the interface ptr associated with |op_request|. + Truncate(url.mojom.Url file_path, + int64 length, + FileSystemCancellableOperation& op_request) => + (mojo_base.mojom.FileError error_code); + + TouchFile(url.mojom.Url path, + mojo_base.mojom.Time last_access_time, + mojo_base.mojom.Time last_modified_time) => + (mojo_base.mojom.FileError error_code); + + // Creates a snapshot file for a given file specified by |file_path|. Returns + // the metadata of the created snapshot file, which also includes a local + // platform path to the snapshot image (|platform_path|). + // + // In local filesystem cases the backend may simply return the metadata of the + // file itself (exactly like ReadMetadata would), while in remote filesystem + // cases, the backend may download the file into a temporary snapshot file and + // return the metadata of the temporary file. + // + // If |snapshot_listener| is provided, the renderer is expected to call + // DidReceiveSnapshotFile on the listener (which allows the backend to drop + // a ref to the temporary snapshot file). + CreateSnapshotFile(url.mojom.Url file_path) => + (mojo_base.mojom.FileInfo file_info, + mojo_base.mojom.FilePath platform_path, + mojo_base.mojom.FileError error_code, + ReceivedSnapshotListener? snapshot_listener); + + // Synchronously gets the platform path for the given |file_path|. + [Sync] + GetPlatformPath(url.mojom.Url file_path) => + (mojo_base.mojom.FilePath platform_path); +};
diff --git a/third_party/blink/public/mojom/manifest/manifest.mojom b/third_party/blink/public/mojom/manifest/manifest.mojom index 3a79ab2..261ae2a 100644 --- a/third_party/blink/public/mojom/manifest/manifest.mojom +++ b/third_party/blink/public/mojom/manifest/manifest.mojom
@@ -97,11 +97,25 @@ mojo_base.mojom.String16? id; }; + +// Structure representing how a Web Share target fills query parameters of an +// incoming share. These fields contain the names of the query parameters that +// will hold the value of the corresponding share data. +struct ManifestShareTargetParams { + mojo_base.mojom.String16? title; + mojo_base.mojom.String16? text; + mojo_base.mojom.String16? url; +}; + // Structure representing how a Web Share target handles an incoming share. struct ManifestShareTarget { // The URL template that contains placeholders to be replaced with shared // data. Empty if the parsing failed. + // TODO(ckitagawa): Remove this once it is replaced by |action| everywhere. url.mojom.Url? url_template; + // The URL that will be opened when the share target is invoked. + url.mojom.Url? action; + ManifestShareTargetParams params; }; // Debug information for a parsed manifest.
diff --git a/third_party/blink/public/platform/modules/cache_storage/cache_storage.mojom b/third_party/blink/public/platform/modules/cache_storage/cache_storage.mojom index 67c1693..a4f092e 100644 --- a/third_party/blink/public/platform/modules/cache_storage/cache_storage.mojom +++ b/third_party/blink/public/platform/modules/cache_storage/cache_storage.mojom
@@ -21,6 +21,7 @@ kErrorQueryTooLarge = 6, // TODO(cmumford): kErrorNotImplemented is deprecated. Remove use in code. kErrorNotImplemented = 7, + kErrorDuplicateOperation = 8, // Add new values here. };
diff --git a/third_party/blink/public/platform/modules/webauthn/authenticator.mojom b/third_party/blink/public/platform/modules/webauthn/authenticator.mojom index dfa4909..435889a55 100644 --- a/third_party/blink/public/platform/modules/webauthn/authenticator.mojom +++ b/third_party/blink/public/platform/modules/webauthn/authenticator.mojom
@@ -266,6 +266,8 @@ USB, NFC, BLE, + CABLE, + INTERNAL, }; // Interface to direct authenticators to create or use a public key credential.
diff --git a/third_party/blink/public/platform/reporting.mojom b/third_party/blink/public/platform/reporting.mojom index 398f821..c9e9127 100644 --- a/third_party/blink/public/platform/reporting.mojom +++ b/third_party/blink/public/platform/reporting.mojom
@@ -45,4 +45,15 @@ string? source_file, int32 status_code, string script_sample); + + // Attempts to queue a Feature Policy violation report using the Reporting API. + // + // (See //third_party/blink/renderer/core/frame/feature_policy_violation_report_body.h.) + QueueFeaturePolicyViolationReport(url.mojom.Url url, + string policy, + string message, + string? source_file, + int32 line_number, + int32 column_number); + };
diff --git a/third_party/blink/public/platform/web_feature.mojom b/third_party/blink/public/platform/web_feature.mojom index 21160770..1beafa7 100644 --- a/third_party/blink/public/platform/web_feature.mojom +++ b/third_party/blink/public/platform/web_feature.mojom
@@ -17,7 +17,6 @@ kOBSOLETE_PageDestruction = 0, kWorkerStart = 4, kSharedWorkerStart = 5, - kUnprefixedIndexedDB = 9, kOpenWebDatabase = 10, kUnprefixedRequestAnimationFrame = 13, kPrefixedRequestAnimationFrame = 14, @@ -1981,6 +1980,7 @@ kPPAPIWebSocket = 2524, kV8MediaStreamTrack_ContentHint_AttributeGetter = 2525, kV8MediaStreamTrack_ContentHint_AttributeSetter = 2526, + kV8IDBFactory_Open_Method = 2527, // Add new features immediately above this line. Don't change assigned // numbers of any item, and don't reuse removed slots.
diff --git a/third_party/blink/public/platform/web_runtime_features.h b/third_party/blink/public/platform/web_runtime_features.h index 46daddce..a11781d 100644 --- a/third_party/blink/public/platform/web_runtime_features.h +++ b/third_party/blink/public/platform/web_runtime_features.h
@@ -124,6 +124,8 @@ BLINK_PLATFORM_EXPORT static void EnablePageLifecycle(bool); BLINK_PLATFORM_EXPORT static void EnablePagePopup(bool); BLINK_PLATFORM_EXPORT static void EnablePassiveDocumentEventListeners(bool); + BLINK_PLATFORM_EXPORT static void EnablePassiveDocumentWheelEventListeners( + bool); BLINK_PLATFORM_EXPORT static void EnablePaymentApp(bool); BLINK_PLATFORM_EXPORT static void EnablePaymentRequest(bool); BLINK_PLATFORM_EXPORT static void EnablePermissionsAPI(bool);
diff --git a/third_party/blink/public/web/modules/service_worker/web_service_worker_context_client.h b/third_party/blink/public/web/modules/service_worker/web_service_worker_context_client.h index 2706d71a..fddb9e1 100644 --- a/third_party/blink/public/web/modules/service_worker/web_service_worker_context_client.h +++ b/third_party/blink/public/web/modules/service_worker/web_service_worker_context_client.h
@@ -186,9 +186,10 @@ int event_id, mojom::ServiceWorkerEventStatus, double event_dispatch_time) {} - virtual void DidHandleBackgroundFetchedEvent(int event_id, - mojom::ServiceWorkerEventStatus, - double event_dispatch_time) {} + virtual void DidHandleBackgroundFetchSuccessEvent( + int event_id, + mojom::ServiceWorkerEventStatus, + double event_dispatch_time) {} // Called after 'cookiechange' events are handled by the service worker. virtual void DidHandleCookieChangeEvent(int event_id,
diff --git a/third_party/blink/public/web/modules/service_worker/web_service_worker_context_proxy.h b/third_party/blink/public/web/modules/service_worker/web_service_worker_context_proxy.h index 5885715..d365482 100644 --- a/third_party/blink/public/web/modules/service_worker/web_service_worker_context_proxy.h +++ b/third_party/blink/public/web/modules/service_worker/web_service_worker_context_proxy.h
@@ -72,18 +72,17 @@ virtual void DispatchBackgroundFetchAbortEvent( int event_id, const WebString& developer_id, - const WebString& unique_id, - const WebVector<WebBackgroundFetchSettledFetch>& fetches) = 0; + const WebString& unique_id) = 0; virtual void DispatchBackgroundFetchClickEvent( int event_id, const WebString& developer_id, - BackgroundFetchState status) = 0; + const WebString& unique_id) = 0; virtual void DispatchBackgroundFetchFailEvent( int event_id, const WebString& developer_id, const WebString& unique_id, const WebVector<WebBackgroundFetchSettledFetch>& fetches) = 0; - virtual void DispatchBackgroundFetchedEvent( + virtual void DispatchBackgroundFetchSuccessEvent( int event_id, const WebString& developer_id, const WebString& unique_id,
diff --git a/third_party/blink/renderer/bindings/bindings.gni b/third_party/blink/renderer/bindings/bindings.gni index cf10f506..b192bff 100644 --- a/third_party/blink/renderer/bindings/bindings.gni +++ b/third_party/blink/renderer/bindings/bindings.gni
@@ -198,6 +198,7 @@ "core/v8/script_promise_test.cc", "core/v8/script_streamer_test.cc", "core/v8/script_wrappable_marking_visitor_test.cc", + "core/v8/script_wrappable_v8_gc_integration_test.cc", "core/v8/script_wrappable_visitor_test.cc", "core/v8/to_v8_test.cc", "core/v8/trace_wrapper_member_test.cc",
diff --git a/third_party/blink/renderer/bindings/core/v8/script_event_listener.cc b/third_party/blink/renderer/bindings/core/v8/script_event_listener.cc index c0f3e47..3450578 100644 --- a/third_party/blink/renderer/bindings/core/v8/script_event_listener.cc +++ b/third_party/blink/renderer/bindings/core/v8/script_event_listener.cc
@@ -33,12 +33,11 @@ #include "third_party/blink/renderer/bindings/core/v8/scheduled_action.h" #include "third_party/blink/renderer/bindings/core/v8/script_controller.h" #include "third_party/blink/renderer/bindings/core/v8/source_location.h" -#include "third_party/blink/renderer/bindings/core/v8/v8_abstract_event_listener.h" #include "third_party/blink/renderer/bindings/core/v8/v8_binding_for_core.h" +#include "third_party/blink/renderer/bindings/core/v8/v8_lazy_event_listener.h" #include "third_party/blink/renderer/bindings/core/v8/window_proxy.h" #include "third_party/blink/renderer/core/dom/document.h" #include "third_party/blink/renderer/core/dom/document_parser.h" -#include "third_party/blink/renderer/core/dom/events/event_listener.h" #include "third_party/blink/renderer/core/dom/qualified_name.h" #include "third_party/blink/renderer/core/frame/local_frame.h" #include "third_party/blink/renderer/platform/bindings/script_state.h" @@ -46,7 +45,7 @@ namespace blink { -V8LazyEventListener* CreateAttributeEventListener( +EventListener* CreateAttributeEventListener( Node* node, const QualifiedName& name, const AtomicString& value, @@ -74,7 +73,7 @@ isolate); } -V8LazyEventListener* CreateAttributeEventListener( +EventListener* CreateAttributeEventListener( LocalFrame* frame, const QualifiedName& name, const AtomicString& value,
diff --git a/third_party/blink/renderer/bindings/core/v8/script_event_listener.h b/third_party/blink/renderer/bindings/core/v8/script_event_listener.h index 2ce7ca60..f55adff 100644 --- a/third_party/blink/renderer/bindings/core/v8/script_event_listener.h +++ b/third_party/blink/renderer/bindings/core/v8/script_event_listener.h
@@ -33,23 +33,20 @@ #include <memory> -#include "third_party/blink/renderer/bindings/core/v8/v8_lazy_event_listener.h" +#include "third_party/blink/renderer/core/dom/events/event_listener.h" namespace blink { -class EventListener; -class ExecutionContext; class LocalFrame; -class Node; class QualifiedName; class SourceLocation; -V8LazyEventListener* CreateAttributeEventListener( +EventListener* CreateAttributeEventListener( Node*, const QualifiedName&, const AtomicString& value, const AtomicString& event_parameter_name); -V8LazyEventListener* CreateAttributeEventListener( +EventListener* CreateAttributeEventListener( LocalFrame*, const QualifiedName&, const AtomicString& value,
diff --git a/third_party/blink/renderer/bindings/core/v8/script_function.cc b/third_party/blink/renderer/bindings/core/v8/script_function.cc index 47dad5b..f9f16efb 100644 --- a/third_party/blink/renderer/bindings/core/v8/script_function.cc +++ b/third_party/blink/renderer/bindings/core/v8/script_function.cc
@@ -5,6 +5,7 @@ #include "third_party/blink/renderer/bindings/core/v8/script_function.h" #include "third_party/blink/renderer/platform/bindings/v8_binding.h" +#include "third_party/blink/renderer/platform/wtf/assertions.h" namespace blink { @@ -26,6 +27,16 @@ .ToLocalChecked(); } +ScriptValue ScriptFunction::Call(ScriptValue) { + NOTREACHED(); + return ScriptValue(); +} + +void ScriptFunction::CallRaw(const v8::FunctionCallbackInfo<v8::Value>& args) { + ScriptValue result = Call(ScriptValue(GetScriptState(), args[0])); + V8SetReturnValue(args, result.V8Value()); +} + void ScriptFunction::CallCallback( const v8::FunctionCallbackInfo<v8::Value>& args) { DCHECK(args.Data()->IsExternal()); @@ -33,9 +44,7 @@ "Blink_CallCallback"); ScriptFunction* script_function = static_cast<ScriptFunction*>( v8::Local<v8::External>::Cast(args.Data())->Value()); - ScriptValue result = script_function->Call( - ScriptValue(script_function->GetScriptState(), args[0])); - V8SetReturnValue(args, result.V8Value()); + script_function->CallRaw(args); } } // namespace blink
diff --git a/third_party/blink/renderer/bindings/core/v8/script_function.h b/third_party/blink/renderer/bindings/core/v8/script_function.h index 54c3055..ef0ebb9e 100644 --- a/third_party/blink/renderer/bindings/core/v8/script_function.h +++ b/third_party/blink/renderer/bindings/core/v8/script_function.h
@@ -41,14 +41,13 @@ // A common way of using ScriptFunction is as follows: // // class DerivedFunction : public ScriptFunction { -// // This returns a V8 function which the DerivedFunction is bound to. -// // The DerivedFunction is destructed when the V8 function is -// // garbage-collected. -// static v8::Local<v8::Function> createFunction(ScriptState* scriptState) -// { -// DerivedFunction* self = new DerivedFunction(scriptState); -// return self->bindToV8Function(); -// } +// // This returns a V8 function which the DerivedFunction is bound to. +// // The DerivedFunction is destroyed when the V8 function is +// // garbage-collected. +// static v8::Local<v8::Function> CreateFunction(ScriptState* script_state) { +// DerivedFunction* self = new DerivedFunction(script_state); +// return self->BindToV8Function(); +// } // }; class CORE_EXPORT ScriptFunction : public GarbageCollectedFinalized<ScriptFunction> { @@ -65,7 +64,14 @@ v8::Local<v8::Function> BindToV8Function(); private: - virtual ScriptValue Call(ScriptValue) = 0; + // Subclasses should implement one of Call() or CallRaw(). Most will implement + // Call(). + virtual ScriptValue Call(ScriptValue); + + // To support more than one argument, or for low-level access to the V8 API, + // implement CallRaw(). The default implementation delegates to Call(). + virtual void CallRaw(const v8::FunctionCallbackInfo<v8::Value>&); + static void CallCallback(const v8::FunctionCallbackInfo<v8::Value>&); Member<ScriptState> script_state_;
diff --git a/third_party/blink/renderer/bindings/core/v8/script_wrappable_marking_visitor_test.cc b/third_party/blink/renderer/bindings/core/v8/script_wrappable_marking_visitor_test.cc index 8433fcd..cf23a90d 100644 --- a/third_party/blink/renderer/bindings/core/v8/script_wrappable_marking_visitor_test.cc +++ b/third_party/blink/renderer/bindings/core/v8/script_wrappable_marking_visitor_test.cc
@@ -16,250 +16,41 @@ namespace blink { -static void PreciselyCollectGarbage() { - ThreadState::Current()->CollectAllGarbage(); -} - -static void RunV8Scavenger(v8::Isolate* isolate) { - V8GCController::CollectGarbage(isolate, true); -} - -static void RunV8FullGc(v8::Isolate* isolate) { - V8GCController::CollectGarbage(isolate, false); -} - -TEST(ScriptWrappableMarkingVisitorTest, - ScriptWrappableMarkingVisitorTracesWrappers) { - V8TestingScope scope; - ScriptWrappableMarkingVisitor* visitor = - V8PerIsolateData::From(scope.GetIsolate()) - ->GetScriptWrappableMarkingVisitor(); - DeathAwareScriptWrappable* target = DeathAwareScriptWrappable::Create(); - DeathAwareScriptWrappable* dependency = DeathAwareScriptWrappable::Create(); - target->SetWrappedDependency(dependency); - - // The graph needs to be set up before starting tracing as otherwise the - // conservative write barrier would trigger. - visitor->TracePrologue(); - - HeapObjectHeader* target_header = HeapObjectHeader::FromPayload(target); - HeapObjectHeader* dependency_header = - HeapObjectHeader::FromPayload(dependency); - - EXPECT_TRUE(visitor->MarkingDeque()->IsEmpty()); - EXPECT_FALSE(target_header->IsWrapperHeaderMarked()); - EXPECT_FALSE(dependency_header->IsWrapperHeaderMarked()); - - std::pair<void*, void*> pair = std::make_pair( - const_cast<WrapperTypeInfo*>(target->GetWrapperTypeInfo()), target); - visitor->RegisterV8Reference(pair); - EXPECT_EQ(visitor->MarkingDeque()->size(), 1ul); - - visitor->AdvanceTracing( - 0, v8::EmbedderHeapTracer::AdvanceTracingActions( - v8::EmbedderHeapTracer::ForceCompletionAction::FORCE_COMPLETION)); - EXPECT_EQ(visitor->MarkingDeque()->size(), 0ul); - EXPECT_TRUE(target_header->IsWrapperHeaderMarked()); - EXPECT_TRUE(dependency_header->IsWrapperHeaderMarked()); - - visitor->AbortTracing(); -} - -TEST(ScriptWrappableMarkingVisitorTest, - OilpanCollectObjectsNotReachableFromV8) { - V8TestingScope scope; - v8::Isolate* isolate = scope.GetIsolate(); - - { - v8::HandleScope handle_scope(isolate); - DeathAwareScriptWrappable* object = DeathAwareScriptWrappable::Create(); - DeathAwareScriptWrappable::ObserveDeathsOf(object); - - // Creates new V8 wrapper and associates it with global scope - ToV8(object, scope.GetContext()->Global(), isolate); - } - - RunV8Scavenger(isolate); - RunV8FullGc(isolate); - PreciselyCollectGarbage(); - - EXPECT_TRUE(DeathAwareScriptWrappable::HasDied()); -} - -TEST(ScriptWrappableMarkingVisitorTest, - OilpanDoesntCollectObjectsReachableFromV8) { - V8TestingScope scope; - v8::Isolate* isolate = scope.GetIsolate(); - v8::HandleScope handle_scope(isolate); - DeathAwareScriptWrappable* object = DeathAwareScriptWrappable::Create(); - DeathAwareScriptWrappable::ObserveDeathsOf(object); - - // Creates new V8 wrapper and associates it with global scope - ToV8(object, scope.GetContext()->Global(), isolate); - - RunV8Scavenger(isolate); - RunV8FullGc(isolate); - PreciselyCollectGarbage(); - - EXPECT_FALSE(DeathAwareScriptWrappable::HasDied()); -} - -TEST(ScriptWrappableMarkingVisitorTest, V8ReportsLiveObjectsDuringScavenger) { - V8TestingScope scope; - v8::Isolate* isolate = scope.GetIsolate(); - v8::HandleScope handle_scope(isolate); - DeathAwareScriptWrappable* object = DeathAwareScriptWrappable::Create(); - DeathAwareScriptWrappable::ObserveDeathsOf(object); - - v8::Local<v8::Value> wrapper = - ToV8(object, scope.GetContext()->Global(), isolate); - EXPECT_TRUE(wrapper->IsObject()); - v8::Local<v8::Object> wrapper_object = - wrapper->ToObject(scope.GetContext()).ToLocalChecked(); - // V8 collects wrappers with unmodified maps (as they can be recreated - // without loosing any data if needed). We need to create some property on - // wrapper so V8 will not see it as unmodified. - EXPECT_TRUE(wrapper_object->CreateDataProperty(scope.GetContext(), 1, wrapper) - .IsJust()); - - RunV8Scavenger(isolate); - PreciselyCollectGarbage(); - - EXPECT_FALSE(DeathAwareScriptWrappable::HasDied()); -} - -TEST(ScriptWrappableMarkingVisitorTest, V8ReportsLiveObjectsDuringFullGc) { - V8TestingScope scope; - v8::Isolate* isolate = scope.GetIsolate(); - v8::HandleScope handle_scope(isolate); - DeathAwareScriptWrappable* object = DeathAwareScriptWrappable::Create(); - DeathAwareScriptWrappable::ObserveDeathsOf(object); - - ToV8(object, scope.GetContext()->Global(), isolate); - - RunV8Scavenger(isolate); - RunV8FullGc(isolate); - PreciselyCollectGarbage(); - - EXPECT_FALSE(DeathAwareScriptWrappable::HasDied()); -} - -TEST(ScriptWrappableMarkingVisitorTest, OilpanClearsHeadersWhenObjectDied) { - V8TestingScope scope; - - DeathAwareScriptWrappable* object = DeathAwareScriptWrappable::Create(); - ScriptWrappableMarkingVisitor* visitor = - V8PerIsolateData::From(scope.GetIsolate()) - ->GetScriptWrappableMarkingVisitor(); - visitor->TracePrologue(); - auto* header = HeapObjectHeader::FromPayload(object); - visitor->headers_to_unmark_.push_back(header); - - PreciselyCollectGarbage(); - - EXPECT_FALSE(visitor->headers_to_unmark_.Contains(header)); - visitor->AbortTracing(); -} - -TEST(ScriptWrappableMarkingVisitorTest, - OilpanClearsMarkingDequeWhenObjectDied) { - V8TestingScope scope; - - DeathAwareScriptWrappable* object = DeathAwareScriptWrappable::Create(); - ScriptWrappableMarkingVisitor* visitor = - V8PerIsolateData::From(scope.GetIsolate()) - ->GetScriptWrappableMarkingVisitor(); - visitor->TracePrologue(); - - visitor->TraceWithWrappers(object); - - EXPECT_EQ(visitor->MarkingDeque()->front().RawObjectPointer(), object); - - PreciselyCollectGarbage(); - - EXPECT_EQ(visitor->MarkingDeque()->front().RawObjectPointer(), nullptr); - - visitor->AbortTracing(); -} - -TEST(ScriptWrappableMarkingVisitorTest, - MarkedObjectDoesNothingOnWriteBarrierHitWhenDependencyIsMarkedToo) { - V8TestingScope scope; - - ScriptWrappableMarkingVisitor* visitor = - V8PerIsolateData::From(scope.GetIsolate()) - ->GetScriptWrappableMarkingVisitor(); - visitor->TracePrologue(); - - DeathAwareScriptWrappable* target = DeathAwareScriptWrappable::Create(); - DeathAwareScriptWrappable* dependencies[] = { - DeathAwareScriptWrappable::Create(), DeathAwareScriptWrappable::Create(), - DeathAwareScriptWrappable::Create(), DeathAwareScriptWrappable::Create()}; - - HeapObjectHeader::FromPayload(target)->MarkWrapperHeader(); - for (int i = 0; i < 4; i++) { - HeapObjectHeader::FromPayload(dependencies[i])->MarkWrapperHeader(); - } - - EXPECT_TRUE(visitor->MarkingDeque()->IsEmpty()); - - target->SetWrappedDependency(dependencies[0]); - target->AddWrappedVectorDependency(dependencies[1]); - target->AddWrappedHashMapDependency(dependencies[2], dependencies[3]); - - EXPECT_TRUE(visitor->MarkingDeque()->IsEmpty()); - visitor->AbortTracing(); -} - -TEST(ScriptWrappableMarkingVisitorTest, - MarkedObjectMarksDependencyOnWriteBarrierHitWhenNotMarked) { - V8TestingScope scope; - - ScriptWrappableMarkingVisitor* visitor = - V8PerIsolateData::From(scope.GetIsolate()) - ->GetScriptWrappableMarkingVisitor(); - visitor->TracePrologue(); - - DeathAwareScriptWrappable* target = DeathAwareScriptWrappable::Create(); - DeathAwareScriptWrappable* dependencies[] = { - DeathAwareScriptWrappable::Create(), DeathAwareScriptWrappable::Create(), - DeathAwareScriptWrappable::Create(), DeathAwareScriptWrappable::Create()}; - - HeapObjectHeader::FromPayload(target)->MarkWrapperHeader(); - - EXPECT_TRUE(visitor->MarkingDeque()->IsEmpty()); - - target->SetWrappedDependency(dependencies[0]); - target->AddWrappedVectorDependency(dependencies[1]); - target->AddWrappedHashMapDependency(dependencies[2], dependencies[3]); - - for (int i = 0; i < 4; i++) { - EXPECT_TRUE(visitor->MarkingDequeContains(dependencies[i])); - } - - visitor->AbortTracing(); -} - namespace { -class HandleContainer - : public blink::GarbageCollectedFinalized<HandleContainer> { +// Temporarily swaps out the underlying ScriptWrappableMarkingVisitor from a +// given v8::Isolate. Gracefully finalized potentially running garbage +// collections. +class TemporaryScriptWrappableVisitorScope { + WTF_MAKE_NONCOPYABLE(TemporaryScriptWrappableVisitorScope); + STACK_ALLOCATED(); + public: - static HandleContainer* Create() { return new HandleContainer(); } - virtual ~HandleContainer() = default; - - void Trace(blink::Visitor* visitor) { - visitor->Trace(handle_.Cast<v8::Value>()); + TemporaryScriptWrappableVisitorScope( + v8::Isolate* isolate, + std::unique_ptr<ScriptWrappableMarkingVisitor> controller) + : isolate_(isolate), saved_controller_(std::move(controller)) { + SwapWithV8PerIsolateDataVisitor(); } + ~TemporaryScriptWrappableVisitorScope() { SwapWithV8PerIsolateDataVisitor(); } - void SetValue(v8::Isolate* isolate, v8::Local<v8::String> string) { - handle_.Set(isolate, string); + ScriptWrappableMarkingVisitor* CurrentVisitor() { + return V8PerIsolateData::From(isolate_)->GetScriptWrappableMarkingVisitor(); } private: - HandleContainer() = default; + void SwapWithV8PerIsolateDataVisitor() { + ScriptWrappableMarkingVisitor* current = CurrentVisitor(); + if (current) + ScriptWrappableMarkingVisitor::PerformCleanup(isolate_); - TraceWrapperV8Reference<v8::String> handle_; + V8PerIsolateData::From(isolate_)->SwapScriptWrappableMarkingVisitor( + saved_controller_); + isolate_->SetEmbedderHeapTracer(CurrentVisitor()); + } + + v8::Isolate* const isolate_; + std::unique_ptr<ScriptWrappableMarkingVisitor> saved_controller_; }; class InterceptingScriptWrappableMarkingVisitor @@ -296,13 +87,13 @@ }; class InterceptingScriptWrappableMarkingVisitorScope - : public V8PerIsolateData::TemporaryScriptWrappableVisitorScope { + : public TemporaryScriptWrappableVisitorScope { WTF_MAKE_NONCOPYABLE(InterceptingScriptWrappableMarkingVisitorScope); STACK_ALLOCATED(); public: InterceptingScriptWrappableMarkingVisitorScope(v8::Isolate* isolate) - : V8PerIsolateData::TemporaryScriptWrappableVisitorScope( + : TemporaryScriptWrappableVisitorScope( isolate, std::unique_ptr<InterceptingScriptWrappableMarkingVisitor>( new InterceptingScriptWrappableMarkingVisitor(isolate))) { @@ -319,6 +110,144 @@ } }; +void PreciselyCollectGarbage() { + ThreadState::Current()->CollectAllGarbage(); +} + +} // namespace + +// ============================================================================= +// Wrapper tracing tests for Blink handling. =================================== +// ============================================================================= + +TEST(ScriptWrappableMarkingVisitorTest, + ScriptWrappableMarkingVisitorTracesWrappers) { + V8TestingScope scope; + + DeathAwareScriptWrappable* target = DeathAwareScriptWrappable::Create(); + DeathAwareScriptWrappable* dependency = DeathAwareScriptWrappable::Create(); + target->SetWrappedDependency(dependency); + + // The graph needs to be set up before starting tracing as otherwise the + // conservative write barrier would trigger. + InterceptingScriptWrappableMarkingVisitorScope intercepting_scope( + scope.GetIsolate()); + ScriptWrappableMarkingVisitor* visitor = intercepting_scope.Visitor(); + + HeapObjectHeader* target_header = HeapObjectHeader::FromPayload(target); + HeapObjectHeader* dependency_header = + HeapObjectHeader::FromPayload(dependency); + + EXPECT_TRUE(visitor->MarkingDeque()->IsEmpty()); + EXPECT_FALSE(target_header->IsWrapperHeaderMarked()); + EXPECT_FALSE(dependency_header->IsWrapperHeaderMarked()); + + std::pair<void*, void*> pair = std::make_pair( + const_cast<WrapperTypeInfo*>(target->GetWrapperTypeInfo()), target); + visitor->RegisterV8Reference(pair); + EXPECT_EQ(visitor->MarkingDeque()->size(), 1ul); + + visitor->AdvanceTracing( + 0, v8::EmbedderHeapTracer::AdvanceTracingActions( + v8::EmbedderHeapTracer::ForceCompletionAction::FORCE_COMPLETION)); + EXPECT_EQ(visitor->MarkingDeque()->size(), 0ul); + EXPECT_TRUE(target_header->IsWrapperHeaderMarked()); + EXPECT_TRUE(dependency_header->IsWrapperHeaderMarked()); +} + +TEST(ScriptWrappableMarkingVisitorTest, + OilpanClearsMarkingDequeWhenObjectDied) { + V8TestingScope scope; + + DeathAwareScriptWrappable* object = DeathAwareScriptWrappable::Create(); + InterceptingScriptWrappableMarkingVisitorScope intercepting_scope( + scope.GetIsolate()); + ScriptWrappableMarkingVisitor* visitor = intercepting_scope.Visitor(); + + visitor->TraceWithWrappers(object); + + EXPECT_EQ(visitor->MarkingDeque()->front().RawObjectPointer(), object); + + PreciselyCollectGarbage(); + + EXPECT_EQ(visitor->MarkingDeque()->front().RawObjectPointer(), nullptr); +} + +TEST(ScriptWrappableMarkingVisitorTest, + MarkedObjectDoesNothingOnWriteBarrierHitWhenDependencyIsMarkedToo) { + V8TestingScope scope; + + InterceptingScriptWrappableMarkingVisitorScope intercepting_scope( + scope.GetIsolate()); + ScriptWrappableMarkingVisitor* visitor = intercepting_scope.Visitor(); + + DeathAwareScriptWrappable* target = DeathAwareScriptWrappable::Create(); + DeathAwareScriptWrappable* dependencies[] = { + DeathAwareScriptWrappable::Create(), DeathAwareScriptWrappable::Create(), + DeathAwareScriptWrappable::Create(), DeathAwareScriptWrappable::Create()}; + + HeapObjectHeader::FromPayload(target)->MarkWrapperHeader(); + for (int i = 0; i < 4; i++) { + HeapObjectHeader::FromPayload(dependencies[i])->MarkWrapperHeader(); + } + + EXPECT_TRUE(visitor->MarkingDeque()->IsEmpty()); + + target->SetWrappedDependency(dependencies[0]); + target->AddWrappedVectorDependency(dependencies[1]); + target->AddWrappedHashMapDependency(dependencies[2], dependencies[3]); + + EXPECT_TRUE(visitor->MarkingDeque()->IsEmpty()); +} + +TEST(ScriptWrappableMarkingVisitorTest, + MarkedObjectMarksDependencyOnWriteBarrierHitWhenNotMarked) { + V8TestingScope scope; + + InterceptingScriptWrappableMarkingVisitorScope intercepting_scope( + scope.GetIsolate()); + ScriptWrappableMarkingVisitor* visitor = intercepting_scope.Visitor(); + + DeathAwareScriptWrappable* target = DeathAwareScriptWrappable::Create(); + DeathAwareScriptWrappable* dependencies[] = { + DeathAwareScriptWrappable::Create(), DeathAwareScriptWrappable::Create(), + DeathAwareScriptWrappable::Create(), DeathAwareScriptWrappable::Create()}; + + HeapObjectHeader::FromPayload(target)->MarkWrapperHeader(); + + EXPECT_TRUE(visitor->MarkingDeque()->IsEmpty()); + + target->SetWrappedDependency(dependencies[0]); + target->AddWrappedVectorDependency(dependencies[1]); + target->AddWrappedHashMapDependency(dependencies[2], dependencies[3]); + + for (int i = 0; i < 4; i++) { + EXPECT_TRUE(visitor->MarkingDequeContains(dependencies[i])); + } +} + +namespace { + +class HandleContainer + : public blink::GarbageCollectedFinalized<HandleContainer> { + public: + static HandleContainer* Create() { return new HandleContainer(); } + virtual ~HandleContainer() = default; + + void Trace(blink::Visitor* visitor) { + visitor->Trace(handle_.Cast<v8::Value>()); + } + + void SetValue(v8::Isolate* isolate, v8::Local<v8::String> string) { + handle_.Set(isolate, string); + } + + private: + HandleContainer() = default; + + TraceWrapperV8Reference<v8::String> handle_; +}; + } // namespace TEST(ScriptWrappableMarkingVisitorTest, WriteBarrierOnUnmarkedContainer) { @@ -396,9 +325,6 @@ TEST(ScriptWrappableMarkingVisitorTest, WriteBarrierOnHeapVectorSwap1) { V8TestingScope scope; - ScriptWrappableMarkingVisitor* visitor = - V8PerIsolateData::From(scope.GetIsolate()) - ->GetScriptWrappableMarkingVisitor(); HeapVector<DeathAwareScriptWrappable::Wrapper> vector1; DeathAwareScriptWrappable* entry1 = DeathAwareScriptWrappable::Create(); @@ -407,22 +333,19 @@ DeathAwareScriptWrappable* entry2 = DeathAwareScriptWrappable::Create(); vector2.push_back(entry2); - visitor->TracePrologue(); + InterceptingScriptWrappableMarkingVisitorScope intercepting_scope( + scope.GetIsolate()); + ScriptWrappableMarkingVisitor* visitor = intercepting_scope.Visitor(); EXPECT_TRUE(visitor->MarkingDeque()->IsEmpty()); swap(vector1, vector2); EXPECT_TRUE(visitor->MarkingDequeContains(entry1)); EXPECT_TRUE(visitor->MarkingDequeContains(entry2)); - - visitor->AbortTracing(); } TEST(ScriptWrappableMarkingVisitorTest, WriteBarrierOnHeapVectorSwap2) { V8TestingScope scope; - ScriptWrappableMarkingVisitor* visitor = - V8PerIsolateData::From(scope.GetIsolate()) - ->GetScriptWrappableMarkingVisitor(); HeapVector<DeathAwareScriptWrappable::Wrapper> vector1; DeathAwareScriptWrappable* entry1 = DeathAwareScriptWrappable::Create(); @@ -431,7 +354,9 @@ DeathAwareScriptWrappable* entry2 = DeathAwareScriptWrappable::Create(); vector2.push_back(entry2); - visitor->TracePrologue(); + InterceptingScriptWrappableMarkingVisitorScope intercepting_scope( + scope.GetIsolate()); + ScriptWrappableMarkingVisitor* visitor = intercepting_scope.Visitor(); EXPECT_TRUE(visitor->MarkingDeque()->IsEmpty()); swap(vector1, vector2); @@ -439,8 +364,6 @@ // Only entry2 is held alive by TraceWrapperMember, so we only expect this // barrier to fire. EXPECT_TRUE(visitor->MarkingDequeContains(entry2)); - - visitor->AbortTracing(); } namespace { @@ -495,9 +418,6 @@ TEST(ScriptWrappableMarkingVisitorTest, MixinTracing) { V8TestingScope scope; - ScriptWrappableMarkingVisitor* visitor = - V8PerIsolateData::From(scope.GetIsolate()) - ->GetScriptWrappableMarkingVisitor(); DeathAwareScriptWrappable* base_wrapper = DeathAwareScriptWrappable::Create(); DeathAwareScriptWrappable* mixin_wrapper = @@ -510,7 +430,9 @@ // Make sure that mixin does not point to the object header. EXPECT_NE(static_cast<void*>(base), static_cast<void*>(mixin)); - visitor->TracePrologue(); + InterceptingScriptWrappableMarkingVisitorScope intercepting_scope( + scope.GetIsolate()); + ScriptWrappableMarkingVisitor* visitor = intercepting_scope.Visitor(); EXPECT_TRUE(visitor->MarkingDeque()->IsEmpty()); @@ -531,7 +453,22 @@ HeapObjectHeader::FromPayload(mixin_wrapper)->IsWrapperHeaderMarked()); mixin_handle = nullptr; - visitor->AbortTracing(); +} + +TEST(ScriptWrappableMarkingVisitorTest, OilpanClearsHeadersWhenObjectDied) { + V8TestingScope scope; + + DeathAwareScriptWrappable* object = DeathAwareScriptWrappable::Create(); + InterceptingScriptWrappableMarkingVisitorScope intercepting_scope( + scope.GetIsolate()); + ScriptWrappableMarkingVisitor* visitor = intercepting_scope.Visitor(); + auto* header = HeapObjectHeader::FromPayload(object); + visitor->headers_to_unmark_.push_back(header); + object = nullptr; + + PreciselyCollectGarbage(); + + EXPECT_FALSE(visitor->headers_to_unmark_.Contains(header)); } } // namespace blink
diff --git a/third_party/blink/renderer/bindings/core/v8/script_wrappable_v8_gc_integration_test.cc b/third_party/blink/renderer/bindings/core/v8/script_wrappable_v8_gc_integration_test.cc new file mode 100644 index 0000000..3f43ecd --- /dev/null +++ b/third_party/blink/renderer/bindings/core/v8/script_wrappable_v8_gc_integration_test.cc
@@ -0,0 +1,142 @@ +// 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 "testing/gtest/include/gtest/gtest.h" +#include "third_party/blink/renderer/bindings/core/v8/to_v8_for_core.h" +#include "third_party/blink/renderer/bindings/core/v8/v8_binding_for_testing.h" +#include "third_party/blink/renderer/bindings/core/v8/v8_gc_controller.h" +#include "third_party/blink/renderer/core/testing/death_aware_script_wrappable.h" +#include "v8/include/v8.h" + +namespace blink { + +namespace v8_gc_integration_test { + +void PreciselyCollectGarbage() { + ThreadState::Current()->CollectAllGarbage(); +} + +void RunV8Scavenger(v8::Isolate* isolate) { + V8GCController::CollectGarbage(isolate, true); +} + +void RunV8FullGc(v8::Isolate* isolate) { + V8GCController::CollectGarbage(isolate, false); +} + +template <typename T> +class ObjectObserver { + public: + void Observe(T* object) { holder_ = object; } + bool ObjectDied() const { return nullptr == holder_.Get(); } + + private: + WeakPersistent<T> holder_; +}; + +} // namespace v8_gc_integration_test + +// ============================================================================= +// Tests that ScriptWrappable and its wrapper survive or are reclaimed in +// certain garbage collection scenarios. +// ============================================================================= + +TEST(ScriptWrappableV8GCIntegrationTest, V8ReportsLiveObjectsDuringFullGc) { + V8TestingScope scope; + v8::Isolate* isolate = scope.GetIsolate(); + + v8::Persistent<v8::Value> holder; + v8_gc_integration_test::ObjectObserver<DeathAwareScriptWrappable> observer; + { + v8::HandleScope handle_scope(isolate); + DeathAwareScriptWrappable* object = DeathAwareScriptWrappable::Create(); + observer.Observe(object); + + holder.Reset(isolate, ToV8(object, scope.GetContext()->Global(), isolate)); + } + + v8_gc_integration_test::RunV8FullGc(isolate); + v8_gc_integration_test::PreciselyCollectGarbage(); + EXPECT_FALSE(observer.ObjectDied()); + holder.Reset(); +} + +TEST(ScriptWrappableV8GCIntegrationTest, V8ReportsLiveObjectsDuringScavenger) { + V8TestingScope scope; + v8::Isolate* isolate = scope.GetIsolate(); + + v8_gc_integration_test::ObjectObserver<DeathAwareScriptWrappable> observer; + { + v8::HandleScope handle_scope(isolate); + DeathAwareScriptWrappable* object = DeathAwareScriptWrappable::Create(); + observer.Observe(object); + + v8::Local<v8::Value> wrapper = + ToV8(object, scope.GetContext()->Global(), isolate); + EXPECT_TRUE(wrapper->IsObject()); + v8::Local<v8::Object> wrapper_object = + wrapper->ToObject(scope.GetContext()).ToLocalChecked(); + // V8 collects wrappers with unmodified maps (as they can be recreated + // without losing any data if needed). We need to create some property on + // wrapper so V8 will not see it as unmodified. + EXPECT_TRUE( + wrapper_object->CreateDataProperty(scope.GetContext(), 1, wrapper) + .IsJust()); + } + + // Scavenger should not collect JavaScript wrappers that are modified, even if + // they are otherwise unreachable. + v8_gc_integration_test::RunV8Scavenger(isolate); + v8_gc_integration_test::PreciselyCollectGarbage(); + + EXPECT_FALSE(observer.ObjectDied()); +} + +TEST(ScriptWrappableV8GCIntegrationTest, + OilpanDoesntCollectObjectsReachableFromV8) { + V8TestingScope scope; + v8::Isolate* isolate = scope.GetIsolate(); + + v8::Persistent<v8::Value> holder; + v8_gc_integration_test::ObjectObserver<DeathAwareScriptWrappable> observer; + { + v8::HandleScope handle_scope(isolate); + DeathAwareScriptWrappable* object = DeathAwareScriptWrappable::Create(); + observer.Observe(object); + + // Creates new V8 wrapper and associates it with global scope + holder.Reset(isolate, ToV8(object, scope.GetContext()->Global(), isolate)); + } + + v8_gc_integration_test::RunV8Scavenger(isolate); + v8_gc_integration_test::RunV8FullGc(isolate); + v8_gc_integration_test::PreciselyCollectGarbage(); + + EXPECT_FALSE(observer.ObjectDied()); + holder.Reset(); +} + +TEST(ScriptWrappableV8GCIntegrationTest, + OilpanCollectObjectsNotReachableFromV8) { + V8TestingScope scope; + v8::Isolate* isolate = scope.GetIsolate(); + + v8_gc_integration_test::ObjectObserver<DeathAwareScriptWrappable> observer; + { + v8::HandleScope handle_scope(isolate); + DeathAwareScriptWrappable* object = DeathAwareScriptWrappable::Create(); + observer.Observe(object); + + // Creates new V8 wrapper and associates it with global scope + ToV8(object, scope.GetContext()->Global(), isolate); + } + + v8_gc_integration_test::RunV8Scavenger(isolate); + v8_gc_integration_test::RunV8FullGc(isolate); + v8_gc_integration_test::PreciselyCollectGarbage(); + + EXPECT_TRUE(observer.ObjectDied()); +} + +} // namespace blink
diff --git a/third_party/blink/renderer/bindings/core/v8/v8_abstract_event_listener.cc b/third_party/blink/renderer/bindings/core/v8/v8_abstract_event_listener.cc index f7acae63..2f4a28f 100644 --- a/third_party/blink/renderer/bindings/core/v8/v8_abstract_event_listener.cc +++ b/third_party/blink/renderer/bindings/core/v8/v8_abstract_event_listener.cc
@@ -70,8 +70,6 @@ DCHECK(listener_.IsEmpty()); InstanceCounters::DecrementCounter( InstanceCounters::kJSEventListenerCounter); - } else { - listener_.Clear(); } } @@ -82,8 +80,8 @@ EventListener* listener) { if (listener && listener->GetType() == kJSEventListenerType) { v8::Local<v8::Object> v8_listener = - static_cast<V8AbstractEventListener*>(listener)->GetListenerObject( - event_target->GetExecutionContext()); + static_cast<V8AbstractEventListener*>(listener) + ->GetListenerObjectInternal(event_target->GetExecutionContext()); if (!v8_listener.IsEmpty()) return v8_listener; }
diff --git a/third_party/blink/renderer/bindings/core/v8/v8_abstract_event_listener.h b/third_party/blink/renderer/bindings/core/v8/v8_abstract_event_listener.h index 54e5947..7ecb25f9 100644 --- a/third_party/blink/renderer/bindings/core/v8/v8_abstract_event_listener.h +++ b/third_party/blink/renderer/bindings/core/v8/v8_abstract_event_listener.h
@@ -82,6 +82,11 @@ // Returns the listener object, either a function or an object, or the empty // handle if the user script is not compilable. No exception will be thrown // even if the user script is not compilable. + v8::Local<v8::Object> GetListenerObjectForInspector( + ExecutionContext* execution_context) final { + return GetListenerObjectInternal(execution_context); + } + v8::Local<v8::Object> GetListenerObject(ExecutionContext* execution_context) { return GetListenerObjectInternal(execution_context); } @@ -105,7 +110,7 @@ bool IsAttribute() const final { return is_attribute_; } v8::Isolate* GetIsolate() const { return isolate_; } - DOMWrapperWorld& World() const { return *world_; } + DOMWrapperWorld* GetWorldForInspector() const final { return world_.get(); } void Trace(blink::Visitor*) override; @@ -125,6 +130,7 @@ // Get the receiver object to use for event listener call. v8::Local<v8::Object> GetReceiverObject(ScriptState*, Event*); + DOMWrapperWorld& World() const { return *world_; } private: // This could return an empty handle and callers need to check return value.
diff --git a/third_party/blink/renderer/bindings/core/v8/v8_error_handler.cc b/third_party/blink/renderer/bindings/core/v8/v8_error_handler.cc index bdb6dd4..d80961a 100644 --- a/third_party/blink/renderer/bindings/core/v8/v8_error_handler.cc +++ b/third_party/blink/renderer/bindings/core/v8/v8_error_handler.cc
@@ -58,7 +58,7 @@ v8::Local<v8::Context> context = script_state->GetContext(); ExecutionContext* execution_context = ToExecutionContext(context); - v8::Local<v8::Object> listener = GetListenerObject(execution_context); + v8::Local<v8::Object> listener = GetListenerObjectInternal(execution_context); if (listener.IsEmpty() || !listener->IsFunction()) return v8::Null(GetIsolate());
diff --git a/third_party/blink/renderer/bindings/core/v8/v8_event_listener_helper.cc b/third_party/blink/renderer/bindings/core/v8/v8_event_listener_helper.cc index b853703..45c29da9 100644 --- a/third_party/blink/renderer/bindings/core/v8/v8_event_listener_helper.cc +++ b/third_party/blink/renderer/bindings/core/v8/v8_event_listener_helper.cc
@@ -33,6 +33,7 @@ #include "third_party/blink/renderer/bindings/core/v8/custom_wrappable_adapter.h" #include "third_party/blink/renderer/bindings/core/v8/v8_binding_for_core.h" #include "third_party/blink/renderer/bindings/core/v8/v8_error_handler.h" +#include "third_party/blink/renderer/bindings/core/v8/v8_event_listener_or_event_handler.h" #include "third_party/blink/renderer/bindings/core/v8/v8_window.h" #include "third_party/blink/renderer/platform/bindings/v8_private_property.h" @@ -58,7 +59,7 @@ } // namespace // static -V8AbstractEventListener* V8EventListenerHelper::GetEventListener( +EventListener* V8EventListenerHelper::GetEventListener( ScriptState* script_state, v8::Local<v8::Value> value, bool is_attribute, @@ -86,7 +87,7 @@ } // static -V8ErrorHandler* V8EventListenerHelper::EnsureErrorHandler( +EventListener* V8EventListenerHelper::EnsureErrorHandler( ScriptState* script_state, v8::Local<v8::Value> value) { if (!value->IsObject())
diff --git a/third_party/blink/renderer/bindings/core/v8/v8_event_listener_helper.h b/third_party/blink/renderer/bindings/core/v8/v8_event_listener_helper.h index 9c58515..e105210 100644 --- a/third_party/blink/renderer/bindings/core/v8/v8_event_listener_helper.h +++ b/third_party/blink/renderer/bindings/core/v8/v8_event_listener_helper.h
@@ -32,15 +32,12 @@ #define THIRD_PARTY_BLINK_RENDERER_BINDINGS_CORE_V8_V8_EVENT_LISTENER_HELPER_H_ #include "third_party/blink/renderer/bindings/core/v8/v8_binding_for_core.h" -#include "third_party/blink/renderer/bindings/core/v8/v8_event_listener_or_event_handler.h" #include "third_party/blink/renderer/core/core_export.h" #include "third_party/blink/renderer/platform/wtf/allocator.h" #include "v8/include/v8.h" namespace blink { -class V8ErrorHandler; - enum ListenerLookupType { kListenerFindOnly, kListenerFindOrCreate, @@ -52,14 +49,13 @@ STATIC_ONLY(V8EventListenerHelper); public: - CORE_EXPORT static V8AbstractEventListener* GetEventListener( - ScriptState*, - v8::Local<v8::Value>, - bool is_attribute, - ListenerLookupType); + CORE_EXPORT static EventListener* GetEventListener(ScriptState*, + v8::Local<v8::Value>, + bool is_attribute, + ListenerLookupType); - CORE_EXPORT static V8ErrorHandler* EnsureErrorHandler(ScriptState*, - v8::Local<v8::Value>); + CORE_EXPORT static EventListener* EnsureErrorHandler(ScriptState*, + v8::Local<v8::Value>); }; } // namespace blink
diff --git a/third_party/blink/renderer/bindings/core/v8/v8_event_listener_or_event_handler.cc b/third_party/blink/renderer/bindings/core/v8/v8_event_listener_or_event_handler.cc index 27e606b3..4a87e26 100644 --- a/third_party/blink/renderer/bindings/core/v8/v8_event_listener_or_event_handler.cc +++ b/third_party/blink/renderer/bindings/core/v8/v8_event_listener_or_event_handler.cc
@@ -49,7 +49,7 @@ v8::Local<v8::Function> V8EventListenerOrEventHandler::GetListenerFunction( ScriptState* script_state) { v8::Local<v8::Object> listener = - GetListenerObject(ExecutionContext::From(script_state)); + GetListenerObjectInternal(ExecutionContext::From(script_state)); // Has the listener been disposed? if (listener.IsEmpty())
diff --git a/third_party/blink/renderer/bindings/core/v8/v8_lazy_event_listener.cc b/third_party/blink/renderer/bindings/core/v8/v8_lazy_event_listener.cc index df7680a..8f79c2fe 100644 --- a/third_party/blink/renderer/bindings/core/v8/v8_lazy_event_listener.cc +++ b/third_party/blink/renderer/bindings/core/v8/v8_lazy_event_listener.cc
@@ -90,7 +90,8 @@ DCHECK(!js_event.IsEmpty()); ExecutionContext* execution_context = ToExecutionContext(script_state->GetContext()); - v8::Local<v8::Object> listener_object = GetListenerObject(execution_context); + v8::Local<v8::Object> listener_object = + GetListenerObjectInternal(execution_context); if (listener_object.IsEmpty()) return v8::Local<v8::Value>();
diff --git a/third_party/blink/renderer/bindings/modules/BUILD.gn b/third_party/blink/renderer/bindings/modules/BUILD.gn index 93df2008..3111706d 100644 --- a/third_party/blink/renderer/bindings/modules/BUILD.gn +++ b/third_party/blink/renderer/bindings/modules/BUILD.gn
@@ -19,9 +19,8 @@ generate_event_interfaces("modules_bindings_generated_event_interfaces") { sources = [ "//third_party/blink/renderer/modules/app_banner/before_install_prompt_event.idl", - "//third_party/blink/renderer/modules/background_fetch/background_fetch_click_event.idl", "//third_party/blink/renderer/modules/background_fetch/background_fetch_event.idl", - "//third_party/blink/renderer/modules/background_fetch/background_fetch_fail_event.idl", + "//third_party/blink/renderer/modules/background_fetch/background_fetch_update_ui_event.idl", "//third_party/blink/renderer/modules/background_sync/sync_event.idl", "//third_party/blink/renderer/modules/cookie_store/cookie_change_event.idl", "//third_party/blink/renderer/modules/cookie_store/extendable_cookie_change_event.idl",
diff --git a/third_party/blink/renderer/bindings/modules/v8/BUILD.gn b/third_party/blink/renderer/bindings/modules/v8/BUILD.gn index 34381220..47a5d537 100644 --- a/third_party/blink/renderer/bindings/modules/v8/BUILD.gn +++ b/third_party/blink/renderer/bindings/modules/v8/BUILD.gn
@@ -95,14 +95,14 @@ visibility = [ ":*" ] deps = [ - "//device/gamepad/public/mojom:mojom_blink__generator", - "//device/usb/public/mojom:mojom_blink__generator", - "//device/vr/public/mojom:mojom_blink__generator", - "//media/capture/mojom:image_capture_blink__generator", - "//services/device/public/mojom:generic_sensor__generator", - "//services/device/public/mojom:mojom_blink__generator", - "//services/shape_detection/public/mojom:mojom_blink__generator", - "//third_party/blink/public:media_devices_mojo_bindings_blink__generator", + "//device/gamepad/public/mojom:mojom_blink_headers", + "//device/usb/public/mojom:mojom_blink_headers", + "//device/vr/public/mojom:mojom_blink_headers", + "//media/capture/mojom:image_capture_blink_headers", + "//services/device/public/mojom:generic_sensor_headers", + "//services/device/public/mojom:mojom_blink_headers", + "//services/shape_detection/public/mojom:mojom_blink_headers", + "//third_party/blink/public:media_devices_mojo_bindings_blink_headers", ] }
diff --git a/third_party/blink/renderer/bindings/templates/callback_function.cpp.tmpl b/third_party/blink/renderer/bindings/templates/callback_function.cpp.tmpl index f40221f..ab82d38 100644 --- a/third_party/blink/renderer/bindings/templates/callback_function.cpp.tmpl +++ b/third_party/blink/renderer/bindings/templates/callback_function.cpp.tmpl
@@ -146,12 +146,12 @@ {% endif %} } -{% if idl_type == 'void' %} +{% if idl_type == 'void' or callback_function_name == 'Function' %} void {{cpp_class}}::InvokeAndReportException({{argument_declarations | join(', ')}}) { v8::TryCatch try_catch(GetIsolate()); try_catch.SetVerbose(true); - v8::Maybe<void> maybe_result = + v8::Maybe<{{return_cpp_type}}> maybe_result = Invoke({{ (['callback_this_value'] + (arguments|map(attribute='name')|list) @@ -171,7 +171,7 @@ }}); } -{% if idl_type == 'void' %} +{% if idl_type == 'void' or callback_function_name == 'Function' %} void V8PersistentCallbackFunction<{{cpp_class}}>::InvokeAndReportException({{argument_declarations | join(', ')}}) { Proxy()->InvokeAndReportException( {{
diff --git a/third_party/blink/renderer/bindings/templates/callback_function.h.tmpl b/third_party/blink/renderer/bindings/templates/callback_function.h.tmpl index 44b54143..fdea79a 100644 --- a/third_party/blink/renderer/bindings/templates/callback_function.h.tmpl +++ b/third_party/blink/renderer/bindings/templates/callback_function.h.tmpl
@@ -30,7 +30,9 @@ // https://heycam.github.io/webidl/#es-invoking-callback-functions v8::Maybe<{{return_cpp_type}}> Invoke({{argument_declarations | join(', ')}}) WARN_UNUSED_RESULT; -{% if idl_type == 'void' %} +{# Type Function is often used as a sort of wild cards, and its return value is + often discarded. So, this provides some convenience. #} +{% if idl_type == 'void' or callback_function_name == 'Function' %} // Performs "invoke", and then reports an exception, if any, to the global // error handler such as DevTools' console. void InvokeAndReportException({{argument_declarations | join(', ')}}); @@ -52,7 +54,7 @@ V8CallbackFunction* ToNonV8Persistent() { return Proxy(); } v8::Maybe<{{return_cpp_type}}> Invoke({{argument_declarations | join(', ')}}) WARN_UNUSED_RESULT; -{% if idl_type == 'void' %} +{% if idl_type == 'void' or callback_function_name == 'Function' %} {{exported}}void InvokeAndReportException({{argument_declarations | join(', ')}}); {% endif %}
diff --git a/third_party/blink/renderer/core/BUILD.gn b/third_party/blink/renderer/core/BUILD.gn index e5aceae3..e58a7ea 100644 --- a/third_party/blink/renderer/core/BUILD.gn +++ b/third_party/blink/renderer/core/BUILD.gn
@@ -2085,6 +2085,7 @@ "scroll/scrollable_area_test.cc", "scroll/scrollbar_theme_overlay_test.cc", "streams/readable_stream_operations_test.cc", + "streams/transform_stream_test.cc", "style/border_value_test.cc", "style/computed_style_test.cc", "style/filter_operations_test.cc",
diff --git a/third_party/blink/renderer/core/animation/css/css_animations.cc b/third_party/blink/renderer/core/animation/css/css_animations.cc index e66e539..fcbf62775 100644 --- a/third_party/blink/renderer/core/animation/css/css_animations.cc +++ b/third_party/blink/renderer/core/animation/css/css_animations.cc
@@ -866,7 +866,8 @@ void CSSAnimations::CalculateTransitionUpdateForStandardProperty( TransitionUpdateState& state, const CSSTransitionData::TransitionProperty& transition_property, - size_t transition_index) { + size_t transition_index, + const ComputedStyle& style) { if (transition_property.property_type != CSSTransitionData::kTransitionKnownProperty) { return; @@ -885,7 +886,10 @@ property_list.length() ? property_list.properties()[i]->PropertyID() : resolved_id; DCHECK_GE(longhand_id, firstCSSProperty); - const CSSProperty& property = CSSProperty::Get(longhand_id); + const CSSProperty& property = + CSSProperty::Get(longhand_id) + .ResolveDirectionAwareProperty(style.Direction(), + style.GetWritingMode()); PropertyHandle property_handle = PropertyHandle(property); if (!animate_all && !property.IsInterpolable()) { @@ -940,7 +944,7 @@ } else { DCHECK_EQ(property_pass, PropertyPass::kStandard); CalculateTransitionUpdateForStandardProperty(state, transition_property, - transition_index); + transition_index, style); } } }
diff --git a/third_party/blink/renderer/core/animation/css/css_animations.h b/third_party/blink/renderer/core/animation/css/css_animations.h index 1be0c02..607cf5e 100644 --- a/third_party/blink/renderer/core/animation/css/css_animations.h +++ b/third_party/blink/renderer/core/animation/css/css_animations.h
@@ -185,7 +185,8 @@ static void CalculateTransitionUpdateForStandardProperty( TransitionUpdateState&, const CSSTransitionData::TransitionProperty&, - size_t transition_index); + size_t transition_index, + const ComputedStyle&); static void CalculateTransitionUpdateForProperty(TransitionUpdateState&, const PropertyHandle&,
diff --git a/third_party/blink/renderer/core/core_idl_files.gni b/third_party/blink/renderer/core/core_idl_files.gni index c1e5fcec..9941479 100644 --- a/third_party/blink/renderer/core/core_idl_files.gni +++ b/third_party/blink/renderer/core/core_idl_files.gni
@@ -179,6 +179,7 @@ "frame/bar_prop.idl", "frame/deprecation_report_body.idl", "frame/external.idl", + "frame/feature_policy_violation_report_body.idl", "frame/history.idl", "frame/intervention_report_body.idl", "frame/location.idl",
diff --git a/third_party/blink/renderer/core/css/cssom/inline_style_property_map.cc b/third_party/blink/renderer/core/css/cssom/inline_style_property_map.cc index 65e9ed9..8eb68d3 100644 --- a/third_party/blink/renderer/core/css/cssom/inline_style_property_map.cc +++ b/third_party/blink/renderer/core/css/cssom/inline_style_property_map.cc
@@ -7,6 +7,7 @@ #include "third_party/blink/renderer/core/css/css_custom_property_declaration.h" #include "third_party/blink/renderer/core/css/css_property_value_set.h" #include "third_party/blink/renderer/core/css/css_variable_reference_value.h" +#include "third_party/blink/renderer/core/css/property_registry.h" #include "third_party/blink/renderer/core/css/style_property_serializer.h" namespace blink { @@ -25,8 +26,10 @@ const CSSValue* InlineStylePropertyMap::GetCustomProperty( AtomicString property_name) { const CSSPropertyValueSet* inline_style = owner_element_->InlineStyle(); - return inline_style ? inline_style->GetPropertyCSSValue(property_name) - : nullptr; + const CSSValue* value = + inline_style ? inline_style->GetPropertyCSSValue(property_name) : nullptr; + return PropertyRegistry::ParseIfRegistered(owner_element_->GetDocument(), + property_name, value); } void InlineStylePropertyMap::SetProperty(CSSPropertyID property_id,
diff --git a/third_party/blink/renderer/core/css/property_registry.cc b/third_party/blink/renderer/core/css/property_registry.cc index 30da6b7..5f71987 100644 --- a/third_party/blink/renderer/core/css/property_registry.cc +++ b/third_party/blink/renderer/core/css/property_registry.cc
@@ -3,6 +3,7 @@ // found in the LICENSE file. #include "third_party/blink/renderer/core/css/property_registry.h" +#include "third_party/blink/renderer/core/css/css_custom_property_declaration.h" namespace blink { @@ -17,4 +18,35 @@ return registrations_.at(name); } +const CSSValue* PropertyRegistry::ParseIfRegistered( + const Document& document, + const AtomicString& property_name, + const CSSValue* value) { + if (!value) + return nullptr; + + const PropertyRegistry* registry = document.GetPropertyRegistry(); + + if (!registry) + return value; + + const PropertyRegistration* registration = + registry->Registration(property_name); + + if (!registration) + return value; + if (!value->IsCustomPropertyDeclaration()) + return value; + + CSSVariableData* tokens = ToCSSCustomPropertyDeclaration(value)->Value(); + + if (!tokens || tokens->NeedsVariableResolution()) + return value; + + const CSSValue* parsed_value = tokens->ParseForSyntax( + registration->Syntax(), document.GetSecureContextMode()); + + return parsed_value ? parsed_value : value; +} + } // namespace blink
diff --git a/third_party/blink/renderer/core/css/property_registry.h b/third_party/blink/renderer/core/css/property_registry.h index 55649f3..525e472f 100644 --- a/third_party/blink/renderer/core/css/property_registry.h +++ b/third_party/blink/renderer/core/css/property_registry.h
@@ -21,6 +21,15 @@ void Trace(blink::Visitor* visitor) { visitor->Trace(registrations_); } + // Parse the incoming value and return the parsed result, if: + // 1. A registration with the specified name exists, and + // 2. The incoming value is a CSSCustomPropertyDeclaration, has no + // unresolved var-references and matches the registered syntax. + // Otherwise the incoming value is returned. + static const CSSValue* ParseIfRegistered(const Document& document, + const AtomicString& property_name, + const CSSValue*); + private: HeapHashMap<AtomicString, Member<PropertyRegistration>> registrations_; };
diff --git a/third_party/blink/renderer/core/dom/README.md b/third_party/blink/renderer/core/dom/README.md index b76bb261..a0430a7d 100644 --- a/third_party/blink/renderer/core/dom/README.md +++ b/third_party/blink/renderer/core/dom/README.md
@@ -4,7 +4,7 @@ Author: hayato@chromium.org -The `Source/core/dom` directory contains the implementation of [DOM]. +The `renderer/core/dom` directory contains the implementation of [DOM]. [dom]: https://dom.spec.whatwg.org/ [dom standard]: https://dom.spec.whatwg.org/ @@ -30,8 +30,8 @@ # Node and Node Tree -In this README, we draw a tree in left-to-right direction. `A` is the root of -the tree. +In this README, we draw a tree in left-to-right direction in _ascii-art_ +notation. `A` is the root of the tree. ```text A @@ -62,6 +62,8 @@ child. - Parent can't tell how many children it has in O(1). + + Further info: - `Node`, `ContainerNode` @@ -89,6 +91,10 @@ } ``` +Tree order is: + + + However, traversing a tree in this way might be error-prone. Instead, you can use `NodeTraversal` and `ElementTraversal`. They provides a C++11's range-based for loops, such as: @@ -110,10 +116,8 @@ ``` e.g. Given the root _A_, this traverses _A_, _B_, _C_, _D_, _E_, and _F_ in this -order. - -There are several other useful range-based for loops for each purpose. The cost -of using range-based for loops is zero because everything can be inlined. +order.There are several other useful range-based for loops for each purpose. The +cost of using range-based for loops is zero because everything can be inlined. Further info: @@ -133,6 +137,8 @@ - The node tree of a shadow root’s host is sometimes referred to as the **light tree**. + + For example, given the example node tree: ```text @@ -283,7 +289,12 @@ In the previous picture, you might think that more than one node trees, a document tree and a shadow tree, were _connected_ to each other. That is _true_ -in some sense. The following is a more complex example: +in some sense. We call this _super tree_ as _composed tree_, which is a _tree of +trees_. + + + +The following is a complex example: ```text document @@ -470,6 +481,8 @@ have to _flatten_ the composed tree to the one node tree, called a _flat tree_, from which a layout tree is constructed. + + For example, given the following composed tree, ```text @@ -723,6 +736,114 @@ `Node::UpdateDistributionForFlatTreeTraversal` before using `FlatTreeTraversal` beforehand in most cases, however, that wouldn't happen soon. +# Event path and Event Retargeting + +<!-- Old doc: https://www.w3.org/TR/2014/WD-shadow-dom-20140617/ --> + +[DOM Standard] defines how an event should be dispatched +[here](https://dom.spec.whatwg.org/#concept-event-dispatch), including how +[event path](https://dom.spec.whatwg.org/#event-path) should be calculated, +however, I wouldn't be surprised if the steps described there might look a kind +of cryptogram to you. + +In this README, I'll explain how an event is dispatched and how its event path +is calculated briefly by using some relatively-understandable examples. + +Basically, an event is dispatched across shadow trees. + + + +Let me show more complex example composed tree, involving a slot: + +```text +A +└── B + ├──/shadowroot-C + │ └── D + │ ├──/shadowroot-E + │ │ └── F + │ │ └── slot-G + │ └── H + │ └── I + │ ├──/shadowroot-J + │ │ └── K + │ │ ├──/shadowroot-L + │ │ │ └── M + │ │ │ ├──/shadowroot-N + │ │ │ │ └── slot-O + │ │ │ └── slot-P + │ │ └── Q + │ │ └── slot-R + │ └── slot-S + └── T + └── U +``` + +Slot Assignments: + +| slot | slot's assigned nodes | +| ------ | --------------------- | +| slot-G | [H] | +| slot-O | [slot-P] | +| slot-P | [O] | +| slot-R | [slot-S] | +| slot-S | [T] | + +Given that, suppose that an event is fired on `U`, an event path would be (in +reverse order): + +```text +[U => T => slot-S => slot-R => Q => slot-P => slot-O => shadowroot-N => M +=> shadowroot-L => K => shadowroot-J => I => H => slot-G => F => shadowroot-E +=> D => shadowroot-C => B => A] +``` + +Roughly speaking, an event's _parent_ (the next node in event path) is +calculated as follows: + +- If a node is assigned to a slot, the _parent_ is the node's asigned slot. +- If a node is a shadow root, the _parent_ is its shadow host. +- In other cases, the _parent_ is node's parent. + +In the above case, `event.target`, `U`, doesn't change in its lifetime because +`U` can be _seen_ from every nodes there. However, if an event is fired on node +`Q`, for example, `event.target` would be adjusted for some nodes in event path +to honer encapsulation. That is called _event re-targeting_. + +Here is an event path for an event which is fired on `Q` : + +| event.currenttarget | (re-targeted) event.target | +| ------------------- | -------------------------- | +| Q | Q | +| slot-P | Q | +| slot-O | Q | +| shadowroot-N | Q | +| M | Q | +| shadowroot-L | Q | +| K | Q | +| shadowroot-J | Q | +| I | I | +| H | I | +| slot-G | I | +| F | I | +| shadowroot-E | I | +| D | I | +| shadowroot-C | I | +| B | B | +| A | B | + +# Design goal of event path calculation + +TODO(hayato): Explain. + +# Composed events + +TODO(hayato): Explain. + +# Event path and related targets + +TODO(hayato): Explain. + # DOM mutations TODO(hayato): Explain. @@ -730,7 +851,3 @@ # Related flags TODO(hayato): Explain. - -# Event path and Event Retargeting - -TODO(hayato): Explain.
diff --git a/third_party/blink/renderer/core/dom/element.cc b/third_party/blink/renderer/core/dom/element.cc index fa2f454..6f7671b1 100644 --- a/third_party/blink/renderer/core/dom/element.cc +++ b/third_party/blink/renderer/core/dom/element.cc
@@ -2791,7 +2791,8 @@ DCHECK(!shadow_root_init_dict.hasMode() || !GetShadowRoot()); bool delegates_focus = shadow_root_init_dict.hasDelegatesFocus() && shadow_root_init_dict.delegatesFocus(); - return &AttachShadowRootInternal(type, delegates_focus); + bool manual_slotting = shadow_root_init_dict.slotting() == "manual"; + return &AttachShadowRootInternal(type, delegates_focus, manual_slotting); } ShadowRoot& Element::CreateShadowRootInternal() { @@ -2808,7 +2809,8 @@ } ShadowRoot& Element::AttachShadowRootInternal(ShadowRootType type, - bool delegates_focus) { + bool delegates_focus, + bool manual_slotting) { // SVG <use> is a special case for using this API to create a closed shadow // root. DCHECK(CanAttachShadowRoot() || IsSVGUseElement(*this)); @@ -2819,6 +2821,8 @@ GetDocument().SetShadowCascadeOrder(ShadowCascadeOrder::kShadowCascadeV1); ShadowRoot& shadow_root = CreateAndAttachShadowRoot(type); shadow_root.SetDelegatesFocus(delegates_focus); + shadow_root.SetSlotting(manual_slotting ? ShadowRootSlotting::kManual + : ShadowRootSlotting::kAuto); return shadow_root; }
diff --git a/third_party/blink/renderer/core/dom/element.h b/third_party/blink/renderer/core/dom/element.h index 8a7ae70a..0e89134 100644 --- a/third_party/blink/renderer/core/dom/element.h +++ b/third_party/blink/renderer/core/dom/element.h
@@ -514,7 +514,8 @@ } ShadowRoot& CreateUserAgentShadowRoot(); ShadowRoot& AttachShadowRootInternal(ShadowRootType, - bool delegates_focus = false); + bool delegates_focus = false, + bool manual_slotting = false); // Returns the shadow root attached to this element if it is a shadow host. ShadowRoot* GetShadowRoot() const;
diff --git a/third_party/blink/renderer/core/dom/events/event_listener.h b/third_party/blink/renderer/core/dom/events/event_listener.h index 54beff1..70942bb3 100644 --- a/third_party/blink/renderer/core/dom/events/event_listener.h +++ b/third_party/blink/renderer/core/dom/events/event_listener.h
@@ -29,6 +29,7 @@ namespace blink { +class DOMWrapperWorld; class Event; class ExecutionContext; @@ -51,6 +52,16 @@ } virtual bool IsAttribute() const { return false; } + // Only DevTools is allowed to use this method. + // This method may return an empty handle. + virtual v8::Local<v8::Object> GetListenerObjectForInspector( + ExecutionContext* execution_context) { + return v8::Local<v8::Object>(); + } + + // Only DevTools is allowed to use this method. + virtual DOMWrapperWorld* GetWorldForInspector() const { return nullptr; } + ListenerType GetType() const { return type_; } const char* NameInHeapSnapshot() const override { return "EventListener"; }
diff --git a/third_party/blink/renderer/core/dom/events/event_target.cc b/third_party/blink/renderer/core/dom/events/event_target.cc index f3ed84c..0b72104a 100644 --- a/third_party/blink/renderer/core/dom/events/event_target.cc +++ b/third_party/blink/renderer/core/dom/events/event_target.cc
@@ -39,6 +39,7 @@ #include "third_party/blink/renderer/bindings/core/v8/event_listener_options_or_boolean.h" #include "third_party/blink/renderer/bindings/core/v8/script_event_listener.h" #include "third_party/blink/renderer/bindings/core/v8/source_location.h" +#include "third_party/blink/renderer/bindings/core/v8/v8_abstract_event_listener.h" #include "third_party/blink/renderer/core/dom/events/event.h" #include "third_party/blink/renderer/core/dom/events/event_dispatch_forbidden_scope.h" #include "third_party/blink/renderer/core/dom/events/event_target_impl.h" @@ -260,18 +261,25 @@ } if (IsWheelScrollBlockingEvent(event_type) && IsTopLevelNode()) { - if (executing_window) { - if (options.hasPassive()) { + if (options.hasPassive()) { + if (executing_window) { UseCounter::Count( executing_window->document(), options.passive() ? WebFeature::kAddDocumentLevelPassiveTrueWheelEventListener : WebFeature::kAddDocumentLevelPassiveFalseWheelEventListener); - } else { + } + } else { // !options.hasPassive() + if (executing_window) { UseCounter::Count( executing_window->document(), WebFeature::kAddDocumentLevelPassiveDefaultWheelEventListener); } + if (RuntimeEnabledFeatures::PassiveDocumentWheelEventListenersEnabled()) { + options.setPassive(true); + options.SetPassiveForcedForDocumentTarget(true); + return; + } } } @@ -832,9 +840,8 @@ bool passive_forced = registered_listener.PassiveForcedForDocumentTarget(); probe::UserCallback probe(context, nullptr, event.type(), false, this); - probe::AsyncTask async_task( - context, V8AbstractEventListener::Cast(listener), "event", - IsInstrumentedForAsyncStack(event.type())); + probe::AsyncTask async_task(context, listener, "event", + IsInstrumentedForAsyncStack(event.type())); // To match Mozilla, the AT_TARGET phase fires both capturing and bubbling // event listeners, even though that violates some versions of the DOM spec.
diff --git a/third_party/blink/renderer/core/dom/idle_deadline_test.cc b/third_party/blink/renderer/core/dom/idle_deadline_test.cc index 2467e89e..dee6adf 100644 --- a/third_party/blink/renderer/core/dom/idle_deadline_test.cc +++ b/third_party/blink/renderer/core/dom/idle_deadline_test.cc
@@ -8,7 +8,7 @@ #include "testing/gtest/include/gtest/gtest.h" #include "third_party/blink/public/platform/platform.h" #include "third_party/blink/renderer/platform/scheduler/public/thread_scheduler.h" -#include "third_party/blink/renderer/platform/testing/testing_platform_support_with_mock_scheduler.h" +#include "third_party/blink/renderer/platform/testing/testing_platform_support_with_custom_scheduler.h" #include "third_party/blink/renderer/platform/testing/wtf/scoped_mock_clock.h" #include "third_party/blink/renderer/platform/wtf/time.h" @@ -61,29 +61,6 @@ DISALLOW_COPY_AND_ASSIGN(MockIdleDeadlineScheduler); }; -class MockIdleDeadlineThread final : public WebThread { - public: - MockIdleDeadlineThread() = default; - ~MockIdleDeadlineThread() override = default; - bool IsCurrentThread() const override { return true; } - ThreadScheduler* Scheduler() const override { return &scheduler_; } - - private: - mutable MockIdleDeadlineScheduler scheduler_; - DISALLOW_COPY_AND_ASSIGN(MockIdleDeadlineThread); -}; - -class MockIdleDeadlinePlatform : public TestingPlatformSupport { - public: - MockIdleDeadlinePlatform() = default; - ~MockIdleDeadlinePlatform() override = default; - WebThread* CurrentThread() override { return &thread_; } - - private: - MockIdleDeadlineThread thread_; - DISALLOW_COPY_AND_ASSIGN(MockIdleDeadlinePlatform); -}; - } // namespace class IdleDeadlineTest : public testing::Test { @@ -110,7 +87,10 @@ } TEST_F(IdleDeadlineTest, yieldForHighPriorityWork) { - ScopedTestingPlatformSupport<MockIdleDeadlinePlatform> platform; + MockIdleDeadlineScheduler scheduler; + ScopedTestingPlatformSupport<TestingPlatformSupportWithCustomScheduler, + ThreadScheduler*> + platform(&scheduler); IdleDeadline* deadline = IdleDeadline::Create(TimeTicks() + TimeDelta::FromSecondsD(1.25),
diff --git a/third_party/blink/renderer/core/dom/scripted_idle_task_controller_test.cc b/third_party/blink/renderer/core/dom/scripted_idle_task_controller_test.cc index 3d33dcf..fc562b24 100644 --- a/third_party/blink/renderer/core/dom/scripted_idle_task_controller_test.cc +++ b/third_party/blink/renderer/core/dom/scripted_idle_task_controller_test.cc
@@ -11,16 +11,18 @@ #include "third_party/blink/renderer/core/dom/idle_request_options.h" #include "third_party/blink/renderer/core/testing/null_execution_context.h" #include "third_party/blink/renderer/platform/scheduler/public/thread_scheduler.h" -#include "third_party/blink/renderer/platform/testing/testing_platform_support.h" +#include "third_party/blink/renderer/platform/testing/testing_platform_support_with_custom_scheduler.h" #include "third_party/blink/renderer/platform/wtf/time.h" namespace blink { namespace { +enum class ShouldYield { YIELD, DONT_YIELD }; + class MockScriptedIdleTaskControllerScheduler final : public ThreadScheduler { public: - MockScriptedIdleTaskControllerScheduler(bool should_yield) - : should_yield_(should_yield) {} + explicit MockScriptedIdleTaskControllerScheduler(ShouldYield should_yield) + : should_yield_(should_yield == ShouldYield::YIELD) {} ~MockScriptedIdleTaskControllerScheduler() override = default; // ThreadScheduler implementation: @@ -73,37 +75,6 @@ DISALLOW_COPY_AND_ASSIGN(MockScriptedIdleTaskControllerScheduler); }; -class MockScriptedIdleTaskControllerThread final : public WebThread { - public: - MockScriptedIdleTaskControllerThread(bool should_yield) - : scheduler_(should_yield) {} - ~MockScriptedIdleTaskControllerThread() override = default; - bool IsCurrentThread() const override { return true; } - ThreadScheduler* Scheduler() const override { return &scheduler_; } - - void RunIdleTask() { scheduler_.RunIdleTask(); } - bool HasIdleTask() const { return scheduler_.HasIdleTask(); } - - private: - mutable MockScriptedIdleTaskControllerScheduler scheduler_; - DISALLOW_COPY_AND_ASSIGN(MockScriptedIdleTaskControllerThread); -}; - -class MockScriptedIdleTaskControllerPlatform : public TestingPlatformSupport { - public: - MockScriptedIdleTaskControllerPlatform(bool should_yield) - : thread_(should_yield) {} - ~MockScriptedIdleTaskControllerPlatform() override = default; - WebThread* CurrentThread() override { return &thread_; } - - void RunIdleTask() { thread_.RunIdleTask(); } - bool HasIdleTask() const { return thread_.HasIdleTask(); } - - private: - MockScriptedIdleTaskControllerThread thread_; - DISALLOW_COPY_AND_ASSIGN(MockScriptedIdleTaskControllerPlatform); -}; - class MockIdleTask : public ScriptedIdleTaskController::IdleTask { public: MOCK_METHOD1(invoke, void(IdleDeadline*)); @@ -119,28 +90,34 @@ }; TEST_F(ScriptedIdleTaskControllerTest, RunCallback) { - ScopedTestingPlatformSupport<MockScriptedIdleTaskControllerPlatform, bool> - platform(false); + MockScriptedIdleTaskControllerScheduler scheduler(ShouldYield::DONT_YIELD); + ScopedTestingPlatformSupport<TestingPlatformSupportWithCustomScheduler, + ThreadScheduler*> + platform(&scheduler); + NullExecutionContext execution_context; ScriptedIdleTaskController* controller = ScriptedIdleTaskController::Create(execution_context_); Persistent<MockIdleTask> idle_task(new MockIdleTask()); IdleRequestOptions options; - EXPECT_FALSE(platform->HasIdleTask()); + EXPECT_FALSE(scheduler.HasIdleTask()); int id = controller->RegisterCallback(idle_task, options); - EXPECT_TRUE(platform->HasIdleTask()); + EXPECT_TRUE(scheduler.HasIdleTask()); EXPECT_NE(0, id); EXPECT_CALL(*idle_task, invoke(testing::_)); - platform->RunIdleTask(); + scheduler.RunIdleTask(); testing::Mock::VerifyAndClearExpectations(idle_task); - EXPECT_FALSE(platform->HasIdleTask()); + EXPECT_FALSE(scheduler.HasIdleTask()); } TEST_F(ScriptedIdleTaskControllerTest, DontRunCallbackWhenAskedToYield) { - ScopedTestingPlatformSupport<MockScriptedIdleTaskControllerPlatform, bool> - platform(true); + MockScriptedIdleTaskControllerScheduler scheduler(ShouldYield::YIELD); + ScopedTestingPlatformSupport<TestingPlatformSupportWithCustomScheduler, + ThreadScheduler*> + platform(&scheduler); + NullExecutionContext execution_context; ScriptedIdleTaskController* controller = ScriptedIdleTaskController::Create(execution_context_); @@ -151,11 +128,11 @@ EXPECT_NE(0, id); EXPECT_CALL(*idle_task, invoke(testing::_)).Times(0); - platform->RunIdleTask(); + scheduler.RunIdleTask(); testing::Mock::VerifyAndClearExpectations(idle_task); // The idle task should have been reposted. - EXPECT_TRUE(platform->HasIdleTask()); + EXPECT_TRUE(scheduler.HasIdleTask()); } } // namespace blink
diff --git a/third_party/blink/renderer/core/dom/shadow_root.cc b/third_party/blink/renderer/core/dom/shadow_root.cc index f0bd3ec17..9e76778 100644 --- a/third_party/blink/renderer/core/dom/shadow_root.cc +++ b/third_party/blink/renderer/core/dom/shadow_root.cc
@@ -74,6 +74,7 @@ type_(static_cast<unsigned short>(type)), registered_with_parent_shadow_root_(false), delegates_focus_(false), + slotting_(static_cast<unsigned short>(ShadowRootSlotting::kAuto)), needs_distribution_recalc_(false), unused_(0) { if (IsV0())
diff --git a/third_party/blink/renderer/core/dom/shadow_root.h b/third_party/blink/renderer/core/dom/shadow_root.h index fda1329..1a138ed3 100644 --- a/third_party/blink/renderer/core/dom/shadow_root.h +++ b/third_party/blink/renderer/core/dom/shadow_root.h
@@ -48,6 +48,8 @@ enum class ShadowRootType { V0, kOpen, kClosed, kUserAgent }; +enum class ShadowRootSlotting { kManual, kAuto }; + class CORE_EXPORT ShadowRoot final : public DocumentFragment, public TreeScope { DEFINE_WRAPPERTYPEINFO(); USING_GARBAGE_COLLECTED_MIXIN(ShadowRoot); @@ -156,6 +158,14 @@ void SetDelegatesFocus(bool flag) { delegates_focus_ = flag; } bool delegatesFocus() const { return delegates_focus_; } + void SetSlotting(ShadowRootSlotting slotting) { + slotting_ = static_cast<unsigned short>(slotting); + } + bool IsManualSlotting() { + return slotting_ == + static_cast<unsigned short>(ShadowRootSlotting::kManual); + } + bool ContainsShadowRoots() const { return child_shadow_root_count_; } StyleSheetList& StyleSheets(); @@ -187,8 +197,9 @@ unsigned short type_ : 2; unsigned short registered_with_parent_shadow_root_ : 1; unsigned short delegates_focus_ : 1; + unsigned short slotting_ : 1; unsigned short needs_distribution_recalc_ : 1; - unsigned short unused_ : 11; + unsigned short unused_ : 10; DISALLOW_COPY_AND_ASSIGN(ShadowRoot); };
diff --git a/third_party/blink/renderer/core/dom/shadow_root_init.idl b/third_party/blink/renderer/core/dom/shadow_root_init.idl index 6bba7b9..0857f2a 100644 --- a/third_party/blink/renderer/core/dom/shadow_root_init.idl +++ b/third_party/blink/renderer/core/dom/shadow_root_init.idl
@@ -5,8 +5,10 @@ // Spec: https://w3c.github.io/webcomponents/spec/shadow/#shadowrootinit-dictionary enum ShadowRootMode { "open", "closed" }; +enum ShadowRootSlottingMode { "manual", "auto" }; dictionary ShadowRootInit { required ShadowRootMode mode; boolean delegatesFocus; + [RuntimeEnabled=ManualSlotting] ShadowRootSlottingMode slotting; };
diff --git a/third_party/blink/renderer/core/editing/commands/apply_block_element_command.cc b/third_party/blink/renderer/core/editing/commands/apply_block_element_command.cc index 66199c9..c9744cbd 100644 --- a/third_party/blink/renderer/core/editing/commands/apply_block_element_command.cc +++ b/third_party/blink/renderer/core/editing/commands/apply_block_element_command.cc
@@ -94,9 +94,9 @@ VisibleSelection selection = SelectionForParagraphIteration(EndingVisibleSelection()); VisiblePosition start_of_selection = selection.VisibleStart(); + ABORT_EDITING_COMMAND_IF(start_of_selection.IsNull()); VisiblePosition end_of_selection = selection.VisibleEnd(); - DCHECK(!start_of_selection.IsNull()); - DCHECK(!end_of_selection.IsNull()); + ABORT_EDITING_COMMAND_IF(end_of_selection.IsNull()); ContainerNode* start_scope = nullptr; int start_index = IndexForVisiblePosition(start_of_selection, start_scope); ContainerNode* end_scope = nullptr;
diff --git a/third_party/blink/renderer/core/editing/commands/apply_block_element_command_test.cc b/third_party/blink/renderer/core/editing/commands/apply_block_element_command_test.cc index 17fe93c..a64a80f 100644 --- a/third_party/blink/renderer/core/editing/commands/apply_block_element_command_test.cc +++ b/third_party/blink/renderer/core/editing/commands/apply_block_element_command_test.cc
@@ -129,4 +129,20 @@ GetSelectionTextFromBody()); } +// https://crbug.com/873084 +TEST_F(ApplyBlockElementCommandTest, FormatBlockCrossingUserModifyBoundary) { + InsertStyleElement("*{-webkit-user-modify:read-write}"); + Selection().SetSelection( + SetSelectionTextToBody( + "^<b style=\"-webkit-user-modify:read-only\"><button></button></b>|"), + SetSelectionOptions()); + FormatBlockCommand* command = + FormatBlockCommand::Create(GetDocument(), HTMLNames::preTag); + // Shouldn't crash here. + EXPECT_FALSE(command->Apply()); + EXPECT_EQ( + "^<b style=\"-webkit-user-modify:read-only\"><button>|</button></b>", + GetSelectionTextFromBody()); +} + } // namespace blink
diff --git a/third_party/blink/renderer/core/editing/commands/split_text_node_command_test.cc b/third_party/blink/renderer/core/editing/commands/split_text_node_command_test.cc index 06478b1..25872e4b 100644 --- a/third_party/blink/renderer/core/editing/commands/split_text_node_command_test.cc +++ b/third_party/blink/renderer/core/editing/commands/split_text_node_command_test.cc
@@ -37,8 +37,8 @@ EditingState editingState; command->DoApply(&editingState); - Text* text1 = ToText(div->firstChild()); - Text* text2 = ToText(text1->nextSibling()); + const Text& text1 = ToText(*div->firstChild()); + const Text& text2 = ToText(*text1.nextSibling()); // The first marker should end up in text1, the second marker should be // truncated and end up text1, the third marker should end up in text2 @@ -60,7 +60,7 @@ // Test undo command->DoUnapply(); - Text* text = ToText(div->firstChild()); + const Text& text = ToText(*div->firstChild()); EXPECT_EQ(3u, GetDocument().Markers().MarkersFor(text).size()); @@ -78,21 +78,21 @@ // Test redo command->DoReapply(); - text1 = ToText(div->firstChild()); - text2 = ToText(text1->nextSibling()); + const Text& text3 = ToText(*div->firstChild()); + const Text& text4 = ToText(*text3.nextSibling()); - EXPECT_EQ(2u, GetDocument().Markers().MarkersFor(text1).size()); + EXPECT_EQ(2u, GetDocument().Markers().MarkersFor(text3).size()); - EXPECT_EQ(0u, GetDocument().Markers().MarkersFor(text1)[0]->StartOffset()); - EXPECT_EQ(5u, GetDocument().Markers().MarkersFor(text1)[0]->EndOffset()); + EXPECT_EQ(0u, GetDocument().Markers().MarkersFor(text3)[0]->StartOffset()); + EXPECT_EQ(5u, GetDocument().Markers().MarkersFor(text3)[0]->EndOffset()); - EXPECT_EQ(6u, GetDocument().Markers().MarkersFor(text1)[1]->StartOffset()); - EXPECT_EQ(7u, GetDocument().Markers().MarkersFor(text1)[1]->EndOffset()); + EXPECT_EQ(6u, GetDocument().Markers().MarkersFor(text3)[1]->StartOffset()); + EXPECT_EQ(7u, GetDocument().Markers().MarkersFor(text3)[1]->EndOffset()); - EXPECT_EQ(1u, GetDocument().Markers().MarkersFor(text2).size()); + EXPECT_EQ(1u, GetDocument().Markers().MarkersFor(text4).size()); - EXPECT_EQ(4u, GetDocument().Markers().MarkersFor(text2)[0]->StartOffset()); - EXPECT_EQ(9u, GetDocument().Markers().MarkersFor(text2)[0]->EndOffset()); + EXPECT_EQ(4u, GetDocument().Markers().MarkersFor(text4)[0]->StartOffset()); + EXPECT_EQ(9u, GetDocument().Markers().MarkersFor(text4)[0]->EndOffset()); } } // namespace blink
diff --git a/third_party/blink/renderer/core/editing/ime/input_method_controller_test.cc b/third_party/blink/renderer/core/editing/ime/input_method_controller_test.cc index d527039..292c578 100644 --- a/third_party/blink/renderer/core/editing/ime/input_method_controller_test.cc +++ b/third_party/blink/renderer/core/editing/ime/input_method_controller_test.cc
@@ -1480,13 +1480,13 @@ ASSERT_EQ(0u, GetDocument() .Markers() - .MarkersFor(ToText(first_line_position.ComputeContainerNode())) + .MarkersFor(ToText(*first_line_position.ComputeContainerNode())) .size()); - ASSERT_EQ(1u, - GetDocument() - .Markers() - .MarkersFor(ToText(second_line_position.ComputeContainerNode())) - .size()); + ASSERT_EQ( + 1u, GetDocument() + .Markers() + .MarkersFor(ToText(*second_line_position.ComputeContainerNode())) + .size()); // Verify marker has correct start/end offsets (measured from the beginning // of the node, which is the beginning of the line) @@ -1627,7 +1627,8 @@ // Check that the marker is still attached to "text" and doesn't include // either space around it EXPECT_EQ( - 1u, GetDocument().Markers().MarkersFor(ToText(div->firstChild())).size()); + 1u, + GetDocument().Markers().MarkersFor(ToText(*div->firstChild())).size()); EXPECT_STREQ("text", GetMarkedText(GetDocument().Markers(), div->firstChild(), 0) .Utf8() @@ -2414,14 +2415,14 @@ const DocumentMarkerVector& text1_markers = GetDocument().Markers().MarkersFor( - text1, DocumentMarker::MarkerTypes::Composition()); + *text1, DocumentMarker::MarkerTypes::Composition()); EXPECT_EQ(1u, text1_markers.size()); EXPECT_EQ(0u, text1_markers[0]->StartOffset()); EXPECT_EQ(1u, text1_markers[0]->EndOffset()); const DocumentMarkerVector& text2_markers = GetDocument().Markers().MarkersFor( - text2, DocumentMarker::MarkerTypes::Composition()); + *text2, DocumentMarker::MarkerTypes::Composition()); EXPECT_EQ(1u, text2_markers.size()); EXPECT_EQ(0u, text2_markers[0]->StartOffset()); EXPECT_EQ(3u, text2_markers[0]->EndOffset());
diff --git a/third_party/blink/renderer/core/editing/markers/document_marker_controller.cc b/third_party/blink/renderer/core/editing/markers/document_marker_controller.cc index a4b0cec7..4b83c72 100644 --- a/third_party/blink/renderer/core/editing/markers/document_marker_controller.cc +++ b/third_party/blink/renderer/core/editing/markers/document_marker_controller.cc
@@ -472,13 +472,13 @@ } DocumentMarkerVector DocumentMarkerController::MarkersFor( - const Text* node, + const Text& text, DocumentMarker::MarkerTypes marker_types) const { DocumentMarkerVector result; if (!PossiblyHasMarkers(marker_types)) return result; - MarkerLists* markers = markers_.at(node); + MarkerLists* markers = markers_.at(&text); if (!markers) return result; @@ -518,23 +518,23 @@ } DocumentMarkerVector DocumentMarkerController::ComputeMarkersToPaint( - const Text& node) const { + const Text& text) const { // We don't render composition or spelling markers that overlap suggestion // markers. // Note: DocumentMarkerController::MarkersFor() returns markers sorted by // start offset. const DocumentMarkerVector& suggestion_markers = - MarkersFor(&node, DocumentMarker::MarkerTypes::Suggestion()); + MarkersFor(text, DocumentMarker::MarkerTypes::Suggestion()); if (suggestion_markers.IsEmpty()) { // If there are no suggestion markers, we can return early as a minor // performance optimization. return MarkersFor( - &node, DocumentMarker::MarkerTypes::AllBut( - DocumentMarker::MarkerTypes(DocumentMarker::kSuggestion))); + text, DocumentMarker::MarkerTypes::AllBut( + DocumentMarker::MarkerTypes(DocumentMarker::kSuggestion))); } const DocumentMarkerVector& markers_overridden_by_suggestion_markers = - MarkersFor(&node, + MarkersFor(text, DocumentMarker::MarkerTypes(DocumentMarker::kComposition | DocumentMarker::kSpelling)); @@ -585,9 +585,9 @@ markers_to_paint.AppendVector(suggestion_markers); markers_to_paint.AppendVector(MarkersFor( - &node, DocumentMarker::MarkerTypes::AllBut(DocumentMarker::MarkerTypes( - DocumentMarker::kComposition | DocumentMarker::kSpelling | - DocumentMarker::kSuggestion)))); + text, DocumentMarker::MarkerTypes::AllBut(DocumentMarker::MarkerTypes( + DocumentMarker::kComposition | DocumentMarker::kSpelling | + DocumentMarker::kSuggestion)))); return markers_to_paint; }
diff --git a/third_party/blink/renderer/core/editing/markers/document_marker_controller.h b/third_party/blink/renderer/core/editing/markers/document_marker_controller.h index 288db67..129b913 100644 --- a/third_party/blink/renderer/core/editing/markers/document_marker_controller.h +++ b/third_party/blink/renderer/core/editing/markers/document_marker_controller.h
@@ -117,7 +117,7 @@ MarkersIntersectingRange(const EphemeralRangeInFlatTree&, DocumentMarker::MarkerTypes); DocumentMarkerVector MarkersFor( - const Text*, + const Text&, DocumentMarker::MarkerTypes = DocumentMarker::MarkerTypes::All()) const; DocumentMarkerVector Markers() const; DocumentMarkerVector ComputeMarkersToPaint(const Text&) const;
diff --git a/third_party/blink/renderer/core/editing/spellcheck/spell_checker.cc b/third_party/blink/renderer/core/editing/spellcheck/spell_checker.cc index a85d300..8f5857d8 100644 --- a/third_party/blink/renderer/core/editing/spellcheck/spell_checker.cc +++ b/third_party/blink/renderer/core/editing/spellcheck/spell_checker.cc
@@ -592,7 +592,7 @@ unsigned start_offset = static_cast<unsigned>(from); unsigned end_offset = static_cast<unsigned>(from + length); DocumentMarkerVector markers = - GetFrame().GetDocument()->Markers().MarkersFor(ToText(node)); + GetFrame().GetDocument()->Markers().MarkersFor(ToText(*node)); for (size_t i = 0; i < markers.size(); ++i) { DocumentMarker* marker = markers[i]; if (marker->StartOffset() <= start_offset &&
diff --git a/third_party/blink/renderer/core/editing/suggestion/text_suggestion_controller_test.cc b/third_party/blink/renderer/core/editing/suggestion/text_suggestion_controller_test.cc index d9167561..f288cb3 100644 --- a/third_party/blink/renderer/core/editing/suggestion/text_suggestion_controller_test.cc +++ b/third_party/blink/renderer/core/editing/suggestion/text_suggestion_controller_test.cc
@@ -120,7 +120,7 @@ // This returns the markers sorted by start offset; we need them sorted by // start *and* end offset, since we have multiple markers starting at 0. - DocumentMarkerVector markers = GetDocument().Markers().MarkersFor(text); + DocumentMarkerVector markers = GetDocument().Markers().MarkersFor(*text); std::sort(markers.begin(), markers.end(), [](const DocumentMarker* marker1, const DocumentMarker* marker2) { if (marker1->StartOffset() != marker2->StartOffset()) @@ -183,7 +183,7 @@ // Check the tag for the marker that was just added (the current tag value is // not reset between test cases). int32_t marker_tag = - ToSuggestionMarker(GetDocument().Markers().MarkersFor(text)[0])->Tag(); + ToSuggestionMarker(GetDocument().Markers().MarkersFor(*text)[0])->Tag(); // Select immediately before "mispelled". GetDocument().GetFrame()->Selection().SetSelectionAndEndTyping( @@ -195,7 +195,7 @@ GetDocument().GetFrame()->GetTextSuggestionController().ApplyTextSuggestion( marker_tag, 0); - EXPECT_EQ(0u, GetDocument().Markers().MarkersFor(text).size()); + EXPECT_EQ(0u, GetDocument().Markers().MarkersFor(*text).size()); EXPECT_EQ("misspelled", text->textContent()); }
diff --git a/third_party/blink/renderer/core/events/event_type_names.json5 b/third_party/blink/renderer/core/events/event_type_names.json5 index 959a714..28388eda 100644 --- a/third_party/blink/renderer/core/events/event_type_names.json5 +++ b/third_party/blink/renderer/core/events/event_type_names.json5
@@ -40,8 +40,8 @@ "availablechange", "backgroundfetchabort", "backgroundfetchclick", - "backgroundfetched", "backgroundfetchfail", + "backgroundfetchsuccess", "beforecopy", "beforecut", "beforeinput",
diff --git a/third_party/blink/renderer/core/events/wheel_event.cc b/third_party/blink/renderer/core/events/wheel_event.cc index 3b1ce775..7ab79e5a 100644 --- a/third_party/blink/renderer/core/events/wheel_event.cc +++ b/third_party/blink/renderer/core/events/wheel_event.cc
@@ -119,8 +119,12 @@ void WheelEvent::preventDefault() { MouseEvent::preventDefault(); - if (HandlingPassive() == PassiveMode::kNotPassiveDefault && currentTarget() && - currentTarget()->IsTopLevelNode()) { + if (!currentTarget() || !currentTarget()->IsTopLevelNode()) + return; + + PassiveMode passive_mode = HandlingPassive(); + if (passive_mode == PassiveMode::kPassiveForcedDocumentLevel || + passive_mode == PassiveMode::kNotPassiveDefault) { if (ExecutionContext* context = currentTarget()->GetExecutionContext()) { UseCounter::Count( context,
diff --git a/third_party/blink/renderer/core/exported/BUILD.gn b/third_party/blink/renderer/core/exported/BUILD.gn index 2e6006a..6b0519c 100644 --- a/third_party/blink/renderer/core/exported/BUILD.gn +++ b/third_party/blink/renderer/core/exported/BUILD.gn
@@ -28,8 +28,6 @@ "web_dom_message_event.cc", "web_element.cc", "web_element_collection.cc", - "web_file_chooser_completion_impl.cc", - "web_file_chooser_completion_impl.h", "web_form_control_element.cc", "web_form_element.cc", "web_form_element_observer_impl.cc",
diff --git a/third_party/blink/renderer/core/exported/web_file_chooser_completion_impl.cc b/third_party/blink/renderer/core/exported/web_file_chooser_completion_impl.cc deleted file mode 100644 index 16d1e6f..0000000 --- a/third_party/blink/renderer/core/exported/web_file_chooser_completion_impl.cc +++ /dev/null
@@ -1,82 +0,0 @@ -/* - * Copyright (C) 2009 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#include "third_party/blink/renderer/core/exported/web_file_chooser_completion_impl.h" - -#include "third_party/blink/renderer/core/page/chrome_client_impl.h" -#include "third_party/blink/renderer/platform/file_metadata.h" -#include "third_party/blink/renderer/platform/wtf/date_math.h" - -namespace blink { - -WebFileChooserCompletionImpl::WebFileChooserCompletionImpl( - scoped_refptr<FileChooser> chooser, - ChromeClientImpl* chrome_client) - : file_chooser_(std::move(chooser)), chrome_client_impl_(chrome_client) {} - -WebFileChooserCompletionImpl::~WebFileChooserCompletionImpl() = default; - -void WebFileChooserCompletionImpl::DidChooseFile( - const WebVector<WebString>& file_names) { - Vector<FileChooserFileInfo> file_info; - for (size_t i = 0; i < file_names.size(); ++i) - file_info.push_back(FileChooserFileInfo(file_names[i])); - file_chooser_->ChooseFiles(file_info); - if (chrome_client_impl_) - chrome_client_impl_->DidCompleteFileChooser(*this); - // This object is no longer needed. - delete this; -} - -void WebFileChooserCompletionImpl::DidChooseFile( - const WebVector<SelectedFileInfo>& files) { - Vector<FileChooserFileInfo> file_info; - for (size_t i = 0; i < files.size(); ++i) { - if (files[i].file_system_url.IsEmpty()) { - file_info.push_back( - FileChooserFileInfo(files[i].path, files[i].display_name)); - } else { - FileMetadata metadata; - metadata.modification_time = files[i].modification_time * kMsPerSecond; - metadata.length = files[i].length; - metadata.type = files[i].is_directory ? FileMetadata::kTypeDirectory - : FileMetadata::kTypeFile; - file_info.push_back( - FileChooserFileInfo(files[i].file_system_url, metadata)); - } - } - file_chooser_->ChooseFiles(file_info); - if (chrome_client_impl_) - chrome_client_impl_->DidCompleteFileChooser(*this); - // This object is no longer needed. - delete this; -} - -} // namespace blink
diff --git a/third_party/blink/renderer/core/exported/web_file_chooser_completion_impl.h b/third_party/blink/renderer/core/exported/web_file_chooser_completion_impl.h deleted file mode 100644 index 17b0ef3..0000000 --- a/third_party/blink/renderer/core/exported/web_file_chooser_completion_impl.h +++ /dev/null
@@ -1,69 +0,0 @@ -/* - * Copyright (C) 2009 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#ifndef THIRD_PARTY_BLINK_RENDERER_CORE_EXPORTED_WEB_FILE_CHOOSER_COMPLETION_IMPL_H_ -#define THIRD_PARTY_BLINK_RENDERER_CORE_EXPORTED_WEB_FILE_CHOOSER_COMPLETION_IMPL_H_ - -#include "base/memory/scoped_refptr.h" -#include "third_party/blink/public/platform/web_string.h" -#include "third_party/blink/public/platform/web_vector.h" -#include "third_party/blink/public/web/web_file_chooser_completion.h" -#include "third_party/blink/renderer/core/core_export.h" -#include "third_party/blink/renderer/core/html/forms/file_chooser.h" - -namespace blink { - -class ChromeClientImpl; -class LocalFrame; - -class CORE_EXPORT WebFileChooserCompletionImpl final - : public WebFileChooserCompletion { - public: - explicit WebFileChooserCompletionImpl( - scoped_refptr<FileChooser> chooser, - ChromeClientImpl* chrome_client = nullptr); - ~WebFileChooserCompletionImpl() override; - void DidChooseFile(const WebVector<WebString>& file_names) override; - void DidChooseFile(const WebVector<SelectedFileInfo>& files) override; - - const WebFileChooserParams& Params() const { return file_chooser_->Params(); } - LocalFrame* FrameOrNull() const { return file_chooser_->FrameOrNull(); } - - private: - scoped_refptr<FileChooser> file_chooser_; - - // chrome_client_impl_ is nullptr in a case of - // EnumerateChosenDirectory(). We don't need to call back ChromeClientImpl. - Persistent<ChromeClientImpl> chrome_client_impl_; -}; - -} // namespace blink - -#endif
diff --git a/third_party/blink/renderer/core/exported/web_frame_test.cc b/third_party/blink/renderer/core/exported/web_frame_test.cc index 4f1ab2d..73260439 100644 --- a/third_party/blink/renderer/core/exported/web_frame_test.cc +++ b/third_party/blink/renderer/core/exported/web_frame_test.cc
@@ -328,7 +328,7 @@ int node_count = 0; for (Node& node : range.Nodes()) { const DocumentMarkerVector& markers_in_node = - document->Markers().MarkersFor(ToText(&node), marker_types); + document->Markers().MarkersFor(ToText(node), marker_types); node_count += std::count_if( markers_in_node.begin(), markers_in_node.end(), [start_offset, end_offset, &node, &start_container,
diff --git a/third_party/blink/renderer/core/fileapi/file_reader_loader.cc b/third_party/blink/renderer/core/fileapi/file_reader_loader.cc index 88fa2d4..6bf6e8d 100644 --- a/third_party/blink/renderer/core/fileapi/file_reader_loader.cc +++ b/third_party/blink/renderer/core/fileapi/file_reader_loader.cc
@@ -365,7 +365,14 @@ FailureType::kMojoPipeUnexpectedReadError); return; } + + auto weak_this = weak_factory_.GetWeakPtr(); OnReceivedData(static_cast<const char*>(buffer), num_bytes); + // OnReceivedData calls out to our client, which could delete |this|, so + // bail out if that happened. + if (!weak_this) + return; + consumer_handle_->EndReadData(num_bytes); if (BytesLoaded() >= total_bytes_) { received_all_data_ = true;
diff --git a/third_party/blink/renderer/core/frame/BUILD.gn b/third_party/blink/renderer/core/frame/BUILD.gn index faf80c78..bfc0c63 100644 --- a/third_party/blink/renderer/core/frame/BUILD.gn +++ b/third_party/blink/renderer/core/frame/BUILD.gn
@@ -51,6 +51,7 @@ "event_handler_registry.cc", "event_handler_registry.h", "external.h", + "feature_policy_violation_report_body.h", "find_in_page.cc", "find_in_page.h", "frame.cc",
diff --git a/third_party/blink/renderer/core/frame/deprecation.cc b/third_party/blink/renderer/core/frame/deprecation.cc index 7e425b0..0b8d442 100644 --- a/third_party/blink/renderer/core/frame/deprecation.cc +++ b/third_party/blink/renderer/core/frame/deprecation.cc
@@ -501,9 +501,9 @@ "in a `.css` file extension.")}; case WebFeature::kCreateObjectURLMediaStream: - return {"CreateObjectURLMediaStreamDeprecated", kM69, + return {"CreateObjectURLMediaStreamDeprecated", kM71, ReplacedWillBeRemoved("URL.createObjectURL with media streams", - "HTMLMediaElement.srcObject", kM69, + "HTMLMediaElement.srcObject", kM71, "5618491470118912")}; case WebFeature::kChromeLoadTimesRequestTime:
diff --git a/third_party/blink/renderer/core/frame/feature_policy_violation_report_body.h b/third_party/blink/renderer/core/frame/feature_policy_violation_report_body.h new file mode 100644 index 0000000..b0a54f2e --- /dev/null +++ b/third_party/blink/renderer/core/frame/feature_policy_violation_report_body.h
@@ -0,0 +1,32 @@ +// 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 THIRD_PARTY_BLINK_RENDERER_CORE_FRAME_FEATURE_POLICY_VIOLATION_REPORT_BODY_H_ +#define THIRD_PARTY_BLINK_RENDERER_CORE_FRAME_FEATURE_POLICY_VIOLATION_REPORT_BODY_H_ + +#include "third_party/blink/renderer/bindings/core/v8/source_location.h" +#include "third_party/blink/renderer/core/frame/message_report_body.h" + +namespace blink { + +class CORE_EXPORT FeaturePolicyViolationReportBody : public MessageReportBody { + DEFINE_WRAPPERTYPEINFO(); + + public: + FeaturePolicyViolationReportBody(const String& feature, + const String& message, + std::unique_ptr<SourceLocation> location) + : MessageReportBody(message, std::move(location)), feature_(feature) {} + + String feature() const { return feature_; } + + ~FeaturePolicyViolationReportBody() override = default; + + private: + const String feature_; +}; + +} // namespace blink + +#endif // THIRD_PARTY_BLINK_RENDERER_CORE_FRAME_FEATURE_POLICY_VIOLATION_REPORT_BODY_H_
diff --git a/third_party/blink/renderer/core/frame/feature_policy_violation_report_body.idl b/third_party/blink/renderer/core/frame/feature_policy_violation_report_body.idl new file mode 100644 index 0000000..16cd1a01 --- /dev/null +++ b/third_party/blink/renderer/core/frame/feature_policy_violation_report_body.idl
@@ -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. + +// https://github.com/WICG/reporting/blob/master/EXPLAINER.md#reportingobserver---observing-reports-from-javascript + +[ + NoInterfaceObject, + RuntimeEnabled=ReportingObserver +] interface FeaturePolicyViolationReportBody : ReportBody { + readonly attribute DOMString feature; + readonly attribute DOMString message; + readonly attribute DOMString? sourceFile; + readonly attribute unsigned long? lineNumber; + readonly attribute unsigned long? columnNumber; +};
diff --git a/third_party/blink/renderer/core/frame/frame.cc b/third_party/blink/renderer/core/frame/frame.cc index 660c3ac0..2e50c68 100644 --- a/third_party/blink/renderer/core/frame/frame.cc +++ b/third_party/blink/renderer/core/frame/frame.cc
@@ -248,14 +248,18 @@ : UserGestureIndicator::ConsumeUserGesture(); } -bool Frame::IsFeatureEnabled(mojom::FeaturePolicyFeature feature) const { +bool Frame::IsFeatureEnabled(mojom::FeaturePolicyFeature feature, + ReportOptions report_on_failure) const { FeaturePolicy* feature_policy = GetSecurityContext()->GetFeaturePolicy(); // The policy should always be initialized before checking it to ensure we // properly inherit the parent policy. DCHECK(feature_policy); - // Otherwise, check policy. - return feature_policy->IsFeatureEnabled(feature); + if (feature_policy->IsFeatureEnabled(feature)) + return true; + if (report_on_failure == ReportOptions::kReportOnFailure) + ReportFeaturePolicyViolation(feature); + return false; } void Frame::SetOwner(FrameOwner* owner) {
diff --git a/third_party/blink/renderer/core/frame/frame.h b/third_party/blink/renderer/core/frame/frame.h index 566e985..1e11f07 100644 --- a/third_party/blink/renderer/core/frame/frame.h +++ b/third_party/blink/renderer/core/frame/frame.h
@@ -71,6 +71,10 @@ // Status of user gesture. enum class UserGestureStatus { kActive, kNone }; +// Whether to report policy violations when checking whether a feature is +// enabled. +enum class ReportOptions { kReportOnFailure, kDoNotReport }; + // Frame is the base class of LocalFrame and RemoteFrame and should only contain // functionality shared between both. In particular, any method related to // input, layout, or painting probably belongs on LocalFrame. @@ -223,9 +227,15 @@ return lifecycle_.GetState() == FrameLifecycle::kAttached; } - // Tests whether the feature-policy controlled feature is enabled by policy in - // the given frame. - bool IsFeatureEnabled(mojom::FeaturePolicyFeature) const; + // Tests whether the policy-controlled feature is enabled in this frame. + // Optionally sends a report to any registered reporting observers or + // Report-To endpoints, via ReportFeaturePolicyViolation(), if the feature is + // disabled. + bool IsFeatureEnabled( + mojom::FeaturePolicyFeature, + ReportOptions report_on_failure = ReportOptions::kDoNotReport) const; + virtual void ReportFeaturePolicyViolation(mojom::FeaturePolicyFeature) const { + } // Called to make a frame inert or non-inert. A frame is inert when there // is a modal dialog displayed within an ancestor frame, and this frame
diff --git a/third_party/blink/renderer/core/frame/local_frame.cc b/third_party/blink/renderer/core/frame/local_frame.cc index f42e6fde..4aa9798 100644 --- a/third_party/blink/renderer/core/frame/local_frame.cc +++ b/third_party/blink/renderer/core/frame/local_frame.cc
@@ -33,12 +33,14 @@ #include <memory> #include "services/network/public/cpp/features.h" +#include "services/service_manager/public/cpp/connector.h" #include "services/service_manager/public/cpp/interface_provider.h" #include "third_party/blink/public/platform/interface_provider.h" #include "third_party/blink/public/platform/interface_registry.h" #include "third_party/blink/public/platform/scheduler/web_resource_loading_task_runner_handle.h" #include "third_party/blink/public/platform/web_url_request.h" #include "third_party/blink/renderer/bindings/core/v8/script_controller.h" +#include "third_party/blink/renderer/bindings/core/v8/source_location.h" #include "third_party/blink/renderer/core/CoreProbeSink.h" #include "third_party/blink/renderer/core/aom/computed_accessible_node.h" #include "third_party/blink/renderer/core/core_initializer.h" @@ -59,11 +61,14 @@ #include "third_party/blink/renderer/core/frame/ad_tracker.h" #include "third_party/blink/renderer/core/frame/content_settings_client.h" #include "third_party/blink/renderer/core/frame/event_handler_registry.h" +#include "third_party/blink/renderer/core/frame/feature_policy_violation_report_body.h" #include "third_party/blink/renderer/core/frame/frame_console.h" #include "third_party/blink/renderer/core/frame/local_dom_window.h" #include "third_party/blink/renderer/core/frame/local_frame_client.h" #include "third_party/blink/renderer/core/frame/local_frame_view.h" #include "third_party/blink/renderer/core/frame/performance_monitor.h" +#include "third_party/blink/renderer/core/frame/report.h" +#include "third_party/blink/renderer/core/frame/reporting_context.h" #include "third_party/blink/renderer/core/frame/settings.h" #include "third_party/blink/renderer/core/html/html_frame_element_base.h" #include "third_party/blink/renderer/core/html/html_plugin_element.h" @@ -1415,4 +1420,34 @@ return document->UkmSourceID(); } +const mojom::blink::ReportingServiceProxyPtr& LocalFrame::GetReportingService() + const { + if (!reporting_service_) { + Platform::Current()->GetConnector()->BindInterface( + Platform::Current()->GetBrowserServiceName(), &reporting_service_); + } + return reporting_service_; +} + +void LocalFrame::ReportFeaturePolicyViolation( + mojom::FeaturePolicyFeature feature) const { + const String& feature_name = GetNameForFeature(feature); + FeaturePolicyViolationReportBody* body = new FeaturePolicyViolationReportBody( + feature_name, "Feature policy violation", SourceLocation::Capture()); + Report* report = + new Report("feature-policy", GetDocument()->Url().GetString(), body); + ReportingContext::From(GetDocument())->QueueReport(report); + + bool is_null; + int line_number = body->lineNumber(is_null); + line_number = is_null ? 0 : line_number; + int column_number = body->columnNumber(is_null); + column_number = is_null ? 0 : column_number; + + // Send the feature policy violation report to the Reporting API. + GetReportingService()->QueueFeaturePolicyViolationReport( + GetDocument()->Url(), feature_name, "Feature policy violation", + body->sourceFile(), line_number, column_number); +} + } // namespace blink
diff --git a/third_party/blink/renderer/core/frame/local_frame.h b/third_party/blink/renderer/core/frame/local_frame.h index 034267c1..de77c5ec 100644 --- a/third_party/blink/renderer/core/frame/local_frame.h +++ b/third_party/blink/renderer/core/frame/local_frame.h
@@ -35,6 +35,7 @@ #include "mojo/public/cpp/bindings/strong_binding_set.h" #include "third_party/blink/public/mojom/loader/pause_subresource_loading_handle.mojom-blink.h" #include "third_party/blink/public/mojom/loader/previews_resource_loading_hints.mojom-blink.h" +#include "third_party/blink/public/platform/reporting.mojom-blink.h" #include "third_party/blink/public/platform/task_type.h" #include "third_party/blink/renderer/core/accessibility/axid.h" #include "third_party/blink/renderer/core/core_export.h" @@ -369,6 +370,8 @@ SmoothScrollSequencer& GetSmoothScrollSequencer(); + void ReportFeaturePolicyViolation(mojom::FeaturePolicyFeature) const override; + private: friend class FrameNavigationDisabler; @@ -403,6 +406,8 @@ ukm::UkmRecorder* GetUkmRecorder() override; ukm::SourceId GetUkmSourceId() override; + const mojom::blink::ReportingServiceProxyPtr& GetReportingService() const; + std::unique_ptr<FrameScheduler> frame_scheduler_; // Holds all PauseSubresourceLoadingHandles allowing either |this| to delete @@ -457,6 +462,9 @@ Member<SmoothScrollSequencer> smooth_scroll_sequencer_; InterfaceRegistry* const interface_registry_; + // This is declared mutable so that the service endpoint can be cached by + // const methods. + mutable mojom::blink::ReportingServiceProxyPtr reporting_service_; IntRect remote_viewport_intersection_; std::unique_ptr<FrameResourceCoordinator> frame_resource_coordinator_;
diff --git a/third_party/blink/renderer/core/frame/reporting_observer.cc b/third_party/blink/renderer/core/frame/reporting_observer.cc index feb763a..9147f97f 100644 --- a/third_party/blink/renderer/core/frame/reporting_observer.cc +++ b/third_party/blink/renderer/core/frame/reporting_observer.cc
@@ -24,9 +24,15 @@ ReportingObserver::ReportingObserver(ExecutionContext* execution_context, V8ReportingObserverCallback* callback, ReportingObserverOptions options) - : execution_context_(execution_context), + : ContextClient(execution_context), + execution_context_(execution_context), callback_(callback), - options_(options) {} + options_(options), + registered_(false) {} + +bool ReportingObserver::HasPendingActivity() const { + return registered_; +} void ReportingObserver::ReportToCallback() { // The reports queued to be sent to callbacks are copied (and cleared) before @@ -66,10 +72,12 @@ } void ReportingObserver::observe() { + registered_ = true; ReportingContext::From(execution_context_)->RegisterObserver(this); } void ReportingObserver::disconnect() { + registered_ = false; ReportingContext::From(execution_context_)->UnregisterObserver(this); } @@ -84,6 +92,7 @@ visitor->Trace(callback_); visitor->Trace(report_queue_); ScriptWrappable::Trace(visitor); + ContextClient::Trace(visitor); } } // namespace blink
diff --git a/third_party/blink/renderer/core/frame/reporting_observer.h b/third_party/blink/renderer/core/frame/reporting_observer.h index da46280a..4f358dc 100644 --- a/third_party/blink/renderer/core/frame/reporting_observer.h +++ b/third_party/blink/renderer/core/frame/reporting_observer.h
@@ -5,11 +5,11 @@ #ifndef THIRD_PARTY_BLINK_RENDERER_CORE_FRAME_REPORTING_OBSERVER_H_ #define THIRD_PARTY_BLINK_RENDERER_CORE_FRAME_REPORTING_OBSERVER_H_ +#include "third_party/blink/renderer/bindings/core/v8/active_script_wrappable.h" #include "third_party/blink/renderer/bindings/core/v8/v8_reporting_observer_callback.h" #include "third_party/blink/renderer/core/core_export.h" #include "third_party/blink/renderer/core/frame/report.h" #include "third_party/blink/renderer/core/frame/reporting_observer_options.h" -#include "third_party/blink/renderer/platform/bindings/script_wrappable.h" #include "third_party/blink/renderer/platform/wtf/vector.h" namespace blink { @@ -17,7 +17,11 @@ class ExecutionContext; class Report; -class CORE_EXPORT ReportingObserver final : public ScriptWrappable { +class CORE_EXPORT ReportingObserver final + : public ScriptWrappable, + public ActiveScriptWrappable<ReportingObserver>, + public ContextClient { + USING_GARBAGE_COLLECTED_MIXIN(ReportingObserver); DEFINE_WRAPPERTYPEINFO(); public: @@ -25,6 +29,9 @@ V8ReportingObserverCallback*, ReportingObserverOptions); + // ActiveScriptWrappable + bool HasPendingActivity() const final; + // Call the callback with all reports in |report_queue_|. void ReportToCallback(); @@ -54,9 +61,10 @@ ReportingObserverOptions); Member<ExecutionContext> execution_context_; - Member<V8ReportingObserverCallback> callback_; + TraceWrapperMember<V8ReportingObserverCallback> callback_; ReportingObserverOptions options_; HeapVector<Member<Report>> report_queue_; + bool registered_; }; } // namespace blink
diff --git a/third_party/blink/renderer/core/frame/reporting_observer.idl b/third_party/blink/renderer/core/frame/reporting_observer.idl index 9675882..0d273ae 100644 --- a/third_party/blink/renderer/core/frame/reporting_observer.idl +++ b/third_party/blink/renderer/core/frame/reporting_observer.idl
@@ -2,13 +2,14 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -// https://github.com/WICG/reporting/blob/master/EXPLAINER.md#reportingobserver---observing-reports-from-javascript +// https://w3c.github.io/reporting/#interface-reporting-observer callback ReportingObserverCallback = void (sequence<Report> reports, ReportingObserver observer); [ Constructor(ReportingObserverCallback callback, optional ReportingObserverOptions options), ConstructorCallWith=ExecutionContext, + ActiveScriptWrappable, RuntimeEnabled=ReportingObserver ] interface ReportingObserver { void observe();
diff --git a/third_party/blink/renderer/core/frame/window.idl b/third_party/blink/renderer/core/frame/window.idl index 66a5f34..2c02f77e 100644 --- a/third_party/blink/renderer/core/frame/window.idl +++ b/third_party/blink/renderer/core/frame/window.idl
@@ -102,7 +102,7 @@ [CrossOrigin, CallWith=CurrentWindow, RaisesException] void postMessage(any message, USVString targetOrigin, optional sequence<object> transfer = []); - [CrossOrigin, CallWith=CurrentWindow, RaisesException, RuntimeEnabled=WindowPostMessageOptions] void postMessage(any message, optional WindowPostMessageOptions options); + [CrossOrigin, CallWith=CurrentWindow, RaisesException, RuntimeEnabled=PostMessageOptions] void postMessage(any message, optional WindowPostMessageOptions options); // Custom elements // https://w3c.github.io/webcomponents/spec/custom/#custom-elements-api
diff --git a/third_party/blink/renderer/core/html/canvas/canvas_async_blob_creator.cc b/third_party/blink/renderer/core/html/canvas/canvas_async_blob_creator.cc index 5f8b5e90..d67b997 100644 --- a/third_party/blink/renderer/core/html/canvas/canvas_async_blob_creator.cc +++ b/third_party/blink/renderer/core/html/canvas/canvas_async_blob_creator.cc
@@ -71,33 +71,6 @@ deadline - row_encode_time_delta - kEncodeRowSlackBeforeDeadline; } -String ConvertMimeTypeEnumToString(ImageEncoder::MimeType mime_type_enum) { - switch (mime_type_enum) { - case ImageEncoder::kMimeTypePng: - return "image/png"; - case ImageEncoder::kMimeTypeJpeg: - return "image/jpeg"; - case ImageEncoder::kMimeTypeWebp: - return "image/webp"; - default: - return "image/unknown"; - } -} - -ImageEncoder::MimeType ConvertMimeTypeStringToEnum(const String& mime_type) { - ImageEncoder::MimeType mime_type_enum; - if (mime_type == "image/png") { - mime_type_enum = ImageEncoder::kMimeTypePng; - } else if (mime_type == "image/jpeg") { - mime_type_enum = ImageEncoder::kMimeTypeJpeg; - } else if (mime_type == "image/webp") { - mime_type_enum = ImageEncoder::kMimeTypeWebp; - } else { - mime_type_enum = ImageEncoder::kNumberOfMimeTypeSupported; - } - return mime_type_enum; -} - void RecordIdleTaskStatusHistogram( CanvasAsyncBlobCreator::IdleTaskStatus status) { DEFINE_THREAD_SAFE_STATIC_LOCAL(EnumerationHistogram, @@ -117,44 +90,44 @@ }; void RecordElapsedTimeHistogram(ElapsedTimeHistogramType type, - ImageEncoder::MimeType mime_type, + ImageEncodingMimeType mime_type, TimeDelta elapsed_time) { if (type == kInitiateEncodingDelay) { - if (mime_type == ImageEncoder::kMimeTypePng) { + if (mime_type == kMimeTypePng) { DEFINE_THREAD_SAFE_STATIC_LOCAL( CustomCountHistogram, to_blob_png_initiate_encoding_counter, ("Blink.Canvas.ToBlob.InitiateEncodingDelay.PNG", 0, 10000000, 50)); to_blob_png_initiate_encoding_counter.CountMicroseconds(elapsed_time); - } else if (mime_type == ImageEncoder::kMimeTypeJpeg) { + } else if (mime_type == kMimeTypeJpeg) { DEFINE_THREAD_SAFE_STATIC_LOCAL( CustomCountHistogram, to_blob_jpeg_initiate_encoding_counter, ("Blink.Canvas.ToBlob.InitiateEncodingDelay.JPEG", 0, 10000000, 50)); to_blob_jpeg_initiate_encoding_counter.CountMicroseconds(elapsed_time); } } else if (type == kCompleteEncodingDelay) { - if (mime_type == ImageEncoder::kMimeTypePng) { + if (mime_type == kMimeTypePng) { DEFINE_THREAD_SAFE_STATIC_LOCAL( CustomCountHistogram, to_blob_png_idle_encode_counter, ("Blink.Canvas.ToBlob.CompleteEncodingDelay.PNG", 0, 10000000, 50)); to_blob_png_idle_encode_counter.CountMicroseconds(elapsed_time); - } else if (mime_type == ImageEncoder::kMimeTypeJpeg) { + } else if (mime_type == kMimeTypeJpeg) { DEFINE_THREAD_SAFE_STATIC_LOCAL( CustomCountHistogram, to_blob_jpeg_idle_encode_counter, ("Blink.Canvas.ToBlob.CompleteEncodingDelay.JPEG", 0, 10000000, 50)); to_blob_jpeg_idle_encode_counter.CountMicroseconds(elapsed_time); } } else if (type == kToBlobDuration) { - if (mime_type == ImageEncoder::kMimeTypePng) { + if (mime_type == kMimeTypePng) { DEFINE_THREAD_SAFE_STATIC_LOCAL( CustomCountHistogram, to_blob_png_counter, ("Blink.Canvas.ToBlobDuration.PNG", 0, 10000000, 50)); to_blob_png_counter.CountMicroseconds(elapsed_time); - } else if (mime_type == ImageEncoder::kMimeTypeJpeg) { + } else if (mime_type == kMimeTypeJpeg) { DEFINE_THREAD_SAFE_STATIC_LOCAL( CustomCountHistogram, to_blob_jpeg_counter, ("Blink.Canvas.ToBlobDuration.JPEG", 0, 10000000, 50)); to_blob_jpeg_counter.CountMicroseconds(elapsed_time); - } else if (mime_type == ImageEncoder::kMimeTypeWebp) { + } else if (mime_type == kMimeTypeWebp) { DEFINE_THREAD_SAFE_STATIC_LOCAL( CustomCountHistogram, to_blob_webp_counter, ("Blink.Canvas.ToBlobDuration.WEBP", 0, 10000000, 50)); @@ -167,13 +140,13 @@ CanvasAsyncBlobCreator* CanvasAsyncBlobCreator::Create( scoped_refptr<StaticBitmapImage> image, - const String& mime_type, + const ImageEncodingMimeType mime_type, V8BlobCallback* callback, ToBlobFunctionType function_type, TimeTicks start_time, ExecutionContext* context) { ImageEncodeOptions options; - options.setType(mime_type); + options.setType(ImageEncodingMimeTypeName(mime_type)); return new CanvasAsyncBlobCreator(image, options, function_type, callback, start_time, context, nullptr); } @@ -209,10 +182,9 @@ script_promise_resolver_(resolver) { DCHECK(image); - String mime_type_string = ImageEncoderUtils::ToEncodingMimeType( + mime_type_ = ImageEncoderUtils::ToEncodingMimeType( encode_options_.type(), ImageEncoderUtils::kEncodeReasonConvertToBlobPromise); - mime_type_ = ConvertMimeTypeStringToEnum(mime_type_string); // We use pixmap to access the image pixels. Make the image unaccelerated if // necessary. @@ -273,7 +245,7 @@ // 16 bpc PNG, we need to ensure the color type of the pixmap is // kRGBA_F16_SkColorType to kick in 16 bit encoding in SkPngEncoder. Since // SkPixmap only holds a pointer to data, we need a helper data member here. - if (mime_type_ == ImageEncoder::kMimeTypePng && + if (mime_type_ == kMimeTypePng && encode_options_.pixelFormat() == kRGBA16ImagePixelFormatName && src_data_.colorType() == kN32_SkColorType) { size_t data_length = src_data_.width() * src_data_.height() * @@ -333,9 +305,9 @@ } ImageEncodeOptions CanvasAsyncBlobCreator::GetImageEncodeOptionsForMimeType( - ImageEncoder::MimeType mime_type) { + ImageEncodingMimeType mime_type) { ImageEncodeOptions encode_options; - encode_options.setType(ConvertMimeTypeEnumToString(mime_type)); + encode_options.setType(ImageEncodingMimeTypeName(mime_type)); return encode_options; } @@ -343,8 +315,7 @@ std::unique_ptr<ImageDataBuffer> buffer = ImageDataBuffer::Create(src_data_); if (!buffer) return false; - return buffer->EncodeImage(ConvertMimeTypeEnumToString(mime_type_), quality, - &encoded_image_); + return buffer->EncodeImage(mime_type_, quality, &encoded_image_); } void CanvasAsyncBlobCreator::ScheduleAsyncBlobCreation(const double& quality) { @@ -361,7 +332,7 @@ // and result in timeouts on different tests. We use // enforce_idle_encoding_for_test_ to test idle encoding in unit tests. bool use_idle_encoding = - (mime_type_ != ImageEncoder::kMimeTypeWebp) && + (mime_type_ != kMimeTypeWebp) && (enforce_idle_encoding_for_test_ || !RuntimeEnabledFeatures::NoIdleEncodingForLayoutTestsEnabled()); @@ -503,7 +474,7 @@ WTF::CurrentTimeTicks() - start_time_); Blob* result_blob = Blob::Create(encoded_image_.data(), encoded_image_.size(), - ConvertMimeTypeEnumToString(mime_type_)); + ImageEncodingMimeTypeName(mime_type_)); if (function_type_ == kHTMLCanvasToBlobCallback) { context_->GetTaskRunner(TaskType::kCanvasBlobSerialization) ->PostTask(FROM_HERE, @@ -558,7 +529,7 @@ // This is solely used for unit tests. if (fail_encoder_initialization_for_test_) return false; - if (mime_type_ == ImageEncoder::kMimeTypeJpeg) { + if (mime_type_ == kMimeTypeJpeg) { SkJpegEncoder::Options options; options.fQuality = ImageEncoder::ComputeJpegQuality(quality); options.fAlphaOption = SkJpegEncoder::AlphaOption::kBlendOnBlack; @@ -572,7 +543,7 @@ // formats. // TODO(zakerinasab): Progressive encoding on webp image formats // (crbug.com/571399) - DCHECK_EQ(ImageEncoder::kMimeTypePng, mime_type_); + DCHECK_EQ(kMimeTypePng, mime_type_); SkPngEncoder::Options options; options.fFilterFlags = SkPngEncoder::FilterFlag::kSub; options.fZLibLevel = 3; @@ -597,8 +568,7 @@ idle_task_status_ = kIdleTaskSwitchedToImmediateTask; SignalTaskSwitchInStartTimeoutEventForTesting(); - DCHECK(mime_type_ == ImageEncoder::kMimeTypePng || - mime_type_ == ImageEncoder::kMimeTypeJpeg); + DCHECK(mime_type_ == kMimeTypePng || mime_type_ == kMimeTypeJpeg); if (InitializeEncoder(quality)) { context_->GetTaskRunner(TaskType::kCanvasBlobSerialization) ->PostTask( @@ -624,8 +594,7 @@ idle_task_status_ = kIdleTaskSwitchedToImmediateTask; SignalTaskSwitchInCompleteTimeoutEventForTesting(); - DCHECK(mime_type_ == ImageEncoder::kMimeTypePng || - mime_type_ == ImageEncoder::kMimeTypeJpeg); + DCHECK(mime_type_ == kMimeTypePng || mime_type_ == kMimeTypeJpeg); context_->GetTaskRunner(TaskType::kCanvasBlobSerialization) ->PostTask( FROM_HERE, @@ -669,7 +638,7 @@ std::unique_ptr<ImageDataBuffer> buffer = ImageDataBuffer::Create(src_data_); if (!buffer) return false; - return buffer->EncodeImage(encode_options_.type(), encode_options_.quality(), + return buffer->EncodeImage(mime_type_, encode_options_.quality(), &encoded_image_); }
diff --git a/third_party/blink/renderer/core/html/canvas/canvas_async_blob_creator.h b/third_party/blink/renderer/core/html/canvas/canvas_async_blob_creator.h index 4e7f119..d6fccdbe 100644 --- a/third_party/blink/renderer/core/html/canvas/canvas_async_blob_creator.h +++ b/third_party/blink/renderer/core/html/canvas/canvas_async_blob_creator.h
@@ -15,6 +15,7 @@ #include "third_party/blink/renderer/core/html/canvas/image_encode_options.h" #include "third_party/blink/renderer/core/typed_arrays/dom_typed_array.h" #include "third_party/blink/renderer/platform/geometry/int_size.h" +#include "third_party/blink/renderer/platform/graphics/graphics_types.h" #include "third_party/blink/renderer/platform/graphics/static_bitmap_image.h" #include "third_party/blink/renderer/platform/heap/handle.h" #include "third_party/blink/renderer/platform/image-encoders/image_encoder.h" @@ -56,7 +57,7 @@ }; static CanvasAsyncBlobCreator* Create(scoped_refptr<StaticBitmapImage>, - const String& mime_type, + const ImageEncodingMimeType mime_type, V8BlobCallback*, ToBlobFunctionType function_type, TimeTicks start_time, @@ -94,7 +95,7 @@ ExecutionContext*, ScriptPromiseResolver*); static ImageEncodeOptions GetImageEncodeOptionsForMimeType( - ImageEncoder::MimeType); + ImageEncodingMimeType); // Methods are virtual for unit testing virtual void ScheduleInitiateEncoding(double quality); virtual void IdleEncodeRows(TimeTicks deadline); @@ -124,7 +125,7 @@ Member<ExecutionContext> context_; SkPixmap src_data_; - ImageEncoder::MimeType mime_type_; + ImageEncodingMimeType mime_type_; const ImageEncodeOptions encode_options_; ToBlobFunctionType function_type_; sk_sp<SkData> png_16bit_data_helper_;
diff --git a/third_party/blink/renderer/core/html/canvas/canvas_async_blob_creator_test.cc b/third_party/blink/renderer/core/html/canvas/canvas_async_blob_creator_test.cc index 13d6a52..52892e8 100644 --- a/third_party/blink/renderer/core/html/canvas/canvas_async_blob_creator_test.cc +++ b/third_party/blink/renderer/core/html/canvas/canvas_async_blob_creator_test.cc
@@ -22,7 +22,7 @@ class MockCanvasAsyncBlobCreator : public CanvasAsyncBlobCreator { public: MockCanvasAsyncBlobCreator(scoped_refptr<StaticBitmapImage> image, - ImageEncoder::MimeType mime_type, + ImageEncodingMimeType mime_type, Document* document, bool fail_encoder_initialization = false) : CanvasAsyncBlobCreator( @@ -74,9 +74,7 @@ public: MockCanvasAsyncBlobCreatorWithoutStart(scoped_refptr<StaticBitmapImage> image, Document* document) - : MockCanvasAsyncBlobCreator(image, - ImageEncoder::kMimeTypePng, - document) {} + : MockCanvasAsyncBlobCreator(image, kMimeTypePng, document) {} protected: void ScheduleInitiateEncoding(double) override { @@ -95,7 +93,7 @@ Document* document, bool fail_encoder_initialization = false) : MockCanvasAsyncBlobCreator(image, - ImageEncoder::kMimeTypePng, + kMimeTypePng, document, fail_encoder_initialization) {}
diff --git a/third_party/blink/renderer/core/html/canvas/canvas_rendering_context_host.h b/third_party/blink/renderer/core/html/canvas/canvas_rendering_context_host.h index e54af26..44afe96a 100644 --- a/third_party/blink/renderer/core/html/canvas/canvas_rendering_context_host.h +++ b/third_party/blink/renderer/core/html/canvas/canvas_rendering_context_host.h
@@ -9,6 +9,7 @@ #include "third_party/blink/renderer/core/core_export.h" #include "third_party/blink/renderer/core/dom/events/event_dispatcher.h" #include "third_party/blink/renderer/core/dom/events/event_target.h" +#include "third_party/blink/renderer/core/html/canvas/canvas_image_source.h" #include "third_party/blink/renderer/core/html/canvas/image_encode_options.h" #include "third_party/blink/renderer/platform/bindings/exception_state.h" #include "third_party/blink/renderer/platform/bindings/script_state.h" @@ -28,6 +29,7 @@ class StaticBitmapImage; class CORE_EXPORT CanvasRenderingContextHost : public CanvasResourceHost, + public CanvasImageSource, public GarbageCollectedMixin { public: CanvasRenderingContextHost(); @@ -64,8 +66,6 @@ virtual bool ShouldAccelerate2dContext() const = 0; virtual unsigned GetMSAASampleCountFor2dContext() const = 0; - // TODO(fserb): remove this. - virtual bool IsOffscreenCanvas() const { return false; } virtual bool IsNeutered() const { return false; } virtual void Commit(scoped_refptr<CanvasResource> canvas_resource, @@ -73,6 +73,10 @@ bool IsPaintable() const; + // Required by template functions in WebGLRenderingContextBase + int width() const { return Size().Width(); } + int height() const { return Size().Height(); } + // Partial CanvasResourceHost implementation void RestoreCanvasMatrixClipStack(cc::PaintCanvas*) const final; CanvasResourceProvider* GetOrCreateCanvasResourceProvider(
diff --git a/third_party/blink/renderer/core/html/canvas/html_canvas_element.cc b/third_party/blink/renderer/core/html/canvas/html_canvas_element.cc index c3a3d75..dd5878f8 100644 --- a/third_party/blink/renderer/core/html/canvas/html_canvas_element.cc +++ b/third_party/blink/renderer/core/html/canvas/html_canvas_element.cc
@@ -755,8 +755,8 @@ } const AtomicString HTMLCanvasElement::ImageSourceURL() const { - return AtomicString( - ToDataURLInternal(ImageEncoderUtils::kDefaultMimeType, 0, kFrontBuffer)); + return AtomicString(ToDataURLInternal( + ImageEncoderUtils::kDefaultRequestedMimeType, 0, kFrontBuffer)); } scoped_refptr<StaticBitmapImage> HTMLCanvasElement::Snapshot( @@ -808,21 +808,22 @@ if (!IsPaintable()) return String("data:,"); - String encoding_mime_type = ImageEncoderUtils::ToEncodingMimeType( - mime_type, ImageEncoderUtils::kEncodeReasonToDataURL); + ImageEncodingMimeType encoding_mime_type = + ImageEncoderUtils::ToEncodingMimeType( + mime_type, ImageEncoderUtils::kEncodeReasonToDataURL); base::Optional<ScopedUsHistogramTimer> timer; - if (encoding_mime_type == "image/png") { + if (encoding_mime_type == kMimeTypePng) { DEFINE_THREAD_SAFE_STATIC_LOCAL( CustomCountHistogram, scoped_us_counter_png, ("Blink.Canvas.ToDataURL.PNG", 0, 10000000, 50)); timer.emplace(scoped_us_counter_png); - } else if (encoding_mime_type == "image/jpeg") { + } else if (encoding_mime_type == kMimeTypeJpeg) { DEFINE_THREAD_SAFE_STATIC_LOCAL( CustomCountHistogram, scoped_us_counter_jpeg, ("Blink.Canvas.ToDataURL.JPEG", 0, 10000000, 50)); timer.emplace(scoped_us_counter_jpeg); - } else if (encoding_mime_type == "image/webp") { + } else if (encoding_mime_type == kMimeTypeWebp) { DEFINE_THREAD_SAFE_STATIC_LOCAL( CustomCountHistogram, scoped_us_counter_webp, ("Blink.Canvas.ToDataURL.WEBP", 0, 10000000, 50)); @@ -890,8 +891,9 @@ quality = v8_value.As<v8::Number>()->Value(); } - String encoding_mime_type = ImageEncoderUtils::ToEncodingMimeType( - mime_type, ImageEncoderUtils::kEncodeReasonToBlobCallback); + ImageEncodingMimeType encoding_mime_type = + ImageEncoderUtils::ToEncodingMimeType( + mime_type, ImageEncoderUtils::kEncodeReasonToBlobCallback); CanvasAsyncBlobCreator* async_creator = nullptr; scoped_refptr<StaticBitmapImage> image_bitmap =
diff --git a/third_party/blink/renderer/core/html/canvas/html_canvas_element.h b/third_party/blink/renderer/core/html/canvas/html_canvas_element.h index 2e92bd47..970236cbf 100644 --- a/third_party/blink/renderer/core/html/canvas/html_canvas_element.h +++ b/third_party/blink/renderer/core/html/canvas/html_canvas_element.h
@@ -37,7 +37,6 @@ #include "third_party/blink/renderer/core/core_export.h" #include "third_party/blink/renderer/core/dom/context_lifecycle_observer.h" #include "third_party/blink/renderer/core/dom/document.h" -#include "third_party/blink/renderer/core/html/canvas/canvas_image_source.h" #include "third_party/blink/renderer/core/html/canvas/canvas_rendering_context_host.h" #include "third_party/blink/renderer/core/html/canvas/image_encode_options.h" #include "third_party/blink/renderer/core/html/html_element.h" @@ -91,7 +90,6 @@ : public HTMLElement, public ContextLifecycleObserver, public PageVisibilityObserver, - public CanvasImageSource, public CanvasRenderingContextHost, public WebSurfaceLayerBridgeObserver, public ImageBitmapSource,
diff --git a/third_party/blink/renderer/core/html/forms/file_chooser.cc b/third_party/blink/renderer/core/html/forms/file_chooser.cc index bfab0af..5301bf7a2 100644 --- a/third_party/blink/renderer/core/html/forms/file_chooser.cc +++ b/third_party/blink/renderer/core/html/forms/file_chooser.cc
@@ -28,6 +28,11 @@ #include "third_party/blink/renderer/core/html/forms/file_chooser.h" +#include "third_party/blink/public/web/web_local_frame_client.h" +#include "third_party/blink/renderer/core/frame/web_local_frame_impl.h" +#include "third_party/blink/renderer/core/page/chrome_client_impl.h" +#include "third_party/blink/renderer/platform/wtf/date_math.h" + namespace blink { FileChooserClient::~FileChooserClient() = default; @@ -58,6 +63,48 @@ FileChooser::~FileChooser() = default; +bool FileChooser::OpenFileChooser(ChromeClientImpl& chrome_client_impl) { + LocalFrame* frame = FrameOrNull(); + if (!frame) + return false; + chrome_client_impl_ = chrome_client_impl; + + WebLocalFrameClient* client = + frame ? WebLocalFrameImpl::FromFrame(frame)->Client() : nullptr; + if (!client || !client->RunFileChooser(params_, this)) + return false; + + // Should be released on file choosing. + AddRef(); + return true; +} + +void FileChooser::DidChooseFile(const WebVector<WebString>& file_names) { + Vector<FileChooserFileInfo> file_info; + for (size_t i = 0; i < file_names.size(); ++i) + file_info.push_back(FileChooserFileInfo(file_names[i])); + ChooseFiles(file_info); +} + +void FileChooser::DidChooseFile(const WebVector<SelectedFileInfo>& files) { + Vector<FileChooserFileInfo> file_info; + for (size_t i = 0; i < files.size(); ++i) { + if (files[i].file_system_url.IsEmpty()) { + file_info.push_back( + FileChooserFileInfo(files[i].path, files[i].display_name)); + } else { + FileMetadata metadata; + metadata.modification_time = files[i].modification_time * kMsPerSecond; + metadata.length = files[i].length; + metadata.type = files[i].is_directory ? FileMetadata::kTypeDirectory + : FileMetadata::kTypeFile; + file_info.push_back( + FileChooserFileInfo(files[i].file_system_url, metadata)); + } + } + ChooseFiles(file_info); +} + void FileChooser::ChooseFiles(const Vector<FileChooserFileInfo>& files) { // FIXME: This is inelegant. We should not be looking at params_ here. if (params_.selected_files.size() == files.size()) { @@ -68,12 +115,21 @@ break; } } - if (!was_changed) + if (!was_changed) { + DidCloseChooser(); return; + } } if (client_) client_->FilesChosen(files); + DidCloseChooser(); +} + +void FileChooser::DidCloseChooser() { + if (chrome_client_impl_) + chrome_client_impl_->DidCompleteFileChooser(*this); + Release(); } } // namespace blink
diff --git a/third_party/blink/renderer/core/html/forms/file_chooser.h b/third_party/blink/renderer/core/html/forms/file_chooser.h index 3335c8ad..322d008 100644 --- a/third_party/blink/renderer/core/html/forms/file_chooser.h +++ b/third_party/blink/renderer/core/html/forms/file_chooser.h
@@ -30,6 +30,7 @@ #ifndef THIRD_PARTY_BLINK_RENDERER_CORE_HTML_FORMS_FILE_CHOOSER_H_ #define THIRD_PARTY_BLINK_RENDERER_CORE_HTML_FORMS_FILE_CHOOSER_H_ +#include "third_party/blink/public/web/web_file_chooser_completion.h" #include "third_party/blink/public/web/web_file_chooser_params.h" #include "third_party/blink/renderer/platform/file_metadata.h" #include "third_party/blink/renderer/platform/heap/handle.h" @@ -41,6 +42,7 @@ namespace blink { +class ChromeClientImpl; class FileChooser; class LocalFrame; @@ -78,28 +80,38 @@ scoped_refptr<FileChooser> chooser_; }; -class FileChooser : public RefCounted<FileChooser> { +class FileChooser : public RefCounted<FileChooser>, + public WebFileChooserCompletion { public: static scoped_refptr<FileChooser> Create(FileChooserClient*, const WebFileChooserParams&); - ~FileChooser(); + ~FileChooser() override; LocalFrame* FrameOrNull() const { return client_ ? client_->FrameOrNull() : nullptr; } void DisconnectClient() { client_ = nullptr; } - // FIXME: We should probably just pass file paths that could be virtual paths - // with proper display names rather than passing structs. - void ChooseFiles(const Vector<FileChooserFileInfo>& files); - const WebFileChooserParams& Params() const { return params_; } + bool OpenFileChooser(ChromeClientImpl& chrome_client_impl); + private: FileChooser(FileChooserClient*, const WebFileChooserParams&); + void DidCloseChooser(); + + // WebFileChooserCompletion implementation: + void DidChooseFile(const WebVector<WebString>& file_names) override; + void DidChooseFile(const WebVector<SelectedFileInfo>& files) override; + + // FIXME: We should probably just pass file paths that could be virtual paths + // with proper display names rather than passing structs. + void ChooseFiles(const Vector<FileChooserFileInfo>& files); + WeakPersistent<FileChooserClient> client_; WebFileChooserParams params_; + Persistent<ChromeClientImpl> chrome_client_impl_; }; } // namespace blink
diff --git a/third_party/blink/renderer/core/html/forms/html_input_element.cc b/third_party/blink/renderer/core/html/forms/html_input_element.cc index a4b2a54..da1847a 100644 --- a/third_party/blink/renderer/core/html/forms/html_input_element.cc +++ b/third_party/blink/renderer/core/html/forms/html_input_element.cc
@@ -1919,6 +1919,7 @@ } void HTMLInputElement::DidRecalcStyle(StyleRecalcChange change) { + TextControlElement::DidRecalcStyle(change); if (change != kReattach) return; ComputedStyle* style = GetNonAttachedStyle();
diff --git a/third_party/blink/renderer/core/html/forms/html_input_element_test.cc b/third_party/blink/renderer/core/html/forms/html_input_element_test.cc index 6bbe2a356..83cdd18 100644 --- a/third_party/blink/renderer/core/html/forms/html_input_element_test.cc +++ b/third_party/blink/renderer/core/html/forms/html_input_element_test.cc
@@ -9,13 +9,16 @@ #include "third_party/blink/renderer/core/dom/document.h" #include "third_party/blink/renderer/core/events/keyboard_event.h" #include "third_party/blink/renderer/core/events/keyboard_event_init.h" +#include "third_party/blink/renderer/core/fileapi/file_list.h" #include "third_party/blink/renderer/core/frame/local_frame_view.h" #include "third_party/blink/renderer/core/frame/visual_viewport.h" #include "third_party/blink/renderer/core/html/forms/date_time_chooser.h" +#include "third_party/blink/renderer/core/html/forms/file_input_type.h" #include "third_party/blink/renderer/core/html/forms/html_form_element.h" #include "third_party/blink/renderer/core/html/forms/html_option_element.h" #include "third_party/blink/renderer/core/html/html_body_element.h" #include "third_party/blink/renderer/core/html/html_html_element.h" +#include "third_party/blink/renderer/core/layout/layout_object.h" #include "third_party/blink/renderer/core/testing/page_test_base.h" namespace blink { @@ -203,4 +206,29 @@ EXPECT_NE(nullptr, input->UserAgentShadowRoot()); } +TEST_F(HTMLInputElementTest, RepaintAfterClearingFile) { + GetDocument().body()->SetInnerHTMLFromString("<input type='file' />"); + HTMLInputElement* input = + ToHTMLInputElement(GetDocument().body()->firstChild()); + + Vector<FileChooserFileInfo> files; + files.push_back( + FileChooserFileInfo("/native/path/native-file", "display-name")); + FileList* list = FileInputType::CreateFileList(files, false); + ASSERT_TRUE(list); + EXPECT_EQ(1u, list->length()); + + input->setFiles(list); + GetDocument().View()->UpdateAllLifecyclePhases(); + + ASSERT_TRUE(input->GetLayoutObject()); + EXPECT_FALSE(input->GetLayoutObject()->ShouldCheckForPaintInvalidation()); + + input->setValue(""); + GetDocument().UpdateStyleAndLayoutTree(); + + ASSERT_TRUE(input->GetLayoutObject()); + EXPECT_TRUE(input->GetLayoutObject()->ShouldCheckForPaintInvalidation()); +} + } // namespace blink
diff --git a/third_party/blink/renderer/core/html/parser/html_parser_idioms.cc b/third_party/blink/renderer/core/html/parser/html_parser_idioms.cc index d63469d..0a09f4c 100644 --- a/third_party/blink/renderer/core/html/parser/html_parser_idioms.cc +++ b/third_party/blink/renderer/core/html/parser/html_parser_idioms.cc
@@ -372,6 +372,7 @@ WTF::TextEncoding EncodingFromMetaAttributes( const HTMLAttributeList& attributes) { bool got_pragma = false; + bool has_charset = false; MetaAttribute mode = MetaAttribute::kNone; String charset; @@ -382,15 +383,14 @@ if (ThreadSafeMatch(attribute_name, http_equivAttr)) { if (DeprecatedEqualIgnoringCase(attribute_value, "content-type")) got_pragma = true; - } else if (charset.IsEmpty()) { - if (ThreadSafeMatch(attribute_name, charsetAttr)) { - charset = attribute_value; - mode = MetaAttribute::kCharset; - } else if (ThreadSafeMatch(attribute_name, contentAttr)) { - charset = ExtractCharset(attribute_value); - if (charset.length()) - mode = MetaAttribute::kPragma; - } + } else if (ThreadSafeMatch(attribute_name, charsetAttr)) { + has_charset = true; + charset = attribute_value; + mode = MetaAttribute::kCharset; + } else if (!has_charset && ThreadSafeMatch(attribute_name, contentAttr)) { + charset = ExtractCharset(attribute_value); + if (charset.length()) + mode = MetaAttribute::kPragma; } }
diff --git a/third_party/blink/renderer/core/html/parser/html_parser_scheduler.cc b/third_party/blink/renderer/core/html/parser/html_parser_scheduler.cc index 6f69497..d2fdce1 100644 --- a/third_party/blink/renderer/core/html/parser/html_parser_scheduler.cc +++ b/third_party/blink/renderer/core/html/parser/html_parser_scheduler.cc
@@ -25,6 +25,8 @@ #include "third_party/blink/renderer/core/html/parser/html_parser_scheduler.h" +#include "base/feature_list.h" +#include "base/metrics/field_trial_params.h" #include "third_party/blink/public/platform/platform.h" #include "third_party/blink/public/platform/web_thread.h" #include "third_party/blink/renderer/core/dom/document.h" @@ -35,6 +37,10 @@ namespace blink { +const base::Feature kHTMLParsingYieldTime { + "HTMLParsingYieldTime", base::FEATURE_DISABLED_BY_DEFAULT +}; + PumpSession::PumpSession(unsigned& nesting_level) : NestingLevelIncrementer(nesting_level) {} @@ -55,12 +61,18 @@ processed_element_tokens_ += count; } +const double kDefaultParserTimeLimit = 0.5; + HTMLParserScheduler::HTMLParserScheduler( HTMLDocumentParser* parser, scoped_refptr<base::SingleThreadTaskRunner> loading_task_runner) : parser_(parser), loading_task_runner_(std::move(loading_task_runner)), - is_paused_with_active_timer_(false) {} + is_paused_with_active_timer_(false), + parser_time_limit_( + base::GetFieldTrialParamByFeatureAsDouble(kHTMLParsingYieldTime, + "limit", + kDefaultParserTimeLimit)) {} HTMLParserScheduler::~HTMLParserScheduler() = default; @@ -111,8 +123,7 @@ ->ShouldYieldForHighPriorityWork()) return true; - const double kParserTimeLimit = 0.5; - if (session.ElapsedTime() > kParserTimeLimit) + if (session.ElapsedTime() > parser_time_limit_) return true; // Yield if a lot of DOM work has been done in this session and a script tag
diff --git a/third_party/blink/renderer/core/html/parser/html_parser_scheduler.h b/third_party/blink/renderer/core/html/parser/html_parser_scheduler.h index 73b5506..12f950a 100644 --- a/third_party/blink/renderer/core/html/parser/html_parser_scheduler.h +++ b/third_party/blink/renderer/core/html/parser/html_parser_scheduler.h
@@ -105,6 +105,7 @@ TaskHandle cancellable_continue_parse_task_handle_; bool is_paused_with_active_timer_; + const double parser_time_limit_; DISALLOW_COPY_AND_ASSIGN(HTMLParserScheduler); };
diff --git a/third_party/blink/renderer/core/imagebitmap/image_bitmap_options.idl b/third_party/blink/renderer/core/imagebitmap/image_bitmap_options.idl index 8dec004d..9fcdca0 100644 --- a/third_party/blink/renderer/core/imagebitmap/image_bitmap_options.idl +++ b/third_party/blink/renderer/core/imagebitmap/image_bitmap_options.idl
@@ -7,12 +7,12 @@ enum ImageOrientation { "none", "flipY" }; enum PremultiplyAlpha { "none", "premultiply", "default" }; enum ColorSpaceConversion { "none", "default", "srgb", "linear-rgb", "rec2020", "p3" }; -[RuntimeEnabled=ExtendedImageBitmapOptions] enum ResizeQuality { "pixelated", "low", "medium", "high" }; +enum ResizeQuality { "pixelated", "low", "medium", "high" }; dictionary ImageBitmapOptions { ImageOrientation imageOrientation = "none"; PremultiplyAlpha premultiplyAlpha = "default"; ColorSpaceConversion colorSpaceConversion = "default"; - [RuntimeEnabled=ExtendedImageBitmapOptions, EnforceRange] unsigned long resizeWidth; - [RuntimeEnabled=ExtendedImageBitmapOptions, EnforceRange] unsigned long resizeHeight; - [RuntimeEnabled=ExtendedImageBitmapOptions] ResizeQuality resizeQuality = "low"; + [EnforceRange] unsigned long resizeWidth; + [EnforceRange] unsigned long resizeHeight; + ResizeQuality resizeQuality = "low"; };
diff --git a/third_party/blink/renderer/core/inspector/inspector_audits_agent.cc b/third_party/blink/renderer/core/inspector/inspector_audits_agent.cc index b413b58..c2e74ec 100644 --- a/third_party/blink/renderer/core/inspector/inspector_audits_agent.cc +++ b/third_party/blink/renderer/core/inspector/inspector_audits_agent.cc
@@ -53,8 +53,11 @@ if (!image_to_encode) return false; - String mime_type = "image/"; - mime_type.append(encoding); + String mime_type_name = "image/"; + mime_type_name.append(encoding); + ImageEncodingMimeType mime_type; + bool valid_mime_type = ParseImageEncodingMimeType(mime_type_name, mime_type); + DCHECK(valid_mime_type); return image_to_encode->EncodeImage(mime_type, quality, output); }
diff --git a/third_party/blink/renderer/core/inspector/inspector_dom_debugger_agent.cc b/third_party/blink/renderer/core/inspector/inspector_dom_debugger_agent.cc index c278a3b..211bc57 100644 --- a/third_party/blink/renderer/core/inspector/inspector_dom_debugger_agent.cc +++ b/third_party/blink/renderer/core/inspector/inspector_dom_debugger_agent.cc
@@ -110,10 +110,11 @@ EventListener* event_listener = listeners->at(k).Callback(); if (event_listener->GetType() != EventListener::kJSEventListenerType) continue; - V8AbstractEventListener* v8_listener = - static_cast<V8AbstractEventListener*>(event_listener); - v8::Local<v8::Context> context = - ToV8Context(execution_context, v8_listener->World()); + // TODO(yukiy): Use a child class of blink::EventListener that is for v8 + // event listeners here if it is implemented in redesigning + // EventListener/EventHandler: https://crbug.com/872138 . + v8::Local<v8::Context> context = ToV8Context( + execution_context, *(event_listener->GetWorldForInspector())); // Optionally hide listeners from other contexts. if (!report_for_all_contexts && context != isolate->GetCurrentContext()) continue; @@ -121,7 +122,7 @@ // compiled, potentially unsuccessfully. In that case, the function // returns the empty handle without an exception. v8::Local<v8::Object> handler = - v8_listener->GetListenerObject(execution_context); + event_listener->GetListenerObjectForInspector(execution_context); if (handler.IsEmpty()) continue; bool use_capture = listeners->at(k).Capture();
diff --git a/third_party/blink/renderer/core/layout/layout_image.cc b/third_party/blink/renderer/core/layout/layout_image.cc index 4449067..3ae89ee 100644 --- a/third_party/blink/renderer/core/layout/layout_image.cc +++ b/third_party/blink/renderer/core/layout/layout_image.cc
@@ -87,10 +87,10 @@ if (layout_width > 0 && layout_height > 0 && image_width > 0 && image_height > 0) { double device_pixel_ratio = frame.DevicePixelRatio(); - if (LayoutUnit(image_width / kmax_downscaling_ratio * device_pixel_ratio) > - layout_width || - LayoutUnit(image_height / kmax_downscaling_ratio * device_pixel_ratio) > - layout_height) + if (LayoutUnit(image_width / (kmax_downscaling_ratio * + device_pixel_ratio)) > layout_width || + LayoutUnit(image_height / (kmax_downscaling_ratio * + device_pixel_ratio)) > layout_height) return true; } return false;
diff --git a/third_party/blink/renderer/core/messaging/message_port.cc b/third_party/blink/renderer/core/messaging/message_port.cc index 683855e..be304fa 100644 --- a/third_party/blink/renderer/core/messaging/message_port.cc +++ b/third_party/blink/renderer/core/messaging/message_port.cc
@@ -66,17 +66,23 @@ const ScriptValue& message, Vector<ScriptValue>& transfer, ExceptionState& exception_state) { + PostMessageOptions options; + if (!transfer.IsEmpty()) + options.setTransfer(transfer); + postMessage(script_state, message, options, exception_state); +} + +void MessagePort::postMessage(ScriptState* script_state, + const ScriptValue& message, + const PostMessageOptions& options, + ExceptionState& exception_state) { if (!IsEntangled()) return; DCHECK(GetExecutionContext()); DCHECK(!IsNeutered()); - PostMessageOptions options; BlinkTransferableMessage msg; Transferables transferables; - if (!transfer.IsEmpty()) - options.setTransfer(transfer); - msg.message = PostMessageHelper::SerializeMessageByMove( script_state->GetIsolate(), message, options, transferables, exception_state);
diff --git a/third_party/blink/renderer/core/messaging/message_port.h b/third_party/blink/renderer/core/messaging/message_port.h index 3ea81ef..3ed4805b 100644 --- a/third_party/blink/renderer/core/messaging/message_port.h +++ b/third_party/blink/renderer/core/messaging/message_port.h
@@ -46,6 +46,7 @@ class ExceptionState; class ExecutionContext; +class PostMessageOptions; class ScriptState; class CORE_EXPORT MessagePort : public EventTargetWithInlineData, @@ -63,6 +64,10 @@ const ScriptValue& message, Vector<ScriptValue>& transfer, ExceptionState&); + void postMessage(ScriptState*, + const ScriptValue& message, + const PostMessageOptions&, + ExceptionState&); void start(); void close();
diff --git a/third_party/blink/renderer/core/messaging/message_port.idl b/third_party/blink/renderer/core/messaging/message_port.idl index 30f10371..60163f1 100644 --- a/third_party/blink/renderer/core/messaging/message_port.idl +++ b/third_party/blink/renderer/core/messaging/message_port.idl
@@ -32,6 +32,7 @@ Exposed=(Window,Worker,AudioWorklet) ] interface MessagePort : EventTarget { [CallWith=ScriptState, RaisesException, Measure] void postMessage(any message, optional sequence<object> transfer = []); + [RuntimeEnabled=PostMessageOptions, CallWith=ScriptState, RaisesException, Measure] void postMessage(any message, PostMessageOptions options); [Measure] void start(); [Measure] void close();
diff --git a/third_party/blink/renderer/core/offscreencanvas/offscreen_canvas.h b/third_party/blink/renderer/core/offscreencanvas/offscreen_canvas.h index 45f1634e..ef93925 100644 --- a/third_party/blink/renderer/core/offscreencanvas/offscreen_canvas.h +++ b/third_party/blink/renderer/core/offscreencanvas/offscreen_canvas.h
@@ -9,7 +9,6 @@ #include "third_party/blink/renderer/bindings/core/v8/script_promise.h" #include "third_party/blink/renderer/core/dom/dom_node_ids.h" #include "third_party/blink/renderer/core/dom/events/event_target.h" -#include "third_party/blink/renderer/core/html/canvas/canvas_image_source.h" #include "third_party/blink/renderer/core/html/canvas/canvas_rendering_context_host.h" #include "third_party/blink/renderer/core/html/canvas/html_canvas_element.h" #include "third_party/blink/renderer/core/html/canvas/image_encode_options.h" @@ -39,7 +38,6 @@ class CORE_EXPORT OffscreenCanvas final : public EventTargetWithInlineData, - public CanvasImageSource, public ImageBitmapSource, public CanvasRenderingContextHost, public CanvasResourceDispatcherClient {
diff --git a/third_party/blink/renderer/core/page/chrome_client_impl.cc b/third_party/blink/renderer/core/page/chrome_client_impl.cc index 963828a1..6abd7c7 100644 --- a/third_party/blink/renderer/core/page/chrome_client_impl.cc +++ b/third_party/blink/renderer/core/page/chrome_client_impl.cc
@@ -57,7 +57,6 @@ #include "third_party/blink/renderer/core/dom/document.h" #include "third_party/blink/renderer/core/dom/node.h" #include "third_party/blink/renderer/core/events/web_input_event_conversion.h" -#include "third_party/blink/renderer/core/exported/web_file_chooser_completion_impl.h" #include "third_party/blink/renderer/core/exported/web_plugin_container_impl.h" #include "third_party/blink/renderer/core/exported/web_remote_frame_impl.h" #include "third_party/blink/renderer/core/exported/web_settings_impl.h" @@ -584,18 +583,11 @@ LocalFrame* frame, scoped_refptr<FileChooser> file_chooser) { NotifyPopupOpeningObservers(); - WebLocalFrameClient* client = WebLocalFrameImpl::FromFrame(frame)->Client(); - if (!client) - return; Document* doc = frame->GetDocument(); if (doc) doc->MaybeQueueSendDidEditFieldInInsecureContext(); - const WebFileChooserParams& params = file_chooser->Params(); - WebFileChooserCompletionImpl* chooser_completion = - new WebFileChooserCompletionImpl(std::move(file_chooser), this); - static const wtf_size_t kMaximumPendingFileChooseRequests = 4; if (file_chooser_queue_.size() > kMaximumPendingFileChooseRequests) { // This sanity check prevents too many file choose requests from getting @@ -606,43 +598,33 @@ // // TODO(brettw): We might possibly want to require a user gesture to open // a file picker, which will address this issue in a better way. - // - // Choosing failed, so do callback with an empty list. - chooser_completion->DidChooseFile(WebVector<WebString>()); return; } - file_chooser_queue_.push_back(chooser_completion); + file_chooser_queue_.push_back(file_chooser.get()); if (file_chooser_queue_.size() == 1) { // Actually show the browse dialog when this is the first request. - if (client->RunFileChooser(params, chooser_completion)) + if (file_chooser->OpenFileChooser(*this)) return; - // Choosing failed, so do callback with an empty list. - chooser_completion->DidChooseFile(WebVector<WebString>()); - // WebFileChooserCompletionImpl will call - // ChromeClientImpl::DidCompleteFileChooser(). + // Choosing failed, so try the next chooser. + DidCompleteFileChooser(*file_chooser); } } -void ChromeClientImpl::DidCompleteFileChooser( - WebFileChooserCompletionImpl& completion) { +void ChromeClientImpl::DidCompleteFileChooser(FileChooser& chooser) { if (!file_chooser_queue_.IsEmpty() && - file_chooser_queue_.front() != &completion) { - // This function is called even if |completion| wasn't stored in + file_chooser_queue_.front() != &chooser) { + // This function is called even if |chooser| wasn't stored in // file_chooser_queue_. return; } file_chooser_queue_.EraseAt(0); if (file_chooser_queue_.IsEmpty()) return; - WebFileChooserCompletionImpl* next_completion = file_chooser_queue_.front(); - LocalFrame* frame = next_completion->FrameOrNull(); - WebLocalFrameClient* client = - frame ? WebLocalFrameImpl::FromFrame(frame)->Client() : nullptr; - if (client && - client->RunFileChooser(next_completion->Params(), next_completion)) + FileChooser* next_chooser = file_chooser_queue_.front(); + if (next_chooser->OpenFileChooser(*this)) return; - // Choosing failed, so do callback with an empty list. - next_completion->DidChooseFile(WebVector<WebString>()); + // Choosing failed, so try the next chooser. + DidCompleteFileChooser(*next_chooser); } void ChromeClientImpl::EnumerateChosenDirectory(FileChooser* file_chooser) { @@ -650,16 +632,11 @@ if (!client) return; - WebFileChooserCompletionImpl* chooser_completion = - new WebFileChooserCompletionImpl(file_chooser); - DCHECK(file_chooser); DCHECK(file_chooser->Params().selected_files.size()); - - // If the enumeration can't happen, call the callback with an empty list. - if (!client->EnumerateChosenDirectory( - file_chooser->Params().selected_files[0], chooser_completion)) - chooser_completion->DidChooseFile(WebVector<WebString>()); + if (client->EnumerateChosenDirectory(file_chooser->Params().selected_files[0], + file_chooser)) + file_chooser->AddRef(); } Cursor ChromeClientImpl::LastSetCursorForTesting() const {
diff --git a/third_party/blink/renderer/core/page/chrome_client_impl.h b/third_party/blink/renderer/core/page/chrome_client_impl.h index 56354be5..206f416 100644 --- a/third_party/blink/renderer/core/page/chrome_client_impl.h +++ b/third_party/blink/renderer/core/page/chrome_client_impl.h
@@ -44,7 +44,6 @@ class PagePopup; class PagePopupClient; class WebAutofillClient; -class WebFileChooserCompletionImpl; class WebViewImpl; struct WebCursorInfo; @@ -176,9 +175,9 @@ // ChromeClientImpl: void SetNewWindowNavigationPolicy(WebNavigationPolicy); - // WebFileChooserCompletionImpl calls this function to kick pending - // file chooser requests. - void DidCompleteFileChooser(WebFileChooserCompletionImpl& completion); + // FileChooser calls this function to kick pending file chooser + // requests. + void DidCompleteFileChooser(FileChooser& file_chooser); void AutoscrollStart(WebFloatPoint viewport_point, LocalFrame*) override; void AutoscrollFling(WebFloatSize velocity, LocalFrame*) override; @@ -249,7 +248,7 @@ WebViewImpl* web_view_; // Weak pointer. HeapHashSet<WeakMember<PopupOpeningObserver>> popup_opening_observers_; - Vector<WebFileChooserCompletionImpl*> file_chooser_queue_; + Vector<FileChooser*> file_chooser_queue_; Cursor last_set_mouse_cursor_for_testing_; bool cursor_overridden_; bool did_request_non_empty_tool_tip_;
diff --git a/third_party/blink/renderer/core/paint/find_properties_needing_update.h b/third_party/blink/renderer/core/paint/find_properties_needing_update.h index 95504fe..2d7370e 100644 --- a/third_party/blink/renderer/core/paint/find_properties_needing_update.h +++ b/third_party/blink/renderer/core/paint/find_properties_needing_update.h
@@ -21,9 +21,10 @@ // using LayoutObject::SetNeedsPaintPropertyUpdate() or by forcing a subtree // update (see: PaintPropertyTreeBuilderContext::force_subtree_update). // -// This scope class works by recording the paint property state of an object -// before rebuilding properties, forcing the properties to get updated, then -// checking that the updated properties match the original properties. +// This scope class works by marking the paint property state as immutable +// before rebuilding properties, forcing the properties to get updated, which +// causes object paint properties to DCHECK that property values are not +// changed. #define DUMP_PROPERTIES(original, updated) \ "\nOriginal:\n" \ @@ -67,8 +68,10 @@ object.GetMutableForPainting() .SetOnlyThisNeedsPaintPropertyUpdateForTesting(); - if (const auto* properties = fragment_data_.PaintProperties()) - original_properties_ = properties->Clone(); + if (const auto* properties = fragment_data_.PaintProperties()) { + had_original_properties_ = true; + properties->SetImmutable(); + } if (fragment_data_.HasLocalBorderBoxProperties()) { original_local_border_box_properties_ = @@ -83,73 +86,18 @@ // property update. LayoutPoint paint_offset = fragment_data_.PaintOffset(); DCHECK_OBJECT_PROPERTY_EQ(object_, &original_paint_offset_, &paint_offset); - const auto* object_properties = fragment_data_.PaintProperties(); - if (original_properties_ && object_properties) { - DCHECK_OBJECT_PROPERTY_EQ(object_, - original_properties_->PaintOffsetTranslation(), - object_properties->PaintOffsetTranslation()); - } // No need to check if an update was already needed. if (needed_paint_property_update_ || needed_forced_subtree_update_) return; - // If these checks fail, the paint properties changed unexpectedly. This is - // due to missing one of these paint property invalidations: - // 1) The LayoutObject should have been marked as needing an update with - // LayoutObject::setNeedsPaintPropertyUpdate(). - // 2) The PrePaintTreeWalk should have had a forced subtree update (see: - // PaintPropertyTreeBuilderContext::force_subtree_update). - if (original_properties_ && object_properties) { - DCHECK_OBJECT_PROPERTY_EQ(object_, original_properties_->Transform(), - object_properties->Transform()); - DCHECK_OBJECT_PROPERTY_EQ(object_, original_properties_->Effect(), - object_properties->Effect()); - DCHECK_OBJECT_PROPERTY_EQ(object_, original_properties_->Filter(), - object_properties->Filter()); - DCHECK_OBJECT_PROPERTY_EQ(object_, - original_properties_->VerticalScrollbarEffect(), - object_properties->VerticalScrollbarEffect()); - DCHECK_OBJECT_PROPERTY_EQ( - object_, original_properties_->HorizontalScrollbarEffect(), - object_properties->HorizontalScrollbarEffect()); - DCHECK_OBJECT_PROPERTY_EQ(object_, original_properties_->Mask(), - object_properties->Mask()); - DCHECK_OBJECT_PROPERTY_EQ(object_, original_properties_->ClipPath(), - object_properties->ClipPath()); - DCHECK_OBJECT_PROPERTY_EQ(object_, - original_properties_->LinkHighlightEffect(), - object_properties->LinkHighlightEffect()); - DCHECK_OBJECT_PROPERTY_EQ(object_, original_properties_->ClipPathClip(), - object_properties->ClipPathClip()); - DCHECK_OBJECT_PROPERTY_EQ(object_, original_properties_->MaskClip(), - object_properties->MaskClip()); - DCHECK_OBJECT_PROPERTY_EQ(object_, original_properties_->CssClip(), - object_properties->CssClip()); - DCHECK_OBJECT_PROPERTY_EQ(object_, - original_properties_->CssClipFixedPosition(), - object_properties->CssClipFixedPosition()); - DCHECK_OBJECT_PROPERTY_EQ(object_, - original_properties_->OverflowControlsClip(), - object_properties->OverflowControlsClip()); - DCHECK_OBJECT_PROPERTY_EQ(object_, - original_properties_->InnerBorderRadiusClip(), - object_properties->InnerBorderRadiusClip()); - DCHECK_OBJECT_PROPERTY_EQ(object_, original_properties_->OverflowClip(), - object_properties->OverflowClip()); - DCHECK_OBJECT_PROPERTY_EQ(object_, original_properties_->Perspective(), - object_properties->Perspective()); - DCHECK_OBJECT_PROPERTY_EQ( - object_, original_properties_->ReplacedContentTransform(), - object_properties->ReplacedContentTransform()); - DCHECK_OBJECT_PROPERTY_EQ(object_, original_properties_->Scroll(), - object_properties->Scroll()); - DCHECK_OBJECT_PROPERTY_EQ(object_, - original_properties_->ScrollTranslation(), - object_properties->ScrollTranslation()); + const auto* properties = fragment_data_.PaintProperties(); + if (properties) { + DCHECK(had_original_properties_); + DCHECK(properties->IsImmutable()); + properties->SetMutable(); } else { - DCHECK_EQ(!!original_properties_, !!object_properties) - << " Object: " << object_.DebugName(); + DCHECK(!had_original_properties_); } if (original_local_border_box_properties_ && @@ -177,12 +125,12 @@ private: const LayoutObject& object_; const FragmentData& fragment_data_; - bool needed_paint_property_update_; - bool needed_forced_subtree_update_; + bool needed_paint_property_update_ = false; + bool needed_forced_subtree_update_ = false; LayoutPoint original_paint_offset_; - std::unique_ptr<const ObjectPaintProperties> original_properties_; std::unique_ptr<const PropertyTreeState> original_local_border_box_properties_; + bool had_original_properties_ = false; }; } // namespace blink
diff --git a/third_party/blink/renderer/core/paint/object_paint_properties.h b/third_party/blink/renderer/core/paint/object_paint_properties.h index e173e32..f1c172a 100644 --- a/third_party/blink/renderer/core/paint/object_paint_properties.h +++ b/third_party/blink/renderer/core/paint/object_paint_properties.h
@@ -43,6 +43,58 @@ return base::WrapUnique(new ObjectPaintProperties()); } + ~ObjectPaintProperties() { DCHECK(!is_immutable_); } + + class UpdateResult { + public: + bool Unchanged() const { return result_ == kUnchanged; } + bool NewNodeCreated() const { return result_ == kNewNodeCreated; } + + private: + friend class ObjectPaintProperties; + enum Result { kUnchanged, kValueChanged, kNewNodeCreated }; + UpdateResult(Result r) : result_(r) {} + Result result_; + }; + +// The following defines 3 functions and one variable: +// - Foo(): a getter for the property. +// - UpdateFoo(): an update function. +// - ClearFoo(): a clear function +// - foo_: the variable itself. +// +// Note that clear* functions return true if the property tree structure +// changes (an existing node was deleted), and false otherwise. See the +// class-level comment ("update & clear implementation note") for details +// about why this is needed for efficient updates. +#define ADD_NODE(type, function, variable) \ + const type##PaintPropertyNode* function() const { return variable.get(); } \ + UpdateResult Update##function(const type##PaintPropertyNode& parent, \ + type##PaintPropertyNode::State&& state) { \ + auto result = Update(variable, parent, std::move(state)); \ + DCHECK(!is_immutable_ || result.Unchanged()) \ + << "Value changed while immutable. New state:\n" \ + << *variable; \ + return result; \ + } \ + bool Clear##function() { \ + DCHECK(!is_immutable_ || !variable) \ + << "Value cleared while immutable. Old state:\n" \ + << *variable; \ + return Clear(variable); \ + } \ + \ + private: \ + scoped_refptr<type##PaintPropertyNode> variable; \ + \ + public: +// (End of ADD_NODE definition) + +#define ADD_TRANSFORM(function, variable) \ + ADD_NODE(Transform, function, variable) +#define ADD_EFFECT(function, variable) ADD_NODE(Effect, function, variable) +#define ADD_CLIP(function, variable) ADD_NODE(Clip, function, variable) + // The hierarchy of the transform subtree created by a LayoutObject is as // follows: // [ paintOffsetTranslation ] Normally paint offset is accumulated @@ -56,22 +108,12 @@ // elements to implement object-fit. // OR (Replaced elements don't scroll.) // +---[ scrollTranslation ] The space created by overflow clip. - const TransformPaintPropertyNode* PaintOffsetTranslation() const { - return paint_offset_translation_.get(); - } - const TransformPaintPropertyNode* Transform() const { - return transform_.get(); - } - const TransformPaintPropertyNode* Perspective() const { - return perspective_.get(); - } - const TransformPaintPropertyNode* ReplacedContentTransform() const { - return replaced_content_transform_.get(); - } - const ScrollPaintPropertyNode* Scroll() const { return scroll_.get(); } - const TransformPaintPropertyNode* ScrollTranslation() const { - return scroll_translation_.get(); - } + ADD_TRANSFORM(PaintOffsetTranslation, paint_offset_translation_); + ADD_TRANSFORM(Transform, transform_); + ADD_TRANSFORM(Perspective, perspective_); + ADD_TRANSFORM(ReplacedContentTransform, replaced_content_transform_); + ADD_TRANSFORM(ScrollTranslation, scroll_translation_); + ADD_NODE(Scroll, Scroll, scroll_); // The hierarchy of the effect subtree created by a LayoutObject is as // follows: @@ -94,19 +136,13 @@ // +-[ link highlight effect ] // The link highlight effect is only used for link highlight animations // and should never have descendants. - const EffectPaintPropertyNode* Effect() const { return effect_.get(); } - const EffectPaintPropertyNode* Filter() const { return filter_.get(); } - const EffectPaintPropertyNode* VerticalScrollbarEffect() const { - return vertical_scrollbar_effect_.get(); - } - const EffectPaintPropertyNode* HorizontalScrollbarEffect() const { - return horizontal_scrollbar_effect_.get(); - } - const EffectPaintPropertyNode* Mask() const { return mask_.get(); } - const EffectPaintPropertyNode* ClipPath() const { return clip_path_.get(); } - const EffectPaintPropertyNode* LinkHighlightEffect() const { - return link_highlight_effect_.get(); - } + ADD_EFFECT(Effect, effect_); + ADD_EFFECT(Filter, filter_); + ADD_EFFECT(VerticalScrollbarEffect, vertical_scrollbar_effect_); + ADD_EFFECT(HorizontalScrollbarEffect, horizontal_scrollbar_effect_); + ADD_EFFECT(Mask, mask_); + ADD_EFFECT(ClipPath, clip_path_); + ADD_EFFECT(LinkHighlightEffect, link_highlight_effect_); // The hierarchy of the clip subtree created by a LayoutObject is as follows: // [ fragment clip ] @@ -141,224 +177,25 @@ // [ css clip fixed position ] // Clip created by CSS clip. Only exists if the current clip includes // some clip that doesn't apply to our fixed position descendants. - const ClipPaintPropertyNode* FragmentClip() const { - return fragment_clip_.get(); - } - const ClipPaintPropertyNode* ClipPathClip() const { - return clip_path_clip_.get(); - } - const ClipPaintPropertyNode* MaskClip() const { return mask_clip_.get(); } - const ClipPaintPropertyNode* CssClip() const { return css_clip_.get(); } - const ClipPaintPropertyNode* CssClipFixedPosition() const { - return css_clip_fixed_position_.get(); - } - const ClipPaintPropertyNode* OverflowControlsClip() const { - return overflow_controls_clip_.get(); - } - const ClipPaintPropertyNode* InnerBorderRadiusClip() const { - return inner_border_radius_clip_.get(); - } - const ClipPaintPropertyNode* OverflowClip() const { - return overflow_clip_.get(); - } - - // The following clear* functions return true if the property tree structure - // changes (an existing node was deleted), and false otherwise. See the - // class-level comment ("update & clear implementation note") for details - // about why this is needed for efficient updates. - bool ClearPaintOffsetTranslation() { - return Clear(paint_offset_translation_); - } - bool ClearTransform() { return Clear(transform_); } - bool ClearEffect() { return Clear(effect_); } - bool ClearFilter() { return Clear(filter_); } - bool ClearVerticalScrollbarEffect() { - return Clear(vertical_scrollbar_effect_); - } - bool ClearHorizontalScrollbarEffect() { - return Clear(horizontal_scrollbar_effect_); - } - bool ClearMask() { return Clear(mask_); } - bool ClearClipPath() { return Clear(clip_path_); } - bool ClearLinkHighlightEffect() { return Clear(link_highlight_effect_); } - bool ClearFragmentClip() { return Clear(fragment_clip_); } - bool ClearClipPathClip() { return Clear(clip_path_clip_); } - bool ClearMaskClip() { return Clear(mask_clip_); } - bool ClearCssClip() { return Clear(css_clip_); } - bool ClearCssClipFixedPosition() { return Clear(css_clip_fixed_position_); } - bool ClearOverflowControlsClip() { return Clear(overflow_controls_clip_); } - bool ClearInnerBorderRadiusClip() { return Clear(inner_border_radius_clip_); } - bool ClearOverflowClip() { return Clear(overflow_clip_); } - bool ClearPerspective() { return Clear(perspective_); } - bool ClearReplacedContentTransform() { - return Clear(replaced_content_transform_); - } - bool ClearScroll() { return Clear(scroll_); } - bool ClearScrollTranslation() { return Clear(scroll_translation_); } - - class UpdateResult { - public: - bool Unchanged() const { return result_ == kUnchanged; } - bool NewNodeCreated() const { return result_ == kNewNodeCreated; } - - private: - friend class ObjectPaintProperties; - enum Result { kUnchanged, kValueChanged, kNewNodeCreated }; - UpdateResult(Result r) : result_(r) {} - Result result_; - }; - - UpdateResult UpdatePaintOffsetTranslation( - const TransformPaintPropertyNode& parent, - TransformPaintPropertyNode::State&& state) { - return Update(paint_offset_translation_, parent, std::move(state)); - } - UpdateResult UpdateTransform(const TransformPaintPropertyNode& parent, - TransformPaintPropertyNode::State&& state) { - return Update(transform_, parent, std::move(state)); - } - UpdateResult UpdatePerspective(const TransformPaintPropertyNode& parent, - TransformPaintPropertyNode::State&& state) { - return Update(perspective_, parent, std::move(state)); - } - UpdateResult UpdateReplacedContentTransform( - const TransformPaintPropertyNode& parent, - TransformPaintPropertyNode::State&& state) { - DCHECK(!ScrollTranslation()) << "Replaced elements don't scroll so there " - "should never be both a scroll translation " - "and a replaced content transform."; - return Update(replaced_content_transform_, parent, std::move(state)); - } - UpdateResult UpdateScroll(const ScrollPaintPropertyNode& parent, - ScrollPaintPropertyNode::State&& state) { - return Update(scroll_, parent, std::move(state)); - } - UpdateResult UpdateScrollTranslation( - const TransformPaintPropertyNode& parent, - TransformPaintPropertyNode::State&& state) { - DCHECK(!ReplacedContentTransform()) - << "Replaced elements don't scroll so there should never be both a " - "scroll translation and a replaced content transform."; - return Update(scroll_translation_, parent, std::move(state)); - } - UpdateResult UpdateEffect(const EffectPaintPropertyNode& parent, - EffectPaintPropertyNode::State&& state) { - return Update(effect_, parent, std::move(state)); - } - UpdateResult UpdateFilter(const EffectPaintPropertyNode& parent, - EffectPaintPropertyNode::State&& state) { - return Update(filter_, parent, std::move(state)); - } - UpdateResult UpdateVerticalScrollbarEffect( - const EffectPaintPropertyNode& parent, - EffectPaintPropertyNode::State&& state) { - return Update(vertical_scrollbar_effect_, parent, std::move(state)); - } - UpdateResult UpdateHorizontalScrollbarEffect( - const EffectPaintPropertyNode& parent, - EffectPaintPropertyNode::State&& state) { - return Update(horizontal_scrollbar_effect_, parent, std::move(state)); - } - UpdateResult UpdateMask(const EffectPaintPropertyNode& parent, - EffectPaintPropertyNode::State&& state) { - return Update(mask_, parent, std::move(state)); - } - UpdateResult UpdateClipPath(const EffectPaintPropertyNode& parent, - EffectPaintPropertyNode::State&& state) { - return Update(clip_path_, parent, std::move(state)); - } - UpdateResult UpdateLinkHighlightEffect( - const EffectPaintPropertyNode& parent, - EffectPaintPropertyNode::State&& state) { - return Update(link_highlight_effect_, parent, std::move(state)); - } - UpdateResult UpdateFragmentClip(const ClipPaintPropertyNode& parent, - ClipPaintPropertyNode::State&& state) { - return Update(fragment_clip_, parent, std::move(state)); - } - UpdateResult UpdateClipPathClip(const ClipPaintPropertyNode& parent, - ClipPaintPropertyNode::State&& state) { - return Update(clip_path_clip_, parent, std::move(state)); - } - UpdateResult UpdateMaskClip(const ClipPaintPropertyNode& parent, - ClipPaintPropertyNode::State&& state) { - return Update(mask_clip_, parent, std::move(state)); - } - UpdateResult UpdateCssClip(const ClipPaintPropertyNode& parent, - ClipPaintPropertyNode::State&& state) { - return Update(css_clip_, parent, std::move(state)); - } - UpdateResult UpdateCssClipFixedPosition( - const ClipPaintPropertyNode& parent, - ClipPaintPropertyNode::State&& state) { - return Update(css_clip_fixed_position_, parent, std::move(state)); - } - UpdateResult UpdateOverflowControlsClip( - const ClipPaintPropertyNode& parent, - ClipPaintPropertyNode::State&& state) { - return Update(overflow_controls_clip_, parent, std::move(state)); - } - UpdateResult UpdateInnerBorderRadiusClip( - const ClipPaintPropertyNode& parent, - ClipPaintPropertyNode::State&& state) { - return Update(inner_border_radius_clip_, parent, std::move(state)); - } - UpdateResult UpdateOverflowClip(const ClipPaintPropertyNode& parent, - ClipPaintPropertyNode::State&& state) { - return Update(overflow_clip_, parent, std::move(state)); - } + ADD_CLIP(FragmentClip, fragment_clip_); + ADD_CLIP(ClipPathClip, clip_path_clip_); + ADD_CLIP(MaskClip, mask_clip_); + ADD_CLIP(CssClip, css_clip_); + ADD_CLIP(CssClipFixedPosition, css_clip_fixed_position_); + ADD_CLIP(OverflowControlsClip, overflow_controls_clip_); + ADD_CLIP(InnerBorderRadiusClip, inner_border_radius_clip_); + ADD_CLIP(OverflowClip, overflow_clip_); #if DCHECK_IS_ON() - // Used by FindPropertiesNeedingUpdate.h for recording the current properties. - std::unique_ptr<ObjectPaintProperties> Clone() const { - std::unique_ptr<ObjectPaintProperties> cloned = Create(); - if (paint_offset_translation_) - cloned->paint_offset_translation_ = paint_offset_translation_->Clone(); - if (transform_) - cloned->transform_ = transform_->Clone(); - if (effect_) - cloned->effect_ = effect_->Clone(); - if (filter_) - cloned->filter_ = filter_->Clone(); - if (vertical_scrollbar_effect_) - cloned->vertical_scrollbar_effect_ = vertical_scrollbar_effect_->Clone(); - if (horizontal_scrollbar_effect_) { - cloned->horizontal_scrollbar_effect_ = - horizontal_scrollbar_effect_->Clone(); - } - if (mask_) - cloned->mask_ = mask_->Clone(); - if (clip_path_) - cloned->clip_path_ = clip_path_->Clone(); - if (link_highlight_effect_) - cloned->link_highlight_effect_ = link_highlight_effect_->Clone(); - if (fragment_clip_) - cloned->fragment_clip_ = fragment_clip_->Clone(); - if (clip_path_clip_) - cloned->clip_path_clip_ = clip_path_clip_->Clone(); - if (mask_clip_) - cloned->mask_clip_ = mask_clip_->Clone(); - if (css_clip_) - cloned->css_clip_ = css_clip_->Clone(); - if (css_clip_fixed_position_) - cloned->css_clip_fixed_position_ = css_clip_fixed_position_->Clone(); - if (overflow_controls_clip_) - cloned->overflow_controls_clip_ = overflow_controls_clip_->Clone(); - if (inner_border_radius_clip_) - cloned->inner_border_radius_clip_ = inner_border_radius_clip_->Clone(); - if (overflow_clip_) - cloned->overflow_clip_ = overflow_clip_->Clone(); - if (perspective_) - cloned->perspective_ = perspective_->Clone(); - if (replaced_content_transform_) { - cloned->replaced_content_transform_ = - replaced_content_transform_->Clone(); - } - if (scroll_) - cloned->scroll_ = scroll_->Clone(); - if (scroll_translation_) - cloned->scroll_translation_ = scroll_translation_->Clone(); - return cloned; + // Used by FindPropertiesNeedingUpdate.h for verifying state doesn't change. + void SetImmutable() const { is_immutable_ = true; } + bool IsImmutable() const { return is_immutable_; } + void SetMutable() const { is_immutable_ = false; } + + void Validate() { + DCHECK(!ScrollTranslation() || !ReplacedContentTransform()) + << "Replaced elements don't scroll so there should never be both a " + "scroll translation and a replaced content transform."; } #endif @@ -393,29 +230,9 @@ return UpdateResult::kNewNodeCreated; } - // ATTENTION! Make sure to keep FindPropertiesNeedingUpdate.h in sync when - // new properites are added! - scoped_refptr<TransformPaintPropertyNode> paint_offset_translation_; - scoped_refptr<TransformPaintPropertyNode> transform_; - scoped_refptr<EffectPaintPropertyNode> effect_; - scoped_refptr<EffectPaintPropertyNode> filter_; - scoped_refptr<EffectPaintPropertyNode> vertical_scrollbar_effect_; - scoped_refptr<EffectPaintPropertyNode> horizontal_scrollbar_effect_; - scoped_refptr<EffectPaintPropertyNode> mask_; - scoped_refptr<EffectPaintPropertyNode> clip_path_; - scoped_refptr<EffectPaintPropertyNode> link_highlight_effect_; - scoped_refptr<ClipPaintPropertyNode> fragment_clip_; - scoped_refptr<ClipPaintPropertyNode> clip_path_clip_; - scoped_refptr<ClipPaintPropertyNode> mask_clip_; - scoped_refptr<ClipPaintPropertyNode> css_clip_; - scoped_refptr<ClipPaintPropertyNode> css_clip_fixed_position_; - scoped_refptr<ClipPaintPropertyNode> overflow_controls_clip_; - scoped_refptr<ClipPaintPropertyNode> inner_border_radius_clip_; - scoped_refptr<ClipPaintPropertyNode> overflow_clip_; - scoped_refptr<TransformPaintPropertyNode> perspective_; - scoped_refptr<TransformPaintPropertyNode> replaced_content_transform_; - scoped_refptr<ScrollPaintPropertyNode> scroll_; - scoped_refptr<TransformPaintPropertyNode> scroll_translation_; + // This is used in DCHECKs only, but is not guarded by DCHECK_IS_ON() because + // we can't have a similar guard in a macro definition. + mutable bool is_immutable_ = false; DISALLOW_COPY_AND_ASSIGN(ObjectPaintProperties); };
diff --git a/third_party/blink/renderer/core/paint/paint_property_tree_builder.cc b/third_party/blink/renderer/core/paint/paint_property_tree_builder.cc index 7af82b2..35cd65e 100644 --- a/third_party/blink/renderer/core/paint/paint_property_tree_builder.cc +++ b/third_party/blink/renderer/core/paint/paint_property_tree_builder.cc
@@ -1888,6 +1888,11 @@ UpdateScrollAndScrollTranslation(); } UpdateOutOfFlowContext(); + +#if DCHECK_IS_ON() + if (properties_) + properties_->Validate(); +#endif } } // namespace
diff --git a/third_party/blink/renderer/core/script/script_loader.cc b/third_party/blink/renderer/core/script/script_loader.cc index dbb4163..06f82bf8 100644 --- a/third_party/blink/renderer/core/script/script_loader.cc +++ b/third_party/blink/renderer/core/script/script_loader.cc
@@ -301,15 +301,24 @@ // // FIXME: If script is parser inserted, verify it's still in the original // document. - Document& element_document = element_->GetDocument(); - Document* context_document = element_document.ContextDocument(); - if (!element_document.ExecutingFrame()) - return false; - if (!context_document || !context_document->ExecutingFrame()) - return false; // <spec step="11">If scripting is disabled for the script element, then // return. The script is not executed.</spec> + // + // <spec + // href="https://html.spec.whatwg.org/multipage/webappapis.html#concept-n-noscript"> + // Scripting is disabled for a node if [the node's node document has no + // browsing context], or if scripting is disabled in that browsing context. + // </spec> + Document& element_document = element_->GetDocument(); + // TODO(timothygu): Investigate if we could switch from ExecutingFrame() to + // ExecutingWindow(). + if (!element_document.ExecutingFrame()) + return false; + + Document* context_document = element_document.ContextDocument(); + if (!context_document || !context_document->ExecutingFrame()) + return false; if (!context_document->CanExecuteScripts(kAboutToExecuteScript)) return false;
diff --git a/third_party/blink/renderer/core/streams/BUILD.gn b/third_party/blink/renderer/core/streams/BUILD.gn index 6aa0055..e57e413 100644 --- a/third_party/blink/renderer/core/streams/BUILD.gn +++ b/third_party/blink/renderer/core/streams/BUILD.gn
@@ -9,6 +9,11 @@ "readable_stream_default_controller_wrapper.h", "readable_stream_operations.cc", "readable_stream_operations.h", + "transform_stream.cc", + "transform_stream.h", + "transform_stream_default_controller.cc", + "transform_stream_default_controller.h", + "transform_stream_transformer.h", "underlying_source_base.cc", "underlying_source_base.h", ]
diff --git a/third_party/blink/renderer/core/streams/TransformStream.js b/third_party/blink/renderer/core/streams/TransformStream.js index 0ea5859..39b1111 100644 --- a/third_party/blink/renderer/core/streams/TransformStream.js +++ b/third_party/blink/renderer/core/streams/TransformStream.js
@@ -23,7 +23,12 @@ const _writable = v8.createPrivateSymbol('[[writable]]'); const _controlledTransformStream = v8.createPrivateSymbol('[[controlledTransformStream]]'); + + // Unlike the version in the standard, the controller is passed to this. const _flushAlgorithm = v8.createPrivateSymbol('[[flushAlgorithm]]'); + + // Unlike the version in the standard, the controller is passed in as the + // second argument. const _transformAlgorithm = v8.createPrivateSymbol('[[transformAlgorithm]]'); // Javascript functions. It is important to use these copies, as the ones on @@ -45,7 +50,7 @@ const { hasOwnPropertyNoThrow, resolvePromise, - CreateAlgorithmFromUnderlyingMethodPassingController, + CreateAlgorithmFromUnderlyingMethod, CallOrNoop1, MakeSizeAlgorithmFromSizeFunction, PromiseCall2, @@ -129,6 +134,8 @@ const TransformStream_prototype = TransformStream.prototype; + // The controller is passed to |transformAlgorithm| and |flushAlgorithm|, + // unlike in the standard. function CreateTransformStream( startAlgorithm, transformAlgorithm, flushAlgorithm, writableHighWaterMark, writableSizeAlgorithm, readableHighWaterMark, readableSizeAlgorithm) { @@ -322,8 +329,8 @@ } }; } - const flushAlgorithm = CreateAlgorithmFromUnderlyingMethodPassingController( - transformer, 'flush', 0, controller, 'transformer.flush'); + const flushAlgorithm = CreateAlgorithmFromUnderlyingMethod( + transformer, 'flush', 1, 'transformer.flush'); SetUpTransformStreamDefaultController( stream, controller, transformAlgorithm, flushAlgorithm); } @@ -397,11 +404,11 @@ // assert(binding.isWritableStreamWritable(writable), // `state is "writable"`); - return controller[_transformAlgorithm](chunk); + return controller[_transformAlgorithm](chunk, controller); }); } - return controller[_transformAlgorithm](chunk); + return controller[_transformAlgorithm](chunk, controller); } function TransformStreamDefaultSinkAbortAlgorithm(stream, reason) { @@ -412,7 +419,7 @@ function TransformStreamDefaultSinkCloseAlgorithm(stream) { const readable = stream[_readable]; const controller = stream[_transformStreamController]; - const flushPromise = controller[_flushAlgorithm](); + const flushPromise = controller[_flushAlgorithm](controller); TransformStreamDefaultControllerClearAlgorithms(controller); return thenPromise( @@ -445,6 +452,22 @@ return stream[_backpressureChangePromise]; } + // A wrapper for CreateTransformStream() with only the arguments that + // blink::TransformStream needs. |transformAlgorithm| and |flushAlgorithm| are + // passed the controller, unlike in the standard. + function createTransformStreamSimple(transformAlgorithm, flushAlgorithm) { + return CreateTransformStream(() => Promise_resolve(), + transformAlgorithm, flushAlgorithm); + } + + function getTransformStreamReadable(stream) { + return stream[_readable]; + } + + function getTransformStreamWritable(stream) { + return stream[_writable]; + } + // // Additions to the global object // @@ -459,5 +482,10 @@ // // Exports to Blink // - binding.CreateTransformStream = CreateTransformStream; + Object.assign(binding, { + createTransformStreamSimple, + TransformStreamDefaultControllerEnqueue, + getTransformStreamReadable, + getTransformStreamWritable + }); });
diff --git a/third_party/blink/renderer/core/streams/transform_stream.cc b/third_party/blink/renderer/core/streams/transform_stream.cc new file mode 100644 index 0000000..4ca38c8 --- /dev/null +++ b/third_party/blink/renderer/core/streams/transform_stream.cc
@@ -0,0 +1,176 @@ +// 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 "third_party/blink/renderer/core/streams/transform_stream.h" + +#include "third_party/blink/renderer/bindings/core/v8/generated_code_helper.h" +#include "third_party/blink/renderer/bindings/core/v8/script_function.h" +#include "third_party/blink/renderer/bindings/core/v8/script_promise.h" +#include "third_party/blink/renderer/bindings/core/v8/script_value.h" +#include "third_party/blink/renderer/bindings/core/v8/v8_script_runner.h" +#include "third_party/blink/renderer/core/streams/transform_stream_default_controller.h" +#include "third_party/blink/renderer/core/streams/transform_stream_transformer.h" +#include "third_party/blink/renderer/platform/bindings/exception_state.h" +#include "third_party/blink/renderer/platform/bindings/script_state.h" +#include "third_party/blink/renderer/platform/bindings/v8_binding.h" +#include "third_party/blink/renderer/platform/heap/visitor.h" + +namespace blink { + +// Base class for FlushAlgorithm and TransformAlgorithm. Contains common +// construction code and members. +class TransformStream::Algorithm : public ScriptFunction { + public: + // This is templated just to avoid having two identical copies of the + // function. + template <typename T> + static v8::Local<v8::Function> Create(TransformStreamTransformer* transformer, + ScriptState* script_state, + ExceptionState& exception_state) { + auto* algorithm = new T(transformer, script_state, exception_state); + return algorithm->BindToV8Function(); + } + + void Trace(Visitor* visitor) override { + visitor->Trace(transformer_); + ScriptFunction::Trace(visitor); + } + + protected: + Algorithm(TransformStreamTransformer* transformer, + ScriptState* script_state, + ExceptionState& exception_state) + : ScriptFunction(script_state), + transformer_(transformer), + context_(exception_state.Context()), + interface_name_(exception_state.InterfaceName()), + property_name_(exception_state.PropertyName()) {} + + // AlgorithmScope holds the stack-allocated objects used by the CallRaw() + // methods for FlushAlgorithm and TransformAlgorithm. + class AlgorithmScope { + STACK_ALLOCATED(); + + public: + AlgorithmScope(Algorithm* owner, + const v8::FunctionCallbackInfo<v8::Value>& info, + v8::Local<v8::Value> controller) + : controller_(owner->GetScriptState(), controller), + exception_state_(owner->GetScriptState()->GetIsolate(), + owner->context_, + owner->interface_name_, + owner->property_name_), + reject_promise_scope_(info, exception_state_) {} + + TransformStreamDefaultController* GetController() { return &controller_; } + + ExceptionState* GetExceptionState() { return &exception_state_; } + + private: + TransformStreamDefaultController controller_; + ExceptionState exception_state_; + ExceptionToRejectPromiseScope reject_promise_scope_; + }; + + Member<TransformStreamTransformer> transformer_; + const ExceptionState::ContextType context_; + const char* const interface_name_; + const char* const property_name_; +}; + +class TransformStream::FlushAlgorithm : public TransformStream::Algorithm { + protected: + using Algorithm::Algorithm; + + private: + void CallRaw(const v8::FunctionCallbackInfo<v8::Value>& info) override { + DCHECK_EQ(info.Length(), 1); + AlgorithmScope algorithm_scope(this, info, info[0]); + ExceptionState& exception_state = *algorithm_scope.GetExceptionState(); + + transformer_->Flush(algorithm_scope.GetController(), exception_state); + if (exception_state.HadException()) + return; + V8SetReturnValue(info, + ScriptPromise::CastUndefined(GetScriptState()).V8Value()); + } +}; + +class TransformStream::TransformAlgorithm : public TransformStream::Algorithm { + protected: + using Algorithm::Algorithm; + + private: + void CallRaw(const v8::FunctionCallbackInfo<v8::Value>& info) override { + DCHECK_EQ(info.Length(), 2); + AlgorithmScope algorithm_scope(this, info, info[1]); + ExceptionState& exception_state = *algorithm_scope.GetExceptionState(); + + transformer_->Transform(info[0], algorithm_scope.GetController(), + exception_state); + if (exception_state.HadException()) + return; + V8SetReturnValue(info, + ScriptPromise::CastUndefined(GetScriptState()).V8Value()); + } +}; + +TransformStream::TransformStream() = default; + +TransformStream::~TransformStream() = default; + +void TransformStream::Init(TransformStreamTransformer* transformer, + ScriptState* script_state, + ExceptionState& exception_state) { + auto transform_algorithm = Algorithm::Create<TransformAlgorithm>( + transformer, script_state, exception_state); + auto flush_algorithm = Algorithm::Create<FlushAlgorithm>( + transformer, script_state, exception_state); + v8::Local<v8::Value> args[] = {transform_algorithm, flush_algorithm}; + v8::TryCatch block(script_state->GetIsolate()); + v8::Local<v8::Value> stream; + if (!V8ScriptRunner::CallExtra(script_state, "createTransformStreamSimple", + args) + .ToLocal(&stream)) { + DCHECK(block.HasCaught()); + exception_state.RethrowV8Exception(block.Exception()); + return; + } + DCHECK(!block.HasCaught()); + DCHECK(stream->IsObject()); + stream_.Set(script_state->GetIsolate(), stream); +} + +ScriptValue TransformStream::Readable(ScriptState* script_state, + ExceptionState& exception_state) const { + return Accessor("getTransformStreamReadable", script_state, exception_state); +} + +ScriptValue TransformStream::Writable(ScriptState* script_state, + ExceptionState& exception_state) const { + return Accessor("getTransformStreamWritable", script_state, exception_state); +} + +void TransformStream::Trace(Visitor* visitor) { + visitor->Trace(stream_); +} + +ScriptValue TransformStream::Accessor(const char* accessor_function_name, + ScriptState* script_state, + ExceptionState& exception_state) const { + v8::Local<v8::Value> result; + v8::Local<v8::Value> args[] = {stream_.NewLocal(script_state->GetIsolate())}; + DCHECK(args[0]->IsObject()); + v8::TryCatch block(script_state->GetIsolate()); + if (!V8ScriptRunner::CallExtra(script_state, accessor_function_name, args) + .ToLocal(&result)) { + DCHECK(block.HasCaught()); + exception_state.RethrowV8Exception(block.Exception()); + return ScriptValue(); + } + DCHECK(!block.HasCaught()); + return ScriptValue(script_state, result); +} + +} // namespace blink
diff --git a/third_party/blink/renderer/core/streams/transform_stream.h b/third_party/blink/renderer/core/streams/transform_stream.h new file mode 100644 index 0000000..1fb4cea --- /dev/null +++ b/third_party/blink/renderer/core/streams/transform_stream.h
@@ -0,0 +1,66 @@ +// 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 THIRD_PARTY_BLINK_RENDERER_CORE_STREAMS_TRANSFORM_STREAM_H_ +#define THIRD_PARTY_BLINK_RENDERER_CORE_STREAMS_TRANSFORM_STREAM_H_ + +#include "base/macros.h" +#include "third_party/blink/renderer/core/core_export.h" +#include "third_party/blink/renderer/platform/bindings/trace_wrapper_v8_reference.h" +#include "third_party/blink/renderer/platform/heap/garbage_collected.h" +#include "third_party/blink/renderer/platform/heap/heap.h" +#include "v8/include/v8.h" + +namespace blink { + +class ExceptionState; +class ScriptState; +class ScriptValue; +class TransformStreamTransformer; +class Visitor; + +// Creates and wraps a JavaScript TransformStream object with a transformation +// defined in C++. Provides access to the readable and writable streams. +// +// On-heap references to this class must always be via a TraceWrapperMember, and +// must always have an ancestor in the V8 heap, or |stream_| will be lost. +// +// To ensure that the JS TransformStream is always referenced, this class uses +// two-stage construction. After calling the constructor, store the reference +// in a TraceWrapperMember before calling Init(). Init() must always be called +// before using the instance. +class CORE_EXPORT TransformStream final + : public GarbageCollectedFinalized<TransformStream> { + public: + TransformStream(); + ~TransformStream(); + + // If HadException is true on return, the object is invalid and should be + // destroyed. + void Init(TransformStreamTransformer*, ScriptState*, ExceptionState&); + + ScriptValue Readable(ScriptState*, ExceptionState&) const; + ScriptValue Writable(ScriptState*, ExceptionState&) const; + + void Trace(Visitor*); + + private: + // These are class-scoped to avoid name clashes in jumbo builds. + class Algorithm; + class FlushAlgorithm; + class TransformAlgorithm; + + // Common implementation for Readable() and Writable() accessors. + ScriptValue Accessor(const char* accessor_function_name, + ScriptState*, + ExceptionState&) const; + + TraceWrapperV8Reference<v8::Value> stream_; + + DISALLOW_COPY_AND_ASSIGN(TransformStream); +}; + +} // namespace blink + +#endif // THIRD_PARTY_BLINK_RENDERER_CORE_STREAMS_TRANSFORM_STREAM_H_
diff --git a/third_party/blink/renderer/core/streams/transform_stream_default_controller.cc b/third_party/blink/renderer/core/streams/transform_stream_default_controller.cc new file mode 100644 index 0000000..8f23289 --- /dev/null +++ b/third_party/blink/renderer/core/streams/transform_stream_default_controller.cc
@@ -0,0 +1,32 @@ +// 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 "third_party/blink/renderer/core/streams/transform_stream_default_controller.h" + +#include "third_party/blink/renderer/bindings/core/v8/v8_script_runner.h" + +namespace blink { + +TransformStreamDefaultController::TransformStreamDefaultController( + ScriptState* script_state, + v8::Local<v8::Value> controller) + : script_state_(script_state), controller_(controller) { + DCHECK(controller->IsObject()); +} + +void TransformStreamDefaultController::Enqueue( + v8::Local<v8::Value> chunk, + ExceptionState& exception_state) { + DCHECK(controller_->IsObject()); + v8::Local<v8::Value> args[] = {controller_, chunk}; + v8::TryCatch block(script_state_->GetIsolate()); + V8ScriptRunner::CallExtra(script_state_, + "TransformStreamDefaultControllerEnqueue", args); + if (block.HasCaught()) { + exception_state.RethrowV8Exception(block.Exception()); + return; + } +} + +} // namespace blink
diff --git a/third_party/blink/renderer/core/streams/transform_stream_default_controller.h b/third_party/blink/renderer/core/streams/transform_stream_default_controller.h new file mode 100644 index 0000000..c60dd5c --- /dev/null +++ b/third_party/blink/renderer/core/streams/transform_stream_default_controller.h
@@ -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. + +#ifndef THIRD_PARTY_BLINK_RENDERER_CORE_STREAMS_TRANSFORM_STREAM_DEFAULT_CONTROLLER_H_ +#define THIRD_PARTY_BLINK_RENDERER_CORE_STREAMS_TRANSFORM_STREAM_DEFAULT_CONTROLLER_H_ + +#include "base/macros.h" +#include "third_party/blink/renderer/core/core_export.h" +#include "third_party/blink/renderer/platform/bindings/exception_state.h" +#include "third_party/blink/renderer/platform/bindings/script_state.h" +#include "third_party/blink/renderer/platform/heap/member.h" +#include "v8/include/v8.h" + +namespace blink { + +// Thin wrapper for the JavaScript TransformStreamDefaultController object. The +// API mimics the JavaScript API +// https://streams.spec.whatwg.org/#ts-default-controller-class but unneeded +// parts have not been implemented. +class CORE_EXPORT TransformStreamDefaultController final { + STACK_ALLOCATED(); + + public: + TransformStreamDefaultController(ScriptState*, + v8::Local<v8::Value> controller); + + void Enqueue(v8::Local<v8::Value> chunk, ExceptionState&); + + private: + Member<ScriptState> script_state_; + v8::Local<v8::Value> controller_; + + DISALLOW_COPY_AND_ASSIGN(TransformStreamDefaultController); +}; + +} // namespace blink + +#endif // THIRD_PARTY_BLINK_RENDERER_CORE_STREAMS_TRANSFORM_STREAM_DEFAULT_CONTROLLER_H_
diff --git a/third_party/blink/renderer/core/streams/transform_stream_test.cc b/third_party/blink/renderer/core/streams/transform_stream_test.cc new file mode 100644 index 0000000..f5b5c24 --- /dev/null +++ b/third_party/blink/renderer/core/streams/transform_stream_test.cc
@@ -0,0 +1,504 @@ +// 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 "third_party/blink/renderer/core/streams/transform_stream.h" + +#include "testing/gmock/include/gmock/gmock.h" +#include "testing/gtest/include/gtest/gtest.h" +#include "third_party/blink/renderer/bindings/core/v8/script_function.h" +#include "third_party/blink/renderer/bindings/core/v8/script_value.h" +#include "third_party/blink/renderer/bindings/core/v8/v8_binding_for_core.h" +#include "third_party/blink/renderer/bindings/core/v8/v8_binding_for_testing.h" +#include "third_party/blink/renderer/bindings/core/v8/v8_extras_test_utils.h" +#include "third_party/blink/renderer/bindings/core/v8/v8_iterator_result_value.h" +#include "third_party/blink/renderer/core/streams/readable_stream_operations.h" +#include "third_party/blink/renderer/core/streams/transform_stream_default_controller.h" +#include "third_party/blink/renderer/core/streams/transform_stream_transformer.h" +#include "third_party/blink/renderer/core/testing/dummy_page_holder.h" +#include "third_party/blink/renderer/core/testing/garbage_collected_script_wrappable.h" +#include "third_party/blink/renderer/platform/bindings/exception_state.h" +#include "third_party/blink/renderer/platform/bindings/microtask.h" +#include "third_party/blink/renderer/platform/bindings/script_state.h" +#include "third_party/blink/renderer/platform/bindings/to_v8.h" +#include "third_party/blink/renderer/platform/bindings/trace_wrapper_member.h" +#include "third_party/blink/renderer/platform/bindings/v8_binding.h" +#include "third_party/blink/renderer/platform/wtf/text/wtf_string.h" +#include "v8/include/v8.h" + +namespace blink { + +namespace { + +using ::testing::_; +using ::testing::Mock; + +class TransformStreamTest : public ::testing::Test { + public: + void TearDown() override { + if (holder_) + ClearHolder(); + } + + void Init(TransformStreamTransformer* transformer, + ScriptState* script_state, + ExceptionState& exception_state) { + holder_ = new Holder(script_state); + holder_->Stream()->Init(transformer, script_state, exception_state); + } + + TransformStream* Stream() const { return holder_->Stream(); } + + // This takes the |readable| and |writable| properties of the TransformStream + // and copies them onto the global object so they can be accessed by Eval(). + void CopyReadableAndWritableToGlobal(const V8TestingScope& scope) { + auto* script_state = scope.GetScriptState(); + ScriptValue readable = + Stream()->Readable(script_state, ASSERT_NO_EXCEPTION); + ScriptValue writable = + Stream()->Writable(script_state, ASSERT_NO_EXCEPTION); + v8::Local<v8::Object> global = script_state->GetContext()->Global(); + EXPECT_TRUE(global + ->Set(scope.GetContext(), + V8String(scope.GetIsolate(), "readable"), + readable.V8Value()) + .IsJust()); + EXPECT_TRUE(global + ->Set(scope.GetContext(), + V8String(scope.GetIsolate(), "writable"), + writable.V8Value()) + .IsJust()); + } + + void ClearHolder() { + holder_->Destroy(); + holder_ = nullptr; + } + + private: + // In normal use, TransformStream will be referenced by a ScriptWrappable and + // so will be visible to the V8 garbage collector via wrapper tracing. For + // testing purposes we need a dummy ScriptWrappable object to do the same + // thing. + // TODO(ricea): Remove this once unified GC has replaced wrapper tracing. + class Holder : public GarbageCollectedScriptWrappable { + public: + explicit Holder(ScriptState* script_state) + : GarbageCollectedScriptWrappable("Holder"), + this_as_v8_value_( + ScriptValue(script_state, ToV8(this, script_state))), + stream_(new TransformStream()) {} + + // Destroy() must be called to break the reference cycle. + void Destroy() { + this_as_v8_value_.Clear(); + stream_ = nullptr; + } + + TransformStream* Stream() const { return stream_.Get(); } + + void Trace(Visitor* visitor) override { + visitor->Trace(stream_); + GarbageCollectedScriptWrappable::Trace(visitor); + } + + private: + // Self-reference to keep this object referenced from V8. + ScriptValue this_as_v8_value_; + TraceWrapperMember<TransformStream> stream_; + }; + + Persistent<Holder> holder_; +}; + +class IdentityTransformer final : public TransformStreamTransformer { + public: + void Transform(v8::Local<v8::Value> chunk, + TransformStreamDefaultController* controller, + ExceptionState& exception_state) override { + controller->Enqueue(chunk, exception_state); + } + + void Flush(TransformStreamDefaultController* controller, + ExceptionState& exception_state) override {} +}; + +class MockTransformStreamTransformer : public TransformStreamTransformer { + public: + MOCK_METHOD3(Transform, + void(v8::Local<v8::Value> chunk, + TransformStreamDefaultController*, + ExceptionState&)); + MOCK_METHOD2(Flush, void(TransformStreamDefaultController*, ExceptionState&)); +}; + +// If this doesn't work then nothing else will. +TEST_F(TransformStreamTest, Construct) { + V8TestingScope scope; + Init(new IdentityTransformer(), scope.GetScriptState(), ASSERT_NO_EXCEPTION); + EXPECT_TRUE(Stream()); +} + +TEST_F(TransformStreamTest, Accessors) { + V8TestingScope scope; + Init(new IdentityTransformer(), scope.GetScriptState(), ASSERT_NO_EXCEPTION); + ScriptValue readable = + Stream()->Readable(scope.GetScriptState(), ASSERT_NO_EXCEPTION); + ScriptValue writable = + Stream()->Writable(scope.GetScriptState(), ASSERT_NO_EXCEPTION); + EXPECT_TRUE(readable.IsObject()); + EXPECT_TRUE(writable.IsObject()); + EXPECT_TRUE(ReadableStreamOperations::IsReadableStream( + scope.GetScriptState(), readable, ASSERT_NO_EXCEPTION) + .value_or(false)); + // TODO(ricea): Check writable too once we have a wrapper for + // IsWritableStream(). +} + +TEST_F(TransformStreamTest, TransformIsCalled) { + V8TestingScope scope; + auto* mock = new ::testing::StrictMock<MockTransformStreamTransformer>(); + Init(mock, scope.GetScriptState(), ASSERT_NO_EXCEPTION); + // Need to run microtasks so the startAlgorithm promise resolves. + v8::MicrotasksScope::PerformCheckpoint(scope.GetIsolate()); + CopyReadableAndWritableToGlobal(scope); + + EXPECT_CALL(*mock, Transform(_, _, _)); + + // The initial read is needed to relieve backpressure. + EvalWithPrintingError(&scope, + "readable.getReader().read();\n" + "const writer = writable.getWriter();\n" + "writer.write('a');\n"); + + Mock::VerifyAndClear(mock); + Mock::AllowLeak(mock); +} + +TEST_F(TransformStreamTest, FlushIsCalled) { + V8TestingScope scope; + auto* mock = new ::testing::StrictMock<MockTransformStreamTransformer>(); + Init(mock, scope.GetScriptState(), ASSERT_NO_EXCEPTION); + // Need to run microtasks so the startAlgorithm promise resolves. + v8::MicrotasksScope::PerformCheckpoint(scope.GetIsolate()); + CopyReadableAndWritableToGlobal(scope); + + EXPECT_CALL(*mock, Flush(_, _)); + + EvalWithPrintingError(&scope, + "const writer = writable.getWriter();\n" + "writer.close();\n"); + + Mock::VerifyAndClear(mock); + Mock::AllowLeak(mock); +} + +class ExpectNotReached : public ScriptFunction { + public: + static v8::Local<v8::Function> Create(ScriptState* script_state) { + auto* self = new ExpectNotReached(script_state); + return self->BindToV8Function(); + } + + private: + explicit ExpectNotReached(ScriptState* script_state) + : ScriptFunction(script_state) {} + + ScriptValue Call(ScriptValue) override { + ADD_FAILURE() << "ExpectNotReached was reached"; + return ScriptValue(); + } +}; + +// Fails the test if the iterator passed to the function does not have a value +// of exactly |expected|. +class ExpectChunkIsString : public ScriptFunction { + public: + static v8::Local<v8::Function> Create(ScriptState* script_state, + const String& expected, + bool* called) { + auto* self = new ExpectChunkIsString(script_state, expected, called); + return self->BindToV8Function(); + } + + private: + ExpectChunkIsString(ScriptState* script_state, + const String& expected, + bool* called) + : ScriptFunction(script_state), expected_(expected), called_(called) {} + + ScriptValue Call(ScriptValue value) override { + *called_ = true; + if (!value.IsObject()) { + ADD_FAILURE() << "iterator must be an object"; + return ScriptValue(); + } + bool done = false; + auto* script_state = GetScriptState(); + auto chunk = V8UnpackIteratorResult( + script_state, + value.V8Value()->ToObject(script_state->GetContext()).ToLocalChecked(), + &done); + EXPECT_FALSE(done); + EXPECT_FALSE(chunk.IsEmpty()); + EXPECT_EQ(ToCoreStringWithUndefinedOrNullCheck(chunk.ToLocalChecked()), + expected_); + return ScriptValue(); + } + + String expected_; + bool* called_; +}; + +class ExpectTypeError : public ScriptFunction { + public: + static v8::Local<v8::Function> Create(ScriptState* script_state, + const String& message, + bool* called) { + auto* self = new ExpectTypeError(script_state, message, called); + return self->BindToV8Function(); + } + + private: + ExpectTypeError(ScriptState* script_state, + const String& message, + bool* called) + : ScriptFunction(script_state), message_(message), called_(called) {} + + ScriptValue Call(ScriptValue value) override { + *called_ = true; + EXPECT_TRUE(IsTypeError(GetScriptState(), value, message_)); + return ScriptValue(); + } + + static bool IsTypeError(ScriptState* script_state, + ScriptValue value, + const String& message) { + v8::Local<v8::Object> object; + if (!value.V8Value() + ->ToObject(script_state->GetContext()) + .ToLocal(&object)) { + return false; + } + if (!object->IsNativeError()) + return false; + return Has(script_state, object, "name", "TypeError") && + Has(script_state, object, "message", message); + } + + static bool Has(ScriptState* script_state, + v8::Local<v8::Object> object, + const String& key, + const String& value) { + auto context = script_state->GetContext(); + auto* isolate = script_state->GetIsolate(); + v8::Local<v8::Value> actual; + return object->Get(context, V8AtomicString(isolate, key)) + .ToLocal(&actual) && + ToCoreStringWithUndefinedOrNullCheck(actual) == value; + } + + String message_; + bool* called_; +}; + +TEST_F(TransformStreamTest, EnqueueFromTransform) { + V8TestingScope scope; + auto* script_state = scope.GetScriptState(); + Init(new IdentityTransformer(), script_state, ASSERT_NO_EXCEPTION); + + CopyReadableAndWritableToGlobal(scope); + + EvalWithPrintingError(&scope, + "const writer = writable.getWriter();\n" + "writer.write('a');\n"); + + ScriptValue readable = Stream()->Readable(script_state, ASSERT_NO_EXCEPTION); + ScriptValue reader = ReadableStreamOperations::GetReader( + script_state, readable, ASSERT_NO_EXCEPTION); + bool chunk_seen = false; + ReadableStreamOperations::DefaultReaderRead(script_state, reader) + .Then(ExpectChunkIsString::Create(script_state, "a", &chunk_seen), + ExpectNotReached::Create(script_state)); + v8::MicrotasksScope::PerformCheckpoint(scope.GetIsolate()); + EXPECT_TRUE(chunk_seen); +} + +TEST_F(TransformStreamTest, EnqueueFromFlush) { + class EnqueueFromFlushTransformer : public TransformStreamTransformer { + public: + EnqueueFromFlushTransformer(v8::Local<v8::Object> global, + v8::Isolate* isolate) + : global_(global), isolate_(isolate) {} + + void Transform(v8::Local<v8::Value>, + TransformStreamDefaultController*, + ExceptionState&) override {} + void Flush(TransformStreamDefaultController* controller, + ExceptionState& exception_state) override { + controller->Enqueue(ToV8("a", global_, isolate_), exception_state); + } + + private: + v8::Local<v8::Object> global_; + v8::Isolate* isolate_; + }; + V8TestingScope scope; + auto* script_state = scope.GetScriptState(); + Init(new EnqueueFromFlushTransformer(scope.GetContext()->Global(), + scope.GetIsolate()), + script_state, ASSERT_NO_EXCEPTION); + + CopyReadableAndWritableToGlobal(scope); + + EvalWithPrintingError(&scope, + "const writer = writable.getWriter();\n" + "writer.close();\n"); + + ScriptValue readable = Stream()->Readable(script_state, ASSERT_NO_EXCEPTION); + ScriptValue reader = ReadableStreamOperations::GetReader( + script_state, readable, ASSERT_NO_EXCEPTION); + bool chunkSeen = false; + ReadableStreamOperations::DefaultReaderRead(script_state, reader) + .Then(ExpectChunkIsString::Create(script_state, "a", &chunkSeen), + ExpectNotReached::Create(script_state)); + v8::MicrotasksScope::PerformCheckpoint(scope.GetIsolate()); + EXPECT_TRUE(chunkSeen); +} + +// TODO(ricea): Re-enable this test when throwing from Transform() works +// properly. See https://github.com/whatwg/streams/issues/946. +TEST_F(TransformStreamTest, DISABLED_ThrowFromTransform) { + static constexpr char kMessage[] = "errorInTransform"; + class ThrowFromTransformTransformer : public TransformStreamTransformer { + public: + void Transform(v8::Local<v8::Value>, + TransformStreamDefaultController*, + ExceptionState& exception_state) override { + exception_state.ThrowTypeError(kMessage); + } + void Flush(TransformStreamDefaultController*, ExceptionState&) override {} + }; + V8TestingScope scope; + auto* script_state = scope.GetScriptState(); + Init(new ThrowFromTransformTransformer(), script_state, ASSERT_NO_EXCEPTION); + + CopyReadableAndWritableToGlobal(scope); + + ScriptValue promise = + EvalWithPrintingError(&scope, + "const writer = writable.getWriter();\n" + "writer.write('a');\n"); + + ScriptValue readable = Stream()->Readable(script_state, ASSERT_NO_EXCEPTION); + ScriptValue reader = ReadableStreamOperations::GetReader( + script_state, readable, ASSERT_NO_EXCEPTION); + bool readableTypeErrorThrown = false; + bool writableTypeErrorThrown = false; + ReadableStreamOperations::DefaultReaderRead(script_state, reader) + .Then(ExpectNotReached::Create(script_state), + ExpectTypeError::Create(script_state, kMessage, + &readableTypeErrorThrown)); + ScriptPromise::Cast(script_state, promise) + .Then(ExpectNotReached::Create(script_state), + ExpectTypeError::Create(script_state, kMessage, + &writableTypeErrorThrown)); + v8::MicrotasksScope::PerformCheckpoint(scope.GetIsolate()); + EXPECT_TRUE(readableTypeErrorThrown); + EXPECT_TRUE(writableTypeErrorThrown); +} + +TEST_F(TransformStreamTest, ThrowFromFlush) { + static constexpr char kMessage[] = "errorInFlush"; + class ThrowFromFlushTransformer : public TransformStreamTransformer { + public: + void Transform(v8::Local<v8::Value>, + TransformStreamDefaultController*, + ExceptionState&) override {} + void Flush(TransformStreamDefaultController*, + ExceptionState& exception_state) override { + exception_state.ThrowTypeError(kMessage); + } + }; + V8TestingScope scope; + auto* script_state = scope.GetScriptState(); + Init(new ThrowFromFlushTransformer(), script_state, ASSERT_NO_EXCEPTION); + + CopyReadableAndWritableToGlobal(scope); + + ScriptValue promise = + EvalWithPrintingError(&scope, + "const writer = writable.getWriter();\n" + "writer.close();\n"); + + ScriptValue readable = Stream()->Readable(script_state, ASSERT_NO_EXCEPTION); + ScriptValue reader = ReadableStreamOperations::GetReader( + script_state, readable, ASSERT_NO_EXCEPTION); + bool readableTypeErrorThrown = false; + bool writableTypeErrorThrown = false; + ReadableStreamOperations::DefaultReaderRead(script_state, reader) + .Then(ExpectNotReached::Create(script_state), + ExpectTypeError::Create(script_state, kMessage, + &readableTypeErrorThrown)); + ScriptPromise::Cast(script_state, promise) + .Then(ExpectNotReached::Create(script_state), + ExpectTypeError::Create(script_state, kMessage, + &writableTypeErrorThrown)); + v8::MicrotasksScope::PerformCheckpoint(scope.GetIsolate()); + EXPECT_TRUE(readableTypeErrorThrown); + EXPECT_TRUE(writableTypeErrorThrown); +} + +// Verify that the JavaScript TransformStream object is kept alive by the C++ +// TransformStream object. +TEST_F(TransformStreamTest, SurvivesGarbageCollectionWhenTraced) { + auto page_holder = DummyPageHolder::Create(); + Persistent<ScriptState> script_state = + ToScriptStateForMainWorld(page_holder->GetDocument().GetFrame()); + { + ScriptState::Scope scope(script_state); + Init(new IdentityTransformer(), script_state, ASSERT_NO_EXCEPTION); + } + Microtask::PerformCheckpoint(script_state->GetIsolate()); + script_state->GetIsolate()->RequestGarbageCollectionForTesting( + v8::Isolate::kFullGarbageCollection); + ScriptState::Scope scope(script_state); + ScriptValue readable = Stream()->Readable(script_state, ASSERT_NO_EXCEPTION); + EXPECT_TRUE(readable.IsObject()); + EXPECT_TRUE(ReadableStreamOperations::IsReadableStream(script_state, readable, + ASSERT_NO_EXCEPTION) + .value_or(false)); +} + +// Verify that JS TransformStream is collected when it is not reachable from V8. +// TODO(ricea): Remove this test when unified garbage collection is introduced, +// as it will fail. +#if GTEST_HAS_DEATH_TEST +#define MAYBE_IsGarbageCollectedWhenNotTraced IsGarbageCollectedWhenNotTraced +#else +#define MAYBE_IsGarbageCollectedWhenNotTraced \ + DISABLED_IsGarbageCollectedWhenNotTraced +#endif +TEST_F(TransformStreamTest, MAYBE_IsGarbageCollectedWhenNotTraced) { + auto page_holder = DummyPageHolder::Create(); + Persistent<ScriptState> script_state = + ToScriptStateForMainWorld(page_holder->GetDocument().GetFrame()); + { + ScriptState::Scope scope(script_state); + Init(new IdentityTransformer(), script_state, ASSERT_NO_EXCEPTION); + } + Persistent<TransformStream> stream = Stream(); + ClearHolder(); + Microtask::PerformCheckpoint(script_state->GetIsolate()); + script_state->GetIsolate()->RequestGarbageCollectionForTesting( + v8::Isolate::kFullGarbageCollection); + ScriptState::Scope scope(script_state); + // This emits a warning that death tests are unsafe with threads, but it works + // anyway. The crash message depends on whether DCHECK is enabled or not, so + // the regex it is required to match is empty. + EXPECT_DEATH(stream->Readable(script_state, ASSERT_NO_EXCEPTION), ""); +} + +} // namespace + +} // namespace blink
diff --git a/third_party/blink/renderer/core/streams/transform_stream_transformer.h b/third_party/blink/renderer/core/streams/transform_stream_transformer.h new file mode 100644 index 0000000..46b7f9a7 --- /dev/null +++ b/third_party/blink/renderer/core/streams/transform_stream_transformer.h
@@ -0,0 +1,48 @@ +// 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 THIRD_PARTY_BLINK_RENDERER_CORE_STREAMS_TRANSFORM_STREAM_TRANSFORMER_H_ +#define THIRD_PARTY_BLINK_RENDERER_CORE_STREAMS_TRANSFORM_STREAM_TRANSFORMER_H_ + +#include "base/macros.h" +#include "third_party/blink/renderer/core/core_export.h" +#include "third_party/blink/renderer/platform/heap/garbage_collected.h" +#include "third_party/blink/renderer/platform/heap/heap.h" +#include "v8/include/v8.h" + +namespace blink { + +class ExceptionState; +class TransformStreamDefaultController; +class Visitor; + +// Interface to be implemented by C++ code that needs to create a +// TransformStream. Very similar to the JavaScript [Transformer +// API](https://streams.spec.whatwg.org/#transformer-api), but asynchronous +// transforms are not currently supported. Errors should be signalled by +// exceptions. +// +// An instance is stored in a JS object as a Persistent reference, so to avoid +// uncollectable cycles implementations must not directly or indirectly strongly +// reference any JS object. +class CORE_EXPORT TransformStreamTransformer + : public GarbageCollectedFinalized<TransformStreamTransformer> { + public: + TransformStreamTransformer() = default; + virtual ~TransformStreamTransformer() = default; + + virtual void Transform(v8::Local<v8::Value> chunk, + TransformStreamDefaultController*, + ExceptionState&) = 0; + virtual void Flush(TransformStreamDefaultController*, ExceptionState&) = 0; + + virtual void Trace(Visitor*) {} + + private: + DISALLOW_COPY_AND_ASSIGN(TransformStreamTransformer); +}; + +} // namespace blink + +#endif // THIRD_PARTY_BLINK_RENDERER_CORE_STREAMS_TRANSFORM_STREAM_TRANSFORMER_H_
diff --git a/third_party/blink/renderer/core/testing/internals.cc b/third_party/blink/renderer/core/testing/internals.cc index d8971a25..91b0b66a 100644 --- a/third_party/blink/renderer/core/testing/internals.cc +++ b/third_party/blink/renderer/core/testing/internals.cc
@@ -936,7 +936,7 @@ return node->GetDocument() .Markers() - .MarkersFor(ToText(node), marker_types.value()) + .MarkersFor(ToText(*node), marker_types.value()) .size(); } @@ -945,7 +945,7 @@ // Only TextMatch markers can be active. DocumentMarkerVector markers = node->GetDocument().Markers().MarkersFor( - ToText(node), DocumentMarker::MarkerTypes::TextMatch()); + ToText(*node), DocumentMarker::MarkerTypes::TextMatch()); unsigned active_marker_count = 0; for (const auto& marker : markers) { @@ -971,7 +971,7 @@ } DocumentMarkerVector markers = node->GetDocument().Markers().MarkersFor( - ToText(node), marker_types.value()); + ToText(*node), marker_types.value()); if (markers.size() <= index) return nullptr; return markers[index];
diff --git a/third_party/blink/renderer/core/workers/dedicated_worker.cc b/third_party/blink/renderer/core/workers/dedicated_worker.cc index 1547fad..202e386 100644 --- a/third_party/blink/renderer/core/workers/dedicated_worker.cc +++ b/third_party/blink/renderer/core/workers/dedicated_worker.cc
@@ -115,11 +115,17 @@ const ScriptValue& message, Vector<ScriptValue>& transfer, ExceptionState& exception_state) { - DCHECK(GetExecutionContext()->IsContextThread()); - PostMessageOptions options; if (!transfer.IsEmpty()) options.setTransfer(transfer); + postMessage(script_state, message, options, exception_state); +} + +void DedicatedWorker::postMessage(ScriptState* script_state, + const ScriptValue& message, + const PostMessageOptions& options, + ExceptionState& exception_state) { + DCHECK(GetExecutionContext()->IsContextThread()); Transferables transferables; scoped_refptr<SerializedScriptValue> serialized_message =
diff --git a/third_party/blink/renderer/core/workers/dedicated_worker.h b/third_party/blink/renderer/core/workers/dedicated_worker.h index f793f5e..ad90d378 100644 --- a/third_party/blink/renderer/core/workers/dedicated_worker.h +++ b/third_party/blink/renderer/core/workers/dedicated_worker.h
@@ -27,6 +27,7 @@ class DedicatedWorkerMessagingProxy; class ExceptionState; class ExecutionContext; +class PostMessageOptions; class ScriptState; class WorkerClassicScriptLoader; class WorkerClients; @@ -58,6 +59,10 @@ const ScriptValue& message, Vector<ScriptValue>& transfer, ExceptionState&); + void postMessage(ScriptState*, + const ScriptValue& message, + const PostMessageOptions&, + ExceptionState&); void terminate(); BeginFrameProviderParams CreateBeginFrameProviderParams();
diff --git a/third_party/blink/renderer/core/workers/dedicated_worker_global_scope.cc b/third_party/blink/renderer/core/workers/dedicated_worker_global_scope.cc index 1e0f8250..07d699bd 100644 --- a/third_party/blink/renderer/core/workers/dedicated_worker_global_scope.cc +++ b/third_party/blink/renderer/core/workers/dedicated_worker_global_scope.cc
@@ -91,7 +91,13 @@ PostMessageOptions options; if (!transfer.IsEmpty()) options.setTransfer(transfer); + postMessage(script_state, message, options, exception_state); +} +void DedicatedWorkerGlobalScope::postMessage(ScriptState* script_state, + const ScriptValue& message, + const PostMessageOptions& options, + ExceptionState& exception_state) { Transferables transferables; scoped_refptr<SerializedScriptValue> serialized_message = PostMessageHelper::SerializeMessageByMove(script_state->GetIsolate(),
diff --git a/third_party/blink/renderer/core/workers/dedicated_worker_global_scope.h b/third_party/blink/renderer/core/workers/dedicated_worker_global_scope.h index c080e96..9e40d719 100644 --- a/third_party/blink/renderer/core/workers/dedicated_worker_global_scope.h +++ b/third_party/blink/renderer/core/workers/dedicated_worker_global_scope.h
@@ -41,6 +41,7 @@ class DedicatedWorkerObjectProxy; class DedicatedWorkerThread; +class PostMessageOptions; class ScriptState; struct GlobalScopeCreationParams; @@ -68,6 +69,10 @@ const ScriptValue& message, Vector<ScriptValue>& transfer, ExceptionState&); + void postMessage(ScriptState*, + const ScriptValue& message, + const PostMessageOptions&, + ExceptionState&); DEFINE_ATTRIBUTE_EVENT_LISTENER(message); DEFINE_ATTRIBUTE_EVENT_LISTENER(messageerror);
diff --git a/third_party/blink/renderer/core/workers/dedicated_worker_global_scope.idl b/third_party/blink/renderer/core/workers/dedicated_worker_global_scope.idl index 756b04d1..4ef0ca86 100644 --- a/third_party/blink/renderer/core/workers/dedicated_worker_global_scope.idl +++ b/third_party/blink/renderer/core/workers/dedicated_worker_global_scope.idl
@@ -35,6 +35,7 @@ Exposed=DedicatedWorker ] interface DedicatedWorkerGlobalScope : WorkerGlobalScope { [CallWith=ScriptState, RaisesException] void postMessage(any message, optional sequence<object> transfer = []); + [RuntimeEnabled=PostMessageOptions, CallWith=ScriptState, RaisesException] void postMessage(any message, PostMessageOptions options); void close();
diff --git a/third_party/blink/renderer/core/workers/worker.idl b/third_party/blink/renderer/core/workers/worker.idl index b7590335..463f251 100644 --- a/third_party/blink/renderer/core/workers/worker.idl +++ b/third_party/blink/renderer/core/workers/worker.idl
@@ -38,6 +38,7 @@ void terminate(); [CallWith=ScriptState, RaisesException] void postMessage(any message, optional sequence<object> transfer=[]); + [RuntimeEnabled=PostMessageOptions, CallWith=ScriptState, RaisesException] void postMessage(any message, PostMessageOptions options); attribute EventHandler onmessage; };
diff --git a/third_party/blink/renderer/devtools/front_end/sources/CallStackSidebarPane.js b/third_party/blink/renderer/devtools/front_end/sources/CallStackSidebarPane.js index 865ea35..c0285a1c 100644 --- a/third_party/blink/renderer/devtools/front_end/sources/CallStackSidebarPane.js +++ b/third_party/blink/renderer/devtools/front_end/sources/CallStackSidebarPane.js
@@ -164,7 +164,8 @@ this._muteActivateItem = true; if (!this._showBlackboxed && this._items.every(item => item.isBlackboxed)) { this._showBlackboxed = true; - this._items.replaceAll(Array.from(this._items)); + for (let i = 0; i < this._items.length; ++i) + this._list.refreshItemByIndex(i); this._blackboxedMessageElement.classList.toggle('hidden', true); } else { const itemsSet = new Set(items); @@ -172,7 +173,7 @@ for (let i = 0; i < this._items.length; ++i) { const item = this._items.at(i); if (itemsSet.has(item)) - this._items.replace(i, item); + this._list.refreshItemByIndex(i); hasBlackboxed = hasBlackboxed || item.isBlackboxed; } this._blackboxedMessageElement.classList.toggle('hidden', this._showBlackboxed || !hasBlackboxed);
diff --git a/third_party/blink/renderer/devtools/front_end/ui/ListControl.js b/third_party/blink/renderer/devtools/front_end/ui/ListControl.js index 56f1946..f30619c0 100644 --- a/third_party/blink/renderer/devtools/front_end/ui/ListControl.js +++ b/third_party/blink/renderer/devtools/front_end/ui/ListControl.js
@@ -136,6 +136,14 @@ console.error('Item to refresh is not present'); return; } + this.refreshItemByIndex(index); + } + + /** + * @param {number} index + */ + refreshItemByIndex(index) { + const item = this._model.at(index); this._itemToElement.delete(item); this.invalidateRange(index, index + 1); if (this._selectedIndex !== -1)
diff --git a/third_party/blink/renderer/modules/accessibility/ax_layout_object.cc b/third_party/blink/renderer/modules/accessibility/ax_layout_object.cc index 34fc28c..36a55bb 100644 --- a/third_party/blink/renderer/modules/accessibility/ax_layout_object.cc +++ b/third_party/blink/renderer/modules/accessibility/ax_layout_object.cc
@@ -1099,7 +1099,7 @@ if (!buffer) return String(); - return buffer->ToDataURL("image/png", 1.0); + return buffer->ToDataURL(kMimeTypePng, 1.0); } String AXLayoutObject::GetText() const {
diff --git a/third_party/blink/renderer/modules/accessibility/ax_node_object.cc b/third_party/blink/renderer/modules/accessibility/ax_node_object.cc index 6a99137..ef3bbe0 100644 --- a/third_party/blink/renderer/modules/accessibility/ax_node_object.cc +++ b/third_party/blink/renderer/modules/accessibility/ax_node_object.cc
@@ -1180,7 +1180,7 @@ DocumentMarkerController& marker_controller = GetDocument()->Markers(); DocumentMarkerVector markers = - marker_controller.MarkersFor(ToText(GetNode())); + marker_controller.MarkersFor(ToText(*GetNode())); for (size_t i = 0; i < markers.size(); ++i) { DocumentMarker* marker = markers[i]; if (MarkerTypeIsUsedForAccessibility(marker->GetType())) {
diff --git a/third_party/blink/renderer/modules/background_fetch/BUILD.gn b/third_party/blink/renderer/modules/background_fetch/BUILD.gn index 0cd04774..925eb01 100644 --- a/third_party/blink/renderer/modules/background_fetch/BUILD.gn +++ b/third_party/blink/renderer/modules/background_fetch/BUILD.gn
@@ -8,30 +8,26 @@ sources = [ "background_fetch_bridge.cc", "background_fetch_bridge.h", - "background_fetch_click_event.cc", - "background_fetch_click_event.h", "background_fetch_event.cc", "background_fetch_event.h", - "background_fetch_fail_event.cc", - "background_fetch_fail_event.h", "background_fetch_fetch.cc", "background_fetch_fetch.h", "background_fetch_icon_loader.cc", "background_fetch_icon_loader.h", "background_fetch_manager.cc", "background_fetch_manager.h", + "background_fetch_record.cc", + "background_fetch_record.h", "background_fetch_registration.cc", "background_fetch_registration.h", - "background_fetch_settled_event.cc", - "background_fetch_settled_event.h", "background_fetch_settled_fetch.cc", "background_fetch_settled_fetch.h", "background_fetch_settled_fetches.cc", "background_fetch_settled_fetches.h", "background_fetch_type_converters.cc", "background_fetch_type_converters.h", - "background_fetch_update_event.cc", - "background_fetch_update_event.h", + "background_fetch_update_ui_event.cc", + "background_fetch_update_ui_event.h", "service_worker_global_scope_background_fetch.h", "service_worker_registration_background_fetch.cc", "service_worker_registration_background_fetch.h",
diff --git a/third_party/blink/renderer/modules/background_fetch/background_fetch_click_event.cc b/third_party/blink/renderer/modules/background_fetch/background_fetch_click_event.cc deleted file mode 100644 index 3d8d773e..0000000 --- a/third_party/blink/renderer/modules/background_fetch/background_fetch_click_event.cc +++ /dev/null
@@ -1,29 +0,0 @@ -// Copyright 2017 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -#include "third_party/blink/renderer/modules/background_fetch/background_fetch_click_event.h" - -#include "third_party/blink/renderer/modules/background_fetch/background_fetch_click_event_init.h" -#include "third_party/blink/renderer/modules/event_modules_names.h" - -namespace blink { - -BackgroundFetchClickEvent::BackgroundFetchClickEvent( - const AtomicString& type, - const BackgroundFetchClickEventInit& initializer, - WaitUntilObserver* observer) - : BackgroundFetchEvent(type, initializer, observer), - state_(initializer.state()) {} - -BackgroundFetchClickEvent::~BackgroundFetchClickEvent() = default; - -AtomicString BackgroundFetchClickEvent::state() const { - return state_; -} - -const AtomicString& BackgroundFetchClickEvent::InterfaceName() const { - return EventNames::BackgroundFetchClickEvent; -} - -} // namespace blink
diff --git a/third_party/blink/renderer/modules/background_fetch/background_fetch_click_event.h b/third_party/blink/renderer/modules/background_fetch/background_fetch_click_event.h deleted file mode 100644 index b4a2327..0000000 --- a/third_party/blink/renderer/modules/background_fetch/background_fetch_click_event.h +++ /dev/null
@@ -1,55 +0,0 @@ -// Copyright 2017 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -#ifndef THIRD_PARTY_BLINK_RENDERER_MODULES_BACKGROUND_FETCH_BACKGROUND_FETCH_CLICK_EVENT_H_ -#define THIRD_PARTY_BLINK_RENDERER_MODULES_BACKGROUND_FETCH_BACKGROUND_FETCH_CLICK_EVENT_H_ - -#include "third_party/blink/renderer/modules/background_fetch/background_fetch_event.h" -#include "third_party/blink/renderer/modules/modules_export.h" -#include "third_party/blink/renderer/platform/heap/handle.h" -#include "third_party/blink/renderer/platform/wtf/text/atomic_string.h" - -namespace blink { - -class BackgroundFetchClickEventInit; -class WaitUntilObserver; - -class MODULES_EXPORT BackgroundFetchClickEvent final - : public BackgroundFetchEvent { - DEFINE_WRAPPERTYPEINFO(); - - public: - static BackgroundFetchClickEvent* Create( - const AtomicString& type, - const BackgroundFetchClickEventInit& initializer) { - return new BackgroundFetchClickEvent(type, initializer, - nullptr /* observer */); - } - - static BackgroundFetchClickEvent* Create( - const AtomicString& type, - const BackgroundFetchClickEventInit& initializer, - WaitUntilObserver* observer) { - return new BackgroundFetchClickEvent(type, initializer, observer); - } - - ~BackgroundFetchClickEvent() override; - - // Web Exposed attribute defined in the IDL file. - AtomicString state() const; - - // ExtendableEvent interface. - const AtomicString& InterfaceName() const override; - - private: - BackgroundFetchClickEvent(const AtomicString& type, - const BackgroundFetchClickEventInit& initializer, - WaitUntilObserver* observer); - - AtomicString state_; -}; - -} // namespace blink - -#endif // THIRD_PARTY_BLINK_RENDERER_MODULES_BACKGROUND_FETCH_BACKGROUND_FETCH_CLICK_EVENT_H_
diff --git a/third_party/blink/renderer/modules/background_fetch/background_fetch_click_event.idl b/third_party/blink/renderer/modules/background_fetch/background_fetch_click_event.idl deleted file mode 100644 index 0859160..0000000 --- a/third_party/blink/renderer/modules/background_fetch/background_fetch_click_event.idl +++ /dev/null
@@ -1,15 +0,0 @@ -// Copyright 2017 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -// https://wicg.github.io/background-fetch/#background-fetch-click-event - -enum BackgroundFetchState { "pending", "succeeded", "failed" }; - -[ - Constructor(DOMString type, BackgroundFetchClickEventInit init), - Exposed=ServiceWorker, - RuntimeEnabled=BackgroundFetch -] interface BackgroundFetchClickEvent : BackgroundFetchEvent { - readonly attribute BackgroundFetchState state; -};
diff --git a/third_party/blink/renderer/modules/background_fetch/background_fetch_click_event_init.idl b/third_party/blink/renderer/modules/background_fetch/background_fetch_click_event_init.idl deleted file mode 100644 index cf1cb86..0000000 --- a/third_party/blink/renderer/modules/background_fetch/background_fetch_click_event_init.idl +++ /dev/null
@@ -1,9 +0,0 @@ -// Copyright 2017 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -// https://wicg.github.io/background-fetch/#background-fetch-click-event - -dictionary BackgroundFetchClickEventInit : BackgroundFetchEventInit { - required BackgroundFetchState state; -};
diff --git a/third_party/blink/renderer/modules/background_fetch/background_fetch_event.cc b/third_party/blink/renderer/modules/background_fetch/background_fetch_event.cc index 5033231..0dfa393 100644 --- a/third_party/blink/renderer/modules/background_fetch/background_fetch_event.cc +++ b/third_party/blink/renderer/modules/background_fetch/background_fetch_event.cc
@@ -5,6 +5,7 @@ #include "third_party/blink/renderer/modules/background_fetch/background_fetch_event.h" #include "third_party/blink/renderer/modules/background_fetch/background_fetch_event_init.h" +#include "third_party/blink/renderer/modules/background_fetch/background_fetch_registration.h" #include "third_party/blink/renderer/modules/event_modules_names.h" namespace blink { @@ -14,16 +15,21 @@ const BackgroundFetchEventInit& initializer, WaitUntilObserver* observer) : ExtendableEvent(type, initializer, observer), - developer_id_(initializer.id()) {} + registration_(initializer.registration()) {} BackgroundFetchEvent::~BackgroundFetchEvent() = default; -String BackgroundFetchEvent::id() const { - return developer_id_; +BackgroundFetchRegistration* BackgroundFetchEvent::registration() const { + return registration_; } const AtomicString& BackgroundFetchEvent::InterfaceName() const { return EventNames::BackgroundFetchEvent; } +void BackgroundFetchEvent::Trace(blink::Visitor* visitor) { + visitor->Trace(registration_); + ExtendableEvent::Trace(visitor); +} + } // namespace blink
diff --git a/third_party/blink/renderer/modules/background_fetch/background_fetch_event.h b/third_party/blink/renderer/modules/background_fetch/background_fetch_event.h index 19d0711..9656152 100644 --- a/third_party/blink/renderer/modules/background_fetch/background_fetch_event.h +++ b/third_party/blink/renderer/modules/background_fetch/background_fetch_event.h
@@ -5,6 +5,7 @@ #ifndef THIRD_PARTY_BLINK_RENDERER_MODULES_BACKGROUND_FETCH_BACKGROUND_FETCH_EVENT_H_ #define THIRD_PARTY_BLINK_RENDERER_MODULES_BACKGROUND_FETCH_BACKGROUND_FETCH_EVENT_H_ +#include "third_party/blink/public/platform/modules/background_fetch/background_fetch.mojom-blink.h" #include "third_party/blink/renderer/modules/modules_export.h" #include "third_party/blink/renderer/modules/service_worker/extendable_event.h" #include "third_party/blink/renderer/platform/heap/handle.h" @@ -13,6 +14,7 @@ namespace blink { class BackgroundFetchEventInit; +class BackgroundFetchRegistration; class WaitUntilObserver; class MODULES_EXPORT BackgroundFetchEvent : public ExtendableEvent { @@ -34,21 +36,21 @@ ~BackgroundFetchEvent() override; - // Web Exposed attribute defined in the IDL file. Corresponds to the - // |developer_id| used elsewhere in the codebase. - String id() const; + // Web Exposed attribute defined in the IDL file. + BackgroundFetchRegistration* registration() const; // ExtendableEvent interface. const AtomicString& InterfaceName() const override; + void Trace(blink::Visitor* visitor) override; + protected: BackgroundFetchEvent(const AtomicString& type, const BackgroundFetchEventInit& initializer, WaitUntilObserver* observer); - // Corresponds to IDL 'id' attribute. Not unique - an active registration can - // have the same |developer_id_| as one or more inactive registrations. - String developer_id_; + // Corresponds to the 'registration' attribute in the idl. + Member<BackgroundFetchRegistration> registration_; }; } // namespace blink
diff --git a/third_party/blink/renderer/modules/background_fetch/background_fetch_event.idl b/third_party/blink/renderer/modules/background_fetch/background_fetch_event.idl index 632db60..e4c633e 100644 --- a/third_party/blink/renderer/modules/background_fetch/background_fetch_event.idl +++ b/third_party/blink/renderer/modules/background_fetch/background_fetch_event.idl
@@ -9,5 +9,5 @@ Exposed=ServiceWorker, RuntimeEnabled=BackgroundFetch ] interface BackgroundFetchEvent : ExtendableEvent { - readonly attribute DOMString id; + readonly attribute BackgroundFetchRegistration registration; };
diff --git a/third_party/blink/renderer/modules/background_fetch/background_fetch_event_init.idl b/third_party/blink/renderer/modules/background_fetch/background_fetch_event_init.idl index 24194f4..191ccd15 100644 --- a/third_party/blink/renderer/modules/background_fetch/background_fetch_event_init.idl +++ b/third_party/blink/renderer/modules/background_fetch/background_fetch_event_init.idl
@@ -2,8 +2,8 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -// https://wicg.github.io/background-fetch/#background-fetch-event +// https://wicg.github.io/background-fetch/#dictdef-backgroundfetcheventinit dictionary BackgroundFetchEventInit : ExtendableEventInit { - required DOMString id; -}; + required BackgroundFetchRegistration registration; +}; \ No newline at end of file
diff --git a/third_party/blink/renderer/modules/background_fetch/background_fetch_fail_event.cc b/third_party/blink/renderer/modules/background_fetch/background_fetch_fail_event.cc deleted file mode 100644 index 50e51d5..0000000 --- a/third_party/blink/renderer/modules/background_fetch/background_fetch_fail_event.cc +++ /dev/null
@@ -1,55 +0,0 @@ -// Copyright 2017 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -#include "third_party/blink/renderer/modules/background_fetch/background_fetch_fail_event.h" - -#include "third_party/blink/public/platform/modules/background_fetch/web_background_fetch_settled_fetch.h" -#include "third_party/blink/renderer/core/fetch/request.h" -#include "third_party/blink/renderer/core/fetch/response.h" -#include "third_party/blink/renderer/modules/background_fetch/background_fetch_fail_event_init.h" -#include "third_party/blink/renderer/modules/background_fetch/background_fetch_settled_fetch.h" -#include "third_party/blink/renderer/modules/event_modules_names.h" - -namespace blink { - -BackgroundFetchFailEvent::BackgroundFetchFailEvent( - const AtomicString& type, - const BackgroundFetchFailEventInit& initializer) - : BackgroundFetchEvent(type, initializer, nullptr /* observer */), - fetches_(initializer.fetches()) {} - -BackgroundFetchFailEvent::BackgroundFetchFailEvent( - const AtomicString& type, - const BackgroundFetchFailEventInit& initializer, - const WebVector<WebBackgroundFetchSettledFetch>& fetches, - ScriptState* script_state, - WaitUntilObserver* observer) - : BackgroundFetchEvent(type, initializer, observer) { - fetches_.ReserveInitialCapacity(fetches.size()); - for (const WebBackgroundFetchSettledFetch& fetch : fetches) { - auto* settled_fetch = BackgroundFetchSettledFetch::Create( - Request::Create(script_state, fetch.request), - Response::Create(script_state, fetch.response)); - - fetches_.push_back(settled_fetch); - } -} - -BackgroundFetchFailEvent::~BackgroundFetchFailEvent() = default; - -HeapVector<Member<BackgroundFetchSettledFetch>> -BackgroundFetchFailEvent::fetches() const { - return fetches_; -} - -const AtomicString& BackgroundFetchFailEvent::InterfaceName() const { - return EventNames::BackgroundFetchFailEvent; -} - -void BackgroundFetchFailEvent::Trace(blink::Visitor* visitor) { - visitor->Trace(fetches_); - BackgroundFetchEvent::Trace(visitor); -} - -} // namespace blink
diff --git a/third_party/blink/renderer/modules/background_fetch/background_fetch_fail_event.h b/third_party/blink/renderer/modules/background_fetch/background_fetch_fail_event.h deleted file mode 100644 index d8a6e91..0000000 --- a/third_party/blink/renderer/modules/background_fetch/background_fetch_fail_event.h +++ /dev/null
@@ -1,67 +0,0 @@ -// Copyright 2017 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -#ifndef THIRD_PARTY_BLINK_RENDERER_MODULES_BACKGROUND_FETCH_BACKGROUND_FETCH_FAIL_EVENT_H_ -#define THIRD_PARTY_BLINK_RENDERER_MODULES_BACKGROUND_FETCH_BACKGROUND_FETCH_FAIL_EVENT_H_ - -#include "third_party/blink/public/platform/web_vector.h" -#include "third_party/blink/renderer/modules/background_fetch/background_fetch_event.h" -#include "third_party/blink/renderer/modules/modules_export.h" -#include "third_party/blink/renderer/platform/heap/handle.h" -#include "third_party/blink/renderer/platform/wtf/text/atomic_string.h" - -namespace blink { - -class BackgroundFetchFailEventInit; -class BackgroundFetchSettledFetch; -class ScriptState; -struct WebBackgroundFetchSettledFetch; - -class MODULES_EXPORT BackgroundFetchFailEvent final - : public BackgroundFetchEvent { - DEFINE_WRAPPERTYPEINFO(); - - public: - static BackgroundFetchFailEvent* Create( - const AtomicString& type, - const BackgroundFetchFailEventInit& initializer) { - return new BackgroundFetchFailEvent(type, initializer); - } - - static BackgroundFetchFailEvent* Create( - const AtomicString& type, - const BackgroundFetchFailEventInit& initializer, - const WebVector<WebBackgroundFetchSettledFetch>& fetches, - ScriptState* script_state, - WaitUntilObserver* observer) { - return new BackgroundFetchFailEvent(type, initializer, fetches, - script_state, observer); - } - - ~BackgroundFetchFailEvent() override; - - // Web Exposed attribute defined in the IDL file. - HeapVector<Member<BackgroundFetchSettledFetch>> fetches() const; - - // ExtendableEvent interface. - const AtomicString& InterfaceName() const override; - - void Trace(blink::Visitor* visitor) override; - - private: - BackgroundFetchFailEvent(const AtomicString& type, - const BackgroundFetchFailEventInit& initializer); - BackgroundFetchFailEvent( - const AtomicString& type, - const BackgroundFetchFailEventInit& initializer, - const WebVector<WebBackgroundFetchSettledFetch>& fetches, - ScriptState* script_state, - WaitUntilObserver* observer); - - HeapVector<Member<BackgroundFetchSettledFetch>> fetches_; -}; - -} // namespace blink - -#endif // THIRD_PARTY_BLINK_RENDERER_MODULES_BACKGROUND_FETCH_BACKGROUND_FETCH_FAIL_EVENT_H_
diff --git a/third_party/blink/renderer/modules/background_fetch/background_fetch_fail_event.idl b/third_party/blink/renderer/modules/background_fetch/background_fetch_fail_event.idl deleted file mode 100644 index 1f86f8e7..0000000 --- a/third_party/blink/renderer/modules/background_fetch/background_fetch_fail_event.idl +++ /dev/null
@@ -1,13 +0,0 @@ -// Copyright 2017 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -// https://wicg.github.io/background-fetch/#background-fetch-fail-event - -[ - Constructor(DOMString type, BackgroundFetchFailEventInit init), - Exposed=ServiceWorker, - RuntimeEnabled=BackgroundFetch -] interface BackgroundFetchFailEvent : BackgroundFetchEvent { - readonly attribute FrozenArray<BackgroundFetchSettledFetch> fetches; -};
diff --git a/third_party/blink/renderer/modules/background_fetch/background_fetch_manager.cc b/third_party/blink/renderer/modules/background_fetch/background_fetch_manager.cc index 8f74995..9099e3dc9 100644 --- a/third_party/blink/renderer/modules/background_fetch/background_fetch_manager.cc +++ b/third_party/blink/renderer/modules/background_fetch/background_fetch_manager.cc
@@ -5,6 +5,7 @@ #include "third_party/blink/renderer/modules/background_fetch/background_fetch_manager.h" #include "base/memory/scoped_refptr.h" +#include "base/metrics/histogram_macros.h" #include "third_party/blink/public/platform/modules/service_worker/web_service_worker_request.h" #include "third_party/blink/renderer/bindings/core/v8/request_or_usv_string.h" #include "third_party/blink/renderer/bindings/core/v8/script_promise_resolver.h" @@ -315,15 +316,20 @@ mojom::blink::BackgroundFetchOptionsPtr options, ScriptPromiseResolver* resolver, const SkBitmap& icon) { - bridge_->Fetch(id, std::move(web_requests), std::move(options), icon, - WTF::Bind(&BackgroundFetchManager::DidFetch, - WrapPersistent(this), WrapPersistent(resolver))); + bridge_->Fetch( + id, std::move(web_requests), std::move(options), icon, + WTF::Bind(&BackgroundFetchManager::DidFetch, WrapPersistent(this), + WrapPersistent(resolver), base::Time::Now())); } void BackgroundFetchManager::DidFetch( ScriptPromiseResolver* resolver, + base::Time time_started, mojom::blink::BackgroundFetchError error, BackgroundFetchRegistration* registration) { + UMA_HISTOGRAM_TIMES("BackgroundFetch.Manager.FetchDuration", + base::Time::Now() - time_started); + ScriptState* script_state = resolver->GetScriptState(); ScriptState::Scope scope(script_state); @@ -370,7 +376,8 @@ bridge_->GetRegistration( id, WTF::Bind(&BackgroundFetchManager::DidGetRegistration, - WrapPersistent(this), WrapPersistent(resolver))); + WrapPersistent(this), WrapPersistent(resolver), + base::Time::Now())); return promise; } @@ -440,8 +447,12 @@ void BackgroundFetchManager::DidGetRegistration( ScriptPromiseResolver* resolver, + base::Time time_started, mojom::blink::BackgroundFetchError error, BackgroundFetchRegistration* registration) { + UMA_HISTOGRAM_TIMES("BackgroundFetch.Manager.GetDuration", + base::Time::Now() - time_started); + ScriptState* script_state = resolver->GetScriptState(); ScriptState::Scope scope(script_state); @@ -485,17 +496,21 @@ ScriptPromiseResolver* resolver = ScriptPromiseResolver::Create(script_state); ScriptPromise promise = resolver->Promise(); - bridge_->GetDeveloperIds( - WTF::Bind(&BackgroundFetchManager::DidGetDeveloperIds, - WrapPersistent(this), WrapPersistent(resolver))); + bridge_->GetDeveloperIds(WTF::Bind( + &BackgroundFetchManager::DidGetDeveloperIds, WrapPersistent(this), + WrapPersistent(resolver), base::Time::Now())); return promise; } void BackgroundFetchManager::DidGetDeveloperIds( ScriptPromiseResolver* resolver, + base::Time time_started, mojom::blink::BackgroundFetchError error, const Vector<String>& developer_ids) { + UMA_HISTOGRAM_TIMES("BackgroundFetch.Manager.GetIdsDuration", + base::Time::Now() - time_started); + ScriptState::Scope scope(resolver->GetScriptState()); switch (error) {
diff --git a/third_party/blink/renderer/modules/background_fetch/background_fetch_manager.h b/third_party/blink/renderer/modules/background_fetch/background_fetch_manager.h index 0c54391..ac445e7 100644 --- a/third_party/blink/renderer/modules/background_fetch/background_fetch_manager.h +++ b/third_party/blink/renderer/modules/background_fetch/background_fetch_manager.h
@@ -5,6 +5,7 @@ #ifndef THIRD_PARTY_BLINK_RENDERER_MODULES_BACKGROUND_FETCH_BACKGROUND_FETCH_MANAGER_H_ #define THIRD_PARTY_BLINK_RENDERER_MODULES_BACKGROUND_FETCH_BACKGROUND_FETCH_MANAGER_H_ +#include "base/time/time.h" #include "third_party/blink/public/platform/modules/background_fetch/background_fetch.mojom-blink.h" #include "third_party/blink/renderer/bindings/core/v8/script_promise.h" #include "third_party/blink/renderer/core/dom/context_lifecycle_observer.h" @@ -77,12 +78,15 @@ ScriptPromiseResolver* resolver, const SkBitmap& icon); void DidFetch(ScriptPromiseResolver* resolver, + base::Time time_started, mojom::blink::BackgroundFetchError error, BackgroundFetchRegistration* registration); void DidGetRegistration(ScriptPromiseResolver* script_state, + base::Time time_started, mojom::blink::BackgroundFetchError error, BackgroundFetchRegistration* registration); void DidGetDeveloperIds(ScriptPromiseResolver* script_state, + base::Time time_started, mojom::blink::BackgroundFetchError error, const Vector<String>& developer_ids);
diff --git a/third_party/blink/renderer/modules/background_fetch/background_fetch_record.cc b/third_party/blink/renderer/modules/background_fetch/background_fetch_record.cc new file mode 100644 index 0000000..a7dd3a6 --- /dev/null +++ b/third_party/blink/renderer/modules/background_fetch/background_fetch_record.cc
@@ -0,0 +1,46 @@ +// 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 "third_party/blink/renderer/modules/background_fetch/background_fetch_record.h" + +#include "third_party/blink/renderer/core/fetch/request.h" +#include "third_party/blink/renderer/core/fetch/response.h" + +namespace blink { + +BackgroundFetchRecord::BackgroundFetchRecord(Request* request, + Response* response) + : request_(request), response_(response) { + DCHECK(request_); +} + +BackgroundFetchRecord::~BackgroundFetchRecord() = default; + +ScriptPromise BackgroundFetchRecord::responseReady(ScriptState* script_state) { + if (!response_ready_property_) { + response_ready_property_ = + new ResponseReadyProperty(ExecutionContext::From(script_state), this, + ResponseReadyProperty::kResponseReady); + } + if (!response_) { + response_ = Response::Create(ExecutionContext::From(script_state), + nullptr /* FetchResponseData */); + } + DCHECK(response_); + response_ready_property_->Resolve(response_); + return response_ready_property_->Promise(script_state->World()); +} + +Request* BackgroundFetchRecord::request() const { + return request_; +} + +void BackgroundFetchRecord::Trace(blink::Visitor* visitor) { + visitor->Trace(request_); + visitor->Trace(response_); + visitor->Trace(response_ready_property_); + ScriptWrappable::Trace(visitor); +} + +} // namespace blink
diff --git a/third_party/blink/renderer/modules/background_fetch/background_fetch_record.h b/third_party/blink/renderer/modules/background_fetch/background_fetch_record.h new file mode 100644 index 0000000..4ff0a63 --- /dev/null +++ b/third_party/blink/renderer/modules/background_fetch/background_fetch_record.h
@@ -0,0 +1,45 @@ +// 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 THIRD_PARTY_BLINK_RENDERER_MODULES_BACKGROUND_FETCH_BACKGROUND_FETCH_RECORD_H_ +#define THIRD_PARTY_BLINK_RENDERER_MODULES_BACKGROUND_FETCH_BACKGROUND_FETCH_RECORD_H_ + +#include "third_party/blink/renderer/bindings/core/v8/script_promise.h" +#include "third_party/blink/renderer/bindings/core/v8/script_promise_property.h" +#include "third_party/blink/renderer/core/dom/dom_exception.h" +#include "third_party/blink/renderer/modules/modules_export.h" +#include "third_party/blink/renderer/platform/bindings/script_wrappable.h" +#include "third_party/blink/renderer/platform/heap/handle.h" + +namespace blink { + +class Request; +class Response; + +class MODULES_EXPORT BackgroundFetchRecord final : public ScriptWrappable { + DEFINE_WRAPPERTYPEINFO(); + + public: + explicit BackgroundFetchRecord(Request* request, + Response* response = nullptr); + ~BackgroundFetchRecord() override; + + Request* request() const; + ScriptPromise responseReady(ScriptState* script_state); + + void Trace(blink::Visitor* visitor) override; + + private: + using ResponseReadyProperty = + ScriptPromiseProperty<Member<BackgroundFetchRecord>, + Member<Response>, + Member<DOMException>>; + Member<Request> request_; + Member<Response> response_; + Member<ResponseReadyProperty> response_ready_property_; +}; + +} // namespace blink + +#endif // THIRD_PARTY_BLINK_RENDERER_MODULES_BACKGROUND_FETCH_BACKGROUND_FETCH_RECORD_H_
diff --git a/third_party/blink/renderer/modules/background_fetch/background_fetch_record.idl b/third_party/blink/renderer/modules/background_fetch/background_fetch_record.idl new file mode 100644 index 0000000..a3e4080 --- /dev/null +++ b/third_party/blink/renderer/modules/background_fetch/background_fetch_record.idl
@@ -0,0 +1,13 @@ +// 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. + +// https://wicg.github.io/background-fetch/#background-fetch-record + +[ + Exposed=(ServiceWorker), + RuntimeEnabled=BackgroundFetch +] interface BackgroundFetchRecord { + readonly attribute Request request; + [CallWith=ScriptState] readonly attribute Promise<Response> responseReady; +}; \ No newline at end of file
diff --git a/third_party/blink/renderer/modules/background_fetch/background_fetch_registration.h b/third_party/blink/renderer/modules/background_fetch/background_fetch_registration.h index 9a53882..411f3416 100644 --- a/third_party/blink/renderer/modules/background_fetch/background_fetch_registration.h +++ b/third_party/blink/renderer/modules/background_fetch/background_fetch_registration.h
@@ -65,6 +65,8 @@ const AtomicString& InterfaceName() const override; ExecutionContext* GetExecutionContext() const override; + const String& unique_id() const { return unique_id_; } + void Dispose(); void Trace(blink::Visitor* visitor) override;
diff --git a/third_party/blink/renderer/modules/background_fetch/background_fetch_registration.idl b/third_party/blink/renderer/modules/background_fetch/background_fetch_registration.idl index e7d73a6..5c57e94 100644 --- a/third_party/blink/renderer/modules/background_fetch/background_fetch_registration.idl +++ b/third_party/blink/renderer/modules/background_fetch/background_fetch_registration.idl
@@ -18,4 +18,5 @@ attribute EventHandler onprogress; [CallWith=ScriptState] Promise<boolean> abort(); + // TODO(crbug.com/863016): Add match() and matchAll(). };
diff --git a/third_party/blink/renderer/modules/background_fetch/background_fetch_settled_event.cc b/third_party/blink/renderer/modules/background_fetch/background_fetch_settled_event.cc deleted file mode 100644 index 68f65c9..0000000 --- a/third_party/blink/renderer/modules/background_fetch/background_fetch_settled_event.cc +++ /dev/null
@@ -1,35 +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 "third_party/blink/renderer/modules/background_fetch/background_fetch_settled_event.h" - -namespace blink { - -BackgroundFetchSettledEvent::BackgroundFetchSettledEvent( - const AtomicString& type, - const BackgroundFetchSettledEventInit& initializer, - const String& unique_id, - WaitUntilObserver* observer) - : BackgroundFetchEvent(type, initializer, observer), - unique_id_(unique_id), - fetches_(*initializer.fetches()) {} - -BackgroundFetchSettledEvent::BackgroundFetchSettledEvent( - const AtomicString& type, - const BackgroundFetchSettledEventInit& initializer) - : BackgroundFetchEvent(type, initializer, nullptr), - fetches_(*initializer.fetches()) {} - -BackgroundFetchSettledEvent::~BackgroundFetchSettledEvent() = default; - -BackgroundFetchSettledFetches* BackgroundFetchSettledEvent::fetches() const { - return fetches_; -} - -void BackgroundFetchSettledEvent::Trace(blink::Visitor* visitor) { - visitor->Trace(fetches_); - BackgroundFetchEvent::Trace(visitor); -} - -} // namespace blink
diff --git a/third_party/blink/renderer/modules/background_fetch/background_fetch_settled_event.h b/third_party/blink/renderer/modules/background_fetch/background_fetch_settled_event.h deleted file mode 100644 index ec39d90..0000000 --- a/third_party/blink/renderer/modules/background_fetch/background_fetch_settled_event.h +++ /dev/null
@@ -1,67 +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 THIRD_PARTY_BLINK_RENDERER_MODULES_BACKGROUND_FETCH_BACKGROUND_FETCH_SETTLED_EVENT_H_ -#define THIRD_PARTY_BLINK_RENDERER_MODULES_BACKGROUND_FETCH_BACKGROUND_FETCH_SETTLED_EVENT_H_ - -#include "third_party/blink/renderer/modules/background_fetch/background_fetch_event.h" -#include "third_party/blink/renderer/modules/background_fetch/background_fetch_settled_event_init.h" -#include "third_party/blink/renderer/modules/background_fetch/background_fetch_settled_fetches.h" -#include "third_party/blink/renderer/modules/modules_export.h" -#include "third_party/blink/renderer/platform/heap/handle.h" -#include "third_party/blink/renderer/platform/heap/member.h" -#include "third_party/blink/renderer/platform/wtf/text/atomic_string.h" - -namespace blink { - -// Event for interacting with fetch requests that have completed. -class MODULES_EXPORT BackgroundFetchSettledEvent : public BackgroundFetchEvent { - DEFINE_WRAPPERTYPEINFO(); - - public: - static BackgroundFetchSettledEvent* Create( - const AtomicString& type, - const BackgroundFetchSettledEventInit& initializer) { - return new BackgroundFetchSettledEvent(type, initializer); - } - - static BackgroundFetchSettledEvent* Create( - const AtomicString& type, - const BackgroundFetchSettledEventInit& initializer, - const String& unique_id, - WaitUntilObserver* observer = nullptr) { - return new BackgroundFetchSettledEvent(type, initializer, unique_id, - observer); - } - - ~BackgroundFetchSettledEvent() override; - - // Web Exposed attribute defined in the IDL file. - BackgroundFetchSettledFetches* fetches() const; - - void Trace(blink::Visitor* visitor) override; - - protected: - BackgroundFetchSettledEvent( - const AtomicString& type, - const BackgroundFetchSettledEventInit& initializer, - const String& unique_id, - WaitUntilObserver* observer = nullptr); - - BackgroundFetchSettledEvent( - const AtomicString& type, - const BackgroundFetchSettledEventInit& initializer); - - // Globally unique ID for the registration, generated in content/. Used to - // distinguish registrations in case a developer re-uses |developer_id_|s. Not - // exposed to JavaScript. - String unique_id_; - - private: - Member<BackgroundFetchSettledFetches> fetches_; -}; - -} // namespace blink - -#endif // THIRD_PARTY_BLINK_RENDERER_MODULES_BACKGROUND_FETCH_BACKGROUND_FETCH_SETTLED_EVENT_H_
diff --git a/third_party/blink/renderer/modules/background_fetch/background_fetch_settled_event.idl b/third_party/blink/renderer/modules/background_fetch/background_fetch_settled_event.idl deleted file mode 100644 index cabb460..0000000 --- a/third_party/blink/renderer/modules/background_fetch/background_fetch_settled_event.idl +++ /dev/null
@@ -1,13 +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. - -// https://wicg.github.io/background-fetch/#backgroundfetchsettledevent - -[ - Constructor(DOMString type, BackgroundFetchSettledEventInit init), - Exposed=ServiceWorker, - RuntimeEnabled=BackgroundFetch -] interface BackgroundFetchSettledEvent : BackgroundFetchEvent { - readonly attribute BackgroundFetchSettledFetches fetches; -};
diff --git a/third_party/blink/renderer/modules/background_fetch/background_fetch_settled_event_init.idl b/third_party/blink/renderer/modules/background_fetch/background_fetch_settled_event_init.idl deleted file mode 100644 index d65dc519..0000000 --- a/third_party/blink/renderer/modules/background_fetch/background_fetch_settled_event_init.idl +++ /dev/null
@@ -1,9 +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. - -// https://wicg.github.io/background-fetch/#backgroundfetchsettledevent - -dictionary BackgroundFetchSettledEventInit : BackgroundFetchEventInit { - required BackgroundFetchSettledFetches fetches; -}; \ No newline at end of file
diff --git a/third_party/blink/renderer/modules/background_fetch/background_fetch_settled_fetch.h b/third_party/blink/renderer/modules/background_fetch/background_fetch_settled_fetch.h index e82979a..49831fe 100644 --- a/third_party/blink/renderer/modules/background_fetch/background_fetch_settled_fetch.h +++ b/third_party/blink/renderer/modules/background_fetch/background_fetch_settled_fetch.h
@@ -14,8 +14,8 @@ class Response; // Interface for providing developers access to the Request/Response pairs when -// a background fetch has settled, either through the `backgroundfetched` event -// in case of success, or `backgroundfetchfail` in case of failure. +// a background fetch has settled, either through the `backgroundfetchsuccess` +// event in case of success, or `backgroundfetchfail` in case of failure. class BackgroundFetchSettledFetch final : public BackgroundFetchFetch { DEFINE_WRAPPERTYPEINFO();
diff --git a/third_party/blink/renderer/modules/background_fetch/background_fetch_update_event.cc b/third_party/blink/renderer/modules/background_fetch/background_fetch_update_event.cc deleted file mode 100644 index 50f3d35..0000000 --- a/third_party/blink/renderer/modules/background_fetch/background_fetch_update_event.cc +++ /dev/null
@@ -1,119 +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 "third_party/blink/renderer/modules/background_fetch/background_fetch_update_event.h" - -#include "third_party/blink/public/platform/modules/background_fetch/web_background_fetch_settled_fetch.h" -#include "third_party/blink/renderer/bindings/core/v8/script_promise_resolver.h" -#include "third_party/blink/renderer/core/dom/dom_exception.h" -#include "third_party/blink/renderer/core/execution_context/execution_context.h" -#include "third_party/blink/renderer/core/fetch/request.h" -#include "third_party/blink/renderer/core/fetch/response.h" -#include "third_party/blink/renderer/modules/background_fetch/background_fetch_bridge.h" -#include "third_party/blink/renderer/modules/background_fetch/background_fetch_icon_loader.h" -#include "third_party/blink/renderer/modules/background_fetch/background_fetch_settled_fetch.h" -#include "third_party/blink/renderer/modules/background_fetch/background_fetch_ui_options.h" -#include "third_party/blink/renderer/modules/event_modules_names.h" -#include "third_party/blink/renderer/platform/bindings/script_state.h" - -namespace blink { - -BackgroundFetchUpdateEvent::BackgroundFetchUpdateEvent( - const AtomicString& type, - const BackgroundFetchSettledEventInit& initializer) - : BackgroundFetchSettledEvent(type, initializer) {} - -BackgroundFetchUpdateEvent::BackgroundFetchUpdateEvent( - const AtomicString& type, - const BackgroundFetchSettledEventInit& initializer, - const String& unique_id, - ScriptState* script_state, - WaitUntilObserver* observer, - ServiceWorkerRegistration* registration) - : BackgroundFetchSettledEvent(type, initializer, unique_id, observer), - registration_(registration), - loader_(new BackgroundFetchIconLoader) {} - -BackgroundFetchUpdateEvent::~BackgroundFetchUpdateEvent() = default; - -void BackgroundFetchUpdateEvent::Trace(blink::Visitor* visitor) { - visitor->Trace(registration_); - visitor->Trace(loader_); - BackgroundFetchSettledEvent::Trace(visitor); -} - -ScriptPromise BackgroundFetchUpdateEvent::updateUI( - ScriptState* script_state, - const BackgroundFetchUIOptions& ui_options) { - if (update_ui_called_) { - // Return a rejected promise as this method should only be called once. - return ScriptPromise::Reject( - script_state, - V8ThrowException::CreateTypeError(script_state->GetIsolate(), - "updateUI may only be called once.")); - } - - update_ui_called_ = true; - - if (!registration_) { - // Return a Promise that will never settle when a developer calls this - // method on a BackgroundFetchedEvent instance they created themselves. - return ScriptPromise(); - } - DCHECK(!unique_id_.IsEmpty()); - - if (!ui_options.hasTitle() && ui_options.icons().IsEmpty()) { - // Nothing to update, just return a resolved promise. - ScriptPromise::CastUndefined(script_state); - } - - ScriptPromiseResolver* resolver = ScriptPromiseResolver::Create(script_state); - ScriptPromise promise = resolver->Promise(); - - if (ui_options.icons().IsEmpty()) { - DidGetIcon(resolver, ui_options.title(), SkBitmap()); - } else { - loader_->Start( - BackgroundFetchBridge::From(registration_), - ExecutionContext::From(script_state), ui_options.icons(), - WTF::Bind(&BackgroundFetchUpdateEvent::DidGetIcon, WrapPersistent(this), - WrapPersistent(resolver), ui_options.title())); - } - - return promise; -} - -void BackgroundFetchUpdateEvent::DidGetIcon(ScriptPromiseResolver* resolver, - const String& title, - const SkBitmap& icon) { - BackgroundFetchBridge::From(registration_) - ->UpdateUI(id(), unique_id_, title, icon, - WTF::Bind(&BackgroundFetchUpdateEvent::DidUpdateUI, - WrapPersistent(this), WrapPersistent(resolver))); -} - -void BackgroundFetchUpdateEvent::DidUpdateUI( - ScriptPromiseResolver* resolver, - mojom::blink::BackgroundFetchError error) { - switch (error) { - case mojom::blink::BackgroundFetchError::NONE: - case mojom::blink::BackgroundFetchError::INVALID_ID: - resolver->Resolve(); - return; - case mojom::blink::BackgroundFetchError::STORAGE_ERROR: - resolver->Reject( - DOMException::Create(DOMExceptionCode::kAbortError, - "Failed to update UI due to I/O error.")); - return; - case mojom::blink::BackgroundFetchError::DUPLICATED_DEVELOPER_ID: - case mojom::blink::BackgroundFetchError::INVALID_ARGUMENT: - case mojom::blink::BackgroundFetchError::SERVICE_WORKER_UNAVAILABLE: - // Not applicable for this callback. - break; - } - - NOTREACHED(); -} - -} // namespace blink
diff --git a/third_party/blink/renderer/modules/background_fetch/background_fetch_update_event.h b/third_party/blink/renderer/modules/background_fetch/background_fetch_update_event.h deleted file mode 100644 index fd494fb5..0000000 --- a/third_party/blink/renderer/modules/background_fetch/background_fetch_update_event.h +++ /dev/null
@@ -1,75 +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 THIRD_PARTY_BLINK_RENDERER_MODULES_BACKGROUND_FETCH_BACKGROUND_FETCH_UPDATE_EVENT_H_ -#define THIRD_PARTY_BLINK_RENDERER_MODULES_BACKGROUND_FETCH_BACKGROUND_FETCH_UPDATE_EVENT_H_ - -#include "third_party/blink/public/platform/modules/background_fetch/background_fetch.mojom-blink.h" -#include "third_party/blink/renderer/modules/background_fetch/background_fetch_settled_event.h" -#include "third_party/blink/renderer/modules/service_worker/service_worker_registration.h" - -namespace blink { - -class BackgroundFetchIconLoader; -class BackgroundFetchUIOptions; - -// Event for interacting with fetch requests that have completed. -class MODULES_EXPORT BackgroundFetchUpdateEvent final - : public BackgroundFetchSettledEvent { - DEFINE_WRAPPERTYPEINFO(); - - public: - static BackgroundFetchUpdateEvent* Create( - const AtomicString& type, - const BackgroundFetchSettledEventInit& initializer) { - return new BackgroundFetchUpdateEvent(type, initializer); - } - - static BackgroundFetchUpdateEvent* Create( - const AtomicString& type, - const BackgroundFetchSettledEventInit& initializer, - const String& unique_id, - ScriptState* script_state, - WaitUntilObserver* observer, - ServiceWorkerRegistration* registration) { - return new BackgroundFetchUpdateEvent(type, initializer, unique_id, - script_state, observer, registration); - } - - ~BackgroundFetchUpdateEvent() override; - - // Web Exposed method defined in the IDL file. - ScriptPromise updateUI(ScriptState* script_state, - const BackgroundFetchUIOptions& ui_options); - - void Trace(blink::Visitor* visitor) override; - - private: - BackgroundFetchUpdateEvent( - const AtomicString& type, - const BackgroundFetchSettledEventInit& initializer); - - BackgroundFetchUpdateEvent(const AtomicString& type, - const BackgroundFetchSettledEventInit&, - const String& unique_id, - ScriptState* script_state, - WaitUntilObserver* observer, - ServiceWorkerRegistration* registration); - - void DidGetIcon(ScriptPromiseResolver* resolver, - const String& title, - const SkBitmap& icon); - - void DidUpdateUI(ScriptPromiseResolver* resolver, - mojom::blink::BackgroundFetchError error); - - bool update_ui_called_ = false; - - Member<ServiceWorkerRegistration> registration_; - Member<BackgroundFetchIconLoader> loader_; -}; - -} // namespace blink - -#endif // THIRD_PARTY_BLINK_RENDERER_MODULES_BACKGROUND_FETCH_BACKGROUND_FETCH_UPDATE_EVENT_H_
diff --git a/third_party/blink/renderer/modules/background_fetch/background_fetch_update_event.idl b/third_party/blink/renderer/modules/background_fetch/background_fetch_update_event.idl deleted file mode 100644 index a97acf6..0000000 --- a/third_party/blink/renderer/modules/background_fetch/background_fetch_update_event.idl +++ /dev/null
@@ -1,14 +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. - -// https://wicg.github.io/background-fetch/#backgroundfetchupdateevent - -[ - Constructor(DOMString type, BackgroundFetchSettledEventInit init), - Exposed=ServiceWorker, - RuntimeEnabled=BackgroundFetch -] -interface BackgroundFetchUpdateEvent : BackgroundFetchSettledEvent { - [CallWith=ScriptState] Promise<void> updateUI(optional BackgroundFetchUIOptions options); -}; \ No newline at end of file
diff --git a/third_party/blink/renderer/modules/background_fetch/background_fetch_update_ui_event.cc b/third_party/blink/renderer/modules/background_fetch/background_fetch_update_ui_event.cc new file mode 100644 index 0000000..155c3738 --- /dev/null +++ b/third_party/blink/renderer/modules/background_fetch/background_fetch_update_ui_event.cc
@@ -0,0 +1,123 @@ +// 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 "third_party/blink/renderer/modules/background_fetch/background_fetch_update_ui_event.h" + +#include "third_party/blink/renderer/bindings/core/v8/script_promise_resolver.h" +#include "third_party/blink/renderer/core/dom/dom_exception.h" +#include "third_party/blink/renderer/core/execution_context/execution_context.h" +#include "third_party/blink/renderer/core/fetch/request.h" +#include "third_party/blink/renderer/core/fetch/response.h" +#include "third_party/blink/renderer/modules/background_fetch/background_fetch_bridge.h" +#include "third_party/blink/renderer/modules/background_fetch/background_fetch_event_init.h" +#include "third_party/blink/renderer/modules/background_fetch/background_fetch_icon_loader.h" +#include "third_party/blink/renderer/modules/background_fetch/background_fetch_registration.h" +#include "third_party/blink/renderer/modules/background_fetch/background_fetch_settled_fetch.h" +#include "third_party/blink/renderer/modules/background_fetch/background_fetch_ui_options.h" +#include "third_party/blink/renderer/modules/event_modules_names.h" +#include "third_party/blink/renderer/platform/bindings/script_state.h" + +namespace blink { + +BackgroundFetchUpdateUIEvent::BackgroundFetchUpdateUIEvent( + const AtomicString& type, + const BackgroundFetchEventInit& initializer) + : BackgroundFetchEvent(type, initializer, nullptr /* observer */) {} + +BackgroundFetchUpdateUIEvent::BackgroundFetchUpdateUIEvent( + const AtomicString& type, + const BackgroundFetchEventInit& initializer, + WaitUntilObserver* observer, + ServiceWorkerRegistration* registration) + : BackgroundFetchEvent(type, initializer, observer), + service_worker_registration_(registration) {} + +BackgroundFetchUpdateUIEvent::~BackgroundFetchUpdateUIEvent() = default; + +void BackgroundFetchUpdateUIEvent::Trace(blink::Visitor* visitor) { + visitor->Trace(service_worker_registration_); + visitor->Trace(loader_); + visitor->Trace(fetches_); + BackgroundFetchEvent::Trace(visitor); +} + +ScriptPromise BackgroundFetchUpdateUIEvent::updateUI( + ScriptState* script_state, + const BackgroundFetchUIOptions& ui_options) { + if (update_ui_called_) { + // Return a rejected promise as this method should only be called once. + return ScriptPromise::Reject( + script_state, + V8ThrowException::CreateTypeError(script_state->GetIsolate(), + "updateUI may only be called once.")); + } + + update_ui_called_ = true; + + if (!service_worker_registration_) { + // Return a Promise that will never settle when a developer calls this + // method on a BackgroundFetchSuccessEvent instance they created themselves. + // TODO(crbug.com/872768): Figure out if this is the right thing to do + // vs reacting eagerly. + return ScriptPromise(); + } + DCHECK(!registration_->unique_id().IsEmpty()); + + if (!ui_options.hasTitle() && ui_options.icons().IsEmpty()) { + // Nothing to update, just return a resolved promise. + return ScriptPromise::CastUndefined(script_state); + } + + ScriptPromiseResolver* resolver = ScriptPromiseResolver::Create(script_state); + ScriptPromise promise = resolver->Promise(); + + if (ui_options.icons().IsEmpty()) { + DidGetIcon(resolver, ui_options.title(), SkBitmap()); + } else { + DCHECK(!loader_); + loader_ = new BackgroundFetchIconLoader(); + DCHECK(loader_); + loader_->Start(BackgroundFetchBridge::From(service_worker_registration_), + ExecutionContext::From(script_state), ui_options.icons(), + WTF::Bind(&BackgroundFetchUpdateUIEvent::DidGetIcon, + WrapPersistent(this), WrapPersistent(resolver), + ui_options.title())); + } + + return promise; +} + +void BackgroundFetchUpdateUIEvent::DidGetIcon(ScriptPromiseResolver* resolver, + const String& title, + const SkBitmap& icon) { + BackgroundFetchBridge::From(service_worker_registration_) + ->UpdateUI(registration_->id(), registration_->unique_id(), title, icon, + WTF::Bind(&BackgroundFetchUpdateUIEvent::DidUpdateUI, + WrapPersistent(this), WrapPersistent(resolver))); +} + +void BackgroundFetchUpdateUIEvent::DidUpdateUI( + ScriptPromiseResolver* resolver, + mojom::blink::BackgroundFetchError error) { + switch (error) { + case mojom::blink::BackgroundFetchError::NONE: + case mojom::blink::BackgroundFetchError::INVALID_ID: + resolver->Resolve(); + return; + case mojom::blink::BackgroundFetchError::STORAGE_ERROR: + resolver->Reject( + DOMException::Create(DOMExceptionCode::kAbortError, + "Failed to update UI due to I/O error.")); + return; + case mojom::blink::BackgroundFetchError::DUPLICATED_DEVELOPER_ID: + case mojom::blink::BackgroundFetchError::INVALID_ARGUMENT: + case mojom::blink::BackgroundFetchError::SERVICE_WORKER_UNAVAILABLE: + // Not applicable for this callback. + break; + } + + NOTREACHED(); +} + +} // namespace blink
diff --git a/third_party/blink/renderer/modules/background_fetch/background_fetch_update_ui_event.h b/third_party/blink/renderer/modules/background_fetch/background_fetch_update_ui_event.h new file mode 100644 index 0000000..8aff974 --- /dev/null +++ b/third_party/blink/renderer/modules/background_fetch/background_fetch_update_ui_event.h
@@ -0,0 +1,84 @@ +// 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 THIRD_PARTY_BLINK_RENDERER_MODULES_BACKGROUND_FETCH_BACKGROUND_FETCH_UPDATE_UI_EVENT_H_ +#define THIRD_PARTY_BLINK_RENDERER_MODULES_BACKGROUND_FETCH_BACKGROUND_FETCH_UPDATE_UI_EVENT_H_ + +#include "third_party/blink/public/platform/modules/background_fetch/background_fetch.mojom-blink.h" +#include "third_party/blink/renderer/bindings/core/v8/script_promise.h" +#include "third_party/blink/renderer/modules/background_fetch/background_fetch_event.h" +#include "third_party/blink/renderer/modules/background_fetch/background_fetch_settled_fetches.h" +#include "third_party/blink/renderer/modules/service_worker/service_worker_registration.h" +#include "third_party/blink/renderer/platform/bindings/script_wrappable.h" +#include "third_party/blink/renderer/platform/wtf/text/atomic_string.h" +#include "third_party/skia/include/core/SkBitmap.h" + +namespace blink { + +class BackgroundFetchEvent; +class BackgroundFetchIconLoader; +class BackgroundFetchUIOptions; +class ScriptPromiseResolver; +class WaitUntilObserver; + +// Event for interacting with fetch requests that have completed. +class MODULES_EXPORT BackgroundFetchUpdateUIEvent final + : public BackgroundFetchEvent { + DEFINE_WRAPPERTYPEINFO(); + + public: + static BackgroundFetchUpdateUIEvent* Create( + const AtomicString& type, + const BackgroundFetchEventInit& initializer) { + return new BackgroundFetchUpdateUIEvent(type, initializer); + } + + static BackgroundFetchUpdateUIEvent* Create( + const AtomicString& type, + const BackgroundFetchEventInit& initializer, + WaitUntilObserver* observer, + ServiceWorkerRegistration* registration) { + return new BackgroundFetchUpdateUIEvent(type, initializer, observer, + registration); + } + + ~BackgroundFetchUpdateUIEvent() override; + + // TODO(crbug.com/699957): Remove once matchAll() has been implemented on + // BackgroundFetchRegistration. + BackgroundFetchSettledFetches* fetches() const { return fetches_; } + void setFetches(BackgroundFetchSettledFetches* value) { fetches_ = value; } + + // Web Exposed method defined in the IDL file. + ScriptPromise updateUI(ScriptState* script_state, + const BackgroundFetchUIOptions& ui_options); + + void Trace(blink::Visitor* visitor) override; + + private: + BackgroundFetchUpdateUIEvent(const AtomicString& type, + const BackgroundFetchEventInit& initializer); + + BackgroundFetchUpdateUIEvent(const AtomicString& type, + const BackgroundFetchEventInit& init, + WaitUntilObserver* observer, + ServiceWorkerRegistration* registration); + + void DidGetIcon(ScriptPromiseResolver* resolver, + const String& title, + const SkBitmap& icon); + + void DidUpdateUI(ScriptPromiseResolver* resolver, + mojom::blink::BackgroundFetchError error); + + bool update_ui_called_ = false; + + Member<ServiceWorkerRegistration> service_worker_registration_; + Member<BackgroundFetchIconLoader> loader_; + Member<BackgroundFetchSettledFetches> fetches_; +}; + +} // namespace blink + +#endif // THIRD_PARTY_BLINK_RENDERER_MODULES_BACKGROUND_FETCH_BACKGROUND_FETCH_UPDATE_UI_EVENT_H_
diff --git a/third_party/blink/renderer/modules/background_fetch/background_fetch_update_ui_event.idl b/third_party/blink/renderer/modules/background_fetch/background_fetch_update_ui_event.idl new file mode 100644 index 0000000..0934892 --- /dev/null +++ b/third_party/blink/renderer/modules/background_fetch/background_fetch_update_ui_event.idl
@@ -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. + +// https://wicg.github.io/background-fetch/#background-fetch-update-ui-event + +[ + Constructor(DOMString type, BackgroundFetchEventInit init), + Exposed=ServiceWorker, + RuntimeEnabled=BackgroundFetch +] interface BackgroundFetchUpdateUIEvent : BackgroundFetchEvent { + // TODO(crbug.com/863016): Remove fetches after implementing matchAll(). + readonly attribute BackgroundFetchSettledFetches fetches; + + [CallWith=ScriptState] Promise<void> updateUI(BackgroundFetchUIOptions options); +}; \ No newline at end of file
diff --git a/third_party/blink/renderer/modules/background_fetch/service_worker_global_scope_background_fetch.h b/third_party/blink/renderer/modules/background_fetch/service_worker_global_scope_background_fetch.h index 1b458870..eca44d2 100644 --- a/third_party/blink/renderer/modules/background_fetch/service_worker_global_scope_background_fetch.h +++ b/third_party/blink/renderer/modules/background_fetch/service_worker_global_scope_background_fetch.h
@@ -14,7 +14,7 @@ STATIC_ONLY(ServiceWorkerGlobalScopeBackgroundFetch); public: - DEFINE_STATIC_ATTRIBUTE_EVENT_LISTENER(backgroundfetched); + DEFINE_STATIC_ATTRIBUTE_EVENT_LISTENER(backgroundfetchsuccess); DEFINE_STATIC_ATTRIBUTE_EVENT_LISTENER(backgroundfetchfail); DEFINE_STATIC_ATTRIBUTE_EVENT_LISTENER(backgroundfetchabort); DEFINE_STATIC_ATTRIBUTE_EVENT_LISTENER(backgroundfetchclick);
diff --git a/third_party/blink/renderer/modules/background_fetch/service_worker_global_scope_background_fetch.idl b/third_party/blink/renderer/modules/background_fetch/service_worker_global_scope_background_fetch.idl index 19322597..2f9f6c0 100644 --- a/third_party/blink/renderer/modules/background_fetch/service_worker_global_scope_background_fetch.idl +++ b/third_party/blink/renderer/modules/background_fetch/service_worker_global_scope_background_fetch.idl
@@ -2,13 +2,13 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -// https://wicg.github.io/background-fetch/#events +// https://wicg.github.io/background-fetch/#extensions-to-service-worker-global [ ImplementedAs=ServiceWorkerGlobalScopeBackgroundFetch, RuntimeEnabled=BackgroundFetch ] partial interface ServiceWorkerGlobalScope { - attribute EventHandler onbackgroundfetched; + attribute EventHandler onbackgroundfetchsuccess; attribute EventHandler onbackgroundfetchfail; attribute EventHandler onbackgroundfetchabort; attribute EventHandler onbackgroundfetchclick;
diff --git a/third_party/blink/renderer/modules/cache_storage/cache_storage_error.cc b/third_party/blink/renderer/modules/cache_storage/cache_storage_error.cc index 0cb2707..60254c1 100644 --- a/third_party/blink/renderer/modules/cache_storage/cache_storage_error.cc +++ b/third_party/blink/renderer/modules/cache_storage/cache_storage_error.cc
@@ -34,6 +34,9 @@ case mojom::CacheStorageError::kErrorStorage: return DOMException::Create(DOMExceptionCode::kUnknownError, "Unexpected internal error."); + case mojom::CacheStorageError::kErrorDuplicateOperation: + return DOMException::Create(DOMExceptionCode::kInvalidStateError, + "Duplicate operation."); case mojom::CacheStorageError::kSuccess: // This function should only be called with an error. break;
diff --git a/third_party/blink/renderer/modules/cache_storage/inspector_cache_storage_agent.cc b/third_party/blink/renderer/modules/cache_storage/inspector_cache_storage_agent.cc index 7152bec..d3faa56 100644 --- a/third_party/blink/renderer/modules/cache_storage/inspector_cache_storage_agent.cc +++ b/third_party/blink/renderer/modules/cache_storage/inspector_cache_storage_agent.cc
@@ -161,6 +161,8 @@ return CString("operation too large."); case mojom::blink::CacheStorageError::kErrorStorage: return CString("storage failure."); + case mojom::blink::CacheStorageError::kErrorDuplicateOperation: + return CString("duplicate operation."); case mojom::blink::CacheStorageError::kSuccess: // This function should only be called upon error. break;
diff --git a/third_party/blink/renderer/modules/credentialmanager/credential_manager_type_converters.cc b/third_party/blink/renderer/modules/credentialmanager/credential_manager_type_converters.cc index b12f9dd..54615eef 100644 --- a/third_party/blink/renderer/modules/credentialmanager/credential_manager_type_converters.cc +++ b/third_party/blink/renderer/modules/credentialmanager/credential_manager_type_converters.cc
@@ -202,6 +202,10 @@ return AuthenticatorTransport::NFC; if (transport == "ble") return AuthenticatorTransport::BLE; + if (transport == "cable") + return AuthenticatorTransport::CABLE; + if (transport == "internal") + return AuthenticatorTransport::INTERNAL; NOTREACHED(); return AuthenticatorTransport::USB; } @@ -309,6 +313,11 @@ mojo_descriptor->transports.push_back( ConvertTo<AuthenticatorTransport>(transport)); } + } else { + mojo_descriptor->transports = { + AuthenticatorTransport::USB, AuthenticatorTransport::BLE, + AuthenticatorTransport::NFC, AuthenticatorTransport::CABLE, + AuthenticatorTransport::INTERNAL}; } return mojo_descriptor; }
diff --git a/third_party/blink/renderer/modules/credentialmanager/public_key_credential_descriptor.idl b/third_party/blink/renderer/modules/credentialmanager/public_key_credential_descriptor.idl index fcd20a0..99b03e2 100644 --- a/third_party/blink/renderer/modules/credentialmanager/public_key_credential_descriptor.idl +++ b/third_party/blink/renderer/modules/credentialmanager/public_key_credential_descriptor.idl
@@ -7,7 +7,9 @@ enum AuthenticatorTransport { "usb", "nfc", - "ble" + "ble", + "cable", + "internal" }; // https://w3c.github.io/webauthn/#dictdef-publickeycredentialdescriptor
diff --git a/third_party/blink/renderer/modules/indexeddb/idb_factory.idl b/third_party/blink/renderer/modules/indexeddb/idb_factory.idl index 497f1310d..57cc48a7 100644 --- a/third_party/blink/renderer/modules/indexeddb/idb_factory.idl +++ b/third_party/blink/renderer/modules/indexeddb/idb_factory.idl
@@ -28,8 +28,13 @@ [ Exposed=(Window,Worker) ] interface IDBFactory { - [NewObject, CallWith=ScriptState, RaisesException] IDBOpenDBRequest open(DOMString name, - optional [EnforceRange] unsigned long long version); + [ + NewObject, + CallWith=ScriptState, + Measure, + RaisesException + ] IDBOpenDBRequest open(DOMString name, + optional [EnforceRange] unsigned long long version); [NewObject, CallWith=ScriptState, RaisesException] IDBOpenDBRequest deleteDatabase(DOMString name); [CallWith=ScriptState, RaisesException] short cmp(any first, any second);
diff --git a/third_party/blink/renderer/modules/indexeddb/window_indexed_database.idl b/third_party/blink/renderer/modules/indexeddb/window_indexed_database.idl index 183376f..63647b5a 100644 --- a/third_party/blink/renderer/modules/indexeddb/window_indexed_database.idl +++ b/third_party/blink/renderer/modules/indexeddb/window_indexed_database.idl
@@ -27,5 +27,5 @@ [ ImplementedAs=GlobalIndexedDB ] partial interface Window { - [MeasureAs=UnprefixedIndexedDB] readonly attribute IDBFactory indexedDB; + readonly attribute IDBFactory indexedDB; };
diff --git a/third_party/blink/renderer/modules/modules_idl_files.gni b/third_party/blink/renderer/modules/modules_idl_files.gni index a3cc621..55ca9ce 100644 --- a/third_party/blink/renderer/modules/modules_idl_files.gni +++ b/third_party/blink/renderer/modules/modules_idl_files.gni
@@ -64,16 +64,14 @@ "animationworklet/effect_proxy.idl", "animationworklet/worklet_animation.idl", "app_banner/before_install_prompt_event.idl", - "background_fetch/background_fetch_click_event.idl", "background_fetch/background_fetch_event.idl", - "background_fetch/background_fetch_fail_event.idl", "background_fetch/background_fetch_fetch.idl", "background_fetch/background_fetch_manager.idl", + "background_fetch/background_fetch_record.idl", "background_fetch/background_fetch_registration.idl", - "background_fetch/background_fetch_settled_event.idl", "background_fetch/background_fetch_settled_fetch.idl", "background_fetch/background_fetch_settled_fetches.idl", - "background_fetch/background_fetch_update_event.idl", + "background_fetch/background_fetch_update_ui_event.idl", "background_sync/sync_event.idl", "background_sync/sync_manager.idl", "battery/battery_manager.idl", @@ -466,11 +464,8 @@ [ "app_banner/app_banner_prompt_result.idl", "app_banner/before_install_prompt_event_init.idl", - "background_fetch/background_fetch_click_event_init.idl", "background_fetch/background_fetch_event_init.idl", - "background_fetch/background_fetch_fail_event_init.idl", "background_fetch/background_fetch_options.idl", - "background_fetch/background_fetch_settled_event_init.idl", "background_fetch/background_fetch_ui_options.idl", "background_sync/sync_event_init.idl", "bluetooth/bluetooth_le_scan_filter_init.idl",
diff --git a/third_party/blink/renderer/modules/netinfo/network_information.idl b/third_party/blink/renderer/modules/netinfo/network_information.idl index fe8d5ba1..fdb729a 100644 --- a/third_party/blink/renderer/modules/netinfo/network_information.idl +++ b/third_party/blink/renderer/modules/netinfo/network_information.idl
@@ -31,10 +31,10 @@ ] interface NetworkInformation : EventTarget { [RuntimeEnabled=NetInfoDownlinkMax, MeasureAs=NetInfoType] readonly attribute ConnectionType type; [RuntimeEnabled=NetInfoDownlinkMax, MeasureAs=NetInfoDownlinkMax] readonly attribute Megabit downlinkMax; - [RuntimeEnabled=NetInfoEffectiveType, MeasureAs=NetInfoOnChange] attribute EventHandler onchange; + [MeasureAs=NetInfoOnChange] attribute EventHandler onchange; [RuntimeEnabled=NetInfoDownlinkMax, MeasureAs=NetInfoOnTypeChange] attribute EventHandler ontypechange; - [RuntimeEnabled=NetInfoEffectiveType, MeasureAs=NetInfoEffectiveType] readonly attribute EffectiveConnectionType effectiveType; - [RuntimeEnabled=NetInfoRtt, MeasureAs=NetInfoRtt] readonly attribute Milliseconds rtt; - [RuntimeEnabled=NetInfoDownlink, MeasureAs=NetInfoDownlink] readonly attribute Megabit downlink; - [RuntimeEnabled=NetInfoSaveData, MeasureAs=NetInfoSaveData] readonly attribute boolean saveData; + [MeasureAs=NetInfoEffectiveType] readonly attribute EffectiveConnectionType effectiveType; + [MeasureAs=NetInfoRtt] readonly attribute Milliseconds rtt; + [MeasureAs=NetInfoDownlink] readonly attribute Megabit downlink; + [MeasureAs=NetInfoSaveData] readonly attribute boolean saveData; };
diff --git a/third_party/blink/renderer/modules/service_worker/client.idl b/third_party/blink/renderer/modules/service_worker/client.idl index 1e5fc45e..9a752de 100644 --- a/third_party/blink/renderer/modules/service_worker/client.idl +++ b/third_party/blink/renderer/modules/service_worker/client.idl
@@ -11,6 +11,7 @@ readonly attribute DOMString id; readonly attribute ClientType type; [CallWith=ScriptState, RaisesException] void postMessage(any message, optional sequence<object> transfer = []); + [RuntimeEnabled=PostMessageOptions, CallWith=ScriptState, RaisesException] void postMessage(any message, PostMessageOptions options); // FIXME: frameType is non-standard, see https://crbug.com/697110 [CallWith=ScriptState] readonly attribute ContextFrameType frameType;
diff --git a/third_party/blink/renderer/modules/service_worker/service_worker.cc b/third_party/blink/renderer/modules/service_worker/service_worker.cc index 89bb541..20ff71c 100644 --- a/third_party/blink/renderer/modules/service_worker/service_worker.cc +++ b/third_party/blink/renderer/modules/service_worker/service_worker.cc
@@ -55,6 +55,16 @@ const ScriptValue& message, Vector<ScriptValue>& transfer, ExceptionState& exception_state) { + PostMessageOptions options; + if (!transfer.IsEmpty()) + options.setTransfer(transfer); + postMessage(script_state, message, options, exception_state); +} + +void ServiceWorker::postMessage(ScriptState* script_state, + const ScriptValue& message, + const PostMessageOptions& options, + ExceptionState& exception_state) { ServiceWorkerContainerClient* client = ServiceWorkerContainerClient::From(GetExecutionContext()); if (!client || !client->Provider()) { @@ -64,10 +74,7 @@ return; } - PostMessageOptions options; Transferables transferables; - if (!transfer.IsEmpty()) - options.setTransfer(transfer); scoped_refptr<SerializedScriptValue> serialized_message = PostMessageHelper::SerializeMessageByCopy(script_state->GetIsolate(),
diff --git a/third_party/blink/renderer/modules/service_worker/service_worker.h b/third_party/blink/renderer/modules/service_worker/service_worker.h index 35d78f5..be575e13 100644 --- a/third_party/blink/renderer/modules/service_worker/service_worker.h +++ b/third_party/blink/renderer/modules/service_worker/service_worker.h
@@ -43,6 +43,7 @@ namespace blink { +class PostMessageOptions; class ScriptState; class MODULES_EXPORT ServiceWorker final @@ -66,6 +67,10 @@ const ScriptValue& message, Vector<ScriptValue>& transfer, ExceptionState&); + void postMessage(ScriptState*, + const ScriptValue& message, + const PostMessageOptions&, + ExceptionState&); String scriptURL() const; String state() const;
diff --git a/third_party/blink/renderer/modules/service_worker/service_worker.idl b/third_party/blink/renderer/modules/service_worker/service_worker.idl index 61dafe1..44814895 100644 --- a/third_party/blink/renderer/modules/service_worker/service_worker.idl +++ b/third_party/blink/renderer/modules/service_worker/service_worker.idl
@@ -44,6 +44,7 @@ ] interface ServiceWorker : EventTarget { [CallWith=ScriptState, RaisesException] void postMessage(any message, optional sequence<object> transfer = []); + [RuntimeEnabled=PostMessageOptions, CallWith=ScriptState, RaisesException] void postMessage(any message, PostMessageOptions options); readonly attribute USVString scriptURL; readonly attribute ServiceWorkerState state;
diff --git a/third_party/blink/renderer/modules/service_worker/service_worker_client.cc b/third_party/blink/renderer/modules/service_worker/service_worker_client.cc index 1619a6f..959f27b 100644 --- a/third_party/blink/renderer/modules/service_worker/service_worker_client.cc +++ b/third_party/blink/renderer/modules/service_worker/service_worker_client.cc
@@ -91,11 +91,18 @@ const ScriptValue& message, Vector<ScriptValue>& transfer, ExceptionState& exception_state) { - ExecutionContext* context = ExecutionContext::From(script_state); PostMessageOptions options; - Transferables transferables; if (!transfer.IsEmpty()) options.setTransfer(transfer); + postMessage(script_state, message, options, exception_state); +} + +void ServiceWorkerClient::postMessage(ScriptState* script_state, + const ScriptValue& message, + const PostMessageOptions& options, + ExceptionState& exception_state) { + ExecutionContext* context = ExecutionContext::From(script_state); + Transferables transferables; scoped_refptr<SerializedScriptValue> serialized_message = PostMessageHelper::SerializeMessageByCopy(script_state->GetIsolate(),
diff --git a/third_party/blink/renderer/modules/service_worker/service_worker_client.h b/third_party/blink/renderer/modules/service_worker/service_worker_client.h index fef76e89..8dc4046 100644 --- a/third_party/blink/renderer/modules/service_worker/service_worker_client.h +++ b/third_party/blink/renderer/modules/service_worker/service_worker_client.h
@@ -15,6 +15,7 @@ namespace blink { +class PostMessageOptions; class ScriptPromiseResolver; class ScriptState; @@ -40,6 +41,10 @@ const ScriptValue& message, Vector<ScriptValue>& transfer, ExceptionState&); + void postMessage(ScriptState*, + const ScriptValue& message, + const PostMessageOptions&, + ExceptionState&); protected: explicit ServiceWorkerClient(const WebServiceWorkerClientInfo&);
diff --git a/third_party/blink/renderer/modules/service_worker/service_worker_global_scope_client.cc b/third_party/blink/renderer/modules/service_worker/service_worker_global_scope_client.cc index 68b29db3..ae17974 100644 --- a/third_party/blink/renderer/modules/service_worker/service_worker_global_scope_client.cc +++ b/third_party/blink/renderer/modules/service_worker/service_worker_global_scope_client.cc
@@ -111,12 +111,12 @@ event_dispatch_time); } -void ServiceWorkerGlobalScopeClient::DidHandleBackgroundFetchedEvent( +void ServiceWorkerGlobalScopeClient::DidHandleBackgroundFetchSuccessEvent( int event_id, mojom::ServiceWorkerEventStatus status, double event_dispatch_time) { - client_.DidHandleBackgroundFetchedEvent(event_id, status, - event_dispatch_time); + client_.DidHandleBackgroundFetchSuccessEvent(event_id, status, + event_dispatch_time); } void ServiceWorkerGlobalScopeClient::DidHandleCookieChangeEvent(
diff --git a/third_party/blink/renderer/modules/service_worker/service_worker_global_scope_client.h b/third_party/blink/renderer/modules/service_worker/service_worker_global_scope_client.h index cb62c62a..9109635 100644 --- a/third_party/blink/renderer/modules/service_worker/service_worker_global_scope_client.h +++ b/third_party/blink/renderer/modules/service_worker/service_worker_global_scope_client.h
@@ -92,9 +92,9 @@ void DidHandleBackgroundFetchFailEvent(int event_id, mojom::ServiceWorkerEventStatus, double event_dispatch_time); - void DidHandleBackgroundFetchedEvent(int event_id, - mojom::ServiceWorkerEventStatus, - double event_dispatch_time); + void DidHandleBackgroundFetchSuccessEvent(int event_id, + mojom::ServiceWorkerEventStatus, + double event_dispatch_time); void DidHandleCookieChangeEvent(int event_id, mojom::ServiceWorkerEventStatus, double event_dispatch_time);
diff --git a/third_party/blink/renderer/modules/service_worker/service_worker_global_scope_proxy.cc b/third_party/blink/renderer/modules/service_worker/service_worker_global_scope_proxy.cc index 5766e6e7..ac8099a 100644 --- a/third_party/blink/renderer/modules/service_worker/service_worker_global_scope_proxy.cc +++ b/third_party/blink/renderer/modules/service_worker/service_worker_global_scope_proxy.cc
@@ -51,14 +51,11 @@ #include "third_party/blink/renderer/core/workers/parent_execution_context_task_runners.h" #include "third_party/blink/renderer/core/workers/worker_global_scope.h" #include "third_party/blink/renderer/core/workers/worker_thread.h" -#include "third_party/blink/renderer/modules/background_fetch/background_fetch_click_event.h" -#include "third_party/blink/renderer/modules/background_fetch/background_fetch_click_event_init.h" #include "third_party/blink/renderer/modules/background_fetch/background_fetch_event.h" #include "third_party/blink/renderer/modules/background_fetch/background_fetch_event_init.h" -#include "third_party/blink/renderer/modules/background_fetch/background_fetch_fail_event.h" -#include "third_party/blink/renderer/modules/background_fetch/background_fetch_fail_event_init.h" -#include "third_party/blink/renderer/modules/background_fetch/background_fetch_settled_event_init.h" -#include "third_party/blink/renderer/modules/background_fetch/background_fetch_update_event.h" +#include "third_party/blink/renderer/modules/background_fetch/background_fetch_registration.h" +#include "third_party/blink/renderer/modules/background_fetch/background_fetch_settled_fetches.h" +#include "third_party/blink/renderer/modules/background_fetch/background_fetch_update_ui_event.h" #include "third_party/blink/renderer/modules/background_sync/sync_event.h" #include "third_party/blink/renderer/modules/cookie_store/cookie_change_event.h" #include "third_party/blink/renderer/modules/cookie_store/extendable_cookie_change_event.h" @@ -121,8 +118,7 @@ void ServiceWorkerGlobalScopeProxy::DispatchBackgroundFetchAbortEvent( int event_id, const WebString& developer_id, - const WebString& unique_id, - const WebVector<WebBackgroundFetchSettledFetch>& fetches) { + const WebString& unique_id) { DCHECK(WorkerGlobalScope()->IsContextThread()); WaitUntilObserver* observer = WaitUntilObserver::Create( WorkerGlobalScope(), WaitUntilObserver::kBackgroundFetchAbort, event_id); @@ -134,12 +130,16 @@ // BackgroundFetchSettledFetches::Create which eventually calls ToV8. ScriptState::Scope scope(script_state); - BackgroundFetchSettledEventInit init; - init.setId(developer_id); - init.setFetches(BackgroundFetchSettledFetches::Create(script_state, fetches)); + // TODO(crbug.com/869918): Update to take a BackgroundFetchRegistration + // object, or all information required to build one. + BackgroundFetchRegistration* registration = new BackgroundFetchRegistration( + developer_id, unique_id, 0 /* upload_total */, 0 /* uploaded */, + 0 /* download_total */, 0 /* downloaded */); + BackgroundFetchEventInit init; + init.setRegistration(registration); - BackgroundFetchSettledEvent* event = BackgroundFetchSettledEvent::Create( - EventTypeNames::backgroundfetchabort, init, unique_id, observer); + BackgroundFetchEvent* event = BackgroundFetchEvent::Create( + EventTypeNames::backgroundfetchabort, init, observer); WorkerGlobalScope()->DispatchExtendableEvent(event, observer); } @@ -147,27 +147,20 @@ void ServiceWorkerGlobalScopeProxy::DispatchBackgroundFetchClickEvent( int event_id, const WebString& developer_id, - BackgroundFetchState status) { + const WebString& unique_id) { DCHECK(WorkerGlobalScope()->IsContextThread()); WaitUntilObserver* observer = WaitUntilObserver::Create( WorkerGlobalScope(), WaitUntilObserver::kBackgroundFetchClick, event_id); - BackgroundFetchClickEventInit init; - init.setId(developer_id); + // TODO(crbug.com/869918): Update to take a BackgroundFetchRegistration + // object, or all information required to build one. + BackgroundFetchRegistration* registration = new BackgroundFetchRegistration( + developer_id, unique_id, 0 /* upload_total */, 0 /* uploaded */, + 0 /* download_total */, 0 /* downloaded */); + BackgroundFetchEventInit init; + init.setRegistration(registration); - switch (status) { - case BackgroundFetchState::kPending: - init.setState("pending"); - break; - case BackgroundFetchState::kSucceeded: - init.setState("succeeded"); - break; - case BackgroundFetchState::kFailed: - init.setState("failed"); - break; - } - - BackgroundFetchClickEvent* event = BackgroundFetchClickEvent::Create( + BackgroundFetchEvent* event = BackgroundFetchEvent::Create( EventTypeNames::backgroundfetchclick, init, observer); WorkerGlobalScope()->DispatchExtendableEvent(event, observer); @@ -189,25 +182,32 @@ // BackgroundFetchSettledFetches::Create which eventually calls ToV8. ScriptState::Scope scope(script_state); - BackgroundFetchSettledEventInit init; - init.setId(developer_id); - init.setFetches(BackgroundFetchSettledFetches::Create(script_state, fetches)); + // TODO(crbug.com/869918): Update to take a BackgroundFetchRegistration + // object, or all information required to build one. + BackgroundFetchRegistration* registration = new BackgroundFetchRegistration( + developer_id, unique_id, 0 /* upload_total */, 0 /* uploaded */, + 0 /* download_total */, 0 /* downloaded */); + BackgroundFetchEventInit init; + init.setRegistration(registration); - BackgroundFetchUpdateEvent* event = BackgroundFetchUpdateEvent::Create( - EventTypeNames::backgroundfetchfail, init, unique_id, script_state, - observer, worker_global_scope_->registration()); + BackgroundFetchUpdateUIEvent* event = BackgroundFetchUpdateUIEvent::Create( + EventTypeNames::backgroundfetchfail, init, observer, + worker_global_scope_->registration()); + event->setFetches( + BackgroundFetchSettledFetches::Create(script_state, fetches)); WorkerGlobalScope()->DispatchExtendableEvent(event, observer); } -void ServiceWorkerGlobalScopeProxy::DispatchBackgroundFetchedEvent( +void ServiceWorkerGlobalScopeProxy::DispatchBackgroundFetchSuccessEvent( int event_id, const WebString& developer_id, const WebString& unique_id, const WebVector<WebBackgroundFetchSettledFetch>& fetches) { DCHECK(WorkerGlobalScope()->IsContextThread()); WaitUntilObserver* observer = WaitUntilObserver::Create( - WorkerGlobalScope(), WaitUntilObserver::kBackgroundFetched, event_id); + WorkerGlobalScope(), WaitUntilObserver::kBackgroundFetchSuccess, + event_id); ScriptState* script_state = WorkerGlobalScope()->ScriptController()->GetScriptState(); @@ -216,13 +216,19 @@ // BackgroundFetchSettledFetches::Create which eventually calls ToV8. ScriptState::Scope scope(script_state); - BackgroundFetchSettledEventInit init; - init.setId(developer_id); - init.setFetches(BackgroundFetchSettledFetches::Create(script_state, fetches)); + // TODO(crbug.com/869918): Update to take a BackgroundFetchRegistration + // object, or all information required to build one. + BackgroundFetchRegistration* registration = new BackgroundFetchRegistration( + developer_id, unique_id, 0 /* upload_total */, 0 /* uploaded */, + 0 /* download_total */, 0 /* downloaded */); + BackgroundFetchEventInit init; + init.setRegistration(registration); - BackgroundFetchUpdateEvent* event = BackgroundFetchUpdateEvent::Create( - EventTypeNames::backgroundfetched, init, unique_id, script_state, - observer, worker_global_scope_->registration()); + BackgroundFetchUpdateUIEvent* event = BackgroundFetchUpdateUIEvent::Create( + EventTypeNames::backgroundfetchsuccess, init, observer, + worker_global_scope_->registration()); + event->setFetches( + BackgroundFetchSettledFetches::Create(script_state, fetches)); WorkerGlobalScope()->DispatchExtendableEvent(event, observer); }
diff --git a/third_party/blink/renderer/modules/service_worker/service_worker_global_scope_proxy.h b/third_party/blink/renderer/modules/service_worker/service_worker_global_scope_proxy.h index b49f22b..b6992ec5 100644 --- a/third_party/blink/renderer/modules/service_worker/service_worker_global_scope_proxy.h +++ b/third_party/blink/renderer/modules/service_worker/service_worker_global_scope_proxy.h
@@ -81,20 +81,18 @@ void SetRegistration( std::unique_ptr<WebServiceWorkerRegistration::Handle>) override; void DispatchActivateEvent(int) override; - void DispatchBackgroundFetchAbortEvent( - int event_id, - const WebString& developer_id, - const WebString& unique_id, - const WebVector<WebBackgroundFetchSettledFetch>& fetches) override; + void DispatchBackgroundFetchAbortEvent(int event_id, + const WebString& developer_id, + const WebString& unique_id) override; void DispatchBackgroundFetchClickEvent(int event_id, const WebString& developer_id, - BackgroundFetchState) override; + const WebString& unique_id) override; void DispatchBackgroundFetchFailEvent( int event_id, const WebString& developer_id, const WebString& unique_id, const WebVector<WebBackgroundFetchSettledFetch>& fetches) override; - void DispatchBackgroundFetchedEvent( + void DispatchBackgroundFetchSuccessEvent( int event_id, const WebString& developer_id, const WebString& unique_id,
diff --git a/third_party/blink/renderer/modules/service_worker/wait_until_observer.cc b/third_party/blink/renderer/modules/service_worker/wait_until_observer.cc index 7af9c602..ecbfbbd 100644 --- a/third_party/blink/renderer/modules/service_worker/wait_until_observer.cc +++ b/third_party/blink/renderer/modules/service_worker/wait_until_observer.cc
@@ -305,9 +305,9 @@ client->DidHandleBackgroundFetchFailEvent(event_id_, status, event_dispatch_time_); break; - case kBackgroundFetched: - client->DidHandleBackgroundFetchedEvent(event_id_, status, - event_dispatch_time_); + case kBackgroundFetchSuccess: + client->DidHandleBackgroundFetchSuccessEvent(event_id_, status, + event_dispatch_time_); break; } execution_context_ = nullptr;
diff --git a/third_party/blink/renderer/modules/service_worker/wait_until_observer.h b/third_party/blink/renderer/modules/service_worker/wait_until_observer.h index f602d983..47560c2 100644 --- a/third_party/blink/renderer/modules/service_worker/wait_until_observer.h +++ b/third_party/blink/renderer/modules/service_worker/wait_until_observer.h
@@ -42,7 +42,7 @@ kBackgroundFetchAbort, kBackgroundFetchClick, kBackgroundFetchFail, - kBackgroundFetched + kBackgroundFetchSuccess }; static WaitUntilObserver* Create(ExecutionContext*, EventType, int event_id);
diff --git a/third_party/blink/renderer/modules/webgl/webgl2_rendering_context_base.cc b/third_party/blink/renderer/modules/webgl/webgl2_rendering_context_base.cc index b470acd..8a28001 100644 --- a/third_party/blink/renderer/modules/webgl/webgl2_rendering_context_base.cc +++ b/third_party/blink/renderer/modules/webgl/webgl2_rendering_context_base.cc
@@ -1214,7 +1214,7 @@ return; } - TexImageHelperHTMLCanvasElement( + TexImageHelperCanvasRenderingContextHost( execution_context->GetSecurityOrigin(), kTexImage2D, target, level, internalformat, format, type, 0, 0, 0, canvas, GetTextureSourceSubRectangle(width, height), 1, 0, exception_state); @@ -1306,14 +1306,15 @@ exception_state); } -void WebGL2RenderingContextBase::texImage2D(ExecutionContext* execution_context, - GLenum target, - GLint level, - GLint internalformat, - GLenum format, - GLenum type, - HTMLCanvasElement* canvas, - ExceptionState& exception_state) { +void WebGL2RenderingContextBase::texImage2D( + ExecutionContext* execution_context, + GLenum target, + GLint level, + GLint internalformat, + GLenum format, + GLenum type, + CanvasRenderingContextHost* context_host, + ExceptionState& exception_state) { if (isContextLost()) return; if (bound_pixel_unpack_buffer_) { @@ -1323,8 +1324,8 @@ } WebGLRenderingContextBase::texImage2D(execution_context, target, level, - internalformat, format, type, canvas, - exception_state); + internalformat, format, type, + context_host, exception_state); } void WebGL2RenderingContextBase::texImage2D(ExecutionContext* execution_context, @@ -1478,7 +1479,7 @@ return; } - TexImageHelperHTMLCanvasElement( + TexImageHelperCanvasRenderingContextHost( execution_context->GetSecurityOrigin(), kTexSubImage2D, target, level, 0, format, type, xoffset, yoffset, 0, canvas, GetTextureSourceSubRectangle(width, height), 1, 0, exception_state); @@ -1584,7 +1585,7 @@ GLint yoffset, GLenum format, GLenum type, - HTMLCanvasElement* canvas, + CanvasRenderingContextHost* context_host, ExceptionState& exception_state) { if (isContextLost()) return; @@ -1596,7 +1597,7 @@ WebGLRenderingContextBase::texSubImage2D(execution_context, target, level, xoffset, yoffset, format, type, - canvas, exception_state); + context_host, exception_state); } void WebGL2RenderingContextBase::texSubImage2D( @@ -1820,11 +1821,11 @@ return; } - TexImageHelperHTMLCanvasElement(execution_context->GetSecurityOrigin(), - kTexImage3D, target, level, internalformat, - format, type, 0, 0, 0, canvas, - GetTextureSourceSubRectangle(width, height), - depth, unpack_image_height_, exception_state); + TexImageHelperCanvasRenderingContextHost( + execution_context->GetSecurityOrigin(), kTexImage3D, target, level, + internalformat, format, type, 0, 0, 0, canvas, + GetTextureSourceSubRectangle(width, height), depth, unpack_image_height_, + exception_state); } void WebGL2RenderingContextBase::texImage3D(ExecutionContext* execution_context, @@ -2015,7 +2016,7 @@ GLsizei depth, GLenum format, GLenum type, - HTMLCanvasElement* canvas, + CanvasRenderingContextHost* context_host, ExceptionState& exception_state) { if (isContextLost()) return; @@ -2025,11 +2026,11 @@ return; } - TexImageHelperHTMLCanvasElement(execution_context->GetSecurityOrigin(), - kTexSubImage3D, target, level, 0, format, - type, xoffset, yoffset, zoffset, canvas, - GetTextureSourceSubRectangle(width, height), - depth, unpack_image_height_, exception_state); + TexImageHelperCanvasRenderingContextHost( + execution_context->GetSecurityOrigin(), kTexSubImage3D, target, level, 0, + format, type, xoffset, yoffset, zoffset, context_host, + GetTextureSourceSubRectangle(width, height), depth, unpack_image_height_, + exception_state); } void WebGL2RenderingContextBase::texSubImage3D(
diff --git a/third_party/blink/renderer/modules/webgl/webgl2_rendering_context_base.h b/third_party/blink/renderer/modules/webgl/webgl2_rendering_context_base.h index 7ef3f4cf..90e6b90 100644 --- a/third_party/blink/renderer/modules/webgl/webgl2_rendering_context_base.h +++ b/third_party/blink/renderer/modules/webgl/webgl2_rendering_context_base.h
@@ -252,7 +252,7 @@ GLint, GLenum, GLenum, - HTMLCanvasElement*, + CanvasRenderingContextHost*, ExceptionState&); void texImage2D(ExecutionContext*, GLenum, @@ -286,7 +286,7 @@ GLint, GLenum, GLenum, - HTMLCanvasElement*, + CanvasRenderingContextHost*, ExceptionState&); void texSubImage2D(ExecutionContext*, GLenum, @@ -454,7 +454,7 @@ GLsizei, GLenum, GLenum, - HTMLCanvasElement*, + CanvasRenderingContextHost*, ExceptionState&); void texSubImage3D(ExecutionContext*, GLenum,
diff --git a/third_party/blink/renderer/modules/webgl/webgl_rendering_context_base.cc b/third_party/blink/renderer/modules/webgl/webgl_rendering_context_base.cc index 91625c5..bf0fb52b7 100644 --- a/third_party/blink/renderer/modules/webgl/webgl_rendering_context_base.cc +++ b/third_party/blink/renderer/modules/webgl/webgl_rendering_context_base.cc
@@ -5228,7 +5228,7 @@ } } -void WebGLRenderingContextBase::TexImageHelperHTMLCanvasElement( +void WebGLRenderingContextBase::TexImageHelperCanvasRenderingContextHost( const SecurityOrigin* security_origin, TexImageFunctionID function_id, GLenum target, @@ -5239,7 +5239,7 @@ GLint xoffset, GLint yoffset, GLint zoffset, - HTMLCanvasElement* canvas, + CanvasRenderingContextHost* context_host, const IntRect& source_sub_rectangle, GLsizei depth, GLint unpack_image_height, @@ -5248,8 +5248,8 @@ if (isContextLost()) return; - if (!ValidateHTMLCanvasElement(security_origin, func_name, canvas, - exception_state)) + if (!ValidateCanvasRenderingContextHost(security_origin, func_name, + context_host, exception_state)) return; WebGLTexture* texture = ValidateTexImageBinding(func_name, function_id, target); @@ -5272,7 +5272,7 @@ // (texImageImpl). bool selecting_sub_rectangle = false; if (!ValidateTexImageSubRectangle( - func_name, function_id, canvas, source_sub_rectangle, depth, + func_name, function_id, context_host, source_sub_rectangle, depth, unpack_image_height, &selecting_sub_rectangle)) { return; } @@ -5282,10 +5282,16 @@ // float/integer/sRGB internal format. // TODO(crbug.com/622958): relax the constrains if copyTextureCHROMIUM is // upgraded to handle more formats. - if (!canvas->IsAccelerated() || !CanUseTexImageByGPU(format, type)) { + if (!context_host->IsAccelerated() || !CanUseTexImageByGPU(format, type)) { + SourceImageStatus source_image_status = kInvalidSourceImageStatus; + scoped_refptr<Image> image = context_host->GetSourceImageForCanvas( + &source_image_status, kPreferAcceleration, + FloatSize(source_sub_rectangle.Width(), + source_sub_rectangle.Height())); + if (source_image_status != kNormalSourceImageStatus) + return; TexImageImpl(function_id, target, level, internalformat, xoffset, yoffset, - zoffset, format, type, - canvas->Snapshot(kBackBuffer, kPreferAcceleration).get(), + zoffset, format, type, image.get(), WebGLImageConversion::kHtmlDomCanvas, unpack_flip_y_, unpack_premultiply_alpha_, source_sub_rectangle, 1, 0); return; @@ -5294,7 +5300,7 @@ // The GPU-GPU copy path uses the Y-up coordinate system. IntRect adjusted_source_sub_rectangle = source_sub_rectangle; if (!unpack_flip_y_) { - adjusted_source_sub_rectangle.SetY(canvas->height() - + adjusted_source_sub_rectangle.SetY(context_host->Size().Height() - adjusted_source_sub_rectangle.MaxY()); } @@ -5302,11 +5308,11 @@ TexImage2DBase(target, level, internalformat, source_sub_rectangle.Width(), source_sub_rectangle.Height(), 0, format, type, nullptr); - TexImageByGPU(function_id, texture, target, level, 0, 0, 0, canvas, + TexImageByGPU(function_id, texture, target, level, 0, 0, 0, context_host, adjusted_source_sub_rectangle); } else { TexImageByGPU(function_id, texture, target, level, xoffset, yoffset, 0, - canvas, adjusted_source_sub_rectangle); + context_host, adjusted_source_sub_rectangle); } } else { // 3D functions. @@ -5314,27 +5320,33 @@ // TODO(zmo): Implement GPU-to-GPU copy path (crbug.com/612542). // Note that code will also be needed to copy to layers of 3D // textures, and elements of 2D texture arrays. + SourceImageStatus source_image_status = kInvalidSourceImageStatus; + scoped_refptr<Image> image = context_host->GetSourceImageForCanvas( + &source_image_status, kPreferAcceleration, + FloatSize(source_sub_rectangle.Width(), source_sub_rectangle.Height())); + if (source_image_status != kNormalSourceImageStatus) + return; TexImageImpl(function_id, target, level, internalformat, xoffset, yoffset, - zoffset, format, type, - canvas->Snapshot(kBackBuffer, kPreferAcceleration).get(), + zoffset, format, type, image.get(), WebGLImageConversion::kHtmlDomCanvas, unpack_flip_y_, unpack_premultiply_alpha_, source_sub_rectangle, depth, unpack_image_height); } } -void WebGLRenderingContextBase::texImage2D(ExecutionContext* execution_context, - GLenum target, - GLint level, - GLint internalformat, - GLenum format, - GLenum type, - HTMLCanvasElement* canvas, - ExceptionState& exception_state) { - TexImageHelperHTMLCanvasElement( +void WebGLRenderingContextBase::texImage2D( + ExecutionContext* execution_context, + GLenum target, + GLint level, + GLint internalformat, + GLenum format, + GLenum type, + CanvasRenderingContextHost* context_host, + ExceptionState& exception_state) { + TexImageHelperCanvasRenderingContextHost( execution_context->GetSecurityOrigin(), kTexImage2D, target, level, - internalformat, format, type, 0, 0, 0, canvas, - GetTextureSourceSize(canvas), 1, 0, exception_state); + internalformat, format, type, 0, 0, 0, context_host, + GetTextureSourceSize(context_host), 1, 0, exception_state); } scoped_refptr<Image> WebGLRenderingContextBase::VideoFrameToImage( @@ -5809,12 +5821,12 @@ GLint yoffset, GLenum format, GLenum type, - HTMLCanvasElement* canvas, + CanvasRenderingContextHost* context_host, ExceptionState& exception_state) { - TexImageHelperHTMLCanvasElement( + TexImageHelperCanvasRenderingContextHost( execution_context->GetSecurityOrigin(), kTexSubImage2D, target, level, 0, - format, type, xoffset, yoffset, 0, canvas, GetTextureSourceSize(canvas), - 1, 0, exception_state); + format, type, xoffset, yoffset, 0, context_host, + GetTextureSourceSize(context_host), 1, 0, exception_state); } void WebGLRenderingContextBase::texSubImage2D( @@ -7553,17 +7565,17 @@ return true; } -bool WebGLRenderingContextBase::ValidateHTMLCanvasElement( +bool WebGLRenderingContextBase::ValidateCanvasRenderingContextHost( const SecurityOrigin* security_origin, const char* function_name, - HTMLCanvasElement* canvas, + CanvasRenderingContextHost* context_host, ExceptionState& exception_state) { - if (!canvas || !canvas->IsPaintable()) { + if (!context_host || !context_host->IsPaintable()) { SynthesizeGLError(GL_INVALID_VALUE, function_name, "no canvas"); return false; } - if (WouldTaintOrigin(canvas, security_origin)) { + if (WouldTaintOrigin(context_host, security_origin)) { exception_state.ThrowSecurityError("Tainted canvases may not be loaded."); return false; }
diff --git a/third_party/blink/renderer/modules/webgl/webgl_rendering_context_base.h b/third_party/blink/renderer/modules/webgl/webgl_rendering_context_base.h index 1652ac55..2d4a1a5 100644 --- a/third_party/blink/renderer/modules/webgl/webgl_rendering_context_base.h +++ b/third_party/blink/renderer/modules/webgl/webgl_rendering_context_base.h
@@ -374,7 +374,7 @@ GLint internalformat, GLenum format, GLenum type, - HTMLCanvasElement*, + CanvasRenderingContextHost*, ExceptionState&); void texImage2D(ExecutionContext*, GLenum target, @@ -427,7 +427,7 @@ GLint yoffset, GLenum format, GLenum type, - HTMLCanvasElement*, + CanvasRenderingContextHost*, ExceptionState&); void texSubImage2D(ExecutionContext*, GLenum target, @@ -1458,12 +1458,12 @@ HTMLImageElement*, ExceptionState&); - // Helper function for tex{Sub}Image2D to make sure canvas is ready and - // wouldn't taint Origin. - bool ValidateHTMLCanvasElement(const SecurityOrigin*, - const char* function_name, - HTMLCanvasElement*, - ExceptionState&); + // Helper function for tex{Sub}Image2D to make sure canvas or OffscreenCanvas + // is ready and wouldn't taint Origin. + bool ValidateCanvasRenderingContextHost(const SecurityOrigin*, + const char* function_name, + CanvasRenderingContextHost*, + ExceptionState&); // Helper function for tex{Sub}Image2D to make sure video is ready wouldn't // taint Origin. @@ -1624,21 +1624,21 @@ GLint, ExceptionState&); - void TexImageHelperHTMLCanvasElement(const SecurityOrigin*, - TexImageFunctionID, - GLenum, - GLint, - GLint, - GLenum, - GLenum, - GLint, - GLint, - GLint, - HTMLCanvasElement*, - const IntRect&, - GLsizei, - GLint, - ExceptionState&); + void TexImageHelperCanvasRenderingContextHost(const SecurityOrigin*, + TexImageFunctionID, + GLenum, + GLint, + GLint, + GLenum, + GLenum, + GLint, + GLint, + GLint, + CanvasRenderingContextHost*, + const IntRect&, + GLsizei, + GLint, + ExceptionState&); void TexImageHelperHTMLVideoElement(const SecurityOrigin*, TexImageFunctionID,
diff --git a/third_party/blink/renderer/modules/webgl/webgl_rendering_context_base.idl b/third_party/blink/renderer/modules/webgl/webgl_rendering_context_base.idl index 3196519..f424abb8 100644 --- a/third_party/blink/renderer/modules/webgl/webgl_rendering_context_base.idl +++ b/third_party/blink/renderer/modules/webgl/webgl_rendering_context_base.idl
@@ -628,6 +628,9 @@ GLenum format, GLenum type, HTMLCanvasElement canvas); [CallWith=ExecutionContext, RaisesException] void texImage2D( GLenum target, GLint level, GLint internalformat, + GLenum format, GLenum type, OffscreenCanvas offscreenCanvas); + [CallWith=ExecutionContext, RaisesException] void texImage2D( + GLenum target, GLint level, GLint internalformat, GLenum format, GLenum type, HTMLVideoElement video); [RaisesException] void texImage2D( GLenum target, GLint level, GLint internalformat, @@ -648,6 +651,9 @@ GLenum format, GLenum type, HTMLCanvasElement canvas); [CallWith=ExecutionContext, RaisesException] void texSubImage2D( GLenum target, GLint level, GLint xoffset, GLint yoffset, + GLenum format, GLenum type, OffscreenCanvas offscreenCanvas); + [CallWith=ExecutionContext, RaisesException] void texSubImage2D( + GLenum target, GLint level, GLint xoffset, GLint yoffset, GLenum format, GLenum type, HTMLVideoElement video); [RaisesException] void texSubImage2D( GLenum target, GLint level, GLint xoffset, GLint yoffset,
diff --git a/third_party/blink/renderer/modules/websockets/websocket_channel_impl.cc b/third_party/blink/renderer/modules/websockets/websocket_channel_impl.cc index 393ad3b3..c7755b7 100644 --- a/third_party/blink/renderer/modules/websockets/websocket_channel_impl.cc +++ b/third_party/blink/renderer/modules/websockets/websocket_channel_impl.cc
@@ -130,19 +130,18 @@ void WebSocketChannelImpl::BlobLoader::Cancel() { loader_->Cancel(); - // DidFail will be called immediately. - // |this| is deleted here. + loader_ = nullptr; } void WebSocketChannelImpl::BlobLoader::DidFinishLoading() { channel_->DidFinishLoadingBlob(loader_->ArrayBufferResult()); - // |this| is deleted here. + loader_ = nullptr; } void WebSocketChannelImpl::BlobLoader::DidFail( FileError::ErrorCode error_code) { channel_->DidFailLoadingBlob(error_code); - // |this| is deleted here. + loader_ = nullptr; } struct WebSocketChannelImpl::ConnectInfo { @@ -545,7 +544,6 @@ was_clean ? WebSocketChannelClient::kClosingHandshakeComplete : WebSocketChannelClient::kClosingHandshakeIncomplete; client->DidClose(status, code, reason); - // client->DidClose may delete this object. } void WebSocketChannelImpl::DidConnect(WebSocketHandle* handle, @@ -621,7 +619,6 @@ // WebSocketConnection. Hence we fail this channel by calling // |this->failAsError| function. FailAsError(message); - // |this| may be deleted. } void WebSocketChannelImpl::DidReceiveData(WebSocketHandle* handle, @@ -675,7 +672,6 @@ receiving_message_data_.clear(); if (message.IsNull()) { FailAsError("Could not decode a text frame as UTF-8."); - // failAsError may delete this object. } else { client_->DidReceiveTextMessage(message); } @@ -710,7 +706,6 @@ } HandleDidClose(was_clean, code, reason); - // HandleDidClose may delete this object. } void WebSocketChannelImpl::DidReceiveFlowControl(WebSocketHandle* handle, @@ -779,7 +774,6 @@ // FIXME: Generate human-friendly reason message. FailAsError("Failed to load Blob: error code = " + String::Number(error_code)); - // |this| can be deleted here. } void WebSocketChannelImpl::TearDownFailedConnection() { @@ -791,7 +785,6 @@ client_->DidError(); HandleDidClose(false, kCloseEventCodeAbnormalClosure, String()); - // HandleDidClose may delete this object. } bool WebSocketChannelImpl::ShouldDisallowConnection(const KURL& url) {
diff --git a/third_party/blink/renderer/platform/BUILD.gn b/third_party/blink/renderer/platform/BUILD.gn index 1d8b9f00..b0bdd99 100644 --- a/third_party/blink/renderer/platform/BUILD.gn +++ b/third_party/blink/renderer/platform/BUILD.gn
@@ -1596,6 +1596,8 @@ "testing/test_paint_artifact.h", "testing/testing_platform_support.cc", "testing/testing_platform_support.h", + "testing/testing_platform_support_with_custom_scheduler.cc", + "testing/testing_platform_support_with_custom_scheduler.h", "testing/testing_platform_support_with_mock_scheduler.cc", "testing/testing_platform_support_with_mock_scheduler.h", "testing/testing_platform_support_with_web_rtc.cc",
diff --git a/third_party/blink/renderer/platform/bindings/script_promise_properties.h b/third_party/blink/renderer/platform/bindings/script_promise_properties.h index 1506c3a..ef9e174 100644 --- a/third_party/blink/renderer/platform/bindings/script_promise_properties.h +++ b/third_party/blink/renderer/platform/bindings/script_promise_properties.h
@@ -6,13 +6,14 @@ #define THIRD_PARTY_BLINK_RENDERER_PLATFORM_BINDINGS_SCRIPT_PROMISE_PROPERTIES_H_ // See ScriptPromiseProperty.h -#define SCRIPT_PROMISE_PROPERTIES(P, ...) \ - P(ScriptPromise, kReady##__VA_ARGS__) \ - P(ScriptPromise, kClosed##__VA_ARGS__) \ - P(ScriptPromise, kFinished##__VA_ARGS__) \ - P(ScriptPromise, kLoaded##__VA_ARGS__) \ - P(ScriptPromise, kReleased##__VA_ARGS__) \ - P(ScriptPromise, kUserChoice##__VA_ARGS__) \ +#define SCRIPT_PROMISE_PROPERTIES(P, ...) \ + P(ScriptPromise, kReady##__VA_ARGS__) \ + P(ScriptPromise, kClosed##__VA_ARGS__) \ + P(ScriptPromise, kFinished##__VA_ARGS__) \ + P(ScriptPromise, kLoaded##__VA_ARGS__) \ + P(ScriptPromise, kReleased##__VA_ARGS__) \ + P(ScriptPromise, kResponseReady##__VA_ARGS__) \ + P(ScriptPromise, kUserChoice##__VA_ARGS__) \ P(ScriptPromise, kPreloadResponse##__VA_ARGS__) #endif // THIRD_PARTY_BLINK_RENDERER_PLATFORM_BINDINGS_SCRIPT_PROMISE_PROPERTIES_H_
diff --git a/third_party/blink/renderer/platform/bindings/v8_per_isolate_data.cc b/third_party/blink/renderer/platform/bindings/v8_per_isolate_data.cc index 44cb5a94..11e20df 100644 --- a/third_party/blink/renderer/platform/bindings/v8_per_isolate_data.cc +++ b/third_party/blink/renderer/platform/bindings/v8_per_isolate_data.cc
@@ -368,16 +368,4 @@ active_script_wrappables_->insert(wrappable); } -void V8PerIsolateData::TemporaryScriptWrappableVisitorScope:: - SwapWithV8PerIsolateDataVisitor( - std::unique_ptr<ScriptWrappableMarkingVisitor>& visitor) { - ScriptWrappableMarkingVisitor* current = CurrentVisitor(); - if (current) - ScriptWrappableMarkingVisitor::PerformCleanup(isolate_); - - V8PerIsolateData::From(isolate_)->script_wrappable_visitor_.swap( - saved_visitor_); - isolate_->SetEmbedderHeapTracer(CurrentVisitor()); -} - } // namespace blink
diff --git a/third_party/blink/renderer/platform/bindings/v8_per_isolate_data.h b/third_party/blink/renderer/platform/bindings/v8_per_isolate_data.h index 7788274..8d8b585 100644 --- a/third_party/blink/renderer/platform/bindings/v8_per_isolate_data.h +++ b/third_party/blink/renderer/platform/bindings/v8_per_isolate_data.h
@@ -200,41 +200,20 @@ return active_script_wrappables_.Get(); } - class PLATFORM_EXPORT TemporaryScriptWrappableVisitorScope { - WTF_MAKE_NONCOPYABLE(TemporaryScriptWrappableVisitorScope); - STACK_ALLOCATED(); - - public: - TemporaryScriptWrappableVisitorScope( - v8::Isolate* isolate, - std::unique_ptr<ScriptWrappableMarkingVisitor> visitor) - : isolate_(isolate), saved_visitor_(std::move(visitor)) { - SwapWithV8PerIsolateDataVisitor(saved_visitor_); - } - ~TemporaryScriptWrappableVisitorScope() { - SwapWithV8PerIsolateDataVisitor(saved_visitor_); - } - - inline ScriptWrappableMarkingVisitor* CurrentVisitor() { - return V8PerIsolateData::From(isolate_) - ->GetScriptWrappableMarkingVisitor(); - } - - private: - void SwapWithV8PerIsolateDataVisitor( - std::unique_ptr<ScriptWrappableMarkingVisitor>&); - - v8::Isolate* isolate_; - std::unique_ptr<ScriptWrappableMarkingVisitor> saved_visitor_; - }; - void SetScriptWrappableMarkingVisitor( std::unique_ptr<ScriptWrappableMarkingVisitor> visitor) { script_wrappable_visitor_ = std::move(visitor); } - ScriptWrappableMarkingVisitor* GetScriptWrappableMarkingVisitor() { + + ScriptWrappableMarkingVisitor* GetScriptWrappableMarkingVisitor() const { return script_wrappable_visitor_.get(); } + + void SwapScriptWrappableMarkingVisitor( + std::unique_ptr<ScriptWrappableMarkingVisitor>& other) { + script_wrappable_visitor_.swap(other); + } + int IsNearV8HeapLimitHandled() { return handled_near_v8_heap_limit_; } void HandledNearV8HeapLimit() { handled_near_v8_heap_limit_ = true; }
diff --git a/third_party/blink/renderer/platform/blob/BUILD.gn b/third_party/blink/renderer/platform/blob/BUILD.gn index f6af4da..b40abbe 100644 --- a/third_party/blink/renderer/platform/blob/BUILD.gn +++ b/third_party/blink/renderer/platform/blob/BUILD.gn
@@ -13,11 +13,9 @@ # another. jumbo_source_set("generator") { public_deps = [ - "//third_party/blink/public/mojom:mojom_platform_blink__generator", - "//url/mojom:url_mojom_gurl_blink__generator", - "//url/mojom:url_mojom_gurl_shared__generator", - "//url/mojom:url_mojom_origin_blink__generator", - "//url/mojom:url_mojom_origin_shared__generator", + "//third_party/blink/public/mojom:mojom_platform_blink_headers", + "//url/mojom:url_mojom_gurl_blink_headers", + "//url/mojom:url_mojom_origin_blink_headers", ] }
diff --git a/third_party/blink/renderer/platform/exported/web_runtime_features.cc b/third_party/blink/renderer/platform/exported/web_runtime_features.cc index 40d53dc..5f5687c 100644 --- a/third_party/blink/renderer/platform/exported/web_runtime_features.cc +++ b/third_party/blink/renderer/platform/exported/web_runtime_features.cc
@@ -296,6 +296,10 @@ RuntimeEnabledFeatures::SetPassiveDocumentEventListenersEnabled(enable); } +void WebRuntimeFeatures::EnablePassiveDocumentWheelEventListeners(bool enable) { + RuntimeEnabledFeatures::SetPassiveDocumentWheelEventListenersEnabled(enable); +} + void WebRuntimeFeatures::EnablePaymentApp(bool enable) { RuntimeEnabledFeatures::SetPaymentAppEnabled(enable); }
diff --git a/third_party/blink/renderer/platform/feature_policy/feature_policy.cc b/third_party/blink/renderer/platform/feature_policy/feature_policy.cc index ac18a953..8aef9a66 100644 --- a/third_party/blink/renderer/platform/feature_policy/feature_policy.cc +++ b/third_party/blink/renderer/platform/feature_policy/feature_policy.cc
@@ -277,4 +277,13 @@ return default_feature_name_map; } +const String& GetNameForFeature(mojom::FeaturePolicyFeature feature) { + const static String empty_string; + for (const auto& entry : GetDefaultFeatureNameMap()) { + if (entry.value == feature) + return entry.key; + } + return empty_string; +} + } // namespace blink
diff --git a/third_party/blink/renderer/platform/feature_policy/feature_policy.h b/third_party/blink/renderer/platform/feature_policy/feature_policy.h index 05c3737..fa5d340 100644 --- a/third_party/blink/renderer/platform/feature_policy/feature_policy.h +++ b/third_party/blink/renderer/platform/feature_policy/feature_policy.h
@@ -90,6 +90,8 @@ PLATFORM_EXPORT void AllowFeatureEverywhere(mojom::FeaturePolicyFeature, ParsedFeaturePolicy&); +PLATFORM_EXPORT const String& GetNameForFeature(mojom::FeaturePolicyFeature); + } // namespace blink #endif // THIRD_PARTY_BLINK_RENDERER_PLATFORM_FEATURE_POLICY_FEATURE_POLICY_H_
diff --git a/third_party/blink/renderer/platform/fonts/shaping/harfbuzz_shaper_test.cc b/third_party/blink/renderer/platform/fonts/shaping/harfbuzz_shaper_test.cc index ac9b012..a6c267b 100644 --- a/third_party/blink/renderer/platform/fonts/shaping/harfbuzz_shaper_test.cc +++ b/third_party/blink/renderer/platform/fonts/shaping/harfbuzz_shaper_test.cc
@@ -414,9 +414,13 @@ // Represents the case where a part of a cluster has a different color. // <div>0x647<span style="color: red;">0x64A</span></div> -// This test requires context-aware shaping which hasn't been implemented yet. -// See crbug.com/689155 -TEST_F(HarfBuzzShaperTest, DISABLED_ShapeArabicWithContext) { +// TODO(crbug.com/689155): Still fails on Mac, AAT? +#if defined(OS_MACOSX) +#define MAYBE_ShapeArabicWithContext DISABLED_ShapeArabicWithContext +#else +#define MAYBE_ShapeArabicWithContext ShapeArabicWithContext +#endif +TEST_F(HarfBuzzShaperTest, MAYBE_ShapeArabicWithContext) { UChar arabic_string[] = {0x647, 0x64A}; HarfBuzzShaper shaper(String(arabic_string, 2)); @@ -1446,8 +1450,15 @@ referenceResult->SnappedStartPositionForOffset(12)); } -// TODO(layout-dev): This test fails on Mac due to AAT shaping. -TEST_F(HarfBuzzShaperTest, DISABLED_SafeToBreakArabicCommonLigatures) { +// TODO(crbug.com/870712): This test fails on Mac due to AAT shaping and +// font fallback differences on Android. +#if defined(OS_MACOSX) || defined(OS_ANDROID) +#define MAYBE_SafeToBreakArabicCommonLigatures \ + DISABLED_SafeToBreakArabicCommonLigatures +#else +#define MAYBE_SafeToBreakArabicCommonLigatures SafeToBreakArabicCommonLigatures +#endif +TEST_F(HarfBuzzShaperTest, MAYBE_SafeToBreakArabicCommonLigatures) { FontDescription::VariantLigatures ligatures; ligatures.common = FontDescription::kEnabledLigaturesState; @@ -1479,7 +1490,12 @@ // Test when some characters are missing in |runs_|. // RTL on Mac may not have runs for all characters. crbug.com/774034 -TEST_P(ShapeParameterTest, DISABLED_SafeToBreakMissingRun) { +#if defined(OS_MACOSX) +#define MAYBE_SafeToBreakMissingRun DISABLED_SafeToBreakMissingRun +#else +#define MAYBE_SafeToBreakMissingRun SafeToBreakMissingRun +#endif +TEST_P(ShapeParameterTest, MAYBE_SafeToBreakMissingRun) { TextDirection direction = GetParam(); scoped_refptr<ShapeResult> result = ShapeResult::Create(&font, 8, direction); result->InsertRunForTesting(2, 1, direction, {0});
diff --git a/third_party/blink/renderer/platform/graphics/canvas_2d_layer_bridge.cc b/third_party/blink/renderer/platform/graphics/canvas_2d_layer_bridge.cc index 009b486..3b08495d 100644 --- a/third_party/blink/renderer/platform/graphics/canvas_2d_layer_bridge.cc +++ b/third_party/blink/renderer/platform/graphics/canvas_2d_layer_bridge.cc
@@ -283,6 +283,9 @@ #if DCHECK_IS_ON() // If resource provider is accelerated, a layer should already exist. // unless this is a canvas in low latency mode. + // If this DCHECK fails, it probably means that + // CanvasRenderingContextHost::GetOrCreateCanvasResourceProvider() was + // called on a 2D context before this function. if (IsAccelerated()) { DCHECK(!!layer_ || (resource_host_ && resource_host_->LowLatencyEnabled()));
diff --git a/third_party/blink/renderer/platform/graphics/canvas_resource_dispatcher.cc b/third_party/blink/renderer/platform/graphics/canvas_resource_dispatcher.cc index e157415..1692442 100644 --- a/third_party/blink/renderer/platform/graphics/canvas_resource_dispatcher.cc +++ b/third_party/blink/renderer/platform/graphics/canvas_resource_dispatcher.cc
@@ -83,60 +83,61 @@ base::WeakPtr<CanvasResourceDispatcher> dispatcher, scoped_refptr<base::SingleThreadTaskRunner> task_runner, int placeholder_canvas_id, - scoped_refptr<blink::CanvasResource> image, + scoped_refptr<blink::CanvasResource> canvas_resource, viz::ResourceId resource_id) { DCHECK(IsMainThread()); OffscreenCanvasPlaceholder* placeholder_canvas = OffscreenCanvasPlaceholder::GetPlaceholderById(placeholder_canvas_id); if (placeholder_canvas) { placeholder_canvas->SetPlaceholderFrame( - std::move(image), std::move(dispatcher), std::move(task_runner), - resource_id); + std::move(canvas_resource), std::move(dispatcher), + std::move(task_runner), resource_id); } } } // namespace void CanvasResourceDispatcher::PostImageToPlaceholderIfNotBlocked( - scoped_refptr<CanvasResource> image, + scoped_refptr<CanvasResource> canvas_resource, viz::ResourceId resource_id) { if (placeholder_canvas_id_ == kInvalidPlaceholderCanvasId) { ReclaimResourceInternal(resource_id); return; } - // Determines whether the main thread may be blocked. If unblocked, post the - // image. Otherwise, save the image and do not post it. + // Determines whether the main thread may be blocked. If unblocked, post + // |canvas_resource|. Otherwise, save it but do not post it. if (num_unreclaimed_frames_posted_ < kMaxUnreclaimedPlaceholderFrames) { - this->PostImageToPlaceholder(std::move(image), resource_id); + this->PostImageToPlaceholder(std::move(canvas_resource), resource_id); num_unreclaimed_frames_posted_++; } else { DCHECK(num_unreclaimed_frames_posted_ == kMaxUnreclaimedPlaceholderFrames); if (latest_unposted_image_) { - // The previous unposted image becomes obsolete now. + // The previous unposted resource becomes obsolete now. ReclaimResourceInternal(latest_unposted_resource_id_); } - latest_unposted_image_ = std::move(image); + latest_unposted_image_ = std::move(canvas_resource); latest_unposted_resource_id_ = resource_id; } } void CanvasResourceDispatcher::PostImageToPlaceholder( - scoped_refptr<CanvasResource> image, + scoped_refptr<CanvasResource> canvas_resource, viz::ResourceId resource_id) { scoped_refptr<base::SingleThreadTaskRunner> dispatcher_task_runner = Platform::Current()->CurrentThread()->GetTaskRunner(); - // After this point, |image| can only be used on the main thread, until it - // is returned. - image->Transfer(); + // After this point, |canvas_resource| can only be used on the main thread, + // until it is returned. + canvas_resource->Transfer(); PostCrossThreadTask( *Platform::Current()->MainThread()->Scheduler()->CompositorTaskRunner(), FROM_HERE, CrossThreadBind(UpdatePlaceholderImage, this->GetWeakPtr(), WTF::Passed(std::move(dispatcher_task_runner)), - placeholder_canvas_id_, std::move(image), resource_id)); + placeholder_canvas_id_, std::move(canvas_resource), + resource_id)); } void CanvasResourceDispatcher::DispatchFrameSync( @@ -422,9 +423,8 @@ } void CanvasResourceDispatcher::SetNeedsBeginFrameInternal() { - if (sink_) { + if (sink_) sink_->SetNeedsBeginFrame(needs_begin_frame_ && !suspend_animation_); - } } void CanvasResourceDispatcher::OnBeginFrame( @@ -439,7 +439,7 @@ if (Client()) Client()->BeginFrame(); - // TODO(eseckler): Tell |m_sink| if we did not draw during the BeginFrame. + // TODO(eseckler): Tell |sink_| if we did not draw during the BeginFrame. current_begin_frame_ack_.sequence_number = viz::BeginFrameArgs::kInvalidFrameNumber; }
diff --git a/third_party/blink/renderer/platform/graphics/graphics_types.cc b/third_party/blink/renderer/platform/graphics/graphics_types.cc index 703a49c..01b3cda 100644 --- a/third_party/blink/renderer/platform/graphics/graphics_types.cc +++ b/third_party/blink/renderer/platform/graphics/graphics_types.cc
@@ -84,6 +84,27 @@ return kCompositeOperatorNames[op]; } +bool ParseImageEncodingMimeType(const String& mime_type_name, + ImageEncodingMimeType& mime_type) { + if (mime_type_name == "image/png") + mime_type = kMimeTypePng; + else if (mime_type_name == "image/jpeg") + mime_type = kMimeTypeJpeg; + else if (mime_type_name == "image/webp") + mime_type = kMimeTypeWebp; + else + return false; + return true; +} + +String ImageEncodingMimeTypeName(ImageEncodingMimeType mime_type) { + DCHECK_GE(mime_type, 0); + DCHECK_LT(mime_type, 3); + const char* const kMimeTypeNames[3] = {"image/png", "image/jpeg", + "image/webp"}; + return kMimeTypeNames[mime_type]; +} + bool ParseLineCap(const String& s, LineCap& cap) { if (s == "butt") { cap = kButtCap;
diff --git a/third_party/blink/renderer/platform/graphics/graphics_types.h b/third_party/blink/renderer/platform/graphics/graphics_types.h index 636dd547..5c71afd 100644 --- a/third_party/blink/renderer/platform/graphics/graphics_types.h +++ b/third_party/blink/renderer/platform/graphics/graphics_types.h
@@ -51,6 +51,12 @@ kFloat32ArrayStorageFormat, }; +enum ImageEncodingMimeType { + kMimeTypePng, + kMimeTypeJpeg, + kMimeTypeWebp, +}; + enum StrokeStyle { kNoStroke, kSolidStroke, @@ -214,6 +220,10 @@ CompositeOperator&, BlendMode&); +PLATFORM_EXPORT String ImageEncodingMimeTypeName(ImageEncodingMimeType); +PLATFORM_EXPORT bool ParseImageEncodingMimeType(const String&, + ImageEncodingMimeType&); + PLATFORM_EXPORT String LineCapName(LineCap); PLATFORM_EXPORT bool ParseLineCap(const String&, LineCap&);
diff --git a/third_party/blink/renderer/platform/graphics/image_data_buffer.cc b/third_party/blink/renderer/platform/graphics/image_data_buffer.cc index 252baeb..7992494 100644 --- a/third_party/blink/renderer/platform/graphics/image_data_buffer.cc +++ b/third_party/blink/renderer/platform/graphics/image_data_buffer.cc
@@ -116,19 +116,19 @@ return static_cast<const unsigned char*>(pixmap_.addr()); } -bool ImageDataBuffer::EncodeImage(const String& mime_type, +bool ImageDataBuffer::EncodeImage(const ImageEncodingMimeType mime_type, const double& quality, Vector<unsigned char>* encoded_image) const { return EncodeImageInternal(mime_type, quality, encoded_image, pixmap_); } -bool ImageDataBuffer::EncodeImageInternal(const String& mime_type, +bool ImageDataBuffer::EncodeImageInternal(const ImageEncodingMimeType mime_type, const double& quality, Vector<unsigned char>* encoded_image, const SkPixmap& pixmap) const { DCHECK(is_valid_); - if (mime_type == "image/jpeg") { + if (mime_type == kMimeTypeJpeg) { SkJpegEncoder::Options options; options.fQuality = ImageEncoder::ComputeJpegQuality(quality); options.fAlphaOption = SkJpegEncoder::AlphaOption::kBlendOnBlack; @@ -138,19 +138,19 @@ return ImageEncoder::Encode(encoded_image, pixmap, options); } - if (mime_type == "image/webp") { + if (mime_type == kMimeTypeWebp) { SkWebpEncoder::Options options = ImageEncoder::ComputeWebpOptions(quality); return ImageEncoder::Encode(encoded_image, pixmap, options); } - DCHECK_EQ(mime_type, "image/png"); + DCHECK_EQ(mime_type, kMimeTypePng); SkPngEncoder::Options options; options.fFilterFlags = SkPngEncoder::FilterFlag::kSub; options.fZLibLevel = 3; return ImageEncoder::Encode(encoded_image, pixmap, options); } -String ImageDataBuffer::ToDataURL(const String& mime_type, +String ImageDataBuffer::ToDataURL(const ImageEncodingMimeType mime_type, const double& quality) const { DCHECK(is_valid_); @@ -171,7 +171,8 @@ if (!EncodeImageInternal(mime_type, quality, &result, pixmap)) return "data:,"; - return "data:" + mime_type + ";base64," + Base64Encode(result); + return "data:" + ImageEncodingMimeTypeName(mime_type) + ";base64," + + Base64Encode(result); } } // namespace blink
diff --git a/third_party/blink/renderer/platform/graphics/image_data_buffer.h b/third_party/blink/renderer/platform/graphics/image_data_buffer.h index 3002ac98..9dc4c9a9b 100644 --- a/third_party/blink/renderer/platform/graphics/image_data_buffer.h +++ b/third_party/blink/renderer/platform/graphics/image_data_buffer.h
@@ -32,6 +32,7 @@ #include "base/memory/scoped_refptr.h" #include "third_party/blink/renderer/platform/geometry/float_rect.h" #include "third_party/blink/renderer/platform/geometry/int_size.h" +#include "third_party/blink/renderer/platform/graphics/graphics_types.h" #include "third_party/blink/renderer/platform/graphics/static_bitmap_image.h" #include "third_party/blink/renderer/platform/platform_export.h" #include "third_party/blink/renderer/platform/wtf/text/wtf_string.h" @@ -47,8 +48,9 @@ scoped_refptr<StaticBitmapImage>); static std::unique_ptr<ImageDataBuffer> Create(const SkPixmap&); - String ToDataURL(const String& mime_type, const double& quality) const; - bool EncodeImage(const String& mime_type, + String ToDataURL(const ImageEncodingMimeType mime_type, + const double& quality) const; + bool EncodeImage(const ImageEncodingMimeType mime_type, const double& quality, Vector<unsigned char>* encoded_image) const; @@ -66,7 +68,7 @@ bool IsValid() { return is_valid_; } // Only used by Create() - bool EncodeImageInternal(const String& mime_type, + bool EncodeImageInternal(const ImageEncodingMimeType mime_type, const double& quality, Vector<unsigned char>* encoded_image, const SkPixmap& pixmap) const;
diff --git a/third_party/blink/renderer/platform/image-encoders/DEPS b/third_party/blink/renderer/platform/image-encoders/DEPS index b78682ac..bbb4bc7 100644 --- a/third_party/blink/renderer/platform/image-encoders/DEPS +++ b/third_party/blink/renderer/platform/image-encoders/DEPS
@@ -6,6 +6,7 @@ "+third_party/blink/renderer/platform/image-encoders", # Dependencies. + "+third_party/blink/renderer/platform/graphics/graphics_types.h", "+third_party/blink/renderer/platform/histogram.h", "+third_party/blink/renderer/platform/network/mime/mime_type_registry.h", "+third_party/blink/renderer/platform/platform_export.h",
diff --git a/third_party/blink/renderer/platform/image-encoders/image_encoder.cc b/third_party/blink/renderer/platform/image-encoders/image_encoder.cc index b564b1cc..44e294a 100644 --- a/third_party/blink/renderer/platform/image-encoders/image_encoder.cc +++ b/third_party/blink/renderer/platform/image-encoders/image_encoder.cc
@@ -66,7 +66,7 @@ return image_encoder; } -int ImageEncoder::MaxDimension(MimeType mime_type) { +int ImageEncoder::MaxDimension(ImageEncodingMimeType mime_type) { switch (mime_type) { case kMimeTypePng: return 65535;
diff --git a/third_party/blink/renderer/platform/image-encoders/image_encoder.h b/third_party/blink/renderer/platform/image-encoders/image_encoder.h index 3822c4a8..4cb32b17 100644 --- a/third_party/blink/renderer/platform/image-encoders/image_encoder.h +++ b/third_party/blink/renderer/platform/image-encoders/image_encoder.h
@@ -5,6 +5,7 @@ #ifndef THIRD_PARTY_BLINK_RENDERER_PLATFORM_IMAGE_ENCODERS_IMAGE_ENCODER_H_ #define THIRD_PARTY_BLINK_RENDERER_PLATFORM_IMAGE_ENCODERS_IMAGE_ENCODER_H_ +#include "third_party/blink/renderer/platform/graphics/graphics_types.h" #include "third_party/blink/renderer/platform/platform_export.h" #include "third_party/blink/renderer/platform/wtf/vector.h" #include "third_party/skia/include/core/SkStream.h" @@ -47,14 +48,7 @@ const SkPixmap& src, const SkWebpEncoder::Options&); - enum MimeType { - kMimeTypePng, - kMimeTypeJpeg, - kMimeTypeWebp, - kNumberOfMimeTypeSupported - }; - - static int MaxDimension(MimeType mime_type); + static int MaxDimension(ImageEncodingMimeType mime_type); static std::unique_ptr<ImageEncoder> Create(Vector<unsigned char>* dst, const SkPixmap& src,
diff --git a/third_party/blink/renderer/platform/image-encoders/image_encoder_utils.cc b/third_party/blink/renderer/platform/image-encoders/image_encoder_utils.cc index 3578bfd..2a6639a 100644 --- a/third_party/blink/renderer/platform/image-encoders/image_encoder_utils.cc +++ b/third_party/blink/renderer/platform/image-encoders/image_encoder_utils.cc
@@ -10,7 +10,9 @@ namespace blink { -const char ImageEncoderUtils::kDefaultMimeType[] = "image/png"; +const ImageEncodingMimeType ImageEncoderUtils::kDefaultEncodingMimeType = + kMimeTypePng; +const char ImageEncoderUtils::kDefaultRequestedMimeType[] = "image/png"; // This enum is used in a UMA histogram; the values should not be changed. enum RequestedImageMimeType { @@ -25,60 +27,64 @@ kNumberOfRequestedImageMimeTypes }; -String ImageEncoderUtils::ToEncodingMimeType(const String& mime_type, - const EncodeReason encode_reason) { - String lowercase_mime_type = mime_type.DeprecatedLower(); +ImageEncodingMimeType ImageEncoderUtils::ToEncodingMimeType( + const String& mime_type_name, + const EncodeReason encode_reason) { + String lowercase_mime_type = mime_type_name.DeprecatedLower(); - if (mime_type.IsNull()) - lowercase_mime_type = kDefaultMimeType; + RequestedImageMimeType requested_mime_type; + if (mime_type_name.IsNull()) + lowercase_mime_type = kDefaultRequestedMimeType; - RequestedImageMimeType image_format; if (lowercase_mime_type == "image/png") { - image_format = kRequestedImageMimeTypePng; + requested_mime_type = kRequestedImageMimeTypePng; } else if (lowercase_mime_type == "image/jpeg") { - image_format = kRequestedImageMimeTypeJpeg; + requested_mime_type = kRequestedImageMimeTypeJpeg; } else if (lowercase_mime_type == "image/webp") { - image_format = kRequestedImageMimeTypeWebp; + requested_mime_type = kRequestedImageMimeTypeWebp; } else if (lowercase_mime_type == "image/gif") { - image_format = kRequestedImageMimeTypeGif; + requested_mime_type = kRequestedImageMimeTypeGif; } else if (lowercase_mime_type == "image/bmp" || lowercase_mime_type == "image/x-windows-bmp") { - image_format = kRequestedImageMimeTypeBmp; + requested_mime_type = kRequestedImageMimeTypeBmp; } else if (lowercase_mime_type == "image/x-icon") { - image_format = kRequestedImageMimeTypeIco; + requested_mime_type = kRequestedImageMimeTypeIco; } else if (lowercase_mime_type == "image/tiff" || lowercase_mime_type == "image/x-tiff") { - image_format = kRequestedImageMimeTypeTiff; + requested_mime_type = kRequestedImageMimeTypeTiff; } else { - image_format = kRequestedImageMimeTypeUnknown; + requested_mime_type = kRequestedImageMimeTypeUnknown; } if (encode_reason == kEncodeReasonToDataURL) { DEFINE_THREAD_SAFE_STATIC_LOCAL(EnumerationHistogram, - to_data_url_image_format_histogram, + to_data_url_requested_mime_type_histogram, ("Canvas.RequestedImageMimeTypes_toDataURL", kNumberOfRequestedImageMimeTypes)); - to_data_url_image_format_histogram.Count(image_format); + to_data_url_requested_mime_type_histogram.Count(requested_mime_type); } else if (encode_reason == kEncodeReasonToBlobCallback) { DEFINE_THREAD_SAFE_STATIC_LOCAL( - EnumerationHistogram, to_blob_callback_image_format_histogram, + EnumerationHistogram, to_blob_callback_requested_mime_type_histogram, ("Canvas.RequestedImageMimeTypes_toBlobCallback", kNumberOfRequestedImageMimeTypes)); - to_blob_callback_image_format_histogram.Count(image_format); + to_blob_callback_requested_mime_type_histogram.Count(requested_mime_type); } else if (encode_reason == kEncodeReasonConvertToBlobPromise) { DEFINE_THREAD_SAFE_STATIC_LOCAL( - EnumerationHistogram, convert_to_blob_promise_image_format_histogram, + EnumerationHistogram, + convert_to_blob_promise_requested_mime_type_histogram, ("Canvas.RequestedImageMimeTypes_convertToBlobPromise", kNumberOfRequestedImageMimeTypes)); - convert_to_blob_promise_image_format_histogram.Count(image_format); + convert_to_blob_promise_requested_mime_type_histogram.Count( + requested_mime_type); } + ImageEncodingMimeType encoding_mime_type = kDefaultEncodingMimeType; // FIXME: Make isSupportedImageMIMETypeForEncoding threadsafe (to allow this // method to be used on a worker thread). - if (!MIMETypeRegistry::IsSupportedImageMIMETypeForEncoding( + if (MIMETypeRegistry::IsSupportedImageMIMETypeForEncoding( lowercase_mime_type)) - lowercase_mime_type = kDefaultMimeType; - return lowercase_mime_type; + ParseImageEncodingMimeType(lowercase_mime_type, encoding_mime_type); + return encoding_mime_type; } } // namespace blink
diff --git a/third_party/blink/renderer/platform/image-encoders/image_encoder_utils.h b/third_party/blink/renderer/platform/image-encoders/image_encoder_utils.h index f5293beb..0d295ce 100644 --- a/third_party/blink/renderer/platform/image-encoders/image_encoder_utils.h +++ b/third_party/blink/renderer/platform/image-encoders/image_encoder_utils.h
@@ -5,6 +5,7 @@ #ifndef THIRD_PARTY_BLINK_RENDERER_PLATFORM_IMAGE_ENCODERS_IMAGE_ENCODER_UTILS_H_ #define THIRD_PARTY_BLINK_RENDERER_PLATFORM_IMAGE_ENCODERS_IMAGE_ENCODER_UTILS_H_ +#include "third_party/blink/renderer/platform/graphics/graphics_types.h" #include "third_party/blink/renderer/platform/platform_export.h" #include "third_party/blink/renderer/platform/wtf/text/wtf_string.h" @@ -18,10 +19,13 @@ kEncodeReasonConvertToBlobPromise = 2, kNumberOfEncodeReasons }; - static String ToEncodingMimeType(const String& mime_type, const EncodeReason); // Default image mime type for toDataURL and toBlob functions - static const char kDefaultMimeType[]; + static const char kDefaultRequestedMimeType[]; + static const ImageEncodingMimeType kDefaultEncodingMimeType; + + static ImageEncodingMimeType ToEncodingMimeType(const String&, + const EncodeReason); }; } // namespace blink
diff --git a/third_party/blink/renderer/platform/runtime_enabled_features.json5 b/third_party/blink/renderer/platform/runtime_enabled_features.json5 index 1c2ce4af..1f89e49 100644 --- a/third_party/blink/renderer/platform/runtime_enabled_features.json5 +++ b/third_party/blink/renderer/platform/runtime_enabled_features.json5
@@ -437,10 +437,6 @@ status: "experimental", }, { - name: "ExtendedImageBitmapOptions", - status: "experimental", - }, - { name: "ExtendedTextMetrics", status: "experimental", }, @@ -653,6 +649,10 @@ status: "experimental", }, { + name:"ManualSlotting", + status:"test", + }, + { name: "MediaCapabilities", origin_trial_feature_name: "MediaCapabilities", status: "stable", @@ -769,10 +769,6 @@ status: "stable", }, { - name: "NetInfoDownlink", - status: "stable", - }, - { name: "NetInfoDownlinkHeader", status: "stable", }, @@ -781,26 +777,14 @@ status: "stable", }, { - name: "NetInfoEffectiveType", - status: "stable", - }, - { name: "NetInfoEffectiveTypeHeader", status: "stable", }, { - name: "NetInfoRtt", - status: "stable", - }, - { name: "NetInfoRttHeader", status: "stable", }, { - name: "NetInfoSaveData", - status: "stable", - }, - { name: "NetworkService", }, // Not a web exposed feature, enabled from the command line. @@ -910,6 +894,9 @@ status: "stable", }, { + name: "PassiveDocumentWheelEventListeners", + }, + { name: "PassPaintVisualRectToCompositor", }, { @@ -955,6 +942,10 @@ status: "experimental", }, { + name: "PostMessageOptions", + status: "experimental", + }, + { name: "PreciseMemoryInfo", }, // This feature is deprecated and we are evangelizing affected sites. @@ -1342,10 +1333,6 @@ status: "experimental" }, { - name: "WindowPostMessageOptions", - status: "experimental", - }, - { name: "WorkerNosniffBlock", status: "test", },
diff --git a/third_party/blink/renderer/platform/scheduler/BUILD.gn b/third_party/blink/renderer/platform/scheduler/BUILD.gn index 170ca91..4ca34c9 100644 --- a/third_party/blink/renderer/platform/scheduler/BUILD.gn +++ b/third_party/blink/renderer/platform/scheduler/BUILD.gn
@@ -160,7 +160,8 @@ deps = [ "//base", "//base/test:test_support", - "//third_party/blink/public/mojom:mojom_platform_blink__generator", + "//mojo/public/cpp/bindings", + "//third_party/blink/public/mojom:mojom_platform_blink_headers", ] configs += [ "//third_party/blink/renderer/platform:blink_platform_config" ]
diff --git a/third_party/blink/renderer/platform/scheduler/main_thread/frame_scheduler_impl.cc b/third_party/blink/renderer/platform/scheduler/main_thread/frame_scheduler_impl.cc index 8b7f4b2..51dc1f76 100644 --- a/third_party/blink/renderer/platform/scheduler/main_thread/frame_scheduler_impl.cc +++ b/third_party/blink/renderer/platform/scheduler/main_thread/frame_scheduler_impl.cc
@@ -8,6 +8,7 @@ #include <set> #include <string> +#include "base/debug/dump_without_crashing.h" #include "base/metrics/field_trial_params.h" #include "base/metrics/histogram_macros.h" #include "base/trace_event/blame_context.h" @@ -703,6 +704,10 @@ if (parent_page_scheduler_->IsFrozen() && !parent_page_scheduler_->KeepActive()) { DCHECK(!parent_page_scheduler_->IsPageVisible()); + // TODO(crbug.com/873214): Remove this after collecting sufficient crash + // data. + if (parent_page_scheduler_->IsPageVisible()) + base::debug::DumpWithoutCrashing(); return SchedulingLifecycleState::kStopped; } if (subresource_loading_paused_ && type == ObserverType::kLoader)
diff --git a/third_party/blink/renderer/platform/scheduler/utility/webthread_impl_for_utility_thread.cc b/third_party/blink/renderer/platform/scheduler/utility/webthread_impl_for_utility_thread.cc index c37f106f..7fcabfe 100644 --- a/third_party/blink/renderer/platform/scheduler/utility/webthread_impl_for_utility_thread.cc +++ b/third_party/blink/renderer/platform/scheduler/utility/webthread_impl_for_utility_thread.cc
@@ -16,7 +16,6 @@ WebThreadImplForUtilityThread::~WebThreadImplForUtilityThread() = default; blink::ThreadScheduler* WebThreadImplForUtilityThread::Scheduler() const { - NOTIMPLEMENTED(); return nullptr; }
diff --git a/third_party/blink/renderer/platform/testing/testing_platform_support_with_custom_scheduler.cc b/third_party/blink/renderer/platform/testing/testing_platform_support_with_custom_scheduler.cc new file mode 100644 index 0000000..79c3ff0 --- /dev/null +++ b/third_party/blink/renderer/platform/testing/testing_platform_support_with_custom_scheduler.cc
@@ -0,0 +1,44 @@ +// 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 "third_party/blink/renderer/platform/testing/testing_platform_support_with_custom_scheduler.h" + +#include "third_party/blink/public/platform/web_thread.h" +#include "third_party/blink/renderer/platform/wtf/wtf.h" + +namespace blink { + +namespace { + +class ThreadWithCustomScheduler : public WebThread { + public: + explicit ThreadWithCustomScheduler(ThreadScheduler* scheduler) + : scheduler_(scheduler) {} + ~ThreadWithCustomScheduler() override {} + + bool IsCurrentThread() const override { + DCHECK(WTF::IsMainThread()); + return true; + } + ThreadScheduler* Scheduler() const override { return scheduler_; } + + private: + ThreadScheduler* scheduler_; +}; + +} // namespace + +TestingPlatformSupportWithCustomScheduler :: + TestingPlatformSupportWithCustomScheduler(ThreadScheduler* scheduler) + : thread_(std::make_unique<ThreadWithCustomScheduler>(scheduler)) {} + +TestingPlatformSupportWithCustomScheduler :: + ~TestingPlatformSupportWithCustomScheduler() {} + +WebThread* TestingPlatformSupportWithCustomScheduler::CurrentThread() { + DCHECK(WTF::IsMainThread()); + return thread_.get(); +} + +} // namespace blink
diff --git a/third_party/blink/renderer/platform/testing/testing_platform_support_with_custom_scheduler.h b/third_party/blink/renderer/platform/testing/testing_platform_support_with_custom_scheduler.h new file mode 100644 index 0000000..828a0af --- /dev/null +++ b/third_party/blink/renderer/platform/testing/testing_platform_support_with_custom_scheduler.h
@@ -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. + +#ifndef THIRD_PARTY_BLINK_RENDERER_PLATFORM_TESTING_TESTING_PLATFORM_SUPPORT_WITH_CUSTOM_SCHEDULER_H_ +#define THIRD_PARTY_BLINK_RENDERER_PLATFORM_TESTING_TESTING_PLATFORM_SUPPORT_WITH_CUSTOM_SCHEDULER_H_ + +#include <memory> +#include "base/macros.h" +#include "third_party/blink/renderer/platform/scheduler/public/thread_scheduler.h" +#include "third_party/blink/renderer/platform/testing/testing_platform_support.h" + +// Test environment where you can inject your custom implementation of +// ThreadScheduler on the main thread. Multi-thread is not supported. +// +// You would probably like to use this with ScopedTestingPlatformSupport +// class template. See testing_platform_support.h for details. + +namespace blink { + +class TestingPlatformSupportWithCustomScheduler + : public TestingPlatformSupport { + public: + // |scheduler| must be owned by the caller. + explicit TestingPlatformSupportWithCustomScheduler( + ThreadScheduler* scheduler); + ~TestingPlatformSupportWithCustomScheduler() override; + + WebThread* CurrentThread() override; + + private: + std::unique_ptr<WebThread> thread_; + + DISALLOW_COPY_AND_ASSIGN(TestingPlatformSupportWithCustomScheduler); +}; + +} // namespace blink + +#endif // THIRD_PARTY_BLINK_RENDERER_PLATFORM_TESTING_TESTING_PLATFORM_SUPPORT_WITH_CUSTOM_SCHEDULER_H_
diff --git a/third_party/closure_compiler/externs/automation.js b/third_party/closure_compiler/externs/automation.js index eee4f37..d946a1a 100644 --- a/third_party/closure_compiler/externs/automation.js +++ b/third_party/closure_compiler/externs/automation.js
@@ -532,8 +532,8 @@ /** * Computes the bounding box of a subrange of this node in global screen * coordinates. Returns the same as |location| if range information is not - * available; bounds are clipped by ancestors. The start and end indices are - * zero-based offsets into the node's "name" string attribute. + * available. The start and end indices are zero-based offsets into the node's + * "name" string attribute. * @param {number} startIndex * @param {number} endIndex * @return {!chrome.automation.Rect} @@ -1201,6 +1201,13 @@ chrome.automation.AutomationNode.prototype.checked; /** + * The inner html of this element. Only populated for math content. + * @type {(string|undefined)} + * @see https://developer.chrome.com/extensions/automation#type-innerHtml + */ +chrome.automation.AutomationNode.prototype.innerHtml; + +/** * The RGBA foreground color of this subtree, as an integer. * @type {(number|undefined)} * @see https://developer.chrome.com/extensions/automation#type-color
diff --git a/third_party/dom_distiller_js/README.chromium b/third_party/dom_distiller_js/README.chromium index 60ea9c1..d4401f7 100644 --- a/third_party/dom_distiller_js/README.chromium +++ b/third_party/dom_distiller_js/README.chromium
@@ -1,6 +1,6 @@ Name: dom-distiller-js URL: https://github.com/chromium/dom-distiller -Version: 9596033e36 +Version: ccfe233400 License: BSD Security Critical: yes
diff --git a/third_party/dom_distiller_js/update_domdistiller_js.sh b/third_party/dom_distiller_js/update_domdistiller_js.sh index 1a132c0b..0078fcf 100755 --- a/third_party/dom_distiller_js/update_domdistiller_js.sh +++ b/third_party/dom_distiller_js/update_domdistiller_js.sh
@@ -36,7 +36,7 @@ git reset --hard ${new_gitsha} git log --oneline ${curr_gitsha}..${new_gitsha} > $changes - echo -n Bug: > $bugs + echo -n 'Bug: ' > $bugs # This extracts BUG= lines from the log, extracts the numbers part, removes # whitespace and deletes empty lines. Then, split on ',', sort, uniquify and @@ -87,9 +87,10 @@ echo "Roll DOM Distiller JavaScript distribution package" echo echo "Diff since last roll:" - echo "https://github.com/chromium/dom-distiller/compare/${curr_gitsha}...${new_gitsha}" + echo "https://chromium.googlesource.com/chromium/dom-distiller/+/${curr_gitsha}..${new_gitsha}" echo echo "Picked up changes:" + echo "https://chromium.googlesource.com/chromium/dom-distiller/+log/${curr_gitsha}..${new_gitsha}" cat $changes echo cat $bugs
diff --git a/third_party/freetype/BUILD.gn b/third_party/freetype/BUILD.gn index 82f11b1..9d8fcf1 100644 --- a/third_party/freetype/BUILD.gn +++ b/third_party/freetype/BUILD.gn
@@ -63,6 +63,7 @@ "src/src/base/ftbase.c", "src/src/base/ftbbox.c", "src/src/base/ftbitmap.c", + "src/src/base/ftdebug.c", "src/src/base/ftfstype.c", "src/src/base/ftgasp.c", "src/src/base/ftglyph.c",
diff --git a/third_party/freetype/README.chromium b/third_party/freetype/README.chromium index d8f8aa3..b3aae6f1 100644 --- a/third_party/freetype/README.chromium +++ b/third_party/freetype/README.chromium
@@ -1,7 +1,7 @@ Name: FreeType URL: http://www.freetype.org/ -Version: VER-2-9-1-143 -Revision: 578bcf103a12fb742cdb314565819011d1ac12a7 +Version: VER-2-9-1-166 +Revision: 96b5e500909cfce39ff78feabefd8063a229b951 License: Custom license "inspired by the BSD, Artistic, and IJG (Independent JPEG Group) licenses" License File: src/docs/FTL.TXT
diff --git a/third_party/freetype/include/freetype-custom-config/ftoption.h b/third_party/freetype/include/freetype-custom-config/ftoption.h index 34af6ed9..78d55907 100644 --- a/third_party/freetype/include/freetype-custom-config/ftoption.h +++ b/third_party/freetype/include/freetype-custom-config/ftoption.h
@@ -50,8 +50,10 @@ * slightly to pre-define the macro FT_CONFIG_OPTIONS_H used to * locate this file during the build. For example, * + * { * #define FT_CONFIG_OPTIONS_H <myftoptions.h> * #include <freetype/config/ftheader.h> + * } * * will use `$BUILD/myftoptions.h' instead of this file for macro * definitions. @@ -75,36 +77,39 @@ /*************************************************************************/ - /*#***********************************************************************/ - /* */ - /* If you enable this configuration option, FreeType recognizes an */ - /* environment variable called `FREETYPE_PROPERTIES', which can be used */ - /* to control the various font drivers and modules. The controllable */ - /* properties are listed in the section @properties. */ - /* */ - /* You have to undefine this configuration option on platforms that lack */ - /* the concept of environment variables (and thus don't have the */ - /* `getenv' function), for example Windows CE. */ - /* */ - /* `FREETYPE_PROPERTIES' has the following syntax form (broken here into */ - /* multiple lines for better readability). */ - /* */ - /* { */ - /* <optional whitespace> */ - /* <module-name1> ':' */ - /* <property-name1> '=' <property-value1> */ - /* <whitespace> */ - /* <module-name2> ':' */ - /* <property-name2> '=' <property-value2> */ - /* ... */ - /* } */ - /* */ - /* Example: */ - /* */ - /* FREETYPE_PROPERTIES=truetype:interpreter-version=35 \ */ - /* cff:no-stem-darkening=1 \ */ - /* autofitter:warping=1 */ - /* */ + /*#************************************************************************ + * + * If you enable this configuration option, FreeType recognizes an + * environment variable called `FREETYPE_PROPERTIES', which can be used to + * control the various font drivers and modules. The controllable + * properties are listed in the section @properties. + * + * You have to undefine this configuration option on platforms that lack + * the concept of environment variables (and thus don't have the `getenv' + * function), for example Windows CE. + * + * `FREETYPE_PROPERTIES' has the following syntax form (broken here into + * multiple lines for better readability). + * + * { + * <optional whitespace> + * <module-name1> ':' + * <property-name1> '=' <property-value1> + * <whitespace> + * <module-name2> ':' + * <property-name2> '=' <property-value2> + * ... + * } + * + * Example: + * + * { + * FREETYPE_PROPERTIES=truetype:interpreter-version=35 \ + * cff:no-stem-darkening=1 \ + * autofitter:warping=1 + * } + * + */ #define FT_CONFIG_OPTION_ENVIRONMENT_PROPERTIES @@ -350,8 +355,7 @@ * * Guessing methods to access embedded resource forks * - * Enable extra Mac fonts support on non-Mac platforms (e.g. - * GNU/Linux). + * Enable extra Mac fonts support on non-Mac platforms (e.g., GNU/Linux). * * Resource forks which include fonts data are stored sometimes in * locations which users or developers don't expected. In some cases, @@ -428,22 +432,28 @@ * boolean variables (consequently, you should *never* enable this * while compiling in `release' mode): * + * { * _af_debug_disable_horz_hints * _af_debug_disable_vert_hints * _af_debug_disable_blue_hints + * } * * Additionally, the following functions provide dumps of various * internal autofit structures to stdout (using `printf'): * + * { * af_glyph_hints_dump_points * af_glyph_hints_dump_segments * af_glyph_hints_dump_edges * af_glyph_hints_get_num_segments * af_glyph_hints_get_segment_offset + * } * * As an argument, they use another global variable: * + * { * _af_debug_hints + * } * * Please have a look at the `ftgrid' demo program to see how those * variables and macros should be used. @@ -916,9 +926,11 @@ * like Fedora that did not un-patch the following change (which was * present in FreeType between versions 2.4.6 and 2.7.1, inclusive). * + * { * 2011-07-16 Steven Chu <steven.f.chu@gmail.com> * * [truetype] Fix metrics on size request for scalable fonts. + * } * * This problematic commit is now reverted (more or less). */
diff --git a/third_party/harfbuzz-ng/README.chromium b/third_party/harfbuzz-ng/README.chromium index 6d7039ad..3bee3e5 100644 --- a/third_party/harfbuzz-ng/README.chromium +++ b/third_party/harfbuzz-ng/README.chromium
@@ -14,9 +14,16 @@ This copy of harfbuzz is updated by putting the new commit hash matching one in https://chromium.googlesource.com/external/github.com/harfbuzz/harfbuzz/ to the -top level DEPS file. When upgrading, check whether files have been added or -removed in upstream and whether the BUILD.gn file needs to be updated to reflect -that. +top level DEPS file. When upgrading, check in ther HarfBuzz repository whether +files have been added or removed in upstream and whether the BUILD.gn file needs +to be updated to reflect that or whether the files can be added to the exception +lis below. + +Example: + $ cd ~/dev/harfbuzz/ + $ git diff --diff-filter=A --stat 1.8.3..1.8.7 + +Replace 1.8.3 and 1.8.7 with the respective revision hashes for your roll CL. Chromium-local cherry picks or patches can be done by pushing new branches to refs/heads/chromium/ of [1]. The set of HarfBuzz OWNERS has write rights to this @@ -46,9 +53,12 @@ hb-directwrite.cc hb-directwrite.h hb-fallback-shape.cc + hb-iter-private.hh + hb-machinery-private.hh hb-map-private.hh hb-map.cc hb-map.h + hb-null.hh hb-ot-color-sbix-table.hh hb-ot-color-svg-table.hh hb-ot-color.cc @@ -58,4 +68,5 @@ hb-subset.cc hb-uniscribe.cc hb-uniscribe.h + hb-vector-private.hh test-unicode-ranges.cc
diff --git a/third_party/libvpx/BUILD.gn b/third_party/libvpx/BUILD.gn index 4e817b6..8fb69041 100644 --- a/third_party/libvpx/BUILD.gn +++ b/third_party/libvpx/BUILD.gn
@@ -274,7 +274,7 @@ "-i", "{{source}}", "-o", - rebase_path(gen_file), + rebase_path(gen_file, root_build_dir), ] }
diff --git a/third_party/libvpx/README.chromium b/third_party/libvpx/README.chromium index fee52d7..55aa33fa 100644 --- a/third_party/libvpx/README.chromium +++ b/third_party/libvpx/README.chromium
@@ -5,9 +5,9 @@ License File: source/libvpx/LICENSE Security Critical: yes -Date: Friday August 03 2018 +Date: Saturday August 11 2018 Branch: master -Commit: 6fd9d0244c7d8941ce0004bcd2efce5d6676bef5 +Commit: b8642738c9851232c9bb1e1a22474953d3d367cf Description: Contains the sources used to compile libvpx binaries used by Google Chrome and
diff --git a/third_party/libvpx/source/config/vpx_version.h b/third_party/libvpx/source/config/vpx_version.h index aaa96d5..fa1a818 100644 --- a/third_party/libvpx/source/config/vpx_version.h +++ b/third_party/libvpx/source/config/vpx_version.h
@@ -2,7 +2,7 @@ #define VERSION_MAJOR 1 #define VERSION_MINOR 7 #define VERSION_PATCH 0 -#define VERSION_EXTRA "778-g6fd9d0244" +#define VERSION_EXTRA "815-gb8642738c" #define VERSION_PACKED ((VERSION_MAJOR<<16)|(VERSION_MINOR<<8)|(VERSION_PATCH)) -#define VERSION_STRING_NOSP "v1.7.0-778-g6fd9d0244" -#define VERSION_STRING " v1.7.0-778-g6fd9d0244" +#define VERSION_STRING_NOSP "v1.7.0-815-gb8642738c" +#define VERSION_STRING " v1.7.0-815-gb8642738c"
diff --git a/third_party/mesa/BUILD.gn b/third_party/mesa/BUILD.gn deleted file mode 100644 index 5a5b374c..0000000 --- a/third_party/mesa/BUILD.gn +++ /dev/null
@@ -1,768 +0,0 @@ -# Copyright 2014 The Chromium Authors. All rights reserved. -# Use of this source code is governed by a BSD-style license that can be -# found in the LICENSE file. - -import("//build/config/ui.gni") -import("//build/config/compiler/compiler.gni") -import("//build/config/sanitizers/sanitizers.gni") - -config("mesa_headers_config") { - include_dirs = [ "src/include" ] - if (!use_x11) { - defines = [ "MESA_EGL_NO_X11_HEADERS" ] - } -} - -assert(!is_ios, "mesa is not used on iOS, don't pull it in accidentally") - -# This directory contains checked-in files generated from the Mesa build. -generated_src_dir = "src/chromium_gensrc" - -source_set("mesa_headers") { - public_configs = [ ":mesa_headers_config" ] -} - -# This config must generally be prepended to the configs list so that the Mesa -# dirs appear before the system ones on Windows. This is necessary so that -# #include "GL/gl.h" means to include Mesa's, not the system's. -config("mesa_internal_config") { - configs = [ "//build/config/sanitizers:cfi_icall_generalize_pointers" ] - cflags = [] - defines = [ - "MAPI_ABI_HEADER=\"glapi_mapi_tmp_shared.h\"", - "PACKAGE_NAME=\"Mesa\"", - "PACKAGE_TARNAME=\"mesa\"", - "PACKAGE_VERSION=\"9.0.3\"", - "PACKAGE_STRING=\"Mesa 9.0.3\"", - "PACKAGE_BUGREPORT=\"https://bugs.freedesktop.org/enter_bug.cgi?product=Mesa\"", - "PACKAGE_URL=\"\"", - "PACKAGE=\"mesa\"", - "VERSION=\"9.0.3\"", - "STDC_HEADERS=1", - "HAVE_SYS_TYPES_H=1", - "HAVE_SYS_STAT_H=1", - "HAVE_STDLIB_H=1", - "HAVE_STRING_H=1", - "HAVE_MEMORY_H=1", - "HAVE_STRINGS_H=1", - "HAVE_INTTYPES_H=1", - "HAVE_STDINT_H=1", - "HAVE_DLFCN_H=1", - "LT_OBJDIR=\".libs/\"", - "YYTEXT_POINTER=1", - "HAVE_LIBEXPAT=1", - "HAVE_LIBXCB_DRI2=1", - "FEATURE_GL=1", - "MAPI_MODE_GLAPI", - - #"USE_X86_64_ASM", - "IN_DRI_DRIVER", - "USE_XCB", - "GLX_INDIRECT_RENDERING", - "GLX_DIRECT_RENDERING", - "IN_DRI_DRIVER", - "HAVE_ALIAS", - "HAVE_MINCORE", - "HAVE_LIBUDEV", - "_GLAPI_NO_EXPORTS", - ] - include_dirs = [ - "src/src/gallium/auxiliary", - "src/src/gallium/include", - "src/src/glsl", - "src/src/glsl/glcpp", - "src/src/mapi", - "src/src/mapi/glapi", - "src/src/mesa", - "src/src/mesa/main", - "src/include", - "$generated_src_dir/mesa/", - "$generated_src_dir/mesa/main", - "$generated_src_dir/mesa/program", - "$generated_src_dir/mesa/glapi", - ] - - if (is_android) { - defines += [ "_GNU_SOURCE" ] - } - - if (is_linux) { - defines += [ "_GNU_SOURCE" ] - } - - if (is_win) { - defines += [ - # Generated files use const only if __cplusplus or __STDC__ is defined. - # On Windows, neither is defined, so define YY_USE_CONST to explicitly - # enable const. - "YY_USE_CONST", - ] - } - - if (is_posix || is_fuchsia) { - defines += [ - "HAVE_DLOPEN", - "HAVE_PTHREAD=1", - "HAVE_UNISTD_H=1", - ] - - if (!is_android) { - defines += [ "HAVE_POSIX_MEMALIGN" ] - } - - if (!is_android && !is_mac) { - cflags += [ "-fPIC" ] - } - } - - if (is_msan) { - # Disable code in mesa that loads the libtxc_dxtn.so library if msan is - # enabled, as the library will be loaded from a system directory, which - # may cause spurious msan reports because msan expects most libraries in - # the process to be compiled with msan. - defines += [ "USE_EXTERNAL_DXTN_LIB=0" ] - } -} - -# mesa_internal_config is prepended to the config lists. Flags that -# disable warnings need to be appended instead so that they show up -# after flags like -Wall. (gn orders flags on a target before flags from -# configs.) -config("mesa_internal_warnings") { - cflags = [] - if (is_clang) { - cflags += [ - "-Wno-tautological-constant-out-of-range-compare", - "-Wno-mismatched-tags", # Fixed upstream. - - # mesa's STATIC_ASSERT() macro expands to an ununused typedef. - "-Wno-unused-local-typedef", - ] - } - if (is_win) { - # TODO(scottmg): http://crbug.com/143877 These should be removed if - # Mesa is ever rolled and the warnings are fixed. - cflags += [ - "/wd4005", # Macro defined twice. - "/wd4018", # Signed/unsigned mismatch in comparison. - "/wd4065", # Switch statement contains 'default' but no 'case' labels. - "/wd4090", # 'Operation' : different 'modifier' qualifiers - "/wd4099", # Type name struct-vs-class doesn't match. - "/wd4273", # Inconsistent DLL linkage. - "/wd4291", # No matching operator delete found for placement new. - "/wd4305", # Truncation from int to float. - "/wd4334", # Result of 32-bit shift implicitly converted to 64 bits. - "/wd4345", # POD-type default initializers. - "/wd4311", # Pointer truncation TODO(brucedawson): http://crbug.com/554200 - ] - if (is_official_build && full_wpo_on_official) { - # TODO(sebmarchand): http://crbug.com/604838 This should be removed if - # Mesa is ever rolled and the warning is fixed. - cflags += [ "/wd4723" ] # potential divide by 0. - } - } -} - -config("mesa_libglslcommon_warnings") { - if (is_clang) { - cflags = [ - # https://bugs.freedesktop.org/show_bug.cgi?id=91645: - "-Wno-overloaded-virtual", - ] - } -} - -static_library("mesa_libglslcommon") { - sources = [ - "$generated_src_dir/mesa/glcpp-lex.c", - "$generated_src_dir/mesa/glcpp-parse.c", - "$generated_src_dir/mesa/glcpp-parse.h", - "$generated_src_dir/mesa/glsl_lexer.cc", - "$generated_src_dir/mesa/glsl_parser.cc", - "$generated_src_dir/mesa/main/dispatch.h", - "src/src/glsl/ast_expr.cpp", - "src/src/glsl/ast_function.cpp", - "src/src/glsl/ast_to_hir.cpp", - "src/src/glsl/ast_type.cpp", - "src/src/glsl/builtin_variables.cpp", - "src/src/glsl/glcpp/glcpp.h", - "src/src/glsl/glcpp/pp.c", - "src/src/glsl/glsl_parser_extras.cpp", - "src/src/glsl/glsl_parser_extras.h", - "src/src/glsl/glsl_symbol_table.cpp", - "src/src/glsl/glsl_symbol_table.h", - "src/src/glsl/glsl_types.cpp", - "src/src/glsl/glsl_types.h", - "src/src/glsl/hir_field_selection.cpp", - "src/src/glsl/ir.cpp", - "src/src/glsl/ir.h", - "src/src/glsl/ir_basic_block.cpp", - "src/src/glsl/ir_basic_block.h", - "src/src/glsl/ir_builder.cpp", - "src/src/glsl/ir_builder.h", - "src/src/glsl/ir_clone.cpp", - "src/src/glsl/ir_constant_expression.cpp", - "src/src/glsl/ir_expression_flattening.cpp", - "src/src/glsl/ir_expression_flattening.h", - "src/src/glsl/ir_function.cpp", - "src/src/glsl/ir_function_can_inline.cpp", - "src/src/glsl/ir_function_detect_recursion.cpp", - "src/src/glsl/ir_hierarchical_visitor.cpp", - "src/src/glsl/ir_hierarchical_visitor.h", - "src/src/glsl/ir_hv_accept.cpp", - "src/src/glsl/ir_import_prototypes.cpp", - "src/src/glsl/ir_print_visitor.cpp", - "src/src/glsl/ir_print_visitor.h", - "src/src/glsl/ir_reader.cpp", - "src/src/glsl/ir_reader.h", - "src/src/glsl/ir_rvalue_visitor.cpp", - "src/src/glsl/ir_rvalue_visitor.h", - "src/src/glsl/ir_set_program_inouts.cpp", - "src/src/glsl/ir_validate.cpp", - "src/src/glsl/ir_variable_refcount.cpp", - "src/src/glsl/ir_variable_refcount.h", - "src/src/glsl/link_functions.cpp", - "src/src/glsl/link_uniform_initializers.cpp", - "src/src/glsl/link_uniforms.cpp", - "src/src/glsl/linker.cpp", - "src/src/glsl/linker.h", - "src/src/glsl/loop_analysis.cpp", - "src/src/glsl/loop_analysis.h", - "src/src/glsl/loop_controls.cpp", - "src/src/glsl/loop_unroll.cpp", - "src/src/glsl/lower_clip_distance.cpp", - "src/src/glsl/lower_discard.cpp", - "src/src/glsl/lower_discard_flow.cpp", - "src/src/glsl/lower_if_to_cond_assign.cpp", - "src/src/glsl/lower_instructions.cpp", - "src/src/glsl/lower_jumps.cpp", - "src/src/glsl/lower_mat_op_to_vec.cpp", - "src/src/glsl/lower_noise.cpp", - "src/src/glsl/lower_output_reads.cpp", - "src/src/glsl/lower_texture_projection.cpp", - "src/src/glsl/lower_ubo_reference.cpp", - "src/src/glsl/lower_variable_index_to_cond_assign.cpp", - "src/src/glsl/lower_vec_index_to_cond_assign.cpp", - "src/src/glsl/lower_vec_index_to_swizzle.cpp", - "src/src/glsl/lower_vector.cpp", - "src/src/glsl/opt_algebraic.cpp", - "src/src/glsl/opt_array_splitting.cpp", - "src/src/glsl/opt_constant_folding.cpp", - "src/src/glsl/opt_constant_propagation.cpp", - "src/src/glsl/opt_constant_variable.cpp", - "src/src/glsl/opt_copy_propagation.cpp", - "src/src/glsl/opt_copy_propagation_elements.cpp", - "src/src/glsl/opt_dead_code.cpp", - "src/src/glsl/opt_dead_code_local.cpp", - "src/src/glsl/opt_dead_functions.cpp", - "src/src/glsl/opt_function_inlining.cpp", - "src/src/glsl/opt_if_simplification.cpp", - "src/src/glsl/opt_noop_swizzle.cpp", - "src/src/glsl/opt_redundant_jumps.cpp", - "src/src/glsl/opt_structure_splitting.cpp", - "src/src/glsl/opt_swizzle_swizzle.cpp", - "src/src/glsl/opt_tree_grafting.cpp", - "src/src/glsl/program.h", - "src/src/glsl/ralloc.c", - "src/src/glsl/ralloc.h", - "src/src/glsl/s_expression.cpp", - "src/src/glsl/s_expression.h", - - # Skipped in the GN build. This file duplicates symbols from errors.c and - # happens to link in GYP due to static library link ordering. - #"src/src/glsl/standalone_scaffolding.cpp", - #"src/src/glsl/standalone_scaffolding.h", - "src/src/glsl/strtod.c", - "src/src/glsl/strtod.h", - ] - - configs -= [ "//build/config/compiler:chromium_code" ] - configs += [ "//build/config/compiler:no_chromium_code" ] - previous_configs = configs - configs = [] - configs = [ ":mesa_internal_config" ] + previous_configs + [ - ":mesa_internal_warnings", - ":mesa_libglslcommon_warnings", - ] - - if (is_clang) { - # Mesa triggers some of these Clang warnings. - configs -= [ "//build/config/clang:extra_warnings" ] - } - - # UBsan's vptr is not compatible with -fno-rtti, - # which is used by gallium/auxiliary/Makefile. - configs -= [ "//build/config/sanitizers:default_sanitizer_flags" ] - configs += - [ "//build/config/sanitizers:default_sanitizer_flags_but_ubsan_vptr" ] - - deps = [ - ":mesa_headers", - ] -} - -static_library("mesa") { - sources = [ - "$generated_src_dir/mesa/builtin_function.cpp", - "$generated_src_dir/mesa/enums.c", - "$generated_src_dir/mesa/glapi_mapi_tmp_shared.h", - "$generated_src_dir/mesa/lex.yy.c", - "$generated_src_dir/mesa/program/program_parse.tab.c", - "$generated_src_dir/mesa/program/program_parse.tab.h", - "src/src/mapi/mapi/entry.c", - "src/src/mapi/mapi/entry.h", - "src/src/mapi/mapi/mapi_glapi.c", - "src/src/mapi/mapi/stub.c", - "src/src/mapi/mapi/stub.h", - "src/src/mapi/mapi/table.c", - "src/src/mapi/mapi/table.h", - "src/src/mapi/mapi/u_current.c", - "src/src/mapi/mapi/u_current.h", - "src/src/mapi/mapi/u_execmem.c", - "src/src/mapi/mapi/u_execmem.h", - "src/src/mesa/main/accum.c", - "src/src/mesa/main/accum.h", - "src/src/mesa/main/api_arrayelt.c", - "src/src/mesa/main/api_arrayelt.h", - "src/src/mesa/main/api_exec.c", - "src/src/mesa/main/api_exec.h", - "src/src/mesa/main/api_loopback.c", - "src/src/mesa/main/api_loopback.h", - "src/src/mesa/main/api_validate.c", - "src/src/mesa/main/api_validate.h", - "src/src/mesa/main/arbprogram.c", - "src/src/mesa/main/arbprogram.h", - "src/src/mesa/main/arrayobj.c", - "src/src/mesa/main/arrayobj.h", - "src/src/mesa/main/atifragshader.c", - "src/src/mesa/main/atifragshader.h", - "src/src/mesa/main/attrib.c", - "src/src/mesa/main/attrib.h", - "src/src/mesa/main/blend.c", - "src/src/mesa/main/blend.h", - "src/src/mesa/main/bufferobj.c", - "src/src/mesa/main/bufferobj.h", - "src/src/mesa/main/buffers.c", - "src/src/mesa/main/buffers.h", - "src/src/mesa/main/clear.c", - "src/src/mesa/main/clear.h", - "src/src/mesa/main/clip.c", - "src/src/mesa/main/clip.h", - "src/src/mesa/main/colortab.c", - "src/src/mesa/main/colortab.h", - "src/src/mesa/main/condrender.c", - "src/src/mesa/main/condrender.h", - "src/src/mesa/main/context.c", - "src/src/mesa/main/context.h", - "src/src/mesa/main/convolve.c", - "src/src/mesa/main/convolve.h", - "src/src/mesa/main/cpuinfo.c", - "src/src/mesa/main/cpuinfo.h", - "src/src/mesa/main/debug.c", - "src/src/mesa/main/debug.h", - "src/src/mesa/main/depth.c", - "src/src/mesa/main/depth.h", - "src/src/mesa/main/dlist.c", - "src/src/mesa/main/dlist.h", - "src/src/mesa/main/drawpix.c", - "src/src/mesa/main/drawpix.h", - "src/src/mesa/main/drawtex.c", - "src/src/mesa/main/drawtex.h", - "src/src/mesa/main/enable.c", - "src/src/mesa/main/enable.h", - "src/src/mesa/main/enums.h", - "src/src/mesa/main/errors.c", - "src/src/mesa/main/errors.h", - "src/src/mesa/main/eval.c", - "src/src/mesa/main/eval.h", - "src/src/mesa/main/execmem.c", - "src/src/mesa/main/extensions.c", - "src/src/mesa/main/extensions.h", - "src/src/mesa/main/fbobject.c", - "src/src/mesa/main/fbobject.h", - "src/src/mesa/main/feedback.c", - "src/src/mesa/main/feedback.h", - "src/src/mesa/main/ff_fragment_shader.cpp", - "src/src/mesa/main/ffvertex_prog.c", - "src/src/mesa/main/ffvertex_prog.h", - "src/src/mesa/main/fog.c", - "src/src/mesa/main/fog.h", - "src/src/mesa/main/format_pack.c", - "src/src/mesa/main/format_pack.h", - "src/src/mesa/main/format_unpack.c", - "src/src/mesa/main/format_unpack.h", - "src/src/mesa/main/formats.c", - "src/src/mesa/main/formats.h", - "src/src/mesa/main/framebuffer.c", - "src/src/mesa/main/framebuffer.h", - "src/src/mesa/main/get.c", - "src/src/mesa/main/get.h", - "src/src/mesa/main/getstring.c", - "src/src/mesa/main/glformats.c", - "src/src/mesa/main/glformats.h", - "src/src/mesa/main/hash.c", - "src/src/mesa/main/hash.h", - "src/src/mesa/main/hint.c", - "src/src/mesa/main/hint.h", - "src/src/mesa/main/histogram.c", - "src/src/mesa/main/histogram.h", - "src/src/mesa/main/image.c", - "src/src/mesa/main/image.h", - "src/src/mesa/main/imports.c", - "src/src/mesa/main/imports.h", - "src/src/mesa/main/light.c", - "src/src/mesa/main/light.h", - "src/src/mesa/main/lines.c", - "src/src/mesa/main/lines.h", - "src/src/mesa/main/matrix.c", - "src/src/mesa/main/matrix.h", - "src/src/mesa/main/mipmap.c", - "src/src/mesa/main/mipmap.h", - "src/src/mesa/main/mm.c", - "src/src/mesa/main/mm.h", - "src/src/mesa/main/multisample.c", - "src/src/mesa/main/multisample.h", - "src/src/mesa/main/nvprogram.c", - "src/src/mesa/main/nvprogram.h", - "src/src/mesa/main/pack.c", - "src/src/mesa/main/pack.h", - "src/src/mesa/main/pbo.c", - "src/src/mesa/main/pbo.h", - "src/src/mesa/main/pixel.c", - "src/src/mesa/main/pixel.h", - "src/src/mesa/main/pixelstore.c", - "src/src/mesa/main/pixelstore.h", - "src/src/mesa/main/pixeltransfer.c", - "src/src/mesa/main/pixeltransfer.h", - "src/src/mesa/main/points.c", - "src/src/mesa/main/points.h", - "src/src/mesa/main/polygon.c", - "src/src/mesa/main/polygon.h", - "src/src/mesa/main/queryobj.c", - "src/src/mesa/main/queryobj.h", - "src/src/mesa/main/rastpos.c", - "src/src/mesa/main/rastpos.h", - "src/src/mesa/main/readpix.c", - "src/src/mesa/main/readpix.h", - "src/src/mesa/main/remap.c", - "src/src/mesa/main/remap.h", - "src/src/mesa/main/renderbuffer.c", - "src/src/mesa/main/renderbuffer.h", - "src/src/mesa/main/samplerobj.c", - "src/src/mesa/main/samplerobj.h", - "src/src/mesa/main/scissor.c", - "src/src/mesa/main/scissor.h", - "src/src/mesa/main/shader_query.cpp", - "src/src/mesa/main/shaderapi.c", - "src/src/mesa/main/shaderapi.h", - "src/src/mesa/main/shaderobj.c", - "src/src/mesa/main/shaderobj.h", - "src/src/mesa/main/shared.c", - "src/src/mesa/main/shared.h", - "src/src/mesa/main/state.c", - "src/src/mesa/main/state.h", - "src/src/mesa/main/stencil.c", - "src/src/mesa/main/stencil.h", - "src/src/mesa/main/syncobj.c", - "src/src/mesa/main/syncobj.h", - "src/src/mesa/main/texcompress.c", - "src/src/mesa/main/texcompress.h", - "src/src/mesa/main/texcompress_cpal.c", - "src/src/mesa/main/texcompress_cpal.h", - "src/src/mesa/main/texcompress_etc.c", - "src/src/mesa/main/texcompress_etc.h", - "src/src/mesa/main/texcompress_fxt1.c", - "src/src/mesa/main/texcompress_fxt1.h", - "src/src/mesa/main/texcompress_rgtc.c", - "src/src/mesa/main/texcompress_rgtc.h", - "src/src/mesa/main/texcompress_s3tc.c", - "src/src/mesa/main/texcompress_s3tc.h", - "src/src/mesa/main/texenv.c", - "src/src/mesa/main/texenv.h", - "src/src/mesa/main/texformat.c", - "src/src/mesa/main/texformat.h", - "src/src/mesa/main/texgen.c", - "src/src/mesa/main/texgen.h", - "src/src/mesa/main/texgetimage.c", - "src/src/mesa/main/texgetimage.h", - "src/src/mesa/main/teximage.c", - "src/src/mesa/main/teximage.h", - "src/src/mesa/main/texobj.c", - "src/src/mesa/main/texobj.h", - "src/src/mesa/main/texparam.c", - "src/src/mesa/main/texparam.h", - "src/src/mesa/main/texstate.c", - "src/src/mesa/main/texstate.h", - "src/src/mesa/main/texstorage.c", - "src/src/mesa/main/texstorage.h", - "src/src/mesa/main/texstore.c", - "src/src/mesa/main/texstore.h", - "src/src/mesa/main/texturebarrier.c", - "src/src/mesa/main/texturebarrier.h", - "src/src/mesa/main/transformfeedback.c", - "src/src/mesa/main/transformfeedback.h", - "src/src/mesa/main/uniform_query.cpp", - "src/src/mesa/main/uniforms.c", - "src/src/mesa/main/uniforms.h", - "src/src/mesa/main/varray.c", - "src/src/mesa/main/varray.h", - "src/src/mesa/main/version.c", - "src/src/mesa/main/version.h", - "src/src/mesa/main/viewport.c", - "src/src/mesa/main/viewport.h", - "src/src/mesa/main/vtxfmt.c", - "src/src/mesa/main/vtxfmt.h", - "src/src/mesa/math/m_debug_clip.c", - "src/src/mesa/math/m_debug_norm.c", - "src/src/mesa/math/m_debug_xform.c", - "src/src/mesa/math/m_eval.c", - "src/src/mesa/math/m_eval.h", - "src/src/mesa/math/m_matrix.c", - "src/src/mesa/math/m_matrix.h", - "src/src/mesa/math/m_translate.c", - "src/src/mesa/math/m_translate.h", - "src/src/mesa/math/m_vector.c", - "src/src/mesa/math/m_vector.h", - "src/src/mesa/math/m_xform.c", - "src/src/mesa/math/m_xform.h", - "src/src/mesa/program/arbprogparse.c", - "src/src/mesa/program/arbprogparse.h", - "src/src/mesa/program/hash_table.c", - "src/src/mesa/program/hash_table.h", - "src/src/mesa/program/ir_to_mesa.cpp", - "src/src/mesa/program/ir_to_mesa.h", - "src/src/mesa/program/nvfragparse.c", - "src/src/mesa/program/nvfragparse.h", - "src/src/mesa/program/nvvertparse.c", - "src/src/mesa/program/nvvertparse.h", - "src/src/mesa/program/prog_cache.c", - "src/src/mesa/program/prog_cache.h", - "src/src/mesa/program/prog_execute.c", - "src/src/mesa/program/prog_execute.h", - "src/src/mesa/program/prog_instruction.c", - "src/src/mesa/program/prog_instruction.h", - "src/src/mesa/program/prog_noise.c", - "src/src/mesa/program/prog_noise.h", - "src/src/mesa/program/prog_opt_constant_fold.c", - "src/src/mesa/program/prog_optimize.c", - "src/src/mesa/program/prog_optimize.h", - "src/src/mesa/program/prog_parameter.c", - "src/src/mesa/program/prog_parameter.h", - "src/src/mesa/program/prog_parameter_layout.c", - "src/src/mesa/program/prog_parameter_layout.h", - "src/src/mesa/program/prog_print.c", - "src/src/mesa/program/prog_print.h", - "src/src/mesa/program/prog_statevars.c", - "src/src/mesa/program/prog_statevars.h", - "src/src/mesa/program/program.c", - "src/src/mesa/program/program.h", - "src/src/mesa/program/program_parse_extra.c", - "src/src/mesa/program/programopt.c", - "src/src/mesa/program/programopt.h", - "src/src/mesa/program/register_allocate.c", - "src/src/mesa/program/register_allocate.h", - "src/src/mesa/program/sampler.cpp", - "src/src/mesa/program/sampler.h", - "src/src/mesa/program/string_to_uint_map.cpp", - "src/src/mesa/program/symbol_table.c", - "src/src/mesa/program/symbol_table.h", - "src/src/mesa/swrast/s_aaline.c", - "src/src/mesa/swrast/s_aaline.h", - "src/src/mesa/swrast/s_aatriangle.c", - "src/src/mesa/swrast/s_aatriangle.h", - "src/src/mesa/swrast/s_alpha.c", - "src/src/mesa/swrast/s_alpha.h", - "src/src/mesa/swrast/s_atifragshader.c", - "src/src/mesa/swrast/s_atifragshader.h", - "src/src/mesa/swrast/s_bitmap.c", - "src/src/mesa/swrast/s_blend.c", - "src/src/mesa/swrast/s_blend.h", - "src/src/mesa/swrast/s_blit.c", - "src/src/mesa/swrast/s_clear.c", - "src/src/mesa/swrast/s_context.c", - "src/src/mesa/swrast/s_context.h", - "src/src/mesa/swrast/s_copypix.c", - "src/src/mesa/swrast/s_depth.c", - "src/src/mesa/swrast/s_depth.h", - "src/src/mesa/swrast/s_drawpix.c", - "src/src/mesa/swrast/s_feedback.c", - "src/src/mesa/swrast/s_feedback.h", - "src/src/mesa/swrast/s_fog.c", - "src/src/mesa/swrast/s_fog.h", - "src/src/mesa/swrast/s_fragprog.c", - "src/src/mesa/swrast/s_fragprog.h", - "src/src/mesa/swrast/s_lines.c", - "src/src/mesa/swrast/s_lines.h", - "src/src/mesa/swrast/s_logic.c", - "src/src/mesa/swrast/s_logic.h", - "src/src/mesa/swrast/s_masking.c", - "src/src/mesa/swrast/s_masking.h", - "src/src/mesa/swrast/s_points.c", - "src/src/mesa/swrast/s_points.h", - "src/src/mesa/swrast/s_renderbuffer.c", - "src/src/mesa/swrast/s_renderbuffer.h", - "src/src/mesa/swrast/s_span.c", - "src/src/mesa/swrast/s_span.h", - "src/src/mesa/swrast/s_stencil.c", - "src/src/mesa/swrast/s_stencil.h", - "src/src/mesa/swrast/s_texcombine.c", - "src/src/mesa/swrast/s_texcombine.h", - "src/src/mesa/swrast/s_texfetch.c", - "src/src/mesa/swrast/s_texfetch.h", - "src/src/mesa/swrast/s_texfilter.c", - "src/src/mesa/swrast/s_texfilter.h", - "src/src/mesa/swrast/s_texrender.c", - "src/src/mesa/swrast/s_texture.c", - "src/src/mesa/swrast/s_triangle.c", - "src/src/mesa/swrast/s_triangle.h", - "src/src/mesa/swrast/s_zoom.c", - "src/src/mesa/swrast/s_zoom.h", - "src/src/mesa/swrast_setup/ss_context.c", - "src/src/mesa/swrast_setup/ss_context.h", - "src/src/mesa/swrast_setup/ss_triangle.c", - "src/src/mesa/swrast_setup/ss_triangle.h", - "src/src/mesa/tnl/t_context.c", - "src/src/mesa/tnl/t_context.h", - "src/src/mesa/tnl/t_draw.c", - "src/src/mesa/tnl/t_pipeline.c", - "src/src/mesa/tnl/t_pipeline.h", - "src/src/mesa/tnl/t_rasterpos.c", - "src/src/mesa/tnl/t_vb_fog.c", - "src/src/mesa/tnl/t_vb_light.c", - "src/src/mesa/tnl/t_vb_normals.c", - "src/src/mesa/tnl/t_vb_points.c", - "src/src/mesa/tnl/t_vb_program.c", - "src/src/mesa/tnl/t_vb_render.c", - "src/src/mesa/tnl/t_vb_texgen.c", - "src/src/mesa/tnl/t_vb_texmat.c", - "src/src/mesa/tnl/t_vb_vertex.c", - "src/src/mesa/tnl/t_vertex.c", - "src/src/mesa/tnl/t_vertex.h", - "src/src/mesa/tnl/t_vertex_generic.c", - "src/src/mesa/tnl/t_vertex_sse.c", - "src/src/mesa/tnl/t_vp_build.c", - "src/src/mesa/tnl/t_vp_build.h", - "src/src/mesa/vbo/vbo_context.c", - "src/src/mesa/vbo/vbo_context.h", - "src/src/mesa/vbo/vbo_exec.c", - "src/src/mesa/vbo/vbo_exec.h", - "src/src/mesa/vbo/vbo_exec_api.c", - "src/src/mesa/vbo/vbo_exec_array.c", - "src/src/mesa/vbo/vbo_exec_draw.c", - "src/src/mesa/vbo/vbo_exec_eval.c", - "src/src/mesa/vbo/vbo_noop.c", - "src/src/mesa/vbo/vbo_noop.h", - "src/src/mesa/vbo/vbo_primitive_restart.c", - "src/src/mesa/vbo/vbo_rebase.c", - "src/src/mesa/vbo/vbo_save.c", - "src/src/mesa/vbo/vbo_save.h", - "src/src/mesa/vbo/vbo_save_api.c", - "src/src/mesa/vbo/vbo_save_draw.c", - "src/src/mesa/vbo/vbo_save_loopback.c", - "src/src/mesa/vbo/vbo_split.c", - "src/src/mesa/vbo/vbo_split.h", - "src/src/mesa/vbo/vbo_split_copy.c", - "src/src/mesa/vbo/vbo_split_inplace.c", - "src/src/mesa/x86-64/x86-64.c", - "src/src/mesa/x86-64/x86-64.h", - ] - - configs -= [ "//build/config/compiler:chromium_code" ] - configs += [ "//build/config/compiler:no_chromium_code" ] - previous_configs = configs - configs = [] - configs = [ ":mesa_internal_config" ] + previous_configs + - [ ":mesa_internal_warnings" ] - - if (is_clang) { - # Mesa triggers some of these Clang warnings. - configs -= [ "//build/config/clang:extra_warnings" ] - } - - # UBsan's vptr is not compatible with -fno-rtti, - # which is used by gallium/auxiliary/Makefile. - configs -= [ "//build/config/sanitizers:default_sanitizer_flags" ] - configs += - [ "//build/config/sanitizers:default_sanitizer_flags_but_ubsan_vptr" ] - - cflags = [] - - if (is_android && !is_clang) { - # Disable sincos() optimization to avoid a linker error - # since Android's math library doesn't have sincos(). - # Either -fno-builtin-sin or -fno-builtin-cos works. - cflags += [ "-fno-builtin-sin" ] - } - - if (is_win) { - defines = [ - # Because we're building as a static library - "_GLAPI_NO_EXPORTS", - ] - } - - deps = [ - ":mesa_headers", - ] -} - -# Building this target will hide the native OpenGL shared library and -# replace it with a slow software renderer. -# -# Note: on x64 Windows this target gives warnings to the effect of: -# osmesa.osmesa.obj : warning LNK4197: export 'OSMesaGetIntegerv' specified -# multiple times; using first specification -# This also happens with the GYP build. -loadable_module("osmesa") { - sources = [ - "src/src/mesa/drivers/common/driverfuncs.c", - "src/src/mesa/drivers/common/driverfuncs.h", - "src/src/mesa/drivers/common/meta.c", - "src/src/mesa/drivers/common/meta.h", - "src/src/mesa/drivers/osmesa/osmesa.c", - ] - - configs -= [ "//build/config/compiler:chromium_code" ] - configs += [ - ":mesa_headers_config", - "//build/config/compiler:no_chromium_code", - ] - previous_configs = configs - configs = [] - configs = [ ":mesa_internal_config" ] + previous_configs + - [ ":mesa_internal_warnings" ] - - include_dirs = [ "src/src/mesa/drivers" ] - - if (is_clang) { - # Mesa triggers some of these Clang warnings. - configs -= [ "//build/config/clang:extra_warnings" ] - } - - # UBsan's vptr is not compatible with -fno-rtti, - # which is used by gallium/auxiliary/Makefile. - configs -= [ "//build/config/sanitizers:default_sanitizer_flags" ] - configs += - [ "//build/config/sanitizers:default_sanitizer_flags_but_ubsan_vptr" ] - - if (is_win) { - sources += [ "src/src/mesa/drivers/osmesa/osmesa.def" ] - - # http://crbug.com/512956 - ldflags = [ "/ignore:4197" ] - } - - deps = [ - ":mesa", - ":mesa_headers", - ":mesa_libglslcommon", - ] - - if (is_win) { - defines = [ - "BUILD_GL32", - "KEYWORD1=GLAPI", - "KEYWORD2=GLAPIENTRY", - ] - } -}
diff --git a/third_party/mesa/chromium.patch b/third_party/mesa/chromium.patch deleted file mode 100644 index 2d664275..0000000 --- a/third_party/mesa/chromium.patch +++ /dev/null
@@ -1,2107 +0,0 @@ -diff -c -r Mesa-7.9/include/GL/gl.h MesaLib/include/GL/gl.h -*** Mesa-7.9/include/GL/gl.h Tue Apr 27 14:41:21 2010 ---- MesaLib/include/GL/gl.h Thu Oct 14 14:41:53 2010 -*************** -*** 55,61 **** - # if (defined(_MSC_VER) || defined(__MINGW32__)) && defined(BUILD_GL32) /* tag specify we're building mesa as a DLL */ - # define GLAPI __declspec(dllexport) - # elif (defined(_MSC_VER) || defined(__MINGW32__)) && defined(_DLL) /* tag specifying we're building for DLL runtime support */ -! # define GLAPI __declspec(dllimport) - # else /* for use with static link lib build of Win32 edition only */ - # define GLAPI extern - # endif /* _STATIC_MESA support */ ---- 55,65 ---- - # if (defined(_MSC_VER) || defined(__MINGW32__)) && defined(BUILD_GL32) /* tag specify we're building mesa as a DLL */ - # define GLAPI __declspec(dllexport) - # elif (defined(_MSC_VER) || defined(__MINGW32__)) && defined(_DLL) /* tag specifying we're building for DLL runtime support */ -! // We always retrieve the entry points dynamically via GetProcAddress or -! // OSMesaGetProcAddress. This works around an issue where using the MSVC -! // multi-threaded runtime library, which defines _DLL. -! //# define GLAPI __declspec(dllimport) -! # define GLAPI - # else /* for use with static link lib build of Win32 edition only */ - # define GLAPI extern - # endif /* _STATIC_MESA support */ -*************** -*** 72,80 **** - # define GLAPIENTRY - #endif /* WIN32 && !CYGWIN */ - -! #if (defined(__BEOS__) && defined(__POWERPC__)) || defined(__QUICKDRAW__) -! # define PRAGMA_EXPORT_SUPPORTED 1 -! #endif - - /* - * WINDOWS: Include windows.h here to define APIENTRY. ---- 76,86 ---- - # define GLAPIENTRY - #endif /* WIN32 && !CYGWIN */ - -! // Disabled this because __QUICKDRAW__ is defined on Mac and gcc does not -! // support the pragma. -! //#if (defined(__BEOS__) && defined(__POWERPC__)) || defined(__QUICKDRAW__) -! //# define PRAGMA_EXPORT_SUPPORTED 1 -! //#endif - - /* - * WINDOWS: Include windows.h here to define APIENTRY. -diff -c -r Mesa-7.9/include/GL/glext.h MesaLib/include/GL/glext.h -*** Mesa-7.9/include/GL/glext.h Fri Oct 1 15:51:28 2010 ---- MesaLib/include/GL/glext.h Thu Oct 14 14:50:37 2010 -*************** -*** 5030,5043 **** - - #ifndef GL_VERSION_1_5 - /* GL types for handling large vertex buffer objects */ -! typedef ptrdiff_t GLintptr; -! typedef ptrdiff_t GLsizeiptr; - #endif - - #ifndef GL_ARB_vertex_buffer_object - /* GL types for handling large vertex buffer objects */ -! typedef ptrdiff_t GLintptrARB; -! typedef ptrdiff_t GLsizeiptrARB; - #endif - - #ifndef GL_ARB_shader_objects ---- 5030,5043 ---- - - #ifndef GL_VERSION_1_5 - /* GL types for handling large vertex buffer objects */ -! typedef signed long int GLintptr; -! typedef signed long int GLsizeiptr; - #endif - - #ifndef GL_ARB_vertex_buffer_object - /* GL types for handling large vertex buffer objects */ -! typedef signed long int GLintptrARB; -! typedef signed long int GLsizeiptrARB; - #endif - - #ifndef GL_ARB_shader_objects -diff -c -r Mesa-7.9/include/GL/osmesa.h MesaLib/include/GL/osmesa.h -*** Mesa-7.9/include/GL/osmesa.h Thu Feb 4 16:10:39 2010 ---- MesaLib/include/GL/osmesa.h Thu Oct 14 14:47:08 2010 -*************** -*** 101,109 **** - typedef struct osmesa_context *OSMesaContext; - - -! #if defined(__BEOS__) || defined(__QUICKDRAW__) -! #pragma export on -! #endif - - - /* ---- 101,111 ---- - typedef struct osmesa_context *OSMesaContext; - - -! // Disabled this because __QUICKDRAW__ is defined on Mac and gcc does not -! // support the pragma. -! //#if defined(__BEOS__) || defined(__QUICKDRAW__) -! //#pragma export on -! //#endif - - - /* -*************** -*** 276,284 **** - OSMesaColorClamp(GLboolean enable); - - -! #if defined(__BEOS__) || defined(__QUICKDRAW__) -! #pragma export off -! #endif - - - #ifdef __cplusplus ---- 278,288 ---- - OSMesaColorClamp(GLboolean enable); - - -! // Disabled this because __QUICKDRAW__ is defined on Mac and gcc does not -! // support the pragma. -! //#if defined(__BEOS__) || defined(__QUICKDRAW__) -! //#pragma export off -! //#endif - - - #ifdef __cplusplus -diff -c -r Mesa-7.9/src/glsl/ast_to_hir.cpp MesaLib/src/glsl/ast_to_hir.cpp -*** Mesa-7.9/src/glsl/ast_to_hir.cpp Fri Oct 1 15:51:28 2010 ---- MesaLib/src/glsl/ast_to_hir.cpp Fri Oct 22 15:28:47 2010 -*************** -*** 55,60 **** ---- 55,61 ---- - #include "ast.h" - #include "glsl_types.h" - #include "ir.h" -+ #include "safe_strcmp.h" - - void - _mesa_ast_to_hir(exec_list *instructions, struct _mesa_glsl_parse_state *state) -*************** -*** 1615,1621 **** - var->pixel_center_integer = qual->pixel_center_integer; - var->origin_upper_left = qual->origin_upper_left; - if ((qual->origin_upper_left || qual->pixel_center_integer) -! && (strcmp(var->name, "gl_FragCoord") != 0)) { - const char *const qual_string = (qual->origin_upper_left) - ? "origin_upper_left" : "pixel_center_integer"; - ---- 1616,1622 ---- - var->pixel_center_integer = qual->pixel_center_integer; - var->origin_upper_left = qual->origin_upper_left; - if ((qual->origin_upper_left || qual->pixel_center_integer) -! && (safe_strcmp(var->name, "gl_FragCoord") != 0)) { - const char *const qual_string = (qual->origin_upper_left) - ? "origin_upper_left" : "pixel_center_integer"; - -*************** -*** 2003,2009 **** - * gl_MaxTextureCoords." - */ - const unsigned size = unsigned(var->type->array_size()); -! if ((strcmp("gl_TexCoord", var->name) == 0) - && (size > state->Const.MaxTextureCoords)) { - YYLTYPE loc = this->get_location(); - ---- 2004,2010 ---- - * gl_MaxTextureCoords." - */ - const unsigned size = unsigned(var->type->array_size()); -! if ((safe_strcmp("gl_TexCoord", var->name) == 0) - && (size > state->Const.MaxTextureCoords)) { - YYLTYPE loc = this->get_location(); - -*************** -*** 2022,2028 **** - delete var; - var = NULL; - } else if (state->extensions->ARB_fragment_coord_conventions -! && strcmp(var->name, "gl_FragCoord") == 0 - && earlier->type == var->type - && earlier->mode == var->mode) { - /* Allow redeclaration of gl_FragCoord for ARB_fcc layout ---- 2023,2029 ---- - delete var; - var = NULL; - } else if (state->extensions->ARB_fragment_coord_conventions -! && safe_strcmp(var->name, "gl_FragCoord") == 0 - && earlier->type == var->type - && earlier->mode == var->mode) { - /* Allow redeclaration of gl_FragCoord for ARB_fcc layout -*************** -*** 2336,2342 **** - } - - /* Verify the return type of main() */ -! if (strcmp(name, "main") == 0) { - if (! return_type->is_void()) { - YYLTYPE loc = this->get_location(); - ---- 2337,2343 ---- - } - - /* Verify the return type of main() */ -! if (safe_strcmp(name, "main") == 0) { - if (! return_type->is_void()) { - YYLTYPE loc = this->get_location(); - -diff -c -r Mesa-7.9/src/glsl/glcpp/glcpp-parse.c MesaLib/src/glsl/glcpp/glcpp-parse.c -*** Mesa-7.9/src/glsl/glcpp/glcpp-parse.c Fri Oct 1 15:51:28 2010 ---- MesaLib/src/glsl/glcpp/glcpp-parse.c Fri Oct 22 15:30:59 2010 -*************** -*** 96,106 **** ---- 96,114 ---- - #include <stdlib.h> - #include <string.h> - #include <assert.h> -+ /* The #include of inttypes.h causes problems on Windows */ -+ #ifndef _MSC_VER - #include <inttypes.h> -+ #endif -+ /* Windows headers do not define PRIiMAX */ -+ #ifdef _MSC_VER -+ #define PRIiMAX "I64i" -+ #endif - - #include "glcpp.h" - #include "main/core.h" /* for struct gl_extensions */ - #include "main/mtypes.h" /* for gl_api enum */ -+ #include "safe_strcmp.h" - - #define glcpp_print(stream, str) stream = talloc_strdup_append(stream, str) - #define glcpp_printf(stream, fmt, args, ...) \ -*************** -*** 2915,2921 **** - return 0; - - for (i = 0, node = list->head; node; i++, node = node->next) { -! if (strcmp (node->str, member) == 0) { - if (index) - *index = i; - return 1; ---- 2923,2929 ---- - return 0; - - for (i = 0, node = list->head; node; i++, node = node->next) { -! if (safe_strcmp (node->str, member) == 0) { - if (index) - *index = i; - return 1; -*************** -*** 2955,2961 **** - node_a && node_b; - node_a = node_a->next, node_b = node_b->next) - { -! if (strcmp (node_a->str, node_b->str)) - return 0; - } - ---- 2963,2969 ---- - node_a && node_b; - node_a = node_a->next, node_b = node_b->next) - { -! if (safe_strcmp (node_a->str, node_b->str)) - return 0; - } - -*************** -*** 3182,3189 **** - case IDENTIFIER: - case INTEGER_STRING: - case OTHER: -! if (strcmp (node_a->token->value.str, -! node_b->token->value.str)) - { - return 0; - } ---- 3190,3197 ---- - case IDENTIFIER: - case INTEGER_STRING: - case OTHER: -! if (safe_strcmp (node_a->token->value.str, -! node_b->token->value.str)) - { - return 0; - } -*************** -*** 3832,3838 **** - return 0; - - for (node = list; node; node = node->next) -! if (strcmp (node->identifier, identifier) == 0) - return 1; - - return 0; ---- 3840,3846 ---- - return 0; - - for (node = list; node; node = node->next) -! if (safe_strcmp (node->identifier, identifier) == 0) - return 1; - - return 0; -diff -c -r Mesa-7.9/src/glsl/glcpp/glcpp-parse.y MesaLib/src/glsl/glcpp/glcpp-parse.y -*** Mesa-7.9/src/glsl/glcpp/glcpp-parse.y Fri Oct 1 15:51:28 2010 ---- MesaLib/src/glsl/glcpp/glcpp-parse.y Fri Oct 22 15:30:47 2010 -*************** -*** 26,36 **** ---- 26,44 ---- - #include <stdlib.h> - #include <string.h> - #include <assert.h> -+ /* The #include of inttypes.h causes problems on Windows */ -+ #ifndef _MSC_VER - #include <inttypes.h> -+ #endif -+ /* Windows headers do not define PRIiMAX */ -+ #ifdef _MSC_VER -+ #define PRIiMAX "I64i" -+ #endif - - #include "glcpp.h" - #include "main/core.h" /* for struct gl_extensions */ - #include "main/mtypes.h" /* for gl_api enum */ -+ #include "safe_strcmp.h" - - #define glcpp_print(stream, str) stream = talloc_strdup_append(stream, str) - #define glcpp_printf(stream, fmt, args, ...) \ -*************** -*** 590,596 **** - return 0; - - for (i = 0, node = list->head; node; i++, node = node->next) { -! if (strcmp (node->str, member) == 0) { - if (index) - *index = i; - return 1; ---- 598,604 ---- - return 0; - - for (i = 0, node = list->head; node; i++, node = node->next) { -! if (safe_strcmp (node->str, member) == 0) { - if (index) - *index = i; - return 1; -*************** -*** 630,636 **** - node_a && node_b; - node_a = node_a->next, node_b = node_b->next) - { -! if (strcmp (node_a->str, node_b->str)) - return 0; - } - ---- 638,644 ---- - node_a && node_b; - node_a = node_a->next, node_b = node_b->next) - { -! if (safe_strcmp (node_a->str, node_b->str)) - return 0; - } - -*************** -*** 857,864 **** - case IDENTIFIER: - case INTEGER_STRING: - case OTHER: -! if (strcmp (node_a->token->value.str, -! node_b->token->value.str)) - { - return 0; - } ---- 865,872 ---- - case IDENTIFIER: - case INTEGER_STRING: - case OTHER: -! if (safe_strcmp (node_a->token->value.str, -! node_b->token->value.str)) - { - return 0; - } -*************** -*** 1507,1513 **** - return 0; - - for (node = list; node; node = node->next) -! if (strcmp (node->identifier, identifier) == 0) - return 1; - - return 0; ---- 1515,1521 ---- - return 0; - - for (node = list; node; node = node->next) -! if (safe_strcmp (node->identifier, identifier) == 0) - return 1; - - return 0; -diff -c -r Mesa-7.9/src/glsl/glcpp/glcpp.c MesaLib/src/glsl/glcpp/glcpp.c -*** Mesa-7.9/src/glsl/glcpp/glcpp.c Fri Oct 1 15:51:28 2010 ---- MesaLib/src/glsl/glcpp/glcpp.c Fri Oct 22 15:31:25 2010 -*************** -*** 29,34 **** ---- 29,35 ---- - #include <errno.h> - #include "glcpp.h" - #include "main/mtypes.h" -+ #include "safe_strcmp.h" - - extern int yydebug; - -*************** -*** 78,84 **** - char *text; - int fd; - -! if (filename == NULL || strcmp (filename, "-") == 0) - return load_text_fd (ctx, STDIN_FILENO); - - fd = open (filename, O_RDONLY); ---- 79,85 ---- - char *text; - int fd; - -! if (filename == NULL || safe_strcmp (filename, "-") == 0) - return load_text_fd (ctx, STDIN_FILENO); - - fd = open (filename, O_RDONLY); -diff -c -r Mesa-7.9/src/glsl/glcpp/glcpp.h MesaLib/src/glsl/glcpp/glcpp.h -*** Mesa-7.9/src/glsl/glcpp/glcpp.h Fri Oct 1 15:51:28 2010 ---- MesaLib/src/glsl/glcpp/glcpp.h Fri Oct 22 15:32:43 2010 -*************** -*** 24,30 **** ---- 24,33 ---- - #ifndef GLCPP_H - #define GLCPP_H - -+ /* Windows does not currently have stdint.h. */ -+ #ifndef _MSC_VER - #include <stdint.h> -+ #endif - - #include <talloc.h> - -*************** -*** 49,55 **** ---- 52,62 ---- - - typedef union YYSTYPE - { -+ #ifndef _MSC_VER - intmax_t ival; -+ #else -+ __int64 ival; -+ #endif - char *str; - string_list_t *string_list; - token_t *token; -diff -c -r Mesa-7.9/src/glsl/glsl_parser.cpp MesaLib/src/glsl/glsl_parser.cpp -*** Mesa-7.9/src/glsl/glsl_parser.cpp Fri Oct 1 15:51:28 2010 ---- MesaLib/src/glsl/glsl_parser.cpp Fri Oct 22 15:33:24 2010 -*************** -*** 107,112 **** ---- 107,113 ---- - #include "ast.h" - #include "glsl_parser_extras.h" - #include "glsl_types.h" -+ #include "safe_strcmp.h" - - #define YYLEX_PARAM state->scanner - -*************** -*** 3966,3975 **** - if (state->ARB_fragment_coord_conventions_enable) { - bool got_one = false; - -! if (strcmp((yyvsp[(1) - (1)].identifier), "origin_upper_left") == 0) { - got_one = true; - (yyval.type_qualifier).q.origin_upper_left = 1; -! } else if (strcmp((yyvsp[(1) - (1)].identifier), "pixel_center_integer") == 0) { - got_one = true; - (yyval.type_qualifier).q.pixel_center_integer = 1; - } ---- 3967,3976 ---- - if (state->ARB_fragment_coord_conventions_enable) { - bool got_one = false; - -! if (safe_strcmp((yyvsp[(1) - (1)].identifier), "origin_upper_left") == 0) { - got_one = true; - (yyval.type_qualifier).q.origin_upper_left = 1; -! } else if (safe_strcmp((yyvsp[(1) - (1)].identifier), "pixel_center_integer") == 0) { - got_one = true; - (yyval.type_qualifier).q.pixel_center_integer = 1; - } -diff -c -r Mesa-7.9/src/glsl/glsl_parser_extras.cpp MesaLib/src/glsl/glsl_parser_extras.cpp -*** Mesa-7.9/src/glsl/glsl_parser_extras.cpp Fri Oct 1 15:51:28 2010 ---- MesaLib/src/glsl/glsl_parser_extras.cpp Fri Oct 22 15:33:37 2010 -*************** -*** 35,40 **** ---- 35,41 ---- - #include "glsl_parser.h" - #include "ir_optimization.h" - #include "loop_analysis.h" -+ #include "safe_strcmp.h" - - _mesa_glsl_parse_state::_mesa_glsl_parse_state(struct __GLcontextRec *ctx, - GLenum target, void *mem_ctx) -*************** -*** 148,160 **** - extension_warn - } ext_mode; - -! if (strcmp(behavior, "warn") == 0) { - ext_mode = extension_warn; -! } else if (strcmp(behavior, "require") == 0) { - ext_mode = extension_require; -! } else if (strcmp(behavior, "enable") == 0) { - ext_mode = extension_enable; -! } else if (strcmp(behavior, "disable") == 0) { - ext_mode = extension_disable; - } else { - _mesa_glsl_error(behavior_locp, state, ---- 149,161 ---- - extension_warn - } ext_mode; - -! if (safe_strcmp(behavior, "warn") == 0) { - ext_mode = extension_warn; -! } else if (safe_strcmp(behavior, "require") == 0) { - ext_mode = extension_require; -! } else if (safe_strcmp(behavior, "enable") == 0) { - ext_mode = extension_enable; -! } else if (safe_strcmp(behavior, "disable") == 0) { - ext_mode = extension_disable; - } else { - _mesa_glsl_error(behavior_locp, state, -*************** -*** 165,178 **** - - bool unsupported = false; - -! if (strcmp(name, "all") == 0) { - if ((ext_mode == extension_enable) || (ext_mode == extension_require)) { - _mesa_glsl_error(name_locp, state, "Cannot %s all extensions", - (ext_mode == extension_enable) - ? "enable" : "require"); - return false; - } -! } else if (strcmp(name, "GL_ARB_draw_buffers") == 0) { - /* This extension is only supported in fragment shaders. - */ - if (state->target != fragment_shader) { ---- 166,179 ---- - - bool unsupported = false; - -! if (safe_strcmp(name, "all") == 0) { - if ((ext_mode == extension_enable) || (ext_mode == extension_require)) { - _mesa_glsl_error(name_locp, state, "Cannot %s all extensions", - (ext_mode == extension_enable) - ? "enable" : "require"); - return false; - } -! } else if (safe_strcmp(name, "GL_ARB_draw_buffers") == 0) { - /* This extension is only supported in fragment shaders. - */ - if (state->target != fragment_shader) { -*************** -*** 181,197 **** - state->ARB_draw_buffers_enable = (ext_mode != extension_disable); - state->ARB_draw_buffers_warn = (ext_mode == extension_warn); - } -! } else if (strcmp(name, "GL_ARB_fragment_coord_conventions") == 0) { - state->ARB_fragment_coord_conventions_enable = - (ext_mode != extension_disable); - state->ARB_fragment_coord_conventions_warn = - (ext_mode == extension_warn); - - unsupported = !state->extensions->ARB_fragment_coord_conventions; -! } else if (strcmp(name, "GL_ARB_texture_rectangle") == 0) { - state->ARB_texture_rectangle_enable = (ext_mode != extension_disable); - state->ARB_texture_rectangle_warn = (ext_mode == extension_warn); -! } else if (strcmp(name, "GL_EXT_texture_array") == 0) { - state->EXT_texture_array_enable = (ext_mode != extension_disable); - state->EXT_texture_array_warn = (ext_mode == extension_warn); - ---- 182,198 ---- - state->ARB_draw_buffers_enable = (ext_mode != extension_disable); - state->ARB_draw_buffers_warn = (ext_mode == extension_warn); - } -! } else if (safe_strcmp(name, "GL_ARB_fragment_coord_conventions") == 0) { - state->ARB_fragment_coord_conventions_enable = - (ext_mode != extension_disable); - state->ARB_fragment_coord_conventions_warn = - (ext_mode == extension_warn); - - unsupported = !state->extensions->ARB_fragment_coord_conventions; -! } else if (safe_strcmp(name, "GL_ARB_texture_rectangle") == 0) { - state->ARB_texture_rectangle_enable = (ext_mode != extension_disable); - state->ARB_texture_rectangle_warn = (ext_mode == extension_warn); -! } else if (safe_strcmp(name, "GL_EXT_texture_array") == 0) { - state->EXT_texture_array_enable = (ext_mode != extension_disable); - state->EXT_texture_array_warn = (ext_mode == extension_warn); - -diff -c -r Mesa-7.9/src/glsl/glsl_types.cpp MesaLib/src/glsl/glsl_types.cpp -*** Mesa-7.9/src/glsl/glsl_types.cpp Fri Oct 1 15:51:28 2010 ---- MesaLib/src/glsl/glsl_types.cpp Fri Oct 22 15:33:51 2010 -*************** -*** 27,32 **** ---- 27,33 ---- - #include "glsl_symbol_table.h" - #include "glsl_parser_extras.h" - #include "glsl_types.h" -+ #include "safe_strcmp.h" - #include "builtin_types.h" - extern "C" { - #include "program/hash_table.h" -*************** -*** 374,380 **** - /* Return zero is the types match (there is zero difference) or non-zero - * otherwise. - */ -! if (strcmp(key1->name, key2->name) != 0) - return 1; - - if (key1->length != key2->length) ---- 375,381 ---- - /* Return zero is the types match (there is zero difference) or non-zero - * otherwise. - */ -! if (safe_strcmp(key1->name, key2->name) != 0) - return 1; - - if (key1->length != key2->length) -*************** -*** 383,389 **** - for (unsigned i = 0; i < key1->length; i++) { - if (key1->fields.structure[i].type != key2->fields.structure[i].type) - return 1; -! if (strcmp(key1->fields.structure[i].name, - key2->fields.structure[i].name) != 0) - return 1; - } ---- 384,390 ---- - for (unsigned i = 0; i < key1->length; i++) { - if (key1->fields.structure[i].type != key2->fields.structure[i].type) - return 1; -! if (safe_strcmp(key1->fields.structure[i].name, - key2->fields.structure[i].name) != 0) - return 1; - } -*************** -*** 433,439 **** - - assert(t->base_type == GLSL_TYPE_STRUCT); - assert(t->length == num_fields); -! assert(strcmp(t->name, name) == 0); - - return t; - } ---- 434,440 ---- - - assert(t->base_type == GLSL_TYPE_STRUCT); - assert(t->length == num_fields); -! assert(safe_strcmp(t->name, name) == 0); - - return t; - } -*************** -*** 446,452 **** - return error_type; - - for (unsigned i = 0; i < this->length; i++) { -! if (strcmp(name, this->fields.structure[i].name) == 0) - return this->fields.structure[i].type; - } - ---- 447,453 ---- - return error_type; - - for (unsigned i = 0; i < this->length; i++) { -! if (safe_strcmp(name, this->fields.structure[i].name) == 0) - return this->fields.structure[i].type; - } - -*************** -*** 461,467 **** - return -1; - - for (unsigned i = 0; i < this->length; i++) { -! if (strcmp(name, this->fields.structure[i].name) == 0) - return i; - } - ---- 462,468 ---- - return -1; - - for (unsigned i = 0; i < this->length; i++) { -! if (safe_strcmp(name, this->fields.structure[i].name) == 0) - return i; - } - -diff -c -r Mesa-7.9/src/glsl/hir_field_selection.cpp MesaLib/src/glsl/hir_field_selection.cpp -*** Mesa-7.9/src/glsl/hir_field_selection.cpp Fri Oct 1 15:51:28 2010 ---- MesaLib/src/glsl/hir_field_selection.cpp Fri Oct 22 15:34:11 2010 -*************** -*** 26,31 **** ---- 26,32 ---- - #include "glsl_parser_extras.h" - #include "ast.h" - #include "glsl_types.h" -+ #include "safe_strcmp.h" - - ir_rvalue * - _mesa_ast_field_selection_to_hir(const ast_expression *expr, -*************** -*** 81,87 **** - const char *method; - method = call->subexpressions[0]->primary_expression.identifier; - -! if (op->type->is_array() && strcmp(method, "length") == 0) { - if (!call->expressions.is_empty()) - _mesa_glsl_error(&loc, state, "length method takes no arguments."); - ---- 82,88 ---- - const char *method; - method = call->subexpressions[0]->primary_expression.identifier; - -! if (op->type->is_array() && safe_strcmp(method, "length") == 0) { - if (!call->expressions.is_empty()) - _mesa_glsl_error(&loc, state, "length method takes no arguments."); - -diff -c -r Mesa-7.9/src/glsl/ir.cpp MesaLib/src/glsl/ir.cpp -*** Mesa-7.9/src/glsl/ir.cpp Fri Oct 1 15:51:28 2010 ---- MesaLib/src/glsl/ir.cpp Fri Oct 22 15:34:20 2010 -*************** -*** 25,30 **** ---- 25,31 ---- - #include "ir.h" - #include "ir_visitor.h" - #include "glsl_types.h" -+ #include "safe_strcmp.h" - - ir_rvalue::ir_rvalue() - { -*************** -*** 338,344 **** - { - const int operator_count = sizeof(operator_strs) / sizeof(operator_strs[0]); - for (int op = 0; op < operator_count; op++) { -! if (strcmp(str, operator_strs[op]) == 0) - return (ir_expression_operation) op; - } - return (ir_expression_operation) -1; ---- 339,345 ---- - { - const int operator_count = sizeof(operator_strs) / sizeof(operator_strs[0]); - for (int op = 0; op < operator_count; op++) { -! if (safe_strcmp(str, operator_strs[op]) == 0) - return (ir_expression_operation) op; - } - return (ir_expression_operation) -1; -*************** -*** 878,884 **** - { - const int count = sizeof(tex_opcode_strs) / sizeof(tex_opcode_strs[0]); - for (int op = 0; op < count; op++) { -! if (strcmp(str, tex_opcode_strs[op]) == 0) - return (ir_texture_opcode) op; - } - return (ir_texture_opcode) -1; ---- 879,885 ---- - { - const int count = sizeof(tex_opcode_strs) / sizeof(tex_opcode_strs[0]); - for (int op = 0; op < count; op++) { -! if (safe_strcmp(str, tex_opcode_strs[op]) == 0) - return (ir_texture_opcode) op; - } - return (ir_texture_opcode) -1; -diff -c -r Mesa-7.9/src/glsl/ir_constant_expression.cpp MesaLib/src/glsl/ir_constant_expression.cpp -*** Mesa-7.9/src/glsl/ir_constant_expression.cpp Fri Oct 1 15:51:28 2010 ---- MesaLib/src/glsl/ir_constant_expression.cpp Fri Oct 22 15:34:40 2010 -*************** -*** 38,43 **** ---- 38,44 ---- - #include "ir.h" - #include "ir_visitor.h" - #include "glsl_types.h" -+ #include "safe_strcmp.h" - - static float - dot(ir_constant *op0, ir_constant *op1) -*************** -*** 850,880 **** - memset(&data, 0, sizeof(data)); - - const char *callee = this->callee_name(); -! if (strcmp(callee, "abs") == 0) { - expr = new(mem_ctx) ir_expression(ir_unop_abs, type, op[0], NULL); -! } else if (strcmp(callee, "all") == 0) { - assert(op[0]->type->is_boolean()); - for (unsigned c = 0; c < op[0]->type->components(); c++) { - if (!op[0]->value.b[c]) - return new(mem_ctx) ir_constant(false); - } - return new(mem_ctx) ir_constant(true); -! } else if (strcmp(callee, "any") == 0) { - assert(op[0]->type->is_boolean()); - for (unsigned c = 0; c < op[0]->type->components(); c++) { - if (op[0]->value.b[c]) - return new(mem_ctx) ir_constant(true); - } - return new(mem_ctx) ir_constant(false); -! } else if (strcmp(callee, "acos") == 0) { - assert(op[0]->type->is_float()); - for (unsigned c = 0; c < op[0]->type->components(); c++) - data.f[c] = acosf(op[0]->value.f[c]); -! } else if (strcmp(callee, "asin") == 0) { - assert(op[0]->type->is_float()); - for (unsigned c = 0; c < op[0]->type->components(); c++) - data.f[c] = asinf(op[0]->value.f[c]); -! } else if (strcmp(callee, "atan") == 0) { - assert(op[0]->type->is_float()); - if (num_parameters == 2) { - assert(op[1]->type->is_float()); ---- 851,881 ---- - memset(&data, 0, sizeof(data)); - - const char *callee = this->callee_name(); -! if (safe_strcmp(callee, "abs") == 0) { - expr = new(mem_ctx) ir_expression(ir_unop_abs, type, op[0], NULL); -! } else if (safe_strcmp(callee, "all") == 0) { - assert(op[0]->type->is_boolean()); - for (unsigned c = 0; c < op[0]->type->components(); c++) { - if (!op[0]->value.b[c]) - return new(mem_ctx) ir_constant(false); - } - return new(mem_ctx) ir_constant(true); -! } else if (safe_strcmp(callee, "any") == 0) { - assert(op[0]->type->is_boolean()); - for (unsigned c = 0; c < op[0]->type->components(); c++) { - if (op[0]->value.b[c]) - return new(mem_ctx) ir_constant(true); - } - return new(mem_ctx) ir_constant(false); -! } else if (safe_strcmp(callee, "acos") == 0) { - assert(op[0]->type->is_float()); - for (unsigned c = 0; c < op[0]->type->components(); c++) - data.f[c] = acosf(op[0]->value.f[c]); -! } else if (safe_strcmp(callee, "asin") == 0) { - assert(op[0]->type->is_float()); - for (unsigned c = 0; c < op[0]->type->components(); c++) - data.f[c] = asinf(op[0]->value.f[c]); -! } else if (safe_strcmp(callee, "atan") == 0) { - assert(op[0]->type->is_float()); - if (num_parameters == 2) { - assert(op[1]->type->is_float()); -*************** -*** 884,894 **** - for (unsigned c = 0; c < op[0]->type->components(); c++) - data.f[c] = atanf(op[0]->value.f[c]); - } -! } else if (strcmp(callee, "dFdx") == 0 || strcmp(callee, "dFdy") == 0) { - return ir_constant::zero(mem_ctx, this->type); -! } else if (strcmp(callee, "ceil") == 0) { - expr = new(mem_ctx) ir_expression(ir_unop_ceil, type, op[0], NULL); -! } else if (strcmp(callee, "clamp") == 0) { - assert(num_parameters == 3); - unsigned c1_inc = op[1]->type->is_scalar() ? 0 : 1; - unsigned c2_inc = op[2]->type->is_scalar() ? 0 : 1; ---- 885,895 ---- - for (unsigned c = 0; c < op[0]->type->components(); c++) - data.f[c] = atanf(op[0]->value.f[c]); - } -! } else if (safe_strcmp(callee, "dFdx") == 0 || safe_strcmp(callee, "dFdy") == 0) { - return ir_constant::zero(mem_ctx, this->type); -! } else if (safe_strcmp(callee, "ceil") == 0) { - expr = new(mem_ctx) ir_expression(ir_unop_ceil, type, op[0], NULL); -! } else if (safe_strcmp(callee, "clamp") == 0) { - assert(num_parameters == 3); - unsigned c1_inc = op[1]->type->is_scalar() ? 0 : 1; - unsigned c2_inc = op[2]->type->is_scalar() ? 0 : 1; -*************** -*** 913,931 **** - assert(!"Should not get here."); - } - } -! } else if (strcmp(callee, "cos") == 0) { - expr = new(mem_ctx) ir_expression(ir_unop_cos, type, op[0], NULL); -! } else if (strcmp(callee, "cosh") == 0) { - assert(op[0]->type->is_float()); - for (unsigned c = 0; c < op[0]->type->components(); c++) - data.f[c] = coshf(op[0]->value.f[c]); -! } else if (strcmp(callee, "cross") == 0) { - expr = new(mem_ctx) ir_expression(ir_binop_cross, type, op[0], op[1]); -! } else if (strcmp(callee, "degrees") == 0) { - assert(op[0]->type->is_float()); - for (unsigned c = 0; c < op[0]->type->components(); c++) - data.f[c] = 180.0/M_PI * op[0]->value.f[c]; -! } else if (strcmp(callee, "distance") == 0) { - assert(op[0]->type->is_float() && op[1]->type->is_float()); - float length_squared = 0.0; - for (unsigned c = 0; c < op[0]->type->components(); c++) { ---- 914,932 ---- - assert(!"Should not get here."); - } - } -! } else if (safe_strcmp(callee, "cos") == 0) { - expr = new(mem_ctx) ir_expression(ir_unop_cos, type, op[0], NULL); -! } else if (safe_strcmp(callee, "cosh") == 0) { - assert(op[0]->type->is_float()); - for (unsigned c = 0; c < op[0]->type->components(); c++) - data.f[c] = coshf(op[0]->value.f[c]); -! } else if (safe_strcmp(callee, "cross") == 0) { - expr = new(mem_ctx) ir_expression(ir_binop_cross, type, op[0], op[1]); -! } else if (safe_strcmp(callee, "degrees") == 0) { - assert(op[0]->type->is_float()); - for (unsigned c = 0; c < op[0]->type->components(); c++) - data.f[c] = 180.0/M_PI * op[0]->value.f[c]; -! } else if (safe_strcmp(callee, "distance") == 0) { - assert(op[0]->type->is_float() && op[1]->type->is_float()); - float length_squared = 0.0; - for (unsigned c = 0; c < op[0]->type->components(); c++) { -*************** -*** 933,941 **** - length_squared += t * t; - } - return new(mem_ctx) ir_constant(sqrtf(length_squared)); -! } else if (strcmp(callee, "dot") == 0) { - return new(mem_ctx) ir_constant(dot(op[0], op[1])); -! } else if (strcmp(callee, "equal") == 0) { - assert(op[0]->type->is_vector() && op[1] && op[1]->type->is_vector()); - for (unsigned c = 0; c < op[0]->type->components(); c++) { - switch (op[0]->type->base_type) { ---- 934,942 ---- - length_squared += t * t; - } - return new(mem_ctx) ir_constant(sqrtf(length_squared)); -! } else if (safe_strcmp(callee, "dot") == 0) { - return new(mem_ctx) ir_constant(dot(op[0], op[1])); -! } else if (safe_strcmp(callee, "equal") == 0) { - assert(op[0]->type->is_vector() && op[1] && op[1]->type->is_vector()); - for (unsigned c = 0; c < op[0]->type->components(); c++) { - switch (op[0]->type->base_type) { -*************** -*** 955,976 **** - assert(!"Should not get here."); - } - } -! } else if (strcmp(callee, "exp") == 0) { - expr = new(mem_ctx) ir_expression(ir_unop_exp, type, op[0], NULL); -! } else if (strcmp(callee, "exp2") == 0) { - expr = new(mem_ctx) ir_expression(ir_unop_exp2, type, op[0], NULL); -! } else if (strcmp(callee, "faceforward") == 0) { - if (dot(op[2], op[1]) < 0) - return op[0]; - for (unsigned c = 0; c < op[0]->type->components(); c++) - data.f[c] = -op[0]->value.f[c]; -! } else if (strcmp(callee, "floor") == 0) { - expr = new(mem_ctx) ir_expression(ir_unop_floor, type, op[0], NULL); -! } else if (strcmp(callee, "fract") == 0) { - expr = new(mem_ctx) ir_expression(ir_unop_fract, type, op[0], NULL); -! } else if (strcmp(callee, "fwidth") == 0) { - return ir_constant::zero(mem_ctx, this->type); -! } else if (strcmp(callee, "greaterThan") == 0) { - assert(op[0]->type->is_vector() && op[1] && op[1]->type->is_vector()); - for (unsigned c = 0; c < op[0]->type->components(); c++) { - switch (op[0]->type->base_type) { ---- 956,977 ---- - assert(!"Should not get here."); - } - } -! } else if (safe_strcmp(callee, "exp") == 0) { - expr = new(mem_ctx) ir_expression(ir_unop_exp, type, op[0], NULL); -! } else if (safe_strcmp(callee, "exp2") == 0) { - expr = new(mem_ctx) ir_expression(ir_unop_exp2, type, op[0], NULL); -! } else if (safe_strcmp(callee, "faceforward") == 0) { - if (dot(op[2], op[1]) < 0) - return op[0]; - for (unsigned c = 0; c < op[0]->type->components(); c++) - data.f[c] = -op[0]->value.f[c]; -! } else if (safe_strcmp(callee, "floor") == 0) { - expr = new(mem_ctx) ir_expression(ir_unop_floor, type, op[0], NULL); -! } else if (safe_strcmp(callee, "fract") == 0) { - expr = new(mem_ctx) ir_expression(ir_unop_fract, type, op[0], NULL); -! } else if (safe_strcmp(callee, "fwidth") == 0) { - return ir_constant::zero(mem_ctx, this->type); -! } else if (safe_strcmp(callee, "greaterThan") == 0) { - assert(op[0]->type->is_vector() && op[1] && op[1]->type->is_vector()); - for (unsigned c = 0; c < op[0]->type->components(); c++) { - switch (op[0]->type->base_type) { -*************** -*** 987,993 **** - assert(!"Should not get here."); - } - } -! } else if (strcmp(callee, "greaterThanEqual") == 0) { - assert(op[0]->type->is_vector() && op[1] && op[1]->type->is_vector()); - for (unsigned c = 0; c < op[0]->type->components(); c++) { - switch (op[0]->type->base_type) { ---- 988,994 ---- - assert(!"Should not get here."); - } - } -! } else if (safe_strcmp(callee, "greaterThanEqual") == 0) { - assert(op[0]->type->is_vector() && op[1] && op[1]->type->is_vector()); - for (unsigned c = 0; c < op[0]->type->components(); c++) { - switch (op[0]->type->base_type) { -*************** -*** 1004,1014 **** - assert(!"Should not get here."); - } - } -! } else if (strcmp(callee, "inversesqrt") == 0) { - expr = new(mem_ctx) ir_expression(ir_unop_rsq, type, op[0], NULL); -! } else if (strcmp(callee, "length") == 0) { - return new(mem_ctx) ir_constant(sqrtf(dot(op[0], op[0]))); -! } else if (strcmp(callee, "lessThan") == 0) { - assert(op[0]->type->is_vector() && op[1] && op[1]->type->is_vector()); - for (unsigned c = 0; c < op[0]->type->components(); c++) { - switch (op[0]->type->base_type) { ---- 1005,1015 ---- - assert(!"Should not get here."); - } - } -! } else if (safe_strcmp(callee, "inversesqrt") == 0) { - expr = new(mem_ctx) ir_expression(ir_unop_rsq, type, op[0], NULL); -! } else if (safe_strcmp(callee, "length") == 0) { - return new(mem_ctx) ir_constant(sqrtf(dot(op[0], op[0]))); -! } else if (safe_strcmp(callee, "lessThan") == 0) { - assert(op[0]->type->is_vector() && op[1] && op[1]->type->is_vector()); - for (unsigned c = 0; c < op[0]->type->components(); c++) { - switch (op[0]->type->base_type) { -*************** -*** 1025,1031 **** - assert(!"Should not get here."); - } - } -! } else if (strcmp(callee, "lessThanEqual") == 0) { - assert(op[0]->type->is_vector() && op[1] && op[1]->type->is_vector()); - for (unsigned c = 0; c < op[0]->type->components(); c++) { - switch (op[0]->type->base_type) { ---- 1026,1032 ---- - assert(!"Should not get here."); - } - } -! } else if (safe_strcmp(callee, "lessThanEqual") == 0) { - assert(op[0]->type->is_vector() && op[1] && op[1]->type->is_vector()); - for (unsigned c = 0; c < op[0]->type->components(); c++) { - switch (op[0]->type->base_type) { -*************** -*** 1042,1060 **** - assert(!"Should not get here."); - } - } -! } else if (strcmp(callee, "log") == 0) { - expr = new(mem_ctx) ir_expression(ir_unop_log, type, op[0], NULL); -! } else if (strcmp(callee, "log2") == 0) { - expr = new(mem_ctx) ir_expression(ir_unop_log2, type, op[0], NULL); -! } else if (strcmp(callee, "matrixCompMult") == 0) { - assert(op[0]->type->is_float() && op[1]->type->is_float()); - for (unsigned c = 0; c < op[0]->type->components(); c++) - data.f[c] = op[0]->value.f[c] * op[1]->value.f[c]; -! } else if (strcmp(callee, "max") == 0) { - expr = new(mem_ctx) ir_expression(ir_binop_max, type, op[0], op[1]); -! } else if (strcmp(callee, "min") == 0) { - expr = new(mem_ctx) ir_expression(ir_binop_min, type, op[0], op[1]); -! } else if (strcmp(callee, "mix") == 0) { - assert(op[0]->type->is_float() && op[1]->type->is_float()); - if (op[2]->type->is_float()) { - unsigned c2_inc = op[2]->type->is_scalar() ? 0 : 1; ---- 1043,1061 ---- - assert(!"Should not get here."); - } - } -! } else if (safe_strcmp(callee, "log") == 0) { - expr = new(mem_ctx) ir_expression(ir_unop_log, type, op[0], NULL); -! } else if (safe_strcmp(callee, "log2") == 0) { - expr = new(mem_ctx) ir_expression(ir_unop_log2, type, op[0], NULL); -! } else if (safe_strcmp(callee, "matrixCompMult") == 0) { - assert(op[0]->type->is_float() && op[1]->type->is_float()); - for (unsigned c = 0; c < op[0]->type->components(); c++) - data.f[c] = op[0]->value.f[c] * op[1]->value.f[c]; -! } else if (safe_strcmp(callee, "max") == 0) { - expr = new(mem_ctx) ir_expression(ir_binop_max, type, op[0], op[1]); -! } else if (safe_strcmp(callee, "min") == 0) { - expr = new(mem_ctx) ir_expression(ir_binop_min, type, op[0], op[1]); -! } else if (safe_strcmp(callee, "mix") == 0) { - assert(op[0]->type->is_float() && op[1]->type->is_float()); - if (op[2]->type->is_float()) { - unsigned c2_inc = op[2]->type->is_scalar() ? 0 : 1; -*************** -*** 1068,1076 **** - for (unsigned c = 0; c < op[0]->type->components(); c++) - data.f[c] = op[op[2]->value.b[c] ? 1 : 0]->value.f[c]; - } -! } else if (strcmp(callee, "mod") == 0) { - expr = new(mem_ctx) ir_expression(ir_binop_mod, type, op[0], op[1]); -! } else if (strcmp(callee, "normalize") == 0) { - assert(op[0]->type->is_float()); - float length = sqrtf(dot(op[0], op[0])); - ---- 1069,1077 ---- - for (unsigned c = 0; c < op[0]->type->components(); c++) - data.f[c] = op[op[2]->value.b[c] ? 1 : 0]->value.f[c]; - } -! } else if (safe_strcmp(callee, "mod") == 0) { - expr = new(mem_ctx) ir_expression(ir_binop_mod, type, op[0], op[1]); -! } else if (safe_strcmp(callee, "normalize") == 0) { - assert(op[0]->type->is_float()); - float length = sqrtf(dot(op[0], op[0])); - -*************** -*** 1079,1087 **** - - for (unsigned c = 0; c < op[0]->type->components(); c++) - data.f[c] = op[0]->value.f[c] / length; -! } else if (strcmp(callee, "not") == 0) { - expr = new(mem_ctx) ir_expression(ir_unop_logic_not, type, op[0], NULL); -! } else if (strcmp(callee, "notEqual") == 0) { - assert(op[0]->type->is_vector() && op[1] && op[1]->type->is_vector()); - for (unsigned c = 0; c < op[0]->type->components(); c++) { - switch (op[0]->type->base_type) { ---- 1080,1088 ---- - - for (unsigned c = 0; c < op[0]->type->components(); c++) - data.f[c] = op[0]->value.f[c] / length; -! } else if (safe_strcmp(callee, "not") == 0) { - expr = new(mem_ctx) ir_expression(ir_unop_logic_not, type, op[0], NULL); -! } else if (safe_strcmp(callee, "notEqual") == 0) { - assert(op[0]->type->is_vector() && op[1] && op[1]->type->is_vector()); - for (unsigned c = 0; c < op[0]->type->components(); c++) { - switch (op[0]->type->base_type) { -*************** -*** 1101,1107 **** - assert(!"Should not get here."); - } - } -! } else if (strcmp(callee, "outerProduct") == 0) { - assert(op[0]->type->is_vector() && op[1]->type->is_vector()); - const unsigned m = op[0]->type->vector_elements; - const unsigned n = op[1]->type->vector_elements; ---- 1102,1108 ---- - assert(!"Should not get here."); - } - } -! } else if (safe_strcmp(callee, "outerProduct") == 0) { - assert(op[0]->type->is_vector() && op[1]->type->is_vector()); - const unsigned m = op[0]->type->vector_elements; - const unsigned n = op[1]->type->vector_elements; -*************** -*** 1110,1127 **** - data.f[i+m*j] = op[0]->value.f[i] * op[1]->value.f[j]; - } - } -! } else if (strcmp(callee, "pow") == 0) { - expr = new(mem_ctx) ir_expression(ir_binop_pow, type, op[0], op[1]); -! } else if (strcmp(callee, "radians") == 0) { - assert(op[0]->type->is_float()); - for (unsigned c = 0; c < op[0]->type->components(); c++) - data.f[c] = M_PI/180.0 * op[0]->value.f[c]; -! } else if (strcmp(callee, "reflect") == 0) { - assert(op[0]->type->is_float()); - float dot_NI = dot(op[1], op[0]); - for (unsigned c = 0; c < op[0]->type->components(); c++) - data.f[c] = op[0]->value.f[c] - 2 * dot_NI * op[1]->value.f[c]; -! } else if (strcmp(callee, "refract") == 0) { - const float eta = op[2]->value.f[0]; - const float dot_NI = dot(op[1], op[0]); - const float k = 1.0 - eta * eta * (1.0 - dot_NI * dot_NI); ---- 1111,1128 ---- - data.f[i+m*j] = op[0]->value.f[i] * op[1]->value.f[j]; - } - } -! } else if (safe_strcmp(callee, "pow") == 0) { - expr = new(mem_ctx) ir_expression(ir_binop_pow, type, op[0], op[1]); -! } else if (safe_strcmp(callee, "radians") == 0) { - assert(op[0]->type->is_float()); - for (unsigned c = 0; c < op[0]->type->components(); c++) - data.f[c] = M_PI/180.0 * op[0]->value.f[c]; -! } else if (safe_strcmp(callee, "reflect") == 0) { - assert(op[0]->type->is_float()); - float dot_NI = dot(op[1], op[0]); - for (unsigned c = 0; c < op[0]->type->components(); c++) - data.f[c] = op[0]->value.f[c] - 2 * dot_NI * op[1]->value.f[c]; -! } else if (safe_strcmp(callee, "refract") == 0) { - const float eta = op[2]->value.f[0]; - const float dot_NI = dot(op[1], op[0]); - const float k = 1.0 - eta * eta * (1.0 - dot_NI * dot_NI); -*************** -*** 1133,1147 **** - * op[1]->value.f[c]; - } - } -! } else if (strcmp(callee, "sign") == 0) { - expr = new(mem_ctx) ir_expression(ir_unop_sign, type, op[0], NULL); -! } else if (strcmp(callee, "sin") == 0) { - expr = new(mem_ctx) ir_expression(ir_unop_sin, type, op[0], NULL); -! } else if (strcmp(callee, "sinh") == 0) { - assert(op[0]->type->is_float()); - for (unsigned c = 0; c < op[0]->type->components(); c++) - data.f[c] = sinhf(op[0]->value.f[c]); -! } else if (strcmp(callee, "smoothstep") == 0) { - assert(num_parameters == 3); - assert(op[1]->type == op[0]->type); - unsigned edge_inc = op[0]->type->is_scalar() ? 0 : 1; ---- 1134,1148 ---- - * op[1]->value.f[c]; - } - } -! } else if (safe_strcmp(callee, "sign") == 0) { - expr = new(mem_ctx) ir_expression(ir_unop_sign, type, op[0], NULL); -! } else if (safe_strcmp(callee, "sin") == 0) { - expr = new(mem_ctx) ir_expression(ir_unop_sin, type, op[0], NULL); -! } else if (safe_strcmp(callee, "sinh") == 0) { - assert(op[0]->type->is_float()); - for (unsigned c = 0; c < op[0]->type->components(); c++) - data.f[c] = sinhf(op[0]->value.f[c]); -! } else if (safe_strcmp(callee, "smoothstep") == 0) { - assert(num_parameters == 3); - assert(op[1]->type == op[0]->type); - unsigned edge_inc = op[0]->type->is_scalar() ? 0 : 1; -*************** -*** 1157,1179 **** - data.f[c] = t * t * (3 - 2 * t); - } - } -! } else if (strcmp(callee, "sqrt") == 0) { - expr = new(mem_ctx) ir_expression(ir_unop_sqrt, type, op[0], NULL); -! } else if (strcmp(callee, "step") == 0) { - assert(op[0]->type->is_float() && op[1]->type->is_float()); - /* op[0] (edge) may be either a scalar or a vector */ - const unsigned c0_inc = op[0]->type->is_scalar() ? 0 : 1; - for (unsigned c = 0, c0 = 0; c < type->components(); c0 += c0_inc, c++) - data.f[c] = (op[1]->value.f[c] < op[0]->value.f[c0]) ? 0.0 : 1.0; -! } else if (strcmp(callee, "tan") == 0) { - assert(op[0]->type->is_float()); - for (unsigned c = 0; c < op[0]->type->components(); c++) - data.f[c] = tanf(op[0]->value.f[c]); -! } else if (strcmp(callee, "tanh") == 0) { - assert(op[0]->type->is_float()); - for (unsigned c = 0; c < op[0]->type->components(); c++) - data.f[c] = tanhf(op[0]->value.f[c]); -! } else if (strcmp(callee, "transpose") == 0) { - assert(op[0]->type->is_matrix()); - const unsigned n = op[0]->type->vector_elements; - const unsigned m = op[0]->type->matrix_columns; ---- 1158,1180 ---- - data.f[c] = t * t * (3 - 2 * t); - } - } -! } else if (safe_strcmp(callee, "sqrt") == 0) { - expr = new(mem_ctx) ir_expression(ir_unop_sqrt, type, op[0], NULL); -! } else if (safe_strcmp(callee, "step") == 0) { - assert(op[0]->type->is_float() && op[1]->type->is_float()); - /* op[0] (edge) may be either a scalar or a vector */ - const unsigned c0_inc = op[0]->type->is_scalar() ? 0 : 1; - for (unsigned c = 0, c0 = 0; c < type->components(); c0 += c0_inc, c++) - data.f[c] = (op[1]->value.f[c] < op[0]->value.f[c0]) ? 0.0 : 1.0; -! } else if (safe_strcmp(callee, "tan") == 0) { - assert(op[0]->type->is_float()); - for (unsigned c = 0; c < op[0]->type->components(); c++) - data.f[c] = tanf(op[0]->value.f[c]); -! } else if (safe_strcmp(callee, "tanh") == 0) { - assert(op[0]->type->is_float()); - for (unsigned c = 0; c < op[0]->type->components(); c++) - data.f[c] = tanhf(op[0]->value.f[c]); -! } else if (safe_strcmp(callee, "transpose") == 0) { - assert(op[0]->type->is_matrix()); - const unsigned n = op[0]->type->vector_elements; - const unsigned m = op[0]->type->matrix_columns; -diff -c -r Mesa-7.9/src/glsl/ir_dead_functions.cpp MesaLib/src/glsl/ir_dead_functions.cpp -*** Mesa-7.9/src/glsl/ir_dead_functions.cpp Fri Oct 1 15:51:28 2010 ---- MesaLib/src/glsl/ir_dead_functions.cpp Fri Oct 22 15:34:54 2010 -*************** -*** 31,36 **** ---- 31,37 ---- - #include "ir_visitor.h" - #include "ir_expression_flattening.h" - #include "glsl_types.h" -+ #include "safe_strcmp.h" - - class signature_entry : public exec_node - { -*************** -*** 90,96 **** - { - signature_entry *entry = this->get_signature_entry(ir); - -! if (strcmp(ir->function_name(), "main") == 0) { - entry->used = true; - } - ---- 91,97 ---- - { - signature_entry *entry = this->get_signature_entry(ir); - -! if (safe_strcmp(ir->function_name(), "main") == 0) { - entry->used = true; - } - -diff -c -r Mesa-7.9/src/glsl/ir_function_inlining.cpp MesaLib/src/glsl/ir_function_inlining.cpp -*** Mesa-7.9/src/glsl/ir_function_inlining.cpp Fri Oct 1 15:51:28 2010 ---- MesaLib/src/glsl/ir_function_inlining.cpp Fri Oct 22 15:35:58 2010 -*************** -*** 27,33 **** - * Replaces calls to functions with the body of the function. - */ - -! #include <inttypes.h> - #include "ir.h" - #include "ir_visitor.h" - #include "ir_function_inlining.h" ---- 27,34 ---- - * Replaces calls to functions with the body of the function. - */ - -! /* The use of inttypes.h seems to be unnecessary and causes problems on Windows. */ -! /* #include <inttypes.h> */ - #include "ir.h" - #include "ir_visitor.h" - #include "ir_function_inlining.h" -diff -c -r Mesa-7.9/src/glsl/ir_lower_jumps.cpp MesaLib/src/glsl/ir_lower_jumps.cpp -*** Mesa-7.9/src/glsl/ir_lower_jumps.cpp Fri Oct 1 15:51:28 2010 ---- MesaLib/src/glsl/ir_lower_jumps.cpp Fri Oct 22 15:36:16 2010 -*************** -*** 28,33 **** ---- 28,34 ---- - #include "glsl_types.h" - #include <string.h> - #include "ir.h" -+ #include "safe_strcmp.h" - - enum jump_strength - { -*************** -*** 125,131 **** - this->return_flag = 0; - this->return_value = 0; - this->nesting_depth = 0; -! this->is_main = this->signature && (strcmp(this->signature->function_name(), "main") == 0); - } - - ir_variable* get_return_flag() ---- 126,132 ---- - this->return_flag = 0; - this->return_value = 0; - this->nesting_depth = 0; -! this->is_main = this->signature && (safe_strcmp(this->signature->function_name(), "main") == 0); - } - - ir_variable* get_return_flag() -diff -c -r Mesa-7.9/src/glsl/ir_reader.cpp MesaLib/src/glsl/ir_reader.cpp -*** Mesa-7.9/src/glsl/ir_reader.cpp Fri Oct 1 15:51:28 2010 ---- MesaLib/src/glsl/ir_reader.cpp Fri Oct 22 15:36:27 2010 -*************** -*** 31,36 **** ---- 31,37 ---- - #include "glsl_parser_extras.h" - #include "glsl_types.h" - #include "s_expression.h" -+ #include "safe_strcmp.h" - - const static bool debug = false; - -*************** -*** 128,134 **** - ir_read_error(st, expr, "expected type (array ...) or (struct ...)"); - return NULL; - } -! if (strcmp(type_sym->value(), "array") == 0) { - if (list->length() != 3) { - ir_read_error(st, expr, "expected type (array <type> <int>)"); - return NULL; ---- 129,135 ---- - ir_read_error(st, expr, "expected type (array ...) or (struct ...)"); - return NULL; - } -! if (safe_strcmp(type_sym->value(), "array") == 0) { - if (list->length() != 3) { - ir_read_error(st, expr, "expected type (array <type> <int>)"); - return NULL; -*************** -*** 150,156 **** - } - - return glsl_type::get_array_instance(base_type, size->value()); -! } else if (strcmp(type_sym->value(), "struct") == 0) { - assert(false); // FINISHME - } else { - ir_read_error(st, expr, "expected (array ...) or (struct ...); " ---- 151,157 ---- - } - - return glsl_type::get_array_instance(base_type, size->value()); -! } else if (safe_strcmp(type_sym->value(), "struct") == 0) { - assert(false); // FINISHME - } else { - ir_read_error(st, expr, "expected (array ...) or (struct ...); " -*************** -*** 189,195 **** - continue; // not a (function ...); ignore it. - - s_symbol *tag = SX_AS_SYMBOL(sub->subexpressions.get_head()); -! if (tag == NULL || strcmp(tag->value(), "function") != 0) - continue; // not a (function ...); ignore it. - - ir_function *f = read_function(st, sub, true); ---- 190,196 ---- - continue; // not a (function ...); ignore it. - - s_symbol *tag = SX_AS_SYMBOL(sub->subexpressions.get_head()); -! if (tag == NULL || safe_strcmp(tag->value(), "function") != 0) - continue; // not a (function ...); ignore it. - - ir_function *f = read_function(st, sub, true); -*************** -*** 233,239 **** - } - - s_symbol *tag = SX_AS_SYMBOL(siglist->subexpressions.get_head()); -! if (tag == NULL || strcmp(tag->value(), "signature") != 0) { - ir_read_error(st, siglist, "Expected (signature ...)"); - return NULL; - } ---- 234,240 ---- - } - - s_symbol *tag = SX_AS_SYMBOL(siglist->subexpressions.get_head()); -! if (tag == NULL || safe_strcmp(tag->value(), "signature") != 0) { - ir_read_error(st, siglist, "Expected (signature ...)"); - return NULL; - } -*************** -*** 267,273 **** - return; - } - s_symbol *paramtag = SX_AS_SYMBOL(paramlist->subexpressions.get_head()); -! if (paramtag == NULL || strcmp(paramtag->value(), "parameters") != 0) { - ir_read_error(st, paramlist, "Expected (parameters ...)"); - return; - } ---- 268,274 ---- - return; - } - s_symbol *paramtag = SX_AS_SYMBOL(paramlist->subexpressions.get_head()); -! if (paramtag == NULL || safe_strcmp(paramtag->value(), "parameters") != 0) { - ir_read_error(st, paramlist, "Expected (parameters ...)"); - return; - } -*************** -*** 364,372 **** - void *ctx = st; - s_symbol *symbol = SX_AS_SYMBOL(expr); - if (symbol != NULL) { -! if (strcmp(symbol->value(), "break") == 0 && loop_ctx != NULL) - return new(ctx) ir_loop_jump(ir_loop_jump::jump_break); -! if (strcmp(symbol->value(), "continue") == 0 && loop_ctx != NULL) - return new(ctx) ir_loop_jump(ir_loop_jump::jump_continue); - } - ---- 365,373 ---- - void *ctx = st; - s_symbol *symbol = SX_AS_SYMBOL(expr); - if (symbol != NULL) { -! if (safe_strcmp(symbol->value(), "break") == 0 && loop_ctx != NULL) - return new(ctx) ir_loop_jump(ir_loop_jump::jump_break); -! if (safe_strcmp(symbol->value(), "continue") == 0 && loop_ctx != NULL) - return new(ctx) ir_loop_jump(ir_loop_jump::jump_continue); - } - -*************** -*** 383,399 **** - } - - ir_instruction *inst = NULL; -! if (strcmp(tag->value(), "declare") == 0) { - inst = read_declaration(st, list); -! } else if (strcmp(tag->value(), "assign") == 0) { - inst = read_assignment(st, list); -! } else if (strcmp(tag->value(), "if") == 0) { - inst = read_if(st, list, loop_ctx); -! } else if (strcmp(tag->value(), "loop") == 0) { - inst = read_loop(st, list); -! } else if (strcmp(tag->value(), "return") == 0) { - inst = read_return(st, list); -! } else if (strcmp(tag->value(), "function") == 0) { - inst = read_function(st, list, false); - } else { - inst = read_rvalue(st, list); ---- 384,400 ---- - } - - ir_instruction *inst = NULL; -! if (safe_strcmp(tag->value(), "declare") == 0) { - inst = read_declaration(st, list); -! } else if (safe_strcmp(tag->value(), "assign") == 0) { - inst = read_assignment(st, list); -! } else if (safe_strcmp(tag->value(), "if") == 0) { - inst = read_if(st, list, loop_ctx); -! } else if (safe_strcmp(tag->value(), "loop") == 0) { - inst = read_loop(st, list); -! } else if (safe_strcmp(tag->value(), "return") == 0) { - inst = read_return(st, list); -! } else if (safe_strcmp(tag->value(), "function") == 0) { - inst = read_function(st, list, false); - } else { - inst = read_rvalue(st, list); -*************** -*** 443,467 **** - } - - // FINISHME: Check for duplicate/conflicting qualifiers. -! if (strcmp(qualifier->value(), "centroid") == 0) { - var->centroid = 1; -! } else if (strcmp(qualifier->value(), "invariant") == 0) { - var->invariant = 1; -! } else if (strcmp(qualifier->value(), "uniform") == 0) { - var->mode = ir_var_uniform; -! } else if (strcmp(qualifier->value(), "auto") == 0) { - var->mode = ir_var_auto; -! } else if (strcmp(qualifier->value(), "in") == 0) { - var->mode = ir_var_in; -! } else if (strcmp(qualifier->value(), "out") == 0) { - var->mode = ir_var_out; -! } else if (strcmp(qualifier->value(), "inout") == 0) { - var->mode = ir_var_inout; -! } else if (strcmp(qualifier->value(), "smooth") == 0) { - var->interpolation = ir_var_smooth; -! } else if (strcmp(qualifier->value(), "flat") == 0) { - var->interpolation = ir_var_flat; -! } else if (strcmp(qualifier->value(), "noperspective") == 0) { - var->interpolation = ir_var_noperspective; - } else { - ir_read_error(st, list, "unknown qualifier: %s", qualifier->value()); ---- 444,468 ---- - } - - // FINISHME: Check for duplicate/conflicting qualifiers. -! if (safe_strcmp(qualifier->value(), "centroid") == 0) { - var->centroid = 1; -! } else if (safe_strcmp(qualifier->value(), "invariant") == 0) { - var->invariant = 1; -! } else if (safe_strcmp(qualifier->value(), "uniform") == 0) { - var->mode = ir_var_uniform; -! } else if (safe_strcmp(qualifier->value(), "auto") == 0) { - var->mode = ir_var_auto; -! } else if (safe_strcmp(qualifier->value(), "in") == 0) { - var->mode = ir_var_in; -! } else if (safe_strcmp(qualifier->value(), "out") == 0) { - var->mode = ir_var_out; -! } else if (safe_strcmp(qualifier->value(), "inout") == 0) { - var->mode = ir_var_inout; -! } else if (safe_strcmp(qualifier->value(), "smooth") == 0) { - var->interpolation = ir_var_smooth; -! } else if (safe_strcmp(qualifier->value(), "flat") == 0) { - var->interpolation = ir_var_flat; -! } else if (safe_strcmp(qualifier->value(), "noperspective") == 0) { - var->interpolation = ir_var_noperspective; - } else { - ir_read_error(st, list, "unknown qualifier: %s", qualifier->value()); -*************** -*** 574,586 **** - ir_rvalue *rvalue = read_dereference(st, list); - if (rvalue != NULL || st->error) - return rvalue; -! else if (strcmp(tag->value(), "swiz") == 0) { - rvalue = read_swizzle(st, list); -! } else if (strcmp(tag->value(), "expression") == 0) { - rvalue = read_expression(st, list); -! } else if (strcmp(tag->value(), "call") == 0) { - rvalue = read_call(st, list); -! } else if (strcmp(tag->value(), "constant") == 0) { - rvalue = read_constant(st, list); - } else { - rvalue = read_texture(st, list); ---- 575,587 ---- - ir_rvalue *rvalue = read_dereference(st, list); - if (rvalue != NULL || st->error) - return rvalue; -! else if (safe_strcmp(tag->value(), "swiz") == 0) { - rvalue = read_swizzle(st, list); -! } else if (safe_strcmp(tag->value(), "expression") == 0) { - rvalue = read_expression(st, list); -! } else if (safe_strcmp(tag->value(), "call") == 0) { - rvalue = read_call(st, list); -! } else if (safe_strcmp(tag->value(), "constant") == 0) { - rvalue = read_constant(st, list); - } else { - rvalue = read_texture(st, list); -*************** -*** 921,931 **** - s_symbol *tag = SX_AS_SYMBOL(list->subexpressions.head); - assert(tag != NULL); - -! if (strcmp(tag->value(), "var_ref") == 0) - return read_var_ref(st, list); -! if (strcmp(tag->value(), "array_ref") == 0) - return read_array_ref(st, list); -! if (strcmp(tag->value(), "record_ref") == 0) - return read_record_ref(st, list); - return NULL; - } ---- 922,932 ---- - s_symbol *tag = SX_AS_SYMBOL(list->subexpressions.head); - assert(tag != NULL); - -! if (safe_strcmp(tag->value(), "var_ref") == 0) - return read_var_ref(st, list); -! if (safe_strcmp(tag->value(), "array_ref") == 0) - return read_array_ref(st, list); -! if (safe_strcmp(tag->value(), "record_ref") == 0) - return read_record_ref(st, list); - return NULL; - } -diff -c -r Mesa-7.9/src/glsl/ir_structure_splitting.cpp MesaLib/src/glsl/ir_structure_splitting.cpp -*** Mesa-7.9/src/glsl/ir_structure_splitting.cpp Fri Oct 1 15:51:28 2010 ---- MesaLib/src/glsl/ir_structure_splitting.cpp Fri Oct 22 15:36:52 2010 -*************** -*** 37,42 **** ---- 37,43 ---- - #include "ir_print_visitor.h" - #include "ir_rvalue_visitor.h" - #include "glsl_types.h" -+ #include "safe_strcmp.h" - - static bool debug = false; - -*************** -*** 228,235 **** - - unsigned int i; - for (i = 0; i < entry->var->type->length; i++) { -! if (strcmp(deref_record->field, -! entry->var->type->fields.structure[i].name) == 0) - break; - } - assert(i != entry->var->type->length); ---- 229,236 ---- - - unsigned int i; - for (i = 0; i < entry->var->type->length; i++) { -! if (safe_strcmp(deref_record->field, -! entry->var->type->fields.structure[i].name) == 0) - break; - } - assert(i != entry->var->type->length); -diff -c -r Mesa-7.9/src/glsl/ir_validate.cpp MesaLib/src/glsl/ir_validate.cpp -*** Mesa-7.9/src/glsl/ir_validate.cpp Mon Oct 4 18:58:00 2010 ---- MesaLib/src/glsl/ir_validate.cpp Fri Oct 22 15:37:24 2010 -*************** -*** 33,39 **** - * a dereference chain. - */ - -! #include <inttypes.h> - #include "ir.h" - #include "ir_hierarchical_visitor.h" - #include "program/hash_table.h" ---- 33,40 ---- - * a dereference chain. - */ - -! /* The use of inttypes.h seems to be unnecessary and causes problems on Windows. */ -! /* #include <inttypes.h> */ - #include "ir.h" - #include "ir_hierarchical_visitor.h" - #include "program/hash_table.h" -diff -c -r Mesa-7.9/src/glsl/linker.cpp MesaLib/src/glsl/linker.cpp -*** Mesa-7.9/src/glsl/linker.cpp Fri Oct 1 15:51:28 2010 ---- MesaLib/src/glsl/linker.cpp Fri Oct 22 15:38:08 2010 -*************** -*** 79,84 **** ---- 79,85 ---- - #include "program/hash_table.h" - #include "linker.h" - #include "ir_optimization.h" -+ #include "safe_strcmp.h" - - /** - * Visitor that determines whether or not a variable is ever written. -*************** -*** 95,101 **** - { - ir_variable *const var = ir->lhs->variable_referenced(); - -! if (strcmp(name, var->name) == 0) { - found = true; - return visit_stop; - } ---- 96,102 ---- - { - ir_variable *const var = ir->lhs->variable_referenced(); - -! if (safe_strcmp(name, var->name) == 0) { - found = true; - return visit_stop; - } -*************** -*** 113,119 **** - if (sig_param->mode == ir_var_out || - sig_param->mode == ir_var_inout) { - ir_variable *var = param_rval->variable_referenced(); -! if (var && strcmp(name, var->name) == 0) { - found = true; - return visit_stop; - } ---- 114,120 ---- - if (sig_param->mode == ir_var_out || - sig_param->mode == ir_var_inout) { - ir_variable *var = param_rval->variable_referenced(); -! if (var && safe_strcmp(name, var->name) == 0) { - found = true; - return visit_stop; - } -*************** -*** 148,154 **** - - virtual ir_visitor_status visit(ir_dereference_variable *ir) - { -! if (strcmp(this->name, ir->var->name) == 0) { - this->found = true; - return visit_stop; - } ---- 149,155 ---- - - virtual ir_visitor_status visit(ir_dereference_variable *ir) - { -! if (safe_strcmp(this->name, ir->var->name) == 0) { - this->found = true; - return visit_stop; - } -*************** -*** 876,882 **** - if (!other_var) - continue; - -! if (strcmp(var->name, other_var->name) == 0 && - other_var->max_array_access > size) { - size = other_var->max_array_access; - } ---- 877,883 ---- - if (!other_var) - continue; - -! if (safe_strcmp(var->name, other_var->name) == 0 && - other_var->max_array_access > size) { - size = other_var->max_array_access; - } -diff -c -r Mesa-7.9/src/mapi/glapi/glapi_nop.c MesaLib/src/mapi/glapi/glapi_nop.c -*** Mesa-7.9/src/mapi/glapi/glapi_nop.c Fri Oct 1 15:51:28 2010 ---- MesaLib/src/mapi/glapi/glapi_nop.c Fri Oct 22 15:41:35 2010 -*************** -*** 107,113 **** - return 0; - } - -! #define TABLE_ENTRY(name) (_glapi_proc) NoOpGeneric - - #endif - ---- 107,138 ---- - return 0; - } - -! /** -! * This is called if the user somehow calls an unassigned GL dispatch function. -! */ -! static GLint -! NoOpUnused(void) -! { -! return NoOpGeneric(); -! } -! -! /* -! * It is necessary to generate custom no-op entry points at least on -! * Windows, where the __stdcall calling convention is used (callee -! * cleans the stack). This calling convention can not tolerate a -! * mismatch between the numbers of arguments in caller and callee. -! */ -! #define KEYWORD1 static -! #define KEYWORD1_ALT static -! #define KEYWORD2 GLAPIENTRY -! #define NAME(func) NoOp##func -! #define DISPATCH(func, args, msg) NoOpGeneric(); -! #define RETURN_DISPATCH(func, args, msg) return NoOpGeneric(); -! -! /* -! * Defines for the table of no-op entry points. -! */ -! #define TABLE_ENTRY(name) (_glapi_proc) NoOp##name - - #endif - -diff -c -r Mesa-7.9/src/mesa/main/compiler.h MesaLib/src/mesa/main/compiler.h -*** Mesa-7.9/src/mesa/main/compiler.h Fri Oct 1 15:51:28 2010 ---- MesaLib/src/mesa/main/compiler.h Fri Oct 22 15:44:23 2010 -*************** -*** 175,181 **** ---- 175,183 ---- - # define PUBLIC __attribute__((visibility("default"))) - # define USED __attribute__((used)) - #else -+ # ifndef PUBLIC - # define PUBLIC -+ # endif - # define USED - #endif - -diff -c -r Mesa-7.9/src/mesa/main/histogram.c MesaLib/src/mesa/main/histogram.c -*** Mesa-7.9/src/mesa/main/histogram.c Mon Oct 4 18:58:00 2010 ---- MesaLib/src/mesa/main/histogram.c Tue Oct 26 11:17:37 2010 -*************** -*** 32,37 **** ---- 32,40 ---- - #include "macros.h" - #include "main/dispatch.h" - -+ #if defined(_MSC_VER) -+ #pragma optimize("", off) -+ #endif - - #if FEATURE_histogram - -diff -c -r Mesa-7.9/src/mesa/main/image.c MesaLib/src/mesa/main/image.c -*** Mesa-7.9/src/mesa/main/image.c Mon Oct 4 18:58:00 2010 ---- MesaLib/src/mesa/main/image.c Tue Oct 26 11:17:45 2010 -*************** -*** 37,42 **** ---- 37,45 ---- - #include "imports.h" - #include "macros.h" - -+ #if defined(_MSC_VER) -+ #pragma optimize("", off) -+ #endif - - /** - * NOTE: -diff -c -r Mesa-7.9/src/mesa/main/mipmap.c MesaLib/src/mesa/main/mipmap.c -*** Mesa-7.9/src/mesa/main/mipmap.c Fri Oct 1 15:51:28 2010 ---- MesaLib/src/mesa/main/mipmap.c Tue Oct 26 11:17:52 2010 -*************** -*** 34,40 **** - #include "texstore.h" - #include "image.h" - -! - - static GLint - bytes_per_pixel(GLenum datatype, GLuint comps) ---- 34,42 ---- - #include "texstore.h" - #include "image.h" - -! #if defined(_MSC_VER) -! #pragma optimize("", off) -! #endif - - static GLint - bytes_per_pixel(GLenum datatype, GLuint comps) -diff -c -r Mesa-7.9/src/mesa/main/querymatrix.c MesaLib/src/mesa/main/querymatrix.c -*** Mesa-7.9/src/mesa/main/querymatrix.c Mon Oct 4 18:58:00 2010 ---- MesaLib/src/mesa/main/querymatrix.c Wed Oct 6 16:36:08 2010 -*************** -*** 73,79 **** - #elif defined(__APPLE__) || defined(__CYGWIN__) || defined(__FreeBSD__) || \ - defined(__OpenBSD__) || defined(__NetBSD__) || defined(__DragonFly__) || \ - (defined(__sun) && defined(__C99FEATURES__)) || defined(__MINGW32__) || \ -! (defined(__sun) && defined(__GNUC__)) - - /* fpclassify is available. */ - ---- 73,80 ---- - #elif defined(__APPLE__) || defined(__CYGWIN__) || defined(__FreeBSD__) || \ - defined(__OpenBSD__) || defined(__NetBSD__) || defined(__DragonFly__) || \ - (defined(__sun) && defined(__C99FEATURES__)) || defined(__MINGW32__) || \ -! (defined(__sun) && defined(__GNUC__)) || \ -! (defined(__linux) && defined(__GNUC__)) - - /* fpclassify is available. */ - -diff -c -r Mesa-7.9/src/mesa/math/m_eval.c MesaLib/src/mesa/math/m_eval.c -*** Mesa-7.9/src/mesa/math/m_eval.c Thu Feb 4 16:10:40 2010 ---- MesaLib/src/mesa/math/m_eval.c Tue Oct 26 11:18:00 2010 -*************** -*** 41,46 **** ---- 41,50 ---- - #include "main/config.h" - #include "m_eval.h" - -+ #if defined(_MSC_VER) -+ #pragma optimize("", off) -+ #endif -+ - static GLfloat inv_tab[MAX_EVAL_ORDER]; - - -diff -c -r Mesa-7.9/src/mesa/swrast/s_texcombine.c MesaLib/src/mesa/swrast/s_texcombine.c -*** Mesa-7.9/src/mesa/swrast/s_texcombine.c Fri Oct 1 15:51:28 2010 ---- MesaLib/src/mesa/swrast/s_texcombine.c Tue Oct 26 11:01:39 2010 -*************** -*** 34,39 **** ---- 34,42 ---- - #include "s_context.h" - #include "s_texcombine.h" - -+ #if defined(_MSC_VER) -+ #pragma optimize("", off) -+ #endif - - /** - * Pointer to array of float[4] -diff -c -r Mesa-7.9/src/mapi/glapi/gen/gl_apitemp.py MesaLib/src/mapi/glapi/gen/gl_apitemp.py -*** Mesa-7.9/src/mapi/glapi/gen/gl_apitemp.py Mon Aug 15 09:14:29 2011 ---- MesaLib/src/mapi/glapi/gen/gl_apitemp.py Thu Aug 11 21:23:47 2011 -*************** -*** 79,89 **** - comma = ", " - - -- if f.return_type != 'void': -- dispatch = "RETURN_DISPATCH" -- else: -- dispatch = "DISPATCH" -- - need_proto = False - if not f.is_static_entry_point(name): - need_proto = True ---- 79,84 ---- -*************** -*** 97,108 **** - - print '%s %s KEYWORD2 NAME(%s)(%s)' % (keyword, f.return_type, n, f.get_parameter_string(name)) - print '{' -! if p_string == "": -! print ' %s(%s, (), (F, "gl%s();\\n"));' \ -! % (dispatch, f.name, name) - else: -! print ' %s(%s, (%s), (F, "gl%s(%s);\\n", %s));' \ -! % (dispatch, f.name, p_string, name, t_string, o_string) - print '}' - print '' - return ---- 92,113 ---- - - print '%s %s KEYWORD2 NAME(%s)(%s)' % (keyword, f.return_type, n, f.get_parameter_string(name)) - print '{' -! if f.return_type != 'void': -! dispatch = "RETURN_DISPATCH" -! if p_string == "": -! print ' %s(%s, %s, (), (F, "gl%s();\\n"));' \ -! % (dispatch, f.return_type, f.name, name) -! else: -! print ' %s(%s, %s, (%s), (F, "gl%s(%s);\\n", %s));' \ -! % (dispatch, f.return_type, f.name, p_string, name, t_string, o_string) - else: -! dispatch = "DISPATCH" -! if p_string == "": -! print ' %s(%s, (), (F, "gl%s();\\n"));' \ -! % (dispatch, f.name, name) -! else: -! print ' %s(%s, (%s), (F, "gl%s(%s);\\n", %s));' \ -! % (dispatch, f.name, p_string, name, t_string, o_string) - print '}' - print '' - return -*************** -*** 120,126 **** - * NAME(n) - builds the final function name (usually add "gl" prefix) - * DISPATCH(func, args, msg) - code to do dispatch of named function. - * msg is a printf-style debug message. -! * RETURN_DISPATCH(func, args, msg) - code to do dispatch with a return value - * - * Here is an example which generates the usual OpenGL functions: - * #define KEYWORD1 ---- 125,132 ---- - * NAME(n) - builds the final function name (usually add "gl" prefix) - * DISPATCH(func, args, msg) - code to do dispatch of named function. - * msg is a printf-style debug message. -! * RETURN_DISPATCH(type, func, args, msg) - code to do dispatch with a -! * return value of type. - * - * Here is an example which generates the usual OpenGL functions: - * #define KEYWORD1 -diff -c -r Mesa-7.9/src/mapi/glapi/glapi_dispatch.c MesaLib/src/mapi/glapi/glapi_dispatch.c -*** Mesa-7.9/src/mapi/glapi/glapi_dispatch.c Mon Aug 15 09:14:30 2011 ---- MesaLib/src/mapi/glapi/glapi_dispatch.c Thu Aug 11 21:25:55 2011 -*************** -*** 65,71 **** - fprintf MESSAGE; \ - CALL_ ## FUNC(GET_DISPATCH(), ARGS); - -! #define RETURN_DISPATCH(FUNC, ARGS, MESSAGE) \ - fprintf MESSAGE; \ - return CALL_ ## FUNC(GET_DISPATCH(), ARGS); - ---- 65,71 ---- - fprintf MESSAGE; \ - CALL_ ## FUNC(GET_DISPATCH(), ARGS); - -! #define RETURN_DISPATCH(TYPE, FUNC, ARGS, MESSAGE) \ - fprintf MESSAGE; \ - return CALL_ ## FUNC(GET_DISPATCH(), ARGS); - -*************** -*** 74,80 **** - #define DISPATCH(FUNC, ARGS, MESSAGE) \ - CALL_ ## FUNC(GET_DISPATCH(), ARGS); - -! #define RETURN_DISPATCH(FUNC, ARGS, MESSAGE) \ - return CALL_ ## FUNC(GET_DISPATCH(), ARGS); - - #endif /* logging */ ---- 74,80 ---- - #define DISPATCH(FUNC, ARGS, MESSAGE) \ - CALL_ ## FUNC(GET_DISPATCH(), ARGS); - -! #define RETURN_DISPATCH(TYPE, FUNC, ARGS, MESSAGE) \ - return CALL_ ## FUNC(GET_DISPATCH(), ARGS); - - #endif /* logging */ -diff -c -r Mesa-7.9/src/mapi/glapi/glapi_nop.c MesaLib/src/mapi/glapi/glapi_nop.c -*** Mesa-7.9/src/mapi/glapi/glapi_nop.c Mon Aug 15 09:14:30 2011 ---- MesaLib/src/mapi/glapi/glapi_nop.c Thu Aug 11 21:29:46 2011 -*************** -*** 86,92 **** - #define KEYWORD2 GLAPIENTRY - #define NAME(func) NoOp##func - #define DISPATCH(func, args, msg) Warn(#func); -! #define RETURN_DISPATCH(func, args, msg) Warn(#func); return 0 - - - /* ---- 86,92 ---- - #define KEYWORD2 GLAPIENTRY - #define NAME(func) NoOp##func - #define DISPATCH(func, args, msg) Warn(#func); -! #define RETURN_DISPATCH(type, func, args, msg) Warn(#func); return (type)0 - - - /* -*************** -*** 96,102 **** - - #else - -! static int - NoOpGeneric(void) - { - #if !defined(_WIN32_WCE) ---- 96,102 ---- - - #else - -! void - NoOpGeneric(void) - { - #if !defined(_WIN32_WCE) -*************** -*** 104,110 **** - fprintf(stderr, "GL User Error: calling GL function without a rendering context\n"); - } - #endif -- return 0; - } - - /** ---- 104,109 ---- -*************** -*** 113,119 **** - static GLint - NoOpUnused(void) - { -! return NoOpGeneric(); - } - - /* ---- 112,119 ---- - static GLint - NoOpUnused(void) - { -! NoOpGeneric(); -! return 0; - } - - /* -*************** -*** 127,133 **** - #define KEYWORD2 GLAPIENTRY - #define NAME(func) NoOp##func - #define DISPATCH(func, args, msg) NoOpGeneric(); -! #define RETURN_DISPATCH(func, args, msg) return NoOpGeneric(); - - /* - * Defines for the table of no-op entry points. ---- 127,133 ---- - #define KEYWORD2 GLAPIENTRY - #define NAME(func) NoOp##func - #define DISPATCH(func, args, msg) NoOpGeneric(); -! #define RETURN_DISPATCH(type, func, args, msg) NoOpGeneric(); return (type)0 - - /* - * Defines for the table of no-op entry points.
diff --git a/third_party/mesa/chromium/empty.cc b/third_party/mesa/chromium/empty.cc deleted file mode 100644 index e69de29..0000000 --- a/third_party/mesa/chromium/empty.cc +++ /dev/null
diff --git a/third_party/mesa/generate_git_sha1.py b/third_party/mesa/generate_git_sha1.py deleted file mode 100644 index 5e41c85..0000000 --- a/third_party/mesa/generate_git_sha1.py +++ /dev/null
@@ -1,35 +0,0 @@ -# Copyright (c) 2013 The Chromium Authors. All rights reserved. -# Use of this source code is governed by a BSD-style license that can be -# found in the LICENSE file. - -import os -import os.path -import sys - -output = sys.argv[1] -parentdir = os.path.abspath(os.path.join(output, os.pardir)) - -#The original body of this file is generated by this bash script: -# -#touch "${DIR}/git_sha1.h.tmp" -#if test -d .git; then \ -# if which git > /dev/null; then \ -# git log -n 1 --oneline | \ -# sed 's/^\([^ ]*\) .*/#define MESA_GIT_SHA1 "git-\1"/' \ -# > "${DIR}/git_sha1.h.tmp" ; \ -# fi \ -# fi -#if ! cmp -s "${DIR}/git_sha1.h.tmp" "${DIR}/git_sha1.h"; then \ -# mv "${DIR}/git_sha1.h.tmp" "${DIR}/git_sha1.h" ;\ -# else \ -# rm "${DIR}/git_sha1.h.tmp" ;\ -# fi -# -#However, Chromium shouldn't depend on Bash, and this preprocessor macro isn't -#neccessary in the first place - -if not os.path.isdir(parentdir): - os.makedirs(parentdir) - -with open(output, "w") as f: - pass
diff --git a/third_party/mesa/redirectoutput.py b/third_party/mesa/redirectoutput.py deleted file mode 100644 index bcd2355..0000000 --- a/third_party/mesa/redirectoutput.py +++ /dev/null
@@ -1,29 +0,0 @@ -# Copyright (c) 2013 The Chromium Authors. All rights reserved. -# Use of this source code is governed by a BSD-style license that can be -# found in the LICENSE file. - -import os -import os.path -import subprocess -import sys - -if len(sys.argv) < 3: - print "Usage: %s OUTPUTFILE SCRIPTNAME ARGUMENTS" % sys.argv[0] - print "Re-execs the python interpreter against SCRIPTNAME with ARGS," - print "redirecting output to OUTPUTFILE." - sys.exit(1) - -abs_outputfile = os.path.abspath(sys.argv[1]) -abs_outputdir = os.path.dirname(abs_outputfile) - -if not os.path.isdir(abs_outputdir): - os.makedirs(abs_outputdir) - -ret = 0 - -with open(abs_outputfile, "w") as f: - ret = subprocess.Popen([sys.executable] + sys.argv[2:], stdout=f).wait() - -if ret: - os.remove(abs_outputfile) - sys.exit(ret)
diff --git a/third_party/mesa_headers/BUILD.gn b/third_party/mesa_headers/BUILD.gn new file mode 100644 index 0000000..d96b7f8 --- /dev/null +++ b/third_party/mesa_headers/BUILD.gn
@@ -0,0 +1,11 @@ +# 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. + +config("mesa_headers_config") { + include_dirs = [ "." ] +} + +source_set("mesa_headers") { + public_configs = [ ":mesa_headers_config" ] +}
diff --git a/third_party/mesa_headers/GL/gl.h b/third_party/mesa_headers/GL/gl.h new file mode 100644 index 0000000..60518d2 --- /dev/null +++ b/third_party/mesa_headers/GL/gl.h
@@ -0,0 +1,2236 @@ +/* + * Mesa 3-D graphics library + * Version: 7.6 + * + * Copyright (C) 1999-2006 Brian Paul All Rights Reserved. + * Copyright (C) 2009 VMware, Inc. All Rights Reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included + * in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS + * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN + * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN + * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ + + +#ifndef __gl_h_ +#define __gl_h_ + +#if defined(USE_MGL_NAMESPACE) +#include "gl_mangle.h" +#endif + + +/********************************************************************** + * Begin system-specific stuff. Do not do any of this when building + * for SciTech SNAP, as this is all done before this header file is + * included. + */ +#if !defined(__SCITECH_SNAP__) + +#if defined(__BEOS__) +#include <stdlib.h> /* to get some BeOS-isms */ +#endif + +#if !defined(OPENSTEP) && (defined(NeXT) || defined(NeXT_PDO)) +#define OPENSTEP +#endif + +#if defined(_WIN32) && !defined(__WIN32__) && !defined(__CYGWIN__) +#define __WIN32__ +#endif + +#if !defined(OPENSTEP) && (defined(__WIN32__) && !defined(__CYGWIN__)) +# if (defined(_MSC_VER) || defined(__MINGW32__)) && defined(BUILD_GL32) /* tag specify we're building mesa as a DLL */ +# define GLAPI __declspec(dllexport) +# elif (defined(_MSC_VER) || defined(__MINGW32__)) && defined(_DLL) /* tag specifying we're building for DLL runtime support */ +# define GLAPI __declspec(dllimport) +# else /* for use with static link lib build of Win32 edition only */ +# define GLAPI extern +# endif /* _STATIC_MESA support */ +# if defined(__MINGW32__) && defined(GL_NO_STDCALL) || defined(UNDER_CE) /* The generated DLLs by MingW with STDCALL are not compatible with the ones done by Microsoft's compilers */ +# define GLAPIENTRY +# else +# define GLAPIENTRY __stdcall +# endif +#elif defined(__CYGWIN__) && defined(USE_OPENGL32) /* use native windows opengl32 */ +# define GLAPI extern +# define GLAPIENTRY __stdcall +#elif (defined(__GNUC__) && __GNUC__ >= 4) || (defined(__SUNPRO_C) && (__SUNPRO_C >= 0x590)) +# define GLAPI __attribute__((visibility("default"))) +# define GLAPIENTRY +#endif /* WIN32 && !CYGWIN */ + +/* See https://bugs.freedesktop.org/show_bug.cgi?id=77749 */ +#if (defined(__BEOS__) && defined(__POWERPC__)) /* || defined(__QUICKDRAW__) */ +# define PRAGMA_EXPORT_SUPPORTED 1 +#endif + +/* + * WINDOWS: Include windows.h here to define APIENTRY. + * It is also useful when applications include this file by + * including only glut.h, since glut.h depends on windows.h. + * Applications needing to include windows.h with parms other + * than "WIN32_LEAN_AND_MEAN" may include windows.h before + * glut.h or gl.h. + */ +#if defined(_WIN32) && !defined(APIENTRY) && !defined(__CYGWIN__) +#ifndef WIN32_LEAN_AND_MEAN +#define WIN32_LEAN_AND_MEAN 1 +#endif +#include <windows.h> +#endif + +#if defined(macintosh) && PRAGMA_IMPORT_SUPPORTED +#pragma import on +#endif + +#ifndef GLAPI +#define GLAPI extern +#endif + +#ifndef GLAPIENTRY +#define GLAPIENTRY +#endif + +#ifndef APIENTRY +#define APIENTRY GLAPIENTRY +#endif + +/* "P" suffix to be used for a pointer to a function */ +#ifndef APIENTRYP +#define APIENTRYP APIENTRY * +#endif + +#ifndef GLAPIENTRYP +#define GLAPIENTRYP GLAPIENTRY * +#endif + +#ifdef CENTERLINE_CLPP +#define signed +#endif + +#if defined(PRAGMA_EXPORT_SUPPORTED) +#pragma export on +#endif + +#endif /* !__SCITECH_SNAP__ */ +/* + * End system-specific stuff. + **********************************************************************/ + + + +#ifdef __cplusplus +extern "C" { +#endif + + + +#define GL_VERSION_1_1 1 +#define GL_VERSION_1_2 1 +#define GL_VERSION_1_3 1 +#define GL_ARB_imaging 1 + + +/* + * Datatypes + */ +typedef unsigned int GLenum; +typedef unsigned char GLboolean; +typedef unsigned int GLbitfield; +typedef void GLvoid; +typedef signed char GLbyte; /* 1-byte signed */ +typedef short GLshort; /* 2-byte signed */ +typedef int GLint; /* 4-byte signed */ +typedef unsigned char GLubyte; /* 1-byte unsigned */ +typedef unsigned short GLushort; /* 2-byte unsigned */ +typedef unsigned int GLuint; /* 4-byte unsigned */ +typedef int GLsizei; /* 4-byte signed */ +typedef float GLfloat; /* single precision float */ +typedef float GLclampf; /* single precision float in [0,1] */ +typedef double GLdouble; /* double precision float */ +typedef double GLclampd; /* double precision float in [0,1] */ + + + +/* + * Constants + */ + +/* Boolean values */ +#define GL_FALSE 0x0 +#define GL_TRUE 0x1 + +/* Data types */ +#define GL_BYTE 0x1400 +#define GL_UNSIGNED_BYTE 0x1401 +#define GL_SHORT 0x1402 +#define GL_UNSIGNED_SHORT 0x1403 +#define GL_INT 0x1404 +#define GL_UNSIGNED_INT 0x1405 +#define GL_FLOAT 0x1406 +#define GL_2_BYTES 0x1407 +#define GL_3_BYTES 0x1408 +#define GL_4_BYTES 0x1409 +#define GL_DOUBLE 0x140A + +/* Primitives */ +#define GL_POINTS 0x0000 +#define GL_LINES 0x0001 +#define GL_LINE_LOOP 0x0002 +#define GL_LINE_STRIP 0x0003 +#define GL_TRIANGLES 0x0004 +#define GL_TRIANGLE_STRIP 0x0005 +#define GL_TRIANGLE_FAN 0x0006 +#define GL_QUADS 0x0007 +#define GL_QUAD_STRIP 0x0008 +#define GL_POLYGON 0x0009 + +/* Vertex Arrays */ +#define GL_VERTEX_ARRAY 0x8074 +#define GL_NORMAL_ARRAY 0x8075 +#define GL_COLOR_ARRAY 0x8076 +#define GL_INDEX_ARRAY 0x8077 +#define GL_TEXTURE_COORD_ARRAY 0x8078 +#define GL_EDGE_FLAG_ARRAY 0x8079 +#define GL_VERTEX_ARRAY_SIZE 0x807A +#define GL_VERTEX_ARRAY_TYPE 0x807B +#define GL_VERTEX_ARRAY_STRIDE 0x807C +#define GL_NORMAL_ARRAY_TYPE 0x807E +#define GL_NORMAL_ARRAY_STRIDE 0x807F +#define GL_COLOR_ARRAY_SIZE 0x8081 +#define GL_COLOR_ARRAY_TYPE 0x8082 +#define GL_COLOR_ARRAY_STRIDE 0x8083 +#define GL_INDEX_ARRAY_TYPE 0x8085 +#define GL_INDEX_ARRAY_STRIDE 0x8086 +#define GL_TEXTURE_COORD_ARRAY_SIZE 0x8088 +#define GL_TEXTURE_COORD_ARRAY_TYPE 0x8089 +#define GL_TEXTURE_COORD_ARRAY_STRIDE 0x808A +#define GL_EDGE_FLAG_ARRAY_STRIDE 0x808C +#define GL_VERTEX_ARRAY_POINTER 0x808E +#define GL_NORMAL_ARRAY_POINTER 0x808F +#define GL_COLOR_ARRAY_POINTER 0x8090 +#define GL_INDEX_ARRAY_POINTER 0x8091 +#define GL_TEXTURE_COORD_ARRAY_POINTER 0x8092 +#define GL_EDGE_FLAG_ARRAY_POINTER 0x8093 +#define GL_V2F 0x2A20 +#define GL_V3F 0x2A21 +#define GL_C4UB_V2F 0x2A22 +#define GL_C4UB_V3F 0x2A23 +#define GL_C3F_V3F 0x2A24 +#define GL_N3F_V3F 0x2A25 +#define GL_C4F_N3F_V3F 0x2A26 +#define GL_T2F_V3F 0x2A27 +#define GL_T4F_V4F 0x2A28 +#define GL_T2F_C4UB_V3F 0x2A29 +#define GL_T2F_C3F_V3F 0x2A2A +#define GL_T2F_N3F_V3F 0x2A2B +#define GL_T2F_C4F_N3F_V3F 0x2A2C +#define GL_T4F_C4F_N3F_V4F 0x2A2D + +/* Matrix Mode */ +#define GL_MATRIX_MODE 0x0BA0 +#define GL_MODELVIEW 0x1700 +#define GL_PROJECTION 0x1701 +#define GL_TEXTURE 0x1702 + +/* Points */ +#define GL_POINT_SMOOTH 0x0B10 +#define GL_POINT_SIZE 0x0B11 +#define GL_POINT_SIZE_GRANULARITY 0x0B13 +#define GL_POINT_SIZE_RANGE 0x0B12 + +/* Lines */ +#define GL_LINE_SMOOTH 0x0B20 +#define GL_LINE_STIPPLE 0x0B24 +#define GL_LINE_STIPPLE_PATTERN 0x0B25 +#define GL_LINE_STIPPLE_REPEAT 0x0B26 +#define GL_LINE_WIDTH 0x0B21 +#define GL_LINE_WIDTH_GRANULARITY 0x0B23 +#define GL_LINE_WIDTH_RANGE 0x0B22 + +/* Polygons */ +#define GL_POINT 0x1B00 +#define GL_LINE 0x1B01 +#define GL_FILL 0x1B02 +#define GL_CW 0x0900 +#define GL_CCW 0x0901 +#define GL_FRONT 0x0404 +#define GL_BACK 0x0405 +#define GL_POLYGON_MODE 0x0B40 +#define GL_POLYGON_SMOOTH 0x0B41 +#define GL_POLYGON_STIPPLE 0x0B42 +#define GL_EDGE_FLAG 0x0B43 +#define GL_CULL_FACE 0x0B44 +#define GL_CULL_FACE_MODE 0x0B45 +#define GL_FRONT_FACE 0x0B46 +#define GL_POLYGON_OFFSET_FACTOR 0x8038 +#define GL_POLYGON_OFFSET_UNITS 0x2A00 +#define GL_POLYGON_OFFSET_POINT 0x2A01 +#define GL_POLYGON_OFFSET_LINE 0x2A02 +#define GL_POLYGON_OFFSET_FILL 0x8037 + +/* Display Lists */ +#define GL_COMPILE 0x1300 +#define GL_COMPILE_AND_EXECUTE 0x1301 +#define GL_LIST_BASE 0x0B32 +#define GL_LIST_INDEX 0x0B33 +#define GL_LIST_MODE 0x0B30 + +/* Depth buffer */ +#define GL_NEVER 0x0200 +#define GL_LESS 0x0201 +#define GL_EQUAL 0x0202 +#define GL_LEQUAL 0x0203 +#define GL_GREATER 0x0204 +#define GL_NOTEQUAL 0x0205 +#define GL_GEQUAL 0x0206 +#define GL_ALWAYS 0x0207 +#define GL_DEPTH_TEST 0x0B71 +#define GL_DEPTH_BITS 0x0D56 +#define GL_DEPTH_CLEAR_VALUE 0x0B73 +#define GL_DEPTH_FUNC 0x0B74 +#define GL_DEPTH_RANGE 0x0B70 +#define GL_DEPTH_WRITEMASK 0x0B72 +#define GL_DEPTH_COMPONENT 0x1902 + +/* Lighting */ +#define GL_LIGHTING 0x0B50 +#define GL_LIGHT0 0x4000 +#define GL_LIGHT1 0x4001 +#define GL_LIGHT2 0x4002 +#define GL_LIGHT3 0x4003 +#define GL_LIGHT4 0x4004 +#define GL_LIGHT5 0x4005 +#define GL_LIGHT6 0x4006 +#define GL_LIGHT7 0x4007 +#define GL_SPOT_EXPONENT 0x1205 +#define GL_SPOT_CUTOFF 0x1206 +#define GL_CONSTANT_ATTENUATION 0x1207 +#define GL_LINEAR_ATTENUATION 0x1208 +#define GL_QUADRATIC_ATTENUATION 0x1209 +#define GL_AMBIENT 0x1200 +#define GL_DIFFUSE 0x1201 +#define GL_SPECULAR 0x1202 +#define GL_SHININESS 0x1601 +#define GL_EMISSION 0x1600 +#define GL_POSITION 0x1203 +#define GL_SPOT_DIRECTION 0x1204 +#define GL_AMBIENT_AND_DIFFUSE 0x1602 +#define GL_COLOR_INDEXES 0x1603 +#define GL_LIGHT_MODEL_TWO_SIDE 0x0B52 +#define GL_LIGHT_MODEL_LOCAL_VIEWER 0x0B51 +#define GL_LIGHT_MODEL_AMBIENT 0x0B53 +#define GL_FRONT_AND_BACK 0x0408 +#define GL_SHADE_MODEL 0x0B54 +#define GL_FLAT 0x1D00 +#define GL_SMOOTH 0x1D01 +#define GL_COLOR_MATERIAL 0x0B57 +#define GL_COLOR_MATERIAL_FACE 0x0B55 +#define GL_COLOR_MATERIAL_PARAMETER 0x0B56 +#define GL_NORMALIZE 0x0BA1 + +/* User clipping planes */ +#define GL_CLIP_PLANE0 0x3000 +#define GL_CLIP_PLANE1 0x3001 +#define GL_CLIP_PLANE2 0x3002 +#define GL_CLIP_PLANE3 0x3003 +#define GL_CLIP_PLANE4 0x3004 +#define GL_CLIP_PLANE5 0x3005 + +/* Accumulation buffer */ +#define GL_ACCUM_RED_BITS 0x0D58 +#define GL_ACCUM_GREEN_BITS 0x0D59 +#define GL_ACCUM_BLUE_BITS 0x0D5A +#define GL_ACCUM_ALPHA_BITS 0x0D5B +#define GL_ACCUM_CLEAR_VALUE 0x0B80 +#define GL_ACCUM 0x0100 +#define GL_ADD 0x0104 +#define GL_LOAD 0x0101 +#define GL_MULT 0x0103 +#define GL_RETURN 0x0102 + +/* Alpha testing */ +#define GL_ALPHA_TEST 0x0BC0 +#define GL_ALPHA_TEST_REF 0x0BC2 +#define GL_ALPHA_TEST_FUNC 0x0BC1 + +/* Blending */ +#define GL_BLEND 0x0BE2 +#define GL_BLEND_SRC 0x0BE1 +#define GL_BLEND_DST 0x0BE0 +#define GL_ZERO 0x0 +#define GL_ONE 0x1 +#define GL_SRC_COLOR 0x0300 +#define GL_ONE_MINUS_SRC_COLOR 0x0301 +#define GL_SRC_ALPHA 0x0302 +#define GL_ONE_MINUS_SRC_ALPHA 0x0303 +#define GL_DST_ALPHA 0x0304 +#define GL_ONE_MINUS_DST_ALPHA 0x0305 +#define GL_DST_COLOR 0x0306 +#define GL_ONE_MINUS_DST_COLOR 0x0307 +#define GL_SRC_ALPHA_SATURATE 0x0308 + +/* Render Mode */ +#define GL_FEEDBACK 0x1C01 +#define GL_RENDER 0x1C00 +#define GL_SELECT 0x1C02 + +/* Feedback */ +#define GL_2D 0x0600 +#define GL_3D 0x0601 +#define GL_3D_COLOR 0x0602 +#define GL_3D_COLOR_TEXTURE 0x0603 +#define GL_4D_COLOR_TEXTURE 0x0604 +#define GL_POINT_TOKEN 0x0701 +#define GL_LINE_TOKEN 0x0702 +#define GL_LINE_RESET_TOKEN 0x0707 +#define GL_POLYGON_TOKEN 0x0703 +#define GL_BITMAP_TOKEN 0x0704 +#define GL_DRAW_PIXEL_TOKEN 0x0705 +#define GL_COPY_PIXEL_TOKEN 0x0706 +#define GL_PASS_THROUGH_TOKEN 0x0700 +#define GL_FEEDBACK_BUFFER_POINTER 0x0DF0 +#define GL_FEEDBACK_BUFFER_SIZE 0x0DF1 +#define GL_FEEDBACK_BUFFER_TYPE 0x0DF2 + +/* Selection */ +#define GL_SELECTION_BUFFER_POINTER 0x0DF3 +#define GL_SELECTION_BUFFER_SIZE 0x0DF4 + +/* Fog */ +#define GL_FOG 0x0B60 +#define GL_FOG_MODE 0x0B65 +#define GL_FOG_DENSITY 0x0B62 +#define GL_FOG_COLOR 0x0B66 +#define GL_FOG_INDEX 0x0B61 +#define GL_FOG_START 0x0B63 +#define GL_FOG_END 0x0B64 +#define GL_LINEAR 0x2601 +#define GL_EXP 0x0800 +#define GL_EXP2 0x0801 + +/* Logic Ops */ +#define GL_LOGIC_OP 0x0BF1 +#define GL_INDEX_LOGIC_OP 0x0BF1 +#define GL_COLOR_LOGIC_OP 0x0BF2 +#define GL_LOGIC_OP_MODE 0x0BF0 +#define GL_CLEAR 0x1500 +#define GL_SET 0x150F +#define GL_COPY 0x1503 +#define GL_COPY_INVERTED 0x150C +#define GL_NOOP 0x1505 +#define GL_INVERT 0x150A +#define GL_AND 0x1501 +#define GL_NAND 0x150E +#define GL_OR 0x1507 +#define GL_NOR 0x1508 +#define GL_XOR 0x1506 +#define GL_EQUIV 0x1509 +#define GL_AND_REVERSE 0x1502 +#define GL_AND_INVERTED 0x1504 +#define GL_OR_REVERSE 0x150B +#define GL_OR_INVERTED 0x150D + +/* Stencil */ +#define GL_STENCIL_BITS 0x0D57 +#define GL_STENCIL_TEST 0x0B90 +#define GL_STENCIL_CLEAR_VALUE 0x0B91 +#define GL_STENCIL_FUNC 0x0B92 +#define GL_STENCIL_VALUE_MASK 0x0B93 +#define GL_STENCIL_FAIL 0x0B94 +#define GL_STENCIL_PASS_DEPTH_FAIL 0x0B95 +#define GL_STENCIL_PASS_DEPTH_PASS 0x0B96 +#define GL_STENCIL_REF 0x0B97 +#define GL_STENCIL_WRITEMASK 0x0B98 +#define GL_STENCIL_INDEX 0x1901 +#define GL_KEEP 0x1E00 +#define GL_REPLACE 0x1E01 +#define GL_INCR 0x1E02 +#define GL_DECR 0x1E03 + +/* Buffers, Pixel Drawing/Reading */ +#define GL_NONE 0x0 +#define GL_LEFT 0x0406 +#define GL_RIGHT 0x0407 +/*GL_FRONT 0x0404 */ +/*GL_BACK 0x0405 */ +/*GL_FRONT_AND_BACK 0x0408 */ +#define GL_FRONT_LEFT 0x0400 +#define GL_FRONT_RIGHT 0x0401 +#define GL_BACK_LEFT 0x0402 +#define GL_BACK_RIGHT 0x0403 +#define GL_AUX0 0x0409 +#define GL_AUX1 0x040A +#define GL_AUX2 0x040B +#define GL_AUX3 0x040C +#define GL_COLOR_INDEX 0x1900 +#define GL_RED 0x1903 +#define GL_GREEN 0x1904 +#define GL_BLUE 0x1905 +#define GL_ALPHA 0x1906 +#define GL_LUMINANCE 0x1909 +#define GL_LUMINANCE_ALPHA 0x190A +#define GL_ALPHA_BITS 0x0D55 +#define GL_RED_BITS 0x0D52 +#define GL_GREEN_BITS 0x0D53 +#define GL_BLUE_BITS 0x0D54 +#define GL_INDEX_BITS 0x0D51 +#define GL_SUBPIXEL_BITS 0x0D50 +#define GL_AUX_BUFFERS 0x0C00 +#define GL_READ_BUFFER 0x0C02 +#define GL_DRAW_BUFFER 0x0C01 +#define GL_DOUBLEBUFFER 0x0C32 +#define GL_STEREO 0x0C33 +#define GL_BITMAP 0x1A00 +#define GL_COLOR 0x1800 +#define GL_DEPTH 0x1801 +#define GL_STENCIL 0x1802 +#define GL_DITHER 0x0BD0 +#define GL_RGB 0x1907 +#define GL_RGBA 0x1908 + +/* Implementation limits */ +#define GL_MAX_LIST_NESTING 0x0B31 +#define GL_MAX_EVAL_ORDER 0x0D30 +#define GL_MAX_LIGHTS 0x0D31 +#define GL_MAX_CLIP_PLANES 0x0D32 +#define GL_MAX_TEXTURE_SIZE 0x0D33 +#define GL_MAX_PIXEL_MAP_TABLE 0x0D34 +#define GL_MAX_ATTRIB_STACK_DEPTH 0x0D35 +#define GL_MAX_MODELVIEW_STACK_DEPTH 0x0D36 +#define GL_MAX_NAME_STACK_DEPTH 0x0D37 +#define GL_MAX_PROJECTION_STACK_DEPTH 0x0D38 +#define GL_MAX_TEXTURE_STACK_DEPTH 0x0D39 +#define GL_MAX_VIEWPORT_DIMS 0x0D3A +#define GL_MAX_CLIENT_ATTRIB_STACK_DEPTH 0x0D3B + +/* Gets */ +#define GL_ATTRIB_STACK_DEPTH 0x0BB0 +#define GL_CLIENT_ATTRIB_STACK_DEPTH 0x0BB1 +#define GL_COLOR_CLEAR_VALUE 0x0C22 +#define GL_COLOR_WRITEMASK 0x0C23 +#define GL_CURRENT_INDEX 0x0B01 +#define GL_CURRENT_COLOR 0x0B00 +#define GL_CURRENT_NORMAL 0x0B02 +#define GL_CURRENT_RASTER_COLOR 0x0B04 +#define GL_CURRENT_RASTER_DISTANCE 0x0B09 +#define GL_CURRENT_RASTER_INDEX 0x0B05 +#define GL_CURRENT_RASTER_POSITION 0x0B07 +#define GL_CURRENT_RASTER_TEXTURE_COORDS 0x0B06 +#define GL_CURRENT_RASTER_POSITION_VALID 0x0B08 +#define GL_CURRENT_TEXTURE_COORDS 0x0B03 +#define GL_INDEX_CLEAR_VALUE 0x0C20 +#define GL_INDEX_MODE 0x0C30 +#define GL_INDEX_WRITEMASK 0x0C21 +#define GL_MODELVIEW_MATRIX 0x0BA6 +#define GL_MODELVIEW_STACK_DEPTH 0x0BA3 +#define GL_NAME_STACK_DEPTH 0x0D70 +#define GL_PROJECTION_MATRIX 0x0BA7 +#define GL_PROJECTION_STACK_DEPTH 0x0BA4 +#define GL_RENDER_MODE 0x0C40 +#define GL_RGBA_MODE 0x0C31 +#define GL_TEXTURE_MATRIX 0x0BA8 +#define GL_TEXTURE_STACK_DEPTH 0x0BA5 +#define GL_VIEWPORT 0x0BA2 + +/* Evaluators */ +#define GL_AUTO_NORMAL 0x0D80 +#define GL_MAP1_COLOR_4 0x0D90 +#define GL_MAP1_INDEX 0x0D91 +#define GL_MAP1_NORMAL 0x0D92 +#define GL_MAP1_TEXTURE_COORD_1 0x0D93 +#define GL_MAP1_TEXTURE_COORD_2 0x0D94 +#define GL_MAP1_TEXTURE_COORD_3 0x0D95 +#define GL_MAP1_TEXTURE_COORD_4 0x0D96 +#define GL_MAP1_VERTEX_3 0x0D97 +#define GL_MAP1_VERTEX_4 0x0D98 +#define GL_MAP2_COLOR_4 0x0DB0 +#define GL_MAP2_INDEX 0x0DB1 +#define GL_MAP2_NORMAL 0x0DB2 +#define GL_MAP2_TEXTURE_COORD_1 0x0DB3 +#define GL_MAP2_TEXTURE_COORD_2 0x0DB4 +#define GL_MAP2_TEXTURE_COORD_3 0x0DB5 +#define GL_MAP2_TEXTURE_COORD_4 0x0DB6 +#define GL_MAP2_VERTEX_3 0x0DB7 +#define GL_MAP2_VERTEX_4 0x0DB8 +#define GL_MAP1_GRID_DOMAIN 0x0DD0 +#define GL_MAP1_GRID_SEGMENTS 0x0DD1 +#define GL_MAP2_GRID_DOMAIN 0x0DD2 +#define GL_MAP2_GRID_SEGMENTS 0x0DD3 +#define GL_COEFF 0x0A00 +#define GL_ORDER 0x0A01 +#define GL_DOMAIN 0x0A02 + +/* Hints */ +#define GL_PERSPECTIVE_CORRECTION_HINT 0x0C50 +#define GL_POINT_SMOOTH_HINT 0x0C51 +#define GL_LINE_SMOOTH_HINT 0x0C52 +#define GL_POLYGON_SMOOTH_HINT 0x0C53 +#define GL_FOG_HINT 0x0C54 +#define GL_DONT_CARE 0x1100 +#define GL_FASTEST 0x1101 +#define GL_NICEST 0x1102 + +/* Scissor box */ +#define GL_SCISSOR_BOX 0x0C10 +#define GL_SCISSOR_TEST 0x0C11 + +/* Pixel Mode / Transfer */ +#define GL_MAP_COLOR 0x0D10 +#define GL_MAP_STENCIL 0x0D11 +#define GL_INDEX_SHIFT 0x0D12 +#define GL_INDEX_OFFSET 0x0D13 +#define GL_RED_SCALE 0x0D14 +#define GL_RED_BIAS 0x0D15 +#define GL_GREEN_SCALE 0x0D18 +#define GL_GREEN_BIAS 0x0D19 +#define GL_BLUE_SCALE 0x0D1A +#define GL_BLUE_BIAS 0x0D1B +#define GL_ALPHA_SCALE 0x0D1C +#define GL_ALPHA_BIAS 0x0D1D +#define GL_DEPTH_SCALE 0x0D1E +#define GL_DEPTH_BIAS 0x0D1F +#define GL_PIXEL_MAP_S_TO_S_SIZE 0x0CB1 +#define GL_PIXEL_MAP_I_TO_I_SIZE 0x0CB0 +#define GL_PIXEL_MAP_I_TO_R_SIZE 0x0CB2 +#define GL_PIXEL_MAP_I_TO_G_SIZE 0x0CB3 +#define GL_PIXEL_MAP_I_TO_B_SIZE 0x0CB4 +#define GL_PIXEL_MAP_I_TO_A_SIZE 0x0CB5 +#define GL_PIXEL_MAP_R_TO_R_SIZE 0x0CB6 +#define GL_PIXEL_MAP_G_TO_G_SIZE 0x0CB7 +#define GL_PIXEL_MAP_B_TO_B_SIZE 0x0CB8 +#define GL_PIXEL_MAP_A_TO_A_SIZE 0x0CB9 +#define GL_PIXEL_MAP_S_TO_S 0x0C71 +#define GL_PIXEL_MAP_I_TO_I 0x0C70 +#define GL_PIXEL_MAP_I_TO_R 0x0C72 +#define GL_PIXEL_MAP_I_TO_G 0x0C73 +#define GL_PIXEL_MAP_I_TO_B 0x0C74 +#define GL_PIXEL_MAP_I_TO_A 0x0C75 +#define GL_PIXEL_MAP_R_TO_R 0x0C76 +#define GL_PIXEL_MAP_G_TO_G 0x0C77 +#define GL_PIXEL_MAP_B_TO_B 0x0C78 +#define GL_PIXEL_MAP_A_TO_A 0x0C79 +#define GL_PACK_ALIGNMENT 0x0D05 +#define GL_PACK_LSB_FIRST 0x0D01 +#define GL_PACK_ROW_LENGTH 0x0D02 +#define GL_PACK_SKIP_PIXELS 0x0D04 +#define GL_PACK_SKIP_ROWS 0x0D03 +#define GL_PACK_SWAP_BYTES 0x0D00 +#define GL_UNPACK_ALIGNMENT 0x0CF5 +#define GL_UNPACK_LSB_FIRST 0x0CF1 +#define GL_UNPACK_ROW_LENGTH 0x0CF2 +#define GL_UNPACK_SKIP_PIXELS 0x0CF4 +#define GL_UNPACK_SKIP_ROWS 0x0CF3 +#define GL_UNPACK_SWAP_BYTES 0x0CF0 +#define GL_ZOOM_X 0x0D16 +#define GL_ZOOM_Y 0x0D17 + +/* Texture mapping */ +#define GL_TEXTURE_ENV 0x2300 +#define GL_TEXTURE_ENV_MODE 0x2200 +#define GL_TEXTURE_1D 0x0DE0 +#define GL_TEXTURE_2D 0x0DE1 +#define GL_TEXTURE_WRAP_S 0x2802 +#define GL_TEXTURE_WRAP_T 0x2803 +#define GL_TEXTURE_MAG_FILTER 0x2800 +#define GL_TEXTURE_MIN_FILTER 0x2801 +#define GL_TEXTURE_ENV_COLOR 0x2201 +#define GL_TEXTURE_GEN_S 0x0C60 +#define GL_TEXTURE_GEN_T 0x0C61 +#define GL_TEXTURE_GEN_R 0x0C62 +#define GL_TEXTURE_GEN_Q 0x0C63 +#define GL_TEXTURE_GEN_MODE 0x2500 +#define GL_TEXTURE_BORDER_COLOR 0x1004 +#define GL_TEXTURE_WIDTH 0x1000 +#define GL_TEXTURE_HEIGHT 0x1001 +#define GL_TEXTURE_BORDER 0x1005 +#define GL_TEXTURE_COMPONENTS 0x1003 +#define GL_TEXTURE_RED_SIZE 0x805C +#define GL_TEXTURE_GREEN_SIZE 0x805D +#define GL_TEXTURE_BLUE_SIZE 0x805E +#define GL_TEXTURE_ALPHA_SIZE 0x805F +#define GL_TEXTURE_LUMINANCE_SIZE 0x8060 +#define GL_TEXTURE_INTENSITY_SIZE 0x8061 +#define GL_NEAREST_MIPMAP_NEAREST 0x2700 +#define GL_NEAREST_MIPMAP_LINEAR 0x2702 +#define GL_LINEAR_MIPMAP_NEAREST 0x2701 +#define GL_LINEAR_MIPMAP_LINEAR 0x2703 +#define GL_OBJECT_LINEAR 0x2401 +#define GL_OBJECT_PLANE 0x2501 +#define GL_EYE_LINEAR 0x2400 +#define GL_EYE_PLANE 0x2502 +#define GL_SPHERE_MAP 0x2402 +#define GL_DECAL 0x2101 +#define GL_MODULATE 0x2100 +#define GL_NEAREST 0x2600 +#define GL_REPEAT 0x2901 +#define GL_CLAMP 0x2900 +#define GL_S 0x2000 +#define GL_T 0x2001 +#define GL_R 0x2002 +#define GL_Q 0x2003 + +/* Utility */ +#define GL_VENDOR 0x1F00 +#define GL_RENDERER 0x1F01 +#define GL_VERSION 0x1F02 +#define GL_EXTENSIONS 0x1F03 + +/* Errors */ +#define GL_NO_ERROR 0x0 +#define GL_INVALID_ENUM 0x0500 +#define GL_INVALID_VALUE 0x0501 +#define GL_INVALID_OPERATION 0x0502 +#define GL_STACK_OVERFLOW 0x0503 +#define GL_STACK_UNDERFLOW 0x0504 +#define GL_OUT_OF_MEMORY 0x0505 + +/* glPush/PopAttrib bits */ +#define GL_CURRENT_BIT 0x00000001 +#define GL_POINT_BIT 0x00000002 +#define GL_LINE_BIT 0x00000004 +#define GL_POLYGON_BIT 0x00000008 +#define GL_POLYGON_STIPPLE_BIT 0x00000010 +#define GL_PIXEL_MODE_BIT 0x00000020 +#define GL_LIGHTING_BIT 0x00000040 +#define GL_FOG_BIT 0x00000080 +#define GL_DEPTH_BUFFER_BIT 0x00000100 +#define GL_ACCUM_BUFFER_BIT 0x00000200 +#define GL_STENCIL_BUFFER_BIT 0x00000400 +#define GL_VIEWPORT_BIT 0x00000800 +#define GL_TRANSFORM_BIT 0x00001000 +#define GL_ENABLE_BIT 0x00002000 +#define GL_COLOR_BUFFER_BIT 0x00004000 +#define GL_HINT_BIT 0x00008000 +#define GL_EVAL_BIT 0x00010000 +#define GL_LIST_BIT 0x00020000 +#define GL_TEXTURE_BIT 0x00040000 +#define GL_SCISSOR_BIT 0x00080000 +#define GL_ALL_ATTRIB_BITS 0x000FFFFF + + +/* OpenGL 1.1 */ +#define GL_PROXY_TEXTURE_1D 0x8063 +#define GL_PROXY_TEXTURE_2D 0x8064 +#define GL_TEXTURE_PRIORITY 0x8066 +#define GL_TEXTURE_RESIDENT 0x8067 +#define GL_TEXTURE_BINDING_1D 0x8068 +#define GL_TEXTURE_BINDING_2D 0x8069 +#define GL_TEXTURE_INTERNAL_FORMAT 0x1003 +#define GL_ALPHA4 0x803B +#define GL_ALPHA8 0x803C +#define GL_ALPHA12 0x803D +#define GL_ALPHA16 0x803E +#define GL_LUMINANCE4 0x803F +#define GL_LUMINANCE8 0x8040 +#define GL_LUMINANCE12 0x8041 +#define GL_LUMINANCE16 0x8042 +#define GL_LUMINANCE4_ALPHA4 0x8043 +#define GL_LUMINANCE6_ALPHA2 0x8044 +#define GL_LUMINANCE8_ALPHA8 0x8045 +#define GL_LUMINANCE12_ALPHA4 0x8046 +#define GL_LUMINANCE12_ALPHA12 0x8047 +#define GL_LUMINANCE16_ALPHA16 0x8048 +#define GL_INTENSITY 0x8049 +#define GL_INTENSITY4 0x804A +#define GL_INTENSITY8 0x804B +#define GL_INTENSITY12 0x804C +#define GL_INTENSITY16 0x804D +#define GL_R3_G3_B2 0x2A10 +#define GL_RGB4 0x804F +#define GL_RGB5 0x8050 +#define GL_RGB8 0x8051 +#define GL_RGB10 0x8052 +#define GL_RGB12 0x8053 +#define GL_RGB16 0x8054 +#define GL_RGBA2 0x8055 +#define GL_RGBA4 0x8056 +#define GL_RGB5_A1 0x8057 +#define GL_RGBA8 0x8058 +#define GL_RGB10_A2 0x8059 +#define GL_RGBA12 0x805A +#define GL_RGBA16 0x805B +#define GL_CLIENT_PIXEL_STORE_BIT 0x00000001 +#define GL_CLIENT_VERTEX_ARRAY_BIT 0x00000002 +#define GL_ALL_CLIENT_ATTRIB_BITS 0xFFFFFFFF +#define GL_CLIENT_ALL_ATTRIB_BITS 0xFFFFFFFF + + + +/* + * Miscellaneous + */ + +GLAPI void GLAPIENTRY glClearIndex( GLfloat c ); + +GLAPI void GLAPIENTRY glClearColor( GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha ); + +GLAPI void GLAPIENTRY glClear( GLbitfield mask ); + +GLAPI void GLAPIENTRY glIndexMask( GLuint mask ); + +GLAPI void GLAPIENTRY glColorMask( GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha ); + +GLAPI void GLAPIENTRY glAlphaFunc( GLenum func, GLclampf ref ); + +GLAPI void GLAPIENTRY glBlendFunc( GLenum sfactor, GLenum dfactor ); + +GLAPI void GLAPIENTRY glLogicOp( GLenum opcode ); + +GLAPI void GLAPIENTRY glCullFace( GLenum mode ); + +GLAPI void GLAPIENTRY glFrontFace( GLenum mode ); + +GLAPI void GLAPIENTRY glPointSize( GLfloat size ); + +GLAPI void GLAPIENTRY glLineWidth( GLfloat width ); + +GLAPI void GLAPIENTRY glLineStipple( GLint factor, GLushort pattern ); + +GLAPI void GLAPIENTRY glPolygonMode( GLenum face, GLenum mode ); + +GLAPI void GLAPIENTRY glPolygonOffset( GLfloat factor, GLfloat units ); + +GLAPI void GLAPIENTRY glPolygonStipple( const GLubyte *mask ); + +GLAPI void GLAPIENTRY glGetPolygonStipple( GLubyte *mask ); + +GLAPI void GLAPIENTRY glEdgeFlag( GLboolean flag ); + +GLAPI void GLAPIENTRY glEdgeFlagv( const GLboolean *flag ); + +GLAPI void GLAPIENTRY glScissor( GLint x, GLint y, GLsizei width, GLsizei height); + +GLAPI void GLAPIENTRY glClipPlane( GLenum plane, const GLdouble *equation ); + +GLAPI void GLAPIENTRY glGetClipPlane( GLenum plane, GLdouble *equation ); + +GLAPI void GLAPIENTRY glDrawBuffer( GLenum mode ); + +GLAPI void GLAPIENTRY glReadBuffer( GLenum mode ); + +GLAPI void GLAPIENTRY glEnable( GLenum cap ); + +GLAPI void GLAPIENTRY glDisable( GLenum cap ); + +GLAPI GLboolean GLAPIENTRY glIsEnabled( GLenum cap ); + + +GLAPI void GLAPIENTRY glEnableClientState( GLenum cap ); /* 1.1 */ + +GLAPI void GLAPIENTRY glDisableClientState( GLenum cap ); /* 1.1 */ + + +GLAPI void GLAPIENTRY glGetBooleanv( GLenum pname, GLboolean *params ); + +GLAPI void GLAPIENTRY glGetDoublev( GLenum pname, GLdouble *params ); + +GLAPI void GLAPIENTRY glGetFloatv( GLenum pname, GLfloat *params ); + +GLAPI void GLAPIENTRY glGetIntegerv( GLenum pname, GLint *params ); + + +GLAPI void GLAPIENTRY glPushAttrib( GLbitfield mask ); + +GLAPI void GLAPIENTRY glPopAttrib( void ); + + +GLAPI void GLAPIENTRY glPushClientAttrib( GLbitfield mask ); /* 1.1 */ + +GLAPI void GLAPIENTRY glPopClientAttrib( void ); /* 1.1 */ + + +GLAPI GLint GLAPIENTRY glRenderMode( GLenum mode ); + +GLAPI GLenum GLAPIENTRY glGetError( void ); + +GLAPI const GLubyte * GLAPIENTRY glGetString( GLenum name ); + +GLAPI void GLAPIENTRY glFinish( void ); + +GLAPI void GLAPIENTRY glFlush( void ); + +GLAPI void GLAPIENTRY glHint( GLenum target, GLenum mode ); + + +/* + * Depth Buffer + */ + +GLAPI void GLAPIENTRY glClearDepth( GLclampd depth ); + +GLAPI void GLAPIENTRY glDepthFunc( GLenum func ); + +GLAPI void GLAPIENTRY glDepthMask( GLboolean flag ); + +GLAPI void GLAPIENTRY glDepthRange( GLclampd near_val, GLclampd far_val ); + + +/* + * Accumulation Buffer + */ + +GLAPI void GLAPIENTRY glClearAccum( GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha ); + +GLAPI void GLAPIENTRY glAccum( GLenum op, GLfloat value ); + + +/* + * Transformation + */ + +GLAPI void GLAPIENTRY glMatrixMode( GLenum mode ); + +GLAPI void GLAPIENTRY glOrtho( GLdouble left, GLdouble right, + GLdouble bottom, GLdouble top, + GLdouble near_val, GLdouble far_val ); + +GLAPI void GLAPIENTRY glFrustum( GLdouble left, GLdouble right, + GLdouble bottom, GLdouble top, + GLdouble near_val, GLdouble far_val ); + +GLAPI void GLAPIENTRY glViewport( GLint x, GLint y, + GLsizei width, GLsizei height ); + +GLAPI void GLAPIENTRY glPushMatrix( void ); + +GLAPI void GLAPIENTRY glPopMatrix( void ); + +GLAPI void GLAPIENTRY glLoadIdentity( void ); + +GLAPI void GLAPIENTRY glLoadMatrixd( const GLdouble *m ); +GLAPI void GLAPIENTRY glLoadMatrixf( const GLfloat *m ); + +GLAPI void GLAPIENTRY glMultMatrixd( const GLdouble *m ); +GLAPI void GLAPIENTRY glMultMatrixf( const GLfloat *m ); + +GLAPI void GLAPIENTRY glRotated( GLdouble angle, + GLdouble x, GLdouble y, GLdouble z ); +GLAPI void GLAPIENTRY glRotatef( GLfloat angle, + GLfloat x, GLfloat y, GLfloat z ); + +GLAPI void GLAPIENTRY glScaled( GLdouble x, GLdouble y, GLdouble z ); +GLAPI void GLAPIENTRY glScalef( GLfloat x, GLfloat y, GLfloat z ); + +GLAPI void GLAPIENTRY glTranslated( GLdouble x, GLdouble y, GLdouble z ); +GLAPI void GLAPIENTRY glTranslatef( GLfloat x, GLfloat y, GLfloat z ); + + +/* + * Display Lists + */ + +GLAPI GLboolean GLAPIENTRY glIsList( GLuint list ); + +GLAPI void GLAPIENTRY glDeleteLists( GLuint list, GLsizei range ); + +GLAPI GLuint GLAPIENTRY glGenLists( GLsizei range ); + +GLAPI void GLAPIENTRY glNewList( GLuint list, GLenum mode ); + +GLAPI void GLAPIENTRY glEndList( void ); + +GLAPI void GLAPIENTRY glCallList( GLuint list ); + +GLAPI void GLAPIENTRY glCallLists( GLsizei n, GLenum type, + const GLvoid *lists ); + +GLAPI void GLAPIENTRY glListBase( GLuint base ); + + +/* + * Drawing Functions + */ + +GLAPI void GLAPIENTRY glBegin( GLenum mode ); + +GLAPI void GLAPIENTRY glEnd( void ); + + +GLAPI void GLAPIENTRY glVertex2d( GLdouble x, GLdouble y ); +GLAPI void GLAPIENTRY glVertex2f( GLfloat x, GLfloat y ); +GLAPI void GLAPIENTRY glVertex2i( GLint x, GLint y ); +GLAPI void GLAPIENTRY glVertex2s( GLshort x, GLshort y ); + +GLAPI void GLAPIENTRY glVertex3d( GLdouble x, GLdouble y, GLdouble z ); +GLAPI void GLAPIENTRY glVertex3f( GLfloat x, GLfloat y, GLfloat z ); +GLAPI void GLAPIENTRY glVertex3i( GLint x, GLint y, GLint z ); +GLAPI void GLAPIENTRY glVertex3s( GLshort x, GLshort y, GLshort z ); + +GLAPI void GLAPIENTRY glVertex4d( GLdouble x, GLdouble y, GLdouble z, GLdouble w ); +GLAPI void GLAPIENTRY glVertex4f( GLfloat x, GLfloat y, GLfloat z, GLfloat w ); +GLAPI void GLAPIENTRY glVertex4i( GLint x, GLint y, GLint z, GLint w ); +GLAPI void GLAPIENTRY glVertex4s( GLshort x, GLshort y, GLshort z, GLshort w ); + +GLAPI void GLAPIENTRY glVertex2dv( const GLdouble *v ); +GLAPI void GLAPIENTRY glVertex2fv( const GLfloat *v ); +GLAPI void GLAPIENTRY glVertex2iv( const GLint *v ); +GLAPI void GLAPIENTRY glVertex2sv( const GLshort *v ); + +GLAPI void GLAPIENTRY glVertex3dv( const GLdouble *v ); +GLAPI void GLAPIENTRY glVertex3fv( const GLfloat *v ); +GLAPI void GLAPIENTRY glVertex3iv( const GLint *v ); +GLAPI void GLAPIENTRY glVertex3sv( const GLshort *v ); + +GLAPI void GLAPIENTRY glVertex4dv( const GLdouble *v ); +GLAPI void GLAPIENTRY glVertex4fv( const GLfloat *v ); +GLAPI void GLAPIENTRY glVertex4iv( const GLint *v ); +GLAPI void GLAPIENTRY glVertex4sv( const GLshort *v ); + + +GLAPI void GLAPIENTRY glNormal3b( GLbyte nx, GLbyte ny, GLbyte nz ); +GLAPI void GLAPIENTRY glNormal3d( GLdouble nx, GLdouble ny, GLdouble nz ); +GLAPI void GLAPIENTRY glNormal3f( GLfloat nx, GLfloat ny, GLfloat nz ); +GLAPI void GLAPIENTRY glNormal3i( GLint nx, GLint ny, GLint nz ); +GLAPI void GLAPIENTRY glNormal3s( GLshort nx, GLshort ny, GLshort nz ); + +GLAPI void GLAPIENTRY glNormal3bv( const GLbyte *v ); +GLAPI void GLAPIENTRY glNormal3dv( const GLdouble *v ); +GLAPI void GLAPIENTRY glNormal3fv( const GLfloat *v ); +GLAPI void GLAPIENTRY glNormal3iv( const GLint *v ); +GLAPI void GLAPIENTRY glNormal3sv( const GLshort *v ); + + +GLAPI void GLAPIENTRY glIndexd( GLdouble c ); +GLAPI void GLAPIENTRY glIndexf( GLfloat c ); +GLAPI void GLAPIENTRY glIndexi( GLint c ); +GLAPI void GLAPIENTRY glIndexs( GLshort c ); +GLAPI void GLAPIENTRY glIndexub( GLubyte c ); /* 1.1 */ + +GLAPI void GLAPIENTRY glIndexdv( const GLdouble *c ); +GLAPI void GLAPIENTRY glIndexfv( const GLfloat *c ); +GLAPI void GLAPIENTRY glIndexiv( const GLint *c ); +GLAPI void GLAPIENTRY glIndexsv( const GLshort *c ); +GLAPI void GLAPIENTRY glIndexubv( const GLubyte *c ); /* 1.1 */ + +GLAPI void GLAPIENTRY glColor3b( GLbyte red, GLbyte green, GLbyte blue ); +GLAPI void GLAPIENTRY glColor3d( GLdouble red, GLdouble green, GLdouble blue ); +GLAPI void GLAPIENTRY glColor3f( GLfloat red, GLfloat green, GLfloat blue ); +GLAPI void GLAPIENTRY glColor3i( GLint red, GLint green, GLint blue ); +GLAPI void GLAPIENTRY glColor3s( GLshort red, GLshort green, GLshort blue ); +GLAPI void GLAPIENTRY glColor3ub( GLubyte red, GLubyte green, GLubyte blue ); +GLAPI void GLAPIENTRY glColor3ui( GLuint red, GLuint green, GLuint blue ); +GLAPI void GLAPIENTRY glColor3us( GLushort red, GLushort green, GLushort blue ); + +GLAPI void GLAPIENTRY glColor4b( GLbyte red, GLbyte green, + GLbyte blue, GLbyte alpha ); +GLAPI void GLAPIENTRY glColor4d( GLdouble red, GLdouble green, + GLdouble blue, GLdouble alpha ); +GLAPI void GLAPIENTRY glColor4f( GLfloat red, GLfloat green, + GLfloat blue, GLfloat alpha ); +GLAPI void GLAPIENTRY glColor4i( GLint red, GLint green, + GLint blue, GLint alpha ); +GLAPI void GLAPIENTRY glColor4s( GLshort red, GLshort green, + GLshort blue, GLshort alpha ); +GLAPI void GLAPIENTRY glColor4ub( GLubyte red, GLubyte green, + GLubyte blue, GLubyte alpha ); +GLAPI void GLAPIENTRY glColor4ui( GLuint red, GLuint green, + GLuint blue, GLuint alpha ); +GLAPI void GLAPIENTRY glColor4us( GLushort red, GLushort green, + GLushort blue, GLushort alpha ); + + +GLAPI void GLAPIENTRY glColor3bv( const GLbyte *v ); +GLAPI void GLAPIENTRY glColor3dv( const GLdouble *v ); +GLAPI void GLAPIENTRY glColor3fv( const GLfloat *v ); +GLAPI void GLAPIENTRY glColor3iv( const GLint *v ); +GLAPI void GLAPIENTRY glColor3sv( const GLshort *v ); +GLAPI void GLAPIENTRY glColor3ubv( const GLubyte *v ); +GLAPI void GLAPIENTRY glColor3uiv( const GLuint *v ); +GLAPI void GLAPIENTRY glColor3usv( const GLushort *v ); + +GLAPI void GLAPIENTRY glColor4bv( const GLbyte *v ); +GLAPI void GLAPIENTRY glColor4dv( const GLdouble *v ); +GLAPI void GLAPIENTRY glColor4fv( const GLfloat *v ); +GLAPI void GLAPIENTRY glColor4iv( const GLint *v ); +GLAPI void GLAPIENTRY glColor4sv( const GLshort *v ); +GLAPI void GLAPIENTRY glColor4ubv( const GLubyte *v ); +GLAPI void GLAPIENTRY glColor4uiv( const GLuint *v ); +GLAPI void GLAPIENTRY glColor4usv( const GLushort *v ); + + +GLAPI void GLAPIENTRY glTexCoord1d( GLdouble s ); +GLAPI void GLAPIENTRY glTexCoord1f( GLfloat s ); +GLAPI void GLAPIENTRY glTexCoord1i( GLint s ); +GLAPI void GLAPIENTRY glTexCoord1s( GLshort s ); + +GLAPI void GLAPIENTRY glTexCoord2d( GLdouble s, GLdouble t ); +GLAPI void GLAPIENTRY glTexCoord2f( GLfloat s, GLfloat t ); +GLAPI void GLAPIENTRY glTexCoord2i( GLint s, GLint t ); +GLAPI void GLAPIENTRY glTexCoord2s( GLshort s, GLshort t ); + +GLAPI void GLAPIENTRY glTexCoord3d( GLdouble s, GLdouble t, GLdouble r ); +GLAPI void GLAPIENTRY glTexCoord3f( GLfloat s, GLfloat t, GLfloat r ); +GLAPI void GLAPIENTRY glTexCoord3i( GLint s, GLint t, GLint r ); +GLAPI void GLAPIENTRY glTexCoord3s( GLshort s, GLshort t, GLshort r ); + +GLAPI void GLAPIENTRY glTexCoord4d( GLdouble s, GLdouble t, GLdouble r, GLdouble q ); +GLAPI void GLAPIENTRY glTexCoord4f( GLfloat s, GLfloat t, GLfloat r, GLfloat q ); +GLAPI void GLAPIENTRY glTexCoord4i( GLint s, GLint t, GLint r, GLint q ); +GLAPI void GLAPIENTRY glTexCoord4s( GLshort s, GLshort t, GLshort r, GLshort q ); + +GLAPI void GLAPIENTRY glTexCoord1dv( const GLdouble *v ); +GLAPI void GLAPIENTRY glTexCoord1fv( const GLfloat *v ); +GLAPI void GLAPIENTRY glTexCoord1iv( const GLint *v ); +GLAPI void GLAPIENTRY glTexCoord1sv( const GLshort *v ); + +GLAPI void GLAPIENTRY glTexCoord2dv( const GLdouble *v ); +GLAPI void GLAPIENTRY glTexCoord2fv( const GLfloat *v ); +GLAPI void GLAPIENTRY glTexCoord2iv( const GLint *v ); +GLAPI void GLAPIENTRY glTexCoord2sv( const GLshort *v ); + +GLAPI void GLAPIENTRY glTexCoord3dv( const GLdouble *v ); +GLAPI void GLAPIENTRY glTexCoord3fv( const GLfloat *v ); +GLAPI void GLAPIENTRY glTexCoord3iv( const GLint *v ); +GLAPI void GLAPIENTRY glTexCoord3sv( const GLshort *v ); + +GLAPI void GLAPIENTRY glTexCoord4dv( const GLdouble *v ); +GLAPI void GLAPIENTRY glTexCoord4fv( const GLfloat *v ); +GLAPI void GLAPIENTRY glTexCoord4iv( const GLint *v ); +GLAPI void GLAPIENTRY glTexCoord4sv( const GLshort *v ); + + +GLAPI void GLAPIENTRY glRasterPos2d( GLdouble x, GLdouble y ); +GLAPI void GLAPIENTRY glRasterPos2f( GLfloat x, GLfloat y ); +GLAPI void GLAPIENTRY glRasterPos2i( GLint x, GLint y ); +GLAPI void GLAPIENTRY glRasterPos2s( GLshort x, GLshort y ); + +GLAPI void GLAPIENTRY glRasterPos3d( GLdouble x, GLdouble y, GLdouble z ); +GLAPI void GLAPIENTRY glRasterPos3f( GLfloat x, GLfloat y, GLfloat z ); +GLAPI void GLAPIENTRY glRasterPos3i( GLint x, GLint y, GLint z ); +GLAPI void GLAPIENTRY glRasterPos3s( GLshort x, GLshort y, GLshort z ); + +GLAPI void GLAPIENTRY glRasterPos4d( GLdouble x, GLdouble y, GLdouble z, GLdouble w ); +GLAPI void GLAPIENTRY glRasterPos4f( GLfloat x, GLfloat y, GLfloat z, GLfloat w ); +GLAPI void GLAPIENTRY glRasterPos4i( GLint x, GLint y, GLint z, GLint w ); +GLAPI void GLAPIENTRY glRasterPos4s( GLshort x, GLshort y, GLshort z, GLshort w ); + +GLAPI void GLAPIENTRY glRasterPos2dv( const GLdouble *v ); +GLAPI void GLAPIENTRY glRasterPos2fv( const GLfloat *v ); +GLAPI void GLAPIENTRY glRasterPos2iv( const GLint *v ); +GLAPI void GLAPIENTRY glRasterPos2sv( const GLshort *v ); + +GLAPI void GLAPIENTRY glRasterPos3dv( const GLdouble *v ); +GLAPI void GLAPIENTRY glRasterPos3fv( const GLfloat *v ); +GLAPI void GLAPIENTRY glRasterPos3iv( const GLint *v ); +GLAPI void GLAPIENTRY glRasterPos3sv( const GLshort *v ); + +GLAPI void GLAPIENTRY glRasterPos4dv( const GLdouble *v ); +GLAPI void GLAPIENTRY glRasterPos4fv( const GLfloat *v ); +GLAPI void GLAPIENTRY glRasterPos4iv( const GLint *v ); +GLAPI void GLAPIENTRY glRasterPos4sv( const GLshort *v ); + + +GLAPI void GLAPIENTRY glRectd( GLdouble x1, GLdouble y1, GLdouble x2, GLdouble y2 ); +GLAPI void GLAPIENTRY glRectf( GLfloat x1, GLfloat y1, GLfloat x2, GLfloat y2 ); +GLAPI void GLAPIENTRY glRecti( GLint x1, GLint y1, GLint x2, GLint y2 ); +GLAPI void GLAPIENTRY glRects( GLshort x1, GLshort y1, GLshort x2, GLshort y2 ); + + +GLAPI void GLAPIENTRY glRectdv( const GLdouble *v1, const GLdouble *v2 ); +GLAPI void GLAPIENTRY glRectfv( const GLfloat *v1, const GLfloat *v2 ); +GLAPI void GLAPIENTRY glRectiv( const GLint *v1, const GLint *v2 ); +GLAPI void GLAPIENTRY glRectsv( const GLshort *v1, const GLshort *v2 ); + + +/* + * Vertex Arrays (1.1) + */ + +GLAPI void GLAPIENTRY glVertexPointer( GLint size, GLenum type, + GLsizei stride, const GLvoid *ptr ); + +GLAPI void GLAPIENTRY glNormalPointer( GLenum type, GLsizei stride, + const GLvoid *ptr ); + +GLAPI void GLAPIENTRY glColorPointer( GLint size, GLenum type, + GLsizei stride, const GLvoid *ptr ); + +GLAPI void GLAPIENTRY glIndexPointer( GLenum type, GLsizei stride, + const GLvoid *ptr ); + +GLAPI void GLAPIENTRY glTexCoordPointer( GLint size, GLenum type, + GLsizei stride, const GLvoid *ptr ); + +GLAPI void GLAPIENTRY glEdgeFlagPointer( GLsizei stride, const GLvoid *ptr ); + +GLAPI void GLAPIENTRY glGetPointerv( GLenum pname, GLvoid **params ); + +GLAPI void GLAPIENTRY glArrayElement( GLint i ); + +GLAPI void GLAPIENTRY glDrawArrays( GLenum mode, GLint first, GLsizei count ); + +GLAPI void GLAPIENTRY glDrawElements( GLenum mode, GLsizei count, + GLenum type, const GLvoid *indices ); + +GLAPI void GLAPIENTRY glInterleavedArrays( GLenum format, GLsizei stride, + const GLvoid *pointer ); + +/* + * Lighting + */ + +GLAPI void GLAPIENTRY glShadeModel( GLenum mode ); + +GLAPI void GLAPIENTRY glLightf( GLenum light, GLenum pname, GLfloat param ); +GLAPI void GLAPIENTRY glLighti( GLenum light, GLenum pname, GLint param ); +GLAPI void GLAPIENTRY glLightfv( GLenum light, GLenum pname, + const GLfloat *params ); +GLAPI void GLAPIENTRY glLightiv( GLenum light, GLenum pname, + const GLint *params ); + +GLAPI void GLAPIENTRY glGetLightfv( GLenum light, GLenum pname, + GLfloat *params ); +GLAPI void GLAPIENTRY glGetLightiv( GLenum light, GLenum pname, + GLint *params ); + +GLAPI void GLAPIENTRY glLightModelf( GLenum pname, GLfloat param ); +GLAPI void GLAPIENTRY glLightModeli( GLenum pname, GLint param ); +GLAPI void GLAPIENTRY glLightModelfv( GLenum pname, const GLfloat *params ); +GLAPI void GLAPIENTRY glLightModeliv( GLenum pname, const GLint *params ); + +GLAPI void GLAPIENTRY glMaterialf( GLenum face, GLenum pname, GLfloat param ); +GLAPI void GLAPIENTRY glMateriali( GLenum face, GLenum pname, GLint param ); +GLAPI void GLAPIENTRY glMaterialfv( GLenum face, GLenum pname, const GLfloat *params ); +GLAPI void GLAPIENTRY glMaterialiv( GLenum face, GLenum pname, const GLint *params ); + +GLAPI void GLAPIENTRY glGetMaterialfv( GLenum face, GLenum pname, GLfloat *params ); +GLAPI void GLAPIENTRY glGetMaterialiv( GLenum face, GLenum pname, GLint *params ); + +GLAPI void GLAPIENTRY glColorMaterial( GLenum face, GLenum mode ); + + +/* + * Raster functions + */ + +GLAPI void GLAPIENTRY glPixelZoom( GLfloat xfactor, GLfloat yfactor ); + +GLAPI void GLAPIENTRY glPixelStoref( GLenum pname, GLfloat param ); +GLAPI void GLAPIENTRY glPixelStorei( GLenum pname, GLint param ); + +GLAPI void GLAPIENTRY glPixelTransferf( GLenum pname, GLfloat param ); +GLAPI void GLAPIENTRY glPixelTransferi( GLenum pname, GLint param ); + +GLAPI void GLAPIENTRY glPixelMapfv( GLenum map, GLsizei mapsize, + const GLfloat *values ); +GLAPI void GLAPIENTRY glPixelMapuiv( GLenum map, GLsizei mapsize, + const GLuint *values ); +GLAPI void GLAPIENTRY glPixelMapusv( GLenum map, GLsizei mapsize, + const GLushort *values ); + +GLAPI void GLAPIENTRY glGetPixelMapfv( GLenum map, GLfloat *values ); +GLAPI void GLAPIENTRY glGetPixelMapuiv( GLenum map, GLuint *values ); +GLAPI void GLAPIENTRY glGetPixelMapusv( GLenum map, GLushort *values ); + +GLAPI void GLAPIENTRY glBitmap( GLsizei width, GLsizei height, + GLfloat xorig, GLfloat yorig, + GLfloat xmove, GLfloat ymove, + const GLubyte *bitmap ); + +GLAPI void GLAPIENTRY glReadPixels( GLint x, GLint y, + GLsizei width, GLsizei height, + GLenum format, GLenum type, + GLvoid *pixels ); + +GLAPI void GLAPIENTRY glDrawPixels( GLsizei width, GLsizei height, + GLenum format, GLenum type, + const GLvoid *pixels ); + +GLAPI void GLAPIENTRY glCopyPixels( GLint x, GLint y, + GLsizei width, GLsizei height, + GLenum type ); + +/* + * Stenciling + */ + +GLAPI void GLAPIENTRY glStencilFunc( GLenum func, GLint ref, GLuint mask ); + +GLAPI void GLAPIENTRY glStencilMask( GLuint mask ); + +GLAPI void GLAPIENTRY glStencilOp( GLenum fail, GLenum zfail, GLenum zpass ); + +GLAPI void GLAPIENTRY glClearStencil( GLint s ); + + + +/* + * Texture mapping + */ + +GLAPI void GLAPIENTRY glTexGend( GLenum coord, GLenum pname, GLdouble param ); +GLAPI void GLAPIENTRY glTexGenf( GLenum coord, GLenum pname, GLfloat param ); +GLAPI void GLAPIENTRY glTexGeni( GLenum coord, GLenum pname, GLint param ); + +GLAPI void GLAPIENTRY glTexGendv( GLenum coord, GLenum pname, const GLdouble *params ); +GLAPI void GLAPIENTRY glTexGenfv( GLenum coord, GLenum pname, const GLfloat *params ); +GLAPI void GLAPIENTRY glTexGeniv( GLenum coord, GLenum pname, const GLint *params ); + +GLAPI void GLAPIENTRY glGetTexGendv( GLenum coord, GLenum pname, GLdouble *params ); +GLAPI void GLAPIENTRY glGetTexGenfv( GLenum coord, GLenum pname, GLfloat *params ); +GLAPI void GLAPIENTRY glGetTexGeniv( GLenum coord, GLenum pname, GLint *params ); + + +GLAPI void GLAPIENTRY glTexEnvf( GLenum target, GLenum pname, GLfloat param ); +GLAPI void GLAPIENTRY glTexEnvi( GLenum target, GLenum pname, GLint param ); + +GLAPI void GLAPIENTRY glTexEnvfv( GLenum target, GLenum pname, const GLfloat *params ); +GLAPI void GLAPIENTRY glTexEnviv( GLenum target, GLenum pname, const GLint *params ); + +GLAPI void GLAPIENTRY glGetTexEnvfv( GLenum target, GLenum pname, GLfloat *params ); +GLAPI void GLAPIENTRY glGetTexEnviv( GLenum target, GLenum pname, GLint *params ); + + +GLAPI void GLAPIENTRY glTexParameterf( GLenum target, GLenum pname, GLfloat param ); +GLAPI void GLAPIENTRY glTexParameteri( GLenum target, GLenum pname, GLint param ); + +GLAPI void GLAPIENTRY glTexParameterfv( GLenum target, GLenum pname, + const GLfloat *params ); +GLAPI void GLAPIENTRY glTexParameteriv( GLenum target, GLenum pname, + const GLint *params ); + +GLAPI void GLAPIENTRY glGetTexParameterfv( GLenum target, + GLenum pname, GLfloat *params); +GLAPI void GLAPIENTRY glGetTexParameteriv( GLenum target, + GLenum pname, GLint *params ); + +GLAPI void GLAPIENTRY glGetTexLevelParameterfv( GLenum target, GLint level, + GLenum pname, GLfloat *params ); +GLAPI void GLAPIENTRY glGetTexLevelParameteriv( GLenum target, GLint level, + GLenum pname, GLint *params ); + + +GLAPI void GLAPIENTRY glTexImage1D( GLenum target, GLint level, + GLint internalFormat, + GLsizei width, GLint border, + GLenum format, GLenum type, + const GLvoid *pixels ); + +GLAPI void GLAPIENTRY glTexImage2D( GLenum target, GLint level, + GLint internalFormat, + GLsizei width, GLsizei height, + GLint border, GLenum format, GLenum type, + const GLvoid *pixels ); + +GLAPI void GLAPIENTRY glGetTexImage( GLenum target, GLint level, + GLenum format, GLenum type, + GLvoid *pixels ); + + +/* 1.1 functions */ + +GLAPI void GLAPIENTRY glGenTextures( GLsizei n, GLuint *textures ); + +GLAPI void GLAPIENTRY glDeleteTextures( GLsizei n, const GLuint *textures); + +GLAPI void GLAPIENTRY glBindTexture( GLenum target, GLuint texture ); + +GLAPI void GLAPIENTRY glPrioritizeTextures( GLsizei n, + const GLuint *textures, + const GLclampf *priorities ); + +GLAPI GLboolean GLAPIENTRY glAreTexturesResident( GLsizei n, + const GLuint *textures, + GLboolean *residences ); + +GLAPI GLboolean GLAPIENTRY glIsTexture( GLuint texture ); + + +GLAPI void GLAPIENTRY glTexSubImage1D( GLenum target, GLint level, + GLint xoffset, + GLsizei width, GLenum format, + GLenum type, const GLvoid *pixels ); + + +GLAPI void GLAPIENTRY glTexSubImage2D( GLenum target, GLint level, + GLint xoffset, GLint yoffset, + GLsizei width, GLsizei height, + GLenum format, GLenum type, + const GLvoid *pixels ); + + +GLAPI void GLAPIENTRY glCopyTexImage1D( GLenum target, GLint level, + GLenum internalformat, + GLint x, GLint y, + GLsizei width, GLint border ); + + +GLAPI void GLAPIENTRY glCopyTexImage2D( GLenum target, GLint level, + GLenum internalformat, + GLint x, GLint y, + GLsizei width, GLsizei height, + GLint border ); + + +GLAPI void GLAPIENTRY glCopyTexSubImage1D( GLenum target, GLint level, + GLint xoffset, GLint x, GLint y, + GLsizei width ); + + +GLAPI void GLAPIENTRY glCopyTexSubImage2D( GLenum target, GLint level, + GLint xoffset, GLint yoffset, + GLint x, GLint y, + GLsizei width, GLsizei height ); + + +/* + * Evaluators + */ + +GLAPI void GLAPIENTRY glMap1d( GLenum target, GLdouble u1, GLdouble u2, + GLint stride, + GLint order, const GLdouble *points ); +GLAPI void GLAPIENTRY glMap1f( GLenum target, GLfloat u1, GLfloat u2, + GLint stride, + GLint order, const GLfloat *points ); + +GLAPI void GLAPIENTRY glMap2d( GLenum target, + GLdouble u1, GLdouble u2, GLint ustride, GLint uorder, + GLdouble v1, GLdouble v2, GLint vstride, GLint vorder, + const GLdouble *points ); +GLAPI void GLAPIENTRY glMap2f( GLenum target, + GLfloat u1, GLfloat u2, GLint ustride, GLint uorder, + GLfloat v1, GLfloat v2, GLint vstride, GLint vorder, + const GLfloat *points ); + +GLAPI void GLAPIENTRY glGetMapdv( GLenum target, GLenum query, GLdouble *v ); +GLAPI void GLAPIENTRY glGetMapfv( GLenum target, GLenum query, GLfloat *v ); +GLAPI void GLAPIENTRY glGetMapiv( GLenum target, GLenum query, GLint *v ); + +GLAPI void GLAPIENTRY glEvalCoord1d( GLdouble u ); +GLAPI void GLAPIENTRY glEvalCoord1f( GLfloat u ); + +GLAPI void GLAPIENTRY glEvalCoord1dv( const GLdouble *u ); +GLAPI void GLAPIENTRY glEvalCoord1fv( const GLfloat *u ); + +GLAPI void GLAPIENTRY glEvalCoord2d( GLdouble u, GLdouble v ); +GLAPI void GLAPIENTRY glEvalCoord2f( GLfloat u, GLfloat v ); + +GLAPI void GLAPIENTRY glEvalCoord2dv( const GLdouble *u ); +GLAPI void GLAPIENTRY glEvalCoord2fv( const GLfloat *u ); + +GLAPI void GLAPIENTRY glMapGrid1d( GLint un, GLdouble u1, GLdouble u2 ); +GLAPI void GLAPIENTRY glMapGrid1f( GLint un, GLfloat u1, GLfloat u2 ); + +GLAPI void GLAPIENTRY glMapGrid2d( GLint un, GLdouble u1, GLdouble u2, + GLint vn, GLdouble v1, GLdouble v2 ); +GLAPI void GLAPIENTRY glMapGrid2f( GLint un, GLfloat u1, GLfloat u2, + GLint vn, GLfloat v1, GLfloat v2 ); + +GLAPI void GLAPIENTRY glEvalPoint1( GLint i ); + +GLAPI void GLAPIENTRY glEvalPoint2( GLint i, GLint j ); + +GLAPI void GLAPIENTRY glEvalMesh1( GLenum mode, GLint i1, GLint i2 ); + +GLAPI void GLAPIENTRY glEvalMesh2( GLenum mode, GLint i1, GLint i2, GLint j1, GLint j2 ); + + +/* + * Fog + */ + +GLAPI void GLAPIENTRY glFogf( GLenum pname, GLfloat param ); + +GLAPI void GLAPIENTRY glFogi( GLenum pname, GLint param ); + +GLAPI void GLAPIENTRY glFogfv( GLenum pname, const GLfloat *params ); + +GLAPI void GLAPIENTRY glFogiv( GLenum pname, const GLint *params ); + + +/* + * Selection and Feedback + */ + +GLAPI void GLAPIENTRY glFeedbackBuffer( GLsizei size, GLenum type, GLfloat *buffer ); + +GLAPI void GLAPIENTRY glPassThrough( GLfloat token ); + +GLAPI void GLAPIENTRY glSelectBuffer( GLsizei size, GLuint *buffer ); + +GLAPI void GLAPIENTRY glInitNames( void ); + +GLAPI void GLAPIENTRY glLoadName( GLuint name ); + +GLAPI void GLAPIENTRY glPushName( GLuint name ); + +GLAPI void GLAPIENTRY glPopName( void ); + + + +/* + * OpenGL 1.2 + */ + +#define GL_RESCALE_NORMAL 0x803A +#define GL_CLAMP_TO_EDGE 0x812F +#define GL_MAX_ELEMENTS_VERTICES 0x80E8 +#define GL_MAX_ELEMENTS_INDICES 0x80E9 +#define GL_BGR 0x80E0 +#define GL_BGRA 0x80E1 +#define GL_UNSIGNED_BYTE_3_3_2 0x8032 +#define GL_UNSIGNED_BYTE_2_3_3_REV 0x8362 +#define GL_UNSIGNED_SHORT_5_6_5 0x8363 +#define GL_UNSIGNED_SHORT_5_6_5_REV 0x8364 +#define GL_UNSIGNED_SHORT_4_4_4_4 0x8033 +#define GL_UNSIGNED_SHORT_4_4_4_4_REV 0x8365 +#define GL_UNSIGNED_SHORT_5_5_5_1 0x8034 +#define GL_UNSIGNED_SHORT_1_5_5_5_REV 0x8366 +#define GL_UNSIGNED_INT_8_8_8_8 0x8035 +#define GL_UNSIGNED_INT_8_8_8_8_REV 0x8367 +#define GL_UNSIGNED_INT_10_10_10_2 0x8036 +#define GL_UNSIGNED_INT_2_10_10_10_REV 0x8368 +#define GL_LIGHT_MODEL_COLOR_CONTROL 0x81F8 +#define GL_SINGLE_COLOR 0x81F9 +#define GL_SEPARATE_SPECULAR_COLOR 0x81FA +#define GL_TEXTURE_MIN_LOD 0x813A +#define GL_TEXTURE_MAX_LOD 0x813B +#define GL_TEXTURE_BASE_LEVEL 0x813C +#define GL_TEXTURE_MAX_LEVEL 0x813D +#define GL_SMOOTH_POINT_SIZE_RANGE 0x0B12 +#define GL_SMOOTH_POINT_SIZE_GRANULARITY 0x0B13 +#define GL_SMOOTH_LINE_WIDTH_RANGE 0x0B22 +#define GL_SMOOTH_LINE_WIDTH_GRANULARITY 0x0B23 +#define GL_ALIASED_POINT_SIZE_RANGE 0x846D +#define GL_ALIASED_LINE_WIDTH_RANGE 0x846E +#define GL_PACK_SKIP_IMAGES 0x806B +#define GL_PACK_IMAGE_HEIGHT 0x806C +#define GL_UNPACK_SKIP_IMAGES 0x806D +#define GL_UNPACK_IMAGE_HEIGHT 0x806E +#define GL_TEXTURE_3D 0x806F +#define GL_PROXY_TEXTURE_3D 0x8070 +#define GL_TEXTURE_DEPTH 0x8071 +#define GL_TEXTURE_WRAP_R 0x8072 +#define GL_MAX_3D_TEXTURE_SIZE 0x8073 +#define GL_TEXTURE_BINDING_3D 0x806A + +GLAPI void GLAPIENTRY glDrawRangeElements( GLenum mode, GLuint start, + GLuint end, GLsizei count, GLenum type, const GLvoid *indices ); + +GLAPI void GLAPIENTRY glTexImage3D( GLenum target, GLint level, + GLint internalFormat, + GLsizei width, GLsizei height, + GLsizei depth, GLint border, + GLenum format, GLenum type, + const GLvoid *pixels ); + +GLAPI void GLAPIENTRY glTexSubImage3D( GLenum target, GLint level, + GLint xoffset, GLint yoffset, + GLint zoffset, GLsizei width, + GLsizei height, GLsizei depth, + GLenum format, + GLenum type, const GLvoid *pixels); + +GLAPI void GLAPIENTRY glCopyTexSubImage3D( GLenum target, GLint level, + GLint xoffset, GLint yoffset, + GLint zoffset, GLint x, + GLint y, GLsizei width, + GLsizei height ); + +typedef void (APIENTRYP PFNGLDRAWRANGEELEMENTSPROC) (GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const GLvoid *indices); +typedef void (APIENTRYP PFNGLTEXIMAGE3DPROC) (GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const GLvoid *pixels); +typedef void (APIENTRYP PFNGLTEXSUBIMAGE3DPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const GLvoid *pixels); +typedef void (APIENTRYP PFNGLCOPYTEXSUBIMAGE3DPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height); + + +/* + * GL_ARB_imaging + */ + +#define GL_CONSTANT_COLOR 0x8001 +#define GL_ONE_MINUS_CONSTANT_COLOR 0x8002 +#define GL_CONSTANT_ALPHA 0x8003 +#define GL_ONE_MINUS_CONSTANT_ALPHA 0x8004 +#define GL_COLOR_TABLE 0x80D0 +#define GL_POST_CONVOLUTION_COLOR_TABLE 0x80D1 +#define GL_POST_COLOR_MATRIX_COLOR_TABLE 0x80D2 +#define GL_PROXY_COLOR_TABLE 0x80D3 +#define GL_PROXY_POST_CONVOLUTION_COLOR_TABLE 0x80D4 +#define GL_PROXY_POST_COLOR_MATRIX_COLOR_TABLE 0x80D5 +#define GL_COLOR_TABLE_SCALE 0x80D6 +#define GL_COLOR_TABLE_BIAS 0x80D7 +#define GL_COLOR_TABLE_FORMAT 0x80D8 +#define GL_COLOR_TABLE_WIDTH 0x80D9 +#define GL_COLOR_TABLE_RED_SIZE 0x80DA +#define GL_COLOR_TABLE_GREEN_SIZE 0x80DB +#define GL_COLOR_TABLE_BLUE_SIZE 0x80DC +#define GL_COLOR_TABLE_ALPHA_SIZE 0x80DD +#define GL_COLOR_TABLE_LUMINANCE_SIZE 0x80DE +#define GL_COLOR_TABLE_INTENSITY_SIZE 0x80DF +#define GL_CONVOLUTION_1D 0x8010 +#define GL_CONVOLUTION_2D 0x8011 +#define GL_SEPARABLE_2D 0x8012 +#define GL_CONVOLUTION_BORDER_MODE 0x8013 +#define GL_CONVOLUTION_FILTER_SCALE 0x8014 +#define GL_CONVOLUTION_FILTER_BIAS 0x8015 +#define GL_REDUCE 0x8016 +#define GL_CONVOLUTION_FORMAT 0x8017 +#define GL_CONVOLUTION_WIDTH 0x8018 +#define GL_CONVOLUTION_HEIGHT 0x8019 +#define GL_MAX_CONVOLUTION_WIDTH 0x801A +#define GL_MAX_CONVOLUTION_HEIGHT 0x801B +#define GL_POST_CONVOLUTION_RED_SCALE 0x801C +#define GL_POST_CONVOLUTION_GREEN_SCALE 0x801D +#define GL_POST_CONVOLUTION_BLUE_SCALE 0x801E +#define GL_POST_CONVOLUTION_ALPHA_SCALE 0x801F +#define GL_POST_CONVOLUTION_RED_BIAS 0x8020 +#define GL_POST_CONVOLUTION_GREEN_BIAS 0x8021 +#define GL_POST_CONVOLUTION_BLUE_BIAS 0x8022 +#define GL_POST_CONVOLUTION_ALPHA_BIAS 0x8023 +#define GL_CONSTANT_BORDER 0x8151 +#define GL_REPLICATE_BORDER 0x8153 +#define GL_CONVOLUTION_BORDER_COLOR 0x8154 +#define GL_COLOR_MATRIX 0x80B1 +#define GL_COLOR_MATRIX_STACK_DEPTH 0x80B2 +#define GL_MAX_COLOR_MATRIX_STACK_DEPTH 0x80B3 +#define GL_POST_COLOR_MATRIX_RED_SCALE 0x80B4 +#define GL_POST_COLOR_MATRIX_GREEN_SCALE 0x80B5 +#define GL_POST_COLOR_MATRIX_BLUE_SCALE 0x80B6 +#define GL_POST_COLOR_MATRIX_ALPHA_SCALE 0x80B7 +#define GL_POST_COLOR_MATRIX_RED_BIAS 0x80B8 +#define GL_POST_COLOR_MATRIX_GREEN_BIAS 0x80B9 +#define GL_POST_COLOR_MATRIX_BLUE_BIAS 0x80BA +#define GL_POST_COLOR_MATRIX_ALPHA_BIAS 0x80BB +#define GL_HISTOGRAM 0x8024 +#define GL_PROXY_HISTOGRAM 0x8025 +#define GL_HISTOGRAM_WIDTH 0x8026 +#define GL_HISTOGRAM_FORMAT 0x8027 +#define GL_HISTOGRAM_RED_SIZE 0x8028 +#define GL_HISTOGRAM_GREEN_SIZE 0x8029 +#define GL_HISTOGRAM_BLUE_SIZE 0x802A +#define GL_HISTOGRAM_ALPHA_SIZE 0x802B +#define GL_HISTOGRAM_LUMINANCE_SIZE 0x802C +#define GL_HISTOGRAM_SINK 0x802D +#define GL_MINMAX 0x802E +#define GL_MINMAX_FORMAT 0x802F +#define GL_MINMAX_SINK 0x8030 +#define GL_TABLE_TOO_LARGE 0x8031 +#define GL_BLEND_EQUATION 0x8009 +#define GL_MIN 0x8007 +#define GL_MAX 0x8008 +#define GL_FUNC_ADD 0x8006 +#define GL_FUNC_SUBTRACT 0x800A +#define GL_FUNC_REVERSE_SUBTRACT 0x800B +#define GL_BLEND_COLOR 0x8005 + + +GLAPI void GLAPIENTRY glColorTable( GLenum target, GLenum internalformat, + GLsizei width, GLenum format, + GLenum type, const GLvoid *table ); + +GLAPI void GLAPIENTRY glColorSubTable( GLenum target, + GLsizei start, GLsizei count, + GLenum format, GLenum type, + const GLvoid *data ); + +GLAPI void GLAPIENTRY glColorTableParameteriv(GLenum target, GLenum pname, + const GLint *params); + +GLAPI void GLAPIENTRY glColorTableParameterfv(GLenum target, GLenum pname, + const GLfloat *params); + +GLAPI void GLAPIENTRY glCopyColorSubTable( GLenum target, GLsizei start, + GLint x, GLint y, GLsizei width ); + +GLAPI void GLAPIENTRY glCopyColorTable( GLenum target, GLenum internalformat, + GLint x, GLint y, GLsizei width ); + +GLAPI void GLAPIENTRY glGetColorTable( GLenum target, GLenum format, + GLenum type, GLvoid *table ); + +GLAPI void GLAPIENTRY glGetColorTableParameterfv( GLenum target, GLenum pname, + GLfloat *params ); + +GLAPI void GLAPIENTRY glGetColorTableParameteriv( GLenum target, GLenum pname, + GLint *params ); + +GLAPI void GLAPIENTRY glBlendEquation( GLenum mode ); + +GLAPI void GLAPIENTRY glBlendColor( GLclampf red, GLclampf green, + GLclampf blue, GLclampf alpha ); + +GLAPI void GLAPIENTRY glHistogram( GLenum target, GLsizei width, + GLenum internalformat, GLboolean sink ); + +GLAPI void GLAPIENTRY glResetHistogram( GLenum target ); + +GLAPI void GLAPIENTRY glGetHistogram( GLenum target, GLboolean reset, + GLenum format, GLenum type, + GLvoid *values ); + +GLAPI void GLAPIENTRY glGetHistogramParameterfv( GLenum target, GLenum pname, + GLfloat *params ); + +GLAPI void GLAPIENTRY glGetHistogramParameteriv( GLenum target, GLenum pname, + GLint *params ); + +GLAPI void GLAPIENTRY glMinmax( GLenum target, GLenum internalformat, + GLboolean sink ); + +GLAPI void GLAPIENTRY glResetMinmax( GLenum target ); + +GLAPI void GLAPIENTRY glGetMinmax( GLenum target, GLboolean reset, + GLenum format, GLenum types, + GLvoid *values ); + +GLAPI void GLAPIENTRY glGetMinmaxParameterfv( GLenum target, GLenum pname, + GLfloat *params ); + +GLAPI void GLAPIENTRY glGetMinmaxParameteriv( GLenum target, GLenum pname, + GLint *params ); + +GLAPI void GLAPIENTRY glConvolutionFilter1D( GLenum target, + GLenum internalformat, GLsizei width, GLenum format, GLenum type, + const GLvoid *image ); + +GLAPI void GLAPIENTRY glConvolutionFilter2D( GLenum target, + GLenum internalformat, GLsizei width, GLsizei height, GLenum format, + GLenum type, const GLvoid *image ); + +GLAPI void GLAPIENTRY glConvolutionParameterf( GLenum target, GLenum pname, + GLfloat params ); + +GLAPI void GLAPIENTRY glConvolutionParameterfv( GLenum target, GLenum pname, + const GLfloat *params ); + +GLAPI void GLAPIENTRY glConvolutionParameteri( GLenum target, GLenum pname, + GLint params ); + +GLAPI void GLAPIENTRY glConvolutionParameteriv( GLenum target, GLenum pname, + const GLint *params ); + +GLAPI void GLAPIENTRY glCopyConvolutionFilter1D( GLenum target, + GLenum internalformat, GLint x, GLint y, GLsizei width ); + +GLAPI void GLAPIENTRY glCopyConvolutionFilter2D( GLenum target, + GLenum internalformat, GLint x, GLint y, GLsizei width, + GLsizei height); + +GLAPI void GLAPIENTRY glGetConvolutionFilter( GLenum target, GLenum format, + GLenum type, GLvoid *image ); + +GLAPI void GLAPIENTRY glGetConvolutionParameterfv( GLenum target, GLenum pname, + GLfloat *params ); + +GLAPI void GLAPIENTRY glGetConvolutionParameteriv( GLenum target, GLenum pname, + GLint *params ); + +GLAPI void GLAPIENTRY glSeparableFilter2D( GLenum target, + GLenum internalformat, GLsizei width, GLsizei height, GLenum format, + GLenum type, const GLvoid *row, const GLvoid *column ); + +GLAPI void GLAPIENTRY glGetSeparableFilter( GLenum target, GLenum format, + GLenum type, GLvoid *row, GLvoid *column, GLvoid *span ); + +typedef void (APIENTRYP PFNGLBLENDCOLORPROC) (GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha); +typedef void (APIENTRYP PFNGLBLENDEQUATIONPROC) (GLenum mode); + + + +/* + * OpenGL 1.3 + */ + +/* multitexture */ +#define GL_TEXTURE0 0x84C0 +#define GL_TEXTURE1 0x84C1 +#define GL_TEXTURE2 0x84C2 +#define GL_TEXTURE3 0x84C3 +#define GL_TEXTURE4 0x84C4 +#define GL_TEXTURE5 0x84C5 +#define GL_TEXTURE6 0x84C6 +#define GL_TEXTURE7 0x84C7 +#define GL_TEXTURE8 0x84C8 +#define GL_TEXTURE9 0x84C9 +#define GL_TEXTURE10 0x84CA +#define GL_TEXTURE11 0x84CB +#define GL_TEXTURE12 0x84CC +#define GL_TEXTURE13 0x84CD +#define GL_TEXTURE14 0x84CE +#define GL_TEXTURE15 0x84CF +#define GL_TEXTURE16 0x84D0 +#define GL_TEXTURE17 0x84D1 +#define GL_TEXTURE18 0x84D2 +#define GL_TEXTURE19 0x84D3 +#define GL_TEXTURE20 0x84D4 +#define GL_TEXTURE21 0x84D5 +#define GL_TEXTURE22 0x84D6 +#define GL_TEXTURE23 0x84D7 +#define GL_TEXTURE24 0x84D8 +#define GL_TEXTURE25 0x84D9 +#define GL_TEXTURE26 0x84DA +#define GL_TEXTURE27 0x84DB +#define GL_TEXTURE28 0x84DC +#define GL_TEXTURE29 0x84DD +#define GL_TEXTURE30 0x84DE +#define GL_TEXTURE31 0x84DF +#define GL_ACTIVE_TEXTURE 0x84E0 +#define GL_CLIENT_ACTIVE_TEXTURE 0x84E1 +#define GL_MAX_TEXTURE_UNITS 0x84E2 +/* texture_cube_map */ +#define GL_NORMAL_MAP 0x8511 +#define GL_REFLECTION_MAP 0x8512 +#define GL_TEXTURE_CUBE_MAP 0x8513 +#define GL_TEXTURE_BINDING_CUBE_MAP 0x8514 +#define GL_TEXTURE_CUBE_MAP_POSITIVE_X 0x8515 +#define GL_TEXTURE_CUBE_MAP_NEGATIVE_X 0x8516 +#define GL_TEXTURE_CUBE_MAP_POSITIVE_Y 0x8517 +#define GL_TEXTURE_CUBE_MAP_NEGATIVE_Y 0x8518 +#define GL_TEXTURE_CUBE_MAP_POSITIVE_Z 0x8519 +#define GL_TEXTURE_CUBE_MAP_NEGATIVE_Z 0x851A +#define GL_PROXY_TEXTURE_CUBE_MAP 0x851B +#define GL_MAX_CUBE_MAP_TEXTURE_SIZE 0x851C +/* texture_compression */ +#define GL_COMPRESSED_ALPHA 0x84E9 +#define GL_COMPRESSED_LUMINANCE 0x84EA +#define GL_COMPRESSED_LUMINANCE_ALPHA 0x84EB +#define GL_COMPRESSED_INTENSITY 0x84EC +#define GL_COMPRESSED_RGB 0x84ED +#define GL_COMPRESSED_RGBA 0x84EE +#define GL_TEXTURE_COMPRESSION_HINT 0x84EF +#define GL_TEXTURE_COMPRESSED_IMAGE_SIZE 0x86A0 +#define GL_TEXTURE_COMPRESSED 0x86A1 +#define GL_NUM_COMPRESSED_TEXTURE_FORMATS 0x86A2 +#define GL_COMPRESSED_TEXTURE_FORMATS 0x86A3 +/* multisample */ +#define GL_MULTISAMPLE 0x809D +#define GL_SAMPLE_ALPHA_TO_COVERAGE 0x809E +#define GL_SAMPLE_ALPHA_TO_ONE 0x809F +#define GL_SAMPLE_COVERAGE 0x80A0 +#define GL_SAMPLE_BUFFERS 0x80A8 +#define GL_SAMPLES 0x80A9 +#define GL_SAMPLE_COVERAGE_VALUE 0x80AA +#define GL_SAMPLE_COVERAGE_INVERT 0x80AB +#define GL_MULTISAMPLE_BIT 0x20000000 +/* transpose_matrix */ +#define GL_TRANSPOSE_MODELVIEW_MATRIX 0x84E3 +#define GL_TRANSPOSE_PROJECTION_MATRIX 0x84E4 +#define GL_TRANSPOSE_TEXTURE_MATRIX 0x84E5 +#define GL_TRANSPOSE_COLOR_MATRIX 0x84E6 +/* texture_env_combine */ +#define GL_COMBINE 0x8570 +#define GL_COMBINE_RGB 0x8571 +#define GL_COMBINE_ALPHA 0x8572 +#define GL_SOURCE0_RGB 0x8580 +#define GL_SOURCE1_RGB 0x8581 +#define GL_SOURCE2_RGB 0x8582 +#define GL_SOURCE0_ALPHA 0x8588 +#define GL_SOURCE1_ALPHA 0x8589 +#define GL_SOURCE2_ALPHA 0x858A +#define GL_OPERAND0_RGB 0x8590 +#define GL_OPERAND1_RGB 0x8591 +#define GL_OPERAND2_RGB 0x8592 +#define GL_OPERAND0_ALPHA 0x8598 +#define GL_OPERAND1_ALPHA 0x8599 +#define GL_OPERAND2_ALPHA 0x859A +#define GL_RGB_SCALE 0x8573 +#define GL_ADD_SIGNED 0x8574 +#define GL_INTERPOLATE 0x8575 +#define GL_SUBTRACT 0x84E7 +#define GL_CONSTANT 0x8576 +#define GL_PRIMARY_COLOR 0x8577 +#define GL_PREVIOUS 0x8578 +/* texture_env_dot3 */ +#define GL_DOT3_RGB 0x86AE +#define GL_DOT3_RGBA 0x86AF +/* texture_border_clamp */ +#define GL_CLAMP_TO_BORDER 0x812D + +GLAPI void GLAPIENTRY glActiveTexture( GLenum texture ); + +GLAPI void GLAPIENTRY glClientActiveTexture( GLenum texture ); + +GLAPI void GLAPIENTRY glCompressedTexImage1D( GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLsizei imageSize, const GLvoid *data ); + +GLAPI void GLAPIENTRY glCompressedTexImage2D( GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const GLvoid *data ); + +GLAPI void GLAPIENTRY glCompressedTexImage3D( GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const GLvoid *data ); + +GLAPI void GLAPIENTRY glCompressedTexSubImage1D( GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLsizei imageSize, const GLvoid *data ); + +GLAPI void GLAPIENTRY glCompressedTexSubImage2D( GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const GLvoid *data ); + +GLAPI void GLAPIENTRY glCompressedTexSubImage3D( GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const GLvoid *data ); + +GLAPI void GLAPIENTRY glGetCompressedTexImage( GLenum target, GLint lod, GLvoid *img ); + +GLAPI void GLAPIENTRY glMultiTexCoord1d( GLenum target, GLdouble s ); + +GLAPI void GLAPIENTRY glMultiTexCoord1dv( GLenum target, const GLdouble *v ); + +GLAPI void GLAPIENTRY glMultiTexCoord1f( GLenum target, GLfloat s ); + +GLAPI void GLAPIENTRY glMultiTexCoord1fv( GLenum target, const GLfloat *v ); + +GLAPI void GLAPIENTRY glMultiTexCoord1i( GLenum target, GLint s ); + +GLAPI void GLAPIENTRY glMultiTexCoord1iv( GLenum target, const GLint *v ); + +GLAPI void GLAPIENTRY glMultiTexCoord1s( GLenum target, GLshort s ); + +GLAPI void GLAPIENTRY glMultiTexCoord1sv( GLenum target, const GLshort *v ); + +GLAPI void GLAPIENTRY glMultiTexCoord2d( GLenum target, GLdouble s, GLdouble t ); + +GLAPI void GLAPIENTRY glMultiTexCoord2dv( GLenum target, const GLdouble *v ); + +GLAPI void GLAPIENTRY glMultiTexCoord2f( GLenum target, GLfloat s, GLfloat t ); + +GLAPI void GLAPIENTRY glMultiTexCoord2fv( GLenum target, const GLfloat *v ); + +GLAPI void GLAPIENTRY glMultiTexCoord2i( GLenum target, GLint s, GLint t ); + +GLAPI void GLAPIENTRY glMultiTexCoord2iv( GLenum target, const GLint *v ); + +GLAPI void GLAPIENTRY glMultiTexCoord2s( GLenum target, GLshort s, GLshort t ); + +GLAPI void GLAPIENTRY glMultiTexCoord2sv( GLenum target, const GLshort *v ); + +GLAPI void GLAPIENTRY glMultiTexCoord3d( GLenum target, GLdouble s, GLdouble t, GLdouble r ); + +GLAPI void GLAPIENTRY glMultiTexCoord3dv( GLenum target, const GLdouble *v ); + +GLAPI void GLAPIENTRY glMultiTexCoord3f( GLenum target, GLfloat s, GLfloat t, GLfloat r ); + +GLAPI void GLAPIENTRY glMultiTexCoord3fv( GLenum target, const GLfloat *v ); + +GLAPI void GLAPIENTRY glMultiTexCoord3i( GLenum target, GLint s, GLint t, GLint r ); + +GLAPI void GLAPIENTRY glMultiTexCoord3iv( GLenum target, const GLint *v ); + +GLAPI void GLAPIENTRY glMultiTexCoord3s( GLenum target, GLshort s, GLshort t, GLshort r ); + +GLAPI void GLAPIENTRY glMultiTexCoord3sv( GLenum target, const GLshort *v ); + +GLAPI void GLAPIENTRY glMultiTexCoord4d( GLenum target, GLdouble s, GLdouble t, GLdouble r, GLdouble q ); + +GLAPI void GLAPIENTRY glMultiTexCoord4dv( GLenum target, const GLdouble *v ); + +GLAPI void GLAPIENTRY glMultiTexCoord4f( GLenum target, GLfloat s, GLfloat t, GLfloat r, GLfloat q ); + +GLAPI void GLAPIENTRY glMultiTexCoord4fv( GLenum target, const GLfloat *v ); + +GLAPI void GLAPIENTRY glMultiTexCoord4i( GLenum target, GLint s, GLint t, GLint r, GLint q ); + +GLAPI void GLAPIENTRY glMultiTexCoord4iv( GLenum target, const GLint *v ); + +GLAPI void GLAPIENTRY glMultiTexCoord4s( GLenum target, GLshort s, GLshort t, GLshort r, GLshort q ); + +GLAPI void GLAPIENTRY glMultiTexCoord4sv( GLenum target, const GLshort *v ); + + +GLAPI void GLAPIENTRY glLoadTransposeMatrixd( const GLdouble m[16] ); + +GLAPI void GLAPIENTRY glLoadTransposeMatrixf( const GLfloat m[16] ); + +GLAPI void GLAPIENTRY glMultTransposeMatrixd( const GLdouble m[16] ); + +GLAPI void GLAPIENTRY glMultTransposeMatrixf( const GLfloat m[16] ); + +GLAPI void GLAPIENTRY glSampleCoverage( GLclampf value, GLboolean invert ); + + +typedef void (APIENTRYP PFNGLACTIVETEXTUREPROC) (GLenum texture); +typedef void (APIENTRYP PFNGLSAMPLECOVERAGEPROC) (GLclampf value, GLboolean invert); +typedef void (APIENTRYP PFNGLCOMPRESSEDTEXIMAGE3DPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const GLvoid *data); +typedef void (APIENTRYP PFNGLCOMPRESSEDTEXIMAGE2DPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const GLvoid *data); +typedef void (APIENTRYP PFNGLCOMPRESSEDTEXIMAGE1DPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLsizei imageSize, const GLvoid *data); +typedef void (APIENTRYP PFNGLCOMPRESSEDTEXSUBIMAGE3DPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const GLvoid *data); +typedef void (APIENTRYP PFNGLCOMPRESSEDTEXSUBIMAGE2DPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const GLvoid *data); +typedef void (APIENTRYP PFNGLCOMPRESSEDTEXSUBIMAGE1DPROC) (GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLsizei imageSize, const GLvoid *data); +typedef void (APIENTRYP PFNGLGETCOMPRESSEDTEXIMAGEPROC) (GLenum target, GLint level, GLvoid *img); + + + +/* + * GL_ARB_multitexture (ARB extension 1 and OpenGL 1.2.1) + */ +#ifndef GL_ARB_multitexture +#define GL_ARB_multitexture 1 + +#define GL_TEXTURE0_ARB 0x84C0 +#define GL_TEXTURE1_ARB 0x84C1 +#define GL_TEXTURE2_ARB 0x84C2 +#define GL_TEXTURE3_ARB 0x84C3 +#define GL_TEXTURE4_ARB 0x84C4 +#define GL_TEXTURE5_ARB 0x84C5 +#define GL_TEXTURE6_ARB 0x84C6 +#define GL_TEXTURE7_ARB 0x84C7 +#define GL_TEXTURE8_ARB 0x84C8 +#define GL_TEXTURE9_ARB 0x84C9 +#define GL_TEXTURE10_ARB 0x84CA +#define GL_TEXTURE11_ARB 0x84CB +#define GL_TEXTURE12_ARB 0x84CC +#define GL_TEXTURE13_ARB 0x84CD +#define GL_TEXTURE14_ARB 0x84CE +#define GL_TEXTURE15_ARB 0x84CF +#define GL_TEXTURE16_ARB 0x84D0 +#define GL_TEXTURE17_ARB 0x84D1 +#define GL_TEXTURE18_ARB 0x84D2 +#define GL_TEXTURE19_ARB 0x84D3 +#define GL_TEXTURE20_ARB 0x84D4 +#define GL_TEXTURE21_ARB 0x84D5 +#define GL_TEXTURE22_ARB 0x84D6 +#define GL_TEXTURE23_ARB 0x84D7 +#define GL_TEXTURE24_ARB 0x84D8 +#define GL_TEXTURE25_ARB 0x84D9 +#define GL_TEXTURE26_ARB 0x84DA +#define GL_TEXTURE27_ARB 0x84DB +#define GL_TEXTURE28_ARB 0x84DC +#define GL_TEXTURE29_ARB 0x84DD +#define GL_TEXTURE30_ARB 0x84DE +#define GL_TEXTURE31_ARB 0x84DF +#define GL_ACTIVE_TEXTURE_ARB 0x84E0 +#define GL_CLIENT_ACTIVE_TEXTURE_ARB 0x84E1 +#define GL_MAX_TEXTURE_UNITS_ARB 0x84E2 + +GLAPI void GLAPIENTRY glActiveTextureARB(GLenum texture); +GLAPI void GLAPIENTRY glClientActiveTextureARB(GLenum texture); +GLAPI void GLAPIENTRY glMultiTexCoord1dARB(GLenum target, GLdouble s); +GLAPI void GLAPIENTRY glMultiTexCoord1dvARB(GLenum target, const GLdouble *v); +GLAPI void GLAPIENTRY glMultiTexCoord1fARB(GLenum target, GLfloat s); +GLAPI void GLAPIENTRY glMultiTexCoord1fvARB(GLenum target, const GLfloat *v); +GLAPI void GLAPIENTRY glMultiTexCoord1iARB(GLenum target, GLint s); +GLAPI void GLAPIENTRY glMultiTexCoord1ivARB(GLenum target, const GLint *v); +GLAPI void GLAPIENTRY glMultiTexCoord1sARB(GLenum target, GLshort s); +GLAPI void GLAPIENTRY glMultiTexCoord1svARB(GLenum target, const GLshort *v); +GLAPI void GLAPIENTRY glMultiTexCoord2dARB(GLenum target, GLdouble s, GLdouble t); +GLAPI void GLAPIENTRY glMultiTexCoord2dvARB(GLenum target, const GLdouble *v); +GLAPI void GLAPIENTRY glMultiTexCoord2fARB(GLenum target, GLfloat s, GLfloat t); +GLAPI void GLAPIENTRY glMultiTexCoord2fvARB(GLenum target, const GLfloat *v); +GLAPI void GLAPIENTRY glMultiTexCoord2iARB(GLenum target, GLint s, GLint t); +GLAPI void GLAPIENTRY glMultiTexCoord2ivARB(GLenum target, const GLint *v); +GLAPI void GLAPIENTRY glMultiTexCoord2sARB(GLenum target, GLshort s, GLshort t); +GLAPI void GLAPIENTRY glMultiTexCoord2svARB(GLenum target, const GLshort *v); +GLAPI void GLAPIENTRY glMultiTexCoord3dARB(GLenum target, GLdouble s, GLdouble t, GLdouble r); +GLAPI void GLAPIENTRY glMultiTexCoord3dvARB(GLenum target, const GLdouble *v); +GLAPI void GLAPIENTRY glMultiTexCoord3fARB(GLenum target, GLfloat s, GLfloat t, GLfloat r); +GLAPI void GLAPIENTRY glMultiTexCoord3fvARB(GLenum target, const GLfloat *v); +GLAPI void GLAPIENTRY glMultiTexCoord3iARB(GLenum target, GLint s, GLint t, GLint r); +GLAPI void GLAPIENTRY glMultiTexCoord3ivARB(GLenum target, const GLint *v); +GLAPI void GLAPIENTRY glMultiTexCoord3sARB(GLenum target, GLshort s, GLshort t, GLshort r); +GLAPI void GLAPIENTRY glMultiTexCoord3svARB(GLenum target, const GLshort *v); +GLAPI void GLAPIENTRY glMultiTexCoord4dARB(GLenum target, GLdouble s, GLdouble t, GLdouble r, GLdouble q); +GLAPI void GLAPIENTRY glMultiTexCoord4dvARB(GLenum target, const GLdouble *v); +GLAPI void GLAPIENTRY glMultiTexCoord4fARB(GLenum target, GLfloat s, GLfloat t, GLfloat r, GLfloat q); +GLAPI void GLAPIENTRY glMultiTexCoord4fvARB(GLenum target, const GLfloat *v); +GLAPI void GLAPIENTRY glMultiTexCoord4iARB(GLenum target, GLint s, GLint t, GLint r, GLint q); +GLAPI void GLAPIENTRY glMultiTexCoord4ivARB(GLenum target, const GLint *v); +GLAPI void GLAPIENTRY glMultiTexCoord4sARB(GLenum target, GLshort s, GLshort t, GLshort r, GLshort q); +GLAPI void GLAPIENTRY glMultiTexCoord4svARB(GLenum target, const GLshort *v); + +typedef void (APIENTRYP PFNGLACTIVETEXTUREARBPROC) (GLenum texture); +typedef void (APIENTRYP PFNGLCLIENTACTIVETEXTUREARBPROC) (GLenum texture); +typedef void (APIENTRYP PFNGLMULTITEXCOORD1DARBPROC) (GLenum target, GLdouble s); +typedef void (APIENTRYP PFNGLMULTITEXCOORD1DVARBPROC) (GLenum target, const GLdouble *v); +typedef void (APIENTRYP PFNGLMULTITEXCOORD1FARBPROC) (GLenum target, GLfloat s); +typedef void (APIENTRYP PFNGLMULTITEXCOORD1FVARBPROC) (GLenum target, const GLfloat *v); +typedef void (APIENTRYP PFNGLMULTITEXCOORD1IARBPROC) (GLenum target, GLint s); +typedef void (APIENTRYP PFNGLMULTITEXCOORD1IVARBPROC) (GLenum target, const GLint *v); +typedef void (APIENTRYP PFNGLMULTITEXCOORD1SARBPROC) (GLenum target, GLshort s); +typedef void (APIENTRYP PFNGLMULTITEXCOORD1SVARBPROC) (GLenum target, const GLshort *v); +typedef void (APIENTRYP PFNGLMULTITEXCOORD2DARBPROC) (GLenum target, GLdouble s, GLdouble t); +typedef void (APIENTRYP PFNGLMULTITEXCOORD2DVARBPROC) (GLenum target, const GLdouble *v); +typedef void (APIENTRYP PFNGLMULTITEXCOORD2FARBPROC) (GLenum target, GLfloat s, GLfloat t); +typedef void (APIENTRYP PFNGLMULTITEXCOORD2FVARBPROC) (GLenum target, const GLfloat *v); +typedef void (APIENTRYP PFNGLMULTITEXCOORD2IARBPROC) (GLenum target, GLint s, GLint t); +typedef void (APIENTRYP PFNGLMULTITEXCOORD2IVARBPROC) (GLenum target, const GLint *v); +typedef void (APIENTRYP PFNGLMULTITEXCOORD2SARBPROC) (GLenum target, GLshort s, GLshort t); +typedef void (APIENTRYP PFNGLMULTITEXCOORD2SVARBPROC) (GLenum target, const GLshort *v); +typedef void (APIENTRYP PFNGLMULTITEXCOORD3DARBPROC) (GLenum target, GLdouble s, GLdouble t, GLdouble r); +typedef void (APIENTRYP PFNGLMULTITEXCOORD3DVARBPROC) (GLenum target, const GLdouble *v); +typedef void (APIENTRYP PFNGLMULTITEXCOORD3FARBPROC) (GLenum target, GLfloat s, GLfloat t, GLfloat r); +typedef void (APIENTRYP PFNGLMULTITEXCOORD3FVARBPROC) (GLenum target, const GLfloat *v); +typedef void (APIENTRYP PFNGLMULTITEXCOORD3IARBPROC) (GLenum target, GLint s, GLint t, GLint r); +typedef void (APIENTRYP PFNGLMULTITEXCOORD3IVARBPROC) (GLenum target, const GLint *v); +typedef void (APIENTRYP PFNGLMULTITEXCOORD3SARBPROC) (GLenum target, GLshort s, GLshort t, GLshort r); +typedef void (APIENTRYP PFNGLMULTITEXCOORD3SVARBPROC) (GLenum target, const GLshort *v); +typedef void (APIENTRYP PFNGLMULTITEXCOORD4DARBPROC) (GLenum target, GLdouble s, GLdouble t, GLdouble r, GLdouble q); +typedef void (APIENTRYP PFNGLMULTITEXCOORD4DVARBPROC) (GLenum target, const GLdouble *v); +typedef void (APIENTRYP PFNGLMULTITEXCOORD4FARBPROC) (GLenum target, GLfloat s, GLfloat t, GLfloat r, GLfloat q); +typedef void (APIENTRYP PFNGLMULTITEXCOORD4FVARBPROC) (GLenum target, const GLfloat *v); +typedef void (APIENTRYP PFNGLMULTITEXCOORD4IARBPROC) (GLenum target, GLint s, GLint t, GLint r, GLint q); +typedef void (APIENTRYP PFNGLMULTITEXCOORD4IVARBPROC) (GLenum target, const GLint *v); +typedef void (APIENTRYP PFNGLMULTITEXCOORD4SARBPROC) (GLenum target, GLshort s, GLshort t, GLshort r, GLshort q); +typedef void (APIENTRYP PFNGLMULTITEXCOORD4SVARBPROC) (GLenum target, const GLshort *v); + +#endif /* GL_ARB_multitexture */ + + + +/* + * Define this token if you want "old-style" header file behaviour (extensions + * defined in gl.h). Otherwise, extensions will be included from glext.h. + */ +#if defined(GL_GLEXT_LEGACY) + +/* All extensions that used to be here are now found in glext.h */ + +#else /* GL_GLEXT_LEGACY */ + +#include <GL/glext.h> + +#endif /* GL_GLEXT_LEGACY */ + + + +#if GL_ARB_shader_objects + +#ifndef GL_MESA_shader_debug +#define GL_MESA_shader_debug 1 + +#define GL_DEBUG_OBJECT_MESA 0x8759 +#define GL_DEBUG_PRINT_MESA 0x875A +#define GL_DEBUG_ASSERT_MESA 0x875B + +GLAPI GLhandleARB GLAPIENTRY glCreateDebugObjectMESA (void); +GLAPI void GLAPIENTRY glClearDebugLogMESA (GLhandleARB obj, GLenum logType, GLenum shaderType); +GLAPI void GLAPIENTRY glGetDebugLogMESA (GLhandleARB obj, GLenum logType, GLenum shaderType, GLsizei maxLength, + GLsizei *length, GLcharARB *debugLog); +GLAPI GLsizei GLAPIENTRY glGetDebugLogLengthMESA (GLhandleARB obj, GLenum logType, GLenum shaderType); + +#endif /* GL_MESA_shader_debug */ + +#endif /* GL_ARB_shader_objects */ + + +/* + * ???. GL_MESA_packed_depth_stencil + * XXX obsolete + */ +#ifndef GL_MESA_packed_depth_stencil +#define GL_MESA_packed_depth_stencil 1 + +#define GL_DEPTH_STENCIL_MESA 0x8750 +#define GL_UNSIGNED_INT_24_8_MESA 0x8751 +#define GL_UNSIGNED_INT_8_24_REV_MESA 0x8752 +#define GL_UNSIGNED_SHORT_15_1_MESA 0x8753 +#define GL_UNSIGNED_SHORT_1_15_REV_MESA 0x8754 + +#endif /* GL_MESA_packed_depth_stencil */ + + +#ifndef GL_MESA_program_debug +#define GL_MESA_program_debug 1 + +#define GL_FRAGMENT_PROGRAM_POSITION_MESA 0x8bb0 +#define GL_FRAGMENT_PROGRAM_CALLBACK_MESA 0x8bb1 +#define GL_FRAGMENT_PROGRAM_CALLBACK_FUNC_MESA 0x8bb2 +#define GL_FRAGMENT_PROGRAM_CALLBACK_DATA_MESA 0x8bb3 +#define GL_VERTEX_PROGRAM_POSITION_MESA 0x8bb4 +#define GL_VERTEX_PROGRAM_CALLBACK_MESA 0x8bb5 +#define GL_VERTEX_PROGRAM_CALLBACK_FUNC_MESA 0x8bb6 +#define GL_VERTEX_PROGRAM_CALLBACK_DATA_MESA 0x8bb7 + +typedef void (*GLprogramcallbackMESA)(GLenum target, GLvoid *data); + +GLAPI void GLAPIENTRY glProgramCallbackMESA(GLenum target, GLprogramcallbackMESA callback, GLvoid *data); + +GLAPI void GLAPIENTRY glGetProgramRegisterfvMESA(GLenum target, GLsizei len, const GLubyte *name, GLfloat *v); + +#endif /* GL_MESA_program_debug */ + + +#ifndef GL_MESA_texture_array +#define GL_MESA_texture_array 1 + +/* GL_MESA_texture_array uses the same enum values as GL_EXT_texture_array. + */ +#ifndef GL_EXT_texture_array + +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glFramebufferTextureLayerEXT(GLenum target, + GLenum attachment, GLuint texture, GLint level, GLint layer); +#endif /* GL_GLEXT_PROTOTYPES */ + +#if 0 +/* (temporarily) disabled because of collision with typedef in glext.h + * that happens if apps include both gl.h and glext.h + */ +typedef void (APIENTRYP PFNGLFRAMEBUFFERTEXTURELAYEREXTPROC) (GLenum target, + GLenum attachment, GLuint texture, GLint level, GLint layer); +#endif + +#define GL_TEXTURE_1D_ARRAY_EXT 0x8C18 +#define GL_PROXY_TEXTURE_1D_ARRAY_EXT 0x8C19 +#define GL_TEXTURE_2D_ARRAY_EXT 0x8C1A +#define GL_PROXY_TEXTURE_2D_ARRAY_EXT 0x8C1B +#define GL_TEXTURE_BINDING_1D_ARRAY_EXT 0x8C1C +#define GL_TEXTURE_BINDING_2D_ARRAY_EXT 0x8C1D +#define GL_MAX_ARRAY_TEXTURE_LAYERS_EXT 0x88FF +#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER_EXT 0x8CD4 +#endif + +#endif + + +#ifndef GL_ATI_blend_equation_separate +#define GL_ATI_blend_equation_separate 1 + +#define GL_ALPHA_BLEND_EQUATION_ATI 0x883D + +GLAPI void GLAPIENTRY glBlendEquationSeparateATI( GLenum modeRGB, GLenum modeA ); +typedef void (APIENTRYP PFNGLBLENDEQUATIONSEPARATEATIPROC) (GLenum modeRGB, GLenum modeA); + +#endif /* GL_ATI_blend_equation_separate */ + + +/* GL_OES_EGL_image */ +#ifndef GL_OES_EGL_image +typedef void* GLeglImageOES; +#endif + +#ifndef GL_OES_EGL_image +#define GL_OES_EGL_image 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glEGLImageTargetTexture2DOES (GLenum target, GLeglImageOES image); +GLAPI void APIENTRY glEGLImageTargetRenderbufferStorageOES (GLenum target, GLeglImageOES image); +#endif +typedef void (APIENTRYP PFNGLEGLIMAGETARGETTEXTURE2DOESPROC) (GLenum target, GLeglImageOES image); +typedef void (APIENTRYP PFNGLEGLIMAGETARGETRENDERBUFFERSTORAGEOESPROC) (GLenum target, GLeglImageOES image); +#endif + + +/** + ** NOTE!!!!! If you add new functions to this file, or update + ** glext.h be sure to regenerate the gl_mangle.h file. See comments + ** in that file for details. + **/ + + + +/********************************************************************** + * Begin system-specific stuff + */ +#if defined(PRAGMA_EXPORT_SUPPORTED) +#pragma export off +#endif + +#if defined(macintosh) && PRAGMA_IMPORT_SUPPORTED +#pragma import off +#endif +/* + * End system-specific stuff + **********************************************************************/ + + +#ifdef __cplusplus +} +#endif + +#endif /* __gl_h_ */
diff --git a/third_party/mesa_headers/GL/glext.h b/third_party/mesa_headers/GL/glext.h new file mode 100644 index 0000000..8036db50 --- /dev/null +++ b/third_party/mesa_headers/GL/glext.h
@@ -0,0 +1,12750 @@ +#ifndef __glext_h_ +#define __glext_h_ + +#ifdef __cplusplus +extern "C" { +#endif + +/* +** Copyright (c) 2007-2012 The Khronos Group Inc. +** +** Permission is hereby granted, free of charge, to any person obtaining a +** copy of this software and/or associated documentation files (the +** "Materials"), to deal in the Materials without restriction, including +** without limitation the rights to use, copy, modify, merge, publish, +** distribute, sublicense, and/or sell copies of the Materials, and to +** permit persons to whom the Materials are furnished to do so, subject to +** the following conditions: +** +** The above copyright notice and this permission notice shall be included +** in all copies or substantial portions of the Materials. +** +** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS. +*/ + +/* Header file version number, required by OpenGL ABI for Linux */ +/* glext.h last updated $Date: 2012-09-19 19:02:24 -0700 (Wed, 19 Sep 2012) $ */ +/* Current version at http://www.opengl.org/registry/ */ +#define GL_GLEXT_VERSION 85 +/* Function declaration macros - to move into glplatform.h */ + +#if defined(_WIN32) && !defined(APIENTRY) && !defined(__CYGWIN__) && !defined(__SCITECH_SNAP__) +#define WIN32_LEAN_AND_MEAN 1 +#include <windows.h> +#endif + +#ifndef APIENTRY +#define APIENTRY +#endif +#ifndef APIENTRYP +#define APIENTRYP APIENTRY * +#endif +#ifndef GLAPI +#define GLAPI extern +#endif + +/*************************************************************/ + +#ifndef GL_VERSION_1_2 +#define GL_UNSIGNED_BYTE_3_3_2 0x8032 +#define GL_UNSIGNED_SHORT_4_4_4_4 0x8033 +#define GL_UNSIGNED_SHORT_5_5_5_1 0x8034 +#define GL_UNSIGNED_INT_8_8_8_8 0x8035 +#define GL_UNSIGNED_INT_10_10_10_2 0x8036 +#define GL_TEXTURE_BINDING_3D 0x806A +#define GL_PACK_SKIP_IMAGES 0x806B +#define GL_PACK_IMAGE_HEIGHT 0x806C +#define GL_UNPACK_SKIP_IMAGES 0x806D +#define GL_UNPACK_IMAGE_HEIGHT 0x806E +#define GL_TEXTURE_3D 0x806F +#define GL_PROXY_TEXTURE_3D 0x8070 +#define GL_TEXTURE_DEPTH 0x8071 +#define GL_TEXTURE_WRAP_R 0x8072 +#define GL_MAX_3D_TEXTURE_SIZE 0x8073 +#define GL_UNSIGNED_BYTE_2_3_3_REV 0x8362 +#define GL_UNSIGNED_SHORT_5_6_5 0x8363 +#define GL_UNSIGNED_SHORT_5_6_5_REV 0x8364 +#define GL_UNSIGNED_SHORT_4_4_4_4_REV 0x8365 +#define GL_UNSIGNED_SHORT_1_5_5_5_REV 0x8366 +#define GL_UNSIGNED_INT_8_8_8_8_REV 0x8367 +#define GL_UNSIGNED_INT_2_10_10_10_REV 0x8368 +#define GL_BGR 0x80E0 +#define GL_BGRA 0x80E1 +#define GL_MAX_ELEMENTS_VERTICES 0x80E8 +#define GL_MAX_ELEMENTS_INDICES 0x80E9 +#define GL_CLAMP_TO_EDGE 0x812F +#define GL_TEXTURE_MIN_LOD 0x813A +#define GL_TEXTURE_MAX_LOD 0x813B +#define GL_TEXTURE_BASE_LEVEL 0x813C +#define GL_TEXTURE_MAX_LEVEL 0x813D +#define GL_SMOOTH_POINT_SIZE_RANGE 0x0B12 +#define GL_SMOOTH_POINT_SIZE_GRANULARITY 0x0B13 +#define GL_SMOOTH_LINE_WIDTH_RANGE 0x0B22 +#define GL_SMOOTH_LINE_WIDTH_GRANULARITY 0x0B23 +#define GL_ALIASED_LINE_WIDTH_RANGE 0x846E +#define GL_RESCALE_NORMAL 0x803A +#define GL_LIGHT_MODEL_COLOR_CONTROL 0x81F8 +#define GL_SINGLE_COLOR 0x81F9 +#define GL_SEPARATE_SPECULAR_COLOR 0x81FA +#define GL_ALIASED_POINT_SIZE_RANGE 0x846D +#endif + +#ifndef GL_ARB_imaging +#define GL_CONSTANT_COLOR 0x8001 +#define GL_ONE_MINUS_CONSTANT_COLOR 0x8002 +#define GL_CONSTANT_ALPHA 0x8003 +#define GL_ONE_MINUS_CONSTANT_ALPHA 0x8004 +#define GL_BLEND_COLOR 0x8005 +#define GL_FUNC_ADD 0x8006 +#define GL_MIN 0x8007 +#define GL_MAX 0x8008 +#define GL_BLEND_EQUATION 0x8009 +#define GL_FUNC_SUBTRACT 0x800A +#define GL_FUNC_REVERSE_SUBTRACT 0x800B +#define GL_CONVOLUTION_1D 0x8010 +#define GL_CONVOLUTION_2D 0x8011 +#define GL_SEPARABLE_2D 0x8012 +#define GL_CONVOLUTION_BORDER_MODE 0x8013 +#define GL_CONVOLUTION_FILTER_SCALE 0x8014 +#define GL_CONVOLUTION_FILTER_BIAS 0x8015 +#define GL_REDUCE 0x8016 +#define GL_CONVOLUTION_FORMAT 0x8017 +#define GL_CONVOLUTION_WIDTH 0x8018 +#define GL_CONVOLUTION_HEIGHT 0x8019 +#define GL_MAX_CONVOLUTION_WIDTH 0x801A +#define GL_MAX_CONVOLUTION_HEIGHT 0x801B +#define GL_POST_CONVOLUTION_RED_SCALE 0x801C +#define GL_POST_CONVOLUTION_GREEN_SCALE 0x801D +#define GL_POST_CONVOLUTION_BLUE_SCALE 0x801E +#define GL_POST_CONVOLUTION_ALPHA_SCALE 0x801F +#define GL_POST_CONVOLUTION_RED_BIAS 0x8020 +#define GL_POST_CONVOLUTION_GREEN_BIAS 0x8021 +#define GL_POST_CONVOLUTION_BLUE_BIAS 0x8022 +#define GL_POST_CONVOLUTION_ALPHA_BIAS 0x8023 +#define GL_HISTOGRAM 0x8024 +#define GL_PROXY_HISTOGRAM 0x8025 +#define GL_HISTOGRAM_WIDTH 0x8026 +#define GL_HISTOGRAM_FORMAT 0x8027 +#define GL_HISTOGRAM_RED_SIZE 0x8028 +#define GL_HISTOGRAM_GREEN_SIZE 0x8029 +#define GL_HISTOGRAM_BLUE_SIZE 0x802A +#define GL_HISTOGRAM_ALPHA_SIZE 0x802B +#define GL_HISTOGRAM_LUMINANCE_SIZE 0x802C +#define GL_HISTOGRAM_SINK 0x802D +#define GL_MINMAX 0x802E +#define GL_MINMAX_FORMAT 0x802F +#define GL_MINMAX_SINK 0x8030 +#define GL_TABLE_TOO_LARGE 0x8031 +#define GL_COLOR_MATRIX 0x80B1 +#define GL_COLOR_MATRIX_STACK_DEPTH 0x80B2 +#define GL_MAX_COLOR_MATRIX_STACK_DEPTH 0x80B3 +#define GL_POST_COLOR_MATRIX_RED_SCALE 0x80B4 +#define GL_POST_COLOR_MATRIX_GREEN_SCALE 0x80B5 +#define GL_POST_COLOR_MATRIX_BLUE_SCALE 0x80B6 +#define GL_POST_COLOR_MATRIX_ALPHA_SCALE 0x80B7 +#define GL_POST_COLOR_MATRIX_RED_BIAS 0x80B8 +#define GL_POST_COLOR_MATRIX_GREEN_BIAS 0x80B9 +#define GL_POST_COLOR_MATRIX_BLUE_BIAS 0x80BA +#define GL_POST_COLOR_MATRIX_ALPHA_BIAS 0x80BB +#define GL_COLOR_TABLE 0x80D0 +#define GL_POST_CONVOLUTION_COLOR_TABLE 0x80D1 +#define GL_POST_COLOR_MATRIX_COLOR_TABLE 0x80D2 +#define GL_PROXY_COLOR_TABLE 0x80D3 +#define GL_PROXY_POST_CONVOLUTION_COLOR_TABLE 0x80D4 +#define GL_PROXY_POST_COLOR_MATRIX_COLOR_TABLE 0x80D5 +#define GL_COLOR_TABLE_SCALE 0x80D6 +#define GL_COLOR_TABLE_BIAS 0x80D7 +#define GL_COLOR_TABLE_FORMAT 0x80D8 +#define GL_COLOR_TABLE_WIDTH 0x80D9 +#define GL_COLOR_TABLE_RED_SIZE 0x80DA +#define GL_COLOR_TABLE_GREEN_SIZE 0x80DB +#define GL_COLOR_TABLE_BLUE_SIZE 0x80DC +#define GL_COLOR_TABLE_ALPHA_SIZE 0x80DD +#define GL_COLOR_TABLE_LUMINANCE_SIZE 0x80DE +#define GL_COLOR_TABLE_INTENSITY_SIZE 0x80DF +#define GL_CONSTANT_BORDER 0x8151 +#define GL_REPLICATE_BORDER 0x8153 +#define GL_CONVOLUTION_BORDER_COLOR 0x8154 +#endif + +#ifndef GL_VERSION_1_3 +#define GL_TEXTURE0 0x84C0 +#define GL_TEXTURE1 0x84C1 +#define GL_TEXTURE2 0x84C2 +#define GL_TEXTURE3 0x84C3 +#define GL_TEXTURE4 0x84C4 +#define GL_TEXTURE5 0x84C5 +#define GL_TEXTURE6 0x84C6 +#define GL_TEXTURE7 0x84C7 +#define GL_TEXTURE8 0x84C8 +#define GL_TEXTURE9 0x84C9 +#define GL_TEXTURE10 0x84CA +#define GL_TEXTURE11 0x84CB +#define GL_TEXTURE12 0x84CC +#define GL_TEXTURE13 0x84CD +#define GL_TEXTURE14 0x84CE +#define GL_TEXTURE15 0x84CF +#define GL_TEXTURE16 0x84D0 +#define GL_TEXTURE17 0x84D1 +#define GL_TEXTURE18 0x84D2 +#define GL_TEXTURE19 0x84D3 +#define GL_TEXTURE20 0x84D4 +#define GL_TEXTURE21 0x84D5 +#define GL_TEXTURE22 0x84D6 +#define GL_TEXTURE23 0x84D7 +#define GL_TEXTURE24 0x84D8 +#define GL_TEXTURE25 0x84D9 +#define GL_TEXTURE26 0x84DA +#define GL_TEXTURE27 0x84DB +#define GL_TEXTURE28 0x84DC +#define GL_TEXTURE29 0x84DD +#define GL_TEXTURE30 0x84DE +#define GL_TEXTURE31 0x84DF +#define GL_ACTIVE_TEXTURE 0x84E0 +#define GL_MULTISAMPLE 0x809D +#define GL_SAMPLE_ALPHA_TO_COVERAGE 0x809E +#define GL_SAMPLE_ALPHA_TO_ONE 0x809F +#define GL_SAMPLE_COVERAGE 0x80A0 +#define GL_SAMPLE_BUFFERS 0x80A8 +#define GL_SAMPLES 0x80A9 +#define GL_SAMPLE_COVERAGE_VALUE 0x80AA +#define GL_SAMPLE_COVERAGE_INVERT 0x80AB +#define GL_TEXTURE_CUBE_MAP 0x8513 +#define GL_TEXTURE_BINDING_CUBE_MAP 0x8514 +#define GL_TEXTURE_CUBE_MAP_POSITIVE_X 0x8515 +#define GL_TEXTURE_CUBE_MAP_NEGATIVE_X 0x8516 +#define GL_TEXTURE_CUBE_MAP_POSITIVE_Y 0x8517 +#define GL_TEXTURE_CUBE_MAP_NEGATIVE_Y 0x8518 +#define GL_TEXTURE_CUBE_MAP_POSITIVE_Z 0x8519 +#define GL_TEXTURE_CUBE_MAP_NEGATIVE_Z 0x851A +#define GL_PROXY_TEXTURE_CUBE_MAP 0x851B +#define GL_MAX_CUBE_MAP_TEXTURE_SIZE 0x851C +#define GL_COMPRESSED_RGB 0x84ED +#define GL_COMPRESSED_RGBA 0x84EE +#define GL_TEXTURE_COMPRESSION_HINT 0x84EF +#define GL_TEXTURE_COMPRESSED_IMAGE_SIZE 0x86A0 +#define GL_TEXTURE_COMPRESSED 0x86A1 +#define GL_NUM_COMPRESSED_TEXTURE_FORMATS 0x86A2 +#define GL_COMPRESSED_TEXTURE_FORMATS 0x86A3 +#define GL_CLAMP_TO_BORDER 0x812D +#define GL_CLIENT_ACTIVE_TEXTURE 0x84E1 +#define GL_MAX_TEXTURE_UNITS 0x84E2 +#define GL_TRANSPOSE_MODELVIEW_MATRIX 0x84E3 +#define GL_TRANSPOSE_PROJECTION_MATRIX 0x84E4 +#define GL_TRANSPOSE_TEXTURE_MATRIX 0x84E5 +#define GL_TRANSPOSE_COLOR_MATRIX 0x84E6 +#define GL_MULTISAMPLE_BIT 0x20000000 +#define GL_NORMAL_MAP 0x8511 +#define GL_REFLECTION_MAP 0x8512 +#define GL_COMPRESSED_ALPHA 0x84E9 +#define GL_COMPRESSED_LUMINANCE 0x84EA +#define GL_COMPRESSED_LUMINANCE_ALPHA 0x84EB +#define GL_COMPRESSED_INTENSITY 0x84EC +#define GL_COMBINE 0x8570 +#define GL_COMBINE_RGB 0x8571 +#define GL_COMBINE_ALPHA 0x8572 +#define GL_SOURCE0_RGB 0x8580 +#define GL_SOURCE1_RGB 0x8581 +#define GL_SOURCE2_RGB 0x8582 +#define GL_SOURCE0_ALPHA 0x8588 +#define GL_SOURCE1_ALPHA 0x8589 +#define GL_SOURCE2_ALPHA 0x858A +#define GL_OPERAND0_RGB 0x8590 +#define GL_OPERAND1_RGB 0x8591 +#define GL_OPERAND2_RGB 0x8592 +#define GL_OPERAND0_ALPHA 0x8598 +#define GL_OPERAND1_ALPHA 0x8599 +#define GL_OPERAND2_ALPHA 0x859A +#define GL_RGB_SCALE 0x8573 +#define GL_ADD_SIGNED 0x8574 +#define GL_INTERPOLATE 0x8575 +#define GL_SUBTRACT 0x84E7 +#define GL_CONSTANT 0x8576 +#define GL_PRIMARY_COLOR 0x8577 +#define GL_PREVIOUS 0x8578 +#define GL_DOT3_RGB 0x86AE +#define GL_DOT3_RGBA 0x86AF +#endif + +#ifndef GL_VERSION_1_4 +#define GL_BLEND_DST_RGB 0x80C8 +#define GL_BLEND_SRC_RGB 0x80C9 +#define GL_BLEND_DST_ALPHA 0x80CA +#define GL_BLEND_SRC_ALPHA 0x80CB +#define GL_POINT_FADE_THRESHOLD_SIZE 0x8128 +#define GL_DEPTH_COMPONENT16 0x81A5 +#define GL_DEPTH_COMPONENT24 0x81A6 +#define GL_DEPTH_COMPONENT32 0x81A7 +#define GL_MIRRORED_REPEAT 0x8370 +#define GL_MAX_TEXTURE_LOD_BIAS 0x84FD +#define GL_TEXTURE_LOD_BIAS 0x8501 +#define GL_INCR_WRAP 0x8507 +#define GL_DECR_WRAP 0x8508 +#define GL_TEXTURE_DEPTH_SIZE 0x884A +#define GL_TEXTURE_COMPARE_MODE 0x884C +#define GL_TEXTURE_COMPARE_FUNC 0x884D +#define GL_POINT_SIZE_MIN 0x8126 +#define GL_POINT_SIZE_MAX 0x8127 +#define GL_POINT_DISTANCE_ATTENUATION 0x8129 +#define GL_GENERATE_MIPMAP 0x8191 +#define GL_GENERATE_MIPMAP_HINT 0x8192 +#define GL_FOG_COORDINATE_SOURCE 0x8450 +#define GL_FOG_COORDINATE 0x8451 +#define GL_FRAGMENT_DEPTH 0x8452 +#define GL_CURRENT_FOG_COORDINATE 0x8453 +#define GL_FOG_COORDINATE_ARRAY_TYPE 0x8454 +#define GL_FOG_COORDINATE_ARRAY_STRIDE 0x8455 +#define GL_FOG_COORDINATE_ARRAY_POINTER 0x8456 +#define GL_FOG_COORDINATE_ARRAY 0x8457 +#define GL_COLOR_SUM 0x8458 +#define GL_CURRENT_SECONDARY_COLOR 0x8459 +#define GL_SECONDARY_COLOR_ARRAY_SIZE 0x845A +#define GL_SECONDARY_COLOR_ARRAY_TYPE 0x845B +#define GL_SECONDARY_COLOR_ARRAY_STRIDE 0x845C +#define GL_SECONDARY_COLOR_ARRAY_POINTER 0x845D +#define GL_SECONDARY_COLOR_ARRAY 0x845E +#define GL_TEXTURE_FILTER_CONTROL 0x8500 +#define GL_DEPTH_TEXTURE_MODE 0x884B +#define GL_COMPARE_R_TO_TEXTURE 0x884E +#endif + +#ifndef GL_VERSION_1_5 +#define GL_BUFFER_SIZE 0x8764 +#define GL_BUFFER_USAGE 0x8765 +#define GL_QUERY_COUNTER_BITS 0x8864 +#define GL_CURRENT_QUERY 0x8865 +#define GL_QUERY_RESULT 0x8866 +#define GL_QUERY_RESULT_AVAILABLE 0x8867 +#define GL_ARRAY_BUFFER 0x8892 +#define GL_ELEMENT_ARRAY_BUFFER 0x8893 +#define GL_ARRAY_BUFFER_BINDING 0x8894 +#define GL_ELEMENT_ARRAY_BUFFER_BINDING 0x8895 +#define GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING 0x889F +#define GL_READ_ONLY 0x88B8 +#define GL_WRITE_ONLY 0x88B9 +#define GL_READ_WRITE 0x88BA +#define GL_BUFFER_ACCESS 0x88BB +#define GL_BUFFER_MAPPED 0x88BC +#define GL_BUFFER_MAP_POINTER 0x88BD +#define GL_STREAM_DRAW 0x88E0 +#define GL_STREAM_READ 0x88E1 +#define GL_STREAM_COPY 0x88E2 +#define GL_STATIC_DRAW 0x88E4 +#define GL_STATIC_READ 0x88E5 +#define GL_STATIC_COPY 0x88E6 +#define GL_DYNAMIC_DRAW 0x88E8 +#define GL_DYNAMIC_READ 0x88E9 +#define GL_DYNAMIC_COPY 0x88EA +#define GL_SAMPLES_PASSED 0x8914 +#define GL_SRC1_ALPHA 0x8589 +#define GL_VERTEX_ARRAY_BUFFER_BINDING 0x8896 +#define GL_NORMAL_ARRAY_BUFFER_BINDING 0x8897 +#define GL_COLOR_ARRAY_BUFFER_BINDING 0x8898 +#define GL_INDEX_ARRAY_BUFFER_BINDING 0x8899 +#define GL_TEXTURE_COORD_ARRAY_BUFFER_BINDING 0x889A +#define GL_EDGE_FLAG_ARRAY_BUFFER_BINDING 0x889B +#define GL_SECONDARY_COLOR_ARRAY_BUFFER_BINDING 0x889C +#define GL_FOG_COORDINATE_ARRAY_BUFFER_BINDING 0x889D +#define GL_WEIGHT_ARRAY_BUFFER_BINDING 0x889E +#define GL_FOG_COORD_SRC 0x8450 +#define GL_FOG_COORD 0x8451 +#define GL_CURRENT_FOG_COORD 0x8453 +#define GL_FOG_COORD_ARRAY_TYPE 0x8454 +#define GL_FOG_COORD_ARRAY_STRIDE 0x8455 +#define GL_FOG_COORD_ARRAY_POINTER 0x8456 +#define GL_FOG_COORD_ARRAY 0x8457 +#define GL_FOG_COORD_ARRAY_BUFFER_BINDING 0x889D +#define GL_SRC0_RGB 0x8580 +#define GL_SRC1_RGB 0x8581 +#define GL_SRC2_RGB 0x8582 +#define GL_SRC0_ALPHA 0x8588 +#define GL_SRC2_ALPHA 0x858A +#endif + +#ifndef GL_VERSION_2_0 +#define GL_BLEND_EQUATION_RGB 0x8009 +#define GL_VERTEX_ATTRIB_ARRAY_ENABLED 0x8622 +#define GL_VERTEX_ATTRIB_ARRAY_SIZE 0x8623 +#define GL_VERTEX_ATTRIB_ARRAY_STRIDE 0x8624 +#define GL_VERTEX_ATTRIB_ARRAY_TYPE 0x8625 +#define GL_CURRENT_VERTEX_ATTRIB 0x8626 +#define GL_VERTEX_PROGRAM_POINT_SIZE 0x8642 +#define GL_VERTEX_ATTRIB_ARRAY_POINTER 0x8645 +#define GL_STENCIL_BACK_FUNC 0x8800 +#define GL_STENCIL_BACK_FAIL 0x8801 +#define GL_STENCIL_BACK_PASS_DEPTH_FAIL 0x8802 +#define GL_STENCIL_BACK_PASS_DEPTH_PASS 0x8803 +#define GL_MAX_DRAW_BUFFERS 0x8824 +#define GL_DRAW_BUFFER0 0x8825 +#define GL_DRAW_BUFFER1 0x8826 +#define GL_DRAW_BUFFER2 0x8827 +#define GL_DRAW_BUFFER3 0x8828 +#define GL_DRAW_BUFFER4 0x8829 +#define GL_DRAW_BUFFER5 0x882A +#define GL_DRAW_BUFFER6 0x882B +#define GL_DRAW_BUFFER7 0x882C +#define GL_DRAW_BUFFER8 0x882D +#define GL_DRAW_BUFFER9 0x882E +#define GL_DRAW_BUFFER10 0x882F +#define GL_DRAW_BUFFER11 0x8830 +#define GL_DRAW_BUFFER12 0x8831 +#define GL_DRAW_BUFFER13 0x8832 +#define GL_DRAW_BUFFER14 0x8833 +#define GL_DRAW_BUFFER15 0x8834 +#define GL_BLEND_EQUATION_ALPHA 0x883D +#define GL_MAX_VERTEX_ATTRIBS 0x8869 +#define GL_VERTEX_ATTRIB_ARRAY_NORMALIZED 0x886A +#define GL_MAX_TEXTURE_IMAGE_UNITS 0x8872 +#define GL_FRAGMENT_SHADER 0x8B30 +#define GL_VERTEX_SHADER 0x8B31 +#define GL_MAX_FRAGMENT_UNIFORM_COMPONENTS 0x8B49 +#define GL_MAX_VERTEX_UNIFORM_COMPONENTS 0x8B4A +#define GL_MAX_VARYING_FLOATS 0x8B4B +#define GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS 0x8B4C +#define GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS 0x8B4D +#define GL_SHADER_TYPE 0x8B4F +#define GL_FLOAT_VEC2 0x8B50 +#define GL_FLOAT_VEC3 0x8B51 +#define GL_FLOAT_VEC4 0x8B52 +#define GL_INT_VEC2 0x8B53 +#define GL_INT_VEC3 0x8B54 +#define GL_INT_VEC4 0x8B55 +#define GL_BOOL 0x8B56 +#define GL_BOOL_VEC2 0x8B57 +#define GL_BOOL_VEC3 0x8B58 +#define GL_BOOL_VEC4 0x8B59 +#define GL_FLOAT_MAT2 0x8B5A +#define GL_FLOAT_MAT3 0x8B5B +#define GL_FLOAT_MAT4 0x8B5C +#define GL_SAMPLER_1D 0x8B5D +#define GL_SAMPLER_2D 0x8B5E +#define GL_SAMPLER_3D 0x8B5F +#define GL_SAMPLER_CUBE 0x8B60 +#define GL_SAMPLER_1D_SHADOW 0x8B61 +#define GL_SAMPLER_2D_SHADOW 0x8B62 +#define GL_DELETE_STATUS 0x8B80 +#define GL_COMPILE_STATUS 0x8B81 +#define GL_LINK_STATUS 0x8B82 +#define GL_VALIDATE_STATUS 0x8B83 +#define GL_INFO_LOG_LENGTH 0x8B84 +#define GL_ATTACHED_SHADERS 0x8B85 +#define GL_ACTIVE_UNIFORMS 0x8B86 +#define GL_ACTIVE_UNIFORM_MAX_LENGTH 0x8B87 +#define GL_SHADER_SOURCE_LENGTH 0x8B88 +#define GL_ACTIVE_ATTRIBUTES 0x8B89 +#define GL_ACTIVE_ATTRIBUTE_MAX_LENGTH 0x8B8A +#define GL_FRAGMENT_SHADER_DERIVATIVE_HINT 0x8B8B +#define GL_SHADING_LANGUAGE_VERSION 0x8B8C +#define GL_CURRENT_PROGRAM 0x8B8D +#define GL_POINT_SPRITE_COORD_ORIGIN 0x8CA0 +#define GL_LOWER_LEFT 0x8CA1 +#define GL_UPPER_LEFT 0x8CA2 +#define GL_STENCIL_BACK_REF 0x8CA3 +#define GL_STENCIL_BACK_VALUE_MASK 0x8CA4 +#define GL_STENCIL_BACK_WRITEMASK 0x8CA5 +#define GL_VERTEX_PROGRAM_TWO_SIDE 0x8643 +#define GL_POINT_SPRITE 0x8861 +#define GL_COORD_REPLACE 0x8862 +#define GL_MAX_TEXTURE_COORDS 0x8871 +#endif + +#ifndef GL_VERSION_2_1 +#define GL_PIXEL_PACK_BUFFER 0x88EB +#define GL_PIXEL_UNPACK_BUFFER 0x88EC +#define GL_PIXEL_PACK_BUFFER_BINDING 0x88ED +#define GL_PIXEL_UNPACK_BUFFER_BINDING 0x88EF +#define GL_FLOAT_MAT2x3 0x8B65 +#define GL_FLOAT_MAT2x4 0x8B66 +#define GL_FLOAT_MAT3x2 0x8B67 +#define GL_FLOAT_MAT3x4 0x8B68 +#define GL_FLOAT_MAT4x2 0x8B69 +#define GL_FLOAT_MAT4x3 0x8B6A +#define GL_SRGB 0x8C40 +#define GL_SRGB8 0x8C41 +#define GL_SRGB_ALPHA 0x8C42 +#define GL_SRGB8_ALPHA8 0x8C43 +#define GL_COMPRESSED_SRGB 0x8C48 +#define GL_COMPRESSED_SRGB_ALPHA 0x8C49 +#define GL_CURRENT_RASTER_SECONDARY_COLOR 0x845F +#define GL_SLUMINANCE_ALPHA 0x8C44 +#define GL_SLUMINANCE8_ALPHA8 0x8C45 +#define GL_SLUMINANCE 0x8C46 +#define GL_SLUMINANCE8 0x8C47 +#define GL_COMPRESSED_SLUMINANCE 0x8C4A +#define GL_COMPRESSED_SLUMINANCE_ALPHA 0x8C4B +#endif + +#ifndef GL_VERSION_3_0 +#define GL_COMPARE_REF_TO_TEXTURE 0x884E +#define GL_CLIP_DISTANCE0 0x3000 +#define GL_CLIP_DISTANCE1 0x3001 +#define GL_CLIP_DISTANCE2 0x3002 +#define GL_CLIP_DISTANCE3 0x3003 +#define GL_CLIP_DISTANCE4 0x3004 +#define GL_CLIP_DISTANCE5 0x3005 +#define GL_CLIP_DISTANCE6 0x3006 +#define GL_CLIP_DISTANCE7 0x3007 +#define GL_MAX_CLIP_DISTANCES 0x0D32 +#define GL_MAJOR_VERSION 0x821B +#define GL_MINOR_VERSION 0x821C +#define GL_NUM_EXTENSIONS 0x821D +#define GL_CONTEXT_FLAGS 0x821E +#define GL_COMPRESSED_RED 0x8225 +#define GL_COMPRESSED_RG 0x8226 +#define GL_CONTEXT_FLAG_FORWARD_COMPATIBLE_BIT 0x0001 +#define GL_RGBA32F 0x8814 +#define GL_RGB32F 0x8815 +#define GL_RGBA16F 0x881A +#define GL_RGB16F 0x881B +#define GL_VERTEX_ATTRIB_ARRAY_INTEGER 0x88FD +#define GL_MAX_ARRAY_TEXTURE_LAYERS 0x88FF +#define GL_MIN_PROGRAM_TEXEL_OFFSET 0x8904 +#define GL_MAX_PROGRAM_TEXEL_OFFSET 0x8905 +#define GL_CLAMP_READ_COLOR 0x891C +#define GL_FIXED_ONLY 0x891D +#define GL_MAX_VARYING_COMPONENTS 0x8B4B +#define GL_TEXTURE_1D_ARRAY 0x8C18 +#define GL_PROXY_TEXTURE_1D_ARRAY 0x8C19 +#define GL_TEXTURE_2D_ARRAY 0x8C1A +#define GL_PROXY_TEXTURE_2D_ARRAY 0x8C1B +#define GL_TEXTURE_BINDING_1D_ARRAY 0x8C1C +#define GL_TEXTURE_BINDING_2D_ARRAY 0x8C1D +#define GL_R11F_G11F_B10F 0x8C3A +#define GL_UNSIGNED_INT_10F_11F_11F_REV 0x8C3B +#define GL_RGB9_E5 0x8C3D +#define GL_UNSIGNED_INT_5_9_9_9_REV 0x8C3E +#define GL_TEXTURE_SHARED_SIZE 0x8C3F +#define GL_TRANSFORM_FEEDBACK_VARYING_MAX_LENGTH 0x8C76 +#define GL_TRANSFORM_FEEDBACK_BUFFER_MODE 0x8C7F +#define GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_COMPONENTS 0x8C80 +#define GL_TRANSFORM_FEEDBACK_VARYINGS 0x8C83 +#define GL_TRANSFORM_FEEDBACK_BUFFER_START 0x8C84 +#define GL_TRANSFORM_FEEDBACK_BUFFER_SIZE 0x8C85 +#define GL_PRIMITIVES_GENERATED 0x8C87 +#define GL_TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN 0x8C88 +#define GL_RASTERIZER_DISCARD 0x8C89 +#define GL_MAX_TRANSFORM_FEEDBACK_INTERLEAVED_COMPONENTS 0x8C8A +#define GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_ATTRIBS 0x8C8B +#define GL_INTERLEAVED_ATTRIBS 0x8C8C +#define GL_SEPARATE_ATTRIBS 0x8C8D +#define GL_TRANSFORM_FEEDBACK_BUFFER 0x8C8E +#define GL_TRANSFORM_FEEDBACK_BUFFER_BINDING 0x8C8F +#define GL_RGBA32UI 0x8D70 +#define GL_RGB32UI 0x8D71 +#define GL_RGBA16UI 0x8D76 +#define GL_RGB16UI 0x8D77 +#define GL_RGBA8UI 0x8D7C +#define GL_RGB8UI 0x8D7D +#define GL_RGBA32I 0x8D82 +#define GL_RGB32I 0x8D83 +#define GL_RGBA16I 0x8D88 +#define GL_RGB16I 0x8D89 +#define GL_RGBA8I 0x8D8E +#define GL_RGB8I 0x8D8F +#define GL_RED_INTEGER 0x8D94 +#define GL_GREEN_INTEGER 0x8D95 +#define GL_BLUE_INTEGER 0x8D96 +#define GL_RGB_INTEGER 0x8D98 +#define GL_RGBA_INTEGER 0x8D99 +#define GL_BGR_INTEGER 0x8D9A +#define GL_BGRA_INTEGER 0x8D9B +#define GL_SAMPLER_1D_ARRAY 0x8DC0 +#define GL_SAMPLER_2D_ARRAY 0x8DC1 +#define GL_SAMPLER_1D_ARRAY_SHADOW 0x8DC3 +#define GL_SAMPLER_2D_ARRAY_SHADOW 0x8DC4 +#define GL_SAMPLER_CUBE_SHADOW 0x8DC5 +#define GL_UNSIGNED_INT_VEC2 0x8DC6 +#define GL_UNSIGNED_INT_VEC3 0x8DC7 +#define GL_UNSIGNED_INT_VEC4 0x8DC8 +#define GL_INT_SAMPLER_1D 0x8DC9 +#define GL_INT_SAMPLER_2D 0x8DCA +#define GL_INT_SAMPLER_3D 0x8DCB +#define GL_INT_SAMPLER_CUBE 0x8DCC +#define GL_INT_SAMPLER_1D_ARRAY 0x8DCE +#define GL_INT_SAMPLER_2D_ARRAY 0x8DCF +#define GL_UNSIGNED_INT_SAMPLER_1D 0x8DD1 +#define GL_UNSIGNED_INT_SAMPLER_2D 0x8DD2 +#define GL_UNSIGNED_INT_SAMPLER_3D 0x8DD3 +#define GL_UNSIGNED_INT_SAMPLER_CUBE 0x8DD4 +#define GL_UNSIGNED_INT_SAMPLER_1D_ARRAY 0x8DD6 +#define GL_UNSIGNED_INT_SAMPLER_2D_ARRAY 0x8DD7 +#define GL_QUERY_WAIT 0x8E13 +#define GL_QUERY_NO_WAIT 0x8E14 +#define GL_QUERY_BY_REGION_WAIT 0x8E15 +#define GL_QUERY_BY_REGION_NO_WAIT 0x8E16 +#define GL_BUFFER_ACCESS_FLAGS 0x911F +#define GL_BUFFER_MAP_LENGTH 0x9120 +#define GL_BUFFER_MAP_OFFSET 0x9121 +/* Reuse tokens from ARB_depth_buffer_float */ +/* reuse GL_DEPTH_COMPONENT32F */ +/* reuse GL_DEPTH32F_STENCIL8 */ +/* reuse GL_FLOAT_32_UNSIGNED_INT_24_8_REV */ +/* Reuse tokens from ARB_framebuffer_object */ +/* reuse GL_INVALID_FRAMEBUFFER_OPERATION */ +/* reuse GL_FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING */ +/* reuse GL_FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE */ +/* reuse GL_FRAMEBUFFER_ATTACHMENT_RED_SIZE */ +/* reuse GL_FRAMEBUFFER_ATTACHMENT_GREEN_SIZE */ +/* reuse GL_FRAMEBUFFER_ATTACHMENT_BLUE_SIZE */ +/* reuse GL_FRAMEBUFFER_ATTACHMENT_ALPHA_SIZE */ +/* reuse GL_FRAMEBUFFER_ATTACHMENT_DEPTH_SIZE */ +/* reuse GL_FRAMEBUFFER_ATTACHMENT_STENCIL_SIZE */ +/* reuse GL_FRAMEBUFFER_DEFAULT */ +/* reuse GL_FRAMEBUFFER_UNDEFINED */ +/* reuse GL_DEPTH_STENCIL_ATTACHMENT */ +/* reuse GL_INDEX */ +/* reuse GL_MAX_RENDERBUFFER_SIZE */ +/* reuse GL_DEPTH_STENCIL */ +/* reuse GL_UNSIGNED_INT_24_8 */ +/* reuse GL_DEPTH24_STENCIL8 */ +/* reuse GL_TEXTURE_STENCIL_SIZE */ +/* reuse GL_TEXTURE_RED_TYPE */ +/* reuse GL_TEXTURE_GREEN_TYPE */ +/* reuse GL_TEXTURE_BLUE_TYPE */ +/* reuse GL_TEXTURE_ALPHA_TYPE */ +/* reuse GL_TEXTURE_DEPTH_TYPE */ +/* reuse GL_UNSIGNED_NORMALIZED */ +/* reuse GL_FRAMEBUFFER_BINDING */ +/* reuse GL_DRAW_FRAMEBUFFER_BINDING */ +/* reuse GL_RENDERBUFFER_BINDING */ +/* reuse GL_READ_FRAMEBUFFER */ +/* reuse GL_DRAW_FRAMEBUFFER */ +/* reuse GL_READ_FRAMEBUFFER_BINDING */ +/* reuse GL_RENDERBUFFER_SAMPLES */ +/* reuse GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE */ +/* reuse GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME */ +/* reuse GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL */ +/* reuse GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE */ +/* reuse GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER */ +/* reuse GL_FRAMEBUFFER_COMPLETE */ +/* reuse GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT */ +/* reuse GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT */ +/* reuse GL_FRAMEBUFFER_INCOMPLETE_DRAW_BUFFER */ +/* reuse GL_FRAMEBUFFER_INCOMPLETE_READ_BUFFER */ +/* reuse GL_FRAMEBUFFER_UNSUPPORTED */ +/* reuse GL_MAX_COLOR_ATTACHMENTS */ +/* reuse GL_COLOR_ATTACHMENT0 */ +/* reuse GL_COLOR_ATTACHMENT1 */ +/* reuse GL_COLOR_ATTACHMENT2 */ +/* reuse GL_COLOR_ATTACHMENT3 */ +/* reuse GL_COLOR_ATTACHMENT4 */ +/* reuse GL_COLOR_ATTACHMENT5 */ +/* reuse GL_COLOR_ATTACHMENT6 */ +/* reuse GL_COLOR_ATTACHMENT7 */ +/* reuse GL_COLOR_ATTACHMENT8 */ +/* reuse GL_COLOR_ATTACHMENT9 */ +/* reuse GL_COLOR_ATTACHMENT10 */ +/* reuse GL_COLOR_ATTACHMENT11 */ +/* reuse GL_COLOR_ATTACHMENT12 */ +/* reuse GL_COLOR_ATTACHMENT13 */ +/* reuse GL_COLOR_ATTACHMENT14 */ +/* reuse GL_COLOR_ATTACHMENT15 */ +/* reuse GL_DEPTH_ATTACHMENT */ +/* reuse GL_STENCIL_ATTACHMENT */ +/* reuse GL_FRAMEBUFFER */ +/* reuse GL_RENDERBUFFER */ +/* reuse GL_RENDERBUFFER_WIDTH */ +/* reuse GL_RENDERBUFFER_HEIGHT */ +/* reuse GL_RENDERBUFFER_INTERNAL_FORMAT */ +/* reuse GL_STENCIL_INDEX1 */ +/* reuse GL_STENCIL_INDEX4 */ +/* reuse GL_STENCIL_INDEX8 */ +/* reuse GL_STENCIL_INDEX16 */ +/* reuse GL_RENDERBUFFER_RED_SIZE */ +/* reuse GL_RENDERBUFFER_GREEN_SIZE */ +/* reuse GL_RENDERBUFFER_BLUE_SIZE */ +/* reuse GL_RENDERBUFFER_ALPHA_SIZE */ +/* reuse GL_RENDERBUFFER_DEPTH_SIZE */ +/* reuse GL_RENDERBUFFER_STENCIL_SIZE */ +/* reuse GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE */ +/* reuse GL_MAX_SAMPLES */ +/* Reuse tokens from ARB_framebuffer_sRGB */ +/* reuse GL_FRAMEBUFFER_SRGB */ +/* Reuse tokens from ARB_half_float_vertex */ +/* reuse GL_HALF_FLOAT */ +/* Reuse tokens from ARB_map_buffer_range */ +/* reuse GL_MAP_READ_BIT */ +/* reuse GL_MAP_WRITE_BIT */ +/* reuse GL_MAP_INVALIDATE_RANGE_BIT */ +/* reuse GL_MAP_INVALIDATE_BUFFER_BIT */ +/* reuse GL_MAP_FLUSH_EXPLICIT_BIT */ +/* reuse GL_MAP_UNSYNCHRONIZED_BIT */ +/* Reuse tokens from ARB_texture_compression_rgtc */ +/* reuse GL_COMPRESSED_RED_RGTC1 */ +/* reuse GL_COMPRESSED_SIGNED_RED_RGTC1 */ +/* reuse GL_COMPRESSED_RG_RGTC2 */ +/* reuse GL_COMPRESSED_SIGNED_RG_RGTC2 */ +/* Reuse tokens from ARB_texture_rg */ +/* reuse GL_RG */ +/* reuse GL_RG_INTEGER */ +/* reuse GL_R8 */ +/* reuse GL_R16 */ +/* reuse GL_RG8 */ +/* reuse GL_RG16 */ +/* reuse GL_R16F */ +/* reuse GL_R32F */ +/* reuse GL_RG16F */ +/* reuse GL_RG32F */ +/* reuse GL_R8I */ +/* reuse GL_R8UI */ +/* reuse GL_R16I */ +/* reuse GL_R16UI */ +/* reuse GL_R32I */ +/* reuse GL_R32UI */ +/* reuse GL_RG8I */ +/* reuse GL_RG8UI */ +/* reuse GL_RG16I */ +/* reuse GL_RG16UI */ +/* reuse GL_RG32I */ +/* reuse GL_RG32UI */ +/* Reuse tokens from ARB_vertex_array_object */ +/* reuse GL_VERTEX_ARRAY_BINDING */ +#define GL_CLAMP_VERTEX_COLOR 0x891A +#define GL_CLAMP_FRAGMENT_COLOR 0x891B +#define GL_ALPHA_INTEGER 0x8D97 +/* Reuse tokens from ARB_framebuffer_object */ +/* reuse GL_TEXTURE_LUMINANCE_TYPE */ +/* reuse GL_TEXTURE_INTENSITY_TYPE */ +#endif + +#ifndef GL_VERSION_3_1 +#define GL_SAMPLER_2D_RECT 0x8B63 +#define GL_SAMPLER_2D_RECT_SHADOW 0x8B64 +#define GL_SAMPLER_BUFFER 0x8DC2 +#define GL_INT_SAMPLER_2D_RECT 0x8DCD +#define GL_INT_SAMPLER_BUFFER 0x8DD0 +#define GL_UNSIGNED_INT_SAMPLER_2D_RECT 0x8DD5 +#define GL_UNSIGNED_INT_SAMPLER_BUFFER 0x8DD8 +#define GL_TEXTURE_BUFFER 0x8C2A +#define GL_MAX_TEXTURE_BUFFER_SIZE 0x8C2B +#define GL_TEXTURE_BINDING_BUFFER 0x8C2C +#define GL_TEXTURE_BUFFER_DATA_STORE_BINDING 0x8C2D +#define GL_TEXTURE_RECTANGLE 0x84F5 +#define GL_TEXTURE_BINDING_RECTANGLE 0x84F6 +#define GL_PROXY_TEXTURE_RECTANGLE 0x84F7 +#define GL_MAX_RECTANGLE_TEXTURE_SIZE 0x84F8 +#define GL_RED_SNORM 0x8F90 +#define GL_RG_SNORM 0x8F91 +#define GL_RGB_SNORM 0x8F92 +#define GL_RGBA_SNORM 0x8F93 +#define GL_R8_SNORM 0x8F94 +#define GL_RG8_SNORM 0x8F95 +#define GL_RGB8_SNORM 0x8F96 +#define GL_RGBA8_SNORM 0x8F97 +#define GL_R16_SNORM 0x8F98 +#define GL_RG16_SNORM 0x8F99 +#define GL_RGB16_SNORM 0x8F9A +#define GL_RGBA16_SNORM 0x8F9B +#define GL_SIGNED_NORMALIZED 0x8F9C +#define GL_PRIMITIVE_RESTART 0x8F9D +#define GL_PRIMITIVE_RESTART_INDEX 0x8F9E +/* Reuse tokens from ARB_copy_buffer */ +/* reuse GL_COPY_READ_BUFFER */ +/* reuse GL_COPY_WRITE_BUFFER */ +/* Reuse tokens from ARB_draw_instanced (none) */ +/* Reuse tokens from ARB_uniform_buffer_object */ +/* reuse GL_UNIFORM_BUFFER */ +/* reuse GL_UNIFORM_BUFFER_BINDING */ +/* reuse GL_UNIFORM_BUFFER_START */ +/* reuse GL_UNIFORM_BUFFER_SIZE */ +/* reuse GL_MAX_VERTEX_UNIFORM_BLOCKS */ +/* reuse GL_MAX_FRAGMENT_UNIFORM_BLOCKS */ +/* reuse GL_MAX_COMBINED_UNIFORM_BLOCKS */ +/* reuse GL_MAX_UNIFORM_BUFFER_BINDINGS */ +/* reuse GL_MAX_UNIFORM_BLOCK_SIZE */ +/* reuse GL_MAX_COMBINED_VERTEX_UNIFORM_COMPONENTS */ +/* reuse GL_MAX_COMBINED_FRAGMENT_UNIFORM_COMPONENTS */ +/* reuse GL_UNIFORM_BUFFER_OFFSET_ALIGNMENT */ +/* reuse GL_ACTIVE_UNIFORM_BLOCK_MAX_NAME_LENGTH */ +/* reuse GL_ACTIVE_UNIFORM_BLOCKS */ +/* reuse GL_UNIFORM_TYPE */ +/* reuse GL_UNIFORM_SIZE */ +/* reuse GL_UNIFORM_NAME_LENGTH */ +/* reuse GL_UNIFORM_BLOCK_INDEX */ +/* reuse GL_UNIFORM_OFFSET */ +/* reuse GL_UNIFORM_ARRAY_STRIDE */ +/* reuse GL_UNIFORM_MATRIX_STRIDE */ +/* reuse GL_UNIFORM_IS_ROW_MAJOR */ +/* reuse GL_UNIFORM_BLOCK_BINDING */ +/* reuse GL_UNIFORM_BLOCK_DATA_SIZE */ +/* reuse GL_UNIFORM_BLOCK_NAME_LENGTH */ +/* reuse GL_UNIFORM_BLOCK_ACTIVE_UNIFORMS */ +/* reuse GL_UNIFORM_BLOCK_ACTIVE_UNIFORM_INDICES */ +/* reuse GL_UNIFORM_BLOCK_REFERENCED_BY_VERTEX_SHADER */ +/* reuse GL_UNIFORM_BLOCK_REFERENCED_BY_FRAGMENT_SHADER */ +/* reuse GL_INVALID_INDEX */ +#endif + +#ifndef GL_VERSION_3_2 +#define GL_CONTEXT_CORE_PROFILE_BIT 0x00000001 +#define GL_CONTEXT_COMPATIBILITY_PROFILE_BIT 0x00000002 +#define GL_LINES_ADJACENCY 0x000A +#define GL_LINE_STRIP_ADJACENCY 0x000B +#define GL_TRIANGLES_ADJACENCY 0x000C +#define GL_TRIANGLE_STRIP_ADJACENCY 0x000D +#define GL_PROGRAM_POINT_SIZE 0x8642 +#define GL_MAX_GEOMETRY_TEXTURE_IMAGE_UNITS 0x8C29 +#define GL_FRAMEBUFFER_ATTACHMENT_LAYERED 0x8DA7 +#define GL_FRAMEBUFFER_INCOMPLETE_LAYER_TARGETS 0x8DA8 +#define GL_GEOMETRY_SHADER 0x8DD9 +#define GL_GEOMETRY_VERTICES_OUT 0x8916 +#define GL_GEOMETRY_INPUT_TYPE 0x8917 +#define GL_GEOMETRY_OUTPUT_TYPE 0x8918 +#define GL_MAX_GEOMETRY_UNIFORM_COMPONENTS 0x8DDF +#define GL_MAX_GEOMETRY_OUTPUT_VERTICES 0x8DE0 +#define GL_MAX_GEOMETRY_TOTAL_OUTPUT_COMPONENTS 0x8DE1 +#define GL_MAX_VERTEX_OUTPUT_COMPONENTS 0x9122 +#define GL_MAX_GEOMETRY_INPUT_COMPONENTS 0x9123 +#define GL_MAX_GEOMETRY_OUTPUT_COMPONENTS 0x9124 +#define GL_MAX_FRAGMENT_INPUT_COMPONENTS 0x9125 +#define GL_CONTEXT_PROFILE_MASK 0x9126 +/* reuse GL_MAX_VARYING_COMPONENTS */ +/* reuse GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER */ +/* Reuse tokens from ARB_depth_clamp */ +/* reuse GL_DEPTH_CLAMP */ +/* Reuse tokens from ARB_draw_elements_base_vertex (none) */ +/* Reuse tokens from ARB_fragment_coord_conventions (none) */ +/* Reuse tokens from ARB_provoking_vertex */ +/* reuse GL_QUADS_FOLLOW_PROVOKING_VERTEX_CONVENTION */ +/* reuse GL_FIRST_VERTEX_CONVENTION */ +/* reuse GL_LAST_VERTEX_CONVENTION */ +/* reuse GL_PROVOKING_VERTEX */ +/* Reuse tokens from ARB_seamless_cube_map */ +/* reuse GL_TEXTURE_CUBE_MAP_SEAMLESS */ +/* Reuse tokens from ARB_sync */ +/* reuse GL_MAX_SERVER_WAIT_TIMEOUT */ +/* reuse GL_OBJECT_TYPE */ +/* reuse GL_SYNC_CONDITION */ +/* reuse GL_SYNC_STATUS */ +/* reuse GL_SYNC_FLAGS */ +/* reuse GL_SYNC_FENCE */ +/* reuse GL_SYNC_GPU_COMMANDS_COMPLETE */ +/* reuse GL_UNSIGNALED */ +/* reuse GL_SIGNALED */ +/* reuse GL_ALREADY_SIGNALED */ +/* reuse GL_TIMEOUT_EXPIRED */ +/* reuse GL_CONDITION_SATISFIED */ +/* reuse GL_WAIT_FAILED */ +/* reuse GL_TIMEOUT_IGNORED */ +/* reuse GL_SYNC_FLUSH_COMMANDS_BIT */ +/* reuse GL_TIMEOUT_IGNORED */ +/* Reuse tokens from ARB_texture_multisample */ +/* reuse GL_SAMPLE_POSITION */ +/* reuse GL_SAMPLE_MASK */ +/* reuse GL_SAMPLE_MASK_VALUE */ +/* reuse GL_MAX_SAMPLE_MASK_WORDS */ +/* reuse GL_TEXTURE_2D_MULTISAMPLE */ +/* reuse GL_PROXY_TEXTURE_2D_MULTISAMPLE */ +/* reuse GL_TEXTURE_2D_MULTISAMPLE_ARRAY */ +/* reuse GL_PROXY_TEXTURE_2D_MULTISAMPLE_ARRAY */ +/* reuse GL_TEXTURE_BINDING_2D_MULTISAMPLE */ +/* reuse GL_TEXTURE_BINDING_2D_MULTISAMPLE_ARRAY */ +/* reuse GL_TEXTURE_SAMPLES */ +/* reuse GL_TEXTURE_FIXED_SAMPLE_LOCATIONS */ +/* reuse GL_SAMPLER_2D_MULTISAMPLE */ +/* reuse GL_INT_SAMPLER_2D_MULTISAMPLE */ +/* reuse GL_UNSIGNED_INT_SAMPLER_2D_MULTISAMPLE */ +/* reuse GL_SAMPLER_2D_MULTISAMPLE_ARRAY */ +/* reuse GL_INT_SAMPLER_2D_MULTISAMPLE_ARRAY */ +/* reuse GL_UNSIGNED_INT_SAMPLER_2D_MULTISAMPLE_ARRAY */ +/* reuse GL_MAX_COLOR_TEXTURE_SAMPLES */ +/* reuse GL_MAX_DEPTH_TEXTURE_SAMPLES */ +/* reuse GL_MAX_INTEGER_SAMPLES */ +/* Don't need to reuse tokens from ARB_vertex_array_bgra since they're already in 1.2 core */ +#endif + +#ifndef GL_VERSION_3_3 +#define GL_VERTEX_ATTRIB_ARRAY_DIVISOR 0x88FE +/* Reuse tokens from ARB_blend_func_extended */ +/* reuse GL_SRC1_COLOR */ +/* reuse GL_ONE_MINUS_SRC1_COLOR */ +/* reuse GL_ONE_MINUS_SRC1_ALPHA */ +/* reuse GL_MAX_DUAL_SOURCE_DRAW_BUFFERS */ +/* Reuse tokens from ARB_explicit_attrib_location (none) */ +/* Reuse tokens from ARB_occlusion_query2 */ +/* reuse GL_ANY_SAMPLES_PASSED */ +/* Reuse tokens from ARB_sampler_objects */ +/* reuse GL_SAMPLER_BINDING */ +/* Reuse tokens from ARB_shader_bit_encoding (none) */ +/* Reuse tokens from ARB_texture_rgb10_a2ui */ +/* reuse GL_RGB10_A2UI */ +/* Reuse tokens from ARB_texture_swizzle */ +/* reuse GL_TEXTURE_SWIZZLE_R */ +/* reuse GL_TEXTURE_SWIZZLE_G */ +/* reuse GL_TEXTURE_SWIZZLE_B */ +/* reuse GL_TEXTURE_SWIZZLE_A */ +/* reuse GL_TEXTURE_SWIZZLE_RGBA */ +/* Reuse tokens from ARB_timer_query */ +/* reuse GL_TIME_ELAPSED */ +/* reuse GL_TIMESTAMP */ +/* Reuse tokens from ARB_vertex_type_2_10_10_10_rev */ +/* reuse GL_INT_2_10_10_10_REV */ +#endif + +#ifndef GL_VERSION_4_0 +#define GL_SAMPLE_SHADING 0x8C36 +#define GL_MIN_SAMPLE_SHADING_VALUE 0x8C37 +#define GL_MIN_PROGRAM_TEXTURE_GATHER_OFFSET 0x8E5E +#define GL_MAX_PROGRAM_TEXTURE_GATHER_OFFSET 0x8E5F +#define GL_TEXTURE_CUBE_MAP_ARRAY 0x9009 +#define GL_TEXTURE_BINDING_CUBE_MAP_ARRAY 0x900A +#define GL_PROXY_TEXTURE_CUBE_MAP_ARRAY 0x900B +#define GL_SAMPLER_CUBE_MAP_ARRAY 0x900C +#define GL_SAMPLER_CUBE_MAP_ARRAY_SHADOW 0x900D +#define GL_INT_SAMPLER_CUBE_MAP_ARRAY 0x900E +#define GL_UNSIGNED_INT_SAMPLER_CUBE_MAP_ARRAY 0x900F +/* Reuse tokens from ARB_texture_query_lod (none) */ +/* Reuse tokens from ARB_draw_buffers_blend (none) */ +/* Reuse tokens from ARB_draw_indirect */ +/* reuse GL_DRAW_INDIRECT_BUFFER */ +/* reuse GL_DRAW_INDIRECT_BUFFER_BINDING */ +/* Reuse tokens from ARB_gpu_shader5 */ +/* reuse GL_GEOMETRY_SHADER_INVOCATIONS */ +/* reuse GL_MAX_GEOMETRY_SHADER_INVOCATIONS */ +/* reuse GL_MIN_FRAGMENT_INTERPOLATION_OFFSET */ +/* reuse GL_MAX_FRAGMENT_INTERPOLATION_OFFSET */ +/* reuse GL_FRAGMENT_INTERPOLATION_OFFSET_BITS */ +/* reuse GL_MAX_VERTEX_STREAMS */ +/* Reuse tokens from ARB_gpu_shader_fp64 */ +/* reuse GL_DOUBLE_VEC2 */ +/* reuse GL_DOUBLE_VEC3 */ +/* reuse GL_DOUBLE_VEC4 */ +/* reuse GL_DOUBLE_MAT2 */ +/* reuse GL_DOUBLE_MAT3 */ +/* reuse GL_DOUBLE_MAT4 */ +/* reuse GL_DOUBLE_MAT2x3 */ +/* reuse GL_DOUBLE_MAT2x4 */ +/* reuse GL_DOUBLE_MAT3x2 */ +/* reuse GL_DOUBLE_MAT3x4 */ +/* reuse GL_DOUBLE_MAT4x2 */ +/* reuse GL_DOUBLE_MAT4x3 */ +/* Reuse tokens from ARB_shader_subroutine */ +/* reuse GL_ACTIVE_SUBROUTINES */ +/* reuse GL_ACTIVE_SUBROUTINE_UNIFORMS */ +/* reuse GL_ACTIVE_SUBROUTINE_UNIFORM_LOCATIONS */ +/* reuse GL_ACTIVE_SUBROUTINE_MAX_LENGTH */ +/* reuse GL_ACTIVE_SUBROUTINE_UNIFORM_MAX_LENGTH */ +/* reuse GL_MAX_SUBROUTINES */ +/* reuse GL_MAX_SUBROUTINE_UNIFORM_LOCATIONS */ +/* reuse GL_NUM_COMPATIBLE_SUBROUTINES */ +/* reuse GL_COMPATIBLE_SUBROUTINES */ +/* Reuse tokens from ARB_tessellation_shader */ +/* reuse GL_PATCHES */ +/* reuse GL_PATCH_VERTICES */ +/* reuse GL_PATCH_DEFAULT_INNER_LEVEL */ +/* reuse GL_PATCH_DEFAULT_OUTER_LEVEL */ +/* reuse GL_TESS_CONTROL_OUTPUT_VERTICES */ +/* reuse GL_TESS_GEN_MODE */ +/* reuse GL_TESS_GEN_SPACING */ +/* reuse GL_TESS_GEN_VERTEX_ORDER */ +/* reuse GL_TESS_GEN_POINT_MODE */ +/* reuse GL_ISOLINES */ +/* reuse GL_FRACTIONAL_ODD */ +/* reuse GL_FRACTIONAL_EVEN */ +/* reuse GL_MAX_PATCH_VERTICES */ +/* reuse GL_MAX_TESS_GEN_LEVEL */ +/* reuse GL_MAX_TESS_CONTROL_UNIFORM_COMPONENTS */ +/* reuse GL_MAX_TESS_EVALUATION_UNIFORM_COMPONENTS */ +/* reuse GL_MAX_TESS_CONTROL_TEXTURE_IMAGE_UNITS */ +/* reuse GL_MAX_TESS_EVALUATION_TEXTURE_IMAGE_UNITS */ +/* reuse GL_MAX_TESS_CONTROL_OUTPUT_COMPONENTS */ +/* reuse GL_MAX_TESS_PATCH_COMPONENTS */ +/* reuse GL_MAX_TESS_CONTROL_TOTAL_OUTPUT_COMPONENTS */ +/* reuse GL_MAX_TESS_EVALUATION_OUTPUT_COMPONENTS */ +/* reuse GL_MAX_TESS_CONTROL_UNIFORM_BLOCKS */ +/* reuse GL_MAX_TESS_EVALUATION_UNIFORM_BLOCKS */ +/* reuse GL_MAX_TESS_CONTROL_INPUT_COMPONENTS */ +/* reuse GL_MAX_TESS_EVALUATION_INPUT_COMPONENTS */ +/* reuse GL_MAX_COMBINED_TESS_CONTROL_UNIFORM_COMPONENTS */ +/* reuse GL_MAX_COMBINED_TESS_EVALUATION_UNIFORM_COMPONENTS */ +/* reuse GL_UNIFORM_BLOCK_REFERENCED_BY_TESS_CONTROL_SHADER */ +/* reuse GL_UNIFORM_BLOCK_REFERENCED_BY_TESS_EVALUATION_SHADER */ +/* reuse GL_TESS_EVALUATION_SHADER */ +/* reuse GL_TESS_CONTROL_SHADER */ +/* Reuse tokens from ARB_texture_buffer_object_rgb32 (none) */ +/* Reuse tokens from ARB_transform_feedback2 */ +/* reuse GL_TRANSFORM_FEEDBACK */ +/* reuse GL_TRANSFORM_FEEDBACK_BUFFER_PAUSED */ +/* reuse GL_TRANSFORM_FEEDBACK_BUFFER_ACTIVE */ +/* reuse GL_TRANSFORM_FEEDBACK_BINDING */ +/* Reuse tokens from ARB_transform_feedback3 */ +/* reuse GL_MAX_TRANSFORM_FEEDBACK_BUFFERS */ +/* reuse GL_MAX_VERTEX_STREAMS */ +#endif + +#ifndef GL_VERSION_4_1 +/* Reuse tokens from ARB_ES2_compatibility */ +/* reuse GL_FIXED */ +/* reuse GL_IMPLEMENTATION_COLOR_READ_TYPE */ +/* reuse GL_IMPLEMENTATION_COLOR_READ_FORMAT */ +/* reuse GL_LOW_FLOAT */ +/* reuse GL_MEDIUM_FLOAT */ +/* reuse GL_HIGH_FLOAT */ +/* reuse GL_LOW_INT */ +/* reuse GL_MEDIUM_INT */ +/* reuse GL_HIGH_INT */ +/* reuse GL_SHADER_COMPILER */ +/* reuse GL_SHADER_BINARY_FORMATS */ +/* reuse GL_NUM_SHADER_BINARY_FORMATS */ +/* reuse GL_MAX_VERTEX_UNIFORM_VECTORS */ +/* reuse GL_MAX_VARYING_VECTORS */ +/* reuse GL_MAX_FRAGMENT_UNIFORM_VECTORS */ +/* reuse GL_RGB565 */ +/* Reuse tokens from ARB_get_program_binary */ +/* reuse GL_PROGRAM_BINARY_RETRIEVABLE_HINT */ +/* reuse GL_PROGRAM_BINARY_LENGTH */ +/* reuse GL_NUM_PROGRAM_BINARY_FORMATS */ +/* reuse GL_PROGRAM_BINARY_FORMATS */ +/* Reuse tokens from ARB_separate_shader_objects */ +/* reuse GL_VERTEX_SHADER_BIT */ +/* reuse GL_FRAGMENT_SHADER_BIT */ +/* reuse GL_GEOMETRY_SHADER_BIT */ +/* reuse GL_TESS_CONTROL_SHADER_BIT */ +/* reuse GL_TESS_EVALUATION_SHADER_BIT */ +/* reuse GL_ALL_SHADER_BITS */ +/* reuse GL_PROGRAM_SEPARABLE */ +/* reuse GL_ACTIVE_PROGRAM */ +/* reuse GL_PROGRAM_PIPELINE_BINDING */ +/* Reuse tokens from ARB_shader_precision (none) */ +/* Reuse tokens from ARB_vertex_attrib_64bit - all are in GL 3.0 and 4.0 already */ +/* Reuse tokens from ARB_viewport_array - some are in GL 1.1 and ARB_provoking_vertex already */ +/* reuse GL_MAX_VIEWPORTS */ +/* reuse GL_VIEWPORT_SUBPIXEL_BITS */ +/* reuse GL_VIEWPORT_BOUNDS_RANGE */ +/* reuse GL_LAYER_PROVOKING_VERTEX */ +/* reuse GL_VIEWPORT_INDEX_PROVOKING_VERTEX */ +/* reuse GL_UNDEFINED_VERTEX */ +#endif + +#ifndef GL_VERSION_4_2 +/* Reuse tokens from ARB_base_instance (none) */ +/* Reuse tokens from ARB_shading_language_420pack (none) */ +/* Reuse tokens from ARB_transform_feedback_instanced (none) */ +/* Reuse tokens from ARB_compressed_texture_pixel_storage */ +/* reuse GL_UNPACK_COMPRESSED_BLOCK_WIDTH */ +/* reuse GL_UNPACK_COMPRESSED_BLOCK_HEIGHT */ +/* reuse GL_UNPACK_COMPRESSED_BLOCK_DEPTH */ +/* reuse GL_UNPACK_COMPRESSED_BLOCK_SIZE */ +/* reuse GL_PACK_COMPRESSED_BLOCK_WIDTH */ +/* reuse GL_PACK_COMPRESSED_BLOCK_HEIGHT */ +/* reuse GL_PACK_COMPRESSED_BLOCK_DEPTH */ +/* reuse GL_PACK_COMPRESSED_BLOCK_SIZE */ +/* Reuse tokens from ARB_conservative_depth (none) */ +/* Reuse tokens from ARB_internalformat_query */ +/* reuse GL_NUM_SAMPLE_COUNTS */ +/* Reuse tokens from ARB_map_buffer_alignment */ +/* reuse GL_MIN_MAP_BUFFER_ALIGNMENT */ +/* Reuse tokens from ARB_shader_atomic_counters */ +/* reuse GL_ATOMIC_COUNTER_BUFFER */ +/* reuse GL_ATOMIC_COUNTER_BUFFER_BINDING */ +/* reuse GL_ATOMIC_COUNTER_BUFFER_START */ +/* reuse GL_ATOMIC_COUNTER_BUFFER_SIZE */ +/* reuse GL_ATOMIC_COUNTER_BUFFER_DATA_SIZE */ +/* reuse GL_ATOMIC_COUNTER_BUFFER_ACTIVE_ATOMIC_COUNTERS */ +/* reuse GL_ATOMIC_COUNTER_BUFFER_ACTIVE_ATOMIC_COUNTER_INDICES */ +/* reuse GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_VERTEX_SHADER */ +/* reuse GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_TESS_CONTROL_SHADER */ +/* reuse GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_TESS_EVALUATION_SHADER */ +/* reuse GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_GEOMETRY_SHADER */ +/* reuse GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_FRAGMENT_SHADER */ +/* reuse GL_MAX_VERTEX_ATOMIC_COUNTER_BUFFERS */ +/* reuse GL_MAX_TESS_CONTROL_ATOMIC_COUNTER_BUFFERS */ +/* reuse GL_MAX_TESS_EVALUATION_ATOMIC_COUNTER_BUFFERS */ +/* reuse GL_MAX_GEOMETRY_ATOMIC_COUNTER_BUFFERS */ +/* reuse GL_MAX_FRAGMENT_ATOMIC_COUNTER_BUFFERS */ +/* reuse GL_MAX_COMBINED_ATOMIC_COUNTER_BUFFERS */ +/* reuse GL_MAX_VERTEX_ATOMIC_COUNTERS */ +/* reuse GL_MAX_TESS_CONTROL_ATOMIC_COUNTERS */ +/* reuse GL_MAX_TESS_EVALUATION_ATOMIC_COUNTERS */ +/* reuse GL_MAX_GEOMETRY_ATOMIC_COUNTERS */ +/* reuse GL_MAX_FRAGMENT_ATOMIC_COUNTERS */ +/* reuse GL_MAX_COMBINED_ATOMIC_COUNTERS */ +/* reuse GL_MAX_ATOMIC_COUNTER_BUFFER_SIZE */ +/* reuse GL_MAX_ATOMIC_COUNTER_BUFFER_BINDINGS */ +/* reuse GL_ACTIVE_ATOMIC_COUNTER_BUFFERS */ +/* reuse GL_UNIFORM_ATOMIC_COUNTER_BUFFER_INDEX */ +/* reuse GL_UNSIGNED_INT_ATOMIC_COUNTER */ +/* Reuse tokens from ARB_shader_image_load_store */ +/* reuse GL_VERTEX_ATTRIB_ARRAY_BARRIER_BIT */ +/* reuse GL_ELEMENT_ARRAY_BARRIER_BIT */ +/* reuse GL_UNIFORM_BARRIER_BIT */ +/* reuse GL_TEXTURE_FETCH_BARRIER_BIT */ +/* reuse GL_SHADER_IMAGE_ACCESS_BARRIER_BIT */ +/* reuse GL_COMMAND_BARRIER_BIT */ +/* reuse GL_PIXEL_BUFFER_BARRIER_BIT */ +/* reuse GL_TEXTURE_UPDATE_BARRIER_BIT */ +/* reuse GL_BUFFER_UPDATE_BARRIER_BIT */ +/* reuse GL_FRAMEBUFFER_BARRIER_BIT */ +/* reuse GL_TRANSFORM_FEEDBACK_BARRIER_BIT */ +/* reuse GL_ATOMIC_COUNTER_BARRIER_BIT */ +/* reuse GL_ALL_BARRIER_BITS */ +/* reuse GL_MAX_IMAGE_UNITS */ +/* reuse GL_MAX_COMBINED_IMAGE_UNITS_AND_FRAGMENT_OUTPUTS */ +/* reuse GL_IMAGE_BINDING_NAME */ +/* reuse GL_IMAGE_BINDING_LEVEL */ +/* reuse GL_IMAGE_BINDING_LAYERED */ +/* reuse GL_IMAGE_BINDING_LAYER */ +/* reuse GL_IMAGE_BINDING_ACCESS */ +/* reuse GL_IMAGE_1D */ +/* reuse GL_IMAGE_2D */ +/* reuse GL_IMAGE_3D */ +/* reuse GL_IMAGE_2D_RECT */ +/* reuse GL_IMAGE_CUBE */ +/* reuse GL_IMAGE_BUFFER */ +/* reuse GL_IMAGE_1D_ARRAY */ +/* reuse GL_IMAGE_2D_ARRAY */ +/* reuse GL_IMAGE_CUBE_MAP_ARRAY */ +/* reuse GL_IMAGE_2D_MULTISAMPLE */ +/* reuse GL_IMAGE_2D_MULTISAMPLE_ARRAY */ +/* reuse GL_INT_IMAGE_1D */ +/* reuse GL_INT_IMAGE_2D */ +/* reuse GL_INT_IMAGE_3D */ +/* reuse GL_INT_IMAGE_2D_RECT */ +/* reuse GL_INT_IMAGE_CUBE */ +/* reuse GL_INT_IMAGE_BUFFER */ +/* reuse GL_INT_IMAGE_1D_ARRAY */ +/* reuse GL_INT_IMAGE_2D_ARRAY */ +/* reuse GL_INT_IMAGE_CUBE_MAP_ARRAY */ +/* reuse GL_INT_IMAGE_2D_MULTISAMPLE */ +/* reuse GL_INT_IMAGE_2D_MULTISAMPLE_ARRAY */ +/* reuse GL_UNSIGNED_INT_IMAGE_1D */ +/* reuse GL_UNSIGNED_INT_IMAGE_2D */ +/* reuse GL_UNSIGNED_INT_IMAGE_3D */ +/* reuse GL_UNSIGNED_INT_IMAGE_2D_RECT */ +/* reuse GL_UNSIGNED_INT_IMAGE_CUBE */ +/* reuse GL_UNSIGNED_INT_IMAGE_BUFFER */ +/* reuse GL_UNSIGNED_INT_IMAGE_1D_ARRAY */ +/* reuse GL_UNSIGNED_INT_IMAGE_2D_ARRAY */ +/* reuse GL_UNSIGNED_INT_IMAGE_CUBE_MAP_ARRAY */ +/* reuse GL_UNSIGNED_INT_IMAGE_2D_MULTISAMPLE */ +/* reuse GL_UNSIGNED_INT_IMAGE_2D_MULTISAMPLE_ARRAY */ +/* reuse GL_MAX_IMAGE_SAMPLES */ +/* reuse GL_IMAGE_BINDING_FORMAT */ +/* reuse GL_IMAGE_FORMAT_COMPATIBILITY_TYPE */ +/* reuse GL_IMAGE_FORMAT_COMPATIBILITY_BY_SIZE */ +/* reuse GL_IMAGE_FORMAT_COMPATIBILITY_BY_CLASS */ +/* reuse GL_MAX_VERTEX_IMAGE_UNIFORMS */ +/* reuse GL_MAX_TESS_CONTROL_IMAGE_UNIFORMS */ +/* reuse GL_MAX_TESS_EVALUATION_IMAGE_UNIFORMS */ +/* reuse GL_MAX_GEOMETRY_IMAGE_UNIFORMS */ +/* reuse GL_MAX_FRAGMENT_IMAGE_UNIFORMS */ +/* reuse GL_MAX_COMBINED_IMAGE_UNIFORMS */ +/* Reuse tokens from ARB_shading_language_packing (none) */ +/* Reuse tokens from ARB_texture_storage */ +/* reuse GL_TEXTURE_IMMUTABLE_FORMAT */ +#endif + +#ifndef GL_VERSION_4_3 +#define GL_NUM_SHADING_LANGUAGE_VERSIONS 0x82E9 +#define GL_VERTEX_ATTRIB_ARRAY_LONG 0x874E +/* Reuse tokens from ARB_arrays_of_arrays (none, GLSL only) */ +/* Reuse tokens from ARB_fragment_layer_viewport (none, GLSL only) */ +/* Reuse tokens from ARB_shader_image_size (none, GLSL only) */ +/* Reuse tokens from ARB_ES3_compatibility */ +/* reuse GL_COMPRESSED_RGB8_ETC2 */ +/* reuse GL_COMPRESSED_SRGB8_ETC2 */ +/* reuse GL_COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2 */ +/* reuse GL_COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2 */ +/* reuse GL_COMPRESSED_RGBA8_ETC2_EAC */ +/* reuse GL_COMPRESSED_SRGB8_ALPHA8_ETC2_EAC */ +/* reuse GL_COMPRESSED_R11_EAC */ +/* reuse GL_COMPRESSED_SIGNED_R11_EAC */ +/* reuse GL_COMPRESSED_RG11_EAC */ +/* reuse GL_COMPRESSED_SIGNED_RG11_EAC */ +/* reuse GL_PRIMITIVE_RESTART_FIXED_INDEX */ +/* reuse GL_ANY_SAMPLES_PASSED_CONSERVATIVE */ +/* reuse GL_MAX_ELEMENT_INDEX */ +/* Reuse tokens from ARB_clear_buffer_object (none) */ +/* Reuse tokens from ARB_compute_shader */ +/* reuse GL_COMPUTE_SHADER */ +/* reuse GL_MAX_COMPUTE_UNIFORM_BLOCKS */ +/* reuse GL_MAX_COMPUTE_TEXTURE_IMAGE_UNITS */ +/* reuse GL_MAX_COMPUTE_IMAGE_UNIFORMS */ +/* reuse GL_MAX_COMPUTE_SHARED_MEMORY_SIZE */ +/* reuse GL_MAX_COMPUTE_UNIFORM_COMPONENTS */ +/* reuse GL_MAX_COMPUTE_ATOMIC_COUNTER_BUFFERS */ +/* reuse GL_MAX_COMPUTE_ATOMIC_COUNTERS */ +/* reuse GL_MAX_COMBINED_COMPUTE_UNIFORM_COMPONENTS */ +/* reuse GL_MAX_COMPUTE_LOCAL_INVOCATIONS */ +/* reuse GL_MAX_COMPUTE_WORK_GROUP_COUNT */ +/* reuse GL_MAX_COMPUTE_WORK_GROUP_SIZE */ +/* reuse GL_COMPUTE_LOCAL_WORK_SIZE */ +/* reuse GL_UNIFORM_BLOCK_REFERENCED_BY_COMPUTE_SHADER */ +/* reuse GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_COMPUTE_SHADER */ +/* reuse GL_DISPATCH_INDIRECT_BUFFER */ +/* reuse GL_DISPATCH_INDIRECT_BUFFER_BINDING */ +/* Reuse tokens from ARB_copy_image (none) */ +/* Reuse tokens from KHR_debug */ +/* reuse GL_DEBUG_OUTPUT_SYNCHRONOUS */ +/* reuse GL_DEBUG_NEXT_LOGGED_MESSAGE_LENGTH */ +/* reuse GL_DEBUG_CALLBACK_FUNCTION */ +/* reuse GL_DEBUG_CALLBACK_USER_PARAM */ +/* reuse GL_DEBUG_SOURCE_API */ +/* reuse GL_DEBUG_SOURCE_WINDOW_SYSTEM */ +/* reuse GL_DEBUG_SOURCE_SHADER_COMPILER */ +/* reuse GL_DEBUG_SOURCE_THIRD_PARTY */ +/* reuse GL_DEBUG_SOURCE_APPLICATION */ +/* reuse GL_DEBUG_SOURCE_OTHER */ +/* reuse GL_DEBUG_TYPE_ERROR */ +/* reuse GL_DEBUG_TYPE_DEPRECATED_BEHAVIOR */ +/* reuse GL_DEBUG_TYPE_UNDEFINED_BEHAVIOR */ +/* reuse GL_DEBUG_TYPE_PORTABILITY */ +/* reuse GL_DEBUG_TYPE_PERFORMANCE */ +/* reuse GL_DEBUG_TYPE_OTHER */ +/* reuse GL_MAX_DEBUG_MESSAGE_LENGTH */ +/* reuse GL_MAX_DEBUG_LOGGED_MESSAGES */ +/* reuse GL_DEBUG_LOGGED_MESSAGES */ +/* reuse GL_DEBUG_SEVERITY_HIGH */ +/* reuse GL_DEBUG_SEVERITY_MEDIUM */ +/* reuse GL_DEBUG_SEVERITY_LOW */ +/* reuse GL_DEBUG_TYPE_MARKER */ +/* reuse GL_DEBUG_TYPE_PUSH_GROUP */ +/* reuse GL_DEBUG_TYPE_POP_GROUP */ +/* reuse GL_DEBUG_SEVERITY_NOTIFICATION */ +/* reuse GL_MAX_DEBUG_GROUP_STACK_DEPTH */ +/* reuse GL_DEBUG_GROUP_STACK_DEPTH */ +/* reuse GL_BUFFER */ +/* reuse GL_SHADER */ +/* reuse GL_PROGRAM */ +/* reuse GL_QUERY */ +/* reuse GL_PROGRAM_PIPELINE */ +/* reuse GL_SAMPLER */ +/* reuse GL_DISPLAY_LIST */ +/* reuse GL_MAX_LABEL_LENGTH */ +/* reuse GL_DEBUG_OUTPUT */ +/* reuse GL_CONTEXT_FLAG_DEBUG_BIT */ +/* reuse GL_STACK_UNDERFLOW */ +/* reuse GL_STACK_OVERFLOW */ +/* Reuse tokens from ARB_explicit_uniform_location */ +/* reuse GL_MAX_UNIFORM_LOCATIONS */ +/* Reuse tokens from ARB_framebuffer_no_attachments */ +/* reuse GL_FRAMEBUFFER_DEFAULT_WIDTH */ +/* reuse GL_FRAMEBUFFER_DEFAULT_HEIGHT */ +/* reuse GL_FRAMEBUFFER_DEFAULT_LAYERS */ +/* reuse GL_FRAMEBUFFER_DEFAULT_SAMPLES */ +/* reuse GL_FRAMEBUFFER_DEFAULT_FIXED_SAMPLE_LOCATIONS */ +/* reuse GL_MAX_FRAMEBUFFER_WIDTH */ +/* reuse GL_MAX_FRAMEBUFFER_HEIGHT */ +/* reuse GL_MAX_FRAMEBUFFER_LAYERS */ +/* reuse GL_MAX_FRAMEBUFFER_SAMPLES */ +/* Reuse tokens from ARB_internalformat_query2 */ +/* reuse GL_INTERNALFORMAT_SUPPORTED */ +/* reuse GL_INTERNALFORMAT_PREFERRED */ +/* reuse GL_INTERNALFORMAT_RED_SIZE */ +/* reuse GL_INTERNALFORMAT_GREEN_SIZE */ +/* reuse GL_INTERNALFORMAT_BLUE_SIZE */ +/* reuse GL_INTERNALFORMAT_ALPHA_SIZE */ +/* reuse GL_INTERNALFORMAT_DEPTH_SIZE */ +/* reuse GL_INTERNALFORMAT_STENCIL_SIZE */ +/* reuse GL_INTERNALFORMAT_SHARED_SIZE */ +/* reuse GL_INTERNALFORMAT_RED_TYPE */ +/* reuse GL_INTERNALFORMAT_GREEN_TYPE */ +/* reuse GL_INTERNALFORMAT_BLUE_TYPE */ +/* reuse GL_INTERNALFORMAT_ALPHA_TYPE */ +/* reuse GL_INTERNALFORMAT_DEPTH_TYPE */ +/* reuse GL_INTERNALFORMAT_STENCIL_TYPE */ +/* reuse GL_MAX_WIDTH */ +/* reuse GL_MAX_HEIGHT */ +/* reuse GL_MAX_DEPTH */ +/* reuse GL_MAX_LAYERS */ +/* reuse GL_MAX_COMBINED_DIMENSIONS */ +/* reuse GL_COLOR_COMPONENTS */ +/* reuse GL_DEPTH_COMPONENTS */ +/* reuse GL_STENCIL_COMPONENTS */ +/* reuse GL_COLOR_RENDERABLE */ +/* reuse GL_DEPTH_RENDERABLE */ +/* reuse GL_STENCIL_RENDERABLE */ +/* reuse GL_FRAMEBUFFER_RENDERABLE */ +/* reuse GL_FRAMEBUFFER_RENDERABLE_LAYERED */ +/* reuse GL_FRAMEBUFFER_BLEND */ +/* reuse GL_READ_PIXELS */ +/* reuse GL_READ_PIXELS_FORMAT */ +/* reuse GL_READ_PIXELS_TYPE */ +/* reuse GL_TEXTURE_IMAGE_FORMAT */ +/* reuse GL_TEXTURE_IMAGE_TYPE */ +/* reuse GL_GET_TEXTURE_IMAGE_FORMAT */ +/* reuse GL_GET_TEXTURE_IMAGE_TYPE */ +/* reuse GL_MIPMAP */ +/* reuse GL_MANUAL_GENERATE_MIPMAP */ +/* reuse GL_AUTO_GENERATE_MIPMAP */ +/* reuse GL_COLOR_ENCODING */ +/* reuse GL_SRGB_READ */ +/* reuse GL_SRGB_WRITE */ +/* reuse GL_FILTER */ +/* reuse GL_VERTEX_TEXTURE */ +/* reuse GL_TESS_CONTROL_TEXTURE */ +/* reuse GL_TESS_EVALUATION_TEXTURE */ +/* reuse GL_GEOMETRY_TEXTURE */ +/* reuse GL_FRAGMENT_TEXTURE */ +/* reuse GL_COMPUTE_TEXTURE */ +/* reuse GL_TEXTURE_SHADOW */ +/* reuse GL_TEXTURE_GATHER */ +/* reuse GL_TEXTURE_GATHER_SHADOW */ +/* reuse GL_SHADER_IMAGE_LOAD */ +/* reuse GL_SHADER_IMAGE_STORE */ +/* reuse GL_SHADER_IMAGE_ATOMIC */ +/* reuse GL_IMAGE_TEXEL_SIZE */ +/* reuse GL_IMAGE_COMPATIBILITY_CLASS */ +/* reuse GL_IMAGE_PIXEL_FORMAT */ +/* reuse GL_IMAGE_PIXEL_TYPE */ +/* reuse GL_SIMULTANEOUS_TEXTURE_AND_DEPTH_TEST */ +/* reuse GL_SIMULTANEOUS_TEXTURE_AND_STENCIL_TEST */ +/* reuse GL_SIMULTANEOUS_TEXTURE_AND_DEPTH_WRITE */ +/* reuse GL_SIMULTANEOUS_TEXTURE_AND_STENCIL_WRITE */ +/* reuse GL_TEXTURE_COMPRESSED_BLOCK_WIDTH */ +/* reuse GL_TEXTURE_COMPRESSED_BLOCK_HEIGHT */ +/* reuse GL_TEXTURE_COMPRESSED_BLOCK_SIZE */ +/* reuse GL_CLEAR_BUFFER */ +/* reuse GL_TEXTURE_VIEW */ +/* reuse GL_VIEW_COMPATIBILITY_CLASS */ +/* reuse GL_FULL_SUPPORT */ +/* reuse GL_CAVEAT_SUPPORT */ +/* reuse GL_IMAGE_CLASS_4_X_32 */ +/* reuse GL_IMAGE_CLASS_2_X_32 */ +/* reuse GL_IMAGE_CLASS_1_X_32 */ +/* reuse GL_IMAGE_CLASS_4_X_16 */ +/* reuse GL_IMAGE_CLASS_2_X_16 */ +/* reuse GL_IMAGE_CLASS_1_X_16 */ +/* reuse GL_IMAGE_CLASS_4_X_8 */ +/* reuse GL_IMAGE_CLASS_2_X_8 */ +/* reuse GL_IMAGE_CLASS_1_X_8 */ +/* reuse GL_IMAGE_CLASS_11_11_10 */ +/* reuse GL_IMAGE_CLASS_10_10_10_2 */ +/* reuse GL_VIEW_CLASS_128_BITS */ +/* reuse GL_VIEW_CLASS_96_BITS */ +/* reuse GL_VIEW_CLASS_64_BITS */ +/* reuse GL_VIEW_CLASS_48_BITS */ +/* reuse GL_VIEW_CLASS_32_BITS */ +/* reuse GL_VIEW_CLASS_24_BITS */ +/* reuse GL_VIEW_CLASS_16_BITS */ +/* reuse GL_VIEW_CLASS_8_BITS */ +/* reuse GL_VIEW_CLASS_S3TC_DXT1_RGB */ +/* reuse GL_VIEW_CLASS_S3TC_DXT1_RGBA */ +/* reuse GL_VIEW_CLASS_S3TC_DXT3_RGBA */ +/* reuse GL_VIEW_CLASS_S3TC_DXT5_RGBA */ +/* reuse GL_VIEW_CLASS_RGTC1_RED */ +/* reuse GL_VIEW_CLASS_RGTC2_RG */ +/* reuse GL_VIEW_CLASS_BPTC_UNORM */ +/* reuse GL_VIEW_CLASS_BPTC_FLOAT */ +/* Reuse tokens from ARB_invalidate_subdata (none) */ +/* Reuse tokens from ARB_multi_draw_indirect (none) */ +/* Reuse tokens from ARB_program_interface_query */ +/* reuse GL_UNIFORM */ +/* reuse GL_UNIFORM_BLOCK */ +/* reuse GL_PROGRAM_INPUT */ +/* reuse GL_PROGRAM_OUTPUT */ +/* reuse GL_BUFFER_VARIABLE */ +/* reuse GL_SHADER_STORAGE_BLOCK */ +/* reuse GL_VERTEX_SUBROUTINE */ +/* reuse GL_TESS_CONTROL_SUBROUTINE */ +/* reuse GL_TESS_EVALUATION_SUBROUTINE */ +/* reuse GL_GEOMETRY_SUBROUTINE */ +/* reuse GL_FRAGMENT_SUBROUTINE */ +/* reuse GL_COMPUTE_SUBROUTINE */ +/* reuse GL_VERTEX_SUBROUTINE_UNIFORM */ +/* reuse GL_TESS_CONTROL_SUBROUTINE_UNIFORM */ +/* reuse GL_TESS_EVALUATION_SUBROUTINE_UNIFORM */ +/* reuse GL_GEOMETRY_SUBROUTINE_UNIFORM */ +/* reuse GL_FRAGMENT_SUBROUTINE_UNIFORM */ +/* reuse GL_COMPUTE_SUBROUTINE_UNIFORM */ +/* reuse GL_TRANSFORM_FEEDBACK_VARYING */ +/* reuse GL_ACTIVE_RESOURCES */ +/* reuse GL_MAX_NAME_LENGTH */ +/* reuse GL_MAX_NUM_ACTIVE_VARIABLES */ +/* reuse GL_MAX_NUM_COMPATIBLE_SUBROUTINES */ +/* reuse GL_NAME_LENGTH */ +/* reuse GL_TYPE */ +/* reuse GL_ARRAY_SIZE */ +/* reuse GL_OFFSET */ +/* reuse GL_BLOCK_INDEX */ +/* reuse GL_ARRAY_STRIDE */ +/* reuse GL_MATRIX_STRIDE */ +/* reuse GL_IS_ROW_MAJOR */ +/* reuse GL_ATOMIC_COUNTER_BUFFER_INDEX */ +/* reuse GL_BUFFER_BINDING */ +/* reuse GL_BUFFER_DATA_SIZE */ +/* reuse GL_NUM_ACTIVE_VARIABLES */ +/* reuse GL_ACTIVE_VARIABLES */ +/* reuse GL_REFERENCED_BY_VERTEX_SHADER */ +/* reuse GL_REFERENCED_BY_TESS_CONTROL_SHADER */ +/* reuse GL_REFERENCED_BY_TESS_EVALUATION_SHADER */ +/* reuse GL_REFERENCED_BY_GEOMETRY_SHADER */ +/* reuse GL_REFERENCED_BY_FRAGMENT_SHADER */ +/* reuse GL_REFERENCED_BY_COMPUTE_SHADER */ +/* reuse GL_TOP_LEVEL_ARRAY_SIZE */ +/* reuse GL_TOP_LEVEL_ARRAY_STRIDE */ +/* reuse GL_LOCATION */ +/* reuse GL_LOCATION_INDEX */ +/* reuse GL_IS_PER_PATCH */ +/* Reuse tokens from ARB_robust_buffer_access_behavior (none) */ +/* Reuse tokens from ARB_shader_storage_buffer_object */ +/* reuse GL_SHADER_STORAGE_BUFFER */ +/* reuse GL_SHADER_STORAGE_BUFFER_BINDING */ +/* reuse GL_SHADER_STORAGE_BUFFER_START */ +/* reuse GL_SHADER_STORAGE_BUFFER_SIZE */ +/* reuse GL_MAX_VERTEX_SHADER_STORAGE_BLOCKS */ +/* reuse GL_MAX_GEOMETRY_SHADER_STORAGE_BLOCKS */ +/* reuse GL_MAX_TESS_CONTROL_SHADER_STORAGE_BLOCKS */ +/* reuse GL_MAX_TESS_EVALUATION_SHADER_STORAGE_BLOCKS */ +/* reuse GL_MAX_FRAGMENT_SHADER_STORAGE_BLOCKS */ +/* reuse GL_MAX_COMPUTE_SHADER_STORAGE_BLOCKS */ +/* reuse GL_MAX_COMBINED_SHADER_STORAGE_BLOCKS */ +/* reuse GL_MAX_SHADER_STORAGE_BUFFER_BINDINGS */ +/* reuse GL_MAX_SHADER_STORAGE_BLOCK_SIZE */ +/* reuse GL_SHADER_STORAGE_BUFFER_OFFSET_ALIGNMENT */ +/* reuse GL_SHADER_STORAGE_BARRIER_BIT */ +/* reuse GL_MAX_COMBINED_SHADER_OUTPUT_RESOURCES */ +/* Reuse tokens from ARB_stencil_texturing */ +/* reuse GL_DEPTH_STENCIL_TEXTURE_MODE */ +/* Reuse tokens from ARB_texture_buffer_range */ +/* reuse GL_TEXTURE_BUFFER_OFFSET */ +/* reuse GL_TEXTURE_BUFFER_SIZE */ +/* reuse GL_TEXTURE_BUFFER_OFFSET_ALIGNMENT */ +/* Reuse tokens from ARB_texture_query_levels (none) */ +/* Reuse tokens from ARB_texture_storage_multisample (none) */ +/* Reuse tokens from ARB_texture_view */ +/* reuse GL_TEXTURE_VIEW_MIN_LEVEL */ +/* reuse GL_TEXTURE_VIEW_NUM_LEVELS */ +/* reuse GL_TEXTURE_VIEW_MIN_LAYER */ +/* reuse GL_TEXTURE_VIEW_NUM_LAYERS */ +/* reuse GL_TEXTURE_IMMUTABLE_LEVELS */ +/* Reuse tokens from ARB_vertex_attrib_binding */ +/* reuse GL_VERTEX_ATTRIB_BINDING */ +/* reuse GL_VERTEX_ATTRIB_RELATIVE_OFFSET */ +/* reuse GL_VERTEX_BINDING_DIVISOR */ +/* reuse GL_VERTEX_BINDING_OFFSET */ +/* reuse GL_VERTEX_BINDING_STRIDE */ +/* reuse GL_MAX_VERTEX_ATTRIB_RELATIVE_OFFSET */ +/* reuse GL_MAX_VERTEX_ATTRIB_BINDINGS */ +#endif + +#ifndef GL_ARB_multitexture +#define GL_TEXTURE0_ARB 0x84C0 +#define GL_TEXTURE1_ARB 0x84C1 +#define GL_TEXTURE2_ARB 0x84C2 +#define GL_TEXTURE3_ARB 0x84C3 +#define GL_TEXTURE4_ARB 0x84C4 +#define GL_TEXTURE5_ARB 0x84C5 +#define GL_TEXTURE6_ARB 0x84C6 +#define GL_TEXTURE7_ARB 0x84C7 +#define GL_TEXTURE8_ARB 0x84C8 +#define GL_TEXTURE9_ARB 0x84C9 +#define GL_TEXTURE10_ARB 0x84CA +#define GL_TEXTURE11_ARB 0x84CB +#define GL_TEXTURE12_ARB 0x84CC +#define GL_TEXTURE13_ARB 0x84CD +#define GL_TEXTURE14_ARB 0x84CE +#define GL_TEXTURE15_ARB 0x84CF +#define GL_TEXTURE16_ARB 0x84D0 +#define GL_TEXTURE17_ARB 0x84D1 +#define GL_TEXTURE18_ARB 0x84D2 +#define GL_TEXTURE19_ARB 0x84D3 +#define GL_TEXTURE20_ARB 0x84D4 +#define GL_TEXTURE21_ARB 0x84D5 +#define GL_TEXTURE22_ARB 0x84D6 +#define GL_TEXTURE23_ARB 0x84D7 +#define GL_TEXTURE24_ARB 0x84D8 +#define GL_TEXTURE25_ARB 0x84D9 +#define GL_TEXTURE26_ARB 0x84DA +#define GL_TEXTURE27_ARB 0x84DB +#define GL_TEXTURE28_ARB 0x84DC +#define GL_TEXTURE29_ARB 0x84DD +#define GL_TEXTURE30_ARB 0x84DE +#define GL_TEXTURE31_ARB 0x84DF +#define GL_ACTIVE_TEXTURE_ARB 0x84E0 +#define GL_CLIENT_ACTIVE_TEXTURE_ARB 0x84E1 +#define GL_MAX_TEXTURE_UNITS_ARB 0x84E2 +#endif + +#ifndef GL_ARB_transpose_matrix +#define GL_TRANSPOSE_MODELVIEW_MATRIX_ARB 0x84E3 +#define GL_TRANSPOSE_PROJECTION_MATRIX_ARB 0x84E4 +#define GL_TRANSPOSE_TEXTURE_MATRIX_ARB 0x84E5 +#define GL_TRANSPOSE_COLOR_MATRIX_ARB 0x84E6 +#endif + +#ifndef GL_ARB_multisample +#define GL_MULTISAMPLE_ARB 0x809D +#define GL_SAMPLE_ALPHA_TO_COVERAGE_ARB 0x809E +#define GL_SAMPLE_ALPHA_TO_ONE_ARB 0x809F +#define GL_SAMPLE_COVERAGE_ARB 0x80A0 +#define GL_SAMPLE_BUFFERS_ARB 0x80A8 +#define GL_SAMPLES_ARB 0x80A9 +#define GL_SAMPLE_COVERAGE_VALUE_ARB 0x80AA +#define GL_SAMPLE_COVERAGE_INVERT_ARB 0x80AB +#define GL_MULTISAMPLE_BIT_ARB 0x20000000 +#endif + +#ifndef GL_ARB_texture_env_add +#endif + +#ifndef GL_ARB_texture_cube_map +#define GL_NORMAL_MAP_ARB 0x8511 +#define GL_REFLECTION_MAP_ARB 0x8512 +#define GL_TEXTURE_CUBE_MAP_ARB 0x8513 +#define GL_TEXTURE_BINDING_CUBE_MAP_ARB 0x8514 +#define GL_TEXTURE_CUBE_MAP_POSITIVE_X_ARB 0x8515 +#define GL_TEXTURE_CUBE_MAP_NEGATIVE_X_ARB 0x8516 +#define GL_TEXTURE_CUBE_MAP_POSITIVE_Y_ARB 0x8517 +#define GL_TEXTURE_CUBE_MAP_NEGATIVE_Y_ARB 0x8518 +#define GL_TEXTURE_CUBE_MAP_POSITIVE_Z_ARB 0x8519 +#define GL_TEXTURE_CUBE_MAP_NEGATIVE_Z_ARB 0x851A +#define GL_PROXY_TEXTURE_CUBE_MAP_ARB 0x851B +#define GL_MAX_CUBE_MAP_TEXTURE_SIZE_ARB 0x851C +#endif + +#ifndef GL_ARB_texture_compression +#define GL_COMPRESSED_ALPHA_ARB 0x84E9 +#define GL_COMPRESSED_LUMINANCE_ARB 0x84EA +#define GL_COMPRESSED_LUMINANCE_ALPHA_ARB 0x84EB +#define GL_COMPRESSED_INTENSITY_ARB 0x84EC +#define GL_COMPRESSED_RGB_ARB 0x84ED +#define GL_COMPRESSED_RGBA_ARB 0x84EE +#define GL_TEXTURE_COMPRESSION_HINT_ARB 0x84EF +#define GL_TEXTURE_COMPRESSED_IMAGE_SIZE_ARB 0x86A0 +#define GL_TEXTURE_COMPRESSED_ARB 0x86A1 +#define GL_NUM_COMPRESSED_TEXTURE_FORMATS_ARB 0x86A2 +#define GL_COMPRESSED_TEXTURE_FORMATS_ARB 0x86A3 +#endif + +#ifndef GL_ARB_texture_border_clamp +#define GL_CLAMP_TO_BORDER_ARB 0x812D +#endif + +#ifndef GL_ARB_point_parameters +#define GL_POINT_SIZE_MIN_ARB 0x8126 +#define GL_POINT_SIZE_MAX_ARB 0x8127 +#define GL_POINT_FADE_THRESHOLD_SIZE_ARB 0x8128 +#define GL_POINT_DISTANCE_ATTENUATION_ARB 0x8129 +#endif + +#ifndef GL_ARB_vertex_blend +#define GL_MAX_VERTEX_UNITS_ARB 0x86A4 +#define GL_ACTIVE_VERTEX_UNITS_ARB 0x86A5 +#define GL_WEIGHT_SUM_UNITY_ARB 0x86A6 +#define GL_VERTEX_BLEND_ARB 0x86A7 +#define GL_CURRENT_WEIGHT_ARB 0x86A8 +#define GL_WEIGHT_ARRAY_TYPE_ARB 0x86A9 +#define GL_WEIGHT_ARRAY_STRIDE_ARB 0x86AA +#define GL_WEIGHT_ARRAY_SIZE_ARB 0x86AB +#define GL_WEIGHT_ARRAY_POINTER_ARB 0x86AC +#define GL_WEIGHT_ARRAY_ARB 0x86AD +#define GL_MODELVIEW0_ARB 0x1700 +#define GL_MODELVIEW1_ARB 0x850A +#define GL_MODELVIEW2_ARB 0x8722 +#define GL_MODELVIEW3_ARB 0x8723 +#define GL_MODELVIEW4_ARB 0x8724 +#define GL_MODELVIEW5_ARB 0x8725 +#define GL_MODELVIEW6_ARB 0x8726 +#define GL_MODELVIEW7_ARB 0x8727 +#define GL_MODELVIEW8_ARB 0x8728 +#define GL_MODELVIEW9_ARB 0x8729 +#define GL_MODELVIEW10_ARB 0x872A +#define GL_MODELVIEW11_ARB 0x872B +#define GL_MODELVIEW12_ARB 0x872C +#define GL_MODELVIEW13_ARB 0x872D +#define GL_MODELVIEW14_ARB 0x872E +#define GL_MODELVIEW15_ARB 0x872F +#define GL_MODELVIEW16_ARB 0x8730 +#define GL_MODELVIEW17_ARB 0x8731 +#define GL_MODELVIEW18_ARB 0x8732 +#define GL_MODELVIEW19_ARB 0x8733 +#define GL_MODELVIEW20_ARB 0x8734 +#define GL_MODELVIEW21_ARB 0x8735 +#define GL_MODELVIEW22_ARB 0x8736 +#define GL_MODELVIEW23_ARB 0x8737 +#define GL_MODELVIEW24_ARB 0x8738 +#define GL_MODELVIEW25_ARB 0x8739 +#define GL_MODELVIEW26_ARB 0x873A +#define GL_MODELVIEW27_ARB 0x873B +#define GL_MODELVIEW28_ARB 0x873C +#define GL_MODELVIEW29_ARB 0x873D +#define GL_MODELVIEW30_ARB 0x873E +#define GL_MODELVIEW31_ARB 0x873F +#endif + +#ifndef GL_ARB_matrix_palette +#define GL_MATRIX_PALETTE_ARB 0x8840 +#define GL_MAX_MATRIX_PALETTE_STACK_DEPTH_ARB 0x8841 +#define GL_MAX_PALETTE_MATRICES_ARB 0x8842 +#define GL_CURRENT_PALETTE_MATRIX_ARB 0x8843 +#define GL_MATRIX_INDEX_ARRAY_ARB 0x8844 +#define GL_CURRENT_MATRIX_INDEX_ARB 0x8845 +#define GL_MATRIX_INDEX_ARRAY_SIZE_ARB 0x8846 +#define GL_MATRIX_INDEX_ARRAY_TYPE_ARB 0x8847 +#define GL_MATRIX_INDEX_ARRAY_STRIDE_ARB 0x8848 +#define GL_MATRIX_INDEX_ARRAY_POINTER_ARB 0x8849 +#endif + +#ifndef GL_ARB_texture_env_combine +#define GL_COMBINE_ARB 0x8570 +#define GL_COMBINE_RGB_ARB 0x8571 +#define GL_COMBINE_ALPHA_ARB 0x8572 +#define GL_SOURCE0_RGB_ARB 0x8580 +#define GL_SOURCE1_RGB_ARB 0x8581 +#define GL_SOURCE2_RGB_ARB 0x8582 +#define GL_SOURCE0_ALPHA_ARB 0x8588 +#define GL_SOURCE1_ALPHA_ARB 0x8589 +#define GL_SOURCE2_ALPHA_ARB 0x858A +#define GL_OPERAND0_RGB_ARB 0x8590 +#define GL_OPERAND1_RGB_ARB 0x8591 +#define GL_OPERAND2_RGB_ARB 0x8592 +#define GL_OPERAND0_ALPHA_ARB 0x8598 +#define GL_OPERAND1_ALPHA_ARB 0x8599 +#define GL_OPERAND2_ALPHA_ARB 0x859A +#define GL_RGB_SCALE_ARB 0x8573 +#define GL_ADD_SIGNED_ARB 0x8574 +#define GL_INTERPOLATE_ARB 0x8575 +#define GL_SUBTRACT_ARB 0x84E7 +#define GL_CONSTANT_ARB 0x8576 +#define GL_PRIMARY_COLOR_ARB 0x8577 +#define GL_PREVIOUS_ARB 0x8578 +#endif + +#ifndef GL_ARB_texture_env_crossbar +#endif + +#ifndef GL_ARB_texture_env_dot3 +#define GL_DOT3_RGB_ARB 0x86AE +#define GL_DOT3_RGBA_ARB 0x86AF +#endif + +#ifndef GL_ARB_texture_mirrored_repeat +#define GL_MIRRORED_REPEAT_ARB 0x8370 +#endif + +#ifndef GL_ARB_depth_texture +#define GL_DEPTH_COMPONENT16_ARB 0x81A5 +#define GL_DEPTH_COMPONENT24_ARB 0x81A6 +#define GL_DEPTH_COMPONENT32_ARB 0x81A7 +#define GL_TEXTURE_DEPTH_SIZE_ARB 0x884A +#define GL_DEPTH_TEXTURE_MODE_ARB 0x884B +#endif + +#ifndef GL_ARB_shadow +#define GL_TEXTURE_COMPARE_MODE_ARB 0x884C +#define GL_TEXTURE_COMPARE_FUNC_ARB 0x884D +#define GL_COMPARE_R_TO_TEXTURE_ARB 0x884E +#endif + +#ifndef GL_ARB_shadow_ambient +#define GL_TEXTURE_COMPARE_FAIL_VALUE_ARB 0x80BF +#endif + +#ifndef GL_ARB_window_pos +#endif + +#ifndef GL_ARB_vertex_program +#define GL_COLOR_SUM_ARB 0x8458 +#define GL_VERTEX_PROGRAM_ARB 0x8620 +#define GL_VERTEX_ATTRIB_ARRAY_ENABLED_ARB 0x8622 +#define GL_VERTEX_ATTRIB_ARRAY_SIZE_ARB 0x8623 +#define GL_VERTEX_ATTRIB_ARRAY_STRIDE_ARB 0x8624 +#define GL_VERTEX_ATTRIB_ARRAY_TYPE_ARB 0x8625 +#define GL_CURRENT_VERTEX_ATTRIB_ARB 0x8626 +#define GL_PROGRAM_LENGTH_ARB 0x8627 +#define GL_PROGRAM_STRING_ARB 0x8628 +#define GL_MAX_PROGRAM_MATRIX_STACK_DEPTH_ARB 0x862E +#define GL_MAX_PROGRAM_MATRICES_ARB 0x862F +#define GL_CURRENT_MATRIX_STACK_DEPTH_ARB 0x8640 +#define GL_CURRENT_MATRIX_ARB 0x8641 +#define GL_VERTEX_PROGRAM_POINT_SIZE_ARB 0x8642 +#define GL_VERTEX_PROGRAM_TWO_SIDE_ARB 0x8643 +#define GL_VERTEX_ATTRIB_ARRAY_POINTER_ARB 0x8645 +#define GL_PROGRAM_ERROR_POSITION_ARB 0x864B +#define GL_PROGRAM_BINDING_ARB 0x8677 +#define GL_MAX_VERTEX_ATTRIBS_ARB 0x8869 +#define GL_VERTEX_ATTRIB_ARRAY_NORMALIZED_ARB 0x886A +#define GL_PROGRAM_ERROR_STRING_ARB 0x8874 +#define GL_PROGRAM_FORMAT_ASCII_ARB 0x8875 +#define GL_PROGRAM_FORMAT_ARB 0x8876 +#define GL_PROGRAM_INSTRUCTIONS_ARB 0x88A0 +#define GL_MAX_PROGRAM_INSTRUCTIONS_ARB 0x88A1 +#define GL_PROGRAM_NATIVE_INSTRUCTIONS_ARB 0x88A2 +#define GL_MAX_PROGRAM_NATIVE_INSTRUCTIONS_ARB 0x88A3 +#define GL_PROGRAM_TEMPORARIES_ARB 0x88A4 +#define GL_MAX_PROGRAM_TEMPORARIES_ARB 0x88A5 +#define GL_PROGRAM_NATIVE_TEMPORARIES_ARB 0x88A6 +#define GL_MAX_PROGRAM_NATIVE_TEMPORARIES_ARB 0x88A7 +#define GL_PROGRAM_PARAMETERS_ARB 0x88A8 +#define GL_MAX_PROGRAM_PARAMETERS_ARB 0x88A9 +#define GL_PROGRAM_NATIVE_PARAMETERS_ARB 0x88AA +#define GL_MAX_PROGRAM_NATIVE_PARAMETERS_ARB 0x88AB +#define GL_PROGRAM_ATTRIBS_ARB 0x88AC +#define GL_MAX_PROGRAM_ATTRIBS_ARB 0x88AD +#define GL_PROGRAM_NATIVE_ATTRIBS_ARB 0x88AE +#define GL_MAX_PROGRAM_NATIVE_ATTRIBS_ARB 0x88AF +#define GL_PROGRAM_ADDRESS_REGISTERS_ARB 0x88B0 +#define GL_MAX_PROGRAM_ADDRESS_REGISTERS_ARB 0x88B1 +#define GL_PROGRAM_NATIVE_ADDRESS_REGISTERS_ARB 0x88B2 +#define GL_MAX_PROGRAM_NATIVE_ADDRESS_REGISTERS_ARB 0x88B3 +#define GL_MAX_PROGRAM_LOCAL_PARAMETERS_ARB 0x88B4 +#define GL_MAX_PROGRAM_ENV_PARAMETERS_ARB 0x88B5 +#define GL_PROGRAM_UNDER_NATIVE_LIMITS_ARB 0x88B6 +#define GL_TRANSPOSE_CURRENT_MATRIX_ARB 0x88B7 +#define GL_MATRIX0_ARB 0x88C0 +#define GL_MATRIX1_ARB 0x88C1 +#define GL_MATRIX2_ARB 0x88C2 +#define GL_MATRIX3_ARB 0x88C3 +#define GL_MATRIX4_ARB 0x88C4 +#define GL_MATRIX5_ARB 0x88C5 +#define GL_MATRIX6_ARB 0x88C6 +#define GL_MATRIX7_ARB 0x88C7 +#define GL_MATRIX8_ARB 0x88C8 +#define GL_MATRIX9_ARB 0x88C9 +#define GL_MATRIX10_ARB 0x88CA +#define GL_MATRIX11_ARB 0x88CB +#define GL_MATRIX12_ARB 0x88CC +#define GL_MATRIX13_ARB 0x88CD +#define GL_MATRIX14_ARB 0x88CE +#define GL_MATRIX15_ARB 0x88CF +#define GL_MATRIX16_ARB 0x88D0 +#define GL_MATRIX17_ARB 0x88D1 +#define GL_MATRIX18_ARB 0x88D2 +#define GL_MATRIX19_ARB 0x88D3 +#define GL_MATRIX20_ARB 0x88D4 +#define GL_MATRIX21_ARB 0x88D5 +#define GL_MATRIX22_ARB 0x88D6 +#define GL_MATRIX23_ARB 0x88D7 +#define GL_MATRIX24_ARB 0x88D8 +#define GL_MATRIX25_ARB 0x88D9 +#define GL_MATRIX26_ARB 0x88DA +#define GL_MATRIX27_ARB 0x88DB +#define GL_MATRIX28_ARB 0x88DC +#define GL_MATRIX29_ARB 0x88DD +#define GL_MATRIX30_ARB 0x88DE +#define GL_MATRIX31_ARB 0x88DF +#endif + +#ifndef GL_ARB_fragment_program +#define GL_FRAGMENT_PROGRAM_ARB 0x8804 +#define GL_PROGRAM_ALU_INSTRUCTIONS_ARB 0x8805 +#define GL_PROGRAM_TEX_INSTRUCTIONS_ARB 0x8806 +#define GL_PROGRAM_TEX_INDIRECTIONS_ARB 0x8807 +#define GL_PROGRAM_NATIVE_ALU_INSTRUCTIONS_ARB 0x8808 +#define GL_PROGRAM_NATIVE_TEX_INSTRUCTIONS_ARB 0x8809 +#define GL_PROGRAM_NATIVE_TEX_INDIRECTIONS_ARB 0x880A +#define GL_MAX_PROGRAM_ALU_INSTRUCTIONS_ARB 0x880B +#define GL_MAX_PROGRAM_TEX_INSTRUCTIONS_ARB 0x880C +#define GL_MAX_PROGRAM_TEX_INDIRECTIONS_ARB 0x880D +#define GL_MAX_PROGRAM_NATIVE_ALU_INSTRUCTIONS_ARB 0x880E +#define GL_MAX_PROGRAM_NATIVE_TEX_INSTRUCTIONS_ARB 0x880F +#define GL_MAX_PROGRAM_NATIVE_TEX_INDIRECTIONS_ARB 0x8810 +#define GL_MAX_TEXTURE_COORDS_ARB 0x8871 +#define GL_MAX_TEXTURE_IMAGE_UNITS_ARB 0x8872 +#endif + +#ifndef GL_ARB_vertex_buffer_object +#define GL_BUFFER_SIZE_ARB 0x8764 +#define GL_BUFFER_USAGE_ARB 0x8765 +#define GL_ARRAY_BUFFER_ARB 0x8892 +#define GL_ELEMENT_ARRAY_BUFFER_ARB 0x8893 +#define GL_ARRAY_BUFFER_BINDING_ARB 0x8894 +#define GL_ELEMENT_ARRAY_BUFFER_BINDING_ARB 0x8895 +#define GL_VERTEX_ARRAY_BUFFER_BINDING_ARB 0x8896 +#define GL_NORMAL_ARRAY_BUFFER_BINDING_ARB 0x8897 +#define GL_COLOR_ARRAY_BUFFER_BINDING_ARB 0x8898 +#define GL_INDEX_ARRAY_BUFFER_BINDING_ARB 0x8899 +#define GL_TEXTURE_COORD_ARRAY_BUFFER_BINDING_ARB 0x889A +#define GL_EDGE_FLAG_ARRAY_BUFFER_BINDING_ARB 0x889B +#define GL_SECONDARY_COLOR_ARRAY_BUFFER_BINDING_ARB 0x889C +#define GL_FOG_COORDINATE_ARRAY_BUFFER_BINDING_ARB 0x889D +#define GL_WEIGHT_ARRAY_BUFFER_BINDING_ARB 0x889E +#define GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB 0x889F +#define GL_READ_ONLY_ARB 0x88B8 +#define GL_WRITE_ONLY_ARB 0x88B9 +#define GL_READ_WRITE_ARB 0x88BA +#define GL_BUFFER_ACCESS_ARB 0x88BB +#define GL_BUFFER_MAPPED_ARB 0x88BC +#define GL_BUFFER_MAP_POINTER_ARB 0x88BD +#define GL_STREAM_DRAW_ARB 0x88E0 +#define GL_STREAM_READ_ARB 0x88E1 +#define GL_STREAM_COPY_ARB 0x88E2 +#define GL_STATIC_DRAW_ARB 0x88E4 +#define GL_STATIC_READ_ARB 0x88E5 +#define GL_STATIC_COPY_ARB 0x88E6 +#define GL_DYNAMIC_DRAW_ARB 0x88E8 +#define GL_DYNAMIC_READ_ARB 0x88E9 +#define GL_DYNAMIC_COPY_ARB 0x88EA +#endif + +#ifndef GL_ARB_occlusion_query +#define GL_QUERY_COUNTER_BITS_ARB 0x8864 +#define GL_CURRENT_QUERY_ARB 0x8865 +#define GL_QUERY_RESULT_ARB 0x8866 +#define GL_QUERY_RESULT_AVAILABLE_ARB 0x8867 +#define GL_SAMPLES_PASSED_ARB 0x8914 +#endif + +#ifndef GL_ARB_shader_objects +#define GL_PROGRAM_OBJECT_ARB 0x8B40 +#define GL_SHADER_OBJECT_ARB 0x8B48 +#define GL_OBJECT_TYPE_ARB 0x8B4E +#define GL_OBJECT_SUBTYPE_ARB 0x8B4F +#define GL_FLOAT_VEC2_ARB 0x8B50 +#define GL_FLOAT_VEC3_ARB 0x8B51 +#define GL_FLOAT_VEC4_ARB 0x8B52 +#define GL_INT_VEC2_ARB 0x8B53 +#define GL_INT_VEC3_ARB 0x8B54 +#define GL_INT_VEC4_ARB 0x8B55 +#define GL_BOOL_ARB 0x8B56 +#define GL_BOOL_VEC2_ARB 0x8B57 +#define GL_BOOL_VEC3_ARB 0x8B58 +#define GL_BOOL_VEC4_ARB 0x8B59 +#define GL_FLOAT_MAT2_ARB 0x8B5A +#define GL_FLOAT_MAT3_ARB 0x8B5B +#define GL_FLOAT_MAT4_ARB 0x8B5C +#define GL_SAMPLER_1D_ARB 0x8B5D +#define GL_SAMPLER_2D_ARB 0x8B5E +#define GL_SAMPLER_3D_ARB 0x8B5F +#define GL_SAMPLER_CUBE_ARB 0x8B60 +#define GL_SAMPLER_1D_SHADOW_ARB 0x8B61 +#define GL_SAMPLER_2D_SHADOW_ARB 0x8B62 +#define GL_SAMPLER_2D_RECT_ARB 0x8B63 +#define GL_SAMPLER_2D_RECT_SHADOW_ARB 0x8B64 +#define GL_OBJECT_DELETE_STATUS_ARB 0x8B80 +#define GL_OBJECT_COMPILE_STATUS_ARB 0x8B81 +#define GL_OBJECT_LINK_STATUS_ARB 0x8B82 +#define GL_OBJECT_VALIDATE_STATUS_ARB 0x8B83 +#define GL_OBJECT_INFO_LOG_LENGTH_ARB 0x8B84 +#define GL_OBJECT_ATTACHED_OBJECTS_ARB 0x8B85 +#define GL_OBJECT_ACTIVE_UNIFORMS_ARB 0x8B86 +#define GL_OBJECT_ACTIVE_UNIFORM_MAX_LENGTH_ARB 0x8B87 +#define GL_OBJECT_SHADER_SOURCE_LENGTH_ARB 0x8B88 +#endif + +#ifndef GL_ARB_vertex_shader +#define GL_VERTEX_SHADER_ARB 0x8B31 +#define GL_MAX_VERTEX_UNIFORM_COMPONENTS_ARB 0x8B4A +#define GL_MAX_VARYING_FLOATS_ARB 0x8B4B +#define GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS_ARB 0x8B4C +#define GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS_ARB 0x8B4D +#define GL_OBJECT_ACTIVE_ATTRIBUTES_ARB 0x8B89 +#define GL_OBJECT_ACTIVE_ATTRIBUTE_MAX_LENGTH_ARB 0x8B8A +#endif + +#ifndef GL_ARB_fragment_shader +#define GL_FRAGMENT_SHADER_ARB 0x8B30 +#define GL_MAX_FRAGMENT_UNIFORM_COMPONENTS_ARB 0x8B49 +#define GL_FRAGMENT_SHADER_DERIVATIVE_HINT_ARB 0x8B8B +#endif + +#ifndef GL_ARB_shading_language_100 +#define GL_SHADING_LANGUAGE_VERSION_ARB 0x8B8C +#endif + +#ifndef GL_ARB_texture_non_power_of_two +#endif + +#ifndef GL_ARB_point_sprite +#define GL_POINT_SPRITE_ARB 0x8861 +#define GL_COORD_REPLACE_ARB 0x8862 +#endif + +#ifndef GL_ARB_fragment_program_shadow +#endif + +#ifndef GL_ARB_draw_buffers +#define GL_MAX_DRAW_BUFFERS_ARB 0x8824 +#define GL_DRAW_BUFFER0_ARB 0x8825 +#define GL_DRAW_BUFFER1_ARB 0x8826 +#define GL_DRAW_BUFFER2_ARB 0x8827 +#define GL_DRAW_BUFFER3_ARB 0x8828 +#define GL_DRAW_BUFFER4_ARB 0x8829 +#define GL_DRAW_BUFFER5_ARB 0x882A +#define GL_DRAW_BUFFER6_ARB 0x882B +#define GL_DRAW_BUFFER7_ARB 0x882C +#define GL_DRAW_BUFFER8_ARB 0x882D +#define GL_DRAW_BUFFER9_ARB 0x882E +#define GL_DRAW_BUFFER10_ARB 0x882F +#define GL_DRAW_BUFFER11_ARB 0x8830 +#define GL_DRAW_BUFFER12_ARB 0x8831 +#define GL_DRAW_BUFFER13_ARB 0x8832 +#define GL_DRAW_BUFFER14_ARB 0x8833 +#define GL_DRAW_BUFFER15_ARB 0x8834 +#endif + +#ifndef GL_ARB_texture_rectangle +#define GL_TEXTURE_RECTANGLE_ARB 0x84F5 +#define GL_TEXTURE_BINDING_RECTANGLE_ARB 0x84F6 +#define GL_PROXY_TEXTURE_RECTANGLE_ARB 0x84F7 +#define GL_MAX_RECTANGLE_TEXTURE_SIZE_ARB 0x84F8 +#endif + +#ifndef GL_ARB_color_buffer_float +#define GL_RGBA_FLOAT_MODE_ARB 0x8820 +#define GL_CLAMP_VERTEX_COLOR_ARB 0x891A +#define GL_CLAMP_FRAGMENT_COLOR_ARB 0x891B +#define GL_CLAMP_READ_COLOR_ARB 0x891C +#define GL_FIXED_ONLY_ARB 0x891D +#endif + +#ifndef GL_ARB_half_float_pixel +#define GL_HALF_FLOAT_ARB 0x140B +#endif + +#ifndef GL_ARB_texture_float +#define GL_TEXTURE_RED_TYPE_ARB 0x8C10 +#define GL_TEXTURE_GREEN_TYPE_ARB 0x8C11 +#define GL_TEXTURE_BLUE_TYPE_ARB 0x8C12 +#define GL_TEXTURE_ALPHA_TYPE_ARB 0x8C13 +#define GL_TEXTURE_LUMINANCE_TYPE_ARB 0x8C14 +#define GL_TEXTURE_INTENSITY_TYPE_ARB 0x8C15 +#define GL_TEXTURE_DEPTH_TYPE_ARB 0x8C16 +#define GL_UNSIGNED_NORMALIZED_ARB 0x8C17 +#define GL_RGBA32F_ARB 0x8814 +#define GL_RGB32F_ARB 0x8815 +#define GL_ALPHA32F_ARB 0x8816 +#define GL_INTENSITY32F_ARB 0x8817 +#define GL_LUMINANCE32F_ARB 0x8818 +#define GL_LUMINANCE_ALPHA32F_ARB 0x8819 +#define GL_RGBA16F_ARB 0x881A +#define GL_RGB16F_ARB 0x881B +#define GL_ALPHA16F_ARB 0x881C +#define GL_INTENSITY16F_ARB 0x881D +#define GL_LUMINANCE16F_ARB 0x881E +#define GL_LUMINANCE_ALPHA16F_ARB 0x881F +#endif + +#ifndef GL_ARB_pixel_buffer_object +#define GL_PIXEL_PACK_BUFFER_ARB 0x88EB +#define GL_PIXEL_UNPACK_BUFFER_ARB 0x88EC +#define GL_PIXEL_PACK_BUFFER_BINDING_ARB 0x88ED +#define GL_PIXEL_UNPACK_BUFFER_BINDING_ARB 0x88EF +#endif + +#ifndef GL_ARB_depth_buffer_float +#define GL_DEPTH_COMPONENT32F 0x8CAC +#define GL_DEPTH32F_STENCIL8 0x8CAD +#define GL_FLOAT_32_UNSIGNED_INT_24_8_REV 0x8DAD +#endif + +#ifndef GL_ARB_draw_instanced +#endif + +#ifndef GL_ARB_framebuffer_object +#define GL_INVALID_FRAMEBUFFER_OPERATION 0x0506 +#define GL_FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING 0x8210 +#define GL_FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE 0x8211 +#define GL_FRAMEBUFFER_ATTACHMENT_RED_SIZE 0x8212 +#define GL_FRAMEBUFFER_ATTACHMENT_GREEN_SIZE 0x8213 +#define GL_FRAMEBUFFER_ATTACHMENT_BLUE_SIZE 0x8214 +#define GL_FRAMEBUFFER_ATTACHMENT_ALPHA_SIZE 0x8215 +#define GL_FRAMEBUFFER_ATTACHMENT_DEPTH_SIZE 0x8216 +#define GL_FRAMEBUFFER_ATTACHMENT_STENCIL_SIZE 0x8217 +#define GL_FRAMEBUFFER_DEFAULT 0x8218 +#define GL_FRAMEBUFFER_UNDEFINED 0x8219 +#define GL_DEPTH_STENCIL_ATTACHMENT 0x821A +#define GL_MAX_RENDERBUFFER_SIZE 0x84E8 +#define GL_DEPTH_STENCIL 0x84F9 +#define GL_UNSIGNED_INT_24_8 0x84FA +#define GL_DEPTH24_STENCIL8 0x88F0 +#define GL_TEXTURE_STENCIL_SIZE 0x88F1 +#define GL_TEXTURE_RED_TYPE 0x8C10 +#define GL_TEXTURE_GREEN_TYPE 0x8C11 +#define GL_TEXTURE_BLUE_TYPE 0x8C12 +#define GL_TEXTURE_ALPHA_TYPE 0x8C13 +#define GL_TEXTURE_DEPTH_TYPE 0x8C16 +#define GL_UNSIGNED_NORMALIZED 0x8C17 +#define GL_FRAMEBUFFER_BINDING 0x8CA6 +#define GL_DRAW_FRAMEBUFFER_BINDING GL_FRAMEBUFFER_BINDING +#define GL_RENDERBUFFER_BINDING 0x8CA7 +#define GL_READ_FRAMEBUFFER 0x8CA8 +#define GL_DRAW_FRAMEBUFFER 0x8CA9 +#define GL_READ_FRAMEBUFFER_BINDING 0x8CAA +#define GL_RENDERBUFFER_SAMPLES 0x8CAB +#define GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE 0x8CD0 +#define GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME 0x8CD1 +#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL 0x8CD2 +#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE 0x8CD3 +#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER 0x8CD4 +#define GL_FRAMEBUFFER_COMPLETE 0x8CD5 +#define GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT 0x8CD6 +#define GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT 0x8CD7 +#define GL_FRAMEBUFFER_INCOMPLETE_DRAW_BUFFER 0x8CDB +#define GL_FRAMEBUFFER_INCOMPLETE_READ_BUFFER 0x8CDC +#define GL_FRAMEBUFFER_UNSUPPORTED 0x8CDD +#define GL_MAX_COLOR_ATTACHMENTS 0x8CDF +#define GL_COLOR_ATTACHMENT0 0x8CE0 +#define GL_COLOR_ATTACHMENT1 0x8CE1 +#define GL_COLOR_ATTACHMENT2 0x8CE2 +#define GL_COLOR_ATTACHMENT3 0x8CE3 +#define GL_COLOR_ATTACHMENT4 0x8CE4 +#define GL_COLOR_ATTACHMENT5 0x8CE5 +#define GL_COLOR_ATTACHMENT6 0x8CE6 +#define GL_COLOR_ATTACHMENT7 0x8CE7 +#define GL_COLOR_ATTACHMENT8 0x8CE8 +#define GL_COLOR_ATTACHMENT9 0x8CE9 +#define GL_COLOR_ATTACHMENT10 0x8CEA +#define GL_COLOR_ATTACHMENT11 0x8CEB +#define GL_COLOR_ATTACHMENT12 0x8CEC +#define GL_COLOR_ATTACHMENT13 0x8CED +#define GL_COLOR_ATTACHMENT14 0x8CEE +#define GL_COLOR_ATTACHMENT15 0x8CEF +#define GL_DEPTH_ATTACHMENT 0x8D00 +#define GL_STENCIL_ATTACHMENT 0x8D20 +#define GL_FRAMEBUFFER 0x8D40 +#define GL_RENDERBUFFER 0x8D41 +#define GL_RENDERBUFFER_WIDTH 0x8D42 +#define GL_RENDERBUFFER_HEIGHT 0x8D43 +#define GL_RENDERBUFFER_INTERNAL_FORMAT 0x8D44 +#define GL_STENCIL_INDEX1 0x8D46 +#define GL_STENCIL_INDEX4 0x8D47 +#define GL_STENCIL_INDEX8 0x8D48 +#define GL_STENCIL_INDEX16 0x8D49 +#define GL_RENDERBUFFER_RED_SIZE 0x8D50 +#define GL_RENDERBUFFER_GREEN_SIZE 0x8D51 +#define GL_RENDERBUFFER_BLUE_SIZE 0x8D52 +#define GL_RENDERBUFFER_ALPHA_SIZE 0x8D53 +#define GL_RENDERBUFFER_DEPTH_SIZE 0x8D54 +#define GL_RENDERBUFFER_STENCIL_SIZE 0x8D55 +#define GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE 0x8D56 +#define GL_MAX_SAMPLES 0x8D57 +#define GL_INDEX 0x8222 +#define GL_TEXTURE_LUMINANCE_TYPE 0x8C14 +#define GL_TEXTURE_INTENSITY_TYPE 0x8C15 +#endif + +#ifndef GL_ARB_framebuffer_sRGB +#define GL_FRAMEBUFFER_SRGB 0x8DB9 +#endif + +#ifndef GL_ARB_geometry_shader4 +#define GL_LINES_ADJACENCY_ARB 0x000A +#define GL_LINE_STRIP_ADJACENCY_ARB 0x000B +#define GL_TRIANGLES_ADJACENCY_ARB 0x000C +#define GL_TRIANGLE_STRIP_ADJACENCY_ARB 0x000D +#define GL_PROGRAM_POINT_SIZE_ARB 0x8642 +#define GL_MAX_GEOMETRY_TEXTURE_IMAGE_UNITS_ARB 0x8C29 +#define GL_FRAMEBUFFER_ATTACHMENT_LAYERED_ARB 0x8DA7 +#define GL_FRAMEBUFFER_INCOMPLETE_LAYER_TARGETS_ARB 0x8DA8 +#define GL_FRAMEBUFFER_INCOMPLETE_LAYER_COUNT_ARB 0x8DA9 +#define GL_GEOMETRY_SHADER_ARB 0x8DD9 +#define GL_GEOMETRY_VERTICES_OUT_ARB 0x8DDA +#define GL_GEOMETRY_INPUT_TYPE_ARB 0x8DDB +#define GL_GEOMETRY_OUTPUT_TYPE_ARB 0x8DDC +#define GL_MAX_GEOMETRY_VARYING_COMPONENTS_ARB 0x8DDD +#define GL_MAX_VERTEX_VARYING_COMPONENTS_ARB 0x8DDE +#define GL_MAX_GEOMETRY_UNIFORM_COMPONENTS_ARB 0x8DDF +#define GL_MAX_GEOMETRY_OUTPUT_VERTICES_ARB 0x8DE0 +#define GL_MAX_GEOMETRY_TOTAL_OUTPUT_COMPONENTS_ARB 0x8DE1 +/* reuse GL_MAX_VARYING_COMPONENTS */ +/* reuse GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER */ +#endif + +#ifndef GL_ARB_half_float_vertex +#define GL_HALF_FLOAT 0x140B +#endif + +#ifndef GL_ARB_instanced_arrays +#define GL_VERTEX_ATTRIB_ARRAY_DIVISOR_ARB 0x88FE +#endif + +#ifndef GL_ARB_map_buffer_range +#define GL_MAP_READ_BIT 0x0001 +#define GL_MAP_WRITE_BIT 0x0002 +#define GL_MAP_INVALIDATE_RANGE_BIT 0x0004 +#define GL_MAP_INVALIDATE_BUFFER_BIT 0x0008 +#define GL_MAP_FLUSH_EXPLICIT_BIT 0x0010 +#define GL_MAP_UNSYNCHRONIZED_BIT 0x0020 +#endif + +#ifndef GL_ARB_texture_buffer_object +#define GL_TEXTURE_BUFFER_ARB 0x8C2A +#define GL_MAX_TEXTURE_BUFFER_SIZE_ARB 0x8C2B +#define GL_TEXTURE_BINDING_BUFFER_ARB 0x8C2C +#define GL_TEXTURE_BUFFER_DATA_STORE_BINDING_ARB 0x8C2D +#define GL_TEXTURE_BUFFER_FORMAT_ARB 0x8C2E +#endif + +#ifndef GL_ARB_texture_compression_rgtc +#define GL_COMPRESSED_RED_RGTC1 0x8DBB +#define GL_COMPRESSED_SIGNED_RED_RGTC1 0x8DBC +#define GL_COMPRESSED_RG_RGTC2 0x8DBD +#define GL_COMPRESSED_SIGNED_RG_RGTC2 0x8DBE +#endif + +#ifndef GL_ARB_texture_rg +#define GL_RG 0x8227 +#define GL_RG_INTEGER 0x8228 +#define GL_R8 0x8229 +#define GL_R16 0x822A +#define GL_RG8 0x822B +#define GL_RG16 0x822C +#define GL_R16F 0x822D +#define GL_R32F 0x822E +#define GL_RG16F 0x822F +#define GL_RG32F 0x8230 +#define GL_R8I 0x8231 +#define GL_R8UI 0x8232 +#define GL_R16I 0x8233 +#define GL_R16UI 0x8234 +#define GL_R32I 0x8235 +#define GL_R32UI 0x8236 +#define GL_RG8I 0x8237 +#define GL_RG8UI 0x8238 +#define GL_RG16I 0x8239 +#define GL_RG16UI 0x823A +#define GL_RG32I 0x823B +#define GL_RG32UI 0x823C +#endif + +#ifndef GL_ARB_vertex_array_object +#define GL_VERTEX_ARRAY_BINDING 0x85B5 +#endif + +#ifndef GL_ARB_uniform_buffer_object +#define GL_UNIFORM_BUFFER 0x8A11 +#define GL_UNIFORM_BUFFER_BINDING 0x8A28 +#define GL_UNIFORM_BUFFER_START 0x8A29 +#define GL_UNIFORM_BUFFER_SIZE 0x8A2A +#define GL_MAX_VERTEX_UNIFORM_BLOCKS 0x8A2B +#define GL_MAX_GEOMETRY_UNIFORM_BLOCKS 0x8A2C +#define GL_MAX_FRAGMENT_UNIFORM_BLOCKS 0x8A2D +#define GL_MAX_COMBINED_UNIFORM_BLOCKS 0x8A2E +#define GL_MAX_UNIFORM_BUFFER_BINDINGS 0x8A2F +#define GL_MAX_UNIFORM_BLOCK_SIZE 0x8A30 +#define GL_MAX_COMBINED_VERTEX_UNIFORM_COMPONENTS 0x8A31 +#define GL_MAX_COMBINED_GEOMETRY_UNIFORM_COMPONENTS 0x8A32 +#define GL_MAX_COMBINED_FRAGMENT_UNIFORM_COMPONENTS 0x8A33 +#define GL_UNIFORM_BUFFER_OFFSET_ALIGNMENT 0x8A34 +#define GL_ACTIVE_UNIFORM_BLOCK_MAX_NAME_LENGTH 0x8A35 +#define GL_ACTIVE_UNIFORM_BLOCKS 0x8A36 +#define GL_UNIFORM_TYPE 0x8A37 +#define GL_UNIFORM_SIZE 0x8A38 +#define GL_UNIFORM_NAME_LENGTH 0x8A39 +#define GL_UNIFORM_BLOCK_INDEX 0x8A3A +#define GL_UNIFORM_OFFSET 0x8A3B +#define GL_UNIFORM_ARRAY_STRIDE 0x8A3C +#define GL_UNIFORM_MATRIX_STRIDE 0x8A3D +#define GL_UNIFORM_IS_ROW_MAJOR 0x8A3E +#define GL_UNIFORM_BLOCK_BINDING 0x8A3F +#define GL_UNIFORM_BLOCK_DATA_SIZE 0x8A40 +#define GL_UNIFORM_BLOCK_NAME_LENGTH 0x8A41 +#define GL_UNIFORM_BLOCK_ACTIVE_UNIFORMS 0x8A42 +#define GL_UNIFORM_BLOCK_ACTIVE_UNIFORM_INDICES 0x8A43 +#define GL_UNIFORM_BLOCK_REFERENCED_BY_VERTEX_SHADER 0x8A44 +#define GL_UNIFORM_BLOCK_REFERENCED_BY_GEOMETRY_SHADER 0x8A45 +#define GL_UNIFORM_BLOCK_REFERENCED_BY_FRAGMENT_SHADER 0x8A46 +#define GL_INVALID_INDEX 0xFFFFFFFFu +#endif + +#ifndef GL_ARB_compatibility +/* ARB_compatibility just defines tokens from core 3.0 */ +#endif + +#ifndef GL_ARB_copy_buffer +#define GL_COPY_READ_BUFFER_BINDING 0x8F36 +#define GL_COPY_READ_BUFFER GL_COPY_READ_BUFFER_BINDING +#define GL_COPY_WRITE_BUFFER_BINDING 0x8F37 +#define GL_COPY_WRITE_BUFFER GL_COPY_WRITE_BUFFER_BINDING +#endif + +#ifndef GL_ARB_shader_texture_lod +#endif + +#ifndef GL_ARB_depth_clamp +#define GL_DEPTH_CLAMP 0x864F +#endif + +#ifndef GL_ARB_draw_elements_base_vertex +#endif + +#ifndef GL_ARB_fragment_coord_conventions +#endif + +#ifndef GL_ARB_provoking_vertex +#define GL_QUADS_FOLLOW_PROVOKING_VERTEX_CONVENTION 0x8E4C +#define GL_FIRST_VERTEX_CONVENTION 0x8E4D +#define GL_LAST_VERTEX_CONVENTION 0x8E4E +#define GL_PROVOKING_VERTEX 0x8E4F +#endif + +#ifndef GL_ARB_seamless_cube_map +#define GL_TEXTURE_CUBE_MAP_SEAMLESS 0x884F +#endif + +#ifndef GL_ARB_sync +#define GL_MAX_SERVER_WAIT_TIMEOUT 0x9111 +#define GL_OBJECT_TYPE 0x9112 +#define GL_SYNC_CONDITION 0x9113 +#define GL_SYNC_STATUS 0x9114 +#define GL_SYNC_FLAGS 0x9115 +#define GL_SYNC_FENCE 0x9116 +#define GL_SYNC_GPU_COMMANDS_COMPLETE 0x9117 +#define GL_UNSIGNALED 0x9118 +#define GL_SIGNALED 0x9119 +#define GL_ALREADY_SIGNALED 0x911A +#define GL_TIMEOUT_EXPIRED 0x911B +#define GL_CONDITION_SATISFIED 0x911C +#define GL_WAIT_FAILED 0x911D +#define GL_SYNC_FLUSH_COMMANDS_BIT 0x00000001 +#define GL_TIMEOUT_IGNORED 0xFFFFFFFFFFFFFFFFull +#endif + +#ifndef GL_ARB_texture_multisample +#define GL_SAMPLE_POSITION 0x8E50 +#define GL_SAMPLE_MASK 0x8E51 +#define GL_SAMPLE_MASK_VALUE 0x8E52 +#define GL_MAX_SAMPLE_MASK_WORDS 0x8E59 +#define GL_TEXTURE_2D_MULTISAMPLE 0x9100 +#define GL_PROXY_TEXTURE_2D_MULTISAMPLE 0x9101 +#define GL_TEXTURE_2D_MULTISAMPLE_ARRAY 0x9102 +#define GL_PROXY_TEXTURE_2D_MULTISAMPLE_ARRAY 0x9103 +#define GL_TEXTURE_BINDING_2D_MULTISAMPLE 0x9104 +#define GL_TEXTURE_BINDING_2D_MULTISAMPLE_ARRAY 0x9105 +#define GL_TEXTURE_SAMPLES 0x9106 +#define GL_TEXTURE_FIXED_SAMPLE_LOCATIONS 0x9107 +#define GL_SAMPLER_2D_MULTISAMPLE 0x9108 +#define GL_INT_SAMPLER_2D_MULTISAMPLE 0x9109 +#define GL_UNSIGNED_INT_SAMPLER_2D_MULTISAMPLE 0x910A +#define GL_SAMPLER_2D_MULTISAMPLE_ARRAY 0x910B +#define GL_INT_SAMPLER_2D_MULTISAMPLE_ARRAY 0x910C +#define GL_UNSIGNED_INT_SAMPLER_2D_MULTISAMPLE_ARRAY 0x910D +#define GL_MAX_COLOR_TEXTURE_SAMPLES 0x910E +#define GL_MAX_DEPTH_TEXTURE_SAMPLES 0x910F +#define GL_MAX_INTEGER_SAMPLES 0x9110 +#endif + +#ifndef GL_ARB_vertex_array_bgra +/* reuse GL_BGRA */ +#endif + +#ifndef GL_ARB_draw_buffers_blend +#endif + +#ifndef GL_ARB_sample_shading +#define GL_SAMPLE_SHADING_ARB 0x8C36 +#define GL_MIN_SAMPLE_SHADING_VALUE_ARB 0x8C37 +#endif + +#ifndef GL_ARB_texture_cube_map_array +#define GL_TEXTURE_CUBE_MAP_ARRAY_ARB 0x9009 +#define GL_TEXTURE_BINDING_CUBE_MAP_ARRAY_ARB 0x900A +#define GL_PROXY_TEXTURE_CUBE_MAP_ARRAY_ARB 0x900B +#define GL_SAMPLER_CUBE_MAP_ARRAY_ARB 0x900C +#define GL_SAMPLER_CUBE_MAP_ARRAY_SHADOW_ARB 0x900D +#define GL_INT_SAMPLER_CUBE_MAP_ARRAY_ARB 0x900E +#define GL_UNSIGNED_INT_SAMPLER_CUBE_MAP_ARRAY_ARB 0x900F +#endif + +#ifndef GL_ARB_texture_gather +#define GL_MIN_PROGRAM_TEXTURE_GATHER_OFFSET_ARB 0x8E5E +#define GL_MAX_PROGRAM_TEXTURE_GATHER_OFFSET_ARB 0x8E5F +#define GL_MAX_PROGRAM_TEXTURE_GATHER_COMPONENTS_ARB 0x8F9F +#endif + +#ifndef GL_ARB_texture_query_lod +#endif + +#ifndef GL_ARB_shading_language_include +#define GL_SHADER_INCLUDE_ARB 0x8DAE +#define GL_NAMED_STRING_LENGTH_ARB 0x8DE9 +#define GL_NAMED_STRING_TYPE_ARB 0x8DEA +#endif + +#ifndef GL_ARB_texture_compression_bptc +#define GL_COMPRESSED_RGBA_BPTC_UNORM_ARB 0x8E8C +#define GL_COMPRESSED_SRGB_ALPHA_BPTC_UNORM_ARB 0x8E8D +#define GL_COMPRESSED_RGB_BPTC_SIGNED_FLOAT_ARB 0x8E8E +#define GL_COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT_ARB 0x8E8F +#endif + +#ifndef GL_ARB_blend_func_extended +#define GL_SRC1_COLOR 0x88F9 +/* reuse GL_SRC1_ALPHA */ +#define GL_ONE_MINUS_SRC1_COLOR 0x88FA +#define GL_ONE_MINUS_SRC1_ALPHA 0x88FB +#define GL_MAX_DUAL_SOURCE_DRAW_BUFFERS 0x88FC +#endif + +#ifndef GL_ARB_explicit_attrib_location +#endif + +#ifndef GL_ARB_occlusion_query2 +#define GL_ANY_SAMPLES_PASSED 0x8C2F +#endif + +#ifndef GL_ARB_sampler_objects +#define GL_SAMPLER_BINDING 0x8919 +#endif + +#ifndef GL_ARB_shader_bit_encoding +#endif + +#ifndef GL_ARB_texture_rgb10_a2ui +#define GL_RGB10_A2UI 0x906F +#endif + +#ifndef GL_ARB_texture_swizzle +#define GL_TEXTURE_SWIZZLE_R 0x8E42 +#define GL_TEXTURE_SWIZZLE_G 0x8E43 +#define GL_TEXTURE_SWIZZLE_B 0x8E44 +#define GL_TEXTURE_SWIZZLE_A 0x8E45 +#define GL_TEXTURE_SWIZZLE_RGBA 0x8E46 +#endif + +#ifndef GL_ARB_timer_query +#define GL_TIME_ELAPSED 0x88BF +#define GL_TIMESTAMP 0x8E28 +#endif + +#ifndef GL_ARB_vertex_type_2_10_10_10_rev +/* reuse GL_UNSIGNED_INT_2_10_10_10_REV */ +#define GL_INT_2_10_10_10_REV 0x8D9F +#endif + +#ifndef GL_ARB_draw_indirect +#define GL_DRAW_INDIRECT_BUFFER 0x8F3F +#define GL_DRAW_INDIRECT_BUFFER_BINDING 0x8F43 +#endif + +#ifndef GL_ARB_gpu_shader5 +#define GL_GEOMETRY_SHADER_INVOCATIONS 0x887F +#define GL_MAX_GEOMETRY_SHADER_INVOCATIONS 0x8E5A +#define GL_MIN_FRAGMENT_INTERPOLATION_OFFSET 0x8E5B +#define GL_MAX_FRAGMENT_INTERPOLATION_OFFSET 0x8E5C +#define GL_FRAGMENT_INTERPOLATION_OFFSET_BITS 0x8E5D +/* reuse GL_MAX_VERTEX_STREAMS */ +#endif + +#ifndef GL_ARB_gpu_shader_fp64 +/* reuse GL_DOUBLE */ +#define GL_DOUBLE_VEC2 0x8FFC +#define GL_DOUBLE_VEC3 0x8FFD +#define GL_DOUBLE_VEC4 0x8FFE +#define GL_DOUBLE_MAT2 0x8F46 +#define GL_DOUBLE_MAT3 0x8F47 +#define GL_DOUBLE_MAT4 0x8F48 +#define GL_DOUBLE_MAT2x3 0x8F49 +#define GL_DOUBLE_MAT2x4 0x8F4A +#define GL_DOUBLE_MAT3x2 0x8F4B +#define GL_DOUBLE_MAT3x4 0x8F4C +#define GL_DOUBLE_MAT4x2 0x8F4D +#define GL_DOUBLE_MAT4x3 0x8F4E +#endif + +#ifndef GL_ARB_shader_subroutine +#define GL_ACTIVE_SUBROUTINES 0x8DE5 +#define GL_ACTIVE_SUBROUTINE_UNIFORMS 0x8DE6 +#define GL_ACTIVE_SUBROUTINE_UNIFORM_LOCATIONS 0x8E47 +#define GL_ACTIVE_SUBROUTINE_MAX_LENGTH 0x8E48 +#define GL_ACTIVE_SUBROUTINE_UNIFORM_MAX_LENGTH 0x8E49 +#define GL_MAX_SUBROUTINES 0x8DE7 +#define GL_MAX_SUBROUTINE_UNIFORM_LOCATIONS 0x8DE8 +#define GL_NUM_COMPATIBLE_SUBROUTINES 0x8E4A +#define GL_COMPATIBLE_SUBROUTINES 0x8E4B +/* reuse GL_UNIFORM_SIZE */ +/* reuse GL_UNIFORM_NAME_LENGTH */ +#endif + +#ifndef GL_ARB_tessellation_shader +#define GL_PATCHES 0x000E +#define GL_PATCH_VERTICES 0x8E72 +#define GL_PATCH_DEFAULT_INNER_LEVEL 0x8E73 +#define GL_PATCH_DEFAULT_OUTER_LEVEL 0x8E74 +#define GL_TESS_CONTROL_OUTPUT_VERTICES 0x8E75 +#define GL_TESS_GEN_MODE 0x8E76 +#define GL_TESS_GEN_SPACING 0x8E77 +#define GL_TESS_GEN_VERTEX_ORDER 0x8E78 +#define GL_TESS_GEN_POINT_MODE 0x8E79 +/* reuse GL_TRIANGLES */ +/* reuse GL_QUADS */ +#define GL_ISOLINES 0x8E7A +/* reuse GL_EQUAL */ +#define GL_FRACTIONAL_ODD 0x8E7B +#define GL_FRACTIONAL_EVEN 0x8E7C +/* reuse GL_CCW */ +/* reuse GL_CW */ +#define GL_MAX_PATCH_VERTICES 0x8E7D +#define GL_MAX_TESS_GEN_LEVEL 0x8E7E +#define GL_MAX_TESS_CONTROL_UNIFORM_COMPONENTS 0x8E7F +#define GL_MAX_TESS_EVALUATION_UNIFORM_COMPONENTS 0x8E80 +#define GL_MAX_TESS_CONTROL_TEXTURE_IMAGE_UNITS 0x8E81 +#define GL_MAX_TESS_EVALUATION_TEXTURE_IMAGE_UNITS 0x8E82 +#define GL_MAX_TESS_CONTROL_OUTPUT_COMPONENTS 0x8E83 +#define GL_MAX_TESS_PATCH_COMPONENTS 0x8E84 +#define GL_MAX_TESS_CONTROL_TOTAL_OUTPUT_COMPONENTS 0x8E85 +#define GL_MAX_TESS_EVALUATION_OUTPUT_COMPONENTS 0x8E86 +#define GL_MAX_TESS_CONTROL_UNIFORM_BLOCKS 0x8E89 +#define GL_MAX_TESS_EVALUATION_UNIFORM_BLOCKS 0x8E8A +#define GL_MAX_TESS_CONTROL_INPUT_COMPONENTS 0x886C +#define GL_MAX_TESS_EVALUATION_INPUT_COMPONENTS 0x886D +#define GL_MAX_COMBINED_TESS_CONTROL_UNIFORM_COMPONENTS 0x8E1E +#define GL_MAX_COMBINED_TESS_EVALUATION_UNIFORM_COMPONENTS 0x8E1F +#define GL_UNIFORM_BLOCK_REFERENCED_BY_TESS_CONTROL_SHADER 0x84F0 +#define GL_UNIFORM_BLOCK_REFERENCED_BY_TESS_EVALUATION_SHADER 0x84F1 +#define GL_TESS_EVALUATION_SHADER 0x8E87 +#define GL_TESS_CONTROL_SHADER 0x8E88 +#endif + +#ifndef GL_ARB_texture_buffer_object_rgb32 +/* reuse GL_RGB32F */ +/* reuse GL_RGB32UI */ +/* reuse GL_RGB32I */ +#endif + +#ifndef GL_ARB_transform_feedback2 +#define GL_TRANSFORM_FEEDBACK 0x8E22 +#define GL_TRANSFORM_FEEDBACK_PAUSED 0x8E23 +#define GL_TRANSFORM_FEEDBACK_BUFFER_PAUSED GL_TRANSFORM_FEEDBACK_PAUSED +#define GL_TRANSFORM_FEEDBACK_ACTIVE 0x8E24 +#define GL_TRANSFORM_FEEDBACK_BUFFER_ACTIVE GL_TRANSFORM_FEEDBACK_ACTIVE +#define GL_TRANSFORM_FEEDBACK_BINDING 0x8E25 +#endif + +#ifndef GL_ARB_transform_feedback3 +#define GL_MAX_TRANSFORM_FEEDBACK_BUFFERS 0x8E70 +#define GL_MAX_VERTEX_STREAMS 0x8E71 +#endif + +#ifndef GL_ARB_ES2_compatibility +#define GL_FIXED 0x140C +#define GL_IMPLEMENTATION_COLOR_READ_TYPE 0x8B9A +#define GL_IMPLEMENTATION_COLOR_READ_FORMAT 0x8B9B +#define GL_LOW_FLOAT 0x8DF0 +#define GL_MEDIUM_FLOAT 0x8DF1 +#define GL_HIGH_FLOAT 0x8DF2 +#define GL_LOW_INT 0x8DF3 +#define GL_MEDIUM_INT 0x8DF4 +#define GL_HIGH_INT 0x8DF5 +#define GL_SHADER_COMPILER 0x8DFA +#define GL_SHADER_BINARY_FORMATS 0x8DF8 +#define GL_NUM_SHADER_BINARY_FORMATS 0x8DF9 +#define GL_MAX_VERTEX_UNIFORM_VECTORS 0x8DFB +#define GL_MAX_VARYING_VECTORS 0x8DFC +#define GL_MAX_FRAGMENT_UNIFORM_VECTORS 0x8DFD +#define GL_RGB565 0x8D62 +#endif + +#ifndef GL_ARB_get_program_binary +#define GL_PROGRAM_BINARY_RETRIEVABLE_HINT 0x8257 +#define GL_PROGRAM_BINARY_LENGTH 0x8741 +#define GL_NUM_PROGRAM_BINARY_FORMATS 0x87FE +#define GL_PROGRAM_BINARY_FORMATS 0x87FF +#endif + +#ifndef GL_ARB_separate_shader_objects +#define GL_VERTEX_SHADER_BIT 0x00000001 +#define GL_FRAGMENT_SHADER_BIT 0x00000002 +#define GL_GEOMETRY_SHADER_BIT 0x00000004 +#define GL_TESS_CONTROL_SHADER_BIT 0x00000008 +#define GL_TESS_EVALUATION_SHADER_BIT 0x00000010 +#define GL_ALL_SHADER_BITS 0xFFFFFFFF +#define GL_PROGRAM_SEPARABLE 0x8258 +#define GL_ACTIVE_PROGRAM 0x8259 +#define GL_PROGRAM_PIPELINE_BINDING 0x825A +#endif + +#ifndef GL_ARB_shader_precision +#endif + +#ifndef GL_ARB_vertex_attrib_64bit +/* reuse GL_RGB32I */ +/* reuse GL_DOUBLE_VEC2 */ +/* reuse GL_DOUBLE_VEC3 */ +/* reuse GL_DOUBLE_VEC4 */ +/* reuse GL_DOUBLE_MAT2 */ +/* reuse GL_DOUBLE_MAT3 */ +/* reuse GL_DOUBLE_MAT4 */ +/* reuse GL_DOUBLE_MAT2x3 */ +/* reuse GL_DOUBLE_MAT2x4 */ +/* reuse GL_DOUBLE_MAT3x2 */ +/* reuse GL_DOUBLE_MAT3x4 */ +/* reuse GL_DOUBLE_MAT4x2 */ +/* reuse GL_DOUBLE_MAT4x3 */ +#endif + +#ifndef GL_ARB_viewport_array +/* reuse GL_SCISSOR_BOX */ +/* reuse GL_VIEWPORT */ +/* reuse GL_DEPTH_RANGE */ +/* reuse GL_SCISSOR_TEST */ +#define GL_MAX_VIEWPORTS 0x825B +#define GL_VIEWPORT_SUBPIXEL_BITS 0x825C +#define GL_VIEWPORT_BOUNDS_RANGE 0x825D +#define GL_LAYER_PROVOKING_VERTEX 0x825E +#define GL_VIEWPORT_INDEX_PROVOKING_VERTEX 0x825F +#define GL_UNDEFINED_VERTEX 0x8260 +/* reuse GL_FIRST_VERTEX_CONVENTION */ +/* reuse GL_LAST_VERTEX_CONVENTION */ +/* reuse GL_PROVOKING_VERTEX */ +#endif + +#ifndef GL_ARB_cl_event +#define GL_SYNC_CL_EVENT_ARB 0x8240 +#define GL_SYNC_CL_EVENT_COMPLETE_ARB 0x8241 +#endif + +#ifndef GL_ARB_debug_output +#define GL_DEBUG_OUTPUT_SYNCHRONOUS_ARB 0x8242 +#define GL_DEBUG_NEXT_LOGGED_MESSAGE_LENGTH_ARB 0x8243 +#define GL_DEBUG_CALLBACK_FUNCTION_ARB 0x8244 +#define GL_DEBUG_CALLBACK_USER_PARAM_ARB 0x8245 +#define GL_DEBUG_SOURCE_API_ARB 0x8246 +#define GL_DEBUG_SOURCE_WINDOW_SYSTEM_ARB 0x8247 +#define GL_DEBUG_SOURCE_SHADER_COMPILER_ARB 0x8248 +#define GL_DEBUG_SOURCE_THIRD_PARTY_ARB 0x8249 +#define GL_DEBUG_SOURCE_APPLICATION_ARB 0x824A +#define GL_DEBUG_SOURCE_OTHER_ARB 0x824B +#define GL_DEBUG_TYPE_ERROR_ARB 0x824C +#define GL_DEBUG_TYPE_DEPRECATED_BEHAVIOR_ARB 0x824D +#define GL_DEBUG_TYPE_UNDEFINED_BEHAVIOR_ARB 0x824E +#define GL_DEBUG_TYPE_PORTABILITY_ARB 0x824F +#define GL_DEBUG_TYPE_PERFORMANCE_ARB 0x8250 +#define GL_DEBUG_TYPE_OTHER_ARB 0x8251 +#define GL_MAX_DEBUG_MESSAGE_LENGTH_ARB 0x9143 +#define GL_MAX_DEBUG_LOGGED_MESSAGES_ARB 0x9144 +#define GL_DEBUG_LOGGED_MESSAGES_ARB 0x9145 +#define GL_DEBUG_SEVERITY_HIGH_ARB 0x9146 +#define GL_DEBUG_SEVERITY_MEDIUM_ARB 0x9147 +#define GL_DEBUG_SEVERITY_LOW_ARB 0x9148 +#endif + +#ifndef GL_ARB_robustness +/* reuse GL_NO_ERROR */ +#define GL_CONTEXT_FLAG_ROBUST_ACCESS_BIT_ARB 0x00000004 +#define GL_LOSE_CONTEXT_ON_RESET_ARB 0x8252 +#define GL_GUILTY_CONTEXT_RESET_ARB 0x8253 +#define GL_INNOCENT_CONTEXT_RESET_ARB 0x8254 +#define GL_UNKNOWN_CONTEXT_RESET_ARB 0x8255 +#define GL_RESET_NOTIFICATION_STRATEGY_ARB 0x8256 +#define GL_NO_RESET_NOTIFICATION_ARB 0x8261 +#endif + +#ifndef GL_ARB_shader_stencil_export +#endif + +#ifndef GL_ARB_base_instance +#endif + +#ifndef GL_ARB_shading_language_420pack +#endif + +#ifndef GL_ARB_transform_feedback_instanced +#endif + +#ifndef GL_ARB_compressed_texture_pixel_storage +#define GL_UNPACK_COMPRESSED_BLOCK_WIDTH 0x9127 +#define GL_UNPACK_COMPRESSED_BLOCK_HEIGHT 0x9128 +#define GL_UNPACK_COMPRESSED_BLOCK_DEPTH 0x9129 +#define GL_UNPACK_COMPRESSED_BLOCK_SIZE 0x912A +#define GL_PACK_COMPRESSED_BLOCK_WIDTH 0x912B +#define GL_PACK_COMPRESSED_BLOCK_HEIGHT 0x912C +#define GL_PACK_COMPRESSED_BLOCK_DEPTH 0x912D +#define GL_PACK_COMPRESSED_BLOCK_SIZE 0x912E +#endif + +#ifndef GL_ARB_conservative_depth +#endif + +#ifndef GL_ARB_internalformat_query +#define GL_NUM_SAMPLE_COUNTS 0x9380 +#endif + +#ifndef GL_ARB_map_buffer_alignment +#define GL_MIN_MAP_BUFFER_ALIGNMENT 0x90BC +#endif + +#ifndef GL_ARB_shader_atomic_counters +#define GL_ATOMIC_COUNTER_BUFFER 0x92C0 +#define GL_ATOMIC_COUNTER_BUFFER_BINDING 0x92C1 +#define GL_ATOMIC_COUNTER_BUFFER_START 0x92C2 +#define GL_ATOMIC_COUNTER_BUFFER_SIZE 0x92C3 +#define GL_ATOMIC_COUNTER_BUFFER_DATA_SIZE 0x92C4 +#define GL_ATOMIC_COUNTER_BUFFER_ACTIVE_ATOMIC_COUNTERS 0x92C5 +#define GL_ATOMIC_COUNTER_BUFFER_ACTIVE_ATOMIC_COUNTER_INDICES 0x92C6 +#define GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_VERTEX_SHADER 0x92C7 +#define GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_TESS_CONTROL_SHADER 0x92C8 +#define GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_TESS_EVALUATION_SHADER 0x92C9 +#define GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_GEOMETRY_SHADER 0x92CA +#define GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_FRAGMENT_SHADER 0x92CB +#define GL_MAX_VERTEX_ATOMIC_COUNTER_BUFFERS 0x92CC +#define GL_MAX_TESS_CONTROL_ATOMIC_COUNTER_BUFFERS 0x92CD +#define GL_MAX_TESS_EVALUATION_ATOMIC_COUNTER_BUFFERS 0x92CE +#define GL_MAX_GEOMETRY_ATOMIC_COUNTER_BUFFERS 0x92CF +#define GL_MAX_FRAGMENT_ATOMIC_COUNTER_BUFFERS 0x92D0 +#define GL_MAX_COMBINED_ATOMIC_COUNTER_BUFFERS 0x92D1 +#define GL_MAX_VERTEX_ATOMIC_COUNTERS 0x92D2 +#define GL_MAX_TESS_CONTROL_ATOMIC_COUNTERS 0x92D3 +#define GL_MAX_TESS_EVALUATION_ATOMIC_COUNTERS 0x92D4 +#define GL_MAX_GEOMETRY_ATOMIC_COUNTERS 0x92D5 +#define GL_MAX_FRAGMENT_ATOMIC_COUNTERS 0x92D6 +#define GL_MAX_COMBINED_ATOMIC_COUNTERS 0x92D7 +#define GL_MAX_ATOMIC_COUNTER_BUFFER_SIZE 0x92D8 +#define GL_MAX_ATOMIC_COUNTER_BUFFER_BINDINGS 0x92DC +#define GL_ACTIVE_ATOMIC_COUNTER_BUFFERS 0x92D9 +#define GL_UNIFORM_ATOMIC_COUNTER_BUFFER_INDEX 0x92DA +#define GL_UNSIGNED_INT_ATOMIC_COUNTER 0x92DB +#endif + +#ifndef GL_ARB_shader_image_load_store +#define GL_VERTEX_ATTRIB_ARRAY_BARRIER_BIT 0x00000001 +#define GL_ELEMENT_ARRAY_BARRIER_BIT 0x00000002 +#define GL_UNIFORM_BARRIER_BIT 0x00000004 +#define GL_TEXTURE_FETCH_BARRIER_BIT 0x00000008 +#define GL_SHADER_IMAGE_ACCESS_BARRIER_BIT 0x00000020 +#define GL_COMMAND_BARRIER_BIT 0x00000040 +#define GL_PIXEL_BUFFER_BARRIER_BIT 0x00000080 +#define GL_TEXTURE_UPDATE_BARRIER_BIT 0x00000100 +#define GL_BUFFER_UPDATE_BARRIER_BIT 0x00000200 +#define GL_FRAMEBUFFER_BARRIER_BIT 0x00000400 +#define GL_TRANSFORM_FEEDBACK_BARRIER_BIT 0x00000800 +#define GL_ATOMIC_COUNTER_BARRIER_BIT 0x00001000 +#define GL_ALL_BARRIER_BITS 0xFFFFFFFF +#define GL_MAX_IMAGE_UNITS 0x8F38 +#define GL_MAX_COMBINED_IMAGE_UNITS_AND_FRAGMENT_OUTPUTS 0x8F39 +#define GL_IMAGE_BINDING_NAME 0x8F3A +#define GL_IMAGE_BINDING_LEVEL 0x8F3B +#define GL_IMAGE_BINDING_LAYERED 0x8F3C +#define GL_IMAGE_BINDING_LAYER 0x8F3D +#define GL_IMAGE_BINDING_ACCESS 0x8F3E +#define GL_IMAGE_1D 0x904C +#define GL_IMAGE_2D 0x904D +#define GL_IMAGE_3D 0x904E +#define GL_IMAGE_2D_RECT 0x904F +#define GL_IMAGE_CUBE 0x9050 +#define GL_IMAGE_BUFFER 0x9051 +#define GL_IMAGE_1D_ARRAY 0x9052 +#define GL_IMAGE_2D_ARRAY 0x9053 +#define GL_IMAGE_CUBE_MAP_ARRAY 0x9054 +#define GL_IMAGE_2D_MULTISAMPLE 0x9055 +#define GL_IMAGE_2D_MULTISAMPLE_ARRAY 0x9056 +#define GL_INT_IMAGE_1D 0x9057 +#define GL_INT_IMAGE_2D 0x9058 +#define GL_INT_IMAGE_3D 0x9059 +#define GL_INT_IMAGE_2D_RECT 0x905A +#define GL_INT_IMAGE_CUBE 0x905B +#define GL_INT_IMAGE_BUFFER 0x905C +#define GL_INT_IMAGE_1D_ARRAY 0x905D +#define GL_INT_IMAGE_2D_ARRAY 0x905E +#define GL_INT_IMAGE_CUBE_MAP_ARRAY 0x905F +#define GL_INT_IMAGE_2D_MULTISAMPLE 0x9060 +#define GL_INT_IMAGE_2D_MULTISAMPLE_ARRAY 0x9061 +#define GL_UNSIGNED_INT_IMAGE_1D 0x9062 +#define GL_UNSIGNED_INT_IMAGE_2D 0x9063 +#define GL_UNSIGNED_INT_IMAGE_3D 0x9064 +#define GL_UNSIGNED_INT_IMAGE_2D_RECT 0x9065 +#define GL_UNSIGNED_INT_IMAGE_CUBE 0x9066 +#define GL_UNSIGNED_INT_IMAGE_BUFFER 0x9067 +#define GL_UNSIGNED_INT_IMAGE_1D_ARRAY 0x9068 +#define GL_UNSIGNED_INT_IMAGE_2D_ARRAY 0x9069 +#define GL_UNSIGNED_INT_IMAGE_CUBE_MAP_ARRAY 0x906A +#define GL_UNSIGNED_INT_IMAGE_2D_MULTISAMPLE 0x906B +#define GL_UNSIGNED_INT_IMAGE_2D_MULTISAMPLE_ARRAY 0x906C +#define GL_MAX_IMAGE_SAMPLES 0x906D +#define GL_IMAGE_BINDING_FORMAT 0x906E +#define GL_IMAGE_FORMAT_COMPATIBILITY_TYPE 0x90C7 +#define GL_IMAGE_FORMAT_COMPATIBILITY_BY_SIZE 0x90C8 +#define GL_IMAGE_FORMAT_COMPATIBILITY_BY_CLASS 0x90C9 +#define GL_MAX_VERTEX_IMAGE_UNIFORMS 0x90CA +#define GL_MAX_TESS_CONTROL_IMAGE_UNIFORMS 0x90CB +#define GL_MAX_TESS_EVALUATION_IMAGE_UNIFORMS 0x90CC +#define GL_MAX_GEOMETRY_IMAGE_UNIFORMS 0x90CD +#define GL_MAX_FRAGMENT_IMAGE_UNIFORMS 0x90CE +#define GL_MAX_COMBINED_IMAGE_UNIFORMS 0x90CF +#endif + +#ifndef GL_ARB_shading_language_packing +#endif + +#ifndef GL_ARB_texture_storage +#define GL_TEXTURE_IMMUTABLE_FORMAT 0x912F +#endif + +#ifndef GL_KHR_texture_compression_astc_ldr +#define GL_COMPRESSED_RGBA_ASTC_4x4_KHR 0x93B0 +#define GL_COMPRESSED_RGBA_ASTC_5x4_KHR 0x93B1 +#define GL_COMPRESSED_RGBA_ASTC_5x5_KHR 0x93B2 +#define GL_COMPRESSED_RGBA_ASTC_6x5_KHR 0x93B3 +#define GL_COMPRESSED_RGBA_ASTC_6x6_KHR 0x93B4 +#define GL_COMPRESSED_RGBA_ASTC_8x5_KHR 0x93B5 +#define GL_COMPRESSED_RGBA_ASTC_8x6_KHR 0x93B6 +#define GL_COMPRESSED_RGBA_ASTC_8x8_KHR 0x93B7 +#define GL_COMPRESSED_RGBA_ASTC_10x5_KHR 0x93B8 +#define GL_COMPRESSED_RGBA_ASTC_10x6_KHR 0x93B9 +#define GL_COMPRESSED_RGBA_ASTC_10x8_KHR 0x93BA +#define GL_COMPRESSED_RGBA_ASTC_10x10_KHR 0x93BB +#define GL_COMPRESSED_RGBA_ASTC_12x10_KHR 0x93BC +#define GL_COMPRESSED_RGBA_ASTC_12x12_KHR 0x93BD +#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_4x4_KHR 0x93D0 +#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_5x4_KHR 0x93D1 +#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_5x5_KHR 0x93D2 +#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_6x5_KHR 0x93D3 +#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_6x6_KHR 0x93D4 +#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_8x5_KHR 0x93D5 +#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_8x6_KHR 0x93D6 +#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_8x8_KHR 0x93D7 +#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x5_KHR 0x93D8 +#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x6_KHR 0x93D9 +#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x8_KHR 0x93DA +#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x10_KHR 0x93DB +#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_12x10_KHR 0x93DC +#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_12x12_KHR 0x93DD +#endif + +#ifndef GL_KHR_debug +#define GL_DEBUG_OUTPUT_SYNCHRONOUS 0x8242 +#define GL_DEBUG_NEXT_LOGGED_MESSAGE_LENGTH 0x8243 +#define GL_DEBUG_CALLBACK_FUNCTION 0x8244 +#define GL_DEBUG_CALLBACK_USER_PARAM 0x8245 +#define GL_DEBUG_SOURCE_API 0x8246 +#define GL_DEBUG_SOURCE_WINDOW_SYSTEM 0x8247 +#define GL_DEBUG_SOURCE_SHADER_COMPILER 0x8248 +#define GL_DEBUG_SOURCE_THIRD_PARTY 0x8249 +#define GL_DEBUG_SOURCE_APPLICATION 0x824A +#define GL_DEBUG_SOURCE_OTHER 0x824B +#define GL_DEBUG_TYPE_ERROR 0x824C +#define GL_DEBUG_TYPE_DEPRECATED_BEHAVIOR 0x824D +#define GL_DEBUG_TYPE_UNDEFINED_BEHAVIOR 0x824E +#define GL_DEBUG_TYPE_PORTABILITY 0x824F +#define GL_DEBUG_TYPE_PERFORMANCE 0x8250 +#define GL_DEBUG_TYPE_OTHER 0x8251 +#define GL_DEBUG_TYPE_MARKER 0x8268 +#define GL_DEBUG_TYPE_PUSH_GROUP 0x8269 +#define GL_DEBUG_TYPE_POP_GROUP 0x826A +#define GL_DEBUG_SEVERITY_NOTIFICATION 0x826B +#define GL_MAX_DEBUG_GROUP_STACK_DEPTH 0x826C +#define GL_DEBUG_GROUP_STACK_DEPTH 0x826D +#define GL_BUFFER 0x82E0 +#define GL_SHADER 0x82E1 +#define GL_PROGRAM 0x82E2 +#define GL_QUERY 0x82E3 +#define GL_PROGRAM_PIPELINE 0x82E4 +#define GL_SAMPLER 0x82E6 +#define GL_DISPLAY_LIST 0x82E7 +/* DISPLAY_LIST used in compatibility profile only */ +#define GL_MAX_LABEL_LENGTH 0x82E8 +#define GL_MAX_DEBUG_MESSAGE_LENGTH 0x9143 +#define GL_MAX_DEBUG_LOGGED_MESSAGES 0x9144 +#define GL_DEBUG_LOGGED_MESSAGES 0x9145 +#define GL_DEBUG_SEVERITY_HIGH 0x9146 +#define GL_DEBUG_SEVERITY_MEDIUM 0x9147 +#define GL_DEBUG_SEVERITY_LOW 0x9148 +#define GL_DEBUG_OUTPUT 0x92E0 +#define GL_CONTEXT_FLAG_DEBUG_BIT 0x00000002 +/* reuse GL_STACK_UNDERFLOW */ +/* reuse GL_STACK_OVERFLOW */ +#endif + +#ifndef GL_ARB_arrays_of_arrays +#endif + +#ifndef GL_ARB_clear_buffer_object +#endif + +#ifndef GL_ARB_compute_shader +#define GL_COMPUTE_SHADER 0x91B9 +#define GL_MAX_COMPUTE_UNIFORM_BLOCKS 0x91BB +#define GL_MAX_COMPUTE_TEXTURE_IMAGE_UNITS 0x91BC +#define GL_MAX_COMPUTE_IMAGE_UNIFORMS 0x91BD +#define GL_MAX_COMPUTE_SHARED_MEMORY_SIZE 0x8262 +#define GL_MAX_COMPUTE_UNIFORM_COMPONENTS 0x8263 +#define GL_MAX_COMPUTE_ATOMIC_COUNTER_BUFFERS 0x8264 +#define GL_MAX_COMPUTE_ATOMIC_COUNTERS 0x8265 +#define GL_MAX_COMBINED_COMPUTE_UNIFORM_COMPONENTS 0x8266 +#define GL_MAX_COMPUTE_LOCAL_INVOCATIONS 0x90EB +#define GL_MAX_COMPUTE_WORK_GROUP_COUNT 0x91BE +#define GL_MAX_COMPUTE_WORK_GROUP_SIZE 0x91BF +#define GL_COMPUTE_LOCAL_WORK_SIZE 0x8267 +#define GL_UNIFORM_BLOCK_REFERENCED_BY_COMPUTE_SHADER 0x90EC +#define GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_COMPUTE_SHADER 0x90ED +#define GL_DISPATCH_INDIRECT_BUFFER 0x90EE +#define GL_DISPATCH_INDIRECT_BUFFER_BINDING 0x90EF +#define GL_COMPUTE_SHADER_BIT 0x00000020 +#endif + +#ifndef GL_ARB_copy_image +#endif + +#ifndef GL_ARB_texture_view +#define GL_TEXTURE_VIEW_MIN_LEVEL 0x82DB +#define GL_TEXTURE_VIEW_NUM_LEVELS 0x82DC +#define GL_TEXTURE_VIEW_MIN_LAYER 0x82DD +#define GL_TEXTURE_VIEW_NUM_LAYERS 0x82DE +#define GL_TEXTURE_IMMUTABLE_LEVELS 0x82DF +#endif + +#ifndef GL_ARB_vertex_attrib_binding +#define GL_VERTEX_ATTRIB_BINDING 0x82D4 +#define GL_VERTEX_ATTRIB_RELATIVE_OFFSET 0x82D5 +#define GL_VERTEX_BINDING_DIVISOR 0x82D6 +#define GL_VERTEX_BINDING_OFFSET 0x82D7 +#define GL_VERTEX_BINDING_STRIDE 0x82D8 +#define GL_MAX_VERTEX_ATTRIB_RELATIVE_OFFSET 0x82D9 +#define GL_MAX_VERTEX_ATTRIB_BINDINGS 0x82DA +#endif + +#ifndef GL_ARB_robustness_isolation +#endif + +#ifndef GL_ARB_ES3_compatibility +#define GL_COMPRESSED_RGB8_ETC2 0x9274 +#define GL_COMPRESSED_SRGB8_ETC2 0x9275 +#define GL_COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2 0x9276 +#define GL_COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2 0x9277 +#define GL_COMPRESSED_RGBA8_ETC2_EAC 0x9278 +#define GL_COMPRESSED_SRGB8_ALPHA8_ETC2_EAC 0x9279 +#define GL_COMPRESSED_R11_EAC 0x9270 +#define GL_COMPRESSED_SIGNED_R11_EAC 0x9271 +#define GL_COMPRESSED_RG11_EAC 0x9272 +#define GL_COMPRESSED_SIGNED_RG11_EAC 0x9273 +#define GL_PRIMITIVE_RESTART_FIXED_INDEX 0x8D69 +#define GL_ANY_SAMPLES_PASSED_CONSERVATIVE 0x8D6A +#define GL_MAX_ELEMENT_INDEX 0x8D6B +#endif + +#ifndef GL_ARB_explicit_uniform_location +#define GL_MAX_UNIFORM_LOCATIONS 0x826E +#endif + +#ifndef GL_ARB_fragment_layer_viewport +#endif + +#ifndef GL_ARB_framebuffer_no_attachments +#define GL_FRAMEBUFFER_DEFAULT_WIDTH 0x9310 +#define GL_FRAMEBUFFER_DEFAULT_HEIGHT 0x9311 +#define GL_FRAMEBUFFER_DEFAULT_LAYERS 0x9312 +#define GL_FRAMEBUFFER_DEFAULT_SAMPLES 0x9313 +#define GL_FRAMEBUFFER_DEFAULT_FIXED_SAMPLE_LOCATIONS 0x9314 +#define GL_MAX_FRAMEBUFFER_WIDTH 0x9315 +#define GL_MAX_FRAMEBUFFER_HEIGHT 0x9316 +#define GL_MAX_FRAMEBUFFER_LAYERS 0x9317 +#define GL_MAX_FRAMEBUFFER_SAMPLES 0x9318 +#endif + +#ifndef GL_ARB_internalformat_query2 +/* reuse GL_IMAGE_FORMAT_COMPATIBILITY_TYPE */ +/* reuse GL_NUM_SAMPLE_COUNTS */ +/* reuse GL_RENDERBUFFER */ +/* reuse GL_SAMPLES */ +/* reuse GL_TEXTURE_1D */ +/* reuse GL_TEXTURE_1D_ARRAY */ +/* reuse GL_TEXTURE_2D */ +/* reuse GL_TEXTURE_2D_ARRAY */ +/* reuse GL_TEXTURE_3D */ +/* reuse GL_TEXTURE_CUBE_MAP */ +/* reuse GL_TEXTURE_CUBE_MAP_ARRAY */ +/* reuse GL_TEXTURE_RECTANGLE */ +/* reuse GL_TEXTURE_BUFFER */ +/* reuse GL_TEXTURE_2D_MULTISAMPLE */ +/* reuse GL_TEXTURE_2D_MULTISAMPLE_ARRAY */ +/* reuse GL_TEXTURE_COMPRESSED */ +#define GL_INTERNALFORMAT_SUPPORTED 0x826F +#define GL_INTERNALFORMAT_PREFERRED 0x8270 +#define GL_INTERNALFORMAT_RED_SIZE 0x8271 +#define GL_INTERNALFORMAT_GREEN_SIZE 0x8272 +#define GL_INTERNALFORMAT_BLUE_SIZE 0x8273 +#define GL_INTERNALFORMAT_ALPHA_SIZE 0x8274 +#define GL_INTERNALFORMAT_DEPTH_SIZE 0x8275 +#define GL_INTERNALFORMAT_STENCIL_SIZE 0x8276 +#define GL_INTERNALFORMAT_SHARED_SIZE 0x8277 +#define GL_INTERNALFORMAT_RED_TYPE 0x8278 +#define GL_INTERNALFORMAT_GREEN_TYPE 0x8279 +#define GL_INTERNALFORMAT_BLUE_TYPE 0x827A +#define GL_INTERNALFORMAT_ALPHA_TYPE 0x827B +#define GL_INTERNALFORMAT_DEPTH_TYPE 0x827C +#define GL_INTERNALFORMAT_STENCIL_TYPE 0x827D +#define GL_MAX_WIDTH 0x827E +#define GL_MAX_HEIGHT 0x827F +#define GL_MAX_DEPTH 0x8280 +#define GL_MAX_LAYERS 0x8281 +#define GL_MAX_COMBINED_DIMENSIONS 0x8282 +#define GL_COLOR_COMPONENTS 0x8283 +#define GL_DEPTH_COMPONENTS 0x8284 +#define GL_STENCIL_COMPONENTS 0x8285 +#define GL_COLOR_RENDERABLE 0x8286 +#define GL_DEPTH_RENDERABLE 0x8287 +#define GL_STENCIL_RENDERABLE 0x8288 +#define GL_FRAMEBUFFER_RENDERABLE 0x8289 +#define GL_FRAMEBUFFER_RENDERABLE_LAYERED 0x828A +#define GL_FRAMEBUFFER_BLEND 0x828B +#define GL_READ_PIXELS 0x828C +#define GL_READ_PIXELS_FORMAT 0x828D +#define GL_READ_PIXELS_TYPE 0x828E +#define GL_TEXTURE_IMAGE_FORMAT 0x828F +#define GL_TEXTURE_IMAGE_TYPE 0x8290 +#define GL_GET_TEXTURE_IMAGE_FORMAT 0x8291 +#define GL_GET_TEXTURE_IMAGE_TYPE 0x8292 +#define GL_MIPMAP 0x8293 +#define GL_MANUAL_GENERATE_MIPMAP 0x8294 +#define GL_AUTO_GENERATE_MIPMAP 0x8295 +#define GL_COLOR_ENCODING 0x8296 +#define GL_SRGB_READ 0x8297 +#define GL_SRGB_WRITE 0x8298 +#define GL_SRGB_DECODE_ARB 0x8299 +#define GL_FILTER 0x829A +#define GL_VERTEX_TEXTURE 0x829B +#define GL_TESS_CONTROL_TEXTURE 0x829C +#define GL_TESS_EVALUATION_TEXTURE 0x829D +#define GL_GEOMETRY_TEXTURE 0x829E +#define GL_FRAGMENT_TEXTURE 0x829F +#define GL_COMPUTE_TEXTURE 0x82A0 +#define GL_TEXTURE_SHADOW 0x82A1 +#define GL_TEXTURE_GATHER 0x82A2 +#define GL_TEXTURE_GATHER_SHADOW 0x82A3 +#define GL_SHADER_IMAGE_LOAD 0x82A4 +#define GL_SHADER_IMAGE_STORE 0x82A5 +#define GL_SHADER_IMAGE_ATOMIC 0x82A6 +#define GL_IMAGE_TEXEL_SIZE 0x82A7 +#define GL_IMAGE_COMPATIBILITY_CLASS 0x82A8 +#define GL_IMAGE_PIXEL_FORMAT 0x82A9 +#define GL_IMAGE_PIXEL_TYPE 0x82AA +#define GL_SIMULTANEOUS_TEXTURE_AND_DEPTH_TEST 0x82AC +#define GL_SIMULTANEOUS_TEXTURE_AND_STENCIL_TEST 0x82AD +#define GL_SIMULTANEOUS_TEXTURE_AND_DEPTH_WRITE 0x82AE +#define GL_SIMULTANEOUS_TEXTURE_AND_STENCIL_WRITE 0x82AF +#define GL_TEXTURE_COMPRESSED_BLOCK_WIDTH 0x82B1 +#define GL_TEXTURE_COMPRESSED_BLOCK_HEIGHT 0x82B2 +#define GL_TEXTURE_COMPRESSED_BLOCK_SIZE 0x82B3 +#define GL_CLEAR_BUFFER 0x82B4 +#define GL_TEXTURE_VIEW 0x82B5 +#define GL_VIEW_COMPATIBILITY_CLASS 0x82B6 +#define GL_FULL_SUPPORT 0x82B7 +#define GL_CAVEAT_SUPPORT 0x82B8 +#define GL_IMAGE_CLASS_4_X_32 0x82B9 +#define GL_IMAGE_CLASS_2_X_32 0x82BA +#define GL_IMAGE_CLASS_1_X_32 0x82BB +#define GL_IMAGE_CLASS_4_X_16 0x82BC +#define GL_IMAGE_CLASS_2_X_16 0x82BD +#define GL_IMAGE_CLASS_1_X_16 0x82BE +#define GL_IMAGE_CLASS_4_X_8 0x82BF +#define GL_IMAGE_CLASS_2_X_8 0x82C0 +#define GL_IMAGE_CLASS_1_X_8 0x82C1 +#define GL_IMAGE_CLASS_11_11_10 0x82C2 +#define GL_IMAGE_CLASS_10_10_10_2 0x82C3 +#define GL_VIEW_CLASS_128_BITS 0x82C4 +#define GL_VIEW_CLASS_96_BITS 0x82C5 +#define GL_VIEW_CLASS_64_BITS 0x82C6 +#define GL_VIEW_CLASS_48_BITS 0x82C7 +#define GL_VIEW_CLASS_32_BITS 0x82C8 +#define GL_VIEW_CLASS_24_BITS 0x82C9 +#define GL_VIEW_CLASS_16_BITS 0x82CA +#define GL_VIEW_CLASS_8_BITS 0x82CB +#define GL_VIEW_CLASS_S3TC_DXT1_RGB 0x82CC +#define GL_VIEW_CLASS_S3TC_DXT1_RGBA 0x82CD +#define GL_VIEW_CLASS_S3TC_DXT3_RGBA 0x82CE +#define GL_VIEW_CLASS_S3TC_DXT5_RGBA 0x82CF +#define GL_VIEW_CLASS_RGTC1_RED 0x82D0 +#define GL_VIEW_CLASS_RGTC2_RG 0x82D1 +#define GL_VIEW_CLASS_BPTC_UNORM 0x82D2 +#define GL_VIEW_CLASS_BPTC_FLOAT 0x82D3 +#endif + +#ifndef GL_ARB_invalidate_subdata +#endif + +#ifndef GL_ARB_multi_draw_indirect +#endif + +#ifndef GL_ARB_program_interface_query +#define GL_UNIFORM 0x92E1 +#define GL_UNIFORM_BLOCK 0x92E2 +#define GL_PROGRAM_INPUT 0x92E3 +#define GL_PROGRAM_OUTPUT 0x92E4 +#define GL_BUFFER_VARIABLE 0x92E5 +#define GL_SHADER_STORAGE_BLOCK 0x92E6 +/* reuse GL_ATOMIC_COUNTER_BUFFER */ +#define GL_VERTEX_SUBROUTINE 0x92E8 +#define GL_TESS_CONTROL_SUBROUTINE 0x92E9 +#define GL_TESS_EVALUATION_SUBROUTINE 0x92EA +#define GL_GEOMETRY_SUBROUTINE 0x92EB +#define GL_FRAGMENT_SUBROUTINE 0x92EC +#define GL_COMPUTE_SUBROUTINE 0x92ED +#define GL_VERTEX_SUBROUTINE_UNIFORM 0x92EE +#define GL_TESS_CONTROL_SUBROUTINE_UNIFORM 0x92EF +#define GL_TESS_EVALUATION_SUBROUTINE_UNIFORM 0x92F0 +#define GL_GEOMETRY_SUBROUTINE_UNIFORM 0x92F1 +#define GL_FRAGMENT_SUBROUTINE_UNIFORM 0x92F2 +#define GL_COMPUTE_SUBROUTINE_UNIFORM 0x92F3 +#define GL_TRANSFORM_FEEDBACK_VARYING 0x92F4 +#define GL_ACTIVE_RESOURCES 0x92F5 +#define GL_MAX_NAME_LENGTH 0x92F6 +#define GL_MAX_NUM_ACTIVE_VARIABLES 0x92F7 +#define GL_MAX_NUM_COMPATIBLE_SUBROUTINES 0x92F8 +#define GL_NAME_LENGTH 0x92F9 +#define GL_TYPE 0x92FA +#define GL_ARRAY_SIZE 0x92FB +#define GL_OFFSET 0x92FC +#define GL_BLOCK_INDEX 0x92FD +#define GL_ARRAY_STRIDE 0x92FE +#define GL_MATRIX_STRIDE 0x92FF +#define GL_IS_ROW_MAJOR 0x9300 +#define GL_ATOMIC_COUNTER_BUFFER_INDEX 0x9301 +#define GL_BUFFER_BINDING 0x9302 +#define GL_BUFFER_DATA_SIZE 0x9303 +#define GL_NUM_ACTIVE_VARIABLES 0x9304 +#define GL_ACTIVE_VARIABLES 0x9305 +#define GL_REFERENCED_BY_VERTEX_SHADER 0x9306 +#define GL_REFERENCED_BY_TESS_CONTROL_SHADER 0x9307 +#define GL_REFERENCED_BY_TESS_EVALUATION_SHADER 0x9308 +#define GL_REFERENCED_BY_GEOMETRY_SHADER 0x9309 +#define GL_REFERENCED_BY_FRAGMENT_SHADER 0x930A +#define GL_REFERENCED_BY_COMPUTE_SHADER 0x930B +#define GL_TOP_LEVEL_ARRAY_SIZE 0x930C +#define GL_TOP_LEVEL_ARRAY_STRIDE 0x930D +#define GL_LOCATION 0x930E +#define GL_LOCATION_INDEX 0x930F +#define GL_IS_PER_PATCH 0x92E7 +/* reuse GL_NUM_COMPATIBLE_SUBROUTINES */ +/* reuse GL_COMPATIBLE_SUBROUTINES */ +#endif + +#ifndef GL_ARB_robust_buffer_access_behavior +#endif + +#ifndef GL_ARB_shader_image_size +#endif + +#ifndef GL_ARB_shader_storage_buffer_object +#define GL_SHADER_STORAGE_BUFFER 0x90D2 +#define GL_SHADER_STORAGE_BUFFER_BINDING 0x90D3 +#define GL_SHADER_STORAGE_BUFFER_START 0x90D4 +#define GL_SHADER_STORAGE_BUFFER_SIZE 0x90D5 +#define GL_MAX_VERTEX_SHADER_STORAGE_BLOCKS 0x90D6 +#define GL_MAX_GEOMETRY_SHADER_STORAGE_BLOCKS 0x90D7 +#define GL_MAX_TESS_CONTROL_SHADER_STORAGE_BLOCKS 0x90D8 +#define GL_MAX_TESS_EVALUATION_SHADER_STORAGE_BLOCKS 0x90D9 +#define GL_MAX_FRAGMENT_SHADER_STORAGE_BLOCKS 0x90DA +#define GL_MAX_COMPUTE_SHADER_STORAGE_BLOCKS 0x90DB +#define GL_MAX_COMBINED_SHADER_STORAGE_BLOCKS 0x90DC +#define GL_MAX_SHADER_STORAGE_BUFFER_BINDINGS 0x90DD +#define GL_MAX_SHADER_STORAGE_BLOCK_SIZE 0x90DE +#define GL_SHADER_STORAGE_BUFFER_OFFSET_ALIGNMENT 0x90DF +#define GL_SHADER_STORAGE_BARRIER_BIT 0x2000 +#define GL_MAX_COMBINED_SHADER_OUTPUT_RESOURCES GL_MAX_COMBINED_IMAGE_UNITS_AND_FRAGMENT_OUTPUTS +/* reuse GL_MAX_COMBINED_IMAGE_UNITS_AND_FRAGMENT_OUTPUTS */ +#endif + +#ifndef GL_ARB_stencil_texturing +#define GL_DEPTH_STENCIL_TEXTURE_MODE 0x90EA +#endif + +#ifndef GL_ARB_texture_buffer_range +#define GL_TEXTURE_BUFFER_OFFSET 0x919D +#define GL_TEXTURE_BUFFER_SIZE 0x919E +#define GL_TEXTURE_BUFFER_OFFSET_ALIGNMENT 0x919F +#endif + +#ifndef GL_ARB_texture_query_levels +#endif + +#ifndef GL_ARB_texture_storage_multisample +#endif + +#ifndef GL_EXT_abgr +#define GL_ABGR_EXT 0x8000 +#endif + +#ifndef GL_EXT_blend_color +#define GL_CONSTANT_COLOR_EXT 0x8001 +#define GL_ONE_MINUS_CONSTANT_COLOR_EXT 0x8002 +#define GL_CONSTANT_ALPHA_EXT 0x8003 +#define GL_ONE_MINUS_CONSTANT_ALPHA_EXT 0x8004 +#define GL_BLEND_COLOR_EXT 0x8005 +#endif + +#ifndef GL_EXT_polygon_offset +#define GL_POLYGON_OFFSET_EXT 0x8037 +#define GL_POLYGON_OFFSET_FACTOR_EXT 0x8038 +#define GL_POLYGON_OFFSET_BIAS_EXT 0x8039 +#endif + +#ifndef GL_EXT_texture +#define GL_ALPHA4_EXT 0x803B +#define GL_ALPHA8_EXT 0x803C +#define GL_ALPHA12_EXT 0x803D +#define GL_ALPHA16_EXT 0x803E +#define GL_LUMINANCE4_EXT 0x803F +#define GL_LUMINANCE8_EXT 0x8040 +#define GL_LUMINANCE12_EXT 0x8041 +#define GL_LUMINANCE16_EXT 0x8042 +#define GL_LUMINANCE4_ALPHA4_EXT 0x8043 +#define GL_LUMINANCE6_ALPHA2_EXT 0x8044 +#define GL_LUMINANCE8_ALPHA8_EXT 0x8045 +#define GL_LUMINANCE12_ALPHA4_EXT 0x8046 +#define GL_LUMINANCE12_ALPHA12_EXT 0x8047 +#define GL_LUMINANCE16_ALPHA16_EXT 0x8048 +#define GL_INTENSITY_EXT 0x8049 +#define GL_INTENSITY4_EXT 0x804A +#define GL_INTENSITY8_EXT 0x804B +#define GL_INTENSITY12_EXT 0x804C +#define GL_INTENSITY16_EXT 0x804D +#define GL_RGB2_EXT 0x804E +#define GL_RGB4_EXT 0x804F +#define GL_RGB5_EXT 0x8050 +#define GL_RGB8_EXT 0x8051 +#define GL_RGB10_EXT 0x8052 +#define GL_RGB12_EXT 0x8053 +#define GL_RGB16_EXT 0x8054 +#define GL_RGBA2_EXT 0x8055 +#define GL_RGBA4_EXT 0x8056 +#define GL_RGB5_A1_EXT 0x8057 +#define GL_RGBA8_EXT 0x8058 +#define GL_RGB10_A2_EXT 0x8059 +#define GL_RGBA12_EXT 0x805A +#define GL_RGBA16_EXT 0x805B +#define GL_TEXTURE_RED_SIZE_EXT 0x805C +#define GL_TEXTURE_GREEN_SIZE_EXT 0x805D +#define GL_TEXTURE_BLUE_SIZE_EXT 0x805E +#define GL_TEXTURE_ALPHA_SIZE_EXT 0x805F +#define GL_TEXTURE_LUMINANCE_SIZE_EXT 0x8060 +#define GL_TEXTURE_INTENSITY_SIZE_EXT 0x8061 +#define GL_REPLACE_EXT 0x8062 +#define GL_PROXY_TEXTURE_1D_EXT 0x8063 +#define GL_PROXY_TEXTURE_2D_EXT 0x8064 +#define GL_TEXTURE_TOO_LARGE_EXT 0x8065 +#endif + +#ifndef GL_EXT_texture3D +#define GL_PACK_SKIP_IMAGES_EXT 0x806B +#define GL_PACK_IMAGE_HEIGHT_EXT 0x806C +#define GL_UNPACK_SKIP_IMAGES_EXT 0x806D +#define GL_UNPACK_IMAGE_HEIGHT_EXT 0x806E +#define GL_TEXTURE_3D_EXT 0x806F +#define GL_PROXY_TEXTURE_3D_EXT 0x8070 +#define GL_TEXTURE_DEPTH_EXT 0x8071 +#define GL_TEXTURE_WRAP_R_EXT 0x8072 +#define GL_MAX_3D_TEXTURE_SIZE_EXT 0x8073 +#endif + +#ifndef GL_SGIS_texture_filter4 +#define GL_FILTER4_SGIS 0x8146 +#define GL_TEXTURE_FILTER4_SIZE_SGIS 0x8147 +#endif + +#ifndef GL_EXT_subtexture +#endif + +#ifndef GL_EXT_copy_texture +#endif + +#ifndef GL_EXT_histogram +#define GL_HISTOGRAM_EXT 0x8024 +#define GL_PROXY_HISTOGRAM_EXT 0x8025 +#define GL_HISTOGRAM_WIDTH_EXT 0x8026 +#define GL_HISTOGRAM_FORMAT_EXT 0x8027 +#define GL_HISTOGRAM_RED_SIZE_EXT 0x8028 +#define GL_HISTOGRAM_GREEN_SIZE_EXT 0x8029 +#define GL_HISTOGRAM_BLUE_SIZE_EXT 0x802A +#define GL_HISTOGRAM_ALPHA_SIZE_EXT 0x802B +#define GL_HISTOGRAM_LUMINANCE_SIZE_EXT 0x802C +#define GL_HISTOGRAM_SINK_EXT 0x802D +#define GL_MINMAX_EXT 0x802E +#define GL_MINMAX_FORMAT_EXT 0x802F +#define GL_MINMAX_SINK_EXT 0x8030 +#define GL_TABLE_TOO_LARGE_EXT 0x8031 +#endif + +#ifndef GL_EXT_convolution +#define GL_CONVOLUTION_1D_EXT 0x8010 +#define GL_CONVOLUTION_2D_EXT 0x8011 +#define GL_SEPARABLE_2D_EXT 0x8012 +#define GL_CONVOLUTION_BORDER_MODE_EXT 0x8013 +#define GL_CONVOLUTION_FILTER_SCALE_EXT 0x8014 +#define GL_CONVOLUTION_FILTER_BIAS_EXT 0x8015 +#define GL_REDUCE_EXT 0x8016 +#define GL_CONVOLUTION_FORMAT_EXT 0x8017 +#define GL_CONVOLUTION_WIDTH_EXT 0x8018 +#define GL_CONVOLUTION_HEIGHT_EXT 0x8019 +#define GL_MAX_CONVOLUTION_WIDTH_EXT 0x801A +#define GL_MAX_CONVOLUTION_HEIGHT_EXT 0x801B +#define GL_POST_CONVOLUTION_RED_SCALE_EXT 0x801C +#define GL_POST_CONVOLUTION_GREEN_SCALE_EXT 0x801D +#define GL_POST_CONVOLUTION_BLUE_SCALE_EXT 0x801E +#define GL_POST_CONVOLUTION_ALPHA_SCALE_EXT 0x801F +#define GL_POST_CONVOLUTION_RED_BIAS_EXT 0x8020 +#define GL_POST_CONVOLUTION_GREEN_BIAS_EXT 0x8021 +#define GL_POST_CONVOLUTION_BLUE_BIAS_EXT 0x8022 +#define GL_POST_CONVOLUTION_ALPHA_BIAS_EXT 0x8023 +#endif + +#ifndef GL_SGI_color_matrix +#define GL_COLOR_MATRIX_SGI 0x80B1 +#define GL_COLOR_MATRIX_STACK_DEPTH_SGI 0x80B2 +#define GL_MAX_COLOR_MATRIX_STACK_DEPTH_SGI 0x80B3 +#define GL_POST_COLOR_MATRIX_RED_SCALE_SGI 0x80B4 +#define GL_POST_COLOR_MATRIX_GREEN_SCALE_SGI 0x80B5 +#define GL_POST_COLOR_MATRIX_BLUE_SCALE_SGI 0x80B6 +#define GL_POST_COLOR_MATRIX_ALPHA_SCALE_SGI 0x80B7 +#define GL_POST_COLOR_MATRIX_RED_BIAS_SGI 0x80B8 +#define GL_POST_COLOR_MATRIX_GREEN_BIAS_SGI 0x80B9 +#define GL_POST_COLOR_MATRIX_BLUE_BIAS_SGI 0x80BA +#define GL_POST_COLOR_MATRIX_ALPHA_BIAS_SGI 0x80BB +#endif + +#ifndef GL_SGI_color_table +#define GL_COLOR_TABLE_SGI 0x80D0 +#define GL_POST_CONVOLUTION_COLOR_TABLE_SGI 0x80D1 +#define GL_POST_COLOR_MATRIX_COLOR_TABLE_SGI 0x80D2 +#define GL_PROXY_COLOR_TABLE_SGI 0x80D3 +#define GL_PROXY_POST_CONVOLUTION_COLOR_TABLE_SGI 0x80D4 +#define GL_PROXY_POST_COLOR_MATRIX_COLOR_TABLE_SGI 0x80D5 +#define GL_COLOR_TABLE_SCALE_SGI 0x80D6 +#define GL_COLOR_TABLE_BIAS_SGI 0x80D7 +#define GL_COLOR_TABLE_FORMAT_SGI 0x80D8 +#define GL_COLOR_TABLE_WIDTH_SGI 0x80D9 +#define GL_COLOR_TABLE_RED_SIZE_SGI 0x80DA +#define GL_COLOR_TABLE_GREEN_SIZE_SGI 0x80DB +#define GL_COLOR_TABLE_BLUE_SIZE_SGI 0x80DC +#define GL_COLOR_TABLE_ALPHA_SIZE_SGI 0x80DD +#define GL_COLOR_TABLE_LUMINANCE_SIZE_SGI 0x80DE +#define GL_COLOR_TABLE_INTENSITY_SIZE_SGI 0x80DF +#endif + +#ifndef GL_SGIS_pixel_texture +#define GL_PIXEL_TEXTURE_SGIS 0x8353 +#define GL_PIXEL_FRAGMENT_RGB_SOURCE_SGIS 0x8354 +#define GL_PIXEL_FRAGMENT_ALPHA_SOURCE_SGIS 0x8355 +#define GL_PIXEL_GROUP_COLOR_SGIS 0x8356 +#endif + +#ifndef GL_SGIX_pixel_texture +#define GL_PIXEL_TEX_GEN_SGIX 0x8139 +#define GL_PIXEL_TEX_GEN_MODE_SGIX 0x832B +#endif + +#ifndef GL_SGIS_texture4D +#define GL_PACK_SKIP_VOLUMES_SGIS 0x8130 +#define GL_PACK_IMAGE_DEPTH_SGIS 0x8131 +#define GL_UNPACK_SKIP_VOLUMES_SGIS 0x8132 +#define GL_UNPACK_IMAGE_DEPTH_SGIS 0x8133 +#define GL_TEXTURE_4D_SGIS 0x8134 +#define GL_PROXY_TEXTURE_4D_SGIS 0x8135 +#define GL_TEXTURE_4DSIZE_SGIS 0x8136 +#define GL_TEXTURE_WRAP_Q_SGIS 0x8137 +#define GL_MAX_4D_TEXTURE_SIZE_SGIS 0x8138 +#define GL_TEXTURE_4D_BINDING_SGIS 0x814F +#endif + +#ifndef GL_SGI_texture_color_table +#define GL_TEXTURE_COLOR_TABLE_SGI 0x80BC +#define GL_PROXY_TEXTURE_COLOR_TABLE_SGI 0x80BD +#endif + +#ifndef GL_EXT_cmyka +#define GL_CMYK_EXT 0x800C +#define GL_CMYKA_EXT 0x800D +#define GL_PACK_CMYK_HINT_EXT 0x800E +#define GL_UNPACK_CMYK_HINT_EXT 0x800F +#endif + +#ifndef GL_EXT_texture_object +#define GL_TEXTURE_PRIORITY_EXT 0x8066 +#define GL_TEXTURE_RESIDENT_EXT 0x8067 +#define GL_TEXTURE_1D_BINDING_EXT 0x8068 +#define GL_TEXTURE_2D_BINDING_EXT 0x8069 +#define GL_TEXTURE_3D_BINDING_EXT 0x806A +#endif + +#ifndef GL_SGIS_detail_texture +#define GL_DETAIL_TEXTURE_2D_SGIS 0x8095 +#define GL_DETAIL_TEXTURE_2D_BINDING_SGIS 0x8096 +#define GL_LINEAR_DETAIL_SGIS 0x8097 +#define GL_LINEAR_DETAIL_ALPHA_SGIS 0x8098 +#define GL_LINEAR_DETAIL_COLOR_SGIS 0x8099 +#define GL_DETAIL_TEXTURE_LEVEL_SGIS 0x809A +#define GL_DETAIL_TEXTURE_MODE_SGIS 0x809B +#define GL_DETAIL_TEXTURE_FUNC_POINTS_SGIS 0x809C +#endif + +#ifndef GL_SGIS_sharpen_texture +#define GL_LINEAR_SHARPEN_SGIS 0x80AD +#define GL_LINEAR_SHARPEN_ALPHA_SGIS 0x80AE +#define GL_LINEAR_SHARPEN_COLOR_SGIS 0x80AF +#define GL_SHARPEN_TEXTURE_FUNC_POINTS_SGIS 0x80B0 +#endif + +#ifndef GL_EXT_packed_pixels +#define GL_UNSIGNED_BYTE_3_3_2_EXT 0x8032 +#define GL_UNSIGNED_SHORT_4_4_4_4_EXT 0x8033 +#define GL_UNSIGNED_SHORT_5_5_5_1_EXT 0x8034 +#define GL_UNSIGNED_INT_8_8_8_8_EXT 0x8035 +#define GL_UNSIGNED_INT_10_10_10_2_EXT 0x8036 +#endif + +#ifndef GL_SGIS_texture_lod +#define GL_TEXTURE_MIN_LOD_SGIS 0x813A +#define GL_TEXTURE_MAX_LOD_SGIS 0x813B +#define GL_TEXTURE_BASE_LEVEL_SGIS 0x813C +#define GL_TEXTURE_MAX_LEVEL_SGIS 0x813D +#endif + +#ifndef GL_SGIS_multisample +#define GL_MULTISAMPLE_SGIS 0x809D +#define GL_SAMPLE_ALPHA_TO_MASK_SGIS 0x809E +#define GL_SAMPLE_ALPHA_TO_ONE_SGIS 0x809F +#define GL_SAMPLE_MASK_SGIS 0x80A0 +#define GL_1PASS_SGIS 0x80A1 +#define GL_2PASS_0_SGIS 0x80A2 +#define GL_2PASS_1_SGIS 0x80A3 +#define GL_4PASS_0_SGIS 0x80A4 +#define GL_4PASS_1_SGIS 0x80A5 +#define GL_4PASS_2_SGIS 0x80A6 +#define GL_4PASS_3_SGIS 0x80A7 +#define GL_SAMPLE_BUFFERS_SGIS 0x80A8 +#define GL_SAMPLES_SGIS 0x80A9 +#define GL_SAMPLE_MASK_VALUE_SGIS 0x80AA +#define GL_SAMPLE_MASK_INVERT_SGIS 0x80AB +#define GL_SAMPLE_PATTERN_SGIS 0x80AC +#endif + +#ifndef GL_EXT_rescale_normal +#define GL_RESCALE_NORMAL_EXT 0x803A +#endif + +#ifndef GL_EXT_vertex_array +#define GL_VERTEX_ARRAY_EXT 0x8074 +#define GL_NORMAL_ARRAY_EXT 0x8075 +#define GL_COLOR_ARRAY_EXT 0x8076 +#define GL_INDEX_ARRAY_EXT 0x8077 +#define GL_TEXTURE_COORD_ARRAY_EXT 0x8078 +#define GL_EDGE_FLAG_ARRAY_EXT 0x8079 +#define GL_VERTEX_ARRAY_SIZE_EXT 0x807A +#define GL_VERTEX_ARRAY_TYPE_EXT 0x807B +#define GL_VERTEX_ARRAY_STRIDE_EXT 0x807C +#define GL_VERTEX_ARRAY_COUNT_EXT 0x807D +#define GL_NORMAL_ARRAY_TYPE_EXT 0x807E +#define GL_NORMAL_ARRAY_STRIDE_EXT 0x807F +#define GL_NORMAL_ARRAY_COUNT_EXT 0x8080 +#define GL_COLOR_ARRAY_SIZE_EXT 0x8081 +#define GL_COLOR_ARRAY_TYPE_EXT 0x8082 +#define GL_COLOR_ARRAY_STRIDE_EXT 0x8083 +#define GL_COLOR_ARRAY_COUNT_EXT 0x8084 +#define GL_INDEX_ARRAY_TYPE_EXT 0x8085 +#define GL_INDEX_ARRAY_STRIDE_EXT 0x8086 +#define GL_INDEX_ARRAY_COUNT_EXT 0x8087 +#define GL_TEXTURE_COORD_ARRAY_SIZE_EXT 0x8088 +#define GL_TEXTURE_COORD_ARRAY_TYPE_EXT 0x8089 +#define GL_TEXTURE_COORD_ARRAY_STRIDE_EXT 0x808A +#define GL_TEXTURE_COORD_ARRAY_COUNT_EXT 0x808B +#define GL_EDGE_FLAG_ARRAY_STRIDE_EXT 0x808C +#define GL_EDGE_FLAG_ARRAY_COUNT_EXT 0x808D +#define GL_VERTEX_ARRAY_POINTER_EXT 0x808E +#define GL_NORMAL_ARRAY_POINTER_EXT 0x808F +#define GL_COLOR_ARRAY_POINTER_EXT 0x8090 +#define GL_INDEX_ARRAY_POINTER_EXT 0x8091 +#define GL_TEXTURE_COORD_ARRAY_POINTER_EXT 0x8092 +#define GL_EDGE_FLAG_ARRAY_POINTER_EXT 0x8093 +#endif + +#ifndef GL_EXT_misc_attribute +#endif + +#ifndef GL_SGIS_generate_mipmap +#define GL_GENERATE_MIPMAP_SGIS 0x8191 +#define GL_GENERATE_MIPMAP_HINT_SGIS 0x8192 +#endif + +#ifndef GL_SGIX_clipmap +#define GL_LINEAR_CLIPMAP_LINEAR_SGIX 0x8170 +#define GL_TEXTURE_CLIPMAP_CENTER_SGIX 0x8171 +#define GL_TEXTURE_CLIPMAP_FRAME_SGIX 0x8172 +#define GL_TEXTURE_CLIPMAP_OFFSET_SGIX 0x8173 +#define GL_TEXTURE_CLIPMAP_VIRTUAL_DEPTH_SGIX 0x8174 +#define GL_TEXTURE_CLIPMAP_LOD_OFFSET_SGIX 0x8175 +#define GL_TEXTURE_CLIPMAP_DEPTH_SGIX 0x8176 +#define GL_MAX_CLIPMAP_DEPTH_SGIX 0x8177 +#define GL_MAX_CLIPMAP_VIRTUAL_DEPTH_SGIX 0x8178 +#define GL_NEAREST_CLIPMAP_NEAREST_SGIX 0x844D +#define GL_NEAREST_CLIPMAP_LINEAR_SGIX 0x844E +#define GL_LINEAR_CLIPMAP_NEAREST_SGIX 0x844F +#endif + +#ifndef GL_SGIX_shadow +#define GL_TEXTURE_COMPARE_SGIX 0x819A +#define GL_TEXTURE_COMPARE_OPERATOR_SGIX 0x819B +#define GL_TEXTURE_LEQUAL_R_SGIX 0x819C +#define GL_TEXTURE_GEQUAL_R_SGIX 0x819D +#endif + +#ifndef GL_SGIS_texture_edge_clamp +#define GL_CLAMP_TO_EDGE_SGIS 0x812F +#endif + +#ifndef GL_SGIS_texture_border_clamp +#define GL_CLAMP_TO_BORDER_SGIS 0x812D +#endif + +#ifndef GL_EXT_blend_minmax +#define GL_FUNC_ADD_EXT 0x8006 +#define GL_MIN_EXT 0x8007 +#define GL_MAX_EXT 0x8008 +#define GL_BLEND_EQUATION_EXT 0x8009 +#endif + +#ifndef GL_EXT_blend_subtract +#define GL_FUNC_SUBTRACT_EXT 0x800A +#define GL_FUNC_REVERSE_SUBTRACT_EXT 0x800B +#endif + +#ifndef GL_EXT_blend_logic_op +#endif + +#ifndef GL_SGIX_interlace +#define GL_INTERLACE_SGIX 0x8094 +#endif + +#ifndef GL_SGIX_pixel_tiles +#define GL_PIXEL_TILE_BEST_ALIGNMENT_SGIX 0x813E +#define GL_PIXEL_TILE_CACHE_INCREMENT_SGIX 0x813F +#define GL_PIXEL_TILE_WIDTH_SGIX 0x8140 +#define GL_PIXEL_TILE_HEIGHT_SGIX 0x8141 +#define GL_PIXEL_TILE_GRID_WIDTH_SGIX 0x8142 +#define GL_PIXEL_TILE_GRID_HEIGHT_SGIX 0x8143 +#define GL_PIXEL_TILE_GRID_DEPTH_SGIX 0x8144 +#define GL_PIXEL_TILE_CACHE_SIZE_SGIX 0x8145 +#endif + +#ifndef GL_SGIS_texture_select +#define GL_DUAL_ALPHA4_SGIS 0x8110 +#define GL_DUAL_ALPHA8_SGIS 0x8111 +#define GL_DUAL_ALPHA12_SGIS 0x8112 +#define GL_DUAL_ALPHA16_SGIS 0x8113 +#define GL_DUAL_LUMINANCE4_SGIS 0x8114 +#define GL_DUAL_LUMINANCE8_SGIS 0x8115 +#define GL_DUAL_LUMINANCE12_SGIS 0x8116 +#define GL_DUAL_LUMINANCE16_SGIS 0x8117 +#define GL_DUAL_INTENSITY4_SGIS 0x8118 +#define GL_DUAL_INTENSITY8_SGIS 0x8119 +#define GL_DUAL_INTENSITY12_SGIS 0x811A +#define GL_DUAL_INTENSITY16_SGIS 0x811B +#define GL_DUAL_LUMINANCE_ALPHA4_SGIS 0x811C +#define GL_DUAL_LUMINANCE_ALPHA8_SGIS 0x811D +#define GL_QUAD_ALPHA4_SGIS 0x811E +#define GL_QUAD_ALPHA8_SGIS 0x811F +#define GL_QUAD_LUMINANCE4_SGIS 0x8120 +#define GL_QUAD_LUMINANCE8_SGIS 0x8121 +#define GL_QUAD_INTENSITY4_SGIS 0x8122 +#define GL_QUAD_INTENSITY8_SGIS 0x8123 +#define GL_DUAL_TEXTURE_SELECT_SGIS 0x8124 +#define GL_QUAD_TEXTURE_SELECT_SGIS 0x8125 +#endif + +#ifndef GL_SGIX_sprite +#define GL_SPRITE_SGIX 0x8148 +#define GL_SPRITE_MODE_SGIX 0x8149 +#define GL_SPRITE_AXIS_SGIX 0x814A +#define GL_SPRITE_TRANSLATION_SGIX 0x814B +#define GL_SPRITE_AXIAL_SGIX 0x814C +#define GL_SPRITE_OBJECT_ALIGNED_SGIX 0x814D +#define GL_SPRITE_EYE_ALIGNED_SGIX 0x814E +#endif + +#ifndef GL_SGIX_texture_multi_buffer +#define GL_TEXTURE_MULTI_BUFFER_HINT_SGIX 0x812E +#endif + +#ifndef GL_EXT_point_parameters +#define GL_POINT_SIZE_MIN_EXT 0x8126 +#define GL_POINT_SIZE_MAX_EXT 0x8127 +#define GL_POINT_FADE_THRESHOLD_SIZE_EXT 0x8128 +#define GL_DISTANCE_ATTENUATION_EXT 0x8129 +#endif + +#ifndef GL_SGIS_point_parameters +#define GL_POINT_SIZE_MIN_SGIS 0x8126 +#define GL_POINT_SIZE_MAX_SGIS 0x8127 +#define GL_POINT_FADE_THRESHOLD_SIZE_SGIS 0x8128 +#define GL_DISTANCE_ATTENUATION_SGIS 0x8129 +#endif + +#ifndef GL_SGIX_instruments +#define GL_INSTRUMENT_BUFFER_POINTER_SGIX 0x8180 +#define GL_INSTRUMENT_MEASUREMENTS_SGIX 0x8181 +#endif + +#ifndef GL_SGIX_texture_scale_bias +#define GL_POST_TEXTURE_FILTER_BIAS_SGIX 0x8179 +#define GL_POST_TEXTURE_FILTER_SCALE_SGIX 0x817A +#define GL_POST_TEXTURE_FILTER_BIAS_RANGE_SGIX 0x817B +#define GL_POST_TEXTURE_FILTER_SCALE_RANGE_SGIX 0x817C +#endif + +#ifndef GL_SGIX_framezoom +#define GL_FRAMEZOOM_SGIX 0x818B +#define GL_FRAMEZOOM_FACTOR_SGIX 0x818C +#define GL_MAX_FRAMEZOOM_FACTOR_SGIX 0x818D +#endif + +#ifndef GL_SGIX_tag_sample_buffer +#endif + +#ifndef GL_FfdMaskSGIX +#define GL_TEXTURE_DEFORMATION_BIT_SGIX 0x00000001 +#define GL_GEOMETRY_DEFORMATION_BIT_SGIX 0x00000002 +#endif + +#ifndef GL_SGIX_polynomial_ffd +#define GL_GEOMETRY_DEFORMATION_SGIX 0x8194 +#define GL_TEXTURE_DEFORMATION_SGIX 0x8195 +#define GL_DEFORMATIONS_MASK_SGIX 0x8196 +#define GL_MAX_DEFORMATION_ORDER_SGIX 0x8197 +#endif + +#ifndef GL_SGIX_reference_plane +#define GL_REFERENCE_PLANE_SGIX 0x817D +#define GL_REFERENCE_PLANE_EQUATION_SGIX 0x817E +#endif + +#ifndef GL_SGIX_flush_raster +#endif + +#ifndef GL_SGIX_depth_texture +#define GL_DEPTH_COMPONENT16_SGIX 0x81A5 +#define GL_DEPTH_COMPONENT24_SGIX 0x81A6 +#define GL_DEPTH_COMPONENT32_SGIX 0x81A7 +#endif + +#ifndef GL_SGIS_fog_function +#define GL_FOG_FUNC_SGIS 0x812A +#define GL_FOG_FUNC_POINTS_SGIS 0x812B +#define GL_MAX_FOG_FUNC_POINTS_SGIS 0x812C +#endif + +#ifndef GL_SGIX_fog_offset +#define GL_FOG_OFFSET_SGIX 0x8198 +#define GL_FOG_OFFSET_VALUE_SGIX 0x8199 +#endif + +#ifndef GL_HP_image_transform +#define GL_IMAGE_SCALE_X_HP 0x8155 +#define GL_IMAGE_SCALE_Y_HP 0x8156 +#define GL_IMAGE_TRANSLATE_X_HP 0x8157 +#define GL_IMAGE_TRANSLATE_Y_HP 0x8158 +#define GL_IMAGE_ROTATE_ANGLE_HP 0x8159 +#define GL_IMAGE_ROTATE_ORIGIN_X_HP 0x815A +#define GL_IMAGE_ROTATE_ORIGIN_Y_HP 0x815B +#define GL_IMAGE_MAG_FILTER_HP 0x815C +#define GL_IMAGE_MIN_FILTER_HP 0x815D +#define GL_IMAGE_CUBIC_WEIGHT_HP 0x815E +#define GL_CUBIC_HP 0x815F +#define GL_AVERAGE_HP 0x8160 +#define GL_IMAGE_TRANSFORM_2D_HP 0x8161 +#define GL_POST_IMAGE_TRANSFORM_COLOR_TABLE_HP 0x8162 +#define GL_PROXY_POST_IMAGE_TRANSFORM_COLOR_TABLE_HP 0x8163 +#endif + +#ifndef GL_HP_convolution_border_modes +#define GL_IGNORE_BORDER_HP 0x8150 +#define GL_CONSTANT_BORDER_HP 0x8151 +#define GL_REPLICATE_BORDER_HP 0x8153 +#define GL_CONVOLUTION_BORDER_COLOR_HP 0x8154 +#endif + +#ifndef GL_INGR_palette_buffer +#endif + +#ifndef GL_SGIX_texture_add_env +#define GL_TEXTURE_ENV_BIAS_SGIX 0x80BE +#endif + +#ifndef GL_EXT_color_subtable +#endif + +#ifndef GL_PGI_vertex_hints +#define GL_VERTEX_DATA_HINT_PGI 0x1A22A +#define GL_VERTEX_CONSISTENT_HINT_PGI 0x1A22B +#define GL_MATERIAL_SIDE_HINT_PGI 0x1A22C +#define GL_MAX_VERTEX_HINT_PGI 0x1A22D +#define GL_COLOR3_BIT_PGI 0x00010000 +#define GL_COLOR4_BIT_PGI 0x00020000 +#define GL_EDGEFLAG_BIT_PGI 0x00040000 +#define GL_INDEX_BIT_PGI 0x00080000 +#define GL_MAT_AMBIENT_BIT_PGI 0x00100000 +#define GL_MAT_AMBIENT_AND_DIFFUSE_BIT_PGI 0x00200000 +#define GL_MAT_DIFFUSE_BIT_PGI 0x00400000 +#define GL_MAT_EMISSION_BIT_PGI 0x00800000 +#define GL_MAT_COLOR_INDEXES_BIT_PGI 0x01000000 +#define GL_MAT_SHININESS_BIT_PGI 0x02000000 +#define GL_MAT_SPECULAR_BIT_PGI 0x04000000 +#define GL_NORMAL_BIT_PGI 0x08000000 +#define GL_TEXCOORD1_BIT_PGI 0x10000000 +#define GL_TEXCOORD2_BIT_PGI 0x20000000 +#define GL_TEXCOORD3_BIT_PGI 0x40000000 +#define GL_TEXCOORD4_BIT_PGI 0x80000000 +#define GL_VERTEX23_BIT_PGI 0x00000004 +#define GL_VERTEX4_BIT_PGI 0x00000008 +#endif + +#ifndef GL_PGI_misc_hints +#define GL_PREFER_DOUBLEBUFFER_HINT_PGI 0x1A1F8 +#define GL_CONSERVE_MEMORY_HINT_PGI 0x1A1FD +#define GL_RECLAIM_MEMORY_HINT_PGI 0x1A1FE +#define GL_NATIVE_GRAPHICS_HANDLE_PGI 0x1A202 +#define GL_NATIVE_GRAPHICS_BEGIN_HINT_PGI 0x1A203 +#define GL_NATIVE_GRAPHICS_END_HINT_PGI 0x1A204 +#define GL_ALWAYS_FAST_HINT_PGI 0x1A20C +#define GL_ALWAYS_SOFT_HINT_PGI 0x1A20D +#define GL_ALLOW_DRAW_OBJ_HINT_PGI 0x1A20E +#define GL_ALLOW_DRAW_WIN_HINT_PGI 0x1A20F +#define GL_ALLOW_DRAW_FRG_HINT_PGI 0x1A210 +#define GL_ALLOW_DRAW_MEM_HINT_PGI 0x1A211 +#define GL_STRICT_DEPTHFUNC_HINT_PGI 0x1A216 +#define GL_STRICT_LIGHTING_HINT_PGI 0x1A217 +#define GL_STRICT_SCISSOR_HINT_PGI 0x1A218 +#define GL_FULL_STIPPLE_HINT_PGI 0x1A219 +#define GL_CLIP_NEAR_HINT_PGI 0x1A220 +#define GL_CLIP_FAR_HINT_PGI 0x1A221 +#define GL_WIDE_LINE_HINT_PGI 0x1A222 +#define GL_BACK_NORMALS_HINT_PGI 0x1A223 +#endif + +#ifndef GL_EXT_paletted_texture +#define GL_COLOR_INDEX1_EXT 0x80E2 +#define GL_COLOR_INDEX2_EXT 0x80E3 +#define GL_COLOR_INDEX4_EXT 0x80E4 +#define GL_COLOR_INDEX8_EXT 0x80E5 +#define GL_COLOR_INDEX12_EXT 0x80E6 +#define GL_COLOR_INDEX16_EXT 0x80E7 +#define GL_TEXTURE_INDEX_SIZE_EXT 0x80ED +#endif + +#ifndef GL_EXT_clip_volume_hint +#define GL_CLIP_VOLUME_CLIPPING_HINT_EXT 0x80F0 +#endif + +#ifndef GL_SGIX_list_priority +#define GL_LIST_PRIORITY_SGIX 0x8182 +#endif + +#ifndef GL_SGIX_ir_instrument1 +#define GL_IR_INSTRUMENT1_SGIX 0x817F +#endif + +#ifndef GL_SGIX_calligraphic_fragment +#define GL_CALLIGRAPHIC_FRAGMENT_SGIX 0x8183 +#endif + +#ifndef GL_SGIX_texture_lod_bias +#define GL_TEXTURE_LOD_BIAS_S_SGIX 0x818E +#define GL_TEXTURE_LOD_BIAS_T_SGIX 0x818F +#define GL_TEXTURE_LOD_BIAS_R_SGIX 0x8190 +#endif + +#ifndef GL_SGIX_shadow_ambient +#define GL_SHADOW_AMBIENT_SGIX 0x80BF +#endif + +#ifndef GL_EXT_index_texture +#endif + +#ifndef GL_EXT_index_material +#define GL_INDEX_MATERIAL_EXT 0x81B8 +#define GL_INDEX_MATERIAL_PARAMETER_EXT 0x81B9 +#define GL_INDEX_MATERIAL_FACE_EXT 0x81BA +#endif + +#ifndef GL_EXT_index_func +#define GL_INDEX_TEST_EXT 0x81B5 +#define GL_INDEX_TEST_FUNC_EXT 0x81B6 +#define GL_INDEX_TEST_REF_EXT 0x81B7 +#endif + +#ifndef GL_EXT_index_array_formats +#define GL_IUI_V2F_EXT 0x81AD +#define GL_IUI_V3F_EXT 0x81AE +#define GL_IUI_N3F_V2F_EXT 0x81AF +#define GL_IUI_N3F_V3F_EXT 0x81B0 +#define GL_T2F_IUI_V2F_EXT 0x81B1 +#define GL_T2F_IUI_V3F_EXT 0x81B2 +#define GL_T2F_IUI_N3F_V2F_EXT 0x81B3 +#define GL_T2F_IUI_N3F_V3F_EXT 0x81B4 +#endif + +#ifndef GL_EXT_compiled_vertex_array +#define GL_ARRAY_ELEMENT_LOCK_FIRST_EXT 0x81A8 +#define GL_ARRAY_ELEMENT_LOCK_COUNT_EXT 0x81A9 +#endif + +#ifndef GL_EXT_cull_vertex +#define GL_CULL_VERTEX_EXT 0x81AA +#define GL_CULL_VERTEX_EYE_POSITION_EXT 0x81AB +#define GL_CULL_VERTEX_OBJECT_POSITION_EXT 0x81AC +#endif + +#ifndef GL_SGIX_ycrcb +#define GL_YCRCB_422_SGIX 0x81BB +#define GL_YCRCB_444_SGIX 0x81BC +#endif + +#ifndef GL_SGIX_fragment_lighting +#define GL_FRAGMENT_LIGHTING_SGIX 0x8400 +#define GL_FRAGMENT_COLOR_MATERIAL_SGIX 0x8401 +#define GL_FRAGMENT_COLOR_MATERIAL_FACE_SGIX 0x8402 +#define GL_FRAGMENT_COLOR_MATERIAL_PARAMETER_SGIX 0x8403 +#define GL_MAX_FRAGMENT_LIGHTS_SGIX 0x8404 +#define GL_MAX_ACTIVE_LIGHTS_SGIX 0x8405 +#define GL_CURRENT_RASTER_NORMAL_SGIX 0x8406 +#define GL_LIGHT_ENV_MODE_SGIX 0x8407 +#define GL_FRAGMENT_LIGHT_MODEL_LOCAL_VIEWER_SGIX 0x8408 +#define GL_FRAGMENT_LIGHT_MODEL_TWO_SIDE_SGIX 0x8409 +#define GL_FRAGMENT_LIGHT_MODEL_AMBIENT_SGIX 0x840A +#define GL_FRAGMENT_LIGHT_MODEL_NORMAL_INTERPOLATION_SGIX 0x840B +#define GL_FRAGMENT_LIGHT0_SGIX 0x840C +#define GL_FRAGMENT_LIGHT1_SGIX 0x840D +#define GL_FRAGMENT_LIGHT2_SGIX 0x840E +#define GL_FRAGMENT_LIGHT3_SGIX 0x840F +#define GL_FRAGMENT_LIGHT4_SGIX 0x8410 +#define GL_FRAGMENT_LIGHT5_SGIX 0x8411 +#define GL_FRAGMENT_LIGHT6_SGIX 0x8412 +#define GL_FRAGMENT_LIGHT7_SGIX 0x8413 +#endif + +#ifndef GL_IBM_rasterpos_clip +#define GL_RASTER_POSITION_UNCLIPPED_IBM 0x19262 +#endif + +#ifndef GL_HP_texture_lighting +#define GL_TEXTURE_LIGHTING_MODE_HP 0x8167 +#define GL_TEXTURE_POST_SPECULAR_HP 0x8168 +#define GL_TEXTURE_PRE_SPECULAR_HP 0x8169 +#endif + +#ifndef GL_EXT_draw_range_elements +#define GL_MAX_ELEMENTS_VERTICES_EXT 0x80E8 +#define GL_MAX_ELEMENTS_INDICES_EXT 0x80E9 +#endif + +#ifndef GL_WIN_phong_shading +#define GL_PHONG_WIN 0x80EA +#define GL_PHONG_HINT_WIN 0x80EB +#endif + +#ifndef GL_WIN_specular_fog +#define GL_FOG_SPECULAR_TEXTURE_WIN 0x80EC +#endif + +#ifndef GL_EXT_light_texture +#define GL_FRAGMENT_MATERIAL_EXT 0x8349 +#define GL_FRAGMENT_NORMAL_EXT 0x834A +#define GL_FRAGMENT_COLOR_EXT 0x834C +#define GL_ATTENUATION_EXT 0x834D +#define GL_SHADOW_ATTENUATION_EXT 0x834E +#define GL_TEXTURE_APPLICATION_MODE_EXT 0x834F +#define GL_TEXTURE_LIGHT_EXT 0x8350 +#define GL_TEXTURE_MATERIAL_FACE_EXT 0x8351 +#define GL_TEXTURE_MATERIAL_PARAMETER_EXT 0x8352 +/* reuse GL_FRAGMENT_DEPTH_EXT */ +#endif + +#ifndef GL_SGIX_blend_alpha_minmax +#define GL_ALPHA_MIN_SGIX 0x8320 +#define GL_ALPHA_MAX_SGIX 0x8321 +#endif + +#ifndef GL_SGIX_impact_pixel_texture +#define GL_PIXEL_TEX_GEN_Q_CEILING_SGIX 0x8184 +#define GL_PIXEL_TEX_GEN_Q_ROUND_SGIX 0x8185 +#define GL_PIXEL_TEX_GEN_Q_FLOOR_SGIX 0x8186 +#define GL_PIXEL_TEX_GEN_ALPHA_REPLACE_SGIX 0x8187 +#define GL_PIXEL_TEX_GEN_ALPHA_NO_REPLACE_SGIX 0x8188 +#define GL_PIXEL_TEX_GEN_ALPHA_LS_SGIX 0x8189 +#define GL_PIXEL_TEX_GEN_ALPHA_MS_SGIX 0x818A +#endif + +#ifndef GL_EXT_bgra +#define GL_BGR_EXT 0x80E0 +#define GL_BGRA_EXT 0x80E1 +#endif + +#ifndef GL_SGIX_async +#define GL_ASYNC_MARKER_SGIX 0x8329 +#endif + +#ifndef GL_SGIX_async_pixel +#define GL_ASYNC_TEX_IMAGE_SGIX 0x835C +#define GL_ASYNC_DRAW_PIXELS_SGIX 0x835D +#define GL_ASYNC_READ_PIXELS_SGIX 0x835E +#define GL_MAX_ASYNC_TEX_IMAGE_SGIX 0x835F +#define GL_MAX_ASYNC_DRAW_PIXELS_SGIX 0x8360 +#define GL_MAX_ASYNC_READ_PIXELS_SGIX 0x8361 +#endif + +#ifndef GL_SGIX_async_histogram +#define GL_ASYNC_HISTOGRAM_SGIX 0x832C +#define GL_MAX_ASYNC_HISTOGRAM_SGIX 0x832D +#endif + +#ifndef GL_INTEL_texture_scissor +#endif + +#ifndef GL_INTEL_parallel_arrays +#define GL_PARALLEL_ARRAYS_INTEL 0x83F4 +#define GL_VERTEX_ARRAY_PARALLEL_POINTERS_INTEL 0x83F5 +#define GL_NORMAL_ARRAY_PARALLEL_POINTERS_INTEL 0x83F6 +#define GL_COLOR_ARRAY_PARALLEL_POINTERS_INTEL 0x83F7 +#define GL_TEXTURE_COORD_ARRAY_PARALLEL_POINTERS_INTEL 0x83F8 +#endif + +#ifndef GL_HP_occlusion_test +#define GL_OCCLUSION_TEST_HP 0x8165 +#define GL_OCCLUSION_TEST_RESULT_HP 0x8166 +#endif + +#ifndef GL_EXT_pixel_transform +#define GL_PIXEL_TRANSFORM_2D_EXT 0x8330 +#define GL_PIXEL_MAG_FILTER_EXT 0x8331 +#define GL_PIXEL_MIN_FILTER_EXT 0x8332 +#define GL_PIXEL_CUBIC_WEIGHT_EXT 0x8333 +#define GL_CUBIC_EXT 0x8334 +#define GL_AVERAGE_EXT 0x8335 +#define GL_PIXEL_TRANSFORM_2D_STACK_DEPTH_EXT 0x8336 +#define GL_MAX_PIXEL_TRANSFORM_2D_STACK_DEPTH_EXT 0x8337 +#define GL_PIXEL_TRANSFORM_2D_MATRIX_EXT 0x8338 +#endif + +#ifndef GL_EXT_pixel_transform_color_table +#endif + +#ifndef GL_EXT_shared_texture_palette +#define GL_SHARED_TEXTURE_PALETTE_EXT 0x81FB +#endif + +#ifndef GL_EXT_separate_specular_color +#define GL_LIGHT_MODEL_COLOR_CONTROL_EXT 0x81F8 +#define GL_SINGLE_COLOR_EXT 0x81F9 +#define GL_SEPARATE_SPECULAR_COLOR_EXT 0x81FA +#endif + +#ifndef GL_EXT_secondary_color +#define GL_COLOR_SUM_EXT 0x8458 +#define GL_CURRENT_SECONDARY_COLOR_EXT 0x8459 +#define GL_SECONDARY_COLOR_ARRAY_SIZE_EXT 0x845A +#define GL_SECONDARY_COLOR_ARRAY_TYPE_EXT 0x845B +#define GL_SECONDARY_COLOR_ARRAY_STRIDE_EXT 0x845C +#define GL_SECONDARY_COLOR_ARRAY_POINTER_EXT 0x845D +#define GL_SECONDARY_COLOR_ARRAY_EXT 0x845E +#endif + +#ifndef GL_EXT_texture_perturb_normal +#define GL_PERTURB_EXT 0x85AE +#define GL_TEXTURE_NORMAL_EXT 0x85AF +#endif + +#ifndef GL_EXT_multi_draw_arrays +#endif + +#ifndef GL_EXT_fog_coord +#define GL_FOG_COORDINATE_SOURCE_EXT 0x8450 +#define GL_FOG_COORDINATE_EXT 0x8451 +#define GL_FRAGMENT_DEPTH_EXT 0x8452 +#define GL_CURRENT_FOG_COORDINATE_EXT 0x8453 +#define GL_FOG_COORDINATE_ARRAY_TYPE_EXT 0x8454 +#define GL_FOG_COORDINATE_ARRAY_STRIDE_EXT 0x8455 +#define GL_FOG_COORDINATE_ARRAY_POINTER_EXT 0x8456 +#define GL_FOG_COORDINATE_ARRAY_EXT 0x8457 +#endif + +#ifndef GL_REND_screen_coordinates +#define GL_SCREEN_COORDINATES_REND 0x8490 +#define GL_INVERTED_SCREEN_W_REND 0x8491 +#endif + +#ifndef GL_EXT_coordinate_frame +#define GL_TANGENT_ARRAY_EXT 0x8439 +#define GL_BINORMAL_ARRAY_EXT 0x843A +#define GL_CURRENT_TANGENT_EXT 0x843B +#define GL_CURRENT_BINORMAL_EXT 0x843C +#define GL_TANGENT_ARRAY_TYPE_EXT 0x843E +#define GL_TANGENT_ARRAY_STRIDE_EXT 0x843F +#define GL_BINORMAL_ARRAY_TYPE_EXT 0x8440 +#define GL_BINORMAL_ARRAY_STRIDE_EXT 0x8441 +#define GL_TANGENT_ARRAY_POINTER_EXT 0x8442 +#define GL_BINORMAL_ARRAY_POINTER_EXT 0x8443 +#define GL_MAP1_TANGENT_EXT 0x8444 +#define GL_MAP2_TANGENT_EXT 0x8445 +#define GL_MAP1_BINORMAL_EXT 0x8446 +#define GL_MAP2_BINORMAL_EXT 0x8447 +#endif + +#ifndef GL_EXT_texture_env_combine +#define GL_COMBINE_EXT 0x8570 +#define GL_COMBINE_RGB_EXT 0x8571 +#define GL_COMBINE_ALPHA_EXT 0x8572 +#define GL_RGB_SCALE_EXT 0x8573 +#define GL_ADD_SIGNED_EXT 0x8574 +#define GL_INTERPOLATE_EXT 0x8575 +#define GL_CONSTANT_EXT 0x8576 +#define GL_PRIMARY_COLOR_EXT 0x8577 +#define GL_PREVIOUS_EXT 0x8578 +#define GL_SOURCE0_RGB_EXT 0x8580 +#define GL_SOURCE1_RGB_EXT 0x8581 +#define GL_SOURCE2_RGB_EXT 0x8582 +#define GL_SOURCE0_ALPHA_EXT 0x8588 +#define GL_SOURCE1_ALPHA_EXT 0x8589 +#define GL_SOURCE2_ALPHA_EXT 0x858A +#define GL_OPERAND0_RGB_EXT 0x8590 +#define GL_OPERAND1_RGB_EXT 0x8591 +#define GL_OPERAND2_RGB_EXT 0x8592 +#define GL_OPERAND0_ALPHA_EXT 0x8598 +#define GL_OPERAND1_ALPHA_EXT 0x8599 +#define GL_OPERAND2_ALPHA_EXT 0x859A +#endif + +#ifndef GL_APPLE_specular_vector +#define GL_LIGHT_MODEL_SPECULAR_VECTOR_APPLE 0x85B0 +#endif + +#ifndef GL_APPLE_transform_hint +#define GL_TRANSFORM_HINT_APPLE 0x85B1 +#endif + +#ifndef GL_SGIX_fog_scale +#define GL_FOG_SCALE_SGIX 0x81FC +#define GL_FOG_SCALE_VALUE_SGIX 0x81FD +#endif + +#ifndef GL_SUNX_constant_data +#define GL_UNPACK_CONSTANT_DATA_SUNX 0x81D5 +#define GL_TEXTURE_CONSTANT_DATA_SUNX 0x81D6 +#endif + +#ifndef GL_SUN_global_alpha +#define GL_GLOBAL_ALPHA_SUN 0x81D9 +#define GL_GLOBAL_ALPHA_FACTOR_SUN 0x81DA +#endif + +#ifndef GL_SUN_triangle_list +#define GL_RESTART_SUN 0x0001 +#define GL_REPLACE_MIDDLE_SUN 0x0002 +#define GL_REPLACE_OLDEST_SUN 0x0003 +#define GL_TRIANGLE_LIST_SUN 0x81D7 +#define GL_REPLACEMENT_CODE_SUN 0x81D8 +#define GL_REPLACEMENT_CODE_ARRAY_SUN 0x85C0 +#define GL_REPLACEMENT_CODE_ARRAY_TYPE_SUN 0x85C1 +#define GL_REPLACEMENT_CODE_ARRAY_STRIDE_SUN 0x85C2 +#define GL_REPLACEMENT_CODE_ARRAY_POINTER_SUN 0x85C3 +#define GL_R1UI_V3F_SUN 0x85C4 +#define GL_R1UI_C4UB_V3F_SUN 0x85C5 +#define GL_R1UI_C3F_V3F_SUN 0x85C6 +#define GL_R1UI_N3F_V3F_SUN 0x85C7 +#define GL_R1UI_C4F_N3F_V3F_SUN 0x85C8 +#define GL_R1UI_T2F_V3F_SUN 0x85C9 +#define GL_R1UI_T2F_N3F_V3F_SUN 0x85CA +#define GL_R1UI_T2F_C4F_N3F_V3F_SUN 0x85CB +#endif + +#ifndef GL_SUN_vertex +#endif + +#ifndef GL_EXT_blend_func_separate +#define GL_BLEND_DST_RGB_EXT 0x80C8 +#define GL_BLEND_SRC_RGB_EXT 0x80C9 +#define GL_BLEND_DST_ALPHA_EXT 0x80CA +#define GL_BLEND_SRC_ALPHA_EXT 0x80CB +#endif + +#ifndef GL_INGR_color_clamp +#define GL_RED_MIN_CLAMP_INGR 0x8560 +#define GL_GREEN_MIN_CLAMP_INGR 0x8561 +#define GL_BLUE_MIN_CLAMP_INGR 0x8562 +#define GL_ALPHA_MIN_CLAMP_INGR 0x8563 +#define GL_RED_MAX_CLAMP_INGR 0x8564 +#define GL_GREEN_MAX_CLAMP_INGR 0x8565 +#define GL_BLUE_MAX_CLAMP_INGR 0x8566 +#define GL_ALPHA_MAX_CLAMP_INGR 0x8567 +#endif + +#ifndef GL_INGR_interlace_read +#define GL_INTERLACE_READ_INGR 0x8568 +#endif + +#ifndef GL_EXT_stencil_wrap +#define GL_INCR_WRAP_EXT 0x8507 +#define GL_DECR_WRAP_EXT 0x8508 +#endif + +#ifndef GL_EXT_422_pixels +#define GL_422_EXT 0x80CC +#define GL_422_REV_EXT 0x80CD +#define GL_422_AVERAGE_EXT 0x80CE +#define GL_422_REV_AVERAGE_EXT 0x80CF +#endif + +#ifndef GL_NV_texgen_reflection +#define GL_NORMAL_MAP_NV 0x8511 +#define GL_REFLECTION_MAP_NV 0x8512 +#endif + +#ifndef GL_EXT_texture_cube_map +#define GL_NORMAL_MAP_EXT 0x8511 +#define GL_REFLECTION_MAP_EXT 0x8512 +#define GL_TEXTURE_CUBE_MAP_EXT 0x8513 +#define GL_TEXTURE_BINDING_CUBE_MAP_EXT 0x8514 +#define GL_TEXTURE_CUBE_MAP_POSITIVE_X_EXT 0x8515 +#define GL_TEXTURE_CUBE_MAP_NEGATIVE_X_EXT 0x8516 +#define GL_TEXTURE_CUBE_MAP_POSITIVE_Y_EXT 0x8517 +#define GL_TEXTURE_CUBE_MAP_NEGATIVE_Y_EXT 0x8518 +#define GL_TEXTURE_CUBE_MAP_POSITIVE_Z_EXT 0x8519 +#define GL_TEXTURE_CUBE_MAP_NEGATIVE_Z_EXT 0x851A +#define GL_PROXY_TEXTURE_CUBE_MAP_EXT 0x851B +#define GL_MAX_CUBE_MAP_TEXTURE_SIZE_EXT 0x851C +#endif + +#ifndef GL_SUN_convolution_border_modes +#define GL_WRAP_BORDER_SUN 0x81D4 +#endif + +#ifndef GL_EXT_texture_env_add +#endif + +#ifndef GL_EXT_texture_lod_bias +#define GL_MAX_TEXTURE_LOD_BIAS_EXT 0x84FD +#define GL_TEXTURE_FILTER_CONTROL_EXT 0x8500 +#define GL_TEXTURE_LOD_BIAS_EXT 0x8501 +#endif + +#ifndef GL_EXT_texture_filter_anisotropic +#define GL_TEXTURE_MAX_ANISOTROPY_EXT 0x84FE +#define GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT 0x84FF +#endif + +#ifndef GL_EXT_vertex_weighting +#define GL_MODELVIEW0_STACK_DEPTH_EXT GL_MODELVIEW_STACK_DEPTH +#define GL_MODELVIEW1_STACK_DEPTH_EXT 0x8502 +#define GL_MODELVIEW0_MATRIX_EXT GL_MODELVIEW_MATRIX +#define GL_MODELVIEW1_MATRIX_EXT 0x8506 +#define GL_VERTEX_WEIGHTING_EXT 0x8509 +#define GL_MODELVIEW0_EXT GL_MODELVIEW +#define GL_MODELVIEW1_EXT 0x850A +#define GL_CURRENT_VERTEX_WEIGHT_EXT 0x850B +#define GL_VERTEX_WEIGHT_ARRAY_EXT 0x850C +#define GL_VERTEX_WEIGHT_ARRAY_SIZE_EXT 0x850D +#define GL_VERTEX_WEIGHT_ARRAY_TYPE_EXT 0x850E +#define GL_VERTEX_WEIGHT_ARRAY_STRIDE_EXT 0x850F +#define GL_VERTEX_WEIGHT_ARRAY_POINTER_EXT 0x8510 +#endif + +#ifndef GL_NV_light_max_exponent +#define GL_MAX_SHININESS_NV 0x8504 +#define GL_MAX_SPOT_EXPONENT_NV 0x8505 +#endif + +#ifndef GL_NV_vertex_array_range +#define GL_VERTEX_ARRAY_RANGE_NV 0x851D +#define GL_VERTEX_ARRAY_RANGE_LENGTH_NV 0x851E +#define GL_VERTEX_ARRAY_RANGE_VALID_NV 0x851F +#define GL_MAX_VERTEX_ARRAY_RANGE_ELEMENT_NV 0x8520 +#define GL_VERTEX_ARRAY_RANGE_POINTER_NV 0x8521 +#endif + +#ifndef GL_NV_register_combiners +#define GL_REGISTER_COMBINERS_NV 0x8522 +#define GL_VARIABLE_A_NV 0x8523 +#define GL_VARIABLE_B_NV 0x8524 +#define GL_VARIABLE_C_NV 0x8525 +#define GL_VARIABLE_D_NV 0x8526 +#define GL_VARIABLE_E_NV 0x8527 +#define GL_VARIABLE_F_NV 0x8528 +#define GL_VARIABLE_G_NV 0x8529 +#define GL_CONSTANT_COLOR0_NV 0x852A +#define GL_CONSTANT_COLOR1_NV 0x852B +#define GL_PRIMARY_COLOR_NV 0x852C +#define GL_SECONDARY_COLOR_NV 0x852D +#define GL_SPARE0_NV 0x852E +#define GL_SPARE1_NV 0x852F +#define GL_DISCARD_NV 0x8530 +#define GL_E_TIMES_F_NV 0x8531 +#define GL_SPARE0_PLUS_SECONDARY_COLOR_NV 0x8532 +#define GL_UNSIGNED_IDENTITY_NV 0x8536 +#define GL_UNSIGNED_INVERT_NV 0x8537 +#define GL_EXPAND_NORMAL_NV 0x8538 +#define GL_EXPAND_NEGATE_NV 0x8539 +#define GL_HALF_BIAS_NORMAL_NV 0x853A +#define GL_HALF_BIAS_NEGATE_NV 0x853B +#define GL_SIGNED_IDENTITY_NV 0x853C +#define GL_SIGNED_NEGATE_NV 0x853D +#define GL_SCALE_BY_TWO_NV 0x853E +#define GL_SCALE_BY_FOUR_NV 0x853F +#define GL_SCALE_BY_ONE_HALF_NV 0x8540 +#define GL_BIAS_BY_NEGATIVE_ONE_HALF_NV 0x8541 +#define GL_COMBINER_INPUT_NV 0x8542 +#define GL_COMBINER_MAPPING_NV 0x8543 +#define GL_COMBINER_COMPONENT_USAGE_NV 0x8544 +#define GL_COMBINER_AB_DOT_PRODUCT_NV 0x8545 +#define GL_COMBINER_CD_DOT_PRODUCT_NV 0x8546 +#define GL_COMBINER_MUX_SUM_NV 0x8547 +#define GL_COMBINER_SCALE_NV 0x8548 +#define GL_COMBINER_BIAS_NV 0x8549 +#define GL_COMBINER_AB_OUTPUT_NV 0x854A +#define GL_COMBINER_CD_OUTPUT_NV 0x854B +#define GL_COMBINER_SUM_OUTPUT_NV 0x854C +#define GL_MAX_GENERAL_COMBINERS_NV 0x854D +#define GL_NUM_GENERAL_COMBINERS_NV 0x854E +#define GL_COLOR_SUM_CLAMP_NV 0x854F +#define GL_COMBINER0_NV 0x8550 +#define GL_COMBINER1_NV 0x8551 +#define GL_COMBINER2_NV 0x8552 +#define GL_COMBINER3_NV 0x8553 +#define GL_COMBINER4_NV 0x8554 +#define GL_COMBINER5_NV 0x8555 +#define GL_COMBINER6_NV 0x8556 +#define GL_COMBINER7_NV 0x8557 +/* reuse GL_TEXTURE0_ARB */ +/* reuse GL_TEXTURE1_ARB */ +/* reuse GL_ZERO */ +/* reuse GL_NONE */ +/* reuse GL_FOG */ +#endif + +#ifndef GL_NV_fog_distance +#define GL_FOG_DISTANCE_MODE_NV 0x855A +#define GL_EYE_RADIAL_NV 0x855B +#define GL_EYE_PLANE_ABSOLUTE_NV 0x855C +/* reuse GL_EYE_PLANE */ +#endif + +#ifndef GL_NV_texgen_emboss +#define GL_EMBOSS_LIGHT_NV 0x855D +#define GL_EMBOSS_CONSTANT_NV 0x855E +#define GL_EMBOSS_MAP_NV 0x855F +#endif + +#ifndef GL_NV_blend_square +#endif + +#ifndef GL_NV_texture_env_combine4 +#define GL_COMBINE4_NV 0x8503 +#define GL_SOURCE3_RGB_NV 0x8583 +#define GL_SOURCE3_ALPHA_NV 0x858B +#define GL_OPERAND3_RGB_NV 0x8593 +#define GL_OPERAND3_ALPHA_NV 0x859B +#endif + +#ifndef GL_MESA_resize_buffers +#endif + +#ifndef GL_MESA_window_pos +#endif + +#ifndef GL_EXT_texture_compression_s3tc +#define GL_COMPRESSED_RGB_S3TC_DXT1_EXT 0x83F0 +#define GL_COMPRESSED_RGBA_S3TC_DXT1_EXT 0x83F1 +#define GL_COMPRESSED_RGBA_S3TC_DXT3_EXT 0x83F2 +#define GL_COMPRESSED_RGBA_S3TC_DXT5_EXT 0x83F3 +#endif + +#ifndef GL_IBM_cull_vertex +#define GL_CULL_VERTEX_IBM 103050 +#endif + +#ifndef GL_IBM_multimode_draw_arrays +#endif + +#ifndef GL_IBM_vertex_array_lists +#define GL_VERTEX_ARRAY_LIST_IBM 103070 +#define GL_NORMAL_ARRAY_LIST_IBM 103071 +#define GL_COLOR_ARRAY_LIST_IBM 103072 +#define GL_INDEX_ARRAY_LIST_IBM 103073 +#define GL_TEXTURE_COORD_ARRAY_LIST_IBM 103074 +#define GL_EDGE_FLAG_ARRAY_LIST_IBM 103075 +#define GL_FOG_COORDINATE_ARRAY_LIST_IBM 103076 +#define GL_SECONDARY_COLOR_ARRAY_LIST_IBM 103077 +#define GL_VERTEX_ARRAY_LIST_STRIDE_IBM 103080 +#define GL_NORMAL_ARRAY_LIST_STRIDE_IBM 103081 +#define GL_COLOR_ARRAY_LIST_STRIDE_IBM 103082 +#define GL_INDEX_ARRAY_LIST_STRIDE_IBM 103083 +#define GL_TEXTURE_COORD_ARRAY_LIST_STRIDE_IBM 103084 +#define GL_EDGE_FLAG_ARRAY_LIST_STRIDE_IBM 103085 +#define GL_FOG_COORDINATE_ARRAY_LIST_STRIDE_IBM 103086 +#define GL_SECONDARY_COLOR_ARRAY_LIST_STRIDE_IBM 103087 +#endif + +#ifndef GL_SGIX_subsample +#define GL_PACK_SUBSAMPLE_RATE_SGIX 0x85A0 +#define GL_UNPACK_SUBSAMPLE_RATE_SGIX 0x85A1 +#define GL_PIXEL_SUBSAMPLE_4444_SGIX 0x85A2 +#define GL_PIXEL_SUBSAMPLE_2424_SGIX 0x85A3 +#define GL_PIXEL_SUBSAMPLE_4242_SGIX 0x85A4 +#endif + +#ifndef GL_SGIX_ycrcb_subsample +#endif + +#ifndef GL_SGIX_ycrcba +#define GL_YCRCB_SGIX 0x8318 +#define GL_YCRCBA_SGIX 0x8319 +#endif + +#ifndef GL_SGI_depth_pass_instrument +#define GL_DEPTH_PASS_INSTRUMENT_SGIX 0x8310 +#define GL_DEPTH_PASS_INSTRUMENT_COUNTERS_SGIX 0x8311 +#define GL_DEPTH_PASS_INSTRUMENT_MAX_SGIX 0x8312 +#endif + +#ifndef GL_3DFX_texture_compression_FXT1 +#define GL_COMPRESSED_RGB_FXT1_3DFX 0x86B0 +#define GL_COMPRESSED_RGBA_FXT1_3DFX 0x86B1 +#endif + +#ifndef GL_3DFX_multisample +#define GL_MULTISAMPLE_3DFX 0x86B2 +#define GL_SAMPLE_BUFFERS_3DFX 0x86B3 +#define GL_SAMPLES_3DFX 0x86B4 +#define GL_MULTISAMPLE_BIT_3DFX 0x20000000 +#endif + +#ifndef GL_3DFX_tbuffer +#endif + +#ifndef GL_EXT_multisample +#define GL_MULTISAMPLE_EXT 0x809D +#define GL_SAMPLE_ALPHA_TO_MASK_EXT 0x809E +#define GL_SAMPLE_ALPHA_TO_ONE_EXT 0x809F +#define GL_SAMPLE_MASK_EXT 0x80A0 +#define GL_1PASS_EXT 0x80A1 +#define GL_2PASS_0_EXT 0x80A2 +#define GL_2PASS_1_EXT 0x80A3 +#define GL_4PASS_0_EXT 0x80A4 +#define GL_4PASS_1_EXT 0x80A5 +#define GL_4PASS_2_EXT 0x80A6 +#define GL_4PASS_3_EXT 0x80A7 +#define GL_SAMPLE_BUFFERS_EXT 0x80A8 +#define GL_SAMPLES_EXT 0x80A9 +#define GL_SAMPLE_MASK_VALUE_EXT 0x80AA +#define GL_SAMPLE_MASK_INVERT_EXT 0x80AB +#define GL_SAMPLE_PATTERN_EXT 0x80AC +#define GL_MULTISAMPLE_BIT_EXT 0x20000000 +#endif + +#ifndef GL_SGIX_vertex_preclip +#define GL_VERTEX_PRECLIP_SGIX 0x83EE +#define GL_VERTEX_PRECLIP_HINT_SGIX 0x83EF +#endif + +#ifndef GL_SGIX_convolution_accuracy +#define GL_CONVOLUTION_HINT_SGIX 0x8316 +#endif + +#ifndef GL_SGIX_resample +#define GL_PACK_RESAMPLE_SGIX 0x842C +#define GL_UNPACK_RESAMPLE_SGIX 0x842D +#define GL_RESAMPLE_REPLICATE_SGIX 0x842E +#define GL_RESAMPLE_ZERO_FILL_SGIX 0x842F +#define GL_RESAMPLE_DECIMATE_SGIX 0x8430 +#endif + +#ifndef GL_SGIS_point_line_texgen +#define GL_EYE_DISTANCE_TO_POINT_SGIS 0x81F0 +#define GL_OBJECT_DISTANCE_TO_POINT_SGIS 0x81F1 +#define GL_EYE_DISTANCE_TO_LINE_SGIS 0x81F2 +#define GL_OBJECT_DISTANCE_TO_LINE_SGIS 0x81F3 +#define GL_EYE_POINT_SGIS 0x81F4 +#define GL_OBJECT_POINT_SGIS 0x81F5 +#define GL_EYE_LINE_SGIS 0x81F6 +#define GL_OBJECT_LINE_SGIS 0x81F7 +#endif + +#ifndef GL_SGIS_texture_color_mask +#define GL_TEXTURE_COLOR_WRITEMASK_SGIS 0x81EF +#endif + +#ifndef GL_EXT_texture_env_dot3 +#define GL_DOT3_RGB_EXT 0x8740 +#define GL_DOT3_RGBA_EXT 0x8741 +#endif + +#ifndef GL_ATI_texture_mirror_once +#define GL_MIRROR_CLAMP_ATI 0x8742 +#define GL_MIRROR_CLAMP_TO_EDGE_ATI 0x8743 +#endif + +#ifndef GL_NV_fence +#define GL_ALL_COMPLETED_NV 0x84F2 +#define GL_FENCE_STATUS_NV 0x84F3 +#define GL_FENCE_CONDITION_NV 0x84F4 +#endif + +#ifndef GL_IBM_texture_mirrored_repeat +#define GL_MIRRORED_REPEAT_IBM 0x8370 +#endif + +#ifndef GL_NV_evaluators +#define GL_EVAL_2D_NV 0x86C0 +#define GL_EVAL_TRIANGULAR_2D_NV 0x86C1 +#define GL_MAP_TESSELLATION_NV 0x86C2 +#define GL_MAP_ATTRIB_U_ORDER_NV 0x86C3 +#define GL_MAP_ATTRIB_V_ORDER_NV 0x86C4 +#define GL_EVAL_FRACTIONAL_TESSELLATION_NV 0x86C5 +#define GL_EVAL_VERTEX_ATTRIB0_NV 0x86C6 +#define GL_EVAL_VERTEX_ATTRIB1_NV 0x86C7 +#define GL_EVAL_VERTEX_ATTRIB2_NV 0x86C8 +#define GL_EVAL_VERTEX_ATTRIB3_NV 0x86C9 +#define GL_EVAL_VERTEX_ATTRIB4_NV 0x86CA +#define GL_EVAL_VERTEX_ATTRIB5_NV 0x86CB +#define GL_EVAL_VERTEX_ATTRIB6_NV 0x86CC +#define GL_EVAL_VERTEX_ATTRIB7_NV 0x86CD +#define GL_EVAL_VERTEX_ATTRIB8_NV 0x86CE +#define GL_EVAL_VERTEX_ATTRIB9_NV 0x86CF +#define GL_EVAL_VERTEX_ATTRIB10_NV 0x86D0 +#define GL_EVAL_VERTEX_ATTRIB11_NV 0x86D1 +#define GL_EVAL_VERTEX_ATTRIB12_NV 0x86D2 +#define GL_EVAL_VERTEX_ATTRIB13_NV 0x86D3 +#define GL_EVAL_VERTEX_ATTRIB14_NV 0x86D4 +#define GL_EVAL_VERTEX_ATTRIB15_NV 0x86D5 +#define GL_MAX_MAP_TESSELLATION_NV 0x86D6 +#define GL_MAX_RATIONAL_EVAL_ORDER_NV 0x86D7 +#endif + +#ifndef GL_NV_packed_depth_stencil +#define GL_DEPTH_STENCIL_NV 0x84F9 +#define GL_UNSIGNED_INT_24_8_NV 0x84FA +#endif + +#ifndef GL_NV_register_combiners2 +#define GL_PER_STAGE_CONSTANTS_NV 0x8535 +#endif + +#ifndef GL_NV_texture_compression_vtc +#endif + +#ifndef GL_NV_texture_rectangle +#define GL_TEXTURE_RECTANGLE_NV 0x84F5 +#define GL_TEXTURE_BINDING_RECTANGLE_NV 0x84F6 +#define GL_PROXY_TEXTURE_RECTANGLE_NV 0x84F7 +#define GL_MAX_RECTANGLE_TEXTURE_SIZE_NV 0x84F8 +#endif + +#ifndef GL_NV_texture_shader +#define GL_OFFSET_TEXTURE_RECTANGLE_NV 0x864C +#define GL_OFFSET_TEXTURE_RECTANGLE_SCALE_NV 0x864D +#define GL_DOT_PRODUCT_TEXTURE_RECTANGLE_NV 0x864E +#define GL_RGBA_UNSIGNED_DOT_PRODUCT_MAPPING_NV 0x86D9 +#define GL_UNSIGNED_INT_S8_S8_8_8_NV 0x86DA +#define GL_UNSIGNED_INT_8_8_S8_S8_REV_NV 0x86DB +#define GL_DSDT_MAG_INTENSITY_NV 0x86DC +#define GL_SHADER_CONSISTENT_NV 0x86DD +#define GL_TEXTURE_SHADER_NV 0x86DE +#define GL_SHADER_OPERATION_NV 0x86DF +#define GL_CULL_MODES_NV 0x86E0 +#define GL_OFFSET_TEXTURE_MATRIX_NV 0x86E1 +#define GL_OFFSET_TEXTURE_SCALE_NV 0x86E2 +#define GL_OFFSET_TEXTURE_BIAS_NV 0x86E3 +#define GL_OFFSET_TEXTURE_2D_MATRIX_NV GL_OFFSET_TEXTURE_MATRIX_NV +#define GL_OFFSET_TEXTURE_2D_SCALE_NV GL_OFFSET_TEXTURE_SCALE_NV +#define GL_OFFSET_TEXTURE_2D_BIAS_NV GL_OFFSET_TEXTURE_BIAS_NV +#define GL_PREVIOUS_TEXTURE_INPUT_NV 0x86E4 +#define GL_CONST_EYE_NV 0x86E5 +#define GL_PASS_THROUGH_NV 0x86E6 +#define GL_CULL_FRAGMENT_NV 0x86E7 +#define GL_OFFSET_TEXTURE_2D_NV 0x86E8 +#define GL_DEPENDENT_AR_TEXTURE_2D_NV 0x86E9 +#define GL_DEPENDENT_GB_TEXTURE_2D_NV 0x86EA +#define GL_DOT_PRODUCT_NV 0x86EC +#define GL_DOT_PRODUCT_DEPTH_REPLACE_NV 0x86ED +#define GL_DOT_PRODUCT_TEXTURE_2D_NV 0x86EE +#define GL_DOT_PRODUCT_TEXTURE_CUBE_MAP_NV 0x86F0 +#define GL_DOT_PRODUCT_DIFFUSE_CUBE_MAP_NV 0x86F1 +#define GL_DOT_PRODUCT_REFLECT_CUBE_MAP_NV 0x86F2 +#define GL_DOT_PRODUCT_CONST_EYE_REFLECT_CUBE_MAP_NV 0x86F3 +#define GL_HILO_NV 0x86F4 +#define GL_DSDT_NV 0x86F5 +#define GL_DSDT_MAG_NV 0x86F6 +#define GL_DSDT_MAG_VIB_NV 0x86F7 +#define GL_HILO16_NV 0x86F8 +#define GL_SIGNED_HILO_NV 0x86F9 +#define GL_SIGNED_HILO16_NV 0x86FA +#define GL_SIGNED_RGBA_NV 0x86FB +#define GL_SIGNED_RGBA8_NV 0x86FC +#define GL_SIGNED_RGB_NV 0x86FE +#define GL_SIGNED_RGB8_NV 0x86FF +#define GL_SIGNED_LUMINANCE_NV 0x8701 +#define GL_SIGNED_LUMINANCE8_NV 0x8702 +#define GL_SIGNED_LUMINANCE_ALPHA_NV 0x8703 +#define GL_SIGNED_LUMINANCE8_ALPHA8_NV 0x8704 +#define GL_SIGNED_ALPHA_NV 0x8705 +#define GL_SIGNED_ALPHA8_NV 0x8706 +#define GL_SIGNED_INTENSITY_NV 0x8707 +#define GL_SIGNED_INTENSITY8_NV 0x8708 +#define GL_DSDT8_NV 0x8709 +#define GL_DSDT8_MAG8_NV 0x870A +#define GL_DSDT8_MAG8_INTENSITY8_NV 0x870B +#define GL_SIGNED_RGB_UNSIGNED_ALPHA_NV 0x870C +#define GL_SIGNED_RGB8_UNSIGNED_ALPHA8_NV 0x870D +#define GL_HI_SCALE_NV 0x870E +#define GL_LO_SCALE_NV 0x870F +#define GL_DS_SCALE_NV 0x8710 +#define GL_DT_SCALE_NV 0x8711 +#define GL_MAGNITUDE_SCALE_NV 0x8712 +#define GL_VIBRANCE_SCALE_NV 0x8713 +#define GL_HI_BIAS_NV 0x8714 +#define GL_LO_BIAS_NV 0x8715 +#define GL_DS_BIAS_NV 0x8716 +#define GL_DT_BIAS_NV 0x8717 +#define GL_MAGNITUDE_BIAS_NV 0x8718 +#define GL_VIBRANCE_BIAS_NV 0x8719 +#define GL_TEXTURE_BORDER_VALUES_NV 0x871A +#define GL_TEXTURE_HI_SIZE_NV 0x871B +#define GL_TEXTURE_LO_SIZE_NV 0x871C +#define GL_TEXTURE_DS_SIZE_NV 0x871D +#define GL_TEXTURE_DT_SIZE_NV 0x871E +#define GL_TEXTURE_MAG_SIZE_NV 0x871F +#endif + +#ifndef GL_NV_texture_shader2 +#define GL_DOT_PRODUCT_TEXTURE_3D_NV 0x86EF +#endif + +#ifndef GL_NV_vertex_array_range2 +#define GL_VERTEX_ARRAY_RANGE_WITHOUT_FLUSH_NV 0x8533 +#endif + +#ifndef GL_NV_vertex_program +#define GL_VERTEX_PROGRAM_NV 0x8620 +#define GL_VERTEX_STATE_PROGRAM_NV 0x8621 +#define GL_ATTRIB_ARRAY_SIZE_NV 0x8623 +#define GL_ATTRIB_ARRAY_STRIDE_NV 0x8624 +#define GL_ATTRIB_ARRAY_TYPE_NV 0x8625 +#define GL_CURRENT_ATTRIB_NV 0x8626 +#define GL_PROGRAM_LENGTH_NV 0x8627 +#define GL_PROGRAM_STRING_NV 0x8628 +#define GL_MODELVIEW_PROJECTION_NV 0x8629 +#define GL_IDENTITY_NV 0x862A +#define GL_INVERSE_NV 0x862B +#define GL_TRANSPOSE_NV 0x862C +#define GL_INVERSE_TRANSPOSE_NV 0x862D +#define GL_MAX_TRACK_MATRIX_STACK_DEPTH_NV 0x862E +#define GL_MAX_TRACK_MATRICES_NV 0x862F +#define GL_MATRIX0_NV 0x8630 +#define GL_MATRIX1_NV 0x8631 +#define GL_MATRIX2_NV 0x8632 +#define GL_MATRIX3_NV 0x8633 +#define GL_MATRIX4_NV 0x8634 +#define GL_MATRIX5_NV 0x8635 +#define GL_MATRIX6_NV 0x8636 +#define GL_MATRIX7_NV 0x8637 +#define GL_CURRENT_MATRIX_STACK_DEPTH_NV 0x8640 +#define GL_CURRENT_MATRIX_NV 0x8641 +#define GL_VERTEX_PROGRAM_POINT_SIZE_NV 0x8642 +#define GL_VERTEX_PROGRAM_TWO_SIDE_NV 0x8643 +#define GL_PROGRAM_PARAMETER_NV 0x8644 +#define GL_ATTRIB_ARRAY_POINTER_NV 0x8645 +#define GL_PROGRAM_TARGET_NV 0x8646 +#define GL_PROGRAM_RESIDENT_NV 0x8647 +#define GL_TRACK_MATRIX_NV 0x8648 +#define GL_TRACK_MATRIX_TRANSFORM_NV 0x8649 +#define GL_VERTEX_PROGRAM_BINDING_NV 0x864A +#define GL_PROGRAM_ERROR_POSITION_NV 0x864B +#define GL_VERTEX_ATTRIB_ARRAY0_NV 0x8650 +#define GL_VERTEX_ATTRIB_ARRAY1_NV 0x8651 +#define GL_VERTEX_ATTRIB_ARRAY2_NV 0x8652 +#define GL_VERTEX_ATTRIB_ARRAY3_NV 0x8653 +#define GL_VERTEX_ATTRIB_ARRAY4_NV 0x8654 +#define GL_VERTEX_ATTRIB_ARRAY5_NV 0x8655 +#define GL_VERTEX_ATTRIB_ARRAY6_NV 0x8656 +#define GL_VERTEX_ATTRIB_ARRAY7_NV 0x8657 +#define GL_VERTEX_ATTRIB_ARRAY8_NV 0x8658 +#define GL_VERTEX_ATTRIB_ARRAY9_NV 0x8659 +#define GL_VERTEX_ATTRIB_ARRAY10_NV 0x865A +#define GL_VERTEX_ATTRIB_ARRAY11_NV 0x865B +#define GL_VERTEX_ATTRIB_ARRAY12_NV 0x865C +#define GL_VERTEX_ATTRIB_ARRAY13_NV 0x865D +#define GL_VERTEX_ATTRIB_ARRAY14_NV 0x865E +#define GL_VERTEX_ATTRIB_ARRAY15_NV 0x865F +#define GL_MAP1_VERTEX_ATTRIB0_4_NV 0x8660 +#define GL_MAP1_VERTEX_ATTRIB1_4_NV 0x8661 +#define GL_MAP1_VERTEX_ATTRIB2_4_NV 0x8662 +#define GL_MAP1_VERTEX_ATTRIB3_4_NV 0x8663 +#define GL_MAP1_VERTEX_ATTRIB4_4_NV 0x8664 +#define GL_MAP1_VERTEX_ATTRIB5_4_NV 0x8665 +#define GL_MAP1_VERTEX_ATTRIB6_4_NV 0x8666 +#define GL_MAP1_VERTEX_ATTRIB7_4_NV 0x8667 +#define GL_MAP1_VERTEX_ATTRIB8_4_NV 0x8668 +#define GL_MAP1_VERTEX_ATTRIB9_4_NV 0x8669 +#define GL_MAP1_VERTEX_ATTRIB10_4_NV 0x866A +#define GL_MAP1_VERTEX_ATTRIB11_4_NV 0x866B +#define GL_MAP1_VERTEX_ATTRIB12_4_NV 0x866C +#define GL_MAP1_VERTEX_ATTRIB13_4_NV 0x866D +#define GL_MAP1_VERTEX_ATTRIB14_4_NV 0x866E +#define GL_MAP1_VERTEX_ATTRIB15_4_NV 0x866F +#define GL_MAP2_VERTEX_ATTRIB0_4_NV 0x8670 +#define GL_MAP2_VERTEX_ATTRIB1_4_NV 0x8671 +#define GL_MAP2_VERTEX_ATTRIB2_4_NV 0x8672 +#define GL_MAP2_VERTEX_ATTRIB3_4_NV 0x8673 +#define GL_MAP2_VERTEX_ATTRIB4_4_NV 0x8674 +#define GL_MAP2_VERTEX_ATTRIB5_4_NV 0x8675 +#define GL_MAP2_VERTEX_ATTRIB6_4_NV 0x8676 +#define GL_MAP2_VERTEX_ATTRIB7_4_NV 0x8677 +#define GL_MAP2_VERTEX_ATTRIB8_4_NV 0x8678 +#define GL_MAP2_VERTEX_ATTRIB9_4_NV 0x8679 +#define GL_MAP2_VERTEX_ATTRIB10_4_NV 0x867A +#define GL_MAP2_VERTEX_ATTRIB11_4_NV 0x867B +#define GL_MAP2_VERTEX_ATTRIB12_4_NV 0x867C +#define GL_MAP2_VERTEX_ATTRIB13_4_NV 0x867D +#define GL_MAP2_VERTEX_ATTRIB14_4_NV 0x867E +#define GL_MAP2_VERTEX_ATTRIB15_4_NV 0x867F +#endif + +#ifndef GL_SGIX_texture_coordinate_clamp +#define GL_TEXTURE_MAX_CLAMP_S_SGIX 0x8369 +#define GL_TEXTURE_MAX_CLAMP_T_SGIX 0x836A +#define GL_TEXTURE_MAX_CLAMP_R_SGIX 0x836B +#endif + +#ifndef GL_SGIX_scalebias_hint +#define GL_SCALEBIAS_HINT_SGIX 0x8322 +#endif + +#ifndef GL_OML_interlace +#define GL_INTERLACE_OML 0x8980 +#define GL_INTERLACE_READ_OML 0x8981 +#endif + +#ifndef GL_OML_subsample +#define GL_FORMAT_SUBSAMPLE_24_24_OML 0x8982 +#define GL_FORMAT_SUBSAMPLE_244_244_OML 0x8983 +#endif + +#ifndef GL_OML_resample +#define GL_PACK_RESAMPLE_OML 0x8984 +#define GL_UNPACK_RESAMPLE_OML 0x8985 +#define GL_RESAMPLE_REPLICATE_OML 0x8986 +#define GL_RESAMPLE_ZERO_FILL_OML 0x8987 +#define GL_RESAMPLE_AVERAGE_OML 0x8988 +#define GL_RESAMPLE_DECIMATE_OML 0x8989 +#endif + +#ifndef GL_NV_copy_depth_to_color +#define GL_DEPTH_STENCIL_TO_RGBA_NV 0x886E +#define GL_DEPTH_STENCIL_TO_BGRA_NV 0x886F +#endif + +#ifndef GL_ATI_envmap_bumpmap +#define GL_BUMP_ROT_MATRIX_ATI 0x8775 +#define GL_BUMP_ROT_MATRIX_SIZE_ATI 0x8776 +#define GL_BUMP_NUM_TEX_UNITS_ATI 0x8777 +#define GL_BUMP_TEX_UNITS_ATI 0x8778 +#define GL_DUDV_ATI 0x8779 +#define GL_DU8DV8_ATI 0x877A +#define GL_BUMP_ENVMAP_ATI 0x877B +#define GL_BUMP_TARGET_ATI 0x877C +#endif + +#ifndef GL_ATI_fragment_shader +#define GL_FRAGMENT_SHADER_ATI 0x8920 +#define GL_REG_0_ATI 0x8921 +#define GL_REG_1_ATI 0x8922 +#define GL_REG_2_ATI 0x8923 +#define GL_REG_3_ATI 0x8924 +#define GL_REG_4_ATI 0x8925 +#define GL_REG_5_ATI 0x8926 +#define GL_REG_6_ATI 0x8927 +#define GL_REG_7_ATI 0x8928 +#define GL_REG_8_ATI 0x8929 +#define GL_REG_9_ATI 0x892A +#define GL_REG_10_ATI 0x892B +#define GL_REG_11_ATI 0x892C +#define GL_REG_12_ATI 0x892D +#define GL_REG_13_ATI 0x892E +#define GL_REG_14_ATI 0x892F +#define GL_REG_15_ATI 0x8930 +#define GL_REG_16_ATI 0x8931 +#define GL_REG_17_ATI 0x8932 +#define GL_REG_18_ATI 0x8933 +#define GL_REG_19_ATI 0x8934 +#define GL_REG_20_ATI 0x8935 +#define GL_REG_21_ATI 0x8936 +#define GL_REG_22_ATI 0x8937 +#define GL_REG_23_ATI 0x8938 +#define GL_REG_24_ATI 0x8939 +#define GL_REG_25_ATI 0x893A +#define GL_REG_26_ATI 0x893B +#define GL_REG_27_ATI 0x893C +#define GL_REG_28_ATI 0x893D +#define GL_REG_29_ATI 0x893E +#define GL_REG_30_ATI 0x893F +#define GL_REG_31_ATI 0x8940 +#define GL_CON_0_ATI 0x8941 +#define GL_CON_1_ATI 0x8942 +#define GL_CON_2_ATI 0x8943 +#define GL_CON_3_ATI 0x8944 +#define GL_CON_4_ATI 0x8945 +#define GL_CON_5_ATI 0x8946 +#define GL_CON_6_ATI 0x8947 +#define GL_CON_7_ATI 0x8948 +#define GL_CON_8_ATI 0x8949 +#define GL_CON_9_ATI 0x894A +#define GL_CON_10_ATI 0x894B +#define GL_CON_11_ATI 0x894C +#define GL_CON_12_ATI 0x894D +#define GL_CON_13_ATI 0x894E +#define GL_CON_14_ATI 0x894F +#define GL_CON_15_ATI 0x8950 +#define GL_CON_16_ATI 0x8951 +#define GL_CON_17_ATI 0x8952 +#define GL_CON_18_ATI 0x8953 +#define GL_CON_19_ATI 0x8954 +#define GL_CON_20_ATI 0x8955 +#define GL_CON_21_ATI 0x8956 +#define GL_CON_22_ATI 0x8957 +#define GL_CON_23_ATI 0x8958 +#define GL_CON_24_ATI 0x8959 +#define GL_CON_25_ATI 0x895A +#define GL_CON_26_ATI 0x895B +#define GL_CON_27_ATI 0x895C +#define GL_CON_28_ATI 0x895D +#define GL_CON_29_ATI 0x895E +#define GL_CON_30_ATI 0x895F +#define GL_CON_31_ATI 0x8960 +#define GL_MOV_ATI 0x8961 +#define GL_ADD_ATI 0x8963 +#define GL_MUL_ATI 0x8964 +#define GL_SUB_ATI 0x8965 +#define GL_DOT3_ATI 0x8966 +#define GL_DOT4_ATI 0x8967 +#define GL_MAD_ATI 0x8968 +#define GL_LERP_ATI 0x8969 +#define GL_CND_ATI 0x896A +#define GL_CND0_ATI 0x896B +#define GL_DOT2_ADD_ATI 0x896C +#define GL_SECONDARY_INTERPOLATOR_ATI 0x896D +#define GL_NUM_FRAGMENT_REGISTERS_ATI 0x896E +#define GL_NUM_FRAGMENT_CONSTANTS_ATI 0x896F +#define GL_NUM_PASSES_ATI 0x8970 +#define GL_NUM_INSTRUCTIONS_PER_PASS_ATI 0x8971 +#define GL_NUM_INSTRUCTIONS_TOTAL_ATI 0x8972 +#define GL_NUM_INPUT_INTERPOLATOR_COMPONENTS_ATI 0x8973 +#define GL_NUM_LOOPBACK_COMPONENTS_ATI 0x8974 +#define GL_COLOR_ALPHA_PAIRING_ATI 0x8975 +#define GL_SWIZZLE_STR_ATI 0x8976 +#define GL_SWIZZLE_STQ_ATI 0x8977 +#define GL_SWIZZLE_STR_DR_ATI 0x8978 +#define GL_SWIZZLE_STQ_DQ_ATI 0x8979 +#define GL_SWIZZLE_STRQ_ATI 0x897A +#define GL_SWIZZLE_STRQ_DQ_ATI 0x897B +#define GL_RED_BIT_ATI 0x00000001 +#define GL_GREEN_BIT_ATI 0x00000002 +#define GL_BLUE_BIT_ATI 0x00000004 +#define GL_2X_BIT_ATI 0x00000001 +#define GL_4X_BIT_ATI 0x00000002 +#define GL_8X_BIT_ATI 0x00000004 +#define GL_HALF_BIT_ATI 0x00000008 +#define GL_QUARTER_BIT_ATI 0x00000010 +#define GL_EIGHTH_BIT_ATI 0x00000020 +#define GL_SATURATE_BIT_ATI 0x00000040 +#define GL_COMP_BIT_ATI 0x00000002 +#define GL_NEGATE_BIT_ATI 0x00000004 +#define GL_BIAS_BIT_ATI 0x00000008 +#endif + +#ifndef GL_ATI_pn_triangles +#define GL_PN_TRIANGLES_ATI 0x87F0 +#define GL_MAX_PN_TRIANGLES_TESSELATION_LEVEL_ATI 0x87F1 +#define GL_PN_TRIANGLES_POINT_MODE_ATI 0x87F2 +#define GL_PN_TRIANGLES_NORMAL_MODE_ATI 0x87F3 +#define GL_PN_TRIANGLES_TESSELATION_LEVEL_ATI 0x87F4 +#define GL_PN_TRIANGLES_POINT_MODE_LINEAR_ATI 0x87F5 +#define GL_PN_TRIANGLES_POINT_MODE_CUBIC_ATI 0x87F6 +#define GL_PN_TRIANGLES_NORMAL_MODE_LINEAR_ATI 0x87F7 +#define GL_PN_TRIANGLES_NORMAL_MODE_QUADRATIC_ATI 0x87F8 +#endif + +#ifndef GL_ATI_vertex_array_object +#define GL_STATIC_ATI 0x8760 +#define GL_DYNAMIC_ATI 0x8761 +#define GL_PRESERVE_ATI 0x8762 +#define GL_DISCARD_ATI 0x8763 +#define GL_OBJECT_BUFFER_SIZE_ATI 0x8764 +#define GL_OBJECT_BUFFER_USAGE_ATI 0x8765 +#define GL_ARRAY_OBJECT_BUFFER_ATI 0x8766 +#define GL_ARRAY_OBJECT_OFFSET_ATI 0x8767 +#endif + +#ifndef GL_EXT_vertex_shader +#define GL_VERTEX_SHADER_EXT 0x8780 +#define GL_VERTEX_SHADER_BINDING_EXT 0x8781 +#define GL_OP_INDEX_EXT 0x8782 +#define GL_OP_NEGATE_EXT 0x8783 +#define GL_OP_DOT3_EXT 0x8784 +#define GL_OP_DOT4_EXT 0x8785 +#define GL_OP_MUL_EXT 0x8786 +#define GL_OP_ADD_EXT 0x8787 +#define GL_OP_MADD_EXT 0x8788 +#define GL_OP_FRAC_EXT 0x8789 +#define GL_OP_MAX_EXT 0x878A +#define GL_OP_MIN_EXT 0x878B +#define GL_OP_SET_GE_EXT 0x878C +#define GL_OP_SET_LT_EXT 0x878D +#define GL_OP_CLAMP_EXT 0x878E +#define GL_OP_FLOOR_EXT 0x878F +#define GL_OP_ROUND_EXT 0x8790 +#define GL_OP_EXP_BASE_2_EXT 0x8791 +#define GL_OP_LOG_BASE_2_EXT 0x8792 +#define GL_OP_POWER_EXT 0x8793 +#define GL_OP_RECIP_EXT 0x8794 +#define GL_OP_RECIP_SQRT_EXT 0x8795 +#define GL_OP_SUB_EXT 0x8796 +#define GL_OP_CROSS_PRODUCT_EXT 0x8797 +#define GL_OP_MULTIPLY_MATRIX_EXT 0x8798 +#define GL_OP_MOV_EXT 0x8799 +#define GL_OUTPUT_VERTEX_EXT 0x879A +#define GL_OUTPUT_COLOR0_EXT 0x879B +#define GL_OUTPUT_COLOR1_EXT 0x879C +#define GL_OUTPUT_TEXTURE_COORD0_EXT 0x879D +#define GL_OUTPUT_TEXTURE_COORD1_EXT 0x879E +#define GL_OUTPUT_TEXTURE_COORD2_EXT 0x879F +#define GL_OUTPUT_TEXTURE_COORD3_EXT 0x87A0 +#define GL_OUTPUT_TEXTURE_COORD4_EXT 0x87A1 +#define GL_OUTPUT_TEXTURE_COORD5_EXT 0x87A2 +#define GL_OUTPUT_TEXTURE_COORD6_EXT 0x87A3 +#define GL_OUTPUT_TEXTURE_COORD7_EXT 0x87A4 +#define GL_OUTPUT_TEXTURE_COORD8_EXT 0x87A5 +#define GL_OUTPUT_TEXTURE_COORD9_EXT 0x87A6 +#define GL_OUTPUT_TEXTURE_COORD10_EXT 0x87A7 +#define GL_OUTPUT_TEXTURE_COORD11_EXT 0x87A8 +#define GL_OUTPUT_TEXTURE_COORD12_EXT 0x87A9 +#define GL_OUTPUT_TEXTURE_COORD13_EXT 0x87AA +#define GL_OUTPUT_TEXTURE_COORD14_EXT 0x87AB +#define GL_OUTPUT_TEXTURE_COORD15_EXT 0x87AC +#define GL_OUTPUT_TEXTURE_COORD16_EXT 0x87AD +#define GL_OUTPUT_TEXTURE_COORD17_EXT 0x87AE +#define GL_OUTPUT_TEXTURE_COORD18_EXT 0x87AF +#define GL_OUTPUT_TEXTURE_COORD19_EXT 0x87B0 +#define GL_OUTPUT_TEXTURE_COORD20_EXT 0x87B1 +#define GL_OUTPUT_TEXTURE_COORD21_EXT 0x87B2 +#define GL_OUTPUT_TEXTURE_COORD22_EXT 0x87B3 +#define GL_OUTPUT_TEXTURE_COORD23_EXT 0x87B4 +#define GL_OUTPUT_TEXTURE_COORD24_EXT 0x87B5 +#define GL_OUTPUT_TEXTURE_COORD25_EXT 0x87B6 +#define GL_OUTPUT_TEXTURE_COORD26_EXT 0x87B7 +#define GL_OUTPUT_TEXTURE_COORD27_EXT 0x87B8 +#define GL_OUTPUT_TEXTURE_COORD28_EXT 0x87B9 +#define GL_OUTPUT_TEXTURE_COORD29_EXT 0x87BA +#define GL_OUTPUT_TEXTURE_COORD30_EXT 0x87BB +#define GL_OUTPUT_TEXTURE_COORD31_EXT 0x87BC +#define GL_OUTPUT_FOG_EXT 0x87BD +#define GL_SCALAR_EXT 0x87BE +#define GL_VECTOR_EXT 0x87BF +#define GL_MATRIX_EXT 0x87C0 +#define GL_VARIANT_EXT 0x87C1 +#define GL_INVARIANT_EXT 0x87C2 +#define GL_LOCAL_CONSTANT_EXT 0x87C3 +#define GL_LOCAL_EXT 0x87C4 +#define GL_MAX_VERTEX_SHADER_INSTRUCTIONS_EXT 0x87C5 +#define GL_MAX_VERTEX_SHADER_VARIANTS_EXT 0x87C6 +#define GL_MAX_VERTEX_SHADER_INVARIANTS_EXT 0x87C7 +#define GL_MAX_VERTEX_SHADER_LOCAL_CONSTANTS_EXT 0x87C8 +#define GL_MAX_VERTEX_SHADER_LOCALS_EXT 0x87C9 +#define GL_MAX_OPTIMIZED_VERTEX_SHADER_INSTRUCTIONS_EXT 0x87CA +#define GL_MAX_OPTIMIZED_VERTEX_SHADER_VARIANTS_EXT 0x87CB +#define GL_MAX_OPTIMIZED_VERTEX_SHADER_LOCAL_CONSTANTS_EXT 0x87CC +#define GL_MAX_OPTIMIZED_VERTEX_SHADER_INVARIANTS_EXT 0x87CD +#define GL_MAX_OPTIMIZED_VERTEX_SHADER_LOCALS_EXT 0x87CE +#define GL_VERTEX_SHADER_INSTRUCTIONS_EXT 0x87CF +#define GL_VERTEX_SHADER_VARIANTS_EXT 0x87D0 +#define GL_VERTEX_SHADER_INVARIANTS_EXT 0x87D1 +#define GL_VERTEX_SHADER_LOCAL_CONSTANTS_EXT 0x87D2 +#define GL_VERTEX_SHADER_LOCALS_EXT 0x87D3 +#define GL_VERTEX_SHADER_OPTIMIZED_EXT 0x87D4 +#define GL_X_EXT 0x87D5 +#define GL_Y_EXT 0x87D6 +#define GL_Z_EXT 0x87D7 +#define GL_W_EXT 0x87D8 +#define GL_NEGATIVE_X_EXT 0x87D9 +#define GL_NEGATIVE_Y_EXT 0x87DA +#define GL_NEGATIVE_Z_EXT 0x87DB +#define GL_NEGATIVE_W_EXT 0x87DC +#define GL_ZERO_EXT 0x87DD +#define GL_ONE_EXT 0x87DE +#define GL_NEGATIVE_ONE_EXT 0x87DF +#define GL_NORMALIZED_RANGE_EXT 0x87E0 +#define GL_FULL_RANGE_EXT 0x87E1 +#define GL_CURRENT_VERTEX_EXT 0x87E2 +#define GL_MVP_MATRIX_EXT 0x87E3 +#define GL_VARIANT_VALUE_EXT 0x87E4 +#define GL_VARIANT_DATATYPE_EXT 0x87E5 +#define GL_VARIANT_ARRAY_STRIDE_EXT 0x87E6 +#define GL_VARIANT_ARRAY_TYPE_EXT 0x87E7 +#define GL_VARIANT_ARRAY_EXT 0x87E8 +#define GL_VARIANT_ARRAY_POINTER_EXT 0x87E9 +#define GL_INVARIANT_VALUE_EXT 0x87EA +#define GL_INVARIANT_DATATYPE_EXT 0x87EB +#define GL_LOCAL_CONSTANT_VALUE_EXT 0x87EC +#define GL_LOCAL_CONSTANT_DATATYPE_EXT 0x87ED +#endif + +#ifndef GL_ATI_vertex_streams +#define GL_MAX_VERTEX_STREAMS_ATI 0x876B +#define GL_VERTEX_STREAM0_ATI 0x876C +#define GL_VERTEX_STREAM1_ATI 0x876D +#define GL_VERTEX_STREAM2_ATI 0x876E +#define GL_VERTEX_STREAM3_ATI 0x876F +#define GL_VERTEX_STREAM4_ATI 0x8770 +#define GL_VERTEX_STREAM5_ATI 0x8771 +#define GL_VERTEX_STREAM6_ATI 0x8772 +#define GL_VERTEX_STREAM7_ATI 0x8773 +#define GL_VERTEX_SOURCE_ATI 0x8774 +#endif + +#ifndef GL_ATI_element_array +#define GL_ELEMENT_ARRAY_ATI 0x8768 +#define GL_ELEMENT_ARRAY_TYPE_ATI 0x8769 +#define GL_ELEMENT_ARRAY_POINTER_ATI 0x876A +#endif + +#ifndef GL_SUN_mesh_array +#define GL_QUAD_MESH_SUN 0x8614 +#define GL_TRIANGLE_MESH_SUN 0x8615 +#endif + +#ifndef GL_SUN_slice_accum +#define GL_SLICE_ACCUM_SUN 0x85CC +#endif + +#ifndef GL_NV_multisample_filter_hint +#define GL_MULTISAMPLE_FILTER_HINT_NV 0x8534 +#endif + +#ifndef GL_NV_depth_clamp +#define GL_DEPTH_CLAMP_NV 0x864F +#endif + +#ifndef GL_NV_occlusion_query +#define GL_PIXEL_COUNTER_BITS_NV 0x8864 +#define GL_CURRENT_OCCLUSION_QUERY_ID_NV 0x8865 +#define GL_PIXEL_COUNT_NV 0x8866 +#define GL_PIXEL_COUNT_AVAILABLE_NV 0x8867 +#endif + +#ifndef GL_NV_point_sprite +#define GL_POINT_SPRITE_NV 0x8861 +#define GL_COORD_REPLACE_NV 0x8862 +#define GL_POINT_SPRITE_R_MODE_NV 0x8863 +#endif + +#ifndef GL_NV_texture_shader3 +#define GL_OFFSET_PROJECTIVE_TEXTURE_2D_NV 0x8850 +#define GL_OFFSET_PROJECTIVE_TEXTURE_2D_SCALE_NV 0x8851 +#define GL_OFFSET_PROJECTIVE_TEXTURE_RECTANGLE_NV 0x8852 +#define GL_OFFSET_PROJECTIVE_TEXTURE_RECTANGLE_SCALE_NV 0x8853 +#define GL_OFFSET_HILO_TEXTURE_2D_NV 0x8854 +#define GL_OFFSET_HILO_TEXTURE_RECTANGLE_NV 0x8855 +#define GL_OFFSET_HILO_PROJECTIVE_TEXTURE_2D_NV 0x8856 +#define GL_OFFSET_HILO_PROJECTIVE_TEXTURE_RECTANGLE_NV 0x8857 +#define GL_DEPENDENT_HILO_TEXTURE_2D_NV 0x8858 +#define GL_DEPENDENT_RGB_TEXTURE_3D_NV 0x8859 +#define GL_DEPENDENT_RGB_TEXTURE_CUBE_MAP_NV 0x885A +#define GL_DOT_PRODUCT_PASS_THROUGH_NV 0x885B +#define GL_DOT_PRODUCT_TEXTURE_1D_NV 0x885C +#define GL_DOT_PRODUCT_AFFINE_DEPTH_REPLACE_NV 0x885D +#define GL_HILO8_NV 0x885E +#define GL_SIGNED_HILO8_NV 0x885F +#define GL_FORCE_BLUE_TO_ONE_NV 0x8860 +#endif + +#ifndef GL_NV_vertex_program1_1 +#endif + +#ifndef GL_EXT_shadow_funcs +#endif + +#ifndef GL_EXT_stencil_two_side +#define GL_STENCIL_TEST_TWO_SIDE_EXT 0x8910 +#define GL_ACTIVE_STENCIL_FACE_EXT 0x8911 +#endif + +#ifndef GL_ATI_text_fragment_shader +#define GL_TEXT_FRAGMENT_SHADER_ATI 0x8200 +#endif + +#ifndef GL_APPLE_client_storage +#define GL_UNPACK_CLIENT_STORAGE_APPLE 0x85B2 +#endif + +#ifndef GL_APPLE_element_array +#define GL_ELEMENT_ARRAY_APPLE 0x8A0C +#define GL_ELEMENT_ARRAY_TYPE_APPLE 0x8A0D +#define GL_ELEMENT_ARRAY_POINTER_APPLE 0x8A0E +#endif + +#ifndef GL_APPLE_fence +#define GL_DRAW_PIXELS_APPLE 0x8A0A +#define GL_FENCE_APPLE 0x8A0B +#endif + +#ifndef GL_APPLE_vertex_array_object +#define GL_VERTEX_ARRAY_BINDING_APPLE 0x85B5 +#endif + +#ifndef GL_APPLE_vertex_array_range +#define GL_VERTEX_ARRAY_RANGE_APPLE 0x851D +#define GL_VERTEX_ARRAY_RANGE_LENGTH_APPLE 0x851E +#define GL_VERTEX_ARRAY_STORAGE_HINT_APPLE 0x851F +#define GL_VERTEX_ARRAY_RANGE_POINTER_APPLE 0x8521 +#define GL_STORAGE_CLIENT_APPLE 0x85B4 +#define GL_STORAGE_CACHED_APPLE 0x85BE +#define GL_STORAGE_SHARED_APPLE 0x85BF +#endif + +#ifndef GL_APPLE_ycbcr_422 +#define GL_YCBCR_422_APPLE 0x85B9 +#define GL_UNSIGNED_SHORT_8_8_APPLE 0x85BA +#define GL_UNSIGNED_SHORT_8_8_REV_APPLE 0x85BB +#endif + +#ifndef GL_S3_s3tc +#define GL_RGB_S3TC 0x83A0 +#define GL_RGB4_S3TC 0x83A1 +#define GL_RGBA_S3TC 0x83A2 +#define GL_RGBA4_S3TC 0x83A3 +#define GL_RGBA_DXT5_S3TC 0x83A4 +#define GL_RGBA4_DXT5_S3TC 0x83A5 +#endif + +#ifndef GL_ATI_draw_buffers +#define GL_MAX_DRAW_BUFFERS_ATI 0x8824 +#define GL_DRAW_BUFFER0_ATI 0x8825 +#define GL_DRAW_BUFFER1_ATI 0x8826 +#define GL_DRAW_BUFFER2_ATI 0x8827 +#define GL_DRAW_BUFFER3_ATI 0x8828 +#define GL_DRAW_BUFFER4_ATI 0x8829 +#define GL_DRAW_BUFFER5_ATI 0x882A +#define GL_DRAW_BUFFER6_ATI 0x882B +#define GL_DRAW_BUFFER7_ATI 0x882C +#define GL_DRAW_BUFFER8_ATI 0x882D +#define GL_DRAW_BUFFER9_ATI 0x882E +#define GL_DRAW_BUFFER10_ATI 0x882F +#define GL_DRAW_BUFFER11_ATI 0x8830 +#define GL_DRAW_BUFFER12_ATI 0x8831 +#define GL_DRAW_BUFFER13_ATI 0x8832 +#define GL_DRAW_BUFFER14_ATI 0x8833 +#define GL_DRAW_BUFFER15_ATI 0x8834 +#endif + +#ifndef GL_ATI_pixel_format_float +#define GL_RGBA_FLOAT_MODE_ATI 0x8820 +#define GL_COLOR_CLEAR_UNCLAMPED_VALUE_ATI 0x8835 +#endif + +#ifndef GL_ATI_texture_env_combine3 +#define GL_MODULATE_ADD_ATI 0x8744 +#define GL_MODULATE_SIGNED_ADD_ATI 0x8745 +#define GL_MODULATE_SUBTRACT_ATI 0x8746 +#endif + +#ifndef GL_ATI_texture_float +#define GL_RGBA_FLOAT32_ATI 0x8814 +#define GL_RGB_FLOAT32_ATI 0x8815 +#define GL_ALPHA_FLOAT32_ATI 0x8816 +#define GL_INTENSITY_FLOAT32_ATI 0x8817 +#define GL_LUMINANCE_FLOAT32_ATI 0x8818 +#define GL_LUMINANCE_ALPHA_FLOAT32_ATI 0x8819 +#define GL_RGBA_FLOAT16_ATI 0x881A +#define GL_RGB_FLOAT16_ATI 0x881B +#define GL_ALPHA_FLOAT16_ATI 0x881C +#define GL_INTENSITY_FLOAT16_ATI 0x881D +#define GL_LUMINANCE_FLOAT16_ATI 0x881E +#define GL_LUMINANCE_ALPHA_FLOAT16_ATI 0x881F +#endif + +#ifndef GL_NV_float_buffer +#define GL_FLOAT_R_NV 0x8880 +#define GL_FLOAT_RG_NV 0x8881 +#define GL_FLOAT_RGB_NV 0x8882 +#define GL_FLOAT_RGBA_NV 0x8883 +#define GL_FLOAT_R16_NV 0x8884 +#define GL_FLOAT_R32_NV 0x8885 +#define GL_FLOAT_RG16_NV 0x8886 +#define GL_FLOAT_RG32_NV 0x8887 +#define GL_FLOAT_RGB16_NV 0x8888 +#define GL_FLOAT_RGB32_NV 0x8889 +#define GL_FLOAT_RGBA16_NV 0x888A +#define GL_FLOAT_RGBA32_NV 0x888B +#define GL_TEXTURE_FLOAT_COMPONENTS_NV 0x888C +#define GL_FLOAT_CLEAR_COLOR_VALUE_NV 0x888D +#define GL_FLOAT_RGBA_MODE_NV 0x888E +#endif + +#ifndef GL_NV_fragment_program +#define GL_MAX_FRAGMENT_PROGRAM_LOCAL_PARAMETERS_NV 0x8868 +#define GL_FRAGMENT_PROGRAM_NV 0x8870 +#define GL_MAX_TEXTURE_COORDS_NV 0x8871 +#define GL_MAX_TEXTURE_IMAGE_UNITS_NV 0x8872 +#define GL_FRAGMENT_PROGRAM_BINDING_NV 0x8873 +#define GL_PROGRAM_ERROR_STRING_NV 0x8874 +#endif + +#ifndef GL_NV_half_float +#define GL_HALF_FLOAT_NV 0x140B +#endif + +#ifndef GL_NV_pixel_data_range +#define GL_WRITE_PIXEL_DATA_RANGE_NV 0x8878 +#define GL_READ_PIXEL_DATA_RANGE_NV 0x8879 +#define GL_WRITE_PIXEL_DATA_RANGE_LENGTH_NV 0x887A +#define GL_READ_PIXEL_DATA_RANGE_LENGTH_NV 0x887B +#define GL_WRITE_PIXEL_DATA_RANGE_POINTER_NV 0x887C +#define GL_READ_PIXEL_DATA_RANGE_POINTER_NV 0x887D +#endif + +#ifndef GL_NV_primitive_restart +#define GL_PRIMITIVE_RESTART_NV 0x8558 +#define GL_PRIMITIVE_RESTART_INDEX_NV 0x8559 +#endif + +#ifndef GL_NV_texture_expand_normal +#define GL_TEXTURE_UNSIGNED_REMAP_MODE_NV 0x888F +#endif + +#ifndef GL_NV_vertex_program2 +#endif + +#ifndef GL_ATI_map_object_buffer +#endif + +#ifndef GL_ATI_separate_stencil +#define GL_STENCIL_BACK_FUNC_ATI 0x8800 +#define GL_STENCIL_BACK_FAIL_ATI 0x8801 +#define GL_STENCIL_BACK_PASS_DEPTH_FAIL_ATI 0x8802 +#define GL_STENCIL_BACK_PASS_DEPTH_PASS_ATI 0x8803 +#endif + +#ifndef GL_ATI_vertex_attrib_array_object +#endif + +#ifndef GL_OES_read_format +#define GL_IMPLEMENTATION_COLOR_READ_TYPE_OES 0x8B9A +#define GL_IMPLEMENTATION_COLOR_READ_FORMAT_OES 0x8B9B +#endif + +#ifndef GL_EXT_depth_bounds_test +#define GL_DEPTH_BOUNDS_TEST_EXT 0x8890 +#define GL_DEPTH_BOUNDS_EXT 0x8891 +#endif + +#ifndef GL_EXT_texture_mirror_clamp +#define GL_MIRROR_CLAMP_EXT 0x8742 +#define GL_MIRROR_CLAMP_TO_EDGE_EXT 0x8743 +#define GL_MIRROR_CLAMP_TO_BORDER_EXT 0x8912 +#endif + +#ifndef GL_EXT_blend_equation_separate +#define GL_BLEND_EQUATION_RGB_EXT 0x8009 +#define GL_BLEND_EQUATION_ALPHA_EXT 0x883D +#endif + +#ifndef GL_MESA_pack_invert +#define GL_PACK_INVERT_MESA 0x8758 +#endif + +#ifndef GL_MESA_ycbcr_texture +#define GL_UNSIGNED_SHORT_8_8_MESA 0x85BA +#define GL_UNSIGNED_SHORT_8_8_REV_MESA 0x85BB +#define GL_YCBCR_MESA 0x8757 +#endif + +#ifndef GL_EXT_pixel_buffer_object +#define GL_PIXEL_PACK_BUFFER_EXT 0x88EB +#define GL_PIXEL_UNPACK_BUFFER_EXT 0x88EC +#define GL_PIXEL_PACK_BUFFER_BINDING_EXT 0x88ED +#define GL_PIXEL_UNPACK_BUFFER_BINDING_EXT 0x88EF +#endif + +#ifndef GL_NV_fragment_program_option +#endif + +#ifndef GL_NV_fragment_program2 +#define GL_MAX_PROGRAM_EXEC_INSTRUCTIONS_NV 0x88F4 +#define GL_MAX_PROGRAM_CALL_DEPTH_NV 0x88F5 +#define GL_MAX_PROGRAM_IF_DEPTH_NV 0x88F6 +#define GL_MAX_PROGRAM_LOOP_DEPTH_NV 0x88F7 +#define GL_MAX_PROGRAM_LOOP_COUNT_NV 0x88F8 +#endif + +#ifndef GL_NV_vertex_program2_option +/* reuse GL_MAX_PROGRAM_EXEC_INSTRUCTIONS_NV */ +/* reuse GL_MAX_PROGRAM_CALL_DEPTH_NV */ +#endif + +#ifndef GL_NV_vertex_program3 +/* reuse GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS_ARB */ +#endif + +#ifndef GL_EXT_framebuffer_object +#define GL_INVALID_FRAMEBUFFER_OPERATION_EXT 0x0506 +#define GL_MAX_RENDERBUFFER_SIZE_EXT 0x84E8 +#define GL_FRAMEBUFFER_BINDING_EXT 0x8CA6 +#define GL_RENDERBUFFER_BINDING_EXT 0x8CA7 +#define GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE_EXT 0x8CD0 +#define GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME_EXT 0x8CD1 +#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL_EXT 0x8CD2 +#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE_EXT 0x8CD3 +#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_3D_ZOFFSET_EXT 0x8CD4 +#define GL_FRAMEBUFFER_COMPLETE_EXT 0x8CD5 +#define GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT_EXT 0x8CD6 +#define GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT_EXT 0x8CD7 +#define GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS_EXT 0x8CD9 +#define GL_FRAMEBUFFER_INCOMPLETE_FORMATS_EXT 0x8CDA +#define GL_FRAMEBUFFER_INCOMPLETE_DRAW_BUFFER_EXT 0x8CDB +#define GL_FRAMEBUFFER_INCOMPLETE_READ_BUFFER_EXT 0x8CDC +#define GL_FRAMEBUFFER_UNSUPPORTED_EXT 0x8CDD +#define GL_MAX_COLOR_ATTACHMENTS_EXT 0x8CDF +#define GL_COLOR_ATTACHMENT0_EXT 0x8CE0 +#define GL_COLOR_ATTACHMENT1_EXT 0x8CE1 +#define GL_COLOR_ATTACHMENT2_EXT 0x8CE2 +#define GL_COLOR_ATTACHMENT3_EXT 0x8CE3 +#define GL_COLOR_ATTACHMENT4_EXT 0x8CE4 +#define GL_COLOR_ATTACHMENT5_EXT 0x8CE5 +#define GL_COLOR_ATTACHMENT6_EXT 0x8CE6 +#define GL_COLOR_ATTACHMENT7_EXT 0x8CE7 +#define GL_COLOR_ATTACHMENT8_EXT 0x8CE8 +#define GL_COLOR_ATTACHMENT9_EXT 0x8CE9 +#define GL_COLOR_ATTACHMENT10_EXT 0x8CEA +#define GL_COLOR_ATTACHMENT11_EXT 0x8CEB +#define GL_COLOR_ATTACHMENT12_EXT 0x8CEC +#define GL_COLOR_ATTACHMENT13_EXT 0x8CED +#define GL_COLOR_ATTACHMENT14_EXT 0x8CEE +#define GL_COLOR_ATTACHMENT15_EXT 0x8CEF +#define GL_DEPTH_ATTACHMENT_EXT 0x8D00 +#define GL_STENCIL_ATTACHMENT_EXT 0x8D20 +#define GL_FRAMEBUFFER_EXT 0x8D40 +#define GL_RENDERBUFFER_EXT 0x8D41 +#define GL_RENDERBUFFER_WIDTH_EXT 0x8D42 +#define GL_RENDERBUFFER_HEIGHT_EXT 0x8D43 +#define GL_RENDERBUFFER_INTERNAL_FORMAT_EXT 0x8D44 +#define GL_STENCIL_INDEX1_EXT 0x8D46 +#define GL_STENCIL_INDEX4_EXT 0x8D47 +#define GL_STENCIL_INDEX8_EXT 0x8D48 +#define GL_STENCIL_INDEX16_EXT 0x8D49 +#define GL_RENDERBUFFER_RED_SIZE_EXT 0x8D50 +#define GL_RENDERBUFFER_GREEN_SIZE_EXT 0x8D51 +#define GL_RENDERBUFFER_BLUE_SIZE_EXT 0x8D52 +#define GL_RENDERBUFFER_ALPHA_SIZE_EXT 0x8D53 +#define GL_RENDERBUFFER_DEPTH_SIZE_EXT 0x8D54 +#define GL_RENDERBUFFER_STENCIL_SIZE_EXT 0x8D55 +#endif + +#ifndef GL_GREMEDY_string_marker +#endif + +#ifndef GL_EXT_packed_depth_stencil +#define GL_DEPTH_STENCIL_EXT 0x84F9 +#define GL_UNSIGNED_INT_24_8_EXT 0x84FA +#define GL_DEPTH24_STENCIL8_EXT 0x88F0 +#define GL_TEXTURE_STENCIL_SIZE_EXT 0x88F1 +#endif + +#ifndef GL_EXT_stencil_clear_tag +#define GL_STENCIL_TAG_BITS_EXT 0x88F2 +#define GL_STENCIL_CLEAR_TAG_VALUE_EXT 0x88F3 +#endif + +#ifndef GL_EXT_texture_sRGB +#define GL_SRGB_EXT 0x8C40 +#define GL_SRGB8_EXT 0x8C41 +#define GL_SRGB_ALPHA_EXT 0x8C42 +#define GL_SRGB8_ALPHA8_EXT 0x8C43 +#define GL_SLUMINANCE_ALPHA_EXT 0x8C44 +#define GL_SLUMINANCE8_ALPHA8_EXT 0x8C45 +#define GL_SLUMINANCE_EXT 0x8C46 +#define GL_SLUMINANCE8_EXT 0x8C47 +#define GL_COMPRESSED_SRGB_EXT 0x8C48 +#define GL_COMPRESSED_SRGB_ALPHA_EXT 0x8C49 +#define GL_COMPRESSED_SLUMINANCE_EXT 0x8C4A +#define GL_COMPRESSED_SLUMINANCE_ALPHA_EXT 0x8C4B +#define GL_COMPRESSED_SRGB_S3TC_DXT1_EXT 0x8C4C +#define GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT 0x8C4D +#define GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT 0x8C4E +#define GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT 0x8C4F +#endif + +#ifndef GL_EXT_framebuffer_blit +#define GL_READ_FRAMEBUFFER_EXT 0x8CA8 +#define GL_DRAW_FRAMEBUFFER_EXT 0x8CA9 +#define GL_DRAW_FRAMEBUFFER_BINDING_EXT GL_FRAMEBUFFER_BINDING_EXT +#define GL_READ_FRAMEBUFFER_BINDING_EXT 0x8CAA +#endif + +#ifndef GL_EXT_framebuffer_multisample +#define GL_RENDERBUFFER_SAMPLES_EXT 0x8CAB +#define GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE_EXT 0x8D56 +#define GL_MAX_SAMPLES_EXT 0x8D57 +#endif + +#ifndef GL_MESAX_texture_stack +#define GL_TEXTURE_1D_STACK_MESAX 0x8759 +#define GL_TEXTURE_2D_STACK_MESAX 0x875A +#define GL_PROXY_TEXTURE_1D_STACK_MESAX 0x875B +#define GL_PROXY_TEXTURE_2D_STACK_MESAX 0x875C +#define GL_TEXTURE_1D_STACK_BINDING_MESAX 0x875D +#define GL_TEXTURE_2D_STACK_BINDING_MESAX 0x875E +#endif + +#ifndef GL_EXT_timer_query +#define GL_TIME_ELAPSED_EXT 0x88BF +#endif + +#ifndef GL_EXT_gpu_program_parameters +#endif + +#ifndef GL_APPLE_flush_buffer_range +#define GL_BUFFER_SERIALIZED_MODIFY_APPLE 0x8A12 +#define GL_BUFFER_FLUSHING_UNMAP_APPLE 0x8A13 +#endif + +#ifndef GL_NV_gpu_program4 +#define GL_MIN_PROGRAM_TEXEL_OFFSET_NV 0x8904 +#define GL_MAX_PROGRAM_TEXEL_OFFSET_NV 0x8905 +#define GL_PROGRAM_ATTRIB_COMPONENTS_NV 0x8906 +#define GL_PROGRAM_RESULT_COMPONENTS_NV 0x8907 +#define GL_MAX_PROGRAM_ATTRIB_COMPONENTS_NV 0x8908 +#define GL_MAX_PROGRAM_RESULT_COMPONENTS_NV 0x8909 +#define GL_MAX_PROGRAM_GENERIC_ATTRIBS_NV 0x8DA5 +#define GL_MAX_PROGRAM_GENERIC_RESULTS_NV 0x8DA6 +#endif + +#ifndef GL_NV_geometry_program4 +#define GL_LINES_ADJACENCY_EXT 0x000A +#define GL_LINE_STRIP_ADJACENCY_EXT 0x000B +#define GL_TRIANGLES_ADJACENCY_EXT 0x000C +#define GL_TRIANGLE_STRIP_ADJACENCY_EXT 0x000D +#define GL_GEOMETRY_PROGRAM_NV 0x8C26 +#define GL_MAX_PROGRAM_OUTPUT_VERTICES_NV 0x8C27 +#define GL_MAX_PROGRAM_TOTAL_OUTPUT_COMPONENTS_NV 0x8C28 +#define GL_GEOMETRY_VERTICES_OUT_EXT 0x8DDA +#define GL_GEOMETRY_INPUT_TYPE_EXT 0x8DDB +#define GL_GEOMETRY_OUTPUT_TYPE_EXT 0x8DDC +#define GL_MAX_GEOMETRY_TEXTURE_IMAGE_UNITS_EXT 0x8C29 +#define GL_FRAMEBUFFER_ATTACHMENT_LAYERED_EXT 0x8DA7 +#define GL_FRAMEBUFFER_INCOMPLETE_LAYER_TARGETS_EXT 0x8DA8 +#define GL_FRAMEBUFFER_INCOMPLETE_LAYER_COUNT_EXT 0x8DA9 +#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER_EXT 0x8CD4 +#define GL_PROGRAM_POINT_SIZE_EXT 0x8642 +#endif + +#ifndef GL_EXT_geometry_shader4 +#define GL_GEOMETRY_SHADER_EXT 0x8DD9 +/* reuse GL_GEOMETRY_VERTICES_OUT_EXT */ +/* reuse GL_GEOMETRY_INPUT_TYPE_EXT */ +/* reuse GL_GEOMETRY_OUTPUT_TYPE_EXT */ +/* reuse GL_MAX_GEOMETRY_TEXTURE_IMAGE_UNITS_EXT */ +#define GL_MAX_GEOMETRY_VARYING_COMPONENTS_EXT 0x8DDD +#define GL_MAX_VERTEX_VARYING_COMPONENTS_EXT 0x8DDE +#define GL_MAX_VARYING_COMPONENTS_EXT 0x8B4B +#define GL_MAX_GEOMETRY_UNIFORM_COMPONENTS_EXT 0x8DDF +#define GL_MAX_GEOMETRY_OUTPUT_VERTICES_EXT 0x8DE0 +#define GL_MAX_GEOMETRY_TOTAL_OUTPUT_COMPONENTS_EXT 0x8DE1 +/* reuse GL_LINES_ADJACENCY_EXT */ +/* reuse GL_LINE_STRIP_ADJACENCY_EXT */ +/* reuse GL_TRIANGLES_ADJACENCY_EXT */ +/* reuse GL_TRIANGLE_STRIP_ADJACENCY_EXT */ +/* reuse GL_FRAMEBUFFER_INCOMPLETE_LAYER_TARGETS_EXT */ +/* reuse GL_FRAMEBUFFER_INCOMPLETE_LAYER_COUNT_EXT */ +/* reuse GL_FRAMEBUFFER_ATTACHMENT_LAYERED_EXT */ +/* reuse GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER_EXT */ +/* reuse GL_PROGRAM_POINT_SIZE_EXT */ +#endif + +#ifndef GL_NV_vertex_program4 +#define GL_VERTEX_ATTRIB_ARRAY_INTEGER_NV 0x88FD +#endif + +#ifndef GL_EXT_gpu_shader4 +#define GL_SAMPLER_1D_ARRAY_EXT 0x8DC0 +#define GL_SAMPLER_2D_ARRAY_EXT 0x8DC1 +#define GL_SAMPLER_BUFFER_EXT 0x8DC2 +#define GL_SAMPLER_1D_ARRAY_SHADOW_EXT 0x8DC3 +#define GL_SAMPLER_2D_ARRAY_SHADOW_EXT 0x8DC4 +#define GL_SAMPLER_CUBE_SHADOW_EXT 0x8DC5 +#define GL_UNSIGNED_INT_VEC2_EXT 0x8DC6 +#define GL_UNSIGNED_INT_VEC3_EXT 0x8DC7 +#define GL_UNSIGNED_INT_VEC4_EXT 0x8DC8 +#define GL_INT_SAMPLER_1D_EXT 0x8DC9 +#define GL_INT_SAMPLER_2D_EXT 0x8DCA +#define GL_INT_SAMPLER_3D_EXT 0x8DCB +#define GL_INT_SAMPLER_CUBE_EXT 0x8DCC +#define GL_INT_SAMPLER_2D_RECT_EXT 0x8DCD +#define GL_INT_SAMPLER_1D_ARRAY_EXT 0x8DCE +#define GL_INT_SAMPLER_2D_ARRAY_EXT 0x8DCF +#define GL_INT_SAMPLER_BUFFER_EXT 0x8DD0 +#define GL_UNSIGNED_INT_SAMPLER_1D_EXT 0x8DD1 +#define GL_UNSIGNED_INT_SAMPLER_2D_EXT 0x8DD2 +#define GL_UNSIGNED_INT_SAMPLER_3D_EXT 0x8DD3 +#define GL_UNSIGNED_INT_SAMPLER_CUBE_EXT 0x8DD4 +#define GL_UNSIGNED_INT_SAMPLER_2D_RECT_EXT 0x8DD5 +#define GL_UNSIGNED_INT_SAMPLER_1D_ARRAY_EXT 0x8DD6 +#define GL_UNSIGNED_INT_SAMPLER_2D_ARRAY_EXT 0x8DD7 +#define GL_UNSIGNED_INT_SAMPLER_BUFFER_EXT 0x8DD8 +#endif + +#ifndef GL_EXT_draw_instanced +#endif + +#ifndef GL_EXT_packed_float +#define GL_R11F_G11F_B10F_EXT 0x8C3A +#define GL_UNSIGNED_INT_10F_11F_11F_REV_EXT 0x8C3B +#define GL_RGBA_SIGNED_COMPONENTS_EXT 0x8C3C +#endif + +#ifndef GL_EXT_texture_array +#define GL_TEXTURE_1D_ARRAY_EXT 0x8C18 +#define GL_PROXY_TEXTURE_1D_ARRAY_EXT 0x8C19 +#define GL_TEXTURE_2D_ARRAY_EXT 0x8C1A +#define GL_PROXY_TEXTURE_2D_ARRAY_EXT 0x8C1B +#define GL_TEXTURE_BINDING_1D_ARRAY_EXT 0x8C1C +#define GL_TEXTURE_BINDING_2D_ARRAY_EXT 0x8C1D +#define GL_MAX_ARRAY_TEXTURE_LAYERS_EXT 0x88FF +#define GL_COMPARE_REF_DEPTH_TO_TEXTURE_EXT 0x884E +/* reuse GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER_EXT */ +#endif + +#ifndef GL_EXT_texture_buffer_object +#define GL_TEXTURE_BUFFER_EXT 0x8C2A +#define GL_MAX_TEXTURE_BUFFER_SIZE_EXT 0x8C2B +#define GL_TEXTURE_BINDING_BUFFER_EXT 0x8C2C +#define GL_TEXTURE_BUFFER_DATA_STORE_BINDING_EXT 0x8C2D +#define GL_TEXTURE_BUFFER_FORMAT_EXT 0x8C2E +#endif + +#ifndef GL_EXT_texture_compression_latc +#define GL_COMPRESSED_LUMINANCE_LATC1_EXT 0x8C70 +#define GL_COMPRESSED_SIGNED_LUMINANCE_LATC1_EXT 0x8C71 +#define GL_COMPRESSED_LUMINANCE_ALPHA_LATC2_EXT 0x8C72 +#define GL_COMPRESSED_SIGNED_LUMINANCE_ALPHA_LATC2_EXT 0x8C73 +#endif + +#ifndef GL_EXT_texture_compression_rgtc +#define GL_COMPRESSED_RED_RGTC1_EXT 0x8DBB +#define GL_COMPRESSED_SIGNED_RED_RGTC1_EXT 0x8DBC +#define GL_COMPRESSED_RED_GREEN_RGTC2_EXT 0x8DBD +#define GL_COMPRESSED_SIGNED_RED_GREEN_RGTC2_EXT 0x8DBE +#endif + +#ifndef GL_EXT_texture_shared_exponent +#define GL_RGB9_E5_EXT 0x8C3D +#define GL_UNSIGNED_INT_5_9_9_9_REV_EXT 0x8C3E +#define GL_TEXTURE_SHARED_SIZE_EXT 0x8C3F +#endif + +#ifndef GL_NV_depth_buffer_float +#define GL_DEPTH_COMPONENT32F_NV 0x8DAB +#define GL_DEPTH32F_STENCIL8_NV 0x8DAC +#define GL_FLOAT_32_UNSIGNED_INT_24_8_REV_NV 0x8DAD +#define GL_DEPTH_BUFFER_FLOAT_MODE_NV 0x8DAF +#endif + +#ifndef GL_NV_fragment_program4 +#endif + +#ifndef GL_NV_framebuffer_multisample_coverage +#define GL_RENDERBUFFER_COVERAGE_SAMPLES_NV 0x8CAB +#define GL_RENDERBUFFER_COLOR_SAMPLES_NV 0x8E10 +#define GL_MAX_MULTISAMPLE_COVERAGE_MODES_NV 0x8E11 +#define GL_MULTISAMPLE_COVERAGE_MODES_NV 0x8E12 +#endif + +#ifndef GL_EXT_framebuffer_sRGB +#define GL_FRAMEBUFFER_SRGB_EXT 0x8DB9 +#define GL_FRAMEBUFFER_SRGB_CAPABLE_EXT 0x8DBA +#endif + +#ifndef GL_NV_geometry_shader4 +#endif + +#ifndef GL_NV_parameter_buffer_object +#define GL_MAX_PROGRAM_PARAMETER_BUFFER_BINDINGS_NV 0x8DA0 +#define GL_MAX_PROGRAM_PARAMETER_BUFFER_SIZE_NV 0x8DA1 +#define GL_VERTEX_PROGRAM_PARAMETER_BUFFER_NV 0x8DA2 +#define GL_GEOMETRY_PROGRAM_PARAMETER_BUFFER_NV 0x8DA3 +#define GL_FRAGMENT_PROGRAM_PARAMETER_BUFFER_NV 0x8DA4 +#endif + +#ifndef GL_EXT_draw_buffers2 +#endif + +#ifndef GL_NV_transform_feedback +#define GL_BACK_PRIMARY_COLOR_NV 0x8C77 +#define GL_BACK_SECONDARY_COLOR_NV 0x8C78 +#define GL_TEXTURE_COORD_NV 0x8C79 +#define GL_CLIP_DISTANCE_NV 0x8C7A +#define GL_VERTEX_ID_NV 0x8C7B +#define GL_PRIMITIVE_ID_NV 0x8C7C +#define GL_GENERIC_ATTRIB_NV 0x8C7D +#define GL_TRANSFORM_FEEDBACK_ATTRIBS_NV 0x8C7E +#define GL_TRANSFORM_FEEDBACK_BUFFER_MODE_NV 0x8C7F +#define GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_COMPONENTS_NV 0x8C80 +#define GL_ACTIVE_VARYINGS_NV 0x8C81 +#define GL_ACTIVE_VARYING_MAX_LENGTH_NV 0x8C82 +#define GL_TRANSFORM_FEEDBACK_VARYINGS_NV 0x8C83 +#define GL_TRANSFORM_FEEDBACK_BUFFER_START_NV 0x8C84 +#define GL_TRANSFORM_FEEDBACK_BUFFER_SIZE_NV 0x8C85 +#define GL_TRANSFORM_FEEDBACK_RECORD_NV 0x8C86 +#define GL_PRIMITIVES_GENERATED_NV 0x8C87 +#define GL_TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN_NV 0x8C88 +#define GL_RASTERIZER_DISCARD_NV 0x8C89 +#define GL_MAX_TRANSFORM_FEEDBACK_INTERLEAVED_COMPONENTS_NV 0x8C8A +#define GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_ATTRIBS_NV 0x8C8B +#define GL_INTERLEAVED_ATTRIBS_NV 0x8C8C +#define GL_SEPARATE_ATTRIBS_NV 0x8C8D +#define GL_TRANSFORM_FEEDBACK_BUFFER_NV 0x8C8E +#define GL_TRANSFORM_FEEDBACK_BUFFER_BINDING_NV 0x8C8F +#define GL_LAYER_NV 0x8DAA +#define GL_NEXT_BUFFER_NV -2 +#define GL_SKIP_COMPONENTS4_NV -3 +#define GL_SKIP_COMPONENTS3_NV -4 +#define GL_SKIP_COMPONENTS2_NV -5 +#define GL_SKIP_COMPONENTS1_NV -6 +#endif + +#ifndef GL_EXT_bindable_uniform +#define GL_MAX_VERTEX_BINDABLE_UNIFORMS_EXT 0x8DE2 +#define GL_MAX_FRAGMENT_BINDABLE_UNIFORMS_EXT 0x8DE3 +#define GL_MAX_GEOMETRY_BINDABLE_UNIFORMS_EXT 0x8DE4 +#define GL_MAX_BINDABLE_UNIFORM_SIZE_EXT 0x8DED +#define GL_UNIFORM_BUFFER_EXT 0x8DEE +#define GL_UNIFORM_BUFFER_BINDING_EXT 0x8DEF +#endif + +#ifndef GL_EXT_texture_integer +#define GL_RGBA32UI_EXT 0x8D70 +#define GL_RGB32UI_EXT 0x8D71 +#define GL_ALPHA32UI_EXT 0x8D72 +#define GL_INTENSITY32UI_EXT 0x8D73 +#define GL_LUMINANCE32UI_EXT 0x8D74 +#define GL_LUMINANCE_ALPHA32UI_EXT 0x8D75 +#define GL_RGBA16UI_EXT 0x8D76 +#define GL_RGB16UI_EXT 0x8D77 +#define GL_ALPHA16UI_EXT 0x8D78 +#define GL_INTENSITY16UI_EXT 0x8D79 +#define GL_LUMINANCE16UI_EXT 0x8D7A +#define GL_LUMINANCE_ALPHA16UI_EXT 0x8D7B +#define GL_RGBA8UI_EXT 0x8D7C +#define GL_RGB8UI_EXT 0x8D7D +#define GL_ALPHA8UI_EXT 0x8D7E +#define GL_INTENSITY8UI_EXT 0x8D7F +#define GL_LUMINANCE8UI_EXT 0x8D80 +#define GL_LUMINANCE_ALPHA8UI_EXT 0x8D81 +#define GL_RGBA32I_EXT 0x8D82 +#define GL_RGB32I_EXT 0x8D83 +#define GL_ALPHA32I_EXT 0x8D84 +#define GL_INTENSITY32I_EXT 0x8D85 +#define GL_LUMINANCE32I_EXT 0x8D86 +#define GL_LUMINANCE_ALPHA32I_EXT 0x8D87 +#define GL_RGBA16I_EXT 0x8D88 +#define GL_RGB16I_EXT 0x8D89 +#define GL_ALPHA16I_EXT 0x8D8A +#define GL_INTENSITY16I_EXT 0x8D8B +#define GL_LUMINANCE16I_EXT 0x8D8C +#define GL_LUMINANCE_ALPHA16I_EXT 0x8D8D +#define GL_RGBA8I_EXT 0x8D8E +#define GL_RGB8I_EXT 0x8D8F +#define GL_ALPHA8I_EXT 0x8D90 +#define GL_INTENSITY8I_EXT 0x8D91 +#define GL_LUMINANCE8I_EXT 0x8D92 +#define GL_LUMINANCE_ALPHA8I_EXT 0x8D93 +#define GL_RED_INTEGER_EXT 0x8D94 +#define GL_GREEN_INTEGER_EXT 0x8D95 +#define GL_BLUE_INTEGER_EXT 0x8D96 +#define GL_ALPHA_INTEGER_EXT 0x8D97 +#define GL_RGB_INTEGER_EXT 0x8D98 +#define GL_RGBA_INTEGER_EXT 0x8D99 +#define GL_BGR_INTEGER_EXT 0x8D9A +#define GL_BGRA_INTEGER_EXT 0x8D9B +#define GL_LUMINANCE_INTEGER_EXT 0x8D9C +#define GL_LUMINANCE_ALPHA_INTEGER_EXT 0x8D9D +#define GL_RGBA_INTEGER_MODE_EXT 0x8D9E +#endif + +#ifndef GL_GREMEDY_frame_terminator +#endif + +#ifndef GL_NV_conditional_render +#define GL_QUERY_WAIT_NV 0x8E13 +#define GL_QUERY_NO_WAIT_NV 0x8E14 +#define GL_QUERY_BY_REGION_WAIT_NV 0x8E15 +#define GL_QUERY_BY_REGION_NO_WAIT_NV 0x8E16 +#endif + +#ifndef GL_NV_present_video +#define GL_FRAME_NV 0x8E26 +#define GL_FIELDS_NV 0x8E27 +#define GL_CURRENT_TIME_NV 0x8E28 +#define GL_NUM_FILL_STREAMS_NV 0x8E29 +#define GL_PRESENT_TIME_NV 0x8E2A +#define GL_PRESENT_DURATION_NV 0x8E2B +#endif + +#ifndef GL_EXT_transform_feedback +#define GL_TRANSFORM_FEEDBACK_BUFFER_EXT 0x8C8E +#define GL_TRANSFORM_FEEDBACK_BUFFER_START_EXT 0x8C84 +#define GL_TRANSFORM_FEEDBACK_BUFFER_SIZE_EXT 0x8C85 +#define GL_TRANSFORM_FEEDBACK_BUFFER_BINDING_EXT 0x8C8F +#define GL_INTERLEAVED_ATTRIBS_EXT 0x8C8C +#define GL_SEPARATE_ATTRIBS_EXT 0x8C8D +#define GL_PRIMITIVES_GENERATED_EXT 0x8C87 +#define GL_TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN_EXT 0x8C88 +#define GL_RASTERIZER_DISCARD_EXT 0x8C89 +#define GL_MAX_TRANSFORM_FEEDBACK_INTERLEAVED_COMPONENTS_EXT 0x8C8A +#define GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_ATTRIBS_EXT 0x8C8B +#define GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_COMPONENTS_EXT 0x8C80 +#define GL_TRANSFORM_FEEDBACK_VARYINGS_EXT 0x8C83 +#define GL_TRANSFORM_FEEDBACK_BUFFER_MODE_EXT 0x8C7F +#define GL_TRANSFORM_FEEDBACK_VARYING_MAX_LENGTH_EXT 0x8C76 +#endif + +#ifndef GL_EXT_direct_state_access +#define GL_PROGRAM_MATRIX_EXT 0x8E2D +#define GL_TRANSPOSE_PROGRAM_MATRIX_EXT 0x8E2E +#define GL_PROGRAM_MATRIX_STACK_DEPTH_EXT 0x8E2F +#endif + +#ifndef GL_EXT_vertex_array_bgra +/* reuse GL_BGRA */ +#endif + +#ifndef GL_EXT_texture_swizzle +#define GL_TEXTURE_SWIZZLE_R_EXT 0x8E42 +#define GL_TEXTURE_SWIZZLE_G_EXT 0x8E43 +#define GL_TEXTURE_SWIZZLE_B_EXT 0x8E44 +#define GL_TEXTURE_SWIZZLE_A_EXT 0x8E45 +#define GL_TEXTURE_SWIZZLE_RGBA_EXT 0x8E46 +#endif + +#ifndef GL_NV_explicit_multisample +#define GL_SAMPLE_POSITION_NV 0x8E50 +#define GL_SAMPLE_MASK_NV 0x8E51 +#define GL_SAMPLE_MASK_VALUE_NV 0x8E52 +#define GL_TEXTURE_BINDING_RENDERBUFFER_NV 0x8E53 +#define GL_TEXTURE_RENDERBUFFER_DATA_STORE_BINDING_NV 0x8E54 +#define GL_TEXTURE_RENDERBUFFER_NV 0x8E55 +#define GL_SAMPLER_RENDERBUFFER_NV 0x8E56 +#define GL_INT_SAMPLER_RENDERBUFFER_NV 0x8E57 +#define GL_UNSIGNED_INT_SAMPLER_RENDERBUFFER_NV 0x8E58 +#define GL_MAX_SAMPLE_MASK_WORDS_NV 0x8E59 +#endif + +#ifndef GL_NV_transform_feedback2 +#define GL_TRANSFORM_FEEDBACK_NV 0x8E22 +#define GL_TRANSFORM_FEEDBACK_BUFFER_PAUSED_NV 0x8E23 +#define GL_TRANSFORM_FEEDBACK_BUFFER_ACTIVE_NV 0x8E24 +#define GL_TRANSFORM_FEEDBACK_BINDING_NV 0x8E25 +#endif + +#ifndef GL_ATI_meminfo +#define GL_VBO_FREE_MEMORY_ATI 0x87FB +#define GL_TEXTURE_FREE_MEMORY_ATI 0x87FC +#define GL_RENDERBUFFER_FREE_MEMORY_ATI 0x87FD +#endif + +#ifndef GL_AMD_performance_monitor +#define GL_COUNTER_TYPE_AMD 0x8BC0 +#define GL_COUNTER_RANGE_AMD 0x8BC1 +#define GL_UNSIGNED_INT64_AMD 0x8BC2 +#define GL_PERCENTAGE_AMD 0x8BC3 +#define GL_PERFMON_RESULT_AVAILABLE_AMD 0x8BC4 +#define GL_PERFMON_RESULT_SIZE_AMD 0x8BC5 +#define GL_PERFMON_RESULT_AMD 0x8BC6 +#endif + +#ifndef GL_AMD_texture_texture4 +#endif + +#ifndef GL_AMD_vertex_shader_tesselator +#define GL_SAMPLER_BUFFER_AMD 0x9001 +#define GL_INT_SAMPLER_BUFFER_AMD 0x9002 +#define GL_UNSIGNED_INT_SAMPLER_BUFFER_AMD 0x9003 +#define GL_TESSELLATION_MODE_AMD 0x9004 +#define GL_TESSELLATION_FACTOR_AMD 0x9005 +#define GL_DISCRETE_AMD 0x9006 +#define GL_CONTINUOUS_AMD 0x9007 +#endif + +#ifndef GL_EXT_provoking_vertex +#define GL_QUADS_FOLLOW_PROVOKING_VERTEX_CONVENTION_EXT 0x8E4C +#define GL_FIRST_VERTEX_CONVENTION_EXT 0x8E4D +#define GL_LAST_VERTEX_CONVENTION_EXT 0x8E4E +#define GL_PROVOKING_VERTEX_EXT 0x8E4F +#endif + +#ifndef GL_EXT_texture_snorm +#define GL_ALPHA_SNORM 0x9010 +#define GL_LUMINANCE_SNORM 0x9011 +#define GL_LUMINANCE_ALPHA_SNORM 0x9012 +#define GL_INTENSITY_SNORM 0x9013 +#define GL_ALPHA8_SNORM 0x9014 +#define GL_LUMINANCE8_SNORM 0x9015 +#define GL_LUMINANCE8_ALPHA8_SNORM 0x9016 +#define GL_INTENSITY8_SNORM 0x9017 +#define GL_ALPHA16_SNORM 0x9018 +#define GL_LUMINANCE16_SNORM 0x9019 +#define GL_LUMINANCE16_ALPHA16_SNORM 0x901A +#define GL_INTENSITY16_SNORM 0x901B +/* reuse GL_RED_SNORM */ +/* reuse GL_RG_SNORM */ +/* reuse GL_RGB_SNORM */ +/* reuse GL_RGBA_SNORM */ +/* reuse GL_R8_SNORM */ +/* reuse GL_RG8_SNORM */ +/* reuse GL_RGB8_SNORM */ +/* reuse GL_RGBA8_SNORM */ +/* reuse GL_R16_SNORM */ +/* reuse GL_RG16_SNORM */ +/* reuse GL_RGB16_SNORM */ +/* reuse GL_RGBA16_SNORM */ +/* reuse GL_SIGNED_NORMALIZED */ +#endif + +#ifndef GL_AMD_draw_buffers_blend +#endif + +#ifndef GL_APPLE_texture_range +#define GL_TEXTURE_RANGE_LENGTH_APPLE 0x85B7 +#define GL_TEXTURE_RANGE_POINTER_APPLE 0x85B8 +#define GL_TEXTURE_STORAGE_HINT_APPLE 0x85BC +#define GL_STORAGE_PRIVATE_APPLE 0x85BD +/* reuse GL_STORAGE_CACHED_APPLE */ +/* reuse GL_STORAGE_SHARED_APPLE */ +#endif + +#ifndef GL_APPLE_float_pixels +#define GL_HALF_APPLE 0x140B +#define GL_RGBA_FLOAT32_APPLE 0x8814 +#define GL_RGB_FLOAT32_APPLE 0x8815 +#define GL_ALPHA_FLOAT32_APPLE 0x8816 +#define GL_INTENSITY_FLOAT32_APPLE 0x8817 +#define GL_LUMINANCE_FLOAT32_APPLE 0x8818 +#define GL_LUMINANCE_ALPHA_FLOAT32_APPLE 0x8819 +#define GL_RGBA_FLOAT16_APPLE 0x881A +#define GL_RGB_FLOAT16_APPLE 0x881B +#define GL_ALPHA_FLOAT16_APPLE 0x881C +#define GL_INTENSITY_FLOAT16_APPLE 0x881D +#define GL_LUMINANCE_FLOAT16_APPLE 0x881E +#define GL_LUMINANCE_ALPHA_FLOAT16_APPLE 0x881F +#define GL_COLOR_FLOAT_APPLE 0x8A0F +#endif + +#ifndef GL_APPLE_vertex_program_evaluators +#define GL_VERTEX_ATTRIB_MAP1_APPLE 0x8A00 +#define GL_VERTEX_ATTRIB_MAP2_APPLE 0x8A01 +#define GL_VERTEX_ATTRIB_MAP1_SIZE_APPLE 0x8A02 +#define GL_VERTEX_ATTRIB_MAP1_COEFF_APPLE 0x8A03 +#define GL_VERTEX_ATTRIB_MAP1_ORDER_APPLE 0x8A04 +#define GL_VERTEX_ATTRIB_MAP1_DOMAIN_APPLE 0x8A05 +#define GL_VERTEX_ATTRIB_MAP2_SIZE_APPLE 0x8A06 +#define GL_VERTEX_ATTRIB_MAP2_COEFF_APPLE 0x8A07 +#define GL_VERTEX_ATTRIB_MAP2_ORDER_APPLE 0x8A08 +#define GL_VERTEX_ATTRIB_MAP2_DOMAIN_APPLE 0x8A09 +#endif + +#ifndef GL_APPLE_aux_depth_stencil +#define GL_AUX_DEPTH_STENCIL_APPLE 0x8A14 +#endif + +#ifndef GL_APPLE_object_purgeable +#define GL_BUFFER_OBJECT_APPLE 0x85B3 +#define GL_RELEASED_APPLE 0x8A19 +#define GL_VOLATILE_APPLE 0x8A1A +#define GL_RETAINED_APPLE 0x8A1B +#define GL_UNDEFINED_APPLE 0x8A1C +#define GL_PURGEABLE_APPLE 0x8A1D +#endif + +#ifndef GL_APPLE_row_bytes +#define GL_PACK_ROW_BYTES_APPLE 0x8A15 +#define GL_UNPACK_ROW_BYTES_APPLE 0x8A16 +#endif + +#ifndef GL_APPLE_rgb_422 +#define GL_RGB_422_APPLE 0x8A1F +/* reuse GL_UNSIGNED_SHORT_8_8_APPLE */ +/* reuse GL_UNSIGNED_SHORT_8_8_REV_APPLE */ +#endif + +#ifndef GL_NV_video_capture +#define GL_VIDEO_BUFFER_NV 0x9020 +#define GL_VIDEO_BUFFER_BINDING_NV 0x9021 +#define GL_FIELD_UPPER_NV 0x9022 +#define GL_FIELD_LOWER_NV 0x9023 +#define GL_NUM_VIDEO_CAPTURE_STREAMS_NV 0x9024 +#define GL_NEXT_VIDEO_CAPTURE_BUFFER_STATUS_NV 0x9025 +#define GL_VIDEO_CAPTURE_TO_422_SUPPORTED_NV 0x9026 +#define GL_LAST_VIDEO_CAPTURE_STATUS_NV 0x9027 +#define GL_VIDEO_BUFFER_PITCH_NV 0x9028 +#define GL_VIDEO_COLOR_CONVERSION_MATRIX_NV 0x9029 +#define GL_VIDEO_COLOR_CONVERSION_MAX_NV 0x902A +#define GL_VIDEO_COLOR_CONVERSION_MIN_NV 0x902B +#define GL_VIDEO_COLOR_CONVERSION_OFFSET_NV 0x902C +#define GL_VIDEO_BUFFER_INTERNAL_FORMAT_NV 0x902D +#define GL_PARTIAL_SUCCESS_NV 0x902E +#define GL_SUCCESS_NV 0x902F +#define GL_FAILURE_NV 0x9030 +#define GL_YCBYCR8_422_NV 0x9031 +#define GL_YCBAYCR8A_4224_NV 0x9032 +#define GL_Z6Y10Z6CB10Z6Y10Z6CR10_422_NV 0x9033 +#define GL_Z6Y10Z6CB10Z6A10Z6Y10Z6CR10Z6A10_4224_NV 0x9034 +#define GL_Z4Y12Z4CB12Z4Y12Z4CR12_422_NV 0x9035 +#define GL_Z4Y12Z4CB12Z4A12Z4Y12Z4CR12Z4A12_4224_NV 0x9036 +#define GL_Z4Y12Z4CB12Z4CR12_444_NV 0x9037 +#define GL_VIDEO_CAPTURE_FRAME_WIDTH_NV 0x9038 +#define GL_VIDEO_CAPTURE_FRAME_HEIGHT_NV 0x9039 +#define GL_VIDEO_CAPTURE_FIELD_UPPER_HEIGHT_NV 0x903A +#define GL_VIDEO_CAPTURE_FIELD_LOWER_HEIGHT_NV 0x903B +#define GL_VIDEO_CAPTURE_SURFACE_ORIGIN_NV 0x903C +#endif + +#ifndef GL_NV_copy_image +#endif + +#ifndef GL_EXT_separate_shader_objects +#define GL_ACTIVE_PROGRAM_EXT 0x8B8D +#endif + +#ifndef GL_NV_parameter_buffer_object2 +#endif + +#ifndef GL_NV_shader_buffer_load +#define GL_BUFFER_GPU_ADDRESS_NV 0x8F1D +#define GL_GPU_ADDRESS_NV 0x8F34 +#define GL_MAX_SHADER_BUFFER_ADDRESS_NV 0x8F35 +#endif + +#ifndef GL_NV_vertex_buffer_unified_memory +#define GL_VERTEX_ATTRIB_ARRAY_UNIFIED_NV 0x8F1E +#define GL_ELEMENT_ARRAY_UNIFIED_NV 0x8F1F +#define GL_VERTEX_ATTRIB_ARRAY_ADDRESS_NV 0x8F20 +#define GL_VERTEX_ARRAY_ADDRESS_NV 0x8F21 +#define GL_NORMAL_ARRAY_ADDRESS_NV 0x8F22 +#define GL_COLOR_ARRAY_ADDRESS_NV 0x8F23 +#define GL_INDEX_ARRAY_ADDRESS_NV 0x8F24 +#define GL_TEXTURE_COORD_ARRAY_ADDRESS_NV 0x8F25 +#define GL_EDGE_FLAG_ARRAY_ADDRESS_NV 0x8F26 +#define GL_SECONDARY_COLOR_ARRAY_ADDRESS_NV 0x8F27 +#define GL_FOG_COORD_ARRAY_ADDRESS_NV 0x8F28 +#define GL_ELEMENT_ARRAY_ADDRESS_NV 0x8F29 +#define GL_VERTEX_ATTRIB_ARRAY_LENGTH_NV 0x8F2A +#define GL_VERTEX_ARRAY_LENGTH_NV 0x8F2B +#define GL_NORMAL_ARRAY_LENGTH_NV 0x8F2C +#define GL_COLOR_ARRAY_LENGTH_NV 0x8F2D +#define GL_INDEX_ARRAY_LENGTH_NV 0x8F2E +#define GL_TEXTURE_COORD_ARRAY_LENGTH_NV 0x8F2F +#define GL_EDGE_FLAG_ARRAY_LENGTH_NV 0x8F30 +#define GL_SECONDARY_COLOR_ARRAY_LENGTH_NV 0x8F31 +#define GL_FOG_COORD_ARRAY_LENGTH_NV 0x8F32 +#define GL_ELEMENT_ARRAY_LENGTH_NV 0x8F33 +#define GL_DRAW_INDIRECT_UNIFIED_NV 0x8F40 +#define GL_DRAW_INDIRECT_ADDRESS_NV 0x8F41 +#define GL_DRAW_INDIRECT_LENGTH_NV 0x8F42 +#endif + +#ifndef GL_NV_texture_barrier +#endif + +#ifndef GL_AMD_shader_stencil_export +#endif + +#ifndef GL_AMD_seamless_cubemap_per_texture +/* reuse GL_TEXTURE_CUBE_MAP_SEAMLESS */ +#endif + +#ifndef GL_AMD_conservative_depth +#endif + +#ifndef GL_EXT_shader_image_load_store +#define GL_MAX_IMAGE_UNITS_EXT 0x8F38 +#define GL_MAX_COMBINED_IMAGE_UNITS_AND_FRAGMENT_OUTPUTS_EXT 0x8F39 +#define GL_IMAGE_BINDING_NAME_EXT 0x8F3A +#define GL_IMAGE_BINDING_LEVEL_EXT 0x8F3B +#define GL_IMAGE_BINDING_LAYERED_EXT 0x8F3C +#define GL_IMAGE_BINDING_LAYER_EXT 0x8F3D +#define GL_IMAGE_BINDING_ACCESS_EXT 0x8F3E +#define GL_IMAGE_1D_EXT 0x904C +#define GL_IMAGE_2D_EXT 0x904D +#define GL_IMAGE_3D_EXT 0x904E +#define GL_IMAGE_2D_RECT_EXT 0x904F +#define GL_IMAGE_CUBE_EXT 0x9050 +#define GL_IMAGE_BUFFER_EXT 0x9051 +#define GL_IMAGE_1D_ARRAY_EXT 0x9052 +#define GL_IMAGE_2D_ARRAY_EXT 0x9053 +#define GL_IMAGE_CUBE_MAP_ARRAY_EXT 0x9054 +#define GL_IMAGE_2D_MULTISAMPLE_EXT 0x9055 +#define GL_IMAGE_2D_MULTISAMPLE_ARRAY_EXT 0x9056 +#define GL_INT_IMAGE_1D_EXT 0x9057 +#define GL_INT_IMAGE_2D_EXT 0x9058 +#define GL_INT_IMAGE_3D_EXT 0x9059 +#define GL_INT_IMAGE_2D_RECT_EXT 0x905A +#define GL_INT_IMAGE_CUBE_EXT 0x905B +#define GL_INT_IMAGE_BUFFER_EXT 0x905C +#define GL_INT_IMAGE_1D_ARRAY_EXT 0x905D +#define GL_INT_IMAGE_2D_ARRAY_EXT 0x905E +#define GL_INT_IMAGE_CUBE_MAP_ARRAY_EXT 0x905F +#define GL_INT_IMAGE_2D_MULTISAMPLE_EXT 0x9060 +#define GL_INT_IMAGE_2D_MULTISAMPLE_ARRAY_EXT 0x9061 +#define GL_UNSIGNED_INT_IMAGE_1D_EXT 0x9062 +#define GL_UNSIGNED_INT_IMAGE_2D_EXT 0x9063 +#define GL_UNSIGNED_INT_IMAGE_3D_EXT 0x9064 +#define GL_UNSIGNED_INT_IMAGE_2D_RECT_EXT 0x9065 +#define GL_UNSIGNED_INT_IMAGE_CUBE_EXT 0x9066 +#define GL_UNSIGNED_INT_IMAGE_BUFFER_EXT 0x9067 +#define GL_UNSIGNED_INT_IMAGE_1D_ARRAY_EXT 0x9068 +#define GL_UNSIGNED_INT_IMAGE_2D_ARRAY_EXT 0x9069 +#define GL_UNSIGNED_INT_IMAGE_CUBE_MAP_ARRAY_EXT 0x906A +#define GL_UNSIGNED_INT_IMAGE_2D_MULTISAMPLE_EXT 0x906B +#define GL_UNSIGNED_INT_IMAGE_2D_MULTISAMPLE_ARRAY_EXT 0x906C +#define GL_MAX_IMAGE_SAMPLES_EXT 0x906D +#define GL_IMAGE_BINDING_FORMAT_EXT 0x906E +#define GL_VERTEX_ATTRIB_ARRAY_BARRIER_BIT_EXT 0x00000001 +#define GL_ELEMENT_ARRAY_BARRIER_BIT_EXT 0x00000002 +#define GL_UNIFORM_BARRIER_BIT_EXT 0x00000004 +#define GL_TEXTURE_FETCH_BARRIER_BIT_EXT 0x00000008 +#define GL_SHADER_IMAGE_ACCESS_BARRIER_BIT_EXT 0x00000020 +#define GL_COMMAND_BARRIER_BIT_EXT 0x00000040 +#define GL_PIXEL_BUFFER_BARRIER_BIT_EXT 0x00000080 +#define GL_TEXTURE_UPDATE_BARRIER_BIT_EXT 0x00000100 +#define GL_BUFFER_UPDATE_BARRIER_BIT_EXT 0x00000200 +#define GL_FRAMEBUFFER_BARRIER_BIT_EXT 0x00000400 +#define GL_TRANSFORM_FEEDBACK_BARRIER_BIT_EXT 0x00000800 +#define GL_ATOMIC_COUNTER_BARRIER_BIT_EXT 0x00001000 +#define GL_ALL_BARRIER_BITS_EXT 0xFFFFFFFF +#endif + +#ifndef GL_EXT_vertex_attrib_64bit +/* reuse GL_DOUBLE */ +#define GL_DOUBLE_VEC2_EXT 0x8FFC +#define GL_DOUBLE_VEC3_EXT 0x8FFD +#define GL_DOUBLE_VEC4_EXT 0x8FFE +#define GL_DOUBLE_MAT2_EXT 0x8F46 +#define GL_DOUBLE_MAT3_EXT 0x8F47 +#define GL_DOUBLE_MAT4_EXT 0x8F48 +#define GL_DOUBLE_MAT2x3_EXT 0x8F49 +#define GL_DOUBLE_MAT2x4_EXT 0x8F4A +#define GL_DOUBLE_MAT3x2_EXT 0x8F4B +#define GL_DOUBLE_MAT3x4_EXT 0x8F4C +#define GL_DOUBLE_MAT4x2_EXT 0x8F4D +#define GL_DOUBLE_MAT4x3_EXT 0x8F4E +#endif + +#ifndef GL_NV_gpu_program5 +#define GL_MAX_GEOMETRY_PROGRAM_INVOCATIONS_NV 0x8E5A +#define GL_MIN_FRAGMENT_INTERPOLATION_OFFSET_NV 0x8E5B +#define GL_MAX_FRAGMENT_INTERPOLATION_OFFSET_NV 0x8E5C +#define GL_FRAGMENT_PROGRAM_INTERPOLATION_OFFSET_BITS_NV 0x8E5D +#define GL_MIN_PROGRAM_TEXTURE_GATHER_OFFSET_NV 0x8E5E +#define GL_MAX_PROGRAM_TEXTURE_GATHER_OFFSET_NV 0x8E5F +#define GL_MAX_PROGRAM_SUBROUTINE_PARAMETERS_NV 0x8F44 +#define GL_MAX_PROGRAM_SUBROUTINE_NUM_NV 0x8F45 +#endif + +#ifndef GL_NV_gpu_shader5 +#define GL_INT64_NV 0x140E +#define GL_UNSIGNED_INT64_NV 0x140F +#define GL_INT8_NV 0x8FE0 +#define GL_INT8_VEC2_NV 0x8FE1 +#define GL_INT8_VEC3_NV 0x8FE2 +#define GL_INT8_VEC4_NV 0x8FE3 +#define GL_INT16_NV 0x8FE4 +#define GL_INT16_VEC2_NV 0x8FE5 +#define GL_INT16_VEC3_NV 0x8FE6 +#define GL_INT16_VEC4_NV 0x8FE7 +#define GL_INT64_VEC2_NV 0x8FE9 +#define GL_INT64_VEC3_NV 0x8FEA +#define GL_INT64_VEC4_NV 0x8FEB +#define GL_UNSIGNED_INT8_NV 0x8FEC +#define GL_UNSIGNED_INT8_VEC2_NV 0x8FED +#define GL_UNSIGNED_INT8_VEC3_NV 0x8FEE +#define GL_UNSIGNED_INT8_VEC4_NV 0x8FEF +#define GL_UNSIGNED_INT16_NV 0x8FF0 +#define GL_UNSIGNED_INT16_VEC2_NV 0x8FF1 +#define GL_UNSIGNED_INT16_VEC3_NV 0x8FF2 +#define GL_UNSIGNED_INT16_VEC4_NV 0x8FF3 +#define GL_UNSIGNED_INT64_VEC2_NV 0x8FF5 +#define GL_UNSIGNED_INT64_VEC3_NV 0x8FF6 +#define GL_UNSIGNED_INT64_VEC4_NV 0x8FF7 +#define GL_FLOAT16_NV 0x8FF8 +#define GL_FLOAT16_VEC2_NV 0x8FF9 +#define GL_FLOAT16_VEC3_NV 0x8FFA +#define GL_FLOAT16_VEC4_NV 0x8FFB +/* reuse GL_PATCHES */ +#endif + +#ifndef GL_NV_shader_buffer_store +#define GL_SHADER_GLOBAL_ACCESS_BARRIER_BIT_NV 0x00000010 +/* reuse GL_READ_WRITE */ +/* reuse GL_WRITE_ONLY */ +#endif + +#ifndef GL_NV_tessellation_program5 +#define GL_MAX_PROGRAM_PATCH_ATTRIBS_NV 0x86D8 +#define GL_TESS_CONTROL_PROGRAM_NV 0x891E +#define GL_TESS_EVALUATION_PROGRAM_NV 0x891F +#define GL_TESS_CONTROL_PROGRAM_PARAMETER_BUFFER_NV 0x8C74 +#define GL_TESS_EVALUATION_PROGRAM_PARAMETER_BUFFER_NV 0x8C75 +#endif + +#ifndef GL_NV_vertex_attrib_integer_64bit +/* reuse GL_INT64_NV */ +/* reuse GL_UNSIGNED_INT64_NV */ +#endif + +#ifndef GL_NV_multisample_coverage +#define GL_COVERAGE_SAMPLES_NV 0x80A9 +#define GL_COLOR_SAMPLES_NV 0x8E20 +#endif + +#ifndef GL_AMD_name_gen_delete +#define GL_DATA_BUFFER_AMD 0x9151 +#define GL_PERFORMANCE_MONITOR_AMD 0x9152 +#define GL_QUERY_OBJECT_AMD 0x9153 +#define GL_VERTEX_ARRAY_OBJECT_AMD 0x9154 +#define GL_SAMPLER_OBJECT_AMD 0x9155 +#endif + +#ifndef GL_AMD_debug_output +#define GL_MAX_DEBUG_MESSAGE_LENGTH_AMD 0x9143 +#define GL_MAX_DEBUG_LOGGED_MESSAGES_AMD 0x9144 +#define GL_DEBUG_LOGGED_MESSAGES_AMD 0x9145 +#define GL_DEBUG_SEVERITY_HIGH_AMD 0x9146 +#define GL_DEBUG_SEVERITY_MEDIUM_AMD 0x9147 +#define GL_DEBUG_SEVERITY_LOW_AMD 0x9148 +#define GL_DEBUG_CATEGORY_API_ERROR_AMD 0x9149 +#define GL_DEBUG_CATEGORY_WINDOW_SYSTEM_AMD 0x914A +#define GL_DEBUG_CATEGORY_DEPRECATION_AMD 0x914B +#define GL_DEBUG_CATEGORY_UNDEFINED_BEHAVIOR_AMD 0x914C +#define GL_DEBUG_CATEGORY_PERFORMANCE_AMD 0x914D +#define GL_DEBUG_CATEGORY_SHADER_COMPILER_AMD 0x914E +#define GL_DEBUG_CATEGORY_APPLICATION_AMD 0x914F +#define GL_DEBUG_CATEGORY_OTHER_AMD 0x9150 +#endif + +#ifndef GL_NV_vdpau_interop +#define GL_SURFACE_STATE_NV 0x86EB +#define GL_SURFACE_REGISTERED_NV 0x86FD +#define GL_SURFACE_MAPPED_NV 0x8700 +#define GL_WRITE_DISCARD_NV 0x88BE +#endif + +#ifndef GL_AMD_transform_feedback3_lines_triangles +#endif + +#ifndef GL_AMD_depth_clamp_separate +#define GL_DEPTH_CLAMP_NEAR_AMD 0x901E +#define GL_DEPTH_CLAMP_FAR_AMD 0x901F +#endif + +#ifndef GL_EXT_texture_sRGB_decode +#define GL_TEXTURE_SRGB_DECODE_EXT 0x8A48 +#define GL_DECODE_EXT 0x8A49 +#define GL_SKIP_DECODE_EXT 0x8A4A +#endif + +#ifndef GL_NV_texture_multisample +#define GL_TEXTURE_COVERAGE_SAMPLES_NV 0x9045 +#define GL_TEXTURE_COLOR_SAMPLES_NV 0x9046 +#endif + +#ifndef GL_AMD_blend_minmax_factor +#define GL_FACTOR_MIN_AMD 0x901C +#define GL_FACTOR_MAX_AMD 0x901D +#endif + +#ifndef GL_AMD_sample_positions +#define GL_SUBSAMPLE_DISTANCE_AMD 0x883F +#endif + +#ifndef GL_EXT_x11_sync_object +#define GL_SYNC_X11_FENCE_EXT 0x90E1 +#endif + +#ifndef GL_AMD_multi_draw_indirect +#endif + +#ifndef GL_EXT_framebuffer_multisample_blit_scaled +#define GL_SCALED_RESOLVE_FASTEST_EXT 0x90BA +#define GL_SCALED_RESOLVE_NICEST_EXT 0x90BB +#endif + +#ifndef GL_NV_path_rendering +#define GL_PATH_FORMAT_SVG_NV 0x9070 +#define GL_PATH_FORMAT_PS_NV 0x9071 +#define GL_STANDARD_FONT_NAME_NV 0x9072 +#define GL_SYSTEM_FONT_NAME_NV 0x9073 +#define GL_FILE_NAME_NV 0x9074 +#define GL_PATH_STROKE_WIDTH_NV 0x9075 +#define GL_PATH_END_CAPS_NV 0x9076 +#define GL_PATH_INITIAL_END_CAP_NV 0x9077 +#define GL_PATH_TERMINAL_END_CAP_NV 0x9078 +#define GL_PATH_JOIN_STYLE_NV 0x9079 +#define GL_PATH_MITER_LIMIT_NV 0x907A +#define GL_PATH_DASH_CAPS_NV 0x907B +#define GL_PATH_INITIAL_DASH_CAP_NV 0x907C +#define GL_PATH_TERMINAL_DASH_CAP_NV 0x907D +#define GL_PATH_DASH_OFFSET_NV 0x907E +#define GL_PATH_CLIENT_LENGTH_NV 0x907F +#define GL_PATH_FILL_MODE_NV 0x9080 +#define GL_PATH_FILL_MASK_NV 0x9081 +#define GL_PATH_FILL_COVER_MODE_NV 0x9082 +#define GL_PATH_STROKE_COVER_MODE_NV 0x9083 +#define GL_PATH_STROKE_MASK_NV 0x9084 +#define GL_PATH_SAMPLE_QUALITY_NV 0x9085 +#define GL_PATH_STROKE_BOUND_NV 0x9086 +#define GL_PATH_STROKE_OVERSAMPLE_COUNT_NV 0x9087 +#define GL_COUNT_UP_NV 0x9088 +#define GL_COUNT_DOWN_NV 0x9089 +#define GL_PATH_OBJECT_BOUNDING_BOX_NV 0x908A +#define GL_CONVEX_HULL_NV 0x908B +#define GL_MULTI_HULLS_NV 0x908C +#define GL_BOUNDING_BOX_NV 0x908D +#define GL_TRANSLATE_X_NV 0x908E +#define GL_TRANSLATE_Y_NV 0x908F +#define GL_TRANSLATE_2D_NV 0x9090 +#define GL_TRANSLATE_3D_NV 0x9091 +#define GL_AFFINE_2D_NV 0x9092 +#define GL_PROJECTIVE_2D_NV 0x9093 +#define GL_AFFINE_3D_NV 0x9094 +#define GL_PROJECTIVE_3D_NV 0x9095 +#define GL_TRANSPOSE_AFFINE_2D_NV 0x9096 +#define GL_TRANSPOSE_PROJECTIVE_2D_NV 0x9097 +#define GL_TRANSPOSE_AFFINE_3D_NV 0x9098 +#define GL_TRANSPOSE_PROJECTIVE_3D_NV 0x9099 +#define GL_UTF8_NV 0x909A +#define GL_UTF16_NV 0x909B +#define GL_BOUNDING_BOX_OF_BOUNDING_BOXES_NV 0x909C +#define GL_PATH_COMMAND_COUNT_NV 0x909D +#define GL_PATH_COORD_COUNT_NV 0x909E +#define GL_PATH_DASH_ARRAY_COUNT_NV 0x909F +#define GL_PATH_COMPUTED_LENGTH_NV 0x90A0 +#define GL_PATH_FILL_BOUNDING_BOX_NV 0x90A1 +#define GL_PATH_STROKE_BOUNDING_BOX_NV 0x90A2 +#define GL_SQUARE_NV 0x90A3 +#define GL_ROUND_NV 0x90A4 +#define GL_TRIANGULAR_NV 0x90A5 +#define GL_BEVEL_NV 0x90A6 +#define GL_MITER_REVERT_NV 0x90A7 +#define GL_MITER_TRUNCATE_NV 0x90A8 +#define GL_SKIP_MISSING_GLYPH_NV 0x90A9 +#define GL_USE_MISSING_GLYPH_NV 0x90AA +#define GL_PATH_ERROR_POSITION_NV 0x90AB +#define GL_PATH_FOG_GEN_MODE_NV 0x90AC +#define GL_ACCUM_ADJACENT_PAIRS_NV 0x90AD +#define GL_ADJACENT_PAIRS_NV 0x90AE +#define GL_FIRST_TO_REST_NV 0x90AF +#define GL_PATH_GEN_MODE_NV 0x90B0 +#define GL_PATH_GEN_COEFF_NV 0x90B1 +#define GL_PATH_GEN_COLOR_FORMAT_NV 0x90B2 +#define GL_PATH_GEN_COMPONENTS_NV 0x90B3 +#define GL_PATH_STENCIL_FUNC_NV 0x90B7 +#define GL_PATH_STENCIL_REF_NV 0x90B8 +#define GL_PATH_STENCIL_VALUE_MASK_NV 0x90B9 +#define GL_PATH_STENCIL_DEPTH_OFFSET_FACTOR_NV 0x90BD +#define GL_PATH_STENCIL_DEPTH_OFFSET_UNITS_NV 0x90BE +#define GL_PATH_COVER_DEPTH_FUNC_NV 0x90BF +#define GL_PATH_DASH_OFFSET_RESET_NV 0x90B4 +#define GL_MOVE_TO_RESETS_NV 0x90B5 +#define GL_MOVE_TO_CONTINUES_NV 0x90B6 +#define GL_CLOSE_PATH_NV 0x00 +#define GL_MOVE_TO_NV 0x02 +#define GL_RELATIVE_MOVE_TO_NV 0x03 +#define GL_LINE_TO_NV 0x04 +#define GL_RELATIVE_LINE_TO_NV 0x05 +#define GL_HORIZONTAL_LINE_TO_NV 0x06 +#define GL_RELATIVE_HORIZONTAL_LINE_TO_NV 0x07 +#define GL_VERTICAL_LINE_TO_NV 0x08 +#define GL_RELATIVE_VERTICAL_LINE_TO_NV 0x09 +#define GL_QUADRATIC_CURVE_TO_NV 0x0A +#define GL_RELATIVE_QUADRATIC_CURVE_TO_NV 0x0B +#define GL_CUBIC_CURVE_TO_NV 0x0C +#define GL_RELATIVE_CUBIC_CURVE_TO_NV 0x0D +#define GL_SMOOTH_QUADRATIC_CURVE_TO_NV 0x0E +#define GL_RELATIVE_SMOOTH_QUADRATIC_CURVE_TO_NV 0x0F +#define GL_SMOOTH_CUBIC_CURVE_TO_NV 0x10 +#define GL_RELATIVE_SMOOTH_CUBIC_CURVE_TO_NV 0x11 +#define GL_SMALL_CCW_ARC_TO_NV 0x12 +#define GL_RELATIVE_SMALL_CCW_ARC_TO_NV 0x13 +#define GL_SMALL_CW_ARC_TO_NV 0x14 +#define GL_RELATIVE_SMALL_CW_ARC_TO_NV 0x15 +#define GL_LARGE_CCW_ARC_TO_NV 0x16 +#define GL_RELATIVE_LARGE_CCW_ARC_TO_NV 0x17 +#define GL_LARGE_CW_ARC_TO_NV 0x18 +#define GL_RELATIVE_LARGE_CW_ARC_TO_NV 0x19 +#define GL_RESTART_PATH_NV 0xF0 +#define GL_DUP_FIRST_CUBIC_CURVE_TO_NV 0xF2 +#define GL_DUP_LAST_CUBIC_CURVE_TO_NV 0xF4 +#define GL_RECT_NV 0xF6 +#define GL_CIRCULAR_CCW_ARC_TO_NV 0xF8 +#define GL_CIRCULAR_CW_ARC_TO_NV 0xFA +#define GL_CIRCULAR_TANGENT_ARC_TO_NV 0xFC +#define GL_ARC_TO_NV 0xFE +#define GL_RELATIVE_ARC_TO_NV 0xFF +#define GL_BOLD_BIT_NV 0x01 +#define GL_ITALIC_BIT_NV 0x02 +#define GL_GLYPH_WIDTH_BIT_NV 0x01 +#define GL_GLYPH_HEIGHT_BIT_NV 0x02 +#define GL_GLYPH_HORIZONTAL_BEARING_X_BIT_NV 0x04 +#define GL_GLYPH_HORIZONTAL_BEARING_Y_BIT_NV 0x08 +#define GL_GLYPH_HORIZONTAL_BEARING_ADVANCE_BIT_NV 0x10 +#define GL_GLYPH_VERTICAL_BEARING_X_BIT_NV 0x20 +#define GL_GLYPH_VERTICAL_BEARING_Y_BIT_NV 0x40 +#define GL_GLYPH_VERTICAL_BEARING_ADVANCE_BIT_NV 0x80 +#define GL_GLYPH_HAS_KERNING_NV 0x100 +#define GL_FONT_X_MIN_BOUNDS_NV 0x00010000 +#define GL_FONT_Y_MIN_BOUNDS_NV 0x00020000 +#define GL_FONT_X_MAX_BOUNDS_NV 0x00040000 +#define GL_FONT_Y_MAX_BOUNDS_NV 0x00080000 +#define GL_FONT_UNITS_PER_EM_NV 0x00100000 +#define GL_FONT_ASCENDER_NV 0x00200000 +#define GL_FONT_DESCENDER_NV 0x00400000 +#define GL_FONT_HEIGHT_NV 0x00800000 +#define GL_FONT_MAX_ADVANCE_WIDTH_NV 0x01000000 +#define GL_FONT_MAX_ADVANCE_HEIGHT_NV 0x02000000 +#define GL_FONT_UNDERLINE_POSITION_NV 0x04000000 +#define GL_FONT_UNDERLINE_THICKNESS_NV 0x08000000 +#define GL_FONT_HAS_KERNING_NV 0x10000000 +#endif + +#ifndef GL_AMD_pinned_memory +#define GL_EXTERNAL_VIRTUAL_MEMORY_BUFFER_AMD 0x9160 +#endif + +#ifndef GL_AMD_stencil_operation_extended +#define GL_SET_AMD 0x874A +#define GL_REPLACE_VALUE_AMD 0x874B +#define GL_STENCIL_OP_VALUE_AMD 0x874C +#define GL_STENCIL_BACK_OP_VALUE_AMD 0x874D +#endif + +#ifndef GL_AMD_vertex_shader_viewport_index +#endif + +#ifndef GL_AMD_vertex_shader_layer +#endif + +#ifndef GL_NV_bindless_texture +#endif + +#ifndef GL_NV_shader_atomic_float +#endif + +#ifndef GL_AMD_query_buffer_object +#define GL_QUERY_BUFFER_AMD 0x9192 +#define GL_QUERY_BUFFER_BINDING_AMD 0x9193 +#define GL_QUERY_RESULT_NO_WAIT_AMD 0x9194 +#endif + +#ifndef GL_AMD_sparse_texture +#define GL_VIRTUAL_PAGE_SIZE_X_AMD 0x9195 +#define GL_VIRTUAL_PAGE_SIZE_Y_AMD 0x9196 +#define GL_VIRTUAL_PAGE_SIZE_Z_AMD 0x9197 +#define GL_MAX_SPARSE_TEXTURE_SIZE_AMD 0x9198 +#define GL_MAX_SPARSE_3D_TEXTURE_SIZE_AMD 0x9199 +#define GL_MAX_SPARSE_ARRAY_TEXTURE_LAYERS 0x919A +#define GL_MIN_SPARSE_LEVEL_AMD 0x919B +#define GL_MIN_LOD_WARNING_AMD 0x919C +#define GL_TEXTURE_STORAGE_SPARSE_BIT_AMD 0x00000001 +#endif + + +/*************************************************************/ + +#include <stddef.h> +#ifndef GL_VERSION_2_0 +/* GL type for program/shader text */ +typedef char GLchar; +#endif + +#ifndef GL_VERSION_1_5 +/* GL types for handling large vertex buffer objects */ +#ifdef _WIN64 +typedef signed long long int GLintptr; +typedef signed long long int GLsizeiptr; +#else +typedef signed long int GLintptr; +typedef signed long int GLsizeiptr; +#endif +#endif + +#ifndef GL_ARB_vertex_buffer_object +/* GL types for handling large vertex buffer objects */ +#ifdef _WIN64 +typedef signed long long int GLintptrARB; +typedef signed long long int GLsizeiptrARB; +#else +typedef signed long int GLintptrARB; +typedef signed long int GLsizeiptrARB; +#endif +#endif + +#ifndef GL_ARB_shader_objects +/* GL types for program/shader text and shader object handles */ +typedef char GLcharARB; +typedef unsigned int GLhandleARB; +#endif + +/* GL type for "half" precision (s10e5) float data in host memory */ +#ifndef GL_ARB_half_float_pixel +typedef unsigned short GLhalfARB; +#endif + +#ifndef GL_NV_half_float +typedef unsigned short GLhalfNV; +#endif + +#ifndef GLEXT_64_TYPES_DEFINED +/* This code block is duplicated in glxext.h, so must be protected */ +#define GLEXT_64_TYPES_DEFINED +/* Define int32_t, int64_t, and uint64_t types for UST/MSC */ +/* (as used in the GL_EXT_timer_query extension). */ +#if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L +#include <inttypes.h> +#elif defined(__sun__) || defined(__digital__) +#include <inttypes.h> +#if defined(__STDC__) +#if defined(__arch64__) || defined(_LP64) +typedef long int int64_t; +typedef unsigned long int uint64_t; +#else +typedef long long int int64_t; +typedef unsigned long long int uint64_t; +#endif /* __arch64__ */ +#endif /* __STDC__ */ +#elif defined( __VMS ) || defined(__sgi) +#include <inttypes.h> +#elif defined(__SCO__) || defined(__USLC__) +#include <stdint.h> +#elif defined(__UNIXOS2__) || defined(__SOL64__) +typedef long int int32_t; +typedef long long int int64_t; +typedef unsigned long long int uint64_t; +#elif defined(_WIN32) && defined(__GNUC__) +#include <stdint.h> +#elif defined(_WIN32) +typedef __int32 int32_t; +typedef __int64 int64_t; +typedef unsigned __int64 uint64_t; +#else +/* Fallback if nothing above works */ +#include <inttypes.h> +#endif +#endif + +#ifndef GL_EXT_timer_query +typedef int64_t GLint64EXT; +typedef uint64_t GLuint64EXT; +#endif + +#ifndef GL_ARB_sync +typedef int64_t GLint64; +typedef uint64_t GLuint64; +typedef struct __GLsync *GLsync; +#endif + +#ifndef GL_ARB_cl_event +/* These incomplete types let us declare types compatible with OpenCL's cl_context and cl_event */ +struct _cl_context; +struct _cl_event; +#endif + +#ifndef GL_ARB_debug_output +typedef void (APIENTRY *GLDEBUGPROCARB)(GLenum source,GLenum type,GLuint id,GLenum severity,GLsizei length,const GLchar *message,const GLvoid *userParam); +#endif + +#ifndef GL_AMD_debug_output +typedef void (APIENTRY *GLDEBUGPROCAMD)(GLuint id,GLenum category,GLenum severity,GLsizei length,const GLchar *message,GLvoid *userParam); +#endif + +#ifndef GL_KHR_debug +typedef void (APIENTRY *GLDEBUGPROC)(GLenum source,GLenum type,GLuint id,GLenum severity,GLsizei length,const GLchar *message,const GLvoid *userParam); +#endif + +#ifndef GL_NV_vdpau_interop +typedef GLintptr GLvdpauSurfaceNV; +#endif + +#ifndef GL_VERSION_1_2 +#define GL_VERSION_1_2 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glBlendColor (GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha); +GLAPI void APIENTRY glBlendEquation (GLenum mode); +GLAPI void APIENTRY glDrawRangeElements (GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const GLvoid *indices); +GLAPI void APIENTRY glTexImage3D (GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const GLvoid *pixels); +GLAPI void APIENTRY glTexSubImage3D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const GLvoid *pixels); +GLAPI void APIENTRY glCopyTexSubImage3D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height); +GLAPI void APIENTRY glColorTable (GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const GLvoid *table); +GLAPI void APIENTRY glColorTableParameterfv (GLenum target, GLenum pname, const GLfloat *params); +GLAPI void APIENTRY glColorTableParameteriv (GLenum target, GLenum pname, const GLint *params); +GLAPI void APIENTRY glCopyColorTable (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width); +GLAPI void APIENTRY glGetColorTable (GLenum target, GLenum format, GLenum type, GLvoid *table); +GLAPI void APIENTRY glGetColorTableParameterfv (GLenum target, GLenum pname, GLfloat *params); +GLAPI void APIENTRY glGetColorTableParameteriv (GLenum target, GLenum pname, GLint *params); +GLAPI void APIENTRY glColorSubTable (GLenum target, GLsizei start, GLsizei count, GLenum format, GLenum type, const GLvoid *data); +GLAPI void APIENTRY glCopyColorSubTable (GLenum target, GLsizei start, GLint x, GLint y, GLsizei width); +GLAPI void APIENTRY glConvolutionFilter1D (GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const GLvoid *image); +GLAPI void APIENTRY glConvolutionFilter2D (GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *image); +GLAPI void APIENTRY glConvolutionParameterf (GLenum target, GLenum pname, GLfloat params); +GLAPI void APIENTRY glConvolutionParameterfv (GLenum target, GLenum pname, const GLfloat *params); +GLAPI void APIENTRY glConvolutionParameteri (GLenum target, GLenum pname, GLint params); +GLAPI void APIENTRY glConvolutionParameteriv (GLenum target, GLenum pname, const GLint *params); +GLAPI void APIENTRY glCopyConvolutionFilter1D (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width); +GLAPI void APIENTRY glCopyConvolutionFilter2D (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height); +GLAPI void APIENTRY glGetConvolutionFilter (GLenum target, GLenum format, GLenum type, GLvoid *image); +GLAPI void APIENTRY glGetConvolutionParameterfv (GLenum target, GLenum pname, GLfloat *params); +GLAPI void APIENTRY glGetConvolutionParameteriv (GLenum target, GLenum pname, GLint *params); +GLAPI void APIENTRY glGetSeparableFilter (GLenum target, GLenum format, GLenum type, GLvoid *row, GLvoid *column, GLvoid *span); +GLAPI void APIENTRY glSeparableFilter2D (GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *row, const GLvoid *column); +GLAPI void APIENTRY glGetHistogram (GLenum target, GLboolean reset, GLenum format, GLenum type, GLvoid *values); +GLAPI void APIENTRY glGetHistogramParameterfv (GLenum target, GLenum pname, GLfloat *params); +GLAPI void APIENTRY glGetHistogramParameteriv (GLenum target, GLenum pname, GLint *params); +GLAPI void APIENTRY glGetMinmax (GLenum target, GLboolean reset, GLenum format, GLenum type, GLvoid *values); +GLAPI void APIENTRY glGetMinmaxParameterfv (GLenum target, GLenum pname, GLfloat *params); +GLAPI void APIENTRY glGetMinmaxParameteriv (GLenum target, GLenum pname, GLint *params); +GLAPI void APIENTRY glHistogram (GLenum target, GLsizei width, GLenum internalformat, GLboolean sink); +GLAPI void APIENTRY glMinmax (GLenum target, GLenum internalformat, GLboolean sink); +GLAPI void APIENTRY glResetHistogram (GLenum target); +GLAPI void APIENTRY glResetMinmax (GLenum target); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLBLENDCOLORPROC) (GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha); +typedef void (APIENTRYP PFNGLBLENDEQUATIONPROC) (GLenum mode); +typedef void (APIENTRYP PFNGLDRAWRANGEELEMENTSPROC) (GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const GLvoid *indices); +typedef void (APIENTRYP PFNGLTEXIMAGE3DPROC) (GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const GLvoid *pixels); +typedef void (APIENTRYP PFNGLTEXSUBIMAGE3DPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const GLvoid *pixels); +typedef void (APIENTRYP PFNGLCOPYTEXSUBIMAGE3DPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height); +typedef void (APIENTRYP PFNGLCOLORTABLEPROC) (GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const GLvoid *table); +typedef void (APIENTRYP PFNGLCOLORTABLEPARAMETERFVPROC) (GLenum target, GLenum pname, const GLfloat *params); +typedef void (APIENTRYP PFNGLCOLORTABLEPARAMETERIVPROC) (GLenum target, GLenum pname, const GLint *params); +typedef void (APIENTRYP PFNGLCOPYCOLORTABLEPROC) (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width); +typedef void (APIENTRYP PFNGLGETCOLORTABLEPROC) (GLenum target, GLenum format, GLenum type, GLvoid *table); +typedef void (APIENTRYP PFNGLGETCOLORTABLEPARAMETERFVPROC) (GLenum target, GLenum pname, GLfloat *params); +typedef void (APIENTRYP PFNGLGETCOLORTABLEPARAMETERIVPROC) (GLenum target, GLenum pname, GLint *params); +typedef void (APIENTRYP PFNGLCOLORSUBTABLEPROC) (GLenum target, GLsizei start, GLsizei count, GLenum format, GLenum type, const GLvoid *data); +typedef void (APIENTRYP PFNGLCOPYCOLORSUBTABLEPROC) (GLenum target, GLsizei start, GLint x, GLint y, GLsizei width); +typedef void (APIENTRYP PFNGLCONVOLUTIONFILTER1DPROC) (GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const GLvoid *image); +typedef void (APIENTRYP PFNGLCONVOLUTIONFILTER2DPROC) (GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *image); +typedef void (APIENTRYP PFNGLCONVOLUTIONPARAMETERFPROC) (GLenum target, GLenum pname, GLfloat params); +typedef void (APIENTRYP PFNGLCONVOLUTIONPARAMETERFVPROC) (GLenum target, GLenum pname, const GLfloat *params); +typedef void (APIENTRYP PFNGLCONVOLUTIONPARAMETERIPROC) (GLenum target, GLenum pname, GLint params); +typedef void (APIENTRYP PFNGLCONVOLUTIONPARAMETERIVPROC) (GLenum target, GLenum pname, const GLint *params); +typedef void (APIENTRYP PFNGLCOPYCONVOLUTIONFILTER1DPROC) (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width); +typedef void (APIENTRYP PFNGLCOPYCONVOLUTIONFILTER2DPROC) (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height); +typedef void (APIENTRYP PFNGLGETCONVOLUTIONFILTERPROC) (GLenum target, GLenum format, GLenum type, GLvoid *image); +typedef void (APIENTRYP PFNGLGETCONVOLUTIONPARAMETERFVPROC) (GLenum target, GLenum pname, GLfloat *params); +typedef void (APIENTRYP PFNGLGETCONVOLUTIONPARAMETERIVPROC) (GLenum target, GLenum pname, GLint *params); +typedef void (APIENTRYP PFNGLGETSEPARABLEFILTERPROC) (GLenum target, GLenum format, GLenum type, GLvoid *row, GLvoid *column, GLvoid *span); +typedef void (APIENTRYP PFNGLSEPARABLEFILTER2DPROC) (GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *row, const GLvoid *column); +typedef void (APIENTRYP PFNGLGETHISTOGRAMPROC) (GLenum target, GLboolean reset, GLenum format, GLenum type, GLvoid *values); +typedef void (APIENTRYP PFNGLGETHISTOGRAMPARAMETERFVPROC) (GLenum target, GLenum pname, GLfloat *params); +typedef void (APIENTRYP PFNGLGETHISTOGRAMPARAMETERIVPROC) (GLenum target, GLenum pname, GLint *params); +typedef void (APIENTRYP PFNGLGETMINMAXPROC) (GLenum target, GLboolean reset, GLenum format, GLenum type, GLvoid *values); +typedef void (APIENTRYP PFNGLGETMINMAXPARAMETERFVPROC) (GLenum target, GLenum pname, GLfloat *params); +typedef void (APIENTRYP PFNGLGETMINMAXPARAMETERIVPROC) (GLenum target, GLenum pname, GLint *params); +typedef void (APIENTRYP PFNGLHISTOGRAMPROC) (GLenum target, GLsizei width, GLenum internalformat, GLboolean sink); +typedef void (APIENTRYP PFNGLMINMAXPROC) (GLenum target, GLenum internalformat, GLboolean sink); +typedef void (APIENTRYP PFNGLRESETHISTOGRAMPROC) (GLenum target); +typedef void (APIENTRYP PFNGLRESETMINMAXPROC) (GLenum target); +#endif + +#ifndef GL_VERSION_1_3 +#define GL_VERSION_1_3 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glActiveTexture (GLenum texture); +GLAPI void APIENTRY glSampleCoverage (GLfloat value, GLboolean invert); +GLAPI void APIENTRY glCompressedTexImage3D (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const GLvoid *data); +GLAPI void APIENTRY glCompressedTexImage2D (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const GLvoid *data); +GLAPI void APIENTRY glCompressedTexImage1D (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLsizei imageSize, const GLvoid *data); +GLAPI void APIENTRY glCompressedTexSubImage3D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const GLvoid *data); +GLAPI void APIENTRY glCompressedTexSubImage2D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const GLvoid *data); +GLAPI void APIENTRY glCompressedTexSubImage1D (GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLsizei imageSize, const GLvoid *data); +GLAPI void APIENTRY glGetCompressedTexImage (GLenum target, GLint level, GLvoid *img); +GLAPI void APIENTRY glClientActiveTexture (GLenum texture); +GLAPI void APIENTRY glMultiTexCoord1d (GLenum target, GLdouble s); +GLAPI void APIENTRY glMultiTexCoord1dv (GLenum target, const GLdouble *v); +GLAPI void APIENTRY glMultiTexCoord1f (GLenum target, GLfloat s); +GLAPI void APIENTRY glMultiTexCoord1fv (GLenum target, const GLfloat *v); +GLAPI void APIENTRY glMultiTexCoord1i (GLenum target, GLint s); +GLAPI void APIENTRY glMultiTexCoord1iv (GLenum target, const GLint *v); +GLAPI void APIENTRY glMultiTexCoord1s (GLenum target, GLshort s); +GLAPI void APIENTRY glMultiTexCoord1sv (GLenum target, const GLshort *v); +GLAPI void APIENTRY glMultiTexCoord2d (GLenum target, GLdouble s, GLdouble t); +GLAPI void APIENTRY glMultiTexCoord2dv (GLenum target, const GLdouble *v); +GLAPI void APIENTRY glMultiTexCoord2f (GLenum target, GLfloat s, GLfloat t); +GLAPI void APIENTRY glMultiTexCoord2fv (GLenum target, const GLfloat *v); +GLAPI void APIENTRY glMultiTexCoord2i (GLenum target, GLint s, GLint t); +GLAPI void APIENTRY glMultiTexCoord2iv (GLenum target, const GLint *v); +GLAPI void APIENTRY glMultiTexCoord2s (GLenum target, GLshort s, GLshort t); +GLAPI void APIENTRY glMultiTexCoord2sv (GLenum target, const GLshort *v); +GLAPI void APIENTRY glMultiTexCoord3d (GLenum target, GLdouble s, GLdouble t, GLdouble r); +GLAPI void APIENTRY glMultiTexCoord3dv (GLenum target, const GLdouble *v); +GLAPI void APIENTRY glMultiTexCoord3f (GLenum target, GLfloat s, GLfloat t, GLfloat r); +GLAPI void APIENTRY glMultiTexCoord3fv (GLenum target, const GLfloat *v); +GLAPI void APIENTRY glMultiTexCoord3i (GLenum target, GLint s, GLint t, GLint r); +GLAPI void APIENTRY glMultiTexCoord3iv (GLenum target, const GLint *v); +GLAPI void APIENTRY glMultiTexCoord3s (GLenum target, GLshort s, GLshort t, GLshort r); +GLAPI void APIENTRY glMultiTexCoord3sv (GLenum target, const GLshort *v); +GLAPI void APIENTRY glMultiTexCoord4d (GLenum target, GLdouble s, GLdouble t, GLdouble r, GLdouble q); +GLAPI void APIENTRY glMultiTexCoord4dv (GLenum target, const GLdouble *v); +GLAPI void APIENTRY glMultiTexCoord4f (GLenum target, GLfloat s, GLfloat t, GLfloat r, GLfloat q); +GLAPI void APIENTRY glMultiTexCoord4fv (GLenum target, const GLfloat *v); +GLAPI void APIENTRY glMultiTexCoord4i (GLenum target, GLint s, GLint t, GLint r, GLint q); +GLAPI void APIENTRY glMultiTexCoord4iv (GLenum target, const GLint *v); +GLAPI void APIENTRY glMultiTexCoord4s (GLenum target, GLshort s, GLshort t, GLshort r, GLshort q); +GLAPI void APIENTRY glMultiTexCoord4sv (GLenum target, const GLshort *v); +GLAPI void APIENTRY glLoadTransposeMatrixf (const GLfloat *m); +GLAPI void APIENTRY glLoadTransposeMatrixd (const GLdouble *m); +GLAPI void APIENTRY glMultTransposeMatrixf (const GLfloat *m); +GLAPI void APIENTRY glMultTransposeMatrixd (const GLdouble *m); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLACTIVETEXTUREPROC) (GLenum texture); +typedef void (APIENTRYP PFNGLSAMPLECOVERAGEPROC) (GLfloat value, GLboolean invert); +typedef void (APIENTRYP PFNGLCOMPRESSEDTEXIMAGE3DPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const GLvoid *data); +typedef void (APIENTRYP PFNGLCOMPRESSEDTEXIMAGE2DPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const GLvoid *data); +typedef void (APIENTRYP PFNGLCOMPRESSEDTEXIMAGE1DPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLsizei imageSize, const GLvoid *data); +typedef void (APIENTRYP PFNGLCOMPRESSEDTEXSUBIMAGE3DPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const GLvoid *data); +typedef void (APIENTRYP PFNGLCOMPRESSEDTEXSUBIMAGE2DPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const GLvoid *data); +typedef void (APIENTRYP PFNGLCOMPRESSEDTEXSUBIMAGE1DPROC) (GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLsizei imageSize, const GLvoid *data); +typedef void (APIENTRYP PFNGLGETCOMPRESSEDTEXIMAGEPROC) (GLenum target, GLint level, GLvoid *img); +typedef void (APIENTRYP PFNGLCLIENTACTIVETEXTUREPROC) (GLenum texture); +typedef void (APIENTRYP PFNGLMULTITEXCOORD1DPROC) (GLenum target, GLdouble s); +typedef void (APIENTRYP PFNGLMULTITEXCOORD1DVPROC) (GLenum target, const GLdouble *v); +typedef void (APIENTRYP PFNGLMULTITEXCOORD1FPROC) (GLenum target, GLfloat s); +typedef void (APIENTRYP PFNGLMULTITEXCOORD1FVPROC) (GLenum target, const GLfloat *v); +typedef void (APIENTRYP PFNGLMULTITEXCOORD1IPROC) (GLenum target, GLint s); +typedef void (APIENTRYP PFNGLMULTITEXCOORD1IVPROC) (GLenum target, const GLint *v); +typedef void (APIENTRYP PFNGLMULTITEXCOORD1SPROC) (GLenum target, GLshort s); +typedef void (APIENTRYP PFNGLMULTITEXCOORD1SVPROC) (GLenum target, const GLshort *v); +typedef void (APIENTRYP PFNGLMULTITEXCOORD2DPROC) (GLenum target, GLdouble s, GLdouble t); +typedef void (APIENTRYP PFNGLMULTITEXCOORD2DVPROC) (GLenum target, const GLdouble *v); +typedef void (APIENTRYP PFNGLMULTITEXCOORD2FPROC) (GLenum target, GLfloat s, GLfloat t); +typedef void (APIENTRYP PFNGLMULTITEXCOORD2FVPROC) (GLenum target, const GLfloat *v); +typedef void (APIENTRYP PFNGLMULTITEXCOORD2IPROC) (GLenum target, GLint s, GLint t); +typedef void (APIENTRYP PFNGLMULTITEXCOORD2IVPROC) (GLenum target, const GLint *v); +typedef void (APIENTRYP PFNGLMULTITEXCOORD2SPROC) (GLenum target, GLshort s, GLshort t); +typedef void (APIENTRYP PFNGLMULTITEXCOORD2SVPROC) (GLenum target, const GLshort *v); +typedef void (APIENTRYP PFNGLMULTITEXCOORD3DPROC) (GLenum target, GLdouble s, GLdouble t, GLdouble r); +typedef void (APIENTRYP PFNGLMULTITEXCOORD3DVPROC) (GLenum target, const GLdouble *v); +typedef void (APIENTRYP PFNGLMULTITEXCOORD3FPROC) (GLenum target, GLfloat s, GLfloat t, GLfloat r); +typedef void (APIENTRYP PFNGLMULTITEXCOORD3FVPROC) (GLenum target, const GLfloat *v); +typedef void (APIENTRYP PFNGLMULTITEXCOORD3IPROC) (GLenum target, GLint s, GLint t, GLint r); +typedef void (APIENTRYP PFNGLMULTITEXCOORD3IVPROC) (GLenum target, const GLint *v); +typedef void (APIENTRYP PFNGLMULTITEXCOORD3SPROC) (GLenum target, GLshort s, GLshort t, GLshort r); +typedef void (APIENTRYP PFNGLMULTITEXCOORD3SVPROC) (GLenum target, const GLshort *v); +typedef void (APIENTRYP PFNGLMULTITEXCOORD4DPROC) (GLenum target, GLdouble s, GLdouble t, GLdouble r, GLdouble q); +typedef void (APIENTRYP PFNGLMULTITEXCOORD4DVPROC) (GLenum target, const GLdouble *v); +typedef void (APIENTRYP PFNGLMULTITEXCOORD4FPROC) (GLenum target, GLfloat s, GLfloat t, GLfloat r, GLfloat q); +typedef void (APIENTRYP PFNGLMULTITEXCOORD4FVPROC) (GLenum target, const GLfloat *v); +typedef void (APIENTRYP PFNGLMULTITEXCOORD4IPROC) (GLenum target, GLint s, GLint t, GLint r, GLint q); +typedef void (APIENTRYP PFNGLMULTITEXCOORD4IVPROC) (GLenum target, const GLint *v); +typedef void (APIENTRYP PFNGLMULTITEXCOORD4SPROC) (GLenum target, GLshort s, GLshort t, GLshort r, GLshort q); +typedef void (APIENTRYP PFNGLMULTITEXCOORD4SVPROC) (GLenum target, const GLshort *v); +typedef void (APIENTRYP PFNGLLOADTRANSPOSEMATRIXFPROC) (const GLfloat *m); +typedef void (APIENTRYP PFNGLLOADTRANSPOSEMATRIXDPROC) (const GLdouble *m); +typedef void (APIENTRYP PFNGLMULTTRANSPOSEMATRIXFPROC) (const GLfloat *m); +typedef void (APIENTRYP PFNGLMULTTRANSPOSEMATRIXDPROC) (const GLdouble *m); +#endif + +#ifndef GL_VERSION_1_4 +#define GL_VERSION_1_4 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glBlendFuncSeparate (GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorAlpha, GLenum dfactorAlpha); +GLAPI void APIENTRY glMultiDrawArrays (GLenum mode, const GLint *first, const GLsizei *count, GLsizei drawcount); +GLAPI void APIENTRY glMultiDrawElements (GLenum mode, const GLsizei *count, GLenum type, const GLvoid* const *indices, GLsizei drawcount); +GLAPI void APIENTRY glPointParameterf (GLenum pname, GLfloat param); +GLAPI void APIENTRY glPointParameterfv (GLenum pname, const GLfloat *params); +GLAPI void APIENTRY glPointParameteri (GLenum pname, GLint param); +GLAPI void APIENTRY glPointParameteriv (GLenum pname, const GLint *params); +GLAPI void APIENTRY glFogCoordf (GLfloat coord); +GLAPI void APIENTRY glFogCoordfv (const GLfloat *coord); +GLAPI void APIENTRY glFogCoordd (GLdouble coord); +GLAPI void APIENTRY glFogCoorddv (const GLdouble *coord); +GLAPI void APIENTRY glFogCoordPointer (GLenum type, GLsizei stride, const GLvoid *pointer); +GLAPI void APIENTRY glSecondaryColor3b (GLbyte red, GLbyte green, GLbyte blue); +GLAPI void APIENTRY glSecondaryColor3bv (const GLbyte *v); +GLAPI void APIENTRY glSecondaryColor3d (GLdouble red, GLdouble green, GLdouble blue); +GLAPI void APIENTRY glSecondaryColor3dv (const GLdouble *v); +GLAPI void APIENTRY glSecondaryColor3f (GLfloat red, GLfloat green, GLfloat blue); +GLAPI void APIENTRY glSecondaryColor3fv (const GLfloat *v); +GLAPI void APIENTRY glSecondaryColor3i (GLint red, GLint green, GLint blue); +GLAPI void APIENTRY glSecondaryColor3iv (const GLint *v); +GLAPI void APIENTRY glSecondaryColor3s (GLshort red, GLshort green, GLshort blue); +GLAPI void APIENTRY glSecondaryColor3sv (const GLshort *v); +GLAPI void APIENTRY glSecondaryColor3ub (GLubyte red, GLubyte green, GLubyte blue); +GLAPI void APIENTRY glSecondaryColor3ubv (const GLubyte *v); +GLAPI void APIENTRY glSecondaryColor3ui (GLuint red, GLuint green, GLuint blue); +GLAPI void APIENTRY glSecondaryColor3uiv (const GLuint *v); +GLAPI void APIENTRY glSecondaryColor3us (GLushort red, GLushort green, GLushort blue); +GLAPI void APIENTRY glSecondaryColor3usv (const GLushort *v); +GLAPI void APIENTRY glSecondaryColorPointer (GLint size, GLenum type, GLsizei stride, const GLvoid *pointer); +GLAPI void APIENTRY glWindowPos2d (GLdouble x, GLdouble y); +GLAPI void APIENTRY glWindowPos2dv (const GLdouble *v); +GLAPI void APIENTRY glWindowPos2f (GLfloat x, GLfloat y); +GLAPI void APIENTRY glWindowPos2fv (const GLfloat *v); +GLAPI void APIENTRY glWindowPos2i (GLint x, GLint y); +GLAPI void APIENTRY glWindowPos2iv (const GLint *v); +GLAPI void APIENTRY glWindowPos2s (GLshort x, GLshort y); +GLAPI void APIENTRY glWindowPos2sv (const GLshort *v); +GLAPI void APIENTRY glWindowPos3d (GLdouble x, GLdouble y, GLdouble z); +GLAPI void APIENTRY glWindowPos3dv (const GLdouble *v); +GLAPI void APIENTRY glWindowPos3f (GLfloat x, GLfloat y, GLfloat z); +GLAPI void APIENTRY glWindowPos3fv (const GLfloat *v); +GLAPI void APIENTRY glWindowPos3i (GLint x, GLint y, GLint z); +GLAPI void APIENTRY glWindowPos3iv (const GLint *v); +GLAPI void APIENTRY glWindowPos3s (GLshort x, GLshort y, GLshort z); +GLAPI void APIENTRY glWindowPos3sv (const GLshort *v); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLBLENDFUNCSEPARATEPROC) (GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorAlpha, GLenum dfactorAlpha); +typedef void (APIENTRYP PFNGLMULTIDRAWARRAYSPROC) (GLenum mode, const GLint *first, const GLsizei *count, GLsizei drawcount); +typedef void (APIENTRYP PFNGLMULTIDRAWELEMENTSPROC) (GLenum mode, const GLsizei *count, GLenum type, const GLvoid* const *indices, GLsizei drawcount); +typedef void (APIENTRYP PFNGLPOINTPARAMETERFPROC) (GLenum pname, GLfloat param); +typedef void (APIENTRYP PFNGLPOINTPARAMETERFVPROC) (GLenum pname, const GLfloat *params); +typedef void (APIENTRYP PFNGLPOINTPARAMETERIPROC) (GLenum pname, GLint param); +typedef void (APIENTRYP PFNGLPOINTPARAMETERIVPROC) (GLenum pname, const GLint *params); +typedef void (APIENTRYP PFNGLFOGCOORDFPROC) (GLfloat coord); +typedef void (APIENTRYP PFNGLFOGCOORDFVPROC) (const GLfloat *coord); +typedef void (APIENTRYP PFNGLFOGCOORDDPROC) (GLdouble coord); +typedef void (APIENTRYP PFNGLFOGCOORDDVPROC) (const GLdouble *coord); +typedef void (APIENTRYP PFNGLFOGCOORDPOINTERPROC) (GLenum type, GLsizei stride, const GLvoid *pointer); +typedef void (APIENTRYP PFNGLSECONDARYCOLOR3BPROC) (GLbyte red, GLbyte green, GLbyte blue); +typedef void (APIENTRYP PFNGLSECONDARYCOLOR3BVPROC) (const GLbyte *v); +typedef void (APIENTRYP PFNGLSECONDARYCOLOR3DPROC) (GLdouble red, GLdouble green, GLdouble blue); +typedef void (APIENTRYP PFNGLSECONDARYCOLOR3DVPROC) (const GLdouble *v); +typedef void (APIENTRYP PFNGLSECONDARYCOLOR3FPROC) (GLfloat red, GLfloat green, GLfloat blue); +typedef void (APIENTRYP PFNGLSECONDARYCOLOR3FVPROC) (const GLfloat *v); +typedef void (APIENTRYP PFNGLSECONDARYCOLOR3IPROC) (GLint red, GLint green, GLint blue); +typedef void (APIENTRYP PFNGLSECONDARYCOLOR3IVPROC) (const GLint *v); +typedef void (APIENTRYP PFNGLSECONDARYCOLOR3SPROC) (GLshort red, GLshort green, GLshort blue); +typedef void (APIENTRYP PFNGLSECONDARYCOLOR3SVPROC) (const GLshort *v); +typedef void (APIENTRYP PFNGLSECONDARYCOLOR3UBPROC) (GLubyte red, GLubyte green, GLubyte blue); +typedef void (APIENTRYP PFNGLSECONDARYCOLOR3UBVPROC) (const GLubyte *v); +typedef void (APIENTRYP PFNGLSECONDARYCOLOR3UIPROC) (GLuint red, GLuint green, GLuint blue); +typedef void (APIENTRYP PFNGLSECONDARYCOLOR3UIVPROC) (const GLuint *v); +typedef void (APIENTRYP PFNGLSECONDARYCOLOR3USPROC) (GLushort red, GLushort green, GLushort blue); +typedef void (APIENTRYP PFNGLSECONDARYCOLOR3USVPROC) (const GLushort *v); +typedef void (APIENTRYP PFNGLSECONDARYCOLORPOINTERPROC) (GLint size, GLenum type, GLsizei stride, const GLvoid *pointer); +typedef void (APIENTRYP PFNGLWINDOWPOS2DPROC) (GLdouble x, GLdouble y); +typedef void (APIENTRYP PFNGLWINDOWPOS2DVPROC) (const GLdouble *v); +typedef void (APIENTRYP PFNGLWINDOWPOS2FPROC) (GLfloat x, GLfloat y); +typedef void (APIENTRYP PFNGLWINDOWPOS2FVPROC) (const GLfloat *v); +typedef void (APIENTRYP PFNGLWINDOWPOS2IPROC) (GLint x, GLint y); +typedef void (APIENTRYP PFNGLWINDOWPOS2IVPROC) (const GLint *v); +typedef void (APIENTRYP PFNGLWINDOWPOS2SPROC) (GLshort x, GLshort y); +typedef void (APIENTRYP PFNGLWINDOWPOS2SVPROC) (const GLshort *v); +typedef void (APIENTRYP PFNGLWINDOWPOS3DPROC) (GLdouble x, GLdouble y, GLdouble z); +typedef void (APIENTRYP PFNGLWINDOWPOS3DVPROC) (const GLdouble *v); +typedef void (APIENTRYP PFNGLWINDOWPOS3FPROC) (GLfloat x, GLfloat y, GLfloat z); +typedef void (APIENTRYP PFNGLWINDOWPOS3FVPROC) (const GLfloat *v); +typedef void (APIENTRYP PFNGLWINDOWPOS3IPROC) (GLint x, GLint y, GLint z); +typedef void (APIENTRYP PFNGLWINDOWPOS3IVPROC) (const GLint *v); +typedef void (APIENTRYP PFNGLWINDOWPOS3SPROC) (GLshort x, GLshort y, GLshort z); +typedef void (APIENTRYP PFNGLWINDOWPOS3SVPROC) (const GLshort *v); +#endif + +#ifndef GL_VERSION_1_5 +#define GL_VERSION_1_5 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glGenQueries (GLsizei n, GLuint *ids); +GLAPI void APIENTRY glDeleteQueries (GLsizei n, const GLuint *ids); +GLAPI GLboolean APIENTRY glIsQuery (GLuint id); +GLAPI void APIENTRY glBeginQuery (GLenum target, GLuint id); +GLAPI void APIENTRY glEndQuery (GLenum target); +GLAPI void APIENTRY glGetQueryiv (GLenum target, GLenum pname, GLint *params); +GLAPI void APIENTRY glGetQueryObjectiv (GLuint id, GLenum pname, GLint *params); +GLAPI void APIENTRY glGetQueryObjectuiv (GLuint id, GLenum pname, GLuint *params); +GLAPI void APIENTRY glBindBuffer (GLenum target, GLuint buffer); +GLAPI void APIENTRY glDeleteBuffers (GLsizei n, const GLuint *buffers); +GLAPI void APIENTRY glGenBuffers (GLsizei n, GLuint *buffers); +GLAPI GLboolean APIENTRY glIsBuffer (GLuint buffer); +GLAPI void APIENTRY glBufferData (GLenum target, GLsizeiptr size, const GLvoid *data, GLenum usage); +GLAPI void APIENTRY glBufferSubData (GLenum target, GLintptr offset, GLsizeiptr size, const GLvoid *data); +GLAPI void APIENTRY glGetBufferSubData (GLenum target, GLintptr offset, GLsizeiptr size, GLvoid *data); +GLAPI GLvoid* APIENTRY glMapBuffer (GLenum target, GLenum access); +GLAPI GLboolean APIENTRY glUnmapBuffer (GLenum target); +GLAPI void APIENTRY glGetBufferParameteriv (GLenum target, GLenum pname, GLint *params); +GLAPI void APIENTRY glGetBufferPointerv (GLenum target, GLenum pname, GLvoid* *params); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLGENQUERIESPROC) (GLsizei n, GLuint *ids); +typedef void (APIENTRYP PFNGLDELETEQUERIESPROC) (GLsizei n, const GLuint *ids); +typedef GLboolean (APIENTRYP PFNGLISQUERYPROC) (GLuint id); +typedef void (APIENTRYP PFNGLBEGINQUERYPROC) (GLenum target, GLuint id); +typedef void (APIENTRYP PFNGLENDQUERYPROC) (GLenum target); +typedef void (APIENTRYP PFNGLGETQUERYIVPROC) (GLenum target, GLenum pname, GLint *params); +typedef void (APIENTRYP PFNGLGETQUERYOBJECTIVPROC) (GLuint id, GLenum pname, GLint *params); +typedef void (APIENTRYP PFNGLGETQUERYOBJECTUIVPROC) (GLuint id, GLenum pname, GLuint *params); +typedef void (APIENTRYP PFNGLBINDBUFFERPROC) (GLenum target, GLuint buffer); +typedef void (APIENTRYP PFNGLDELETEBUFFERSPROC) (GLsizei n, const GLuint *buffers); +typedef void (APIENTRYP PFNGLGENBUFFERSPROC) (GLsizei n, GLuint *buffers); +typedef GLboolean (APIENTRYP PFNGLISBUFFERPROC) (GLuint buffer); +typedef void (APIENTRYP PFNGLBUFFERDATAPROC) (GLenum target, GLsizeiptr size, const GLvoid *data, GLenum usage); +typedef void (APIENTRYP PFNGLBUFFERSUBDATAPROC) (GLenum target, GLintptr offset, GLsizeiptr size, const GLvoid *data); +typedef void (APIENTRYP PFNGLGETBUFFERSUBDATAPROC) (GLenum target, GLintptr offset, GLsizeiptr size, GLvoid *data); +typedef GLvoid* (APIENTRYP PFNGLMAPBUFFERPROC) (GLenum target, GLenum access); +typedef GLboolean (APIENTRYP PFNGLUNMAPBUFFERPROC) (GLenum target); +typedef void (APIENTRYP PFNGLGETBUFFERPARAMETERIVPROC) (GLenum target, GLenum pname, GLint *params); +typedef void (APIENTRYP PFNGLGETBUFFERPOINTERVPROC) (GLenum target, GLenum pname, GLvoid* *params); +#endif + +#ifndef GL_VERSION_2_0 +#define GL_VERSION_2_0 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glBlendEquationSeparate (GLenum modeRGB, GLenum modeAlpha); +GLAPI void APIENTRY glDrawBuffers (GLsizei n, const GLenum *bufs); +GLAPI void APIENTRY glStencilOpSeparate (GLenum face, GLenum sfail, GLenum dpfail, GLenum dppass); +GLAPI void APIENTRY glStencilFuncSeparate (GLenum face, GLenum func, GLint ref, GLuint mask); +GLAPI void APIENTRY glStencilMaskSeparate (GLenum face, GLuint mask); +GLAPI void APIENTRY glAttachShader (GLuint program, GLuint shader); +GLAPI void APIENTRY glBindAttribLocation (GLuint program, GLuint index, const GLchar *name); +GLAPI void APIENTRY glCompileShader (GLuint shader); +GLAPI GLuint APIENTRY glCreateProgram (void); +GLAPI GLuint APIENTRY glCreateShader (GLenum type); +GLAPI void APIENTRY glDeleteProgram (GLuint program); +GLAPI void APIENTRY glDeleteShader (GLuint shader); +GLAPI void APIENTRY glDetachShader (GLuint program, GLuint shader); +GLAPI void APIENTRY glDisableVertexAttribArray (GLuint index); +GLAPI void APIENTRY glEnableVertexAttribArray (GLuint index); +GLAPI void APIENTRY glGetActiveAttrib (GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLint *size, GLenum *type, GLchar *name); +GLAPI void APIENTRY glGetActiveUniform (GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLint *size, GLenum *type, GLchar *name); +GLAPI void APIENTRY glGetAttachedShaders (GLuint program, GLsizei maxCount, GLsizei *count, GLuint *obj); +GLAPI GLint APIENTRY glGetAttribLocation (GLuint program, const GLchar *name); +GLAPI void APIENTRY glGetProgramiv (GLuint program, GLenum pname, GLint *params); +GLAPI void APIENTRY glGetProgramInfoLog (GLuint program, GLsizei bufSize, GLsizei *length, GLchar *infoLog); +GLAPI void APIENTRY glGetShaderiv (GLuint shader, GLenum pname, GLint *params); +GLAPI void APIENTRY glGetShaderInfoLog (GLuint shader, GLsizei bufSize, GLsizei *length, GLchar *infoLog); +GLAPI void APIENTRY glGetShaderSource (GLuint shader, GLsizei bufSize, GLsizei *length, GLchar *source); +GLAPI GLint APIENTRY glGetUniformLocation (GLuint program, const GLchar *name); +GLAPI void APIENTRY glGetUniformfv (GLuint program, GLint location, GLfloat *params); +GLAPI void APIENTRY glGetUniformiv (GLuint program, GLint location, GLint *params); +GLAPI void APIENTRY glGetVertexAttribdv (GLuint index, GLenum pname, GLdouble *params); +GLAPI void APIENTRY glGetVertexAttribfv (GLuint index, GLenum pname, GLfloat *params); +GLAPI void APIENTRY glGetVertexAttribiv (GLuint index, GLenum pname, GLint *params); +GLAPI void APIENTRY glGetVertexAttribPointerv (GLuint index, GLenum pname, GLvoid* *pointer); +GLAPI GLboolean APIENTRY glIsProgram (GLuint program); +GLAPI GLboolean APIENTRY glIsShader (GLuint shader); +GLAPI void APIENTRY glLinkProgram (GLuint program); +GLAPI void APIENTRY glShaderSource (GLuint shader, GLsizei count, const GLchar* const *string, const GLint *length); +GLAPI void APIENTRY glUseProgram (GLuint program); +GLAPI void APIENTRY glUniform1f (GLint location, GLfloat v0); +GLAPI void APIENTRY glUniform2f (GLint location, GLfloat v0, GLfloat v1); +GLAPI void APIENTRY glUniform3f (GLint location, GLfloat v0, GLfloat v1, GLfloat v2); +GLAPI void APIENTRY glUniform4f (GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3); +GLAPI void APIENTRY glUniform1i (GLint location, GLint v0); +GLAPI void APIENTRY glUniform2i (GLint location, GLint v0, GLint v1); +GLAPI void APIENTRY glUniform3i (GLint location, GLint v0, GLint v1, GLint v2); +GLAPI void APIENTRY glUniform4i (GLint location, GLint v0, GLint v1, GLint v2, GLint v3); +GLAPI void APIENTRY glUniform1fv (GLint location, GLsizei count, const GLfloat *value); +GLAPI void APIENTRY glUniform2fv (GLint location, GLsizei count, const GLfloat *value); +GLAPI void APIENTRY glUniform3fv (GLint location, GLsizei count, const GLfloat *value); +GLAPI void APIENTRY glUniform4fv (GLint location, GLsizei count, const GLfloat *value); +GLAPI void APIENTRY glUniform1iv (GLint location, GLsizei count, const GLint *value); +GLAPI void APIENTRY glUniform2iv (GLint location, GLsizei count, const GLint *value); +GLAPI void APIENTRY glUniform3iv (GLint location, GLsizei count, const GLint *value); +GLAPI void APIENTRY glUniform4iv (GLint location, GLsizei count, const GLint *value); +GLAPI void APIENTRY glUniformMatrix2fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +GLAPI void APIENTRY glUniformMatrix3fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +GLAPI void APIENTRY glUniformMatrix4fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +GLAPI void APIENTRY glValidateProgram (GLuint program); +GLAPI void APIENTRY glVertexAttrib1d (GLuint index, GLdouble x); +GLAPI void APIENTRY glVertexAttrib1dv (GLuint index, const GLdouble *v); +GLAPI void APIENTRY glVertexAttrib1f (GLuint index, GLfloat x); +GLAPI void APIENTRY glVertexAttrib1fv (GLuint index, const GLfloat *v); +GLAPI void APIENTRY glVertexAttrib1s (GLuint index, GLshort x); +GLAPI void APIENTRY glVertexAttrib1sv (GLuint index, const GLshort *v); +GLAPI void APIENTRY glVertexAttrib2d (GLuint index, GLdouble x, GLdouble y); +GLAPI void APIENTRY glVertexAttrib2dv (GLuint index, const GLdouble *v); +GLAPI void APIENTRY glVertexAttrib2f (GLuint index, GLfloat x, GLfloat y); +GLAPI void APIENTRY glVertexAttrib2fv (GLuint index, const GLfloat *v); +GLAPI void APIENTRY glVertexAttrib2s (GLuint index, GLshort x, GLshort y); +GLAPI void APIENTRY glVertexAttrib2sv (GLuint index, const GLshort *v); +GLAPI void APIENTRY glVertexAttrib3d (GLuint index, GLdouble x, GLdouble y, GLdouble z); +GLAPI void APIENTRY glVertexAttrib3dv (GLuint index, const GLdouble *v); +GLAPI void APIENTRY glVertexAttrib3f (GLuint index, GLfloat x, GLfloat y, GLfloat z); +GLAPI void APIENTRY glVertexAttrib3fv (GLuint index, const GLfloat *v); +GLAPI void APIENTRY glVertexAttrib3s (GLuint index, GLshort x, GLshort y, GLshort z); +GLAPI void APIENTRY glVertexAttrib3sv (GLuint index, const GLshort *v); +GLAPI void APIENTRY glVertexAttrib4Nbv (GLuint index, const GLbyte *v); +GLAPI void APIENTRY glVertexAttrib4Niv (GLuint index, const GLint *v); +GLAPI void APIENTRY glVertexAttrib4Nsv (GLuint index, const GLshort *v); +GLAPI void APIENTRY glVertexAttrib4Nub (GLuint index, GLubyte x, GLubyte y, GLubyte z, GLubyte w); +GLAPI void APIENTRY glVertexAttrib4Nubv (GLuint index, const GLubyte *v); +GLAPI void APIENTRY glVertexAttrib4Nuiv (GLuint index, const GLuint *v); +GLAPI void APIENTRY glVertexAttrib4Nusv (GLuint index, const GLushort *v); +GLAPI void APIENTRY glVertexAttrib4bv (GLuint index, const GLbyte *v); +GLAPI void APIENTRY glVertexAttrib4d (GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w); +GLAPI void APIENTRY glVertexAttrib4dv (GLuint index, const GLdouble *v); +GLAPI void APIENTRY glVertexAttrib4f (GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w); +GLAPI void APIENTRY glVertexAttrib4fv (GLuint index, const GLfloat *v); +GLAPI void APIENTRY glVertexAttrib4iv (GLuint index, const GLint *v); +GLAPI void APIENTRY glVertexAttrib4s (GLuint index, GLshort x, GLshort y, GLshort z, GLshort w); +GLAPI void APIENTRY glVertexAttrib4sv (GLuint index, const GLshort *v); +GLAPI void APIENTRY glVertexAttrib4ubv (GLuint index, const GLubyte *v); +GLAPI void APIENTRY glVertexAttrib4uiv (GLuint index, const GLuint *v); +GLAPI void APIENTRY glVertexAttrib4usv (GLuint index, const GLushort *v); +GLAPI void APIENTRY glVertexAttribPointer (GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const GLvoid *pointer); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLBLENDEQUATIONSEPARATEPROC) (GLenum modeRGB, GLenum modeAlpha); +typedef void (APIENTRYP PFNGLDRAWBUFFERSPROC) (GLsizei n, const GLenum *bufs); +typedef void (APIENTRYP PFNGLSTENCILOPSEPARATEPROC) (GLenum face, GLenum sfail, GLenum dpfail, GLenum dppass); +typedef void (APIENTRYP PFNGLSTENCILFUNCSEPARATEPROC) (GLenum face, GLenum func, GLint ref, GLuint mask); +typedef void (APIENTRYP PFNGLSTENCILMASKSEPARATEPROC) (GLenum face, GLuint mask); +typedef void (APIENTRYP PFNGLATTACHSHADERPROC) (GLuint program, GLuint shader); +typedef void (APIENTRYP PFNGLBINDATTRIBLOCATIONPROC) (GLuint program, GLuint index, const GLchar *name); +typedef void (APIENTRYP PFNGLCOMPILESHADERPROC) (GLuint shader); +typedef GLuint (APIENTRYP PFNGLCREATEPROGRAMPROC) (void); +typedef GLuint (APIENTRYP PFNGLCREATESHADERPROC) (GLenum type); +typedef void (APIENTRYP PFNGLDELETEPROGRAMPROC) (GLuint program); +typedef void (APIENTRYP PFNGLDELETESHADERPROC) (GLuint shader); +typedef void (APIENTRYP PFNGLDETACHSHADERPROC) (GLuint program, GLuint shader); +typedef void (APIENTRYP PFNGLDISABLEVERTEXATTRIBARRAYPROC) (GLuint index); +typedef void (APIENTRYP PFNGLENABLEVERTEXATTRIBARRAYPROC) (GLuint index); +typedef void (APIENTRYP PFNGLGETACTIVEATTRIBPROC) (GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLint *size, GLenum *type, GLchar *name); +typedef void (APIENTRYP PFNGLGETACTIVEUNIFORMPROC) (GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLint *size, GLenum *type, GLchar *name); +typedef void (APIENTRYP PFNGLGETATTACHEDSHADERSPROC) (GLuint program, GLsizei maxCount, GLsizei *count, GLuint *obj); +typedef GLint (APIENTRYP PFNGLGETATTRIBLOCATIONPROC) (GLuint program, const GLchar *name); +typedef void (APIENTRYP PFNGLGETPROGRAMIVPROC) (GLuint program, GLenum pname, GLint *params); +typedef void (APIENTRYP PFNGLGETPROGRAMINFOLOGPROC) (GLuint program, GLsizei bufSize, GLsizei *length, GLchar *infoLog); +typedef void (APIENTRYP PFNGLGETSHADERIVPROC) (GLuint shader, GLenum pname, GLint *params); +typedef void (APIENTRYP PFNGLGETSHADERINFOLOGPROC) (GLuint shader, GLsizei bufSize, GLsizei *length, GLchar *infoLog); +typedef void (APIENTRYP PFNGLGETSHADERSOURCEPROC) (GLuint shader, GLsizei bufSize, GLsizei *length, GLchar *source); +typedef GLint (APIENTRYP PFNGLGETUNIFORMLOCATIONPROC) (GLuint program, const GLchar *name); +typedef void (APIENTRYP PFNGLGETUNIFORMFVPROC) (GLuint program, GLint location, GLfloat *params); +typedef void (APIENTRYP PFNGLGETUNIFORMIVPROC) (GLuint program, GLint location, GLint *params); +typedef void (APIENTRYP PFNGLGETVERTEXATTRIBDVPROC) (GLuint index, GLenum pname, GLdouble *params); +typedef void (APIENTRYP PFNGLGETVERTEXATTRIBFVPROC) (GLuint index, GLenum pname, GLfloat *params); +typedef void (APIENTRYP PFNGLGETVERTEXATTRIBIVPROC) (GLuint index, GLenum pname, GLint *params); +typedef void (APIENTRYP PFNGLGETVERTEXATTRIBPOINTERVPROC) (GLuint index, GLenum pname, GLvoid* *pointer); +typedef GLboolean (APIENTRYP PFNGLISPROGRAMPROC) (GLuint program); +typedef GLboolean (APIENTRYP PFNGLISSHADERPROC) (GLuint shader); +typedef void (APIENTRYP PFNGLLINKPROGRAMPROC) (GLuint program); +typedef void (APIENTRYP PFNGLSHADERSOURCEPROC) (GLuint shader, GLsizei count, const GLchar* const *string, const GLint *length); +typedef void (APIENTRYP PFNGLUSEPROGRAMPROC) (GLuint program); +typedef void (APIENTRYP PFNGLUNIFORM1FPROC) (GLint location, GLfloat v0); +typedef void (APIENTRYP PFNGLUNIFORM2FPROC) (GLint location, GLfloat v0, GLfloat v1); +typedef void (APIENTRYP PFNGLUNIFORM3FPROC) (GLint location, GLfloat v0, GLfloat v1, GLfloat v2); +typedef void (APIENTRYP PFNGLUNIFORM4FPROC) (GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3); +typedef void (APIENTRYP PFNGLUNIFORM1IPROC) (GLint location, GLint v0); +typedef void (APIENTRYP PFNGLUNIFORM2IPROC) (GLint location, GLint v0, GLint v1); +typedef void (APIENTRYP PFNGLUNIFORM3IPROC) (GLint location, GLint v0, GLint v1, GLint v2); +typedef void (APIENTRYP PFNGLUNIFORM4IPROC) (GLint location, GLint v0, GLint v1, GLint v2, GLint v3); +typedef void (APIENTRYP PFNGLUNIFORM1FVPROC) (GLint location, GLsizei count, const GLfloat *value); +typedef void (APIENTRYP PFNGLUNIFORM2FVPROC) (GLint location, GLsizei count, const GLfloat *value); +typedef void (APIENTRYP PFNGLUNIFORM3FVPROC) (GLint location, GLsizei count, const GLfloat *value); +typedef void (APIENTRYP PFNGLUNIFORM4FVPROC) (GLint location, GLsizei count, const GLfloat *value); +typedef void (APIENTRYP PFNGLUNIFORM1IVPROC) (GLint location, GLsizei count, const GLint *value); +typedef void (APIENTRYP PFNGLUNIFORM2IVPROC) (GLint location, GLsizei count, const GLint *value); +typedef void (APIENTRYP PFNGLUNIFORM3IVPROC) (GLint location, GLsizei count, const GLint *value); +typedef void (APIENTRYP PFNGLUNIFORM4IVPROC) (GLint location, GLsizei count, const GLint *value); +typedef void (APIENTRYP PFNGLUNIFORMMATRIX2FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +typedef void (APIENTRYP PFNGLUNIFORMMATRIX3FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +typedef void (APIENTRYP PFNGLUNIFORMMATRIX4FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +typedef void (APIENTRYP PFNGLVALIDATEPROGRAMPROC) (GLuint program); +typedef void (APIENTRYP PFNGLVERTEXATTRIB1DPROC) (GLuint index, GLdouble x); +typedef void (APIENTRYP PFNGLVERTEXATTRIB1DVPROC) (GLuint index, const GLdouble *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIB1FPROC) (GLuint index, GLfloat x); +typedef void (APIENTRYP PFNGLVERTEXATTRIB1FVPROC) (GLuint index, const GLfloat *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIB1SPROC) (GLuint index, GLshort x); +typedef void (APIENTRYP PFNGLVERTEXATTRIB1SVPROC) (GLuint index, const GLshort *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIB2DPROC) (GLuint index, GLdouble x, GLdouble y); +typedef void (APIENTRYP PFNGLVERTEXATTRIB2DVPROC) (GLuint index, const GLdouble *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIB2FPROC) (GLuint index, GLfloat x, GLfloat y); +typedef void (APIENTRYP PFNGLVERTEXATTRIB2FVPROC) (GLuint index, const GLfloat *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIB2SPROC) (GLuint index, GLshort x, GLshort y); +typedef void (APIENTRYP PFNGLVERTEXATTRIB2SVPROC) (GLuint index, const GLshort *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIB3DPROC) (GLuint index, GLdouble x, GLdouble y, GLdouble z); +typedef void (APIENTRYP PFNGLVERTEXATTRIB3DVPROC) (GLuint index, const GLdouble *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIB3FPROC) (GLuint index, GLfloat x, GLfloat y, GLfloat z); +typedef void (APIENTRYP PFNGLVERTEXATTRIB3FVPROC) (GLuint index, const GLfloat *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIB3SPROC) (GLuint index, GLshort x, GLshort y, GLshort z); +typedef void (APIENTRYP PFNGLVERTEXATTRIB3SVPROC) (GLuint index, const GLshort *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIB4NBVPROC) (GLuint index, const GLbyte *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIB4NIVPROC) (GLuint index, const GLint *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIB4NSVPROC) (GLuint index, const GLshort *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIB4NUBPROC) (GLuint index, GLubyte x, GLubyte y, GLubyte z, GLubyte w); +typedef void (APIENTRYP PFNGLVERTEXATTRIB4NUBVPROC) (GLuint index, const GLubyte *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIB4NUIVPROC) (GLuint index, const GLuint *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIB4NUSVPROC) (GLuint index, const GLushort *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIB4BVPROC) (GLuint index, const GLbyte *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIB4DPROC) (GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w); +typedef void (APIENTRYP PFNGLVERTEXATTRIB4DVPROC) (GLuint index, const GLdouble *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIB4FPROC) (GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w); +typedef void (APIENTRYP PFNGLVERTEXATTRIB4FVPROC) (GLuint index, const GLfloat *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIB4IVPROC) (GLuint index, const GLint *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIB4SPROC) (GLuint index, GLshort x, GLshort y, GLshort z, GLshort w); +typedef void (APIENTRYP PFNGLVERTEXATTRIB4SVPROC) (GLuint index, const GLshort *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIB4UBVPROC) (GLuint index, const GLubyte *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIB4UIVPROC) (GLuint index, const GLuint *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIB4USVPROC) (GLuint index, const GLushort *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIBPOINTERPROC) (GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const GLvoid *pointer); +#endif + +#ifndef GL_VERSION_2_1 +#define GL_VERSION_2_1 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glUniformMatrix2x3fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +GLAPI void APIENTRY glUniformMatrix3x2fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +GLAPI void APIENTRY glUniformMatrix2x4fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +GLAPI void APIENTRY glUniformMatrix4x2fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +GLAPI void APIENTRY glUniformMatrix3x4fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +GLAPI void APIENTRY glUniformMatrix4x3fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLUNIFORMMATRIX2X3FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +typedef void (APIENTRYP PFNGLUNIFORMMATRIX3X2FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +typedef void (APIENTRYP PFNGLUNIFORMMATRIX2X4FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +typedef void (APIENTRYP PFNGLUNIFORMMATRIX4X2FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +typedef void (APIENTRYP PFNGLUNIFORMMATRIX3X4FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +typedef void (APIENTRYP PFNGLUNIFORMMATRIX4X3FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +#endif + +#ifndef GL_VERSION_3_0 +#define GL_VERSION_3_0 1 +/* OpenGL 3.0 also reuses entry points from these extensions: */ +/* ARB_framebuffer_object */ +/* ARB_map_buffer_range */ +/* ARB_vertex_array_object */ +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glColorMaski (GLuint index, GLboolean r, GLboolean g, GLboolean b, GLboolean a); +GLAPI void APIENTRY glGetBooleani_v (GLenum target, GLuint index, GLboolean *data); +GLAPI void APIENTRY glGetIntegeri_v (GLenum target, GLuint index, GLint *data); +GLAPI void APIENTRY glEnablei (GLenum target, GLuint index); +GLAPI void APIENTRY glDisablei (GLenum target, GLuint index); +GLAPI GLboolean APIENTRY glIsEnabledi (GLenum target, GLuint index); +GLAPI void APIENTRY glBeginTransformFeedback (GLenum primitiveMode); +GLAPI void APIENTRY glEndTransformFeedback (void); +GLAPI void APIENTRY glBindBufferRange (GLenum target, GLuint index, GLuint buffer, GLintptr offset, GLsizeiptr size); +GLAPI void APIENTRY glBindBufferBase (GLenum target, GLuint index, GLuint buffer); +GLAPI void APIENTRY glTransformFeedbackVaryings (GLuint program, GLsizei count, const GLchar* const *varyings, GLenum bufferMode); +GLAPI void APIENTRY glGetTransformFeedbackVarying (GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLsizei *size, GLenum *type, GLchar *name); +GLAPI void APIENTRY glClampColor (GLenum target, GLenum clamp); +GLAPI void APIENTRY glBeginConditionalRender (GLuint id, GLenum mode); +GLAPI void APIENTRY glEndConditionalRender (void); +GLAPI void APIENTRY glVertexAttribIPointer (GLuint index, GLint size, GLenum type, GLsizei stride, const GLvoid *pointer); +GLAPI void APIENTRY glGetVertexAttribIiv (GLuint index, GLenum pname, GLint *params); +GLAPI void APIENTRY glGetVertexAttribIuiv (GLuint index, GLenum pname, GLuint *params); +GLAPI void APIENTRY glVertexAttribI1i (GLuint index, GLint x); +GLAPI void APIENTRY glVertexAttribI2i (GLuint index, GLint x, GLint y); +GLAPI void APIENTRY glVertexAttribI3i (GLuint index, GLint x, GLint y, GLint z); +GLAPI void APIENTRY glVertexAttribI4i (GLuint index, GLint x, GLint y, GLint z, GLint w); +GLAPI void APIENTRY glVertexAttribI1ui (GLuint index, GLuint x); +GLAPI void APIENTRY glVertexAttribI2ui (GLuint index, GLuint x, GLuint y); +GLAPI void APIENTRY glVertexAttribI3ui (GLuint index, GLuint x, GLuint y, GLuint z); +GLAPI void APIENTRY glVertexAttribI4ui (GLuint index, GLuint x, GLuint y, GLuint z, GLuint w); +GLAPI void APIENTRY glVertexAttribI1iv (GLuint index, const GLint *v); +GLAPI void APIENTRY glVertexAttribI2iv (GLuint index, const GLint *v); +GLAPI void APIENTRY glVertexAttribI3iv (GLuint index, const GLint *v); +GLAPI void APIENTRY glVertexAttribI4iv (GLuint index, const GLint *v); +GLAPI void APIENTRY glVertexAttribI1uiv (GLuint index, const GLuint *v); +GLAPI void APIENTRY glVertexAttribI2uiv (GLuint index, const GLuint *v); +GLAPI void APIENTRY glVertexAttribI3uiv (GLuint index, const GLuint *v); +GLAPI void APIENTRY glVertexAttribI4uiv (GLuint index, const GLuint *v); +GLAPI void APIENTRY glVertexAttribI4bv (GLuint index, const GLbyte *v); +GLAPI void APIENTRY glVertexAttribI4sv (GLuint index, const GLshort *v); +GLAPI void APIENTRY glVertexAttribI4ubv (GLuint index, const GLubyte *v); +GLAPI void APIENTRY glVertexAttribI4usv (GLuint index, const GLushort *v); +GLAPI void APIENTRY glGetUniformuiv (GLuint program, GLint location, GLuint *params); +GLAPI void APIENTRY glBindFragDataLocation (GLuint program, GLuint color, const GLchar *name); +GLAPI GLint APIENTRY glGetFragDataLocation (GLuint program, const GLchar *name); +GLAPI void APIENTRY glUniform1ui (GLint location, GLuint v0); +GLAPI void APIENTRY glUniform2ui (GLint location, GLuint v0, GLuint v1); +GLAPI void APIENTRY glUniform3ui (GLint location, GLuint v0, GLuint v1, GLuint v2); +GLAPI void APIENTRY glUniform4ui (GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3); +GLAPI void APIENTRY glUniform1uiv (GLint location, GLsizei count, const GLuint *value); +GLAPI void APIENTRY glUniform2uiv (GLint location, GLsizei count, const GLuint *value); +GLAPI void APIENTRY glUniform3uiv (GLint location, GLsizei count, const GLuint *value); +GLAPI void APIENTRY glUniform4uiv (GLint location, GLsizei count, const GLuint *value); +GLAPI void APIENTRY glTexParameterIiv (GLenum target, GLenum pname, const GLint *params); +GLAPI void APIENTRY glTexParameterIuiv (GLenum target, GLenum pname, const GLuint *params); +GLAPI void APIENTRY glGetTexParameterIiv (GLenum target, GLenum pname, GLint *params); +GLAPI void APIENTRY glGetTexParameterIuiv (GLenum target, GLenum pname, GLuint *params); +GLAPI void APIENTRY glClearBufferiv (GLenum buffer, GLint drawbuffer, const GLint *value); +GLAPI void APIENTRY glClearBufferuiv (GLenum buffer, GLint drawbuffer, const GLuint *value); +GLAPI void APIENTRY glClearBufferfv (GLenum buffer, GLint drawbuffer, const GLfloat *value); +GLAPI void APIENTRY glClearBufferfi (GLenum buffer, GLint drawbuffer, GLfloat depth, GLint stencil); +GLAPI const GLubyte * APIENTRY glGetStringi (GLenum name, GLuint index); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLCOLORMASKIPROC) (GLuint index, GLboolean r, GLboolean g, GLboolean b, GLboolean a); +typedef void (APIENTRYP PFNGLGETBOOLEANI_VPROC) (GLenum target, GLuint index, GLboolean *data); +typedef void (APIENTRYP PFNGLGETINTEGERI_VPROC) (GLenum target, GLuint index, GLint *data); +typedef void (APIENTRYP PFNGLENABLEIPROC) (GLenum target, GLuint index); +typedef void (APIENTRYP PFNGLDISABLEIPROC) (GLenum target, GLuint index); +typedef GLboolean (APIENTRYP PFNGLISENABLEDIPROC) (GLenum target, GLuint index); +typedef void (APIENTRYP PFNGLBEGINTRANSFORMFEEDBACKPROC) (GLenum primitiveMode); +typedef void (APIENTRYP PFNGLENDTRANSFORMFEEDBACKPROC) (void); +typedef void (APIENTRYP PFNGLBINDBUFFERRANGEPROC) (GLenum target, GLuint index, GLuint buffer, GLintptr offset, GLsizeiptr size); +typedef void (APIENTRYP PFNGLBINDBUFFERBASEPROC) (GLenum target, GLuint index, GLuint buffer); +typedef void (APIENTRYP PFNGLTRANSFORMFEEDBACKVARYINGSPROC) (GLuint program, GLsizei count, const GLchar* const *varyings, GLenum bufferMode); +typedef void (APIENTRYP PFNGLGETTRANSFORMFEEDBACKVARYINGPROC) (GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLsizei *size, GLenum *type, GLchar *name); +typedef void (APIENTRYP PFNGLCLAMPCOLORPROC) (GLenum target, GLenum clamp); +typedef void (APIENTRYP PFNGLBEGINCONDITIONALRENDERPROC) (GLuint id, GLenum mode); +typedef void (APIENTRYP PFNGLENDCONDITIONALRENDERPROC) (void); +typedef void (APIENTRYP PFNGLVERTEXATTRIBIPOINTERPROC) (GLuint index, GLint size, GLenum type, GLsizei stride, const GLvoid *pointer); +typedef void (APIENTRYP PFNGLGETVERTEXATTRIBIIVPROC) (GLuint index, GLenum pname, GLint *params); +typedef void (APIENTRYP PFNGLGETVERTEXATTRIBIUIVPROC) (GLuint index, GLenum pname, GLuint *params); +typedef void (APIENTRYP PFNGLVERTEXATTRIBI1IPROC) (GLuint index, GLint x); +typedef void (APIENTRYP PFNGLVERTEXATTRIBI2IPROC) (GLuint index, GLint x, GLint y); +typedef void (APIENTRYP PFNGLVERTEXATTRIBI3IPROC) (GLuint index, GLint x, GLint y, GLint z); +typedef void (APIENTRYP PFNGLVERTEXATTRIBI4IPROC) (GLuint index, GLint x, GLint y, GLint z, GLint w); +typedef void (APIENTRYP PFNGLVERTEXATTRIBI1UIPROC) (GLuint index, GLuint x); +typedef void (APIENTRYP PFNGLVERTEXATTRIBI2UIPROC) (GLuint index, GLuint x, GLuint y); +typedef void (APIENTRYP PFNGLVERTEXATTRIBI3UIPROC) (GLuint index, GLuint x, GLuint y, GLuint z); +typedef void (APIENTRYP PFNGLVERTEXATTRIBI4UIPROC) (GLuint index, GLuint x, GLuint y, GLuint z, GLuint w); +typedef void (APIENTRYP PFNGLVERTEXATTRIBI1IVPROC) (GLuint index, const GLint *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIBI2IVPROC) (GLuint index, const GLint *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIBI3IVPROC) (GLuint index, const GLint *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIBI4IVPROC) (GLuint index, const GLint *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIBI1UIVPROC) (GLuint index, const GLuint *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIBI2UIVPROC) (GLuint index, const GLuint *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIBI3UIVPROC) (GLuint index, const GLuint *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIBI4UIVPROC) (GLuint index, const GLuint *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIBI4BVPROC) (GLuint index, const GLbyte *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIBI4SVPROC) (GLuint index, const GLshort *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIBI4UBVPROC) (GLuint index, const GLubyte *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIBI4USVPROC) (GLuint index, const GLushort *v); +typedef void (APIENTRYP PFNGLGETUNIFORMUIVPROC) (GLuint program, GLint location, GLuint *params); +typedef void (APIENTRYP PFNGLBINDFRAGDATALOCATIONPROC) (GLuint program, GLuint color, const GLchar *name); +typedef GLint (APIENTRYP PFNGLGETFRAGDATALOCATIONPROC) (GLuint program, const GLchar *name); +typedef void (APIENTRYP PFNGLUNIFORM1UIPROC) (GLint location, GLuint v0); +typedef void (APIENTRYP PFNGLUNIFORM2UIPROC) (GLint location, GLuint v0, GLuint v1); +typedef void (APIENTRYP PFNGLUNIFORM3UIPROC) (GLint location, GLuint v0, GLuint v1, GLuint v2); +typedef void (APIENTRYP PFNGLUNIFORM4UIPROC) (GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3); +typedef void (APIENTRYP PFNGLUNIFORM1UIVPROC) (GLint location, GLsizei count, const GLuint *value); +typedef void (APIENTRYP PFNGLUNIFORM2UIVPROC) (GLint location, GLsizei count, const GLuint *value); +typedef void (APIENTRYP PFNGLUNIFORM3UIVPROC) (GLint location, GLsizei count, const GLuint *value); +typedef void (APIENTRYP PFNGLUNIFORM4UIVPROC) (GLint location, GLsizei count, const GLuint *value); +typedef void (APIENTRYP PFNGLTEXPARAMETERIIVPROC) (GLenum target, GLenum pname, const GLint *params); +typedef void (APIENTRYP PFNGLTEXPARAMETERIUIVPROC) (GLenum target, GLenum pname, const GLuint *params); +typedef void (APIENTRYP PFNGLGETTEXPARAMETERIIVPROC) (GLenum target, GLenum pname, GLint *params); +typedef void (APIENTRYP PFNGLGETTEXPARAMETERIUIVPROC) (GLenum target, GLenum pname, GLuint *params); +typedef void (APIENTRYP PFNGLCLEARBUFFERIVPROC) (GLenum buffer, GLint drawbuffer, const GLint *value); +typedef void (APIENTRYP PFNGLCLEARBUFFERUIVPROC) (GLenum buffer, GLint drawbuffer, const GLuint *value); +typedef void (APIENTRYP PFNGLCLEARBUFFERFVPROC) (GLenum buffer, GLint drawbuffer, const GLfloat *value); +typedef void (APIENTRYP PFNGLCLEARBUFFERFIPROC) (GLenum buffer, GLint drawbuffer, GLfloat depth, GLint stencil); +typedef const GLubyte * (APIENTRYP PFNGLGETSTRINGIPROC) (GLenum name, GLuint index); +#endif + +#ifndef GL_VERSION_3_1 +#define GL_VERSION_3_1 1 +/* OpenGL 3.1 also reuses entry points from these extensions: */ +/* ARB_copy_buffer */ +/* ARB_uniform_buffer_object */ +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glDrawArraysInstanced (GLenum mode, GLint first, GLsizei count, GLsizei instancecount); +GLAPI void APIENTRY glDrawElementsInstanced (GLenum mode, GLsizei count, GLenum type, const GLvoid *indices, GLsizei instancecount); +GLAPI void APIENTRY glTexBuffer (GLenum target, GLenum internalformat, GLuint buffer); +GLAPI void APIENTRY glPrimitiveRestartIndex (GLuint index); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLDRAWARRAYSINSTANCEDPROC) (GLenum mode, GLint first, GLsizei count, GLsizei instancecount); +typedef void (APIENTRYP PFNGLDRAWELEMENTSINSTANCEDPROC) (GLenum mode, GLsizei count, GLenum type, const GLvoid *indices, GLsizei instancecount); +typedef void (APIENTRYP PFNGLTEXBUFFERPROC) (GLenum target, GLenum internalformat, GLuint buffer); +typedef void (APIENTRYP PFNGLPRIMITIVERESTARTINDEXPROC) (GLuint index); +#endif + +#ifndef GL_VERSION_3_2 +#define GL_VERSION_3_2 1 +/* OpenGL 3.2 also reuses entry points from these extensions: */ +/* ARB_draw_elements_base_vertex */ +/* ARB_provoking_vertex */ +/* ARB_sync */ +/* ARB_texture_multisample */ +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glGetInteger64i_v (GLenum target, GLuint index, GLint64 *data); +GLAPI void APIENTRY glGetBufferParameteri64v (GLenum target, GLenum pname, GLint64 *params); +GLAPI void APIENTRY glFramebufferTexture (GLenum target, GLenum attachment, GLuint texture, GLint level); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLGETINTEGER64I_VPROC) (GLenum target, GLuint index, GLint64 *data); +typedef void (APIENTRYP PFNGLGETBUFFERPARAMETERI64VPROC) (GLenum target, GLenum pname, GLint64 *params); +typedef void (APIENTRYP PFNGLFRAMEBUFFERTEXTUREPROC) (GLenum target, GLenum attachment, GLuint texture, GLint level); +#endif + +#ifndef GL_VERSION_3_3 +#define GL_VERSION_3_3 1 +/* OpenGL 3.3 also reuses entry points from these extensions: */ +/* ARB_blend_func_extended */ +/* ARB_sampler_objects */ +/* ARB_explicit_attrib_location, but it has none */ +/* ARB_occlusion_query2 (no entry points) */ +/* ARB_shader_bit_encoding (no entry points) */ +/* ARB_texture_rgb10_a2ui (no entry points) */ +/* ARB_texture_swizzle (no entry points) */ +/* ARB_timer_query */ +/* ARB_vertex_type_2_10_10_10_rev */ +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glVertexAttribDivisor (GLuint index, GLuint divisor); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLVERTEXATTRIBDIVISORPROC) (GLuint index, GLuint divisor); +#endif + +#ifndef GL_VERSION_4_0 +#define GL_VERSION_4_0 1 +/* OpenGL 4.0 also reuses entry points from these extensions: */ +/* ARB_texture_query_lod (no entry points) */ +/* ARB_draw_indirect */ +/* ARB_gpu_shader5 (no entry points) */ +/* ARB_gpu_shader_fp64 */ +/* ARB_shader_subroutine */ +/* ARB_tessellation_shader */ +/* ARB_texture_buffer_object_rgb32 (no entry points) */ +/* ARB_texture_cube_map_array (no entry points) */ +/* ARB_texture_gather (no entry points) */ +/* ARB_transform_feedback2 */ +/* ARB_transform_feedback3 */ +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glMinSampleShading (GLfloat value); +GLAPI void APIENTRY glBlendEquationi (GLuint buf, GLenum mode); +GLAPI void APIENTRY glBlendEquationSeparatei (GLuint buf, GLenum modeRGB, GLenum modeAlpha); +GLAPI void APIENTRY glBlendFunci (GLuint buf, GLenum src, GLenum dst); +GLAPI void APIENTRY glBlendFuncSeparatei (GLuint buf, GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLMINSAMPLESHADINGPROC) (GLfloat value); +typedef void (APIENTRYP PFNGLBLENDEQUATIONIPROC) (GLuint buf, GLenum mode); +typedef void (APIENTRYP PFNGLBLENDEQUATIONSEPARATEIPROC) (GLuint buf, GLenum modeRGB, GLenum modeAlpha); +typedef void (APIENTRYP PFNGLBLENDFUNCIPROC) (GLuint buf, GLenum src, GLenum dst); +typedef void (APIENTRYP PFNGLBLENDFUNCSEPARATEIPROC) (GLuint buf, GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha); +#endif + +#ifndef GL_VERSION_4_1 +#define GL_VERSION_4_1 1 +/* OpenGL 4.1 reuses entry points from these extensions: */ +/* ARB_ES2_compatibility */ +/* ARB_get_program_binary */ +/* ARB_separate_shader_objects */ +/* ARB_shader_precision (no entry points) */ +/* ARB_vertex_attrib_64bit */ +/* ARB_viewport_array */ +#endif + +#ifndef GL_VERSION_4_2 +#define GL_VERSION_4_2 1 +/* OpenGL 4.2 reuses entry points from these extensions: */ +/* ARB_base_instance */ +/* ARB_shading_language_420pack (no entry points) */ +/* ARB_transform_feedback_instanced */ +/* ARB_compressed_texture_pixel_storage (no entry points) */ +/* ARB_conservative_depth (no entry points) */ +/* ARB_internalformat_query */ +/* ARB_map_buffer_alignment (no entry points) */ +/* ARB_shader_atomic_counters */ +/* ARB_shader_image_load_store */ +/* ARB_shading_language_packing (no entry points) */ +/* ARB_texture_storage */ +#endif + +#ifndef GL_VERSION_4_3 +#define GL_VERSION_4_3 1 +/* OpenGL 4.3 reuses entry points from these extensions: */ +/* ARB_arrays_of_arrays (no entry points, GLSL only) */ +/* ARB_fragment_layer_viewport (no entry points, GLSL only) */ +/* ARB_shader_image_size (no entry points, GLSL only) */ +/* ARB_ES3_compatibility (no entry points) */ +/* ARB_clear_buffer_object */ +/* ARB_compute_shader */ +/* ARB_copy_image */ +/* KHR_debug (includes ARB_debug_output commands promoted to KHR without suffixes) */ +/* ARB_explicit_uniform_location (no entry points) */ +/* ARB_framebuffer_no_attachments */ +/* ARB_internalformat_query2 */ +/* ARB_invalidate_subdata */ +/* ARB_multi_draw_indirect */ +/* ARB_program_interface_query */ +/* ARB_robust_buffer_access_behavior (no entry points) */ +/* ARB_shader_storage_buffer_object */ +/* ARB_stencil_texturing (no entry points) */ +/* ARB_texture_buffer_range */ +/* ARB_texture_query_levels (no entry points) */ +/* ARB_texture_storage_multisample */ +/* ARB_texture_view */ +/* ARB_vertex_attrib_binding */ +#endif + +#ifndef GL_ARB_multitexture +#define GL_ARB_multitexture 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glActiveTextureARB (GLenum texture); +GLAPI void APIENTRY glClientActiveTextureARB (GLenum texture); +GLAPI void APIENTRY glMultiTexCoord1dARB (GLenum target, GLdouble s); +GLAPI void APIENTRY glMultiTexCoord1dvARB (GLenum target, const GLdouble *v); +GLAPI void APIENTRY glMultiTexCoord1fARB (GLenum target, GLfloat s); +GLAPI void APIENTRY glMultiTexCoord1fvARB (GLenum target, const GLfloat *v); +GLAPI void APIENTRY glMultiTexCoord1iARB (GLenum target, GLint s); +GLAPI void APIENTRY glMultiTexCoord1ivARB (GLenum target, const GLint *v); +GLAPI void APIENTRY glMultiTexCoord1sARB (GLenum target, GLshort s); +GLAPI void APIENTRY glMultiTexCoord1svARB (GLenum target, const GLshort *v); +GLAPI void APIENTRY glMultiTexCoord2dARB (GLenum target, GLdouble s, GLdouble t); +GLAPI void APIENTRY glMultiTexCoord2dvARB (GLenum target, const GLdouble *v); +GLAPI void APIENTRY glMultiTexCoord2fARB (GLenum target, GLfloat s, GLfloat t); +GLAPI void APIENTRY glMultiTexCoord2fvARB (GLenum target, const GLfloat *v); +GLAPI void APIENTRY glMultiTexCoord2iARB (GLenum target, GLint s, GLint t); +GLAPI void APIENTRY glMultiTexCoord2ivARB (GLenum target, const GLint *v); +GLAPI void APIENTRY glMultiTexCoord2sARB (GLenum target, GLshort s, GLshort t); +GLAPI void APIENTRY glMultiTexCoord2svARB (GLenum target, const GLshort *v); +GLAPI void APIENTRY glMultiTexCoord3dARB (GLenum target, GLdouble s, GLdouble t, GLdouble r); +GLAPI void APIENTRY glMultiTexCoord3dvARB (GLenum target, const GLdouble *v); +GLAPI void APIENTRY glMultiTexCoord3fARB (GLenum target, GLfloat s, GLfloat t, GLfloat r); +GLAPI void APIENTRY glMultiTexCoord3fvARB (GLenum target, const GLfloat *v); +GLAPI void APIENTRY glMultiTexCoord3iARB (GLenum target, GLint s, GLint t, GLint r); +GLAPI void APIENTRY glMultiTexCoord3ivARB (GLenum target, const GLint *v); +GLAPI void APIENTRY glMultiTexCoord3sARB (GLenum target, GLshort s, GLshort t, GLshort r); +GLAPI void APIENTRY glMultiTexCoord3svARB (GLenum target, const GLshort *v); +GLAPI void APIENTRY glMultiTexCoord4dARB (GLenum target, GLdouble s, GLdouble t, GLdouble r, GLdouble q); +GLAPI void APIENTRY glMultiTexCoord4dvARB (GLenum target, const GLdouble *v); +GLAPI void APIENTRY glMultiTexCoord4fARB (GLenum target, GLfloat s, GLfloat t, GLfloat r, GLfloat q); +GLAPI void APIENTRY glMultiTexCoord4fvARB (GLenum target, const GLfloat *v); +GLAPI void APIENTRY glMultiTexCoord4iARB (GLenum target, GLint s, GLint t, GLint r, GLint q); +GLAPI void APIENTRY glMultiTexCoord4ivARB (GLenum target, const GLint *v); +GLAPI void APIENTRY glMultiTexCoord4sARB (GLenum target, GLshort s, GLshort t, GLshort r, GLshort q); +GLAPI void APIENTRY glMultiTexCoord4svARB (GLenum target, const GLshort *v); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLACTIVETEXTUREARBPROC) (GLenum texture); +typedef void (APIENTRYP PFNGLCLIENTACTIVETEXTUREARBPROC) (GLenum texture); +typedef void (APIENTRYP PFNGLMULTITEXCOORD1DARBPROC) (GLenum target, GLdouble s); +typedef void (APIENTRYP PFNGLMULTITEXCOORD1DVARBPROC) (GLenum target, const GLdouble *v); +typedef void (APIENTRYP PFNGLMULTITEXCOORD1FARBPROC) (GLenum target, GLfloat s); +typedef void (APIENTRYP PFNGLMULTITEXCOORD1FVARBPROC) (GLenum target, const GLfloat *v); +typedef void (APIENTRYP PFNGLMULTITEXCOORD1IARBPROC) (GLenum target, GLint s); +typedef void (APIENTRYP PFNGLMULTITEXCOORD1IVARBPROC) (GLenum target, const GLint *v); +typedef void (APIENTRYP PFNGLMULTITEXCOORD1SARBPROC) (GLenum target, GLshort s); +typedef void (APIENTRYP PFNGLMULTITEXCOORD1SVARBPROC) (GLenum target, const GLshort *v); +typedef void (APIENTRYP PFNGLMULTITEXCOORD2DARBPROC) (GLenum target, GLdouble s, GLdouble t); +typedef void (APIENTRYP PFNGLMULTITEXCOORD2DVARBPROC) (GLenum target, const GLdouble *v); +typedef void (APIENTRYP PFNGLMULTITEXCOORD2FARBPROC) (GLenum target, GLfloat s, GLfloat t); +typedef void (APIENTRYP PFNGLMULTITEXCOORD2FVARBPROC) (GLenum target, const GLfloat *v); +typedef void (APIENTRYP PFNGLMULTITEXCOORD2IARBPROC) (GLenum target, GLint s, GLint t); +typedef void (APIENTRYP PFNGLMULTITEXCOORD2IVARBPROC) (GLenum target, const GLint *v); +typedef void (APIENTRYP PFNGLMULTITEXCOORD2SARBPROC) (GLenum target, GLshort s, GLshort t); +typedef void (APIENTRYP PFNGLMULTITEXCOORD2SVARBPROC) (GLenum target, const GLshort *v); +typedef void (APIENTRYP PFNGLMULTITEXCOORD3DARBPROC) (GLenum target, GLdouble s, GLdouble t, GLdouble r); +typedef void (APIENTRYP PFNGLMULTITEXCOORD3DVARBPROC) (GLenum target, const GLdouble *v); +typedef void (APIENTRYP PFNGLMULTITEXCOORD3FARBPROC) (GLenum target, GLfloat s, GLfloat t, GLfloat r); +typedef void (APIENTRYP PFNGLMULTITEXCOORD3FVARBPROC) (GLenum target, const GLfloat *v); +typedef void (APIENTRYP PFNGLMULTITEXCOORD3IARBPROC) (GLenum target, GLint s, GLint t, GLint r); +typedef void (APIENTRYP PFNGLMULTITEXCOORD3IVARBPROC) (GLenum target, const GLint *v); +typedef void (APIENTRYP PFNGLMULTITEXCOORD3SARBPROC) (GLenum target, GLshort s, GLshort t, GLshort r); +typedef void (APIENTRYP PFNGLMULTITEXCOORD3SVARBPROC) (GLenum target, const GLshort *v); +typedef void (APIENTRYP PFNGLMULTITEXCOORD4DARBPROC) (GLenum target, GLdouble s, GLdouble t, GLdouble r, GLdouble q); +typedef void (APIENTRYP PFNGLMULTITEXCOORD4DVARBPROC) (GLenum target, const GLdouble *v); +typedef void (APIENTRYP PFNGLMULTITEXCOORD4FARBPROC) (GLenum target, GLfloat s, GLfloat t, GLfloat r, GLfloat q); +typedef void (APIENTRYP PFNGLMULTITEXCOORD4FVARBPROC) (GLenum target, const GLfloat *v); +typedef void (APIENTRYP PFNGLMULTITEXCOORD4IARBPROC) (GLenum target, GLint s, GLint t, GLint r, GLint q); +typedef void (APIENTRYP PFNGLMULTITEXCOORD4IVARBPROC) (GLenum target, const GLint *v); +typedef void (APIENTRYP PFNGLMULTITEXCOORD4SARBPROC) (GLenum target, GLshort s, GLshort t, GLshort r, GLshort q); +typedef void (APIENTRYP PFNGLMULTITEXCOORD4SVARBPROC) (GLenum target, const GLshort *v); +#endif + +#ifndef GL_ARB_transpose_matrix +#define GL_ARB_transpose_matrix 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glLoadTransposeMatrixfARB (const GLfloat *m); +GLAPI void APIENTRY glLoadTransposeMatrixdARB (const GLdouble *m); +GLAPI void APIENTRY glMultTransposeMatrixfARB (const GLfloat *m); +GLAPI void APIENTRY glMultTransposeMatrixdARB (const GLdouble *m); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLLOADTRANSPOSEMATRIXFARBPROC) (const GLfloat *m); +typedef void (APIENTRYP PFNGLLOADTRANSPOSEMATRIXDARBPROC) (const GLdouble *m); +typedef void (APIENTRYP PFNGLMULTTRANSPOSEMATRIXFARBPROC) (const GLfloat *m); +typedef void (APIENTRYP PFNGLMULTTRANSPOSEMATRIXDARBPROC) (const GLdouble *m); +#endif + +#ifndef GL_ARB_multisample +#define GL_ARB_multisample 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glSampleCoverageARB (GLfloat value, GLboolean invert); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLSAMPLECOVERAGEARBPROC) (GLfloat value, GLboolean invert); +#endif + +#ifndef GL_ARB_texture_env_add +#define GL_ARB_texture_env_add 1 +#endif + +#ifndef GL_ARB_texture_cube_map +#define GL_ARB_texture_cube_map 1 +#endif + +#ifndef GL_ARB_texture_compression +#define GL_ARB_texture_compression 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glCompressedTexImage3DARB (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const GLvoid *data); +GLAPI void APIENTRY glCompressedTexImage2DARB (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const GLvoid *data); +GLAPI void APIENTRY glCompressedTexImage1DARB (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLsizei imageSize, const GLvoid *data); +GLAPI void APIENTRY glCompressedTexSubImage3DARB (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const GLvoid *data); +GLAPI void APIENTRY glCompressedTexSubImage2DARB (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const GLvoid *data); +GLAPI void APIENTRY glCompressedTexSubImage1DARB (GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLsizei imageSize, const GLvoid *data); +GLAPI void APIENTRY glGetCompressedTexImageARB (GLenum target, GLint level, GLvoid *img); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLCOMPRESSEDTEXIMAGE3DARBPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const GLvoid *data); +typedef void (APIENTRYP PFNGLCOMPRESSEDTEXIMAGE2DARBPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const GLvoid *data); +typedef void (APIENTRYP PFNGLCOMPRESSEDTEXIMAGE1DARBPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLsizei imageSize, const GLvoid *data); +typedef void (APIENTRYP PFNGLCOMPRESSEDTEXSUBIMAGE3DARBPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const GLvoid *data); +typedef void (APIENTRYP PFNGLCOMPRESSEDTEXSUBIMAGE2DARBPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const GLvoid *data); +typedef void (APIENTRYP PFNGLCOMPRESSEDTEXSUBIMAGE1DARBPROC) (GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLsizei imageSize, const GLvoid *data); +typedef void (APIENTRYP PFNGLGETCOMPRESSEDTEXIMAGEARBPROC) (GLenum target, GLint level, GLvoid *img); +#endif + +#ifndef GL_ARB_texture_border_clamp +#define GL_ARB_texture_border_clamp 1 +#endif + +#ifndef GL_ARB_point_parameters +#define GL_ARB_point_parameters 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glPointParameterfARB (GLenum pname, GLfloat param); +GLAPI void APIENTRY glPointParameterfvARB (GLenum pname, const GLfloat *params); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLPOINTPARAMETERFARBPROC) (GLenum pname, GLfloat param); +typedef void (APIENTRYP PFNGLPOINTPARAMETERFVARBPROC) (GLenum pname, const GLfloat *params); +#endif + +#ifndef GL_ARB_vertex_blend +#define GL_ARB_vertex_blend 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glWeightbvARB (GLint size, const GLbyte *weights); +GLAPI void APIENTRY glWeightsvARB (GLint size, const GLshort *weights); +GLAPI void APIENTRY glWeightivARB (GLint size, const GLint *weights); +GLAPI void APIENTRY glWeightfvARB (GLint size, const GLfloat *weights); +GLAPI void APIENTRY glWeightdvARB (GLint size, const GLdouble *weights); +GLAPI void APIENTRY glWeightubvARB (GLint size, const GLubyte *weights); +GLAPI void APIENTRY glWeightusvARB (GLint size, const GLushort *weights); +GLAPI void APIENTRY glWeightuivARB (GLint size, const GLuint *weights); +GLAPI void APIENTRY glWeightPointerARB (GLint size, GLenum type, GLsizei stride, const GLvoid *pointer); +GLAPI void APIENTRY glVertexBlendARB (GLint count); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLWEIGHTBVARBPROC) (GLint size, const GLbyte *weights); +typedef void (APIENTRYP PFNGLWEIGHTSVARBPROC) (GLint size, const GLshort *weights); +typedef void (APIENTRYP PFNGLWEIGHTIVARBPROC) (GLint size, const GLint *weights); +typedef void (APIENTRYP PFNGLWEIGHTFVARBPROC) (GLint size, const GLfloat *weights); +typedef void (APIENTRYP PFNGLWEIGHTDVARBPROC) (GLint size, const GLdouble *weights); +typedef void (APIENTRYP PFNGLWEIGHTUBVARBPROC) (GLint size, const GLubyte *weights); +typedef void (APIENTRYP PFNGLWEIGHTUSVARBPROC) (GLint size, const GLushort *weights); +typedef void (APIENTRYP PFNGLWEIGHTUIVARBPROC) (GLint size, const GLuint *weights); +typedef void (APIENTRYP PFNGLWEIGHTPOINTERARBPROC) (GLint size, GLenum type, GLsizei stride, const GLvoid *pointer); +typedef void (APIENTRYP PFNGLVERTEXBLENDARBPROC) (GLint count); +#endif + +#ifndef GL_ARB_matrix_palette +#define GL_ARB_matrix_palette 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glCurrentPaletteMatrixARB (GLint index); +GLAPI void APIENTRY glMatrixIndexubvARB (GLint size, const GLubyte *indices); +GLAPI void APIENTRY glMatrixIndexusvARB (GLint size, const GLushort *indices); +GLAPI void APIENTRY glMatrixIndexuivARB (GLint size, const GLuint *indices); +GLAPI void APIENTRY glMatrixIndexPointerARB (GLint size, GLenum type, GLsizei stride, const GLvoid *pointer); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLCURRENTPALETTEMATRIXARBPROC) (GLint index); +typedef void (APIENTRYP PFNGLMATRIXINDEXUBVARBPROC) (GLint size, const GLubyte *indices); +typedef void (APIENTRYP PFNGLMATRIXINDEXUSVARBPROC) (GLint size, const GLushort *indices); +typedef void (APIENTRYP PFNGLMATRIXINDEXUIVARBPROC) (GLint size, const GLuint *indices); +typedef void (APIENTRYP PFNGLMATRIXINDEXPOINTERARBPROC) (GLint size, GLenum type, GLsizei stride, const GLvoid *pointer); +#endif + +#ifndef GL_ARB_texture_env_combine +#define GL_ARB_texture_env_combine 1 +#endif + +#ifndef GL_ARB_texture_env_crossbar +#define GL_ARB_texture_env_crossbar 1 +#endif + +#ifndef GL_ARB_texture_env_dot3 +#define GL_ARB_texture_env_dot3 1 +#endif + +#ifndef GL_ARB_texture_mirrored_repeat +#define GL_ARB_texture_mirrored_repeat 1 +#endif + +#ifndef GL_ARB_depth_texture +#define GL_ARB_depth_texture 1 +#endif + +#ifndef GL_ARB_shadow +#define GL_ARB_shadow 1 +#endif + +#ifndef GL_ARB_shadow_ambient +#define GL_ARB_shadow_ambient 1 +#endif + +#ifndef GL_ARB_window_pos +#define GL_ARB_window_pos 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glWindowPos2dARB (GLdouble x, GLdouble y); +GLAPI void APIENTRY glWindowPos2dvARB (const GLdouble *v); +GLAPI void APIENTRY glWindowPos2fARB (GLfloat x, GLfloat y); +GLAPI void APIENTRY glWindowPos2fvARB (const GLfloat *v); +GLAPI void APIENTRY glWindowPos2iARB (GLint x, GLint y); +GLAPI void APIENTRY glWindowPos2ivARB (const GLint *v); +GLAPI void APIENTRY glWindowPos2sARB (GLshort x, GLshort y); +GLAPI void APIENTRY glWindowPos2svARB (const GLshort *v); +GLAPI void APIENTRY glWindowPos3dARB (GLdouble x, GLdouble y, GLdouble z); +GLAPI void APIENTRY glWindowPos3dvARB (const GLdouble *v); +GLAPI void APIENTRY glWindowPos3fARB (GLfloat x, GLfloat y, GLfloat z); +GLAPI void APIENTRY glWindowPos3fvARB (const GLfloat *v); +GLAPI void APIENTRY glWindowPos3iARB (GLint x, GLint y, GLint z); +GLAPI void APIENTRY glWindowPos3ivARB (const GLint *v); +GLAPI void APIENTRY glWindowPos3sARB (GLshort x, GLshort y, GLshort z); +GLAPI void APIENTRY glWindowPos3svARB (const GLshort *v); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLWINDOWPOS2DARBPROC) (GLdouble x, GLdouble y); +typedef void (APIENTRYP PFNGLWINDOWPOS2DVARBPROC) (const GLdouble *v); +typedef void (APIENTRYP PFNGLWINDOWPOS2FARBPROC) (GLfloat x, GLfloat y); +typedef void (APIENTRYP PFNGLWINDOWPOS2FVARBPROC) (const GLfloat *v); +typedef void (APIENTRYP PFNGLWINDOWPOS2IARBPROC) (GLint x, GLint y); +typedef void (APIENTRYP PFNGLWINDOWPOS2IVARBPROC) (const GLint *v); +typedef void (APIENTRYP PFNGLWINDOWPOS2SARBPROC) (GLshort x, GLshort y); +typedef void (APIENTRYP PFNGLWINDOWPOS2SVARBPROC) (const GLshort *v); +typedef void (APIENTRYP PFNGLWINDOWPOS3DARBPROC) (GLdouble x, GLdouble y, GLdouble z); +typedef void (APIENTRYP PFNGLWINDOWPOS3DVARBPROC) (const GLdouble *v); +typedef void (APIENTRYP PFNGLWINDOWPOS3FARBPROC) (GLfloat x, GLfloat y, GLfloat z); +typedef void (APIENTRYP PFNGLWINDOWPOS3FVARBPROC) (const GLfloat *v); +typedef void (APIENTRYP PFNGLWINDOWPOS3IARBPROC) (GLint x, GLint y, GLint z); +typedef void (APIENTRYP PFNGLWINDOWPOS3IVARBPROC) (const GLint *v); +typedef void (APIENTRYP PFNGLWINDOWPOS3SARBPROC) (GLshort x, GLshort y, GLshort z); +typedef void (APIENTRYP PFNGLWINDOWPOS3SVARBPROC) (const GLshort *v); +#endif + +#ifndef GL_ARB_vertex_program +#define GL_ARB_vertex_program 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glVertexAttrib1dARB (GLuint index, GLdouble x); +GLAPI void APIENTRY glVertexAttrib1dvARB (GLuint index, const GLdouble *v); +GLAPI void APIENTRY glVertexAttrib1fARB (GLuint index, GLfloat x); +GLAPI void APIENTRY glVertexAttrib1fvARB (GLuint index, const GLfloat *v); +GLAPI void APIENTRY glVertexAttrib1sARB (GLuint index, GLshort x); +GLAPI void APIENTRY glVertexAttrib1svARB (GLuint index, const GLshort *v); +GLAPI void APIENTRY glVertexAttrib2dARB (GLuint index, GLdouble x, GLdouble y); +GLAPI void APIENTRY glVertexAttrib2dvARB (GLuint index, const GLdouble *v); +GLAPI void APIENTRY glVertexAttrib2fARB (GLuint index, GLfloat x, GLfloat y); +GLAPI void APIENTRY glVertexAttrib2fvARB (GLuint index, const GLfloat *v); +GLAPI void APIENTRY glVertexAttrib2sARB (GLuint index, GLshort x, GLshort y); +GLAPI void APIENTRY glVertexAttrib2svARB (GLuint index, const GLshort *v); +GLAPI void APIENTRY glVertexAttrib3dARB (GLuint index, GLdouble x, GLdouble y, GLdouble z); +GLAPI void APIENTRY glVertexAttrib3dvARB (GLuint index, const GLdouble *v); +GLAPI void APIENTRY glVertexAttrib3fARB (GLuint index, GLfloat x, GLfloat y, GLfloat z); +GLAPI void APIENTRY glVertexAttrib3fvARB (GLuint index, const GLfloat *v); +GLAPI void APIENTRY glVertexAttrib3sARB (GLuint index, GLshort x, GLshort y, GLshort z); +GLAPI void APIENTRY glVertexAttrib3svARB (GLuint index, const GLshort *v); +GLAPI void APIENTRY glVertexAttrib4NbvARB (GLuint index, const GLbyte *v); +GLAPI void APIENTRY glVertexAttrib4NivARB (GLuint index, const GLint *v); +GLAPI void APIENTRY glVertexAttrib4NsvARB (GLuint index, const GLshort *v); +GLAPI void APIENTRY glVertexAttrib4NubARB (GLuint index, GLubyte x, GLubyte y, GLubyte z, GLubyte w); +GLAPI void APIENTRY glVertexAttrib4NubvARB (GLuint index, const GLubyte *v); +GLAPI void APIENTRY glVertexAttrib4NuivARB (GLuint index, const GLuint *v); +GLAPI void APIENTRY glVertexAttrib4NusvARB (GLuint index, const GLushort *v); +GLAPI void APIENTRY glVertexAttrib4bvARB (GLuint index, const GLbyte *v); +GLAPI void APIENTRY glVertexAttrib4dARB (GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w); +GLAPI void APIENTRY glVertexAttrib4dvARB (GLuint index, const GLdouble *v); +GLAPI void APIENTRY glVertexAttrib4fARB (GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w); +GLAPI void APIENTRY glVertexAttrib4fvARB (GLuint index, const GLfloat *v); +GLAPI void APIENTRY glVertexAttrib4ivARB (GLuint index, const GLint *v); +GLAPI void APIENTRY glVertexAttrib4sARB (GLuint index, GLshort x, GLshort y, GLshort z, GLshort w); +GLAPI void APIENTRY glVertexAttrib4svARB (GLuint index, const GLshort *v); +GLAPI void APIENTRY glVertexAttrib4ubvARB (GLuint index, const GLubyte *v); +GLAPI void APIENTRY glVertexAttrib4uivARB (GLuint index, const GLuint *v); +GLAPI void APIENTRY glVertexAttrib4usvARB (GLuint index, const GLushort *v); +GLAPI void APIENTRY glVertexAttribPointerARB (GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const GLvoid *pointer); +GLAPI void APIENTRY glEnableVertexAttribArrayARB (GLuint index); +GLAPI void APIENTRY glDisableVertexAttribArrayARB (GLuint index); +GLAPI void APIENTRY glProgramStringARB (GLenum target, GLenum format, GLsizei len, const GLvoid *string); +GLAPI void APIENTRY glBindProgramARB (GLenum target, GLuint program); +GLAPI void APIENTRY glDeleteProgramsARB (GLsizei n, const GLuint *programs); +GLAPI void APIENTRY glGenProgramsARB (GLsizei n, GLuint *programs); +GLAPI void APIENTRY glProgramEnvParameter4dARB (GLenum target, GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w); +GLAPI void APIENTRY glProgramEnvParameter4dvARB (GLenum target, GLuint index, const GLdouble *params); +GLAPI void APIENTRY glProgramEnvParameter4fARB (GLenum target, GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w); +GLAPI void APIENTRY glProgramEnvParameter4fvARB (GLenum target, GLuint index, const GLfloat *params); +GLAPI void APIENTRY glProgramLocalParameter4dARB (GLenum target, GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w); +GLAPI void APIENTRY glProgramLocalParameter4dvARB (GLenum target, GLuint index, const GLdouble *params); +GLAPI void APIENTRY glProgramLocalParameter4fARB (GLenum target, GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w); +GLAPI void APIENTRY glProgramLocalParameter4fvARB (GLenum target, GLuint index, const GLfloat *params); +GLAPI void APIENTRY glGetProgramEnvParameterdvARB (GLenum target, GLuint index, GLdouble *params); +GLAPI void APIENTRY glGetProgramEnvParameterfvARB (GLenum target, GLuint index, GLfloat *params); +GLAPI void APIENTRY glGetProgramLocalParameterdvARB (GLenum target, GLuint index, GLdouble *params); +GLAPI void APIENTRY glGetProgramLocalParameterfvARB (GLenum target, GLuint index, GLfloat *params); +GLAPI void APIENTRY glGetProgramivARB (GLenum target, GLenum pname, GLint *params); +GLAPI void APIENTRY glGetProgramStringARB (GLenum target, GLenum pname, GLvoid *string); +GLAPI void APIENTRY glGetVertexAttribdvARB (GLuint index, GLenum pname, GLdouble *params); +GLAPI void APIENTRY glGetVertexAttribfvARB (GLuint index, GLenum pname, GLfloat *params); +GLAPI void APIENTRY glGetVertexAttribivARB (GLuint index, GLenum pname, GLint *params); +GLAPI void APIENTRY glGetVertexAttribPointervARB (GLuint index, GLenum pname, GLvoid* *pointer); +GLAPI GLboolean APIENTRY glIsProgramARB (GLuint program); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLVERTEXATTRIB1DARBPROC) (GLuint index, GLdouble x); +typedef void (APIENTRYP PFNGLVERTEXATTRIB1DVARBPROC) (GLuint index, const GLdouble *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIB1FARBPROC) (GLuint index, GLfloat x); +typedef void (APIENTRYP PFNGLVERTEXATTRIB1FVARBPROC) (GLuint index, const GLfloat *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIB1SARBPROC) (GLuint index, GLshort x); +typedef void (APIENTRYP PFNGLVERTEXATTRIB1SVARBPROC) (GLuint index, const GLshort *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIB2DARBPROC) (GLuint index, GLdouble x, GLdouble y); +typedef void (APIENTRYP PFNGLVERTEXATTRIB2DVARBPROC) (GLuint index, const GLdouble *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIB2FARBPROC) (GLuint index, GLfloat x, GLfloat y); +typedef void (APIENTRYP PFNGLVERTEXATTRIB2FVARBPROC) (GLuint index, const GLfloat *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIB2SARBPROC) (GLuint index, GLshort x, GLshort y); +typedef void (APIENTRYP PFNGLVERTEXATTRIB2SVARBPROC) (GLuint index, const GLshort *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIB3DARBPROC) (GLuint index, GLdouble x, GLdouble y, GLdouble z); +typedef void (APIENTRYP PFNGLVERTEXATTRIB3DVARBPROC) (GLuint index, const GLdouble *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIB3FARBPROC) (GLuint index, GLfloat x, GLfloat y, GLfloat z); +typedef void (APIENTRYP PFNGLVERTEXATTRIB3FVARBPROC) (GLuint index, const GLfloat *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIB3SARBPROC) (GLuint index, GLshort x, GLshort y, GLshort z); +typedef void (APIENTRYP PFNGLVERTEXATTRIB3SVARBPROC) (GLuint index, const GLshort *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIB4NBVARBPROC) (GLuint index, const GLbyte *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIB4NIVARBPROC) (GLuint index, const GLint *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIB4NSVARBPROC) (GLuint index, const GLshort *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIB4NUBARBPROC) (GLuint index, GLubyte x, GLubyte y, GLubyte z, GLubyte w); +typedef void (APIENTRYP PFNGLVERTEXATTRIB4NUBVARBPROC) (GLuint index, const GLubyte *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIB4NUIVARBPROC) (GLuint index, const GLuint *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIB4NUSVARBPROC) (GLuint index, const GLushort *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIB4BVARBPROC) (GLuint index, const GLbyte *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIB4DARBPROC) (GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w); +typedef void (APIENTRYP PFNGLVERTEXATTRIB4DVARBPROC) (GLuint index, const GLdouble *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIB4FARBPROC) (GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w); +typedef void (APIENTRYP PFNGLVERTEXATTRIB4FVARBPROC) (GLuint index, const GLfloat *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIB4IVARBPROC) (GLuint index, const GLint *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIB4SARBPROC) (GLuint index, GLshort x, GLshort y, GLshort z, GLshort w); +typedef void (APIENTRYP PFNGLVERTEXATTRIB4SVARBPROC) (GLuint index, const GLshort *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIB4UBVARBPROC) (GLuint index, const GLubyte *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIB4UIVARBPROC) (GLuint index, const GLuint *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIB4USVARBPROC) (GLuint index, const GLushort *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIBPOINTERARBPROC) (GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const GLvoid *pointer); +typedef void (APIENTRYP PFNGLENABLEVERTEXATTRIBARRAYARBPROC) (GLuint index); +typedef void (APIENTRYP PFNGLDISABLEVERTEXATTRIBARRAYARBPROC) (GLuint index); +typedef void (APIENTRYP PFNGLPROGRAMSTRINGARBPROC) (GLenum target, GLenum format, GLsizei len, const GLvoid *string); +typedef void (APIENTRYP PFNGLBINDPROGRAMARBPROC) (GLenum target, GLuint program); +typedef void (APIENTRYP PFNGLDELETEPROGRAMSARBPROC) (GLsizei n, const GLuint *programs); +typedef void (APIENTRYP PFNGLGENPROGRAMSARBPROC) (GLsizei n, GLuint *programs); +typedef void (APIENTRYP PFNGLPROGRAMENVPARAMETER4DARBPROC) (GLenum target, GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w); +typedef void (APIENTRYP PFNGLPROGRAMENVPARAMETER4DVARBPROC) (GLenum target, GLuint index, const GLdouble *params); +typedef void (APIENTRYP PFNGLPROGRAMENVPARAMETER4FARBPROC) (GLenum target, GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w); +typedef void (APIENTRYP PFNGLPROGRAMENVPARAMETER4FVARBPROC) (GLenum target, GLuint index, const GLfloat *params); +typedef void (APIENTRYP PFNGLPROGRAMLOCALPARAMETER4DARBPROC) (GLenum target, GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w); +typedef void (APIENTRYP PFNGLPROGRAMLOCALPARAMETER4DVARBPROC) (GLenum target, GLuint index, const GLdouble *params); +typedef void (APIENTRYP PFNGLPROGRAMLOCALPARAMETER4FARBPROC) (GLenum target, GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w); +typedef void (APIENTRYP PFNGLPROGRAMLOCALPARAMETER4FVARBPROC) (GLenum target, GLuint index, const GLfloat *params); +typedef void (APIENTRYP PFNGLGETPROGRAMENVPARAMETERDVARBPROC) (GLenum target, GLuint index, GLdouble *params); +typedef void (APIENTRYP PFNGLGETPROGRAMENVPARAMETERFVARBPROC) (GLenum target, GLuint index, GLfloat *params); +typedef void (APIENTRYP PFNGLGETPROGRAMLOCALPARAMETERDVARBPROC) (GLenum target, GLuint index, GLdouble *params); +typedef void (APIENTRYP PFNGLGETPROGRAMLOCALPARAMETERFVARBPROC) (GLenum target, GLuint index, GLfloat *params); +typedef void (APIENTRYP PFNGLGETPROGRAMIVARBPROC) (GLenum target, GLenum pname, GLint *params); +typedef void (APIENTRYP PFNGLGETPROGRAMSTRINGARBPROC) (GLenum target, GLenum pname, GLvoid *string); +typedef void (APIENTRYP PFNGLGETVERTEXATTRIBDVARBPROC) (GLuint index, GLenum pname, GLdouble *params); +typedef void (APIENTRYP PFNGLGETVERTEXATTRIBFVARBPROC) (GLuint index, GLenum pname, GLfloat *params); +typedef void (APIENTRYP PFNGLGETVERTEXATTRIBIVARBPROC) (GLuint index, GLenum pname, GLint *params); +typedef void (APIENTRYP PFNGLGETVERTEXATTRIBPOINTERVARBPROC) (GLuint index, GLenum pname, GLvoid* *pointer); +typedef GLboolean (APIENTRYP PFNGLISPROGRAMARBPROC) (GLuint program); +#endif + +#ifndef GL_ARB_fragment_program +#define GL_ARB_fragment_program 1 +/* All ARB_fragment_program entry points are shared with ARB_vertex_program. */ +#endif + +#ifndef GL_ARB_vertex_buffer_object +#define GL_ARB_vertex_buffer_object 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glBindBufferARB (GLenum target, GLuint buffer); +GLAPI void APIENTRY glDeleteBuffersARB (GLsizei n, const GLuint *buffers); +GLAPI void APIENTRY glGenBuffersARB (GLsizei n, GLuint *buffers); +GLAPI GLboolean APIENTRY glIsBufferARB (GLuint buffer); +GLAPI void APIENTRY glBufferDataARB (GLenum target, GLsizeiptrARB size, const GLvoid *data, GLenum usage); +GLAPI void APIENTRY glBufferSubDataARB (GLenum target, GLintptrARB offset, GLsizeiptrARB size, const GLvoid *data); +GLAPI void APIENTRY glGetBufferSubDataARB (GLenum target, GLintptrARB offset, GLsizeiptrARB size, GLvoid *data); +GLAPI GLvoid* APIENTRY glMapBufferARB (GLenum target, GLenum access); +GLAPI GLboolean APIENTRY glUnmapBufferARB (GLenum target); +GLAPI void APIENTRY glGetBufferParameterivARB (GLenum target, GLenum pname, GLint *params); +GLAPI void APIENTRY glGetBufferPointervARB (GLenum target, GLenum pname, GLvoid* *params); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLBINDBUFFERARBPROC) (GLenum target, GLuint buffer); +typedef void (APIENTRYP PFNGLDELETEBUFFERSARBPROC) (GLsizei n, const GLuint *buffers); +typedef void (APIENTRYP PFNGLGENBUFFERSARBPROC) (GLsizei n, GLuint *buffers); +typedef GLboolean (APIENTRYP PFNGLISBUFFERARBPROC) (GLuint buffer); +typedef void (APIENTRYP PFNGLBUFFERDATAARBPROC) (GLenum target, GLsizeiptrARB size, const GLvoid *data, GLenum usage); +typedef void (APIENTRYP PFNGLBUFFERSUBDATAARBPROC) (GLenum target, GLintptrARB offset, GLsizeiptrARB size, const GLvoid *data); +typedef void (APIENTRYP PFNGLGETBUFFERSUBDATAARBPROC) (GLenum target, GLintptrARB offset, GLsizeiptrARB size, GLvoid *data); +typedef GLvoid* (APIENTRYP PFNGLMAPBUFFERARBPROC) (GLenum target, GLenum access); +typedef GLboolean (APIENTRYP PFNGLUNMAPBUFFERARBPROC) (GLenum target); +typedef void (APIENTRYP PFNGLGETBUFFERPARAMETERIVARBPROC) (GLenum target, GLenum pname, GLint *params); +typedef void (APIENTRYP PFNGLGETBUFFERPOINTERVARBPROC) (GLenum target, GLenum pname, GLvoid* *params); +#endif + +#ifndef GL_ARB_occlusion_query +#define GL_ARB_occlusion_query 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glGenQueriesARB (GLsizei n, GLuint *ids); +GLAPI void APIENTRY glDeleteQueriesARB (GLsizei n, const GLuint *ids); +GLAPI GLboolean APIENTRY glIsQueryARB (GLuint id); +GLAPI void APIENTRY glBeginQueryARB (GLenum target, GLuint id); +GLAPI void APIENTRY glEndQueryARB (GLenum target); +GLAPI void APIENTRY glGetQueryivARB (GLenum target, GLenum pname, GLint *params); +GLAPI void APIENTRY glGetQueryObjectivARB (GLuint id, GLenum pname, GLint *params); +GLAPI void APIENTRY glGetQueryObjectuivARB (GLuint id, GLenum pname, GLuint *params); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLGENQUERIESARBPROC) (GLsizei n, GLuint *ids); +typedef void (APIENTRYP PFNGLDELETEQUERIESARBPROC) (GLsizei n, const GLuint *ids); +typedef GLboolean (APIENTRYP PFNGLISQUERYARBPROC) (GLuint id); +typedef void (APIENTRYP PFNGLBEGINQUERYARBPROC) (GLenum target, GLuint id); +typedef void (APIENTRYP PFNGLENDQUERYARBPROC) (GLenum target); +typedef void (APIENTRYP PFNGLGETQUERYIVARBPROC) (GLenum target, GLenum pname, GLint *params); +typedef void (APIENTRYP PFNGLGETQUERYOBJECTIVARBPROC) (GLuint id, GLenum pname, GLint *params); +typedef void (APIENTRYP PFNGLGETQUERYOBJECTUIVARBPROC) (GLuint id, GLenum pname, GLuint *params); +#endif + +#ifndef GL_ARB_shader_objects +#define GL_ARB_shader_objects 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glDeleteObjectARB (GLhandleARB obj); +GLAPI GLhandleARB APIENTRY glGetHandleARB (GLenum pname); +GLAPI void APIENTRY glDetachObjectARB (GLhandleARB containerObj, GLhandleARB attachedObj); +GLAPI GLhandleARB APIENTRY glCreateShaderObjectARB (GLenum shaderType); +GLAPI void APIENTRY glShaderSourceARB (GLhandleARB shaderObj, GLsizei count, const GLcharARB* *string, const GLint *length); +GLAPI void APIENTRY glCompileShaderARB (GLhandleARB shaderObj); +GLAPI GLhandleARB APIENTRY glCreateProgramObjectARB (void); +GLAPI void APIENTRY glAttachObjectARB (GLhandleARB containerObj, GLhandleARB obj); +GLAPI void APIENTRY glLinkProgramARB (GLhandleARB programObj); +GLAPI void APIENTRY glUseProgramObjectARB (GLhandleARB programObj); +GLAPI void APIENTRY glValidateProgramARB (GLhandleARB programObj); +GLAPI void APIENTRY glUniform1fARB (GLint location, GLfloat v0); +GLAPI void APIENTRY glUniform2fARB (GLint location, GLfloat v0, GLfloat v1); +GLAPI void APIENTRY glUniform3fARB (GLint location, GLfloat v0, GLfloat v1, GLfloat v2); +GLAPI void APIENTRY glUniform4fARB (GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3); +GLAPI void APIENTRY glUniform1iARB (GLint location, GLint v0); +GLAPI void APIENTRY glUniform2iARB (GLint location, GLint v0, GLint v1); +GLAPI void APIENTRY glUniform3iARB (GLint location, GLint v0, GLint v1, GLint v2); +GLAPI void APIENTRY glUniform4iARB (GLint location, GLint v0, GLint v1, GLint v2, GLint v3); +GLAPI void APIENTRY glUniform1fvARB (GLint location, GLsizei count, const GLfloat *value); +GLAPI void APIENTRY glUniform2fvARB (GLint location, GLsizei count, const GLfloat *value); +GLAPI void APIENTRY glUniform3fvARB (GLint location, GLsizei count, const GLfloat *value); +GLAPI void APIENTRY glUniform4fvARB (GLint location, GLsizei count, const GLfloat *value); +GLAPI void APIENTRY glUniform1ivARB (GLint location, GLsizei count, const GLint *value); +GLAPI void APIENTRY glUniform2ivARB (GLint location, GLsizei count, const GLint *value); +GLAPI void APIENTRY glUniform3ivARB (GLint location, GLsizei count, const GLint *value); +GLAPI void APIENTRY glUniform4ivARB (GLint location, GLsizei count, const GLint *value); +GLAPI void APIENTRY glUniformMatrix2fvARB (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +GLAPI void APIENTRY glUniformMatrix3fvARB (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +GLAPI void APIENTRY glUniformMatrix4fvARB (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +GLAPI void APIENTRY glGetObjectParameterfvARB (GLhandleARB obj, GLenum pname, GLfloat *params); +GLAPI void APIENTRY glGetObjectParameterivARB (GLhandleARB obj, GLenum pname, GLint *params); +GLAPI void APIENTRY glGetInfoLogARB (GLhandleARB obj, GLsizei maxLength, GLsizei *length, GLcharARB *infoLog); +GLAPI void APIENTRY glGetAttachedObjectsARB (GLhandleARB containerObj, GLsizei maxCount, GLsizei *count, GLhandleARB *obj); +GLAPI GLint APIENTRY glGetUniformLocationARB (GLhandleARB programObj, const GLcharARB *name); +GLAPI void APIENTRY glGetActiveUniformARB (GLhandleARB programObj, GLuint index, GLsizei maxLength, GLsizei *length, GLint *size, GLenum *type, GLcharARB *name); +GLAPI void APIENTRY glGetUniformfvARB (GLhandleARB programObj, GLint location, GLfloat *params); +GLAPI void APIENTRY glGetUniformivARB (GLhandleARB programObj, GLint location, GLint *params); +GLAPI void APIENTRY glGetShaderSourceARB (GLhandleARB obj, GLsizei maxLength, GLsizei *length, GLcharARB *source); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLDELETEOBJECTARBPROC) (GLhandleARB obj); +typedef GLhandleARB (APIENTRYP PFNGLGETHANDLEARBPROC) (GLenum pname); +typedef void (APIENTRYP PFNGLDETACHOBJECTARBPROC) (GLhandleARB containerObj, GLhandleARB attachedObj); +typedef GLhandleARB (APIENTRYP PFNGLCREATESHADEROBJECTARBPROC) (GLenum shaderType); +typedef void (APIENTRYP PFNGLSHADERSOURCEARBPROC) (GLhandleARB shaderObj, GLsizei count, const GLcharARB* *string, const GLint *length); +typedef void (APIENTRYP PFNGLCOMPILESHADERARBPROC) (GLhandleARB shaderObj); +typedef GLhandleARB (APIENTRYP PFNGLCREATEPROGRAMOBJECTARBPROC) (void); +typedef void (APIENTRYP PFNGLATTACHOBJECTARBPROC) (GLhandleARB containerObj, GLhandleARB obj); +typedef void (APIENTRYP PFNGLLINKPROGRAMARBPROC) (GLhandleARB programObj); +typedef void (APIENTRYP PFNGLUSEPROGRAMOBJECTARBPROC) (GLhandleARB programObj); +typedef void (APIENTRYP PFNGLVALIDATEPROGRAMARBPROC) (GLhandleARB programObj); +typedef void (APIENTRYP PFNGLUNIFORM1FARBPROC) (GLint location, GLfloat v0); +typedef void (APIENTRYP PFNGLUNIFORM2FARBPROC) (GLint location, GLfloat v0, GLfloat v1); +typedef void (APIENTRYP PFNGLUNIFORM3FARBPROC) (GLint location, GLfloat v0, GLfloat v1, GLfloat v2); +typedef void (APIENTRYP PFNGLUNIFORM4FARBPROC) (GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3); +typedef void (APIENTRYP PFNGLUNIFORM1IARBPROC) (GLint location, GLint v0); +typedef void (APIENTRYP PFNGLUNIFORM2IARBPROC) (GLint location, GLint v0, GLint v1); +typedef void (APIENTRYP PFNGLUNIFORM3IARBPROC) (GLint location, GLint v0, GLint v1, GLint v2); +typedef void (APIENTRYP PFNGLUNIFORM4IARBPROC) (GLint location, GLint v0, GLint v1, GLint v2, GLint v3); +typedef void (APIENTRYP PFNGLUNIFORM1FVARBPROC) (GLint location, GLsizei count, const GLfloat *value); +typedef void (APIENTRYP PFNGLUNIFORM2FVARBPROC) (GLint location, GLsizei count, const GLfloat *value); +typedef void (APIENTRYP PFNGLUNIFORM3FVARBPROC) (GLint location, GLsizei count, const GLfloat *value); +typedef void (APIENTRYP PFNGLUNIFORM4FVARBPROC) (GLint location, GLsizei count, const GLfloat *value); +typedef void (APIENTRYP PFNGLUNIFORM1IVARBPROC) (GLint location, GLsizei count, const GLint *value); +typedef void (APIENTRYP PFNGLUNIFORM2IVARBPROC) (GLint location, GLsizei count, const GLint *value); +typedef void (APIENTRYP PFNGLUNIFORM3IVARBPROC) (GLint location, GLsizei count, const GLint *value); +typedef void (APIENTRYP PFNGLUNIFORM4IVARBPROC) (GLint location, GLsizei count, const GLint *value); +typedef void (APIENTRYP PFNGLUNIFORMMATRIX2FVARBPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +typedef void (APIENTRYP PFNGLUNIFORMMATRIX3FVARBPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +typedef void (APIENTRYP PFNGLUNIFORMMATRIX4FVARBPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +typedef void (APIENTRYP PFNGLGETOBJECTPARAMETERFVARBPROC) (GLhandleARB obj, GLenum pname, GLfloat *params); +typedef void (APIENTRYP PFNGLGETOBJECTPARAMETERIVARBPROC) (GLhandleARB obj, GLenum pname, GLint *params); +typedef void (APIENTRYP PFNGLGETINFOLOGARBPROC) (GLhandleARB obj, GLsizei maxLength, GLsizei *length, GLcharARB *infoLog); +typedef void (APIENTRYP PFNGLGETATTACHEDOBJECTSARBPROC) (GLhandleARB containerObj, GLsizei maxCount, GLsizei *count, GLhandleARB *obj); +typedef GLint (APIENTRYP PFNGLGETUNIFORMLOCATIONARBPROC) (GLhandleARB programObj, const GLcharARB *name); +typedef void (APIENTRYP PFNGLGETACTIVEUNIFORMARBPROC) (GLhandleARB programObj, GLuint index, GLsizei maxLength, GLsizei *length, GLint *size, GLenum *type, GLcharARB *name); +typedef void (APIENTRYP PFNGLGETUNIFORMFVARBPROC) (GLhandleARB programObj, GLint location, GLfloat *params); +typedef void (APIENTRYP PFNGLGETUNIFORMIVARBPROC) (GLhandleARB programObj, GLint location, GLint *params); +typedef void (APIENTRYP PFNGLGETSHADERSOURCEARBPROC) (GLhandleARB obj, GLsizei maxLength, GLsizei *length, GLcharARB *source); +#endif + +#ifndef GL_ARB_vertex_shader +#define GL_ARB_vertex_shader 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glBindAttribLocationARB (GLhandleARB programObj, GLuint index, const GLcharARB *name); +GLAPI void APIENTRY glGetActiveAttribARB (GLhandleARB programObj, GLuint index, GLsizei maxLength, GLsizei *length, GLint *size, GLenum *type, GLcharARB *name); +GLAPI GLint APIENTRY glGetAttribLocationARB (GLhandleARB programObj, const GLcharARB *name); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLBINDATTRIBLOCATIONARBPROC) (GLhandleARB programObj, GLuint index, const GLcharARB *name); +typedef void (APIENTRYP PFNGLGETACTIVEATTRIBARBPROC) (GLhandleARB programObj, GLuint index, GLsizei maxLength, GLsizei *length, GLint *size, GLenum *type, GLcharARB *name); +typedef GLint (APIENTRYP PFNGLGETATTRIBLOCATIONARBPROC) (GLhandleARB programObj, const GLcharARB *name); +#endif + +#ifndef GL_ARB_fragment_shader +#define GL_ARB_fragment_shader 1 +#endif + +#ifndef GL_ARB_shading_language_100 +#define GL_ARB_shading_language_100 1 +#endif + +#ifndef GL_ARB_texture_non_power_of_two +#define GL_ARB_texture_non_power_of_two 1 +#endif + +#ifndef GL_ARB_point_sprite +#define GL_ARB_point_sprite 1 +#endif + +#ifndef GL_ARB_fragment_program_shadow +#define GL_ARB_fragment_program_shadow 1 +#endif + +#ifndef GL_ARB_draw_buffers +#define GL_ARB_draw_buffers 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glDrawBuffersARB (GLsizei n, const GLenum *bufs); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLDRAWBUFFERSARBPROC) (GLsizei n, const GLenum *bufs); +#endif + +#ifndef GL_ARB_texture_rectangle +#define GL_ARB_texture_rectangle 1 +#endif + +#ifndef GL_ARB_color_buffer_float +#define GL_ARB_color_buffer_float 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glClampColorARB (GLenum target, GLenum clamp); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLCLAMPCOLORARBPROC) (GLenum target, GLenum clamp); +#endif + +#ifndef GL_ARB_half_float_pixel +#define GL_ARB_half_float_pixel 1 +#endif + +#ifndef GL_ARB_texture_float +#define GL_ARB_texture_float 1 +#endif + +#ifndef GL_ARB_pixel_buffer_object +#define GL_ARB_pixel_buffer_object 1 +#endif + +#ifndef GL_ARB_depth_buffer_float +#define GL_ARB_depth_buffer_float 1 +#endif + +#ifndef GL_ARB_draw_instanced +#define GL_ARB_draw_instanced 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glDrawArraysInstancedARB (GLenum mode, GLint first, GLsizei count, GLsizei primcount); +GLAPI void APIENTRY glDrawElementsInstancedARB (GLenum mode, GLsizei count, GLenum type, const GLvoid *indices, GLsizei primcount); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLDRAWARRAYSINSTANCEDARBPROC) (GLenum mode, GLint first, GLsizei count, GLsizei primcount); +typedef void (APIENTRYP PFNGLDRAWELEMENTSINSTANCEDARBPROC) (GLenum mode, GLsizei count, GLenum type, const GLvoid *indices, GLsizei primcount); +#endif + +#ifndef GL_ARB_framebuffer_object +#define GL_ARB_framebuffer_object 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI GLboolean APIENTRY glIsRenderbuffer (GLuint renderbuffer); +GLAPI void APIENTRY glBindRenderbuffer (GLenum target, GLuint renderbuffer); +GLAPI void APIENTRY glDeleteRenderbuffers (GLsizei n, const GLuint *renderbuffers); +GLAPI void APIENTRY glGenRenderbuffers (GLsizei n, GLuint *renderbuffers); +GLAPI void APIENTRY glRenderbufferStorage (GLenum target, GLenum internalformat, GLsizei width, GLsizei height); +GLAPI void APIENTRY glGetRenderbufferParameteriv (GLenum target, GLenum pname, GLint *params); +GLAPI GLboolean APIENTRY glIsFramebuffer (GLuint framebuffer); +GLAPI void APIENTRY glBindFramebuffer (GLenum target, GLuint framebuffer); +GLAPI void APIENTRY glDeleteFramebuffers (GLsizei n, const GLuint *framebuffers); +GLAPI void APIENTRY glGenFramebuffers (GLsizei n, GLuint *framebuffers); +GLAPI GLenum APIENTRY glCheckFramebufferStatus (GLenum target); +GLAPI void APIENTRY glFramebufferTexture1D (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level); +GLAPI void APIENTRY glFramebufferTexture2D (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level); +GLAPI void APIENTRY glFramebufferTexture3D (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLint zoffset); +GLAPI void APIENTRY glFramebufferRenderbuffer (GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer); +GLAPI void APIENTRY glGetFramebufferAttachmentParameteriv (GLenum target, GLenum attachment, GLenum pname, GLint *params); +GLAPI void APIENTRY glGenerateMipmap (GLenum target); +GLAPI void APIENTRY glBlitFramebuffer (GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter); +GLAPI void APIENTRY glRenderbufferStorageMultisample (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height); +GLAPI void APIENTRY glFramebufferTextureLayer (GLenum target, GLenum attachment, GLuint texture, GLint level, GLint layer); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef GLboolean (APIENTRYP PFNGLISRENDERBUFFERPROC) (GLuint renderbuffer); +typedef void (APIENTRYP PFNGLBINDRENDERBUFFERPROC) (GLenum target, GLuint renderbuffer); +typedef void (APIENTRYP PFNGLDELETERENDERBUFFERSPROC) (GLsizei n, const GLuint *renderbuffers); +typedef void (APIENTRYP PFNGLGENRENDERBUFFERSPROC) (GLsizei n, GLuint *renderbuffers); +typedef void (APIENTRYP PFNGLRENDERBUFFERSTORAGEPROC) (GLenum target, GLenum internalformat, GLsizei width, GLsizei height); +typedef void (APIENTRYP PFNGLGETRENDERBUFFERPARAMETERIVPROC) (GLenum target, GLenum pname, GLint *params); +typedef GLboolean (APIENTRYP PFNGLISFRAMEBUFFERPROC) (GLuint framebuffer); +typedef void (APIENTRYP PFNGLBINDFRAMEBUFFERPROC) (GLenum target, GLuint framebuffer); +typedef void (APIENTRYP PFNGLDELETEFRAMEBUFFERSPROC) (GLsizei n, const GLuint *framebuffers); +typedef void (APIENTRYP PFNGLGENFRAMEBUFFERSPROC) (GLsizei n, GLuint *framebuffers); +typedef GLenum (APIENTRYP PFNGLCHECKFRAMEBUFFERSTATUSPROC) (GLenum target); +typedef void (APIENTRYP PFNGLFRAMEBUFFERTEXTURE1DPROC) (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level); +typedef void (APIENTRYP PFNGLFRAMEBUFFERTEXTURE2DPROC) (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level); +typedef void (APIENTRYP PFNGLFRAMEBUFFERTEXTURE3DPROC) (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLint zoffset); +typedef void (APIENTRYP PFNGLFRAMEBUFFERRENDERBUFFERPROC) (GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer); +typedef void (APIENTRYP PFNGLGETFRAMEBUFFERATTACHMENTPARAMETERIVPROC) (GLenum target, GLenum attachment, GLenum pname, GLint *params); +typedef void (APIENTRYP PFNGLGENERATEMIPMAPPROC) (GLenum target); +typedef void (APIENTRYP PFNGLBLITFRAMEBUFFERPROC) (GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter); +typedef void (APIENTRYP PFNGLRENDERBUFFERSTORAGEMULTISAMPLEPROC) (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height); +typedef void (APIENTRYP PFNGLFRAMEBUFFERTEXTURELAYERPROC) (GLenum target, GLenum attachment, GLuint texture, GLint level, GLint layer); +#endif + +#ifndef GL_ARB_framebuffer_sRGB +#define GL_ARB_framebuffer_sRGB 1 +#endif + +#ifndef GL_ARB_geometry_shader4 +#define GL_ARB_geometry_shader4 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glProgramParameteriARB (GLuint program, GLenum pname, GLint value); +GLAPI void APIENTRY glFramebufferTextureARB (GLenum target, GLenum attachment, GLuint texture, GLint level); +GLAPI void APIENTRY glFramebufferTextureLayerARB (GLenum target, GLenum attachment, GLuint texture, GLint level, GLint layer); +GLAPI void APIENTRY glFramebufferTextureFaceARB (GLenum target, GLenum attachment, GLuint texture, GLint level, GLenum face); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLPROGRAMPARAMETERIARBPROC) (GLuint program, GLenum pname, GLint value); +typedef void (APIENTRYP PFNGLFRAMEBUFFERTEXTUREARBPROC) (GLenum target, GLenum attachment, GLuint texture, GLint level); +typedef void (APIENTRYP PFNGLFRAMEBUFFERTEXTURELAYERARBPROC) (GLenum target, GLenum attachment, GLuint texture, GLint level, GLint layer); +typedef void (APIENTRYP PFNGLFRAMEBUFFERTEXTUREFACEARBPROC) (GLenum target, GLenum attachment, GLuint texture, GLint level, GLenum face); +#endif + +#ifndef GL_ARB_half_float_vertex +#define GL_ARB_half_float_vertex 1 +#endif + +#ifndef GL_ARB_instanced_arrays +#define GL_ARB_instanced_arrays 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glVertexAttribDivisorARB (GLuint index, GLuint divisor); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLVERTEXATTRIBDIVISORARBPROC) (GLuint index, GLuint divisor); +#endif + +#ifndef GL_ARB_map_buffer_range +#define GL_ARB_map_buffer_range 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI GLvoid* APIENTRY glMapBufferRange (GLenum target, GLintptr offset, GLsizeiptr length, GLbitfield access); +GLAPI void APIENTRY glFlushMappedBufferRange (GLenum target, GLintptr offset, GLsizeiptr length); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef GLvoid* (APIENTRYP PFNGLMAPBUFFERRANGEPROC) (GLenum target, GLintptr offset, GLsizeiptr length, GLbitfield access); +typedef void (APIENTRYP PFNGLFLUSHMAPPEDBUFFERRANGEPROC) (GLenum target, GLintptr offset, GLsizeiptr length); +#endif + +#ifndef GL_ARB_texture_buffer_object +#define GL_ARB_texture_buffer_object 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glTexBufferARB (GLenum target, GLenum internalformat, GLuint buffer); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLTEXBUFFERARBPROC) (GLenum target, GLenum internalformat, GLuint buffer); +#endif + +#ifndef GL_ARB_texture_compression_rgtc +#define GL_ARB_texture_compression_rgtc 1 +#endif + +#ifndef GL_ARB_texture_rg +#define GL_ARB_texture_rg 1 +#endif + +#ifndef GL_ARB_vertex_array_object +#define GL_ARB_vertex_array_object 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glBindVertexArray (GLuint array); +GLAPI void APIENTRY glDeleteVertexArrays (GLsizei n, const GLuint *arrays); +GLAPI void APIENTRY glGenVertexArrays (GLsizei n, GLuint *arrays); +GLAPI GLboolean APIENTRY glIsVertexArray (GLuint array); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLBINDVERTEXARRAYPROC) (GLuint array); +typedef void (APIENTRYP PFNGLDELETEVERTEXARRAYSPROC) (GLsizei n, const GLuint *arrays); +typedef void (APIENTRYP PFNGLGENVERTEXARRAYSPROC) (GLsizei n, GLuint *arrays); +typedef GLboolean (APIENTRYP PFNGLISVERTEXARRAYPROC) (GLuint array); +#endif + +#ifndef GL_ARB_uniform_buffer_object +#define GL_ARB_uniform_buffer_object 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glGetUniformIndices (GLuint program, GLsizei uniformCount, const GLchar* const *uniformNames, GLuint *uniformIndices); +GLAPI void APIENTRY glGetActiveUniformsiv (GLuint program, GLsizei uniformCount, const GLuint *uniformIndices, GLenum pname, GLint *params); +GLAPI void APIENTRY glGetActiveUniformName (GLuint program, GLuint uniformIndex, GLsizei bufSize, GLsizei *length, GLchar *uniformName); +GLAPI GLuint APIENTRY glGetUniformBlockIndex (GLuint program, const GLchar *uniformBlockName); +GLAPI void APIENTRY glGetActiveUniformBlockiv (GLuint program, GLuint uniformBlockIndex, GLenum pname, GLint *params); +GLAPI void APIENTRY glGetActiveUniformBlockName (GLuint program, GLuint uniformBlockIndex, GLsizei bufSize, GLsizei *length, GLchar *uniformBlockName); +GLAPI void APIENTRY glUniformBlockBinding (GLuint program, GLuint uniformBlockIndex, GLuint uniformBlockBinding); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLGETUNIFORMINDICESPROC) (GLuint program, GLsizei uniformCount, const GLchar* const *uniformNames, GLuint *uniformIndices); +typedef void (APIENTRYP PFNGLGETACTIVEUNIFORMSIVPROC) (GLuint program, GLsizei uniformCount, const GLuint *uniformIndices, GLenum pname, GLint *params); +typedef void (APIENTRYP PFNGLGETACTIVEUNIFORMNAMEPROC) (GLuint program, GLuint uniformIndex, GLsizei bufSize, GLsizei *length, GLchar *uniformName); +typedef GLuint (APIENTRYP PFNGLGETUNIFORMBLOCKINDEXPROC) (GLuint program, const GLchar *uniformBlockName); +typedef void (APIENTRYP PFNGLGETACTIVEUNIFORMBLOCKIVPROC) (GLuint program, GLuint uniformBlockIndex, GLenum pname, GLint *params); +typedef void (APIENTRYP PFNGLGETACTIVEUNIFORMBLOCKNAMEPROC) (GLuint program, GLuint uniformBlockIndex, GLsizei bufSize, GLsizei *length, GLchar *uniformBlockName); +typedef void (APIENTRYP PFNGLUNIFORMBLOCKBINDINGPROC) (GLuint program, GLuint uniformBlockIndex, GLuint uniformBlockBinding); +#endif + +#ifndef GL_ARB_compatibility +#define GL_ARB_compatibility 1 +#endif + +#ifndef GL_ARB_copy_buffer +#define GL_ARB_copy_buffer 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glCopyBufferSubData (GLenum readTarget, GLenum writeTarget, GLintptr readOffset, GLintptr writeOffset, GLsizeiptr size); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLCOPYBUFFERSUBDATAPROC) (GLenum readTarget, GLenum writeTarget, GLintptr readOffset, GLintptr writeOffset, GLsizeiptr size); +#endif + +#ifndef GL_ARB_shader_texture_lod +#define GL_ARB_shader_texture_lod 1 +#endif + +#ifndef GL_ARB_depth_clamp +#define GL_ARB_depth_clamp 1 +#endif + +#ifndef GL_ARB_draw_elements_base_vertex +#define GL_ARB_draw_elements_base_vertex 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glDrawElementsBaseVertex (GLenum mode, GLsizei count, GLenum type, const GLvoid *indices, GLint basevertex); +GLAPI void APIENTRY glDrawRangeElementsBaseVertex (GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const GLvoid *indices, GLint basevertex); +GLAPI void APIENTRY glDrawElementsInstancedBaseVertex (GLenum mode, GLsizei count, GLenum type, const GLvoid *indices, GLsizei instancecount, GLint basevertex); +GLAPI void APIENTRY glMultiDrawElementsBaseVertex (GLenum mode, const GLsizei *count, GLenum type, const GLvoid* const *indices, GLsizei drawcount, const GLint *basevertex); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLDRAWELEMENTSBASEVERTEXPROC) (GLenum mode, GLsizei count, GLenum type, const GLvoid *indices, GLint basevertex); +typedef void (APIENTRYP PFNGLDRAWRANGEELEMENTSBASEVERTEXPROC) (GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const GLvoid *indices, GLint basevertex); +typedef void (APIENTRYP PFNGLDRAWELEMENTSINSTANCEDBASEVERTEXPROC) (GLenum mode, GLsizei count, GLenum type, const GLvoid *indices, GLsizei instancecount, GLint basevertex); +typedef void (APIENTRYP PFNGLMULTIDRAWELEMENTSBASEVERTEXPROC) (GLenum mode, const GLsizei *count, GLenum type, const GLvoid* const *indices, GLsizei drawcount, const GLint *basevertex); +#endif + +#ifndef GL_ARB_fragment_coord_conventions +#define GL_ARB_fragment_coord_conventions 1 +#endif + +#ifndef GL_ARB_provoking_vertex +#define GL_ARB_provoking_vertex 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glProvokingVertex (GLenum mode); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLPROVOKINGVERTEXPROC) (GLenum mode); +#endif + +#ifndef GL_ARB_seamless_cube_map +#define GL_ARB_seamless_cube_map 1 +#endif + +#ifndef GL_ARB_sync +#define GL_ARB_sync 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI GLsync APIENTRY glFenceSync (GLenum condition, GLbitfield flags); +GLAPI GLboolean APIENTRY glIsSync (GLsync sync); +GLAPI void APIENTRY glDeleteSync (GLsync sync); +GLAPI GLenum APIENTRY glClientWaitSync (GLsync sync, GLbitfield flags, GLuint64 timeout); +GLAPI void APIENTRY glWaitSync (GLsync sync, GLbitfield flags, GLuint64 timeout); +GLAPI void APIENTRY glGetInteger64v (GLenum pname, GLint64 *params); +GLAPI void APIENTRY glGetSynciv (GLsync sync, GLenum pname, GLsizei bufSize, GLsizei *length, GLint *values); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef GLsync (APIENTRYP PFNGLFENCESYNCPROC) (GLenum condition, GLbitfield flags); +typedef GLboolean (APIENTRYP PFNGLISSYNCPROC) (GLsync sync); +typedef void (APIENTRYP PFNGLDELETESYNCPROC) (GLsync sync); +typedef GLenum (APIENTRYP PFNGLCLIENTWAITSYNCPROC) (GLsync sync, GLbitfield flags, GLuint64 timeout); +typedef void (APIENTRYP PFNGLWAITSYNCPROC) (GLsync sync, GLbitfield flags, GLuint64 timeout); +typedef void (APIENTRYP PFNGLGETINTEGER64VPROC) (GLenum pname, GLint64 *params); +typedef void (APIENTRYP PFNGLGETSYNCIVPROC) (GLsync sync, GLenum pname, GLsizei bufSize, GLsizei *length, GLint *values); +#endif + +#ifndef GL_ARB_texture_multisample +#define GL_ARB_texture_multisample 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glTexImage2DMultisample (GLenum target, GLsizei samples, GLint internalformat, GLsizei width, GLsizei height, GLboolean fixedsamplelocations); +GLAPI void APIENTRY glTexImage3DMultisample (GLenum target, GLsizei samples, GLint internalformat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedsamplelocations); +GLAPI void APIENTRY glGetMultisamplefv (GLenum pname, GLuint index, GLfloat *val); +GLAPI void APIENTRY glSampleMaski (GLuint index, GLbitfield mask); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLTEXIMAGE2DMULTISAMPLEPROC) (GLenum target, GLsizei samples, GLint internalformat, GLsizei width, GLsizei height, GLboolean fixedsamplelocations); +typedef void (APIENTRYP PFNGLTEXIMAGE3DMULTISAMPLEPROC) (GLenum target, GLsizei samples, GLint internalformat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedsamplelocations); +typedef void (APIENTRYP PFNGLGETMULTISAMPLEFVPROC) (GLenum pname, GLuint index, GLfloat *val); +typedef void (APIENTRYP PFNGLSAMPLEMASKIPROC) (GLuint index, GLbitfield mask); +#endif + +#ifndef GL_ARB_vertex_array_bgra +#define GL_ARB_vertex_array_bgra 1 +#endif + +#ifndef GL_ARB_draw_buffers_blend +#define GL_ARB_draw_buffers_blend 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glBlendEquationiARB (GLuint buf, GLenum mode); +GLAPI void APIENTRY glBlendEquationSeparateiARB (GLuint buf, GLenum modeRGB, GLenum modeAlpha); +GLAPI void APIENTRY glBlendFunciARB (GLuint buf, GLenum src, GLenum dst); +GLAPI void APIENTRY glBlendFuncSeparateiARB (GLuint buf, GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLBLENDEQUATIONIARBPROC) (GLuint buf, GLenum mode); +typedef void (APIENTRYP PFNGLBLENDEQUATIONSEPARATEIARBPROC) (GLuint buf, GLenum modeRGB, GLenum modeAlpha); +typedef void (APIENTRYP PFNGLBLENDFUNCIARBPROC) (GLuint buf, GLenum src, GLenum dst); +typedef void (APIENTRYP PFNGLBLENDFUNCSEPARATEIARBPROC) (GLuint buf, GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha); +#endif + +#ifndef GL_ARB_sample_shading +#define GL_ARB_sample_shading 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glMinSampleShadingARB (GLfloat value); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLMINSAMPLESHADINGARBPROC) (GLfloat value); +#endif + +#ifndef GL_ARB_texture_cube_map_array +#define GL_ARB_texture_cube_map_array 1 +#endif + +#ifndef GL_ARB_texture_gather +#define GL_ARB_texture_gather 1 +#endif + +#ifndef GL_ARB_texture_query_lod +#define GL_ARB_texture_query_lod 1 +#endif + +#ifndef GL_ARB_shading_language_include +#define GL_ARB_shading_language_include 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glNamedStringARB (GLenum type, GLint namelen, const GLchar *name, GLint stringlen, const GLchar *string); +GLAPI void APIENTRY glDeleteNamedStringARB (GLint namelen, const GLchar *name); +GLAPI void APIENTRY glCompileShaderIncludeARB (GLuint shader, GLsizei count, const GLchar* *path, const GLint *length); +GLAPI GLboolean APIENTRY glIsNamedStringARB (GLint namelen, const GLchar *name); +GLAPI void APIENTRY glGetNamedStringARB (GLint namelen, const GLchar *name, GLsizei bufSize, GLint *stringlen, GLchar *string); +GLAPI void APIENTRY glGetNamedStringivARB (GLint namelen, const GLchar *name, GLenum pname, GLint *params); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLNAMEDSTRINGARBPROC) (GLenum type, GLint namelen, const GLchar *name, GLint stringlen, const GLchar *string); +typedef void (APIENTRYP PFNGLDELETENAMEDSTRINGARBPROC) (GLint namelen, const GLchar *name); +typedef void (APIENTRYP PFNGLCOMPILESHADERINCLUDEARBPROC) (GLuint shader, GLsizei count, const GLchar* *path, const GLint *length); +typedef GLboolean (APIENTRYP PFNGLISNAMEDSTRINGARBPROC) (GLint namelen, const GLchar *name); +typedef void (APIENTRYP PFNGLGETNAMEDSTRINGARBPROC) (GLint namelen, const GLchar *name, GLsizei bufSize, GLint *stringlen, GLchar *string); +typedef void (APIENTRYP PFNGLGETNAMEDSTRINGIVARBPROC) (GLint namelen, const GLchar *name, GLenum pname, GLint *params); +#endif + +#ifndef GL_ARB_texture_compression_bptc +#define GL_ARB_texture_compression_bptc 1 +#endif + +#ifndef GL_ARB_blend_func_extended +#define GL_ARB_blend_func_extended 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glBindFragDataLocationIndexed (GLuint program, GLuint colorNumber, GLuint index, const GLchar *name); +GLAPI GLint APIENTRY glGetFragDataIndex (GLuint program, const GLchar *name); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLBINDFRAGDATALOCATIONINDEXEDPROC) (GLuint program, GLuint colorNumber, GLuint index, const GLchar *name); +typedef GLint (APIENTRYP PFNGLGETFRAGDATAINDEXPROC) (GLuint program, const GLchar *name); +#endif + +#ifndef GL_ARB_explicit_attrib_location +#define GL_ARB_explicit_attrib_location 1 +#endif + +#ifndef GL_ARB_occlusion_query2 +#define GL_ARB_occlusion_query2 1 +#endif + +#ifndef GL_ARB_sampler_objects +#define GL_ARB_sampler_objects 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glGenSamplers (GLsizei count, GLuint *samplers); +GLAPI void APIENTRY glDeleteSamplers (GLsizei count, const GLuint *samplers); +GLAPI GLboolean APIENTRY glIsSampler (GLuint sampler); +GLAPI void APIENTRY glBindSampler (GLuint unit, GLuint sampler); +GLAPI void APIENTRY glSamplerParameteri (GLuint sampler, GLenum pname, GLint param); +GLAPI void APIENTRY glSamplerParameteriv (GLuint sampler, GLenum pname, const GLint *param); +GLAPI void APIENTRY glSamplerParameterf (GLuint sampler, GLenum pname, GLfloat param); +GLAPI void APIENTRY glSamplerParameterfv (GLuint sampler, GLenum pname, const GLfloat *param); +GLAPI void APIENTRY glSamplerParameterIiv (GLuint sampler, GLenum pname, const GLint *param); +GLAPI void APIENTRY glSamplerParameterIuiv (GLuint sampler, GLenum pname, const GLuint *param); +GLAPI void APIENTRY glGetSamplerParameteriv (GLuint sampler, GLenum pname, GLint *params); +GLAPI void APIENTRY glGetSamplerParameterIiv (GLuint sampler, GLenum pname, GLint *params); +GLAPI void APIENTRY glGetSamplerParameterfv (GLuint sampler, GLenum pname, GLfloat *params); +GLAPI void APIENTRY glGetSamplerParameterIuiv (GLuint sampler, GLenum pname, GLuint *params); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLGENSAMPLERSPROC) (GLsizei count, GLuint *samplers); +typedef void (APIENTRYP PFNGLDELETESAMPLERSPROC) (GLsizei count, const GLuint *samplers); +typedef GLboolean (APIENTRYP PFNGLISSAMPLERPROC) (GLuint sampler); +typedef void (APIENTRYP PFNGLBINDSAMPLERPROC) (GLuint unit, GLuint sampler); +typedef void (APIENTRYP PFNGLSAMPLERPARAMETERIPROC) (GLuint sampler, GLenum pname, GLint param); +typedef void (APIENTRYP PFNGLSAMPLERPARAMETERIVPROC) (GLuint sampler, GLenum pname, const GLint *param); +typedef void (APIENTRYP PFNGLSAMPLERPARAMETERFPROC) (GLuint sampler, GLenum pname, GLfloat param); +typedef void (APIENTRYP PFNGLSAMPLERPARAMETERFVPROC) (GLuint sampler, GLenum pname, const GLfloat *param); +typedef void (APIENTRYP PFNGLSAMPLERPARAMETERIIVPROC) (GLuint sampler, GLenum pname, const GLint *param); +typedef void (APIENTRYP PFNGLSAMPLERPARAMETERIUIVPROC) (GLuint sampler, GLenum pname, const GLuint *param); +typedef void (APIENTRYP PFNGLGETSAMPLERPARAMETERIVPROC) (GLuint sampler, GLenum pname, GLint *params); +typedef void (APIENTRYP PFNGLGETSAMPLERPARAMETERIIVPROC) (GLuint sampler, GLenum pname, GLint *params); +typedef void (APIENTRYP PFNGLGETSAMPLERPARAMETERFVPROC) (GLuint sampler, GLenum pname, GLfloat *params); +typedef void (APIENTRYP PFNGLGETSAMPLERPARAMETERIUIVPROC) (GLuint sampler, GLenum pname, GLuint *params); +#endif + +#ifndef GL_ARB_shader_bit_encoding +#define GL_ARB_shader_bit_encoding 1 +#endif + +#ifndef GL_ARB_texture_rgb10_a2ui +#define GL_ARB_texture_rgb10_a2ui 1 +#endif + +#ifndef GL_ARB_texture_swizzle +#define GL_ARB_texture_swizzle 1 +#endif + +#ifndef GL_ARB_timer_query +#define GL_ARB_timer_query 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glQueryCounter (GLuint id, GLenum target); +GLAPI void APIENTRY glGetQueryObjecti64v (GLuint id, GLenum pname, GLint64 *params); +GLAPI void APIENTRY glGetQueryObjectui64v (GLuint id, GLenum pname, GLuint64 *params); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLQUERYCOUNTERPROC) (GLuint id, GLenum target); +typedef void (APIENTRYP PFNGLGETQUERYOBJECTI64VPROC) (GLuint id, GLenum pname, GLint64 *params); +typedef void (APIENTRYP PFNGLGETQUERYOBJECTUI64VPROC) (GLuint id, GLenum pname, GLuint64 *params); +#endif + +#ifndef GL_ARB_vertex_type_2_10_10_10_rev +#define GL_ARB_vertex_type_2_10_10_10_rev 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glVertexP2ui (GLenum type, GLuint value); +GLAPI void APIENTRY glVertexP2uiv (GLenum type, const GLuint *value); +GLAPI void APIENTRY glVertexP3ui (GLenum type, GLuint value); +GLAPI void APIENTRY glVertexP3uiv (GLenum type, const GLuint *value); +GLAPI void APIENTRY glVertexP4ui (GLenum type, GLuint value); +GLAPI void APIENTRY glVertexP4uiv (GLenum type, const GLuint *value); +GLAPI void APIENTRY glTexCoordP1ui (GLenum type, GLuint coords); +GLAPI void APIENTRY glTexCoordP1uiv (GLenum type, const GLuint *coords); +GLAPI void APIENTRY glTexCoordP2ui (GLenum type, GLuint coords); +GLAPI void APIENTRY glTexCoordP2uiv (GLenum type, const GLuint *coords); +GLAPI void APIENTRY glTexCoordP3ui (GLenum type, GLuint coords); +GLAPI void APIENTRY glTexCoordP3uiv (GLenum type, const GLuint *coords); +GLAPI void APIENTRY glTexCoordP4ui (GLenum type, GLuint coords); +GLAPI void APIENTRY glTexCoordP4uiv (GLenum type, const GLuint *coords); +GLAPI void APIENTRY glMultiTexCoordP1ui (GLenum texture, GLenum type, GLuint coords); +GLAPI void APIENTRY glMultiTexCoordP1uiv (GLenum texture, GLenum type, const GLuint *coords); +GLAPI void APIENTRY glMultiTexCoordP2ui (GLenum texture, GLenum type, GLuint coords); +GLAPI void APIENTRY glMultiTexCoordP2uiv (GLenum texture, GLenum type, const GLuint *coords); +GLAPI void APIENTRY glMultiTexCoordP3ui (GLenum texture, GLenum type, GLuint coords); +GLAPI void APIENTRY glMultiTexCoordP3uiv (GLenum texture, GLenum type, const GLuint *coords); +GLAPI void APIENTRY glMultiTexCoordP4ui (GLenum texture, GLenum type, GLuint coords); +GLAPI void APIENTRY glMultiTexCoordP4uiv (GLenum texture, GLenum type, const GLuint *coords); +GLAPI void APIENTRY glNormalP3ui (GLenum type, GLuint coords); +GLAPI void APIENTRY glNormalP3uiv (GLenum type, const GLuint *coords); +GLAPI void APIENTRY glColorP3ui (GLenum type, GLuint color); +GLAPI void APIENTRY glColorP3uiv (GLenum type, const GLuint *color); +GLAPI void APIENTRY glColorP4ui (GLenum type, GLuint color); +GLAPI void APIENTRY glColorP4uiv (GLenum type, const GLuint *color); +GLAPI void APIENTRY glSecondaryColorP3ui (GLenum type, GLuint color); +GLAPI void APIENTRY glSecondaryColorP3uiv (GLenum type, const GLuint *color); +GLAPI void APIENTRY glVertexAttribP1ui (GLuint index, GLenum type, GLboolean normalized, GLuint value); +GLAPI void APIENTRY glVertexAttribP1uiv (GLuint index, GLenum type, GLboolean normalized, const GLuint *value); +GLAPI void APIENTRY glVertexAttribP2ui (GLuint index, GLenum type, GLboolean normalized, GLuint value); +GLAPI void APIENTRY glVertexAttribP2uiv (GLuint index, GLenum type, GLboolean normalized, const GLuint *value); +GLAPI void APIENTRY glVertexAttribP3ui (GLuint index, GLenum type, GLboolean normalized, GLuint value); +GLAPI void APIENTRY glVertexAttribP3uiv (GLuint index, GLenum type, GLboolean normalized, const GLuint *value); +GLAPI void APIENTRY glVertexAttribP4ui (GLuint index, GLenum type, GLboolean normalized, GLuint value); +GLAPI void APIENTRY glVertexAttribP4uiv (GLuint index, GLenum type, GLboolean normalized, const GLuint *value); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLVERTEXP2UIPROC) (GLenum type, GLuint value); +typedef void (APIENTRYP PFNGLVERTEXP2UIVPROC) (GLenum type, const GLuint *value); +typedef void (APIENTRYP PFNGLVERTEXP3UIPROC) (GLenum type, GLuint value); +typedef void (APIENTRYP PFNGLVERTEXP3UIVPROC) (GLenum type, const GLuint *value); +typedef void (APIENTRYP PFNGLVERTEXP4UIPROC) (GLenum type, GLuint value); +typedef void (APIENTRYP PFNGLVERTEXP4UIVPROC) (GLenum type, const GLuint *value); +typedef void (APIENTRYP PFNGLTEXCOORDP1UIPROC) (GLenum type, GLuint coords); +typedef void (APIENTRYP PFNGLTEXCOORDP1UIVPROC) (GLenum type, const GLuint *coords); +typedef void (APIENTRYP PFNGLTEXCOORDP2UIPROC) (GLenum type, GLuint coords); +typedef void (APIENTRYP PFNGLTEXCOORDP2UIVPROC) (GLenum type, const GLuint *coords); +typedef void (APIENTRYP PFNGLTEXCOORDP3UIPROC) (GLenum type, GLuint coords); +typedef void (APIENTRYP PFNGLTEXCOORDP3UIVPROC) (GLenum type, const GLuint *coords); +typedef void (APIENTRYP PFNGLTEXCOORDP4UIPROC) (GLenum type, GLuint coords); +typedef void (APIENTRYP PFNGLTEXCOORDP4UIVPROC) (GLenum type, const GLuint *coords); +typedef void (APIENTRYP PFNGLMULTITEXCOORDP1UIPROC) (GLenum texture, GLenum type, GLuint coords); +typedef void (APIENTRYP PFNGLMULTITEXCOORDP1UIVPROC) (GLenum texture, GLenum type, const GLuint *coords); +typedef void (APIENTRYP PFNGLMULTITEXCOORDP2UIPROC) (GLenum texture, GLenum type, GLuint coords); +typedef void (APIENTRYP PFNGLMULTITEXCOORDP2UIVPROC) (GLenum texture, GLenum type, const GLuint *coords); +typedef void (APIENTRYP PFNGLMULTITEXCOORDP3UIPROC) (GLenum texture, GLenum type, GLuint coords); +typedef void (APIENTRYP PFNGLMULTITEXCOORDP3UIVPROC) (GLenum texture, GLenum type, const GLuint *coords); +typedef void (APIENTRYP PFNGLMULTITEXCOORDP4UIPROC) (GLenum texture, GLenum type, GLuint coords); +typedef void (APIENTRYP PFNGLMULTITEXCOORDP4UIVPROC) (GLenum texture, GLenum type, const GLuint *coords); +typedef void (APIENTRYP PFNGLNORMALP3UIPROC) (GLenum type, GLuint coords); +typedef void (APIENTRYP PFNGLNORMALP3UIVPROC) (GLenum type, const GLuint *coords); +typedef void (APIENTRYP PFNGLCOLORP3UIPROC) (GLenum type, GLuint color); +typedef void (APIENTRYP PFNGLCOLORP3UIVPROC) (GLenum type, const GLuint *color); +typedef void (APIENTRYP PFNGLCOLORP4UIPROC) (GLenum type, GLuint color); +typedef void (APIENTRYP PFNGLCOLORP4UIVPROC) (GLenum type, const GLuint *color); +typedef void (APIENTRYP PFNGLSECONDARYCOLORP3UIPROC) (GLenum type, GLuint color); +typedef void (APIENTRYP PFNGLSECONDARYCOLORP3UIVPROC) (GLenum type, const GLuint *color); +typedef void (APIENTRYP PFNGLVERTEXATTRIBP1UIPROC) (GLuint index, GLenum type, GLboolean normalized, GLuint value); +typedef void (APIENTRYP PFNGLVERTEXATTRIBP1UIVPROC) (GLuint index, GLenum type, GLboolean normalized, const GLuint *value); +typedef void (APIENTRYP PFNGLVERTEXATTRIBP2UIPROC) (GLuint index, GLenum type, GLboolean normalized, GLuint value); +typedef void (APIENTRYP PFNGLVERTEXATTRIBP2UIVPROC) (GLuint index, GLenum type, GLboolean normalized, const GLuint *value); +typedef void (APIENTRYP PFNGLVERTEXATTRIBP3UIPROC) (GLuint index, GLenum type, GLboolean normalized, GLuint value); +typedef void (APIENTRYP PFNGLVERTEXATTRIBP3UIVPROC) (GLuint index, GLenum type, GLboolean normalized, const GLuint *value); +typedef void (APIENTRYP PFNGLVERTEXATTRIBP4UIPROC) (GLuint index, GLenum type, GLboolean normalized, GLuint value); +typedef void (APIENTRYP PFNGLVERTEXATTRIBP4UIVPROC) (GLuint index, GLenum type, GLboolean normalized, const GLuint *value); +#endif + +#ifndef GL_ARB_draw_indirect +#define GL_ARB_draw_indirect 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glDrawArraysIndirect (GLenum mode, const GLvoid *indirect); +GLAPI void APIENTRY glDrawElementsIndirect (GLenum mode, GLenum type, const GLvoid *indirect); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLDRAWARRAYSINDIRECTPROC) (GLenum mode, const GLvoid *indirect); +typedef void (APIENTRYP PFNGLDRAWELEMENTSINDIRECTPROC) (GLenum mode, GLenum type, const GLvoid *indirect); +#endif + +#ifndef GL_ARB_gpu_shader5 +#define GL_ARB_gpu_shader5 1 +#endif + +#ifndef GL_ARB_gpu_shader_fp64 +#define GL_ARB_gpu_shader_fp64 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glUniform1d (GLint location, GLdouble x); +GLAPI void APIENTRY glUniform2d (GLint location, GLdouble x, GLdouble y); +GLAPI void APIENTRY glUniform3d (GLint location, GLdouble x, GLdouble y, GLdouble z); +GLAPI void APIENTRY glUniform4d (GLint location, GLdouble x, GLdouble y, GLdouble z, GLdouble w); +GLAPI void APIENTRY glUniform1dv (GLint location, GLsizei count, const GLdouble *value); +GLAPI void APIENTRY glUniform2dv (GLint location, GLsizei count, const GLdouble *value); +GLAPI void APIENTRY glUniform3dv (GLint location, GLsizei count, const GLdouble *value); +GLAPI void APIENTRY glUniform4dv (GLint location, GLsizei count, const GLdouble *value); +GLAPI void APIENTRY glUniformMatrix2dv (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +GLAPI void APIENTRY glUniformMatrix3dv (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +GLAPI void APIENTRY glUniformMatrix4dv (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +GLAPI void APIENTRY glUniformMatrix2x3dv (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +GLAPI void APIENTRY glUniformMatrix2x4dv (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +GLAPI void APIENTRY glUniformMatrix3x2dv (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +GLAPI void APIENTRY glUniformMatrix3x4dv (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +GLAPI void APIENTRY glUniformMatrix4x2dv (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +GLAPI void APIENTRY glUniformMatrix4x3dv (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +GLAPI void APIENTRY glGetUniformdv (GLuint program, GLint location, GLdouble *params); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLUNIFORM1DPROC) (GLint location, GLdouble x); +typedef void (APIENTRYP PFNGLUNIFORM2DPROC) (GLint location, GLdouble x, GLdouble y); +typedef void (APIENTRYP PFNGLUNIFORM3DPROC) (GLint location, GLdouble x, GLdouble y, GLdouble z); +typedef void (APIENTRYP PFNGLUNIFORM4DPROC) (GLint location, GLdouble x, GLdouble y, GLdouble z, GLdouble w); +typedef void (APIENTRYP PFNGLUNIFORM1DVPROC) (GLint location, GLsizei count, const GLdouble *value); +typedef void (APIENTRYP PFNGLUNIFORM2DVPROC) (GLint location, GLsizei count, const GLdouble *value); +typedef void (APIENTRYP PFNGLUNIFORM3DVPROC) (GLint location, GLsizei count, const GLdouble *value); +typedef void (APIENTRYP PFNGLUNIFORM4DVPROC) (GLint location, GLsizei count, const GLdouble *value); +typedef void (APIENTRYP PFNGLUNIFORMMATRIX2DVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +typedef void (APIENTRYP PFNGLUNIFORMMATRIX3DVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +typedef void (APIENTRYP PFNGLUNIFORMMATRIX4DVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +typedef void (APIENTRYP PFNGLUNIFORMMATRIX2X3DVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +typedef void (APIENTRYP PFNGLUNIFORMMATRIX2X4DVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +typedef void (APIENTRYP PFNGLUNIFORMMATRIX3X2DVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +typedef void (APIENTRYP PFNGLUNIFORMMATRIX3X4DVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +typedef void (APIENTRYP PFNGLUNIFORMMATRIX4X2DVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +typedef void (APIENTRYP PFNGLUNIFORMMATRIX4X3DVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +typedef void (APIENTRYP PFNGLGETUNIFORMDVPROC) (GLuint program, GLint location, GLdouble *params); +#endif + +#ifndef GL_ARB_shader_subroutine +#define GL_ARB_shader_subroutine 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI GLint APIENTRY glGetSubroutineUniformLocation (GLuint program, GLenum shadertype, const GLchar *name); +GLAPI GLuint APIENTRY glGetSubroutineIndex (GLuint program, GLenum shadertype, const GLchar *name); +GLAPI void APIENTRY glGetActiveSubroutineUniformiv (GLuint program, GLenum shadertype, GLuint index, GLenum pname, GLint *values); +GLAPI void APIENTRY glGetActiveSubroutineUniformName (GLuint program, GLenum shadertype, GLuint index, GLsizei bufsize, GLsizei *length, GLchar *name); +GLAPI void APIENTRY glGetActiveSubroutineName (GLuint program, GLenum shadertype, GLuint index, GLsizei bufsize, GLsizei *length, GLchar *name); +GLAPI void APIENTRY glUniformSubroutinesuiv (GLenum shadertype, GLsizei count, const GLuint *indices); +GLAPI void APIENTRY glGetUniformSubroutineuiv (GLenum shadertype, GLint location, GLuint *params); +GLAPI void APIENTRY glGetProgramStageiv (GLuint program, GLenum shadertype, GLenum pname, GLint *values); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef GLint (APIENTRYP PFNGLGETSUBROUTINEUNIFORMLOCATIONPROC) (GLuint program, GLenum shadertype, const GLchar *name); +typedef GLuint (APIENTRYP PFNGLGETSUBROUTINEINDEXPROC) (GLuint program, GLenum shadertype, const GLchar *name); +typedef void (APIENTRYP PFNGLGETACTIVESUBROUTINEUNIFORMIVPROC) (GLuint program, GLenum shadertype, GLuint index, GLenum pname, GLint *values); +typedef void (APIENTRYP PFNGLGETACTIVESUBROUTINEUNIFORMNAMEPROC) (GLuint program, GLenum shadertype, GLuint index, GLsizei bufsize, GLsizei *length, GLchar *name); +typedef void (APIENTRYP PFNGLGETACTIVESUBROUTINENAMEPROC) (GLuint program, GLenum shadertype, GLuint index, GLsizei bufsize, GLsizei *length, GLchar *name); +typedef void (APIENTRYP PFNGLUNIFORMSUBROUTINESUIVPROC) (GLenum shadertype, GLsizei count, const GLuint *indices); +typedef void (APIENTRYP PFNGLGETUNIFORMSUBROUTINEUIVPROC) (GLenum shadertype, GLint location, GLuint *params); +typedef void (APIENTRYP PFNGLGETPROGRAMSTAGEIVPROC) (GLuint program, GLenum shadertype, GLenum pname, GLint *values); +#endif + +#ifndef GL_ARB_tessellation_shader +#define GL_ARB_tessellation_shader 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glPatchParameteri (GLenum pname, GLint value); +GLAPI void APIENTRY glPatchParameterfv (GLenum pname, const GLfloat *values); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLPATCHPARAMETERIPROC) (GLenum pname, GLint value); +typedef void (APIENTRYP PFNGLPATCHPARAMETERFVPROC) (GLenum pname, const GLfloat *values); +#endif + +#ifndef GL_ARB_texture_buffer_object_rgb32 +#define GL_ARB_texture_buffer_object_rgb32 1 +#endif + +#ifndef GL_ARB_transform_feedback2 +#define GL_ARB_transform_feedback2 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glBindTransformFeedback (GLenum target, GLuint id); +GLAPI void APIENTRY glDeleteTransformFeedbacks (GLsizei n, const GLuint *ids); +GLAPI void APIENTRY glGenTransformFeedbacks (GLsizei n, GLuint *ids); +GLAPI GLboolean APIENTRY glIsTransformFeedback (GLuint id); +GLAPI void APIENTRY glPauseTransformFeedback (void); +GLAPI void APIENTRY glResumeTransformFeedback (void); +GLAPI void APIENTRY glDrawTransformFeedback (GLenum mode, GLuint id); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLBINDTRANSFORMFEEDBACKPROC) (GLenum target, GLuint id); +typedef void (APIENTRYP PFNGLDELETETRANSFORMFEEDBACKSPROC) (GLsizei n, const GLuint *ids); +typedef void (APIENTRYP PFNGLGENTRANSFORMFEEDBACKSPROC) (GLsizei n, GLuint *ids); +typedef GLboolean (APIENTRYP PFNGLISTRANSFORMFEEDBACKPROC) (GLuint id); +typedef void (APIENTRYP PFNGLPAUSETRANSFORMFEEDBACKPROC) (void); +typedef void (APIENTRYP PFNGLRESUMETRANSFORMFEEDBACKPROC) (void); +typedef void (APIENTRYP PFNGLDRAWTRANSFORMFEEDBACKPROC) (GLenum mode, GLuint id); +#endif + +#ifndef GL_ARB_transform_feedback3 +#define GL_ARB_transform_feedback3 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glDrawTransformFeedbackStream (GLenum mode, GLuint id, GLuint stream); +GLAPI void APIENTRY glBeginQueryIndexed (GLenum target, GLuint index, GLuint id); +GLAPI void APIENTRY glEndQueryIndexed (GLenum target, GLuint index); +GLAPI void APIENTRY glGetQueryIndexediv (GLenum target, GLuint index, GLenum pname, GLint *params); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLDRAWTRANSFORMFEEDBACKSTREAMPROC) (GLenum mode, GLuint id, GLuint stream); +typedef void (APIENTRYP PFNGLBEGINQUERYINDEXEDPROC) (GLenum target, GLuint index, GLuint id); +typedef void (APIENTRYP PFNGLENDQUERYINDEXEDPROC) (GLenum target, GLuint index); +typedef void (APIENTRYP PFNGLGETQUERYINDEXEDIVPROC) (GLenum target, GLuint index, GLenum pname, GLint *params); +#endif + +#ifndef GL_ARB_ES2_compatibility +#define GL_ARB_ES2_compatibility 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glReleaseShaderCompiler (void); +GLAPI void APIENTRY glShaderBinary (GLsizei count, const GLuint *shaders, GLenum binaryformat, const GLvoid *binary, GLsizei length); +GLAPI void APIENTRY glGetShaderPrecisionFormat (GLenum shadertype, GLenum precisiontype, GLint *range, GLint *precision); +GLAPI void APIENTRY glDepthRangef (GLfloat n, GLfloat f); +GLAPI void APIENTRY glClearDepthf (GLfloat d); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLRELEASESHADERCOMPILERPROC) (void); +typedef void (APIENTRYP PFNGLSHADERBINARYPROC) (GLsizei count, const GLuint *shaders, GLenum binaryformat, const GLvoid *binary, GLsizei length); +typedef void (APIENTRYP PFNGLGETSHADERPRECISIONFORMATPROC) (GLenum shadertype, GLenum precisiontype, GLint *range, GLint *precision); +typedef void (APIENTRYP PFNGLDEPTHRANGEFPROC) (GLfloat n, GLfloat f); +typedef void (APIENTRYP PFNGLCLEARDEPTHFPROC) (GLfloat d); +#endif + +#ifndef GL_ARB_get_program_binary +#define GL_ARB_get_program_binary 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glGetProgramBinary (GLuint program, GLsizei bufSize, GLsizei *length, GLenum *binaryFormat, GLvoid *binary); +GLAPI void APIENTRY glProgramBinary (GLuint program, GLenum binaryFormat, const GLvoid *binary, GLsizei length); +GLAPI void APIENTRY glProgramParameteri (GLuint program, GLenum pname, GLint value); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLGETPROGRAMBINARYPROC) (GLuint program, GLsizei bufSize, GLsizei *length, GLenum *binaryFormat, GLvoid *binary); +typedef void (APIENTRYP PFNGLPROGRAMBINARYPROC) (GLuint program, GLenum binaryFormat, const GLvoid *binary, GLsizei length); +typedef void (APIENTRYP PFNGLPROGRAMPARAMETERIPROC) (GLuint program, GLenum pname, GLint value); +#endif + +#ifndef GL_ARB_separate_shader_objects +#define GL_ARB_separate_shader_objects 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glUseProgramStages (GLuint pipeline, GLbitfield stages, GLuint program); +GLAPI void APIENTRY glActiveShaderProgram (GLuint pipeline, GLuint program); +GLAPI GLuint APIENTRY glCreateShaderProgramv (GLenum type, GLsizei count, const GLchar* const *strings); +GLAPI void APIENTRY glBindProgramPipeline (GLuint pipeline); +GLAPI void APIENTRY glDeleteProgramPipelines (GLsizei n, const GLuint *pipelines); +GLAPI void APIENTRY glGenProgramPipelines (GLsizei n, GLuint *pipelines); +GLAPI GLboolean APIENTRY glIsProgramPipeline (GLuint pipeline); +GLAPI void APIENTRY glGetProgramPipelineiv (GLuint pipeline, GLenum pname, GLint *params); +GLAPI void APIENTRY glProgramUniform1i (GLuint program, GLint location, GLint v0); +GLAPI void APIENTRY glProgramUniform1iv (GLuint program, GLint location, GLsizei count, const GLint *value); +GLAPI void APIENTRY glProgramUniform1f (GLuint program, GLint location, GLfloat v0); +GLAPI void APIENTRY glProgramUniform1fv (GLuint program, GLint location, GLsizei count, const GLfloat *value); +GLAPI void APIENTRY glProgramUniform1d (GLuint program, GLint location, GLdouble v0); +GLAPI void APIENTRY glProgramUniform1dv (GLuint program, GLint location, GLsizei count, const GLdouble *value); +GLAPI void APIENTRY glProgramUniform1ui (GLuint program, GLint location, GLuint v0); +GLAPI void APIENTRY glProgramUniform1uiv (GLuint program, GLint location, GLsizei count, const GLuint *value); +GLAPI void APIENTRY glProgramUniform2i (GLuint program, GLint location, GLint v0, GLint v1); +GLAPI void APIENTRY glProgramUniform2iv (GLuint program, GLint location, GLsizei count, const GLint *value); +GLAPI void APIENTRY glProgramUniform2f (GLuint program, GLint location, GLfloat v0, GLfloat v1); +GLAPI void APIENTRY glProgramUniform2fv (GLuint program, GLint location, GLsizei count, const GLfloat *value); +GLAPI void APIENTRY glProgramUniform2d (GLuint program, GLint location, GLdouble v0, GLdouble v1); +GLAPI void APIENTRY glProgramUniform2dv (GLuint program, GLint location, GLsizei count, const GLdouble *value); +GLAPI void APIENTRY glProgramUniform2ui (GLuint program, GLint location, GLuint v0, GLuint v1); +GLAPI void APIENTRY glProgramUniform2uiv (GLuint program, GLint location, GLsizei count, const GLuint *value); +GLAPI void APIENTRY glProgramUniform3i (GLuint program, GLint location, GLint v0, GLint v1, GLint v2); +GLAPI void APIENTRY glProgramUniform3iv (GLuint program, GLint location, GLsizei count, const GLint *value); +GLAPI void APIENTRY glProgramUniform3f (GLuint program, GLint location, GLfloat v0, GLfloat v1, GLfloat v2); +GLAPI void APIENTRY glProgramUniform3fv (GLuint program, GLint location, GLsizei count, const GLfloat *value); +GLAPI void APIENTRY glProgramUniform3d (GLuint program, GLint location, GLdouble v0, GLdouble v1, GLdouble v2); +GLAPI void APIENTRY glProgramUniform3dv (GLuint program, GLint location, GLsizei count, const GLdouble *value); +GLAPI void APIENTRY glProgramUniform3ui (GLuint program, GLint location, GLuint v0, GLuint v1, GLuint v2); +GLAPI void APIENTRY glProgramUniform3uiv (GLuint program, GLint location, GLsizei count, const GLuint *value); +GLAPI void APIENTRY glProgramUniform4i (GLuint program, GLint location, GLint v0, GLint v1, GLint v2, GLint v3); +GLAPI void APIENTRY glProgramUniform4iv (GLuint program, GLint location, GLsizei count, const GLint *value); +GLAPI void APIENTRY glProgramUniform4f (GLuint program, GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3); +GLAPI void APIENTRY glProgramUniform4fv (GLuint program, GLint location, GLsizei count, const GLfloat *value); +GLAPI void APIENTRY glProgramUniform4d (GLuint program, GLint location, GLdouble v0, GLdouble v1, GLdouble v2, GLdouble v3); +GLAPI void APIENTRY glProgramUniform4dv (GLuint program, GLint location, GLsizei count, const GLdouble *value); +GLAPI void APIENTRY glProgramUniform4ui (GLuint program, GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3); +GLAPI void APIENTRY glProgramUniform4uiv (GLuint program, GLint location, GLsizei count, const GLuint *value); +GLAPI void APIENTRY glProgramUniformMatrix2fv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +GLAPI void APIENTRY glProgramUniformMatrix3fv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +GLAPI void APIENTRY glProgramUniformMatrix4fv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +GLAPI void APIENTRY glProgramUniformMatrix2dv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +GLAPI void APIENTRY glProgramUniformMatrix3dv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +GLAPI void APIENTRY glProgramUniformMatrix4dv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +GLAPI void APIENTRY glProgramUniformMatrix2x3fv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +GLAPI void APIENTRY glProgramUniformMatrix3x2fv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +GLAPI void APIENTRY glProgramUniformMatrix2x4fv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +GLAPI void APIENTRY glProgramUniformMatrix4x2fv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +GLAPI void APIENTRY glProgramUniformMatrix3x4fv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +GLAPI void APIENTRY glProgramUniformMatrix4x3fv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +GLAPI void APIENTRY glProgramUniformMatrix2x3dv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +GLAPI void APIENTRY glProgramUniformMatrix3x2dv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +GLAPI void APIENTRY glProgramUniformMatrix2x4dv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +GLAPI void APIENTRY glProgramUniformMatrix4x2dv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +GLAPI void APIENTRY glProgramUniformMatrix3x4dv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +GLAPI void APIENTRY glProgramUniformMatrix4x3dv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +GLAPI void APIENTRY glValidateProgramPipeline (GLuint pipeline); +GLAPI void APIENTRY glGetProgramPipelineInfoLog (GLuint pipeline, GLsizei bufSize, GLsizei *length, GLchar *infoLog); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLUSEPROGRAMSTAGESPROC) (GLuint pipeline, GLbitfield stages, GLuint program); +typedef void (APIENTRYP PFNGLACTIVESHADERPROGRAMPROC) (GLuint pipeline, GLuint program); +typedef GLuint (APIENTRYP PFNGLCREATESHADERPROGRAMVPROC) (GLenum type, GLsizei count, const GLchar* const *strings); +typedef void (APIENTRYP PFNGLBINDPROGRAMPIPELINEPROC) (GLuint pipeline); +typedef void (APIENTRYP PFNGLDELETEPROGRAMPIPELINESPROC) (GLsizei n, const GLuint *pipelines); +typedef void (APIENTRYP PFNGLGENPROGRAMPIPELINESPROC) (GLsizei n, GLuint *pipelines); +typedef GLboolean (APIENTRYP PFNGLISPROGRAMPIPELINEPROC) (GLuint pipeline); +typedef void (APIENTRYP PFNGLGETPROGRAMPIPELINEIVPROC) (GLuint pipeline, GLenum pname, GLint *params); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM1IPROC) (GLuint program, GLint location, GLint v0); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM1IVPROC) (GLuint program, GLint location, GLsizei count, const GLint *value); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM1FPROC) (GLuint program, GLint location, GLfloat v0); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM1FVPROC) (GLuint program, GLint location, GLsizei count, const GLfloat *value); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM1DPROC) (GLuint program, GLint location, GLdouble v0); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM1DVPROC) (GLuint program, GLint location, GLsizei count, const GLdouble *value); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM1UIPROC) (GLuint program, GLint location, GLuint v0); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM1UIVPROC) (GLuint program, GLint location, GLsizei count, const GLuint *value); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM2IPROC) (GLuint program, GLint location, GLint v0, GLint v1); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM2IVPROC) (GLuint program, GLint location, GLsizei count, const GLint *value); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM2FPROC) (GLuint program, GLint location, GLfloat v0, GLfloat v1); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM2FVPROC) (GLuint program, GLint location, GLsizei count, const GLfloat *value); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM2DPROC) (GLuint program, GLint location, GLdouble v0, GLdouble v1); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM2DVPROC) (GLuint program, GLint location, GLsizei count, const GLdouble *value); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM2UIPROC) (GLuint program, GLint location, GLuint v0, GLuint v1); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM2UIVPROC) (GLuint program, GLint location, GLsizei count, const GLuint *value); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM3IPROC) (GLuint program, GLint location, GLint v0, GLint v1, GLint v2); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM3IVPROC) (GLuint program, GLint location, GLsizei count, const GLint *value); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM3FPROC) (GLuint program, GLint location, GLfloat v0, GLfloat v1, GLfloat v2); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM3FVPROC) (GLuint program, GLint location, GLsizei count, const GLfloat *value); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM3DPROC) (GLuint program, GLint location, GLdouble v0, GLdouble v1, GLdouble v2); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM3DVPROC) (GLuint program, GLint location, GLsizei count, const GLdouble *value); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM3UIPROC) (GLuint program, GLint location, GLuint v0, GLuint v1, GLuint v2); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM3UIVPROC) (GLuint program, GLint location, GLsizei count, const GLuint *value); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM4IPROC) (GLuint program, GLint location, GLint v0, GLint v1, GLint v2, GLint v3); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM4IVPROC) (GLuint program, GLint location, GLsizei count, const GLint *value); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM4FPROC) (GLuint program, GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM4FVPROC) (GLuint program, GLint location, GLsizei count, const GLfloat *value); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM4DPROC) (GLuint program, GLint location, GLdouble v0, GLdouble v1, GLdouble v2, GLdouble v3); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM4DVPROC) (GLuint program, GLint location, GLsizei count, const GLdouble *value); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM4UIPROC) (GLuint program, GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM4UIVPROC) (GLuint program, GLint location, GLsizei count, const GLuint *value); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX2FVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX3FVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX4FVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX2DVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX3DVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX4DVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX2X3FVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX3X2FVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX2X4FVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX4X2FVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX3X4FVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX4X3FVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX2X3DVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX3X2DVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX2X4DVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX4X2DVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX3X4DVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX4X3DVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +typedef void (APIENTRYP PFNGLVALIDATEPROGRAMPIPELINEPROC) (GLuint pipeline); +typedef void (APIENTRYP PFNGLGETPROGRAMPIPELINEINFOLOGPROC) (GLuint pipeline, GLsizei bufSize, GLsizei *length, GLchar *infoLog); +#endif + +#ifndef GL_ARB_vertex_attrib_64bit +#define GL_ARB_vertex_attrib_64bit 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glVertexAttribL1d (GLuint index, GLdouble x); +GLAPI void APIENTRY glVertexAttribL2d (GLuint index, GLdouble x, GLdouble y); +GLAPI void APIENTRY glVertexAttribL3d (GLuint index, GLdouble x, GLdouble y, GLdouble z); +GLAPI void APIENTRY glVertexAttribL4d (GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w); +GLAPI void APIENTRY glVertexAttribL1dv (GLuint index, const GLdouble *v); +GLAPI void APIENTRY glVertexAttribL2dv (GLuint index, const GLdouble *v); +GLAPI void APIENTRY glVertexAttribL3dv (GLuint index, const GLdouble *v); +GLAPI void APIENTRY glVertexAttribL4dv (GLuint index, const GLdouble *v); +GLAPI void APIENTRY glVertexAttribLPointer (GLuint index, GLint size, GLenum type, GLsizei stride, const GLvoid *pointer); +GLAPI void APIENTRY glGetVertexAttribLdv (GLuint index, GLenum pname, GLdouble *params); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLVERTEXATTRIBL1DPROC) (GLuint index, GLdouble x); +typedef void (APIENTRYP PFNGLVERTEXATTRIBL2DPROC) (GLuint index, GLdouble x, GLdouble y); +typedef void (APIENTRYP PFNGLVERTEXATTRIBL3DPROC) (GLuint index, GLdouble x, GLdouble y, GLdouble z); +typedef void (APIENTRYP PFNGLVERTEXATTRIBL4DPROC) (GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w); +typedef void (APIENTRYP PFNGLVERTEXATTRIBL1DVPROC) (GLuint index, const GLdouble *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIBL2DVPROC) (GLuint index, const GLdouble *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIBL3DVPROC) (GLuint index, const GLdouble *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIBL4DVPROC) (GLuint index, const GLdouble *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIBLPOINTERPROC) (GLuint index, GLint size, GLenum type, GLsizei stride, const GLvoid *pointer); +typedef void (APIENTRYP PFNGLGETVERTEXATTRIBLDVPROC) (GLuint index, GLenum pname, GLdouble *params); +#endif + +#ifndef GL_ARB_viewport_array +#define GL_ARB_viewport_array 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glViewportArrayv (GLuint first, GLsizei count, const GLfloat *v); +GLAPI void APIENTRY glViewportIndexedf (GLuint index, GLfloat x, GLfloat y, GLfloat w, GLfloat h); +GLAPI void APIENTRY glViewportIndexedfv (GLuint index, const GLfloat *v); +GLAPI void APIENTRY glScissorArrayv (GLuint first, GLsizei count, const GLint *v); +GLAPI void APIENTRY glScissorIndexed (GLuint index, GLint left, GLint bottom, GLsizei width, GLsizei height); +GLAPI void APIENTRY glScissorIndexedv (GLuint index, const GLint *v); +GLAPI void APIENTRY glDepthRangeArrayv (GLuint first, GLsizei count, const GLdouble *v); +GLAPI void APIENTRY glDepthRangeIndexed (GLuint index, GLdouble n, GLdouble f); +GLAPI void APIENTRY glGetFloati_v (GLenum target, GLuint index, GLfloat *data); +GLAPI void APIENTRY glGetDoublei_v (GLenum target, GLuint index, GLdouble *data); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLVIEWPORTARRAYVPROC) (GLuint first, GLsizei count, const GLfloat *v); +typedef void (APIENTRYP PFNGLVIEWPORTINDEXEDFPROC) (GLuint index, GLfloat x, GLfloat y, GLfloat w, GLfloat h); +typedef void (APIENTRYP PFNGLVIEWPORTINDEXEDFVPROC) (GLuint index, const GLfloat *v); +typedef void (APIENTRYP PFNGLSCISSORARRAYVPROC) (GLuint first, GLsizei count, const GLint *v); +typedef void (APIENTRYP PFNGLSCISSORINDEXEDPROC) (GLuint index, GLint left, GLint bottom, GLsizei width, GLsizei height); +typedef void (APIENTRYP PFNGLSCISSORINDEXEDVPROC) (GLuint index, const GLint *v); +typedef void (APIENTRYP PFNGLDEPTHRANGEARRAYVPROC) (GLuint first, GLsizei count, const GLdouble *v); +typedef void (APIENTRYP PFNGLDEPTHRANGEINDEXEDPROC) (GLuint index, GLdouble n, GLdouble f); +typedef void (APIENTRYP PFNGLGETFLOATI_VPROC) (GLenum target, GLuint index, GLfloat *data); +typedef void (APIENTRYP PFNGLGETDOUBLEI_VPROC) (GLenum target, GLuint index, GLdouble *data); +#endif + +#ifndef GL_ARB_cl_event +#define GL_ARB_cl_event 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI GLsync APIENTRY glCreateSyncFromCLeventARB (struct _cl_context * context, struct _cl_event * event, GLbitfield flags); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef GLsync (APIENTRYP PFNGLCREATESYNCFROMCLEVENTARBPROC) (struct _cl_context * context, struct _cl_event * event, GLbitfield flags); +#endif + +#ifndef GL_ARB_debug_output +#define GL_ARB_debug_output 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glDebugMessageControlARB (GLenum source, GLenum type, GLenum severity, GLsizei count, const GLuint *ids, GLboolean enabled); +GLAPI void APIENTRY glDebugMessageInsertARB (GLenum source, GLenum type, GLuint id, GLenum severity, GLsizei length, const GLchar *buf); +GLAPI void APIENTRY glDebugMessageCallbackARB (GLDEBUGPROCARB callback, const GLvoid *userParam); +GLAPI GLuint APIENTRY glGetDebugMessageLogARB (GLuint count, GLsizei bufsize, GLenum *sources, GLenum *types, GLuint *ids, GLenum *severities, GLsizei *lengths, GLchar *messageLog); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLDEBUGMESSAGECONTROLARBPROC) (GLenum source, GLenum type, GLenum severity, GLsizei count, const GLuint *ids, GLboolean enabled); +typedef void (APIENTRYP PFNGLDEBUGMESSAGEINSERTARBPROC) (GLenum source, GLenum type, GLuint id, GLenum severity, GLsizei length, const GLchar *buf); +typedef void (APIENTRYP PFNGLDEBUGMESSAGECALLBACKARBPROC) (GLDEBUGPROCARB callback, const GLvoid *userParam); +typedef GLuint (APIENTRYP PFNGLGETDEBUGMESSAGELOGARBPROC) (GLuint count, GLsizei bufsize, GLenum *sources, GLenum *types, GLuint *ids, GLenum *severities, GLsizei *lengths, GLchar *messageLog); +#endif + +#ifndef GL_ARB_robustness +#define GL_ARB_robustness 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI GLenum APIENTRY glGetGraphicsResetStatusARB (void); +GLAPI void APIENTRY glGetnMapdvARB (GLenum target, GLenum query, GLsizei bufSize, GLdouble *v); +GLAPI void APIENTRY glGetnMapfvARB (GLenum target, GLenum query, GLsizei bufSize, GLfloat *v); +GLAPI void APIENTRY glGetnMapivARB (GLenum target, GLenum query, GLsizei bufSize, GLint *v); +GLAPI void APIENTRY glGetnPixelMapfvARB (GLenum map, GLsizei bufSize, GLfloat *values); +GLAPI void APIENTRY glGetnPixelMapuivARB (GLenum map, GLsizei bufSize, GLuint *values); +GLAPI void APIENTRY glGetnPixelMapusvARB (GLenum map, GLsizei bufSize, GLushort *values); +GLAPI void APIENTRY glGetnPolygonStippleARB (GLsizei bufSize, GLubyte *pattern); +GLAPI void APIENTRY glGetnColorTableARB (GLenum target, GLenum format, GLenum type, GLsizei bufSize, GLvoid *table); +GLAPI void APIENTRY glGetnConvolutionFilterARB (GLenum target, GLenum format, GLenum type, GLsizei bufSize, GLvoid *image); +GLAPI void APIENTRY glGetnSeparableFilterARB (GLenum target, GLenum format, GLenum type, GLsizei rowBufSize, GLvoid *row, GLsizei columnBufSize, GLvoid *column, GLvoid *span); +GLAPI void APIENTRY glGetnHistogramARB (GLenum target, GLboolean reset, GLenum format, GLenum type, GLsizei bufSize, GLvoid *values); +GLAPI void APIENTRY glGetnMinmaxARB (GLenum target, GLboolean reset, GLenum format, GLenum type, GLsizei bufSize, GLvoid *values); +GLAPI void APIENTRY glGetnTexImageARB (GLenum target, GLint level, GLenum format, GLenum type, GLsizei bufSize, GLvoid *img); +GLAPI void APIENTRY glReadnPixelsARB (GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLsizei bufSize, GLvoid *data); +GLAPI void APIENTRY glGetnCompressedTexImageARB (GLenum target, GLint lod, GLsizei bufSize, GLvoid *img); +GLAPI void APIENTRY glGetnUniformfvARB (GLuint program, GLint location, GLsizei bufSize, GLfloat *params); +GLAPI void APIENTRY glGetnUniformivARB (GLuint program, GLint location, GLsizei bufSize, GLint *params); +GLAPI void APIENTRY glGetnUniformuivARB (GLuint program, GLint location, GLsizei bufSize, GLuint *params); +GLAPI void APIENTRY glGetnUniformdvARB (GLuint program, GLint location, GLsizei bufSize, GLdouble *params); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef GLenum (APIENTRYP PFNGLGETGRAPHICSRESETSTATUSARBPROC) (void); +typedef void (APIENTRYP PFNGLGETNMAPDVARBPROC) (GLenum target, GLenum query, GLsizei bufSize, GLdouble *v); +typedef void (APIENTRYP PFNGLGETNMAPFVARBPROC) (GLenum target, GLenum query, GLsizei bufSize, GLfloat *v); +typedef void (APIENTRYP PFNGLGETNMAPIVARBPROC) (GLenum target, GLenum query, GLsizei bufSize, GLint *v); +typedef void (APIENTRYP PFNGLGETNPIXELMAPFVARBPROC) (GLenum map, GLsizei bufSize, GLfloat *values); +typedef void (APIENTRYP PFNGLGETNPIXELMAPUIVARBPROC) (GLenum map, GLsizei bufSize, GLuint *values); +typedef void (APIENTRYP PFNGLGETNPIXELMAPUSVARBPROC) (GLenum map, GLsizei bufSize, GLushort *values); +typedef void (APIENTRYP PFNGLGETNPOLYGONSTIPPLEARBPROC) (GLsizei bufSize, GLubyte *pattern); +typedef void (APIENTRYP PFNGLGETNCOLORTABLEARBPROC) (GLenum target, GLenum format, GLenum type, GLsizei bufSize, GLvoid *table); +typedef void (APIENTRYP PFNGLGETNCONVOLUTIONFILTERARBPROC) (GLenum target, GLenum format, GLenum type, GLsizei bufSize, GLvoid *image); +typedef void (APIENTRYP PFNGLGETNSEPARABLEFILTERARBPROC) (GLenum target, GLenum format, GLenum type, GLsizei rowBufSize, GLvoid *row, GLsizei columnBufSize, GLvoid *column, GLvoid *span); +typedef void (APIENTRYP PFNGLGETNHISTOGRAMARBPROC) (GLenum target, GLboolean reset, GLenum format, GLenum type, GLsizei bufSize, GLvoid *values); +typedef void (APIENTRYP PFNGLGETNMINMAXARBPROC) (GLenum target, GLboolean reset, GLenum format, GLenum type, GLsizei bufSize, GLvoid *values); +typedef void (APIENTRYP PFNGLGETNTEXIMAGEARBPROC) (GLenum target, GLint level, GLenum format, GLenum type, GLsizei bufSize, GLvoid *img); +typedef void (APIENTRYP PFNGLREADNPIXELSARBPROC) (GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLsizei bufSize, GLvoid *data); +typedef void (APIENTRYP PFNGLGETNCOMPRESSEDTEXIMAGEARBPROC) (GLenum target, GLint lod, GLsizei bufSize, GLvoid *img); +typedef void (APIENTRYP PFNGLGETNUNIFORMFVARBPROC) (GLuint program, GLint location, GLsizei bufSize, GLfloat *params); +typedef void (APIENTRYP PFNGLGETNUNIFORMIVARBPROC) (GLuint program, GLint location, GLsizei bufSize, GLint *params); +typedef void (APIENTRYP PFNGLGETNUNIFORMUIVARBPROC) (GLuint program, GLint location, GLsizei bufSize, GLuint *params); +typedef void (APIENTRYP PFNGLGETNUNIFORMDVARBPROC) (GLuint program, GLint location, GLsizei bufSize, GLdouble *params); +#endif + +#ifndef GL_ARB_shader_stencil_export +#define GL_ARB_shader_stencil_export 1 +#endif + +#ifndef GL_ARB_base_instance +#define GL_ARB_base_instance 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glDrawArraysInstancedBaseInstance (GLenum mode, GLint first, GLsizei count, GLsizei instancecount, GLuint baseinstance); +GLAPI void APIENTRY glDrawElementsInstancedBaseInstance (GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei instancecount, GLuint baseinstance); +GLAPI void APIENTRY glDrawElementsInstancedBaseVertexBaseInstance (GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei instancecount, GLint basevertex, GLuint baseinstance); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLDRAWARRAYSINSTANCEDBASEINSTANCEPROC) (GLenum mode, GLint first, GLsizei count, GLsizei instancecount, GLuint baseinstance); +typedef void (APIENTRYP PFNGLDRAWELEMENTSINSTANCEDBASEINSTANCEPROC) (GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei instancecount, GLuint baseinstance); +typedef void (APIENTRYP PFNGLDRAWELEMENTSINSTANCEDBASEVERTEXBASEINSTANCEPROC) (GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei instancecount, GLint basevertex, GLuint baseinstance); +#endif + +#ifndef GL_ARB_shading_language_420pack +#define GL_ARB_shading_language_420pack 1 +#endif + +#ifndef GL_ARB_transform_feedback_instanced +#define GL_ARB_transform_feedback_instanced 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glDrawTransformFeedbackInstanced (GLenum mode, GLuint id, GLsizei instancecount); +GLAPI void APIENTRY glDrawTransformFeedbackStreamInstanced (GLenum mode, GLuint id, GLuint stream, GLsizei instancecount); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLDRAWTRANSFORMFEEDBACKINSTANCEDPROC) (GLenum mode, GLuint id, GLsizei instancecount); +typedef void (APIENTRYP PFNGLDRAWTRANSFORMFEEDBACKSTREAMINSTANCEDPROC) (GLenum mode, GLuint id, GLuint stream, GLsizei instancecount); +#endif + +#ifndef GL_ARB_compressed_texture_pixel_storage +#define GL_ARB_compressed_texture_pixel_storage 1 +#endif + +#ifndef GL_ARB_conservative_depth +#define GL_ARB_conservative_depth 1 +#endif + +#ifndef GL_ARB_internalformat_query +#define GL_ARB_internalformat_query 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glGetInternalformativ (GLenum target, GLenum internalformat, GLenum pname, GLsizei bufSize, GLint *params); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLGETINTERNALFORMATIVPROC) (GLenum target, GLenum internalformat, GLenum pname, GLsizei bufSize, GLint *params); +#endif + +#ifndef GL_ARB_map_buffer_alignment +#define GL_ARB_map_buffer_alignment 1 +#endif + +#ifndef GL_ARB_shader_atomic_counters +#define GL_ARB_shader_atomic_counters 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glGetActiveAtomicCounterBufferiv (GLuint program, GLuint bufferIndex, GLenum pname, GLint *params); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLGETACTIVEATOMICCOUNTERBUFFERIVPROC) (GLuint program, GLuint bufferIndex, GLenum pname, GLint *params); +#endif + +#ifndef GL_ARB_shader_image_load_store +#define GL_ARB_shader_image_load_store 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glBindImageTexture (GLuint unit, GLuint texture, GLint level, GLboolean layered, GLint layer, GLenum access, GLenum format); +GLAPI void APIENTRY glMemoryBarrier (GLbitfield barriers); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLBINDIMAGETEXTUREPROC) (GLuint unit, GLuint texture, GLint level, GLboolean layered, GLint layer, GLenum access, GLenum format); +typedef void (APIENTRYP PFNGLMEMORYBARRIERPROC) (GLbitfield barriers); +#endif + +#ifndef GL_ARB_shading_language_packing +#define GL_ARB_shading_language_packing 1 +#endif + +#ifndef GL_ARB_texture_storage +#define GL_ARB_texture_storage 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glTexStorage1D (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width); +GLAPI void APIENTRY glTexStorage2D (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height); +GLAPI void APIENTRY glTexStorage3D (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth); +GLAPI void APIENTRY glTextureStorage1DEXT (GLuint texture, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width); +GLAPI void APIENTRY glTextureStorage2DEXT (GLuint texture, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height); +GLAPI void APIENTRY glTextureStorage3DEXT (GLuint texture, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLTEXSTORAGE1DPROC) (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width); +typedef void (APIENTRYP PFNGLTEXSTORAGE2DPROC) (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height); +typedef void (APIENTRYP PFNGLTEXSTORAGE3DPROC) (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth); +typedef void (APIENTRYP PFNGLTEXTURESTORAGE1DEXTPROC) (GLuint texture, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width); +typedef void (APIENTRYP PFNGLTEXTURESTORAGE2DEXTPROC) (GLuint texture, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height); +typedef void (APIENTRYP PFNGLTEXTURESTORAGE3DEXTPROC) (GLuint texture, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth); +#endif + +#ifndef GL_KHR_texture_compression_astc_ldr +#define GL_KHR_texture_compression_astc_ldr 1 +#endif + +#ifndef GL_KHR_debug +#define GL_KHR_debug 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glDebugMessageControl (GLenum source, GLenum type, GLenum severity, GLsizei count, const GLuint *ids, GLboolean enabled); +GLAPI void APIENTRY glDebugMessageInsert (GLenum source, GLenum type, GLuint id, GLenum severity, GLsizei length, const GLchar *buf); +GLAPI void APIENTRY glDebugMessageCallback (GLDEBUGPROC callback, const void *userParam); +GLAPI GLuint APIENTRY glGetDebugMessageLog (GLuint count, GLsizei bufsize, GLenum *sources, GLenum *types, GLuint *ids, GLenum *severities, GLsizei *lengths, GLchar *messageLog); +GLAPI void APIENTRY glPushDebugGroup (GLenum source, GLuint id, GLsizei length, const GLchar *message); +GLAPI void APIENTRY glPopDebugGroup (void); +GLAPI void APIENTRY glObjectLabel (GLenum identifier, GLuint name, GLsizei length, const GLchar *label); +GLAPI void APIENTRY glGetObjectLabel (GLenum identifier, GLuint name, GLsizei bufSize, GLsizei *length, GLchar *label); +GLAPI void APIENTRY glObjectPtrLabel (const void *ptr, GLsizei length, const GLchar *label); +GLAPI void APIENTRY glGetObjectPtrLabel (const void *ptr, GLsizei bufSize, GLsizei *length, GLchar *label); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLDEBUGMESSAGECONTROLPROC) (GLenum source, GLenum type, GLenum severity, GLsizei count, const GLuint *ids, GLboolean enabled); +typedef void (APIENTRYP PFNGLDEBUGMESSAGEINSERTPROC) (GLenum source, GLenum type, GLuint id, GLenum severity, GLsizei length, const GLchar *buf); +typedef void (APIENTRYP PFNGLDEBUGMESSAGECALLBACKPROC) (GLDEBUGPROC callback, const void *userParam); +typedef GLuint (APIENTRYP PFNGLGETDEBUGMESSAGELOGPROC) (GLuint count, GLsizei bufsize, GLenum *sources, GLenum *types, GLuint *ids, GLenum *severities, GLsizei *lengths, GLchar *messageLog); +typedef void (APIENTRYP PFNGLPUSHDEBUGGROUPPROC) (GLenum source, GLuint id, GLsizei length, const GLchar *message); +typedef void (APIENTRYP PFNGLPOPDEBUGGROUPPROC) (void); +typedef void (APIENTRYP PFNGLOBJECTLABELPROC) (GLenum identifier, GLuint name, GLsizei length, const GLchar *label); +typedef void (APIENTRYP PFNGLGETOBJECTLABELPROC) (GLenum identifier, GLuint name, GLsizei bufSize, GLsizei *length, GLchar *label); +typedef void (APIENTRYP PFNGLOBJECTPTRLABELPROC) (const void *ptr, GLsizei length, const GLchar *label); +typedef void (APIENTRYP PFNGLGETOBJECTPTRLABELPROC) (const void *ptr, GLsizei bufSize, GLsizei *length, GLchar *label); +#endif + +#ifndef GL_ARB_arrays_of_arrays +#define GL_ARB_arrays_of_arrays 1 +#endif + +#ifndef GL_ARB_clear_buffer_object +#define GL_ARB_clear_buffer_object 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glClearBufferData (GLenum target, GLenum internalformat, GLenum format, GLenum type, const void *data); +GLAPI void APIENTRY glClearBufferSubData (GLenum target, GLenum internalformat, GLintptr offset, GLsizeiptr size, GLenum format, GLenum type, const void *data); +GLAPI void APIENTRY glClearNamedBufferDataEXT (GLuint buffer, GLenum internalformat, GLenum format, GLenum type, const void *data); +GLAPI void APIENTRY glClearNamedBufferSubDataEXT (GLuint buffer, GLenum internalformat, GLenum format, GLenum type, GLsizeiptr offset, GLsizeiptr size, const void *data); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLCLEARBUFFERDATAPROC) (GLenum target, GLenum internalformat, GLenum format, GLenum type, const void *data); +typedef void (APIENTRYP PFNGLCLEARBUFFERSUBDATAPROC) (GLenum target, GLenum internalformat, GLintptr offset, GLsizeiptr size, GLenum format, GLenum type, const void *data); +typedef void (APIENTRYP PFNGLCLEARNAMEDBUFFERDATAEXTPROC) (GLuint buffer, GLenum internalformat, GLenum format, GLenum type, const void *data); +typedef void (APIENTRYP PFNGLCLEARNAMEDBUFFERSUBDATAEXTPROC) (GLuint buffer, GLenum internalformat, GLenum format, GLenum type, GLsizeiptr offset, GLsizeiptr size, const void *data); +#endif + +#ifndef GL_ARB_compute_shader +#define GL_ARB_compute_shader 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glDispatchCompute (GLuint num_groups_x, GLuint num_groups_y, GLuint num_groups_z); +GLAPI void APIENTRY glDispatchComputeIndirect (GLintptr indirect); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLDISPATCHCOMPUTEPROC) (GLuint num_groups_x, GLuint num_groups_y, GLuint num_groups_z); +typedef void (APIENTRYP PFNGLDISPATCHCOMPUTEINDIRECTPROC) (GLintptr indirect); +#endif + +#ifndef GL_ARB_copy_image +#define GL_ARB_copy_image 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glCopyImageSubData (GLuint srcName, GLenum srcTarget, GLint srcLevel, GLint srcX, GLint srcY, GLint srcZ, GLuint dstName, GLenum dstTarget, GLint dstLevel, GLint dstX, GLint dstY, GLint dstZ, GLsizei srcWidth, GLsizei srcHeight, GLsizei srcDepth); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLCOPYIMAGESUBDATAPROC) (GLuint srcName, GLenum srcTarget, GLint srcLevel, GLint srcX, GLint srcY, GLint srcZ, GLuint dstName, GLenum dstTarget, GLint dstLevel, GLint dstX, GLint dstY, GLint dstZ, GLsizei srcWidth, GLsizei srcHeight, GLsizei srcDepth); +#endif + +#ifndef GL_ARB_texture_view +#define GL_ARB_texture_view 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glTextureView (GLuint texture, GLenum target, GLuint origtexture, GLenum internalformat, GLuint minlevel, GLuint numlevels, GLuint minlayer, GLuint numlayers); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLTEXTUREVIEWPROC) (GLuint texture, GLenum target, GLuint origtexture, GLenum internalformat, GLuint minlevel, GLuint numlevels, GLuint minlayer, GLuint numlayers); +#endif + +#ifndef GL_ARB_vertex_attrib_binding +#define GL_ARB_vertex_attrib_binding 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glBindVertexBuffer (GLuint bindingindex, GLuint buffer, GLintptr offset, GLsizei stride); +GLAPI void APIENTRY glVertexAttribFormat (GLuint attribindex, GLint size, GLenum type, GLboolean normalized, GLuint relativeoffset); +GLAPI void APIENTRY glVertexAttribIFormat (GLuint attribindex, GLint size, GLenum type, GLuint relativeoffset); +GLAPI void APIENTRY glVertexAttribLFormat (GLuint attribindex, GLint size, GLenum type, GLuint relativeoffset); +GLAPI void APIENTRY glVertexAttribBinding (GLuint attribindex, GLuint bindingindex); +GLAPI void APIENTRY glVertexBindingDivisor (GLuint bindingindex, GLuint divisor); +GLAPI void APIENTRY glVertexArrayBindVertexBufferEXT (GLuint vaobj, GLuint bindingindex, GLuint buffer, GLintptr offset, GLsizei stride); +GLAPI void APIENTRY glVertexArrayVertexAttribFormatEXT (GLuint vaobj, GLuint attribindex, GLint size, GLenum type, GLboolean normalized, GLuint relativeoffset); +GLAPI void APIENTRY glVertexArrayVertexAttribIFormatEXT (GLuint vaobj, GLuint attribindex, GLint size, GLenum type, GLuint relativeoffset); +GLAPI void APIENTRY glVertexArrayVertexAttribLFormatEXT (GLuint vaobj, GLuint attribindex, GLint size, GLenum type, GLuint relativeoffset); +GLAPI void APIENTRY glVertexArrayVertexAttribBindingEXT (GLuint vaobj, GLuint attribindex, GLuint bindingindex); +GLAPI void APIENTRY glVertexArrayVertexBindingDivisorEXT (GLuint vaobj, GLuint bindingindex, GLuint divisor); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLBINDVERTEXBUFFERPROC) (GLuint bindingindex, GLuint buffer, GLintptr offset, GLsizei stride); +typedef void (APIENTRYP PFNGLVERTEXATTRIBFORMATPROC) (GLuint attribindex, GLint size, GLenum type, GLboolean normalized, GLuint relativeoffset); +typedef void (APIENTRYP PFNGLVERTEXATTRIBIFORMATPROC) (GLuint attribindex, GLint size, GLenum type, GLuint relativeoffset); +typedef void (APIENTRYP PFNGLVERTEXATTRIBLFORMATPROC) (GLuint attribindex, GLint size, GLenum type, GLuint relativeoffset); +typedef void (APIENTRYP PFNGLVERTEXATTRIBBINDINGPROC) (GLuint attribindex, GLuint bindingindex); +typedef void (APIENTRYP PFNGLVERTEXBINDINGDIVISORPROC) (GLuint bindingindex, GLuint divisor); +typedef void (APIENTRYP PFNGLVERTEXARRAYBINDVERTEXBUFFEREXTPROC) (GLuint vaobj, GLuint bindingindex, GLuint buffer, GLintptr offset, GLsizei stride); +typedef void (APIENTRYP PFNGLVERTEXARRAYVERTEXATTRIBFORMATEXTPROC) (GLuint vaobj, GLuint attribindex, GLint size, GLenum type, GLboolean normalized, GLuint relativeoffset); +typedef void (APIENTRYP PFNGLVERTEXARRAYVERTEXATTRIBIFORMATEXTPROC) (GLuint vaobj, GLuint attribindex, GLint size, GLenum type, GLuint relativeoffset); +typedef void (APIENTRYP PFNGLVERTEXARRAYVERTEXATTRIBLFORMATEXTPROC) (GLuint vaobj, GLuint attribindex, GLint size, GLenum type, GLuint relativeoffset); +typedef void (APIENTRYP PFNGLVERTEXARRAYVERTEXATTRIBBINDINGEXTPROC) (GLuint vaobj, GLuint attribindex, GLuint bindingindex); +typedef void (APIENTRYP PFNGLVERTEXARRAYVERTEXBINDINGDIVISOREXTPROC) (GLuint vaobj, GLuint bindingindex, GLuint divisor); +#endif + +#ifndef GL_ARB_robustness_isolation +#define GL_ARB_robustness_isolation 1 +#endif + +#ifndef GL_ARB_ES3_compatibility +#define GL_ARB_ES3_compatibility 1 +#endif + +#ifndef GL_ARB_explicit_uniform_location +#define GL_ARB_explicit_uniform_location 1 +#endif + +#ifndef GL_ARB_fragment_layer_viewport +#define GL_ARB_fragment_layer_viewport 1 +#endif + +#ifndef GL_ARB_framebuffer_no_attachments +#define GL_ARB_framebuffer_no_attachments 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glFramebufferParameteri (GLenum target, GLenum pname, GLint param); +GLAPI void APIENTRY glGetFramebufferParameteriv (GLenum target, GLenum pname, GLint *params); +GLAPI void APIENTRY glNamedFramebufferParameteriEXT (GLuint framebuffer, GLenum pname, GLint param); +GLAPI void APIENTRY glGetNamedFramebufferParameterivEXT (GLuint framebuffer, GLenum pname, GLint *params); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLFRAMEBUFFERPARAMETERIPROC) (GLenum target, GLenum pname, GLint param); +typedef void (APIENTRYP PFNGLGETFRAMEBUFFERPARAMETERIVPROC) (GLenum target, GLenum pname, GLint *params); +typedef void (APIENTRYP PFNGLNAMEDFRAMEBUFFERPARAMETERIEXTPROC) (GLuint framebuffer, GLenum pname, GLint param); +typedef void (APIENTRYP PFNGLGETNAMEDFRAMEBUFFERPARAMETERIVEXTPROC) (GLuint framebuffer, GLenum pname, GLint *params); +#endif + +#ifndef GL_ARB_internalformat_query2 +#define GL_ARB_internalformat_query2 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glGetInternalformati64v (GLenum target, GLenum internalformat, GLenum pname, GLsizei bufSize, GLint64 *params); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLGETINTERNALFORMATI64VPROC) (GLenum target, GLenum internalformat, GLenum pname, GLsizei bufSize, GLint64 *params); +#endif + +#ifndef GL_ARB_invalidate_subdata +#define GL_ARB_invalidate_subdata 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glInvalidateTexSubImage (GLuint texture, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth); +GLAPI void APIENTRY glInvalidateTexImage (GLuint texture, GLint level); +GLAPI void APIENTRY glInvalidateBufferSubData (GLuint buffer, GLintptr offset, GLsizeiptr length); +GLAPI void APIENTRY glInvalidateBufferData (GLuint buffer); +GLAPI void APIENTRY glInvalidateFramebuffer (GLenum target, GLsizei numAttachments, const GLenum *attachments); +GLAPI void APIENTRY glInvalidateSubFramebuffer (GLenum target, GLsizei numAttachments, const GLenum *attachments, GLint x, GLint y, GLsizei width, GLsizei height); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLINVALIDATETEXSUBIMAGEPROC) (GLuint texture, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth); +typedef void (APIENTRYP PFNGLINVALIDATETEXIMAGEPROC) (GLuint texture, GLint level); +typedef void (APIENTRYP PFNGLINVALIDATEBUFFERSUBDATAPROC) (GLuint buffer, GLintptr offset, GLsizeiptr length); +typedef void (APIENTRYP PFNGLINVALIDATEBUFFERDATAPROC) (GLuint buffer); +typedef void (APIENTRYP PFNGLINVALIDATEFRAMEBUFFERPROC) (GLenum target, GLsizei numAttachments, const GLenum *attachments); +typedef void (APIENTRYP PFNGLINVALIDATESUBFRAMEBUFFERPROC) (GLenum target, GLsizei numAttachments, const GLenum *attachments, GLint x, GLint y, GLsizei width, GLsizei height); +#endif + +#ifndef GL_ARB_multi_draw_indirect +#define GL_ARB_multi_draw_indirect 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glMultiDrawArraysIndirect (GLenum mode, const void *indirect, GLsizei drawcount, GLsizei stride); +GLAPI void APIENTRY glMultiDrawElementsIndirect (GLenum mode, GLenum type, const void *indirect, GLsizei drawcount, GLsizei stride); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLMULTIDRAWARRAYSINDIRECTPROC) (GLenum mode, const void *indirect, GLsizei drawcount, GLsizei stride); +typedef void (APIENTRYP PFNGLMULTIDRAWELEMENTSINDIRECTPROC) (GLenum mode, GLenum type, const void *indirect, GLsizei drawcount, GLsizei stride); +#endif + +#ifndef GL_ARB_program_interface_query +#define GL_ARB_program_interface_query 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glGetProgramInterfaceiv (GLuint program, GLenum programInterface, GLenum pname, GLint *params); +GLAPI GLuint APIENTRY glGetProgramResourceIndex (GLuint program, GLenum programInterface, const GLchar *name); +GLAPI void APIENTRY glGetProgramResourceName (GLuint program, GLenum programInterface, GLuint index, GLsizei bufSize, GLsizei *length, GLchar *name); +GLAPI void APIENTRY glGetProgramResourceiv (GLuint program, GLenum programInterface, GLuint index, GLsizei propCount, const GLenum *props, GLsizei bufSize, GLsizei *length, GLint *params); +GLAPI GLint APIENTRY glGetProgramResourceLocation (GLuint program, GLenum programInterface, const GLchar *name); +GLAPI GLint APIENTRY glGetProgramResourceLocationIndex (GLuint program, GLenum programInterface, const GLchar *name); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLGETPROGRAMINTERFACEIVPROC) (GLuint program, GLenum programInterface, GLenum pname, GLint *params); +typedef GLuint (APIENTRYP PFNGLGETPROGRAMRESOURCEINDEXPROC) (GLuint program, GLenum programInterface, const GLchar *name); +typedef void (APIENTRYP PFNGLGETPROGRAMRESOURCENAMEPROC) (GLuint program, GLenum programInterface, GLuint index, GLsizei bufSize, GLsizei *length, GLchar *name); +typedef void (APIENTRYP PFNGLGETPROGRAMRESOURCEIVPROC) (GLuint program, GLenum programInterface, GLuint index, GLsizei propCount, const GLenum *props, GLsizei bufSize, GLsizei *length, GLint *params); +typedef GLint (APIENTRYP PFNGLGETPROGRAMRESOURCELOCATIONPROC) (GLuint program, GLenum programInterface, const GLchar *name); +typedef GLint (APIENTRYP PFNGLGETPROGRAMRESOURCELOCATIONINDEXPROC) (GLuint program, GLenum programInterface, const GLchar *name); +#endif + +#ifndef GL_ARB_robust_buffer_access_behavior +#define GL_ARB_robust_buffer_access_behavior 1 +#endif + +#ifndef GL_ARB_shader_image_size +#define GL_ARB_shader_image_size 1 +#endif + +#ifndef GL_ARB_shader_storage_buffer_object +#define GL_ARB_shader_storage_buffer_object 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glShaderStorageBlockBinding (GLuint program, GLuint storageBlockIndex, GLuint storageBlockBinding); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLSHADERSTORAGEBLOCKBINDINGPROC) (GLuint program, GLuint storageBlockIndex, GLuint storageBlockBinding); +#endif + +#ifndef GL_ARB_stencil_texturing +#define GL_ARB_stencil_texturing 1 +#endif + +#ifndef GL_ARB_texture_buffer_range +#define GL_ARB_texture_buffer_range 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glTexBufferRange (GLenum target, GLenum internalformat, GLuint buffer, GLintptr offset, GLsizeiptr size); +GLAPI void APIENTRY glTextureBufferRangeEXT (GLuint texture, GLenum target, GLenum internalformat, GLuint buffer, GLintptr offset, GLsizeiptr size); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLTEXBUFFERRANGEPROC) (GLenum target, GLenum internalformat, GLuint buffer, GLintptr offset, GLsizeiptr size); +typedef void (APIENTRYP PFNGLTEXTUREBUFFERRANGEEXTPROC) (GLuint texture, GLenum target, GLenum internalformat, GLuint buffer, GLintptr offset, GLsizeiptr size); +#endif + +#ifndef GL_ARB_texture_query_levels +#define GL_ARB_texture_query_levels 1 +#endif + +#ifndef GL_ARB_texture_storage_multisample +#define GL_ARB_texture_storage_multisample 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glTexStorage2DMultisample (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLboolean fixedsamplelocations); +GLAPI void APIENTRY glTexStorage3DMultisample (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedsamplelocations); +GLAPI void APIENTRY glTextureStorage2DMultisampleEXT (GLuint texture, GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLboolean fixedsamplelocations); +GLAPI void APIENTRY glTextureStorage3DMultisampleEXT (GLuint texture, GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedsamplelocations); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLTEXSTORAGE2DMULTISAMPLEPROC) (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLboolean fixedsamplelocations); +typedef void (APIENTRYP PFNGLTEXSTORAGE3DMULTISAMPLEPROC) (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedsamplelocations); +typedef void (APIENTRYP PFNGLTEXTURESTORAGE2DMULTISAMPLEEXTPROC) (GLuint texture, GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLboolean fixedsamplelocations); +typedef void (APIENTRYP PFNGLTEXTURESTORAGE3DMULTISAMPLEEXTPROC) (GLuint texture, GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedsamplelocations); +#endif + +#ifndef GL_EXT_abgr +#define GL_EXT_abgr 1 +#endif + +#ifndef GL_EXT_blend_color +#define GL_EXT_blend_color 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glBlendColorEXT (GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLBLENDCOLOREXTPROC) (GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha); +#endif + +#ifndef GL_EXT_polygon_offset +#define GL_EXT_polygon_offset 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glPolygonOffsetEXT (GLfloat factor, GLfloat bias); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLPOLYGONOFFSETEXTPROC) (GLfloat factor, GLfloat bias); +#endif + +#ifndef GL_EXT_texture +#define GL_EXT_texture 1 +#endif + +#ifndef GL_EXT_texture3D +#define GL_EXT_texture3D 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glTexImage3DEXT (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const GLvoid *pixels); +GLAPI void APIENTRY glTexSubImage3DEXT (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const GLvoid *pixels); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLTEXIMAGE3DEXTPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const GLvoid *pixels); +typedef void (APIENTRYP PFNGLTEXSUBIMAGE3DEXTPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const GLvoid *pixels); +#endif + +#ifndef GL_SGIS_texture_filter4 +#define GL_SGIS_texture_filter4 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glGetTexFilterFuncSGIS (GLenum target, GLenum filter, GLfloat *weights); +GLAPI void APIENTRY glTexFilterFuncSGIS (GLenum target, GLenum filter, GLsizei n, const GLfloat *weights); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLGETTEXFILTERFUNCSGISPROC) (GLenum target, GLenum filter, GLfloat *weights); +typedef void (APIENTRYP PFNGLTEXFILTERFUNCSGISPROC) (GLenum target, GLenum filter, GLsizei n, const GLfloat *weights); +#endif + +#ifndef GL_EXT_subtexture +#define GL_EXT_subtexture 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glTexSubImage1DEXT (GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLenum type, const GLvoid *pixels); +GLAPI void APIENTRY glTexSubImage2DEXT (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *pixels); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLTEXSUBIMAGE1DEXTPROC) (GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLenum type, const GLvoid *pixels); +typedef void (APIENTRYP PFNGLTEXSUBIMAGE2DEXTPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *pixels); +#endif + +#ifndef GL_EXT_copy_texture +#define GL_EXT_copy_texture 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glCopyTexImage1DEXT (GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLint border); +GLAPI void APIENTRY glCopyTexImage2DEXT (GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border); +GLAPI void APIENTRY glCopyTexSubImage1DEXT (GLenum target, GLint level, GLint xoffset, GLint x, GLint y, GLsizei width); +GLAPI void APIENTRY glCopyTexSubImage2DEXT (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height); +GLAPI void APIENTRY glCopyTexSubImage3DEXT (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLCOPYTEXIMAGE1DEXTPROC) (GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLint border); +typedef void (APIENTRYP PFNGLCOPYTEXIMAGE2DEXTPROC) (GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border); +typedef void (APIENTRYP PFNGLCOPYTEXSUBIMAGE1DEXTPROC) (GLenum target, GLint level, GLint xoffset, GLint x, GLint y, GLsizei width); +typedef void (APIENTRYP PFNGLCOPYTEXSUBIMAGE2DEXTPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height); +typedef void (APIENTRYP PFNGLCOPYTEXSUBIMAGE3DEXTPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height); +#endif + +#ifndef GL_EXT_histogram +#define GL_EXT_histogram 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glGetHistogramEXT (GLenum target, GLboolean reset, GLenum format, GLenum type, GLvoid *values); +GLAPI void APIENTRY glGetHistogramParameterfvEXT (GLenum target, GLenum pname, GLfloat *params); +GLAPI void APIENTRY glGetHistogramParameterivEXT (GLenum target, GLenum pname, GLint *params); +GLAPI void APIENTRY glGetMinmaxEXT (GLenum target, GLboolean reset, GLenum format, GLenum type, GLvoid *values); +GLAPI void APIENTRY glGetMinmaxParameterfvEXT (GLenum target, GLenum pname, GLfloat *params); +GLAPI void APIENTRY glGetMinmaxParameterivEXT (GLenum target, GLenum pname, GLint *params); +GLAPI void APIENTRY glHistogramEXT (GLenum target, GLsizei width, GLenum internalformat, GLboolean sink); +GLAPI void APIENTRY glMinmaxEXT (GLenum target, GLenum internalformat, GLboolean sink); +GLAPI void APIENTRY glResetHistogramEXT (GLenum target); +GLAPI void APIENTRY glResetMinmaxEXT (GLenum target); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLGETHISTOGRAMEXTPROC) (GLenum target, GLboolean reset, GLenum format, GLenum type, GLvoid *values); +typedef void (APIENTRYP PFNGLGETHISTOGRAMPARAMETERFVEXTPROC) (GLenum target, GLenum pname, GLfloat *params); +typedef void (APIENTRYP PFNGLGETHISTOGRAMPARAMETERIVEXTPROC) (GLenum target, GLenum pname, GLint *params); +typedef void (APIENTRYP PFNGLGETMINMAXEXTPROC) (GLenum target, GLboolean reset, GLenum format, GLenum type, GLvoid *values); +typedef void (APIENTRYP PFNGLGETMINMAXPARAMETERFVEXTPROC) (GLenum target, GLenum pname, GLfloat *params); +typedef void (APIENTRYP PFNGLGETMINMAXPARAMETERIVEXTPROC) (GLenum target, GLenum pname, GLint *params); +typedef void (APIENTRYP PFNGLHISTOGRAMEXTPROC) (GLenum target, GLsizei width, GLenum internalformat, GLboolean sink); +typedef void (APIENTRYP PFNGLMINMAXEXTPROC) (GLenum target, GLenum internalformat, GLboolean sink); +typedef void (APIENTRYP PFNGLRESETHISTOGRAMEXTPROC) (GLenum target); +typedef void (APIENTRYP PFNGLRESETMINMAXEXTPROC) (GLenum target); +#endif + +#ifndef GL_EXT_convolution +#define GL_EXT_convolution 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glConvolutionFilter1DEXT (GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const GLvoid *image); +GLAPI void APIENTRY glConvolutionFilter2DEXT (GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *image); +GLAPI void APIENTRY glConvolutionParameterfEXT (GLenum target, GLenum pname, GLfloat params); +GLAPI void APIENTRY glConvolutionParameterfvEXT (GLenum target, GLenum pname, const GLfloat *params); +GLAPI void APIENTRY glConvolutionParameteriEXT (GLenum target, GLenum pname, GLint params); +GLAPI void APIENTRY glConvolutionParameterivEXT (GLenum target, GLenum pname, const GLint *params); +GLAPI void APIENTRY glCopyConvolutionFilter1DEXT (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width); +GLAPI void APIENTRY glCopyConvolutionFilter2DEXT (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height); +GLAPI void APIENTRY glGetConvolutionFilterEXT (GLenum target, GLenum format, GLenum type, GLvoid *image); +GLAPI void APIENTRY glGetConvolutionParameterfvEXT (GLenum target, GLenum pname, GLfloat *params); +GLAPI void APIENTRY glGetConvolutionParameterivEXT (GLenum target, GLenum pname, GLint *params); +GLAPI void APIENTRY glGetSeparableFilterEXT (GLenum target, GLenum format, GLenum type, GLvoid *row, GLvoid *column, GLvoid *span); +GLAPI void APIENTRY glSeparableFilter2DEXT (GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *row, const GLvoid *column); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLCONVOLUTIONFILTER1DEXTPROC) (GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const GLvoid *image); +typedef void (APIENTRYP PFNGLCONVOLUTIONFILTER2DEXTPROC) (GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *image); +typedef void (APIENTRYP PFNGLCONVOLUTIONPARAMETERFEXTPROC) (GLenum target, GLenum pname, GLfloat params); +typedef void (APIENTRYP PFNGLCONVOLUTIONPARAMETERFVEXTPROC) (GLenum target, GLenum pname, const GLfloat *params); +typedef void (APIENTRYP PFNGLCONVOLUTIONPARAMETERIEXTPROC) (GLenum target, GLenum pname, GLint params); +typedef void (APIENTRYP PFNGLCONVOLUTIONPARAMETERIVEXTPROC) (GLenum target, GLenum pname, const GLint *params); +typedef void (APIENTRYP PFNGLCOPYCONVOLUTIONFILTER1DEXTPROC) (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width); +typedef void (APIENTRYP PFNGLCOPYCONVOLUTIONFILTER2DEXTPROC) (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height); +typedef void (APIENTRYP PFNGLGETCONVOLUTIONFILTEREXTPROC) (GLenum target, GLenum format, GLenum type, GLvoid *image); +typedef void (APIENTRYP PFNGLGETCONVOLUTIONPARAMETERFVEXTPROC) (GLenum target, GLenum pname, GLfloat *params); +typedef void (APIENTRYP PFNGLGETCONVOLUTIONPARAMETERIVEXTPROC) (GLenum target, GLenum pname, GLint *params); +typedef void (APIENTRYP PFNGLGETSEPARABLEFILTEREXTPROC) (GLenum target, GLenum format, GLenum type, GLvoid *row, GLvoid *column, GLvoid *span); +typedef void (APIENTRYP PFNGLSEPARABLEFILTER2DEXTPROC) (GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *row, const GLvoid *column); +#endif + +#ifndef GL_SGI_color_matrix +#define GL_SGI_color_matrix 1 +#endif + +#ifndef GL_SGI_color_table +#define GL_SGI_color_table 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glColorTableSGI (GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const GLvoid *table); +GLAPI void APIENTRY glColorTableParameterfvSGI (GLenum target, GLenum pname, const GLfloat *params); +GLAPI void APIENTRY glColorTableParameterivSGI (GLenum target, GLenum pname, const GLint *params); +GLAPI void APIENTRY glCopyColorTableSGI (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width); +GLAPI void APIENTRY glGetColorTableSGI (GLenum target, GLenum format, GLenum type, GLvoid *table); +GLAPI void APIENTRY glGetColorTableParameterfvSGI (GLenum target, GLenum pname, GLfloat *params); +GLAPI void APIENTRY glGetColorTableParameterivSGI (GLenum target, GLenum pname, GLint *params); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLCOLORTABLESGIPROC) (GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const GLvoid *table); +typedef void (APIENTRYP PFNGLCOLORTABLEPARAMETERFVSGIPROC) (GLenum target, GLenum pname, const GLfloat *params); +typedef void (APIENTRYP PFNGLCOLORTABLEPARAMETERIVSGIPROC) (GLenum target, GLenum pname, const GLint *params); +typedef void (APIENTRYP PFNGLCOPYCOLORTABLESGIPROC) (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width); +typedef void (APIENTRYP PFNGLGETCOLORTABLESGIPROC) (GLenum target, GLenum format, GLenum type, GLvoid *table); +typedef void (APIENTRYP PFNGLGETCOLORTABLEPARAMETERFVSGIPROC) (GLenum target, GLenum pname, GLfloat *params); +typedef void (APIENTRYP PFNGLGETCOLORTABLEPARAMETERIVSGIPROC) (GLenum target, GLenum pname, GLint *params); +#endif + +#ifndef GL_SGIX_pixel_texture +#define GL_SGIX_pixel_texture 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glPixelTexGenSGIX (GLenum mode); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLPIXELTEXGENSGIXPROC) (GLenum mode); +#endif + +#ifndef GL_SGIS_pixel_texture +#define GL_SGIS_pixel_texture 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glPixelTexGenParameteriSGIS (GLenum pname, GLint param); +GLAPI void APIENTRY glPixelTexGenParameterivSGIS (GLenum pname, const GLint *params); +GLAPI void APIENTRY glPixelTexGenParameterfSGIS (GLenum pname, GLfloat param); +GLAPI void APIENTRY glPixelTexGenParameterfvSGIS (GLenum pname, const GLfloat *params); +GLAPI void APIENTRY glGetPixelTexGenParameterivSGIS (GLenum pname, GLint *params); +GLAPI void APIENTRY glGetPixelTexGenParameterfvSGIS (GLenum pname, GLfloat *params); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLPIXELTEXGENPARAMETERISGISPROC) (GLenum pname, GLint param); +typedef void (APIENTRYP PFNGLPIXELTEXGENPARAMETERIVSGISPROC) (GLenum pname, const GLint *params); +typedef void (APIENTRYP PFNGLPIXELTEXGENPARAMETERFSGISPROC) (GLenum pname, GLfloat param); +typedef void (APIENTRYP PFNGLPIXELTEXGENPARAMETERFVSGISPROC) (GLenum pname, const GLfloat *params); +typedef void (APIENTRYP PFNGLGETPIXELTEXGENPARAMETERIVSGISPROC) (GLenum pname, GLint *params); +typedef void (APIENTRYP PFNGLGETPIXELTEXGENPARAMETERFVSGISPROC) (GLenum pname, GLfloat *params); +#endif + +#ifndef GL_SGIS_texture4D +#define GL_SGIS_texture4D 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glTexImage4DSGIS (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLsizei size4d, GLint border, GLenum format, GLenum type, const GLvoid *pixels); +GLAPI void APIENTRY glTexSubImage4DSGIS (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint woffset, GLsizei width, GLsizei height, GLsizei depth, GLsizei size4d, GLenum format, GLenum type, const GLvoid *pixels); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLTEXIMAGE4DSGISPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLsizei size4d, GLint border, GLenum format, GLenum type, const GLvoid *pixels); +typedef void (APIENTRYP PFNGLTEXSUBIMAGE4DSGISPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint woffset, GLsizei width, GLsizei height, GLsizei depth, GLsizei size4d, GLenum format, GLenum type, const GLvoid *pixels); +#endif + +#ifndef GL_SGI_texture_color_table +#define GL_SGI_texture_color_table 1 +#endif + +#ifndef GL_EXT_cmyka +#define GL_EXT_cmyka 1 +#endif + +#ifndef GL_EXT_texture_object +#define GL_EXT_texture_object 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI GLboolean APIENTRY glAreTexturesResidentEXT (GLsizei n, const GLuint *textures, GLboolean *residences); +GLAPI void APIENTRY glBindTextureEXT (GLenum target, GLuint texture); +GLAPI void APIENTRY glDeleteTexturesEXT (GLsizei n, const GLuint *textures); +GLAPI void APIENTRY glGenTexturesEXT (GLsizei n, GLuint *textures); +GLAPI GLboolean APIENTRY glIsTextureEXT (GLuint texture); +GLAPI void APIENTRY glPrioritizeTexturesEXT (GLsizei n, const GLuint *textures, const GLclampf *priorities); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef GLboolean (APIENTRYP PFNGLARETEXTURESRESIDENTEXTPROC) (GLsizei n, const GLuint *textures, GLboolean *residences); +typedef void (APIENTRYP PFNGLBINDTEXTUREEXTPROC) (GLenum target, GLuint texture); +typedef void (APIENTRYP PFNGLDELETETEXTURESEXTPROC) (GLsizei n, const GLuint *textures); +typedef void (APIENTRYP PFNGLGENTEXTURESEXTPROC) (GLsizei n, GLuint *textures); +typedef GLboolean (APIENTRYP PFNGLISTEXTUREEXTPROC) (GLuint texture); +typedef void (APIENTRYP PFNGLPRIORITIZETEXTURESEXTPROC) (GLsizei n, const GLuint *textures, const GLclampf *priorities); +#endif + +#ifndef GL_SGIS_detail_texture +#define GL_SGIS_detail_texture 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glDetailTexFuncSGIS (GLenum target, GLsizei n, const GLfloat *points); +GLAPI void APIENTRY glGetDetailTexFuncSGIS (GLenum target, GLfloat *points); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLDETAILTEXFUNCSGISPROC) (GLenum target, GLsizei n, const GLfloat *points); +typedef void (APIENTRYP PFNGLGETDETAILTEXFUNCSGISPROC) (GLenum target, GLfloat *points); +#endif + +#ifndef GL_SGIS_sharpen_texture +#define GL_SGIS_sharpen_texture 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glSharpenTexFuncSGIS (GLenum target, GLsizei n, const GLfloat *points); +GLAPI void APIENTRY glGetSharpenTexFuncSGIS (GLenum target, GLfloat *points); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLSHARPENTEXFUNCSGISPROC) (GLenum target, GLsizei n, const GLfloat *points); +typedef void (APIENTRYP PFNGLGETSHARPENTEXFUNCSGISPROC) (GLenum target, GLfloat *points); +#endif + +#ifndef GL_EXT_packed_pixels +#define GL_EXT_packed_pixels 1 +#endif + +#ifndef GL_SGIS_texture_lod +#define GL_SGIS_texture_lod 1 +#endif + +#ifndef GL_SGIS_multisample +#define GL_SGIS_multisample 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glSampleMaskSGIS (GLclampf value, GLboolean invert); +GLAPI void APIENTRY glSamplePatternSGIS (GLenum pattern); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLSAMPLEMASKSGISPROC) (GLclampf value, GLboolean invert); +typedef void (APIENTRYP PFNGLSAMPLEPATTERNSGISPROC) (GLenum pattern); +#endif + +#ifndef GL_EXT_rescale_normal +#define GL_EXT_rescale_normal 1 +#endif + +#ifndef GL_EXT_vertex_array +#define GL_EXT_vertex_array 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glArrayElementEXT (GLint i); +GLAPI void APIENTRY glColorPointerEXT (GLint size, GLenum type, GLsizei stride, GLsizei count, const GLvoid *pointer); +GLAPI void APIENTRY glDrawArraysEXT (GLenum mode, GLint first, GLsizei count); +GLAPI void APIENTRY glEdgeFlagPointerEXT (GLsizei stride, GLsizei count, const GLboolean *pointer); +GLAPI void APIENTRY glGetPointervEXT (GLenum pname, GLvoid* *params); +GLAPI void APIENTRY glIndexPointerEXT (GLenum type, GLsizei stride, GLsizei count, const GLvoid *pointer); +GLAPI void APIENTRY glNormalPointerEXT (GLenum type, GLsizei stride, GLsizei count, const GLvoid *pointer); +GLAPI void APIENTRY glTexCoordPointerEXT (GLint size, GLenum type, GLsizei stride, GLsizei count, const GLvoid *pointer); +GLAPI void APIENTRY glVertexPointerEXT (GLint size, GLenum type, GLsizei stride, GLsizei count, const GLvoid *pointer); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLARRAYELEMENTEXTPROC) (GLint i); +typedef void (APIENTRYP PFNGLCOLORPOINTEREXTPROC) (GLint size, GLenum type, GLsizei stride, GLsizei count, const GLvoid *pointer); +typedef void (APIENTRYP PFNGLDRAWARRAYSEXTPROC) (GLenum mode, GLint first, GLsizei count); +typedef void (APIENTRYP PFNGLEDGEFLAGPOINTEREXTPROC) (GLsizei stride, GLsizei count, const GLboolean *pointer); +typedef void (APIENTRYP PFNGLGETPOINTERVEXTPROC) (GLenum pname, GLvoid* *params); +typedef void (APIENTRYP PFNGLINDEXPOINTEREXTPROC) (GLenum type, GLsizei stride, GLsizei count, const GLvoid *pointer); +typedef void (APIENTRYP PFNGLNORMALPOINTEREXTPROC) (GLenum type, GLsizei stride, GLsizei count, const GLvoid *pointer); +typedef void (APIENTRYP PFNGLTEXCOORDPOINTEREXTPROC) (GLint size, GLenum type, GLsizei stride, GLsizei count, const GLvoid *pointer); +typedef void (APIENTRYP PFNGLVERTEXPOINTEREXTPROC) (GLint size, GLenum type, GLsizei stride, GLsizei count, const GLvoid *pointer); +#endif + +#ifndef GL_EXT_misc_attribute +#define GL_EXT_misc_attribute 1 +#endif + +#ifndef GL_SGIS_generate_mipmap +#define GL_SGIS_generate_mipmap 1 +#endif + +#ifndef GL_SGIX_clipmap +#define GL_SGIX_clipmap 1 +#endif + +#ifndef GL_SGIX_shadow +#define GL_SGIX_shadow 1 +#endif + +#ifndef GL_SGIS_texture_edge_clamp +#define GL_SGIS_texture_edge_clamp 1 +#endif + +#ifndef GL_SGIS_texture_border_clamp +#define GL_SGIS_texture_border_clamp 1 +#endif + +#ifndef GL_EXT_blend_minmax +#define GL_EXT_blend_minmax 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glBlendEquationEXT (GLenum mode); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLBLENDEQUATIONEXTPROC) (GLenum mode); +#endif + +#ifndef GL_EXT_blend_subtract +#define GL_EXT_blend_subtract 1 +#endif + +#ifndef GL_EXT_blend_logic_op +#define GL_EXT_blend_logic_op 1 +#endif + +#ifndef GL_SGIX_interlace +#define GL_SGIX_interlace 1 +#endif + +#ifndef GL_SGIX_pixel_tiles +#define GL_SGIX_pixel_tiles 1 +#endif + +#ifndef GL_SGIX_texture_select +#define GL_SGIX_texture_select 1 +#endif + +#ifndef GL_SGIX_sprite +#define GL_SGIX_sprite 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glSpriteParameterfSGIX (GLenum pname, GLfloat param); +GLAPI void APIENTRY glSpriteParameterfvSGIX (GLenum pname, const GLfloat *params); +GLAPI void APIENTRY glSpriteParameteriSGIX (GLenum pname, GLint param); +GLAPI void APIENTRY glSpriteParameterivSGIX (GLenum pname, const GLint *params); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLSPRITEPARAMETERFSGIXPROC) (GLenum pname, GLfloat param); +typedef void (APIENTRYP PFNGLSPRITEPARAMETERFVSGIXPROC) (GLenum pname, const GLfloat *params); +typedef void (APIENTRYP PFNGLSPRITEPARAMETERISGIXPROC) (GLenum pname, GLint param); +typedef void (APIENTRYP PFNGLSPRITEPARAMETERIVSGIXPROC) (GLenum pname, const GLint *params); +#endif + +#ifndef GL_SGIX_texture_multi_buffer +#define GL_SGIX_texture_multi_buffer 1 +#endif + +#ifndef GL_EXT_point_parameters +#define GL_EXT_point_parameters 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glPointParameterfEXT (GLenum pname, GLfloat param); +GLAPI void APIENTRY glPointParameterfvEXT (GLenum pname, const GLfloat *params); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLPOINTPARAMETERFEXTPROC) (GLenum pname, GLfloat param); +typedef void (APIENTRYP PFNGLPOINTPARAMETERFVEXTPROC) (GLenum pname, const GLfloat *params); +#endif + +#ifndef GL_SGIS_point_parameters +#define GL_SGIS_point_parameters 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glPointParameterfSGIS (GLenum pname, GLfloat param); +GLAPI void APIENTRY glPointParameterfvSGIS (GLenum pname, const GLfloat *params); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLPOINTPARAMETERFSGISPROC) (GLenum pname, GLfloat param); +typedef void (APIENTRYP PFNGLPOINTPARAMETERFVSGISPROC) (GLenum pname, const GLfloat *params); +#endif + +#ifndef GL_SGIX_instruments +#define GL_SGIX_instruments 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI GLint APIENTRY glGetInstrumentsSGIX (void); +GLAPI void APIENTRY glInstrumentsBufferSGIX (GLsizei size, GLint *buffer); +GLAPI GLint APIENTRY glPollInstrumentsSGIX (GLint *marker_p); +GLAPI void APIENTRY glReadInstrumentsSGIX (GLint marker); +GLAPI void APIENTRY glStartInstrumentsSGIX (void); +GLAPI void APIENTRY glStopInstrumentsSGIX (GLint marker); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef GLint (APIENTRYP PFNGLGETINSTRUMENTSSGIXPROC) (void); +typedef void (APIENTRYP PFNGLINSTRUMENTSBUFFERSGIXPROC) (GLsizei size, GLint *buffer); +typedef GLint (APIENTRYP PFNGLPOLLINSTRUMENTSSGIXPROC) (GLint *marker_p); +typedef void (APIENTRYP PFNGLREADINSTRUMENTSSGIXPROC) (GLint marker); +typedef void (APIENTRYP PFNGLSTARTINSTRUMENTSSGIXPROC) (void); +typedef void (APIENTRYP PFNGLSTOPINSTRUMENTSSGIXPROC) (GLint marker); +#endif + +#ifndef GL_SGIX_texture_scale_bias +#define GL_SGIX_texture_scale_bias 1 +#endif + +#ifndef GL_SGIX_framezoom +#define GL_SGIX_framezoom 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glFrameZoomSGIX (GLint factor); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLFRAMEZOOMSGIXPROC) (GLint factor); +#endif + +#ifndef GL_SGIX_tag_sample_buffer +#define GL_SGIX_tag_sample_buffer 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glTagSampleBufferSGIX (void); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLTAGSAMPLEBUFFERSGIXPROC) (void); +#endif + +#ifndef GL_SGIX_polynomial_ffd +#define GL_SGIX_polynomial_ffd 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glDeformationMap3dSGIX (GLenum target, GLdouble u1, GLdouble u2, GLint ustride, GLint uorder, GLdouble v1, GLdouble v2, GLint vstride, GLint vorder, GLdouble w1, GLdouble w2, GLint wstride, GLint worder, const GLdouble *points); +GLAPI void APIENTRY glDeformationMap3fSGIX (GLenum target, GLfloat u1, GLfloat u2, GLint ustride, GLint uorder, GLfloat v1, GLfloat v2, GLint vstride, GLint vorder, GLfloat w1, GLfloat w2, GLint wstride, GLint worder, const GLfloat *points); +GLAPI void APIENTRY glDeformSGIX (GLbitfield mask); +GLAPI void APIENTRY glLoadIdentityDeformationMapSGIX (GLbitfield mask); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLDEFORMATIONMAP3DSGIXPROC) (GLenum target, GLdouble u1, GLdouble u2, GLint ustride, GLint uorder, GLdouble v1, GLdouble v2, GLint vstride, GLint vorder, GLdouble w1, GLdouble w2, GLint wstride, GLint worder, const GLdouble *points); +typedef void (APIENTRYP PFNGLDEFORMATIONMAP3FSGIXPROC) (GLenum target, GLfloat u1, GLfloat u2, GLint ustride, GLint uorder, GLfloat v1, GLfloat v2, GLint vstride, GLint vorder, GLfloat w1, GLfloat w2, GLint wstride, GLint worder, const GLfloat *points); +typedef void (APIENTRYP PFNGLDEFORMSGIXPROC) (GLbitfield mask); +typedef void (APIENTRYP PFNGLLOADIDENTITYDEFORMATIONMAPSGIXPROC) (GLbitfield mask); +#endif + +#ifndef GL_SGIX_reference_plane +#define GL_SGIX_reference_plane 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glReferencePlaneSGIX (const GLdouble *equation); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLREFERENCEPLANESGIXPROC) (const GLdouble *equation); +#endif + +#ifndef GL_SGIX_flush_raster +#define GL_SGIX_flush_raster 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glFlushRasterSGIX (void); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLFLUSHRASTERSGIXPROC) (void); +#endif + +#ifndef GL_SGIX_depth_texture +#define GL_SGIX_depth_texture 1 +#endif + +#ifndef GL_SGIS_fog_function +#define GL_SGIS_fog_function 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glFogFuncSGIS (GLsizei n, const GLfloat *points); +GLAPI void APIENTRY glGetFogFuncSGIS (GLfloat *points); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLFOGFUNCSGISPROC) (GLsizei n, const GLfloat *points); +typedef void (APIENTRYP PFNGLGETFOGFUNCSGISPROC) (GLfloat *points); +#endif + +#ifndef GL_SGIX_fog_offset +#define GL_SGIX_fog_offset 1 +#endif + +#ifndef GL_HP_image_transform +#define GL_HP_image_transform 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glImageTransformParameteriHP (GLenum target, GLenum pname, GLint param); +GLAPI void APIENTRY glImageTransformParameterfHP (GLenum target, GLenum pname, GLfloat param); +GLAPI void APIENTRY glImageTransformParameterivHP (GLenum target, GLenum pname, const GLint *params); +GLAPI void APIENTRY glImageTransformParameterfvHP (GLenum target, GLenum pname, const GLfloat *params); +GLAPI void APIENTRY glGetImageTransformParameterivHP (GLenum target, GLenum pname, GLint *params); +GLAPI void APIENTRY glGetImageTransformParameterfvHP (GLenum target, GLenum pname, GLfloat *params); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLIMAGETRANSFORMPARAMETERIHPPROC) (GLenum target, GLenum pname, GLint param); +typedef void (APIENTRYP PFNGLIMAGETRANSFORMPARAMETERFHPPROC) (GLenum target, GLenum pname, GLfloat param); +typedef void (APIENTRYP PFNGLIMAGETRANSFORMPARAMETERIVHPPROC) (GLenum target, GLenum pname, const GLint *params); +typedef void (APIENTRYP PFNGLIMAGETRANSFORMPARAMETERFVHPPROC) (GLenum target, GLenum pname, const GLfloat *params); +typedef void (APIENTRYP PFNGLGETIMAGETRANSFORMPARAMETERIVHPPROC) (GLenum target, GLenum pname, GLint *params); +typedef void (APIENTRYP PFNGLGETIMAGETRANSFORMPARAMETERFVHPPROC) (GLenum target, GLenum pname, GLfloat *params); +#endif + +#ifndef GL_HP_convolution_border_modes +#define GL_HP_convolution_border_modes 1 +#endif + +#ifndef GL_SGIX_texture_add_env +#define GL_SGIX_texture_add_env 1 +#endif + +#ifndef GL_EXT_color_subtable +#define GL_EXT_color_subtable 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glColorSubTableEXT (GLenum target, GLsizei start, GLsizei count, GLenum format, GLenum type, const GLvoid *data); +GLAPI void APIENTRY glCopyColorSubTableEXT (GLenum target, GLsizei start, GLint x, GLint y, GLsizei width); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLCOLORSUBTABLEEXTPROC) (GLenum target, GLsizei start, GLsizei count, GLenum format, GLenum type, const GLvoid *data); +typedef void (APIENTRYP PFNGLCOPYCOLORSUBTABLEEXTPROC) (GLenum target, GLsizei start, GLint x, GLint y, GLsizei width); +#endif + +#ifndef GL_PGI_vertex_hints +#define GL_PGI_vertex_hints 1 +#endif + +#ifndef GL_PGI_misc_hints +#define GL_PGI_misc_hints 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glHintPGI (GLenum target, GLint mode); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLHINTPGIPROC) (GLenum target, GLint mode); +#endif + +#ifndef GL_EXT_paletted_texture +#define GL_EXT_paletted_texture 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glColorTableEXT (GLenum target, GLenum internalFormat, GLsizei width, GLenum format, GLenum type, const GLvoid *table); +GLAPI void APIENTRY glGetColorTableEXT (GLenum target, GLenum format, GLenum type, GLvoid *data); +GLAPI void APIENTRY glGetColorTableParameterivEXT (GLenum target, GLenum pname, GLint *params); +GLAPI void APIENTRY glGetColorTableParameterfvEXT (GLenum target, GLenum pname, GLfloat *params); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLCOLORTABLEEXTPROC) (GLenum target, GLenum internalFormat, GLsizei width, GLenum format, GLenum type, const GLvoid *table); +typedef void (APIENTRYP PFNGLGETCOLORTABLEEXTPROC) (GLenum target, GLenum format, GLenum type, GLvoid *data); +typedef void (APIENTRYP PFNGLGETCOLORTABLEPARAMETERIVEXTPROC) (GLenum target, GLenum pname, GLint *params); +typedef void (APIENTRYP PFNGLGETCOLORTABLEPARAMETERFVEXTPROC) (GLenum target, GLenum pname, GLfloat *params); +#endif + +#ifndef GL_EXT_clip_volume_hint +#define GL_EXT_clip_volume_hint 1 +#endif + +#ifndef GL_SGIX_list_priority +#define GL_SGIX_list_priority 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glGetListParameterfvSGIX (GLuint list, GLenum pname, GLfloat *params); +GLAPI void APIENTRY glGetListParameterivSGIX (GLuint list, GLenum pname, GLint *params); +GLAPI void APIENTRY glListParameterfSGIX (GLuint list, GLenum pname, GLfloat param); +GLAPI void APIENTRY glListParameterfvSGIX (GLuint list, GLenum pname, const GLfloat *params); +GLAPI void APIENTRY glListParameteriSGIX (GLuint list, GLenum pname, GLint param); +GLAPI void APIENTRY glListParameterivSGIX (GLuint list, GLenum pname, const GLint *params); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLGETLISTPARAMETERFVSGIXPROC) (GLuint list, GLenum pname, GLfloat *params); +typedef void (APIENTRYP PFNGLGETLISTPARAMETERIVSGIXPROC) (GLuint list, GLenum pname, GLint *params); +typedef void (APIENTRYP PFNGLLISTPARAMETERFSGIXPROC) (GLuint list, GLenum pname, GLfloat param); +typedef void (APIENTRYP PFNGLLISTPARAMETERFVSGIXPROC) (GLuint list, GLenum pname, const GLfloat *params); +typedef void (APIENTRYP PFNGLLISTPARAMETERISGIXPROC) (GLuint list, GLenum pname, GLint param); +typedef void (APIENTRYP PFNGLLISTPARAMETERIVSGIXPROC) (GLuint list, GLenum pname, const GLint *params); +#endif + +#ifndef GL_SGIX_ir_instrument1 +#define GL_SGIX_ir_instrument1 1 +#endif + +#ifndef GL_SGIX_calligraphic_fragment +#define GL_SGIX_calligraphic_fragment 1 +#endif + +#ifndef GL_SGIX_texture_lod_bias +#define GL_SGIX_texture_lod_bias 1 +#endif + +#ifndef GL_SGIX_shadow_ambient +#define GL_SGIX_shadow_ambient 1 +#endif + +#ifndef GL_EXT_index_texture +#define GL_EXT_index_texture 1 +#endif + +#ifndef GL_EXT_index_material +#define GL_EXT_index_material 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glIndexMaterialEXT (GLenum face, GLenum mode); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLINDEXMATERIALEXTPROC) (GLenum face, GLenum mode); +#endif + +#ifndef GL_EXT_index_func +#define GL_EXT_index_func 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glIndexFuncEXT (GLenum func, GLclampf ref); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLINDEXFUNCEXTPROC) (GLenum func, GLclampf ref); +#endif + +#ifndef GL_EXT_index_array_formats +#define GL_EXT_index_array_formats 1 +#endif + +#ifndef GL_EXT_compiled_vertex_array +#define GL_EXT_compiled_vertex_array 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glLockArraysEXT (GLint first, GLsizei count); +GLAPI void APIENTRY glUnlockArraysEXT (void); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLLOCKARRAYSEXTPROC) (GLint first, GLsizei count); +typedef void (APIENTRYP PFNGLUNLOCKARRAYSEXTPROC) (void); +#endif + +#ifndef GL_EXT_cull_vertex +#define GL_EXT_cull_vertex 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glCullParameterdvEXT (GLenum pname, GLdouble *params); +GLAPI void APIENTRY glCullParameterfvEXT (GLenum pname, GLfloat *params); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLCULLPARAMETERDVEXTPROC) (GLenum pname, GLdouble *params); +typedef void (APIENTRYP PFNGLCULLPARAMETERFVEXTPROC) (GLenum pname, GLfloat *params); +#endif + +#ifndef GL_SGIX_ycrcb +#define GL_SGIX_ycrcb 1 +#endif + +#ifndef GL_SGIX_fragment_lighting +#define GL_SGIX_fragment_lighting 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glFragmentColorMaterialSGIX (GLenum face, GLenum mode); +GLAPI void APIENTRY glFragmentLightfSGIX (GLenum light, GLenum pname, GLfloat param); +GLAPI void APIENTRY glFragmentLightfvSGIX (GLenum light, GLenum pname, const GLfloat *params); +GLAPI void APIENTRY glFragmentLightiSGIX (GLenum light, GLenum pname, GLint param); +GLAPI void APIENTRY glFragmentLightivSGIX (GLenum light, GLenum pname, const GLint *params); +GLAPI void APIENTRY glFragmentLightModelfSGIX (GLenum pname, GLfloat param); +GLAPI void APIENTRY glFragmentLightModelfvSGIX (GLenum pname, const GLfloat *params); +GLAPI void APIENTRY glFragmentLightModeliSGIX (GLenum pname, GLint param); +GLAPI void APIENTRY glFragmentLightModelivSGIX (GLenum pname, const GLint *params); +GLAPI void APIENTRY glFragmentMaterialfSGIX (GLenum face, GLenum pname, GLfloat param); +GLAPI void APIENTRY glFragmentMaterialfvSGIX (GLenum face, GLenum pname, const GLfloat *params); +GLAPI void APIENTRY glFragmentMaterialiSGIX (GLenum face, GLenum pname, GLint param); +GLAPI void APIENTRY glFragmentMaterialivSGIX (GLenum face, GLenum pname, const GLint *params); +GLAPI void APIENTRY glGetFragmentLightfvSGIX (GLenum light, GLenum pname, GLfloat *params); +GLAPI void APIENTRY glGetFragmentLightivSGIX (GLenum light, GLenum pname, GLint *params); +GLAPI void APIENTRY glGetFragmentMaterialfvSGIX (GLenum face, GLenum pname, GLfloat *params); +GLAPI void APIENTRY glGetFragmentMaterialivSGIX (GLenum face, GLenum pname, GLint *params); +GLAPI void APIENTRY glLightEnviSGIX (GLenum pname, GLint param); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLFRAGMENTCOLORMATERIALSGIXPROC) (GLenum face, GLenum mode); +typedef void (APIENTRYP PFNGLFRAGMENTLIGHTFSGIXPROC) (GLenum light, GLenum pname, GLfloat param); +typedef void (APIENTRYP PFNGLFRAGMENTLIGHTFVSGIXPROC) (GLenum light, GLenum pname, const GLfloat *params); +typedef void (APIENTRYP PFNGLFRAGMENTLIGHTISGIXPROC) (GLenum light, GLenum pname, GLint param); +typedef void (APIENTRYP PFNGLFRAGMENTLIGHTIVSGIXPROC) (GLenum light, GLenum pname, const GLint *params); +typedef void (APIENTRYP PFNGLFRAGMENTLIGHTMODELFSGIXPROC) (GLenum pname, GLfloat param); +typedef void (APIENTRYP PFNGLFRAGMENTLIGHTMODELFVSGIXPROC) (GLenum pname, const GLfloat *params); +typedef void (APIENTRYP PFNGLFRAGMENTLIGHTMODELISGIXPROC) (GLenum pname, GLint param); +typedef void (APIENTRYP PFNGLFRAGMENTLIGHTMODELIVSGIXPROC) (GLenum pname, const GLint *params); +typedef void (APIENTRYP PFNGLFRAGMENTMATERIALFSGIXPROC) (GLenum face, GLenum pname, GLfloat param); +typedef void (APIENTRYP PFNGLFRAGMENTMATERIALFVSGIXPROC) (GLenum face, GLenum pname, const GLfloat *params); +typedef void (APIENTRYP PFNGLFRAGMENTMATERIALISGIXPROC) (GLenum face, GLenum pname, GLint param); +typedef void (APIENTRYP PFNGLFRAGMENTMATERIALIVSGIXPROC) (GLenum face, GLenum pname, const GLint *params); +typedef void (APIENTRYP PFNGLGETFRAGMENTLIGHTFVSGIXPROC) (GLenum light, GLenum pname, GLfloat *params); +typedef void (APIENTRYP PFNGLGETFRAGMENTLIGHTIVSGIXPROC) (GLenum light, GLenum pname, GLint *params); +typedef void (APIENTRYP PFNGLGETFRAGMENTMATERIALFVSGIXPROC) (GLenum face, GLenum pname, GLfloat *params); +typedef void (APIENTRYP PFNGLGETFRAGMENTMATERIALIVSGIXPROC) (GLenum face, GLenum pname, GLint *params); +typedef void (APIENTRYP PFNGLLIGHTENVISGIXPROC) (GLenum pname, GLint param); +#endif + +#ifndef GL_IBM_rasterpos_clip +#define GL_IBM_rasterpos_clip 1 +#endif + +#ifndef GL_HP_texture_lighting +#define GL_HP_texture_lighting 1 +#endif + +#ifndef GL_EXT_draw_range_elements +#define GL_EXT_draw_range_elements 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glDrawRangeElementsEXT (GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const GLvoid *indices); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLDRAWRANGEELEMENTSEXTPROC) (GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const GLvoid *indices); +#endif + +#ifndef GL_WIN_phong_shading +#define GL_WIN_phong_shading 1 +#endif + +#ifndef GL_WIN_specular_fog +#define GL_WIN_specular_fog 1 +#endif + +#ifndef GL_EXT_light_texture +#define GL_EXT_light_texture 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glApplyTextureEXT (GLenum mode); +GLAPI void APIENTRY glTextureLightEXT (GLenum pname); +GLAPI void APIENTRY glTextureMaterialEXT (GLenum face, GLenum mode); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLAPPLYTEXTUREEXTPROC) (GLenum mode); +typedef void (APIENTRYP PFNGLTEXTURELIGHTEXTPROC) (GLenum pname); +typedef void (APIENTRYP PFNGLTEXTUREMATERIALEXTPROC) (GLenum face, GLenum mode); +#endif + +#ifndef GL_SGIX_blend_alpha_minmax +#define GL_SGIX_blend_alpha_minmax 1 +#endif + +#ifndef GL_EXT_bgra +#define GL_EXT_bgra 1 +#endif + +#ifndef GL_SGIX_async +#define GL_SGIX_async 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glAsyncMarkerSGIX (GLuint marker); +GLAPI GLint APIENTRY glFinishAsyncSGIX (GLuint *markerp); +GLAPI GLint APIENTRY glPollAsyncSGIX (GLuint *markerp); +GLAPI GLuint APIENTRY glGenAsyncMarkersSGIX (GLsizei range); +GLAPI void APIENTRY glDeleteAsyncMarkersSGIX (GLuint marker, GLsizei range); +GLAPI GLboolean APIENTRY glIsAsyncMarkerSGIX (GLuint marker); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLASYNCMARKERSGIXPROC) (GLuint marker); +typedef GLint (APIENTRYP PFNGLFINISHASYNCSGIXPROC) (GLuint *markerp); +typedef GLint (APIENTRYP PFNGLPOLLASYNCSGIXPROC) (GLuint *markerp); +typedef GLuint (APIENTRYP PFNGLGENASYNCMARKERSSGIXPROC) (GLsizei range); +typedef void (APIENTRYP PFNGLDELETEASYNCMARKERSSGIXPROC) (GLuint marker, GLsizei range); +typedef GLboolean (APIENTRYP PFNGLISASYNCMARKERSGIXPROC) (GLuint marker); +#endif + +#ifndef GL_SGIX_async_pixel +#define GL_SGIX_async_pixel 1 +#endif + +#ifndef GL_SGIX_async_histogram +#define GL_SGIX_async_histogram 1 +#endif + +#ifndef GL_INTEL_parallel_arrays +#define GL_INTEL_parallel_arrays 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glVertexPointervINTEL (GLint size, GLenum type, const GLvoid* *pointer); +GLAPI void APIENTRY glNormalPointervINTEL (GLenum type, const GLvoid* *pointer); +GLAPI void APIENTRY glColorPointervINTEL (GLint size, GLenum type, const GLvoid* *pointer); +GLAPI void APIENTRY glTexCoordPointervINTEL (GLint size, GLenum type, const GLvoid* *pointer); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLVERTEXPOINTERVINTELPROC) (GLint size, GLenum type, const GLvoid* *pointer); +typedef void (APIENTRYP PFNGLNORMALPOINTERVINTELPROC) (GLenum type, const GLvoid* *pointer); +typedef void (APIENTRYP PFNGLCOLORPOINTERVINTELPROC) (GLint size, GLenum type, const GLvoid* *pointer); +typedef void (APIENTRYP PFNGLTEXCOORDPOINTERVINTELPROC) (GLint size, GLenum type, const GLvoid* *pointer); +#endif + +#ifndef GL_HP_occlusion_test +#define GL_HP_occlusion_test 1 +#endif + +#ifndef GL_EXT_pixel_transform +#define GL_EXT_pixel_transform 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glPixelTransformParameteriEXT (GLenum target, GLenum pname, GLint param); +GLAPI void APIENTRY glPixelTransformParameterfEXT (GLenum target, GLenum pname, GLfloat param); +GLAPI void APIENTRY glPixelTransformParameterivEXT (GLenum target, GLenum pname, const GLint *params); +GLAPI void APIENTRY glPixelTransformParameterfvEXT (GLenum target, GLenum pname, const GLfloat *params); +GLAPI void APIENTRY glGetPixelTransformParameterivEXT (GLenum target, GLenum pname, GLint *params); +GLAPI void APIENTRY glGetPixelTransformParameterfvEXT (GLenum target, GLenum pname, GLfloat *params); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLPIXELTRANSFORMPARAMETERIEXTPROC) (GLenum target, GLenum pname, GLint param); +typedef void (APIENTRYP PFNGLPIXELTRANSFORMPARAMETERFEXTPROC) (GLenum target, GLenum pname, GLfloat param); +typedef void (APIENTRYP PFNGLPIXELTRANSFORMPARAMETERIVEXTPROC) (GLenum target, GLenum pname, const GLint *params); +typedef void (APIENTRYP PFNGLPIXELTRANSFORMPARAMETERFVEXTPROC) (GLenum target, GLenum pname, const GLfloat *params); +typedef void (APIENTRYP PFNGLGETPIXELTRANSFORMPARAMETERIVEXTPROC) (GLenum target, GLenum pname, GLint *params); +typedef void (APIENTRYP PFNGLGETPIXELTRANSFORMPARAMETERFVEXTPROC) (GLenum target, GLenum pname, GLfloat *params); +#endif + +#ifndef GL_EXT_pixel_transform_color_table +#define GL_EXT_pixel_transform_color_table 1 +#endif + +#ifndef GL_EXT_shared_texture_palette +#define GL_EXT_shared_texture_palette 1 +#endif + +#ifndef GL_EXT_separate_specular_color +#define GL_EXT_separate_specular_color 1 +#endif + +#ifndef GL_EXT_secondary_color +#define GL_EXT_secondary_color 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glSecondaryColor3bEXT (GLbyte red, GLbyte green, GLbyte blue); +GLAPI void APIENTRY glSecondaryColor3bvEXT (const GLbyte *v); +GLAPI void APIENTRY glSecondaryColor3dEXT (GLdouble red, GLdouble green, GLdouble blue); +GLAPI void APIENTRY glSecondaryColor3dvEXT (const GLdouble *v); +GLAPI void APIENTRY glSecondaryColor3fEXT (GLfloat red, GLfloat green, GLfloat blue); +GLAPI void APIENTRY glSecondaryColor3fvEXT (const GLfloat *v); +GLAPI void APIENTRY glSecondaryColor3iEXT (GLint red, GLint green, GLint blue); +GLAPI void APIENTRY glSecondaryColor3ivEXT (const GLint *v); +GLAPI void APIENTRY glSecondaryColor3sEXT (GLshort red, GLshort green, GLshort blue); +GLAPI void APIENTRY glSecondaryColor3svEXT (const GLshort *v); +GLAPI void APIENTRY glSecondaryColor3ubEXT (GLubyte red, GLubyte green, GLubyte blue); +GLAPI void APIENTRY glSecondaryColor3ubvEXT (const GLubyte *v); +GLAPI void APIENTRY glSecondaryColor3uiEXT (GLuint red, GLuint green, GLuint blue); +GLAPI void APIENTRY glSecondaryColor3uivEXT (const GLuint *v); +GLAPI void APIENTRY glSecondaryColor3usEXT (GLushort red, GLushort green, GLushort blue); +GLAPI void APIENTRY glSecondaryColor3usvEXT (const GLushort *v); +GLAPI void APIENTRY glSecondaryColorPointerEXT (GLint size, GLenum type, GLsizei stride, const GLvoid *pointer); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLSECONDARYCOLOR3BEXTPROC) (GLbyte red, GLbyte green, GLbyte blue); +typedef void (APIENTRYP PFNGLSECONDARYCOLOR3BVEXTPROC) (const GLbyte *v); +typedef void (APIENTRYP PFNGLSECONDARYCOLOR3DEXTPROC) (GLdouble red, GLdouble green, GLdouble blue); +typedef void (APIENTRYP PFNGLSECONDARYCOLOR3DVEXTPROC) (const GLdouble *v); +typedef void (APIENTRYP PFNGLSECONDARYCOLOR3FEXTPROC) (GLfloat red, GLfloat green, GLfloat blue); +typedef void (APIENTRYP PFNGLSECONDARYCOLOR3FVEXTPROC) (const GLfloat *v); +typedef void (APIENTRYP PFNGLSECONDARYCOLOR3IEXTPROC) (GLint red, GLint green, GLint blue); +typedef void (APIENTRYP PFNGLSECONDARYCOLOR3IVEXTPROC) (const GLint *v); +typedef void (APIENTRYP PFNGLSECONDARYCOLOR3SEXTPROC) (GLshort red, GLshort green, GLshort blue); +typedef void (APIENTRYP PFNGLSECONDARYCOLOR3SVEXTPROC) (const GLshort *v); +typedef void (APIENTRYP PFNGLSECONDARYCOLOR3UBEXTPROC) (GLubyte red, GLubyte green, GLubyte blue); +typedef void (APIENTRYP PFNGLSECONDARYCOLOR3UBVEXTPROC) (const GLubyte *v); +typedef void (APIENTRYP PFNGLSECONDARYCOLOR3UIEXTPROC) (GLuint red, GLuint green, GLuint blue); +typedef void (APIENTRYP PFNGLSECONDARYCOLOR3UIVEXTPROC) (const GLuint *v); +typedef void (APIENTRYP PFNGLSECONDARYCOLOR3USEXTPROC) (GLushort red, GLushort green, GLushort blue); +typedef void (APIENTRYP PFNGLSECONDARYCOLOR3USVEXTPROC) (const GLushort *v); +typedef void (APIENTRYP PFNGLSECONDARYCOLORPOINTEREXTPROC) (GLint size, GLenum type, GLsizei stride, const GLvoid *pointer); +#endif + +#ifndef GL_EXT_texture_perturb_normal +#define GL_EXT_texture_perturb_normal 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glTextureNormalEXT (GLenum mode); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLTEXTURENORMALEXTPROC) (GLenum mode); +#endif + +#ifndef GL_EXT_multi_draw_arrays +#define GL_EXT_multi_draw_arrays 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glMultiDrawArraysEXT (GLenum mode, const GLint *first, const GLsizei *count, GLsizei primcount); +GLAPI void APIENTRY glMultiDrawElementsEXT (GLenum mode, const GLsizei *count, GLenum type, const GLvoid* *indices, GLsizei primcount); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLMULTIDRAWARRAYSEXTPROC) (GLenum mode, const GLint *first, const GLsizei *count, GLsizei primcount); +typedef void (APIENTRYP PFNGLMULTIDRAWELEMENTSEXTPROC) (GLenum mode, const GLsizei *count, GLenum type, const GLvoid* *indices, GLsizei primcount); +#endif + +#ifndef GL_EXT_fog_coord +#define GL_EXT_fog_coord 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glFogCoordfEXT (GLfloat coord); +GLAPI void APIENTRY glFogCoordfvEXT (const GLfloat *coord); +GLAPI void APIENTRY glFogCoorddEXT (GLdouble coord); +GLAPI void APIENTRY glFogCoorddvEXT (const GLdouble *coord); +GLAPI void APIENTRY glFogCoordPointerEXT (GLenum type, GLsizei stride, const GLvoid *pointer); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLFOGCOORDFEXTPROC) (GLfloat coord); +typedef void (APIENTRYP PFNGLFOGCOORDFVEXTPROC) (const GLfloat *coord); +typedef void (APIENTRYP PFNGLFOGCOORDDEXTPROC) (GLdouble coord); +typedef void (APIENTRYP PFNGLFOGCOORDDVEXTPROC) (const GLdouble *coord); +typedef void (APIENTRYP PFNGLFOGCOORDPOINTEREXTPROC) (GLenum type, GLsizei stride, const GLvoid *pointer); +#endif + +#ifndef GL_REND_screen_coordinates +#define GL_REND_screen_coordinates 1 +#endif + +#ifndef GL_EXT_coordinate_frame +#define GL_EXT_coordinate_frame 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glTangent3bEXT (GLbyte tx, GLbyte ty, GLbyte tz); +GLAPI void APIENTRY glTangent3bvEXT (const GLbyte *v); +GLAPI void APIENTRY glTangent3dEXT (GLdouble tx, GLdouble ty, GLdouble tz); +GLAPI void APIENTRY glTangent3dvEXT (const GLdouble *v); +GLAPI void APIENTRY glTangent3fEXT (GLfloat tx, GLfloat ty, GLfloat tz); +GLAPI void APIENTRY glTangent3fvEXT (const GLfloat *v); +GLAPI void APIENTRY glTangent3iEXT (GLint tx, GLint ty, GLint tz); +GLAPI void APIENTRY glTangent3ivEXT (const GLint *v); +GLAPI void APIENTRY glTangent3sEXT (GLshort tx, GLshort ty, GLshort tz); +GLAPI void APIENTRY glTangent3svEXT (const GLshort *v); +GLAPI void APIENTRY glBinormal3bEXT (GLbyte bx, GLbyte by, GLbyte bz); +GLAPI void APIENTRY glBinormal3bvEXT (const GLbyte *v); +GLAPI void APIENTRY glBinormal3dEXT (GLdouble bx, GLdouble by, GLdouble bz); +GLAPI void APIENTRY glBinormal3dvEXT (const GLdouble *v); +GLAPI void APIENTRY glBinormal3fEXT (GLfloat bx, GLfloat by, GLfloat bz); +GLAPI void APIENTRY glBinormal3fvEXT (const GLfloat *v); +GLAPI void APIENTRY glBinormal3iEXT (GLint bx, GLint by, GLint bz); +GLAPI void APIENTRY glBinormal3ivEXT (const GLint *v); +GLAPI void APIENTRY glBinormal3sEXT (GLshort bx, GLshort by, GLshort bz); +GLAPI void APIENTRY glBinormal3svEXT (const GLshort *v); +GLAPI void APIENTRY glTangentPointerEXT (GLenum type, GLsizei stride, const GLvoid *pointer); +GLAPI void APIENTRY glBinormalPointerEXT (GLenum type, GLsizei stride, const GLvoid *pointer); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLTANGENT3BEXTPROC) (GLbyte tx, GLbyte ty, GLbyte tz); +typedef void (APIENTRYP PFNGLTANGENT3BVEXTPROC) (const GLbyte *v); +typedef void (APIENTRYP PFNGLTANGENT3DEXTPROC) (GLdouble tx, GLdouble ty, GLdouble tz); +typedef void (APIENTRYP PFNGLTANGENT3DVEXTPROC) (const GLdouble *v); +typedef void (APIENTRYP PFNGLTANGENT3FEXTPROC) (GLfloat tx, GLfloat ty, GLfloat tz); +typedef void (APIENTRYP PFNGLTANGENT3FVEXTPROC) (const GLfloat *v); +typedef void (APIENTRYP PFNGLTANGENT3IEXTPROC) (GLint tx, GLint ty, GLint tz); +typedef void (APIENTRYP PFNGLTANGENT3IVEXTPROC) (const GLint *v); +typedef void (APIENTRYP PFNGLTANGENT3SEXTPROC) (GLshort tx, GLshort ty, GLshort tz); +typedef void (APIENTRYP PFNGLTANGENT3SVEXTPROC) (const GLshort *v); +typedef void (APIENTRYP PFNGLBINORMAL3BEXTPROC) (GLbyte bx, GLbyte by, GLbyte bz); +typedef void (APIENTRYP PFNGLBINORMAL3BVEXTPROC) (const GLbyte *v); +typedef void (APIENTRYP PFNGLBINORMAL3DEXTPROC) (GLdouble bx, GLdouble by, GLdouble bz); +typedef void (APIENTRYP PFNGLBINORMAL3DVEXTPROC) (const GLdouble *v); +typedef void (APIENTRYP PFNGLBINORMAL3FEXTPROC) (GLfloat bx, GLfloat by, GLfloat bz); +typedef void (APIENTRYP PFNGLBINORMAL3FVEXTPROC) (const GLfloat *v); +typedef void (APIENTRYP PFNGLBINORMAL3IEXTPROC) (GLint bx, GLint by, GLint bz); +typedef void (APIENTRYP PFNGLBINORMAL3IVEXTPROC) (const GLint *v); +typedef void (APIENTRYP PFNGLBINORMAL3SEXTPROC) (GLshort bx, GLshort by, GLshort bz); +typedef void (APIENTRYP PFNGLBINORMAL3SVEXTPROC) (const GLshort *v); +typedef void (APIENTRYP PFNGLTANGENTPOINTEREXTPROC) (GLenum type, GLsizei stride, const GLvoid *pointer); +typedef void (APIENTRYP PFNGLBINORMALPOINTEREXTPROC) (GLenum type, GLsizei stride, const GLvoid *pointer); +#endif + +#ifndef GL_EXT_texture_env_combine +#define GL_EXT_texture_env_combine 1 +#endif + +#ifndef GL_APPLE_specular_vector +#define GL_APPLE_specular_vector 1 +#endif + +#ifndef GL_APPLE_transform_hint +#define GL_APPLE_transform_hint 1 +#endif + +#ifndef GL_SGIX_fog_scale +#define GL_SGIX_fog_scale 1 +#endif + +#ifndef GL_SUNX_constant_data +#define GL_SUNX_constant_data 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glFinishTextureSUNX (void); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLFINISHTEXTURESUNXPROC) (void); +#endif + +#ifndef GL_SUN_global_alpha +#define GL_SUN_global_alpha 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glGlobalAlphaFactorbSUN (GLbyte factor); +GLAPI void APIENTRY glGlobalAlphaFactorsSUN (GLshort factor); +GLAPI void APIENTRY glGlobalAlphaFactoriSUN (GLint factor); +GLAPI void APIENTRY glGlobalAlphaFactorfSUN (GLfloat factor); +GLAPI void APIENTRY glGlobalAlphaFactordSUN (GLdouble factor); +GLAPI void APIENTRY glGlobalAlphaFactorubSUN (GLubyte factor); +GLAPI void APIENTRY glGlobalAlphaFactorusSUN (GLushort factor); +GLAPI void APIENTRY glGlobalAlphaFactoruiSUN (GLuint factor); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLGLOBALALPHAFACTORBSUNPROC) (GLbyte factor); +typedef void (APIENTRYP PFNGLGLOBALALPHAFACTORSSUNPROC) (GLshort factor); +typedef void (APIENTRYP PFNGLGLOBALALPHAFACTORISUNPROC) (GLint factor); +typedef void (APIENTRYP PFNGLGLOBALALPHAFACTORFSUNPROC) (GLfloat factor); +typedef void (APIENTRYP PFNGLGLOBALALPHAFACTORDSUNPROC) (GLdouble factor); +typedef void (APIENTRYP PFNGLGLOBALALPHAFACTORUBSUNPROC) (GLubyte factor); +typedef void (APIENTRYP PFNGLGLOBALALPHAFACTORUSSUNPROC) (GLushort factor); +typedef void (APIENTRYP PFNGLGLOBALALPHAFACTORUISUNPROC) (GLuint factor); +#endif + +#ifndef GL_SUN_triangle_list +#define GL_SUN_triangle_list 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glReplacementCodeuiSUN (GLuint code); +GLAPI void APIENTRY glReplacementCodeusSUN (GLushort code); +GLAPI void APIENTRY glReplacementCodeubSUN (GLubyte code); +GLAPI void APIENTRY glReplacementCodeuivSUN (const GLuint *code); +GLAPI void APIENTRY glReplacementCodeusvSUN (const GLushort *code); +GLAPI void APIENTRY glReplacementCodeubvSUN (const GLubyte *code); +GLAPI void APIENTRY glReplacementCodePointerSUN (GLenum type, GLsizei stride, const GLvoid* *pointer); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLREPLACEMENTCODEUISUNPROC) (GLuint code); +typedef void (APIENTRYP PFNGLREPLACEMENTCODEUSSUNPROC) (GLushort code); +typedef void (APIENTRYP PFNGLREPLACEMENTCODEUBSUNPROC) (GLubyte code); +typedef void (APIENTRYP PFNGLREPLACEMENTCODEUIVSUNPROC) (const GLuint *code); +typedef void (APIENTRYP PFNGLREPLACEMENTCODEUSVSUNPROC) (const GLushort *code); +typedef void (APIENTRYP PFNGLREPLACEMENTCODEUBVSUNPROC) (const GLubyte *code); +typedef void (APIENTRYP PFNGLREPLACEMENTCODEPOINTERSUNPROC) (GLenum type, GLsizei stride, const GLvoid* *pointer); +#endif + +#ifndef GL_SUN_vertex +#define GL_SUN_vertex 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glColor4ubVertex2fSUN (GLubyte r, GLubyte g, GLubyte b, GLubyte a, GLfloat x, GLfloat y); +GLAPI void APIENTRY glColor4ubVertex2fvSUN (const GLubyte *c, const GLfloat *v); +GLAPI void APIENTRY glColor4ubVertex3fSUN (GLubyte r, GLubyte g, GLubyte b, GLubyte a, GLfloat x, GLfloat y, GLfloat z); +GLAPI void APIENTRY glColor4ubVertex3fvSUN (const GLubyte *c, const GLfloat *v); +GLAPI void APIENTRY glColor3fVertex3fSUN (GLfloat r, GLfloat g, GLfloat b, GLfloat x, GLfloat y, GLfloat z); +GLAPI void APIENTRY glColor3fVertex3fvSUN (const GLfloat *c, const GLfloat *v); +GLAPI void APIENTRY glNormal3fVertex3fSUN (GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z); +GLAPI void APIENTRY glNormal3fVertex3fvSUN (const GLfloat *n, const GLfloat *v); +GLAPI void APIENTRY glColor4fNormal3fVertex3fSUN (GLfloat r, GLfloat g, GLfloat b, GLfloat a, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z); +GLAPI void APIENTRY glColor4fNormal3fVertex3fvSUN (const GLfloat *c, const GLfloat *n, const GLfloat *v); +GLAPI void APIENTRY glTexCoord2fVertex3fSUN (GLfloat s, GLfloat t, GLfloat x, GLfloat y, GLfloat z); +GLAPI void APIENTRY glTexCoord2fVertex3fvSUN (const GLfloat *tc, const GLfloat *v); +GLAPI void APIENTRY glTexCoord4fVertex4fSUN (GLfloat s, GLfloat t, GLfloat p, GLfloat q, GLfloat x, GLfloat y, GLfloat z, GLfloat w); +GLAPI void APIENTRY glTexCoord4fVertex4fvSUN (const GLfloat *tc, const GLfloat *v); +GLAPI void APIENTRY glTexCoord2fColor4ubVertex3fSUN (GLfloat s, GLfloat t, GLubyte r, GLubyte g, GLubyte b, GLubyte a, GLfloat x, GLfloat y, GLfloat z); +GLAPI void APIENTRY glTexCoord2fColor4ubVertex3fvSUN (const GLfloat *tc, const GLubyte *c, const GLfloat *v); +GLAPI void APIENTRY glTexCoord2fColor3fVertex3fSUN (GLfloat s, GLfloat t, GLfloat r, GLfloat g, GLfloat b, GLfloat x, GLfloat y, GLfloat z); +GLAPI void APIENTRY glTexCoord2fColor3fVertex3fvSUN (const GLfloat *tc, const GLfloat *c, const GLfloat *v); +GLAPI void APIENTRY glTexCoord2fNormal3fVertex3fSUN (GLfloat s, GLfloat t, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z); +GLAPI void APIENTRY glTexCoord2fNormal3fVertex3fvSUN (const GLfloat *tc, const GLfloat *n, const GLfloat *v); +GLAPI void APIENTRY glTexCoord2fColor4fNormal3fVertex3fSUN (GLfloat s, GLfloat t, GLfloat r, GLfloat g, GLfloat b, GLfloat a, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z); +GLAPI void APIENTRY glTexCoord2fColor4fNormal3fVertex3fvSUN (const GLfloat *tc, const GLfloat *c, const GLfloat *n, const GLfloat *v); +GLAPI void APIENTRY glTexCoord4fColor4fNormal3fVertex4fSUN (GLfloat s, GLfloat t, GLfloat p, GLfloat q, GLfloat r, GLfloat g, GLfloat b, GLfloat a, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z, GLfloat w); +GLAPI void APIENTRY glTexCoord4fColor4fNormal3fVertex4fvSUN (const GLfloat *tc, const GLfloat *c, const GLfloat *n, const GLfloat *v); +GLAPI void APIENTRY glReplacementCodeuiVertex3fSUN (GLuint rc, GLfloat x, GLfloat y, GLfloat z); +GLAPI void APIENTRY glReplacementCodeuiVertex3fvSUN (const GLuint *rc, const GLfloat *v); +GLAPI void APIENTRY glReplacementCodeuiColor4ubVertex3fSUN (GLuint rc, GLubyte r, GLubyte g, GLubyte b, GLubyte a, GLfloat x, GLfloat y, GLfloat z); +GLAPI void APIENTRY glReplacementCodeuiColor4ubVertex3fvSUN (const GLuint *rc, const GLubyte *c, const GLfloat *v); +GLAPI void APIENTRY glReplacementCodeuiColor3fVertex3fSUN (GLuint rc, GLfloat r, GLfloat g, GLfloat b, GLfloat x, GLfloat y, GLfloat z); +GLAPI void APIENTRY glReplacementCodeuiColor3fVertex3fvSUN (const GLuint *rc, const GLfloat *c, const GLfloat *v); +GLAPI void APIENTRY glReplacementCodeuiNormal3fVertex3fSUN (GLuint rc, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z); +GLAPI void APIENTRY glReplacementCodeuiNormal3fVertex3fvSUN (const GLuint *rc, const GLfloat *n, const GLfloat *v); +GLAPI void APIENTRY glReplacementCodeuiColor4fNormal3fVertex3fSUN (GLuint rc, GLfloat r, GLfloat g, GLfloat b, GLfloat a, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z); +GLAPI void APIENTRY glReplacementCodeuiColor4fNormal3fVertex3fvSUN (const GLuint *rc, const GLfloat *c, const GLfloat *n, const GLfloat *v); +GLAPI void APIENTRY glReplacementCodeuiTexCoord2fVertex3fSUN (GLuint rc, GLfloat s, GLfloat t, GLfloat x, GLfloat y, GLfloat z); +GLAPI void APIENTRY glReplacementCodeuiTexCoord2fVertex3fvSUN (const GLuint *rc, const GLfloat *tc, const GLfloat *v); +GLAPI void APIENTRY glReplacementCodeuiTexCoord2fNormal3fVertex3fSUN (GLuint rc, GLfloat s, GLfloat t, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z); +GLAPI void APIENTRY glReplacementCodeuiTexCoord2fNormal3fVertex3fvSUN (const GLuint *rc, const GLfloat *tc, const GLfloat *n, const GLfloat *v); +GLAPI void APIENTRY glReplacementCodeuiTexCoord2fColor4fNormal3fVertex3fSUN (GLuint rc, GLfloat s, GLfloat t, GLfloat r, GLfloat g, GLfloat b, GLfloat a, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z); +GLAPI void APIENTRY glReplacementCodeuiTexCoord2fColor4fNormal3fVertex3fvSUN (const GLuint *rc, const GLfloat *tc, const GLfloat *c, const GLfloat *n, const GLfloat *v); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLCOLOR4UBVERTEX2FSUNPROC) (GLubyte r, GLubyte g, GLubyte b, GLubyte a, GLfloat x, GLfloat y); +typedef void (APIENTRYP PFNGLCOLOR4UBVERTEX2FVSUNPROC) (const GLubyte *c, const GLfloat *v); +typedef void (APIENTRYP PFNGLCOLOR4UBVERTEX3FSUNPROC) (GLubyte r, GLubyte g, GLubyte b, GLubyte a, GLfloat x, GLfloat y, GLfloat z); +typedef void (APIENTRYP PFNGLCOLOR4UBVERTEX3FVSUNPROC) (const GLubyte *c, const GLfloat *v); +typedef void (APIENTRYP PFNGLCOLOR3FVERTEX3FSUNPROC) (GLfloat r, GLfloat g, GLfloat b, GLfloat x, GLfloat y, GLfloat z); +typedef void (APIENTRYP PFNGLCOLOR3FVERTEX3FVSUNPROC) (const GLfloat *c, const GLfloat *v); +typedef void (APIENTRYP PFNGLNORMAL3FVERTEX3FSUNPROC) (GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z); +typedef void (APIENTRYP PFNGLNORMAL3FVERTEX3FVSUNPROC) (const GLfloat *n, const GLfloat *v); +typedef void (APIENTRYP PFNGLCOLOR4FNORMAL3FVERTEX3FSUNPROC) (GLfloat r, GLfloat g, GLfloat b, GLfloat a, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z); +typedef void (APIENTRYP PFNGLCOLOR4FNORMAL3FVERTEX3FVSUNPROC) (const GLfloat *c, const GLfloat *n, const GLfloat *v); +typedef void (APIENTRYP PFNGLTEXCOORD2FVERTEX3FSUNPROC) (GLfloat s, GLfloat t, GLfloat x, GLfloat y, GLfloat z); +typedef void (APIENTRYP PFNGLTEXCOORD2FVERTEX3FVSUNPROC) (const GLfloat *tc, const GLfloat *v); +typedef void (APIENTRYP PFNGLTEXCOORD4FVERTEX4FSUNPROC) (GLfloat s, GLfloat t, GLfloat p, GLfloat q, GLfloat x, GLfloat y, GLfloat z, GLfloat w); +typedef void (APIENTRYP PFNGLTEXCOORD4FVERTEX4FVSUNPROC) (const GLfloat *tc, const GLfloat *v); +typedef void (APIENTRYP PFNGLTEXCOORD2FCOLOR4UBVERTEX3FSUNPROC) (GLfloat s, GLfloat t, GLubyte r, GLubyte g, GLubyte b, GLubyte a, GLfloat x, GLfloat y, GLfloat z); +typedef void (APIENTRYP PFNGLTEXCOORD2FCOLOR4UBVERTEX3FVSUNPROC) (const GLfloat *tc, const GLubyte *c, const GLfloat *v); +typedef void (APIENTRYP PFNGLTEXCOORD2FCOLOR3FVERTEX3FSUNPROC) (GLfloat s, GLfloat t, GLfloat r, GLfloat g, GLfloat b, GLfloat x, GLfloat y, GLfloat z); +typedef void (APIENTRYP PFNGLTEXCOORD2FCOLOR3FVERTEX3FVSUNPROC) (const GLfloat *tc, const GLfloat *c, const GLfloat *v); +typedef void (APIENTRYP PFNGLTEXCOORD2FNORMAL3FVERTEX3FSUNPROC) (GLfloat s, GLfloat t, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z); +typedef void (APIENTRYP PFNGLTEXCOORD2FNORMAL3FVERTEX3FVSUNPROC) (const GLfloat *tc, const GLfloat *n, const GLfloat *v); +typedef void (APIENTRYP PFNGLTEXCOORD2FCOLOR4FNORMAL3FVERTEX3FSUNPROC) (GLfloat s, GLfloat t, GLfloat r, GLfloat g, GLfloat b, GLfloat a, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z); +typedef void (APIENTRYP PFNGLTEXCOORD2FCOLOR4FNORMAL3FVERTEX3FVSUNPROC) (const GLfloat *tc, const GLfloat *c, const GLfloat *n, const GLfloat *v); +typedef void (APIENTRYP PFNGLTEXCOORD4FCOLOR4FNORMAL3FVERTEX4FSUNPROC) (GLfloat s, GLfloat t, GLfloat p, GLfloat q, GLfloat r, GLfloat g, GLfloat b, GLfloat a, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z, GLfloat w); +typedef void (APIENTRYP PFNGLTEXCOORD4FCOLOR4FNORMAL3FVERTEX4FVSUNPROC) (const GLfloat *tc, const GLfloat *c, const GLfloat *n, const GLfloat *v); +typedef void (APIENTRYP PFNGLREPLACEMENTCODEUIVERTEX3FSUNPROC) (GLuint rc, GLfloat x, GLfloat y, GLfloat z); +typedef void (APIENTRYP PFNGLREPLACEMENTCODEUIVERTEX3FVSUNPROC) (const GLuint *rc, const GLfloat *v); +typedef void (APIENTRYP PFNGLREPLACEMENTCODEUICOLOR4UBVERTEX3FSUNPROC) (GLuint rc, GLubyte r, GLubyte g, GLubyte b, GLubyte a, GLfloat x, GLfloat y, GLfloat z); +typedef void (APIENTRYP PFNGLREPLACEMENTCODEUICOLOR4UBVERTEX3FVSUNPROC) (const GLuint *rc, const GLubyte *c, const GLfloat *v); +typedef void (APIENTRYP PFNGLREPLACEMENTCODEUICOLOR3FVERTEX3FSUNPROC) (GLuint rc, GLfloat r, GLfloat g, GLfloat b, GLfloat x, GLfloat y, GLfloat z); +typedef void (APIENTRYP PFNGLREPLACEMENTCODEUICOLOR3FVERTEX3FVSUNPROC) (const GLuint *rc, const GLfloat *c, const GLfloat *v); +typedef void (APIENTRYP PFNGLREPLACEMENTCODEUINORMAL3FVERTEX3FSUNPROC) (GLuint rc, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z); +typedef void (APIENTRYP PFNGLREPLACEMENTCODEUINORMAL3FVERTEX3FVSUNPROC) (const GLuint *rc, const GLfloat *n, const GLfloat *v); +typedef void (APIENTRYP PFNGLREPLACEMENTCODEUICOLOR4FNORMAL3FVERTEX3FSUNPROC) (GLuint rc, GLfloat r, GLfloat g, GLfloat b, GLfloat a, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z); +typedef void (APIENTRYP PFNGLREPLACEMENTCODEUICOLOR4FNORMAL3FVERTEX3FVSUNPROC) (const GLuint *rc, const GLfloat *c, const GLfloat *n, const GLfloat *v); +typedef void (APIENTRYP PFNGLREPLACEMENTCODEUITEXCOORD2FVERTEX3FSUNPROC) (GLuint rc, GLfloat s, GLfloat t, GLfloat x, GLfloat y, GLfloat z); +typedef void (APIENTRYP PFNGLREPLACEMENTCODEUITEXCOORD2FVERTEX3FVSUNPROC) (const GLuint *rc, const GLfloat *tc, const GLfloat *v); +typedef void (APIENTRYP PFNGLREPLACEMENTCODEUITEXCOORD2FNORMAL3FVERTEX3FSUNPROC) (GLuint rc, GLfloat s, GLfloat t, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z); +typedef void (APIENTRYP PFNGLREPLACEMENTCODEUITEXCOORD2FNORMAL3FVERTEX3FVSUNPROC) (const GLuint *rc, const GLfloat *tc, const GLfloat *n, const GLfloat *v); +typedef void (APIENTRYP PFNGLREPLACEMENTCODEUITEXCOORD2FCOLOR4FNORMAL3FVERTEX3FSUNPROC) (GLuint rc, GLfloat s, GLfloat t, GLfloat r, GLfloat g, GLfloat b, GLfloat a, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z); +typedef void (APIENTRYP PFNGLREPLACEMENTCODEUITEXCOORD2FCOLOR4FNORMAL3FVERTEX3FVSUNPROC) (const GLuint *rc, const GLfloat *tc, const GLfloat *c, const GLfloat *n, const GLfloat *v); +#endif + +#ifndef GL_EXT_blend_func_separate +#define GL_EXT_blend_func_separate 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glBlendFuncSeparateEXT (GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorAlpha, GLenum dfactorAlpha); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLBLENDFUNCSEPARATEEXTPROC) (GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorAlpha, GLenum dfactorAlpha); +#endif + +#ifndef GL_INGR_blend_func_separate +#define GL_INGR_blend_func_separate 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glBlendFuncSeparateINGR (GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorAlpha, GLenum dfactorAlpha); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLBLENDFUNCSEPARATEINGRPROC) (GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorAlpha, GLenum dfactorAlpha); +#endif + +#ifndef GL_INGR_color_clamp +#define GL_INGR_color_clamp 1 +#endif + +#ifndef GL_INGR_interlace_read +#define GL_INGR_interlace_read 1 +#endif + +#ifndef GL_EXT_stencil_wrap +#define GL_EXT_stencil_wrap 1 +#endif + +#ifndef GL_EXT_422_pixels +#define GL_EXT_422_pixels 1 +#endif + +#ifndef GL_NV_texgen_reflection +#define GL_NV_texgen_reflection 1 +#endif + +#ifndef GL_SUN_convolution_border_modes +#define GL_SUN_convolution_border_modes 1 +#endif + +#ifndef GL_EXT_texture_env_add +#define GL_EXT_texture_env_add 1 +#endif + +#ifndef GL_EXT_texture_lod_bias +#define GL_EXT_texture_lod_bias 1 +#endif + +#ifndef GL_EXT_texture_filter_anisotropic +#define GL_EXT_texture_filter_anisotropic 1 +#endif + +#ifndef GL_EXT_vertex_weighting +#define GL_EXT_vertex_weighting 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glVertexWeightfEXT (GLfloat weight); +GLAPI void APIENTRY glVertexWeightfvEXT (const GLfloat *weight); +GLAPI void APIENTRY glVertexWeightPointerEXT (GLint size, GLenum type, GLsizei stride, const GLvoid *pointer); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLVERTEXWEIGHTFEXTPROC) (GLfloat weight); +typedef void (APIENTRYP PFNGLVERTEXWEIGHTFVEXTPROC) (const GLfloat *weight); +typedef void (APIENTRYP PFNGLVERTEXWEIGHTPOINTEREXTPROC) (GLint size, GLenum type, GLsizei stride, const GLvoid *pointer); +#endif + +#ifndef GL_NV_light_max_exponent +#define GL_NV_light_max_exponent 1 +#endif + +#ifndef GL_NV_vertex_array_range +#define GL_NV_vertex_array_range 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glFlushVertexArrayRangeNV (void); +GLAPI void APIENTRY glVertexArrayRangeNV (GLsizei length, const GLvoid *pointer); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLFLUSHVERTEXARRAYRANGENVPROC) (void); +typedef void (APIENTRYP PFNGLVERTEXARRAYRANGENVPROC) (GLsizei length, const GLvoid *pointer); +#endif + +#ifndef GL_NV_register_combiners +#define GL_NV_register_combiners 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glCombinerParameterfvNV (GLenum pname, const GLfloat *params); +GLAPI void APIENTRY glCombinerParameterfNV (GLenum pname, GLfloat param); +GLAPI void APIENTRY glCombinerParameterivNV (GLenum pname, const GLint *params); +GLAPI void APIENTRY glCombinerParameteriNV (GLenum pname, GLint param); +GLAPI void APIENTRY glCombinerInputNV (GLenum stage, GLenum portion, GLenum variable, GLenum input, GLenum mapping, GLenum componentUsage); +GLAPI void APIENTRY glCombinerOutputNV (GLenum stage, GLenum portion, GLenum abOutput, GLenum cdOutput, GLenum sumOutput, GLenum scale, GLenum bias, GLboolean abDotProduct, GLboolean cdDotProduct, GLboolean muxSum); +GLAPI void APIENTRY glFinalCombinerInputNV (GLenum variable, GLenum input, GLenum mapping, GLenum componentUsage); +GLAPI void APIENTRY glGetCombinerInputParameterfvNV (GLenum stage, GLenum portion, GLenum variable, GLenum pname, GLfloat *params); +GLAPI void APIENTRY glGetCombinerInputParameterivNV (GLenum stage, GLenum portion, GLenum variable, GLenum pname, GLint *params); +GLAPI void APIENTRY glGetCombinerOutputParameterfvNV (GLenum stage, GLenum portion, GLenum pname, GLfloat *params); +GLAPI void APIENTRY glGetCombinerOutputParameterivNV (GLenum stage, GLenum portion, GLenum pname, GLint *params); +GLAPI void APIENTRY glGetFinalCombinerInputParameterfvNV (GLenum variable, GLenum pname, GLfloat *params); +GLAPI void APIENTRY glGetFinalCombinerInputParameterivNV (GLenum variable, GLenum pname, GLint *params); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLCOMBINERPARAMETERFVNVPROC) (GLenum pname, const GLfloat *params); +typedef void (APIENTRYP PFNGLCOMBINERPARAMETERFNVPROC) (GLenum pname, GLfloat param); +typedef void (APIENTRYP PFNGLCOMBINERPARAMETERIVNVPROC) (GLenum pname, const GLint *params); +typedef void (APIENTRYP PFNGLCOMBINERPARAMETERINVPROC) (GLenum pname, GLint param); +typedef void (APIENTRYP PFNGLCOMBINERINPUTNVPROC) (GLenum stage, GLenum portion, GLenum variable, GLenum input, GLenum mapping, GLenum componentUsage); +typedef void (APIENTRYP PFNGLCOMBINEROUTPUTNVPROC) (GLenum stage, GLenum portion, GLenum abOutput, GLenum cdOutput, GLenum sumOutput, GLenum scale, GLenum bias, GLboolean abDotProduct, GLboolean cdDotProduct, GLboolean muxSum); +typedef void (APIENTRYP PFNGLFINALCOMBINERINPUTNVPROC) (GLenum variable, GLenum input, GLenum mapping, GLenum componentUsage); +typedef void (APIENTRYP PFNGLGETCOMBINERINPUTPARAMETERFVNVPROC) (GLenum stage, GLenum portion, GLenum variable, GLenum pname, GLfloat *params); +typedef void (APIENTRYP PFNGLGETCOMBINERINPUTPARAMETERIVNVPROC) (GLenum stage, GLenum portion, GLenum variable, GLenum pname, GLint *params); +typedef void (APIENTRYP PFNGLGETCOMBINEROUTPUTPARAMETERFVNVPROC) (GLenum stage, GLenum portion, GLenum pname, GLfloat *params); +typedef void (APIENTRYP PFNGLGETCOMBINEROUTPUTPARAMETERIVNVPROC) (GLenum stage, GLenum portion, GLenum pname, GLint *params); +typedef void (APIENTRYP PFNGLGETFINALCOMBINERINPUTPARAMETERFVNVPROC) (GLenum variable, GLenum pname, GLfloat *params); +typedef void (APIENTRYP PFNGLGETFINALCOMBINERINPUTPARAMETERIVNVPROC) (GLenum variable, GLenum pname, GLint *params); +#endif + +#ifndef GL_NV_fog_distance +#define GL_NV_fog_distance 1 +#endif + +#ifndef GL_NV_texgen_emboss +#define GL_NV_texgen_emboss 1 +#endif + +#ifndef GL_NV_blend_square +#define GL_NV_blend_square 1 +#endif + +#ifndef GL_NV_texture_env_combine4 +#define GL_NV_texture_env_combine4 1 +#endif + +#ifndef GL_MESA_resize_buffers +#define GL_MESA_resize_buffers 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glResizeBuffersMESA (void); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLRESIZEBUFFERSMESAPROC) (void); +#endif + +#ifndef GL_MESA_window_pos +#define GL_MESA_window_pos 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glWindowPos2dMESA (GLdouble x, GLdouble y); +GLAPI void APIENTRY glWindowPos2dvMESA (const GLdouble *v); +GLAPI void APIENTRY glWindowPos2fMESA (GLfloat x, GLfloat y); +GLAPI void APIENTRY glWindowPos2fvMESA (const GLfloat *v); +GLAPI void APIENTRY glWindowPos2iMESA (GLint x, GLint y); +GLAPI void APIENTRY glWindowPos2ivMESA (const GLint *v); +GLAPI void APIENTRY glWindowPos2sMESA (GLshort x, GLshort y); +GLAPI void APIENTRY glWindowPos2svMESA (const GLshort *v); +GLAPI void APIENTRY glWindowPos3dMESA (GLdouble x, GLdouble y, GLdouble z); +GLAPI void APIENTRY glWindowPos3dvMESA (const GLdouble *v); +GLAPI void APIENTRY glWindowPos3fMESA (GLfloat x, GLfloat y, GLfloat z); +GLAPI void APIENTRY glWindowPos3fvMESA (const GLfloat *v); +GLAPI void APIENTRY glWindowPos3iMESA (GLint x, GLint y, GLint z); +GLAPI void APIENTRY glWindowPos3ivMESA (const GLint *v); +GLAPI void APIENTRY glWindowPos3sMESA (GLshort x, GLshort y, GLshort z); +GLAPI void APIENTRY glWindowPos3svMESA (const GLshort *v); +GLAPI void APIENTRY glWindowPos4dMESA (GLdouble x, GLdouble y, GLdouble z, GLdouble w); +GLAPI void APIENTRY glWindowPos4dvMESA (const GLdouble *v); +GLAPI void APIENTRY glWindowPos4fMESA (GLfloat x, GLfloat y, GLfloat z, GLfloat w); +GLAPI void APIENTRY glWindowPos4fvMESA (const GLfloat *v); +GLAPI void APIENTRY glWindowPos4iMESA (GLint x, GLint y, GLint z, GLint w); +GLAPI void APIENTRY glWindowPos4ivMESA (const GLint *v); +GLAPI void APIENTRY glWindowPos4sMESA (GLshort x, GLshort y, GLshort z, GLshort w); +GLAPI void APIENTRY glWindowPos4svMESA (const GLshort *v); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLWINDOWPOS2DMESAPROC) (GLdouble x, GLdouble y); +typedef void (APIENTRYP PFNGLWINDOWPOS2DVMESAPROC) (const GLdouble *v); +typedef void (APIENTRYP PFNGLWINDOWPOS2FMESAPROC) (GLfloat x, GLfloat y); +typedef void (APIENTRYP PFNGLWINDOWPOS2FVMESAPROC) (const GLfloat *v); +typedef void (APIENTRYP PFNGLWINDOWPOS2IMESAPROC) (GLint x, GLint y); +typedef void (APIENTRYP PFNGLWINDOWPOS2IVMESAPROC) (const GLint *v); +typedef void (APIENTRYP PFNGLWINDOWPOS2SMESAPROC) (GLshort x, GLshort y); +typedef void (APIENTRYP PFNGLWINDOWPOS2SVMESAPROC) (const GLshort *v); +typedef void (APIENTRYP PFNGLWINDOWPOS3DMESAPROC) (GLdouble x, GLdouble y, GLdouble z); +typedef void (APIENTRYP PFNGLWINDOWPOS3DVMESAPROC) (const GLdouble *v); +typedef void (APIENTRYP PFNGLWINDOWPOS3FMESAPROC) (GLfloat x, GLfloat y, GLfloat z); +typedef void (APIENTRYP PFNGLWINDOWPOS3FVMESAPROC) (const GLfloat *v); +typedef void (APIENTRYP PFNGLWINDOWPOS3IMESAPROC) (GLint x, GLint y, GLint z); +typedef void (APIENTRYP PFNGLWINDOWPOS3IVMESAPROC) (const GLint *v); +typedef void (APIENTRYP PFNGLWINDOWPOS3SMESAPROC) (GLshort x, GLshort y, GLshort z); +typedef void (APIENTRYP PFNGLWINDOWPOS3SVMESAPROC) (const GLshort *v); +typedef void (APIENTRYP PFNGLWINDOWPOS4DMESAPROC) (GLdouble x, GLdouble y, GLdouble z, GLdouble w); +typedef void (APIENTRYP PFNGLWINDOWPOS4DVMESAPROC) (const GLdouble *v); +typedef void (APIENTRYP PFNGLWINDOWPOS4FMESAPROC) (GLfloat x, GLfloat y, GLfloat z, GLfloat w); +typedef void (APIENTRYP PFNGLWINDOWPOS4FVMESAPROC) (const GLfloat *v); +typedef void (APIENTRYP PFNGLWINDOWPOS4IMESAPROC) (GLint x, GLint y, GLint z, GLint w); +typedef void (APIENTRYP PFNGLWINDOWPOS4IVMESAPROC) (const GLint *v); +typedef void (APIENTRYP PFNGLWINDOWPOS4SMESAPROC) (GLshort x, GLshort y, GLshort z, GLshort w); +typedef void (APIENTRYP PFNGLWINDOWPOS4SVMESAPROC) (const GLshort *v); +#endif + +#ifndef GL_IBM_cull_vertex +#define GL_IBM_cull_vertex 1 +#endif + +#ifndef GL_IBM_multimode_draw_arrays +#define GL_IBM_multimode_draw_arrays 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glMultiModeDrawArraysIBM (const GLenum *mode, const GLint *first, const GLsizei *count, GLsizei primcount, GLint modestride); +GLAPI void APIENTRY glMultiModeDrawElementsIBM (const GLenum *mode, const GLsizei *count, GLenum type, const GLvoid* const *indices, GLsizei primcount, GLint modestride); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLMULTIMODEDRAWARRAYSIBMPROC) (const GLenum *mode, const GLint *first, const GLsizei *count, GLsizei primcount, GLint modestride); +typedef void (APIENTRYP PFNGLMULTIMODEDRAWELEMENTSIBMPROC) (const GLenum *mode, const GLsizei *count, GLenum type, const GLvoid* const *indices, GLsizei primcount, GLint modestride); +#endif + +#ifndef GL_IBM_vertex_array_lists +#define GL_IBM_vertex_array_lists 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glColorPointerListIBM (GLint size, GLenum type, GLint stride, const GLvoid* *pointer, GLint ptrstride); +GLAPI void APIENTRY glSecondaryColorPointerListIBM (GLint size, GLenum type, GLint stride, const GLvoid* *pointer, GLint ptrstride); +GLAPI void APIENTRY glEdgeFlagPointerListIBM (GLint stride, const GLboolean* *pointer, GLint ptrstride); +GLAPI void APIENTRY glFogCoordPointerListIBM (GLenum type, GLint stride, const GLvoid* *pointer, GLint ptrstride); +GLAPI void APIENTRY glIndexPointerListIBM (GLenum type, GLint stride, const GLvoid* *pointer, GLint ptrstride); +GLAPI void APIENTRY glNormalPointerListIBM (GLenum type, GLint stride, const GLvoid* *pointer, GLint ptrstride); +GLAPI void APIENTRY glTexCoordPointerListIBM (GLint size, GLenum type, GLint stride, const GLvoid* *pointer, GLint ptrstride); +GLAPI void APIENTRY glVertexPointerListIBM (GLint size, GLenum type, GLint stride, const GLvoid* *pointer, GLint ptrstride); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLCOLORPOINTERLISTIBMPROC) (GLint size, GLenum type, GLint stride, const GLvoid* *pointer, GLint ptrstride); +typedef void (APIENTRYP PFNGLSECONDARYCOLORPOINTERLISTIBMPROC) (GLint size, GLenum type, GLint stride, const GLvoid* *pointer, GLint ptrstride); +typedef void (APIENTRYP PFNGLEDGEFLAGPOINTERLISTIBMPROC) (GLint stride, const GLboolean* *pointer, GLint ptrstride); +typedef void (APIENTRYP PFNGLFOGCOORDPOINTERLISTIBMPROC) (GLenum type, GLint stride, const GLvoid* *pointer, GLint ptrstride); +typedef void (APIENTRYP PFNGLINDEXPOINTERLISTIBMPROC) (GLenum type, GLint stride, const GLvoid* *pointer, GLint ptrstride); +typedef void (APIENTRYP PFNGLNORMALPOINTERLISTIBMPROC) (GLenum type, GLint stride, const GLvoid* *pointer, GLint ptrstride); +typedef void (APIENTRYP PFNGLTEXCOORDPOINTERLISTIBMPROC) (GLint size, GLenum type, GLint stride, const GLvoid* *pointer, GLint ptrstride); +typedef void (APIENTRYP PFNGLVERTEXPOINTERLISTIBMPROC) (GLint size, GLenum type, GLint stride, const GLvoid* *pointer, GLint ptrstride); +#endif + +#ifndef GL_SGIX_subsample +#define GL_SGIX_subsample 1 +#endif + +#ifndef GL_SGIX_ycrcba +#define GL_SGIX_ycrcba 1 +#endif + +#ifndef GL_SGIX_ycrcb_subsample +#define GL_SGIX_ycrcb_subsample 1 +#endif + +#ifndef GL_SGIX_depth_pass_instrument +#define GL_SGIX_depth_pass_instrument 1 +#endif + +#ifndef GL_3DFX_texture_compression_FXT1 +#define GL_3DFX_texture_compression_FXT1 1 +#endif + +#ifndef GL_3DFX_multisample +#define GL_3DFX_multisample 1 +#endif + +#ifndef GL_3DFX_tbuffer +#define GL_3DFX_tbuffer 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glTbufferMask3DFX (GLuint mask); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLTBUFFERMASK3DFXPROC) (GLuint mask); +#endif + +#ifndef GL_EXT_multisample +#define GL_EXT_multisample 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glSampleMaskEXT (GLclampf value, GLboolean invert); +GLAPI void APIENTRY glSamplePatternEXT (GLenum pattern); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLSAMPLEMASKEXTPROC) (GLclampf value, GLboolean invert); +typedef void (APIENTRYP PFNGLSAMPLEPATTERNEXTPROC) (GLenum pattern); +#endif + +#ifndef GL_SGIX_vertex_preclip +#define GL_SGIX_vertex_preclip 1 +#endif + +#ifndef GL_SGIX_convolution_accuracy +#define GL_SGIX_convolution_accuracy 1 +#endif + +#ifndef GL_SGIX_resample +#define GL_SGIX_resample 1 +#endif + +#ifndef GL_SGIS_point_line_texgen +#define GL_SGIS_point_line_texgen 1 +#endif + +#ifndef GL_SGIS_texture_color_mask +#define GL_SGIS_texture_color_mask 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glTextureColorMaskSGIS (GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLTEXTURECOLORMASKSGISPROC) (GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha); +#endif + +#ifndef GL_SGIX_igloo_interface +#define GL_SGIX_igloo_interface 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glIglooInterfaceSGIX (GLenum pname, const GLvoid *params); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLIGLOOINTERFACESGIXPROC) (GLenum pname, const GLvoid *params); +#endif + +#ifndef GL_EXT_texture_env_dot3 +#define GL_EXT_texture_env_dot3 1 +#endif + +#ifndef GL_ATI_texture_mirror_once +#define GL_ATI_texture_mirror_once 1 +#endif + +#ifndef GL_NV_fence +#define GL_NV_fence 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glDeleteFencesNV (GLsizei n, const GLuint *fences); +GLAPI void APIENTRY glGenFencesNV (GLsizei n, GLuint *fences); +GLAPI GLboolean APIENTRY glIsFenceNV (GLuint fence); +GLAPI GLboolean APIENTRY glTestFenceNV (GLuint fence); +GLAPI void APIENTRY glGetFenceivNV (GLuint fence, GLenum pname, GLint *params); +GLAPI void APIENTRY glFinishFenceNV (GLuint fence); +GLAPI void APIENTRY glSetFenceNV (GLuint fence, GLenum condition); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLDELETEFENCESNVPROC) (GLsizei n, const GLuint *fences); +typedef void (APIENTRYP PFNGLGENFENCESNVPROC) (GLsizei n, GLuint *fences); +typedef GLboolean (APIENTRYP PFNGLISFENCENVPROC) (GLuint fence); +typedef GLboolean (APIENTRYP PFNGLTESTFENCENVPROC) (GLuint fence); +typedef void (APIENTRYP PFNGLGETFENCEIVNVPROC) (GLuint fence, GLenum pname, GLint *params); +typedef void (APIENTRYP PFNGLFINISHFENCENVPROC) (GLuint fence); +typedef void (APIENTRYP PFNGLSETFENCENVPROC) (GLuint fence, GLenum condition); +#endif + +#ifndef GL_NV_evaluators +#define GL_NV_evaluators 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glMapControlPointsNV (GLenum target, GLuint index, GLenum type, GLsizei ustride, GLsizei vstride, GLint uorder, GLint vorder, GLboolean packed, const GLvoid *points); +GLAPI void APIENTRY glMapParameterivNV (GLenum target, GLenum pname, const GLint *params); +GLAPI void APIENTRY glMapParameterfvNV (GLenum target, GLenum pname, const GLfloat *params); +GLAPI void APIENTRY glGetMapControlPointsNV (GLenum target, GLuint index, GLenum type, GLsizei ustride, GLsizei vstride, GLboolean packed, GLvoid *points); +GLAPI void APIENTRY glGetMapParameterivNV (GLenum target, GLenum pname, GLint *params); +GLAPI void APIENTRY glGetMapParameterfvNV (GLenum target, GLenum pname, GLfloat *params); +GLAPI void APIENTRY glGetMapAttribParameterivNV (GLenum target, GLuint index, GLenum pname, GLint *params); +GLAPI void APIENTRY glGetMapAttribParameterfvNV (GLenum target, GLuint index, GLenum pname, GLfloat *params); +GLAPI void APIENTRY glEvalMapsNV (GLenum target, GLenum mode); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLMAPCONTROLPOINTSNVPROC) (GLenum target, GLuint index, GLenum type, GLsizei ustride, GLsizei vstride, GLint uorder, GLint vorder, GLboolean packed, const GLvoid *points); +typedef void (APIENTRYP PFNGLMAPPARAMETERIVNVPROC) (GLenum target, GLenum pname, const GLint *params); +typedef void (APIENTRYP PFNGLMAPPARAMETERFVNVPROC) (GLenum target, GLenum pname, const GLfloat *params); +typedef void (APIENTRYP PFNGLGETMAPCONTROLPOINTSNVPROC) (GLenum target, GLuint index, GLenum type, GLsizei ustride, GLsizei vstride, GLboolean packed, GLvoid *points); +typedef void (APIENTRYP PFNGLGETMAPPARAMETERIVNVPROC) (GLenum target, GLenum pname, GLint *params); +typedef void (APIENTRYP PFNGLGETMAPPARAMETERFVNVPROC) (GLenum target, GLenum pname, GLfloat *params); +typedef void (APIENTRYP PFNGLGETMAPATTRIBPARAMETERIVNVPROC) (GLenum target, GLuint index, GLenum pname, GLint *params); +typedef void (APIENTRYP PFNGLGETMAPATTRIBPARAMETERFVNVPROC) (GLenum target, GLuint index, GLenum pname, GLfloat *params); +typedef void (APIENTRYP PFNGLEVALMAPSNVPROC) (GLenum target, GLenum mode); +#endif + +#ifndef GL_NV_packed_depth_stencil +#define GL_NV_packed_depth_stencil 1 +#endif + +#ifndef GL_NV_register_combiners2 +#define GL_NV_register_combiners2 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glCombinerStageParameterfvNV (GLenum stage, GLenum pname, const GLfloat *params); +GLAPI void APIENTRY glGetCombinerStageParameterfvNV (GLenum stage, GLenum pname, GLfloat *params); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLCOMBINERSTAGEPARAMETERFVNVPROC) (GLenum stage, GLenum pname, const GLfloat *params); +typedef void (APIENTRYP PFNGLGETCOMBINERSTAGEPARAMETERFVNVPROC) (GLenum stage, GLenum pname, GLfloat *params); +#endif + +#ifndef GL_NV_texture_compression_vtc +#define GL_NV_texture_compression_vtc 1 +#endif + +#ifndef GL_NV_texture_rectangle +#define GL_NV_texture_rectangle 1 +#endif + +#ifndef GL_NV_texture_shader +#define GL_NV_texture_shader 1 +#endif + +#ifndef GL_NV_texture_shader2 +#define GL_NV_texture_shader2 1 +#endif + +#ifndef GL_NV_vertex_array_range2 +#define GL_NV_vertex_array_range2 1 +#endif + +#ifndef GL_NV_vertex_program +#define GL_NV_vertex_program 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI GLboolean APIENTRY glAreProgramsResidentNV (GLsizei n, const GLuint *programs, GLboolean *residences); +GLAPI void APIENTRY glBindProgramNV (GLenum target, GLuint id); +GLAPI void APIENTRY glDeleteProgramsNV (GLsizei n, const GLuint *programs); +GLAPI void APIENTRY glExecuteProgramNV (GLenum target, GLuint id, const GLfloat *params); +GLAPI void APIENTRY glGenProgramsNV (GLsizei n, GLuint *programs); +GLAPI void APIENTRY glGetProgramParameterdvNV (GLenum target, GLuint index, GLenum pname, GLdouble *params); +GLAPI void APIENTRY glGetProgramParameterfvNV (GLenum target, GLuint index, GLenum pname, GLfloat *params); +GLAPI void APIENTRY glGetProgramivNV (GLuint id, GLenum pname, GLint *params); +GLAPI void APIENTRY glGetProgramStringNV (GLuint id, GLenum pname, GLubyte *program); +GLAPI void APIENTRY glGetTrackMatrixivNV (GLenum target, GLuint address, GLenum pname, GLint *params); +GLAPI void APIENTRY glGetVertexAttribdvNV (GLuint index, GLenum pname, GLdouble *params); +GLAPI void APIENTRY glGetVertexAttribfvNV (GLuint index, GLenum pname, GLfloat *params); +GLAPI void APIENTRY glGetVertexAttribivNV (GLuint index, GLenum pname, GLint *params); +GLAPI void APIENTRY glGetVertexAttribPointervNV (GLuint index, GLenum pname, GLvoid* *pointer); +GLAPI GLboolean APIENTRY glIsProgramNV (GLuint id); +GLAPI void APIENTRY glLoadProgramNV (GLenum target, GLuint id, GLsizei len, const GLubyte *program); +GLAPI void APIENTRY glProgramParameter4dNV (GLenum target, GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w); +GLAPI void APIENTRY glProgramParameter4dvNV (GLenum target, GLuint index, const GLdouble *v); +GLAPI void APIENTRY glProgramParameter4fNV (GLenum target, GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w); +GLAPI void APIENTRY glProgramParameter4fvNV (GLenum target, GLuint index, const GLfloat *v); +GLAPI void APIENTRY glProgramParameters4dvNV (GLenum target, GLuint index, GLsizei count, const GLdouble *v); +GLAPI void APIENTRY glProgramParameters4fvNV (GLenum target, GLuint index, GLsizei count, const GLfloat *v); +GLAPI void APIENTRY glRequestResidentProgramsNV (GLsizei n, const GLuint *programs); +GLAPI void APIENTRY glTrackMatrixNV (GLenum target, GLuint address, GLenum matrix, GLenum transform); +GLAPI void APIENTRY glVertexAttribPointerNV (GLuint index, GLint fsize, GLenum type, GLsizei stride, const GLvoid *pointer); +GLAPI void APIENTRY glVertexAttrib1dNV (GLuint index, GLdouble x); +GLAPI void APIENTRY glVertexAttrib1dvNV (GLuint index, const GLdouble *v); +GLAPI void APIENTRY glVertexAttrib1fNV (GLuint index, GLfloat x); +GLAPI void APIENTRY glVertexAttrib1fvNV (GLuint index, const GLfloat *v); +GLAPI void APIENTRY glVertexAttrib1sNV (GLuint index, GLshort x); +GLAPI void APIENTRY glVertexAttrib1svNV (GLuint index, const GLshort *v); +GLAPI void APIENTRY glVertexAttrib2dNV (GLuint index, GLdouble x, GLdouble y); +GLAPI void APIENTRY glVertexAttrib2dvNV (GLuint index, const GLdouble *v); +GLAPI void APIENTRY glVertexAttrib2fNV (GLuint index, GLfloat x, GLfloat y); +GLAPI void APIENTRY glVertexAttrib2fvNV (GLuint index, const GLfloat *v); +GLAPI void APIENTRY glVertexAttrib2sNV (GLuint index, GLshort x, GLshort y); +GLAPI void APIENTRY glVertexAttrib2svNV (GLuint index, const GLshort *v); +GLAPI void APIENTRY glVertexAttrib3dNV (GLuint index, GLdouble x, GLdouble y, GLdouble z); +GLAPI void APIENTRY glVertexAttrib3dvNV (GLuint index, const GLdouble *v); +GLAPI void APIENTRY glVertexAttrib3fNV (GLuint index, GLfloat x, GLfloat y, GLfloat z); +GLAPI void APIENTRY glVertexAttrib3fvNV (GLuint index, const GLfloat *v); +GLAPI void APIENTRY glVertexAttrib3sNV (GLuint index, GLshort x, GLshort y, GLshort z); +GLAPI void APIENTRY glVertexAttrib3svNV (GLuint index, const GLshort *v); +GLAPI void APIENTRY glVertexAttrib4dNV (GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w); +GLAPI void APIENTRY glVertexAttrib4dvNV (GLuint index, const GLdouble *v); +GLAPI void APIENTRY glVertexAttrib4fNV (GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w); +GLAPI void APIENTRY glVertexAttrib4fvNV (GLuint index, const GLfloat *v); +GLAPI void APIENTRY glVertexAttrib4sNV (GLuint index, GLshort x, GLshort y, GLshort z, GLshort w); +GLAPI void APIENTRY glVertexAttrib4svNV (GLuint index, const GLshort *v); +GLAPI void APIENTRY glVertexAttrib4ubNV (GLuint index, GLubyte x, GLubyte y, GLubyte z, GLubyte w); +GLAPI void APIENTRY glVertexAttrib4ubvNV (GLuint index, const GLubyte *v); +GLAPI void APIENTRY glVertexAttribs1dvNV (GLuint index, GLsizei count, const GLdouble *v); +GLAPI void APIENTRY glVertexAttribs1fvNV (GLuint index, GLsizei count, const GLfloat *v); +GLAPI void APIENTRY glVertexAttribs1svNV (GLuint index, GLsizei count, const GLshort *v); +GLAPI void APIENTRY glVertexAttribs2dvNV (GLuint index, GLsizei count, const GLdouble *v); +GLAPI void APIENTRY glVertexAttribs2fvNV (GLuint index, GLsizei count, const GLfloat *v); +GLAPI void APIENTRY glVertexAttribs2svNV (GLuint index, GLsizei count, const GLshort *v); +GLAPI void APIENTRY glVertexAttribs3dvNV (GLuint index, GLsizei count, const GLdouble *v); +GLAPI void APIENTRY glVertexAttribs3fvNV (GLuint index, GLsizei count, const GLfloat *v); +GLAPI void APIENTRY glVertexAttribs3svNV (GLuint index, GLsizei count, const GLshort *v); +GLAPI void APIENTRY glVertexAttribs4dvNV (GLuint index, GLsizei count, const GLdouble *v); +GLAPI void APIENTRY glVertexAttribs4fvNV (GLuint index, GLsizei count, const GLfloat *v); +GLAPI void APIENTRY glVertexAttribs4svNV (GLuint index, GLsizei count, const GLshort *v); +GLAPI void APIENTRY glVertexAttribs4ubvNV (GLuint index, GLsizei count, const GLubyte *v); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef GLboolean (APIENTRYP PFNGLAREPROGRAMSRESIDENTNVPROC) (GLsizei n, const GLuint *programs, GLboolean *residences); +typedef void (APIENTRYP PFNGLBINDPROGRAMNVPROC) (GLenum target, GLuint id); +typedef void (APIENTRYP PFNGLDELETEPROGRAMSNVPROC) (GLsizei n, const GLuint *programs); +typedef void (APIENTRYP PFNGLEXECUTEPROGRAMNVPROC) (GLenum target, GLuint id, const GLfloat *params); +typedef void (APIENTRYP PFNGLGENPROGRAMSNVPROC) (GLsizei n, GLuint *programs); +typedef void (APIENTRYP PFNGLGETPROGRAMPARAMETERDVNVPROC) (GLenum target, GLuint index, GLenum pname, GLdouble *params); +typedef void (APIENTRYP PFNGLGETPROGRAMPARAMETERFVNVPROC) (GLenum target, GLuint index, GLenum pname, GLfloat *params); +typedef void (APIENTRYP PFNGLGETPROGRAMIVNVPROC) (GLuint id, GLenum pname, GLint *params); +typedef void (APIENTRYP PFNGLGETPROGRAMSTRINGNVPROC) (GLuint id, GLenum pname, GLubyte *program); +typedef void (APIENTRYP PFNGLGETTRACKMATRIXIVNVPROC) (GLenum target, GLuint address, GLenum pname, GLint *params); +typedef void (APIENTRYP PFNGLGETVERTEXATTRIBDVNVPROC) (GLuint index, GLenum pname, GLdouble *params); +typedef void (APIENTRYP PFNGLGETVERTEXATTRIBFVNVPROC) (GLuint index, GLenum pname, GLfloat *params); +typedef void (APIENTRYP PFNGLGETVERTEXATTRIBIVNVPROC) (GLuint index, GLenum pname, GLint *params); +typedef void (APIENTRYP PFNGLGETVERTEXATTRIBPOINTERVNVPROC) (GLuint index, GLenum pname, GLvoid* *pointer); +typedef GLboolean (APIENTRYP PFNGLISPROGRAMNVPROC) (GLuint id); +typedef void (APIENTRYP PFNGLLOADPROGRAMNVPROC) (GLenum target, GLuint id, GLsizei len, const GLubyte *program); +typedef void (APIENTRYP PFNGLPROGRAMPARAMETER4DNVPROC) (GLenum target, GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w); +typedef void (APIENTRYP PFNGLPROGRAMPARAMETER4DVNVPROC) (GLenum target, GLuint index, const GLdouble *v); +typedef void (APIENTRYP PFNGLPROGRAMPARAMETER4FNVPROC) (GLenum target, GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w); +typedef void (APIENTRYP PFNGLPROGRAMPARAMETER4FVNVPROC) (GLenum target, GLuint index, const GLfloat *v); +typedef void (APIENTRYP PFNGLPROGRAMPARAMETERS4DVNVPROC) (GLenum target, GLuint index, GLsizei count, const GLdouble *v); +typedef void (APIENTRYP PFNGLPROGRAMPARAMETERS4FVNVPROC) (GLenum target, GLuint index, GLsizei count, const GLfloat *v); +typedef void (APIENTRYP PFNGLREQUESTRESIDENTPROGRAMSNVPROC) (GLsizei n, const GLuint *programs); +typedef void (APIENTRYP PFNGLTRACKMATRIXNVPROC) (GLenum target, GLuint address, GLenum matrix, GLenum transform); +typedef void (APIENTRYP PFNGLVERTEXATTRIBPOINTERNVPROC) (GLuint index, GLint fsize, GLenum type, GLsizei stride, const GLvoid *pointer); +typedef void (APIENTRYP PFNGLVERTEXATTRIB1DNVPROC) (GLuint index, GLdouble x); +typedef void (APIENTRYP PFNGLVERTEXATTRIB1DVNVPROC) (GLuint index, const GLdouble *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIB1FNVPROC) (GLuint index, GLfloat x); +typedef void (APIENTRYP PFNGLVERTEXATTRIB1FVNVPROC) (GLuint index, const GLfloat *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIB1SNVPROC) (GLuint index, GLshort x); +typedef void (APIENTRYP PFNGLVERTEXATTRIB1SVNVPROC) (GLuint index, const GLshort *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIB2DNVPROC) (GLuint index, GLdouble x, GLdouble y); +typedef void (APIENTRYP PFNGLVERTEXATTRIB2DVNVPROC) (GLuint index, const GLdouble *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIB2FNVPROC) (GLuint index, GLfloat x, GLfloat y); +typedef void (APIENTRYP PFNGLVERTEXATTRIB2FVNVPROC) (GLuint index, const GLfloat *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIB2SNVPROC) (GLuint index, GLshort x, GLshort y); +typedef void (APIENTRYP PFNGLVERTEXATTRIB2SVNVPROC) (GLuint index, const GLshort *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIB3DNVPROC) (GLuint index, GLdouble x, GLdouble y, GLdouble z); +typedef void (APIENTRYP PFNGLVERTEXATTRIB3DVNVPROC) (GLuint index, const GLdouble *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIB3FNVPROC) (GLuint index, GLfloat x, GLfloat y, GLfloat z); +typedef void (APIENTRYP PFNGLVERTEXATTRIB3FVNVPROC) (GLuint index, const GLfloat *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIB3SNVPROC) (GLuint index, GLshort x, GLshort y, GLshort z); +typedef void (APIENTRYP PFNGLVERTEXATTRIB3SVNVPROC) (GLuint index, const GLshort *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIB4DNVPROC) (GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w); +typedef void (APIENTRYP PFNGLVERTEXATTRIB4DVNVPROC) (GLuint index, const GLdouble *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIB4FNVPROC) (GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w); +typedef void (APIENTRYP PFNGLVERTEXATTRIB4FVNVPROC) (GLuint index, const GLfloat *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIB4SNVPROC) (GLuint index, GLshort x, GLshort y, GLshort z, GLshort w); +typedef void (APIENTRYP PFNGLVERTEXATTRIB4SVNVPROC) (GLuint index, const GLshort *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIB4UBNVPROC) (GLuint index, GLubyte x, GLubyte y, GLubyte z, GLubyte w); +typedef void (APIENTRYP PFNGLVERTEXATTRIB4UBVNVPROC) (GLuint index, const GLubyte *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIBS1DVNVPROC) (GLuint index, GLsizei count, const GLdouble *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIBS1FVNVPROC) (GLuint index, GLsizei count, const GLfloat *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIBS1SVNVPROC) (GLuint index, GLsizei count, const GLshort *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIBS2DVNVPROC) (GLuint index, GLsizei count, const GLdouble *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIBS2FVNVPROC) (GLuint index, GLsizei count, const GLfloat *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIBS2SVNVPROC) (GLuint index, GLsizei count, const GLshort *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIBS3DVNVPROC) (GLuint index, GLsizei count, const GLdouble *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIBS3FVNVPROC) (GLuint index, GLsizei count, const GLfloat *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIBS3SVNVPROC) (GLuint index, GLsizei count, const GLshort *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIBS4DVNVPROC) (GLuint index, GLsizei count, const GLdouble *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIBS4FVNVPROC) (GLuint index, GLsizei count, const GLfloat *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIBS4SVNVPROC) (GLuint index, GLsizei count, const GLshort *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIBS4UBVNVPROC) (GLuint index, GLsizei count, const GLubyte *v); +#endif + +#ifndef GL_SGIX_texture_coordinate_clamp +#define GL_SGIX_texture_coordinate_clamp 1 +#endif + +#ifndef GL_SGIX_scalebias_hint +#define GL_SGIX_scalebias_hint 1 +#endif + +#ifndef GL_OML_interlace +#define GL_OML_interlace 1 +#endif + +#ifndef GL_OML_subsample +#define GL_OML_subsample 1 +#endif + +#ifndef GL_OML_resample +#define GL_OML_resample 1 +#endif + +#ifndef GL_NV_copy_depth_to_color +#define GL_NV_copy_depth_to_color 1 +#endif + +#ifndef GL_ATI_envmap_bumpmap +#define GL_ATI_envmap_bumpmap 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glTexBumpParameterivATI (GLenum pname, const GLint *param); +GLAPI void APIENTRY glTexBumpParameterfvATI (GLenum pname, const GLfloat *param); +GLAPI void APIENTRY glGetTexBumpParameterivATI (GLenum pname, GLint *param); +GLAPI void APIENTRY glGetTexBumpParameterfvATI (GLenum pname, GLfloat *param); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLTEXBUMPPARAMETERIVATIPROC) (GLenum pname, const GLint *param); +typedef void (APIENTRYP PFNGLTEXBUMPPARAMETERFVATIPROC) (GLenum pname, const GLfloat *param); +typedef void (APIENTRYP PFNGLGETTEXBUMPPARAMETERIVATIPROC) (GLenum pname, GLint *param); +typedef void (APIENTRYP PFNGLGETTEXBUMPPARAMETERFVATIPROC) (GLenum pname, GLfloat *param); +#endif + +#ifndef GL_ATI_fragment_shader +#define GL_ATI_fragment_shader 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI GLuint APIENTRY glGenFragmentShadersATI (GLuint range); +GLAPI void APIENTRY glBindFragmentShaderATI (GLuint id); +GLAPI void APIENTRY glDeleteFragmentShaderATI (GLuint id); +GLAPI void APIENTRY glBeginFragmentShaderATI (void); +GLAPI void APIENTRY glEndFragmentShaderATI (void); +GLAPI void APIENTRY glPassTexCoordATI (GLuint dst, GLuint coord, GLenum swizzle); +GLAPI void APIENTRY glSampleMapATI (GLuint dst, GLuint interp, GLenum swizzle); +GLAPI void APIENTRY glColorFragmentOp1ATI (GLenum op, GLuint dst, GLuint dstMask, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod); +GLAPI void APIENTRY glColorFragmentOp2ATI (GLenum op, GLuint dst, GLuint dstMask, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod, GLuint arg2, GLuint arg2Rep, GLuint arg2Mod); +GLAPI void APIENTRY glColorFragmentOp3ATI (GLenum op, GLuint dst, GLuint dstMask, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod, GLuint arg2, GLuint arg2Rep, GLuint arg2Mod, GLuint arg3, GLuint arg3Rep, GLuint arg3Mod); +GLAPI void APIENTRY glAlphaFragmentOp1ATI (GLenum op, GLuint dst, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod); +GLAPI void APIENTRY glAlphaFragmentOp2ATI (GLenum op, GLuint dst, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod, GLuint arg2, GLuint arg2Rep, GLuint arg2Mod); +GLAPI void APIENTRY glAlphaFragmentOp3ATI (GLenum op, GLuint dst, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod, GLuint arg2, GLuint arg2Rep, GLuint arg2Mod, GLuint arg3, GLuint arg3Rep, GLuint arg3Mod); +GLAPI void APIENTRY glSetFragmentShaderConstantATI (GLuint dst, const GLfloat *value); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef GLuint (APIENTRYP PFNGLGENFRAGMENTSHADERSATIPROC) (GLuint range); +typedef void (APIENTRYP PFNGLBINDFRAGMENTSHADERATIPROC) (GLuint id); +typedef void (APIENTRYP PFNGLDELETEFRAGMENTSHADERATIPROC) (GLuint id); +typedef void (APIENTRYP PFNGLBEGINFRAGMENTSHADERATIPROC) (void); +typedef void (APIENTRYP PFNGLENDFRAGMENTSHADERATIPROC) (void); +typedef void (APIENTRYP PFNGLPASSTEXCOORDATIPROC) (GLuint dst, GLuint coord, GLenum swizzle); +typedef void (APIENTRYP PFNGLSAMPLEMAPATIPROC) (GLuint dst, GLuint interp, GLenum swizzle); +typedef void (APIENTRYP PFNGLCOLORFRAGMENTOP1ATIPROC) (GLenum op, GLuint dst, GLuint dstMask, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod); +typedef void (APIENTRYP PFNGLCOLORFRAGMENTOP2ATIPROC) (GLenum op, GLuint dst, GLuint dstMask, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod, GLuint arg2, GLuint arg2Rep, GLuint arg2Mod); +typedef void (APIENTRYP PFNGLCOLORFRAGMENTOP3ATIPROC) (GLenum op, GLuint dst, GLuint dstMask, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod, GLuint arg2, GLuint arg2Rep, GLuint arg2Mod, GLuint arg3, GLuint arg3Rep, GLuint arg3Mod); +typedef void (APIENTRYP PFNGLALPHAFRAGMENTOP1ATIPROC) (GLenum op, GLuint dst, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod); +typedef void (APIENTRYP PFNGLALPHAFRAGMENTOP2ATIPROC) (GLenum op, GLuint dst, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod, GLuint arg2, GLuint arg2Rep, GLuint arg2Mod); +typedef void (APIENTRYP PFNGLALPHAFRAGMENTOP3ATIPROC) (GLenum op, GLuint dst, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod, GLuint arg2, GLuint arg2Rep, GLuint arg2Mod, GLuint arg3, GLuint arg3Rep, GLuint arg3Mod); +typedef void (APIENTRYP PFNGLSETFRAGMENTSHADERCONSTANTATIPROC) (GLuint dst, const GLfloat *value); +#endif + +#ifndef GL_ATI_pn_triangles +#define GL_ATI_pn_triangles 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glPNTrianglesiATI (GLenum pname, GLint param); +GLAPI void APIENTRY glPNTrianglesfATI (GLenum pname, GLfloat param); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLPNTRIANGLESIATIPROC) (GLenum pname, GLint param); +typedef void (APIENTRYP PFNGLPNTRIANGLESFATIPROC) (GLenum pname, GLfloat param); +#endif + +#ifndef GL_ATI_vertex_array_object +#define GL_ATI_vertex_array_object 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI GLuint APIENTRY glNewObjectBufferATI (GLsizei size, const GLvoid *pointer, GLenum usage); +GLAPI GLboolean APIENTRY glIsObjectBufferATI (GLuint buffer); +GLAPI void APIENTRY glUpdateObjectBufferATI (GLuint buffer, GLuint offset, GLsizei size, const GLvoid *pointer, GLenum preserve); +GLAPI void APIENTRY glGetObjectBufferfvATI (GLuint buffer, GLenum pname, GLfloat *params); +GLAPI void APIENTRY glGetObjectBufferivATI (GLuint buffer, GLenum pname, GLint *params); +GLAPI void APIENTRY glFreeObjectBufferATI (GLuint buffer); +GLAPI void APIENTRY glArrayObjectATI (GLenum array, GLint size, GLenum type, GLsizei stride, GLuint buffer, GLuint offset); +GLAPI void APIENTRY glGetArrayObjectfvATI (GLenum array, GLenum pname, GLfloat *params); +GLAPI void APIENTRY glGetArrayObjectivATI (GLenum array, GLenum pname, GLint *params); +GLAPI void APIENTRY glVariantArrayObjectATI (GLuint id, GLenum type, GLsizei stride, GLuint buffer, GLuint offset); +GLAPI void APIENTRY glGetVariantArrayObjectfvATI (GLuint id, GLenum pname, GLfloat *params); +GLAPI void APIENTRY glGetVariantArrayObjectivATI (GLuint id, GLenum pname, GLint *params); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef GLuint (APIENTRYP PFNGLNEWOBJECTBUFFERATIPROC) (GLsizei size, const GLvoid *pointer, GLenum usage); +typedef GLboolean (APIENTRYP PFNGLISOBJECTBUFFERATIPROC) (GLuint buffer); +typedef void (APIENTRYP PFNGLUPDATEOBJECTBUFFERATIPROC) (GLuint buffer, GLuint offset, GLsizei size, const GLvoid *pointer, GLenum preserve); +typedef void (APIENTRYP PFNGLGETOBJECTBUFFERFVATIPROC) (GLuint buffer, GLenum pname, GLfloat *params); +typedef void (APIENTRYP PFNGLGETOBJECTBUFFERIVATIPROC) (GLuint buffer, GLenum pname, GLint *params); +typedef void (APIENTRYP PFNGLFREEOBJECTBUFFERATIPROC) (GLuint buffer); +typedef void (APIENTRYP PFNGLARRAYOBJECTATIPROC) (GLenum array, GLint size, GLenum type, GLsizei stride, GLuint buffer, GLuint offset); +typedef void (APIENTRYP PFNGLGETARRAYOBJECTFVATIPROC) (GLenum array, GLenum pname, GLfloat *params); +typedef void (APIENTRYP PFNGLGETARRAYOBJECTIVATIPROC) (GLenum array, GLenum pname, GLint *params); +typedef void (APIENTRYP PFNGLVARIANTARRAYOBJECTATIPROC) (GLuint id, GLenum type, GLsizei stride, GLuint buffer, GLuint offset); +typedef void (APIENTRYP PFNGLGETVARIANTARRAYOBJECTFVATIPROC) (GLuint id, GLenum pname, GLfloat *params); +typedef void (APIENTRYP PFNGLGETVARIANTARRAYOBJECTIVATIPROC) (GLuint id, GLenum pname, GLint *params); +#endif + +#ifndef GL_EXT_vertex_shader +#define GL_EXT_vertex_shader 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glBeginVertexShaderEXT (void); +GLAPI void APIENTRY glEndVertexShaderEXT (void); +GLAPI void APIENTRY glBindVertexShaderEXT (GLuint id); +GLAPI GLuint APIENTRY glGenVertexShadersEXT (GLuint range); +GLAPI void APIENTRY glDeleteVertexShaderEXT (GLuint id); +GLAPI void APIENTRY glShaderOp1EXT (GLenum op, GLuint res, GLuint arg1); +GLAPI void APIENTRY glShaderOp2EXT (GLenum op, GLuint res, GLuint arg1, GLuint arg2); +GLAPI void APIENTRY glShaderOp3EXT (GLenum op, GLuint res, GLuint arg1, GLuint arg2, GLuint arg3); +GLAPI void APIENTRY glSwizzleEXT (GLuint res, GLuint in, GLenum outX, GLenum outY, GLenum outZ, GLenum outW); +GLAPI void APIENTRY glWriteMaskEXT (GLuint res, GLuint in, GLenum outX, GLenum outY, GLenum outZ, GLenum outW); +GLAPI void APIENTRY glInsertComponentEXT (GLuint res, GLuint src, GLuint num); +GLAPI void APIENTRY glExtractComponentEXT (GLuint res, GLuint src, GLuint num); +GLAPI GLuint APIENTRY glGenSymbolsEXT (GLenum datatype, GLenum storagetype, GLenum range, GLuint components); +GLAPI void APIENTRY glSetInvariantEXT (GLuint id, GLenum type, const GLvoid *addr); +GLAPI void APIENTRY glSetLocalConstantEXT (GLuint id, GLenum type, const GLvoid *addr); +GLAPI void APIENTRY glVariantbvEXT (GLuint id, const GLbyte *addr); +GLAPI void APIENTRY glVariantsvEXT (GLuint id, const GLshort *addr); +GLAPI void APIENTRY glVariantivEXT (GLuint id, const GLint *addr); +GLAPI void APIENTRY glVariantfvEXT (GLuint id, const GLfloat *addr); +GLAPI void APIENTRY glVariantdvEXT (GLuint id, const GLdouble *addr); +GLAPI void APIENTRY glVariantubvEXT (GLuint id, const GLubyte *addr); +GLAPI void APIENTRY glVariantusvEXT (GLuint id, const GLushort *addr); +GLAPI void APIENTRY glVariantuivEXT (GLuint id, const GLuint *addr); +GLAPI void APIENTRY glVariantPointerEXT (GLuint id, GLenum type, GLuint stride, const GLvoid *addr); +GLAPI void APIENTRY glEnableVariantClientStateEXT (GLuint id); +GLAPI void APIENTRY glDisableVariantClientStateEXT (GLuint id); +GLAPI GLuint APIENTRY glBindLightParameterEXT (GLenum light, GLenum value); +GLAPI GLuint APIENTRY glBindMaterialParameterEXT (GLenum face, GLenum value); +GLAPI GLuint APIENTRY glBindTexGenParameterEXT (GLenum unit, GLenum coord, GLenum value); +GLAPI GLuint APIENTRY glBindTextureUnitParameterEXT (GLenum unit, GLenum value); +GLAPI GLuint APIENTRY glBindParameterEXT (GLenum value); +GLAPI GLboolean APIENTRY glIsVariantEnabledEXT (GLuint id, GLenum cap); +GLAPI void APIENTRY glGetVariantBooleanvEXT (GLuint id, GLenum value, GLboolean *data); +GLAPI void APIENTRY glGetVariantIntegervEXT (GLuint id, GLenum value, GLint *data); +GLAPI void APIENTRY glGetVariantFloatvEXT (GLuint id, GLenum value, GLfloat *data); +GLAPI void APIENTRY glGetVariantPointervEXT (GLuint id, GLenum value, GLvoid* *data); +GLAPI void APIENTRY glGetInvariantBooleanvEXT (GLuint id, GLenum value, GLboolean *data); +GLAPI void APIENTRY glGetInvariantIntegervEXT (GLuint id, GLenum value, GLint *data); +GLAPI void APIENTRY glGetInvariantFloatvEXT (GLuint id, GLenum value, GLfloat *data); +GLAPI void APIENTRY glGetLocalConstantBooleanvEXT (GLuint id, GLenum value, GLboolean *data); +GLAPI void APIENTRY glGetLocalConstantIntegervEXT (GLuint id, GLenum value, GLint *data); +GLAPI void APIENTRY glGetLocalConstantFloatvEXT (GLuint id, GLenum value, GLfloat *data); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLBEGINVERTEXSHADEREXTPROC) (void); +typedef void (APIENTRYP PFNGLENDVERTEXSHADEREXTPROC) (void); +typedef void (APIENTRYP PFNGLBINDVERTEXSHADEREXTPROC) (GLuint id); +typedef GLuint (APIENTRYP PFNGLGENVERTEXSHADERSEXTPROC) (GLuint range); +typedef void (APIENTRYP PFNGLDELETEVERTEXSHADEREXTPROC) (GLuint id); +typedef void (APIENTRYP PFNGLSHADEROP1EXTPROC) (GLenum op, GLuint res, GLuint arg1); +typedef void (APIENTRYP PFNGLSHADEROP2EXTPROC) (GLenum op, GLuint res, GLuint arg1, GLuint arg2); +typedef void (APIENTRYP PFNGLSHADEROP3EXTPROC) (GLenum op, GLuint res, GLuint arg1, GLuint arg2, GLuint arg3); +typedef void (APIENTRYP PFNGLSWIZZLEEXTPROC) (GLuint res, GLuint in, GLenum outX, GLenum outY, GLenum outZ, GLenum outW); +typedef void (APIENTRYP PFNGLWRITEMASKEXTPROC) (GLuint res, GLuint in, GLenum outX, GLenum outY, GLenum outZ, GLenum outW); +typedef void (APIENTRYP PFNGLINSERTCOMPONENTEXTPROC) (GLuint res, GLuint src, GLuint num); +typedef void (APIENTRYP PFNGLEXTRACTCOMPONENTEXTPROC) (GLuint res, GLuint src, GLuint num); +typedef GLuint (APIENTRYP PFNGLGENSYMBOLSEXTPROC) (GLenum datatype, GLenum storagetype, GLenum range, GLuint components); +typedef void (APIENTRYP PFNGLSETINVARIANTEXTPROC) (GLuint id, GLenum type, const GLvoid *addr); +typedef void (APIENTRYP PFNGLSETLOCALCONSTANTEXTPROC) (GLuint id, GLenum type, const GLvoid *addr); +typedef void (APIENTRYP PFNGLVARIANTBVEXTPROC) (GLuint id, const GLbyte *addr); +typedef void (APIENTRYP PFNGLVARIANTSVEXTPROC) (GLuint id, const GLshort *addr); +typedef void (APIENTRYP PFNGLVARIANTIVEXTPROC) (GLuint id, const GLint *addr); +typedef void (APIENTRYP PFNGLVARIANTFVEXTPROC) (GLuint id, const GLfloat *addr); +typedef void (APIENTRYP PFNGLVARIANTDVEXTPROC) (GLuint id, const GLdouble *addr); +typedef void (APIENTRYP PFNGLVARIANTUBVEXTPROC) (GLuint id, const GLubyte *addr); +typedef void (APIENTRYP PFNGLVARIANTUSVEXTPROC) (GLuint id, const GLushort *addr); +typedef void (APIENTRYP PFNGLVARIANTUIVEXTPROC) (GLuint id, const GLuint *addr); +typedef void (APIENTRYP PFNGLVARIANTPOINTEREXTPROC) (GLuint id, GLenum type, GLuint stride, const GLvoid *addr); +typedef void (APIENTRYP PFNGLENABLEVARIANTCLIENTSTATEEXTPROC) (GLuint id); +typedef void (APIENTRYP PFNGLDISABLEVARIANTCLIENTSTATEEXTPROC) (GLuint id); +typedef GLuint (APIENTRYP PFNGLBINDLIGHTPARAMETEREXTPROC) (GLenum light, GLenum value); +typedef GLuint (APIENTRYP PFNGLBINDMATERIALPARAMETEREXTPROC) (GLenum face, GLenum value); +typedef GLuint (APIENTRYP PFNGLBINDTEXGENPARAMETEREXTPROC) (GLenum unit, GLenum coord, GLenum value); +typedef GLuint (APIENTRYP PFNGLBINDTEXTUREUNITPARAMETEREXTPROC) (GLenum unit, GLenum value); +typedef GLuint (APIENTRYP PFNGLBINDPARAMETEREXTPROC) (GLenum value); +typedef GLboolean (APIENTRYP PFNGLISVARIANTENABLEDEXTPROC) (GLuint id, GLenum cap); +typedef void (APIENTRYP PFNGLGETVARIANTBOOLEANVEXTPROC) (GLuint id, GLenum value, GLboolean *data); +typedef void (APIENTRYP PFNGLGETVARIANTINTEGERVEXTPROC) (GLuint id, GLenum value, GLint *data); +typedef void (APIENTRYP PFNGLGETVARIANTFLOATVEXTPROC) (GLuint id, GLenum value, GLfloat *data); +typedef void (APIENTRYP PFNGLGETVARIANTPOINTERVEXTPROC) (GLuint id, GLenum value, GLvoid* *data); +typedef void (APIENTRYP PFNGLGETINVARIANTBOOLEANVEXTPROC) (GLuint id, GLenum value, GLboolean *data); +typedef void (APIENTRYP PFNGLGETINVARIANTINTEGERVEXTPROC) (GLuint id, GLenum value, GLint *data); +typedef void (APIENTRYP PFNGLGETINVARIANTFLOATVEXTPROC) (GLuint id, GLenum value, GLfloat *data); +typedef void (APIENTRYP PFNGLGETLOCALCONSTANTBOOLEANVEXTPROC) (GLuint id, GLenum value, GLboolean *data); +typedef void (APIENTRYP PFNGLGETLOCALCONSTANTINTEGERVEXTPROC) (GLuint id, GLenum value, GLint *data); +typedef void (APIENTRYP PFNGLGETLOCALCONSTANTFLOATVEXTPROC) (GLuint id, GLenum value, GLfloat *data); +#endif + +#ifndef GL_ATI_vertex_streams +#define GL_ATI_vertex_streams 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glVertexStream1sATI (GLenum stream, GLshort x); +GLAPI void APIENTRY glVertexStream1svATI (GLenum stream, const GLshort *coords); +GLAPI void APIENTRY glVertexStream1iATI (GLenum stream, GLint x); +GLAPI void APIENTRY glVertexStream1ivATI (GLenum stream, const GLint *coords); +GLAPI void APIENTRY glVertexStream1fATI (GLenum stream, GLfloat x); +GLAPI void APIENTRY glVertexStream1fvATI (GLenum stream, const GLfloat *coords); +GLAPI void APIENTRY glVertexStream1dATI (GLenum stream, GLdouble x); +GLAPI void APIENTRY glVertexStream1dvATI (GLenum stream, const GLdouble *coords); +GLAPI void APIENTRY glVertexStream2sATI (GLenum stream, GLshort x, GLshort y); +GLAPI void APIENTRY glVertexStream2svATI (GLenum stream, const GLshort *coords); +GLAPI void APIENTRY glVertexStream2iATI (GLenum stream, GLint x, GLint y); +GLAPI void APIENTRY glVertexStream2ivATI (GLenum stream, const GLint *coords); +GLAPI void APIENTRY glVertexStream2fATI (GLenum stream, GLfloat x, GLfloat y); +GLAPI void APIENTRY glVertexStream2fvATI (GLenum stream, const GLfloat *coords); +GLAPI void APIENTRY glVertexStream2dATI (GLenum stream, GLdouble x, GLdouble y); +GLAPI void APIENTRY glVertexStream2dvATI (GLenum stream, const GLdouble *coords); +GLAPI void APIENTRY glVertexStream3sATI (GLenum stream, GLshort x, GLshort y, GLshort z); +GLAPI void APIENTRY glVertexStream3svATI (GLenum stream, const GLshort *coords); +GLAPI void APIENTRY glVertexStream3iATI (GLenum stream, GLint x, GLint y, GLint z); +GLAPI void APIENTRY glVertexStream3ivATI (GLenum stream, const GLint *coords); +GLAPI void APIENTRY glVertexStream3fATI (GLenum stream, GLfloat x, GLfloat y, GLfloat z); +GLAPI void APIENTRY glVertexStream3fvATI (GLenum stream, const GLfloat *coords); +GLAPI void APIENTRY glVertexStream3dATI (GLenum stream, GLdouble x, GLdouble y, GLdouble z); +GLAPI void APIENTRY glVertexStream3dvATI (GLenum stream, const GLdouble *coords); +GLAPI void APIENTRY glVertexStream4sATI (GLenum stream, GLshort x, GLshort y, GLshort z, GLshort w); +GLAPI void APIENTRY glVertexStream4svATI (GLenum stream, const GLshort *coords); +GLAPI void APIENTRY glVertexStream4iATI (GLenum stream, GLint x, GLint y, GLint z, GLint w); +GLAPI void APIENTRY glVertexStream4ivATI (GLenum stream, const GLint *coords); +GLAPI void APIENTRY glVertexStream4fATI (GLenum stream, GLfloat x, GLfloat y, GLfloat z, GLfloat w); +GLAPI void APIENTRY glVertexStream4fvATI (GLenum stream, const GLfloat *coords); +GLAPI void APIENTRY glVertexStream4dATI (GLenum stream, GLdouble x, GLdouble y, GLdouble z, GLdouble w); +GLAPI void APIENTRY glVertexStream4dvATI (GLenum stream, const GLdouble *coords); +GLAPI void APIENTRY glNormalStream3bATI (GLenum stream, GLbyte nx, GLbyte ny, GLbyte nz); +GLAPI void APIENTRY glNormalStream3bvATI (GLenum stream, const GLbyte *coords); +GLAPI void APIENTRY glNormalStream3sATI (GLenum stream, GLshort nx, GLshort ny, GLshort nz); +GLAPI void APIENTRY glNormalStream3svATI (GLenum stream, const GLshort *coords); +GLAPI void APIENTRY glNormalStream3iATI (GLenum stream, GLint nx, GLint ny, GLint nz); +GLAPI void APIENTRY glNormalStream3ivATI (GLenum stream, const GLint *coords); +GLAPI void APIENTRY glNormalStream3fATI (GLenum stream, GLfloat nx, GLfloat ny, GLfloat nz); +GLAPI void APIENTRY glNormalStream3fvATI (GLenum stream, const GLfloat *coords); +GLAPI void APIENTRY glNormalStream3dATI (GLenum stream, GLdouble nx, GLdouble ny, GLdouble nz); +GLAPI void APIENTRY glNormalStream3dvATI (GLenum stream, const GLdouble *coords); +GLAPI void APIENTRY glClientActiveVertexStreamATI (GLenum stream); +GLAPI void APIENTRY glVertexBlendEnviATI (GLenum pname, GLint param); +GLAPI void APIENTRY glVertexBlendEnvfATI (GLenum pname, GLfloat param); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLVERTEXSTREAM1SATIPROC) (GLenum stream, GLshort x); +typedef void (APIENTRYP PFNGLVERTEXSTREAM1SVATIPROC) (GLenum stream, const GLshort *coords); +typedef void (APIENTRYP PFNGLVERTEXSTREAM1IATIPROC) (GLenum stream, GLint x); +typedef void (APIENTRYP PFNGLVERTEXSTREAM1IVATIPROC) (GLenum stream, const GLint *coords); +typedef void (APIENTRYP PFNGLVERTEXSTREAM1FATIPROC) (GLenum stream, GLfloat x); +typedef void (APIENTRYP PFNGLVERTEXSTREAM1FVATIPROC) (GLenum stream, const GLfloat *coords); +typedef void (APIENTRYP PFNGLVERTEXSTREAM1DATIPROC) (GLenum stream, GLdouble x); +typedef void (APIENTRYP PFNGLVERTEXSTREAM1DVATIPROC) (GLenum stream, const GLdouble *coords); +typedef void (APIENTRYP PFNGLVERTEXSTREAM2SATIPROC) (GLenum stream, GLshort x, GLshort y); +typedef void (APIENTRYP PFNGLVERTEXSTREAM2SVATIPROC) (GLenum stream, const GLshort *coords); +typedef void (APIENTRYP PFNGLVERTEXSTREAM2IATIPROC) (GLenum stream, GLint x, GLint y); +typedef void (APIENTRYP PFNGLVERTEXSTREAM2IVATIPROC) (GLenum stream, const GLint *coords); +typedef void (APIENTRYP PFNGLVERTEXSTREAM2FATIPROC) (GLenum stream, GLfloat x, GLfloat y); +typedef void (APIENTRYP PFNGLVERTEXSTREAM2FVATIPROC) (GLenum stream, const GLfloat *coords); +typedef void (APIENTRYP PFNGLVERTEXSTREAM2DATIPROC) (GLenum stream, GLdouble x, GLdouble y); +typedef void (APIENTRYP PFNGLVERTEXSTREAM2DVATIPROC) (GLenum stream, const GLdouble *coords); +typedef void (APIENTRYP PFNGLVERTEXSTREAM3SATIPROC) (GLenum stream, GLshort x, GLshort y, GLshort z); +typedef void (APIENTRYP PFNGLVERTEXSTREAM3SVATIPROC) (GLenum stream, const GLshort *coords); +typedef void (APIENTRYP PFNGLVERTEXSTREAM3IATIPROC) (GLenum stream, GLint x, GLint y, GLint z); +typedef void (APIENTRYP PFNGLVERTEXSTREAM3IVATIPROC) (GLenum stream, const GLint *coords); +typedef void (APIENTRYP PFNGLVERTEXSTREAM3FATIPROC) (GLenum stream, GLfloat x, GLfloat y, GLfloat z); +typedef void (APIENTRYP PFNGLVERTEXSTREAM3FVATIPROC) (GLenum stream, const GLfloat *coords); +typedef void (APIENTRYP PFNGLVERTEXSTREAM3DATIPROC) (GLenum stream, GLdouble x, GLdouble y, GLdouble z); +typedef void (APIENTRYP PFNGLVERTEXSTREAM3DVATIPROC) (GLenum stream, const GLdouble *coords); +typedef void (APIENTRYP PFNGLVERTEXSTREAM4SATIPROC) (GLenum stream, GLshort x, GLshort y, GLshort z, GLshort w); +typedef void (APIENTRYP PFNGLVERTEXSTREAM4SVATIPROC) (GLenum stream, const GLshort *coords); +typedef void (APIENTRYP PFNGLVERTEXSTREAM4IATIPROC) (GLenum stream, GLint x, GLint y, GLint z, GLint w); +typedef void (APIENTRYP PFNGLVERTEXSTREAM4IVATIPROC) (GLenum stream, const GLint *coords); +typedef void (APIENTRYP PFNGLVERTEXSTREAM4FATIPROC) (GLenum stream, GLfloat x, GLfloat y, GLfloat z, GLfloat w); +typedef void (APIENTRYP PFNGLVERTEXSTREAM4FVATIPROC) (GLenum stream, const GLfloat *coords); +typedef void (APIENTRYP PFNGLVERTEXSTREAM4DATIPROC) (GLenum stream, GLdouble x, GLdouble y, GLdouble z, GLdouble w); +typedef void (APIENTRYP PFNGLVERTEXSTREAM4DVATIPROC) (GLenum stream, const GLdouble *coords); +typedef void (APIENTRYP PFNGLNORMALSTREAM3BATIPROC) (GLenum stream, GLbyte nx, GLbyte ny, GLbyte nz); +typedef void (APIENTRYP PFNGLNORMALSTREAM3BVATIPROC) (GLenum stream, const GLbyte *coords); +typedef void (APIENTRYP PFNGLNORMALSTREAM3SATIPROC) (GLenum stream, GLshort nx, GLshort ny, GLshort nz); +typedef void (APIENTRYP PFNGLNORMALSTREAM3SVATIPROC) (GLenum stream, const GLshort *coords); +typedef void (APIENTRYP PFNGLNORMALSTREAM3IATIPROC) (GLenum stream, GLint nx, GLint ny, GLint nz); +typedef void (APIENTRYP PFNGLNORMALSTREAM3IVATIPROC) (GLenum stream, const GLint *coords); +typedef void (APIENTRYP PFNGLNORMALSTREAM3FATIPROC) (GLenum stream, GLfloat nx, GLfloat ny, GLfloat nz); +typedef void (APIENTRYP PFNGLNORMALSTREAM3FVATIPROC) (GLenum stream, const GLfloat *coords); +typedef void (APIENTRYP PFNGLNORMALSTREAM3DATIPROC) (GLenum stream, GLdouble nx, GLdouble ny, GLdouble nz); +typedef void (APIENTRYP PFNGLNORMALSTREAM3DVATIPROC) (GLenum stream, const GLdouble *coords); +typedef void (APIENTRYP PFNGLCLIENTACTIVEVERTEXSTREAMATIPROC) (GLenum stream); +typedef void (APIENTRYP PFNGLVERTEXBLENDENVIATIPROC) (GLenum pname, GLint param); +typedef void (APIENTRYP PFNGLVERTEXBLENDENVFATIPROC) (GLenum pname, GLfloat param); +#endif + +#ifndef GL_ATI_element_array +#define GL_ATI_element_array 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glElementPointerATI (GLenum type, const GLvoid *pointer); +GLAPI void APIENTRY glDrawElementArrayATI (GLenum mode, GLsizei count); +GLAPI void APIENTRY glDrawRangeElementArrayATI (GLenum mode, GLuint start, GLuint end, GLsizei count); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLELEMENTPOINTERATIPROC) (GLenum type, const GLvoid *pointer); +typedef void (APIENTRYP PFNGLDRAWELEMENTARRAYATIPROC) (GLenum mode, GLsizei count); +typedef void (APIENTRYP PFNGLDRAWRANGEELEMENTARRAYATIPROC) (GLenum mode, GLuint start, GLuint end, GLsizei count); +#endif + +#ifndef GL_SUN_mesh_array +#define GL_SUN_mesh_array 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glDrawMeshArraysSUN (GLenum mode, GLint first, GLsizei count, GLsizei width); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLDRAWMESHARRAYSSUNPROC) (GLenum mode, GLint first, GLsizei count, GLsizei width); +#endif + +#ifndef GL_SUN_slice_accum +#define GL_SUN_slice_accum 1 +#endif + +#ifndef GL_NV_multisample_filter_hint +#define GL_NV_multisample_filter_hint 1 +#endif + +#ifndef GL_NV_depth_clamp +#define GL_NV_depth_clamp 1 +#endif + +#ifndef GL_NV_occlusion_query +#define GL_NV_occlusion_query 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glGenOcclusionQueriesNV (GLsizei n, GLuint *ids); +GLAPI void APIENTRY glDeleteOcclusionQueriesNV (GLsizei n, const GLuint *ids); +GLAPI GLboolean APIENTRY glIsOcclusionQueryNV (GLuint id); +GLAPI void APIENTRY glBeginOcclusionQueryNV (GLuint id); +GLAPI void APIENTRY glEndOcclusionQueryNV (void); +GLAPI void APIENTRY glGetOcclusionQueryivNV (GLuint id, GLenum pname, GLint *params); +GLAPI void APIENTRY glGetOcclusionQueryuivNV (GLuint id, GLenum pname, GLuint *params); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLGENOCCLUSIONQUERIESNVPROC) (GLsizei n, GLuint *ids); +typedef void (APIENTRYP PFNGLDELETEOCCLUSIONQUERIESNVPROC) (GLsizei n, const GLuint *ids); +typedef GLboolean (APIENTRYP PFNGLISOCCLUSIONQUERYNVPROC) (GLuint id); +typedef void (APIENTRYP PFNGLBEGINOCCLUSIONQUERYNVPROC) (GLuint id); +typedef void (APIENTRYP PFNGLENDOCCLUSIONQUERYNVPROC) (void); +typedef void (APIENTRYP PFNGLGETOCCLUSIONQUERYIVNVPROC) (GLuint id, GLenum pname, GLint *params); +typedef void (APIENTRYP PFNGLGETOCCLUSIONQUERYUIVNVPROC) (GLuint id, GLenum pname, GLuint *params); +#endif + +#ifndef GL_NV_point_sprite +#define GL_NV_point_sprite 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glPointParameteriNV (GLenum pname, GLint param); +GLAPI void APIENTRY glPointParameterivNV (GLenum pname, const GLint *params); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLPOINTPARAMETERINVPROC) (GLenum pname, GLint param); +typedef void (APIENTRYP PFNGLPOINTPARAMETERIVNVPROC) (GLenum pname, const GLint *params); +#endif + +#ifndef GL_NV_texture_shader3 +#define GL_NV_texture_shader3 1 +#endif + +#ifndef GL_NV_vertex_program1_1 +#define GL_NV_vertex_program1_1 1 +#endif + +#ifndef GL_EXT_shadow_funcs +#define GL_EXT_shadow_funcs 1 +#endif + +#ifndef GL_EXT_stencil_two_side +#define GL_EXT_stencil_two_side 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glActiveStencilFaceEXT (GLenum face); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLACTIVESTENCILFACEEXTPROC) (GLenum face); +#endif + +#ifndef GL_ATI_text_fragment_shader +#define GL_ATI_text_fragment_shader 1 +#endif + +#ifndef GL_APPLE_client_storage +#define GL_APPLE_client_storage 1 +#endif + +#ifndef GL_APPLE_element_array +#define GL_APPLE_element_array 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glElementPointerAPPLE (GLenum type, const GLvoid *pointer); +GLAPI void APIENTRY glDrawElementArrayAPPLE (GLenum mode, GLint first, GLsizei count); +GLAPI void APIENTRY glDrawRangeElementArrayAPPLE (GLenum mode, GLuint start, GLuint end, GLint first, GLsizei count); +GLAPI void APIENTRY glMultiDrawElementArrayAPPLE (GLenum mode, const GLint *first, const GLsizei *count, GLsizei primcount); +GLAPI void APIENTRY glMultiDrawRangeElementArrayAPPLE (GLenum mode, GLuint start, GLuint end, const GLint *first, const GLsizei *count, GLsizei primcount); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLELEMENTPOINTERAPPLEPROC) (GLenum type, const GLvoid *pointer); +typedef void (APIENTRYP PFNGLDRAWELEMENTARRAYAPPLEPROC) (GLenum mode, GLint first, GLsizei count); +typedef void (APIENTRYP PFNGLDRAWRANGEELEMENTARRAYAPPLEPROC) (GLenum mode, GLuint start, GLuint end, GLint first, GLsizei count); +typedef void (APIENTRYP PFNGLMULTIDRAWELEMENTARRAYAPPLEPROC) (GLenum mode, const GLint *first, const GLsizei *count, GLsizei primcount); +typedef void (APIENTRYP PFNGLMULTIDRAWRANGEELEMENTARRAYAPPLEPROC) (GLenum mode, GLuint start, GLuint end, const GLint *first, const GLsizei *count, GLsizei primcount); +#endif + +#ifndef GL_APPLE_fence +#define GL_APPLE_fence 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glGenFencesAPPLE (GLsizei n, GLuint *fences); +GLAPI void APIENTRY glDeleteFencesAPPLE (GLsizei n, const GLuint *fences); +GLAPI void APIENTRY glSetFenceAPPLE (GLuint fence); +GLAPI GLboolean APIENTRY glIsFenceAPPLE (GLuint fence); +GLAPI GLboolean APIENTRY glTestFenceAPPLE (GLuint fence); +GLAPI void APIENTRY glFinishFenceAPPLE (GLuint fence); +GLAPI GLboolean APIENTRY glTestObjectAPPLE (GLenum object, GLuint name); +GLAPI void APIENTRY glFinishObjectAPPLE (GLenum object, GLint name); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLGENFENCESAPPLEPROC) (GLsizei n, GLuint *fences); +typedef void (APIENTRYP PFNGLDELETEFENCESAPPLEPROC) (GLsizei n, const GLuint *fences); +typedef void (APIENTRYP PFNGLSETFENCEAPPLEPROC) (GLuint fence); +typedef GLboolean (APIENTRYP PFNGLISFENCEAPPLEPROC) (GLuint fence); +typedef GLboolean (APIENTRYP PFNGLTESTFENCEAPPLEPROC) (GLuint fence); +typedef void (APIENTRYP PFNGLFINISHFENCEAPPLEPROC) (GLuint fence); +typedef GLboolean (APIENTRYP PFNGLTESTOBJECTAPPLEPROC) (GLenum object, GLuint name); +typedef void (APIENTRYP PFNGLFINISHOBJECTAPPLEPROC) (GLenum object, GLint name); +#endif + +#ifndef GL_APPLE_vertex_array_object +#define GL_APPLE_vertex_array_object 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glBindVertexArrayAPPLE (GLuint array); +GLAPI void APIENTRY glDeleteVertexArraysAPPLE (GLsizei n, const GLuint *arrays); +GLAPI void APIENTRY glGenVertexArraysAPPLE (GLsizei n, GLuint *arrays); +GLAPI GLboolean APIENTRY glIsVertexArrayAPPLE (GLuint array); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLBINDVERTEXARRAYAPPLEPROC) (GLuint array); +typedef void (APIENTRYP PFNGLDELETEVERTEXARRAYSAPPLEPROC) (GLsizei n, const GLuint *arrays); +typedef void (APIENTRYP PFNGLGENVERTEXARRAYSAPPLEPROC) (GLsizei n, GLuint *arrays); +typedef GLboolean (APIENTRYP PFNGLISVERTEXARRAYAPPLEPROC) (GLuint array); +#endif + +#ifndef GL_APPLE_vertex_array_range +#define GL_APPLE_vertex_array_range 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glVertexArrayRangeAPPLE (GLsizei length, GLvoid *pointer); +GLAPI void APIENTRY glFlushVertexArrayRangeAPPLE (GLsizei length, GLvoid *pointer); +GLAPI void APIENTRY glVertexArrayParameteriAPPLE (GLenum pname, GLint param); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLVERTEXARRAYRANGEAPPLEPROC) (GLsizei length, GLvoid *pointer); +typedef void (APIENTRYP PFNGLFLUSHVERTEXARRAYRANGEAPPLEPROC) (GLsizei length, GLvoid *pointer); +typedef void (APIENTRYP PFNGLVERTEXARRAYPARAMETERIAPPLEPROC) (GLenum pname, GLint param); +#endif + +#ifndef GL_APPLE_ycbcr_422 +#define GL_APPLE_ycbcr_422 1 +#endif + +#ifndef GL_S3_s3tc +#define GL_S3_s3tc 1 +#endif + +#ifndef GL_ATI_draw_buffers +#define GL_ATI_draw_buffers 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glDrawBuffersATI (GLsizei n, const GLenum *bufs); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLDRAWBUFFERSATIPROC) (GLsizei n, const GLenum *bufs); +#endif + +#ifndef GL_ATI_pixel_format_float +#define GL_ATI_pixel_format_float 1 +/* This is really a WGL extension, but defines some associated GL enums. + * ATI does not export "GL_ATI_pixel_format_float" in the GL_EXTENSIONS string. + */ +#endif + +#ifndef GL_ATI_texture_env_combine3 +#define GL_ATI_texture_env_combine3 1 +#endif + +#ifndef GL_ATI_texture_float +#define GL_ATI_texture_float 1 +#endif + +#ifndef GL_NV_float_buffer +#define GL_NV_float_buffer 1 +#endif + +#ifndef GL_NV_fragment_program +#define GL_NV_fragment_program 1 +/* Some NV_fragment_program entry points are shared with ARB_vertex_program. */ +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glProgramNamedParameter4fNV (GLuint id, GLsizei len, const GLubyte *name, GLfloat x, GLfloat y, GLfloat z, GLfloat w); +GLAPI void APIENTRY glProgramNamedParameter4dNV (GLuint id, GLsizei len, const GLubyte *name, GLdouble x, GLdouble y, GLdouble z, GLdouble w); +GLAPI void APIENTRY glProgramNamedParameter4fvNV (GLuint id, GLsizei len, const GLubyte *name, const GLfloat *v); +GLAPI void APIENTRY glProgramNamedParameter4dvNV (GLuint id, GLsizei len, const GLubyte *name, const GLdouble *v); +GLAPI void APIENTRY glGetProgramNamedParameterfvNV (GLuint id, GLsizei len, const GLubyte *name, GLfloat *params); +GLAPI void APIENTRY glGetProgramNamedParameterdvNV (GLuint id, GLsizei len, const GLubyte *name, GLdouble *params); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLPROGRAMNAMEDPARAMETER4FNVPROC) (GLuint id, GLsizei len, const GLubyte *name, GLfloat x, GLfloat y, GLfloat z, GLfloat w); +typedef void (APIENTRYP PFNGLPROGRAMNAMEDPARAMETER4DNVPROC) (GLuint id, GLsizei len, const GLubyte *name, GLdouble x, GLdouble y, GLdouble z, GLdouble w); +typedef void (APIENTRYP PFNGLPROGRAMNAMEDPARAMETER4FVNVPROC) (GLuint id, GLsizei len, const GLubyte *name, const GLfloat *v); +typedef void (APIENTRYP PFNGLPROGRAMNAMEDPARAMETER4DVNVPROC) (GLuint id, GLsizei len, const GLubyte *name, const GLdouble *v); +typedef void (APIENTRYP PFNGLGETPROGRAMNAMEDPARAMETERFVNVPROC) (GLuint id, GLsizei len, const GLubyte *name, GLfloat *params); +typedef void (APIENTRYP PFNGLGETPROGRAMNAMEDPARAMETERDVNVPROC) (GLuint id, GLsizei len, const GLubyte *name, GLdouble *params); +#endif + +#ifndef GL_NV_half_float +#define GL_NV_half_float 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glVertex2hNV (GLhalfNV x, GLhalfNV y); +GLAPI void APIENTRY glVertex2hvNV (const GLhalfNV *v); +GLAPI void APIENTRY glVertex3hNV (GLhalfNV x, GLhalfNV y, GLhalfNV z); +GLAPI void APIENTRY glVertex3hvNV (const GLhalfNV *v); +GLAPI void APIENTRY glVertex4hNV (GLhalfNV x, GLhalfNV y, GLhalfNV z, GLhalfNV w); +GLAPI void APIENTRY glVertex4hvNV (const GLhalfNV *v); +GLAPI void APIENTRY glNormal3hNV (GLhalfNV nx, GLhalfNV ny, GLhalfNV nz); +GLAPI void APIENTRY glNormal3hvNV (const GLhalfNV *v); +GLAPI void APIENTRY glColor3hNV (GLhalfNV red, GLhalfNV green, GLhalfNV blue); +GLAPI void APIENTRY glColor3hvNV (const GLhalfNV *v); +GLAPI void APIENTRY glColor4hNV (GLhalfNV red, GLhalfNV green, GLhalfNV blue, GLhalfNV alpha); +GLAPI void APIENTRY glColor4hvNV (const GLhalfNV *v); +GLAPI void APIENTRY glTexCoord1hNV (GLhalfNV s); +GLAPI void APIENTRY glTexCoord1hvNV (const GLhalfNV *v); +GLAPI void APIENTRY glTexCoord2hNV (GLhalfNV s, GLhalfNV t); +GLAPI void APIENTRY glTexCoord2hvNV (const GLhalfNV *v); +GLAPI void APIENTRY glTexCoord3hNV (GLhalfNV s, GLhalfNV t, GLhalfNV r); +GLAPI void APIENTRY glTexCoord3hvNV (const GLhalfNV *v); +GLAPI void APIENTRY glTexCoord4hNV (GLhalfNV s, GLhalfNV t, GLhalfNV r, GLhalfNV q); +GLAPI void APIENTRY glTexCoord4hvNV (const GLhalfNV *v); +GLAPI void APIENTRY glMultiTexCoord1hNV (GLenum target, GLhalfNV s); +GLAPI void APIENTRY glMultiTexCoord1hvNV (GLenum target, const GLhalfNV *v); +GLAPI void APIENTRY glMultiTexCoord2hNV (GLenum target, GLhalfNV s, GLhalfNV t); +GLAPI void APIENTRY glMultiTexCoord2hvNV (GLenum target, const GLhalfNV *v); +GLAPI void APIENTRY glMultiTexCoord3hNV (GLenum target, GLhalfNV s, GLhalfNV t, GLhalfNV r); +GLAPI void APIENTRY glMultiTexCoord3hvNV (GLenum target, const GLhalfNV *v); +GLAPI void APIENTRY glMultiTexCoord4hNV (GLenum target, GLhalfNV s, GLhalfNV t, GLhalfNV r, GLhalfNV q); +GLAPI void APIENTRY glMultiTexCoord4hvNV (GLenum target, const GLhalfNV *v); +GLAPI void APIENTRY glFogCoordhNV (GLhalfNV fog); +GLAPI void APIENTRY glFogCoordhvNV (const GLhalfNV *fog); +GLAPI void APIENTRY glSecondaryColor3hNV (GLhalfNV red, GLhalfNV green, GLhalfNV blue); +GLAPI void APIENTRY glSecondaryColor3hvNV (const GLhalfNV *v); +GLAPI void APIENTRY glVertexWeighthNV (GLhalfNV weight); +GLAPI void APIENTRY glVertexWeighthvNV (const GLhalfNV *weight); +GLAPI void APIENTRY glVertexAttrib1hNV (GLuint index, GLhalfNV x); +GLAPI void APIENTRY glVertexAttrib1hvNV (GLuint index, const GLhalfNV *v); +GLAPI void APIENTRY glVertexAttrib2hNV (GLuint index, GLhalfNV x, GLhalfNV y); +GLAPI void APIENTRY glVertexAttrib2hvNV (GLuint index, const GLhalfNV *v); +GLAPI void APIENTRY glVertexAttrib3hNV (GLuint index, GLhalfNV x, GLhalfNV y, GLhalfNV z); +GLAPI void APIENTRY glVertexAttrib3hvNV (GLuint index, const GLhalfNV *v); +GLAPI void APIENTRY glVertexAttrib4hNV (GLuint index, GLhalfNV x, GLhalfNV y, GLhalfNV z, GLhalfNV w); +GLAPI void APIENTRY glVertexAttrib4hvNV (GLuint index, const GLhalfNV *v); +GLAPI void APIENTRY glVertexAttribs1hvNV (GLuint index, GLsizei n, const GLhalfNV *v); +GLAPI void APIENTRY glVertexAttribs2hvNV (GLuint index, GLsizei n, const GLhalfNV *v); +GLAPI void APIENTRY glVertexAttribs3hvNV (GLuint index, GLsizei n, const GLhalfNV *v); +GLAPI void APIENTRY glVertexAttribs4hvNV (GLuint index, GLsizei n, const GLhalfNV *v); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLVERTEX2HNVPROC) (GLhalfNV x, GLhalfNV y); +typedef void (APIENTRYP PFNGLVERTEX2HVNVPROC) (const GLhalfNV *v); +typedef void (APIENTRYP PFNGLVERTEX3HNVPROC) (GLhalfNV x, GLhalfNV y, GLhalfNV z); +typedef void (APIENTRYP PFNGLVERTEX3HVNVPROC) (const GLhalfNV *v); +typedef void (APIENTRYP PFNGLVERTEX4HNVPROC) (GLhalfNV x, GLhalfNV y, GLhalfNV z, GLhalfNV w); +typedef void (APIENTRYP PFNGLVERTEX4HVNVPROC) (const GLhalfNV *v); +typedef void (APIENTRYP PFNGLNORMAL3HNVPROC) (GLhalfNV nx, GLhalfNV ny, GLhalfNV nz); +typedef void (APIENTRYP PFNGLNORMAL3HVNVPROC) (const GLhalfNV *v); +typedef void (APIENTRYP PFNGLCOLOR3HNVPROC) (GLhalfNV red, GLhalfNV green, GLhalfNV blue); +typedef void (APIENTRYP PFNGLCOLOR3HVNVPROC) (const GLhalfNV *v); +typedef void (APIENTRYP PFNGLCOLOR4HNVPROC) (GLhalfNV red, GLhalfNV green, GLhalfNV blue, GLhalfNV alpha); +typedef void (APIENTRYP PFNGLCOLOR4HVNVPROC) (const GLhalfNV *v); +typedef void (APIENTRYP PFNGLTEXCOORD1HNVPROC) (GLhalfNV s); +typedef void (APIENTRYP PFNGLTEXCOORD1HVNVPROC) (const GLhalfNV *v); +typedef void (APIENTRYP PFNGLTEXCOORD2HNVPROC) (GLhalfNV s, GLhalfNV t); +typedef void (APIENTRYP PFNGLTEXCOORD2HVNVPROC) (const GLhalfNV *v); +typedef void (APIENTRYP PFNGLTEXCOORD3HNVPROC) (GLhalfNV s, GLhalfNV t, GLhalfNV r); +typedef void (APIENTRYP PFNGLTEXCOORD3HVNVPROC) (const GLhalfNV *v); +typedef void (APIENTRYP PFNGLTEXCOORD4HNVPROC) (GLhalfNV s, GLhalfNV t, GLhalfNV r, GLhalfNV q); +typedef void (APIENTRYP PFNGLTEXCOORD4HVNVPROC) (const GLhalfNV *v); +typedef void (APIENTRYP PFNGLMULTITEXCOORD1HNVPROC) (GLenum target, GLhalfNV s); +typedef void (APIENTRYP PFNGLMULTITEXCOORD1HVNVPROC) (GLenum target, const GLhalfNV *v); +typedef void (APIENTRYP PFNGLMULTITEXCOORD2HNVPROC) (GLenum target, GLhalfNV s, GLhalfNV t); +typedef void (APIENTRYP PFNGLMULTITEXCOORD2HVNVPROC) (GLenum target, const GLhalfNV *v); +typedef void (APIENTRYP PFNGLMULTITEXCOORD3HNVPROC) (GLenum target, GLhalfNV s, GLhalfNV t, GLhalfNV r); +typedef void (APIENTRYP PFNGLMULTITEXCOORD3HVNVPROC) (GLenum target, const GLhalfNV *v); +typedef void (APIENTRYP PFNGLMULTITEXCOORD4HNVPROC) (GLenum target, GLhalfNV s, GLhalfNV t, GLhalfNV r, GLhalfNV q); +typedef void (APIENTRYP PFNGLMULTITEXCOORD4HVNVPROC) (GLenum target, const GLhalfNV *v); +typedef void (APIENTRYP PFNGLFOGCOORDHNVPROC) (GLhalfNV fog); +typedef void (APIENTRYP PFNGLFOGCOORDHVNVPROC) (const GLhalfNV *fog); +typedef void (APIENTRYP PFNGLSECONDARYCOLOR3HNVPROC) (GLhalfNV red, GLhalfNV green, GLhalfNV blue); +typedef void (APIENTRYP PFNGLSECONDARYCOLOR3HVNVPROC) (const GLhalfNV *v); +typedef void (APIENTRYP PFNGLVERTEXWEIGHTHNVPROC) (GLhalfNV weight); +typedef void (APIENTRYP PFNGLVERTEXWEIGHTHVNVPROC) (const GLhalfNV *weight); +typedef void (APIENTRYP PFNGLVERTEXATTRIB1HNVPROC) (GLuint index, GLhalfNV x); +typedef void (APIENTRYP PFNGLVERTEXATTRIB1HVNVPROC) (GLuint index, const GLhalfNV *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIB2HNVPROC) (GLuint index, GLhalfNV x, GLhalfNV y); +typedef void (APIENTRYP PFNGLVERTEXATTRIB2HVNVPROC) (GLuint index, const GLhalfNV *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIB3HNVPROC) (GLuint index, GLhalfNV x, GLhalfNV y, GLhalfNV z); +typedef void (APIENTRYP PFNGLVERTEXATTRIB3HVNVPROC) (GLuint index, const GLhalfNV *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIB4HNVPROC) (GLuint index, GLhalfNV x, GLhalfNV y, GLhalfNV z, GLhalfNV w); +typedef void (APIENTRYP PFNGLVERTEXATTRIB4HVNVPROC) (GLuint index, const GLhalfNV *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIBS1HVNVPROC) (GLuint index, GLsizei n, const GLhalfNV *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIBS2HVNVPROC) (GLuint index, GLsizei n, const GLhalfNV *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIBS3HVNVPROC) (GLuint index, GLsizei n, const GLhalfNV *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIBS4HVNVPROC) (GLuint index, GLsizei n, const GLhalfNV *v); +#endif + +#ifndef GL_NV_pixel_data_range +#define GL_NV_pixel_data_range 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glPixelDataRangeNV (GLenum target, GLsizei length, const GLvoid *pointer); +GLAPI void APIENTRY glFlushPixelDataRangeNV (GLenum target); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLPIXELDATARANGENVPROC) (GLenum target, GLsizei length, const GLvoid *pointer); +typedef void (APIENTRYP PFNGLFLUSHPIXELDATARANGENVPROC) (GLenum target); +#endif + +#ifndef GL_NV_primitive_restart +#define GL_NV_primitive_restart 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glPrimitiveRestartNV (void); +GLAPI void APIENTRY glPrimitiveRestartIndexNV (GLuint index); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLPRIMITIVERESTARTNVPROC) (void); +typedef void (APIENTRYP PFNGLPRIMITIVERESTARTINDEXNVPROC) (GLuint index); +#endif + +#ifndef GL_NV_texture_expand_normal +#define GL_NV_texture_expand_normal 1 +#endif + +#ifndef GL_NV_vertex_program2 +#define GL_NV_vertex_program2 1 +#endif + +#ifndef GL_ATI_map_object_buffer +#define GL_ATI_map_object_buffer 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI GLvoid* APIENTRY glMapObjectBufferATI (GLuint buffer); +GLAPI void APIENTRY glUnmapObjectBufferATI (GLuint buffer); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef GLvoid* (APIENTRYP PFNGLMAPOBJECTBUFFERATIPROC) (GLuint buffer); +typedef void (APIENTRYP PFNGLUNMAPOBJECTBUFFERATIPROC) (GLuint buffer); +#endif + +#ifndef GL_ATI_separate_stencil +#define GL_ATI_separate_stencil 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glStencilOpSeparateATI (GLenum face, GLenum sfail, GLenum dpfail, GLenum dppass); +GLAPI void APIENTRY glStencilFuncSeparateATI (GLenum frontfunc, GLenum backfunc, GLint ref, GLuint mask); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLSTENCILOPSEPARATEATIPROC) (GLenum face, GLenum sfail, GLenum dpfail, GLenum dppass); +typedef void (APIENTRYP PFNGLSTENCILFUNCSEPARATEATIPROC) (GLenum frontfunc, GLenum backfunc, GLint ref, GLuint mask); +#endif + +#ifndef GL_ATI_vertex_attrib_array_object +#define GL_ATI_vertex_attrib_array_object 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glVertexAttribArrayObjectATI (GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, GLuint buffer, GLuint offset); +GLAPI void APIENTRY glGetVertexAttribArrayObjectfvATI (GLuint index, GLenum pname, GLfloat *params); +GLAPI void APIENTRY glGetVertexAttribArrayObjectivATI (GLuint index, GLenum pname, GLint *params); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLVERTEXATTRIBARRAYOBJECTATIPROC) (GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, GLuint buffer, GLuint offset); +typedef void (APIENTRYP PFNGLGETVERTEXATTRIBARRAYOBJECTFVATIPROC) (GLuint index, GLenum pname, GLfloat *params); +typedef void (APIENTRYP PFNGLGETVERTEXATTRIBARRAYOBJECTIVATIPROC) (GLuint index, GLenum pname, GLint *params); +#endif + +#ifndef GL_OES_read_format +#define GL_OES_read_format 1 +#endif + +#ifndef GL_EXT_depth_bounds_test +#define GL_EXT_depth_bounds_test 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glDepthBoundsEXT (GLclampd zmin, GLclampd zmax); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLDEPTHBOUNDSEXTPROC) (GLclampd zmin, GLclampd zmax); +#endif + +#ifndef GL_EXT_texture_mirror_clamp +#define GL_EXT_texture_mirror_clamp 1 +#endif + +#ifndef GL_EXT_blend_equation_separate +#define GL_EXT_blend_equation_separate 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glBlendEquationSeparateEXT (GLenum modeRGB, GLenum modeAlpha); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLBLENDEQUATIONSEPARATEEXTPROC) (GLenum modeRGB, GLenum modeAlpha); +#endif + +#ifndef GL_MESA_pack_invert +#define GL_MESA_pack_invert 1 +#endif + +#ifndef GL_MESA_ycbcr_texture +#define GL_MESA_ycbcr_texture 1 +#endif + +#ifndef GL_EXT_pixel_buffer_object +#define GL_EXT_pixel_buffer_object 1 +#endif + +#ifndef GL_NV_fragment_program_option +#define GL_NV_fragment_program_option 1 +#endif + +#ifndef GL_NV_fragment_program2 +#define GL_NV_fragment_program2 1 +#endif + +#ifndef GL_NV_vertex_program2_option +#define GL_NV_vertex_program2_option 1 +#endif + +#ifndef GL_NV_vertex_program3 +#define GL_NV_vertex_program3 1 +#endif + +#ifndef GL_EXT_framebuffer_object +#define GL_EXT_framebuffer_object 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI GLboolean APIENTRY glIsRenderbufferEXT (GLuint renderbuffer); +GLAPI void APIENTRY glBindRenderbufferEXT (GLenum target, GLuint renderbuffer); +GLAPI void APIENTRY glDeleteRenderbuffersEXT (GLsizei n, const GLuint *renderbuffers); +GLAPI void APIENTRY glGenRenderbuffersEXT (GLsizei n, GLuint *renderbuffers); +GLAPI void APIENTRY glRenderbufferStorageEXT (GLenum target, GLenum internalformat, GLsizei width, GLsizei height); +GLAPI void APIENTRY glGetRenderbufferParameterivEXT (GLenum target, GLenum pname, GLint *params); +GLAPI GLboolean APIENTRY glIsFramebufferEXT (GLuint framebuffer); +GLAPI void APIENTRY glBindFramebufferEXT (GLenum target, GLuint framebuffer); +GLAPI void APIENTRY glDeleteFramebuffersEXT (GLsizei n, const GLuint *framebuffers); +GLAPI void APIENTRY glGenFramebuffersEXT (GLsizei n, GLuint *framebuffers); +GLAPI GLenum APIENTRY glCheckFramebufferStatusEXT (GLenum target); +GLAPI void APIENTRY glFramebufferTexture1DEXT (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level); +GLAPI void APIENTRY glFramebufferTexture2DEXT (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level); +GLAPI void APIENTRY glFramebufferTexture3DEXT (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLint zoffset); +GLAPI void APIENTRY glFramebufferRenderbufferEXT (GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer); +GLAPI void APIENTRY glGetFramebufferAttachmentParameterivEXT (GLenum target, GLenum attachment, GLenum pname, GLint *params); +GLAPI void APIENTRY glGenerateMipmapEXT (GLenum target); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef GLboolean (APIENTRYP PFNGLISRENDERBUFFEREXTPROC) (GLuint renderbuffer); +typedef void (APIENTRYP PFNGLBINDRENDERBUFFEREXTPROC) (GLenum target, GLuint renderbuffer); +typedef void (APIENTRYP PFNGLDELETERENDERBUFFERSEXTPROC) (GLsizei n, const GLuint *renderbuffers); +typedef void (APIENTRYP PFNGLGENRENDERBUFFERSEXTPROC) (GLsizei n, GLuint *renderbuffers); +typedef void (APIENTRYP PFNGLRENDERBUFFERSTORAGEEXTPROC) (GLenum target, GLenum internalformat, GLsizei width, GLsizei height); +typedef void (APIENTRYP PFNGLGETRENDERBUFFERPARAMETERIVEXTPROC) (GLenum target, GLenum pname, GLint *params); +typedef GLboolean (APIENTRYP PFNGLISFRAMEBUFFEREXTPROC) (GLuint framebuffer); +typedef void (APIENTRYP PFNGLBINDFRAMEBUFFEREXTPROC) (GLenum target, GLuint framebuffer); +typedef void (APIENTRYP PFNGLDELETEFRAMEBUFFERSEXTPROC) (GLsizei n, const GLuint *framebuffers); +typedef void (APIENTRYP PFNGLGENFRAMEBUFFERSEXTPROC) (GLsizei n, GLuint *framebuffers); +typedef GLenum (APIENTRYP PFNGLCHECKFRAMEBUFFERSTATUSEXTPROC) (GLenum target); +typedef void (APIENTRYP PFNGLFRAMEBUFFERTEXTURE1DEXTPROC) (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level); +typedef void (APIENTRYP PFNGLFRAMEBUFFERTEXTURE2DEXTPROC) (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level); +typedef void (APIENTRYP PFNGLFRAMEBUFFERTEXTURE3DEXTPROC) (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLint zoffset); +typedef void (APIENTRYP PFNGLFRAMEBUFFERRENDERBUFFEREXTPROC) (GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer); +typedef void (APIENTRYP PFNGLGETFRAMEBUFFERATTACHMENTPARAMETERIVEXTPROC) (GLenum target, GLenum attachment, GLenum pname, GLint *params); +typedef void (APIENTRYP PFNGLGENERATEMIPMAPEXTPROC) (GLenum target); +#endif + +#ifndef GL_GREMEDY_string_marker +#define GL_GREMEDY_string_marker 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glStringMarkerGREMEDY (GLsizei len, const GLvoid *string); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLSTRINGMARKERGREMEDYPROC) (GLsizei len, const GLvoid *string); +#endif + +#ifndef GL_EXT_packed_depth_stencil +#define GL_EXT_packed_depth_stencil 1 +#endif + +#ifndef GL_EXT_stencil_clear_tag +#define GL_EXT_stencil_clear_tag 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glStencilClearTagEXT (GLsizei stencilTagBits, GLuint stencilClearTag); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLSTENCILCLEARTAGEXTPROC) (GLsizei stencilTagBits, GLuint stencilClearTag); +#endif + +#ifndef GL_EXT_texture_sRGB +#define GL_EXT_texture_sRGB 1 +#endif + +#ifndef GL_EXT_framebuffer_blit +#define GL_EXT_framebuffer_blit 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glBlitFramebufferEXT (GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLBLITFRAMEBUFFEREXTPROC) (GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter); +#endif + +#ifndef GL_EXT_framebuffer_multisample +#define GL_EXT_framebuffer_multisample 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glRenderbufferStorageMultisampleEXT (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLRENDERBUFFERSTORAGEMULTISAMPLEEXTPROC) (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height); +#endif + +#ifndef GL_MESAX_texture_stack +#define GL_MESAX_texture_stack 1 +#endif + +#ifndef GL_EXT_timer_query +#define GL_EXT_timer_query 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glGetQueryObjecti64vEXT (GLuint id, GLenum pname, GLint64EXT *params); +GLAPI void APIENTRY glGetQueryObjectui64vEXT (GLuint id, GLenum pname, GLuint64EXT *params); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLGETQUERYOBJECTI64VEXTPROC) (GLuint id, GLenum pname, GLint64EXT *params); +typedef void (APIENTRYP PFNGLGETQUERYOBJECTUI64VEXTPROC) (GLuint id, GLenum pname, GLuint64EXT *params); +#endif + +#ifndef GL_EXT_gpu_program_parameters +#define GL_EXT_gpu_program_parameters 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glProgramEnvParameters4fvEXT (GLenum target, GLuint index, GLsizei count, const GLfloat *params); +GLAPI void APIENTRY glProgramLocalParameters4fvEXT (GLenum target, GLuint index, GLsizei count, const GLfloat *params); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLPROGRAMENVPARAMETERS4FVEXTPROC) (GLenum target, GLuint index, GLsizei count, const GLfloat *params); +typedef void (APIENTRYP PFNGLPROGRAMLOCALPARAMETERS4FVEXTPROC) (GLenum target, GLuint index, GLsizei count, const GLfloat *params); +#endif + +#ifndef GL_APPLE_flush_buffer_range +#define GL_APPLE_flush_buffer_range 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glBufferParameteriAPPLE (GLenum target, GLenum pname, GLint param); +GLAPI void APIENTRY glFlushMappedBufferRangeAPPLE (GLenum target, GLintptr offset, GLsizeiptr size); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLBUFFERPARAMETERIAPPLEPROC) (GLenum target, GLenum pname, GLint param); +typedef void (APIENTRYP PFNGLFLUSHMAPPEDBUFFERRANGEAPPLEPROC) (GLenum target, GLintptr offset, GLsizeiptr size); +#endif + +#ifndef GL_NV_gpu_program4 +#define GL_NV_gpu_program4 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glProgramLocalParameterI4iNV (GLenum target, GLuint index, GLint x, GLint y, GLint z, GLint w); +GLAPI void APIENTRY glProgramLocalParameterI4ivNV (GLenum target, GLuint index, const GLint *params); +GLAPI void APIENTRY glProgramLocalParametersI4ivNV (GLenum target, GLuint index, GLsizei count, const GLint *params); +GLAPI void APIENTRY glProgramLocalParameterI4uiNV (GLenum target, GLuint index, GLuint x, GLuint y, GLuint z, GLuint w); +GLAPI void APIENTRY glProgramLocalParameterI4uivNV (GLenum target, GLuint index, const GLuint *params); +GLAPI void APIENTRY glProgramLocalParametersI4uivNV (GLenum target, GLuint index, GLsizei count, const GLuint *params); +GLAPI void APIENTRY glProgramEnvParameterI4iNV (GLenum target, GLuint index, GLint x, GLint y, GLint z, GLint w); +GLAPI void APIENTRY glProgramEnvParameterI4ivNV (GLenum target, GLuint index, const GLint *params); +GLAPI void APIENTRY glProgramEnvParametersI4ivNV (GLenum target, GLuint index, GLsizei count, const GLint *params); +GLAPI void APIENTRY glProgramEnvParameterI4uiNV (GLenum target, GLuint index, GLuint x, GLuint y, GLuint z, GLuint w); +GLAPI void APIENTRY glProgramEnvParameterI4uivNV (GLenum target, GLuint index, const GLuint *params); +GLAPI void APIENTRY glProgramEnvParametersI4uivNV (GLenum target, GLuint index, GLsizei count, const GLuint *params); +GLAPI void APIENTRY glGetProgramLocalParameterIivNV (GLenum target, GLuint index, GLint *params); +GLAPI void APIENTRY glGetProgramLocalParameterIuivNV (GLenum target, GLuint index, GLuint *params); +GLAPI void APIENTRY glGetProgramEnvParameterIivNV (GLenum target, GLuint index, GLint *params); +GLAPI void APIENTRY glGetProgramEnvParameterIuivNV (GLenum target, GLuint index, GLuint *params); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLPROGRAMLOCALPARAMETERI4INVPROC) (GLenum target, GLuint index, GLint x, GLint y, GLint z, GLint w); +typedef void (APIENTRYP PFNGLPROGRAMLOCALPARAMETERI4IVNVPROC) (GLenum target, GLuint index, const GLint *params); +typedef void (APIENTRYP PFNGLPROGRAMLOCALPARAMETERSI4IVNVPROC) (GLenum target, GLuint index, GLsizei count, const GLint *params); +typedef void (APIENTRYP PFNGLPROGRAMLOCALPARAMETERI4UINVPROC) (GLenum target, GLuint index, GLuint x, GLuint y, GLuint z, GLuint w); +typedef void (APIENTRYP PFNGLPROGRAMLOCALPARAMETERI4UIVNVPROC) (GLenum target, GLuint index, const GLuint *params); +typedef void (APIENTRYP PFNGLPROGRAMLOCALPARAMETERSI4UIVNVPROC) (GLenum target, GLuint index, GLsizei count, const GLuint *params); +typedef void (APIENTRYP PFNGLPROGRAMENVPARAMETERI4INVPROC) (GLenum target, GLuint index, GLint x, GLint y, GLint z, GLint w); +typedef void (APIENTRYP PFNGLPROGRAMENVPARAMETERI4IVNVPROC) (GLenum target, GLuint index, const GLint *params); +typedef void (APIENTRYP PFNGLPROGRAMENVPARAMETERSI4IVNVPROC) (GLenum target, GLuint index, GLsizei count, const GLint *params); +typedef void (APIENTRYP PFNGLPROGRAMENVPARAMETERI4UINVPROC) (GLenum target, GLuint index, GLuint x, GLuint y, GLuint z, GLuint w); +typedef void (APIENTRYP PFNGLPROGRAMENVPARAMETERI4UIVNVPROC) (GLenum target, GLuint index, const GLuint *params); +typedef void (APIENTRYP PFNGLPROGRAMENVPARAMETERSI4UIVNVPROC) (GLenum target, GLuint index, GLsizei count, const GLuint *params); +typedef void (APIENTRYP PFNGLGETPROGRAMLOCALPARAMETERIIVNVPROC) (GLenum target, GLuint index, GLint *params); +typedef void (APIENTRYP PFNGLGETPROGRAMLOCALPARAMETERIUIVNVPROC) (GLenum target, GLuint index, GLuint *params); +typedef void (APIENTRYP PFNGLGETPROGRAMENVPARAMETERIIVNVPROC) (GLenum target, GLuint index, GLint *params); +typedef void (APIENTRYP PFNGLGETPROGRAMENVPARAMETERIUIVNVPROC) (GLenum target, GLuint index, GLuint *params); +#endif + +#ifndef GL_NV_geometry_program4 +#define GL_NV_geometry_program4 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glProgramVertexLimitNV (GLenum target, GLint limit); +GLAPI void APIENTRY glFramebufferTextureEXT (GLenum target, GLenum attachment, GLuint texture, GLint level); +GLAPI void APIENTRY glFramebufferTextureLayerEXT (GLenum target, GLenum attachment, GLuint texture, GLint level, GLint layer); +GLAPI void APIENTRY glFramebufferTextureFaceEXT (GLenum target, GLenum attachment, GLuint texture, GLint level, GLenum face); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLPROGRAMVERTEXLIMITNVPROC) (GLenum target, GLint limit); +typedef void (APIENTRYP PFNGLFRAMEBUFFERTEXTUREEXTPROC) (GLenum target, GLenum attachment, GLuint texture, GLint level); +typedef void (APIENTRYP PFNGLFRAMEBUFFERTEXTURELAYEREXTPROC) (GLenum target, GLenum attachment, GLuint texture, GLint level, GLint layer); +typedef void (APIENTRYP PFNGLFRAMEBUFFERTEXTUREFACEEXTPROC) (GLenum target, GLenum attachment, GLuint texture, GLint level, GLenum face); +#endif + +#ifndef GL_EXT_geometry_shader4 +#define GL_EXT_geometry_shader4 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glProgramParameteriEXT (GLuint program, GLenum pname, GLint value); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLPROGRAMPARAMETERIEXTPROC) (GLuint program, GLenum pname, GLint value); +#endif + +#ifndef GL_NV_vertex_program4 +#define GL_NV_vertex_program4 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glVertexAttribI1iEXT (GLuint index, GLint x); +GLAPI void APIENTRY glVertexAttribI2iEXT (GLuint index, GLint x, GLint y); +GLAPI void APIENTRY glVertexAttribI3iEXT (GLuint index, GLint x, GLint y, GLint z); +GLAPI void APIENTRY glVertexAttribI4iEXT (GLuint index, GLint x, GLint y, GLint z, GLint w); +GLAPI void APIENTRY glVertexAttribI1uiEXT (GLuint index, GLuint x); +GLAPI void APIENTRY glVertexAttribI2uiEXT (GLuint index, GLuint x, GLuint y); +GLAPI void APIENTRY glVertexAttribI3uiEXT (GLuint index, GLuint x, GLuint y, GLuint z); +GLAPI void APIENTRY glVertexAttribI4uiEXT (GLuint index, GLuint x, GLuint y, GLuint z, GLuint w); +GLAPI void APIENTRY glVertexAttribI1ivEXT (GLuint index, const GLint *v); +GLAPI void APIENTRY glVertexAttribI2ivEXT (GLuint index, const GLint *v); +GLAPI void APIENTRY glVertexAttribI3ivEXT (GLuint index, const GLint *v); +GLAPI void APIENTRY glVertexAttribI4ivEXT (GLuint index, const GLint *v); +GLAPI void APIENTRY glVertexAttribI1uivEXT (GLuint index, const GLuint *v); +GLAPI void APIENTRY glVertexAttribI2uivEXT (GLuint index, const GLuint *v); +GLAPI void APIENTRY glVertexAttribI3uivEXT (GLuint index, const GLuint *v); +GLAPI void APIENTRY glVertexAttribI4uivEXT (GLuint index, const GLuint *v); +GLAPI void APIENTRY glVertexAttribI4bvEXT (GLuint index, const GLbyte *v); +GLAPI void APIENTRY glVertexAttribI4svEXT (GLuint index, const GLshort *v); +GLAPI void APIENTRY glVertexAttribI4ubvEXT (GLuint index, const GLubyte *v); +GLAPI void APIENTRY glVertexAttribI4usvEXT (GLuint index, const GLushort *v); +GLAPI void APIENTRY glVertexAttribIPointerEXT (GLuint index, GLint size, GLenum type, GLsizei stride, const GLvoid *pointer); +GLAPI void APIENTRY glGetVertexAttribIivEXT (GLuint index, GLenum pname, GLint *params); +GLAPI void APIENTRY glGetVertexAttribIuivEXT (GLuint index, GLenum pname, GLuint *params); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLVERTEXATTRIBI1IEXTPROC) (GLuint index, GLint x); +typedef void (APIENTRYP PFNGLVERTEXATTRIBI2IEXTPROC) (GLuint index, GLint x, GLint y); +typedef void (APIENTRYP PFNGLVERTEXATTRIBI3IEXTPROC) (GLuint index, GLint x, GLint y, GLint z); +typedef void (APIENTRYP PFNGLVERTEXATTRIBI4IEXTPROC) (GLuint index, GLint x, GLint y, GLint z, GLint w); +typedef void (APIENTRYP PFNGLVERTEXATTRIBI1UIEXTPROC) (GLuint index, GLuint x); +typedef void (APIENTRYP PFNGLVERTEXATTRIBI2UIEXTPROC) (GLuint index, GLuint x, GLuint y); +typedef void (APIENTRYP PFNGLVERTEXATTRIBI3UIEXTPROC) (GLuint index, GLuint x, GLuint y, GLuint z); +typedef void (APIENTRYP PFNGLVERTEXATTRIBI4UIEXTPROC) (GLuint index, GLuint x, GLuint y, GLuint z, GLuint w); +typedef void (APIENTRYP PFNGLVERTEXATTRIBI1IVEXTPROC) (GLuint index, const GLint *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIBI2IVEXTPROC) (GLuint index, const GLint *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIBI3IVEXTPROC) (GLuint index, const GLint *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIBI4IVEXTPROC) (GLuint index, const GLint *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIBI1UIVEXTPROC) (GLuint index, const GLuint *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIBI2UIVEXTPROC) (GLuint index, const GLuint *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIBI3UIVEXTPROC) (GLuint index, const GLuint *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIBI4UIVEXTPROC) (GLuint index, const GLuint *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIBI4BVEXTPROC) (GLuint index, const GLbyte *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIBI4SVEXTPROC) (GLuint index, const GLshort *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIBI4UBVEXTPROC) (GLuint index, const GLubyte *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIBI4USVEXTPROC) (GLuint index, const GLushort *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIBIPOINTEREXTPROC) (GLuint index, GLint size, GLenum type, GLsizei stride, const GLvoid *pointer); +typedef void (APIENTRYP PFNGLGETVERTEXATTRIBIIVEXTPROC) (GLuint index, GLenum pname, GLint *params); +typedef void (APIENTRYP PFNGLGETVERTEXATTRIBIUIVEXTPROC) (GLuint index, GLenum pname, GLuint *params); +#endif + +#ifndef GL_EXT_gpu_shader4 +#define GL_EXT_gpu_shader4 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glGetUniformuivEXT (GLuint program, GLint location, GLuint *params); +GLAPI void APIENTRY glBindFragDataLocationEXT (GLuint program, GLuint color, const GLchar *name); +GLAPI GLint APIENTRY glGetFragDataLocationEXT (GLuint program, const GLchar *name); +GLAPI void APIENTRY glUniform1uiEXT (GLint location, GLuint v0); +GLAPI void APIENTRY glUniform2uiEXT (GLint location, GLuint v0, GLuint v1); +GLAPI void APIENTRY glUniform3uiEXT (GLint location, GLuint v0, GLuint v1, GLuint v2); +GLAPI void APIENTRY glUniform4uiEXT (GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3); +GLAPI void APIENTRY glUniform1uivEXT (GLint location, GLsizei count, const GLuint *value); +GLAPI void APIENTRY glUniform2uivEXT (GLint location, GLsizei count, const GLuint *value); +GLAPI void APIENTRY glUniform3uivEXT (GLint location, GLsizei count, const GLuint *value); +GLAPI void APIENTRY glUniform4uivEXT (GLint location, GLsizei count, const GLuint *value); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLGETUNIFORMUIVEXTPROC) (GLuint program, GLint location, GLuint *params); +typedef void (APIENTRYP PFNGLBINDFRAGDATALOCATIONEXTPROC) (GLuint program, GLuint color, const GLchar *name); +typedef GLint (APIENTRYP PFNGLGETFRAGDATALOCATIONEXTPROC) (GLuint program, const GLchar *name); +typedef void (APIENTRYP PFNGLUNIFORM1UIEXTPROC) (GLint location, GLuint v0); +typedef void (APIENTRYP PFNGLUNIFORM2UIEXTPROC) (GLint location, GLuint v0, GLuint v1); +typedef void (APIENTRYP PFNGLUNIFORM3UIEXTPROC) (GLint location, GLuint v0, GLuint v1, GLuint v2); +typedef void (APIENTRYP PFNGLUNIFORM4UIEXTPROC) (GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3); +typedef void (APIENTRYP PFNGLUNIFORM1UIVEXTPROC) (GLint location, GLsizei count, const GLuint *value); +typedef void (APIENTRYP PFNGLUNIFORM2UIVEXTPROC) (GLint location, GLsizei count, const GLuint *value); +typedef void (APIENTRYP PFNGLUNIFORM3UIVEXTPROC) (GLint location, GLsizei count, const GLuint *value); +typedef void (APIENTRYP PFNGLUNIFORM4UIVEXTPROC) (GLint location, GLsizei count, const GLuint *value); +#endif + +#ifndef GL_EXT_draw_instanced +#define GL_EXT_draw_instanced 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glDrawArraysInstancedEXT (GLenum mode, GLint start, GLsizei count, GLsizei primcount); +GLAPI void APIENTRY glDrawElementsInstancedEXT (GLenum mode, GLsizei count, GLenum type, const GLvoid *indices, GLsizei primcount); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLDRAWARRAYSINSTANCEDEXTPROC) (GLenum mode, GLint start, GLsizei count, GLsizei primcount); +typedef void (APIENTRYP PFNGLDRAWELEMENTSINSTANCEDEXTPROC) (GLenum mode, GLsizei count, GLenum type, const GLvoid *indices, GLsizei primcount); +#endif + +#ifndef GL_EXT_packed_float +#define GL_EXT_packed_float 1 +#endif + +#ifndef GL_EXT_texture_array +#define GL_EXT_texture_array 1 +#endif + +#ifndef GL_EXT_texture_buffer_object +#define GL_EXT_texture_buffer_object 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glTexBufferEXT (GLenum target, GLenum internalformat, GLuint buffer); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLTEXBUFFEREXTPROC) (GLenum target, GLenum internalformat, GLuint buffer); +#endif + +#ifndef GL_EXT_texture_compression_latc +#define GL_EXT_texture_compression_latc 1 +#endif + +#ifndef GL_EXT_texture_compression_rgtc +#define GL_EXT_texture_compression_rgtc 1 +#endif + +#ifndef GL_EXT_texture_shared_exponent +#define GL_EXT_texture_shared_exponent 1 +#endif + +#ifndef GL_NV_depth_buffer_float +#define GL_NV_depth_buffer_float 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glDepthRangedNV (GLdouble zNear, GLdouble zFar); +GLAPI void APIENTRY glClearDepthdNV (GLdouble depth); +GLAPI void APIENTRY glDepthBoundsdNV (GLdouble zmin, GLdouble zmax); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLDEPTHRANGEDNVPROC) (GLdouble zNear, GLdouble zFar); +typedef void (APIENTRYP PFNGLCLEARDEPTHDNVPROC) (GLdouble depth); +typedef void (APIENTRYP PFNGLDEPTHBOUNDSDNVPROC) (GLdouble zmin, GLdouble zmax); +#endif + +#ifndef GL_NV_fragment_program4 +#define GL_NV_fragment_program4 1 +#endif + +#ifndef GL_NV_framebuffer_multisample_coverage +#define GL_NV_framebuffer_multisample_coverage 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glRenderbufferStorageMultisampleCoverageNV (GLenum target, GLsizei coverageSamples, GLsizei colorSamples, GLenum internalformat, GLsizei width, GLsizei height); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLRENDERBUFFERSTORAGEMULTISAMPLECOVERAGENVPROC) (GLenum target, GLsizei coverageSamples, GLsizei colorSamples, GLenum internalformat, GLsizei width, GLsizei height); +#endif + +#ifndef GL_EXT_framebuffer_sRGB +#define GL_EXT_framebuffer_sRGB 1 +#endif + +#ifndef GL_NV_geometry_shader4 +#define GL_NV_geometry_shader4 1 +#endif + +#ifndef GL_NV_parameter_buffer_object +#define GL_NV_parameter_buffer_object 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glProgramBufferParametersfvNV (GLenum target, GLuint buffer, GLuint index, GLsizei count, const GLfloat *params); +GLAPI void APIENTRY glProgramBufferParametersIivNV (GLenum target, GLuint buffer, GLuint index, GLsizei count, const GLint *params); +GLAPI void APIENTRY glProgramBufferParametersIuivNV (GLenum target, GLuint buffer, GLuint index, GLsizei count, const GLuint *params); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLPROGRAMBUFFERPARAMETERSFVNVPROC) (GLenum target, GLuint buffer, GLuint index, GLsizei count, const GLfloat *params); +typedef void (APIENTRYP PFNGLPROGRAMBUFFERPARAMETERSIIVNVPROC) (GLenum target, GLuint buffer, GLuint index, GLsizei count, const GLint *params); +typedef void (APIENTRYP PFNGLPROGRAMBUFFERPARAMETERSIUIVNVPROC) (GLenum target, GLuint buffer, GLuint index, GLsizei count, const GLuint *params); +#endif + +#ifndef GL_EXT_draw_buffers2 +#define GL_EXT_draw_buffers2 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glColorMaskIndexedEXT (GLuint index, GLboolean r, GLboolean g, GLboolean b, GLboolean a); +GLAPI void APIENTRY glGetBooleanIndexedvEXT (GLenum target, GLuint index, GLboolean *data); +GLAPI void APIENTRY glGetIntegerIndexedvEXT (GLenum target, GLuint index, GLint *data); +GLAPI void APIENTRY glEnableIndexedEXT (GLenum target, GLuint index); +GLAPI void APIENTRY glDisableIndexedEXT (GLenum target, GLuint index); +GLAPI GLboolean APIENTRY glIsEnabledIndexedEXT (GLenum target, GLuint index); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLCOLORMASKINDEXEDEXTPROC) (GLuint index, GLboolean r, GLboolean g, GLboolean b, GLboolean a); +typedef void (APIENTRYP PFNGLGETBOOLEANINDEXEDVEXTPROC) (GLenum target, GLuint index, GLboolean *data); +typedef void (APIENTRYP PFNGLGETINTEGERINDEXEDVEXTPROC) (GLenum target, GLuint index, GLint *data); +typedef void (APIENTRYP PFNGLENABLEINDEXEDEXTPROC) (GLenum target, GLuint index); +typedef void (APIENTRYP PFNGLDISABLEINDEXEDEXTPROC) (GLenum target, GLuint index); +typedef GLboolean (APIENTRYP PFNGLISENABLEDINDEXEDEXTPROC) (GLenum target, GLuint index); +#endif + +#ifndef GL_NV_transform_feedback +#define GL_NV_transform_feedback 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glBeginTransformFeedbackNV (GLenum primitiveMode); +GLAPI void APIENTRY glEndTransformFeedbackNV (void); +GLAPI void APIENTRY glTransformFeedbackAttribsNV (GLuint count, const GLint *attribs, GLenum bufferMode); +GLAPI void APIENTRY glBindBufferRangeNV (GLenum target, GLuint index, GLuint buffer, GLintptr offset, GLsizeiptr size); +GLAPI void APIENTRY glBindBufferOffsetNV (GLenum target, GLuint index, GLuint buffer, GLintptr offset); +GLAPI void APIENTRY glBindBufferBaseNV (GLenum target, GLuint index, GLuint buffer); +GLAPI void APIENTRY glTransformFeedbackVaryingsNV (GLuint program, GLsizei count, const GLint *locations, GLenum bufferMode); +GLAPI void APIENTRY glActiveVaryingNV (GLuint program, const GLchar *name); +GLAPI GLint APIENTRY glGetVaryingLocationNV (GLuint program, const GLchar *name); +GLAPI void APIENTRY glGetActiveVaryingNV (GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLsizei *size, GLenum *type, GLchar *name); +GLAPI void APIENTRY glGetTransformFeedbackVaryingNV (GLuint program, GLuint index, GLint *location); +GLAPI void APIENTRY glTransformFeedbackStreamAttribsNV (GLsizei count, const GLint *attribs, GLsizei nbuffers, const GLint *bufstreams, GLenum bufferMode); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLBEGINTRANSFORMFEEDBACKNVPROC) (GLenum primitiveMode); +typedef void (APIENTRYP PFNGLENDTRANSFORMFEEDBACKNVPROC) (void); +typedef void (APIENTRYP PFNGLTRANSFORMFEEDBACKATTRIBSNVPROC) (GLuint count, const GLint *attribs, GLenum bufferMode); +typedef void (APIENTRYP PFNGLBINDBUFFERRANGENVPROC) (GLenum target, GLuint index, GLuint buffer, GLintptr offset, GLsizeiptr size); +typedef void (APIENTRYP PFNGLBINDBUFFEROFFSETNVPROC) (GLenum target, GLuint index, GLuint buffer, GLintptr offset); +typedef void (APIENTRYP PFNGLBINDBUFFERBASENVPROC) (GLenum target, GLuint index, GLuint buffer); +typedef void (APIENTRYP PFNGLTRANSFORMFEEDBACKVARYINGSNVPROC) (GLuint program, GLsizei count, const GLint *locations, GLenum bufferMode); +typedef void (APIENTRYP PFNGLACTIVEVARYINGNVPROC) (GLuint program, const GLchar *name); +typedef GLint (APIENTRYP PFNGLGETVARYINGLOCATIONNVPROC) (GLuint program, const GLchar *name); +typedef void (APIENTRYP PFNGLGETACTIVEVARYINGNVPROC) (GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLsizei *size, GLenum *type, GLchar *name); +typedef void (APIENTRYP PFNGLGETTRANSFORMFEEDBACKVARYINGNVPROC) (GLuint program, GLuint index, GLint *location); +typedef void (APIENTRYP PFNGLTRANSFORMFEEDBACKSTREAMATTRIBSNVPROC) (GLsizei count, const GLint *attribs, GLsizei nbuffers, const GLint *bufstreams, GLenum bufferMode); +#endif + +#ifndef GL_EXT_bindable_uniform +#define GL_EXT_bindable_uniform 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glUniformBufferEXT (GLuint program, GLint location, GLuint buffer); +GLAPI GLint APIENTRY glGetUniformBufferSizeEXT (GLuint program, GLint location); +GLAPI GLintptr APIENTRY glGetUniformOffsetEXT (GLuint program, GLint location); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLUNIFORMBUFFEREXTPROC) (GLuint program, GLint location, GLuint buffer); +typedef GLint (APIENTRYP PFNGLGETUNIFORMBUFFERSIZEEXTPROC) (GLuint program, GLint location); +typedef GLintptr (APIENTRYP PFNGLGETUNIFORMOFFSETEXTPROC) (GLuint program, GLint location); +#endif + +#ifndef GL_EXT_texture_integer +#define GL_EXT_texture_integer 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glTexParameterIivEXT (GLenum target, GLenum pname, const GLint *params); +GLAPI void APIENTRY glTexParameterIuivEXT (GLenum target, GLenum pname, const GLuint *params); +GLAPI void APIENTRY glGetTexParameterIivEXT (GLenum target, GLenum pname, GLint *params); +GLAPI void APIENTRY glGetTexParameterIuivEXT (GLenum target, GLenum pname, GLuint *params); +GLAPI void APIENTRY glClearColorIiEXT (GLint red, GLint green, GLint blue, GLint alpha); +GLAPI void APIENTRY glClearColorIuiEXT (GLuint red, GLuint green, GLuint blue, GLuint alpha); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLTEXPARAMETERIIVEXTPROC) (GLenum target, GLenum pname, const GLint *params); +typedef void (APIENTRYP PFNGLTEXPARAMETERIUIVEXTPROC) (GLenum target, GLenum pname, const GLuint *params); +typedef void (APIENTRYP PFNGLGETTEXPARAMETERIIVEXTPROC) (GLenum target, GLenum pname, GLint *params); +typedef void (APIENTRYP PFNGLGETTEXPARAMETERIUIVEXTPROC) (GLenum target, GLenum pname, GLuint *params); +typedef void (APIENTRYP PFNGLCLEARCOLORIIEXTPROC) (GLint red, GLint green, GLint blue, GLint alpha); +typedef void (APIENTRYP PFNGLCLEARCOLORIUIEXTPROC) (GLuint red, GLuint green, GLuint blue, GLuint alpha); +#endif + +#ifndef GL_GREMEDY_frame_terminator +#define GL_GREMEDY_frame_terminator 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glFrameTerminatorGREMEDY (void); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLFRAMETERMINATORGREMEDYPROC) (void); +#endif + +#ifndef GL_NV_conditional_render +#define GL_NV_conditional_render 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glBeginConditionalRenderNV (GLuint id, GLenum mode); +GLAPI void APIENTRY glEndConditionalRenderNV (void); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLBEGINCONDITIONALRENDERNVPROC) (GLuint id, GLenum mode); +typedef void (APIENTRYP PFNGLENDCONDITIONALRENDERNVPROC) (void); +#endif + +#ifndef GL_NV_present_video +#define GL_NV_present_video 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glPresentFrameKeyedNV (GLuint video_slot, GLuint64EXT minPresentTime, GLuint beginPresentTimeId, GLuint presentDurationId, GLenum type, GLenum target0, GLuint fill0, GLuint key0, GLenum target1, GLuint fill1, GLuint key1); +GLAPI void APIENTRY glPresentFrameDualFillNV (GLuint video_slot, GLuint64EXT minPresentTime, GLuint beginPresentTimeId, GLuint presentDurationId, GLenum type, GLenum target0, GLuint fill0, GLenum target1, GLuint fill1, GLenum target2, GLuint fill2, GLenum target3, GLuint fill3); +GLAPI void APIENTRY glGetVideoivNV (GLuint video_slot, GLenum pname, GLint *params); +GLAPI void APIENTRY glGetVideouivNV (GLuint video_slot, GLenum pname, GLuint *params); +GLAPI void APIENTRY glGetVideoi64vNV (GLuint video_slot, GLenum pname, GLint64EXT *params); +GLAPI void APIENTRY glGetVideoui64vNV (GLuint video_slot, GLenum pname, GLuint64EXT *params); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLPRESENTFRAMEKEYEDNVPROC) (GLuint video_slot, GLuint64EXT minPresentTime, GLuint beginPresentTimeId, GLuint presentDurationId, GLenum type, GLenum target0, GLuint fill0, GLuint key0, GLenum target1, GLuint fill1, GLuint key1); +typedef void (APIENTRYP PFNGLPRESENTFRAMEDUALFILLNVPROC) (GLuint video_slot, GLuint64EXT minPresentTime, GLuint beginPresentTimeId, GLuint presentDurationId, GLenum type, GLenum target0, GLuint fill0, GLenum target1, GLuint fill1, GLenum target2, GLuint fill2, GLenum target3, GLuint fill3); +typedef void (APIENTRYP PFNGLGETVIDEOIVNVPROC) (GLuint video_slot, GLenum pname, GLint *params); +typedef void (APIENTRYP PFNGLGETVIDEOUIVNVPROC) (GLuint video_slot, GLenum pname, GLuint *params); +typedef void (APIENTRYP PFNGLGETVIDEOI64VNVPROC) (GLuint video_slot, GLenum pname, GLint64EXT *params); +typedef void (APIENTRYP PFNGLGETVIDEOUI64VNVPROC) (GLuint video_slot, GLenum pname, GLuint64EXT *params); +#endif + +#ifndef GL_EXT_transform_feedback +#define GL_EXT_transform_feedback 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glBeginTransformFeedbackEXT (GLenum primitiveMode); +GLAPI void APIENTRY glEndTransformFeedbackEXT (void); +GLAPI void APIENTRY glBindBufferRangeEXT (GLenum target, GLuint index, GLuint buffer, GLintptr offset, GLsizeiptr size); +GLAPI void APIENTRY glBindBufferOffsetEXT (GLenum target, GLuint index, GLuint buffer, GLintptr offset); +GLAPI void APIENTRY glBindBufferBaseEXT (GLenum target, GLuint index, GLuint buffer); +GLAPI void APIENTRY glTransformFeedbackVaryingsEXT (GLuint program, GLsizei count, const GLchar* *varyings, GLenum bufferMode); +GLAPI void APIENTRY glGetTransformFeedbackVaryingEXT (GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLsizei *size, GLenum *type, GLchar *name); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLBEGINTRANSFORMFEEDBACKEXTPROC) (GLenum primitiveMode); +typedef void (APIENTRYP PFNGLENDTRANSFORMFEEDBACKEXTPROC) (void); +typedef void (APIENTRYP PFNGLBINDBUFFERRANGEEXTPROC) (GLenum target, GLuint index, GLuint buffer, GLintptr offset, GLsizeiptr size); +typedef void (APIENTRYP PFNGLBINDBUFFEROFFSETEXTPROC) (GLenum target, GLuint index, GLuint buffer, GLintptr offset); +typedef void (APIENTRYP PFNGLBINDBUFFERBASEEXTPROC) (GLenum target, GLuint index, GLuint buffer); +typedef void (APIENTRYP PFNGLTRANSFORMFEEDBACKVARYINGSEXTPROC) (GLuint program, GLsizei count, const GLchar* *varyings, GLenum bufferMode); +typedef void (APIENTRYP PFNGLGETTRANSFORMFEEDBACKVARYINGEXTPROC) (GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLsizei *size, GLenum *type, GLchar *name); +#endif + +#ifndef GL_EXT_direct_state_access +#define GL_EXT_direct_state_access 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glClientAttribDefaultEXT (GLbitfield mask); +GLAPI void APIENTRY glPushClientAttribDefaultEXT (GLbitfield mask); +GLAPI void APIENTRY glMatrixLoadfEXT (GLenum mode, const GLfloat *m); +GLAPI void APIENTRY glMatrixLoaddEXT (GLenum mode, const GLdouble *m); +GLAPI void APIENTRY glMatrixMultfEXT (GLenum mode, const GLfloat *m); +GLAPI void APIENTRY glMatrixMultdEXT (GLenum mode, const GLdouble *m); +GLAPI void APIENTRY glMatrixLoadIdentityEXT (GLenum mode); +GLAPI void APIENTRY glMatrixRotatefEXT (GLenum mode, GLfloat angle, GLfloat x, GLfloat y, GLfloat z); +GLAPI void APIENTRY glMatrixRotatedEXT (GLenum mode, GLdouble angle, GLdouble x, GLdouble y, GLdouble z); +GLAPI void APIENTRY glMatrixScalefEXT (GLenum mode, GLfloat x, GLfloat y, GLfloat z); +GLAPI void APIENTRY glMatrixScaledEXT (GLenum mode, GLdouble x, GLdouble y, GLdouble z); +GLAPI void APIENTRY glMatrixTranslatefEXT (GLenum mode, GLfloat x, GLfloat y, GLfloat z); +GLAPI void APIENTRY glMatrixTranslatedEXT (GLenum mode, GLdouble x, GLdouble y, GLdouble z); +GLAPI void APIENTRY glMatrixFrustumEXT (GLenum mode, GLdouble left, GLdouble right, GLdouble bottom, GLdouble top, GLdouble zNear, GLdouble zFar); +GLAPI void APIENTRY glMatrixOrthoEXT (GLenum mode, GLdouble left, GLdouble right, GLdouble bottom, GLdouble top, GLdouble zNear, GLdouble zFar); +GLAPI void APIENTRY glMatrixPopEXT (GLenum mode); +GLAPI void APIENTRY glMatrixPushEXT (GLenum mode); +GLAPI void APIENTRY glMatrixLoadTransposefEXT (GLenum mode, const GLfloat *m); +GLAPI void APIENTRY glMatrixLoadTransposedEXT (GLenum mode, const GLdouble *m); +GLAPI void APIENTRY glMatrixMultTransposefEXT (GLenum mode, const GLfloat *m); +GLAPI void APIENTRY glMatrixMultTransposedEXT (GLenum mode, const GLdouble *m); +GLAPI void APIENTRY glTextureParameterfEXT (GLuint texture, GLenum target, GLenum pname, GLfloat param); +GLAPI void APIENTRY glTextureParameterfvEXT (GLuint texture, GLenum target, GLenum pname, const GLfloat *params); +GLAPI void APIENTRY glTextureParameteriEXT (GLuint texture, GLenum target, GLenum pname, GLint param); +GLAPI void APIENTRY glTextureParameterivEXT (GLuint texture, GLenum target, GLenum pname, const GLint *params); +GLAPI void APIENTRY glTextureImage1DEXT (GLuint texture, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLenum format, GLenum type, const GLvoid *pixels); +GLAPI void APIENTRY glTextureImage2DEXT (GLuint texture, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const GLvoid *pixels); +GLAPI void APIENTRY glTextureSubImage1DEXT (GLuint texture, GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLenum type, const GLvoid *pixels); +GLAPI void APIENTRY glTextureSubImage2DEXT (GLuint texture, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *pixels); +GLAPI void APIENTRY glCopyTextureImage1DEXT (GLuint texture, GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLint border); +GLAPI void APIENTRY glCopyTextureImage2DEXT (GLuint texture, GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border); +GLAPI void APIENTRY glCopyTextureSubImage1DEXT (GLuint texture, GLenum target, GLint level, GLint xoffset, GLint x, GLint y, GLsizei width); +GLAPI void APIENTRY glCopyTextureSubImage2DEXT (GLuint texture, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height); +GLAPI void APIENTRY glGetTextureImageEXT (GLuint texture, GLenum target, GLint level, GLenum format, GLenum type, GLvoid *pixels); +GLAPI void APIENTRY glGetTextureParameterfvEXT (GLuint texture, GLenum target, GLenum pname, GLfloat *params); +GLAPI void APIENTRY glGetTextureParameterivEXT (GLuint texture, GLenum target, GLenum pname, GLint *params); +GLAPI void APIENTRY glGetTextureLevelParameterfvEXT (GLuint texture, GLenum target, GLint level, GLenum pname, GLfloat *params); +GLAPI void APIENTRY glGetTextureLevelParameterivEXT (GLuint texture, GLenum target, GLint level, GLenum pname, GLint *params); +GLAPI void APIENTRY glTextureImage3DEXT (GLuint texture, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const GLvoid *pixels); +GLAPI void APIENTRY glTextureSubImage3DEXT (GLuint texture, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const GLvoid *pixels); +GLAPI void APIENTRY glCopyTextureSubImage3DEXT (GLuint texture, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height); +GLAPI void APIENTRY glMultiTexParameterfEXT (GLenum texunit, GLenum target, GLenum pname, GLfloat param); +GLAPI void APIENTRY glMultiTexParameterfvEXT (GLenum texunit, GLenum target, GLenum pname, const GLfloat *params); +GLAPI void APIENTRY glMultiTexParameteriEXT (GLenum texunit, GLenum target, GLenum pname, GLint param); +GLAPI void APIENTRY glMultiTexParameterivEXT (GLenum texunit, GLenum target, GLenum pname, const GLint *params); +GLAPI void APIENTRY glMultiTexImage1DEXT (GLenum texunit, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLenum format, GLenum type, const GLvoid *pixels); +GLAPI void APIENTRY glMultiTexImage2DEXT (GLenum texunit, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const GLvoid *pixels); +GLAPI void APIENTRY glMultiTexSubImage1DEXT (GLenum texunit, GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLenum type, const GLvoid *pixels); +GLAPI void APIENTRY glMultiTexSubImage2DEXT (GLenum texunit, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *pixels); +GLAPI void APIENTRY glCopyMultiTexImage1DEXT (GLenum texunit, GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLint border); +GLAPI void APIENTRY glCopyMultiTexImage2DEXT (GLenum texunit, GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border); +GLAPI void APIENTRY glCopyMultiTexSubImage1DEXT (GLenum texunit, GLenum target, GLint level, GLint xoffset, GLint x, GLint y, GLsizei width); +GLAPI void APIENTRY glCopyMultiTexSubImage2DEXT (GLenum texunit, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height); +GLAPI void APIENTRY glGetMultiTexImageEXT (GLenum texunit, GLenum target, GLint level, GLenum format, GLenum type, GLvoid *pixels); +GLAPI void APIENTRY glGetMultiTexParameterfvEXT (GLenum texunit, GLenum target, GLenum pname, GLfloat *params); +GLAPI void APIENTRY glGetMultiTexParameterivEXT (GLenum texunit, GLenum target, GLenum pname, GLint *params); +GLAPI void APIENTRY glGetMultiTexLevelParameterfvEXT (GLenum texunit, GLenum target, GLint level, GLenum pname, GLfloat *params); +GLAPI void APIENTRY glGetMultiTexLevelParameterivEXT (GLenum texunit, GLenum target, GLint level, GLenum pname, GLint *params); +GLAPI void APIENTRY glMultiTexImage3DEXT (GLenum texunit, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const GLvoid *pixels); +GLAPI void APIENTRY glMultiTexSubImage3DEXT (GLenum texunit, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const GLvoid *pixels); +GLAPI void APIENTRY glCopyMultiTexSubImage3DEXT (GLenum texunit, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height); +GLAPI void APIENTRY glBindMultiTextureEXT (GLenum texunit, GLenum target, GLuint texture); +GLAPI void APIENTRY glEnableClientStateIndexedEXT (GLenum array, GLuint index); +GLAPI void APIENTRY glDisableClientStateIndexedEXT (GLenum array, GLuint index); +GLAPI void APIENTRY glMultiTexCoordPointerEXT (GLenum texunit, GLint size, GLenum type, GLsizei stride, const GLvoid *pointer); +GLAPI void APIENTRY glMultiTexEnvfEXT (GLenum texunit, GLenum target, GLenum pname, GLfloat param); +GLAPI void APIENTRY glMultiTexEnvfvEXT (GLenum texunit, GLenum target, GLenum pname, const GLfloat *params); +GLAPI void APIENTRY glMultiTexEnviEXT (GLenum texunit, GLenum target, GLenum pname, GLint param); +GLAPI void APIENTRY glMultiTexEnvivEXT (GLenum texunit, GLenum target, GLenum pname, const GLint *params); +GLAPI void APIENTRY glMultiTexGendEXT (GLenum texunit, GLenum coord, GLenum pname, GLdouble param); +GLAPI void APIENTRY glMultiTexGendvEXT (GLenum texunit, GLenum coord, GLenum pname, const GLdouble *params); +GLAPI void APIENTRY glMultiTexGenfEXT (GLenum texunit, GLenum coord, GLenum pname, GLfloat param); +GLAPI void APIENTRY glMultiTexGenfvEXT (GLenum texunit, GLenum coord, GLenum pname, const GLfloat *params); +GLAPI void APIENTRY glMultiTexGeniEXT (GLenum texunit, GLenum coord, GLenum pname, GLint param); +GLAPI void APIENTRY glMultiTexGenivEXT (GLenum texunit, GLenum coord, GLenum pname, const GLint *params); +GLAPI void APIENTRY glGetMultiTexEnvfvEXT (GLenum texunit, GLenum target, GLenum pname, GLfloat *params); +GLAPI void APIENTRY glGetMultiTexEnvivEXT (GLenum texunit, GLenum target, GLenum pname, GLint *params); +GLAPI void APIENTRY glGetMultiTexGendvEXT (GLenum texunit, GLenum coord, GLenum pname, GLdouble *params); +GLAPI void APIENTRY glGetMultiTexGenfvEXT (GLenum texunit, GLenum coord, GLenum pname, GLfloat *params); +GLAPI void APIENTRY glGetMultiTexGenivEXT (GLenum texunit, GLenum coord, GLenum pname, GLint *params); +GLAPI void APIENTRY glGetFloatIndexedvEXT (GLenum target, GLuint index, GLfloat *data); +GLAPI void APIENTRY glGetDoubleIndexedvEXT (GLenum target, GLuint index, GLdouble *data); +GLAPI void APIENTRY glGetPointerIndexedvEXT (GLenum target, GLuint index, GLvoid* *data); +GLAPI void APIENTRY glCompressedTextureImage3DEXT (GLuint texture, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const GLvoid *bits); +GLAPI void APIENTRY glCompressedTextureImage2DEXT (GLuint texture, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const GLvoid *bits); +GLAPI void APIENTRY glCompressedTextureImage1DEXT (GLuint texture, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLsizei imageSize, const GLvoid *bits); +GLAPI void APIENTRY glCompressedTextureSubImage3DEXT (GLuint texture, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const GLvoid *bits); +GLAPI void APIENTRY glCompressedTextureSubImage2DEXT (GLuint texture, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const GLvoid *bits); +GLAPI void APIENTRY glCompressedTextureSubImage1DEXT (GLuint texture, GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLsizei imageSize, const GLvoid *bits); +GLAPI void APIENTRY glGetCompressedTextureImageEXT (GLuint texture, GLenum target, GLint lod, GLvoid *img); +GLAPI void APIENTRY glCompressedMultiTexImage3DEXT (GLenum texunit, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const GLvoid *bits); +GLAPI void APIENTRY glCompressedMultiTexImage2DEXT (GLenum texunit, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const GLvoid *bits); +GLAPI void APIENTRY glCompressedMultiTexImage1DEXT (GLenum texunit, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLsizei imageSize, const GLvoid *bits); +GLAPI void APIENTRY glCompressedMultiTexSubImage3DEXT (GLenum texunit, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const GLvoid *bits); +GLAPI void APIENTRY glCompressedMultiTexSubImage2DEXT (GLenum texunit, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const GLvoid *bits); +GLAPI void APIENTRY glCompressedMultiTexSubImage1DEXT (GLenum texunit, GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLsizei imageSize, const GLvoid *bits); +GLAPI void APIENTRY glGetCompressedMultiTexImageEXT (GLenum texunit, GLenum target, GLint lod, GLvoid *img); +GLAPI void APIENTRY glNamedProgramStringEXT (GLuint program, GLenum target, GLenum format, GLsizei len, const GLvoid *string); +GLAPI void APIENTRY glNamedProgramLocalParameter4dEXT (GLuint program, GLenum target, GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w); +GLAPI void APIENTRY glNamedProgramLocalParameter4dvEXT (GLuint program, GLenum target, GLuint index, const GLdouble *params); +GLAPI void APIENTRY glNamedProgramLocalParameter4fEXT (GLuint program, GLenum target, GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w); +GLAPI void APIENTRY glNamedProgramLocalParameter4fvEXT (GLuint program, GLenum target, GLuint index, const GLfloat *params); +GLAPI void APIENTRY glGetNamedProgramLocalParameterdvEXT (GLuint program, GLenum target, GLuint index, GLdouble *params); +GLAPI void APIENTRY glGetNamedProgramLocalParameterfvEXT (GLuint program, GLenum target, GLuint index, GLfloat *params); +GLAPI void APIENTRY glGetNamedProgramivEXT (GLuint program, GLenum target, GLenum pname, GLint *params); +GLAPI void APIENTRY glGetNamedProgramStringEXT (GLuint program, GLenum target, GLenum pname, GLvoid *string); +GLAPI void APIENTRY glNamedProgramLocalParameters4fvEXT (GLuint program, GLenum target, GLuint index, GLsizei count, const GLfloat *params); +GLAPI void APIENTRY glNamedProgramLocalParameterI4iEXT (GLuint program, GLenum target, GLuint index, GLint x, GLint y, GLint z, GLint w); +GLAPI void APIENTRY glNamedProgramLocalParameterI4ivEXT (GLuint program, GLenum target, GLuint index, const GLint *params); +GLAPI void APIENTRY glNamedProgramLocalParametersI4ivEXT (GLuint program, GLenum target, GLuint index, GLsizei count, const GLint *params); +GLAPI void APIENTRY glNamedProgramLocalParameterI4uiEXT (GLuint program, GLenum target, GLuint index, GLuint x, GLuint y, GLuint z, GLuint w); +GLAPI void APIENTRY glNamedProgramLocalParameterI4uivEXT (GLuint program, GLenum target, GLuint index, const GLuint *params); +GLAPI void APIENTRY glNamedProgramLocalParametersI4uivEXT (GLuint program, GLenum target, GLuint index, GLsizei count, const GLuint *params); +GLAPI void APIENTRY glGetNamedProgramLocalParameterIivEXT (GLuint program, GLenum target, GLuint index, GLint *params); +GLAPI void APIENTRY glGetNamedProgramLocalParameterIuivEXT (GLuint program, GLenum target, GLuint index, GLuint *params); +GLAPI void APIENTRY glTextureParameterIivEXT (GLuint texture, GLenum target, GLenum pname, const GLint *params); +GLAPI void APIENTRY glTextureParameterIuivEXT (GLuint texture, GLenum target, GLenum pname, const GLuint *params); +GLAPI void APIENTRY glGetTextureParameterIivEXT (GLuint texture, GLenum target, GLenum pname, GLint *params); +GLAPI void APIENTRY glGetTextureParameterIuivEXT (GLuint texture, GLenum target, GLenum pname, GLuint *params); +GLAPI void APIENTRY glMultiTexParameterIivEXT (GLenum texunit, GLenum target, GLenum pname, const GLint *params); +GLAPI void APIENTRY glMultiTexParameterIuivEXT (GLenum texunit, GLenum target, GLenum pname, const GLuint *params); +GLAPI void APIENTRY glGetMultiTexParameterIivEXT (GLenum texunit, GLenum target, GLenum pname, GLint *params); +GLAPI void APIENTRY glGetMultiTexParameterIuivEXT (GLenum texunit, GLenum target, GLenum pname, GLuint *params); +GLAPI void APIENTRY glProgramUniform1fEXT (GLuint program, GLint location, GLfloat v0); +GLAPI void APIENTRY glProgramUniform2fEXT (GLuint program, GLint location, GLfloat v0, GLfloat v1); +GLAPI void APIENTRY glProgramUniform3fEXT (GLuint program, GLint location, GLfloat v0, GLfloat v1, GLfloat v2); +GLAPI void APIENTRY glProgramUniform4fEXT (GLuint program, GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3); +GLAPI void APIENTRY glProgramUniform1iEXT (GLuint program, GLint location, GLint v0); +GLAPI void APIENTRY glProgramUniform2iEXT (GLuint program, GLint location, GLint v0, GLint v1); +GLAPI void APIENTRY glProgramUniform3iEXT (GLuint program, GLint location, GLint v0, GLint v1, GLint v2); +GLAPI void APIENTRY glProgramUniform4iEXT (GLuint program, GLint location, GLint v0, GLint v1, GLint v2, GLint v3); +GLAPI void APIENTRY glProgramUniform1fvEXT (GLuint program, GLint location, GLsizei count, const GLfloat *value); +GLAPI void APIENTRY glProgramUniform2fvEXT (GLuint program, GLint location, GLsizei count, const GLfloat *value); +GLAPI void APIENTRY glProgramUniform3fvEXT (GLuint program, GLint location, GLsizei count, const GLfloat *value); +GLAPI void APIENTRY glProgramUniform4fvEXT (GLuint program, GLint location, GLsizei count, const GLfloat *value); +GLAPI void APIENTRY glProgramUniform1ivEXT (GLuint program, GLint location, GLsizei count, const GLint *value); +GLAPI void APIENTRY glProgramUniform2ivEXT (GLuint program, GLint location, GLsizei count, const GLint *value); +GLAPI void APIENTRY glProgramUniform3ivEXT (GLuint program, GLint location, GLsizei count, const GLint *value); +GLAPI void APIENTRY glProgramUniform4ivEXT (GLuint program, GLint location, GLsizei count, const GLint *value); +GLAPI void APIENTRY glProgramUniformMatrix2fvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +GLAPI void APIENTRY glProgramUniformMatrix3fvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +GLAPI void APIENTRY glProgramUniformMatrix4fvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +GLAPI void APIENTRY glProgramUniformMatrix2x3fvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +GLAPI void APIENTRY glProgramUniformMatrix3x2fvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +GLAPI void APIENTRY glProgramUniformMatrix2x4fvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +GLAPI void APIENTRY glProgramUniformMatrix4x2fvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +GLAPI void APIENTRY glProgramUniformMatrix3x4fvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +GLAPI void APIENTRY glProgramUniformMatrix4x3fvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +GLAPI void APIENTRY glProgramUniform1uiEXT (GLuint program, GLint location, GLuint v0); +GLAPI void APIENTRY glProgramUniform2uiEXT (GLuint program, GLint location, GLuint v0, GLuint v1); +GLAPI void APIENTRY glProgramUniform3uiEXT (GLuint program, GLint location, GLuint v0, GLuint v1, GLuint v2); +GLAPI void APIENTRY glProgramUniform4uiEXT (GLuint program, GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3); +GLAPI void APIENTRY glProgramUniform1uivEXT (GLuint program, GLint location, GLsizei count, const GLuint *value); +GLAPI void APIENTRY glProgramUniform2uivEXT (GLuint program, GLint location, GLsizei count, const GLuint *value); +GLAPI void APIENTRY glProgramUniform3uivEXT (GLuint program, GLint location, GLsizei count, const GLuint *value); +GLAPI void APIENTRY glProgramUniform4uivEXT (GLuint program, GLint location, GLsizei count, const GLuint *value); +GLAPI void APIENTRY glNamedBufferDataEXT (GLuint buffer, GLsizeiptr size, const GLvoid *data, GLenum usage); +GLAPI void APIENTRY glNamedBufferSubDataEXT (GLuint buffer, GLintptr offset, GLsizeiptr size, const GLvoid *data); +GLAPI GLvoid* APIENTRY glMapNamedBufferEXT (GLuint buffer, GLenum access); +GLAPI GLboolean APIENTRY glUnmapNamedBufferEXT (GLuint buffer); +GLAPI GLvoid* APIENTRY glMapNamedBufferRangeEXT (GLuint buffer, GLintptr offset, GLsizeiptr length, GLbitfield access); +GLAPI void APIENTRY glFlushMappedNamedBufferRangeEXT (GLuint buffer, GLintptr offset, GLsizeiptr length); +GLAPI void APIENTRY glNamedCopyBufferSubDataEXT (GLuint readBuffer, GLuint writeBuffer, GLintptr readOffset, GLintptr writeOffset, GLsizeiptr size); +GLAPI void APIENTRY glGetNamedBufferParameterivEXT (GLuint buffer, GLenum pname, GLint *params); +GLAPI void APIENTRY glGetNamedBufferPointervEXT (GLuint buffer, GLenum pname, GLvoid* *params); +GLAPI void APIENTRY glGetNamedBufferSubDataEXT (GLuint buffer, GLintptr offset, GLsizeiptr size, GLvoid *data); +GLAPI void APIENTRY glTextureBufferEXT (GLuint texture, GLenum target, GLenum internalformat, GLuint buffer); +GLAPI void APIENTRY glMultiTexBufferEXT (GLenum texunit, GLenum target, GLenum internalformat, GLuint buffer); +GLAPI void APIENTRY glNamedRenderbufferStorageEXT (GLuint renderbuffer, GLenum internalformat, GLsizei width, GLsizei height); +GLAPI void APIENTRY glGetNamedRenderbufferParameterivEXT (GLuint renderbuffer, GLenum pname, GLint *params); +GLAPI GLenum APIENTRY glCheckNamedFramebufferStatusEXT (GLuint framebuffer, GLenum target); +GLAPI void APIENTRY glNamedFramebufferTexture1DEXT (GLuint framebuffer, GLenum attachment, GLenum textarget, GLuint texture, GLint level); +GLAPI void APIENTRY glNamedFramebufferTexture2DEXT (GLuint framebuffer, GLenum attachment, GLenum textarget, GLuint texture, GLint level); +GLAPI void APIENTRY glNamedFramebufferTexture3DEXT (GLuint framebuffer, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLint zoffset); +GLAPI void APIENTRY glNamedFramebufferRenderbufferEXT (GLuint framebuffer, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer); +GLAPI void APIENTRY glGetNamedFramebufferAttachmentParameterivEXT (GLuint framebuffer, GLenum attachment, GLenum pname, GLint *params); +GLAPI void APIENTRY glGenerateTextureMipmapEXT (GLuint texture, GLenum target); +GLAPI void APIENTRY glGenerateMultiTexMipmapEXT (GLenum texunit, GLenum target); +GLAPI void APIENTRY glFramebufferDrawBufferEXT (GLuint framebuffer, GLenum mode); +GLAPI void APIENTRY glFramebufferDrawBuffersEXT (GLuint framebuffer, GLsizei n, const GLenum *bufs); +GLAPI void APIENTRY glFramebufferReadBufferEXT (GLuint framebuffer, GLenum mode); +GLAPI void APIENTRY glGetFramebufferParameterivEXT (GLuint framebuffer, GLenum pname, GLint *params); +GLAPI void APIENTRY glNamedRenderbufferStorageMultisampleEXT (GLuint renderbuffer, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height); +GLAPI void APIENTRY glNamedRenderbufferStorageMultisampleCoverageEXT (GLuint renderbuffer, GLsizei coverageSamples, GLsizei colorSamples, GLenum internalformat, GLsizei width, GLsizei height); +GLAPI void APIENTRY glNamedFramebufferTextureEXT (GLuint framebuffer, GLenum attachment, GLuint texture, GLint level); +GLAPI void APIENTRY glNamedFramebufferTextureLayerEXT (GLuint framebuffer, GLenum attachment, GLuint texture, GLint level, GLint layer); +GLAPI void APIENTRY glNamedFramebufferTextureFaceEXT (GLuint framebuffer, GLenum attachment, GLuint texture, GLint level, GLenum face); +GLAPI void APIENTRY glTextureRenderbufferEXT (GLuint texture, GLenum target, GLuint renderbuffer); +GLAPI void APIENTRY glMultiTexRenderbufferEXT (GLenum texunit, GLenum target, GLuint renderbuffer); +GLAPI void APIENTRY glProgramUniform1dEXT (GLuint program, GLint location, GLdouble x); +GLAPI void APIENTRY glProgramUniform2dEXT (GLuint program, GLint location, GLdouble x, GLdouble y); +GLAPI void APIENTRY glProgramUniform3dEXT (GLuint program, GLint location, GLdouble x, GLdouble y, GLdouble z); +GLAPI void APIENTRY glProgramUniform4dEXT (GLuint program, GLint location, GLdouble x, GLdouble y, GLdouble z, GLdouble w); +GLAPI void APIENTRY glProgramUniform1dvEXT (GLuint program, GLint location, GLsizei count, const GLdouble *value); +GLAPI void APIENTRY glProgramUniform2dvEXT (GLuint program, GLint location, GLsizei count, const GLdouble *value); +GLAPI void APIENTRY glProgramUniform3dvEXT (GLuint program, GLint location, GLsizei count, const GLdouble *value); +GLAPI void APIENTRY glProgramUniform4dvEXT (GLuint program, GLint location, GLsizei count, const GLdouble *value); +GLAPI void APIENTRY glProgramUniformMatrix2dvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +GLAPI void APIENTRY glProgramUniformMatrix3dvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +GLAPI void APIENTRY glProgramUniformMatrix4dvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +GLAPI void APIENTRY glProgramUniformMatrix2x3dvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +GLAPI void APIENTRY glProgramUniformMatrix2x4dvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +GLAPI void APIENTRY glProgramUniformMatrix3x2dvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +GLAPI void APIENTRY glProgramUniformMatrix3x4dvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +GLAPI void APIENTRY glProgramUniformMatrix4x2dvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +GLAPI void APIENTRY glProgramUniformMatrix4x3dvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLCLIENTATTRIBDEFAULTEXTPROC) (GLbitfield mask); +typedef void (APIENTRYP PFNGLPUSHCLIENTATTRIBDEFAULTEXTPROC) (GLbitfield mask); +typedef void (APIENTRYP PFNGLMATRIXLOADFEXTPROC) (GLenum mode, const GLfloat *m); +typedef void (APIENTRYP PFNGLMATRIXLOADDEXTPROC) (GLenum mode, const GLdouble *m); +typedef void (APIENTRYP PFNGLMATRIXMULTFEXTPROC) (GLenum mode, const GLfloat *m); +typedef void (APIENTRYP PFNGLMATRIXMULTDEXTPROC) (GLenum mode, const GLdouble *m); +typedef void (APIENTRYP PFNGLMATRIXLOADIDENTITYEXTPROC) (GLenum mode); +typedef void (APIENTRYP PFNGLMATRIXROTATEFEXTPROC) (GLenum mode, GLfloat angle, GLfloat x, GLfloat y, GLfloat z); +typedef void (APIENTRYP PFNGLMATRIXROTATEDEXTPROC) (GLenum mode, GLdouble angle, GLdouble x, GLdouble y, GLdouble z); +typedef void (APIENTRYP PFNGLMATRIXSCALEFEXTPROC) (GLenum mode, GLfloat x, GLfloat y, GLfloat z); +typedef void (APIENTRYP PFNGLMATRIXSCALEDEXTPROC) (GLenum mode, GLdouble x, GLdouble y, GLdouble z); +typedef void (APIENTRYP PFNGLMATRIXTRANSLATEFEXTPROC) (GLenum mode, GLfloat x, GLfloat y, GLfloat z); +typedef void (APIENTRYP PFNGLMATRIXTRANSLATEDEXTPROC) (GLenum mode, GLdouble x, GLdouble y, GLdouble z); +typedef void (APIENTRYP PFNGLMATRIXFRUSTUMEXTPROC) (GLenum mode, GLdouble left, GLdouble right, GLdouble bottom, GLdouble top, GLdouble zNear, GLdouble zFar); +typedef void (APIENTRYP PFNGLMATRIXORTHOEXTPROC) (GLenum mode, GLdouble left, GLdouble right, GLdouble bottom, GLdouble top, GLdouble zNear, GLdouble zFar); +typedef void (APIENTRYP PFNGLMATRIXPOPEXTPROC) (GLenum mode); +typedef void (APIENTRYP PFNGLMATRIXPUSHEXTPROC) (GLenum mode); +typedef void (APIENTRYP PFNGLMATRIXLOADTRANSPOSEFEXTPROC) (GLenum mode, const GLfloat *m); +typedef void (APIENTRYP PFNGLMATRIXLOADTRANSPOSEDEXTPROC) (GLenum mode, const GLdouble *m); +typedef void (APIENTRYP PFNGLMATRIXMULTTRANSPOSEFEXTPROC) (GLenum mode, const GLfloat *m); +typedef void (APIENTRYP PFNGLMATRIXMULTTRANSPOSEDEXTPROC) (GLenum mode, const GLdouble *m); +typedef void (APIENTRYP PFNGLTEXTUREPARAMETERFEXTPROC) (GLuint texture, GLenum target, GLenum pname, GLfloat param); +typedef void (APIENTRYP PFNGLTEXTUREPARAMETERFVEXTPROC) (GLuint texture, GLenum target, GLenum pname, const GLfloat *params); +typedef void (APIENTRYP PFNGLTEXTUREPARAMETERIEXTPROC) (GLuint texture, GLenum target, GLenum pname, GLint param); +typedef void (APIENTRYP PFNGLTEXTUREPARAMETERIVEXTPROC) (GLuint texture, GLenum target, GLenum pname, const GLint *params); +typedef void (APIENTRYP PFNGLTEXTUREIMAGE1DEXTPROC) (GLuint texture, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLenum format, GLenum type, const GLvoid *pixels); +typedef void (APIENTRYP PFNGLTEXTUREIMAGE2DEXTPROC) (GLuint texture, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const GLvoid *pixels); +typedef void (APIENTRYP PFNGLTEXTURESUBIMAGE1DEXTPROC) (GLuint texture, GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLenum type, const GLvoid *pixels); +typedef void (APIENTRYP PFNGLTEXTURESUBIMAGE2DEXTPROC) (GLuint texture, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *pixels); +typedef void (APIENTRYP PFNGLCOPYTEXTUREIMAGE1DEXTPROC) (GLuint texture, GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLint border); +typedef void (APIENTRYP PFNGLCOPYTEXTUREIMAGE2DEXTPROC) (GLuint texture, GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border); +typedef void (APIENTRYP PFNGLCOPYTEXTURESUBIMAGE1DEXTPROC) (GLuint texture, GLenum target, GLint level, GLint xoffset, GLint x, GLint y, GLsizei width); +typedef void (APIENTRYP PFNGLCOPYTEXTURESUBIMAGE2DEXTPROC) (GLuint texture, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height); +typedef void (APIENTRYP PFNGLGETTEXTUREIMAGEEXTPROC) (GLuint texture, GLenum target, GLint level, GLenum format, GLenum type, GLvoid *pixels); +typedef void (APIENTRYP PFNGLGETTEXTUREPARAMETERFVEXTPROC) (GLuint texture, GLenum target, GLenum pname, GLfloat *params); +typedef void (APIENTRYP PFNGLGETTEXTUREPARAMETERIVEXTPROC) (GLuint texture, GLenum target, GLenum pname, GLint *params); +typedef void (APIENTRYP PFNGLGETTEXTURELEVELPARAMETERFVEXTPROC) (GLuint texture, GLenum target, GLint level, GLenum pname, GLfloat *params); +typedef void (APIENTRYP PFNGLGETTEXTURELEVELPARAMETERIVEXTPROC) (GLuint texture, GLenum target, GLint level, GLenum pname, GLint *params); +typedef void (APIENTRYP PFNGLTEXTUREIMAGE3DEXTPROC) (GLuint texture, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const GLvoid *pixels); +typedef void (APIENTRYP PFNGLTEXTURESUBIMAGE3DEXTPROC) (GLuint texture, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const GLvoid *pixels); +typedef void (APIENTRYP PFNGLCOPYTEXTURESUBIMAGE3DEXTPROC) (GLuint texture, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height); +typedef void (APIENTRYP PFNGLMULTITEXPARAMETERFEXTPROC) (GLenum texunit, GLenum target, GLenum pname, GLfloat param); +typedef void (APIENTRYP PFNGLMULTITEXPARAMETERFVEXTPROC) (GLenum texunit, GLenum target, GLenum pname, const GLfloat *params); +typedef void (APIENTRYP PFNGLMULTITEXPARAMETERIEXTPROC) (GLenum texunit, GLenum target, GLenum pname, GLint param); +typedef void (APIENTRYP PFNGLMULTITEXPARAMETERIVEXTPROC) (GLenum texunit, GLenum target, GLenum pname, const GLint *params); +typedef void (APIENTRYP PFNGLMULTITEXIMAGE1DEXTPROC) (GLenum texunit, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLenum format, GLenum type, const GLvoid *pixels); +typedef void (APIENTRYP PFNGLMULTITEXIMAGE2DEXTPROC) (GLenum texunit, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const GLvoid *pixels); +typedef void (APIENTRYP PFNGLMULTITEXSUBIMAGE1DEXTPROC) (GLenum texunit, GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLenum type, const GLvoid *pixels); +typedef void (APIENTRYP PFNGLMULTITEXSUBIMAGE2DEXTPROC) (GLenum texunit, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *pixels); +typedef void (APIENTRYP PFNGLCOPYMULTITEXIMAGE1DEXTPROC) (GLenum texunit, GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLint border); +typedef void (APIENTRYP PFNGLCOPYMULTITEXIMAGE2DEXTPROC) (GLenum texunit, GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border); +typedef void (APIENTRYP PFNGLCOPYMULTITEXSUBIMAGE1DEXTPROC) (GLenum texunit, GLenum target, GLint level, GLint xoffset, GLint x, GLint y, GLsizei width); +typedef void (APIENTRYP PFNGLCOPYMULTITEXSUBIMAGE2DEXTPROC) (GLenum texunit, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height); +typedef void (APIENTRYP PFNGLGETMULTITEXIMAGEEXTPROC) (GLenum texunit, GLenum target, GLint level, GLenum format, GLenum type, GLvoid *pixels); +typedef void (APIENTRYP PFNGLGETMULTITEXPARAMETERFVEXTPROC) (GLenum texunit, GLenum target, GLenum pname, GLfloat *params); +typedef void (APIENTRYP PFNGLGETMULTITEXPARAMETERIVEXTPROC) (GLenum texunit, GLenum target, GLenum pname, GLint *params); +typedef void (APIENTRYP PFNGLGETMULTITEXLEVELPARAMETERFVEXTPROC) (GLenum texunit, GLenum target, GLint level, GLenum pname, GLfloat *params); +typedef void (APIENTRYP PFNGLGETMULTITEXLEVELPARAMETERIVEXTPROC) (GLenum texunit, GLenum target, GLint level, GLenum pname, GLint *params); +typedef void (APIENTRYP PFNGLMULTITEXIMAGE3DEXTPROC) (GLenum texunit, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const GLvoid *pixels); +typedef void (APIENTRYP PFNGLMULTITEXSUBIMAGE3DEXTPROC) (GLenum texunit, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const GLvoid *pixels); +typedef void (APIENTRYP PFNGLCOPYMULTITEXSUBIMAGE3DEXTPROC) (GLenum texunit, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height); +typedef void (APIENTRYP PFNGLBINDMULTITEXTUREEXTPROC) (GLenum texunit, GLenum target, GLuint texture); +typedef void (APIENTRYP PFNGLENABLECLIENTSTATEINDEXEDEXTPROC) (GLenum array, GLuint index); +typedef void (APIENTRYP PFNGLDISABLECLIENTSTATEINDEXEDEXTPROC) (GLenum array, GLuint index); +typedef void (APIENTRYP PFNGLMULTITEXCOORDPOINTEREXTPROC) (GLenum texunit, GLint size, GLenum type, GLsizei stride, const GLvoid *pointer); +typedef void (APIENTRYP PFNGLMULTITEXENVFEXTPROC) (GLenum texunit, GLenum target, GLenum pname, GLfloat param); +typedef void (APIENTRYP PFNGLMULTITEXENVFVEXTPROC) (GLenum texunit, GLenum target, GLenum pname, const GLfloat *params); +typedef void (APIENTRYP PFNGLMULTITEXENVIEXTPROC) (GLenum texunit, GLenum target, GLenum pname, GLint param); +typedef void (APIENTRYP PFNGLMULTITEXENVIVEXTPROC) (GLenum texunit, GLenum target, GLenum pname, const GLint *params); +typedef void (APIENTRYP PFNGLMULTITEXGENDEXTPROC) (GLenum texunit, GLenum coord, GLenum pname, GLdouble param); +typedef void (APIENTRYP PFNGLMULTITEXGENDVEXTPROC) (GLenum texunit, GLenum coord, GLenum pname, const GLdouble *params); +typedef void (APIENTRYP PFNGLMULTITEXGENFEXTPROC) (GLenum texunit, GLenum coord, GLenum pname, GLfloat param); +typedef void (APIENTRYP PFNGLMULTITEXGENFVEXTPROC) (GLenum texunit, GLenum coord, GLenum pname, const GLfloat *params); +typedef void (APIENTRYP PFNGLMULTITEXGENIEXTPROC) (GLenum texunit, GLenum coord, GLenum pname, GLint param); +typedef void (APIENTRYP PFNGLMULTITEXGENIVEXTPROC) (GLenum texunit, GLenum coord, GLenum pname, const GLint *params); +typedef void (APIENTRYP PFNGLGETMULTITEXENVFVEXTPROC) (GLenum texunit, GLenum target, GLenum pname, GLfloat *params); +typedef void (APIENTRYP PFNGLGETMULTITEXENVIVEXTPROC) (GLenum texunit, GLenum target, GLenum pname, GLint *params); +typedef void (APIENTRYP PFNGLGETMULTITEXGENDVEXTPROC) (GLenum texunit, GLenum coord, GLenum pname, GLdouble *params); +typedef void (APIENTRYP PFNGLGETMULTITEXGENFVEXTPROC) (GLenum texunit, GLenum coord, GLenum pname, GLfloat *params); +typedef void (APIENTRYP PFNGLGETMULTITEXGENIVEXTPROC) (GLenum texunit, GLenum coord, GLenum pname, GLint *params); +typedef void (APIENTRYP PFNGLGETFLOATINDEXEDVEXTPROC) (GLenum target, GLuint index, GLfloat *data); +typedef void (APIENTRYP PFNGLGETDOUBLEINDEXEDVEXTPROC) (GLenum target, GLuint index, GLdouble *data); +typedef void (APIENTRYP PFNGLGETPOINTERINDEXEDVEXTPROC) (GLenum target, GLuint index, GLvoid* *data); +typedef void (APIENTRYP PFNGLCOMPRESSEDTEXTUREIMAGE3DEXTPROC) (GLuint texture, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const GLvoid *bits); +typedef void (APIENTRYP PFNGLCOMPRESSEDTEXTUREIMAGE2DEXTPROC) (GLuint texture, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const GLvoid *bits); +typedef void (APIENTRYP PFNGLCOMPRESSEDTEXTUREIMAGE1DEXTPROC) (GLuint texture, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLsizei imageSize, const GLvoid *bits); +typedef void (APIENTRYP PFNGLCOMPRESSEDTEXTURESUBIMAGE3DEXTPROC) (GLuint texture, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const GLvoid *bits); +typedef void (APIENTRYP PFNGLCOMPRESSEDTEXTURESUBIMAGE2DEXTPROC) (GLuint texture, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const GLvoid *bits); +typedef void (APIENTRYP PFNGLCOMPRESSEDTEXTURESUBIMAGE1DEXTPROC) (GLuint texture, GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLsizei imageSize, const GLvoid *bits); +typedef void (APIENTRYP PFNGLGETCOMPRESSEDTEXTUREIMAGEEXTPROC) (GLuint texture, GLenum target, GLint lod, GLvoid *img); +typedef void (APIENTRYP PFNGLCOMPRESSEDMULTITEXIMAGE3DEXTPROC) (GLenum texunit, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const GLvoid *bits); +typedef void (APIENTRYP PFNGLCOMPRESSEDMULTITEXIMAGE2DEXTPROC) (GLenum texunit, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const GLvoid *bits); +typedef void (APIENTRYP PFNGLCOMPRESSEDMULTITEXIMAGE1DEXTPROC) (GLenum texunit, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLsizei imageSize, const GLvoid *bits); +typedef void (APIENTRYP PFNGLCOMPRESSEDMULTITEXSUBIMAGE3DEXTPROC) (GLenum texunit, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const GLvoid *bits); +typedef void (APIENTRYP PFNGLCOMPRESSEDMULTITEXSUBIMAGE2DEXTPROC) (GLenum texunit, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const GLvoid *bits); +typedef void (APIENTRYP PFNGLCOMPRESSEDMULTITEXSUBIMAGE1DEXTPROC) (GLenum texunit, GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLsizei imageSize, const GLvoid *bits); +typedef void (APIENTRYP PFNGLGETCOMPRESSEDMULTITEXIMAGEEXTPROC) (GLenum texunit, GLenum target, GLint lod, GLvoid *img); +typedef void (APIENTRYP PFNGLNAMEDPROGRAMSTRINGEXTPROC) (GLuint program, GLenum target, GLenum format, GLsizei len, const GLvoid *string); +typedef void (APIENTRYP PFNGLNAMEDPROGRAMLOCALPARAMETER4DEXTPROC) (GLuint program, GLenum target, GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w); +typedef void (APIENTRYP PFNGLNAMEDPROGRAMLOCALPARAMETER4DVEXTPROC) (GLuint program, GLenum target, GLuint index, const GLdouble *params); +typedef void (APIENTRYP PFNGLNAMEDPROGRAMLOCALPARAMETER4FEXTPROC) (GLuint program, GLenum target, GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w); +typedef void (APIENTRYP PFNGLNAMEDPROGRAMLOCALPARAMETER4FVEXTPROC) (GLuint program, GLenum target, GLuint index, const GLfloat *params); +typedef void (APIENTRYP PFNGLGETNAMEDPROGRAMLOCALPARAMETERDVEXTPROC) (GLuint program, GLenum target, GLuint index, GLdouble *params); +typedef void (APIENTRYP PFNGLGETNAMEDPROGRAMLOCALPARAMETERFVEXTPROC) (GLuint program, GLenum target, GLuint index, GLfloat *params); +typedef void (APIENTRYP PFNGLGETNAMEDPROGRAMIVEXTPROC) (GLuint program, GLenum target, GLenum pname, GLint *params); +typedef void (APIENTRYP PFNGLGETNAMEDPROGRAMSTRINGEXTPROC) (GLuint program, GLenum target, GLenum pname, GLvoid *string); +typedef void (APIENTRYP PFNGLNAMEDPROGRAMLOCALPARAMETERS4FVEXTPROC) (GLuint program, GLenum target, GLuint index, GLsizei count, const GLfloat *params); +typedef void (APIENTRYP PFNGLNAMEDPROGRAMLOCALPARAMETERI4IEXTPROC) (GLuint program, GLenum target, GLuint index, GLint x, GLint y, GLint z, GLint w); +typedef void (APIENTRYP PFNGLNAMEDPROGRAMLOCALPARAMETERI4IVEXTPROC) (GLuint program, GLenum target, GLuint index, const GLint *params); +typedef void (APIENTRYP PFNGLNAMEDPROGRAMLOCALPARAMETERSI4IVEXTPROC) (GLuint program, GLenum target, GLuint index, GLsizei count, const GLint *params); +typedef void (APIENTRYP PFNGLNAMEDPROGRAMLOCALPARAMETERI4UIEXTPROC) (GLuint program, GLenum target, GLuint index, GLuint x, GLuint y, GLuint z, GLuint w); +typedef void (APIENTRYP PFNGLNAMEDPROGRAMLOCALPARAMETERI4UIVEXTPROC) (GLuint program, GLenum target, GLuint index, const GLuint *params); +typedef void (APIENTRYP PFNGLNAMEDPROGRAMLOCALPARAMETERSI4UIVEXTPROC) (GLuint program, GLenum target, GLuint index, GLsizei count, const GLuint *params); +typedef void (APIENTRYP PFNGLGETNAMEDPROGRAMLOCALPARAMETERIIVEXTPROC) (GLuint program, GLenum target, GLuint index, GLint *params); +typedef void (APIENTRYP PFNGLGETNAMEDPROGRAMLOCALPARAMETERIUIVEXTPROC) (GLuint program, GLenum target, GLuint index, GLuint *params); +typedef void (APIENTRYP PFNGLTEXTUREPARAMETERIIVEXTPROC) (GLuint texture, GLenum target, GLenum pname, const GLint *params); +typedef void (APIENTRYP PFNGLTEXTUREPARAMETERIUIVEXTPROC) (GLuint texture, GLenum target, GLenum pname, const GLuint *params); +typedef void (APIENTRYP PFNGLGETTEXTUREPARAMETERIIVEXTPROC) (GLuint texture, GLenum target, GLenum pname, GLint *params); +typedef void (APIENTRYP PFNGLGETTEXTUREPARAMETERIUIVEXTPROC) (GLuint texture, GLenum target, GLenum pname, GLuint *params); +typedef void (APIENTRYP PFNGLMULTITEXPARAMETERIIVEXTPROC) (GLenum texunit, GLenum target, GLenum pname, const GLint *params); +typedef void (APIENTRYP PFNGLMULTITEXPARAMETERIUIVEXTPROC) (GLenum texunit, GLenum target, GLenum pname, const GLuint *params); +typedef void (APIENTRYP PFNGLGETMULTITEXPARAMETERIIVEXTPROC) (GLenum texunit, GLenum target, GLenum pname, GLint *params); +typedef void (APIENTRYP PFNGLGETMULTITEXPARAMETERIUIVEXTPROC) (GLenum texunit, GLenum target, GLenum pname, GLuint *params); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM1FEXTPROC) (GLuint program, GLint location, GLfloat v0); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM2FEXTPROC) (GLuint program, GLint location, GLfloat v0, GLfloat v1); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM3FEXTPROC) (GLuint program, GLint location, GLfloat v0, GLfloat v1, GLfloat v2); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM4FEXTPROC) (GLuint program, GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM1IEXTPROC) (GLuint program, GLint location, GLint v0); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM2IEXTPROC) (GLuint program, GLint location, GLint v0, GLint v1); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM3IEXTPROC) (GLuint program, GLint location, GLint v0, GLint v1, GLint v2); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM4IEXTPROC) (GLuint program, GLint location, GLint v0, GLint v1, GLint v2, GLint v3); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM1FVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLfloat *value); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM2FVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLfloat *value); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM3FVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLfloat *value); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM4FVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLfloat *value); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM1IVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLint *value); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM2IVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLint *value); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM3IVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLint *value); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM4IVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLint *value); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX2FVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX3FVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX4FVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX2X3FVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX3X2FVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX2X4FVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX4X2FVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX3X4FVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX4X3FVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM1UIEXTPROC) (GLuint program, GLint location, GLuint v0); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM2UIEXTPROC) (GLuint program, GLint location, GLuint v0, GLuint v1); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM3UIEXTPROC) (GLuint program, GLint location, GLuint v0, GLuint v1, GLuint v2); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM4UIEXTPROC) (GLuint program, GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM1UIVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLuint *value); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM2UIVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLuint *value); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM3UIVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLuint *value); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM4UIVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLuint *value); +typedef void (APIENTRYP PFNGLNAMEDBUFFERDATAEXTPROC) (GLuint buffer, GLsizeiptr size, const GLvoid *data, GLenum usage); +typedef void (APIENTRYP PFNGLNAMEDBUFFERSUBDATAEXTPROC) (GLuint buffer, GLintptr offset, GLsizeiptr size, const GLvoid *data); +typedef GLvoid* (APIENTRYP PFNGLMAPNAMEDBUFFEREXTPROC) (GLuint buffer, GLenum access); +typedef GLboolean (APIENTRYP PFNGLUNMAPNAMEDBUFFEREXTPROC) (GLuint buffer); +typedef GLvoid* (APIENTRYP PFNGLMAPNAMEDBUFFERRANGEEXTPROC) (GLuint buffer, GLintptr offset, GLsizeiptr length, GLbitfield access); +typedef void (APIENTRYP PFNGLFLUSHMAPPEDNAMEDBUFFERRANGEEXTPROC) (GLuint buffer, GLintptr offset, GLsizeiptr length); +typedef void (APIENTRYP PFNGLNAMEDCOPYBUFFERSUBDATAEXTPROC) (GLuint readBuffer, GLuint writeBuffer, GLintptr readOffset, GLintptr writeOffset, GLsizeiptr size); +typedef void (APIENTRYP PFNGLGETNAMEDBUFFERPARAMETERIVEXTPROC) (GLuint buffer, GLenum pname, GLint *params); +typedef void (APIENTRYP PFNGLGETNAMEDBUFFERPOINTERVEXTPROC) (GLuint buffer, GLenum pname, GLvoid* *params); +typedef void (APIENTRYP PFNGLGETNAMEDBUFFERSUBDATAEXTPROC) (GLuint buffer, GLintptr offset, GLsizeiptr size, GLvoid *data); +typedef void (APIENTRYP PFNGLTEXTUREBUFFEREXTPROC) (GLuint texture, GLenum target, GLenum internalformat, GLuint buffer); +typedef void (APIENTRYP PFNGLMULTITEXBUFFEREXTPROC) (GLenum texunit, GLenum target, GLenum internalformat, GLuint buffer); +typedef void (APIENTRYP PFNGLNAMEDRENDERBUFFERSTORAGEEXTPROC) (GLuint renderbuffer, GLenum internalformat, GLsizei width, GLsizei height); +typedef void (APIENTRYP PFNGLGETNAMEDRENDERBUFFERPARAMETERIVEXTPROC) (GLuint renderbuffer, GLenum pname, GLint *params); +typedef GLenum (APIENTRYP PFNGLCHECKNAMEDFRAMEBUFFERSTATUSEXTPROC) (GLuint framebuffer, GLenum target); +typedef void (APIENTRYP PFNGLNAMEDFRAMEBUFFERTEXTURE1DEXTPROC) (GLuint framebuffer, GLenum attachment, GLenum textarget, GLuint texture, GLint level); +typedef void (APIENTRYP PFNGLNAMEDFRAMEBUFFERTEXTURE2DEXTPROC) (GLuint framebuffer, GLenum attachment, GLenum textarget, GLuint texture, GLint level); +typedef void (APIENTRYP PFNGLNAMEDFRAMEBUFFERTEXTURE3DEXTPROC) (GLuint framebuffer, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLint zoffset); +typedef void (APIENTRYP PFNGLNAMEDFRAMEBUFFERRENDERBUFFEREXTPROC) (GLuint framebuffer, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer); +typedef void (APIENTRYP PFNGLGETNAMEDFRAMEBUFFERATTACHMENTPARAMETERIVEXTPROC) (GLuint framebuffer, GLenum attachment, GLenum pname, GLint *params); +typedef void (APIENTRYP PFNGLGENERATETEXTUREMIPMAPEXTPROC) (GLuint texture, GLenum target); +typedef void (APIENTRYP PFNGLGENERATEMULTITEXMIPMAPEXTPROC) (GLenum texunit, GLenum target); +typedef void (APIENTRYP PFNGLFRAMEBUFFERDRAWBUFFEREXTPROC) (GLuint framebuffer, GLenum mode); +typedef void (APIENTRYP PFNGLFRAMEBUFFERDRAWBUFFERSEXTPROC) (GLuint framebuffer, GLsizei n, const GLenum *bufs); +typedef void (APIENTRYP PFNGLFRAMEBUFFERREADBUFFEREXTPROC) (GLuint framebuffer, GLenum mode); +typedef void (APIENTRYP PFNGLGETFRAMEBUFFERPARAMETERIVEXTPROC) (GLuint framebuffer, GLenum pname, GLint *params); +typedef void (APIENTRYP PFNGLNAMEDRENDERBUFFERSTORAGEMULTISAMPLEEXTPROC) (GLuint renderbuffer, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height); +typedef void (APIENTRYP PFNGLNAMEDRENDERBUFFERSTORAGEMULTISAMPLECOVERAGEEXTPROC) (GLuint renderbuffer, GLsizei coverageSamples, GLsizei colorSamples, GLenum internalformat, GLsizei width, GLsizei height); +typedef void (APIENTRYP PFNGLNAMEDFRAMEBUFFERTEXTUREEXTPROC) (GLuint framebuffer, GLenum attachment, GLuint texture, GLint level); +typedef void (APIENTRYP PFNGLNAMEDFRAMEBUFFERTEXTURELAYEREXTPROC) (GLuint framebuffer, GLenum attachment, GLuint texture, GLint level, GLint layer); +typedef void (APIENTRYP PFNGLNAMEDFRAMEBUFFERTEXTUREFACEEXTPROC) (GLuint framebuffer, GLenum attachment, GLuint texture, GLint level, GLenum face); +typedef void (APIENTRYP PFNGLTEXTURERENDERBUFFEREXTPROC) (GLuint texture, GLenum target, GLuint renderbuffer); +typedef void (APIENTRYP PFNGLMULTITEXRENDERBUFFEREXTPROC) (GLenum texunit, GLenum target, GLuint renderbuffer); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM1DEXTPROC) (GLuint program, GLint location, GLdouble x); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM2DEXTPROC) (GLuint program, GLint location, GLdouble x, GLdouble y); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM3DEXTPROC) (GLuint program, GLint location, GLdouble x, GLdouble y, GLdouble z); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM4DEXTPROC) (GLuint program, GLint location, GLdouble x, GLdouble y, GLdouble z, GLdouble w); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM1DVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLdouble *value); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM2DVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLdouble *value); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM3DVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLdouble *value); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM4DVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLdouble *value); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX2DVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX3DVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX4DVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX2X3DVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX2X4DVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX3X2DVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX3X4DVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX4X2DVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX4X3DVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +#endif + +#ifndef GL_EXT_vertex_array_bgra +#define GL_EXT_vertex_array_bgra 1 +#endif + +#ifndef GL_EXT_texture_swizzle +#define GL_EXT_texture_swizzle 1 +#endif + +#ifndef GL_NV_explicit_multisample +#define GL_NV_explicit_multisample 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glGetMultisamplefvNV (GLenum pname, GLuint index, GLfloat *val); +GLAPI void APIENTRY glSampleMaskIndexedNV (GLuint index, GLbitfield mask); +GLAPI void APIENTRY glTexRenderbufferNV (GLenum target, GLuint renderbuffer); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLGETMULTISAMPLEFVNVPROC) (GLenum pname, GLuint index, GLfloat *val); +typedef void (APIENTRYP PFNGLSAMPLEMASKINDEXEDNVPROC) (GLuint index, GLbitfield mask); +typedef void (APIENTRYP PFNGLTEXRENDERBUFFERNVPROC) (GLenum target, GLuint renderbuffer); +#endif + +#ifndef GL_NV_transform_feedback2 +#define GL_NV_transform_feedback2 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glBindTransformFeedbackNV (GLenum target, GLuint id); +GLAPI void APIENTRY glDeleteTransformFeedbacksNV (GLsizei n, const GLuint *ids); +GLAPI void APIENTRY glGenTransformFeedbacksNV (GLsizei n, GLuint *ids); +GLAPI GLboolean APIENTRY glIsTransformFeedbackNV (GLuint id); +GLAPI void APIENTRY glPauseTransformFeedbackNV (void); +GLAPI void APIENTRY glResumeTransformFeedbackNV (void); +GLAPI void APIENTRY glDrawTransformFeedbackNV (GLenum mode, GLuint id); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLBINDTRANSFORMFEEDBACKNVPROC) (GLenum target, GLuint id); +typedef void (APIENTRYP PFNGLDELETETRANSFORMFEEDBACKSNVPROC) (GLsizei n, const GLuint *ids); +typedef void (APIENTRYP PFNGLGENTRANSFORMFEEDBACKSNVPROC) (GLsizei n, GLuint *ids); +typedef GLboolean (APIENTRYP PFNGLISTRANSFORMFEEDBACKNVPROC) (GLuint id); +typedef void (APIENTRYP PFNGLPAUSETRANSFORMFEEDBACKNVPROC) (void); +typedef void (APIENTRYP PFNGLRESUMETRANSFORMFEEDBACKNVPROC) (void); +typedef void (APIENTRYP PFNGLDRAWTRANSFORMFEEDBACKNVPROC) (GLenum mode, GLuint id); +#endif + +#ifndef GL_ATI_meminfo +#define GL_ATI_meminfo 1 +#endif + +#ifndef GL_AMD_performance_monitor +#define GL_AMD_performance_monitor 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glGetPerfMonitorGroupsAMD (GLint *numGroups, GLsizei groupsSize, GLuint *groups); +GLAPI void APIENTRY glGetPerfMonitorCountersAMD (GLuint group, GLint *numCounters, GLint *maxActiveCounters, GLsizei counterSize, GLuint *counters); +GLAPI void APIENTRY glGetPerfMonitorGroupStringAMD (GLuint group, GLsizei bufSize, GLsizei *length, GLchar *groupString); +GLAPI void APIENTRY glGetPerfMonitorCounterStringAMD (GLuint group, GLuint counter, GLsizei bufSize, GLsizei *length, GLchar *counterString); +GLAPI void APIENTRY glGetPerfMonitorCounterInfoAMD (GLuint group, GLuint counter, GLenum pname, GLvoid *data); +GLAPI void APIENTRY glGenPerfMonitorsAMD (GLsizei n, GLuint *monitors); +GLAPI void APIENTRY glDeletePerfMonitorsAMD (GLsizei n, GLuint *monitors); +GLAPI void APIENTRY glSelectPerfMonitorCountersAMD (GLuint monitor, GLboolean enable, GLuint group, GLint numCounters, GLuint *counterList); +GLAPI void APIENTRY glBeginPerfMonitorAMD (GLuint monitor); +GLAPI void APIENTRY glEndPerfMonitorAMD (GLuint monitor); +GLAPI void APIENTRY glGetPerfMonitorCounterDataAMD (GLuint monitor, GLenum pname, GLsizei dataSize, GLuint *data, GLint *bytesWritten); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLGETPERFMONITORGROUPSAMDPROC) (GLint *numGroups, GLsizei groupsSize, GLuint *groups); +typedef void (APIENTRYP PFNGLGETPERFMONITORCOUNTERSAMDPROC) (GLuint group, GLint *numCounters, GLint *maxActiveCounters, GLsizei counterSize, GLuint *counters); +typedef void (APIENTRYP PFNGLGETPERFMONITORGROUPSTRINGAMDPROC) (GLuint group, GLsizei bufSize, GLsizei *length, GLchar *groupString); +typedef void (APIENTRYP PFNGLGETPERFMONITORCOUNTERSTRINGAMDPROC) (GLuint group, GLuint counter, GLsizei bufSize, GLsizei *length, GLchar *counterString); +typedef void (APIENTRYP PFNGLGETPERFMONITORCOUNTERINFOAMDPROC) (GLuint group, GLuint counter, GLenum pname, GLvoid *data); +typedef void (APIENTRYP PFNGLGENPERFMONITORSAMDPROC) (GLsizei n, GLuint *monitors); +typedef void (APIENTRYP PFNGLDELETEPERFMONITORSAMDPROC) (GLsizei n, GLuint *monitors); +typedef void (APIENTRYP PFNGLSELECTPERFMONITORCOUNTERSAMDPROC) (GLuint monitor, GLboolean enable, GLuint group, GLint numCounters, GLuint *counterList); +typedef void (APIENTRYP PFNGLBEGINPERFMONITORAMDPROC) (GLuint monitor); +typedef void (APIENTRYP PFNGLENDPERFMONITORAMDPROC) (GLuint monitor); +typedef void (APIENTRYP PFNGLGETPERFMONITORCOUNTERDATAAMDPROC) (GLuint monitor, GLenum pname, GLsizei dataSize, GLuint *data, GLint *bytesWritten); +#endif + +#ifndef GL_AMD_texture_texture4 +#define GL_AMD_texture_texture4 1 +#endif + +#ifndef GL_AMD_vertex_shader_tesselator +#define GL_AMD_vertex_shader_tesselator 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glTessellationFactorAMD (GLfloat factor); +GLAPI void APIENTRY glTessellationModeAMD (GLenum mode); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLTESSELLATIONFACTORAMDPROC) (GLfloat factor); +typedef void (APIENTRYP PFNGLTESSELLATIONMODEAMDPROC) (GLenum mode); +#endif + +#ifndef GL_EXT_provoking_vertex +#define GL_EXT_provoking_vertex 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glProvokingVertexEXT (GLenum mode); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLPROVOKINGVERTEXEXTPROC) (GLenum mode); +#endif + +#ifndef GL_EXT_texture_snorm +#define GL_EXT_texture_snorm 1 +#endif + +#ifndef GL_AMD_draw_buffers_blend +#define GL_AMD_draw_buffers_blend 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glBlendFuncIndexedAMD (GLuint buf, GLenum src, GLenum dst); +GLAPI void APIENTRY glBlendFuncSeparateIndexedAMD (GLuint buf, GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha); +GLAPI void APIENTRY glBlendEquationIndexedAMD (GLuint buf, GLenum mode); +GLAPI void APIENTRY glBlendEquationSeparateIndexedAMD (GLuint buf, GLenum modeRGB, GLenum modeAlpha); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLBLENDFUNCINDEXEDAMDPROC) (GLuint buf, GLenum src, GLenum dst); +typedef void (APIENTRYP PFNGLBLENDFUNCSEPARATEINDEXEDAMDPROC) (GLuint buf, GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha); +typedef void (APIENTRYP PFNGLBLENDEQUATIONINDEXEDAMDPROC) (GLuint buf, GLenum mode); +typedef void (APIENTRYP PFNGLBLENDEQUATIONSEPARATEINDEXEDAMDPROC) (GLuint buf, GLenum modeRGB, GLenum modeAlpha); +#endif + +#ifndef GL_APPLE_texture_range +#define GL_APPLE_texture_range 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glTextureRangeAPPLE (GLenum target, GLsizei length, const GLvoid *pointer); +GLAPI void APIENTRY glGetTexParameterPointervAPPLE (GLenum target, GLenum pname, GLvoid* *params); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLTEXTURERANGEAPPLEPROC) (GLenum target, GLsizei length, const GLvoid *pointer); +typedef void (APIENTRYP PFNGLGETTEXPARAMETERPOINTERVAPPLEPROC) (GLenum target, GLenum pname, GLvoid* *params); +#endif + +#ifndef GL_APPLE_float_pixels +#define GL_APPLE_float_pixels 1 +#endif + +#ifndef GL_APPLE_vertex_program_evaluators +#define GL_APPLE_vertex_program_evaluators 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glEnableVertexAttribAPPLE (GLuint index, GLenum pname); +GLAPI void APIENTRY glDisableVertexAttribAPPLE (GLuint index, GLenum pname); +GLAPI GLboolean APIENTRY glIsVertexAttribEnabledAPPLE (GLuint index, GLenum pname); +GLAPI void APIENTRY glMapVertexAttrib1dAPPLE (GLuint index, GLuint size, GLdouble u1, GLdouble u2, GLint stride, GLint order, const GLdouble *points); +GLAPI void APIENTRY glMapVertexAttrib1fAPPLE (GLuint index, GLuint size, GLfloat u1, GLfloat u2, GLint stride, GLint order, const GLfloat *points); +GLAPI void APIENTRY glMapVertexAttrib2dAPPLE (GLuint index, GLuint size, GLdouble u1, GLdouble u2, GLint ustride, GLint uorder, GLdouble v1, GLdouble v2, GLint vstride, GLint vorder, const GLdouble *points); +GLAPI void APIENTRY glMapVertexAttrib2fAPPLE (GLuint index, GLuint size, GLfloat u1, GLfloat u2, GLint ustride, GLint uorder, GLfloat v1, GLfloat v2, GLint vstride, GLint vorder, const GLfloat *points); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLENABLEVERTEXATTRIBAPPLEPROC) (GLuint index, GLenum pname); +typedef void (APIENTRYP PFNGLDISABLEVERTEXATTRIBAPPLEPROC) (GLuint index, GLenum pname); +typedef GLboolean (APIENTRYP PFNGLISVERTEXATTRIBENABLEDAPPLEPROC) (GLuint index, GLenum pname); +typedef void (APIENTRYP PFNGLMAPVERTEXATTRIB1DAPPLEPROC) (GLuint index, GLuint size, GLdouble u1, GLdouble u2, GLint stride, GLint order, const GLdouble *points); +typedef void (APIENTRYP PFNGLMAPVERTEXATTRIB1FAPPLEPROC) (GLuint index, GLuint size, GLfloat u1, GLfloat u2, GLint stride, GLint order, const GLfloat *points); +typedef void (APIENTRYP PFNGLMAPVERTEXATTRIB2DAPPLEPROC) (GLuint index, GLuint size, GLdouble u1, GLdouble u2, GLint ustride, GLint uorder, GLdouble v1, GLdouble v2, GLint vstride, GLint vorder, const GLdouble *points); +typedef void (APIENTRYP PFNGLMAPVERTEXATTRIB2FAPPLEPROC) (GLuint index, GLuint size, GLfloat u1, GLfloat u2, GLint ustride, GLint uorder, GLfloat v1, GLfloat v2, GLint vstride, GLint vorder, const GLfloat *points); +#endif + +#ifndef GL_APPLE_aux_depth_stencil +#define GL_APPLE_aux_depth_stencil 1 +#endif + +#ifndef GL_APPLE_object_purgeable +#define GL_APPLE_object_purgeable 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI GLenum APIENTRY glObjectPurgeableAPPLE (GLenum objectType, GLuint name, GLenum option); +GLAPI GLenum APIENTRY glObjectUnpurgeableAPPLE (GLenum objectType, GLuint name, GLenum option); +GLAPI void APIENTRY glGetObjectParameterivAPPLE (GLenum objectType, GLuint name, GLenum pname, GLint *params); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef GLenum (APIENTRYP PFNGLOBJECTPURGEABLEAPPLEPROC) (GLenum objectType, GLuint name, GLenum option); +typedef GLenum (APIENTRYP PFNGLOBJECTUNPURGEABLEAPPLEPROC) (GLenum objectType, GLuint name, GLenum option); +typedef void (APIENTRYP PFNGLGETOBJECTPARAMETERIVAPPLEPROC) (GLenum objectType, GLuint name, GLenum pname, GLint *params); +#endif + +#ifndef GL_APPLE_row_bytes +#define GL_APPLE_row_bytes 1 +#endif + +#ifndef GL_APPLE_rgb_422 +#define GL_APPLE_rgb_422 1 +#endif + +#ifndef GL_NV_video_capture +#define GL_NV_video_capture 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glBeginVideoCaptureNV (GLuint video_capture_slot); +GLAPI void APIENTRY glBindVideoCaptureStreamBufferNV (GLuint video_capture_slot, GLuint stream, GLenum frame_region, GLintptrARB offset); +GLAPI void APIENTRY glBindVideoCaptureStreamTextureNV (GLuint video_capture_slot, GLuint stream, GLenum frame_region, GLenum target, GLuint texture); +GLAPI void APIENTRY glEndVideoCaptureNV (GLuint video_capture_slot); +GLAPI void APIENTRY glGetVideoCaptureivNV (GLuint video_capture_slot, GLenum pname, GLint *params); +GLAPI void APIENTRY glGetVideoCaptureStreamivNV (GLuint video_capture_slot, GLuint stream, GLenum pname, GLint *params); +GLAPI void APIENTRY glGetVideoCaptureStreamfvNV (GLuint video_capture_slot, GLuint stream, GLenum pname, GLfloat *params); +GLAPI void APIENTRY glGetVideoCaptureStreamdvNV (GLuint video_capture_slot, GLuint stream, GLenum pname, GLdouble *params); +GLAPI GLenum APIENTRY glVideoCaptureNV (GLuint video_capture_slot, GLuint *sequence_num, GLuint64EXT *capture_time); +GLAPI void APIENTRY glVideoCaptureStreamParameterivNV (GLuint video_capture_slot, GLuint stream, GLenum pname, const GLint *params); +GLAPI void APIENTRY glVideoCaptureStreamParameterfvNV (GLuint video_capture_slot, GLuint stream, GLenum pname, const GLfloat *params); +GLAPI void APIENTRY glVideoCaptureStreamParameterdvNV (GLuint video_capture_slot, GLuint stream, GLenum pname, const GLdouble *params); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLBEGINVIDEOCAPTURENVPROC) (GLuint video_capture_slot); +typedef void (APIENTRYP PFNGLBINDVIDEOCAPTURESTREAMBUFFERNVPROC) (GLuint video_capture_slot, GLuint stream, GLenum frame_region, GLintptrARB offset); +typedef void (APIENTRYP PFNGLBINDVIDEOCAPTURESTREAMTEXTURENVPROC) (GLuint video_capture_slot, GLuint stream, GLenum frame_region, GLenum target, GLuint texture); +typedef void (APIENTRYP PFNGLENDVIDEOCAPTURENVPROC) (GLuint video_capture_slot); +typedef void (APIENTRYP PFNGLGETVIDEOCAPTUREIVNVPROC) (GLuint video_capture_slot, GLenum pname, GLint *params); +typedef void (APIENTRYP PFNGLGETVIDEOCAPTURESTREAMIVNVPROC) (GLuint video_capture_slot, GLuint stream, GLenum pname, GLint *params); +typedef void (APIENTRYP PFNGLGETVIDEOCAPTURESTREAMFVNVPROC) (GLuint video_capture_slot, GLuint stream, GLenum pname, GLfloat *params); +typedef void (APIENTRYP PFNGLGETVIDEOCAPTURESTREAMDVNVPROC) (GLuint video_capture_slot, GLuint stream, GLenum pname, GLdouble *params); +typedef GLenum (APIENTRYP PFNGLVIDEOCAPTURENVPROC) (GLuint video_capture_slot, GLuint *sequence_num, GLuint64EXT *capture_time); +typedef void (APIENTRYP PFNGLVIDEOCAPTURESTREAMPARAMETERIVNVPROC) (GLuint video_capture_slot, GLuint stream, GLenum pname, const GLint *params); +typedef void (APIENTRYP PFNGLVIDEOCAPTURESTREAMPARAMETERFVNVPROC) (GLuint video_capture_slot, GLuint stream, GLenum pname, const GLfloat *params); +typedef void (APIENTRYP PFNGLVIDEOCAPTURESTREAMPARAMETERDVNVPROC) (GLuint video_capture_slot, GLuint stream, GLenum pname, const GLdouble *params); +#endif + +#ifndef GL_NV_copy_image +#define GL_NV_copy_image 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glCopyImageSubDataNV (GLuint srcName, GLenum srcTarget, GLint srcLevel, GLint srcX, GLint srcY, GLint srcZ, GLuint dstName, GLenum dstTarget, GLint dstLevel, GLint dstX, GLint dstY, GLint dstZ, GLsizei width, GLsizei height, GLsizei depth); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLCOPYIMAGESUBDATANVPROC) (GLuint srcName, GLenum srcTarget, GLint srcLevel, GLint srcX, GLint srcY, GLint srcZ, GLuint dstName, GLenum dstTarget, GLint dstLevel, GLint dstX, GLint dstY, GLint dstZ, GLsizei width, GLsizei height, GLsizei depth); +#endif + +#ifndef GL_EXT_separate_shader_objects +#define GL_EXT_separate_shader_objects 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glUseShaderProgramEXT (GLenum type, GLuint program); +GLAPI void APIENTRY glActiveProgramEXT (GLuint program); +GLAPI GLuint APIENTRY glCreateShaderProgramEXT (GLenum type, const GLchar *string); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLUSESHADERPROGRAMEXTPROC) (GLenum type, GLuint program); +typedef void (APIENTRYP PFNGLACTIVEPROGRAMEXTPROC) (GLuint program); +typedef GLuint (APIENTRYP PFNGLCREATESHADERPROGRAMEXTPROC) (GLenum type, const GLchar *string); +#endif + +#ifndef GL_NV_parameter_buffer_object2 +#define GL_NV_parameter_buffer_object2 1 +#endif + +#ifndef GL_NV_shader_buffer_load +#define GL_NV_shader_buffer_load 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glMakeBufferResidentNV (GLenum target, GLenum access); +GLAPI void APIENTRY glMakeBufferNonResidentNV (GLenum target); +GLAPI GLboolean APIENTRY glIsBufferResidentNV (GLenum target); +GLAPI void APIENTRY glMakeNamedBufferResidentNV (GLuint buffer, GLenum access); +GLAPI void APIENTRY glMakeNamedBufferNonResidentNV (GLuint buffer); +GLAPI GLboolean APIENTRY glIsNamedBufferResidentNV (GLuint buffer); +GLAPI void APIENTRY glGetBufferParameterui64vNV (GLenum target, GLenum pname, GLuint64EXT *params); +GLAPI void APIENTRY glGetNamedBufferParameterui64vNV (GLuint buffer, GLenum pname, GLuint64EXT *params); +GLAPI void APIENTRY glGetIntegerui64vNV (GLenum value, GLuint64EXT *result); +GLAPI void APIENTRY glUniformui64NV (GLint location, GLuint64EXT value); +GLAPI void APIENTRY glUniformui64vNV (GLint location, GLsizei count, const GLuint64EXT *value); +GLAPI void APIENTRY glGetUniformui64vNV (GLuint program, GLint location, GLuint64EXT *params); +GLAPI void APIENTRY glProgramUniformui64NV (GLuint program, GLint location, GLuint64EXT value); +GLAPI void APIENTRY glProgramUniformui64vNV (GLuint program, GLint location, GLsizei count, const GLuint64EXT *value); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLMAKEBUFFERRESIDENTNVPROC) (GLenum target, GLenum access); +typedef void (APIENTRYP PFNGLMAKEBUFFERNONRESIDENTNVPROC) (GLenum target); +typedef GLboolean (APIENTRYP PFNGLISBUFFERRESIDENTNVPROC) (GLenum target); +typedef void (APIENTRYP PFNGLMAKENAMEDBUFFERRESIDENTNVPROC) (GLuint buffer, GLenum access); +typedef void (APIENTRYP PFNGLMAKENAMEDBUFFERNONRESIDENTNVPROC) (GLuint buffer); +typedef GLboolean (APIENTRYP PFNGLISNAMEDBUFFERRESIDENTNVPROC) (GLuint buffer); +typedef void (APIENTRYP PFNGLGETBUFFERPARAMETERUI64VNVPROC) (GLenum target, GLenum pname, GLuint64EXT *params); +typedef void (APIENTRYP PFNGLGETNAMEDBUFFERPARAMETERUI64VNVPROC) (GLuint buffer, GLenum pname, GLuint64EXT *params); +typedef void (APIENTRYP PFNGLGETINTEGERUI64VNVPROC) (GLenum value, GLuint64EXT *result); +typedef void (APIENTRYP PFNGLUNIFORMUI64NVPROC) (GLint location, GLuint64EXT value); +typedef void (APIENTRYP PFNGLUNIFORMUI64VNVPROC) (GLint location, GLsizei count, const GLuint64EXT *value); +typedef void (APIENTRYP PFNGLGETUNIFORMUI64VNVPROC) (GLuint program, GLint location, GLuint64EXT *params); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORMUI64NVPROC) (GLuint program, GLint location, GLuint64EXT value); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORMUI64VNVPROC) (GLuint program, GLint location, GLsizei count, const GLuint64EXT *value); +#endif + +#ifndef GL_NV_vertex_buffer_unified_memory +#define GL_NV_vertex_buffer_unified_memory 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glBufferAddressRangeNV (GLenum pname, GLuint index, GLuint64EXT address, GLsizeiptr length); +GLAPI void APIENTRY glVertexFormatNV (GLint size, GLenum type, GLsizei stride); +GLAPI void APIENTRY glNormalFormatNV (GLenum type, GLsizei stride); +GLAPI void APIENTRY glColorFormatNV (GLint size, GLenum type, GLsizei stride); +GLAPI void APIENTRY glIndexFormatNV (GLenum type, GLsizei stride); +GLAPI void APIENTRY glTexCoordFormatNV (GLint size, GLenum type, GLsizei stride); +GLAPI void APIENTRY glEdgeFlagFormatNV (GLsizei stride); +GLAPI void APIENTRY glSecondaryColorFormatNV (GLint size, GLenum type, GLsizei stride); +GLAPI void APIENTRY glFogCoordFormatNV (GLenum type, GLsizei stride); +GLAPI void APIENTRY glVertexAttribFormatNV (GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride); +GLAPI void APIENTRY glVertexAttribIFormatNV (GLuint index, GLint size, GLenum type, GLsizei stride); +GLAPI void APIENTRY glGetIntegerui64i_vNV (GLenum value, GLuint index, GLuint64EXT *result); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLBUFFERADDRESSRANGENVPROC) (GLenum pname, GLuint index, GLuint64EXT address, GLsizeiptr length); +typedef void (APIENTRYP PFNGLVERTEXFORMATNVPROC) (GLint size, GLenum type, GLsizei stride); +typedef void (APIENTRYP PFNGLNORMALFORMATNVPROC) (GLenum type, GLsizei stride); +typedef void (APIENTRYP PFNGLCOLORFORMATNVPROC) (GLint size, GLenum type, GLsizei stride); +typedef void (APIENTRYP PFNGLINDEXFORMATNVPROC) (GLenum type, GLsizei stride); +typedef void (APIENTRYP PFNGLTEXCOORDFORMATNVPROC) (GLint size, GLenum type, GLsizei stride); +typedef void (APIENTRYP PFNGLEDGEFLAGFORMATNVPROC) (GLsizei stride); +typedef void (APIENTRYP PFNGLSECONDARYCOLORFORMATNVPROC) (GLint size, GLenum type, GLsizei stride); +typedef void (APIENTRYP PFNGLFOGCOORDFORMATNVPROC) (GLenum type, GLsizei stride); +typedef void (APIENTRYP PFNGLVERTEXATTRIBFORMATNVPROC) (GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride); +typedef void (APIENTRYP PFNGLVERTEXATTRIBIFORMATNVPROC) (GLuint index, GLint size, GLenum type, GLsizei stride); +typedef void (APIENTRYP PFNGLGETINTEGERUI64I_VNVPROC) (GLenum value, GLuint index, GLuint64EXT *result); +#endif + +#ifndef GL_NV_texture_barrier +#define GL_NV_texture_barrier 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glTextureBarrierNV (void); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLTEXTUREBARRIERNVPROC) (void); +#endif + +#ifndef GL_AMD_shader_stencil_export +#define GL_AMD_shader_stencil_export 1 +#endif + +#ifndef GL_AMD_seamless_cubemap_per_texture +#define GL_AMD_seamless_cubemap_per_texture 1 +#endif + +#ifndef GL_AMD_conservative_depth +#define GL_AMD_conservative_depth 1 +#endif + +#ifndef GL_EXT_shader_image_load_store +#define GL_EXT_shader_image_load_store 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glBindImageTextureEXT (GLuint index, GLuint texture, GLint level, GLboolean layered, GLint layer, GLenum access, GLint format); +GLAPI void APIENTRY glMemoryBarrierEXT (GLbitfield barriers); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLBINDIMAGETEXTUREEXTPROC) (GLuint index, GLuint texture, GLint level, GLboolean layered, GLint layer, GLenum access, GLint format); +typedef void (APIENTRYP PFNGLMEMORYBARRIEREXTPROC) (GLbitfield barriers); +#endif + +#ifndef GL_EXT_vertex_attrib_64bit +#define GL_EXT_vertex_attrib_64bit 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glVertexAttribL1dEXT (GLuint index, GLdouble x); +GLAPI void APIENTRY glVertexAttribL2dEXT (GLuint index, GLdouble x, GLdouble y); +GLAPI void APIENTRY glVertexAttribL3dEXT (GLuint index, GLdouble x, GLdouble y, GLdouble z); +GLAPI void APIENTRY glVertexAttribL4dEXT (GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w); +GLAPI void APIENTRY glVertexAttribL1dvEXT (GLuint index, const GLdouble *v); +GLAPI void APIENTRY glVertexAttribL2dvEXT (GLuint index, const GLdouble *v); +GLAPI void APIENTRY glVertexAttribL3dvEXT (GLuint index, const GLdouble *v); +GLAPI void APIENTRY glVertexAttribL4dvEXT (GLuint index, const GLdouble *v); +GLAPI void APIENTRY glVertexAttribLPointerEXT (GLuint index, GLint size, GLenum type, GLsizei stride, const GLvoid *pointer); +GLAPI void APIENTRY glGetVertexAttribLdvEXT (GLuint index, GLenum pname, GLdouble *params); +GLAPI void APIENTRY glVertexArrayVertexAttribLOffsetEXT (GLuint vaobj, GLuint buffer, GLuint index, GLint size, GLenum type, GLsizei stride, GLintptr offset); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLVERTEXATTRIBL1DEXTPROC) (GLuint index, GLdouble x); +typedef void (APIENTRYP PFNGLVERTEXATTRIBL2DEXTPROC) (GLuint index, GLdouble x, GLdouble y); +typedef void (APIENTRYP PFNGLVERTEXATTRIBL3DEXTPROC) (GLuint index, GLdouble x, GLdouble y, GLdouble z); +typedef void (APIENTRYP PFNGLVERTEXATTRIBL4DEXTPROC) (GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w); +typedef void (APIENTRYP PFNGLVERTEXATTRIBL1DVEXTPROC) (GLuint index, const GLdouble *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIBL2DVEXTPROC) (GLuint index, const GLdouble *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIBL3DVEXTPROC) (GLuint index, const GLdouble *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIBL4DVEXTPROC) (GLuint index, const GLdouble *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIBLPOINTEREXTPROC) (GLuint index, GLint size, GLenum type, GLsizei stride, const GLvoid *pointer); +typedef void (APIENTRYP PFNGLGETVERTEXATTRIBLDVEXTPROC) (GLuint index, GLenum pname, GLdouble *params); +typedef void (APIENTRYP PFNGLVERTEXARRAYVERTEXATTRIBLOFFSETEXTPROC) (GLuint vaobj, GLuint buffer, GLuint index, GLint size, GLenum type, GLsizei stride, GLintptr offset); +#endif + +#ifndef GL_NV_gpu_program5 +#define GL_NV_gpu_program5 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glProgramSubroutineParametersuivNV (GLenum target, GLsizei count, const GLuint *params); +GLAPI void APIENTRY glGetProgramSubroutineParameteruivNV (GLenum target, GLuint index, GLuint *param); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLPROGRAMSUBROUTINEPARAMETERSUIVNVPROC) (GLenum target, GLsizei count, const GLuint *params); +typedef void (APIENTRYP PFNGLGETPROGRAMSUBROUTINEPARAMETERUIVNVPROC) (GLenum target, GLuint index, GLuint *param); +#endif + +#ifndef GL_NV_gpu_shader5 +#define GL_NV_gpu_shader5 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glUniform1i64NV (GLint location, GLint64EXT x); +GLAPI void APIENTRY glUniform2i64NV (GLint location, GLint64EXT x, GLint64EXT y); +GLAPI void APIENTRY glUniform3i64NV (GLint location, GLint64EXT x, GLint64EXT y, GLint64EXT z); +GLAPI void APIENTRY glUniform4i64NV (GLint location, GLint64EXT x, GLint64EXT y, GLint64EXT z, GLint64EXT w); +GLAPI void APIENTRY glUniform1i64vNV (GLint location, GLsizei count, const GLint64EXT *value); +GLAPI void APIENTRY glUniform2i64vNV (GLint location, GLsizei count, const GLint64EXT *value); +GLAPI void APIENTRY glUniform3i64vNV (GLint location, GLsizei count, const GLint64EXT *value); +GLAPI void APIENTRY glUniform4i64vNV (GLint location, GLsizei count, const GLint64EXT *value); +GLAPI void APIENTRY glUniform1ui64NV (GLint location, GLuint64EXT x); +GLAPI void APIENTRY glUniform2ui64NV (GLint location, GLuint64EXT x, GLuint64EXT y); +GLAPI void APIENTRY glUniform3ui64NV (GLint location, GLuint64EXT x, GLuint64EXT y, GLuint64EXT z); +GLAPI void APIENTRY glUniform4ui64NV (GLint location, GLuint64EXT x, GLuint64EXT y, GLuint64EXT z, GLuint64EXT w); +GLAPI void APIENTRY glUniform1ui64vNV (GLint location, GLsizei count, const GLuint64EXT *value); +GLAPI void APIENTRY glUniform2ui64vNV (GLint location, GLsizei count, const GLuint64EXT *value); +GLAPI void APIENTRY glUniform3ui64vNV (GLint location, GLsizei count, const GLuint64EXT *value); +GLAPI void APIENTRY glUniform4ui64vNV (GLint location, GLsizei count, const GLuint64EXT *value); +GLAPI void APIENTRY glGetUniformi64vNV (GLuint program, GLint location, GLint64EXT *params); +GLAPI void APIENTRY glProgramUniform1i64NV (GLuint program, GLint location, GLint64EXT x); +GLAPI void APIENTRY glProgramUniform2i64NV (GLuint program, GLint location, GLint64EXT x, GLint64EXT y); +GLAPI void APIENTRY glProgramUniform3i64NV (GLuint program, GLint location, GLint64EXT x, GLint64EXT y, GLint64EXT z); +GLAPI void APIENTRY glProgramUniform4i64NV (GLuint program, GLint location, GLint64EXT x, GLint64EXT y, GLint64EXT z, GLint64EXT w); +GLAPI void APIENTRY glProgramUniform1i64vNV (GLuint program, GLint location, GLsizei count, const GLint64EXT *value); +GLAPI void APIENTRY glProgramUniform2i64vNV (GLuint program, GLint location, GLsizei count, const GLint64EXT *value); +GLAPI void APIENTRY glProgramUniform3i64vNV (GLuint program, GLint location, GLsizei count, const GLint64EXT *value); +GLAPI void APIENTRY glProgramUniform4i64vNV (GLuint program, GLint location, GLsizei count, const GLint64EXT *value); +GLAPI void APIENTRY glProgramUniform1ui64NV (GLuint program, GLint location, GLuint64EXT x); +GLAPI void APIENTRY glProgramUniform2ui64NV (GLuint program, GLint location, GLuint64EXT x, GLuint64EXT y); +GLAPI void APIENTRY glProgramUniform3ui64NV (GLuint program, GLint location, GLuint64EXT x, GLuint64EXT y, GLuint64EXT z); +GLAPI void APIENTRY glProgramUniform4ui64NV (GLuint program, GLint location, GLuint64EXT x, GLuint64EXT y, GLuint64EXT z, GLuint64EXT w); +GLAPI void APIENTRY glProgramUniform1ui64vNV (GLuint program, GLint location, GLsizei count, const GLuint64EXT *value); +GLAPI void APIENTRY glProgramUniform2ui64vNV (GLuint program, GLint location, GLsizei count, const GLuint64EXT *value); +GLAPI void APIENTRY glProgramUniform3ui64vNV (GLuint program, GLint location, GLsizei count, const GLuint64EXT *value); +GLAPI void APIENTRY glProgramUniform4ui64vNV (GLuint program, GLint location, GLsizei count, const GLuint64EXT *value); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLUNIFORM1I64NVPROC) (GLint location, GLint64EXT x); +typedef void (APIENTRYP PFNGLUNIFORM2I64NVPROC) (GLint location, GLint64EXT x, GLint64EXT y); +typedef void (APIENTRYP PFNGLUNIFORM3I64NVPROC) (GLint location, GLint64EXT x, GLint64EXT y, GLint64EXT z); +typedef void (APIENTRYP PFNGLUNIFORM4I64NVPROC) (GLint location, GLint64EXT x, GLint64EXT y, GLint64EXT z, GLint64EXT w); +typedef void (APIENTRYP PFNGLUNIFORM1I64VNVPROC) (GLint location, GLsizei count, const GLint64EXT *value); +typedef void (APIENTRYP PFNGLUNIFORM2I64VNVPROC) (GLint location, GLsizei count, const GLint64EXT *value); +typedef void (APIENTRYP PFNGLUNIFORM3I64VNVPROC) (GLint location, GLsizei count, const GLint64EXT *value); +typedef void (APIENTRYP PFNGLUNIFORM4I64VNVPROC) (GLint location, GLsizei count, const GLint64EXT *value); +typedef void (APIENTRYP PFNGLUNIFORM1UI64NVPROC) (GLint location, GLuint64EXT x); +typedef void (APIENTRYP PFNGLUNIFORM2UI64NVPROC) (GLint location, GLuint64EXT x, GLuint64EXT y); +typedef void (APIENTRYP PFNGLUNIFORM3UI64NVPROC) (GLint location, GLuint64EXT x, GLuint64EXT y, GLuint64EXT z); +typedef void (APIENTRYP PFNGLUNIFORM4UI64NVPROC) (GLint location, GLuint64EXT x, GLuint64EXT y, GLuint64EXT z, GLuint64EXT w); +typedef void (APIENTRYP PFNGLUNIFORM1UI64VNVPROC) (GLint location, GLsizei count, const GLuint64EXT *value); +typedef void (APIENTRYP PFNGLUNIFORM2UI64VNVPROC) (GLint location, GLsizei count, const GLuint64EXT *value); +typedef void (APIENTRYP PFNGLUNIFORM3UI64VNVPROC) (GLint location, GLsizei count, const GLuint64EXT *value); +typedef void (APIENTRYP PFNGLUNIFORM4UI64VNVPROC) (GLint location, GLsizei count, const GLuint64EXT *value); +typedef void (APIENTRYP PFNGLGETUNIFORMI64VNVPROC) (GLuint program, GLint location, GLint64EXT *params); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM1I64NVPROC) (GLuint program, GLint location, GLint64EXT x); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM2I64NVPROC) (GLuint program, GLint location, GLint64EXT x, GLint64EXT y); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM3I64NVPROC) (GLuint program, GLint location, GLint64EXT x, GLint64EXT y, GLint64EXT z); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM4I64NVPROC) (GLuint program, GLint location, GLint64EXT x, GLint64EXT y, GLint64EXT z, GLint64EXT w); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM1I64VNVPROC) (GLuint program, GLint location, GLsizei count, const GLint64EXT *value); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM2I64VNVPROC) (GLuint program, GLint location, GLsizei count, const GLint64EXT *value); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM3I64VNVPROC) (GLuint program, GLint location, GLsizei count, const GLint64EXT *value); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM4I64VNVPROC) (GLuint program, GLint location, GLsizei count, const GLint64EXT *value); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM1UI64NVPROC) (GLuint program, GLint location, GLuint64EXT x); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM2UI64NVPROC) (GLuint program, GLint location, GLuint64EXT x, GLuint64EXT y); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM3UI64NVPROC) (GLuint program, GLint location, GLuint64EXT x, GLuint64EXT y, GLuint64EXT z); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM4UI64NVPROC) (GLuint program, GLint location, GLuint64EXT x, GLuint64EXT y, GLuint64EXT z, GLuint64EXT w); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM1UI64VNVPROC) (GLuint program, GLint location, GLsizei count, const GLuint64EXT *value); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM2UI64VNVPROC) (GLuint program, GLint location, GLsizei count, const GLuint64EXT *value); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM3UI64VNVPROC) (GLuint program, GLint location, GLsizei count, const GLuint64EXT *value); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM4UI64VNVPROC) (GLuint program, GLint location, GLsizei count, const GLuint64EXT *value); +#endif + +#ifndef GL_NV_shader_buffer_store +#define GL_NV_shader_buffer_store 1 +#endif + +#ifndef GL_NV_tessellation_program5 +#define GL_NV_tessellation_program5 1 +#endif + +#ifndef GL_NV_vertex_attrib_integer_64bit +#define GL_NV_vertex_attrib_integer_64bit 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glVertexAttribL1i64NV (GLuint index, GLint64EXT x); +GLAPI void APIENTRY glVertexAttribL2i64NV (GLuint index, GLint64EXT x, GLint64EXT y); +GLAPI void APIENTRY glVertexAttribL3i64NV (GLuint index, GLint64EXT x, GLint64EXT y, GLint64EXT z); +GLAPI void APIENTRY glVertexAttribL4i64NV (GLuint index, GLint64EXT x, GLint64EXT y, GLint64EXT z, GLint64EXT w); +GLAPI void APIENTRY glVertexAttribL1i64vNV (GLuint index, const GLint64EXT *v); +GLAPI void APIENTRY glVertexAttribL2i64vNV (GLuint index, const GLint64EXT *v); +GLAPI void APIENTRY glVertexAttribL3i64vNV (GLuint index, const GLint64EXT *v); +GLAPI void APIENTRY glVertexAttribL4i64vNV (GLuint index, const GLint64EXT *v); +GLAPI void APIENTRY glVertexAttribL1ui64NV (GLuint index, GLuint64EXT x); +GLAPI void APIENTRY glVertexAttribL2ui64NV (GLuint index, GLuint64EXT x, GLuint64EXT y); +GLAPI void APIENTRY glVertexAttribL3ui64NV (GLuint index, GLuint64EXT x, GLuint64EXT y, GLuint64EXT z); +GLAPI void APIENTRY glVertexAttribL4ui64NV (GLuint index, GLuint64EXT x, GLuint64EXT y, GLuint64EXT z, GLuint64EXT w); +GLAPI void APIENTRY glVertexAttribL1ui64vNV (GLuint index, const GLuint64EXT *v); +GLAPI void APIENTRY glVertexAttribL2ui64vNV (GLuint index, const GLuint64EXT *v); +GLAPI void APIENTRY glVertexAttribL3ui64vNV (GLuint index, const GLuint64EXT *v); +GLAPI void APIENTRY glVertexAttribL4ui64vNV (GLuint index, const GLuint64EXT *v); +GLAPI void APIENTRY glGetVertexAttribLi64vNV (GLuint index, GLenum pname, GLint64EXT *params); +GLAPI void APIENTRY glGetVertexAttribLui64vNV (GLuint index, GLenum pname, GLuint64EXT *params); +GLAPI void APIENTRY glVertexAttribLFormatNV (GLuint index, GLint size, GLenum type, GLsizei stride); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLVERTEXATTRIBL1I64NVPROC) (GLuint index, GLint64EXT x); +typedef void (APIENTRYP PFNGLVERTEXATTRIBL2I64NVPROC) (GLuint index, GLint64EXT x, GLint64EXT y); +typedef void (APIENTRYP PFNGLVERTEXATTRIBL3I64NVPROC) (GLuint index, GLint64EXT x, GLint64EXT y, GLint64EXT z); +typedef void (APIENTRYP PFNGLVERTEXATTRIBL4I64NVPROC) (GLuint index, GLint64EXT x, GLint64EXT y, GLint64EXT z, GLint64EXT w); +typedef void (APIENTRYP PFNGLVERTEXATTRIBL1I64VNVPROC) (GLuint index, const GLint64EXT *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIBL2I64VNVPROC) (GLuint index, const GLint64EXT *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIBL3I64VNVPROC) (GLuint index, const GLint64EXT *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIBL4I64VNVPROC) (GLuint index, const GLint64EXT *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIBL1UI64NVPROC) (GLuint index, GLuint64EXT x); +typedef void (APIENTRYP PFNGLVERTEXATTRIBL2UI64NVPROC) (GLuint index, GLuint64EXT x, GLuint64EXT y); +typedef void (APIENTRYP PFNGLVERTEXATTRIBL3UI64NVPROC) (GLuint index, GLuint64EXT x, GLuint64EXT y, GLuint64EXT z); +typedef void (APIENTRYP PFNGLVERTEXATTRIBL4UI64NVPROC) (GLuint index, GLuint64EXT x, GLuint64EXT y, GLuint64EXT z, GLuint64EXT w); +typedef void (APIENTRYP PFNGLVERTEXATTRIBL1UI64VNVPROC) (GLuint index, const GLuint64EXT *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIBL2UI64VNVPROC) (GLuint index, const GLuint64EXT *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIBL3UI64VNVPROC) (GLuint index, const GLuint64EXT *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIBL4UI64VNVPROC) (GLuint index, const GLuint64EXT *v); +typedef void (APIENTRYP PFNGLGETVERTEXATTRIBLI64VNVPROC) (GLuint index, GLenum pname, GLint64EXT *params); +typedef void (APIENTRYP PFNGLGETVERTEXATTRIBLUI64VNVPROC) (GLuint index, GLenum pname, GLuint64EXT *params); +typedef void (APIENTRYP PFNGLVERTEXATTRIBLFORMATNVPROC) (GLuint index, GLint size, GLenum type, GLsizei stride); +#endif + +#ifndef GL_NV_multisample_coverage +#define GL_NV_multisample_coverage 1 +#endif + +#ifndef GL_AMD_name_gen_delete +#define GL_AMD_name_gen_delete 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glGenNamesAMD (GLenum identifier, GLuint num, GLuint *names); +GLAPI void APIENTRY glDeleteNamesAMD (GLenum identifier, GLuint num, const GLuint *names); +GLAPI GLboolean APIENTRY glIsNameAMD (GLenum identifier, GLuint name); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLGENNAMESAMDPROC) (GLenum identifier, GLuint num, GLuint *names); +typedef void (APIENTRYP PFNGLDELETENAMESAMDPROC) (GLenum identifier, GLuint num, const GLuint *names); +typedef GLboolean (APIENTRYP PFNGLISNAMEAMDPROC) (GLenum identifier, GLuint name); +#endif + +#ifndef GL_AMD_debug_output +#define GL_AMD_debug_output 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glDebugMessageEnableAMD (GLenum category, GLenum severity, GLsizei count, const GLuint *ids, GLboolean enabled); +GLAPI void APIENTRY glDebugMessageInsertAMD (GLenum category, GLenum severity, GLuint id, GLsizei length, const GLchar *buf); +GLAPI void APIENTRY glDebugMessageCallbackAMD (GLDEBUGPROCAMD callback, GLvoid *userParam); +GLAPI GLuint APIENTRY glGetDebugMessageLogAMD (GLuint count, GLsizei bufsize, GLenum *categories, GLuint *severities, GLuint *ids, GLsizei *lengths, GLchar *message); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLDEBUGMESSAGEENABLEAMDPROC) (GLenum category, GLenum severity, GLsizei count, const GLuint *ids, GLboolean enabled); +typedef void (APIENTRYP PFNGLDEBUGMESSAGEINSERTAMDPROC) (GLenum category, GLenum severity, GLuint id, GLsizei length, const GLchar *buf); +typedef void (APIENTRYP PFNGLDEBUGMESSAGECALLBACKAMDPROC) (GLDEBUGPROCAMD callback, GLvoid *userParam); +typedef GLuint (APIENTRYP PFNGLGETDEBUGMESSAGELOGAMDPROC) (GLuint count, GLsizei bufsize, GLenum *categories, GLuint *severities, GLuint *ids, GLsizei *lengths, GLchar *message); +#endif + +#ifndef GL_NV_vdpau_interop +#define GL_NV_vdpau_interop 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glVDPAUInitNV (const GLvoid *vdpDevice, const GLvoid *getProcAddress); +GLAPI void APIENTRY glVDPAUFiniNV (void); +GLAPI GLvdpauSurfaceNV APIENTRY glVDPAURegisterVideoSurfaceNV (const GLvoid *vdpSurface, GLenum target, GLsizei numTextureNames, const GLuint *textureNames); +GLAPI GLvdpauSurfaceNV APIENTRY glVDPAURegisterOutputSurfaceNV (GLvoid *vdpSurface, GLenum target, GLsizei numTextureNames, const GLuint *textureNames); +GLAPI void APIENTRY glVDPAUIsSurfaceNV (GLvdpauSurfaceNV surface); +GLAPI void APIENTRY glVDPAUUnregisterSurfaceNV (GLvdpauSurfaceNV surface); +GLAPI void APIENTRY glVDPAUGetSurfaceivNV (GLvdpauSurfaceNV surface, GLenum pname, GLsizei bufSize, GLsizei *length, GLint *values); +GLAPI void APIENTRY glVDPAUSurfaceAccessNV (GLvdpauSurfaceNV surface, GLenum access); +GLAPI void APIENTRY glVDPAUMapSurfacesNV (GLsizei numSurfaces, const GLvdpauSurfaceNV *surfaces); +GLAPI void APIENTRY glVDPAUUnmapSurfacesNV (GLsizei numSurface, const GLvdpauSurfaceNV *surfaces); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLVDPAUINITNVPROC) (const GLvoid *vdpDevice, const GLvoid *getProcAddress); +typedef void (APIENTRYP PFNGLVDPAUFININVPROC) (void); +typedef GLvdpauSurfaceNV (APIENTRYP PFNGLVDPAUREGISTERVIDEOSURFACENVPROC) (const GLvoid *vdpSurface, GLenum target, GLsizei numTextureNames, const GLuint *textureNames); +typedef GLvdpauSurfaceNV (APIENTRYP PFNGLVDPAUREGISTEROUTPUTSURFACENVPROC) (GLvoid *vdpSurface, GLenum target, GLsizei numTextureNames, const GLuint *textureNames); +typedef void (APIENTRYP PFNGLVDPAUISSURFACENVPROC) (GLvdpauSurfaceNV surface); +typedef void (APIENTRYP PFNGLVDPAUUNREGISTERSURFACENVPROC) (GLvdpauSurfaceNV surface); +typedef void (APIENTRYP PFNGLVDPAUGETSURFACEIVNVPROC) (GLvdpauSurfaceNV surface, GLenum pname, GLsizei bufSize, GLsizei *length, GLint *values); +typedef void (APIENTRYP PFNGLVDPAUSURFACEACCESSNVPROC) (GLvdpauSurfaceNV surface, GLenum access); +typedef void (APIENTRYP PFNGLVDPAUMAPSURFACESNVPROC) (GLsizei numSurfaces, const GLvdpauSurfaceNV *surfaces); +typedef void (APIENTRYP PFNGLVDPAUUNMAPSURFACESNVPROC) (GLsizei numSurface, const GLvdpauSurfaceNV *surfaces); +#endif + +#ifndef GL_AMD_transform_feedback3_lines_triangles +#define GL_AMD_transform_feedback3_lines_triangles 1 +#endif + +#ifndef GL_AMD_depth_clamp_separate +#define GL_AMD_depth_clamp_separate 1 +#endif + +#ifndef GL_EXT_texture_sRGB_decode +#define GL_EXT_texture_sRGB_decode 1 +#endif + +#ifndef GL_NV_texture_multisample +#define GL_NV_texture_multisample 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glTexImage2DMultisampleCoverageNV (GLenum target, GLsizei coverageSamples, GLsizei colorSamples, GLint internalFormat, GLsizei width, GLsizei height, GLboolean fixedSampleLocations); +GLAPI void APIENTRY glTexImage3DMultisampleCoverageNV (GLenum target, GLsizei coverageSamples, GLsizei colorSamples, GLint internalFormat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedSampleLocations); +GLAPI void APIENTRY glTextureImage2DMultisampleNV (GLuint texture, GLenum target, GLsizei samples, GLint internalFormat, GLsizei width, GLsizei height, GLboolean fixedSampleLocations); +GLAPI void APIENTRY glTextureImage3DMultisampleNV (GLuint texture, GLenum target, GLsizei samples, GLint internalFormat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedSampleLocations); +GLAPI void APIENTRY glTextureImage2DMultisampleCoverageNV (GLuint texture, GLenum target, GLsizei coverageSamples, GLsizei colorSamples, GLint internalFormat, GLsizei width, GLsizei height, GLboolean fixedSampleLocations); +GLAPI void APIENTRY glTextureImage3DMultisampleCoverageNV (GLuint texture, GLenum target, GLsizei coverageSamples, GLsizei colorSamples, GLint internalFormat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedSampleLocations); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLTEXIMAGE2DMULTISAMPLECOVERAGENVPROC) (GLenum target, GLsizei coverageSamples, GLsizei colorSamples, GLint internalFormat, GLsizei width, GLsizei height, GLboolean fixedSampleLocations); +typedef void (APIENTRYP PFNGLTEXIMAGE3DMULTISAMPLECOVERAGENVPROC) (GLenum target, GLsizei coverageSamples, GLsizei colorSamples, GLint internalFormat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedSampleLocations); +typedef void (APIENTRYP PFNGLTEXTUREIMAGE2DMULTISAMPLENVPROC) (GLuint texture, GLenum target, GLsizei samples, GLint internalFormat, GLsizei width, GLsizei height, GLboolean fixedSampleLocations); +typedef void (APIENTRYP PFNGLTEXTUREIMAGE3DMULTISAMPLENVPROC) (GLuint texture, GLenum target, GLsizei samples, GLint internalFormat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedSampleLocations); +typedef void (APIENTRYP PFNGLTEXTUREIMAGE2DMULTISAMPLECOVERAGENVPROC) (GLuint texture, GLenum target, GLsizei coverageSamples, GLsizei colorSamples, GLint internalFormat, GLsizei width, GLsizei height, GLboolean fixedSampleLocations); +typedef void (APIENTRYP PFNGLTEXTUREIMAGE3DMULTISAMPLECOVERAGENVPROC) (GLuint texture, GLenum target, GLsizei coverageSamples, GLsizei colorSamples, GLint internalFormat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedSampleLocations); +#endif + +#ifndef GL_AMD_blend_minmax_factor +#define GL_AMD_blend_minmax_factor 1 +#endif + +#ifndef GL_AMD_sample_positions +#define GL_AMD_sample_positions 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glSetMultisamplefvAMD (GLenum pname, GLuint index, const GLfloat *val); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLSETMULTISAMPLEFVAMDPROC) (GLenum pname, GLuint index, const GLfloat *val); +#endif + +#ifndef GL_EXT_x11_sync_object +#define GL_EXT_x11_sync_object 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI GLsync APIENTRY glImportSyncEXT (GLenum external_sync_type, GLintptr external_sync, GLbitfield flags); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef GLsync (APIENTRYP PFNGLIMPORTSYNCEXTPROC) (GLenum external_sync_type, GLintptr external_sync, GLbitfield flags); +#endif + +#ifndef GL_AMD_multi_draw_indirect +#define GL_AMD_multi_draw_indirect 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glMultiDrawArraysIndirectAMD (GLenum mode, const GLvoid *indirect, GLsizei primcount, GLsizei stride); +GLAPI void APIENTRY glMultiDrawElementsIndirectAMD (GLenum mode, GLenum type, const GLvoid *indirect, GLsizei primcount, GLsizei stride); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLMULTIDRAWARRAYSINDIRECTAMDPROC) (GLenum mode, const GLvoid *indirect, GLsizei primcount, GLsizei stride); +typedef void (APIENTRYP PFNGLMULTIDRAWELEMENTSINDIRECTAMDPROC) (GLenum mode, GLenum type, const GLvoid *indirect, GLsizei primcount, GLsizei stride); +#endif + +#ifndef GL_EXT_framebuffer_multisample_blit_scaled +#define GL_EXT_framebuffer_multisample_blit_scaled 1 +#endif + +#ifndef GL_NV_path_rendering +#define GL_NV_path_rendering 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI GLuint APIENTRY glGenPathsNV (GLsizei range); +GLAPI void APIENTRY glDeletePathsNV (GLuint path, GLsizei range); +GLAPI GLboolean APIENTRY glIsPathNV (GLuint path); +GLAPI void APIENTRY glPathCommandsNV (GLuint path, GLsizei numCommands, const GLubyte *commands, GLsizei numCoords, GLenum coordType, const GLvoid *coords); +GLAPI void APIENTRY glPathCoordsNV (GLuint path, GLsizei numCoords, GLenum coordType, const GLvoid *coords); +GLAPI void APIENTRY glPathSubCommandsNV (GLuint path, GLsizei commandStart, GLsizei commandsToDelete, GLsizei numCommands, const GLubyte *commands, GLsizei numCoords, GLenum coordType, const GLvoid *coords); +GLAPI void APIENTRY glPathSubCoordsNV (GLuint path, GLsizei coordStart, GLsizei numCoords, GLenum coordType, const GLvoid *coords); +GLAPI void APIENTRY glPathStringNV (GLuint path, GLenum format, GLsizei length, const GLvoid *pathString); +GLAPI void APIENTRY glPathGlyphsNV (GLuint firstPathName, GLenum fontTarget, const GLvoid *fontName, GLbitfield fontStyle, GLsizei numGlyphs, GLenum type, const GLvoid *charcodes, GLenum handleMissingGlyphs, GLuint pathParameterTemplate, GLfloat emScale); +GLAPI void APIENTRY glPathGlyphRangeNV (GLuint firstPathName, GLenum fontTarget, const GLvoid *fontName, GLbitfield fontStyle, GLuint firstGlyph, GLsizei numGlyphs, GLenum handleMissingGlyphs, GLuint pathParameterTemplate, GLfloat emScale); +GLAPI void APIENTRY glWeightPathsNV (GLuint resultPath, GLsizei numPaths, const GLuint *paths, const GLfloat *weights); +GLAPI void APIENTRY glCopyPathNV (GLuint resultPath, GLuint srcPath); +GLAPI void APIENTRY glInterpolatePathsNV (GLuint resultPath, GLuint pathA, GLuint pathB, GLfloat weight); +GLAPI void APIENTRY glTransformPathNV (GLuint resultPath, GLuint srcPath, GLenum transformType, const GLfloat *transformValues); +GLAPI void APIENTRY glPathParameterivNV (GLuint path, GLenum pname, const GLint *value); +GLAPI void APIENTRY glPathParameteriNV (GLuint path, GLenum pname, GLint value); +GLAPI void APIENTRY glPathParameterfvNV (GLuint path, GLenum pname, const GLfloat *value); +GLAPI void APIENTRY glPathParameterfNV (GLuint path, GLenum pname, GLfloat value); +GLAPI void APIENTRY glPathDashArrayNV (GLuint path, GLsizei dashCount, const GLfloat *dashArray); +GLAPI void APIENTRY glPathStencilFuncNV (GLenum func, GLint ref, GLuint mask); +GLAPI void APIENTRY glPathStencilDepthOffsetNV (GLfloat factor, GLfloat units); +GLAPI void APIENTRY glStencilFillPathNV (GLuint path, GLenum fillMode, GLuint mask); +GLAPI void APIENTRY glStencilStrokePathNV (GLuint path, GLint reference, GLuint mask); +GLAPI void APIENTRY glStencilFillPathInstancedNV (GLsizei numPaths, GLenum pathNameType, const GLvoid *paths, GLuint pathBase, GLenum fillMode, GLuint mask, GLenum transformType, const GLfloat *transformValues); +GLAPI void APIENTRY glStencilStrokePathInstancedNV (GLsizei numPaths, GLenum pathNameType, const GLvoid *paths, GLuint pathBase, GLint reference, GLuint mask, GLenum transformType, const GLfloat *transformValues); +GLAPI void APIENTRY glPathCoverDepthFuncNV (GLenum func); +GLAPI void APIENTRY glPathColorGenNV (GLenum color, GLenum genMode, GLenum colorFormat, const GLfloat *coeffs); +GLAPI void APIENTRY glPathTexGenNV (GLenum texCoordSet, GLenum genMode, GLint components, const GLfloat *coeffs); +GLAPI void APIENTRY glPathFogGenNV (GLenum genMode); +GLAPI void APIENTRY glCoverFillPathNV (GLuint path, GLenum coverMode); +GLAPI void APIENTRY glCoverStrokePathNV (GLuint path, GLenum coverMode); +GLAPI void APIENTRY glCoverFillPathInstancedNV (GLsizei numPaths, GLenum pathNameType, const GLvoid *paths, GLuint pathBase, GLenum coverMode, GLenum transformType, const GLfloat *transformValues); +GLAPI void APIENTRY glCoverStrokePathInstancedNV (GLsizei numPaths, GLenum pathNameType, const GLvoid *paths, GLuint pathBase, GLenum coverMode, GLenum transformType, const GLfloat *transformValues); +GLAPI void APIENTRY glGetPathParameterivNV (GLuint path, GLenum pname, GLint *value); +GLAPI void APIENTRY glGetPathParameterfvNV (GLuint path, GLenum pname, GLfloat *value); +GLAPI void APIENTRY glGetPathCommandsNV (GLuint path, GLubyte *commands); +GLAPI void APIENTRY glGetPathCoordsNV (GLuint path, GLfloat *coords); +GLAPI void APIENTRY glGetPathDashArrayNV (GLuint path, GLfloat *dashArray); +GLAPI void APIENTRY glGetPathMetricsNV (GLbitfield metricQueryMask, GLsizei numPaths, GLenum pathNameType, const GLvoid *paths, GLuint pathBase, GLsizei stride, GLfloat *metrics); +GLAPI void APIENTRY glGetPathMetricRangeNV (GLbitfield metricQueryMask, GLuint firstPathName, GLsizei numPaths, GLsizei stride, GLfloat *metrics); +GLAPI void APIENTRY glGetPathSpacingNV (GLenum pathListMode, GLsizei numPaths, GLenum pathNameType, const GLvoid *paths, GLuint pathBase, GLfloat advanceScale, GLfloat kerningScale, GLenum transformType, GLfloat *returnedSpacing); +GLAPI void APIENTRY glGetPathColorGenivNV (GLenum color, GLenum pname, GLint *value); +GLAPI void APIENTRY glGetPathColorGenfvNV (GLenum color, GLenum pname, GLfloat *value); +GLAPI void APIENTRY glGetPathTexGenivNV (GLenum texCoordSet, GLenum pname, GLint *value); +GLAPI void APIENTRY glGetPathTexGenfvNV (GLenum texCoordSet, GLenum pname, GLfloat *value); +GLAPI GLboolean APIENTRY glIsPointInFillPathNV (GLuint path, GLuint mask, GLfloat x, GLfloat y); +GLAPI GLboolean APIENTRY glIsPointInStrokePathNV (GLuint path, GLfloat x, GLfloat y); +GLAPI GLfloat APIENTRY glGetPathLengthNV (GLuint path, GLsizei startSegment, GLsizei numSegments); +GLAPI GLboolean APIENTRY glPointAlongPathNV (GLuint path, GLsizei startSegment, GLsizei numSegments, GLfloat distance, GLfloat *x, GLfloat *y, GLfloat *tangentX, GLfloat *tangentY); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef GLuint (APIENTRYP PFNGLGENPATHSNVPROC) (GLsizei range); +typedef void (APIENTRYP PFNGLDELETEPATHSNVPROC) (GLuint path, GLsizei range); +typedef GLboolean (APIENTRYP PFNGLISPATHNVPROC) (GLuint path); +typedef void (APIENTRYP PFNGLPATHCOMMANDSNVPROC) (GLuint path, GLsizei numCommands, const GLubyte *commands, GLsizei numCoords, GLenum coordType, const GLvoid *coords); +typedef void (APIENTRYP PFNGLPATHCOORDSNVPROC) (GLuint path, GLsizei numCoords, GLenum coordType, const GLvoid *coords); +typedef void (APIENTRYP PFNGLPATHSUBCOMMANDSNVPROC) (GLuint path, GLsizei commandStart, GLsizei commandsToDelete, GLsizei numCommands, const GLubyte *commands, GLsizei numCoords, GLenum coordType, const GLvoid *coords); +typedef void (APIENTRYP PFNGLPATHSUBCOORDSNVPROC) (GLuint path, GLsizei coordStart, GLsizei numCoords, GLenum coordType, const GLvoid *coords); +typedef void (APIENTRYP PFNGLPATHSTRINGNVPROC) (GLuint path, GLenum format, GLsizei length, const GLvoid *pathString); +typedef void (APIENTRYP PFNGLPATHGLYPHSNVPROC) (GLuint firstPathName, GLenum fontTarget, const GLvoid *fontName, GLbitfield fontStyle, GLsizei numGlyphs, GLenum type, const GLvoid *charcodes, GLenum handleMissingGlyphs, GLuint pathParameterTemplate, GLfloat emScale); +typedef void (APIENTRYP PFNGLPATHGLYPHRANGENVPROC) (GLuint firstPathName, GLenum fontTarget, const GLvoid *fontName, GLbitfield fontStyle, GLuint firstGlyph, GLsizei numGlyphs, GLenum handleMissingGlyphs, GLuint pathParameterTemplate, GLfloat emScale); +typedef void (APIENTRYP PFNGLWEIGHTPATHSNVPROC) (GLuint resultPath, GLsizei numPaths, const GLuint *paths, const GLfloat *weights); +typedef void (APIENTRYP PFNGLCOPYPATHNVPROC) (GLuint resultPath, GLuint srcPath); +typedef void (APIENTRYP PFNGLINTERPOLATEPATHSNVPROC) (GLuint resultPath, GLuint pathA, GLuint pathB, GLfloat weight); +typedef void (APIENTRYP PFNGLTRANSFORMPATHNVPROC) (GLuint resultPath, GLuint srcPath, GLenum transformType, const GLfloat *transformValues); +typedef void (APIENTRYP PFNGLPATHPARAMETERIVNVPROC) (GLuint path, GLenum pname, const GLint *value); +typedef void (APIENTRYP PFNGLPATHPARAMETERINVPROC) (GLuint path, GLenum pname, GLint value); +typedef void (APIENTRYP PFNGLPATHPARAMETERFVNVPROC) (GLuint path, GLenum pname, const GLfloat *value); +typedef void (APIENTRYP PFNGLPATHPARAMETERFNVPROC) (GLuint path, GLenum pname, GLfloat value); +typedef void (APIENTRYP PFNGLPATHDASHARRAYNVPROC) (GLuint path, GLsizei dashCount, const GLfloat *dashArray); +typedef void (APIENTRYP PFNGLPATHSTENCILFUNCNVPROC) (GLenum func, GLint ref, GLuint mask); +typedef void (APIENTRYP PFNGLPATHSTENCILDEPTHOFFSETNVPROC) (GLfloat factor, GLfloat units); +typedef void (APIENTRYP PFNGLSTENCILFILLPATHNVPROC) (GLuint path, GLenum fillMode, GLuint mask); +typedef void (APIENTRYP PFNGLSTENCILSTROKEPATHNVPROC) (GLuint path, GLint reference, GLuint mask); +typedef void (APIENTRYP PFNGLSTENCILFILLPATHINSTANCEDNVPROC) (GLsizei numPaths, GLenum pathNameType, const GLvoid *paths, GLuint pathBase, GLenum fillMode, GLuint mask, GLenum transformType, const GLfloat *transformValues); +typedef void (APIENTRYP PFNGLSTENCILSTROKEPATHINSTANCEDNVPROC) (GLsizei numPaths, GLenum pathNameType, const GLvoid *paths, GLuint pathBase, GLint reference, GLuint mask, GLenum transformType, const GLfloat *transformValues); +typedef void (APIENTRYP PFNGLPATHCOVERDEPTHFUNCNVPROC) (GLenum func); +typedef void (APIENTRYP PFNGLPATHCOLORGENNVPROC) (GLenum color, GLenum genMode, GLenum colorFormat, const GLfloat *coeffs); +typedef void (APIENTRYP PFNGLPATHTEXGENNVPROC) (GLenum texCoordSet, GLenum genMode, GLint components, const GLfloat *coeffs); +typedef void (APIENTRYP PFNGLPATHFOGGENNVPROC) (GLenum genMode); +typedef void (APIENTRYP PFNGLCOVERFILLPATHNVPROC) (GLuint path, GLenum coverMode); +typedef void (APIENTRYP PFNGLCOVERSTROKEPATHNVPROC) (GLuint path, GLenum coverMode); +typedef void (APIENTRYP PFNGLCOVERFILLPATHINSTANCEDNVPROC) (GLsizei numPaths, GLenum pathNameType, const GLvoid *paths, GLuint pathBase, GLenum coverMode, GLenum transformType, const GLfloat *transformValues); +typedef void (APIENTRYP PFNGLCOVERSTROKEPATHINSTANCEDNVPROC) (GLsizei numPaths, GLenum pathNameType, const GLvoid *paths, GLuint pathBase, GLenum coverMode, GLenum transformType, const GLfloat *transformValues); +typedef void (APIENTRYP PFNGLGETPATHPARAMETERIVNVPROC) (GLuint path, GLenum pname, GLint *value); +typedef void (APIENTRYP PFNGLGETPATHPARAMETERFVNVPROC) (GLuint path, GLenum pname, GLfloat *value); +typedef void (APIENTRYP PFNGLGETPATHCOMMANDSNVPROC) (GLuint path, GLubyte *commands); +typedef void (APIENTRYP PFNGLGETPATHCOORDSNVPROC) (GLuint path, GLfloat *coords); +typedef void (APIENTRYP PFNGLGETPATHDASHARRAYNVPROC) (GLuint path, GLfloat *dashArray); +typedef void (APIENTRYP PFNGLGETPATHMETRICSNVPROC) (GLbitfield metricQueryMask, GLsizei numPaths, GLenum pathNameType, const GLvoid *paths, GLuint pathBase, GLsizei stride, GLfloat *metrics); +typedef void (APIENTRYP PFNGLGETPATHMETRICRANGENVPROC) (GLbitfield metricQueryMask, GLuint firstPathName, GLsizei numPaths, GLsizei stride, GLfloat *metrics); +typedef void (APIENTRYP PFNGLGETPATHSPACINGNVPROC) (GLenum pathListMode, GLsizei numPaths, GLenum pathNameType, const GLvoid *paths, GLuint pathBase, GLfloat advanceScale, GLfloat kerningScale, GLenum transformType, GLfloat *returnedSpacing); +typedef void (APIENTRYP PFNGLGETPATHCOLORGENIVNVPROC) (GLenum color, GLenum pname, GLint *value); +typedef void (APIENTRYP PFNGLGETPATHCOLORGENFVNVPROC) (GLenum color, GLenum pname, GLfloat *value); +typedef void (APIENTRYP PFNGLGETPATHTEXGENIVNVPROC) (GLenum texCoordSet, GLenum pname, GLint *value); +typedef void (APIENTRYP PFNGLGETPATHTEXGENFVNVPROC) (GLenum texCoordSet, GLenum pname, GLfloat *value); +typedef GLboolean (APIENTRYP PFNGLISPOINTINFILLPATHNVPROC) (GLuint path, GLuint mask, GLfloat x, GLfloat y); +typedef GLboolean (APIENTRYP PFNGLISPOINTINSTROKEPATHNVPROC) (GLuint path, GLfloat x, GLfloat y); +typedef GLfloat (APIENTRYP PFNGLGETPATHLENGTHNVPROC) (GLuint path, GLsizei startSegment, GLsizei numSegments); +typedef GLboolean (APIENTRYP PFNGLPOINTALONGPATHNVPROC) (GLuint path, GLsizei startSegment, GLsizei numSegments, GLfloat distance, GLfloat *x, GLfloat *y, GLfloat *tangentX, GLfloat *tangentY); +#endif + +#ifndef GL_AMD_pinned_memory +#define GL_AMD_pinned_memory 1 +#endif + +#ifndef GL_AMD_stencil_operation_extended +#define GL_AMD_stencil_operation_extended 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glStencilOpValueAMD (GLenum face, GLuint value); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLSTENCILOPVALUEAMDPROC) (GLenum face, GLuint value); +#endif + +#ifndef GL_AMD_vertex_shader_viewport_index +#define GL_AMD_vertex_shader_viewport_index 1 +#endif + +#ifndef GL_AMD_vertex_shader_layer +#define GL_AMD_vertex_shader_layer 1 +#endif + +#ifndef GL_NV_bindless_texture +#define GL_NV_bindless_texture 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI GLuint64 APIENTRY glGetTextureHandleNV (GLuint texture); +GLAPI GLuint64 APIENTRY glGetTextureSamplerHandleNV (GLuint texture, GLuint sampler); +GLAPI void APIENTRY glMakeTextureHandleResidentNV (GLuint64 handle); +GLAPI void APIENTRY glMakeTextureHandleNonResidentNV (GLuint64 handle); +GLAPI GLuint64 APIENTRY glGetImageHandleNV (GLuint texture, GLint level, GLboolean layered, GLint layer, GLenum format); +GLAPI void APIENTRY glMakeImageHandleResidentNV (GLuint64 handle, GLenum access); +GLAPI void APIENTRY glMakeImageHandleNonResidentNV (GLuint64 handle); +GLAPI void APIENTRY glUniformHandleui64NV (GLint location, GLuint64 value); +GLAPI void APIENTRY glUniformHandleui64vNV (GLint location, GLsizei count, const GLuint64 *value); +GLAPI void APIENTRY glProgramUniformHandleui64NV (GLuint program, GLint location, GLuint64 value); +GLAPI void APIENTRY glProgramUniformHandleui64vNV (GLuint program, GLint location, GLsizei count, const GLuint64 *values); +GLAPI GLboolean APIENTRY glIsTextureHandleResidentNV (GLuint64 handle); +GLAPI GLboolean APIENTRY glIsImageHandleResidentNV (GLuint64 handle); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef GLuint64 (APIENTRYP PFNGLGETTEXTUREHANDLENVPROC) (GLuint texture); +typedef GLuint64 (APIENTRYP PFNGLGETTEXTURESAMPLERHANDLENVPROC) (GLuint texture, GLuint sampler); +typedef void (APIENTRYP PFNGLMAKETEXTUREHANDLERESIDENTNVPROC) (GLuint64 handle); +typedef void (APIENTRYP PFNGLMAKETEXTUREHANDLENONRESIDENTNVPROC) (GLuint64 handle); +typedef GLuint64 (APIENTRYP PFNGLGETIMAGEHANDLENVPROC) (GLuint texture, GLint level, GLboolean layered, GLint layer, GLenum format); +typedef void (APIENTRYP PFNGLMAKEIMAGEHANDLERESIDENTNVPROC) (GLuint64 handle, GLenum access); +typedef void (APIENTRYP PFNGLMAKEIMAGEHANDLENONRESIDENTNVPROC) (GLuint64 handle); +typedef void (APIENTRYP PFNGLUNIFORMHANDLEUI64NVPROC) (GLint location, GLuint64 value); +typedef void (APIENTRYP PFNGLUNIFORMHANDLEUI64VNVPROC) (GLint location, GLsizei count, const GLuint64 *value); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORMHANDLEUI64NVPROC) (GLuint program, GLint location, GLuint64 value); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORMHANDLEUI64VNVPROC) (GLuint program, GLint location, GLsizei count, const GLuint64 *values); +typedef GLboolean (APIENTRYP PFNGLISTEXTUREHANDLERESIDENTNVPROC) (GLuint64 handle); +typedef GLboolean (APIENTRYP PFNGLISIMAGEHANDLERESIDENTNVPROC) (GLuint64 handle); +#endif + +#ifndef GL_NV_shader_atomic_float +#define GL_NV_shader_atomic_float 1 +#endif + +#ifndef GL_AMD_query_buffer_object +#define GL_AMD_query_buffer_object 1 +#endif + +#ifndef GL_AMD_sparse_texture +#define GL_AMD_sparse_texture 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glTexStorageSparseAMD (GLenum target, GLenum internalFormat, GLsizei width, GLsizei height, GLsizei depth, GLsizei layers, GLbitfield flags); +GLAPI void APIENTRY glTextureStorageSparseAMD (GLuint texture, GLenum target, GLenum internalFormat, GLsizei width, GLsizei height, GLsizei depth, GLsizei layers, GLbitfield flags); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLTEXSTORAGESPARSEAMDPROC) (GLenum target, GLenum internalFormat, GLsizei width, GLsizei height, GLsizei depth, GLsizei layers, GLbitfield flags); +typedef void (APIENTRYP PFNGLTEXTURESTORAGESPARSEAMDPROC) (GLuint texture, GLenum target, GLenum internalFormat, GLsizei width, GLsizei height, GLsizei depth, GLsizei layers, GLbitfield flags); +#endif + + +#ifdef __cplusplus +} +#endif + +#endif
diff --git a/third_party/mesa_headers/GL/glx.h b/third_party/mesa_headers/GL/glx.h new file mode 100644 index 0000000..a3a7d97 --- /dev/null +++ b/third_party/mesa_headers/GL/glx.h
@@ -0,0 +1,526 @@ +/* + * Mesa 3-D graphics library + * Version: 6.5 + * + * Copyright (C) 1999-2006 Brian Paul All Rights Reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included + * in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS + * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN + * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN + * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ + + +#ifndef GLX_H +#define GLX_H + + +#ifdef __VMS +#include <GL/vms_x_fix.h> +# ifdef __cplusplus +/* VMS Xlib.h gives problems with C++. + * this avoids a bunch of trivial warnings */ +#pragma message disable nosimpint +#endif +#endif +#include <X11/Xlib.h> +#include <X11/Xutil.h> +#ifdef __VMS +# ifdef __cplusplus +#pragma message enable nosimpint +#endif +#endif +#include <GL/gl.h> + + +#if defined(USE_MGL_NAMESPACE) +#include "glx_mangle.h" +#endif + + +#ifdef __cplusplus +extern "C" { +#endif + + +#define GLX_VERSION_1_1 1 +#define GLX_VERSION_1_2 1 +#define GLX_VERSION_1_3 1 +#define GLX_VERSION_1_4 1 + +#define GLX_EXTENSION_NAME "GLX" + + + +/* + * Tokens for glXChooseVisual and glXGetConfig: + */ +#define GLX_USE_GL 1 +#define GLX_BUFFER_SIZE 2 +#define GLX_LEVEL 3 +#define GLX_RGBA 4 +#define GLX_DOUBLEBUFFER 5 +#define GLX_STEREO 6 +#define GLX_AUX_BUFFERS 7 +#define GLX_RED_SIZE 8 +#define GLX_GREEN_SIZE 9 +#define GLX_BLUE_SIZE 10 +#define GLX_ALPHA_SIZE 11 +#define GLX_DEPTH_SIZE 12 +#define GLX_STENCIL_SIZE 13 +#define GLX_ACCUM_RED_SIZE 14 +#define GLX_ACCUM_GREEN_SIZE 15 +#define GLX_ACCUM_BLUE_SIZE 16 +#define GLX_ACCUM_ALPHA_SIZE 17 + + +/* + * Error codes returned by glXGetConfig: + */ +#define GLX_BAD_SCREEN 1 +#define GLX_BAD_ATTRIBUTE 2 +#define GLX_NO_EXTENSION 3 +#define GLX_BAD_VISUAL 4 +#define GLX_BAD_CONTEXT 5 +#define GLX_BAD_VALUE 6 +#define GLX_BAD_ENUM 7 + + +/* + * GLX 1.1 and later: + */ +#define GLX_VENDOR 1 +#define GLX_VERSION 2 +#define GLX_EXTENSIONS 3 + + +/* + * GLX 1.3 and later: + */ +#define GLX_CONFIG_CAVEAT 0x20 +#define GLX_DONT_CARE 0xFFFFFFFF +#define GLX_X_VISUAL_TYPE 0x22 +#define GLX_TRANSPARENT_TYPE 0x23 +#define GLX_TRANSPARENT_INDEX_VALUE 0x24 +#define GLX_TRANSPARENT_RED_VALUE 0x25 +#define GLX_TRANSPARENT_GREEN_VALUE 0x26 +#define GLX_TRANSPARENT_BLUE_VALUE 0x27 +#define GLX_TRANSPARENT_ALPHA_VALUE 0x28 +#define GLX_WINDOW_BIT 0x00000001 +#define GLX_PIXMAP_BIT 0x00000002 +#define GLX_PBUFFER_BIT 0x00000004 +#define GLX_AUX_BUFFERS_BIT 0x00000010 +#define GLX_FRONT_LEFT_BUFFER_BIT 0x00000001 +#define GLX_FRONT_RIGHT_BUFFER_BIT 0x00000002 +#define GLX_BACK_LEFT_BUFFER_BIT 0x00000004 +#define GLX_BACK_RIGHT_BUFFER_BIT 0x00000008 +#define GLX_DEPTH_BUFFER_BIT 0x00000020 +#define GLX_STENCIL_BUFFER_BIT 0x00000040 +#define GLX_ACCUM_BUFFER_BIT 0x00000080 +#define GLX_NONE 0x8000 +#define GLX_SLOW_CONFIG 0x8001 +#define GLX_TRUE_COLOR 0x8002 +#define GLX_DIRECT_COLOR 0x8003 +#define GLX_PSEUDO_COLOR 0x8004 +#define GLX_STATIC_COLOR 0x8005 +#define GLX_GRAY_SCALE 0x8006 +#define GLX_STATIC_GRAY 0x8007 +#define GLX_TRANSPARENT_RGB 0x8008 +#define GLX_TRANSPARENT_INDEX 0x8009 +#define GLX_VISUAL_ID 0x800B +#define GLX_SCREEN 0x800C +#define GLX_NON_CONFORMANT_CONFIG 0x800D +#define GLX_DRAWABLE_TYPE 0x8010 +#define GLX_RENDER_TYPE 0x8011 +#define GLX_X_RENDERABLE 0x8012 +#define GLX_FBCONFIG_ID 0x8013 +#define GLX_RGBA_TYPE 0x8014 +#define GLX_COLOR_INDEX_TYPE 0x8015 +#define GLX_MAX_PBUFFER_WIDTH 0x8016 +#define GLX_MAX_PBUFFER_HEIGHT 0x8017 +#define GLX_MAX_PBUFFER_PIXELS 0x8018 +#define GLX_PRESERVED_CONTENTS 0x801B +#define GLX_LARGEST_PBUFFER 0x801C +#define GLX_WIDTH 0x801D +#define GLX_HEIGHT 0x801E +#define GLX_EVENT_MASK 0x801F +#define GLX_DAMAGED 0x8020 +#define GLX_SAVED 0x8021 +#define GLX_WINDOW 0x8022 +#define GLX_PBUFFER 0x8023 +#define GLX_PBUFFER_HEIGHT 0x8040 +#define GLX_PBUFFER_WIDTH 0x8041 +#define GLX_RGBA_BIT 0x00000001 +#define GLX_COLOR_INDEX_BIT 0x00000002 +#define GLX_PBUFFER_CLOBBER_MASK 0x08000000 + + +/* + * GLX 1.4 and later: + */ +#define GLX_SAMPLE_BUFFERS 0x186a0 /*100000*/ +#define GLX_SAMPLES 0x186a1 /*100001*/ + + + +typedef struct __GLXcontextRec *GLXContext; +typedef XID GLXPixmap; +typedef XID GLXDrawable; +/* GLX 1.3 and later */ +typedef struct __GLXFBConfigRec *GLXFBConfig; +typedef XID GLXFBConfigID; +typedef XID GLXContextID; +typedef XID GLXWindow; +typedef XID GLXPbuffer; + + +/* +** Events. +** __GLX_NUMBER_EVENTS is set to 17 to account for the BufferClobberSGIX +** event - this helps initialization if the server supports the pbuffer +** extension and the client doesn't. +*/ +#define GLX_PbufferClobber 0 +#define GLX_BufferSwapComplete 1 + +#define __GLX_NUMBER_EVENTS 17 + +extern XVisualInfo* glXChooseVisual( Display *dpy, int screen, + int *attribList ); + +extern GLXContext glXCreateContext( Display *dpy, XVisualInfo *vis, + GLXContext shareList, Bool direct ); + +extern void glXDestroyContext( Display *dpy, GLXContext ctx ); + +extern Bool glXMakeCurrent( Display *dpy, GLXDrawable drawable, + GLXContext ctx); + +extern void glXCopyContext( Display *dpy, GLXContext src, GLXContext dst, + unsigned long mask ); + +extern void glXSwapBuffers( Display *dpy, GLXDrawable drawable ); + +extern GLXPixmap glXCreateGLXPixmap( Display *dpy, XVisualInfo *visual, + Pixmap pixmap ); + +extern void glXDestroyGLXPixmap( Display *dpy, GLXPixmap pixmap ); + +extern Bool glXQueryExtension( Display *dpy, int *errorb, int *event ); + +extern Bool glXQueryVersion( Display *dpy, int *maj, int *min ); + +extern Bool glXIsDirect( Display *dpy, GLXContext ctx ); + +extern int glXGetConfig( Display *dpy, XVisualInfo *visual, + int attrib, int *value ); + +extern GLXContext glXGetCurrentContext( void ); + +extern GLXDrawable glXGetCurrentDrawable( void ); + +extern void glXWaitGL( void ); + +extern void glXWaitX( void ); + +extern void glXUseXFont( Font font, int first, int count, int list ); + + + +/* GLX 1.1 and later */ +extern const char *glXQueryExtensionsString( Display *dpy, int screen ); + +extern const char *glXQueryServerString( Display *dpy, int screen, int name ); + +extern const char *glXGetClientString( Display *dpy, int name ); + + +/* GLX 1.2 and later */ +extern Display *glXGetCurrentDisplay( void ); + + +/* GLX 1.3 and later */ +extern GLXFBConfig *glXChooseFBConfig( Display *dpy, int screen, + const int *attribList, int *nitems ); + +extern int glXGetFBConfigAttrib( Display *dpy, GLXFBConfig config, + int attribute, int *value ); + +extern GLXFBConfig *glXGetFBConfigs( Display *dpy, int screen, + int *nelements ); + +extern XVisualInfo *glXGetVisualFromFBConfig( Display *dpy, + GLXFBConfig config ); + +extern GLXWindow glXCreateWindow( Display *dpy, GLXFBConfig config, + Window win, const int *attribList ); + +extern void glXDestroyWindow( Display *dpy, GLXWindow window ); + +extern GLXPixmap glXCreatePixmap( Display *dpy, GLXFBConfig config, + Pixmap pixmap, const int *attribList ); + +extern void glXDestroyPixmap( Display *dpy, GLXPixmap pixmap ); + +extern GLXPbuffer glXCreatePbuffer( Display *dpy, GLXFBConfig config, + const int *attribList ); + +extern void glXDestroyPbuffer( Display *dpy, GLXPbuffer pbuf ); + +extern void glXQueryDrawable( Display *dpy, GLXDrawable draw, int attribute, + unsigned int *value ); + +extern GLXContext glXCreateNewContext( Display *dpy, GLXFBConfig config, + int renderType, GLXContext shareList, + Bool direct ); + +extern Bool glXMakeContextCurrent( Display *dpy, GLXDrawable draw, + GLXDrawable read, GLXContext ctx ); + +extern GLXDrawable glXGetCurrentReadDrawable( void ); + +extern int glXQueryContext( Display *dpy, GLXContext ctx, int attribute, + int *value ); + +extern void glXSelectEvent( Display *dpy, GLXDrawable drawable, + unsigned long mask ); + +extern void glXGetSelectedEvent( Display *dpy, GLXDrawable drawable, + unsigned long *mask ); + +/* GLX 1.3 function pointer typedefs */ +typedef GLXFBConfig * (* PFNGLXGETFBCONFIGSPROC) (Display *dpy, int screen, int *nelements); +typedef GLXFBConfig * (* PFNGLXCHOOSEFBCONFIGPROC) (Display *dpy, int screen, const int *attrib_list, int *nelements); +typedef int (* PFNGLXGETFBCONFIGATTRIBPROC) (Display *dpy, GLXFBConfig config, int attribute, int *value); +typedef XVisualInfo * (* PFNGLXGETVISUALFROMFBCONFIGPROC) (Display *dpy, GLXFBConfig config); +typedef GLXWindow (* PFNGLXCREATEWINDOWPROC) (Display *dpy, GLXFBConfig config, Window win, const int *attrib_list); +typedef void (* PFNGLXDESTROYWINDOWPROC) (Display *dpy, GLXWindow win); +typedef GLXPixmap (* PFNGLXCREATEPIXMAPPROC) (Display *dpy, GLXFBConfig config, Pixmap pixmap, const int *attrib_list); +typedef void (* PFNGLXDESTROYPIXMAPPROC) (Display *dpy, GLXPixmap pixmap); +typedef GLXPbuffer (* PFNGLXCREATEPBUFFERPROC) (Display *dpy, GLXFBConfig config, const int *attrib_list); +typedef void (* PFNGLXDESTROYPBUFFERPROC) (Display *dpy, GLXPbuffer pbuf); +typedef void (* PFNGLXQUERYDRAWABLEPROC) (Display *dpy, GLXDrawable draw, int attribute, unsigned int *value); +typedef GLXContext (* PFNGLXCREATENEWCONTEXTPROC) (Display *dpy, GLXFBConfig config, int render_type, GLXContext share_list, Bool direct); +typedef Bool (* PFNGLXMAKECONTEXTCURRENTPROC) (Display *dpy, GLXDrawable draw, GLXDrawable read, GLXContext ctx); +typedef GLXDrawable (* PFNGLXGETCURRENTREADDRAWABLEPROC) (void); +typedef Display * (* PFNGLXGETCURRENTDISPLAYPROC) (void); +typedef int (* PFNGLXQUERYCONTEXTPROC) (Display *dpy, GLXContext ctx, int attribute, int *value); +typedef void (* PFNGLXSELECTEVENTPROC) (Display *dpy, GLXDrawable draw, unsigned long event_mask); +typedef void (* PFNGLXGETSELECTEDEVENTPROC) (Display *dpy, GLXDrawable draw, unsigned long *event_mask); + + +/* + * ARB 2. GLX_ARB_get_proc_address + */ +#ifndef GLX_ARB_get_proc_address +#define GLX_ARB_get_proc_address 1 + +typedef void (*__GLXextFuncPtr)(void); +extern __GLXextFuncPtr glXGetProcAddressARB (const GLubyte *); + +#endif /* GLX_ARB_get_proc_address */ + + + +/* GLX 1.4 and later */ +extern void (*glXGetProcAddress(const GLubyte *procname))( void ); + +/* GLX 1.4 function pointer typedefs */ +typedef __GLXextFuncPtr (* PFNGLXGETPROCADDRESSPROC) (const GLubyte *procName); + + +#ifndef GLX_GLXEXT_LEGACY + +#include <GL/glxext.h> + +#endif /* GLX_GLXEXT_LEGACY */ + + +/** + ** The following aren't in glxext.h yet. + **/ + + +/* + * ???. GLX_NV_vertex_array_range + */ +#ifndef GLX_NV_vertex_array_range +#define GLX_NV_vertex_array_range + +extern void *glXAllocateMemoryNV(GLsizei size, GLfloat readfreq, GLfloat writefreq, GLfloat priority); +extern void glXFreeMemoryNV(GLvoid *pointer); +typedef void * ( * PFNGLXALLOCATEMEMORYNVPROC) (GLsizei size, GLfloat readfreq, GLfloat writefreq, GLfloat priority); +typedef void ( * PFNGLXFREEMEMORYNVPROC) (GLvoid *pointer); + +#endif /* GLX_NV_vertex_array_range */ + + +/* + * ARB ?. GLX_ARB_render_texture + * XXX This was never finalized! + */ +#ifndef GLX_ARB_render_texture +#define GLX_ARB_render_texture 1 + +extern Bool glXBindTexImageARB(Display *dpy, GLXPbuffer pbuffer, int buffer); +extern Bool glXReleaseTexImageARB(Display *dpy, GLXPbuffer pbuffer, int buffer); +extern Bool glXDrawableAttribARB(Display *dpy, GLXDrawable draw, const int *attribList); + +#endif /* GLX_ARB_render_texture */ + + +/* + * Remove this when glxext.h is updated. + */ +#ifndef GLX_NV_float_buffer +#define GLX_NV_float_buffer 1 + +#define GLX_FLOAT_COMPONENTS_NV 0x20B0 + +#endif /* GLX_NV_float_buffer */ + + + +/* + * #?. GLX_MESA_swap_frame_usage + */ +#ifndef GLX_MESA_swap_frame_usage +#define GLX_MESA_swap_frame_usage 1 + +extern int glXGetFrameUsageMESA(Display *dpy, GLXDrawable drawable, float *usage); +extern int glXBeginFrameTrackingMESA(Display *dpy, GLXDrawable drawable); +extern int glXEndFrameTrackingMESA(Display *dpy, GLXDrawable drawable); +extern int glXQueryFrameTrackingMESA(Display *dpy, GLXDrawable drawable, int64_t *swapCount, int64_t *missedFrames, float *lastMissedUsage); + +typedef int (*PFNGLXGETFRAMEUSAGEMESAPROC) (Display *dpy, GLXDrawable drawable, float *usage); +typedef int (*PFNGLXBEGINFRAMETRACKINGMESAPROC)(Display *dpy, GLXDrawable drawable); +typedef int (*PFNGLXENDFRAMETRACKINGMESAPROC)(Display *dpy, GLXDrawable drawable); +typedef int (*PFNGLXQUERYFRAMETRACKINGMESAPROC)(Display *dpy, GLXDrawable drawable, int64_t *swapCount, int64_t *missedFrames, float *lastMissedUsage); + +#endif /* GLX_MESA_swap_frame_usage */ + + + +/* + * #?. GLX_MESA_swap_control + */ +#ifndef GLX_MESA_swap_control +#define GLX_MESA_swap_control 1 + +extern int glXSwapIntervalMESA(unsigned int interval); +extern int glXGetSwapIntervalMESA(void); + +typedef int (*PFNGLXSWAPINTERVALMESAPROC)(unsigned int interval); +typedef int (*PFNGLXGETSWAPINTERVALMESAPROC)(void); + +#endif /* GLX_MESA_swap_control */ + + + +/* + * #?. GLX_EXT_texture_from_pixmap + * XXX not finished? + */ +#ifndef GLX_EXT_texture_from_pixmap +#define GLX_EXT_texture_from_pixmap 1 + +#define GLX_BIND_TO_TEXTURE_RGB_EXT 0x20D0 +#define GLX_BIND_TO_TEXTURE_RGBA_EXT 0x20D1 +#define GLX_BIND_TO_MIPMAP_TEXTURE_EXT 0x20D2 +#define GLX_BIND_TO_TEXTURE_TARGETS_EXT 0x20D3 +#define GLX_Y_INVERTED_EXT 0x20D4 + +#define GLX_TEXTURE_FORMAT_EXT 0x20D5 +#define GLX_TEXTURE_TARGET_EXT 0x20D6 +#define GLX_MIPMAP_TEXTURE_EXT 0x20D7 + +#define GLX_TEXTURE_FORMAT_NONE_EXT 0x20D8 +#define GLX_TEXTURE_FORMAT_RGB_EXT 0x20D9 +#define GLX_TEXTURE_FORMAT_RGBA_EXT 0x20DA + +#define GLX_TEXTURE_1D_BIT_EXT 0x00000001 +#define GLX_TEXTURE_2D_BIT_EXT 0x00000002 +#define GLX_TEXTURE_RECTANGLE_BIT_EXT 0x00000004 + +#define GLX_TEXTURE_1D_EXT 0x20DB +#define GLX_TEXTURE_2D_EXT 0x20DC +#define GLX_TEXTURE_RECTANGLE_EXT 0x20DD + +#define GLX_FRONT_LEFT_EXT 0x20DE +#define GLX_FRONT_RIGHT_EXT 0x20DF +#define GLX_BACK_LEFT_EXT 0x20E0 +#define GLX_BACK_RIGHT_EXT 0x20E1 +#define GLX_FRONT_EXT GLX_FRONT_LEFT_EXT +#define GLX_BACK_EXT GLX_BACK_LEFT_EXT +#define GLX_AUX0_EXT 0x20E2 +#define GLX_AUX1_EXT 0x20E3 +#define GLX_AUX2_EXT 0x20E4 +#define GLX_AUX3_EXT 0x20E5 +#define GLX_AUX4_EXT 0x20E6 +#define GLX_AUX5_EXT 0x20E7 +#define GLX_AUX6_EXT 0x20E8 +#define GLX_AUX7_EXT 0x20E9 +#define GLX_AUX8_EXT 0x20EA +#define GLX_AUX9_EXT 0x20EB + +extern void glXBindTexImageEXT(Display *dpy, GLXDrawable drawable, int buffer, const int *attrib_list); +extern void glXReleaseTexImageEXT(Display *dpy, GLXDrawable drawable, int buffer); + +#endif /* GLX_EXT_texture_from_pixmap */ + + + + +/*** Should these go here, or in another header? */ +/* +** GLX Events +*/ +typedef struct { + int event_type; /* GLX_DAMAGED or GLX_SAVED */ + int draw_type; /* GLX_WINDOW or GLX_PBUFFER */ + unsigned long serial; /* # of last request processed by server */ + Bool send_event; /* true if this came for SendEvent request */ + Display *display; /* display the event was read from */ + GLXDrawable drawable; /* XID of Drawable */ + unsigned int buffer_mask; /* mask indicating which buffers are affected */ + unsigned int aux_buffer; /* which aux buffer was affected */ + int x, y; + int width, height; + int count; /* if nonzero, at least this many more */ +} GLXPbufferClobberEvent; + +typedef struct { + int type; + unsigned long serial; /* # of last request processed by server */ + Bool send_event; /* true if this came from a SendEvent request */ + Display *display; /* Display the event was read from */ + GLXDrawable drawable; /* drawable on which event was requested in event mask */ + int event_type; + int64_t ust; + int64_t msc; + int64_t sbc; +} GLXBufferSwapComplete; + +typedef union __GLXEvent { + GLXPbufferClobberEvent glxpbufferclobber; + GLXBufferSwapComplete glxbufferswapcomplete; + long pad[24]; +} GLXEvent; + +#ifdef __cplusplus +} +#endif + +#endif
diff --git a/third_party/mesa_headers/GL/glxext.h b/third_party/mesa_headers/GL/glxext.h new file mode 100644 index 0000000..e640ff7e --- /dev/null +++ b/third_party/mesa_headers/GL/glxext.h
@@ -0,0 +1,1001 @@ +#ifndef __glxext_h_ +#define __glxext_h_ + +#ifdef __cplusplus +extern "C" { +#endif + +/* +** Copyright (c) 2007-2012 The Khronos Group Inc. +** +** Permission is hereby granted, free of charge, to any person obtaining a +** copy of this software and/or associated documentation files (the +** "Materials"), to deal in the Materials without restriction, including +** without limitation the rights to use, copy, modify, merge, publish, +** distribute, sublicense, and/or sell copies of the Materials, and to +** permit persons to whom the Materials are furnished to do so, subject to +** the following conditions: +** +** The above copyright notice and this permission notice shall be included +** in all copies or substantial portions of the Materials. +** +** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS. +*/ + +/* Function declaration macros - to move into glplatform.h */ + +#if defined(_WIN32) && !defined(APIENTRY) && !defined(__CYGWIN__) && !defined(__SCITECH_SNAP__) +#define WIN32_LEAN_AND_MEAN 1 +#include <windows.h> +#endif + +#ifndef APIENTRY +#define APIENTRY +#endif +#ifndef APIENTRYP +#define APIENTRYP APIENTRY * +#endif +#ifndef GLAPI +#define GLAPI extern +#endif + +/*************************************************************/ + +/* Header file version number, required by OpenGL ABI for Linux */ +/* glxext.h last updated 2012/02/29 */ +/* Current version at http://www.opengl.org/registry/ */ +#define GLX_GLXEXT_VERSION 33 + +#ifndef GLX_VERSION_1_3 +#define GLX_WINDOW_BIT 0x00000001 +#define GLX_PIXMAP_BIT 0x00000002 +#define GLX_PBUFFER_BIT 0x00000004 +#define GLX_RGBA_BIT 0x00000001 +#define GLX_COLOR_INDEX_BIT 0x00000002 +#define GLX_PBUFFER_CLOBBER_MASK 0x08000000 +#define GLX_FRONT_LEFT_BUFFER_BIT 0x00000001 +#define GLX_FRONT_RIGHT_BUFFER_BIT 0x00000002 +#define GLX_BACK_LEFT_BUFFER_BIT 0x00000004 +#define GLX_BACK_RIGHT_BUFFER_BIT 0x00000008 +#define GLX_AUX_BUFFERS_BIT 0x00000010 +#define GLX_DEPTH_BUFFER_BIT 0x00000020 +#define GLX_STENCIL_BUFFER_BIT 0x00000040 +#define GLX_ACCUM_BUFFER_BIT 0x00000080 +#define GLX_CONFIG_CAVEAT 0x20 +#define GLX_X_VISUAL_TYPE 0x22 +#define GLX_TRANSPARENT_TYPE 0x23 +#define GLX_TRANSPARENT_INDEX_VALUE 0x24 +#define GLX_TRANSPARENT_RED_VALUE 0x25 +#define GLX_TRANSPARENT_GREEN_VALUE 0x26 +#define GLX_TRANSPARENT_BLUE_VALUE 0x27 +#define GLX_TRANSPARENT_ALPHA_VALUE 0x28 +#define GLX_DONT_CARE 0xFFFFFFFF +#define GLX_NONE 0x8000 +#define GLX_SLOW_CONFIG 0x8001 +#define GLX_TRUE_COLOR 0x8002 +#define GLX_DIRECT_COLOR 0x8003 +#define GLX_PSEUDO_COLOR 0x8004 +#define GLX_STATIC_COLOR 0x8005 +#define GLX_GRAY_SCALE 0x8006 +#define GLX_STATIC_GRAY 0x8007 +#define GLX_TRANSPARENT_RGB 0x8008 +#define GLX_TRANSPARENT_INDEX 0x8009 +#define GLX_VISUAL_ID 0x800B +#define GLX_SCREEN 0x800C +#define GLX_NON_CONFORMANT_CONFIG 0x800D +#define GLX_DRAWABLE_TYPE 0x8010 +#define GLX_RENDER_TYPE 0x8011 +#define GLX_X_RENDERABLE 0x8012 +#define GLX_FBCONFIG_ID 0x8013 +#define GLX_RGBA_TYPE 0x8014 +#define GLX_COLOR_INDEX_TYPE 0x8015 +#define GLX_MAX_PBUFFER_WIDTH 0x8016 +#define GLX_MAX_PBUFFER_HEIGHT 0x8017 +#define GLX_MAX_PBUFFER_PIXELS 0x8018 +#define GLX_PRESERVED_CONTENTS 0x801B +#define GLX_LARGEST_PBUFFER 0x801C +#define GLX_WIDTH 0x801D +#define GLX_HEIGHT 0x801E +#define GLX_EVENT_MASK 0x801F +#define GLX_DAMAGED 0x8020 +#define GLX_SAVED 0x8021 +#define GLX_WINDOW 0x8022 +#define GLX_PBUFFER 0x8023 +#define GLX_PBUFFER_HEIGHT 0x8040 +#define GLX_PBUFFER_WIDTH 0x8041 +#endif + +#ifndef GLX_VERSION_1_4 +#define GLX_SAMPLE_BUFFERS 100000 +#define GLX_SAMPLES 100001 +#endif + +#ifndef GLX_ARB_get_proc_address +#endif + +#ifndef GLX_ARB_multisample +#define GLX_SAMPLE_BUFFERS_ARB 100000 +#define GLX_SAMPLES_ARB 100001 +#endif + +#ifndef GLX_ARB_vertex_buffer_object +#define GLX_CONTEXT_ALLOW_BUFFER_BYTE_ORDER_MISMATCH_ARB 0x2095 +#endif + +#ifndef GLX_ARB_fbconfig_float +#define GLX_RGBA_FLOAT_TYPE_ARB 0x20B9 +#define GLX_RGBA_FLOAT_BIT_ARB 0x00000004 +#endif + +#ifndef GLX_ARB_framebuffer_sRGB +#define GLX_FRAMEBUFFER_SRGB_CAPABLE_ARB 0x20B2 +#endif + +#ifndef GLX_ARB_create_context +#define GLX_CONTEXT_DEBUG_BIT_ARB 0x00000001 +#define GLX_CONTEXT_FORWARD_COMPATIBLE_BIT_ARB 0x00000002 +#define GLX_CONTEXT_MAJOR_VERSION_ARB 0x2091 +#define GLX_CONTEXT_MINOR_VERSION_ARB 0x2092 +#define GLX_CONTEXT_FLAGS_ARB 0x2094 +#endif + +#ifndef GLX_ARB_create_context_profile +#define GLX_CONTEXT_CORE_PROFILE_BIT_ARB 0x00000001 +#define GLX_CONTEXT_COMPATIBILITY_PROFILE_BIT_ARB 0x00000002 +#define GLX_CONTEXT_PROFILE_MASK_ARB 0x9126 +#endif + +#ifndef GLX_ARB_create_context_robustness +#define GLX_CONTEXT_ROBUST_ACCESS_BIT_ARB 0x00000004 +#define GLX_LOSE_CONTEXT_ON_RESET_ARB 0x8252 +#define GLX_CONTEXT_RESET_NOTIFICATION_STRATEGY_ARB 0x8256 +#define GLX_NO_RESET_NOTIFICATION_ARB 0x8261 +#endif + +#ifndef GLX_SGIS_multisample +#define GLX_SAMPLE_BUFFERS_SGIS 100000 +#define GLX_SAMPLES_SGIS 100001 +#endif + +#ifndef GLX_EXT_visual_info +#define GLX_X_VISUAL_TYPE_EXT 0x22 +#define GLX_TRANSPARENT_TYPE_EXT 0x23 +#define GLX_TRANSPARENT_INDEX_VALUE_EXT 0x24 +#define GLX_TRANSPARENT_RED_VALUE_EXT 0x25 +#define GLX_TRANSPARENT_GREEN_VALUE_EXT 0x26 +#define GLX_TRANSPARENT_BLUE_VALUE_EXT 0x27 +#define GLX_TRANSPARENT_ALPHA_VALUE_EXT 0x28 +#define GLX_NONE_EXT 0x8000 +#define GLX_TRUE_COLOR_EXT 0x8002 +#define GLX_DIRECT_COLOR_EXT 0x8003 +#define GLX_PSEUDO_COLOR_EXT 0x8004 +#define GLX_STATIC_COLOR_EXT 0x8005 +#define GLX_GRAY_SCALE_EXT 0x8006 +#define GLX_STATIC_GRAY_EXT 0x8007 +#define GLX_TRANSPARENT_RGB_EXT 0x8008 +#define GLX_TRANSPARENT_INDEX_EXT 0x8009 +#endif + +#ifndef GLX_SGI_swap_control +#endif + +#ifndef GLX_SGI_video_sync +#endif + +#ifndef GLX_SGI_make_current_read +#endif + +#ifndef GLX_SGIX_video_source +#endif + +#ifndef GLX_EXT_visual_rating +#define GLX_VISUAL_CAVEAT_EXT 0x20 +#define GLX_SLOW_VISUAL_EXT 0x8001 +#define GLX_NON_CONFORMANT_VISUAL_EXT 0x800D +/* reuse GLX_NONE_EXT */ +#endif + +#ifndef GLX_EXT_import_context +#define GLX_SHARE_CONTEXT_EXT 0x800A +#define GLX_VISUAL_ID_EXT 0x800B +#define GLX_SCREEN_EXT 0x800C +#endif + +#ifndef GLX_SGIX_fbconfig +#define GLX_WINDOW_BIT_SGIX 0x00000001 +#define GLX_PIXMAP_BIT_SGIX 0x00000002 +#define GLX_RGBA_BIT_SGIX 0x00000001 +#define GLX_COLOR_INDEX_BIT_SGIX 0x00000002 +#define GLX_DRAWABLE_TYPE_SGIX 0x8010 +#define GLX_RENDER_TYPE_SGIX 0x8011 +#define GLX_X_RENDERABLE_SGIX 0x8012 +#define GLX_FBCONFIG_ID_SGIX 0x8013 +#define GLX_RGBA_TYPE_SGIX 0x8014 +#define GLX_COLOR_INDEX_TYPE_SGIX 0x8015 +/* reuse GLX_SCREEN_EXT */ +#endif + +#ifndef GLX_SGIX_pbuffer +#define GLX_PBUFFER_BIT_SGIX 0x00000004 +#define GLX_BUFFER_CLOBBER_MASK_SGIX 0x08000000 +#define GLX_FRONT_LEFT_BUFFER_BIT_SGIX 0x00000001 +#define GLX_FRONT_RIGHT_BUFFER_BIT_SGIX 0x00000002 +#define GLX_BACK_LEFT_BUFFER_BIT_SGIX 0x00000004 +#define GLX_BACK_RIGHT_BUFFER_BIT_SGIX 0x00000008 +#define GLX_AUX_BUFFERS_BIT_SGIX 0x00000010 +#define GLX_DEPTH_BUFFER_BIT_SGIX 0x00000020 +#define GLX_STENCIL_BUFFER_BIT_SGIX 0x00000040 +#define GLX_ACCUM_BUFFER_BIT_SGIX 0x00000080 +#define GLX_SAMPLE_BUFFERS_BIT_SGIX 0x00000100 +#define GLX_MAX_PBUFFER_WIDTH_SGIX 0x8016 +#define GLX_MAX_PBUFFER_HEIGHT_SGIX 0x8017 +#define GLX_MAX_PBUFFER_PIXELS_SGIX 0x8018 +#define GLX_OPTIMAL_PBUFFER_WIDTH_SGIX 0x8019 +#define GLX_OPTIMAL_PBUFFER_HEIGHT_SGIX 0x801A +#define GLX_PRESERVED_CONTENTS_SGIX 0x801B +#define GLX_LARGEST_PBUFFER_SGIX 0x801C +#define GLX_WIDTH_SGIX 0x801D +#define GLX_HEIGHT_SGIX 0x801E +#define GLX_EVENT_MASK_SGIX 0x801F +#define GLX_DAMAGED_SGIX 0x8020 +#define GLX_SAVED_SGIX 0x8021 +#define GLX_WINDOW_SGIX 0x8022 +#define GLX_PBUFFER_SGIX 0x8023 +#endif + +#ifndef GLX_SGI_cushion +#endif + +#ifndef GLX_SGIX_video_resize +#define GLX_SYNC_FRAME_SGIX 0x00000000 +#define GLX_SYNC_SWAP_SGIX 0x00000001 +#endif + +#ifndef GLX_SGIX_dmbuffer +#define GLX_DIGITAL_MEDIA_PBUFFER_SGIX 0x8024 +#endif + +#ifndef GLX_SGIX_swap_group +#endif + +#ifndef GLX_SGIX_swap_barrier +#endif + +#ifndef GLX_SGIS_blended_overlay +#define GLX_BLENDED_RGBA_SGIS 0x8025 +#endif + +#ifndef GLX_SGIS_shared_multisample +#define GLX_MULTISAMPLE_SUB_RECT_WIDTH_SGIS 0x8026 +#define GLX_MULTISAMPLE_SUB_RECT_HEIGHT_SGIS 0x8027 +#endif + +#ifndef GLX_SUN_get_transparent_index +#endif + +#ifndef GLX_3DFX_multisample +#define GLX_SAMPLE_BUFFERS_3DFX 0x8050 +#define GLX_SAMPLES_3DFX 0x8051 +#endif + +#ifndef GLX_MESA_copy_sub_buffer +#endif + +#ifndef GLX_MESA_pixmap_colormap +#endif + +#ifndef GLX_MESA_release_buffers +#endif + +#ifndef GLX_MESA_set_3dfx_mode +#define GLX_3DFX_WINDOW_MODE_MESA 0x1 +#define GLX_3DFX_FULLSCREEN_MODE_MESA 0x2 +#endif + +#ifndef GLX_SGIX_visual_select_group +#define GLX_VISUAL_SELECT_GROUP_SGIX 0x8028 +#endif + +#ifndef GLX_OML_swap_method +#define GLX_SWAP_METHOD_OML 0x8060 +#define GLX_SWAP_EXCHANGE_OML 0x8061 +#define GLX_SWAP_COPY_OML 0x8062 +#define GLX_SWAP_UNDEFINED_OML 0x8063 +#endif + +#ifndef GLX_OML_sync_control +#endif + +#ifndef GLX_NV_float_buffer +#define GLX_FLOAT_COMPONENTS_NV 0x20B0 +#endif + +#ifndef GLX_SGIX_hyperpipe +#define GLX_HYPERPIPE_PIPE_NAME_LENGTH_SGIX 80 +#define GLX_BAD_HYPERPIPE_CONFIG_SGIX 91 +#define GLX_BAD_HYPERPIPE_SGIX 92 +#define GLX_HYPERPIPE_DISPLAY_PIPE_SGIX 0x00000001 +#define GLX_HYPERPIPE_RENDER_PIPE_SGIX 0x00000002 +#define GLX_PIPE_RECT_SGIX 0x00000001 +#define GLX_PIPE_RECT_LIMITS_SGIX 0x00000002 +#define GLX_HYPERPIPE_STEREO_SGIX 0x00000003 +#define GLX_HYPERPIPE_PIXEL_AVERAGE_SGIX 0x00000004 +#define GLX_HYPERPIPE_ID_SGIX 0x8030 +#endif + +#ifndef GLX_MESA_agp_offset +#endif + +#ifndef GLX_EXT_fbconfig_packed_float +#define GLX_RGBA_UNSIGNED_FLOAT_TYPE_EXT 0x20B1 +#define GLX_RGBA_UNSIGNED_FLOAT_BIT_EXT 0x00000008 +#endif + +#ifndef GLX_EXT_framebuffer_sRGB +#define GLX_FRAMEBUFFER_SRGB_CAPABLE_EXT 0x20B2 +#endif + +#ifndef GLX_EXT_texture_from_pixmap +#define GLX_TEXTURE_1D_BIT_EXT 0x00000001 +#define GLX_TEXTURE_2D_BIT_EXT 0x00000002 +#define GLX_TEXTURE_RECTANGLE_BIT_EXT 0x00000004 +#define GLX_BIND_TO_TEXTURE_RGB_EXT 0x20D0 +#define GLX_BIND_TO_TEXTURE_RGBA_EXT 0x20D1 +#define GLX_BIND_TO_MIPMAP_TEXTURE_EXT 0x20D2 +#define GLX_BIND_TO_TEXTURE_TARGETS_EXT 0x20D3 +#define GLX_Y_INVERTED_EXT 0x20D4 +#define GLX_TEXTURE_FORMAT_EXT 0x20D5 +#define GLX_TEXTURE_TARGET_EXT 0x20D6 +#define GLX_MIPMAP_TEXTURE_EXT 0x20D7 +#define GLX_TEXTURE_FORMAT_NONE_EXT 0x20D8 +#define GLX_TEXTURE_FORMAT_RGB_EXT 0x20D9 +#define GLX_TEXTURE_FORMAT_RGBA_EXT 0x20DA +#define GLX_TEXTURE_1D_EXT 0x20DB +#define GLX_TEXTURE_2D_EXT 0x20DC +#define GLX_TEXTURE_RECTANGLE_EXT 0x20DD +#define GLX_FRONT_LEFT_EXT 0x20DE +#define GLX_FRONT_RIGHT_EXT 0x20DF +#define GLX_BACK_LEFT_EXT 0x20E0 +#define GLX_BACK_RIGHT_EXT 0x20E1 +#define GLX_FRONT_EXT GLX_FRONT_LEFT_EXT +#define GLX_BACK_EXT GLX_BACK_LEFT_EXT +#define GLX_AUX0_EXT 0x20E2 +#define GLX_AUX1_EXT 0x20E3 +#define GLX_AUX2_EXT 0x20E4 +#define GLX_AUX3_EXT 0x20E5 +#define GLX_AUX4_EXT 0x20E6 +#define GLX_AUX5_EXT 0x20E7 +#define GLX_AUX6_EXT 0x20E8 +#define GLX_AUX7_EXT 0x20E9 +#define GLX_AUX8_EXT 0x20EA +#define GLX_AUX9_EXT 0x20EB +#endif + +#ifndef GLX_NV_present_video +#define GLX_NUM_VIDEO_SLOTS_NV 0x20F0 +#endif + +#ifndef GLX_NV_video_out +#define GLX_VIDEO_OUT_COLOR_NV 0x20C3 +#define GLX_VIDEO_OUT_ALPHA_NV 0x20C4 +#define GLX_VIDEO_OUT_DEPTH_NV 0x20C5 +#define GLX_VIDEO_OUT_COLOR_AND_ALPHA_NV 0x20C6 +#define GLX_VIDEO_OUT_COLOR_AND_DEPTH_NV 0x20C7 +#define GLX_VIDEO_OUT_FRAME_NV 0x20C8 +#define GLX_VIDEO_OUT_FIELD_1_NV 0x20C9 +#define GLX_VIDEO_OUT_FIELD_2_NV 0x20CA +#define GLX_VIDEO_OUT_STACKED_FIELDS_1_2_NV 0x20CB +#define GLX_VIDEO_OUT_STACKED_FIELDS_2_1_NV 0x20CC +#endif + +#ifndef GLX_NV_swap_group +#endif + +#ifndef GLX_NV_video_capture +#define GLX_DEVICE_ID_NV 0x20CD +#define GLX_UNIQUE_ID_NV 0x20CE +#define GLX_NUM_VIDEO_CAPTURE_SLOTS_NV 0x20CF +#endif + +#ifndef GLX_EXT_swap_control +#define GLX_SWAP_INTERVAL_EXT 0x20F1 +#define GLX_MAX_SWAP_INTERVAL_EXT 0x20F2 +#endif + +#ifndef GLX_NV_copy_image +#endif + +#ifndef GLX_INTEL_swap_event +#define GLX_BUFFER_SWAP_COMPLETE_INTEL_MASK 0x04000000 +#define GLX_EXCHANGE_COMPLETE_INTEL 0x8180 +#define GLX_COPY_COMPLETE_INTEL 0x8181 +#define GLX_FLIP_COMPLETE_INTEL 0x8182 +#endif + +#ifndef GLX_NV_multisample_coverage +#define GLX_COVERAGE_SAMPLES_NV 100001 +#define GLX_COLOR_SAMPLES_NV 0x20B3 +#endif + +#ifndef GLX_AMD_gpu_association +#define GLX_GPU_VENDOR_AMD 0x1F00 +#define GLX_GPU_RENDERER_STRING_AMD 0x1F01 +#define GLX_GPU_OPENGL_VERSION_STRING_AMD 0x1F02 +#define GLX_GPU_FASTEST_TARGET_GPUS_AMD 0x21A2 +#define GLX_GPU_RAM_AMD 0x21A3 +#define GLX_GPU_CLOCK_AMD 0x21A4 +#define GLX_GPU_NUM_PIPES_AMD 0x21A5 +#define GLX_GPU_NUM_SIMD_AMD 0x21A6 +#define GLX_GPU_NUM_RB_AMD 0x21A7 +#define GLX_GPU_NUM_SPI_AMD 0x21A8 +#endif + +#ifndef GLX_EXT_create_context_es2_profile +#define GLX_CONTEXT_ES2_PROFILE_BIT_EXT 0x00000004 +#endif + +#ifndef GLX_EXT_swap_control_tear +#define GLX_LATE_SWAPS_TEAR_EXT 0x20F3 +#endif + + +/*************************************************************/ + +#ifndef GLX_ARB_get_proc_address +typedef void (*__GLXextFuncPtr)(void); +#endif + +#ifndef GLX_SGIX_video_source +typedef XID GLXVideoSourceSGIX; +#endif + +#ifndef GLX_SGIX_fbconfig +typedef XID GLXFBConfigIDSGIX; +typedef struct __GLXFBConfigRec *GLXFBConfigSGIX; +#endif + +#ifndef GLX_SGIX_pbuffer +typedef XID GLXPbufferSGIX; +typedef struct { + int type; + unsigned long serial; /* # of last request processed by server */ + Bool send_event; /* true if this came for SendEvent request */ + Display *display; /* display the event was read from */ + GLXDrawable drawable; /* i.d. of Drawable */ + int event_type; /* GLX_DAMAGED_SGIX or GLX_SAVED_SGIX */ + int draw_type; /* GLX_WINDOW_SGIX or GLX_PBUFFER_SGIX */ + unsigned int mask; /* mask indicating which buffers are affected*/ + int x, y; + int width, height; + int count; /* if nonzero, at least this many more */ +} GLXBufferClobberEventSGIX; +#endif + +#ifndef GLX_NV_video_output +typedef unsigned int GLXVideoDeviceNV; +#endif + +#ifndef GLX_NV_video_capture +typedef XID GLXVideoCaptureDeviceNV; +#endif + +#ifndef GLEXT_64_TYPES_DEFINED +/* This code block is duplicated in glext.h, so must be protected */ +#define GLEXT_64_TYPES_DEFINED +/* Define int32_t, int64_t, and uint64_t types for UST/MSC */ +/* (as used in the GLX_OML_sync_control extension). */ +#if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L +#include <inttypes.h> +#elif defined(__sun__) || defined(__digital__) +#include <inttypes.h> +#if defined(__STDC__) +#if defined(__arch64__) || defined(_LP64) +typedef long int int64_t; +typedef unsigned long int uint64_t; +#else +typedef long long int int64_t; +typedef unsigned long long int uint64_t; +#endif /* __arch64__ */ +#endif /* __STDC__ */ +#elif defined( __VMS ) || defined(__sgi) +#include <inttypes.h> +#elif defined(__SCO__) || defined(__USLC__) +#include <stdint.h> +#elif defined(__UNIXOS2__) || defined(__SOL64__) +typedef long int int32_t; +typedef long long int int64_t; +typedef unsigned long long int uint64_t; +#elif defined(_WIN32) && defined(__GNUC__) +#include <stdint.h> +#elif defined(_WIN32) +typedef __int32 int32_t; +typedef __int64 int64_t; +typedef unsigned __int64 uint64_t; +#else +#include <inttypes.h> /* Fallback option */ +#endif +#endif + +#ifndef GLX_VERSION_1_3 +#define GLX_VERSION_1_3 1 +#ifdef GLX_GLXEXT_PROTOTYPES +extern GLXFBConfig * glXGetFBConfigs (Display *dpy, int screen, int *nelements); +extern GLXFBConfig * glXChooseFBConfig (Display *dpy, int screen, const int *attrib_list, int *nelements); +extern int glXGetFBConfigAttrib (Display *dpy, GLXFBConfig config, int attribute, int *value); +extern XVisualInfo * glXGetVisualFromFBConfig (Display *dpy, GLXFBConfig config); +extern GLXWindow glXCreateWindow (Display *dpy, GLXFBConfig config, Window win, const int *attrib_list); +extern void glXDestroyWindow (Display *dpy, GLXWindow win); +extern GLXPixmap glXCreatePixmap (Display *dpy, GLXFBConfig config, Pixmap pixmap, const int *attrib_list); +extern void glXDestroyPixmap (Display *dpy, GLXPixmap pixmap); +extern GLXPbuffer glXCreatePbuffer (Display *dpy, GLXFBConfig config, const int *attrib_list); +extern void glXDestroyPbuffer (Display *dpy, GLXPbuffer pbuf); +extern void glXQueryDrawable (Display *dpy, GLXDrawable draw, int attribute, unsigned int *value); +extern GLXContext glXCreateNewContext (Display *dpy, GLXFBConfig config, int render_type, GLXContext share_list, Bool direct); +extern Bool glXMakeContextCurrent (Display *dpy, GLXDrawable draw, GLXDrawable read, GLXContext ctx); +extern GLXDrawable glXGetCurrentReadDrawable (void); +extern Display * glXGetCurrentDisplay (void); +extern int glXQueryContext (Display *dpy, GLXContext ctx, int attribute, int *value); +extern void glXSelectEvent (Display *dpy, GLXDrawable draw, unsigned long event_mask); +extern void glXGetSelectedEvent (Display *dpy, GLXDrawable draw, unsigned long *event_mask); +#endif /* GLX_GLXEXT_PROTOTYPES */ +typedef GLXFBConfig * ( * PFNGLXGETFBCONFIGSPROC) (Display *dpy, int screen, int *nelements); +typedef GLXFBConfig * ( * PFNGLXCHOOSEFBCONFIGPROC) (Display *dpy, int screen, const int *attrib_list, int *nelements); +typedef int ( * PFNGLXGETFBCONFIGATTRIBPROC) (Display *dpy, GLXFBConfig config, int attribute, int *value); +typedef XVisualInfo * ( * PFNGLXGETVISUALFROMFBCONFIGPROC) (Display *dpy, GLXFBConfig config); +typedef GLXWindow ( * PFNGLXCREATEWINDOWPROC) (Display *dpy, GLXFBConfig config, Window win, const int *attrib_list); +typedef void ( * PFNGLXDESTROYWINDOWPROC) (Display *dpy, GLXWindow win); +typedef GLXPixmap ( * PFNGLXCREATEPIXMAPPROC) (Display *dpy, GLXFBConfig config, Pixmap pixmap, const int *attrib_list); +typedef void ( * PFNGLXDESTROYPIXMAPPROC) (Display *dpy, GLXPixmap pixmap); +typedef GLXPbuffer ( * PFNGLXCREATEPBUFFERPROC) (Display *dpy, GLXFBConfig config, const int *attrib_list); +typedef void ( * PFNGLXDESTROYPBUFFERPROC) (Display *dpy, GLXPbuffer pbuf); +typedef void ( * PFNGLXQUERYDRAWABLEPROC) (Display *dpy, GLXDrawable draw, int attribute, unsigned int *value); +typedef GLXContext ( * PFNGLXCREATENEWCONTEXTPROC) (Display *dpy, GLXFBConfig config, int render_type, GLXContext share_list, Bool direct); +typedef Bool ( * PFNGLXMAKECONTEXTCURRENTPROC) (Display *dpy, GLXDrawable draw, GLXDrawable read, GLXContext ctx); +typedef GLXDrawable ( * PFNGLXGETCURRENTREADDRAWABLEPROC) (void); +typedef Display * ( * PFNGLXGETCURRENTDISPLAYPROC) (void); +typedef int ( * PFNGLXQUERYCONTEXTPROC) (Display *dpy, GLXContext ctx, int attribute, int *value); +typedef void ( * PFNGLXSELECTEVENTPROC) (Display *dpy, GLXDrawable draw, unsigned long event_mask); +typedef void ( * PFNGLXGETSELECTEDEVENTPROC) (Display *dpy, GLXDrawable draw, unsigned long *event_mask); +#endif + +#ifndef GLX_VERSION_1_4 +#define GLX_VERSION_1_4 1 +#ifdef GLX_GLXEXT_PROTOTYPES +extern __GLXextFuncPtr glXGetProcAddress (const GLubyte *procName); +#endif /* GLX_GLXEXT_PROTOTYPES */ +typedef __GLXextFuncPtr ( * PFNGLXGETPROCADDRESSPROC) (const GLubyte *procName); +#endif + +#ifndef GLX_ARB_get_proc_address +#define GLX_ARB_get_proc_address 1 +#ifdef GLX_GLXEXT_PROTOTYPES +extern __GLXextFuncPtr glXGetProcAddressARB (const GLubyte *procName); +#endif /* GLX_GLXEXT_PROTOTYPES */ +typedef __GLXextFuncPtr ( * PFNGLXGETPROCADDRESSARBPROC) (const GLubyte *procName); +#endif + +#ifndef GLX_ARB_multisample +#define GLX_ARB_multisample 1 +#endif + +#ifndef GLX_ARB_fbconfig_float +#define GLX_ARB_fbconfig_float 1 +#endif + +#ifndef GLX_ARB_framebuffer_sRGB +#define GLX_ARB_framebuffer_sRGB 1 +#endif + +#ifndef GLX_ARB_create_context +#define GLX_ARB_create_context 1 +#ifdef GLX_GLXEXT_PROTOTYPES +extern GLXContext glXCreateContextAttribsARB (Display *dpy, GLXFBConfig config, GLXContext share_context, Bool direct, const int *attrib_list); +#endif /* GLX_GLXEXT_PROTOTYPES */ +typedef GLXContext ( * PFNGLXCREATECONTEXTATTRIBSARBPROC) (Display *dpy, GLXFBConfig config, GLXContext share_context, Bool direct, const int *attrib_list); +#endif + +#ifndef GLX_ARB_create_context_profile +#define GLX_ARB_create_context_profile 1 +#endif + +#ifndef GLX_ARB_create_context_robustness +#define GLX_ARB_create_context_robustness 1 +#endif + +#ifndef GLX_SGIS_multisample +#define GLX_SGIS_multisample 1 +#endif + +#ifndef GLX_EXT_visual_info +#define GLX_EXT_visual_info 1 +#endif + +#ifndef GLX_SGI_swap_control +#define GLX_SGI_swap_control 1 +#ifdef GLX_GLXEXT_PROTOTYPES +extern int glXSwapIntervalSGI (int interval); +#endif /* GLX_GLXEXT_PROTOTYPES */ +typedef int ( * PFNGLXSWAPINTERVALSGIPROC) (int interval); +#endif + +#ifndef GLX_SGI_video_sync +#define GLX_SGI_video_sync 1 +#ifdef GLX_GLXEXT_PROTOTYPES +extern int glXGetVideoSyncSGI (unsigned int *count); +extern int glXWaitVideoSyncSGI (int divisor, int remainder, unsigned int *count); +#endif /* GLX_GLXEXT_PROTOTYPES */ +typedef int ( * PFNGLXGETVIDEOSYNCSGIPROC) (unsigned int *count); +typedef int ( * PFNGLXWAITVIDEOSYNCSGIPROC) (int divisor, int remainder, unsigned int *count); +#endif + +#ifndef GLX_SGI_make_current_read +#define GLX_SGI_make_current_read 1 +#ifdef GLX_GLXEXT_PROTOTYPES +extern Bool glXMakeCurrentReadSGI (Display *dpy, GLXDrawable draw, GLXDrawable read, GLXContext ctx); +extern GLXDrawable glXGetCurrentReadDrawableSGI (void); +#endif /* GLX_GLXEXT_PROTOTYPES */ +typedef Bool ( * PFNGLXMAKECURRENTREADSGIPROC) (Display *dpy, GLXDrawable draw, GLXDrawable read, GLXContext ctx); +typedef GLXDrawable ( * PFNGLXGETCURRENTREADDRAWABLESGIPROC) (void); +#endif + +#ifndef GLX_SGIX_video_source +#define GLX_SGIX_video_source 1 +#ifdef _VL_H +#ifdef GLX_GLXEXT_PROTOTYPES +extern GLXVideoSourceSGIX glXCreateGLXVideoSourceSGIX (Display *display, int screen, VLServer server, VLPath path, int nodeClass, VLNode drainNode); +extern void glXDestroyGLXVideoSourceSGIX (Display *dpy, GLXVideoSourceSGIX glxvideosource); +#endif /* GLX_GLXEXT_PROTOTYPES */ +typedef GLXVideoSourceSGIX ( * PFNGLXCREATEGLXVIDEOSOURCESGIXPROC) (Display *display, int screen, VLServer server, VLPath path, int nodeClass, VLNode drainNode); +typedef void ( * PFNGLXDESTROYGLXVIDEOSOURCESGIXPROC) (Display *dpy, GLXVideoSourceSGIX glxvideosource); +#endif /* _VL_H */ +#endif + +#ifndef GLX_EXT_visual_rating +#define GLX_EXT_visual_rating 1 +#endif + +#ifndef GLX_EXT_import_context +#define GLX_EXT_import_context 1 +#ifdef GLX_GLXEXT_PROTOTYPES +extern Display * glXGetCurrentDisplayEXT (void); +extern int glXQueryContextInfoEXT (Display *dpy, GLXContext context, int attribute, int *value); +extern GLXContextID glXGetContextIDEXT (const GLXContext context); +extern GLXContext glXImportContextEXT (Display *dpy, GLXContextID contextID); +extern void glXFreeContextEXT (Display *dpy, GLXContext context); +#endif /* GLX_GLXEXT_PROTOTYPES */ +typedef Display * ( * PFNGLXGETCURRENTDISPLAYEXTPROC) (void); +typedef int ( * PFNGLXQUERYCONTEXTINFOEXTPROC) (Display *dpy, GLXContext context, int attribute, int *value); +typedef GLXContextID ( * PFNGLXGETCONTEXTIDEXTPROC) (const GLXContext context); +typedef GLXContext ( * PFNGLXIMPORTCONTEXTEXTPROC) (Display *dpy, GLXContextID contextID); +typedef void ( * PFNGLXFREECONTEXTEXTPROC) (Display *dpy, GLXContext context); +#endif + +#ifndef GLX_SGIX_fbconfig +#define GLX_SGIX_fbconfig 1 +#ifdef GLX_GLXEXT_PROTOTYPES +extern int glXGetFBConfigAttribSGIX (Display *dpy, GLXFBConfigSGIX config, int attribute, int *value); +extern GLXFBConfigSGIX * glXChooseFBConfigSGIX (Display *dpy, int screen, int *attrib_list, int *nelements); +extern GLXPixmap glXCreateGLXPixmapWithConfigSGIX (Display *dpy, GLXFBConfigSGIX config, Pixmap pixmap); +extern GLXContext glXCreateContextWithConfigSGIX (Display *dpy, GLXFBConfigSGIX config, int render_type, GLXContext share_list, Bool direct); +extern XVisualInfo * glXGetVisualFromFBConfigSGIX (Display *dpy, GLXFBConfigSGIX config); +extern GLXFBConfigSGIX glXGetFBConfigFromVisualSGIX (Display *dpy, XVisualInfo *vis); +#endif /* GLX_GLXEXT_PROTOTYPES */ +typedef int ( * PFNGLXGETFBCONFIGATTRIBSGIXPROC) (Display *dpy, GLXFBConfigSGIX config, int attribute, int *value); +typedef GLXFBConfigSGIX * ( * PFNGLXCHOOSEFBCONFIGSGIXPROC) (Display *dpy, int screen, int *attrib_list, int *nelements); +typedef GLXPixmap ( * PFNGLXCREATEGLXPIXMAPWITHCONFIGSGIXPROC) (Display *dpy, GLXFBConfigSGIX config, Pixmap pixmap); +typedef GLXContext ( * PFNGLXCREATECONTEXTWITHCONFIGSGIXPROC) (Display *dpy, GLXFBConfigSGIX config, int render_type, GLXContext share_list, Bool direct); +typedef XVisualInfo * ( * PFNGLXGETVISUALFROMFBCONFIGSGIXPROC) (Display *dpy, GLXFBConfigSGIX config); +typedef GLXFBConfigSGIX ( * PFNGLXGETFBCONFIGFROMVISUALSGIXPROC) (Display *dpy, XVisualInfo *vis); +#endif + +#ifndef GLX_SGIX_pbuffer +#define GLX_SGIX_pbuffer 1 +#ifdef GLX_GLXEXT_PROTOTYPES +extern GLXPbufferSGIX glXCreateGLXPbufferSGIX (Display *dpy, GLXFBConfigSGIX config, unsigned int width, unsigned int height, int *attrib_list); +extern void glXDestroyGLXPbufferSGIX (Display *dpy, GLXPbufferSGIX pbuf); +extern int glXQueryGLXPbufferSGIX (Display *dpy, GLXPbufferSGIX pbuf, int attribute, unsigned int *value); +extern void glXSelectEventSGIX (Display *dpy, GLXDrawable drawable, unsigned long mask); +extern void glXGetSelectedEventSGIX (Display *dpy, GLXDrawable drawable, unsigned long *mask); +#endif /* GLX_GLXEXT_PROTOTYPES */ +typedef GLXPbufferSGIX ( * PFNGLXCREATEGLXPBUFFERSGIXPROC) (Display *dpy, GLXFBConfigSGIX config, unsigned int width, unsigned int height, int *attrib_list); +typedef void ( * PFNGLXDESTROYGLXPBUFFERSGIXPROC) (Display *dpy, GLXPbufferSGIX pbuf); +typedef int ( * PFNGLXQUERYGLXPBUFFERSGIXPROC) (Display *dpy, GLXPbufferSGIX pbuf, int attribute, unsigned int *value); +typedef void ( * PFNGLXSELECTEVENTSGIXPROC) (Display *dpy, GLXDrawable drawable, unsigned long mask); +typedef void ( * PFNGLXGETSELECTEDEVENTSGIXPROC) (Display *dpy, GLXDrawable drawable, unsigned long *mask); +#endif + +#ifndef GLX_SGI_cushion +#define GLX_SGI_cushion 1 +#ifdef GLX_GLXEXT_PROTOTYPES +extern void glXCushionSGI (Display *dpy, Window window, float cushion); +#endif /* GLX_GLXEXT_PROTOTYPES */ +typedef void ( * PFNGLXCUSHIONSGIPROC) (Display *dpy, Window window, float cushion); +#endif + +#ifndef GLX_SGIX_video_resize +#define GLX_SGIX_video_resize 1 +#ifdef GLX_GLXEXT_PROTOTYPES +extern int glXBindChannelToWindowSGIX (Display *display, int screen, int channel, Window window); +extern int glXChannelRectSGIX (Display *display, int screen, int channel, int x, int y, int w, int h); +extern int glXQueryChannelRectSGIX (Display *display, int screen, int channel, int *dx, int *dy, int *dw, int *dh); +extern int glXQueryChannelDeltasSGIX (Display *display, int screen, int channel, int *x, int *y, int *w, int *h); +extern int glXChannelRectSyncSGIX (Display *display, int screen, int channel, GLenum synctype); +#endif /* GLX_GLXEXT_PROTOTYPES */ +typedef int ( * PFNGLXBINDCHANNELTOWINDOWSGIXPROC) (Display *display, int screen, int channel, Window window); +typedef int ( * PFNGLXCHANNELRECTSGIXPROC) (Display *display, int screen, int channel, int x, int y, int w, int h); +typedef int ( * PFNGLXQUERYCHANNELRECTSGIXPROC) (Display *display, int screen, int channel, int *dx, int *dy, int *dw, int *dh); +typedef int ( * PFNGLXQUERYCHANNELDELTASSGIXPROC) (Display *display, int screen, int channel, int *x, int *y, int *w, int *h); +typedef int ( * PFNGLXCHANNELRECTSYNCSGIXPROC) (Display *display, int screen, int channel, GLenum synctype); +#endif + +#ifndef GLX_SGIX_dmbuffer +#define GLX_SGIX_dmbuffer 1 +#ifdef _DM_BUFFER_H_ +#ifdef GLX_GLXEXT_PROTOTYPES +extern Bool glXAssociateDMPbufferSGIX (Display *dpy, GLXPbufferSGIX pbuffer, DMparams *params, DMbuffer dmbuffer); +#endif /* GLX_GLXEXT_PROTOTYPES */ +typedef Bool ( * PFNGLXASSOCIATEDMPBUFFERSGIXPROC) (Display *dpy, GLXPbufferSGIX pbuffer, DMparams *params, DMbuffer dmbuffer); +#endif /* _DM_BUFFER_H_ */ +#endif + +#ifndef GLX_SGIX_swap_group +#define GLX_SGIX_swap_group 1 +#ifdef GLX_GLXEXT_PROTOTYPES +extern void glXJoinSwapGroupSGIX (Display *dpy, GLXDrawable drawable, GLXDrawable member); +#endif /* GLX_GLXEXT_PROTOTYPES */ +typedef void ( * PFNGLXJOINSWAPGROUPSGIXPROC) (Display *dpy, GLXDrawable drawable, GLXDrawable member); +#endif + +#ifndef GLX_SGIX_swap_barrier +#define GLX_SGIX_swap_barrier 1 +#ifdef GLX_GLXEXT_PROTOTYPES +extern void glXBindSwapBarrierSGIX (Display *dpy, GLXDrawable drawable, int barrier); +extern Bool glXQueryMaxSwapBarriersSGIX (Display *dpy, int screen, int *max); +#endif /* GLX_GLXEXT_PROTOTYPES */ +typedef void ( * PFNGLXBINDSWAPBARRIERSGIXPROC) (Display *dpy, GLXDrawable drawable, int barrier); +typedef Bool ( * PFNGLXQUERYMAXSWAPBARRIERSSGIXPROC) (Display *dpy, int screen, int *max); +#endif + +#ifndef GLX_SUN_get_transparent_index +#define GLX_SUN_get_transparent_index 1 +#ifdef GLX_GLXEXT_PROTOTYPES +extern Status glXGetTransparentIndexSUN (Display *dpy, Window overlay, Window underlay, long *pTransparentIndex); +#endif /* GLX_GLXEXT_PROTOTYPES */ +typedef Status ( * PFNGLXGETTRANSPARENTINDEXSUNPROC) (Display *dpy, Window overlay, Window underlay, long *pTransparentIndex); +#endif + +#ifndef GLX_MESA_copy_sub_buffer +#define GLX_MESA_copy_sub_buffer 1 +#ifdef GLX_GLXEXT_PROTOTYPES +extern void glXCopySubBufferMESA (Display *dpy, GLXDrawable drawable, int x, int y, int width, int height); +#endif /* GLX_GLXEXT_PROTOTYPES */ +typedef void ( * PFNGLXCOPYSUBBUFFERMESAPROC) (Display *dpy, GLXDrawable drawable, int x, int y, int width, int height); +#endif + +#ifndef GLX_MESA_pixmap_colormap +#define GLX_MESA_pixmap_colormap 1 +#ifdef GLX_GLXEXT_PROTOTYPES +extern GLXPixmap glXCreateGLXPixmapMESA (Display *dpy, XVisualInfo *visual, Pixmap pixmap, Colormap cmap); +#endif /* GLX_GLXEXT_PROTOTYPES */ +typedef GLXPixmap ( * PFNGLXCREATEGLXPIXMAPMESAPROC) (Display *dpy, XVisualInfo *visual, Pixmap pixmap, Colormap cmap); +#endif + +#ifndef GLX_MESA_release_buffers +#define GLX_MESA_release_buffers 1 +#ifdef GLX_GLXEXT_PROTOTYPES +extern Bool glXReleaseBuffersMESA (Display *dpy, GLXDrawable drawable); +#endif /* GLX_GLXEXT_PROTOTYPES */ +typedef Bool ( * PFNGLXRELEASEBUFFERSMESAPROC) (Display *dpy, GLXDrawable drawable); +#endif + +#ifndef GLX_MESA_set_3dfx_mode +#define GLX_MESA_set_3dfx_mode 1 +#ifdef GLX_GLXEXT_PROTOTYPES +extern Bool glXSet3DfxModeMESA (int mode); +#endif /* GLX_GLXEXT_PROTOTYPES */ +typedef Bool ( * PFNGLXSET3DFXMODEMESAPROC) (int mode); +#endif + +#ifndef GLX_SGIX_visual_select_group +#define GLX_SGIX_visual_select_group 1 +#endif + +#ifndef GLX_OML_swap_method +#define GLX_OML_swap_method 1 +#endif + +#ifndef GLX_OML_sync_control +#define GLX_OML_sync_control 1 +#ifdef GLX_GLXEXT_PROTOTYPES +extern Bool glXGetSyncValuesOML (Display *dpy, GLXDrawable drawable, int64_t *ust, int64_t *msc, int64_t *sbc); +extern Bool glXGetMscRateOML (Display *dpy, GLXDrawable drawable, int32_t *numerator, int32_t *denominator); +extern int64_t glXSwapBuffersMscOML (Display *dpy, GLXDrawable drawable, int64_t target_msc, int64_t divisor, int64_t remainder); +extern Bool glXWaitForMscOML (Display *dpy, GLXDrawable drawable, int64_t target_msc, int64_t divisor, int64_t remainder, int64_t *ust, int64_t *msc, int64_t *sbc); +extern Bool glXWaitForSbcOML (Display *dpy, GLXDrawable drawable, int64_t target_sbc, int64_t *ust, int64_t *msc, int64_t *sbc); +#endif /* GLX_GLXEXT_PROTOTYPES */ +typedef Bool ( * PFNGLXGETSYNCVALUESOMLPROC) (Display *dpy, GLXDrawable drawable, int64_t *ust, int64_t *msc, int64_t *sbc); +typedef Bool ( * PFNGLXGETMSCRATEOMLPROC) (Display *dpy, GLXDrawable drawable, int32_t *numerator, int32_t *denominator); +typedef int64_t ( * PFNGLXSWAPBUFFERSMSCOMLPROC) (Display *dpy, GLXDrawable drawable, int64_t target_msc, int64_t divisor, int64_t remainder); +typedef Bool ( * PFNGLXWAITFORMSCOMLPROC) (Display *dpy, GLXDrawable drawable, int64_t target_msc, int64_t divisor, int64_t remainder, int64_t *ust, int64_t *msc, int64_t *sbc); +typedef Bool ( * PFNGLXWAITFORSBCOMLPROC) (Display *dpy, GLXDrawable drawable, int64_t target_sbc, int64_t *ust, int64_t *msc, int64_t *sbc); +#endif + +#ifndef GLX_NV_float_buffer +#define GLX_NV_float_buffer 1 +#endif + +#ifndef GLX_SGIX_hyperpipe +#define GLX_SGIX_hyperpipe 1 + +typedef struct { + char pipeName[GLX_HYPERPIPE_PIPE_NAME_LENGTH_SGIX]; + int networkId; +} GLXHyperpipeNetworkSGIX; + +typedef struct { + char pipeName[GLX_HYPERPIPE_PIPE_NAME_LENGTH_SGIX]; + int channel; + unsigned int + participationType; + int timeSlice; +} GLXHyperpipeConfigSGIX; + +typedef struct { + char pipeName[GLX_HYPERPIPE_PIPE_NAME_LENGTH_SGIX]; + int srcXOrigin, srcYOrigin, srcWidth, srcHeight; + int destXOrigin, destYOrigin, destWidth, destHeight; +} GLXPipeRect; + +typedef struct { + char pipeName[GLX_HYPERPIPE_PIPE_NAME_LENGTH_SGIX]; + int XOrigin, YOrigin, maxHeight, maxWidth; +} GLXPipeRectLimits; + +#ifdef GLX_GLXEXT_PROTOTYPES +extern GLXHyperpipeNetworkSGIX * glXQueryHyperpipeNetworkSGIX (Display *dpy, int *npipes); +extern int glXHyperpipeConfigSGIX (Display *dpy, int networkId, int npipes, GLXHyperpipeConfigSGIX *cfg, int *hpId); +extern GLXHyperpipeConfigSGIX * glXQueryHyperpipeConfigSGIX (Display *dpy, int hpId, int *npipes); +extern int glXDestroyHyperpipeConfigSGIX (Display *dpy, int hpId); +extern int glXBindHyperpipeSGIX (Display *dpy, int hpId); +extern int glXQueryHyperpipeBestAttribSGIX (Display *dpy, int timeSlice, int attrib, int size, void *attribList, void *returnAttribList); +extern int glXHyperpipeAttribSGIX (Display *dpy, int timeSlice, int attrib, int size, void *attribList); +extern int glXQueryHyperpipeAttribSGIX (Display *dpy, int timeSlice, int attrib, int size, void *returnAttribList); +#endif /* GLX_GLXEXT_PROTOTYPES */ +typedef GLXHyperpipeNetworkSGIX * ( * PFNGLXQUERYHYPERPIPENETWORKSGIXPROC) (Display *dpy, int *npipes); +typedef int ( * PFNGLXHYPERPIPECONFIGSGIXPROC) (Display *dpy, int networkId, int npipes, GLXHyperpipeConfigSGIX *cfg, int *hpId); +typedef GLXHyperpipeConfigSGIX * ( * PFNGLXQUERYHYPERPIPECONFIGSGIXPROC) (Display *dpy, int hpId, int *npipes); +typedef int ( * PFNGLXDESTROYHYPERPIPECONFIGSGIXPROC) (Display *dpy, int hpId); +typedef int ( * PFNGLXBINDHYPERPIPESGIXPROC) (Display *dpy, int hpId); +typedef int ( * PFNGLXQUERYHYPERPIPEBESTATTRIBSGIXPROC) (Display *dpy, int timeSlice, int attrib, int size, void *attribList, void *returnAttribList); +typedef int ( * PFNGLXHYPERPIPEATTRIBSGIXPROC) (Display *dpy, int timeSlice, int attrib, int size, void *attribList); +typedef int ( * PFNGLXQUERYHYPERPIPEATTRIBSGIXPROC) (Display *dpy, int timeSlice, int attrib, int size, void *returnAttribList); +#endif + +#ifndef GLX_MESA_agp_offset +#define GLX_MESA_agp_offset 1 +#ifdef GLX_GLXEXT_PROTOTYPES +extern unsigned int glXGetAGPOffsetMESA (const void *pointer); +#endif /* GLX_GLXEXT_PROTOTYPES */ +typedef unsigned int ( * PFNGLXGETAGPOFFSETMESAPROC) (const void *pointer); +#endif + +#ifndef GLX_EXT_fbconfig_packed_float +#define GLX_EXT_fbconfig_packed_float 1 +#endif + +#ifndef GLX_EXT_framebuffer_sRGB +#define GLX_EXT_framebuffer_sRGB 1 +#endif + +#ifndef GLX_EXT_texture_from_pixmap +#define GLX_EXT_texture_from_pixmap 1 +#ifdef GLX_GLXEXT_PROTOTYPES +extern void glXBindTexImageEXT (Display *dpy, GLXDrawable drawable, int buffer, const int *attrib_list); +extern void glXReleaseTexImageEXT (Display *dpy, GLXDrawable drawable, int buffer); +#endif /* GLX_GLXEXT_PROTOTYPES */ +typedef void ( * PFNGLXBINDTEXIMAGEEXTPROC) (Display *dpy, GLXDrawable drawable, int buffer, const int *attrib_list); +typedef void ( * PFNGLXRELEASETEXIMAGEEXTPROC) (Display *dpy, GLXDrawable drawable, int buffer); +#endif + +#ifndef GLX_NV_present_video +#define GLX_NV_present_video 1 +#ifdef GLX_GLXEXT_PROTOTYPES +extern unsigned int * glXEnumerateVideoDevicesNV (Display *dpy, int screen, int *nelements); +extern int glXBindVideoDeviceNV (Display *dpy, unsigned int video_slot, unsigned int video_device, const int *attrib_list); +#endif /* GLX_GLXEXT_PROTOTYPES */ +typedef unsigned int * ( * PFNGLXENUMERATEVIDEODEVICESNVPROC) (Display *dpy, int screen, int *nelements); +typedef int ( * PFNGLXBINDVIDEODEVICENVPROC) (Display *dpy, unsigned int video_slot, unsigned int video_device, const int *attrib_list); +#endif + +#ifndef GLX_NV_video_output +#define GLX_NV_video_output 1 +#ifdef GLX_GLXEXT_PROTOTYPES +extern int glXGetVideoDeviceNV (Display *dpy, int screen, int numVideoDevices, GLXVideoDeviceNV *pVideoDevice); +extern int glXReleaseVideoDeviceNV (Display *dpy, int screen, GLXVideoDeviceNV VideoDevice); +extern int glXBindVideoImageNV (Display *dpy, GLXVideoDeviceNV VideoDevice, GLXPbuffer pbuf, int iVideoBuffer); +extern int glXReleaseVideoImageNV (Display *dpy, GLXPbuffer pbuf); +extern int glXSendPbufferToVideoNV (Display *dpy, GLXPbuffer pbuf, int iBufferType, unsigned long *pulCounterPbuffer, GLboolean bBlock); +extern int glXGetVideoInfoNV (Display *dpy, int screen, GLXVideoDeviceNV VideoDevice, unsigned long *pulCounterOutputPbuffer, unsigned long *pulCounterOutputVideo); +#endif /* GLX_GLXEXT_PROTOTYPES */ +typedef int ( * PFNGLXGETVIDEODEVICENVPROC) (Display *dpy, int screen, int numVideoDevices, GLXVideoDeviceNV *pVideoDevice); +typedef int ( * PFNGLXRELEASEVIDEODEVICENVPROC) (Display *dpy, int screen, GLXVideoDeviceNV VideoDevice); +typedef int ( * PFNGLXBINDVIDEOIMAGENVPROC) (Display *dpy, GLXVideoDeviceNV VideoDevice, GLXPbuffer pbuf, int iVideoBuffer); +typedef int ( * PFNGLXRELEASEVIDEOIMAGENVPROC) (Display *dpy, GLXPbuffer pbuf); +typedef int ( * PFNGLXSENDPBUFFERTOVIDEONVPROC) (Display *dpy, GLXPbuffer pbuf, int iBufferType, unsigned long *pulCounterPbuffer, GLboolean bBlock); +typedef int ( * PFNGLXGETVIDEOINFONVPROC) (Display *dpy, int screen, GLXVideoDeviceNV VideoDevice, unsigned long *pulCounterOutputPbuffer, unsigned long *pulCounterOutputVideo); +#endif + +#ifndef GLX_NV_swap_group +#define GLX_NV_swap_group 1 +#ifdef GLX_GLXEXT_PROTOTYPES +extern Bool glXJoinSwapGroupNV (Display *dpy, GLXDrawable drawable, GLuint group); +extern Bool glXBindSwapBarrierNV (Display *dpy, GLuint group, GLuint barrier); +extern Bool glXQuerySwapGroupNV (Display *dpy, GLXDrawable drawable, GLuint *group, GLuint *barrier); +extern Bool glXQueryMaxSwapGroupsNV (Display *dpy, int screen, GLuint *maxGroups, GLuint *maxBarriers); +extern Bool glXQueryFrameCountNV (Display *dpy, int screen, GLuint *count); +extern Bool glXResetFrameCountNV (Display *dpy, int screen); +#endif /* GLX_GLXEXT_PROTOTYPES */ +typedef Bool ( * PFNGLXJOINSWAPGROUPNVPROC) (Display *dpy, GLXDrawable drawable, GLuint group); +typedef Bool ( * PFNGLXBINDSWAPBARRIERNVPROC) (Display *dpy, GLuint group, GLuint barrier); +typedef Bool ( * PFNGLXQUERYSWAPGROUPNVPROC) (Display *dpy, GLXDrawable drawable, GLuint *group, GLuint *barrier); +typedef Bool ( * PFNGLXQUERYMAXSWAPGROUPSNVPROC) (Display *dpy, int screen, GLuint *maxGroups, GLuint *maxBarriers); +typedef Bool ( * PFNGLXQUERYFRAMECOUNTNVPROC) (Display *dpy, int screen, GLuint *count); +typedef Bool ( * PFNGLXRESETFRAMECOUNTNVPROC) (Display *dpy, int screen); +#endif + +#ifndef GLX_NV_video_capture +#define GLX_NV_video_capture 1 +#ifdef GLX_GLXEXT_PROTOTYPES +extern int glXBindVideoCaptureDeviceNV (Display *dpy, unsigned int video_capture_slot, GLXVideoCaptureDeviceNV device); +extern GLXVideoCaptureDeviceNV * glXEnumerateVideoCaptureDevicesNV (Display *dpy, int screen, int *nelements); +extern void glXLockVideoCaptureDeviceNV (Display *dpy, GLXVideoCaptureDeviceNV device); +extern int glXQueryVideoCaptureDeviceNV (Display *dpy, GLXVideoCaptureDeviceNV device, int attribute, int *value); +extern void glXReleaseVideoCaptureDeviceNV (Display *dpy, GLXVideoCaptureDeviceNV device); +#endif /* GLX_GLXEXT_PROTOTYPES */ +typedef int ( * PFNGLXBINDVIDEOCAPTUREDEVICENVPROC) (Display *dpy, unsigned int video_capture_slot, GLXVideoCaptureDeviceNV device); +typedef GLXVideoCaptureDeviceNV * ( * PFNGLXENUMERATEVIDEOCAPTUREDEVICESNVPROC) (Display *dpy, int screen, int *nelements); +typedef void ( * PFNGLXLOCKVIDEOCAPTUREDEVICENVPROC) (Display *dpy, GLXVideoCaptureDeviceNV device); +typedef int ( * PFNGLXQUERYVIDEOCAPTUREDEVICENVPROC) (Display *dpy, GLXVideoCaptureDeviceNV device, int attribute, int *value); +typedef void ( * PFNGLXRELEASEVIDEOCAPTUREDEVICENVPROC) (Display *dpy, GLXVideoCaptureDeviceNV device); +#endif + +#ifndef GLX_EXT_swap_control +#define GLX_EXT_swap_control 1 +#ifdef GLX_GLXEXT_PROTOTYPES +extern void glXSwapIntervalEXT (Display *dpy, GLXDrawable drawable, int interval); +#endif /* GLX_GLXEXT_PROTOTYPES */ +typedef void ( * PFNGLXSWAPINTERVALEXTPROC) (Display *dpy, GLXDrawable drawable, int interval); +#endif + +#ifndef GLX_NV_copy_image +#define GLX_NV_copy_image 1 +#ifdef GLX_GLXEXT_PROTOTYPES +extern void glXCopyImageSubDataNV (Display *dpy, GLXContext srcCtx, GLuint srcName, GLenum srcTarget, GLint srcLevel, GLint srcX, GLint srcY, GLint srcZ, GLXContext dstCtx, GLuint dstName, GLenum dstTarget, GLint dstLevel, GLint dstX, GLint dstY, GLint dstZ, GLsizei width, GLsizei height, GLsizei depth); +#endif /* GLX_GLXEXT_PROTOTYPES */ +typedef void ( * PFNGLXCOPYIMAGESUBDATANVPROC) (Display *dpy, GLXContext srcCtx, GLuint srcName, GLenum srcTarget, GLint srcLevel, GLint srcX, GLint srcY, GLint srcZ, GLXContext dstCtx, GLuint dstName, GLenum dstTarget, GLint dstLevel, GLint dstX, GLint dstY, GLint dstZ, GLsizei width, GLsizei height, GLsizei depth); +#endif + +#ifndef GLX_INTEL_swap_event +#define GLX_INTEL_swap_event 1 +#endif + +#ifndef GLX_NV_multisample_coverage +#define GLX_NV_multisample_coverage 1 +#endif + +#ifndef GLX_EXT_swap_control_tear +#define GLX_EXT_swap_control_tear 1 +#endif + + +#ifdef __cplusplus +} +#endif + +#endif
diff --git a/third_party/mesa_headers/GL/wglext.h b/third_party/mesa_headers/GL/wglext.h new file mode 100644 index 0000000..e60c6527d --- /dev/null +++ b/third_party/mesa_headers/GL/wglext.h
@@ -0,0 +1,901 @@ +#ifndef __wglext_h_ +#define __wglext_h_ + +#ifdef __cplusplus +extern "C" { +#endif + +/* +** Copyright (c) 2007-2010 The Khronos Group Inc. +** +** Permission is hereby granted, free of charge, to any person obtaining a +** copy of this software and/or associated documentation files (the +** "Materials"), to deal in the Materials without restriction, including +** without limitation the rights to use, copy, modify, merge, publish, +** distribute, sublicense, and/or sell copies of the Materials, and to +** permit persons to whom the Materials are furnished to do so, subject to +** the following conditions: +** +** The above copyright notice and this permission notice shall be included +** in all copies or substantial portions of the Materials. +** +** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS. +*/ + +/* Function declaration macros - to move into glplatform.h */ + +#if defined(_WIN32) && !defined(APIENTRY) && !defined(__CYGWIN__) && !defined(__SCITECH_SNAP__) +#define WIN32_LEAN_AND_MEAN 1 +#include <windows.h> +#endif + +#ifndef APIENTRY +#define APIENTRY +#endif +#ifndef APIENTRYP +#define APIENTRYP APIENTRY * +#endif +#ifndef GLAPI +#define GLAPI extern +#endif + +/*************************************************************/ + +/* Header file version number */ +/* wglext.h last updated 2010/08/06 */ +/* Current version at http://www.opengl.org/registry/ */ +#define WGL_WGLEXT_VERSION 22 + +#ifndef WGL_ARB_buffer_region +#define WGL_FRONT_COLOR_BUFFER_BIT_ARB 0x00000001 +#define WGL_BACK_COLOR_BUFFER_BIT_ARB 0x00000002 +#define WGL_DEPTH_BUFFER_BIT_ARB 0x00000004 +#define WGL_STENCIL_BUFFER_BIT_ARB 0x00000008 +#endif + +#ifndef WGL_ARB_multisample +#define WGL_SAMPLE_BUFFERS_ARB 0x2041 +#define WGL_SAMPLES_ARB 0x2042 +#endif + +#ifndef WGL_ARB_extensions_string +#endif + +#ifndef WGL_ARB_pixel_format +#define WGL_NUMBER_PIXEL_FORMATS_ARB 0x2000 +#define WGL_DRAW_TO_WINDOW_ARB 0x2001 +#define WGL_DRAW_TO_BITMAP_ARB 0x2002 +#define WGL_ACCELERATION_ARB 0x2003 +#define WGL_NEED_PALETTE_ARB 0x2004 +#define WGL_NEED_SYSTEM_PALETTE_ARB 0x2005 +#define WGL_SWAP_LAYER_BUFFERS_ARB 0x2006 +#define WGL_SWAP_METHOD_ARB 0x2007 +#define WGL_NUMBER_OVERLAYS_ARB 0x2008 +#define WGL_NUMBER_UNDERLAYS_ARB 0x2009 +#define WGL_TRANSPARENT_ARB 0x200A +#define WGL_TRANSPARENT_RED_VALUE_ARB 0x2037 +#define WGL_TRANSPARENT_GREEN_VALUE_ARB 0x2038 +#define WGL_TRANSPARENT_BLUE_VALUE_ARB 0x2039 +#define WGL_TRANSPARENT_ALPHA_VALUE_ARB 0x203A +#define WGL_TRANSPARENT_INDEX_VALUE_ARB 0x203B +#define WGL_SHARE_DEPTH_ARB 0x200C +#define WGL_SHARE_STENCIL_ARB 0x200D +#define WGL_SHARE_ACCUM_ARB 0x200E +#define WGL_SUPPORT_GDI_ARB 0x200F +#define WGL_SUPPORT_OPENGL_ARB 0x2010 +#define WGL_DOUBLE_BUFFER_ARB 0x2011 +#define WGL_STEREO_ARB 0x2012 +#define WGL_PIXEL_TYPE_ARB 0x2013 +#define WGL_COLOR_BITS_ARB 0x2014 +#define WGL_RED_BITS_ARB 0x2015 +#define WGL_RED_SHIFT_ARB 0x2016 +#define WGL_GREEN_BITS_ARB 0x2017 +#define WGL_GREEN_SHIFT_ARB 0x2018 +#define WGL_BLUE_BITS_ARB 0x2019 +#define WGL_BLUE_SHIFT_ARB 0x201A +#define WGL_ALPHA_BITS_ARB 0x201B +#define WGL_ALPHA_SHIFT_ARB 0x201C +#define WGL_ACCUM_BITS_ARB 0x201D +#define WGL_ACCUM_RED_BITS_ARB 0x201E +#define WGL_ACCUM_GREEN_BITS_ARB 0x201F +#define WGL_ACCUM_BLUE_BITS_ARB 0x2020 +#define WGL_ACCUM_ALPHA_BITS_ARB 0x2021 +#define WGL_DEPTH_BITS_ARB 0x2022 +#define WGL_STENCIL_BITS_ARB 0x2023 +#define WGL_AUX_BUFFERS_ARB 0x2024 +#define WGL_NO_ACCELERATION_ARB 0x2025 +#define WGL_GENERIC_ACCELERATION_ARB 0x2026 +#define WGL_FULL_ACCELERATION_ARB 0x2027 +#define WGL_SWAP_EXCHANGE_ARB 0x2028 +#define WGL_SWAP_COPY_ARB 0x2029 +#define WGL_SWAP_UNDEFINED_ARB 0x202A +#define WGL_TYPE_RGBA_ARB 0x202B +#define WGL_TYPE_COLORINDEX_ARB 0x202C +#endif + +#ifndef WGL_ARB_make_current_read +#define ERROR_INVALID_PIXEL_TYPE_ARB 0x2043 +#define ERROR_INCOMPATIBLE_DEVICE_CONTEXTS_ARB 0x2054 +#endif + +#ifndef WGL_ARB_pbuffer +#define WGL_DRAW_TO_PBUFFER_ARB 0x202D +#define WGL_MAX_PBUFFER_PIXELS_ARB 0x202E +#define WGL_MAX_PBUFFER_WIDTH_ARB 0x202F +#define WGL_MAX_PBUFFER_HEIGHT_ARB 0x2030 +#define WGL_PBUFFER_LARGEST_ARB 0x2033 +#define WGL_PBUFFER_WIDTH_ARB 0x2034 +#define WGL_PBUFFER_HEIGHT_ARB 0x2035 +#define WGL_PBUFFER_LOST_ARB 0x2036 +#endif + +#ifndef WGL_ARB_render_texture +#define WGL_BIND_TO_TEXTURE_RGB_ARB 0x2070 +#define WGL_BIND_TO_TEXTURE_RGBA_ARB 0x2071 +#define WGL_TEXTURE_FORMAT_ARB 0x2072 +#define WGL_TEXTURE_TARGET_ARB 0x2073 +#define WGL_MIPMAP_TEXTURE_ARB 0x2074 +#define WGL_TEXTURE_RGB_ARB 0x2075 +#define WGL_TEXTURE_RGBA_ARB 0x2076 +#define WGL_NO_TEXTURE_ARB 0x2077 +#define WGL_TEXTURE_CUBE_MAP_ARB 0x2078 +#define WGL_TEXTURE_1D_ARB 0x2079 +#define WGL_TEXTURE_2D_ARB 0x207A +#define WGL_MIPMAP_LEVEL_ARB 0x207B +#define WGL_CUBE_MAP_FACE_ARB 0x207C +#define WGL_TEXTURE_CUBE_MAP_POSITIVE_X_ARB 0x207D +#define WGL_TEXTURE_CUBE_MAP_NEGATIVE_X_ARB 0x207E +#define WGL_TEXTURE_CUBE_MAP_POSITIVE_Y_ARB 0x207F +#define WGL_TEXTURE_CUBE_MAP_NEGATIVE_Y_ARB 0x2080 +#define WGL_TEXTURE_CUBE_MAP_POSITIVE_Z_ARB 0x2081 +#define WGL_TEXTURE_CUBE_MAP_NEGATIVE_Z_ARB 0x2082 +#define WGL_FRONT_LEFT_ARB 0x2083 +#define WGL_FRONT_RIGHT_ARB 0x2084 +#define WGL_BACK_LEFT_ARB 0x2085 +#define WGL_BACK_RIGHT_ARB 0x2086 +#define WGL_AUX0_ARB 0x2087 +#define WGL_AUX1_ARB 0x2088 +#define WGL_AUX2_ARB 0x2089 +#define WGL_AUX3_ARB 0x208A +#define WGL_AUX4_ARB 0x208B +#define WGL_AUX5_ARB 0x208C +#define WGL_AUX6_ARB 0x208D +#define WGL_AUX7_ARB 0x208E +#define WGL_AUX8_ARB 0x208F +#define WGL_AUX9_ARB 0x2090 +#endif + +#ifndef WGL_ARB_pixel_format_float +#define WGL_TYPE_RGBA_FLOAT_ARB 0x21A0 +#endif + +#ifndef WGL_ARB_framebuffer_sRGB +#define WGL_FRAMEBUFFER_SRGB_CAPABLE_ARB 0x20A9 +#endif + +#ifndef WGL_ARB_create_context +#define WGL_CONTEXT_DEBUG_BIT_ARB 0x00000001 +#define WGL_CONTEXT_FORWARD_COMPATIBLE_BIT_ARB 0x00000002 +#define WGL_CONTEXT_MAJOR_VERSION_ARB 0x2091 +#define WGL_CONTEXT_MINOR_VERSION_ARB 0x2092 +#define WGL_CONTEXT_LAYER_PLANE_ARB 0x2093 +#define WGL_CONTEXT_FLAGS_ARB 0x2094 +#define ERROR_INVALID_VERSION_ARB 0x2095 +#endif + +#ifndef WGL_ARB_create_context_profile +#define WGL_CONTEXT_PROFILE_MASK_ARB 0x9126 +#define WGL_CONTEXT_CORE_PROFILE_BIT_ARB 0x00000001 +#define WGL_CONTEXT_COMPATIBILITY_PROFILE_BIT_ARB 0x00000002 +#define ERROR_INVALID_PROFILE_ARB 0x2096 +#endif + +#ifndef WGL_ARB_create_context_robustness +#define WGL_CONTEXT_ROBUST_ACCESS_BIT_ARB 0x00000004 +#define WGL_LOSE_CONTEXT_ON_RESET_ARB 0x8252 +#define WGL_CONTEXT_RESET_NOTIFICATION_STRATEGY_ARB 0x8256 +#define WGL_NO_RESET_NOTIFICATION_ARB 0x8261 +#endif + +#ifndef WGL_EXT_make_current_read +#define ERROR_INVALID_PIXEL_TYPE_EXT 0x2043 +#endif + +#ifndef WGL_EXT_pixel_format +#define WGL_NUMBER_PIXEL_FORMATS_EXT 0x2000 +#define WGL_DRAW_TO_WINDOW_EXT 0x2001 +#define WGL_DRAW_TO_BITMAP_EXT 0x2002 +#define WGL_ACCELERATION_EXT 0x2003 +#define WGL_NEED_PALETTE_EXT 0x2004 +#define WGL_NEED_SYSTEM_PALETTE_EXT 0x2005 +#define WGL_SWAP_LAYER_BUFFERS_EXT 0x2006 +#define WGL_SWAP_METHOD_EXT 0x2007 +#define WGL_NUMBER_OVERLAYS_EXT 0x2008 +#define WGL_NUMBER_UNDERLAYS_EXT 0x2009 +#define WGL_TRANSPARENT_EXT 0x200A +#define WGL_TRANSPARENT_VALUE_EXT 0x200B +#define WGL_SHARE_DEPTH_EXT 0x200C +#define WGL_SHARE_STENCIL_EXT 0x200D +#define WGL_SHARE_ACCUM_EXT 0x200E +#define WGL_SUPPORT_GDI_EXT 0x200F +#define WGL_SUPPORT_OPENGL_EXT 0x2010 +#define WGL_DOUBLE_BUFFER_EXT 0x2011 +#define WGL_STEREO_EXT 0x2012 +#define WGL_PIXEL_TYPE_EXT 0x2013 +#define WGL_COLOR_BITS_EXT 0x2014 +#define WGL_RED_BITS_EXT 0x2015 +#define WGL_RED_SHIFT_EXT 0x2016 +#define WGL_GREEN_BITS_EXT 0x2017 +#define WGL_GREEN_SHIFT_EXT 0x2018 +#define WGL_BLUE_BITS_EXT 0x2019 +#define WGL_BLUE_SHIFT_EXT 0x201A +#define WGL_ALPHA_BITS_EXT 0x201B +#define WGL_ALPHA_SHIFT_EXT 0x201C +#define WGL_ACCUM_BITS_EXT 0x201D +#define WGL_ACCUM_RED_BITS_EXT 0x201E +#define WGL_ACCUM_GREEN_BITS_EXT 0x201F +#define WGL_ACCUM_BLUE_BITS_EXT 0x2020 +#define WGL_ACCUM_ALPHA_BITS_EXT 0x2021 +#define WGL_DEPTH_BITS_EXT 0x2022 +#define WGL_STENCIL_BITS_EXT 0x2023 +#define WGL_AUX_BUFFERS_EXT 0x2024 +#define WGL_NO_ACCELERATION_EXT 0x2025 +#define WGL_GENERIC_ACCELERATION_EXT 0x2026 +#define WGL_FULL_ACCELERATION_EXT 0x2027 +#define WGL_SWAP_EXCHANGE_EXT 0x2028 +#define WGL_SWAP_COPY_EXT 0x2029 +#define WGL_SWAP_UNDEFINED_EXT 0x202A +#define WGL_TYPE_RGBA_EXT 0x202B +#define WGL_TYPE_COLORINDEX_EXT 0x202C +#endif + +#ifndef WGL_EXT_pbuffer +#define WGL_DRAW_TO_PBUFFER_EXT 0x202D +#define WGL_MAX_PBUFFER_PIXELS_EXT 0x202E +#define WGL_MAX_PBUFFER_WIDTH_EXT 0x202F +#define WGL_MAX_PBUFFER_HEIGHT_EXT 0x2030 +#define WGL_OPTIMAL_PBUFFER_WIDTH_EXT 0x2031 +#define WGL_OPTIMAL_PBUFFER_HEIGHT_EXT 0x2032 +#define WGL_PBUFFER_LARGEST_EXT 0x2033 +#define WGL_PBUFFER_WIDTH_EXT 0x2034 +#define WGL_PBUFFER_HEIGHT_EXT 0x2035 +#endif + +#ifndef WGL_EXT_depth_float +#define WGL_DEPTH_FLOAT_EXT 0x2040 +#endif + +#ifndef WGL_3DFX_multisample +#define WGL_SAMPLE_BUFFERS_3DFX 0x2060 +#define WGL_SAMPLES_3DFX 0x2061 +#endif + +#ifndef WGL_EXT_multisample +#define WGL_SAMPLE_BUFFERS_EXT 0x2041 +#define WGL_SAMPLES_EXT 0x2042 +#endif + +#ifndef WGL_I3D_digital_video_control +#define WGL_DIGITAL_VIDEO_CURSOR_ALPHA_FRAMEBUFFER_I3D 0x2050 +#define WGL_DIGITAL_VIDEO_CURSOR_ALPHA_VALUE_I3D 0x2051 +#define WGL_DIGITAL_VIDEO_CURSOR_INCLUDED_I3D 0x2052 +#define WGL_DIGITAL_VIDEO_GAMMA_CORRECTED_I3D 0x2053 +#endif + +#ifndef WGL_I3D_gamma +#define WGL_GAMMA_TABLE_SIZE_I3D 0x204E +#define WGL_GAMMA_EXCLUDE_DESKTOP_I3D 0x204F +#endif + +#ifndef WGL_I3D_genlock +#define WGL_GENLOCK_SOURCE_MULTIVIEW_I3D 0x2044 +#define WGL_GENLOCK_SOURCE_EXTENAL_SYNC_I3D 0x2045 +#define WGL_GENLOCK_SOURCE_EXTENAL_FIELD_I3D 0x2046 +#define WGL_GENLOCK_SOURCE_EXTENAL_TTL_I3D 0x2047 +#define WGL_GENLOCK_SOURCE_DIGITAL_SYNC_I3D 0x2048 +#define WGL_GENLOCK_SOURCE_DIGITAL_FIELD_I3D 0x2049 +#define WGL_GENLOCK_SOURCE_EDGE_FALLING_I3D 0x204A +#define WGL_GENLOCK_SOURCE_EDGE_RISING_I3D 0x204B +#define WGL_GENLOCK_SOURCE_EDGE_BOTH_I3D 0x204C +#endif + +#ifndef WGL_I3D_image_buffer +#define WGL_IMAGE_BUFFER_MIN_ACCESS_I3D 0x00000001 +#define WGL_IMAGE_BUFFER_LOCK_I3D 0x00000002 +#endif + +#ifndef WGL_I3D_swap_frame_lock +#endif + +#ifndef WGL_NV_render_depth_texture +#define WGL_BIND_TO_TEXTURE_DEPTH_NV 0x20A3 +#define WGL_BIND_TO_TEXTURE_RECTANGLE_DEPTH_NV 0x20A4 +#define WGL_DEPTH_TEXTURE_FORMAT_NV 0x20A5 +#define WGL_TEXTURE_DEPTH_COMPONENT_NV 0x20A6 +#define WGL_DEPTH_COMPONENT_NV 0x20A7 +#endif + +#ifndef WGL_NV_render_texture_rectangle +#define WGL_BIND_TO_TEXTURE_RECTANGLE_RGB_NV 0x20A0 +#define WGL_BIND_TO_TEXTURE_RECTANGLE_RGBA_NV 0x20A1 +#define WGL_TEXTURE_RECTANGLE_NV 0x20A2 +#endif + +#ifndef WGL_ATI_pixel_format_float +#define WGL_TYPE_RGBA_FLOAT_ATI 0x21A0 +#endif + +#ifndef WGL_NV_float_buffer +#define WGL_FLOAT_COMPONENTS_NV 0x20B0 +#define WGL_BIND_TO_TEXTURE_RECTANGLE_FLOAT_R_NV 0x20B1 +#define WGL_BIND_TO_TEXTURE_RECTANGLE_FLOAT_RG_NV 0x20B2 +#define WGL_BIND_TO_TEXTURE_RECTANGLE_FLOAT_RGB_NV 0x20B3 +#define WGL_BIND_TO_TEXTURE_RECTANGLE_FLOAT_RGBA_NV 0x20B4 +#define WGL_TEXTURE_FLOAT_R_NV 0x20B5 +#define WGL_TEXTURE_FLOAT_RG_NV 0x20B6 +#define WGL_TEXTURE_FLOAT_RGB_NV 0x20B7 +#define WGL_TEXTURE_FLOAT_RGBA_NV 0x20B8 +#endif + +#ifndef WGL_3DL_stereo_control +#define WGL_STEREO_EMITTER_ENABLE_3DL 0x2055 +#define WGL_STEREO_EMITTER_DISABLE_3DL 0x2056 +#define WGL_STEREO_POLARITY_NORMAL_3DL 0x2057 +#define WGL_STEREO_POLARITY_INVERT_3DL 0x2058 +#endif + +#ifndef WGL_EXT_pixel_format_packed_float +#define WGL_TYPE_RGBA_UNSIGNED_FLOAT_EXT 0x20A8 +#endif + +#ifndef WGL_EXT_framebuffer_sRGB +#define WGL_FRAMEBUFFER_SRGB_CAPABLE_EXT 0x20A9 +#endif + +#ifndef WGL_NV_present_video +#define WGL_NUM_VIDEO_SLOTS_NV 0x20F0 +#endif + +#ifndef WGL_NV_video_out +#define WGL_BIND_TO_VIDEO_RGB_NV 0x20C0 +#define WGL_BIND_TO_VIDEO_RGBA_NV 0x20C1 +#define WGL_BIND_TO_VIDEO_RGB_AND_DEPTH_NV 0x20C2 +#define WGL_VIDEO_OUT_COLOR_NV 0x20C3 +#define WGL_VIDEO_OUT_ALPHA_NV 0x20C4 +#define WGL_VIDEO_OUT_DEPTH_NV 0x20C5 +#define WGL_VIDEO_OUT_COLOR_AND_ALPHA_NV 0x20C6 +#define WGL_VIDEO_OUT_COLOR_AND_DEPTH_NV 0x20C7 +#define WGL_VIDEO_OUT_FRAME 0x20C8 +#define WGL_VIDEO_OUT_FIELD_1 0x20C9 +#define WGL_VIDEO_OUT_FIELD_2 0x20CA +#define WGL_VIDEO_OUT_STACKED_FIELDS_1_2 0x20CB +#define WGL_VIDEO_OUT_STACKED_FIELDS_2_1 0x20CC +#endif + +#ifndef WGL_NV_swap_group +#endif + +#ifndef WGL_NV_gpu_affinity +#define WGL_ERROR_INCOMPATIBLE_AFFINITY_MASKS_NV 0x20D0 +#define WGL_ERROR_MISSING_AFFINITY_MASK_NV 0x20D1 +#endif + +#ifndef WGL_AMD_gpu_association +#define WGL_GPU_VENDOR_AMD 0x1F00 +#define WGL_GPU_RENDERER_STRING_AMD 0x1F01 +#define WGL_GPU_OPENGL_VERSION_STRING_AMD 0x1F02 +#define WGL_GPU_FASTEST_TARGET_GPUS_AMD 0x21A2 +#define WGL_GPU_RAM_AMD 0x21A3 +#define WGL_GPU_CLOCK_AMD 0x21A4 +#define WGL_GPU_NUM_PIPES_AMD 0x21A5 +#define WGL_GPU_NUM_SIMD_AMD 0x21A6 +#define WGL_GPU_NUM_RB_AMD 0x21A7 +#define WGL_GPU_NUM_SPI_AMD 0x21A8 +#endif + +#ifndef WGL_NV_video_capture +#define WGL_UNIQUE_ID_NV 0x20CE +#define WGL_NUM_VIDEO_CAPTURE_SLOTS_NV 0x20CF +#endif + +#ifndef WGL_NV_copy_image +#endif + +#ifndef WGL_NV_multisample_coverage +#define WGL_COVERAGE_SAMPLES_NV 0x2042 +#define WGL_COLOR_SAMPLES_NV 0x20B9 +#endif + +#ifndef WGL_EXT_create_context_es2_profile +#define WGL_CONTEXT_ES2_PROFILE_BIT_EXT 0x00000004 +#endif + + +/*************************************************************/ + +#ifndef WGL_ARB_pbuffer +DECLARE_HANDLE(HPBUFFERARB); +#endif +#ifndef WGL_EXT_pbuffer +DECLARE_HANDLE(HPBUFFEREXT); +#endif +#ifndef WGL_NV_present_video +DECLARE_HANDLE(HVIDEOOUTPUTDEVICENV); +#endif +#ifndef WGL_NV_video_output +DECLARE_HANDLE(HPVIDEODEV); +#endif +#ifndef WGL_NV_gpu_affinity +DECLARE_HANDLE(HPGPUNV); +DECLARE_HANDLE(HGPUNV); + +typedef struct _GPU_DEVICE { + DWORD cb; + CHAR DeviceName[32]; + CHAR DeviceString[128]; + DWORD Flags; + RECT rcVirtualScreen; +} GPU_DEVICE, *PGPU_DEVICE; +#endif +#ifndef WGL_NV_video_capture +DECLARE_HANDLE(HVIDEOINPUTDEVICENV); +#endif + +#ifndef WGL_ARB_buffer_region +#define WGL_ARB_buffer_region 1 +#ifdef WGL_WGLEXT_PROTOTYPES +extern HANDLE WINAPI wglCreateBufferRegionARB (HDC hDC, int iLayerPlane, UINT uType); +extern VOID WINAPI wglDeleteBufferRegionARB (HANDLE hRegion); +extern BOOL WINAPI wglSaveBufferRegionARB (HANDLE hRegion, int x, int y, int width, int height); +extern BOOL WINAPI wglRestoreBufferRegionARB (HANDLE hRegion, int x, int y, int width, int height, int xSrc, int ySrc); +#endif /* WGL_WGLEXT_PROTOTYPES */ +typedef HANDLE (WINAPI * PFNWGLCREATEBUFFERREGIONARBPROC) (HDC hDC, int iLayerPlane, UINT uType); +typedef VOID (WINAPI * PFNWGLDELETEBUFFERREGIONARBPROC) (HANDLE hRegion); +typedef BOOL (WINAPI * PFNWGLSAVEBUFFERREGIONARBPROC) (HANDLE hRegion, int x, int y, int width, int height); +typedef BOOL (WINAPI * PFNWGLRESTOREBUFFERREGIONARBPROC) (HANDLE hRegion, int x, int y, int width, int height, int xSrc, int ySrc); +#endif + +#ifndef WGL_ARB_multisample +#define WGL_ARB_multisample 1 +#endif + +#ifndef WGL_ARB_extensions_string +#define WGL_ARB_extensions_string 1 +#ifdef WGL_WGLEXT_PROTOTYPES +extern const char * WINAPI wglGetExtensionsStringARB (HDC hdc); +#endif /* WGL_WGLEXT_PROTOTYPES */ +typedef const char * (WINAPI * PFNWGLGETEXTENSIONSSTRINGARBPROC) (HDC hdc); +#endif + +#ifndef WGL_ARB_pixel_format +#define WGL_ARB_pixel_format 1 +#ifdef WGL_WGLEXT_PROTOTYPES +extern BOOL WINAPI wglGetPixelFormatAttribivARB (HDC hdc, int iPixelFormat, int iLayerPlane, UINT nAttributes, const int *piAttributes, int *piValues); +extern BOOL WINAPI wglGetPixelFormatAttribfvARB (HDC hdc, int iPixelFormat, int iLayerPlane, UINT nAttributes, const int *piAttributes, FLOAT *pfValues); +extern BOOL WINAPI wglChoosePixelFormatARB (HDC hdc, const int *piAttribIList, const FLOAT *pfAttribFList, UINT nMaxFormats, int *piFormats, UINT *nNumFormats); +#endif /* WGL_WGLEXT_PROTOTYPES */ +typedef BOOL (WINAPI * PFNWGLGETPIXELFORMATATTRIBIVARBPROC) (HDC hdc, int iPixelFormat, int iLayerPlane, UINT nAttributes, const int *piAttributes, int *piValues); +typedef BOOL (WINAPI * PFNWGLGETPIXELFORMATATTRIBFVARBPROC) (HDC hdc, int iPixelFormat, int iLayerPlane, UINT nAttributes, const int *piAttributes, FLOAT *pfValues); +typedef BOOL (WINAPI * PFNWGLCHOOSEPIXELFORMATARBPROC) (HDC hdc, const int *piAttribIList, const FLOAT *pfAttribFList, UINT nMaxFormats, int *piFormats, UINT *nNumFormats); +#endif + +#ifndef WGL_ARB_make_current_read +#define WGL_ARB_make_current_read 1 +#ifdef WGL_WGLEXT_PROTOTYPES +extern BOOL WINAPI wglMakeContextCurrentARB (HDC hDrawDC, HDC hReadDC, HGLRC hglrc); +extern HDC WINAPI wglGetCurrentReadDCARB (void); +#endif /* WGL_WGLEXT_PROTOTYPES */ +typedef BOOL (WINAPI * PFNWGLMAKECONTEXTCURRENTARBPROC) (HDC hDrawDC, HDC hReadDC, HGLRC hglrc); +typedef HDC (WINAPI * PFNWGLGETCURRENTREADDCARBPROC) (void); +#endif + +#ifndef WGL_ARB_pbuffer +#define WGL_ARB_pbuffer 1 +#ifdef WGL_WGLEXT_PROTOTYPES +extern HPBUFFERARB WINAPI wglCreatePbufferARB (HDC hDC, int iPixelFormat, int iWidth, int iHeight, const int *piAttribList); +extern HDC WINAPI wglGetPbufferDCARB (HPBUFFERARB hPbuffer); +extern int WINAPI wglReleasePbufferDCARB (HPBUFFERARB hPbuffer, HDC hDC); +extern BOOL WINAPI wglDestroyPbufferARB (HPBUFFERARB hPbuffer); +extern BOOL WINAPI wglQueryPbufferARB (HPBUFFERARB hPbuffer, int iAttribute, int *piValue); +#endif /* WGL_WGLEXT_PROTOTYPES */ +typedef HPBUFFERARB (WINAPI * PFNWGLCREATEPBUFFERARBPROC) (HDC hDC, int iPixelFormat, int iWidth, int iHeight, const int *piAttribList); +typedef HDC (WINAPI * PFNWGLGETPBUFFERDCARBPROC) (HPBUFFERARB hPbuffer); +typedef int (WINAPI * PFNWGLRELEASEPBUFFERDCARBPROC) (HPBUFFERARB hPbuffer, HDC hDC); +typedef BOOL (WINAPI * PFNWGLDESTROYPBUFFERARBPROC) (HPBUFFERARB hPbuffer); +typedef BOOL (WINAPI * PFNWGLQUERYPBUFFERARBPROC) (HPBUFFERARB hPbuffer, int iAttribute, int *piValue); +#endif + +#ifndef WGL_ARB_render_texture +#define WGL_ARB_render_texture 1 +#ifdef WGL_WGLEXT_PROTOTYPES +extern BOOL WINAPI wglBindTexImageARB (HPBUFFERARB hPbuffer, int iBuffer); +extern BOOL WINAPI wglReleaseTexImageARB (HPBUFFERARB hPbuffer, int iBuffer); +extern BOOL WINAPI wglSetPbufferAttribARB (HPBUFFERARB hPbuffer, const int *piAttribList); +#endif /* WGL_WGLEXT_PROTOTYPES */ +typedef BOOL (WINAPI * PFNWGLBINDTEXIMAGEARBPROC) (HPBUFFERARB hPbuffer, int iBuffer); +typedef BOOL (WINAPI * PFNWGLRELEASETEXIMAGEARBPROC) (HPBUFFERARB hPbuffer, int iBuffer); +typedef BOOL (WINAPI * PFNWGLSETPBUFFERATTRIBARBPROC) (HPBUFFERARB hPbuffer, const int *piAttribList); +#endif + +#ifndef WGL_ARB_pixel_format_float +#define WGL_ARB_pixel_format_float 1 +#endif + +#ifndef WGL_ARB_framebuffer_sRGB +#define WGL_ARB_framebuffer_sRGB 1 +#endif + +#ifndef WGL_ARB_create_context +#define WGL_ARB_create_context 1 +#ifdef WGL_WGLEXT_PROTOTYPES +extern HGLRC WINAPI wglCreateContextAttribsARB (HDC hDC, HGLRC hShareContext, const int *attribList); +#endif /* WGL_WGLEXT_PROTOTYPES */ +typedef HGLRC (WINAPI * PFNWGLCREATECONTEXTATTRIBSARBPROC) (HDC hDC, HGLRC hShareContext, const int *attribList); +#endif + +#ifndef WGL_ARB_create_context_profile +#define WGL_ARB_create_context_profile 1 +#endif + +#ifndef WGL_ARB_create_context_robustness +#define WGL_ARB_create_context_robustness 1 +#endif + +#ifndef WGL_EXT_display_color_table +#define WGL_EXT_display_color_table 1 +#ifdef WGL_WGLEXT_PROTOTYPES +extern GLboolean WINAPI wglCreateDisplayColorTableEXT (GLushort id); +extern GLboolean WINAPI wglLoadDisplayColorTableEXT (const GLushort *table, GLuint length); +extern GLboolean WINAPI wglBindDisplayColorTableEXT (GLushort id); +extern VOID WINAPI wglDestroyDisplayColorTableEXT (GLushort id); +#endif /* WGL_WGLEXT_PROTOTYPES */ +typedef GLboolean (WINAPI * PFNWGLCREATEDISPLAYCOLORTABLEEXTPROC) (GLushort id); +typedef GLboolean (WINAPI * PFNWGLLOADDISPLAYCOLORTABLEEXTPROC) (const GLushort *table, GLuint length); +typedef GLboolean (WINAPI * PFNWGLBINDDISPLAYCOLORTABLEEXTPROC) (GLushort id); +typedef VOID (WINAPI * PFNWGLDESTROYDISPLAYCOLORTABLEEXTPROC) (GLushort id); +#endif + +#ifndef WGL_EXT_extensions_string +#define WGL_EXT_extensions_string 1 +#ifdef WGL_WGLEXT_PROTOTYPES +extern const char * WINAPI wglGetExtensionsStringEXT (void); +#endif /* WGL_WGLEXT_PROTOTYPES */ +typedef const char * (WINAPI * PFNWGLGETEXTENSIONSSTRINGEXTPROC) (void); +#endif + +#ifndef WGL_EXT_make_current_read +#define WGL_EXT_make_current_read 1 +#ifdef WGL_WGLEXT_PROTOTYPES +extern BOOL WINAPI wglMakeContextCurrentEXT (HDC hDrawDC, HDC hReadDC, HGLRC hglrc); +extern HDC WINAPI wglGetCurrentReadDCEXT (void); +#endif /* WGL_WGLEXT_PROTOTYPES */ +typedef BOOL (WINAPI * PFNWGLMAKECONTEXTCURRENTEXTPROC) (HDC hDrawDC, HDC hReadDC, HGLRC hglrc); +typedef HDC (WINAPI * PFNWGLGETCURRENTREADDCEXTPROC) (void); +#endif + +#ifndef WGL_EXT_pbuffer +#define WGL_EXT_pbuffer 1 +#ifdef WGL_WGLEXT_PROTOTYPES +extern HPBUFFEREXT WINAPI wglCreatePbufferEXT (HDC hDC, int iPixelFormat, int iWidth, int iHeight, const int *piAttribList); +extern HDC WINAPI wglGetPbufferDCEXT (HPBUFFEREXT hPbuffer); +extern int WINAPI wglReleasePbufferDCEXT (HPBUFFEREXT hPbuffer, HDC hDC); +extern BOOL WINAPI wglDestroyPbufferEXT (HPBUFFEREXT hPbuffer); +extern BOOL WINAPI wglQueryPbufferEXT (HPBUFFEREXT hPbuffer, int iAttribute, int *piValue); +#endif /* WGL_WGLEXT_PROTOTYPES */ +typedef HPBUFFEREXT (WINAPI * PFNWGLCREATEPBUFFEREXTPROC) (HDC hDC, int iPixelFormat, int iWidth, int iHeight, const int *piAttribList); +typedef HDC (WINAPI * PFNWGLGETPBUFFERDCEXTPROC) (HPBUFFEREXT hPbuffer); +typedef int (WINAPI * PFNWGLRELEASEPBUFFERDCEXTPROC) (HPBUFFEREXT hPbuffer, HDC hDC); +typedef BOOL (WINAPI * PFNWGLDESTROYPBUFFEREXTPROC) (HPBUFFEREXT hPbuffer); +typedef BOOL (WINAPI * PFNWGLQUERYPBUFFEREXTPROC) (HPBUFFEREXT hPbuffer, int iAttribute, int *piValue); +#endif + +#ifndef WGL_EXT_pixel_format +#define WGL_EXT_pixel_format 1 +#ifdef WGL_WGLEXT_PROTOTYPES +extern BOOL WINAPI wglGetPixelFormatAttribivEXT (HDC hdc, int iPixelFormat, int iLayerPlane, UINT nAttributes, int *piAttributes, int *piValues); +extern BOOL WINAPI wglGetPixelFormatAttribfvEXT (HDC hdc, int iPixelFormat, int iLayerPlane, UINT nAttributes, int *piAttributes, FLOAT *pfValues); +extern BOOL WINAPI wglChoosePixelFormatEXT (HDC hdc, const int *piAttribIList, const FLOAT *pfAttribFList, UINT nMaxFormats, int *piFormats, UINT *nNumFormats); +#endif /* WGL_WGLEXT_PROTOTYPES */ +typedef BOOL (WINAPI * PFNWGLGETPIXELFORMATATTRIBIVEXTPROC) (HDC hdc, int iPixelFormat, int iLayerPlane, UINT nAttributes, int *piAttributes, int *piValues); +typedef BOOL (WINAPI * PFNWGLGETPIXELFORMATATTRIBFVEXTPROC) (HDC hdc, int iPixelFormat, int iLayerPlane, UINT nAttributes, int *piAttributes, FLOAT *pfValues); +typedef BOOL (WINAPI * PFNWGLCHOOSEPIXELFORMATEXTPROC) (HDC hdc, const int *piAttribIList, const FLOAT *pfAttribFList, UINT nMaxFormats, int *piFormats, UINT *nNumFormats); +#endif + +#ifndef WGL_EXT_swap_control +#define WGL_EXT_swap_control 1 +#ifdef WGL_WGLEXT_PROTOTYPES +extern BOOL WINAPI wglSwapIntervalEXT (int interval); +extern int WINAPI wglGetSwapIntervalEXT (void); +#endif /* WGL_WGLEXT_PROTOTYPES */ +typedef BOOL (WINAPI * PFNWGLSWAPINTERVALEXTPROC) (int interval); +typedef int (WINAPI * PFNWGLGETSWAPINTERVALEXTPROC) (void); +#endif + +#ifndef WGL_EXT_depth_float +#define WGL_EXT_depth_float 1 +#endif + +#ifndef WGL_NV_vertex_array_range +#define WGL_NV_vertex_array_range 1 +#ifdef WGL_WGLEXT_PROTOTYPES +extern void* WINAPI wglAllocateMemoryNV (GLsizei size, GLfloat readfreq, GLfloat writefreq, GLfloat priority); +extern void WINAPI wglFreeMemoryNV (void *pointer); +#endif /* WGL_WGLEXT_PROTOTYPES */ +typedef void* (WINAPI * PFNWGLALLOCATEMEMORYNVPROC) (GLsizei size, GLfloat readfreq, GLfloat writefreq, GLfloat priority); +typedef void (WINAPI * PFNWGLFREEMEMORYNVPROC) (void *pointer); +#endif + +#ifndef WGL_3DFX_multisample +#define WGL_3DFX_multisample 1 +#endif + +#ifndef WGL_EXT_multisample +#define WGL_EXT_multisample 1 +#endif + +#ifndef WGL_OML_sync_control +#define WGL_OML_sync_control 1 +#ifdef WGL_WGLEXT_PROTOTYPES +extern BOOL WINAPI wglGetSyncValuesOML (HDC hdc, INT64 *ust, INT64 *msc, INT64 *sbc); +extern BOOL WINAPI wglGetMscRateOML (HDC hdc, INT32 *numerator, INT32 *denominator); +extern INT64 WINAPI wglSwapBuffersMscOML (HDC hdc, INT64 target_msc, INT64 divisor, INT64 remainder); +extern INT64 WINAPI wglSwapLayerBuffersMscOML (HDC hdc, int fuPlanes, INT64 target_msc, INT64 divisor, INT64 remainder); +extern BOOL WINAPI wglWaitForMscOML (HDC hdc, INT64 target_msc, INT64 divisor, INT64 remainder, INT64 *ust, INT64 *msc, INT64 *sbc); +extern BOOL WINAPI wglWaitForSbcOML (HDC hdc, INT64 target_sbc, INT64 *ust, INT64 *msc, INT64 *sbc); +#endif /* WGL_WGLEXT_PROTOTYPES */ +typedef BOOL (WINAPI * PFNWGLGETSYNCVALUESOMLPROC) (HDC hdc, INT64 *ust, INT64 *msc, INT64 *sbc); +typedef BOOL (WINAPI * PFNWGLGETMSCRATEOMLPROC) (HDC hdc, INT32 *numerator, INT32 *denominator); +typedef INT64 (WINAPI * PFNWGLSWAPBUFFERSMSCOMLPROC) (HDC hdc, INT64 target_msc, INT64 divisor, INT64 remainder); +typedef INT64 (WINAPI * PFNWGLSWAPLAYERBUFFERSMSCOMLPROC) (HDC hdc, int fuPlanes, INT64 target_msc, INT64 divisor, INT64 remainder); +typedef BOOL (WINAPI * PFNWGLWAITFORMSCOMLPROC) (HDC hdc, INT64 target_msc, INT64 divisor, INT64 remainder, INT64 *ust, INT64 *msc, INT64 *sbc); +typedef BOOL (WINAPI * PFNWGLWAITFORSBCOMLPROC) (HDC hdc, INT64 target_sbc, INT64 *ust, INT64 *msc, INT64 *sbc); +#endif + +#ifndef WGL_I3D_digital_video_control +#define WGL_I3D_digital_video_control 1 +#ifdef WGL_WGLEXT_PROTOTYPES +extern BOOL WINAPI wglGetDigitalVideoParametersI3D (HDC hDC, int iAttribute, int *piValue); +extern BOOL WINAPI wglSetDigitalVideoParametersI3D (HDC hDC, int iAttribute, const int *piValue); +#endif /* WGL_WGLEXT_PROTOTYPES */ +typedef BOOL (WINAPI * PFNWGLGETDIGITALVIDEOPARAMETERSI3DPROC) (HDC hDC, int iAttribute, int *piValue); +typedef BOOL (WINAPI * PFNWGLSETDIGITALVIDEOPARAMETERSI3DPROC) (HDC hDC, int iAttribute, const int *piValue); +#endif + +#ifndef WGL_I3D_gamma +#define WGL_I3D_gamma 1 +#ifdef WGL_WGLEXT_PROTOTYPES +extern BOOL WINAPI wglGetGammaTableParametersI3D (HDC hDC, int iAttribute, int *piValue); +extern BOOL WINAPI wglSetGammaTableParametersI3D (HDC hDC, int iAttribute, const int *piValue); +extern BOOL WINAPI wglGetGammaTableI3D (HDC hDC, int iEntries, USHORT *puRed, USHORT *puGreen, USHORT *puBlue); +extern BOOL WINAPI wglSetGammaTableI3D (HDC hDC, int iEntries, const USHORT *puRed, const USHORT *puGreen, const USHORT *puBlue); +#endif /* WGL_WGLEXT_PROTOTYPES */ +typedef BOOL (WINAPI * PFNWGLGETGAMMATABLEPARAMETERSI3DPROC) (HDC hDC, int iAttribute, int *piValue); +typedef BOOL (WINAPI * PFNWGLSETGAMMATABLEPARAMETERSI3DPROC) (HDC hDC, int iAttribute, const int *piValue); +typedef BOOL (WINAPI * PFNWGLGETGAMMATABLEI3DPROC) (HDC hDC, int iEntries, USHORT *puRed, USHORT *puGreen, USHORT *puBlue); +typedef BOOL (WINAPI * PFNWGLSETGAMMATABLEI3DPROC) (HDC hDC, int iEntries, const USHORT *puRed, const USHORT *puGreen, const USHORT *puBlue); +#endif + +#ifndef WGL_I3D_genlock +#define WGL_I3D_genlock 1 +#ifdef WGL_WGLEXT_PROTOTYPES +extern BOOL WINAPI wglEnableGenlockI3D (HDC hDC); +extern BOOL WINAPI wglDisableGenlockI3D (HDC hDC); +extern BOOL WINAPI wglIsEnabledGenlockI3D (HDC hDC, BOOL *pFlag); +extern BOOL WINAPI wglGenlockSourceI3D (HDC hDC, UINT uSource); +extern BOOL WINAPI wglGetGenlockSourceI3D (HDC hDC, UINT *uSource); +extern BOOL WINAPI wglGenlockSourceEdgeI3D (HDC hDC, UINT uEdge); +extern BOOL WINAPI wglGetGenlockSourceEdgeI3D (HDC hDC, UINT *uEdge); +extern BOOL WINAPI wglGenlockSampleRateI3D (HDC hDC, UINT uRate); +extern BOOL WINAPI wglGetGenlockSampleRateI3D (HDC hDC, UINT *uRate); +extern BOOL WINAPI wglGenlockSourceDelayI3D (HDC hDC, UINT uDelay); +extern BOOL WINAPI wglGetGenlockSourceDelayI3D (HDC hDC, UINT *uDelay); +extern BOOL WINAPI wglQueryGenlockMaxSourceDelayI3D (HDC hDC, UINT *uMaxLineDelay, UINT *uMaxPixelDelay); +#endif /* WGL_WGLEXT_PROTOTYPES */ +typedef BOOL (WINAPI * PFNWGLENABLEGENLOCKI3DPROC) (HDC hDC); +typedef BOOL (WINAPI * PFNWGLDISABLEGENLOCKI3DPROC) (HDC hDC); +typedef BOOL (WINAPI * PFNWGLISENABLEDGENLOCKI3DPROC) (HDC hDC, BOOL *pFlag); +typedef BOOL (WINAPI * PFNWGLGENLOCKSOURCEI3DPROC) (HDC hDC, UINT uSource); +typedef BOOL (WINAPI * PFNWGLGETGENLOCKSOURCEI3DPROC) (HDC hDC, UINT *uSource); +typedef BOOL (WINAPI * PFNWGLGENLOCKSOURCEEDGEI3DPROC) (HDC hDC, UINT uEdge); +typedef BOOL (WINAPI * PFNWGLGETGENLOCKSOURCEEDGEI3DPROC) (HDC hDC, UINT *uEdge); +typedef BOOL (WINAPI * PFNWGLGENLOCKSAMPLERATEI3DPROC) (HDC hDC, UINT uRate); +typedef BOOL (WINAPI * PFNWGLGETGENLOCKSAMPLERATEI3DPROC) (HDC hDC, UINT *uRate); +typedef BOOL (WINAPI * PFNWGLGENLOCKSOURCEDELAYI3DPROC) (HDC hDC, UINT uDelay); +typedef BOOL (WINAPI * PFNWGLGETGENLOCKSOURCEDELAYI3DPROC) (HDC hDC, UINT *uDelay); +typedef BOOL (WINAPI * PFNWGLQUERYGENLOCKMAXSOURCEDELAYI3DPROC) (HDC hDC, UINT *uMaxLineDelay, UINT *uMaxPixelDelay); +#endif + +#ifndef WGL_I3D_image_buffer +#define WGL_I3D_image_buffer 1 +#ifdef WGL_WGLEXT_PROTOTYPES +extern LPVOID WINAPI wglCreateImageBufferI3D (HDC hDC, DWORD dwSize, UINT uFlags); +extern BOOL WINAPI wglDestroyImageBufferI3D (HDC hDC, LPVOID pAddress); +extern BOOL WINAPI wglAssociateImageBufferEventsI3D (HDC hDC, const HANDLE *pEvent, const LPVOID *pAddress, const DWORD *pSize, UINT count); +extern BOOL WINAPI wglReleaseImageBufferEventsI3D (HDC hDC, const LPVOID *pAddress, UINT count); +#endif /* WGL_WGLEXT_PROTOTYPES */ +typedef LPVOID (WINAPI * PFNWGLCREATEIMAGEBUFFERI3DPROC) (HDC hDC, DWORD dwSize, UINT uFlags); +typedef BOOL (WINAPI * PFNWGLDESTROYIMAGEBUFFERI3DPROC) (HDC hDC, LPVOID pAddress); +typedef BOOL (WINAPI * PFNWGLASSOCIATEIMAGEBUFFEREVENTSI3DPROC) (HDC hDC, const HANDLE *pEvent, const LPVOID *pAddress, const DWORD *pSize, UINT count); +typedef BOOL (WINAPI * PFNWGLRELEASEIMAGEBUFFEREVENTSI3DPROC) (HDC hDC, const LPVOID *pAddress, UINT count); +#endif + +#ifndef WGL_I3D_swap_frame_lock +#define WGL_I3D_swap_frame_lock 1 +#ifdef WGL_WGLEXT_PROTOTYPES +extern BOOL WINAPI wglEnableFrameLockI3D (void); +extern BOOL WINAPI wglDisableFrameLockI3D (void); +extern BOOL WINAPI wglIsEnabledFrameLockI3D (BOOL *pFlag); +extern BOOL WINAPI wglQueryFrameLockMasterI3D (BOOL *pFlag); +#endif /* WGL_WGLEXT_PROTOTYPES */ +typedef BOOL (WINAPI * PFNWGLENABLEFRAMELOCKI3DPROC) (void); +typedef BOOL (WINAPI * PFNWGLDISABLEFRAMELOCKI3DPROC) (void); +typedef BOOL (WINAPI * PFNWGLISENABLEDFRAMELOCKI3DPROC) (BOOL *pFlag); +typedef BOOL (WINAPI * PFNWGLQUERYFRAMELOCKMASTERI3DPROC) (BOOL *pFlag); +#endif + +#ifndef WGL_I3D_swap_frame_usage +#define WGL_I3D_swap_frame_usage 1 +#ifdef WGL_WGLEXT_PROTOTYPES +extern BOOL WINAPI wglGetFrameUsageI3D (float *pUsage); +extern BOOL WINAPI wglBeginFrameTrackingI3D (void); +extern BOOL WINAPI wglEndFrameTrackingI3D (void); +extern BOOL WINAPI wglQueryFrameTrackingI3D (DWORD *pFrameCount, DWORD *pMissedFrames, float *pLastMissedUsage); +#endif /* WGL_WGLEXT_PROTOTYPES */ +typedef BOOL (WINAPI * PFNWGLGETFRAMEUSAGEI3DPROC) (float *pUsage); +typedef BOOL (WINAPI * PFNWGLBEGINFRAMETRACKINGI3DPROC) (void); +typedef BOOL (WINAPI * PFNWGLENDFRAMETRACKINGI3DPROC) (void); +typedef BOOL (WINAPI * PFNWGLQUERYFRAMETRACKINGI3DPROC) (DWORD *pFrameCount, DWORD *pMissedFrames, float *pLastMissedUsage); +#endif + +#ifndef WGL_ATI_pixel_format_float +#define WGL_ATI_pixel_format_float 1 +#endif + +#ifndef WGL_NV_float_buffer +#define WGL_NV_float_buffer 1 +#endif + +#ifndef WGL_3DL_stereo_control +#define WGL_3DL_stereo_control 1 +#ifdef WGL_WGLEXT_PROTOTYPES +extern BOOL WINAPI wglSetStereoEmitterState3DL (HDC hDC, UINT uState); +#endif /* WGL_WGLEXT_PROTOTYPES */ +typedef BOOL (WINAPI * PFNWGLSETSTEREOEMITTERSTATE3DLPROC) (HDC hDC, UINT uState); +#endif + +#ifndef WGL_EXT_pixel_format_packed_float +#define WGL_EXT_pixel_format_packed_float 1 +#endif + +#ifndef WGL_EXT_framebuffer_sRGB +#define WGL_EXT_framebuffer_sRGB 1 +#endif + +#ifndef WGL_NV_present_video +#define WGL_NV_present_video 1 +#ifdef WGL_WGLEXT_PROTOTYPES +extern int WINAPI wglEnumerateVideoDevicesNV (HDC hDC, HVIDEOOUTPUTDEVICENV *phDeviceList); +extern BOOL WINAPI wglBindVideoDeviceNV (HDC hDC, unsigned int uVideoSlot, HVIDEOOUTPUTDEVICENV hVideoDevice, const int *piAttribList); +extern BOOL WINAPI wglQueryCurrentContextNV (int iAttribute, int *piValue); +#endif /* WGL_WGLEXT_PROTOTYPES */ +typedef int (WINAPI * PFNWGLENUMERATEVIDEODEVICESNVPROC) (HDC hDC, HVIDEOOUTPUTDEVICENV *phDeviceList); +typedef BOOL (WINAPI * PFNWGLBINDVIDEODEVICENVPROC) (HDC hDC, unsigned int uVideoSlot, HVIDEOOUTPUTDEVICENV hVideoDevice, const int *piAttribList); +typedef BOOL (WINAPI * PFNWGLQUERYCURRENTCONTEXTNVPROC) (int iAttribute, int *piValue); +#endif + +#ifndef WGL_NV_video_output +#define WGL_NV_video_output 1 +#ifdef WGL_WGLEXT_PROTOTYPES +extern BOOL WINAPI wglGetVideoDeviceNV (HDC hDC, int numDevices, HPVIDEODEV *hVideoDevice); +extern BOOL WINAPI wglReleaseVideoDeviceNV (HPVIDEODEV hVideoDevice); +extern BOOL WINAPI wglBindVideoImageNV (HPVIDEODEV hVideoDevice, HPBUFFERARB hPbuffer, int iVideoBuffer); +extern BOOL WINAPI wglReleaseVideoImageNV (HPBUFFERARB hPbuffer, int iVideoBuffer); +extern BOOL WINAPI wglSendPbufferToVideoNV (HPBUFFERARB hPbuffer, int iBufferType, unsigned long *pulCounterPbuffer, BOOL bBlock); +extern BOOL WINAPI wglGetVideoInfoNV (HPVIDEODEV hpVideoDevice, unsigned long *pulCounterOutputPbuffer, unsigned long *pulCounterOutputVideo); +#endif /* WGL_WGLEXT_PROTOTYPES */ +typedef BOOL (WINAPI * PFNWGLGETVIDEODEVICENVPROC) (HDC hDC, int numDevices, HPVIDEODEV *hVideoDevice); +typedef BOOL (WINAPI * PFNWGLRELEASEVIDEODEVICENVPROC) (HPVIDEODEV hVideoDevice); +typedef BOOL (WINAPI * PFNWGLBINDVIDEOIMAGENVPROC) (HPVIDEODEV hVideoDevice, HPBUFFERARB hPbuffer, int iVideoBuffer); +typedef BOOL (WINAPI * PFNWGLRELEASEVIDEOIMAGENVPROC) (HPBUFFERARB hPbuffer, int iVideoBuffer); +typedef BOOL (WINAPI * PFNWGLSENDPBUFFERTOVIDEONVPROC) (HPBUFFERARB hPbuffer, int iBufferType, unsigned long *pulCounterPbuffer, BOOL bBlock); +typedef BOOL (WINAPI * PFNWGLGETVIDEOINFONVPROC) (HPVIDEODEV hpVideoDevice, unsigned long *pulCounterOutputPbuffer, unsigned long *pulCounterOutputVideo); +#endif + +#ifndef WGL_NV_swap_group +#define WGL_NV_swap_group 1 +#ifdef WGL_WGLEXT_PROTOTYPES +extern BOOL WINAPI wglJoinSwapGroupNV (HDC hDC, GLuint group); +extern BOOL WINAPI wglBindSwapBarrierNV (GLuint group, GLuint barrier); +extern BOOL WINAPI wglQuerySwapGroupNV (HDC hDC, GLuint *group, GLuint *barrier); +extern BOOL WINAPI wglQueryMaxSwapGroupsNV (HDC hDC, GLuint *maxGroups, GLuint *maxBarriers); +extern BOOL WINAPI wglQueryFrameCountNV (HDC hDC, GLuint *count); +extern BOOL WINAPI wglResetFrameCountNV (HDC hDC); +#endif /* WGL_WGLEXT_PROTOTYPES */ +typedef BOOL (WINAPI * PFNWGLJOINSWAPGROUPNVPROC) (HDC hDC, GLuint group); +typedef BOOL (WINAPI * PFNWGLBINDSWAPBARRIERNVPROC) (GLuint group, GLuint barrier); +typedef BOOL (WINAPI * PFNWGLQUERYSWAPGROUPNVPROC) (HDC hDC, GLuint *group, GLuint *barrier); +typedef BOOL (WINAPI * PFNWGLQUERYMAXSWAPGROUPSNVPROC) (HDC hDC, GLuint *maxGroups, GLuint *maxBarriers); +typedef BOOL (WINAPI * PFNWGLQUERYFRAMECOUNTNVPROC) (HDC hDC, GLuint *count); +typedef BOOL (WINAPI * PFNWGLRESETFRAMECOUNTNVPROC) (HDC hDC); +#endif + +#ifndef WGL_NV_gpu_affinity +#define WGL_NV_gpu_affinity 1 +#ifdef WGL_WGLEXT_PROTOTYPES +extern BOOL WINAPI wglEnumGpusNV (UINT iGpuIndex, HGPUNV *phGpu); +extern BOOL WINAPI wglEnumGpuDevicesNV (HGPUNV hGpu, UINT iDeviceIndex, PGPU_DEVICE lpGpuDevice); +extern HDC WINAPI wglCreateAffinityDCNV (const HGPUNV *phGpuList); +extern BOOL WINAPI wglEnumGpusFromAffinityDCNV (HDC hAffinityDC, UINT iGpuIndex, HGPUNV *hGpu); +extern BOOL WINAPI wglDeleteDCNV (HDC hdc); +#endif /* WGL_WGLEXT_PROTOTYPES */ +typedef BOOL (WINAPI * PFNWGLENUMGPUSNVPROC) (UINT iGpuIndex, HGPUNV *phGpu); +typedef BOOL (WINAPI * PFNWGLENUMGPUDEVICESNVPROC) (HGPUNV hGpu, UINT iDeviceIndex, PGPU_DEVICE lpGpuDevice); +typedef HDC (WINAPI * PFNWGLCREATEAFFINITYDCNVPROC) (const HGPUNV *phGpuList); +typedef BOOL (WINAPI * PFNWGLENUMGPUSFROMAFFINITYDCNVPROC) (HDC hAffinityDC, UINT iGpuIndex, HGPUNV *hGpu); +typedef BOOL (WINAPI * PFNWGLDELETEDCNVPROC) (HDC hdc); +#endif + +#ifndef WGL_AMD_gpu_association +#define WGL_AMD_gpu_association 1 +#ifdef WGL_WGLEXT_PROTOTYPES +extern UINT WINAPI wglGetGPUIDsAMD (UINT maxCount, UINT *ids); +extern INT WINAPI wglGetGPUInfoAMD (UINT id, int property, GLenum dataType, UINT size, void *data); +extern UINT WINAPI wglGetContextGPUIDAMD (HGLRC hglrc); +extern HGLRC WINAPI wglCreateAssociatedContextAMD (UINT id); +extern HGLRC WINAPI wglCreateAssociatedContextAttribsAMD (UINT id, HGLRC hShareContext, const int *attribList); +extern BOOL WINAPI wglDeleteAssociatedContextAMD (HGLRC hglrc); +extern BOOL WINAPI wglMakeAssociatedContextCurrentAMD (HGLRC hglrc); +extern HGLRC WINAPI wglGetCurrentAssociatedContextAMD (void); +extern VOID WINAPI wglBlitContextFramebufferAMD (HGLRC dstCtx, GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter); +#endif /* WGL_WGLEXT_PROTOTYPES */ +typedef UINT (WINAPI * PFNWGLGETGPUIDSAMDPROC) (UINT maxCount, UINT *ids); +typedef INT (WINAPI * PFNWGLGETGPUINFOAMDPROC) (UINT id, int property, GLenum dataType, UINT size, void *data); +typedef UINT (WINAPI * PFNWGLGETCONTEXTGPUIDAMDPROC) (HGLRC hglrc); +typedef HGLRC (WINAPI * PFNWGLCREATEASSOCIATEDCONTEXTAMDPROC) (UINT id); +typedef HGLRC (WINAPI * PFNWGLCREATEASSOCIATEDCONTEXTATTRIBSAMDPROC) (UINT id, HGLRC hShareContext, const int *attribList); +typedef BOOL (WINAPI * PFNWGLDELETEASSOCIATEDCONTEXTAMDPROC) (HGLRC hglrc); +typedef BOOL (WINAPI * PFNWGLMAKEASSOCIATEDCONTEXTCURRENTAMDPROC) (HGLRC hglrc); +typedef HGLRC (WINAPI * PFNWGLGETCURRENTASSOCIATEDCONTEXTAMDPROC) (void); +typedef VOID (WINAPI * PFNWGLBLITCONTEXTFRAMEBUFFERAMDPROC) (HGLRC dstCtx, GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter); +#endif + +#ifndef WGL_NV_video_capture +#define WGL_NV_video_capture 1 +#ifdef WGL_WGLEXT_PROTOTYPES +extern BOOL WINAPI wglBindVideoCaptureDeviceNV (UINT uVideoSlot, HVIDEOINPUTDEVICENV hDevice); +extern UINT WINAPI wglEnumerateVideoCaptureDevicesNV (HDC hDc, HVIDEOINPUTDEVICENV *phDeviceList); +extern BOOL WINAPI wglLockVideoCaptureDeviceNV (HDC hDc, HVIDEOINPUTDEVICENV hDevice); +extern BOOL WINAPI wglQueryVideoCaptureDeviceNV (HDC hDc, HVIDEOINPUTDEVICENV hDevice, int iAttribute, int *piValue); +extern BOOL WINAPI wglReleaseVideoCaptureDeviceNV (HDC hDc, HVIDEOINPUTDEVICENV hDevice); +#endif /* WGL_WGLEXT_PROTOTYPES */ +typedef BOOL (WINAPI * PFNWGLBINDVIDEOCAPTUREDEVICENVPROC) (UINT uVideoSlot, HVIDEOINPUTDEVICENV hDevice); +typedef UINT (WINAPI * PFNWGLENUMERATEVIDEOCAPTUREDEVICESNVPROC) (HDC hDc, HVIDEOINPUTDEVICENV *phDeviceList); +typedef BOOL (WINAPI * PFNWGLLOCKVIDEOCAPTUREDEVICENVPROC) (HDC hDc, HVIDEOINPUTDEVICENV hDevice); +typedef BOOL (WINAPI * PFNWGLQUERYVIDEOCAPTUREDEVICENVPROC) (HDC hDc, HVIDEOINPUTDEVICENV hDevice, int iAttribute, int *piValue); +typedef BOOL (WINAPI * PFNWGLRELEASEVIDEOCAPTUREDEVICENVPROC) (HDC hDc, HVIDEOINPUTDEVICENV hDevice); +#endif + +#ifndef WGL_NV_copy_image +#define WGL_NV_copy_image 1 +#ifdef WGL_WGLEXT_PROTOTYPES +extern BOOL WINAPI wglCopyImageSubDataNV (HGLRC hSrcRC, GLuint srcName, GLenum srcTarget, GLint srcLevel, GLint srcX, GLint srcY, GLint srcZ, HGLRC hDstRC, GLuint dstName, GLenum dstTarget, GLint dstLevel, GLint dstX, GLint dstY, GLint dstZ, GLsizei width, GLsizei height, GLsizei depth); +#endif /* WGL_WGLEXT_PROTOTYPES */ +typedef BOOL (WINAPI * PFNWGLCOPYIMAGESUBDATANVPROC) (HGLRC hSrcRC, GLuint srcName, GLenum srcTarget, GLint srcLevel, GLint srcX, GLint srcY, GLint srcZ, HGLRC hDstRC, GLuint dstName, GLenum dstTarget, GLint dstLevel, GLint dstX, GLint dstY, GLint dstZ, GLsizei width, GLsizei height, GLsizei depth); +#endif + +#ifndef WGL_NV_multisample_coverage +#define WGL_NV_multisample_coverage 1 +#endif + + +#ifdef __cplusplus +} +#endif + +#endif
diff --git a/third_party/mesa_headers/GLES/egl.h b/third_party/mesa_headers/GLES/egl.h new file mode 100644 index 0000000..5778e00 --- /dev/null +++ b/third_party/mesa_headers/GLES/egl.h
@@ -0,0 +1,15 @@ +/* + * Skeleton egl.h to provide compatibility for early GLES 1.0 + * applications. Several early implementations included gl.h + * in egl.h leading applications to include only egl.h + * + * $Revision: 6252 $ on $Date:: 2008-08-06 16:35:08 -0700 #$ + */ + +#ifndef __legacy_egl_h_ +#define __legacy_egl_h_ + +#include <EGL/egl.h> +#include <GLES/gl.h> + +#endif /* __legacy_egl_h_ */
diff --git a/third_party/mesa_headers/GLES/gl.h b/third_party/mesa_headers/GLES/gl.h new file mode 100644 index 0000000..5b8d85a --- /dev/null +++ b/third_party/mesa_headers/GLES/gl.h
@@ -0,0 +1,770 @@ +#ifndef __gl_h_ +#define __gl_h_ + +/* $Revision: 10601 $ on $Date:: 2010-03-04 22:15:27 -0800 #$ */ + +#include <GLES/glplatform.h> + +#ifdef __cplusplus +extern "C" { +#endif + +/* + * This document is licensed under the SGI Free Software B License Version + * 2.0. For details, see http://oss.sgi.com/projects/FreeB/ . + */ + +typedef void GLvoid; +typedef char GLchar; +typedef unsigned int GLenum; +typedef unsigned char GLboolean; +typedef unsigned int GLbitfield; +typedef khronos_int8_t GLbyte; +typedef short GLshort; +typedef int GLint; +typedef int GLsizei; +typedef khronos_uint8_t GLubyte; +typedef unsigned short GLushort; +typedef unsigned int GLuint; +typedef khronos_float_t GLfloat; +typedef khronos_float_t GLclampf; +typedef khronos_int32_t GLfixed; +typedef khronos_int32_t GLclampx; + +typedef khronos_intptr_t GLintptr; +typedef khronos_ssize_t GLsizeiptr; + + +/*************************************************************/ + +/* OpenGL ES core versions */ +#define GL_VERSION_ES_CM_1_0 1 +#define GL_VERSION_ES_CL_1_0 1 +#define GL_VERSION_ES_CM_1_1 1 +#define GL_VERSION_ES_CL_1_1 1 + +/* ClearBufferMask */ +#define GL_DEPTH_BUFFER_BIT 0x00000100 +#define GL_STENCIL_BUFFER_BIT 0x00000400 +#define GL_COLOR_BUFFER_BIT 0x00004000 + +/* Boolean */ +#define GL_FALSE 0 +#define GL_TRUE 1 + +/* BeginMode */ +#define GL_POINTS 0x0000 +#define GL_LINES 0x0001 +#define GL_LINE_LOOP 0x0002 +#define GL_LINE_STRIP 0x0003 +#define GL_TRIANGLES 0x0004 +#define GL_TRIANGLE_STRIP 0x0005 +#define GL_TRIANGLE_FAN 0x0006 + +/* AlphaFunction */ +#define GL_NEVER 0x0200 +#define GL_LESS 0x0201 +#define GL_EQUAL 0x0202 +#define GL_LEQUAL 0x0203 +#define GL_GREATER 0x0204 +#define GL_NOTEQUAL 0x0205 +#define GL_GEQUAL 0x0206 +#define GL_ALWAYS 0x0207 + +/* BlendingFactorDest */ +#define GL_ZERO 0 +#define GL_ONE 1 +#define GL_SRC_COLOR 0x0300 +#define GL_ONE_MINUS_SRC_COLOR 0x0301 +#define GL_SRC_ALPHA 0x0302 +#define GL_ONE_MINUS_SRC_ALPHA 0x0303 +#define GL_DST_ALPHA 0x0304 +#define GL_ONE_MINUS_DST_ALPHA 0x0305 + +/* BlendingFactorSrc */ +/* GL_ZERO */ +/* GL_ONE */ +#define GL_DST_COLOR 0x0306 +#define GL_ONE_MINUS_DST_COLOR 0x0307 +#define GL_SRC_ALPHA_SATURATE 0x0308 +/* GL_SRC_ALPHA */ +/* GL_ONE_MINUS_SRC_ALPHA */ +/* GL_DST_ALPHA */ +/* GL_ONE_MINUS_DST_ALPHA */ + +/* ClipPlaneName */ +#define GL_CLIP_PLANE0 0x3000 +#define GL_CLIP_PLANE1 0x3001 +#define GL_CLIP_PLANE2 0x3002 +#define GL_CLIP_PLANE3 0x3003 +#define GL_CLIP_PLANE4 0x3004 +#define GL_CLIP_PLANE5 0x3005 + +/* ColorMaterialFace */ +/* GL_FRONT_AND_BACK */ + +/* ColorMaterialParameter */ +/* GL_AMBIENT_AND_DIFFUSE */ + +/* ColorPointerType */ +/* GL_UNSIGNED_BYTE */ +/* GL_FLOAT */ +/* GL_FIXED */ + +/* CullFaceMode */ +#define GL_FRONT 0x0404 +#define GL_BACK 0x0405 +#define GL_FRONT_AND_BACK 0x0408 + +/* DepthFunction */ +/* GL_NEVER */ +/* GL_LESS */ +/* GL_EQUAL */ +/* GL_LEQUAL */ +/* GL_GREATER */ +/* GL_NOTEQUAL */ +/* GL_GEQUAL */ +/* GL_ALWAYS */ + +/* EnableCap */ +#define GL_FOG 0x0B60 +#define GL_LIGHTING 0x0B50 +#define GL_TEXTURE_2D 0x0DE1 +#define GL_CULL_FACE 0x0B44 +#define GL_ALPHA_TEST 0x0BC0 +#define GL_BLEND 0x0BE2 +#define GL_COLOR_LOGIC_OP 0x0BF2 +#define GL_DITHER 0x0BD0 +#define GL_STENCIL_TEST 0x0B90 +#define GL_DEPTH_TEST 0x0B71 +/* GL_LIGHT0 */ +/* GL_LIGHT1 */ +/* GL_LIGHT2 */ +/* GL_LIGHT3 */ +/* GL_LIGHT4 */ +/* GL_LIGHT5 */ +/* GL_LIGHT6 */ +/* GL_LIGHT7 */ +#define GL_POINT_SMOOTH 0x0B10 +#define GL_LINE_SMOOTH 0x0B20 +#define GL_SCISSOR_TEST 0x0C11 +#define GL_COLOR_MATERIAL 0x0B57 +#define GL_NORMALIZE 0x0BA1 +#define GL_RESCALE_NORMAL 0x803A +#define GL_POLYGON_OFFSET_FILL 0x8037 +#define GL_VERTEX_ARRAY 0x8074 +#define GL_NORMAL_ARRAY 0x8075 +#define GL_COLOR_ARRAY 0x8076 +#define GL_TEXTURE_COORD_ARRAY 0x8078 +#define GL_MULTISAMPLE 0x809D +#define GL_SAMPLE_ALPHA_TO_COVERAGE 0x809E +#define GL_SAMPLE_ALPHA_TO_ONE 0x809F +#define GL_SAMPLE_COVERAGE 0x80A0 + +/* ErrorCode */ +#define GL_NO_ERROR 0 +#define GL_INVALID_ENUM 0x0500 +#define GL_INVALID_VALUE 0x0501 +#define GL_INVALID_OPERATION 0x0502 +#define GL_STACK_OVERFLOW 0x0503 +#define GL_STACK_UNDERFLOW 0x0504 +#define GL_OUT_OF_MEMORY 0x0505 + +/* FogMode */ +/* GL_LINEAR */ +#define GL_EXP 0x0800 +#define GL_EXP2 0x0801 + +/* FogParameter */ +#define GL_FOG_DENSITY 0x0B62 +#define GL_FOG_START 0x0B63 +#define GL_FOG_END 0x0B64 +#define GL_FOG_MODE 0x0B65 +#define GL_FOG_COLOR 0x0B66 + +/* FrontFaceDirection */ +#define GL_CW 0x0900 +#define GL_CCW 0x0901 + +/* GetPName */ +#define GL_CURRENT_COLOR 0x0B00 +#define GL_CURRENT_NORMAL 0x0B02 +#define GL_CURRENT_TEXTURE_COORDS 0x0B03 +#define GL_POINT_SIZE 0x0B11 +#define GL_POINT_SIZE_MIN 0x8126 +#define GL_POINT_SIZE_MAX 0x8127 +#define GL_POINT_FADE_THRESHOLD_SIZE 0x8128 +#define GL_POINT_DISTANCE_ATTENUATION 0x8129 +#define GL_SMOOTH_POINT_SIZE_RANGE 0x0B12 +#define GL_LINE_WIDTH 0x0B21 +#define GL_SMOOTH_LINE_WIDTH_RANGE 0x0B22 +#define GL_ALIASED_POINT_SIZE_RANGE 0x846D +#define GL_ALIASED_LINE_WIDTH_RANGE 0x846E +#define GL_CULL_FACE_MODE 0x0B45 +#define GL_FRONT_FACE 0x0B46 +#define GL_SHADE_MODEL 0x0B54 +#define GL_DEPTH_RANGE 0x0B70 +#define GL_DEPTH_WRITEMASK 0x0B72 +#define GL_DEPTH_CLEAR_VALUE 0x0B73 +#define GL_DEPTH_FUNC 0x0B74 +#define GL_STENCIL_CLEAR_VALUE 0x0B91 +#define GL_STENCIL_FUNC 0x0B92 +#define GL_STENCIL_VALUE_MASK 0x0B93 +#define GL_STENCIL_FAIL 0x0B94 +#define GL_STENCIL_PASS_DEPTH_FAIL 0x0B95 +#define GL_STENCIL_PASS_DEPTH_PASS 0x0B96 +#define GL_STENCIL_REF 0x0B97 +#define GL_STENCIL_WRITEMASK 0x0B98 +#define GL_MATRIX_MODE 0x0BA0 +#define GL_VIEWPORT 0x0BA2 +#define GL_MODELVIEW_STACK_DEPTH 0x0BA3 +#define GL_PROJECTION_STACK_DEPTH 0x0BA4 +#define GL_TEXTURE_STACK_DEPTH 0x0BA5 +#define GL_MODELVIEW_MATRIX 0x0BA6 +#define GL_PROJECTION_MATRIX 0x0BA7 +#define GL_TEXTURE_MATRIX 0x0BA8 +#define GL_ALPHA_TEST_FUNC 0x0BC1 +#define GL_ALPHA_TEST_REF 0x0BC2 +#define GL_BLEND_DST 0x0BE0 +#define GL_BLEND_SRC 0x0BE1 +#define GL_LOGIC_OP_MODE 0x0BF0 +#define GL_SCISSOR_BOX 0x0C10 +#define GL_SCISSOR_TEST 0x0C11 +#define GL_COLOR_CLEAR_VALUE 0x0C22 +#define GL_COLOR_WRITEMASK 0x0C23 +#define GL_UNPACK_ALIGNMENT 0x0CF5 +#define GL_PACK_ALIGNMENT 0x0D05 +#define GL_MAX_LIGHTS 0x0D31 +#define GL_MAX_CLIP_PLANES 0x0D32 +#define GL_MAX_TEXTURE_SIZE 0x0D33 +#define GL_MAX_MODELVIEW_STACK_DEPTH 0x0D36 +#define GL_MAX_PROJECTION_STACK_DEPTH 0x0D38 +#define GL_MAX_TEXTURE_STACK_DEPTH 0x0D39 +#define GL_MAX_VIEWPORT_DIMS 0x0D3A +#define GL_MAX_TEXTURE_UNITS 0x84E2 +#define GL_SUBPIXEL_BITS 0x0D50 +#define GL_RED_BITS 0x0D52 +#define GL_GREEN_BITS 0x0D53 +#define GL_BLUE_BITS 0x0D54 +#define GL_ALPHA_BITS 0x0D55 +#define GL_DEPTH_BITS 0x0D56 +#define GL_STENCIL_BITS 0x0D57 +#define GL_POLYGON_OFFSET_UNITS 0x2A00 +#define GL_POLYGON_OFFSET_FILL 0x8037 +#define GL_POLYGON_OFFSET_FACTOR 0x8038 +#define GL_TEXTURE_BINDING_2D 0x8069 +#define GL_VERTEX_ARRAY_SIZE 0x807A +#define GL_VERTEX_ARRAY_TYPE 0x807B +#define GL_VERTEX_ARRAY_STRIDE 0x807C +#define GL_NORMAL_ARRAY_TYPE 0x807E +#define GL_NORMAL_ARRAY_STRIDE 0x807F +#define GL_COLOR_ARRAY_SIZE 0x8081 +#define GL_COLOR_ARRAY_TYPE 0x8082 +#define GL_COLOR_ARRAY_STRIDE 0x8083 +#define GL_TEXTURE_COORD_ARRAY_SIZE 0x8088 +#define GL_TEXTURE_COORD_ARRAY_TYPE 0x8089 +#define GL_TEXTURE_COORD_ARRAY_STRIDE 0x808A +#define GL_VERTEX_ARRAY_POINTER 0x808E +#define GL_NORMAL_ARRAY_POINTER 0x808F +#define GL_COLOR_ARRAY_POINTER 0x8090 +#define GL_TEXTURE_COORD_ARRAY_POINTER 0x8092 +#define GL_SAMPLE_BUFFERS 0x80A8 +#define GL_SAMPLES 0x80A9 +#define GL_SAMPLE_COVERAGE_VALUE 0x80AA +#define GL_SAMPLE_COVERAGE_INVERT 0x80AB + +/* GetTextureParameter */ +/* GL_TEXTURE_MAG_FILTER */ +/* GL_TEXTURE_MIN_FILTER */ +/* GL_TEXTURE_WRAP_S */ +/* GL_TEXTURE_WRAP_T */ + +#define GL_NUM_COMPRESSED_TEXTURE_FORMATS 0x86A2 +#define GL_COMPRESSED_TEXTURE_FORMATS 0x86A3 + +/* HintMode */ +#define GL_DONT_CARE 0x1100 +#define GL_FASTEST 0x1101 +#define GL_NICEST 0x1102 + +/* HintTarget */ +#define GL_PERSPECTIVE_CORRECTION_HINT 0x0C50 +#define GL_POINT_SMOOTH_HINT 0x0C51 +#define GL_LINE_SMOOTH_HINT 0x0C52 +#define GL_FOG_HINT 0x0C54 +#define GL_GENERATE_MIPMAP_HINT 0x8192 + +/* LightModelParameter */ +#define GL_LIGHT_MODEL_AMBIENT 0x0B53 +#define GL_LIGHT_MODEL_TWO_SIDE 0x0B52 + +/* LightParameter */ +#define GL_AMBIENT 0x1200 +#define GL_DIFFUSE 0x1201 +#define GL_SPECULAR 0x1202 +#define GL_POSITION 0x1203 +#define GL_SPOT_DIRECTION 0x1204 +#define GL_SPOT_EXPONENT 0x1205 +#define GL_SPOT_CUTOFF 0x1206 +#define GL_CONSTANT_ATTENUATION 0x1207 +#define GL_LINEAR_ATTENUATION 0x1208 +#define GL_QUADRATIC_ATTENUATION 0x1209 + +/* DataType */ +#define GL_BYTE 0x1400 +#define GL_UNSIGNED_BYTE 0x1401 +#define GL_SHORT 0x1402 +#define GL_UNSIGNED_SHORT 0x1403 +#define GL_FLOAT 0x1406 +#define GL_FIXED 0x140C + +/* LogicOp */ +#define GL_CLEAR 0x1500 +#define GL_AND 0x1501 +#define GL_AND_REVERSE 0x1502 +#define GL_COPY 0x1503 +#define GL_AND_INVERTED 0x1504 +#define GL_NOOP 0x1505 +#define GL_XOR 0x1506 +#define GL_OR 0x1507 +#define GL_NOR 0x1508 +#define GL_EQUIV 0x1509 +#define GL_INVERT 0x150A +#define GL_OR_REVERSE 0x150B +#define GL_COPY_INVERTED 0x150C +#define GL_OR_INVERTED 0x150D +#define GL_NAND 0x150E +#define GL_SET 0x150F + +/* MaterialFace */ +/* GL_FRONT_AND_BACK */ + +/* MaterialParameter */ +#define GL_EMISSION 0x1600 +#define GL_SHININESS 0x1601 +#define GL_AMBIENT_AND_DIFFUSE 0x1602 +/* GL_AMBIENT */ +/* GL_DIFFUSE */ +/* GL_SPECULAR */ + +/* MatrixMode */ +#define GL_MODELVIEW 0x1700 +#define GL_PROJECTION 0x1701 +#define GL_TEXTURE 0x1702 + +/* NormalPointerType */ +/* GL_BYTE */ +/* GL_SHORT */ +/* GL_FLOAT */ +/* GL_FIXED */ + +/* PixelFormat */ +#define GL_ALPHA 0x1906 +#define GL_RGB 0x1907 +#define GL_RGBA 0x1908 +#define GL_LUMINANCE 0x1909 +#define GL_LUMINANCE_ALPHA 0x190A + +/* PixelStoreParameter */ +#define GL_UNPACK_ALIGNMENT 0x0CF5 +#define GL_PACK_ALIGNMENT 0x0D05 + +/* PixelType */ +/* GL_UNSIGNED_BYTE */ +#define GL_UNSIGNED_SHORT_4_4_4_4 0x8033 +#define GL_UNSIGNED_SHORT_5_5_5_1 0x8034 +#define GL_UNSIGNED_SHORT_5_6_5 0x8363 + +/* ShadingModel */ +#define GL_FLAT 0x1D00 +#define GL_SMOOTH 0x1D01 + +/* StencilFunction */ +/* GL_NEVER */ +/* GL_LESS */ +/* GL_EQUAL */ +/* GL_LEQUAL */ +/* GL_GREATER */ +/* GL_NOTEQUAL */ +/* GL_GEQUAL */ +/* GL_ALWAYS */ + +/* StencilOp */ +/* GL_ZERO */ +#define GL_KEEP 0x1E00 +#define GL_REPLACE 0x1E01 +#define GL_INCR 0x1E02 +#define GL_DECR 0x1E03 +/* GL_INVERT */ + +/* StringName */ +#define GL_VENDOR 0x1F00 +#define GL_RENDERER 0x1F01 +#define GL_VERSION 0x1F02 +#define GL_EXTENSIONS 0x1F03 + +/* TexCoordPointerType */ +/* GL_SHORT */ +/* GL_FLOAT */ +/* GL_FIXED */ +/* GL_BYTE */ + +/* TextureEnvMode */ +#define GL_MODULATE 0x2100 +#define GL_DECAL 0x2101 +/* GL_BLEND */ +#define GL_ADD 0x0104 +/* GL_REPLACE */ + +/* TextureEnvParameter */ +#define GL_TEXTURE_ENV_MODE 0x2200 +#define GL_TEXTURE_ENV_COLOR 0x2201 + +/* TextureEnvTarget */ +#define GL_TEXTURE_ENV 0x2300 + +/* TextureMagFilter */ +#define GL_NEAREST 0x2600 +#define GL_LINEAR 0x2601 + +/* TextureMinFilter */ +/* GL_NEAREST */ +/* GL_LINEAR */ +#define GL_NEAREST_MIPMAP_NEAREST 0x2700 +#define GL_LINEAR_MIPMAP_NEAREST 0x2701 +#define GL_NEAREST_MIPMAP_LINEAR 0x2702 +#define GL_LINEAR_MIPMAP_LINEAR 0x2703 + +/* TextureParameterName */ +#define GL_TEXTURE_MAG_FILTER 0x2800 +#define GL_TEXTURE_MIN_FILTER 0x2801 +#define GL_TEXTURE_WRAP_S 0x2802 +#define GL_TEXTURE_WRAP_T 0x2803 +#define GL_GENERATE_MIPMAP 0x8191 + +/* TextureTarget */ +/* GL_TEXTURE_2D */ + +/* TextureUnit */ +#define GL_TEXTURE0 0x84C0 +#define GL_TEXTURE1 0x84C1 +#define GL_TEXTURE2 0x84C2 +#define GL_TEXTURE3 0x84C3 +#define GL_TEXTURE4 0x84C4 +#define GL_TEXTURE5 0x84C5 +#define GL_TEXTURE6 0x84C6 +#define GL_TEXTURE7 0x84C7 +#define GL_TEXTURE8 0x84C8 +#define GL_TEXTURE9 0x84C9 +#define GL_TEXTURE10 0x84CA +#define GL_TEXTURE11 0x84CB +#define GL_TEXTURE12 0x84CC +#define GL_TEXTURE13 0x84CD +#define GL_TEXTURE14 0x84CE +#define GL_TEXTURE15 0x84CF +#define GL_TEXTURE16 0x84D0 +#define GL_TEXTURE17 0x84D1 +#define GL_TEXTURE18 0x84D2 +#define GL_TEXTURE19 0x84D3 +#define GL_TEXTURE20 0x84D4 +#define GL_TEXTURE21 0x84D5 +#define GL_TEXTURE22 0x84D6 +#define GL_TEXTURE23 0x84D7 +#define GL_TEXTURE24 0x84D8 +#define GL_TEXTURE25 0x84D9 +#define GL_TEXTURE26 0x84DA +#define GL_TEXTURE27 0x84DB +#define GL_TEXTURE28 0x84DC +#define GL_TEXTURE29 0x84DD +#define GL_TEXTURE30 0x84DE +#define GL_TEXTURE31 0x84DF +#define GL_ACTIVE_TEXTURE 0x84E0 +#define GL_CLIENT_ACTIVE_TEXTURE 0x84E1 + +/* TextureWrapMode */ +#define GL_REPEAT 0x2901 +#define GL_CLAMP_TO_EDGE 0x812F + +/* VertexPointerType */ +/* GL_SHORT */ +/* GL_FLOAT */ +/* GL_FIXED */ +/* GL_BYTE */ + +/* LightName */ +#define GL_LIGHT0 0x4000 +#define GL_LIGHT1 0x4001 +#define GL_LIGHT2 0x4002 +#define GL_LIGHT3 0x4003 +#define GL_LIGHT4 0x4004 +#define GL_LIGHT5 0x4005 +#define GL_LIGHT6 0x4006 +#define GL_LIGHT7 0x4007 + +/* Buffer Objects */ +#define GL_ARRAY_BUFFER 0x8892 +#define GL_ELEMENT_ARRAY_BUFFER 0x8893 + +#define GL_ARRAY_BUFFER_BINDING 0x8894 +#define GL_ELEMENT_ARRAY_BUFFER_BINDING 0x8895 +#define GL_VERTEX_ARRAY_BUFFER_BINDING 0x8896 +#define GL_NORMAL_ARRAY_BUFFER_BINDING 0x8897 +#define GL_COLOR_ARRAY_BUFFER_BINDING 0x8898 +#define GL_TEXTURE_COORD_ARRAY_BUFFER_BINDING 0x889A + +#define GL_STATIC_DRAW 0x88E4 +#define GL_DYNAMIC_DRAW 0x88E8 + +#define GL_BUFFER_SIZE 0x8764 +#define GL_BUFFER_USAGE 0x8765 + +/* Texture combine + dot3 */ +#define GL_SUBTRACT 0x84E7 +#define GL_COMBINE 0x8570 +#define GL_COMBINE_RGB 0x8571 +#define GL_COMBINE_ALPHA 0x8572 +#define GL_RGB_SCALE 0x8573 +#define GL_ADD_SIGNED 0x8574 +#define GL_INTERPOLATE 0x8575 +#define GL_CONSTANT 0x8576 +#define GL_PRIMARY_COLOR 0x8577 +#define GL_PREVIOUS 0x8578 +#define GL_OPERAND0_RGB 0x8590 +#define GL_OPERAND1_RGB 0x8591 +#define GL_OPERAND2_RGB 0x8592 +#define GL_OPERAND0_ALPHA 0x8598 +#define GL_OPERAND1_ALPHA 0x8599 +#define GL_OPERAND2_ALPHA 0x859A + +#define GL_ALPHA_SCALE 0x0D1C + +#define GL_SRC0_RGB 0x8580 +#define GL_SRC1_RGB 0x8581 +#define GL_SRC2_RGB 0x8582 +#define GL_SRC0_ALPHA 0x8588 +#define GL_SRC1_ALPHA 0x8589 +#define GL_SRC2_ALPHA 0x858A + +#define GL_DOT3_RGB 0x86AE +#define GL_DOT3_RGBA 0x86AF + +/*------------------------------------------------------------------------* + * required OES extension tokens + *------------------------------------------------------------------------*/ + +/* OES_read_format */ +#ifndef GL_OES_read_format +#define GL_IMPLEMENTATION_COLOR_READ_TYPE_OES 0x8B9A +#define GL_IMPLEMENTATION_COLOR_READ_FORMAT_OES 0x8B9B +#endif + +/* GL_OES_compressed_paletted_texture */ +#ifndef GL_OES_compressed_paletted_texture +#define GL_PALETTE4_RGB8_OES 0x8B90 +#define GL_PALETTE4_RGBA8_OES 0x8B91 +#define GL_PALETTE4_R5_G6_B5_OES 0x8B92 +#define GL_PALETTE4_RGBA4_OES 0x8B93 +#define GL_PALETTE4_RGB5_A1_OES 0x8B94 +#define GL_PALETTE8_RGB8_OES 0x8B95 +#define GL_PALETTE8_RGBA8_OES 0x8B96 +#define GL_PALETTE8_R5_G6_B5_OES 0x8B97 +#define GL_PALETTE8_RGBA4_OES 0x8B98 +#define GL_PALETTE8_RGB5_A1_OES 0x8B99 +#endif + +/* OES_point_size_array */ +#ifndef GL_OES_point_size_array +#define GL_POINT_SIZE_ARRAY_OES 0x8B9C +#define GL_POINT_SIZE_ARRAY_TYPE_OES 0x898A +#define GL_POINT_SIZE_ARRAY_STRIDE_OES 0x898B +#define GL_POINT_SIZE_ARRAY_POINTER_OES 0x898C +#define GL_POINT_SIZE_ARRAY_BUFFER_BINDING_OES 0x8B9F +#endif + +/* GL_OES_point_sprite */ +#ifndef GL_OES_point_sprite +#define GL_POINT_SPRITE_OES 0x8861 +#define GL_COORD_REPLACE_OES 0x8862 +#endif + +/*************************************************************/ + +/* Available only in Common profile */ +GL_API void GL_APIENTRY glAlphaFunc (GLenum func, GLclampf ref); +GL_API void GL_APIENTRY glClearColor (GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha); +GL_API void GL_APIENTRY glClearDepthf (GLclampf depth); +GL_API void GL_APIENTRY glClipPlanef (GLenum plane, const GLfloat *equation); +GL_API void GL_APIENTRY glColor4f (GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha); +GL_API void GL_APIENTRY glDepthRangef (GLclampf zNear, GLclampf zFar); +GL_API void GL_APIENTRY glFogf (GLenum pname, GLfloat param); +GL_API void GL_APIENTRY glFogfv (GLenum pname, const GLfloat *params); +GL_API void GL_APIENTRY glFrustumf (GLfloat left, GLfloat right, GLfloat bottom, GLfloat top, GLfloat zNear, GLfloat zFar); +GL_API void GL_APIENTRY glGetClipPlanef (GLenum pname, GLfloat eqn[4]); +GL_API void GL_APIENTRY glGetFloatv (GLenum pname, GLfloat *params); +GL_API void GL_APIENTRY glGetLightfv (GLenum light, GLenum pname, GLfloat *params); +GL_API void GL_APIENTRY glGetMaterialfv (GLenum face, GLenum pname, GLfloat *params); +GL_API void GL_APIENTRY glGetTexEnvfv (GLenum env, GLenum pname, GLfloat *params); +GL_API void GL_APIENTRY glGetTexParameterfv (GLenum target, GLenum pname, GLfloat *params); +GL_API void GL_APIENTRY glLightModelf (GLenum pname, GLfloat param); +GL_API void GL_APIENTRY glLightModelfv (GLenum pname, const GLfloat *params); +GL_API void GL_APIENTRY glLightf (GLenum light, GLenum pname, GLfloat param); +GL_API void GL_APIENTRY glLightfv (GLenum light, GLenum pname, const GLfloat *params); +GL_API void GL_APIENTRY glLineWidth (GLfloat width); +GL_API void GL_APIENTRY glLoadMatrixf (const GLfloat *m); +GL_API void GL_APIENTRY glMaterialf (GLenum face, GLenum pname, GLfloat param); +GL_API void GL_APIENTRY glMaterialfv (GLenum face, GLenum pname, const GLfloat *params); +GL_API void GL_APIENTRY glMultMatrixf (const GLfloat *m); +GL_API void GL_APIENTRY glMultiTexCoord4f (GLenum target, GLfloat s, GLfloat t, GLfloat r, GLfloat q); +GL_API void GL_APIENTRY glNormal3f (GLfloat nx, GLfloat ny, GLfloat nz); +GL_API void GL_APIENTRY glOrthof (GLfloat left, GLfloat right, GLfloat bottom, GLfloat top, GLfloat zNear, GLfloat zFar); +GL_API void GL_APIENTRY glPointParameterf (GLenum pname, GLfloat param); +GL_API void GL_APIENTRY glPointParameterfv (GLenum pname, const GLfloat *params); +GL_API void GL_APIENTRY glPointSize (GLfloat size); +GL_API void GL_APIENTRY glPolygonOffset (GLfloat factor, GLfloat units); +GL_API void GL_APIENTRY glRotatef (GLfloat angle, GLfloat x, GLfloat y, GLfloat z); +GL_API void GL_APIENTRY glScalef (GLfloat x, GLfloat y, GLfloat z); +GL_API void GL_APIENTRY glTexEnvf (GLenum target, GLenum pname, GLfloat param); +GL_API void GL_APIENTRY glTexEnvfv (GLenum target, GLenum pname, const GLfloat *params); +GL_API void GL_APIENTRY glTexParameterf (GLenum target, GLenum pname, GLfloat param); +GL_API void GL_APIENTRY glTexParameterfv (GLenum target, GLenum pname, const GLfloat *params); +GL_API void GL_APIENTRY glTranslatef (GLfloat x, GLfloat y, GLfloat z); + +/* Available in both Common and Common-Lite profiles */ +GL_API void GL_APIENTRY glActiveTexture (GLenum texture); +GL_API void GL_APIENTRY glAlphaFuncx (GLenum func, GLclampx ref); +GL_API void GL_APIENTRY glBindBuffer (GLenum target, GLuint buffer); +GL_API void GL_APIENTRY glBindTexture (GLenum target, GLuint texture); +GL_API void GL_APIENTRY glBlendFunc (GLenum sfactor, GLenum dfactor); +GL_API void GL_APIENTRY glBufferData (GLenum target, GLsizeiptr size, const GLvoid *data, GLenum usage); +GL_API void GL_APIENTRY glBufferSubData (GLenum target, GLintptr offset, GLsizeiptr size, const GLvoid *data); +GL_API void GL_APIENTRY glClear (GLbitfield mask); +GL_API void GL_APIENTRY glClearColorx (GLclampx red, GLclampx green, GLclampx blue, GLclampx alpha); +GL_API void GL_APIENTRY glClearDepthx (GLclampx depth); +GL_API void GL_APIENTRY glClearStencil (GLint s); +GL_API void GL_APIENTRY glClientActiveTexture (GLenum texture); +GL_API void GL_APIENTRY glClipPlanex (GLenum plane, const GLfixed *equation); +GL_API void GL_APIENTRY glColor4ub (GLubyte red, GLubyte green, GLubyte blue, GLubyte alpha); +GL_API void GL_APIENTRY glColor4x (GLfixed red, GLfixed green, GLfixed blue, GLfixed alpha); +GL_API void GL_APIENTRY glColorMask (GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha); +GL_API void GL_APIENTRY glColorPointer (GLint size, GLenum type, GLsizei stride, const GLvoid *pointer); +GL_API void GL_APIENTRY glCompressedTexImage2D (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const GLvoid *data); +GL_API void GL_APIENTRY glCompressedTexSubImage2D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const GLvoid *data); +GL_API void GL_APIENTRY glCopyTexImage2D (GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border); +GL_API void GL_APIENTRY glCopyTexSubImage2D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height); +GL_API void GL_APIENTRY glCullFace (GLenum mode); +GL_API void GL_APIENTRY glDeleteBuffers (GLsizei n, const GLuint *buffers); +GL_API void GL_APIENTRY glDeleteTextures (GLsizei n, const GLuint *textures); +GL_API void GL_APIENTRY glDepthFunc (GLenum func); +GL_API void GL_APIENTRY glDepthMask (GLboolean flag); +GL_API void GL_APIENTRY glDepthRangex (GLclampx zNear, GLclampx zFar); +GL_API void GL_APIENTRY glDisable (GLenum cap); +GL_API void GL_APIENTRY glDisableClientState (GLenum array); +GL_API void GL_APIENTRY glDrawArrays (GLenum mode, GLint first, GLsizei count); +GL_API void GL_APIENTRY glDrawElements (GLenum mode, GLsizei count, GLenum type, const GLvoid *indices); +GL_API void GL_APIENTRY glEnable (GLenum cap); +GL_API void GL_APIENTRY glEnableClientState (GLenum array); +GL_API void GL_APIENTRY glFinish (void); +GL_API void GL_APIENTRY glFlush (void); +GL_API void GL_APIENTRY glFogx (GLenum pname, GLfixed param); +GL_API void GL_APIENTRY glFogxv (GLenum pname, const GLfixed *params); +GL_API void GL_APIENTRY glFrontFace (GLenum mode); +GL_API void GL_APIENTRY glFrustumx (GLfixed left, GLfixed right, GLfixed bottom, GLfixed top, GLfixed zNear, GLfixed zFar); +GL_API void GL_APIENTRY glGetBooleanv (GLenum pname, GLboolean *params); +GL_API void GL_APIENTRY glGetBufferParameteriv (GLenum target, GLenum pname, GLint *params); +GL_API void GL_APIENTRY glGetClipPlanex (GLenum pname, GLfixed eqn[4]); +GL_API void GL_APIENTRY glGenBuffers (GLsizei n, GLuint *buffers); +GL_API void GL_APIENTRY glGenTextures (GLsizei n, GLuint *textures); +GL_API GLenum GL_APIENTRY glGetError (void); +GL_API void GL_APIENTRY glGetFixedv (GLenum pname, GLfixed *params); +GL_API void GL_APIENTRY glGetIntegerv (GLenum pname, GLint *params); +GL_API void GL_APIENTRY glGetLightxv (GLenum light, GLenum pname, GLfixed *params); +GL_API void GL_APIENTRY glGetMaterialxv (GLenum face, GLenum pname, GLfixed *params); +GL_API void GL_APIENTRY glGetPointerv (GLenum pname, GLvoid **params); +GL_API const GLubyte * GL_APIENTRY glGetString (GLenum name); +GL_API void GL_APIENTRY glGetTexEnviv (GLenum env, GLenum pname, GLint *params); +GL_API void GL_APIENTRY glGetTexEnvxv (GLenum env, GLenum pname, GLfixed *params); +GL_API void GL_APIENTRY glGetTexParameteriv (GLenum target, GLenum pname, GLint *params); +GL_API void GL_APIENTRY glGetTexParameterxv (GLenum target, GLenum pname, GLfixed *params); +GL_API void GL_APIENTRY glHint (GLenum target, GLenum mode); +GL_API GLboolean GL_APIENTRY glIsBuffer (GLuint buffer); +GL_API GLboolean GL_APIENTRY glIsEnabled (GLenum cap); +GL_API GLboolean GL_APIENTRY glIsTexture (GLuint texture); +GL_API void GL_APIENTRY glLightModelx (GLenum pname, GLfixed param); +GL_API void GL_APIENTRY glLightModelxv (GLenum pname, const GLfixed *params); +GL_API void GL_APIENTRY glLightx (GLenum light, GLenum pname, GLfixed param); +GL_API void GL_APIENTRY glLightxv (GLenum light, GLenum pname, const GLfixed *params); +GL_API void GL_APIENTRY glLineWidthx (GLfixed width); +GL_API void GL_APIENTRY glLoadIdentity (void); +GL_API void GL_APIENTRY glLoadMatrixx (const GLfixed *m); +GL_API void GL_APIENTRY glLogicOp (GLenum opcode); +GL_API void GL_APIENTRY glMaterialx (GLenum face, GLenum pname, GLfixed param); +GL_API void GL_APIENTRY glMaterialxv (GLenum face, GLenum pname, const GLfixed *params); +GL_API void GL_APIENTRY glMatrixMode (GLenum mode); +GL_API void GL_APIENTRY glMultMatrixx (const GLfixed *m); +GL_API void GL_APIENTRY glMultiTexCoord4x (GLenum target, GLfixed s, GLfixed t, GLfixed r, GLfixed q); +GL_API void GL_APIENTRY glNormal3x (GLfixed nx, GLfixed ny, GLfixed nz); +GL_API void GL_APIENTRY glNormalPointer (GLenum type, GLsizei stride, const GLvoid *pointer); +GL_API void GL_APIENTRY glOrthox (GLfixed left, GLfixed right, GLfixed bottom, GLfixed top, GLfixed zNear, GLfixed zFar); +GL_API void GL_APIENTRY glPixelStorei (GLenum pname, GLint param); +GL_API void GL_APIENTRY glPointParameterx (GLenum pname, GLfixed param); +GL_API void GL_APIENTRY glPointParameterxv (GLenum pname, const GLfixed *params); +GL_API void GL_APIENTRY glPointSizex (GLfixed size); +GL_API void GL_APIENTRY glPolygonOffsetx (GLfixed factor, GLfixed units); +GL_API void GL_APIENTRY glPopMatrix (void); +GL_API void GL_APIENTRY glPushMatrix (void); +GL_API void GL_APIENTRY glReadPixels (GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLvoid *pixels); +GL_API void GL_APIENTRY glRotatex (GLfixed angle, GLfixed x, GLfixed y, GLfixed z); +GL_API void GL_APIENTRY glSampleCoverage (GLclampf value, GLboolean invert); +GL_API void GL_APIENTRY glSampleCoveragex (GLclampx value, GLboolean invert); +GL_API void GL_APIENTRY glScalex (GLfixed x, GLfixed y, GLfixed z); +GL_API void GL_APIENTRY glScissor (GLint x, GLint y, GLsizei width, GLsizei height); +GL_API void GL_APIENTRY glShadeModel (GLenum mode); +GL_API void GL_APIENTRY glStencilFunc (GLenum func, GLint ref, GLuint mask); +GL_API void GL_APIENTRY glStencilMask (GLuint mask); +GL_API void GL_APIENTRY glStencilOp (GLenum fail, GLenum zfail, GLenum zpass); +GL_API void GL_APIENTRY glTexCoordPointer (GLint size, GLenum type, GLsizei stride, const GLvoid *pointer); +GL_API void GL_APIENTRY glTexEnvi (GLenum target, GLenum pname, GLint param); +GL_API void GL_APIENTRY glTexEnvx (GLenum target, GLenum pname, GLfixed param); +GL_API void GL_APIENTRY glTexEnviv (GLenum target, GLenum pname, const GLint *params); +GL_API void GL_APIENTRY glTexEnvxv (GLenum target, GLenum pname, const GLfixed *params); +GL_API void GL_APIENTRY glTexImage2D (GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const GLvoid *pixels); +GL_API void GL_APIENTRY glTexParameteri (GLenum target, GLenum pname, GLint param); +GL_API void GL_APIENTRY glTexParameterx (GLenum target, GLenum pname, GLfixed param); +GL_API void GL_APIENTRY glTexParameteriv (GLenum target, GLenum pname, const GLint *params); +GL_API void GL_APIENTRY glTexParameterxv (GLenum target, GLenum pname, const GLfixed *params); +GL_API void GL_APIENTRY glTexSubImage2D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *pixels); +GL_API void GL_APIENTRY glTranslatex (GLfixed x, GLfixed y, GLfixed z); +GL_API void GL_APIENTRY glVertexPointer (GLint size, GLenum type, GLsizei stride, const GLvoid *pointer); +GL_API void GL_APIENTRY glViewport (GLint x, GLint y, GLsizei width, GLsizei height); + +/*------------------------------------------------------------------------* + * Required OES extension functions + *------------------------------------------------------------------------*/ + +/* GL_OES_read_format */ +#ifndef GL_OES_read_format +#define GL_OES_read_format 1 +#endif + +/* GL_OES_compressed_paletted_texture */ +#ifndef GL_OES_compressed_paletted_texture +#define GL_OES_compressed_paletted_texture 1 +#endif + +/* GL_OES_point_size_array */ +#ifndef GL_OES_point_size_array +#define GL_OES_point_size_array 1 +GL_API void GL_APIENTRY glPointSizePointerOES (GLenum type, GLsizei stride, const GLvoid *pointer); +#endif + +/* GL_OES_point_sprite */ +#ifndef GL_OES_point_sprite +#define GL_OES_point_sprite 1 +#endif + +#ifdef __cplusplus +} +#endif + +#endif /* __gl_h_ */ +
diff --git a/third_party/mesa_headers/GLES/glext.h b/third_party/mesa_headers/GLES/glext.h new file mode 100644 index 0000000..130e4b0 --- /dev/null +++ b/third_party/mesa_headers/GLES/glext.h
@@ -0,0 +1,1073 @@ +#ifndef __glext_h_ +#define __glext_h_ + +/* $Revision: 13240 $ on $Date:: 2010-12-17 15:16:00 -0800 #$ */ + +#ifdef __cplusplus +extern "C" { +#endif + +/* + * This document is licensed under the SGI Free Software B License Version + * 2.0. For details, see http://oss.sgi.com/projects/FreeB/ . + */ + +#ifndef GL_APIENTRYP +# define GL_APIENTRYP GL_APIENTRY* +#endif + +/*------------------------------------------------------------------------* + * OES extension tokens + *------------------------------------------------------------------------*/ + +/* GL_OES_blend_equation_separate */ +#ifndef GL_OES_blend_equation_separate +/* BLEND_EQUATION_RGB_OES same as BLEND_EQUATION_OES */ +#define GL_BLEND_EQUATION_RGB_OES 0x8009 +#define GL_BLEND_EQUATION_ALPHA_OES 0x883D +#endif + +/* GL_OES_blend_func_separate */ +#ifndef GL_OES_blend_func_separate +#define GL_BLEND_DST_RGB_OES 0x80C8 +#define GL_BLEND_SRC_RGB_OES 0x80C9 +#define GL_BLEND_DST_ALPHA_OES 0x80CA +#define GL_BLEND_SRC_ALPHA_OES 0x80CB +#endif + +/* GL_OES_blend_subtract */ +#ifndef GL_OES_blend_subtract +#define GL_BLEND_EQUATION_OES 0x8009 +#define GL_FUNC_ADD_OES 0x8006 +#define GL_FUNC_SUBTRACT_OES 0x800A +#define GL_FUNC_REVERSE_SUBTRACT_OES 0x800B +#endif + +/* GL_OES_compressed_ETC1_RGB8_texture */ +#ifndef GL_OES_compressed_ETC1_RGB8_texture +#define GL_ETC1_RGB8_OES 0x8D64 +#endif + +/* GL_OES_depth24 */ +#ifndef GL_OES_depth24 +#define GL_DEPTH_COMPONENT24_OES 0x81A6 +#endif + +/* GL_OES_depth32 */ +#ifndef GL_OES_depth32 +#define GL_DEPTH_COMPONENT32_OES 0x81A7 +#endif + +/* GL_OES_draw_texture */ +#ifndef GL_OES_draw_texture +#define GL_TEXTURE_CROP_RECT_OES 0x8B9D +#endif + +/* GL_OES_EGL_image */ +#ifndef GL_OES_EGL_image +typedef void* GLeglImageOES; +#endif + +/* GL_OES_EGL_image_external */ +#ifndef GL_OES_EGL_image_external +/* GLeglImageOES defined in GL_OES_EGL_image already. */ +#define GL_TEXTURE_EXTERNAL_OES 0x8D65 +#define GL_TEXTURE_BINDING_EXTERNAL_OES 0x8D67 +#define GL_REQUIRED_TEXTURE_IMAGE_UNITS_OES 0x8D68 +#endif + +/* GL_OES_element_index_uint */ +#ifndef GL_OES_element_index_uint +#define GL_UNSIGNED_INT 0x1405 +#endif + +/* GL_OES_fixed_point */ +#ifndef GL_OES_fixed_point +#define GL_FIXED_OES 0x140C +#endif + +/* GL_OES_framebuffer_object */ +#ifndef GL_OES_framebuffer_object +#define GL_NONE_OES 0 +#define GL_FRAMEBUFFER_OES 0x8D40 +#define GL_RENDERBUFFER_OES 0x8D41 +#define GL_RGBA4_OES 0x8056 +#define GL_RGB5_A1_OES 0x8057 +#define GL_RGB565_OES 0x8D62 +#define GL_DEPTH_COMPONENT16_OES 0x81A5 +#define GL_RENDERBUFFER_WIDTH_OES 0x8D42 +#define GL_RENDERBUFFER_HEIGHT_OES 0x8D43 +#define GL_RENDERBUFFER_INTERNAL_FORMAT_OES 0x8D44 +#define GL_RENDERBUFFER_RED_SIZE_OES 0x8D50 +#define GL_RENDERBUFFER_GREEN_SIZE_OES 0x8D51 +#define GL_RENDERBUFFER_BLUE_SIZE_OES 0x8D52 +#define GL_RENDERBUFFER_ALPHA_SIZE_OES 0x8D53 +#define GL_RENDERBUFFER_DEPTH_SIZE_OES 0x8D54 +#define GL_RENDERBUFFER_STENCIL_SIZE_OES 0x8D55 +#define GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE_OES 0x8CD0 +#define GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME_OES 0x8CD1 +#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL_OES 0x8CD2 +#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE_OES 0x8CD3 +#define GL_COLOR_ATTACHMENT0_OES 0x8CE0 +#define GL_DEPTH_ATTACHMENT_OES 0x8D00 +#define GL_STENCIL_ATTACHMENT_OES 0x8D20 +#define GL_FRAMEBUFFER_COMPLETE_OES 0x8CD5 +#define GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT_OES 0x8CD6 +#define GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT_OES 0x8CD7 +#define GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS_OES 0x8CD9 +#define GL_FRAMEBUFFER_INCOMPLETE_FORMATS_OES 0x8CDA +#define GL_FRAMEBUFFER_UNSUPPORTED_OES 0x8CDD +#define GL_FRAMEBUFFER_BINDING_OES 0x8CA6 +#define GL_RENDERBUFFER_BINDING_OES 0x8CA7 +#define GL_MAX_RENDERBUFFER_SIZE_OES 0x84E8 +#define GL_INVALID_FRAMEBUFFER_OPERATION_OES 0x0506 +#endif + +/* GL_OES_mapbuffer */ +#ifndef GL_OES_mapbuffer +#define GL_WRITE_ONLY_OES 0x88B9 +#define GL_BUFFER_ACCESS_OES 0x88BB +#define GL_BUFFER_MAPPED_OES 0x88BC +#define GL_BUFFER_MAP_POINTER_OES 0x88BD +#endif + +/* GL_OES_matrix_get */ +#ifndef GL_OES_matrix_get +#define GL_MODELVIEW_MATRIX_FLOAT_AS_INT_BITS_OES 0x898D +#define GL_PROJECTION_MATRIX_FLOAT_AS_INT_BITS_OES 0x898E +#define GL_TEXTURE_MATRIX_FLOAT_AS_INT_BITS_OES 0x898F +#endif + +/* GL_OES_matrix_palette */ +#ifndef GL_OES_matrix_palette +#define GL_MAX_VERTEX_UNITS_OES 0x86A4 +#define GL_MAX_PALETTE_MATRICES_OES 0x8842 +#define GL_MATRIX_PALETTE_OES 0x8840 +#define GL_MATRIX_INDEX_ARRAY_OES 0x8844 +#define GL_WEIGHT_ARRAY_OES 0x86AD +#define GL_CURRENT_PALETTE_MATRIX_OES 0x8843 +#define GL_MATRIX_INDEX_ARRAY_SIZE_OES 0x8846 +#define GL_MATRIX_INDEX_ARRAY_TYPE_OES 0x8847 +#define GL_MATRIX_INDEX_ARRAY_STRIDE_OES 0x8848 +#define GL_MATRIX_INDEX_ARRAY_POINTER_OES 0x8849 +#define GL_MATRIX_INDEX_ARRAY_BUFFER_BINDING_OES 0x8B9E +#define GL_WEIGHT_ARRAY_SIZE_OES 0x86AB +#define GL_WEIGHT_ARRAY_TYPE_OES 0x86A9 +#define GL_WEIGHT_ARRAY_STRIDE_OES 0x86AA +#define GL_WEIGHT_ARRAY_POINTER_OES 0x86AC +#define GL_WEIGHT_ARRAY_BUFFER_BINDING_OES 0x889E +#endif + +/* GL_OES_packed_depth_stencil */ +#ifndef GL_OES_packed_depth_stencil +#define GL_DEPTH_STENCIL_OES 0x84F9 +#define GL_UNSIGNED_INT_24_8_OES 0x84FA +#define GL_DEPTH24_STENCIL8_OES 0x88F0 +#endif + +/* GL_OES_rgb8_rgba8 */ +#ifndef GL_OES_rgb8_rgba8 +#define GL_RGB8_OES 0x8051 +#define GL_RGBA8_OES 0x8058 +#endif + +/* GL_OES_stencil1 */ +#ifndef GL_OES_stencil1 +#define GL_STENCIL_INDEX1_OES 0x8D46 +#endif + +/* GL_OES_stencil4 */ +#ifndef GL_OES_stencil4 +#define GL_STENCIL_INDEX4_OES 0x8D47 +#endif + +/* GL_OES_stencil8 */ +#ifndef GL_OES_stencil8 +#define GL_STENCIL_INDEX8_OES 0x8D48 +#endif + +/* GL_OES_stencil_wrap */ +#ifndef GL_OES_stencil_wrap +#define GL_INCR_WRAP_OES 0x8507 +#define GL_DECR_WRAP_OES 0x8508 +#endif + +/* GL_OES_texture_cube_map */ +#ifndef GL_OES_texture_cube_map +#define GL_NORMAL_MAP_OES 0x8511 +#define GL_REFLECTION_MAP_OES 0x8512 +#define GL_TEXTURE_CUBE_MAP_OES 0x8513 +#define GL_TEXTURE_BINDING_CUBE_MAP_OES 0x8514 +#define GL_TEXTURE_CUBE_MAP_POSITIVE_X_OES 0x8515 +#define GL_TEXTURE_CUBE_MAP_NEGATIVE_X_OES 0x8516 +#define GL_TEXTURE_CUBE_MAP_POSITIVE_Y_OES 0x8517 +#define GL_TEXTURE_CUBE_MAP_NEGATIVE_Y_OES 0x8518 +#define GL_TEXTURE_CUBE_MAP_POSITIVE_Z_OES 0x8519 +#define GL_TEXTURE_CUBE_MAP_NEGATIVE_Z_OES 0x851A +#define GL_MAX_CUBE_MAP_TEXTURE_SIZE_OES 0x851C +#define GL_TEXTURE_GEN_MODE_OES 0x2500 +#define GL_TEXTURE_GEN_STR_OES 0x8D60 +#endif + +/* GL_OES_texture_mirrored_repeat */ +#ifndef GL_OES_texture_mirrored_repeat +#define GL_MIRRORED_REPEAT_OES 0x8370 +#endif + +/* GL_OES_vertex_array_object */ +#ifndef GL_OES_vertex_array_object +#define GL_VERTEX_ARRAY_BINDING_OES 0x85B5 +#endif + +/*------------------------------------------------------------------------* + * AMD extension tokens + *------------------------------------------------------------------------*/ + +/* GL_AMD_compressed_3DC_texture */ +#ifndef GL_AMD_compressed_3DC_texture +#define GL_3DC_X_AMD 0x87F9 +#define GL_3DC_XY_AMD 0x87FA +#endif + +/* GL_AMD_compressed_ATC_texture */ +#ifndef GL_AMD_compressed_ATC_texture +#define GL_ATC_RGB_AMD 0x8C92 +#define GL_ATC_RGBA_EXPLICIT_ALPHA_AMD 0x8C93 +#define GL_ATC_RGBA_INTERPOLATED_ALPHA_AMD 0x87EE +#endif + +/*------------------------------------------------------------------------* + * APPLE extension tokens + *------------------------------------------------------------------------*/ + +/* GL_APPLE_texture_2D_limited_npot */ +/* No new tokens introduced by this extension. */ + +/* GL_APPLE_framebuffer_multisample */ +#ifndef GL_APPLE_framebuffer_multisample +#define GL_RENDERBUFFER_SAMPLES_APPLE 0x8CAB +#define GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE_APPLE 0x8D56 +#define GL_MAX_SAMPLES_APPLE 0x8D57 +#define GL_READ_FRAMEBUFFER_APPLE 0x8CA8 +#define GL_DRAW_FRAMEBUFFER_APPLE 0x8CA9 +#define GL_DRAW_FRAMEBUFFER_BINDING_APPLE 0x8CA6 +#define GL_READ_FRAMEBUFFER_BINDING_APPLE 0x8CAA +#endif + +/* GL_APPLE_texture_format_BGRA8888 */ +#ifndef GL_APPLE_texture_format_BGRA8888 +#define GL_BGRA_EXT 0x80E1 +#endif + +/* GL_APPLE_texture_max_level */ +#ifndef GL_APPLE_texture_max_level +#define GL_TEXTURE_MAX_LEVEL_APPLE 0x813D +#endif + +/*------------------------------------------------------------------------* + * ARM extension tokens + *------------------------------------------------------------------------*/ + +/* GL_ARM_rgba8 */ +/* No new tokens introduced by this extension. */ + +/*------------------------------------------------------------------------* + * EXT extension tokens + *------------------------------------------------------------------------*/ + +/* GL_EXT_blend_minmax */ +#ifndef GL_EXT_blend_minmax +#define GL_MIN_EXT 0x8007 +#define GL_MAX_EXT 0x8008 +#endif + +/* GL_EXT_discard_framebuffer */ +#ifndef GL_EXT_discard_framebuffer +#define GL_COLOR_EXT 0x1800 +#define GL_DEPTH_EXT 0x1801 +#define GL_STENCIL_EXT 0x1802 +#endif + +/* GL_EXT_multi_draw_arrays */ +/* No new tokens introduced by this extension. */ + +/* GL_EXT_read_format_bgra */ +#ifndef GL_EXT_read_format_bgra +#define GL_BGRA_EXT 0x80E1 +#define GL_UNSIGNED_SHORT_4_4_4_4_REV_EXT 0x8365 +#define GL_UNSIGNED_SHORT_1_5_5_5_REV_EXT 0x8366 +#endif + +/* GL_EXT_texture_filter_anisotropic */ +#ifndef GL_EXT_texture_filter_anisotropic +#define GL_TEXTURE_MAX_ANISOTROPY_EXT 0x84FE +#define GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT 0x84FF +#endif + +/* GL_EXT_texture_format_BGRA8888 */ +#ifndef GL_EXT_texture_format_BGRA8888 +#define GL_BGRA_EXT 0x80E1 +#endif + +/* GL_EXT_texture_lod_bias */ +#ifndef GL_EXT_texture_lod_bias +#define GL_MAX_TEXTURE_LOD_BIAS_EXT 0x84FD +#define GL_TEXTURE_FILTER_CONTROL_EXT 0x8500 +#define GL_TEXTURE_LOD_BIAS_EXT 0x8501 +#endif + +/*------------------------------------------------------------------------* + * IMG extension tokens + *------------------------------------------------------------------------*/ + +/* GL_IMG_read_format */ +#ifndef GL_IMG_read_format +#define GL_BGRA_IMG 0x80E1 +#define GL_UNSIGNED_SHORT_4_4_4_4_REV_IMG 0x8365 +#endif + +/* GL_IMG_texture_compression_pvrtc */ +#ifndef GL_IMG_texture_compression_pvrtc +#define GL_COMPRESSED_RGB_PVRTC_4BPPV1_IMG 0x8C00 +#define GL_COMPRESSED_RGB_PVRTC_2BPPV1_IMG 0x8C01 +#define GL_COMPRESSED_RGBA_PVRTC_4BPPV1_IMG 0x8C02 +#define GL_COMPRESSED_RGBA_PVRTC_2BPPV1_IMG 0x8C03 +#endif + +/* GL_IMG_texture_env_enhanced_fixed_function */ +#ifndef GL_IMG_texture_env_enhanced_fixed_function +#define GL_MODULATE_COLOR_IMG 0x8C04 +#define GL_RECIP_ADD_SIGNED_ALPHA_IMG 0x8C05 +#define GL_TEXTURE_ALPHA_MODULATE_IMG 0x8C06 +#define GL_FACTOR_ALPHA_MODULATE_IMG 0x8C07 +#define GL_FRAGMENT_ALPHA_MODULATE_IMG 0x8C08 +#define GL_ADD_BLEND_IMG 0x8C09 +#define GL_DOT3_RGBA_IMG 0x86AF +#endif + +/* GL_IMG_user_clip_plane */ +#ifndef GL_IMG_user_clip_plane +#define GL_CLIP_PLANE0_IMG 0x3000 +#define GL_CLIP_PLANE1_IMG 0x3001 +#define GL_CLIP_PLANE2_IMG 0x3002 +#define GL_CLIP_PLANE3_IMG 0x3003 +#define GL_CLIP_PLANE4_IMG 0x3004 +#define GL_CLIP_PLANE5_IMG 0x3005 +#define GL_MAX_CLIP_PLANES_IMG 0x0D32 +#endif + +/* GL_IMG_multisampled_render_to_texture */ +#ifndef GL_IMG_multisampled_render_to_texture +#define GL_RENDERBUFFER_SAMPLES_IMG 0x9133 +#define GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE_IMG 0x9134 +#define GL_MAX_SAMPLES_IMG 0x9135 +#define GL_TEXTURE_SAMPLES_IMG 0x9136 +#endif + +/*------------------------------------------------------------------------* + * NV extension tokens + *------------------------------------------------------------------------*/ + +/* GL_NV_fence */ +#ifndef GL_NV_fence +#define GL_ALL_COMPLETED_NV 0x84F2 +#define GL_FENCE_STATUS_NV 0x84F3 +#define GL_FENCE_CONDITION_NV 0x84F4 +#endif + +/*------------------------------------------------------------------------* + * QCOM extension tokens + *------------------------------------------------------------------------*/ + +/* GL_QCOM_driver_control */ +/* No new tokens introduced by this extension. */ + +/* GL_QCOM_extended_get */ +#ifndef GL_QCOM_extended_get +#define GL_TEXTURE_WIDTH_QCOM 0x8BD2 +#define GL_TEXTURE_HEIGHT_QCOM 0x8BD3 +#define GL_TEXTURE_DEPTH_QCOM 0x8BD4 +#define GL_TEXTURE_INTERNAL_FORMAT_QCOM 0x8BD5 +#define GL_TEXTURE_FORMAT_QCOM 0x8BD6 +#define GL_TEXTURE_TYPE_QCOM 0x8BD7 +#define GL_TEXTURE_IMAGE_VALID_QCOM 0x8BD8 +#define GL_TEXTURE_NUM_LEVELS_QCOM 0x8BD9 +#define GL_TEXTURE_TARGET_QCOM 0x8BDA +#define GL_TEXTURE_OBJECT_VALID_QCOM 0x8BDB +#define GL_STATE_RESTORE 0x8BDC +#endif + +/* GL_QCOM_extended_get2 */ +/* No new tokens introduced by this extension. */ + +/* GL_QCOM_perfmon_global_mode */ +#ifndef GL_QCOM_perfmon_global_mode +#define GL_PERFMON_GLOBAL_MODE_QCOM 0x8FA0 +#endif + +/* GL_QCOM_writeonly_rendering */ +#ifndef GL_QCOM_writeonly_rendering +#define GL_WRITEONLY_RENDERING_QCOM 0x8823 +#endif + +/* GL_QCOM_tiled_rendering */ +#ifndef GL_QCOM_tiled_rendering +#define GL_COLOR_BUFFER_BIT0_QCOM 0x00000001 +#define GL_COLOR_BUFFER_BIT1_QCOM 0x00000002 +#define GL_COLOR_BUFFER_BIT2_QCOM 0x00000004 +#define GL_COLOR_BUFFER_BIT3_QCOM 0x00000008 +#define GL_COLOR_BUFFER_BIT4_QCOM 0x00000010 +#define GL_COLOR_BUFFER_BIT5_QCOM 0x00000020 +#define GL_COLOR_BUFFER_BIT6_QCOM 0x00000040 +#define GL_COLOR_BUFFER_BIT7_QCOM 0x00000080 +#define GL_DEPTH_BUFFER_BIT0_QCOM 0x00000100 +#define GL_DEPTH_BUFFER_BIT1_QCOM 0x00000200 +#define GL_DEPTH_BUFFER_BIT2_QCOM 0x00000400 +#define GL_DEPTH_BUFFER_BIT3_QCOM 0x00000800 +#define GL_DEPTH_BUFFER_BIT4_QCOM 0x00001000 +#define GL_DEPTH_BUFFER_BIT5_QCOM 0x00002000 +#define GL_DEPTH_BUFFER_BIT6_QCOM 0x00004000 +#define GL_DEPTH_BUFFER_BIT7_QCOM 0x00008000 +#define GL_STENCIL_BUFFER_BIT0_QCOM 0x00010000 +#define GL_STENCIL_BUFFER_BIT1_QCOM 0x00020000 +#define GL_STENCIL_BUFFER_BIT2_QCOM 0x00040000 +#define GL_STENCIL_BUFFER_BIT3_QCOM 0x00080000 +#define GL_STENCIL_BUFFER_BIT4_QCOM 0x00100000 +#define GL_STENCIL_BUFFER_BIT5_QCOM 0x00200000 +#define GL_STENCIL_BUFFER_BIT6_QCOM 0x00400000 +#define GL_STENCIL_BUFFER_BIT7_QCOM 0x00800000 +#define GL_MULTISAMPLE_BUFFER_BIT0_QCOM 0x01000000 +#define GL_MULTISAMPLE_BUFFER_BIT1_QCOM 0x02000000 +#define GL_MULTISAMPLE_BUFFER_BIT2_QCOM 0x04000000 +#define GL_MULTISAMPLE_BUFFER_BIT3_QCOM 0x08000000 +#define GL_MULTISAMPLE_BUFFER_BIT4_QCOM 0x10000000 +#define GL_MULTISAMPLE_BUFFER_BIT5_QCOM 0x20000000 +#define GL_MULTISAMPLE_BUFFER_BIT6_QCOM 0x40000000 +#define GL_MULTISAMPLE_BUFFER_BIT7_QCOM 0x80000000 +#endif + +/*------------------------------------------------------------------------* + * End of extension tokens, start of corresponding extension functions + *------------------------------------------------------------------------*/ + +/*------------------------------------------------------------------------* + * OES extension functions + *------------------------------------------------------------------------*/ + +/* GL_OES_blend_equation_separate */ +#ifndef GL_OES_blend_equation_separate +#define GL_OES_blend_equation_separate 1 +#ifdef GL_GLEXT_PROTOTYPES +GL_API void GL_APIENTRY glBlendEquationSeparateOES (GLenum modeRGB, GLenum modeAlpha); +#endif +typedef void (GL_APIENTRYP PFNGLBLENDEQUATIONSEPARATEOESPROC) (GLenum modeRGB, GLenum modeAlpha); +#endif + +/* GL_OES_blend_func_separate */ +#ifndef GL_OES_blend_func_separate +#define GL_OES_blend_func_separate 1 +#ifdef GL_GLEXT_PROTOTYPES +GL_API void GL_APIENTRY glBlendFuncSeparateOES (GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha); +#endif +typedef void (GL_APIENTRYP PFNGLBLENDFUNCSEPARATEOESPROC) (GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha); +#endif + +/* GL_OES_blend_subtract */ +#ifndef GL_OES_blend_subtract +#define GL_OES_blend_subtract 1 +#ifdef GL_GLEXT_PROTOTYPES +GL_API void GL_APIENTRY glBlendEquationOES (GLenum mode); +#endif +typedef void (GL_APIENTRYP PFNGLBLENDEQUATIONOESPROC) (GLenum mode); +#endif + +/* GL_OES_byte_coordinates */ +#ifndef GL_OES_byte_coordinates +#define GL_OES_byte_coordinates 1 +#endif + +/* GL_OES_compressed_ETC1_RGB8_texture */ +#ifndef GL_OES_compressed_ETC1_RGB8_texture +#define GL_OES_compressed_ETC1_RGB8_texture 1 +#endif + +/* GL_OES_depth24 */ +#ifndef GL_OES_depth24 +#define GL_OES_depth24 1 +#endif + +/* GL_OES_depth32 */ +#ifndef GL_OES_depth32 +#define GL_OES_depth32 1 +#endif + +/* GL_OES_draw_texture */ +#ifndef GL_OES_draw_texture +#define GL_OES_draw_texture 1 +#ifdef GL_GLEXT_PROTOTYPES +GL_API void GL_APIENTRY glDrawTexsOES (GLshort x, GLshort y, GLshort z, GLshort width, GLshort height); +GL_API void GL_APIENTRY glDrawTexiOES (GLint x, GLint y, GLint z, GLint width, GLint height); +GL_API void GL_APIENTRY glDrawTexxOES (GLfixed x, GLfixed y, GLfixed z, GLfixed width, GLfixed height); +GL_API void GL_APIENTRY glDrawTexsvOES (const GLshort *coords); +GL_API void GL_APIENTRY glDrawTexivOES (const GLint *coords); +GL_API void GL_APIENTRY glDrawTexxvOES (const GLfixed *coords); +GL_API void GL_APIENTRY glDrawTexfOES (GLfloat x, GLfloat y, GLfloat z, GLfloat width, GLfloat height); +GL_API void GL_APIENTRY glDrawTexfvOES (const GLfloat *coords); +#endif +typedef void (GL_APIENTRYP PFNGLDRAWTEXSOESPROC) (GLshort x, GLshort y, GLshort z, GLshort width, GLshort height); +typedef void (GL_APIENTRYP PFNGLDRAWTEXIOESPROC) (GLint x, GLint y, GLint z, GLint width, GLint height); +typedef void (GL_APIENTRYP PFNGLDRAWTEXXOESPROC) (GLfixed x, GLfixed y, GLfixed z, GLfixed width, GLfixed height); +typedef void (GL_APIENTRYP PFNGLDRAWTEXSVOESPROC) (const GLshort *coords); +typedef void (GL_APIENTRYP PFNGLDRAWTEXIVOESPROC) (const GLint *coords); +typedef void (GL_APIENTRYP PFNGLDRAWTEXXVOESPROC) (const GLfixed *coords); +typedef void (GL_APIENTRYP PFNGLDRAWTEXFOESPROC) (GLfloat x, GLfloat y, GLfloat z, GLfloat width, GLfloat height); +typedef void (GL_APIENTRYP PFNGLDRAWTEXFVOESPROC) (const GLfloat *coords); +#endif + +/* GL_OES_EGL_image */ +#ifndef GL_OES_EGL_image +#define GL_OES_EGL_image 1 +#ifdef GL_GLEXT_PROTOTYPES +GL_API void GL_APIENTRY glEGLImageTargetTexture2DOES (GLenum target, GLeglImageOES image); +GL_API void GL_APIENTRY glEGLImageTargetRenderbufferStorageOES (GLenum target, GLeglImageOES image); +#endif +typedef void (GL_APIENTRYP PFNGLEGLIMAGETARGETTEXTURE2DOESPROC) (GLenum target, GLeglImageOES image); +typedef void (GL_APIENTRYP PFNGLEGLIMAGETARGETRENDERBUFFERSTORAGEOESPROC) (GLenum target, GLeglImageOES image); +#endif + +/* GL_OES_EGL_image_external */ +#ifndef GL_OES_EGL_image_external +#define GL_OES_EGL_image_external 1 +/* glEGLImageTargetTexture2DOES defined in GL_OES_EGL_image already. */ +#endif + +/* GL_OES_element_index_uint */ +#ifndef GL_OES_element_index_uint +#define GL_OES_element_index_uint 1 +#endif + +/* GL_OES_extended_matrix_palette */ +#ifndef GL_OES_extended_matrix_palette +#define GL_OES_extended_matrix_palette 1 +#endif + +/* GL_OES_fbo_render_mipmap */ +#ifndef GL_OES_fbo_render_mipmap +#define GL_OES_fbo_render_mipmap 1 +#endif + +/* GL_OES_fixed_point */ +#ifndef GL_OES_fixed_point +#define GL_OES_fixed_point 1 +#ifdef GL_GLEXT_PROTOTYPES +GL_API void GL_APIENTRY glAlphaFuncxOES (GLenum func, GLclampx ref); +GL_API void GL_APIENTRY glClearColorxOES (GLclampx red, GLclampx green, GLclampx blue, GLclampx alpha); +GL_API void GL_APIENTRY glClearDepthxOES (GLclampx depth); +GL_API void GL_APIENTRY glClipPlanexOES (GLenum plane, const GLfixed *equation); +GL_API void GL_APIENTRY glColor4xOES (GLfixed red, GLfixed green, GLfixed blue, GLfixed alpha); +GL_API void GL_APIENTRY glDepthRangexOES (GLclampx zNear, GLclampx zFar); +GL_API void GL_APIENTRY glFogxOES (GLenum pname, GLfixed param); +GL_API void GL_APIENTRY glFogxvOES (GLenum pname, const GLfixed *params); +GL_API void GL_APIENTRY glFrustumxOES (GLfixed left, GLfixed right, GLfixed bottom, GLfixed top, GLfixed zNear, GLfixed zFar); +GL_API void GL_APIENTRY glGetClipPlanexOES (GLenum pname, GLfixed eqn[4]); +GL_API void GL_APIENTRY glGetFixedvOES (GLenum pname, GLfixed *params); +GL_API void GL_APIENTRY glGetLightxvOES (GLenum light, GLenum pname, GLfixed *params); +GL_API void GL_APIENTRY glGetMaterialxvOES (GLenum face, GLenum pname, GLfixed *params); +GL_API void GL_APIENTRY glGetTexEnvxvOES (GLenum env, GLenum pname, GLfixed *params); +GL_API void GL_APIENTRY glGetTexParameterxvOES (GLenum target, GLenum pname, GLfixed *params); +GL_API void GL_APIENTRY glLightModelxOES (GLenum pname, GLfixed param); +GL_API void GL_APIENTRY glLightModelxvOES (GLenum pname, const GLfixed *params); +GL_API void GL_APIENTRY glLightxOES (GLenum light, GLenum pname, GLfixed param); +GL_API void GL_APIENTRY glLightxvOES (GLenum light, GLenum pname, const GLfixed *params); +GL_API void GL_APIENTRY glLineWidthxOES (GLfixed width); +GL_API void GL_APIENTRY glLoadMatrixxOES (const GLfixed *m); +GL_API void GL_APIENTRY glMaterialxOES (GLenum face, GLenum pname, GLfixed param); +GL_API void GL_APIENTRY glMaterialxvOES (GLenum face, GLenum pname, const GLfixed *params); +GL_API void GL_APIENTRY glMultMatrixxOES (const GLfixed *m); +GL_API void GL_APIENTRY glMultiTexCoord4xOES (GLenum target, GLfixed s, GLfixed t, GLfixed r, GLfixed q); +GL_API void GL_APIENTRY glNormal3xOES (GLfixed nx, GLfixed ny, GLfixed nz); +GL_API void GL_APIENTRY glOrthoxOES (GLfixed left, GLfixed right, GLfixed bottom, GLfixed top, GLfixed zNear, GLfixed zFar); +GL_API void GL_APIENTRY glPointParameterxOES (GLenum pname, GLfixed param); +GL_API void GL_APIENTRY glPointParameterxvOES (GLenum pname, const GLfixed *params); +GL_API void GL_APIENTRY glPointSizexOES (GLfixed size); +GL_API void GL_APIENTRY glPolygonOffsetxOES (GLfixed factor, GLfixed units); +GL_API void GL_APIENTRY glRotatexOES (GLfixed angle, GLfixed x, GLfixed y, GLfixed z); +GL_API void GL_APIENTRY glSampleCoveragexOES (GLclampx value, GLboolean invert); +GL_API void GL_APIENTRY glScalexOES (GLfixed x, GLfixed y, GLfixed z); +GL_API void GL_APIENTRY glTexEnvxOES (GLenum target, GLenum pname, GLfixed param); +GL_API void GL_APIENTRY glTexEnvxvOES (GLenum target, GLenum pname, const GLfixed *params); +GL_API void GL_APIENTRY glTexParameterxOES (GLenum target, GLenum pname, GLfixed param); +GL_API void GL_APIENTRY glTexParameterxvOES (GLenum target, GLenum pname, const GLfixed *params); +GL_API void GL_APIENTRY glTranslatexOES (GLfixed x, GLfixed y, GLfixed z); +#endif +typedef void (GL_APIENTRYP PFNGLALPHAFUNCXOESPROC) (GLenum func, GLclampx ref); +typedef void (GL_APIENTRYP PFNGLCLEARCOLORXOESPROC) (GLclampx red, GLclampx green, GLclampx blue, GLclampx alpha); +typedef void (GL_APIENTRYP PFNGLCLEARDEPTHXOESPROC) (GLclampx depth); +typedef void (GL_APIENTRYP PFNGLCLIPPLANEXOESPROC) (GLenum plane, const GLfixed *equation); +typedef void (GL_APIENTRYP PFNGLCOLOR4XOESPROC) (GLfixed red, GLfixed green, GLfixed blue, GLfixed alpha); +typedef void (GL_APIENTRYP PFNGLDEPTHRANGEXOESPROC) (GLclampx zNear, GLclampx zFar); +typedef void (GL_APIENTRYP PFNGLFOGXOESPROC) (GLenum pname, GLfixed param); +typedef void (GL_APIENTRYP PFNGLFOGXVOESPROC) (GLenum pname, const GLfixed *params); +typedef void (GL_APIENTRYP PFNGLFRUSTUMXOESPROC) (GLfixed left, GLfixed right, GLfixed bottom, GLfixed top, GLfixed zNear, GLfixed zFar); +typedef void (GL_APIENTRYP PFNGLGETCLIPPLANEXOESPROC) (GLenum pname, GLfixed eqn[4]); +typedef void (GL_APIENTRYP PFNGLGETFIXEDVOESPROC) (GLenum pname, GLfixed *params); +typedef void (GL_APIENTRYP PFNGLGETLIGHTXVOESPROC) (GLenum light, GLenum pname, GLfixed *params); +typedef void (GL_APIENTRYP PFNGLGETMATERIALXVOESPROC) (GLenum face, GLenum pname, GLfixed *params); +typedef void (GL_APIENTRYP PFNGLGETTEXENVXVOESPROC) (GLenum env, GLenum pname, GLfixed *params); +typedef void (GL_APIENTRYP PFNGLGETTEXPARAMETERXVOESPROC) (GLenum target, GLenum pname, GLfixed *params); +typedef void (GL_APIENTRYP PFNGLLIGHTMODELXOESPROC) (GLenum pname, GLfixed param); +typedef void (GL_APIENTRYP PFNGLLIGHTMODELXVOESPROC) (GLenum pname, const GLfixed *params); +typedef void (GL_APIENTRYP PFNGLLIGHTXOESPROC) (GLenum light, GLenum pname, GLfixed param); +typedef void (GL_APIENTRYP PFNGLLIGHTXVOESPROC) (GLenum light, GLenum pname, const GLfixed *params); +typedef void (GL_APIENTRYP PFNGLLINEWIDTHXOESPROC) (GLfixed width); +typedef void (GL_APIENTRYP PFNGLLOADMATRIXXOESPROC) (const GLfixed *m); +typedef void (GL_APIENTRYP PFNGLMATERIALXOESPROC) (GLenum face, GLenum pname, GLfixed param); +typedef void (GL_APIENTRYP PFNGLMATERIALXVOESPROC) (GLenum face, GLenum pname, const GLfixed *params); +typedef void (GL_APIENTRYP PFNGLMULTMATRIXXOESPROC) (const GLfixed *m); +typedef void (GL_APIENTRYP PFNGLMULTITEXCOORD4XOESPROC) (GLenum target, GLfixed s, GLfixed t, GLfixed r, GLfixed q); +typedef void (GL_APIENTRYP PFNGLNORMAL3XOESPROC) (GLfixed nx, GLfixed ny, GLfixed nz); +typedef void (GL_APIENTRYP PFNGLORTHOXOESPROC) (GLfixed left, GLfixed right, GLfixed bottom, GLfixed top, GLfixed zNear, GLfixed zFar); +typedef void (GL_APIENTRYP PFNGLPOINTPARAMETERXOESPROC) (GLenum pname, GLfixed param); +typedef void (GL_APIENTRYP PFNGLPOINTPARAMETERXVOESPROC) (GLenum pname, const GLfixed *params); +typedef void (GL_APIENTRYP PFNGLPOINTSIZEXOESPROC) (GLfixed size); +typedef void (GL_APIENTRYP PFNGLPOLYGONOFFSETXOESPROC) (GLfixed factor, GLfixed units); +typedef void (GL_APIENTRYP PFNGLROTATEXOESPROC) (GLfixed angle, GLfixed x, GLfixed y, GLfixed z); +typedef void (GL_APIENTRYP PFNGLSAMPLECOVERAGEXOESPROC) (GLclampx value, GLboolean invert); +typedef void (GL_APIENTRYP PFNGLSCALEXOESPROC) (GLfixed x, GLfixed y, GLfixed z); +typedef void (GL_APIENTRYP PFNGLTEXENVXOESPROC) (GLenum target, GLenum pname, GLfixed param); +typedef void (GL_APIENTRYP PFNGLTEXENVXVOESPROC) (GLenum target, GLenum pname, const GLfixed *params); +typedef void (GL_APIENTRYP PFNGLTEXPARAMETERXOESPROC) (GLenum target, GLenum pname, GLfixed param); +typedef void (GL_APIENTRYP PFNGLTEXPARAMETERXVOESPROC) (GLenum target, GLenum pname, const GLfixed *params); +typedef void (GL_APIENTRYP PFNGLTRANSLATEXOESPROC) (GLfixed x, GLfixed y, GLfixed z); +#endif + +/* GL_OES_framebuffer_object */ +#ifndef GL_OES_framebuffer_object +#define GL_OES_framebuffer_object 1 +#ifdef GL_GLEXT_PROTOTYPES +GL_API GLboolean GL_APIENTRY glIsRenderbufferOES (GLuint renderbuffer); +GL_API void GL_APIENTRY glBindRenderbufferOES (GLenum target, GLuint renderbuffer); +GL_API void GL_APIENTRY glDeleteRenderbuffersOES (GLsizei n, const GLuint* renderbuffers); +GL_API void GL_APIENTRY glGenRenderbuffersOES (GLsizei n, GLuint* renderbuffers); +GL_API void GL_APIENTRY glRenderbufferStorageOES (GLenum target, GLenum internalformat, GLsizei width, GLsizei height); +GL_API void GL_APIENTRY glGetRenderbufferParameterivOES (GLenum target, GLenum pname, GLint* params); +GL_API GLboolean GL_APIENTRY glIsFramebufferOES (GLuint framebuffer); +GL_API void GL_APIENTRY glBindFramebufferOES (GLenum target, GLuint framebuffer); +GL_API void GL_APIENTRY glDeleteFramebuffersOES (GLsizei n, const GLuint* framebuffers); +GL_API void GL_APIENTRY glGenFramebuffersOES (GLsizei n, GLuint* framebuffers); +GL_API GLenum GL_APIENTRY glCheckFramebufferStatusOES (GLenum target); +GL_API void GL_APIENTRY glFramebufferRenderbufferOES (GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer); +GL_API void GL_APIENTRY glFramebufferTexture2DOES (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level); +GL_API void GL_APIENTRY glGetFramebufferAttachmentParameterivOES (GLenum target, GLenum attachment, GLenum pname, GLint* params); +GL_API void GL_APIENTRY glGenerateMipmapOES (GLenum target); +#endif +typedef GLboolean (GL_APIENTRYP PFNGLISRENDERBUFFEROESPROC) (GLuint renderbuffer); +typedef void (GL_APIENTRYP PFNGLBINDRENDERBUFFEROESPROC) (GLenum target, GLuint renderbuffer); +typedef void (GL_APIENTRYP PFNGLDELETERENDERBUFFERSOESPROC) (GLsizei n, const GLuint* renderbuffers); +typedef void (GL_APIENTRYP PFNGLGENRENDERBUFFERSOESPROC) (GLsizei n, GLuint* renderbuffers); +typedef void (GL_APIENTRYP PFNGLRENDERBUFFERSTORAGEOESPROC) (GLenum target, GLenum internalformat, GLsizei width, GLsizei height); +typedef void (GL_APIENTRYP PFNGLGETRENDERBUFFERPARAMETERIVOESPROC) (GLenum target, GLenum pname, GLint* params); +typedef GLboolean (GL_APIENTRYP PFNGLISFRAMEBUFFEROESPROC) (GLuint framebuffer); +typedef void (GL_APIENTRYP PFNGLBINDFRAMEBUFFEROESPROC) (GLenum target, GLuint framebuffer); +typedef void (GL_APIENTRYP PFNGLDELETEFRAMEBUFFERSOESPROC) (GLsizei n, const GLuint* framebuffers); +typedef void (GL_APIENTRYP PFNGLGENFRAMEBUFFERSOESPROC) (GLsizei n, GLuint* framebuffers); +typedef GLenum (GL_APIENTRYP PFNGLCHECKFRAMEBUFFERSTATUSOESPROC) (GLenum target); +typedef void (GL_APIENTRYP PFNGLFRAMEBUFFERRENDERBUFFEROESPROC) (GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer); +typedef void (GL_APIENTRYP PFNGLFRAMEBUFFERTEXTURE2DOESPROC) (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level); +typedef void (GL_APIENTRYP PFNGLGETFRAMEBUFFERATTACHMENTPARAMETERIVOESPROC) (GLenum target, GLenum attachment, GLenum pname, GLint* params); +typedef void (GL_APIENTRYP PFNGLGENERATEMIPMAPOESPROC) (GLenum target); +#endif + +/* GL_OES_mapbuffer */ +#ifndef GL_OES_mapbuffer +#define GL_OES_mapbuffer 1 +#ifdef GL_GLEXT_PROTOTYPES +GL_API void* GL_APIENTRY glMapBufferOES (GLenum target, GLenum access); +GL_API GLboolean GL_APIENTRY glUnmapBufferOES (GLenum target); +GL_API void GL_APIENTRY glGetBufferPointervOES (GLenum target, GLenum pname, GLvoid ** params); +#endif +typedef void* (GL_APIENTRYP PFNGLMAPBUFFEROESPROC) (GLenum target, GLenum access); +typedef GLboolean (GL_APIENTRYP PFNGLUNMAPBUFFEROESPROC) (GLenum target); +typedef void (GL_APIENTRYP PFNGLGETBUFFERPOINTERVOESPROC) (GLenum target, GLenum pname, GLvoid ** params); +#endif + +/* GL_OES_matrix_get */ +#ifndef GL_OES_matrix_get +#define GL_OES_matrix_get 1 +#endif + +/* GL_OES_matrix_palette */ +#ifndef GL_OES_matrix_palette +#define GL_OES_matrix_palette 1 +#ifdef GL_GLEXT_PROTOTYPES +GL_API void GL_APIENTRY glCurrentPaletteMatrixOES (GLuint matrixpaletteindex); +GL_API void GL_APIENTRY glLoadPaletteFromModelViewMatrixOES (void); +GL_API void GL_APIENTRY glMatrixIndexPointerOES (GLint size, GLenum type, GLsizei stride, const GLvoid *pointer); +GL_API void GL_APIENTRY glWeightPointerOES (GLint size, GLenum type, GLsizei stride, const GLvoid *pointer); +#endif +typedef void (GL_APIENTRYP PFNGLCURRENTPALETTEMATRIXOESPROC) (GLuint matrixpaletteindex); +typedef void (GL_APIENTRYP PFNGLLOADPALETTEFROMMODELVIEWMATRIXOESPROC) (void); +typedef void (GL_APIENTRYP PFNGLMATRIXINDEXPOINTEROESPROC) (GLint size, GLenum type, GLsizei stride, const GLvoid *pointer); +typedef void (GL_APIENTRYP PFNGLWEIGHTPOINTEROESPROC) (GLint size, GLenum type, GLsizei stride, const GLvoid *pointer); +#endif + +/* GL_OES_packed_depth_stencil */ +#ifndef GL_OES_packed_depth_stencil +#define GL_OES_packed_depth_stencil 1 +#endif + +/* GL_OES_query_matrix */ +#ifndef GL_OES_query_matrix +#define GL_OES_query_matrix 1 +#ifdef GL_GLEXT_PROTOTYPES +GL_API GLbitfield GL_APIENTRY glQueryMatrixxOES (GLfixed mantissa[16], GLint exponent[16]); +#endif +typedef GLbitfield (GL_APIENTRYP PFNGLQUERYMATRIXXOESPROC) (GLfixed mantissa[16], GLint exponent[16]); +#endif + +/* GL_OES_rgb8_rgba8 */ +#ifndef GL_OES_rgb8_rgba8 +#define GL_OES_rgb8_rgba8 1 +#endif + +/* GL_OES_single_precision */ +#ifndef GL_OES_single_precision +#define GL_OES_single_precision 1 +#ifdef GL_GLEXT_PROTOTYPES +GL_API void GL_APIENTRY glDepthRangefOES (GLclampf zNear, GLclampf zFar); +GL_API void GL_APIENTRY glFrustumfOES (GLfloat left, GLfloat right, GLfloat bottom, GLfloat top, GLfloat zNear, GLfloat zFar); +GL_API void GL_APIENTRY glOrthofOES (GLfloat left, GLfloat right, GLfloat bottom, GLfloat top, GLfloat zNear, GLfloat zFar); +GL_API void GL_APIENTRY glClipPlanefOES (GLenum plane, const GLfloat *equation); +GL_API void GL_APIENTRY glGetClipPlanefOES (GLenum pname, GLfloat eqn[4]); +GL_API void GL_APIENTRY glClearDepthfOES (GLclampf depth); +#endif +typedef void (GL_APIENTRYP PFNGLDEPTHRANGEFOESPROC) (GLclampf zNear, GLclampf zFar); +typedef void (GL_APIENTRYP PFNGLFRUSTUMFOESPROC) (GLfloat left, GLfloat right, GLfloat bottom, GLfloat top, GLfloat zNear, GLfloat zFar); +typedef void (GL_APIENTRYP PFNGLORTHOFOESPROC) (GLfloat left, GLfloat right, GLfloat bottom, GLfloat top, GLfloat zNear, GLfloat zFar); +typedef void (GL_APIENTRYP PFNGLCLIPPLANEFOESPROC) (GLenum plane, const GLfloat *equation); +typedef void (GL_APIENTRYP PFNGLGETCLIPPLANEFOESPROC) (GLenum pname, GLfloat eqn[4]); +typedef void (GL_APIENTRYP PFNGLCLEARDEPTHFOESPROC) (GLclampf depth); +#endif + +/* GL_OES_stencil1 */ +#ifndef GL_OES_stencil1 +#define GL_OES_stencil1 1 +#endif + +/* GL_OES_stencil4 */ +#ifndef GL_OES_stencil4 +#define GL_OES_stencil4 1 +#endif + +/* GL_OES_stencil8 */ +#ifndef GL_OES_stencil8 +#define GL_OES_stencil8 1 +#endif + +/* GL_OES_stencil_wrap */ +#ifndef GL_OES_stencil_wrap +#define GL_OES_stencil_wrap 1 +#endif + +/* GL_OES_texture_cube_map */ +#ifndef GL_OES_texture_cube_map +#define GL_OES_texture_cube_map 1 +#ifdef GL_GLEXT_PROTOTYPES +GL_API void GL_APIENTRY glTexGenfOES (GLenum coord, GLenum pname, GLfloat param); +GL_API void GL_APIENTRY glTexGenfvOES (GLenum coord, GLenum pname, const GLfloat *params); +GL_API void GL_APIENTRY glTexGeniOES (GLenum coord, GLenum pname, GLint param); +GL_API void GL_APIENTRY glTexGenivOES (GLenum coord, GLenum pname, const GLint *params); +GL_API void GL_APIENTRY glTexGenxOES (GLenum coord, GLenum pname, GLfixed param); +GL_API void GL_APIENTRY glTexGenxvOES (GLenum coord, GLenum pname, const GLfixed *params); +GL_API void GL_APIENTRY glGetTexGenfvOES (GLenum coord, GLenum pname, GLfloat *params); +GL_API void GL_APIENTRY glGetTexGenivOES (GLenum coord, GLenum pname, GLint *params); +GL_API void GL_APIENTRY glGetTexGenxvOES (GLenum coord, GLenum pname, GLfixed *params); +#endif +typedef void (GL_APIENTRYP PFNGLTEXGENFOESPROC) (GLenum coord, GLenum pname, GLfloat param); +typedef void (GL_APIENTRYP PFNGLTEXGENFVOESPROC) (GLenum coord, GLenum pname, const GLfloat *params); +typedef void (GL_APIENTRYP PFNGLTEXGENIOESPROC) (GLenum coord, GLenum pname, GLint param); +typedef void (GL_APIENTRYP PFNGLTEXGENIVOESPROC) (GLenum coord, GLenum pname, const GLint *params); +typedef void (GL_APIENTRYP PFNGLTEXGENXOESPROC) (GLenum coord, GLenum pname, GLfixed param); +typedef void (GL_APIENTRYP PFNGLTEXGENXVOESPROC) (GLenum coord, GLenum pname, const GLfixed *params); +typedef void (GL_APIENTRYP PFNGLGETTEXGENFVOESPROC) (GLenum coord, GLenum pname, GLfloat *params); +typedef void (GL_APIENTRYP PFNGLGETTEXGENIVOESPROC) (GLenum coord, GLenum pname, GLint *params); +typedef void (GL_APIENTRYP PFNGLGETTEXGENXVOESPROC) (GLenum coord, GLenum pname, GLfixed *params); +#endif + +/* GL_OES_texture_env_crossbar */ +#ifndef GL_OES_texture_env_crossbar +#define GL_OES_texture_env_crossbar 1 +#endif + +/* GL_OES_texture_mirrored_repeat */ +#ifndef GL_OES_texture_mirrored_repeat +#define GL_OES_texture_mirrored_repeat 1 +#endif + +/* GL_OES_vertex_array_object */ +#ifndef GL_OES_vertex_array_object +#define GL_OES_vertex_array_object 1 +#ifdef GL_GLEXT_PROTOTYPES +GL_API void GL_APIENTRY glBindVertexArrayOES (GLuint array); +GL_API void GL_APIENTRY glDeleteVertexArraysOES (GLsizei n, const GLuint *arrays); +GL_API void GL_APIENTRY glGenVertexArraysOES (GLsizei n, GLuint *arrays); +GL_API GLboolean GL_APIENTRY glIsVertexArrayOES (GLuint array); +#endif +typedef void (GL_APIENTRYP PFNGLBINDVERTEXARRAYOESPROC) (GLuint array); +typedef void (GL_APIENTRYP PFNGLDELETEVERTEXARRAYSOESPROC) (GLsizei n, const GLuint *arrays); +typedef void (GL_APIENTRYP PFNGLGENVERTEXARRAYSOESPROC) (GLsizei n, GLuint *arrays); +typedef GLboolean (GL_APIENTRYP PFNGLISVERTEXARRAYOESPROC) (GLuint array); +#endif + +/*------------------------------------------------------------------------* + * AMD extension functions + *------------------------------------------------------------------------*/ + +/* GL_AMD_compressed_3DC_texture */ +#ifndef GL_AMD_compressed_3DC_texture +#define GL_AMD_compressed_3DC_texture 1 +#endif + +/* GL_AMD_compressed_ATC_texture */ +#ifndef GL_AMD_compressed_ATC_texture +#define GL_AMD_compressed_ATC_texture 1 +#endif + +/*------------------------------------------------------------------------* + * APPLE extension functions + *------------------------------------------------------------------------*/ + +/* GL_APPLE_texture_2D_limited_npot */ +#ifndef GL_APPLE_texture_2D_limited_npot +#define GL_APPLE_texture_2D_limited_npot 1 +#endif + +/* GL_APPLE_framebuffer_multisample */ +#ifndef GL_APPLE_framebuffer_multisample +#define GL_APPLE_framebuffer_multisample 1 +#ifdef GL_GLEXT_PROTOTYPES +GL_API void GL_APIENTRY glRenderbufferStorageMultisampleAPPLE (GLenum, GLsizei, GLenum, GLsizei, GLsizei); +GL_API void GL_APIENTRY glResolveMultisampleFramebufferAPPLE (void); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (GL_APIENTRYP PFNGLRENDERBUFFERSTORAGEMULTISAMPLEAPPLEPROC) (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height); +typedef void (GL_APIENTRYP PFNGLRESOLVEMULTISAMPLEFRAMEBUFFERAPPLEPROC) (void); +#endif + +/* GL_APPLE_texture_format_BGRA8888 */ +#ifndef GL_APPLE_texture_format_BGRA8888 +#define GL_APPLE_texture_format_BGRA8888 1 +#endif + +/* GL_APPLE_texture_max_level */ +#ifndef GL_APPLE_texture_max_level +#define GL_APPLE_texture_max_level 1 +#endif + +/*------------------------------------------------------------------------* + * ARM extension functions + *------------------------------------------------------------------------*/ + +/* GL_ARM_rgba8 */ +#ifndef GL_ARM_rgba8 +#define GL_ARM_rgba8 1 +#endif + +/*------------------------------------------------------------------------* + * EXT extension functions + *------------------------------------------------------------------------*/ + +/* GL_EXT_blend_minmax */ +#ifndef GL_EXT_blend_minmax +#define GL_EXT_blend_minmax 1 +#endif + +/* GL_EXT_discard_framebuffer */ +#ifndef GL_EXT_discard_framebuffer +#define GL_EXT_discard_framebuffer 1 +#ifdef GL_GLEXT_PROTOTYPES +GL_API void GL_APIENTRY glDiscardFramebufferEXT (GLenum target, GLsizei numAttachments, const GLenum *attachments); +#endif +typedef void (GL_APIENTRYP PFNGLDISCARDFRAMEBUFFEREXTPROC) (GLenum target, GLsizei numAttachments, const GLenum *attachments); +#endif + +/* GL_EXT_multi_draw_arrays */ +#ifndef GL_EXT_multi_draw_arrays +#define GL_EXT_multi_draw_arrays 1 +#ifdef GL_GLEXT_PROTOTYPES +GL_API void GL_APIENTRY glMultiDrawArraysEXT (GLenum, GLint *, GLsizei *, GLsizei); +GL_API void GL_APIENTRY glMultiDrawElementsEXT (GLenum, const GLsizei *, GLenum, const GLvoid* *, GLsizei); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (GL_APIENTRYP PFNGLMULTIDRAWARRAYSEXTPROC) (GLenum mode, GLint *first, GLsizei *count, GLsizei primcount); +typedef void (GL_APIENTRYP PFNGLMULTIDRAWELEMENTSEXTPROC) (GLenum mode, const GLsizei *count, GLenum type, const GLvoid* *indices, GLsizei primcount); +#endif + +/* GL_EXT_read_format_bgra */ +#ifndef GL_EXT_read_format_bgra +#define GL_EXT_read_format_bgra 1 +#endif + +/* GL_EXT_texture_filter_anisotropic */ +#ifndef GL_EXT_texture_filter_anisotropic +#define GL_EXT_texture_filter_anisotropic 1 +#endif + +/* GL_EXT_texture_format_BGRA8888 */ +#ifndef GL_EXT_texture_format_BGRA8888 +#define GL_EXT_texture_format_BGRA8888 1 +#endif + +/* GL_EXT_texture_lod_bias */ +#ifndef GL_EXT_texture_lod_bias +#define GL_EXT_texture_lod_bias 1 +#endif + +/*------------------------------------------------------------------------* + * IMG extension functions + *------------------------------------------------------------------------*/ + +/* GL_IMG_read_format */ +#ifndef GL_IMG_read_format +#define GL_IMG_read_format 1 +#endif + +/* GL_IMG_texture_compression_pvrtc */ +#ifndef GL_IMG_texture_compression_pvrtc +#define GL_IMG_texture_compression_pvrtc 1 +#endif + +/* GL_IMG_texture_env_enhanced_fixed_function */ +#ifndef GL_IMG_texture_env_enhanced_fixed_function +#define GL_IMG_texture_env_enhanced_fixed_function 1 +#endif + +/* GL_IMG_user_clip_plane */ +#ifndef GL_IMG_user_clip_plane +#define GL_IMG_user_clip_plane 1 +#ifdef GL_GLEXT_PROTOTYPES +GL_API void GL_APIENTRY glClipPlanefIMG (GLenum, const GLfloat *); +GL_API void GL_APIENTRY glClipPlanexIMG (GLenum, const GLfixed *); +#endif +typedef void (GL_APIENTRYP PFNGLCLIPPLANEFIMGPROC) (GLenum p, const GLfloat *eqn); +typedef void (GL_APIENTRYP PFNGLCLIPPLANEXIMGPROC) (GLenum p, const GLfixed *eqn); +#endif + +/* GL_IMG_multisampled_render_to_texture */ +#ifndef GL_IMG_multisampled_render_to_texture +#define GL_IMG_multisampled_render_to_texture 1 +#ifdef GL_GLEXT_PROTOTYPES +GL_API void GL_APIENTRY glRenderbufferStorageMultisampleIMG (GLenum, GLsizei, GLenum, GLsizei, GLsizei); +GL_API void GL_APIENTRY glFramebufferTexture2DMultisampleIMG (GLenum, GLenum, GLenum, GLuint, GLint, GLsizei); +#endif +typedef void (GL_APIENTRYP PFNGLRENDERBUFFERSTORAGEMULTISAMPLEIMG) (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height); +typedef void (GL_APIENTRYP PFNGLFRAMEBUFFERTEXTURE2DMULTISAMPLEIMG) (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLsizei samples); +#endif + +/*------------------------------------------------------------------------* + * NV extension functions + *------------------------------------------------------------------------*/ + +/* NV_fence */ +#ifndef GL_NV_fence +#define GL_NV_fence 1 +#ifdef GL_GLEXT_PROTOTYPES +GL_API void GL_APIENTRY glDeleteFencesNV (GLsizei, const GLuint *); +GL_API void GL_APIENTRY glGenFencesNV (GLsizei, GLuint *); +GL_API GLboolean GL_APIENTRY glIsFenceNV (GLuint); +GL_API GLboolean GL_APIENTRY glTestFenceNV (GLuint); +GL_API void GL_APIENTRY glGetFenceivNV (GLuint, GLenum, GLint *); +GL_API void GL_APIENTRY glFinishFenceNV (GLuint); +GL_API void GL_APIENTRY glSetFenceNV (GLuint, GLenum); +#endif +typedef void (GL_APIENTRYP PFNGLDELETEFENCESNVPROC) (GLsizei n, const GLuint *fences); +typedef void (GL_APIENTRYP PFNGLGENFENCESNVPROC) (GLsizei n, GLuint *fences); +typedef GLboolean (GL_APIENTRYP PFNGLISFENCENVPROC) (GLuint fence); +typedef GLboolean (GL_APIENTRYP PFNGLTESTFENCENVPROC) (GLuint fence); +typedef void (GL_APIENTRYP PFNGLGETFENCEIVNVPROC) (GLuint fence, GLenum pname, GLint *params); +typedef void (GL_APIENTRYP PFNGLFINISHFENCENVPROC) (GLuint fence); +typedef void (GL_APIENTRYP PFNGLSETFENCENVPROC) (GLuint fence, GLenum condition); +#endif + +/*------------------------------------------------------------------------* + * QCOM extension functions + *------------------------------------------------------------------------*/ + +/* GL_QCOM_driver_control */ +#ifndef GL_QCOM_driver_control +#define GL_QCOM_driver_control 1 +#ifdef GL_GLEXT_PROTOTYPES +GL_API void GL_APIENTRY glGetDriverControlsQCOM (GLint *num, GLsizei size, GLuint *driverControls); +GL_API void GL_APIENTRY glGetDriverControlStringQCOM (GLuint driverControl, GLsizei bufSize, GLsizei *length, GLchar *driverControlString); +GL_API void GL_APIENTRY glEnableDriverControlQCOM (GLuint driverControl); +GL_API void GL_APIENTRY glDisableDriverControlQCOM (GLuint driverControl); +#endif +typedef void (GL_APIENTRYP PFNGLGETDRIVERCONTROLSQCOMPROC) (GLint *num, GLsizei size, GLuint *driverControls); +typedef void (GL_APIENTRYP PFNGLGETDRIVERCONTROLSTRINGQCOMPROC) (GLuint driverControl, GLsizei bufSize, GLsizei *length, GLchar *driverControlString); +typedef void (GL_APIENTRYP PFNGLENABLEDRIVERCONTROLQCOMPROC) (GLuint driverControl); +typedef void (GL_APIENTRYP PFNGLDISABLEDRIVERCONTROLQCOMPROC) (GLuint driverControl); +#endif + +/* GL_QCOM_extended_get */ +#ifndef GL_QCOM_extended_get +#define GL_QCOM_extended_get 1 +#ifdef GL_GLEXT_PROTOTYPES +GL_API void GL_APIENTRY glExtGetTexturesQCOM (GLuint *textures, GLint maxTextures, GLint *numTextures); +GL_API void GL_APIENTRY glExtGetBuffersQCOM (GLuint *buffers, GLint maxBuffers, GLint *numBuffers); +GL_API void GL_APIENTRY glExtGetRenderbuffersQCOM (GLuint *renderbuffers, GLint maxRenderbuffers, GLint *numRenderbuffers); +GL_API void GL_APIENTRY glExtGetFramebuffersQCOM (GLuint *framebuffers, GLint maxFramebuffers, GLint *numFramebuffers); +GL_API void GL_APIENTRY glExtGetTexLevelParameterivQCOM (GLuint texture, GLenum face, GLint level, GLenum pname, GLint *params); +GL_API void GL_APIENTRY glExtTexObjectStateOverrideiQCOM (GLenum target, GLenum pname, GLint param); +GL_API void GL_APIENTRY glExtGetTexSubImageQCOM (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, GLvoid *texels); +GL_API void GL_APIENTRY glExtGetBufferPointervQCOM (GLenum target, GLvoid **params); +#endif +typedef void (GL_APIENTRYP PFNGLEXTGETTEXTURESQCOMPROC) (GLuint *textures, GLint maxTextures, GLint *numTextures); +typedef void (GL_APIENTRYP PFNGLEXTGETBUFFERSQCOMPROC) (GLuint *buffers, GLint maxBuffers, GLint *numBuffers); +typedef void (GL_APIENTRYP PFNGLEXTGETRENDERBUFFERSQCOMPROC) (GLuint *renderbuffers, GLint maxRenderbuffers, GLint *numRenderbuffers); +typedef void (GL_APIENTRYP PFNGLEXTGETFRAMEBUFFERSQCOMPROC) (GLuint *framebuffers, GLint maxFramebuffers, GLint *numFramebuffers); +typedef void (GL_APIENTRYP PFNGLEXTGETTEXLEVELPARAMETERIVQCOMPROC) (GLuint texture, GLenum face, GLint level, GLenum pname, GLint *params); +typedef void (GL_APIENTRYP PFNGLEXTTEXOBJECTSTATEOVERRIDEIQCOMPROC) (GLenum target, GLenum pname, GLint param); +typedef void (GL_APIENTRYP PFNGLEXTGETTEXSUBIMAGEQCOMPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, GLvoid *texels); +typedef void (GL_APIENTRYP PFNGLEXTGETBUFFERPOINTERVQCOMPROC) (GLenum target, GLvoid **params); +#endif + +/* GL_QCOM_extended_get2 */ +#ifndef GL_QCOM_extended_get2 +#define GL_QCOM_extended_get2 1 +#ifdef GL_GLEXT_PROTOTYPES +GL_API void GL_APIENTRY glExtGetShadersQCOM (GLuint *shaders, GLint maxShaders, GLint *numShaders); +GL_API void GL_APIENTRY glExtGetProgramsQCOM (GLuint *programs, GLint maxPrograms, GLint *numPrograms); +GL_API GLboolean GL_APIENTRY glExtIsProgramBinaryQCOM (GLuint program); +GL_API void GL_APIENTRY glExtGetProgramBinarySourceQCOM (GLuint program, GLenum shadertype, GLchar *source, GLint *length); +#endif +typedef void (GL_APIENTRYP PFNGLEXTGETSHADERSQCOMPROC) (GLuint *shaders, GLint maxShaders, GLint *numShaders); +typedef void (GL_APIENTRYP PFNGLEXTGETPROGRAMSQCOMPROC) (GLuint *programs, GLint maxPrograms, GLint *numPrograms); +typedef GLboolean (GL_APIENTRYP PFNGLEXTISPROGRAMBINARYQCOMPROC) (GLuint program); +typedef void (GL_APIENTRYP PFNGLEXTGETPROGRAMBINARYSOURCEQCOMPROC) (GLuint program, GLenum shadertype, GLchar *source, GLint *length); +#endif + +/* GL_QCOM_perfmon_global_mode */ +#ifndef GL_QCOM_perfmon_global_mode +#define GL_QCOM_perfmon_global_mode 1 +#endif + +/* GL_QCOM_writeonly_rendering */ +#ifndef GL_QCOM_writeonly_rendering +#define GL_QCOM_writeonly_rendering 1 +#endif + +/* GL_QCOM_tiled_rendering */ +#ifndef GL_QCOM_tiled_rendering +#define GL_QCOM_tiled_rendering 1 +#ifdef GL_GLEXT_PROTOTYPES +GL_API void GL_APIENTRY glStartTilingQCOM (GLuint x, GLuint y, GLuint width, GLuint height, GLbitfield preserveMask); +GL_API void GL_APIENTRY glEndTilingQCOM (GLbitfield preserveMask); +#endif +typedef void (GL_APIENTRYP PFNGLSTARTTILINGQCOMPROC) (GLuint x, GLuint y, GLuint width, GLuint height, GLbitfield preserveMask); +typedef void (GL_APIENTRYP PFNGLENDTILINGQCOMPROC) (GLbitfield preserveMask); +#endif + +#ifdef __cplusplus +} +#endif + +#endif /* __glext_h_ */ +
diff --git a/third_party/mesa_headers/GLES/glplatform.h b/third_party/mesa_headers/GLES/glplatform.h new file mode 100644 index 0000000..2db6ee2 --- /dev/null +++ b/third_party/mesa_headers/GLES/glplatform.h
@@ -0,0 +1,30 @@ +#ifndef __glplatform_h_ +#define __glplatform_h_ + +/* $Revision: 10601 $ on $Date:: 2010-03-04 22:15:27 -0800 #$ */ + +/* + * This document is licensed under the SGI Free Software B License Version + * 2.0. For details, see http://oss.sgi.com/projects/FreeB/ . + */ + +/* Platform-specific types and definitions for OpenGL ES 1.X gl.h + * + * Adopters may modify khrplatform.h and this file to suit their platform. + * You are encouraged to submit all modifications to the Khronos group so that + * they can be included in future versions of this file. Please submit changes + * by sending them to the public Khronos Bugzilla (http://khronos.org/bugzilla) + * by filing a bug against product "OpenGL-ES" component "Registry". + */ + +#include <KHR/khrplatform.h> + +#ifndef GL_API +#define GL_API KHRONOS_APICALL +#endif + +#ifndef GL_APIENTRY +#define GL_APIENTRY KHRONOS_APIENTRY +#endif + +#endif /* __glplatform_h_ */
diff --git a/third_party/mesa_headers/LICENSE b/third_party/mesa_headers/LICENSE new file mode 100644 index 0000000..792c6fe --- /dev/null +++ b/third_party/mesa_headers/LICENSE
@@ -0,0 +1,512 @@ +The default Mesa license is as follows: + +Copyright (C) 1999-2007 Brian Paul All Rights Reserved. + +Permission is hereby granted, free of charge, to any person obtaining a +copy of this software and associated documentation files (the "Software"), +to deal in the Software without restriction, including without limitation +the rights to use, copy, modify, merge, publish, distribute, sublicense, +and/or sell copies of the Software, and to permit persons to whom the +Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included +in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL +BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN +AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + + +Some parts of Mesa are copyrighted under the GNU LGPL. See the +Mesa/docs/COPYRIGHT file for details. + +The following is the standard GNU copyright file. +---------------------------------------------------------------------- + + + GNU LIBRARY GENERAL PUBLIC LICENSE + Version 2, June 1991 + + Copyright (C) 1991 Free Software Foundation, Inc. + 675 Mass Ave, Cambridge, MA 02139, USA + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + +[This is the first released version of the library GPL. It is + numbered 2 because it goes with version 2 of the ordinary GPL.] + + Preamble + + The licenses for most software are designed to take away your +freedom to share and change it. By contrast, the GNU General Public +Licenses are intended to guarantee your freedom to share and change +free software--to make sure the software is free for all its users. + + This license, the Library General Public License, applies to some +specially designated Free Software Foundation software, and to any +other libraries whose authors decide to use it. You can use it for +your libraries, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +this service if you wish), that you receive source code or can get it +if you want it, that you can change the software or use pieces of it +in new free programs; and that you know you can do these things. + + To protect your rights, we need to make restrictions that forbid +anyone to deny you these rights or to ask you to surrender the rights. +These restrictions translate to certain responsibilities for you if +you distribute copies of the library, or if you modify it. + + For example, if you distribute copies of the library, whether gratis +or for a fee, you must give the recipients all the rights that we gave +you. You must make sure that they, too, receive or can get the source +code. If you link a program with the library, you must provide +complete object files to the recipients so that they can relink them +with the library, after making changes to the library and recompiling +it. And you must show them these terms so they know their rights. + + Our method of protecting your rights has two steps: (1) copyright +the library, and (2) offer you this license which gives you legal +permission to copy, distribute and/or modify the library. + + Also, for each distributor's protection, we want to make certain +that everyone understands that there is no warranty for this free +library. If the library is modified by someone else and passed on, we +want its recipients to know that what they have is not the original +version, so that any problems introduced by others will not reflect on +the original authors' reputations. + + Finally, any free program is threatened constantly by software +patents. We wish to avoid the danger that companies distributing free +software will individually obtain patent licenses, thus in effect +transforming the program into proprietary software. To prevent this, +we have made it clear that any patent must be licensed for everyone's +free use or not licensed at all. + + Most GNU software, including some libraries, is covered by the ordinary +GNU General Public License, which was designed for utility programs. This +license, the GNU Library General Public License, applies to certain +designated libraries. This license is quite different from the ordinary +one; be sure to read it in full, and don't assume that anything in it is +the same as in the ordinary license. + + The reason we have a separate public license for some libraries is that +they blur the distinction we usually make between modifying or adding to a +program and simply using it. Linking a program with a library, without +changing the library, is in some sense simply using the library, and is +analogous to running a utility program or application program. However, in +a textual and legal sense, the linked executable is a combined work, a +derivative of the original library, and the ordinary General Public License +treats it as such. + + Because of this blurred distinction, using the ordinary General +Public License for libraries did not effectively promote software +sharing, because most developers did not use the libraries. We +concluded that weaker conditions might promote sharing better. + + However, unrestricted linking of non-free programs would deprive the +users of those programs of all benefit from the free status of the +libraries themselves. This Library General Public License is intended to +permit developers of non-free programs to use free libraries, while +preserving your freedom as a user of such programs to change the free +libraries that are incorporated in them. (We have not seen how to achieve +this as regards changes in header files, but we have achieved it as regards +changes in the actual functions of the Library.) The hope is that this +will lead to faster development of free libraries. + + The precise terms and conditions for copying, distribution and +modification follow. Pay close attention to the difference between a +"work based on the library" and a "work that uses the library". The +former contains code derived from the library, while the latter only +works together with the library. + + Note that it is possible for a library to be covered by the ordinary +General Public License rather than by this special one. + + GNU LIBRARY GENERAL PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. This License Agreement applies to any software library which +contains a notice placed by the copyright holder or other authorized +party saying it may be distributed under the terms of this Library +General Public License (also called "this License"). Each licensee is +addressed as "you". + + A "library" means a collection of software functions and/or data +prepared so as to be conveniently linked with application programs +(which use some of those functions and data) to form executables. + + The "Library", below, refers to any such software library or work +which has been distributed under these terms. A "work based on the +Library" means either the Library or any derivative work under +copyright law: that is to say, a work containing the Library or a +portion of it, either verbatim or with modifications and/or translated +straightforwardly into another language. (Hereinafter, translation is +included without limitation in the term "modification".) + + "Source code" for a work means the preferred form of the work for +making modifications to it. For a library, complete source code means +all the source code for all modules it contains, plus any associated +interface definition files, plus the scripts used to control compilation +and installation of the library. + + Activities other than copying, distribution and modification are not +covered by this License; they are outside its scope. The act of +running a program using the Library is not restricted, and output from +such a program is covered only if its contents constitute a work based +on the Library (independent of the use of the Library in a tool for +writing it). Whether that is true depends on what the Library does +and what the program that uses the Library does. + + 1. You may copy and distribute verbatim copies of the Library's +complete source code as you receive it, in any medium, provided that +you conspicuously and appropriately publish on each copy an +appropriate copyright notice and disclaimer of warranty; keep intact +all the notices that refer to this License and to the absence of any +warranty; and distribute a copy of this License along with the +Library. + + You may charge a fee for the physical act of transferring a copy, +and you may at your option offer warranty protection in exchange for a +fee. + + 2. You may modify your copy or copies of the Library or any portion +of it, thus forming a work based on the Library, and copy and +distribute such modifications or work under the terms of Section 1 +above, provided that you also meet all of these conditions: + + a) The modified work must itself be a software library. + + b) You must cause the files modified to carry prominent notices + stating that you changed the files and the date of any change. + + c) You must cause the whole of the work to be licensed at no + charge to all third parties under the terms of this License. + + d) If a facility in the modified Library refers to a function or a + table of data to be supplied by an application program that uses + the facility, other than as an argument passed when the facility + is invoked, then you must make a good faith effort to ensure that, + in the event an application does not supply such function or + table, the facility still operates, and performs whatever part of + its purpose remains meaningful. + + (For example, a function in a library to compute square roots has + a purpose that is entirely well-defined independent of the + application. Therefore, Subsection 2d requires that any + application-supplied function or table used by this function must + be optional: if the application does not supply it, the square + root function must still compute square roots.) + +These requirements apply to the modified work as a whole. If +identifiable sections of that work are not derived from the Library, +and can be reasonably considered independent and separate works in +themselves, then this License, and its terms, do not apply to those +sections when you distribute them as separate works. But when you +distribute the same sections as part of a whole which is a work based +on the Library, the distribution of the whole must be on the terms of +this License, whose permissions for other licensees extend to the +entire whole, and thus to each and every part regardless of who wrote +it. + +Thus, it is not the intent of this section to claim rights or contest +your rights to work written entirely by you; rather, the intent is to +exercise the right to control the distribution of derivative or +collective works based on the Library. + +In addition, mere aggregation of another work not based on the Library +with the Library (or with a work based on the Library) on a volume of +a storage or distribution medium does not bring the other work under +the scope of this License. + + 3. You may opt to apply the terms of the ordinary GNU General Public +License instead of this License to a given copy of the Library. To do +this, you must alter all the notices that refer to this License, so +that they refer to the ordinary GNU General Public License, version 2, +instead of to this License. (If a newer version than version 2 of the +ordinary GNU General Public License has appeared, then you can specify +that version instead if you wish.) Do not make any other change in +these notices. + + Once this change is made in a given copy, it is irreversible for +that copy, so the ordinary GNU General Public License applies to all +subsequent copies and derivative works made from that copy. + + This option is useful when you wish to copy part of the code of +the Library into a program that is not a library. + + 4. You may copy and distribute the Library (or a portion or +derivative of it, under Section 2) in object code or executable form +under the terms of Sections 1 and 2 above provided that you accompany +it with the complete corresponding machine-readable source code, which +must be distributed under the terms of Sections 1 and 2 above on a +medium customarily used for software interchange. + + If distribution of object code is made by offering access to copy +from a designated place, then offering equivalent access to copy the +source code from the same place satisfies the requirement to +distribute the source code, even though third parties are not +compelled to copy the source along with the object code. + + 5. A program that contains no derivative of any portion of the +Library, but is designed to work with the Library by being compiled or +linked with it, is called a "work that uses the Library". Such a +work, in isolation, is not a derivative work of the Library, and +therefore falls outside the scope of this License. + + However, linking a "work that uses the Library" with the Library +creates an executable that is a derivative of the Library (because it +contains portions of the Library), rather than a "work that uses the +library". The executable is therefore covered by this License. +Section 6 states terms for distribution of such executables. + + When a "work that uses the Library" uses material from a header file +that is part of the Library, the object code for the work may be a +derivative work of the Library even though the source code is not. +Whether this is true is especially significant if the work can be +linked without the Library, or if the work is itself a library. The +threshold for this to be true is not precisely defined by law. + + If such an object file uses only numerical parameters, data +structure layouts and accessors, and small macros and small inline +functions (ten lines or less in length), then the use of the object +file is unrestricted, regardless of whether it is legally a derivative +work. (Executables containing this object code plus portions of the +Library will still fall under Section 6.) + + Otherwise, if the work is a derivative of the Library, you may +distribute the object code for the work under the terms of Section 6. +Any executables containing that work also fall under Section 6, +whether or not they are linked directly with the Library itself. + + 6. As an exception to the Sections above, you may also compile or +link a "work that uses the Library" with the Library to produce a +work containing portions of the Library, and distribute that work +under terms of your choice, provided that the terms permit +modification of the work for the customer's own use and reverse +engineering for debugging such modifications. + + You must give prominent notice with each copy of the work that the +Library is used in it and that the Library and its use are covered by +this License. You must supply a copy of this License. If the work +during execution displays copyright notices, you must include the +copyright notice for the Library among them, as well as a reference +directing the user to the copy of this License. Also, you must do one +of these things: + + a) Accompany the work with the complete corresponding + machine-readable source code for the Library including whatever + changes were used in the work (which must be distributed under + Sections 1 and 2 above); and, if the work is an executable linked + with the Library, with the complete machine-readable "work that + uses the Library", as object code and/or source code, so that the + user can modify the Library and then relink to produce a modified + executable containing the modified Library. (It is understood + that the user who changes the contents of definitions files in the + Library will not necessarily be able to recompile the application + to use the modified definitions.) + + b) Accompany the work with a written offer, valid for at + least three years, to give the same user the materials + specified in Subsection 6a, above, for a charge no more + than the cost of performing this distribution. + + c) If distribution of the work is made by offering access to copy + from a designated place, offer equivalent access to copy the above + specified materials from the same place. + + d) Verify that the user has already received a copy of these + materials or that you have already sent this user a copy. + + For an executable, the required form of the "work that uses the +Library" must include any data and utility programs needed for +reproducing the executable from it. However, as a special exception, +the source code distributed need not include anything that is normally +distributed (in either source or binary form) with the major +components (compiler, kernel, and so on) of the operating system on +which the executable runs, unless that component itself accompanies +the executable. + + It may happen that this requirement contradicts the license +restrictions of other proprietary libraries that do not normally +accompany the operating system. Such a contradiction means you cannot +use both them and the Library together in an executable that you +distribute. + + 7. You may place library facilities that are a work based on the +Library side-by-side in a single library together with other library +facilities not covered by this License, and distribute such a combined +library, provided that the separate distribution of the work based on +the Library and of the other library facilities is otherwise +permitted, and provided that you do these two things: + + a) Accompany the combined library with a copy of the same work + based on the Library, uncombined with any other library + facilities. This must be distributed under the terms of the + Sections above. + + b) Give prominent notice with the combined library of the fact + that part of it is a work based on the Library, and explaining + where to find the accompanying uncombined form of the same work. + + 8. You may not copy, modify, sublicense, link with, or distribute +the Library except as expressly provided under this License. Any +attempt otherwise to copy, modify, sublicense, link with, or +distribute the Library is void, and will automatically terminate your +rights under this License. However, parties who have received copies, +or rights, from you under this License will not have their licenses +terminated so long as such parties remain in full compliance. + + 9. You are not required to accept this License, since you have not +signed it. However, nothing else grants you permission to modify or +distribute the Library or its derivative works. These actions are +prohibited by law if you do not accept this License. Therefore, by +modifying or distributing the Library (or any work based on the +Library), you indicate your acceptance of this License to do so, and +all its terms and conditions for copying, distributing or modifying +the Library or works based on it. + + 10. Each time you redistribute the Library (or any work based on the +Library), the recipient automatically receives a license from the +original licensor to copy, distribute, link with or modify the Library +subject to these terms and conditions. You may not impose any further +restrictions on the recipients' exercise of the rights granted herein. +You are not responsible for enforcing compliance by third parties to +this License. + + 11. If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), +conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot +distribute so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you +may not distribute the Library at all. For example, if a patent +license would not permit royalty-free redistribution of the Library by +all those who receive copies directly or indirectly through you, then +the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Library. + +If any portion of this section is held invalid or unenforceable under any +particular circumstance, the balance of the section is intended to apply, +and the section as a whole is intended to apply in other circumstances. + +It is not the purpose of this section to induce you to infringe any +patents or other property right claims or to contest validity of any +such claims; this section has the sole purpose of protecting the +integrity of the free software distribution system which is +implemented by public license practices. Many people have made +generous contributions to the wide range of software distributed +through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing +to distribute software through any other system and a licensee cannot +impose that choice. + +This section is intended to make thoroughly clear what is believed to +be a consequence of the rest of this License. + + 12. If the distribution and/or use of the Library is restricted in +certain countries either by patents or by copyrighted interfaces, the +original copyright holder who places the Library under this License may add +an explicit geographical distribution limitation excluding those countries, +so that distribution is permitted only in or among countries not thus +excluded. In such case, this License incorporates the limitation as if +written in the body of this License. + + 13. The Free Software Foundation may publish revised and/or new +versions of the Library General Public License from time to time. +Such new versions will be similar in spirit to the present version, +but may differ in detail to address new problems or concerns. + +Each version is given a distinguishing version number. If the Library +specifies a version number of this License which applies to it and +"any later version", you have the option of following the terms and +conditions either of that version or of any later version published by +the Free Software Foundation. If the Library does not specify a +license version number, you may choose any version ever published by +the Free Software Foundation. + + 14. If you wish to incorporate parts of the Library into other free +programs whose distribution conditions are incompatible with these, +write to the author to ask for permission. For software which is +copyrighted by the Free Software Foundation, write to the Free +Software Foundation; we sometimes make exceptions for this. Our +decision will be guided by the two goals of preserving the free status +of all derivatives of our free software and of promoting the sharing +and reuse of software generally. + + NO WARRANTY + + 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO +WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. +EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR +OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY +KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE +LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME +THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + + 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN +WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY +AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU +FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR +CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE +LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING +RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A +FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF +SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH +DAMAGES. + + END OF TERMS AND CONDITIONS + + Appendix: How to Apply These Terms to Your New Libraries + + If you develop a new library, and you want it to be of the greatest +possible use to the public, we recommend making it free software that +everyone can redistribute and change. You can do so by permitting +redistribution under these terms (or, alternatively, under the terms of the +ordinary General Public License). + + To apply these terms, attach the following notices to the library. It is +safest to attach them to the start of each source file to most effectively +convey the exclusion of warranty; and each file should have at least the +"copyright" line and a pointer to where the full notice is found. + + <one line to give the library's name and a brief idea of what it does.> + Copyright (C) <year> <name of author> + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with this library; if not, write to the Free + Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + +Also add information on how to contact you by electronic and paper mail. + +You should also get your employer (if you work as a programmer) or your +school, if any, to sign a "copyright disclaimer" for the library, if +necessary. Here is a sample; alter the names: + + Yoyodyne, Inc., hereby disclaims all copyright interest in the + library `Frob' (a library for tweaking knobs) written by James Random Hacker. + + <signature of Ty Coon>, 1 April 1990 + Ty Coon, President of Vice + +That's all there is to it! +
diff --git a/third_party/mesa_headers/OWNERS b/third_party/mesa_headers/OWNERS new file mode 100644 index 0000000..cba5084 --- /dev/null +++ b/third_party/mesa_headers/OWNERS
@@ -0,0 +1,5 @@ +sugoi@chromium.org +kbr@chromium.org +senorblanco@chromium.org +piman@chromium.org +
diff --git a/third_party/mesa_headers/README.chromium b/third_party/mesa_headers/README.chromium new file mode 100644 index 0000000..90312c2 --- /dev/null +++ b/third_party/mesa_headers/README.chromium
@@ -0,0 +1,17 @@ +Name: mesa_headers +Version: 9.0.3 +URL: http://www.mesa3d.org/ +License: MIT and LGPL v2 +Security Critical: Yes + +Description: +This directory contains a copy of the Mesa headers. + +The license file in this directory is derived from src/docs/license.html +and src/docs/COPYING. + +Modifications made: +- Added the file README.chromium (this file) + +- Checked in public headers normally autogenerated during Mesa's build + process in this directory.
diff --git a/third_party/mockito/BUILD.gn b/third_party/mockito/BUILD.gn index 2c19da2..f6e4cad 100644 --- a/third_party/mockito/BUILD.gn +++ b/third_party/mockito/BUILD.gn
@@ -475,7 +475,8 @@ include_java_resources = true additional_jar_files = [ [ rebase_path( - "src/subprojects/android/src/main/resources/mockito-extensions/org.mockito.plugins.MockMaker"), + "src/subprojects/android/src/main/resources/mockito-extensions/org.mockito.plugins.MockMaker", + root_build_dir), "mockito-extensions/org.mockito.plugins.MockMaker", ] ] }
diff --git a/third_party/robolectric/BUILD.gn b/third_party/robolectric/BUILD.gn index 935065fec..530637f 100644 --- a/third_party/robolectric/BUILD.gn +++ b/third_party/robolectric/BUILD.gn
@@ -116,7 +116,8 @@ ] additional_jar_files = [ [ rebase_path( - "local/robolectric/src/main/resources/robolectric-version.properties"), + "local/robolectric/src/main/resources/robolectric-version.properties", + root_build_dir), "robolectric-version.properties", ] ] @@ -366,29 +367,34 @@ if (host_os == "linux") { additional_jar_files = [ [ - rebase_path("../sqlite4java/lib/linux-x86_64/libsqlite4java.so"), + rebase_path("../sqlite4java/lib/linux-x86_64/libsqlite4java.so", + root_build_dir), "linux-x86_64/libsqlite4java.so", ], [ - rebase_path("../sqlite4java/lib/linux-x86/libsqlite4java.so"), + rebase_path("../sqlite4java/lib/linux-x86/libsqlite4java.so", + root_build_dir), "linux-x86/libsqlite4java.so", ], ] } if (host_os == "mac") { additional_jar_files = [ [ - rebase_path("../sqlite4java/lib/mac-x86_64/libsqlite4java.jnilib"), + rebase_path("../sqlite4java/lib/mac-x86_64/libsqlite4java.jnilib", + root_build_dir), "mac-x86_64/libsqlite4java.jnilib", ] ] } if (host_os == "win") { additional_jar_files = [ [ - rebase_path("../sqlite4java/lib/windows-x86/sqlite4java.dll"), + rebase_path("../sqlite4java/lib/windows-x86/sqlite4java.dll", + root_build_dir), "windows-x86/sqlite4java.dll", ], [ - rebase_path("../sqlite4java/lib/windows-x86_64/sqlite4java.dll"), + rebase_path("../sqlite4java/lib/windows-x86_64/sqlite4java.dll", + root_build_dir), "windows-x86_64/sqlite4java.dll", ], ]
diff --git a/tools/android/kerberos/OWNERS b/tools/android/kerberos/OWNERS deleted file mode 100644 index 42175cf1..0000000 --- a/tools/android/kerberos/OWNERS +++ /dev/null
@@ -1,2 +0,0 @@ -aberent@chromium.org -dgn@chromium.org
diff --git a/tools/check_grd_for_unused_strings.py b/tools/check_grd_for_unused_strings.py index 2defb2f..773e574 100755 --- a/tools/check_grd_for_unused_strings.py +++ b/tools/check_grd_for_unused_strings.py
@@ -155,6 +155,7 @@ os.path.join(chrome_dir, 'renderer', 'resources', 'renderer_resources.grd'), os.path.join(device_base_dir, 'bluetooth', 'bluetooth_strings.grd'), + os.path.join(device_base_dir, 'fido', 'fido_strings.grd'), os.path.join(src_dir, 'extensions', 'strings', 'extensions_strings.grd'), os.path.join(src_dir, 'ui', 'resources', 'ui_resources.grd'), os.path.join(src_dir, 'ui', 'webui', 'resources', 'webui_resources.grd'),
diff --git a/tools/grit/grit_rule.gni b/tools/grit/grit_rule.gni index f8eafcd..bc2de8c 100644 --- a/tools/grit/grit_rule.gni +++ b/tools/grit/grit_rule.gni
@@ -384,7 +384,7 @@ } } if (_strip_resource_files) { - js_minifier_command = rebase_path(_js_minifier) + js_minifier_command = rebase_path(_js_minifier, root_build_dir) js_minifier_command = "$js_minifier_command --closure_args" foreach(closure_arg, common_closure_args + minifying_closure_args +
diff --git a/tools/gritsettings/resource_ids b/tools/gritsettings/resource_ids index 7adeec49..1d65f032 100644 --- a/tools/gritsettings/resource_ids +++ b/tools/gritsettings/resource_ids
@@ -81,69 +81,69 @@ # START chrome/browser section. "chrome/browser/browser_resources.grd": { "includes": [11000], - "structures": [11485], + "structures": [12000], }, "chrome/browser/resources/chromeos/multidevice_setup/multidevice_setup_resources.grd": { - "structures": [11525], + "structures": [12040], }, "chrome/browser/resources/component_extension_resources.grd": { - "includes": [11570], - "structures": [11820], + "includes": [12100], + "structures": [12350], }, "chrome/browser/resources/invalidations_resources.grd": { - "includes": [11870], + "includes": [12400], }, "chrome/browser/resources/md_extensions/extensions_resources_vulcanized.grd": { - "includes": [11910], + "includes": [12440], }, "chrome/browser/resources/md_extensions/extensions_resources.grd": { - "structures": [11920], + "structures": [12450], }, "chrome/browser/resources/net_internals_resources.grd": { - "includes": [12010], + "includes": [12540], }, "chrome/browser/resources/print_preview/print_preview_resources_vulcanized.grd": { - "includes": [12020], + "includes": [12550], }, "chrome/browser/resources/print_preview/print_preview_resources.grd": { - "structures": [12030], + "structures": [12560], }, "chrome/browser/resources/quota_internals_resources.grd": { - "includes": [12220], - }, - "chrome/browser/resources/settings/settings_resources_vulcanized.grd": { - "includes": [12240], - }, - "chrome/browser/resources/settings/settings_resources.grd": { - "structures": [12250], - }, - "chrome/browser/resources/sync_file_system_internals_resources.grd": { "includes": [12750], }, + "chrome/browser/resources/settings/settings_resources_vulcanized.grd": { + "includes": [12770], + }, + "chrome/browser/resources/settings/settings_resources.grd": { + "structures": [12780], + }, + "chrome/browser/resources/sync_file_system_internals_resources.grd": { + "includes": [13280], + }, "chrome/browser/resources/task_scheduler_internals/resources.grd": { - "includes": [12780], + "includes": [13310], }, "chrome/browser/resources/translate_internals_resources.grd": { - "includes": [12790], + "includes": [13320], }, "chrome/browser/resources/webapks_ui_resources.grd": { - "includes": [12810], + "includes": [13340], }, "chrome/browser/vr/testapp/vr_testapp_resources.grd": { - "includes": [12820], + "includes": [13350], }, # END chrome/browser section. # START chrome/ miscellaneous section. "chrome/common/common_resources.grd": { - "includes": [12850], + "includes": [13380], }, "chrome/renderer/resources/renderer_resources.grd": { - "includes": [12860], - "structures": [12940], + "includes": [13390], + "structures": [13470], }, "chrome/test/data/webui_test_resources.grd": { - "includes": [12950], + "includes": [13480], }, # END chrome/ miscellaneous section. @@ -309,6 +309,10 @@ "messages": [24400], }, + "device/fido/fido_strings.grd": { + "messages": [24440], + }, + "extensions/browser/resources/extensions_browser_resources.grd": { "structures": [24450], },
diff --git a/tools/gritsettings/translation_expectations.pyl b/tools/gritsettings/translation_expectations.pyl index 83ae19b..c55af97ec 100644 --- a/tools/gritsettings/translation_expectations.pyl +++ b/tools/gritsettings/translation_expectations.pyl
@@ -34,6 +34,7 @@ "components/policy/resources/policy_templates.grd", "content/app/strings/content_strings.grd", "device/bluetooth/bluetooth_strings.grd", + "device/fido/fido_strings.grd", "extensions/strings/extensions_strings.grd", "ios/chrome/app/strings/ios_chromium_strings.grd", "ios/chrome/app/strings/ios_google_chrome_strings.grd",
diff --git a/tools/metrics/BUILD.gn b/tools/metrics/BUILD.gn index 84417f33..c95de626 100644 --- a/tools/metrics/BUILD.gn +++ b/tools/metrics/BUILD.gn
@@ -104,6 +104,9 @@ "//tools/metrics/histograms/generate_expired_histograms_array_unittest.py", "//tools/metrics/histograms/merge_xml.py", + "//tools/metrics/rappor/model.py", + "//tools/metrics/rappor/pretty_print_test.py", + "//tools/metrics/ukm/model.py", "//tools/metrics/ukm/pretty_print_test.py",
diff --git a/tools/metrics/actions/actions.xml b/tools/metrics/actions/actions.xml index b62c1f9..fc16c09 100644 --- a/tools/metrics/actions/actions.xml +++ b/tools/metrics/actions/actions.xml
@@ -3338,6 +3338,10 @@ </action> <action name="BrowserForSystemProfile"> + <obsolete> + No longer needed as the number of users affected by https://crbug.com/482176 + is now approximately zero. + </obsolete> <owner>mlerman@chromium.org</owner> <description> A browser opened with the System Profile. Tsk, tsk. Any non-zero amount
diff --git a/tools/metrics/histograms/README.md b/tools/metrics/histograms/README.md index 1bd62943..4d9a1832 100644 --- a/tools/metrics/histograms/README.md +++ b/tools/metrics/histograms/README.md
@@ -204,6 +204,16 @@ Histograms) might work better for you in that case--they do not pre- allocate their buckets). +### Timing Histograms + +You can easily emit a time duration (time delta) using UMA_HISTOGRAM_TIMES, +UMA_HISTOGRAM_MEDIUM_TIMES, and UMA_HISTOGRAM_LONG_TIMES macros, and their +friends, as well as helpers such as SCOPED_UMA_HISTOGRAM_TIMER. Many timing +histograms are used for performance monitoring; if this is the case for you, +please read [this document about how to structure timing histograms to make +them more useful and +actionable](https://chromium.googlesource.com/chromium/src/+/lkcr/docs/speed/diagnostic_metrics.md). + ### Percentage or Ratio Histograms You can easily emit a percentage histogram using the
diff --git a/tools/metrics/histograms/enums.xml b/tools/metrics/histograms/enums.xml index ba7204c..e6874e1 100644 --- a/tools/metrics/histograms/enums.xml +++ b/tools/metrics/histograms/enums.xml
@@ -361,8 +361,9 @@ </enum> <enum name="AccessoryAction"> - <int value="0" label="Automatic password generation selected"/> - <int value="1" label="'Manage all passwords' link selected"/> + <int value="0" label="Automatic password generation"/> + <int value="1" label="'Manage all passwords' link"/> + <int value="2" label="Autofill suggestion"/> </enum> <enum name="AccessoryBarContents"> @@ -9874,6 +9875,13 @@ <int value="3" label="Invalid delays">Insufficient amount of data.</int> </enum> +<enum name="DeleteUndecryptableLoginsReturnValue"> + <int value="0" label="Success - no passwords were deleted"/> + <int value="1" label="Success - there were deleted passwords"/> + <int value="2" label="Item failure"/> + <int value="3" label="Encryption unavailable"/> +</enum> + <enum name="DeprecatedAcceleratorUsage"> <int value="0" label="Deprecated key accelerator is used"/> <int value="1" label="New key accelerator is used"/> @@ -19581,6 +19589,7 @@ <int value="2524" label="PPAPIWebSocket"/> <int value="2525" label="V8MediaStreamTrack_ContentHint_AttributeGetter"/> <int value="2526" label="V8MediaStreamTrack_ContentHint_AttributeSetter"/> + <int value="2527" label="V8IDBFactory_Open_Method"/> </enum> <enum name="FeedbackSource"> @@ -19594,6 +19603,12 @@ <int value="7" label="Supervised User Interstitial"/> </enum> +<enum name="FeedImageFetchResult"> + <int value="0" label="Fetch cache success"/> + <int value="1" label="Fetch network success"/> + <int value="2" label="Fetch failure"/> +</enum> + <enum name="FetchRequestMode"> <int value="0" label="SameOrigin"/> <int value="1" label="NoCORS"/> @@ -27833,6 +27848,7 @@ <int value="-1731149013" label="AndroidMessagesIntegration:enabled"/> <int value="-1729926412" label="enable-webusb-notifications"/> <int value="-1725507605" label="enable-web-midi"/> + <int value="-1720653947" label="WebRtcHybridAgc:disabled"/> <int value="-1719833926" label="disable-answers-in-suggest"/> <int value="-1716654100" label="tab-capture-downscale-quality"/> <int value="-1714128884" label="disable-launcher-search-provider-api"/> @@ -28655,6 +28671,7 @@ <int value="-70595606" label="ash-enable-unified-desktop"/> <int value="-69427025" label="OfflinePagesPrefetchingUI:enabled"/> <int value="-68877684" label="BackgroundVideoTrackOptimization:enabled"/> + <int value="-68619312" label="PassiveDocumentWheelEventListeners:disabled"/> <int value="-68225452" label="enable-translate-new-ux"/> <int value="-67297229" label="OfflinePagesDescriptivePendingStatus:disabled"/> <int value="-64839201" label="SyncUSSAutofillWalletData:disabled"/> @@ -29070,6 +29087,7 @@ <int value="806334184" label="AndroidSpellChecker:enabled"/> <int value="807447752" label="ChromeMemex:disabled"/> <int value="807734471" label="tab-management-experiment-type-disabled"/> + <int value="809698565" label="WebRtcHybridAgc:enabled"/> <int value="811374216" label="disable-new-bookmark-apps"/> <int value="812710781" label="SyncUSSBookmarks:disabled"/> <int value="820650704" label="disable-ntp-popular-sites"/> @@ -29479,6 +29497,7 @@ <int value="1630988998" label="VrBrowsingExperimentalRendering:disabled"/> <int value="1632112977" label="ash-disable-tablet-autohide-titlebars"/> <int value="1633456034" label="chrome-home-swipe-logic"/> + <int value="1634732103" label="PassiveDocumentWheelEventListeners:enabled"/> <int value="1634897915" label="password-import-export:enabled"/> <int value="1634980726" label="VrShellExperimentalRendering:disabled"/> <int value="1636962093" label="disable-material-design-ntp"/> @@ -34677,21 +34696,22 @@ </enum> <enum name="NTPCustomizeAction"> - <int value="0" label="'Chrome backgrounds' menu item clicked"/> - <int value="1" label="'Upload an image' menu item clicked"/> - <int value="2" label="'Restore default background' menu item clicked"/> - <int value="3" label="Attribution link on a customized background clicked"/> - <int value="4" label="Add shortcut' link clicked."/> - <int value="5" label="Edit shortcut' link clicked."/> - <int value="6" label="Restore default shortcuts' menu item clicked."/> + <int value="0" label="'Chrome backgrounds' menu item clicked."/> + <int value="1" label="'Upload an image' menu item clicked."/> + <int value="2" label="'Restore default background' menu item clicked."/> + <int value="3" label="Attribution link on a customized background clicked."/> + <int value="4" label="'Add shortcut' link clicked."/> + <int value="5" label="'Edit shortcut' link clicked."/> + <int value="6" label="'Restore default shortcuts' menu item clicked."/> </enum> <enum name="NTPCustomizeChromeBackgroundAction"> <int value="0" - label="Collection selected in the 'Chrome backgrounds' dialog"/> - <int value="1" label="Image selected in the 'Chrome backgrounds' dialog"/> - <int value="2" label="'Cancel' clicked in the 'Chrome backgrounds' dialog"/> - <int value="3" label="'Done' clicked in the 'Chrome backgrounds' dialog"/> + label="Collection selected in the 'Chrome backgrounds' dialog."/> + <int value="1" label="Image selected in the 'Chrome backgrounds' dialog."/> + <int value="2" label="'Cancel' clicked in the 'Chrome backgrounds' dialog."/> + <int value="3" + label="Image set as background (through double-click or 'Done')."/> </enum> <enum name="NTPCustomizedFeatures"> @@ -34705,12 +34725,14 @@ </enum> <enum name="NTPCustomizeShortcutAction"> - <int value="0" label="Remove' clicked in the 'Edit shortcut' dialog"/> - <int value="1" label="Cancel' clicked in the 'Edit shortcut' dialog"/> - <int value="2" label="Done' clicked in the 'Edit shortcut' dialog"/> - <int value="3" label="'Undo' clicked in the message pop-up"/> + <int value="0" label="A custom shortcut was removed."/> + <int value="1" label="'Cancel' was clicked in the 'Edit shortcut' dialog."/> + <int value="2" label="'Done' was clicked in the 'Edit shortcut' dialog."/> + <int value="3" label="A custom shortcut action was undone."/> <int value="4" - label="'Restore default shortcuts' clicked in the message pop-up"/> + label="All custom shortcuts were restored (via menu or message pop-up)."/> + <int value="5" label="A custom shortcut was added."/> + <int value="6" label="A custom shortcut was updated."/> </enum> <enum name="NtpFollowAction"> @@ -43038,6 +43060,7 @@ <int value="28" label="CAN_MAKE_PAYMENT"/> <int value="29" label="ABORT_PAYMENT"/> <int value="30" label="COOKIE_CHANGE"/> + <int value="31" label="BACKGROUND_FETCH_SUCCESS"/> </enum> <enum name="ServiceWorkerPreparationType">
diff --git a/tools/metrics/histograms/histograms.xml b/tools/metrics/histograms/histograms.xml index cab7ce1..4a1c517 100644 --- a/tools/metrics/histograms/histograms.xml +++ b/tools/metrics/histograms/histograms.xml
@@ -347,6 +347,15 @@ </summary> </histogram> +<histogram name="Accessibility.OOBEStartupSoundDelay" units="ms"> + <owner>lpalmaro@chromium.org</owner> + <owner>alemate@chromium.org</owner> + <summary> + Delay between login_prompt_visible and Chrome OS OOBE startup sound + playback. Depends on sound subsystem initialization time. + </summary> +</histogram> + <histogram name="Accessibility.State" enum="BooleanEnabled"> <obsolete> Deprecated 12/2016 in Issue 672205 with the addition of @@ -6921,6 +6930,15 @@ </summary> </histogram> +<histogram name="Autofill.PaymentsCustomerDataBillingIdIsValid" enum="Boolean" + expires_after="2019-08-07"> + <owner>mathp@chromium.org</owner> + <summary> + When PaymentsCustomerData is used to send a request to Google Payments, we + log the validity state of the billing customer ID. + </summary> +</histogram> + <histogram name="Autofill.ProfileActionOnFormSubmitted" enum="AutofillProfileAction"> <owner>sebsg@chromium.org</owner> @@ -7616,6 +7634,16 @@ </summary> </histogram> +<histogram base="true" name="BackgroundFetch.Manager" units="ms"> +<!-- Name completed by histogram_suffixes name="BackgroundFetchManagerAPIsDuration" --> + + <owner>rayankans@chromium.org</owner> + <summary> + Records the duration of the mojo call for the exposed BackgroundFetchManager + APIs. + </summary> +</histogram> + <histogram name="BackgroundFetch.RegistrationCreatedError" enum="BackgroundFetchError"> <owner>peter@chromium.org</owner> @@ -20629,12 +20657,17 @@ </histogram> <histogram name="Download.AcceptRangesBytes.KBytes" units="KB"> + <obsolete> + Removed in 08/2018. + </obsolete> <owner>asanka@chromium.org</owner> <summary>The length of downloads for serves that accept byte ranges.</summary> </histogram> -<histogram name="Download.AcceptRangesMissingOrInvalid.KBytes" units="KB" - expires_after="2018-08-30"> +<histogram name="Download.AcceptRangesMissingOrInvalid.KBytes" units="KB"> + <obsolete> + Removed in 08/2018. + </obsolete> <owner>asanka@chromium.org</owner> <summary> The length of downloads for serves that do not specify whether the accept @@ -20642,8 +20675,10 @@ </summary> </histogram> -<histogram name="Download.AcceptRangesNone.KBytes" units="KB" - expires_after="2018-08-30"> +<histogram name="Download.AcceptRangesNone.KBytes" units="KB"> + <obsolete> + Removed in 08/2018. + </obsolete> <owner>asanka@chromium.org</owner> <summary> The length of downloads for serves that do not accept ranges. @@ -20672,7 +20707,10 @@ </histogram> <histogram name="Download.AttachmentServices.Result" - enum="AttachmentServicesResult" expires_after="2018-08-30"> + enum="AttachmentServicesResult"> + <obsolete> + Removed in 08/2018. + </obsolete> <owner>asanka@chromium.org</owner> <summary> Result of invoking (or attempting to invoke) Windows Attachment Services API @@ -20680,8 +20718,10 @@ </summary> </histogram> -<histogram name="Download.BandwidthDiskBytesPerSecond" - expires_after="2018-08-30"> +<histogram name="Download.BandwidthDiskBytesPerSecond"> + <obsolete> + Removed in 08/2018. + </obsolete> <owner>asanka@chromium.org</owner> <summary> Disk bandwidth (defined as total bytes divided by the amount of time blocked @@ -20867,8 +20907,10 @@ </summary> </histogram> -<histogram name="Download.Database.CreateDownloadDuration" units="ms" - expires_after="2018-08-30"> +<histogram name="Download.Database.CreateDownloadDuration" units="ms"> + <obsolete> + Removed in 08/2018. + </obsolete> <owner>asanka@chromium.org</owner> <summary>Time taken to create a single download in the history DB.</summary> </histogram> @@ -20883,14 +20925,18 @@ </summary> </histogram> -<histogram name="Download.Database.QueryDownloadDuration" units="ms" - expires_after="2018-08-30"> +<histogram name="Download.Database.QueryDownloadDuration" units="ms"> + <obsolete> + Removed in 08/2018. + </obsolete> <owner>asanka@chromium.org</owner> <summary>Time taken to query all downloads from history DB.</summary> </histogram> -<histogram name="Download.Database.UpdateDownloadDuration" units="ms" - expires_after="2018-08-30"> +<histogram name="Download.Database.UpdateDownloadDuration" units="ms"> + <obsolete> + Removed in 08/2018. + </obsolete> <owner>asanka@chromium.org</owner> <summary>Time taken to update a single download in the history DB.</summary> </histogram> @@ -20906,13 +20952,18 @@ </histogram> <histogram name="Download.DatabaseRecordDropped" - enum="DownloadDatabaseRecordDroppedType" expires_after="2018-08-30"> + enum="DownloadDatabaseRecordDroppedType"> + <obsolete> + Removed in 08/2018. + </obsolete> <owner>asanka@chromium.org</owner> <summary>Reason for dropping a record read in from the DB.</summary> </histogram> -<histogram name="Download.DatabaseRemoveDownloadsCount" - expires_after="2018-08-30"> +<histogram name="Download.DatabaseRemoveDownloadsCount"> + <obsolete> + Removed in 08/2018. + </obsolete> <owner>asanka@chromium.org</owner> <summary>Number of downloads removed from the history at once.</summary> </histogram> @@ -21039,8 +21090,10 @@ </summary> </histogram> -<histogram name="Download.FilePickerResult" enum="DownloadFilePickerResult" - expires_after="2018-08-30"> +<histogram name="Download.FilePickerResult" enum="DownloadFilePickerResult"> + <obsolete> + Removed in 08/2018. + </obsolete> <owner>asanka@chromium.org</owner> <summary> How the user interacts with the file chooser when doing a "Save @@ -21048,7 +21101,10 @@ </summary> </histogram> -<histogram name="Download.FileThreadBlockedTime" expires_after="2018-08-30"> +<histogram name="Download.FileThreadBlockedTime"> + <obsolete> + Removed in 08/2018. + </obsolete> <owner>asanka@chromium.org</owner> <summary> The amount of time in milliseconds the file thread blocks for each set of @@ -21056,14 +21112,20 @@ </summary> </histogram> -<histogram name="Download.FileThreadReceiveBuffers" expires_after="2018-08-30"> +<histogram name="Download.FileThreadReceiveBuffers"> + <obsolete> + Removed in 08/2018. + </obsolete> <owner>asanka@chromium.org</owner> <summary> The number of buffers in a call to DownloadManager::UpdateDownload. </summary> </histogram> -<histogram name="Download.FirstOpenTime" units="ms" expires_after="2018-08-30"> +<histogram name="Download.FirstOpenTime" units="ms"> + <obsolete> + Removed in 08/2018. + </obsolete> <owner>asanka@chromium.org</owner> <summary> The time between a download completing and the file being opened for the @@ -21174,7 +21236,10 @@ </histogram> <histogram name="Download.InterruptedUnknownSize" - enum="DownloadInterruptedUnknownSizeType" expires_after="2018-08-30"> + enum="DownloadInterruptedUnknownSizeType"> + <obsolete> + Removed in 08/2018. + </obsolete> <owner>asanka@chromium.org</owner> <summary> True if the size of an interrupted download is unknown, false if it is @@ -21283,7 +21348,10 @@ </histogram> <histogram name="Download.MapWinShErrorAccessDenied" - enum="SpecialShFileOperationCodes" expires_after="2018-08-30"> + enum="SpecialShFileOperationCodes"> + <obsolete> + Removed in 08/2018. + </obsolete> <owner>asanka@chromium.org</owner> <summary> Windows error that produced a DOWNLOAD_INTERRUPT_REASON_ACCESS_DENIED result @@ -21292,7 +21360,10 @@ </histogram> <histogram name="Download.MapWinShErrorFileFailed" - enum="SpecialShFileOperationCodes" expires_after="2018-08-30"> + enum="SpecialShFileOperationCodes"> + <obsolete> + Removed in 08/2018. + </obsolete> <owner>asanka@chromium.org</owner> <summary> Windows error that produced a DOWNLOAD_INTERRUPT_REASON_FILE_FAILED result @@ -21301,7 +21372,10 @@ </histogram> <histogram name="Download.MapWinShErrorTransientError" - enum="SpecialShFileOperationCodes" expires_after="2018-08-30"> + enum="SpecialShFileOperationCodes"> + <obsolete> + Removed in 08/2018. + </obsolete> <owner>asanka@chromium.org</owner> <summary> Windows error that produced a DOWNLOAD_INTERRUPT_REASON_FILE_TRANSIENT_ERROR @@ -21309,7 +21383,10 @@ </summary> </histogram> -<histogram name="Download.OnChanged" expires_after="2018-08-30"> +<histogram name="Download.OnChanged"> + <obsolete> + Removed in 08/2018. + </obsolete> <owner>asanka@chromium.org</owner> <summary> Percentage of DownloadItem::Observer::OnDownloadUpdated events that @@ -21339,7 +21416,10 @@ </histogram> <histogram name="Download.OriginStateOnFullResumption" - enum="DownloadOriginStateOnResumption" expires_after="2018-08-30"> + enum="DownloadOriginStateOnResumption"> + <obsolete> + Removed in 08/2018. + </obsolete> <owner>asanka@chromium.org</owner> <summary> Changes observed when a response is received for a full download resumption @@ -21348,7 +21428,10 @@ </histogram> <histogram name="Download.OriginStateOnPartialResumption" - enum="DownloadOriginStateOnResumption" expires_after="2018-08-30"> + enum="DownloadOriginStateOnResumption"> + <obsolete> + Removed in 08/2018. + </obsolete> <owner>asanka@chromium.org</owner> <summary> Changes observed when a response is received for a partial (byte-range) @@ -21475,8 +21558,10 @@ </summary> </histogram> -<histogram name="Download.ResourceHandlerBlockedPercentage" units="%" - expires_after="2018-08-30"> +<histogram name="Download.ResourceHandlerBlockedPercentage" units="%"> + <obsolete> + Removed in 08/2018. + </obsolete> <owner>asanka@chromium.org</owner> <summary> The percentage of the lifetime of the DownloadResourceHandler for which it @@ -21790,8 +21875,10 @@ </summary> </histogram> -<histogram name="Download.ShelfInProgressSizeOnAutoClose" - expires_after="2018-08-30"> +<histogram name="Download.ShelfInProgressSizeOnAutoClose"> + <obsolete> + Removed in 08/2018. + </obsolete> <owner>asanka@chromium.org</owner> <summary> The number of download items in progress on the shelf when it closes @@ -21799,8 +21886,10 @@ </summary> </histogram> -<histogram name="Download.ShelfInProgressSizeOnUserClose" - expires_after="2018-08-30"> +<histogram name="Download.ShelfInProgressSizeOnUserClose"> + <obsolete> + Removed in 08/2018. + </obsolete> <owner>asanka@chromium.org</owner> <summary> The number of download items in progress on the shelf when the user closes @@ -21808,14 +21897,20 @@ </summary> </histogram> -<histogram name="Download.ShelfSizeOnAutoClose" expires_after="2018-08-30"> +<histogram name="Download.ShelfSizeOnAutoClose"> + <obsolete> + Removed in 08/2018. + </obsolete> <owner>asanka@chromium.org</owner> <summary> The number of download items on the shelf when it closes automatically. </summary> </histogram> -<histogram name="Download.ShelfSizeOnUserClose" expires_after="2018-08-30"> +<histogram name="Download.ShelfSizeOnUserClose"> + <obsolete> + Removed in 08/2018. + </obsolete> <owner>asanka@chromium.org</owner> <summary> The number of download items on the shelf when the user closes it. @@ -21900,13 +21995,18 @@ </summary> </histogram> -<histogram name="Download.Time" units="ms" expires_after="2018-08-30"> +<histogram name="Download.Time" units="ms"> + <obsolete> + Removed in 08/2018. + </obsolete> <owner>asanka@chromium.org</owner> <summary>Time between the start of a download and its completion.</summary> </histogram> -<histogram name="Download.TimeToRenameFailureAfterInitialFailure" units="ms" - expires_after="2018-08-30"> +<histogram name="Download.TimeToRenameFailureAfterInitialFailure" units="ms"> + <obsolete> + Removed in 08/2018. + </obsolete> <owner>asanka@chromium.org</owner> <summary> Time elapsed until a retried download file rename operation failed for the @@ -21914,8 +22014,10 @@ </summary> </histogram> -<histogram name="Download.TimeToRenameSuccessAfterInitialFailure" units="ms" - expires_after="2018-08-30"> +<histogram name="Download.TimeToRenameSuccessAfterInitialFailure" units="ms"> + <obsolete> + Removed in 08/2018. + </obsolete> <owner>asanka@chromium.org</owner> <summary> Time elapsed until a retried download file rename operation succeeded after @@ -38241,6 +38343,14 @@ </summary> </histogram> +<histogram name="LevelDB.ApproximateMemoryUse" units="bytes"> + <owner>thildebr@chromium.org</owner> + <summary> + The approximate memory use of a LevelDB in bytes. Recorded right after + initializing an on-disk database. + </summary> +</histogram> + <histogram name="LevelDB.Open" enum="LevelDBStatus"> <owner>cmumford@chromium.org</owner> <summary>The result of an open attempt of a leveldb.</summary> @@ -61043,6 +61153,28 @@ <summary>The default pane when the NTP is first opened.</summary> </histogram> +<histogram name="NewTabPage.Feed.ImageFetchResult" enum="FeedImageFetchResult"> + <owner>wylieb@chromium.org</owner> + <summary> + Android: Represents success/failure of Feed image loading. Recorded upon + each individual image retrieved from the feed_image_cache. + </summary> +</histogram> + +<histogram name="NewTabPage.Feed.ImageLoadFromCacheTime" units="ms"> + <owner>wylieb@chromium.org</owner> + <summary> + Android: The time it takes for Feed to load an image from the cache. + </summary> +</histogram> + +<histogram name="NewTabPage.Feed.ImageLoadFromNetworkTime" units="ms"> + <owner>wylieb@chromium.org</owner> + <summary> + Android: The time it takes for Feed to load an image from the network. + </summary> +</histogram> + <histogram name="NewTabPage.HoverTimeClicked"> <obsolete> Deprecated 2016-02 (and not recorded for some time before that). @@ -63401,6 +63533,15 @@ </summary> </histogram> +<histogram name="NQE.RTT.NotAHangingRequest.EndToEndRTT" units="ms"> + <owner>tbansal@chromium.org</owner> + <summary> + HTTP RTT observation received by the network quality estimator. Recorded at + the beginning of a request if the request is detected as not hanging because + the observed HTTP RTT was comparable to the end to end RTT estimate. + </summary> +</histogram> + <histogram name="NQE.RTT.NotAHangingRequest.HttpRTT" units="ms"> <owner>tbansal@chromium.org</owner> <summary> @@ -69952,6 +70093,28 @@ </summary> </histogram> +<histogram name="PasswordManager.CleanedUpPasswords"> + <owner>tsabolcec@google.com</owner> + <owner>vasilii@chromium.org</owner> + <summary> + Collects positive number of undecryptable passwords that were successfully + deleted when syncing was enabled. Called for sync user for each profile if + there is at least one password deleted when merging logins from Sync and + local database. + </summary> +</histogram> + +<histogram name="PasswordManager.DeleteUndecryptableLoginsReturnValue" + enum="DeleteUndecryptableLoginsReturnValue"> + <owner>tsabolcec@google.com</owner> + <owner>vasilii@chromium.org</owner> + <summary> + Records the return value of the DeleteUndecryptableLogins method in the + LoginDatabase class. Called for sync user and for each profile when merging + logins from Sync and local database. + </summary> +</histogram> + <histogram name="PasswordManager.EditsInSaveBubble" enum="PasswordManagerEditsInSaveBubbleEnum"> <owner>battre@chromium.org</owner> @@ -90978,6 +91141,10 @@ </histogram> <histogram name="ServiceWorker.BackgroundFetchedEvent.Time" units="ms"> + <obsolete> + Deprecated 08/2018, and renamed to BackgroundFetchSuccessEvent. See + ServiceWorker.BackgroundFetchSuccessEvent.Time instead. + </obsolete> <owner>peter@chromium.org</owner> <summary> The time taken between dispatching a BackgroundFetchedEvent to a Service @@ -90995,6 +91162,16 @@ </summary> </histogram> +<histogram name="ServiceWorker.BackgroundFetchSuccessEvent.Time" units="ms"> + <owner>nator@chromium.org</owner> + <summary> + The time taken between dispatching a BackgroundFetchSuccessEvent to a + Service Worker and receiving a message that it finished handling the event. + Includes the time for the waitUntil() promise to settle. This event is sent + when the background fetch succeeds. + </summary> +</histogram> + <histogram name="ServiceWorker.BackgroundSyncEvent.Time" units="ms"> <owner>jkarlin@chromium.org</owner> <summary> @@ -104589,6 +104766,16 @@ </summary> </histogram> +<histogram base="true" name="TaskScheduler.NumWorkers" units="workers"> + <owner>etiennep@chromium.org</owner> + <owner>fdoray@chromium.org</owner> + <owner>gab@chromium.org</owner> + <summary> + Number of workers that run in a given SchedulerWorkerPool. Recorded every 59 + minutes (sampling rate is not expected to affect the distribution). + </summary> +</histogram> + <histogram base="true" name="TaskScheduler.TaskLatency" units="ms"> <obsolete> Deprecated 4/2017. Units changed from milliseconds to microseconds. @@ -104727,6 +104914,9 @@ <histogram name="TextToSpeechEngine.ParseVoice.HasGender" enum="TextToSpeechHasGender" expires_after="M70"> + <obsolete> + Deprecated 08/2018. + </obsolete> <owner>katie@chromium.org</owner> <owner>dtseng@chromium.org</owner> <owner>dmazzoni@chromium.org</owner> @@ -104740,6 +104930,9 @@ <histogram name="TextToSpeechEngine.UpdateVoice.HasGender" enum="TextToSpeechHasGender" expires_after="M70"> + <obsolete> + Deprecated 08/2018. + </obsolete> <owner>katie@chromium.org</owner> <owner>dtseng@chromium.org</owner> <owner>dmazzoni@chromium.org</owner> @@ -117179,10 +117372,13 @@ <histogram_suffixes name="BackgroundFetchDatabaseStorageErrors" separator="."> <suffix name="CleanupTask" label="CleanupTask"/> <suffix name="CreateMetadataTask" label="CreateMetadata DatabaseTask"/> + <suffix name="DeleteRegistrationTask" + label="DeleteRegistration DatabaseTask"/> <suffix name="GetDeveloperIdsTask" label="GetDeveloperIds DatabaseTask"/> <suffix name="GetInitializationDataTask" label="GetInitializationData DatabaseTask"/> <suffix name="GetRegistrationTask" label="GetRegistration DatabaseTask"/> + <suffix name="GetSettledFetchesTask" label="GetSettledFetches DatabaseTask"/> <suffix name="MarkRegistrationForDeletionTask" label="MarkRegistrationForDeletion DatabaseTask"/> <suffix name="MarkRequestCompleteTask" @@ -117199,12 +117395,20 @@ <suffix name="ClickEvent" label="BackgroundFetchClickEvent"/> <suffix name="FailEvent" label="BackgroundFetchFailEvent"/> <suffix name="FetchedEvent" label="BackgroundFetchedEvent"/> + <suffix name="FetchSuccessEvent" label="BackgroundFetchSuccessEvent"/> <affected-histogram name="BackgroundFetch.EventDispatchFailure.Dispatch"/> <affected-histogram name="BackgroundFetch.EventDispatchFailure.FindWorker"/> <affected-histogram name="BackgroundFetch.EventDispatchFailure.StartWorker"/> <affected-histogram name="BackgroundFetch.EventDispatchResult"/> </histogram_suffixes> +<histogram_suffixes name="BackgroundFetchManagerAPIsDuration" separator="."> + <suffix name="FetchDuration" label="Duration of fetch"/> + <suffix name="GetDuration" label="Duration of get"/> + <suffix name="GetIdsDuration" label="Duration of getIds"/> + <affected-histogram name="BackgroundFetch.Manager"/> +</histogram_suffixes> + <histogram_suffixes name="BadBlockCounts" separator="."> <suffix name="Backupsys" label="backupsys partition"/> <suffix name="Bbt" label="bbt partition"/> @@ -120696,6 +120900,27 @@ <affected-histogram name="WebCore.IndexedDB.LevelDBWriteErrors.BFE"/> </histogram_suffixes> +<histogram_suffixes name="LevelDBClients" separator="."> + <suffix name="BudgetManager" + label="Database for storing budget information for origins."/> + <suffix name="DomDistillerStore" label="Databases for DomDistillerStore"/> + <suffix name="FeatureEngagementTrackerAvailabilityStore" + label="Database for FeatureEngagementTracker feature availability."/> + <suffix name="FeatureEngagementTrackerEventStore" + label="Database for FeatureEngagementTracker events."/> + <suffix name="FeedImageDatabase" label="Databases for Feed Image Loader."/> + <suffix name="FeedStorageDatabase" label="Databases for Feed Storage."/> + <suffix name="GCMKeyStore" label="Databases for GCMKeyStore"/> + <suffix name="ImageManager" label="Databases for ImageManager"/> + <suffix name="OfflinePageMetadataStore" + label="Databases for OfflinePageMetadataStore"/> + <suffix name="UsageReportsBufferBackend" + label="The result of the first attempt to open the usage reports buffer + backend database."/> + <affected-histogram name="LevelDB.ApproximateMemoryUse"/> + <affected-histogram name="LevelDB.Open"/> +</histogram_suffixes> + <histogram_suffixes name="LevelDBEnvBackupRestore" separator=""> <obsolete> Deprecated 08/2016. @@ -120781,26 +121006,6 @@ <affected-histogram name="LevelDBEnv.TimeUntilSuccessFor"/> </histogram_suffixes> -<histogram_suffixes name="LevelDBOpenResults" separator="."> - <suffix name="BudgetManager" - label="Database for storing budget information for origins."/> - <suffix name="DomDistillerStore" label="Databases for DomDistillerStore"/> - <suffix name="FeatureEngagementTrackerAvailabilityStore" - label="Database for FeatureEngagementTracker feature availability."/> - <suffix name="FeatureEngagementTrackerEventStore" - label="Database for FeatureEngagementTracker events."/> - <suffix name="FeedImageDatabase" label="Databases for Feed Image Loader."/> - <suffix name="FeedStorageDatabase" label="Databases for Feed Storage."/> - <suffix name="GCMKeyStore" label="Databases for GCMKeyStore"/> - <suffix name="ImageManager" label="Databases for ImageManager"/> - <suffix name="OfflinePageMetadataStore" - label="Databases for OfflinePageMetadataStore"/> - <suffix name="UsageReportsBufferBackend" - label="The result of the first attempt to open the usage reports buffer - backend database."/> - <affected-histogram name="LevelDB.Open"/> -</histogram_suffixes> - <histogram_suffixes name="LevelDBSharedCache" separator="."> <owner>cmumford@chromium.org</owner> <suffix name="Browser" @@ -127054,6 +127259,10 @@ <histogram_suffixes name="ServiceWorker.EventType" separator="_"> <suffix name="ACTIVATE" label="ACTIVATE"/> + <suffix name="BACKGROUND_FETCH_ABORT"/> + <suffix name="BACKGROUND_FETCH_CLICK"/> + <suffix name="BACKGROUND_FETCH_FAIL"/> + <suffix name="BACKGROUND_FETCH_SUCCESS"/> <suffix name="COOKIE_CHANGE" label="COOKIE_CHANGE"/> <suffix name="FETCH_MAIN_FRAME" label="FETCH_MAIN_FRAME"/> <suffix name="FETCH_SHARED_WORKER" label="FETCH_SHARED_WORKER"/> @@ -128082,6 +128291,7 @@ <affected-histogram name="TaskScheduler.HeartbeatLatencyMicroseconds"/> <affected-histogram name="TaskScheduler.NumTasksBeforeDetach"/> <affected-histogram name="TaskScheduler.NumTasksBetweenWaits"/> + <affected-histogram name="TaskScheduler.NumWorkers"/> <affected-histogram name="TaskScheduler.TaskLatencyMicroseconds"/> </histogram_suffixes> @@ -128222,6 +128432,9 @@ <affected-histogram name="TaskScheduler.NumTasksBetweenWaits.Browser"/> <affected-histogram name="TaskScheduler.NumTasksBetweenWaits.ContentChild"/> <affected-histogram name="TaskScheduler.NumTasksBetweenWaits.Renderer"/> + <affected-histogram name="TaskScheduler.NumWorkers.Browser"/> + <affected-histogram name="TaskScheduler.NumWorkers.ContentChild"/> + <affected-histogram name="TaskScheduler.NumWorkers.Renderer"/> <affected-histogram name="TaskScheduler.TaskLatency"> <obsolete> Deprecated 12/2016. Pool name removed from task latency histogram name.
diff --git a/tools/metrics/rappor/pretty_print_test.py b/tools/metrics/rappor/pretty_print_test.py index f69b7df9..d0837352 100755 --- a/tools/metrics/rappor/pretty_print_test.py +++ b/tools/metrics/rappor/pretty_print_test.py
@@ -3,120 +3,352 @@ # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. +from __future__ import unicode_literals + +import copy +import json import unittest -import pretty_print +import model - -PRETTY_XML = """ -<!-- Comment1 --> - +PUBLIC_XML_SNIPPET = """ <rappor-configuration> -<!-- Comment2 --> + +<noise-levels> +<noise-level name="NO_NOISE"> + <summary> + NO_NOISE description. + </summary> + <noise-values fake-prob="0.0" fake-one-prob="0.0" one-coin-prob="1.0" + zero-coin-prob="0.0"/> +</noise-level> + +<noise-level name="NORMAL_NOISE"> + <summary> + NORMAL_NOISE description. + </summary> + <noise-values fake-prob="0.5" fake-one-prob="0.5" one-coin-prob="0.75" + zero-coin-prob="0.25"/> +</noise-level> +</noise-levels> <rappor-parameter-types> -<!-- Comment3 --> - -<rappor-parameters name="TEST_RAPPOR_TYPE"> +<rappor-parameters name="ETLD_PLUS_ONE"> <summary> - Fake type for tests. + ETLD+1 parameters. </summary> - <parameters num-cohorts="128" bytes="1" hash-functions="2" fake-prob="0.5" - fake-one-prob="0.5" one-coin-prob="0.75" zero-coin-prob="0.25" - reporting-level="COARSE"/> + <parameters num-cohorts="128" + bytes="16" + hash-functions="2" + reporting-level="FINE" + noise-level="NORMAL_NOISE"/> +</rappor-parameters> +<rappor-parameters name="SAFEBROWSING_RAPPOR_TYPE"> + <summary> + SAFEBROWSING parameters. + </summary> + <parameters num-cohorts="128" + bytes="1" + hash-functions="2" + reporting-level="COARSE" + noise-level="NORMAL_NOISE"/> +</rappor-parameters> +</rappor-parameter-types> + +<rappor-metrics> + +<rappor-metric name="MultiD.TestMetric" type="SAFEBROWSING_RAPPOR_TYPE"> + <owner>holte@chromium.org</owner> + <summary> + Metric Summary. + </summary> + <string-field name="domain"> + <summary> + Domain Summary. + </summary> + </string-field> + <flags-field name="flags"> + <flag>Bit 0</flag> + <flag label="MyBit" bit="1">What it means</flag> + <summary> + Flags Summary. + </summary> + </flags-field> +</rappor-metric> + +<rappor-metric name="Search.DefaultSearchProvider" type="ETLD_PLUS_ONE"> + <owner> + holte@chromium.org + </owner> + <summary> + + BLAH BLAH BLAH + </summary> +</rappor-metric> +</rappor-metrics> +</rappor-configuration> +""" + +PARSED_XML = { + model.models.COMMENT_KEY: [], + 'noiseLevels': { + model.models.COMMENT_KEY: [], + 'levels': [ + { + model.models.COMMENT_KEY: [], + 'name': 'NO_NOISE', + 'summary': 'NO_NOISE description.', + 'values': { + model.models.COMMENT_KEY: [], + 'fake-prob': 0.0, + 'fake-one-prob': 0.0, + 'one-coin-prob': 1.0, + 'zero-coin-prob': 0.0, + }, + }, + { + model.models.COMMENT_KEY: [], + 'name': 'NORMAL_NOISE', + 'summary': 'NORMAL_NOISE description.', + 'values': { + model.models.COMMENT_KEY: [], + 'fake-prob': 0.5, + 'fake-one-prob': 0.5, + 'one-coin-prob': 0.75, + 'zero-coin-prob': 0.25, + }, + }, + ] + }, + 'parameterTypes': { + model.models.COMMENT_KEY: [], + 'types': [ + { + model.models.COMMENT_KEY: [], + 'name': 'ETLD_PLUS_ONE', + 'summary': 'ETLD+1 parameters.', + 'parameters': { + model.models.COMMENT_KEY: [], + 'num-cohorts': 128, + 'bytes': 16, + 'hash-functions': 2, + 'reporting-level': 'FINE', + 'noise-level': 'NORMAL_NOISE', + }, + }, + { + model.models.COMMENT_KEY: [], + 'name': 'SAFEBROWSING_RAPPOR_TYPE', + 'summary': 'SAFEBROWSING parameters.', + 'parameters': { + model.models.COMMENT_KEY: [], + 'num-cohorts': 128, + 'bytes': 1, + 'hash-functions': 2, + 'reporting-level': 'COARSE', + 'noise-level': 'NORMAL_NOISE', + }, + }, + ] + }, + 'metrics': { + model.models.COMMENT_KEY: [], + 'metrics': [{ + model.models.COMMENT_KEY: [], + 'name': + 'MultiD.TestMetric', + 'flags': [{ + model.models.COMMENT_KEY: [], + 'name': + 'flags', + 'summary': + 'Flags Summary.', + 'flags': [ + { + model.models.COMMENT_KEY: [], + 'summary': 'Bit 0' + }, + { + model.models.COMMENT_KEY: [], + 'summary': 'What it means', + 'label': 'MyBit', + 'bit': 1, + }, + ], + }], + 'owners': ['holte@chromium.org'], + 'strings': [{ + model.models.COMMENT_KEY: [], + 'name': 'domain', + 'summary': 'Domain Summary.', + }], + 'summary': + 'Metric Summary.', + 'type': + 'SAFEBROWSING_RAPPOR_TYPE', + 'uint64': [], + }, { + model.models.COMMENT_KEY: [], + 'name': 'Search.DefaultSearchProvider', + 'flags': [], + 'owners': ['holte@chromium.org'], + 'strings': [], + 'summary': 'BLAH BLAH BLAH', + 'type': 'ETLD_PLUS_ONE', + 'uint64': [], + }] + } +} + +PRETTY_PRINTED_XML = """<rappor-configuration> +<noise-levels> +<noise-level name="NO_NOISE"> + <summary> + NO_NOISE description. + </summary> + <noise-values fake-prob="0.0" fake-one-prob="0.0" one-coin-prob="1.0" + zero-coin-prob="0.0"/> +</noise-level> + +<noise-level name="NORMAL_NOISE"> + <summary> + NORMAL_NOISE description. + </summary> + <noise-values fake-prob="0.5" fake-one-prob="0.5" one-coin-prob="0.75" + zero-coin-prob="0.25"/> +</noise-level> + +</noise-levels> + +<rappor-parameter-types> +<rappor-parameters name="ETLD_PLUS_ONE"> + <summary> + ETLD+1 parameters. + </summary> + <parameters num-cohorts="128" bytes="16" hash-functions="2" + reporting-level="FINE" noise-level="NORMAL_NOISE"/> +</rappor-parameters> + +<rappor-parameters name="SAFEBROWSING_RAPPOR_TYPE"> + <summary> + SAFEBROWSING parameters. + </summary> + <parameters num-cohorts="128" bytes="1" hash-functions="2" + reporting-level="COARSE" noise-level="NORMAL_NOISE"/> </rappor-parameters> </rappor-parameter-types> <rappor-metrics> -<!-- Comment4 --> - -<rappor-metric name="Test.Rappor.Metric" type="TEST_RAPPOR_TYPE"> - <owner>user1@chromium.org</owner> - <owner>user2@chromium.org</owner> +<rappor-metric name="MultiD.TestMetric" type="SAFEBROWSING_RAPPOR_TYPE"> + <owner>holte@chromium.org</owner> <summary> - A fake metric summary. + Metric Summary. </summary> -</rappor-metric> - -<rappor-metric name="Test.Rappor.Metric2" type="TEST_RAPPOR_TYPE"> - <owner>user1@chromium.org</owner> - <owner>user2@chromium.org</owner> - <summary> - A fake metric summary. - </summary> - <string-field name="Url"> + <string-field name="domain"> <summary> - The url of the event. + Domain Summary. </summary> </string-field> - <flags-field name="Flags"> - <flag>Flag bit #1</flag> - <flag>Flag bit #2</flag> + <flags-field name="flags"> + <flag bit="0" label="Bit 0"/> + <flag bit="1" label="MyBit">What it means</flag> + <summary> + Flags Summary. + </summary> </flags-field> </rappor-metric> +<rappor-metric name="Search.DefaultSearchProvider" type="ETLD_PLUS_ONE"> + <owner>holte@chromium.org</owner> + <summary> + BLAH BLAH BLAH + </summary> +</rappor-metric> + </rappor-metrics> </rappor-configuration> -""".strip() - -BASIC_METRIC = { - 'comments': [], - 'name': 'Test.Rappor.Metric', - 'type': 'TEST_RAPPOR_TYPE', - 'owners': ['user1@chromium.org', 'user2@chromium.org'], - 'summary': 'A fake metric summary.', - 'flags': [], - 'strings': [], -} - -MULTI_FIELD_METRIC = { - 'comments': [], - 'name': 'Test.Rappor.Metric2', - 'type': 'TEST_RAPPOR_TYPE', - 'owners': ['user1@chromium.org', 'user2@chromium.org'], - 'summary': 'A fake metric summary.', - 'strings': [{ - 'comments': [], - 'name': 'Url', - 'summary': 'The url of the event.', - }], - 'flags': [{ - 'comments': [], - 'name': 'Flags', - 'flags': [ - 'Flag bit #1', - 'Flag bit #2', - ] - }] -} +""" -class ActionXmlTest(unittest.TestCase): +class RapporModelTest(unittest.TestCase): - def testIsPretty(self): - result = pretty_print.UpdateXML(PRETTY_XML) - self.assertMultiLineEqual(PRETTY_XML, result.strip()) + def testParse(self): + parsed = model.RAPPOR_XML_TYPE.Parse(PUBLIC_XML_SNIPPET) + self.assertEqual(PARSED_XML, parsed) - def testParsing(self): - comments, config = pretty_print.RAPPOR_XML_TYPE.Parse(PRETTY_XML) - self.assertEqual(BASIC_METRIC, config['metrics']['metrics'][0]) - self.assertEqual(MULTI_FIELD_METRIC, config['metrics']['metrics'][1]) - self.assertEqual(set(['TEST_RAPPOR_TYPE']), - pretty_print.GetTypeNames(config)) + def testUpdate(self): + updated = model.UpdateXML(PUBLIC_XML_SNIPPET) + # Compare list of lines for nicer diff on errors. + self.assertEqual(PRETTY_PRINTED_XML.split('\n'), updated.split('\n')) + reprinted = model.UpdateXML(updated) + self.assertEqual(PRETTY_PRINTED_XML.split('\n'), reprinted.split('\n')) - def testMissingOwners(self): - self.assertFalse(pretty_print.GetMissingOwnerErrors([BASIC_METRIC])) - no_owners = BASIC_METRIC.copy() - no_owners['owners'] = [] - self.assertTrue(pretty_print.GetMissingOwnerErrors([no_owners])) + def testIsValidNoise(self): + valid_noise_level = { + 'name': 'A', + 'summary': 'B', + 'values': { + 'fake-prob': 0.5, + 'fake-one-prob': 0.5, + 'one-coin-prob': 0.75, + 'zero-coin-prob': 0.25, + }, + } + self.assertTrue(model._IsValidNoiseLevel(valid_noise_level)) + invalid_noise_level = copy.copy(valid_noise_level) + del invalid_noise_level['name'] + self.assertFalse(model._IsValidNoiseLevel(invalid_noise_level)) + invalid_noise_level = copy.copy(valid_noise_level) + del invalid_noise_level['summary'] + self.assertFalse(model._IsValidNoiseLevel(invalid_noise_level)) + invalid_noise_level = copy.copy(valid_noise_level) + del invalid_noise_level['values'] + self.assertFalse(model._IsValidNoiseLevel(invalid_noise_level)) + invalid_noise_level = copy.deepcopy(valid_noise_level) + del invalid_noise_level['values']['fake-prob'] + self.assertFalse(model._IsValidNoiseLevel(invalid_noise_level)) - def testInvalidTypes(self): - self.assertFalse(pretty_print.GetInvalidTypeErrors( - set(['TEST_RAPPOR_TYPE']), [BASIC_METRIC])) - self.assertTrue(pretty_print.GetInvalidTypeErrors( - set(['OTHER_TYPE']), [BASIC_METRIC])) + def testIsValidRapporType(self): + noise_level_names = {'NORMAL_NOISE'} + valid_type = { + 'name': 'ETLD_PLUS_ONE', + 'summary': 'ETLD+1 parameters.', + 'parameters': { + 'num-cohorts': 128, + 'bytes': 16, + 'hash-functions': 2, + 'reporting-level': 'FINE', + 'noise-level': 'NORMAL_NOISE', + }, + } + self.assertTrue(model._IsValidRapporType(valid_type, noise_level_names)) + + def testIsValidRapporMetric(self): + type_names = {'ETLD_PLUS_ONE'} + valid_metric = { + 'name': 'Search.DefaultSearchProvider', + 'flags': [], + 'owners': ['holte@chromium.org'], + 'strings': [], + 'summary': 'BLAH BLAH BLAH', + 'type': 'ETLD_PLUS_ONE', + 'uint64': [], + } + self.assertTrue(model._IsValidMetric(valid_metric, type_names)) + invalid_metric = copy.copy(valid_metric) + del invalid_metric['name'] + self.assertFalse(model._IsValidMetric(invalid_metric, type_names)) + invalid_metric = copy.copy(valid_metric) + del invalid_metric['summary'] + self.assertFalse(model._IsValidMetric(invalid_metric, type_names)) + invalid_metric = copy.copy(valid_metric) + invalid_metric['type'] = 'FOO' + self.assertFalse(model._IsValidMetric(invalid_metric, type_names)) + invalid_metric = copy.copy(valid_metric) + invalid_metric['owners'] = [] + self.assertFalse(model._IsValidMetric(invalid_metric, type_names)) if __name__ == '__main__':
diff --git a/tools/metrics/ukm/ukm.xml b/tools/metrics/ukm/ukm.xml index ae27a34..e05efaf 100644 --- a/tools/metrics/ukm/ukm.xml +++ b/tools/metrics/ukm/ukm.xml
@@ -3077,6 +3077,12 @@ by the origin site (rather than the user). </summary> </metric> + <metric name="resource_loading_hints"> + <summary> + Set to 1 when a user is shown a resource loading hints based preview on a + page load. + </summary> + </metric> <metric name="save_data_enabled"> <summary> Set to 1 if the data saver feature was enabled in Chrome at the time of
diff --git a/tools/perf/core/perf_benchmark.py b/tools/perf/core/perf_benchmark.py index 7b678c1..18c7aed 100644 --- a/tools/perf/core/perf_benchmark.py +++ b/tools/perf/core/perf_benchmark.py
@@ -113,6 +113,8 @@ return 'windows' if target_os.startswith('linux'): return 'linux' + if target_os == 'cros': + return 'chromeos' return target_os def _GetVariationsBrowserArgs(self, finder_options):
diff --git a/tools/perf/core/perf_benchmark_unittest.py b/tools/perf/core/perf_benchmark_unittest.py index e5140255..9e81950 100644 --- a/tools/perf/core/perf_benchmark_unittest.py +++ b/tools/perf/core/perf_benchmark_unittest.py
@@ -8,7 +8,6 @@ import tempfile import unittest -from telemetry import decorators from telemetry.internal.browser import browser_finder from telemetry.testing import options_for_unittests @@ -35,7 +34,6 @@ self.assertEqual(num_expected_matches, len(ruleset_data_to_copy)) - @decorators.Disabled('chromeos') # crbug.com/871600. def testVariationArgs(self): benchmark = perf_benchmark.PerfBenchmark() options = options_for_unittests.GetCopy()
diff --git a/tools/perf/page_sets/rendering/OWNERS b/tools/perf/page_sets/rendering/OWNERS new file mode 100644 index 0000000..e4fed44 --- /dev/null +++ b/tools/perf/page_sets/rendering/OWNERS
@@ -0,0 +1,2 @@ +sadrul@chromium.org +vmiura@chromium.org
diff --git a/tools/traffic_annotation/bin/OWNERS b/tools/traffic_annotation/bin/OWNERS new file mode 100644 index 0000000..b5290ef --- /dev/null +++ b/tools/traffic_annotation/bin/OWNERS
@@ -0,0 +1,2 @@ +georgesak@chromium.org +rhalavati@chromium.org
diff --git a/tools/traffic_annotation/bin/README.md b/tools/traffic_annotation/bin/README.md index 55187d07..af731e3 100644 --- a/tools/traffic_annotation/bin/README.md +++ b/tools/traffic_annotation/bin/README.md
@@ -2,8 +2,9 @@ We do not want every developer to have to build clang, and so we store pre-built binaries in a Google Cloud Storage bucket and retrieve them via gclient hooks. -To roll new versions of the binaries, assuming you have write access -to the chromium-tools-traffic_annotation bucket, run: +To roll new versions of the binaries, you need to have write access to the +chromium-tools-traffic_annotation bucket. If you don't, contact the OWNERS list +in this folder, otherwise run: # On Linux: ```bash
diff --git a/tools/traffic_annotation/summary/annotations.xml b/tools/traffic_annotation/summary/annotations.xml index b509c28..d5341dd 100644 --- a/tools/traffic_annotation/summary/annotations.xml +++ b/tools/traffic_annotation/summary/annotations.xml
@@ -179,7 +179,7 @@ <item id="per_user_topic_registration_request" hash_code="10498172" type="0" content_hash_code="32495619" os_list="linux,windows" file_path="components/invalidation/impl/per_user_topic_registration_request.cc"/> <item id="permission_reporting" hash_code="131741641" type="0" deprecated="2018-03-06" content_hash_code="7213535" file_path=""/> <item id="permission_request_creator" hash_code="43206794" type="0" content_hash_code="73571699" os_list="linux,windows" file_path="chrome/browser/supervised_user/child_accounts/permission_request_creator_apiary.cc"/> - <item id="persist_blob_to_indexed_db" hash_code="32030464" type="0" content_hash_code="35410079" os_list="windows" file_path="content/browser/indexed_db/indexed_db_backing_store.cc"/> + <item id="persist_blob_to_indexed_db" hash_code="32030464" type="0" deprecated="2018-08-13" content_hash_code="35410079" file_path=""/> <item id="plugins_resource_service" hash_code="49601082" type="0" content_hash_code="6877335" os_list="linux,windows" file_path="chrome/browser/plugins/plugins_resource_service.cc"/> <item id="popular_sites_fetch" hash_code="50755044" type="0" content_hash_code="6910083" os_list="linux,windows" file_path="components/ntp_tiles/popular_sites_impl.cc"/> <item id="port_forwarding_controller_socket" hash_code="95075845" type="0" content_hash_code="122163428" os_list="linux,windows" file_path="chrome/browser/devtools/device/port_forwarding_controller.cc"/>
diff --git a/ui/android/BUILD.gn b/ui/android/BUILD.gn index 087009f..4397a10 100644 --- a/ui/android/BUILD.gn +++ b/ui/android/BUILD.gn
@@ -307,6 +307,7 @@ "java/src/org/chromium/ui/widget/ButtonCompat.java", "java/src/org/chromium/ui/widget/CheckableImageView.java", "java/src/org/chromium/ui/widget/RectProvider.java", + "java/src/org/chromium/ui/widget/RoundedCornerImageView.java", "java/src/org/chromium/ui/widget/TextViewWithClickableSpans.java", "java/src/org/chromium/ui/widget/TextViewWithLeading.java", "java/src/org/chromium/ui/widget/Toast.java",
diff --git a/ui/android/java/res/values/attrs.xml b/ui/android/java/res/values/attrs.xml index 61ae7c63..c2989fe 100644 --- a/ui/android/java/res/values/attrs.xml +++ b/ui/android/java/res/values/attrs.xml
@@ -26,4 +26,10 @@ valid reference to a layout. --> <attr name="layout" format="reference" /> </declare-styleable> + <declare-styleable name="RoundedCornerImageView"> + <attr name="cornerRadiusTopStart" format="dimension" /> + <attr name="cornerRadiusTopEnd" format="dimension" /> + <attr name="cornerRadiusBottomStart" format="dimension" /> + <attr name="cornerRadiusBottomEnd" format="dimension" /> + </declare-styleable> </resources>
diff --git a/ui/android/java/src/org/chromium/ui/widget/RoundedCornerImageView.java b/ui/android/java/src/org/chromium/ui/widget/RoundedCornerImageView.java new file mode 100644 index 0000000..f974c6b5 --- /dev/null +++ b/ui/android/java/src/org/chromium/ui/widget/RoundedCornerImageView.java
@@ -0,0 +1,209 @@ +// 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.ui.widget; + +import android.content.Context; +import android.content.res.TypedArray; +import android.graphics.Bitmap; +import android.graphics.BitmapShader; +import android.graphics.Canvas; +import android.graphics.Paint; +import android.graphics.Shader; +import android.graphics.drawable.BitmapDrawable; +import android.graphics.drawable.ColorDrawable; +import android.graphics.drawable.Drawable; +import android.graphics.drawable.shapes.RoundRectShape; +import android.graphics.drawable.shapes.Shape; +import android.support.annotation.Nullable; +import android.support.v4.view.ViewCompat; +import android.util.AttributeSet; +import android.widget.ImageView; + +import org.chromium.ui.R; + +/** + * A custom {@link ImageView} that is able to render bitmaps and colors with rounded off corners. + * The corner radii should be set through attributes. E.g. + * + * <org.chromium.ui.widget.RoundedCornerImageView + * app:cornerRadiusTopStart="8dp" + * app:cornerRadiusTopEnd="8dp" + * app:cornerRadiusBottomStart="8dp" + * app:cornerRadiusBottomEnd="8dp" /> + * + * Note : This does not properly handle padding. Padding will not be taken into account when rounded + * corners are used. + */ +public class RoundedCornerImageView extends ImageView { + private Shape mRoundedRectangle; + private BitmapShader mShader; + private Paint mPaint; + + // Whether or not to apply the shader, if we have one. This might be set to false if the image + // is smaller than the view and does not need to have the corners rounded. + private boolean mApplyShader; + + public RoundedCornerImageView(Context context) { + this(context, null, 0); + } + + public RoundedCornerImageView(Context context, AttributeSet attrs) { + this(context, attrs, 0); + } + + public RoundedCornerImageView(Context context, AttributeSet attrs, int defStyle) { + super(context, attrs, defStyle); + if (attrs != null) { + TypedArray a = getContext().obtainStyledAttributes( + attrs, R.styleable.RoundedCornerImageView, 0, 0); + int cornerRadiusTopStart = a.getDimensionPixelSize( + R.styleable.RoundedCornerImageView_cornerRadiusTopStart, 0); + int cornerRadiusTopEnd = a.getDimensionPixelSize( + R.styleable.RoundedCornerImageView_cornerRadiusTopEnd, 0); + int cornerRadiusBottomStart = a.getDimensionPixelSize( + R.styleable.RoundedCornerImageView_cornerRadiusBottomStart, 0); + int cornerRadiusBottomEnd = a.getDimensionPixelSize( + R.styleable.RoundedCornerImageView_cornerRadiusBottomEnd, 0); + a.recycle(); + + setRoundedCorners(cornerRadiusTopStart, cornerRadiusTopEnd, cornerRadiusBottomStart, + cornerRadiusBottomEnd); + } + } + + /** + * Updates the rounded corners, using the radius set in the layout. + */ + private void setRoundedCorners(int cornerRadiusTopStart, int cornerRadiusTopEnd, + int cornerRadiusBottomStart, int cornerRadiusBottomEnd) { + float[] radii; + if (ViewCompat.getLayoutDirection(this) == ViewCompat.LAYOUT_DIRECTION_LTR) { + radii = new float[] {cornerRadiusTopStart, cornerRadiusTopStart, cornerRadiusTopEnd, + cornerRadiusTopEnd, cornerRadiusBottomEnd, cornerRadiusBottomEnd, + cornerRadiusBottomStart, cornerRadiusBottomStart}; + } else { + radii = new float[] {cornerRadiusTopEnd, cornerRadiusTopEnd, cornerRadiusTopStart, + cornerRadiusTopStart, cornerRadiusBottomStart, cornerRadiusBottomStart, + cornerRadiusBottomEnd, cornerRadiusBottomEnd}; + } + + mRoundedRectangle = new RoundRectShape(radii, null, null); + mPaint = new Paint(Paint.ANTI_ALIAS_FLAG); + } + + @Override + public void setImageDrawable(@Nullable Drawable drawable) { + super.setImageDrawable(drawable); + + // Reset shaders. We will need to recalculate them. + mShader = null; + mApplyShader = false; + + maybeCreateShader(); + + updateApplyShader(); + } + + protected void maybeCreateShader() { + // Only create the shader if we have a rectangle to use as a mask. + Drawable drawable = getDrawable(); + Bitmap bitmap = (drawable instanceof BitmapDrawable) + ? ((BitmapDrawable) drawable).getBitmap() + : null; + if (mRoundedRectangle != null && bitmap != null) { + mShader = new BitmapShader(bitmap, Shader.TileMode.CLAMP, Shader.TileMode.CLAMP); + } + } + + @Override + protected boolean setFrame(int l, int t, int r, int b) { + boolean changed = super.setFrame(l, t, r, b); + updateApplyShader(); + return changed; + } + + @Override + public void setScaleType(ScaleType scaleType) { + super.setScaleType(scaleType); + updateApplyShader(); + } + + /** + * Updates the flag to tell whether or not to apply the shader that produces the rounded + * corners. We should not apply the shader if the final image is smaller than the view, because + * it will try to tile the image, which is not desirable. This should be called when the image + * is changed, or the view bounds change. + */ + private void updateApplyShader() { + Drawable drawable = getDrawable(); + if ((drawable == null) || !(drawable instanceof BitmapDrawable) || (mShader == null) + || (mPaint == null)) { + // In this state we wouldn't use the shader anyway. + mApplyShader = false; + return; + } + + // Default to using the shader. + mApplyShader = true; + + // If the scale type would not scale up the image, and the image is smaller than the + // view bounds, then just draw it normally so the shader won't have adverse effects. + // CENTER does not do any scaling, and simply centers the image. In that case we need to + // check to see if the image is smaller than the view in either dimension, and don't apply + // the shaer if it is. CENTER_INSIDE will only scale down, so we need to calculate the + // scaled size of the image, and only apply the shader if it happens to match the size of + // the view. + // TODO: this won't work with a custom image matrix, but that's probably ok for now + ScaleType scaleType = getScaleType(); + if (scaleType == ScaleType.CENTER || scaleType == ScaleType.CENTER_INSIDE) { + int viewWidth = getWidth() - getPaddingRight() - getPaddingLeft(); + int viewHeight = getHeight() - getPaddingTop() - getPaddingBottom(); + int drawableWidth = drawable.getIntrinsicWidth(); + int drawableHeight = drawable.getIntrinsicHeight(); + if (scaleType == ScaleType.CENTER_INSIDE) { + float scale = Math.min((float) viewWidth / (float) drawableWidth, + (float) viewHeight / (float) drawableHeight); + drawableWidth = (int) ((scale * drawableWidth) + 0.5f); + drawableHeight = (int) ((scale * drawableHeight) + 0.5f); + } + if ((drawableWidth < viewWidth) || (drawableHeight < viewHeight)) { + mApplyShader = false; + } + } + } + + @Override + protected void onDraw(Canvas canvas) { + Drawable drawable = getDrawable(); + Shape localRoundedRect = mRoundedRectangle; + Paint localPaint = mPaint; + if (drawable == null || localPaint == null || localRoundedRect == null) { + super.onDraw(canvas); + return; + } + + if (!isSupportedDrawable(drawable)) { + super.onDraw(canvas); + return; + } + + if (drawable instanceof ColorDrawable) { + ColorDrawable colorDrawable = (ColorDrawable) drawable; + localPaint.setColor(colorDrawable.getColor()); + } + + if (mShader != null && mApplyShader) { + mShader.setLocalMatrix(getImageMatrix()); + localPaint.setShader(mShader); + } + + localRoundedRect.resize(getWidth(), getHeight()); + localRoundedRect.draw(canvas, localPaint); + } + + private boolean isSupportedDrawable(Drawable drawable) { + return (drawable instanceof ColorDrawable) || (drawable instanceof BitmapDrawable); + } +}
diff --git a/ui/aura/BUILD.gn b/ui/aura/BUILD.gn index a479ecda..8c5bf69 100644 --- a/ui/aura/BUILD.gn +++ b/ui/aura/BUILD.gn
@@ -208,6 +208,8 @@ if (use_ozone) { deps += [ "//ui/ozone" ] + public += [ "screen_ozone.h" ] + sources += [ "screen_ozone.cc" ] } if (is_android) { @@ -408,11 +410,7 @@ "//ui/wm", ] - if (is_linux) { - deps += [ "//third_party/mesa" ] - } - data_deps = [ - "//third_party/mesa:osmesa", + "//third_party/mesa_headers", ] }
diff --git a/ui/aura/env.cc b/ui/aura/env.cc index 517d973..1263449 100644 --- a/ui/aura/env.cc +++ b/ui/aura/env.cc
@@ -100,8 +100,8 @@ } // static -Env* Env::GetInstanceDontCreate() { - return g_primary_instance; +bool Env::HasInstance() { + return !!g_primary_instance; } std::unique_ptr<WindowPort> Env::CreateWindowPort(Window* window) {
diff --git a/ui/aura/env.h b/ui/aura/env.h index a8c1b98b..b3d5915f 100644 --- a/ui/aura/env.h +++ b/ui/aura/env.h
@@ -100,7 +100,7 @@ // returned by GetInstance()) *and* an instance is created via // CreateLocalInstanceForInProcess(). static Env* GetInstance(); - static Env* GetInstanceDontCreate(); + static bool HasInstance(); Mode mode() const { return mode_; }
diff --git a/ui/aura/mus/window_tree_client.cc b/ui/aura/mus/window_tree_client.cc index d28883b..3c11a72 100644 --- a/ui/aura/mus/window_tree_client.cc +++ b/ui/aura/mus/window_tree_client.cc
@@ -27,7 +27,6 @@ #include "services/ui/public/cpp/gpu/gpu.h" #include "services/ui/public/cpp/property_type_converters.h" #include "services/ui/public/interfaces/constants.mojom.h" -#include "services/ui/public/interfaces/window_tree_host_factory.mojom.h" #include "ui/aura/client/aura_constants.h" #include "ui/aura/client/drag_drop_client.h" #include "ui/aura/client/transient_window_client.h" @@ -169,7 +168,8 @@ bool create_discardable_memory, scoped_refptr<base::SingleThreadTaskRunner> io_task_runner) { std::unique_ptr<WindowTreeClient> wtc(new WindowTreeClient( - connector, delegate, nullptr, nullptr, create_discardable_memory)); + connector, delegate, nullptr, std::move(io_task_runner), + create_discardable_memory)); ui::mojom::WindowTreeFactoryPtr factory; connector->BindInterface(ui::mojom::kServiceName, &factory); ui::mojom::WindowTreePtr window_tree; @@ -180,25 +180,6 @@ 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, 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() { in_destructor_ = true; @@ -387,8 +368,8 @@ client::GetTransientWindowClient()->AddObserver(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_task_runner| is typically null. When used in the browser process, + // |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;
diff --git a/ui/aura/mus/window_tree_client.h b/ui/aura/mus/window_tree_client.h index 3f638c7..710536f 100644 --- a/ui/aura/mus/window_tree_client.h +++ b/ui/aura/mus/window_tree_client.h
@@ -108,13 +108,6 @@ 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; service_manager::Connector* connector() { return connector_; }
diff --git a/ui/aura/screen_ozone.cc b/ui/aura/screen_ozone.cc new file mode 100644 index 0000000..28493ac --- /dev/null +++ b/ui/aura/screen_ozone.cc
@@ -0,0 +1,92 @@ +// 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 "ui/aura/screen_ozone.h" + +#include "ui/aura/window.h" +#include "ui/aura/window_tree_host.h" +#include "ui/display/display.h" +#include "ui/display/screen.h" + +namespace aura { + +ScreenOzone::ScreenOzone(std::unique_ptr<ui::PlatformScreen> platform_screen) + : platform_screen_(std::move(platform_screen)) {} +ScreenOzone::~ScreenOzone() = default; + +gfx::Point ScreenOzone::GetCursorScreenPoint() { + return platform_screen_->GetCursorScreenPoint(); +} + +bool ScreenOzone::IsWindowUnderCursor(gfx::NativeWindow window) { + return GetWindowAtScreenPoint(GetCursorScreenPoint()) == window; +} + +gfx::NativeWindow ScreenOzone::GetWindowAtScreenPoint(const gfx::Point& point) { + auto widget = platform_screen_->GetAcceleratedWidgetAtScreenPoint(point); + if (!widget) + return nullptr; + + aura::WindowTreeHost* host = + aura::WindowTreeHost::GetForAcceleratedWidget(widget); + return host ? host->window() : nullptr; +} + +int ScreenOzone::GetNumDisplays() const { + return GetAllDisplays().size(); +} + +const std::vector<display::Display>& ScreenOzone::GetAllDisplays() const { + return platform_screen_->GetAllDisplays(); +} + +display::Display ScreenOzone::GetDisplayNearestWindow( + gfx::NativeWindow window) const { + gfx::AcceleratedWidget widget = GetAcceleratedWidgetForWindow(window); + if (!widget) + return GetPrimaryDisplay(); + + return platform_screen_->GetDisplayForAcceleratedWidget(widget); +} + +display::Display ScreenOzone::GetDisplayNearestView( + gfx::NativeView view) const { + return GetDisplayNearestWindow(view); +} + +display::Display ScreenOzone::GetDisplayNearestPoint( + const gfx::Point& point) const { + return platform_screen_->GetDisplayNearestPoint(point); +} + +display::Display ScreenOzone::GetDisplayMatching( + const gfx::Rect& match_rect) const { + return platform_screen_->GetDisplayMatching(match_rect); +} + +display::Display ScreenOzone::GetPrimaryDisplay() const { + return platform_screen_->GetPrimaryDisplay(); +} + +void ScreenOzone::AddObserver(display::DisplayObserver* observer) { + platform_screen_->AddObserver(observer); +} + +void ScreenOzone::RemoveObserver(display::DisplayObserver* observer) { + platform_screen_->RemoveObserver(observer); +} + +gfx::AcceleratedWidget ScreenOzone::GetAcceleratedWidgetForWindow( + aura::Window* window) const { + if (!window) + return gfx::kNullAcceleratedWidget; + + aura::WindowTreeHost* host = window->GetHost(); + if (!host) + return gfx::kNullAcceleratedWidget; + + return host->GetAcceleratedWidget(); +} + +} // namespace aura \ No newline at end of file
diff --git a/ui/aura/screen_ozone.h b/ui/aura/screen_ozone.h new file mode 100644 index 0000000..132ea591 --- /dev/null +++ b/ui/aura/screen_ozone.h
@@ -0,0 +1,50 @@ +// 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 UI_AURA_SCREEN_OZONE_H_ +#define UI_AURA_SCREEN_OZONE_H_ + +#include "base/macros.h" +#include "ui/aura/aura_export.h" +#include "ui/display/screen.h" +#include "ui/ozone/public/platform_screen.h" + +namespace aura { + +// display::Screen implementation on top of ui::PlatformScreen provided by +// Ozone. +class AURA_EXPORT ScreenOzone : public display::Screen { + public: + explicit ScreenOzone(std::unique_ptr<ui::PlatformScreen> platform_screen); + ~ScreenOzone() override; + + // display::Screen interface. + gfx::Point GetCursorScreenPoint() override; + bool IsWindowUnderCursor(gfx::NativeWindow window) override; + gfx::NativeWindow GetWindowAtScreenPoint(const gfx::Point& point) override; + int GetNumDisplays() const override; + const std::vector<display::Display>& GetAllDisplays() const override; + display::Display GetDisplayNearestWindow( + gfx::NativeWindow window) const override; + display::Display GetDisplayNearestView(gfx::NativeView view) const override; + display::Display GetDisplayNearestPoint( + const gfx::Point& point) const override; + display::Display GetDisplayMatching( + const gfx::Rect& match_rect) const override; + display::Display GetPrimaryDisplay() const override; + void AddObserver(display::DisplayObserver* observer) override; + void RemoveObserver(display::DisplayObserver* observer) override; + + private: + gfx::AcceleratedWidget GetAcceleratedWidgetForWindow( + aura::Window* window) const; + + std::unique_ptr<ui::PlatformScreen> platform_screen_; + + DISALLOW_COPY_AND_ASSIGN(ScreenOzone); +}; + +} // namespace aura + +#endif // UI_AURA_SCREEN_OZONE_H_ \ No newline at end of file
diff --git a/ui/aura/test/aura_test_helper.cc b/ui/aura/test/aura_test_helper.cc index a816ef39..8184e97 100644 --- a/ui/aura/test/aura_test_helper.cc +++ b/ui/aura/test/aura_test_helper.cc
@@ -93,8 +93,7 @@ ui::ContextFactoryPrivate* context_factory_private) { // If Env has been configured with MUS, but |mode_| is still |LOCAL|, switch // to MUS. This is used for tests suites that setup Env globally. - if (Env::GetInstanceDontCreate() && - Env::GetInstanceDontCreate()->mode() == Env::Mode::MUS && + if (Env::HasInstance() && Env::GetInstance()->mode() == Env::Mode::MUS && mode_ == Mode::LOCAL) { test_window_tree_client_delegate_ = std::make_unique<TestWindowTreeClientDelegate>(); @@ -117,7 +116,7 @@ if (mode_ == Mode::MUS_CREATE_WINDOW_TREE_CLIENT) InitWindowTreeClient(); - if (Env::GetInstanceDontCreate()) { + if (Env::HasInstance()) { // Some tests suites create Env globally rather than per test. In this case // make sure Env is configured with the right mode. env_mode_to_restore_ = Env::GetInstance()->mode();
diff --git a/ui/aura/test/aura_test_suite_setup.cc b/ui/aura/test/aura_test_suite_setup.cc index 5957dd5d..b8691a1 100644 --- a/ui/aura/test/aura_test_suite_setup.cc +++ b/ui/aura/test/aura_test_suite_setup.cc
@@ -38,7 +38,7 @@ } // namespace AuraTestSuiteSetup::AuraTestSuiteSetup() { - DCHECK(!Env::GetInstanceDontCreate()); + DCHECK(!Env::HasInstance()); #if BUILDFLAG(ENABLE_MUS) const Env::Mode env_mode = features::IsAshInBrowserProcess() ? Env::Mode::LOCAL : Env::Mode::MUS;
diff --git a/ui/base/BUILD.gn b/ui/base/BUILD.gn index ac310da..d9aa73a 100644 --- a/ui/base/BUILD.gn +++ b/ui/base/BUILD.gn
@@ -1040,7 +1040,7 @@ ] data_deps += [ "//ui/resources:ui_test_pak", # TODO(brettw): this does nothing. - "//third_party/mesa:osmesa", + "//third_party/mesa_headers", ] } if (is_linux || is_win || is_fuchsia) {
diff --git a/ui/base/ime/chromeos/ime_keymap.cc b/ui/base/ime/chromeos/ime_keymap.cc index e1433ce..4b5dbde 100644 --- a/ui/base/ime/chromeos/ime_keymap.cc +++ b/ui/base/ime/chromeos/ime_keymap.cc
@@ -18,145 +18,144 @@ const struct KeyCodeTable { KeyboardCode keyboard_code; const char* dom_code; -} kKeyCodeTable[] = { - {VKEY_BACK, "Backspace"}, - {VKEY_TAB, "Tab"}, - {VKEY_RETURN, "Enter"}, - {VKEY_MENU, "ContextMenu"}, - {VKEY_PAUSE, "Pause"}, - {VKEY_CAPITAL, "CapsLock"}, - {VKEY_KANA, "KanaMode"}, - {VKEY_HANGUL, "HangulMode"}, - {VKEY_HANJA, "Hanja"}, - {VKEY_KANJI, "Kanji"}, - {VKEY_ESCAPE, "Escape"}, - {VKEY_CONVERT, "Convert"}, - {VKEY_NONCONVERT, "NoConvert"}, - {VKEY_SPACE, "Space"}, - {VKEY_END, "End"}, - {VKEY_HOME, "Home"}, - {VKEY_LEFT, "ArrowLeft"}, - {VKEY_UP, "ArrowUp"}, - {VKEY_RIGHT, "ArrowRight"}, - {VKEY_DOWN, "ArrowDown"}, - {VKEY_PRINT, "PrintScreen"}, - {VKEY_INSERT, "Insert"}, - {VKEY_DELETE, "Delete"}, - {VKEY_HELP, "Help"}, - {VKEY_0, "Digit0"}, - {VKEY_1, "Digit1"}, - {VKEY_2, "Digit2"}, - {VKEY_3, "Digit3"}, - {VKEY_4, "Digit4"}, - {VKEY_5, "Digit5"}, - {VKEY_6, "Digit6"}, - {VKEY_7, "Digit7"}, - {VKEY_8, "Digit8"}, - {VKEY_9, "Digit9"}, - {VKEY_A, "KeyA"}, - {VKEY_B, "KeyB"}, - {VKEY_C, "KeyC"}, - {VKEY_D, "KeyD"}, - {VKEY_E, "KeyE"}, - {VKEY_F, "KeyF"}, - {VKEY_G, "KeyG"}, - {VKEY_H, "KeyH"}, - {VKEY_I, "KeyI"}, - {VKEY_J, "KeyJ"}, - {VKEY_K, "KeyK"}, - {VKEY_L, "KeyL"}, - {VKEY_M, "KeyM"}, - {VKEY_N, "KeyN"}, - {VKEY_O, "KeyO"}, - {VKEY_P, "KeyP"}, - {VKEY_Q, "KeyQ"}, - {VKEY_R, "KeyR"}, - {VKEY_S, "KeyS"}, - {VKEY_T, "KeyT"}, - {VKEY_U, "KeyU"}, - {VKEY_V, "KeyV"}, - {VKEY_W, "KeyW"}, - {VKEY_X, "KeyX"}, - {VKEY_Y, "KeyY"}, - {VKEY_Z, "KeyZ"}, - {VKEY_LWIN, "OSLeft"}, - {VKEY_RWIN, "OSRight"}, - {VKEY_NUMPAD0, "Numpad0"}, - {VKEY_NUMPAD1, "Numpad1"}, - {VKEY_NUMPAD2, "Numpad2"}, - {VKEY_NUMPAD3, "Numpad3"}, - {VKEY_NUMPAD4, "Numpad4"}, - {VKEY_NUMPAD5, "Numpad5"}, - {VKEY_NUMPAD6, "Numpad6"}, - {VKEY_NUMPAD7, "Numpad7"}, - {VKEY_NUMPAD8, "Numpad8"}, - {VKEY_NUMPAD9, "Numpad9"}, - {VKEY_MULTIPLY, "NumpadMultiply"}, - {VKEY_ADD, "NumpadAdd"}, - {VKEY_SUBTRACT, "NumpadSubtract"}, - {VKEY_DECIMAL, "NumpadDecimal"}, - {VKEY_DIVIDE, "NumpadDivide"}, - {VKEY_F1, "F1"}, - {VKEY_F2, "F2"}, - {VKEY_F3, "F3"}, - {VKEY_F4, "F4"}, - {VKEY_F5, "F5"}, - {VKEY_F6, "F6"}, - {VKEY_F7, "F7"}, - {VKEY_F8, "F8"}, - {VKEY_F9, "F9"}, - {VKEY_F10, "F10"}, - {VKEY_F11, "F11"}, - {VKEY_F12, "F12"}, - {VKEY_F13, "F13"}, - {VKEY_F14, "F14"}, - {VKEY_F15, "F15"}, - {VKEY_F16, "F16"}, - {VKEY_F17, "F17"}, - {VKEY_F18, "F18"}, - {VKEY_F19, "F19"}, - {VKEY_F20, "F20"}, - {VKEY_F21, "F21"}, - {VKEY_F22, "F22"}, - {VKEY_F23, "F23"}, - {VKEY_F24, "F24"}, - {VKEY_NUMLOCK, "NumLock"}, - {VKEY_SCROLL, "ScrollLock"}, - {VKEY_LSHIFT, "ShiftLeft"}, - {VKEY_RSHIFT, "ShiftRight"}, - {VKEY_LCONTROL, "ControlLeft"}, - {VKEY_RCONTROL, "ControlRight"}, - {VKEY_LMENU, "AltLeft"}, - {VKEY_RMENU, "AltRight"}, - {VKEY_BROWSER_BACK, "BrowserBack"}, - {VKEY_BROWSER_FORWARD, "BrowserForward"}, - {VKEY_BROWSER_REFRESH, "BrowserRefresh"}, - {VKEY_BROWSER_STOP, "BrowserStop"}, - {VKEY_BROWSER_SEARCH, "BrowserSearch"}, - {VKEY_BROWSER_HOME, "BrowserHome"}, - {VKEY_VOLUME_MUTE, "VolumeMute"}, - {VKEY_VOLUME_DOWN, "VolumeDown"}, - {VKEY_VOLUME_UP, "VolumeUp"}, - {VKEY_BRIGHTNESS_DOWN, "BrightnessDown"}, - {VKEY_BRIGHTNESS_UP, "BrightnessUp"}, - {VKEY_MEDIA_LAUNCH_APP1, "ChromeOSSwitchWindow"}, - {VKEY_MEDIA_LAUNCH_APP2, "ChromeOSFullscreen"}, - {VKEY_MEDIA_NEXT_TRACK, "MediaTrackNext"}, - {VKEY_MEDIA_PREV_TRACK, "MediaTrackPrevious"}, - {VKEY_MEDIA_STOP, "MediaStop"}, - {VKEY_MEDIA_PLAY_PAUSE, "MediaPlayPause"}, - {VKEY_MEDIA_LAUNCH_MAIL, "LaunchMail"}, - {VKEY_OEM_1, "Semicolon"}, - {VKEY_OEM_PLUS, "Equal"}, - {VKEY_OEM_COMMA, "Comma"}, - {VKEY_OEM_MINUS, "Minus"}, - {VKEY_OEM_PERIOD, "Period"}, - {VKEY_OEM_2, "Slash"}, - {VKEY_OEM_3, "Backquote"}, - {VKEY_OEM_4, "BracketLeft"}, - {VKEY_OEM_5, "Backslash"}, - {VKEY_OEM_6, "BracketRight"}, - {VKEY_OEM_7, "Quote"}}; +} kKeyCodeTable[] = {{VKEY_BACK, "Backspace"}, + {VKEY_TAB, "Tab"}, + {VKEY_RETURN, "Enter"}, + {VKEY_MENU, "ContextMenu"}, + {VKEY_PAUSE, "Pause"}, + {VKEY_CAPITAL, "CapsLock"}, + {VKEY_KANA, "KanaMode"}, + {VKEY_HANGUL, "HangulMode"}, + {VKEY_HANJA, "Hanja"}, + {VKEY_KANJI, "Kanji"}, + {VKEY_ESCAPE, "Escape"}, + {VKEY_CONVERT, "Convert"}, + {VKEY_NONCONVERT, "NoConvert"}, + {VKEY_SPACE, "Space"}, + {VKEY_END, "End"}, + {VKEY_HOME, "Home"}, + {VKEY_LEFT, "ArrowLeft"}, + {VKEY_UP, "ArrowUp"}, + {VKEY_RIGHT, "ArrowRight"}, + {VKEY_DOWN, "ArrowDown"}, + {VKEY_SNAPSHOT, "PrintScreen"}, + {VKEY_INSERT, "Insert"}, + {VKEY_DELETE, "Delete"}, + {VKEY_HELP, "Help"}, + {VKEY_0, "Digit0"}, + {VKEY_1, "Digit1"}, + {VKEY_2, "Digit2"}, + {VKEY_3, "Digit3"}, + {VKEY_4, "Digit4"}, + {VKEY_5, "Digit5"}, + {VKEY_6, "Digit6"}, + {VKEY_7, "Digit7"}, + {VKEY_8, "Digit8"}, + {VKEY_9, "Digit9"}, + {VKEY_A, "KeyA"}, + {VKEY_B, "KeyB"}, + {VKEY_C, "KeyC"}, + {VKEY_D, "KeyD"}, + {VKEY_E, "KeyE"}, + {VKEY_F, "KeyF"}, + {VKEY_G, "KeyG"}, + {VKEY_H, "KeyH"}, + {VKEY_I, "KeyI"}, + {VKEY_J, "KeyJ"}, + {VKEY_K, "KeyK"}, + {VKEY_L, "KeyL"}, + {VKEY_M, "KeyM"}, + {VKEY_N, "KeyN"}, + {VKEY_O, "KeyO"}, + {VKEY_P, "KeyP"}, + {VKEY_Q, "KeyQ"}, + {VKEY_R, "KeyR"}, + {VKEY_S, "KeyS"}, + {VKEY_T, "KeyT"}, + {VKEY_U, "KeyU"}, + {VKEY_V, "KeyV"}, + {VKEY_W, "KeyW"}, + {VKEY_X, "KeyX"}, + {VKEY_Y, "KeyY"}, + {VKEY_Z, "KeyZ"}, + {VKEY_LWIN, "OSLeft"}, + {VKEY_RWIN, "OSRight"}, + {VKEY_NUMPAD0, "Numpad0"}, + {VKEY_NUMPAD1, "Numpad1"}, + {VKEY_NUMPAD2, "Numpad2"}, + {VKEY_NUMPAD3, "Numpad3"}, + {VKEY_NUMPAD4, "Numpad4"}, + {VKEY_NUMPAD5, "Numpad5"}, + {VKEY_NUMPAD6, "Numpad6"}, + {VKEY_NUMPAD7, "Numpad7"}, + {VKEY_NUMPAD8, "Numpad8"}, + {VKEY_NUMPAD9, "Numpad9"}, + {VKEY_MULTIPLY, "NumpadMultiply"}, + {VKEY_ADD, "NumpadAdd"}, + {VKEY_SUBTRACT, "NumpadSubtract"}, + {VKEY_DECIMAL, "NumpadDecimal"}, + {VKEY_DIVIDE, "NumpadDivide"}, + {VKEY_F1, "F1"}, + {VKEY_F2, "F2"}, + {VKEY_F3, "F3"}, + {VKEY_F4, "F4"}, + {VKEY_F5, "F5"}, + {VKEY_F6, "F6"}, + {VKEY_F7, "F7"}, + {VKEY_F8, "F8"}, + {VKEY_F9, "F9"}, + {VKEY_F10, "F10"}, + {VKEY_F11, "F11"}, + {VKEY_F12, "F12"}, + {VKEY_F13, "F13"}, + {VKEY_F14, "F14"}, + {VKEY_F15, "F15"}, + {VKEY_F16, "F16"}, + {VKEY_F17, "F17"}, + {VKEY_F18, "F18"}, + {VKEY_F19, "F19"}, + {VKEY_F20, "F20"}, + {VKEY_F21, "F21"}, + {VKEY_F22, "F22"}, + {VKEY_F23, "F23"}, + {VKEY_F24, "F24"}, + {VKEY_NUMLOCK, "NumLock"}, + {VKEY_SCROLL, "ScrollLock"}, + {VKEY_LSHIFT, "ShiftLeft"}, + {VKEY_RSHIFT, "ShiftRight"}, + {VKEY_LCONTROL, "ControlLeft"}, + {VKEY_RCONTROL, "ControlRight"}, + {VKEY_LMENU, "AltLeft"}, + {VKEY_RMENU, "AltRight"}, + {VKEY_BROWSER_BACK, "BrowserBack"}, + {VKEY_BROWSER_FORWARD, "BrowserForward"}, + {VKEY_BROWSER_REFRESH, "BrowserRefresh"}, + {VKEY_BROWSER_STOP, "BrowserStop"}, + {VKEY_BROWSER_SEARCH, "BrowserSearch"}, + {VKEY_BROWSER_HOME, "BrowserHome"}, + {VKEY_VOLUME_MUTE, "VolumeMute"}, + {VKEY_VOLUME_DOWN, "VolumeDown"}, + {VKEY_VOLUME_UP, "VolumeUp"}, + {VKEY_BRIGHTNESS_DOWN, "BrightnessDown"}, + {VKEY_BRIGHTNESS_UP, "BrightnessUp"}, + {VKEY_MEDIA_LAUNCH_APP1, "ChromeOSSwitchWindow"}, + {VKEY_MEDIA_LAUNCH_APP2, "ChromeOSFullscreen"}, + {VKEY_MEDIA_NEXT_TRACK, "MediaTrackNext"}, + {VKEY_MEDIA_PREV_TRACK, "MediaTrackPrevious"}, + {VKEY_MEDIA_STOP, "MediaStop"}, + {VKEY_MEDIA_PLAY_PAUSE, "MediaPlayPause"}, + {VKEY_MEDIA_LAUNCH_MAIL, "LaunchMail"}, + {VKEY_OEM_1, "Semicolon"}, + {VKEY_OEM_PLUS, "Equal"}, + {VKEY_OEM_COMMA, "Comma"}, + {VKEY_OEM_MINUS, "Minus"}, + {VKEY_OEM_PERIOD, "Period"}, + {VKEY_OEM_2, "Slash"}, + {VKEY_OEM_3, "Backquote"}, + {VKEY_OEM_4, "BracketLeft"}, + {VKEY_OEM_5, "Backslash"}, + {VKEY_OEM_6, "BracketRight"}, + {VKEY_OEM_7, "Quote"}}; class KeyCodeMap { public:
diff --git a/ui/base/layout.cc b/ui/base/layout.cc index 29a0e0e..027f357 100644 --- a/ui/base/layout.cc +++ b/ui/base/layout.cc
@@ -108,7 +108,13 @@ return 1.0f; display::Display display = display::Screen::GetScreen()->GetDisplayNearestView(view); - DCHECK(display.is_valid()); + + // GetDisplayNearestView() may return null Display if the |view| is not shown + // on the screen and there is no primary display. In that case use scale + // factor 1.0. + if (!display.is_valid()) + return 1.0f; + return display.device_scale_factor(); }
diff --git a/ui/chromeos/ime/candidate_window_view.h b/ui/chromeos/ime/candidate_window_view.h index 4f31474..50b26e0 100644 --- a/ui/chromeos/ime/candidate_window_view.h +++ b/ui/chromeos/ime/candidate_window_view.h
@@ -10,7 +10,7 @@ #include "base/macros.h" #include "ui/base/ime/candidate_window.h" #include "ui/chromeos/ui_chromeos_export.h" -#include "ui/views/bubble/bubble_dialog_delegate.h" +#include "ui/views/bubble/bubble_dialog_delegate_view.h" #include "ui/views/controls/button/button.h" namespace ui {
diff --git a/ui/chromeos/ime/infolist_window.h b/ui/chromeos/ime/infolist_window.h index 31ce18b..6fbc1b5 100644 --- a/ui/chromeos/ime/infolist_window.h +++ b/ui/chromeos/ime/infolist_window.h
@@ -15,7 +15,7 @@ #include "ui/base/ime/infolist_entry.h" #include "ui/chromeos/ui_chromeos_export.h" #include "ui/gfx/font_list.h" -#include "ui/views/bubble/bubble_dialog_delegate.h" +#include "ui/views/bubble/bubble_dialog_delegate_view.h" namespace ui { namespace ime {
diff --git a/ui/chromeos/ime/mode_indicator_view.h b/ui/chromeos/ime/mode_indicator_view.h index b976a5c..ec1bc9d4 100644 --- a/ui/chromeos/ime/mode_indicator_view.h +++ b/ui/chromeos/ime/mode_indicator_view.h
@@ -10,7 +10,7 @@ #include "base/timer/timer.h" #include "ui/chromeos/ui_chromeos_export.h" #include "ui/gfx/geometry/rect.h" -#include "ui/views/bubble/bubble_dialog_delegate.h" +#include "ui/views/bubble/bubble_dialog_delegate_view.h" #include "ui/views/widget/widget.h" namespace views {
diff --git a/ui/compositor/BUILD.gn b/ui/compositor/BUILD.gn index 4d1beef..e7f9be1 100644 --- a/ui/compositor/BUILD.gn +++ b/ui/compositor/BUILD.gn
@@ -238,7 +238,8 @@ "//ui/gl", "//ui/resources", ] + if (is_linux) { - deps += [ "//third_party/mesa:osmesa" ] + deps += [ "//third_party/mesa_headers" ] } }
diff --git a/ui/compositor/test/test_suite.cc b/ui/compositor/test/test_suite.cc index 117d90a..dc8542a 100644 --- a/ui/compositor/test/test_suite.cc +++ b/ui/compositor/test/test_suite.cc
@@ -51,10 +51,6 @@ display::win::SetDefaultDeviceScaleFactor(1.0f); #endif -#if defined(OS_MACOSX) - gpu::ImageTransportSurface::SetAllowOSMesaForTesting(true); -#endif - scoped_task_environment_ = std::make_unique<base::test::ScopedTaskEnvironment>( base::test::ScopedTaskEnvironment::MainThreadType::UI);
diff --git a/ui/events/BUILD.gn b/ui/events/BUILD.gn index fb1ca44..dd0c77d 100644 --- a/ui/events/BUILD.gn +++ b/ui/events/BUILD.gn
@@ -509,7 +509,7 @@ sources += [ "android/motion_event_android_unittest.cc" ] } else { data_deps = [ - "//third_party/mesa:osmesa", + "//third_party/mesa_headers", ] }
diff --git a/ui/events/blink/input_handler_proxy.cc b/ui/events/blink/input_handler_proxy.cc index 5f9d0bc..f92d3e3f 100644 --- a/ui/events/blink/input_handler_proxy.cc +++ b/ui/events/blink/input_handler_proxy.cc
@@ -259,10 +259,6 @@ const base::TimeTicks now) { if (compositor_event_queue_ && IsGestureScrollOrPinch(event_with_callback->event().GetType())) { - if (scroll_predictor_) - scroll_predictor_->HandleEvent(event_with_callback->original_events(), - now, event_with_callback->event_pointer()); - // Report the coalesced count only for continuous events to avoid the noise // from non-continuous events. if (IsContinuousGestureEvent(event_with_callback->event().GetType())) { @@ -294,6 +290,7 @@ &monitored_latency_info); current_overscroll_params_.reset(); + InputHandlerProxy::EventDisposition disposition = HandleInputEvent(event_with_callback->event()); @@ -326,8 +323,17 @@ // Calling |NowTicks()| is expensive so we only want to do it once. base::TimeTicks now = tick_clock_->NowTicks(); - while (!compositor_event_queue_->empty()) - DispatchSingleInputEvent(compositor_event_queue_->Pop(), now); + while (!compositor_event_queue_->empty()) { + std::unique_ptr<EventWithCallback> event_with_callback = + compositor_event_queue_->Pop(); + if (scroll_predictor_) { + scroll_predictor_->ResampleScrollEvents( + event_with_callback->original_events(), now, + event_with_callback->event_pointer()); + } + + DispatchSingleInputEvent(std::move(event_with_callback), now); + } } InputHandlerProxy::EventDisposition InputHandlerProxy::HandleInputEvent( @@ -613,6 +619,9 @@ const WebGestureEvent& gesture_event) { TRACE_EVENT0("input", "InputHandlerProxy::HandleGestureScrollBegin"); + if (compositor_event_queue_ && scroll_predictor_) + scroll_predictor_->ResetOnGestureScrollBegin(gesture_event); + #ifndef NDEBUG expect_scroll_update_end_ = true; #endif
diff --git a/ui/events/blink/prediction/input_predictor.h b/ui/events/blink/prediction/input_predictor.h index e1b80fbe5..60f9bcd2 100644 --- a/ui/events/blink/prediction/input_predictor.h +++ b/ui/events/blink/prediction/input_predictor.h
@@ -37,6 +37,16 @@ // Generate the prediction based on current points. virtual bool GeneratePrediction(base::TimeTicks frame_time, InputData* result) const = 0; + + protected: + static constexpr base::TimeDelta kMaxTimeDelta = + base::TimeDelta::FromMilliseconds(20); + // When event is jammed in OS or browser, we might have events with invalid + // timestamp. To avoid getting inaccurate result, limit the resampling time + // delta to 20 ms. This value might change if we have better timestamp or + // do better in predicting. + static constexpr base::TimeDelta kMaxResampleTime = + base::TimeDelta::FromMilliseconds(20); }; } // namespace ui
diff --git a/ui/events/blink/prediction/kalman_predictor.cc b/ui/events/blink/prediction/kalman_predictor.cc index 7b17105..c2d66ac 100644 --- a/ui/events/blink/prediction/kalman_predictor.cc +++ b/ui/events/blink/prediction/kalman_predictor.cc
@@ -4,12 +4,8 @@ #include "ui/events/blink/prediction/kalman_predictor.h" -#include <algorithm> -#include <cmath> - namespace { -constexpr double kMaxInterval = 50.0; // Influence of acceleration during each prediction sample constexpr float kAccelerationInfluence = 0.5f; // Influence of velocity during each prediction sample @@ -19,6 +15,9 @@ namespace ui { +constexpr base::TimeDelta InputPredictor::kMaxTimeDelta; +constexpr base::TimeDelta InputPredictor::kMaxResampleTime; + KalmanPredictor::KalmanPredictor() = default; KalmanPredictor::~KalmanPredictor() = default; @@ -30,17 +29,18 @@ } void KalmanPredictor::Update(const InputData& cur_input) { - double dt(0); - if (!last_point_.time_stamp.is_null()) - dt = (cur_input.time_stamp - last_point_.time_stamp).InMillisecondsF(); - if (dt > kMaxInterval) { - Reset(); - return; + base::TimeDelta dt; + if (!last_point_.time_stamp.is_null()) { + // When last point is kMaxTimeDelta away, consider it is incontinuous. + dt = cur_input.time_stamp - last_point_.time_stamp; + if (dt > kMaxTimeDelta) + Reset(); } + double dt_ms = dt.InMillisecondsF(); last_point_ = cur_input; - x_predictor_.Update(cur_input.pos.x(), dt); - y_predictor_.Update(cur_input.pos.y(), dt); + x_predictor_.Update(cur_input.pos.x(), dt_ms); + y_predictor_.Update(cur_input.pos.y(), dt_ms); } bool KalmanPredictor::HasPrediction() const { @@ -51,11 +51,11 @@ InputData* result) const { std::vector<InputData> pred_points; - double dt = (frame_time - last_point_.time_stamp).InMillisecondsF(); + base::TimeDelta dt = frame_time - last_point_.time_stamp; // Kalman filter is not very good when predicting backwards. Besides, // predicting backwards means increasing latency. Thus disable prediction when // dt < 0. - if (!HasPrediction() || dt < 0) + if (!HasPrediction() || dt < base::TimeDelta::Min() || dt > kMaxResampleTime) return false; gfx::Vector2dF position(last_point_.pos.x(), last_point_.pos.y()); @@ -63,8 +63,10 @@ gfx::Vector2dF velocity = PredictVelocity(); gfx::Vector2dF acceleration = PredictAcceleration(); - position += ScaleVector2d(velocity, kVelocityInfluence * dt) + - ScaleVector2d(acceleration, kAccelerationInfluence * dt * dt); + float dt_ms = dt.InMillisecondsF(); + position += + ScaleVector2d(velocity, kVelocityInfluence * dt_ms) + + ScaleVector2d(acceleration, kAccelerationInfluence * dt_ms * dt_ms); result->pos.set_x(position.x()); result->pos.set_y(position.y());
diff --git a/ui/events/blink/prediction/least_squares_predictor.cc b/ui/events/blink/prediction/least_squares_predictor.cc index 26664fa..94f1be7 100644 --- a/ui/events/blink/prediction/least_squares_predictor.cc +++ b/ui/events/blink/prediction/least_squares_predictor.cc
@@ -4,7 +4,7 @@ #include "ui/events/blink/prediction/least_squares_predictor.h" -#include <cmath> +#include "base/trace_event/trace_event.h" namespace ui { @@ -47,12 +47,11 @@ } void LeastSquaresPredictor::Update(const InputData& cur_input) { - // Reset curve if last point is 50 milliseconds away. - constexpr double max_interval_millisecond = 50.0; - if (!time_.empty() && - (cur_input.time_stamp - time_.back()).InMillisecondsF() > - max_interval_millisecond) - Reset(); + if (!time_.empty()) { + // When last point is kMaxTimeDelta away, consider it is incontinuous. + if (cur_input.time_stamp - time_.back() > kMaxTimeDelta) + Reset(); + } x_queue_.push_back(cur_input.pos.x()); y_queue_.push_back(cur_input.pos.y()); @@ -78,7 +77,7 @@ bool LeastSquaresPredictor::GeneratePrediction(base::TimeTicks frame_time, InputData* result) const { - if (!HasPrediction()) + if (!HasPrediction() || frame_time - time_.back() > kMaxResampleTime) return false; gfx::Matrix3F time_matrix = GetXMatrix();
diff --git a/ui/events/blink/scroll_predictor.cc b/ui/events/blink/scroll_predictor.cc index a8f2de9..6c153b488 100644 --- a/ui/events/blink/scroll_predictor.cc +++ b/ui/events/blink/scroll_predictor.cc
@@ -6,6 +6,7 @@ #include "base/metrics/field_trial.h" #include "base/metrics/field_trial_params.h" +#include "base/trace_event/trace_event.h" #include "ui/events/blink/prediction/empty_predictor.h" #include "ui/events/blink/prediction/kalman_predictor.h" #include "ui/events/blink/prediction/least_squares_predictor.h" @@ -36,15 +37,25 @@ ScrollPredictor::~ScrollPredictor() = default; -void ScrollPredictor::HandleEvent( +void ScrollPredictor::ResetOnGestureScrollBegin(const WebGestureEvent& event) { + DCHECK(event.GetType() == WebInputEvent::kGestureScrollBegin); + // Only do resampling for scroll on touchscreen. + if (event.SourceDevice() == blink::kWebGestureDeviceTouchscreen) { + should_resample_scroll_events_ = true; + Reset(); + } +} + +void ScrollPredictor::ResampleScrollEvents( const EventWithCallback::OriginalEventList& original_events, base::TimeTicks frame_time, WebInputEvent* event) { - if (event->GetType() == WebInputEvent::kGestureScrollBegin) { - predictor_->Reset(); - current_accumulated_delta_ = gfx::PointF(); - last_accumulated_delta_ = gfx::PointF(); - } else if (event->GetType() == WebInputEvent::kGestureScrollUpdate) { + if (!should_resample_scroll_events_) + return; + + if (event->GetType() == WebInputEvent::kGestureScrollUpdate) { + TRACE_EVENT_BEGIN0("input", "ScrollPredictor::ResampleScrollEvents"); + // TODO(eirage): When scroll events are coalesced with pinch, we can have // empty original event list. In that case, we can't use the original events // to update the prediction. We don't want to use the aggregated event to @@ -53,19 +64,42 @@ return; for (auto& coalesced_event : original_events) - UpdatePrediction(coalesced_event.event_); - ResampleEvent(frame_time, event); + UpdatePrediction(coalesced_event.event_, frame_time); + + if (should_resample_scroll_events_) + ResampleEvent(frame_time, event); + + TRACE_EVENT_END2("input", "ScrollPredictor::ResampleScrollEvents", + "OriginalPosition", current_accumulated_delta_.ToString(), + "PredictedPosition", last_accumulated_delta_.ToString()); + } else if (event->GetType() == WebInputEvent::kGestureScrollEnd) { + should_resample_scroll_events_ = false; } } -void ScrollPredictor::UpdatePrediction(const WebScopedInputEvent& event) { +void ScrollPredictor::Reset() { + predictor_->Reset(); + current_accumulated_delta_ = gfx::PointF(); + last_accumulated_delta_ = gfx::PointF(); +} + +void ScrollPredictor::UpdatePrediction(const WebScopedInputEvent& event, + base::TimeTicks frame_time) { DCHECK(event->GetType() == WebInputEvent::kGestureScrollUpdate); const WebGestureEvent& gesture_event = static_cast<const WebGestureEvent&>(*event); + // When fling, GSU is sending per frame, resampling is not needed. + if (gesture_event.data.scroll_update.inertial_phase == + WebGestureEvent::kMomentumPhase) { + should_resample_scroll_events_ = false; + return; + } + current_accumulated_delta_.Offset(gesture_event.data.scroll_update.delta_x, gesture_event.data.scroll_update.delta_y); InputPredictor::InputData data = {current_accumulated_delta_, gesture_event.TimeStamp()}; + predictor_->Update(data); } @@ -74,20 +108,31 @@ DCHECK(event->GetType() == WebInputEvent::kGestureScrollUpdate); WebGestureEvent* gesture_event = static_cast<WebGestureEvent*>(event); + gfx::PointF predicted_accumulated_delta_ = current_accumulated_delta_; InputPredictor::InputData result; if (predictor_->HasPrediction() && predictor_->GeneratePrediction(time_stamp, &result)) { - gfx::PointF predicted_accumulated_delta_ = result.pos; - gesture_event->data.scroll_update.delta_x = - predicted_accumulated_delta_.x() - last_accumulated_delta_.x(); - gesture_event->data.scroll_update.delta_y = - predicted_accumulated_delta_.y() - last_accumulated_delta_.y(); + predicted_accumulated_delta_ = result.pos; gesture_event->SetTimeStamp(time_stamp); - last_accumulated_delta_ = predicted_accumulated_delta_; - } else { - last_accumulated_delta_.Offset(gesture_event->data.scroll_update.delta_x, - gesture_event->data.scroll_update.delta_y); } + + // If the last resampled GSU over predict the delta, new GSU might try to + // scroll back to make up the difference, which cause the scroll to jump back. + // So we set the new delta to 0 when predicted delta is in different direction + // to the original event. + gfx::Vector2dF new_delta = + predicted_accumulated_delta_ - last_accumulated_delta_; + gesture_event->data.scroll_update.delta_x = + (new_delta.x() * gesture_event->data.scroll_update.delta_x < 0) + ? 0 + : new_delta.x(); + gesture_event->data.scroll_update.delta_y = + (new_delta.y() * gesture_event->data.scroll_update.delta_y < 0) + ? 0 + : new_delta.y(); + + last_accumulated_delta_.Offset(gesture_event->data.scroll_update.delta_x, + gesture_event->data.scroll_update.delta_y); } } // namespace ui
diff --git a/ui/events/blink/scroll_predictor.h b/ui/events/blink/scroll_predictor.h index 12df713..6c8e685 100644 --- a/ui/events/blink/scroll_predictor.h +++ b/ui/events/blink/scroll_predictor.h
@@ -26,19 +26,26 @@ ScrollPredictor(); ~ScrollPredictor(); - // Resampling gesture scroll events. Each prediction starts with a GSB. - // On each GSU, updates the prediction with events in original events list, - // and apply the prediction to the GSU event. - void HandleEvent(const EventWithCallback::OriginalEventList& original_events, - base::TimeTicks frame_time, - blink::WebInputEvent* event); + void ResetOnGestureScrollBegin(const blink::WebGestureEvent& event); + // Resampling GestureScrollUpdate events. Updates the prediction with events + // in original events list, and apply the prediction to the aggregated GSU + // event. + void ResampleScrollEvents( + const EventWithCallback::OriginalEventList& original_events, + base::TimeTicks frame_time, + blink::WebInputEvent* event); + + // Reset predictor and clear accumulated delta. This should be called on + // GestureScrollBegin. + void Reset(); private: friend class test::InputHandlerProxyEventQueueTest; friend class test::ScrollPredictorTest; // Update the prediction with GestureScrollUpdate deltaX and deltaY - void UpdatePrediction(const WebScopedInputEvent& event); + void UpdatePrediction(const WebScopedInputEvent& event, + base::TimeTicks frame_time); // Apply resampled deltaX/deltaY to gesture events void ResampleEvent(base::TimeTicks frame_time, blink::WebInputEvent* event); @@ -51,6 +58,8 @@ // the aggregated event. gfx::PointF last_accumulated_delta_; + bool should_resample_scroll_events_ = false; + DISALLOW_COPY_AND_ASSIGN(ScrollPredictor); };
diff --git a/ui/events/blink/scroll_predictor_unittest.cc b/ui/events/blink/scroll_predictor_unittest.cc index 2e003be..fda70c8 100644 --- a/ui/events/blink/scroll_predictor_unittest.cc +++ b/ui/events/blink/scroll_predictor_unittest.cc
@@ -16,6 +16,11 @@ namespace ui { namespace test { +namespace { + +constexpr double kEpsilon = 0.001; + +} // namespace class ScrollPredictorTest : public testing::Test { public: @@ -36,22 +41,20 @@ WebInputEvent::GetStaticTimeStampForTests(), result); } - WebScopedInputEvent CreateGestureScrollEvent( - WebInputEvent::Type type, + WebScopedInputEvent CreateGestureScrollUpdate( float delta_x = 0, float delta_y = 0, double time_delta_in_milliseconds = 0, - blink::WebGestureDevice source_device = - blink::kWebGestureDeviceTouchscreen) { + WebGestureEvent::InertialPhaseState phase = + WebGestureEvent::kNonMomentumPhase) { WebGestureEvent gesture( - type, WebInputEvent::kNoModifiers, + WebInputEvent::kGestureScrollUpdate, WebInputEvent::kNoModifiers, WebInputEvent::GetStaticTimeStampForTests() + base::TimeDelta::FromMillisecondsD(time_delta_in_milliseconds), - source_device); - if (type == WebInputEvent::kGestureScrollUpdate) { - gesture.data.scroll_update.delta_x = delta_x; - gesture.data.scroll_update.delta_y = delta_y; - } + blink::kWebGestureDeviceTouchscreen); + gesture.data.scroll_update.delta_x = delta_x; + gesture.data.scroll_update.delta_y = delta_y; + gesture.data.scroll_update.inertial_phase = phase; original_events_.emplace_back(WebInputEventTraits::Clone(gesture), LatencyInfo(), base::NullCallback()); @@ -64,9 +67,17 @@ Coalesce(*new_event, old_event.get()); } + void SendGestureScrollBegin() { + WebGestureEvent gesture_begin(WebInputEvent::kGestureScrollBegin, + WebInputEvent::kNoModifiers, + WebInputEvent::GetStaticTimeStampForTests(), + blink::kWebGestureDeviceTouchscreen); + scroll_predictor_->ResetOnGestureScrollBegin(gesture_begin); + } + void HandleResampleScrollEvents(WebScopedInputEvent& event, double time_delta_in_milliseconds = 0) { - scroll_predictor_->HandleEvent( + scroll_predictor_->ResampleScrollEvents( original_events_, WebInputEvent::GetStaticTimeStampForTests() + base::TimeDelta::FromMillisecondsD(time_delta_in_milliseconds), @@ -82,6 +93,14 @@ result); } + gfx::PointF GetLastAccumulatedDelta() { + return scroll_predictor_->last_accumulated_delta_; + } + + bool GetResamplingState() { + return scroll_predictor_->should_resample_scroll_events_; + } + protected: EventWithCallback::OriginalEventList original_events_; std::unique_ptr<ScrollPredictor> scroll_predictor_; @@ -89,27 +108,50 @@ DISALLOW_COPY_AND_ASSIGN(ScrollPredictorTest); }; -TEST_F(ScrollPredictorTest, ResampleGestureScrollEvents) { - WebScopedInputEvent gesture_begin = - CreateGestureScrollEvent(WebInputEvent::kGestureScrollBegin); - HandleResampleScrollEvents(gesture_begin); +TEST_F(ScrollPredictorTest, ScrollResamplingStates) { + // initial + EXPECT_FALSE(GetResamplingState()); + // after GSB + SendGestureScrollBegin(); + EXPECT_TRUE(GetResamplingState()); + + // after GSU with no phase + WebScopedInputEvent gesture_update = + CreateGestureScrollUpdate(0, 10, 10 /* ms */); + HandleResampleScrollEvents(gesture_update, 15 /* ms */); + EXPECT_TRUE(GetResamplingState()); + + // after GSU with momentum phase + gesture_update = CreateGestureScrollUpdate(0, 10, 10 /* ms */, + WebGestureEvent::kMomentumPhase); + HandleResampleScrollEvents(gesture_update, 15 /* ms */); + EXPECT_FALSE(GetResamplingState()); + + // after GSE + WebGestureEvent gesture_end(WebInputEvent::kGestureScrollEnd, + WebInputEvent::kNoModifiers, + WebInputEvent::GetStaticTimeStampForTests(), + blink::kWebGestureDeviceTouchscreen); + WebScopedInputEvent event = WebInputEventTraits::Clone(gesture_end); + HandleResampleScrollEvents(event); + EXPECT_FALSE(GetResamplingState()); +} + +TEST_F(ScrollPredictorTest, ResampleGestureScrollEvents) { + SendGestureScrollBegin(); ui::InputPredictor::InputData result; EXPECT_FALSE(PredictionAvailable(&result)); - WebScopedInputEvent gesture_update = - CreateGestureScrollEvent(WebInputEvent::kGestureScrollUpdate, 0, -20); + WebScopedInputEvent gesture_update = CreateGestureScrollUpdate(0, -20); HandleResampleScrollEvents(gesture_update); EXPECT_EQ(-20, static_cast<const blink::WebGestureEvent*>(gesture_update.get()) ->data.scroll_update.delta_y); // Aggregated event delta doesn't change with empty predictor applied. - gesture_update = - CreateGestureScrollEvent(WebInputEvent::kGestureScrollUpdate, 0, -20); - CoalesceWith( - CreateGestureScrollEvent(WebInputEvent::kGestureScrollUpdate, 0, -40), - gesture_update); + gesture_update = CreateGestureScrollUpdate(0, -20); + CoalesceWith(CreateGestureScrollUpdate(0, -40), gesture_update); EXPECT_EQ(-60, static_cast<const blink::WebGestureEvent*>(gesture_update.get()) ->data.scroll_update.delta_y); @@ -123,13 +165,11 @@ EXPECT_EQ(-80, result.pos.y()); // Send another GSB, Prediction will be reset. - gesture_begin = CreateGestureScrollEvent(WebInputEvent::kGestureScrollBegin); - HandleResampleScrollEvents(gesture_begin); + SendGestureScrollBegin(); EXPECT_FALSE(PredictionAvailable(&result)); // Sent another GSU. - gesture_update = - CreateGestureScrollEvent(WebInputEvent::kGestureScrollUpdate, 0, -35); + gesture_update = CreateGestureScrollUpdate(0, -35); HandleResampleScrollEvents(gesture_update); EXPECT_EQ(-35, static_cast<const blink::WebGestureEvent*>(gesture_update.get()) @@ -140,15 +180,11 @@ } TEST_F(ScrollPredictorTest, ScrollInDifferentDirection) { - WebScopedInputEvent gesture_begin = - CreateGestureScrollEvent(WebInputEvent::kGestureScrollBegin); - HandleResampleScrollEvents(gesture_begin); - + SendGestureScrollBegin(); ui::InputPredictor::InputData result; // Scroll down. - WebScopedInputEvent gesture_update = - CreateGestureScrollEvent(WebInputEvent::kGestureScrollUpdate, 0, -20); + WebScopedInputEvent gesture_update = CreateGestureScrollUpdate(0, -20); HandleResampleScrollEvents(gesture_update); EXPECT_EQ(-20, static_cast<const blink::WebGestureEvent*>(gesture_update.get()) @@ -157,8 +193,7 @@ EXPECT_EQ(-20, result.pos.y()); // Scroll up. - gesture_update = - CreateGestureScrollEvent(WebInputEvent::kGestureScrollUpdate, 0, 25); + gesture_update = CreateGestureScrollUpdate(0, 25); HandleResampleScrollEvents(gesture_update); EXPECT_EQ(0, static_cast<const blink::WebGestureEvent*>(gesture_update.get()) ->data.scroll_update.delta_x); @@ -169,11 +204,8 @@ EXPECT_EQ(5, result.pos.y()); // Scroll left + right. - gesture_update = - CreateGestureScrollEvent(WebInputEvent::kGestureScrollUpdate, -35, 0); - CoalesceWith( - CreateGestureScrollEvent(WebInputEvent::kGestureScrollUpdate, 60, 0), - gesture_update); + gesture_update = CreateGestureScrollUpdate(-35, 0); + CoalesceWith(CreateGestureScrollUpdate(60, 0), gesture_update); HandleResampleScrollEvents(gesture_update); EXPECT_EQ(25, static_cast<const blink::WebGestureEvent*>(gesture_update.get()) ->data.scroll_update.delta_x); @@ -185,13 +217,10 @@ } TEST_F(ScrollPredictorTest, ScrollUpdateWithEmptyOriginalEventList) { - WebScopedInputEvent gesture_begin = - CreateGestureScrollEvent(WebInputEvent::kGestureScrollBegin); - HandleResampleScrollEvents(gesture_begin); + SendGestureScrollBegin(); // Send a GSU with empty original event list. - WebScopedInputEvent gesture_update = - CreateGestureScrollEvent(WebInputEvent::kGestureScrollUpdate, 0, -20); + WebScopedInputEvent gesture_update = CreateGestureScrollUpdate(0, -20); original_events_.clear(); HandleResampleScrollEvents(gesture_update); EXPECT_EQ(-20, @@ -203,16 +232,14 @@ EXPECT_FALSE(PredictionAvailable(&result)); // Send a GSU with original event. - gesture_update = - CreateGestureScrollEvent(WebInputEvent::kGestureScrollUpdate, 0, -30); + gesture_update = CreateGestureScrollUpdate(0, -30); HandleResampleScrollEvents(gesture_update); EXPECT_EQ(-30, static_cast<const blink::WebGestureEvent*>(gesture_update.get()) ->data.scroll_update.delta_y); // Send another GSU with empty original event list. - gesture_update = - CreateGestureScrollEvent(WebInputEvent::kGestureScrollUpdate, 0, -40); + gesture_update = CreateGestureScrollUpdate(0, -40); original_events_.clear(); HandleResampleScrollEvents(gesture_update); EXPECT_EQ(-40, @@ -226,14 +253,13 @@ TEST_F(ScrollPredictorTest, LSQPredictorTest) { SetUpLSQPredictor(); - WebScopedInputEvent gesture_begin = - CreateGestureScrollEvent(WebInputEvent::kGestureScrollBegin); - HandleResampleScrollEvents(gesture_begin); + SendGestureScrollBegin(); + ui::InputPredictor::InputData result; // Send 1st GSU, no prediction available. - WebScopedInputEvent gesture_update = CreateGestureScrollEvent( - WebInputEvent::kGestureScrollUpdate, 0, -30, 8 /* ms */); + WebScopedInputEvent gesture_update = + CreateGestureScrollUpdate(0, -30, 8 /* ms */); HandleResampleScrollEvents(gesture_update, 16 /* ms */); EXPECT_FALSE(PredictionAvailable(&result, 16 /* ms */)); EXPECT_EQ(-30, @@ -245,8 +271,7 @@ ->TimeStamp()); // Send 2nd GSU, no prediction available, event aligned at original timestamp. - gesture_update = CreateGestureScrollEvent(WebInputEvent::kGestureScrollUpdate, - 0, -30, 16 /* ms */); + gesture_update = CreateGestureScrollUpdate(0, -30, 16 /* ms */); HandleResampleScrollEvents(gesture_update, 24 /* ms */); EXPECT_EQ(-30, static_cast<const blink::WebGestureEvent*>(gesture_update.get()) @@ -259,8 +284,7 @@ // Send 3rd and 4th GSU, prediction result returns the sum of delta_y, event // aligned at frame time. - gesture_update = CreateGestureScrollEvent(WebInputEvent::kGestureScrollUpdate, - 0, -30, 24 /* ms */); + gesture_update = CreateGestureScrollUpdate(0, -30, 24 /* ms */); HandleResampleScrollEvents(gesture_update, 32 /* ms */); EXPECT_EQ(-60, static_cast<const blink::WebGestureEvent*>(gesture_update.get()) @@ -272,8 +296,7 @@ EXPECT_TRUE(PredictionAvailable(&result, 32 /* ms */)); EXPECT_EQ(-120, result.pos.y()); - gesture_update = CreateGestureScrollEvent(WebInputEvent::kGestureScrollUpdate, - 0, -30, 32 /* ms */); + gesture_update = CreateGestureScrollUpdate(0, -30, 32 /* ms */); HandleResampleScrollEvents(gesture_update, 40 /* ms */); EXPECT_EQ(-30, static_cast<const blink::WebGestureEvent*>(gesture_update.get()) @@ -286,5 +309,44 @@ EXPECT_EQ(-150, result.pos.y()); } +TEST_F(ScrollPredictorTest, ScrollPredictorNotChangeScrollDirection) { + SetUpLSQPredictor(); + SendGestureScrollBegin(); + + // Send 4 GSUs with delta_y = 10 + WebScopedInputEvent gesture_update = + CreateGestureScrollUpdate(0, 10, 10 /* ms */); + HandleResampleScrollEvents(gesture_update, 15 /* ms */); + gesture_update = CreateGestureScrollUpdate(0, 10, 20 /* ms */); + HandleResampleScrollEvents(gesture_update, 25 /* ms */); + gesture_update = CreateGestureScrollUpdate(0, 10, 30 /* ms */); + HandleResampleScrollEvents(gesture_update, 35 /* ms */); + gesture_update = CreateGestureScrollUpdate(0, 10, 40 /* ms */); + HandleResampleScrollEvents(gesture_update, 45 /* ms */); + EXPECT_NEAR(10, + static_cast<const blink::WebGestureEvent*>(gesture_update.get()) + ->data.scroll_update.delta_y, + kEpsilon); + EXPECT_NEAR(45, GetLastAccumulatedDelta().y(), kEpsilon); + + // Send a GSU with delta_y = 2. So last resampled GSU we calculated is + // overhead. No scroll back in this case. + gesture_update = CreateGestureScrollUpdate(0, 2, 50 /* ms */); + HandleResampleScrollEvents(gesture_update, 55 /* ms */); + EXPECT_EQ(0, static_cast<const blink::WebGestureEvent*>(gesture_update.get()) + ->data.scroll_update.delta_y); + EXPECT_NEAR(45, GetLastAccumulatedDelta().y(), kEpsilon); + + // Send a GSU with different scroll direction. Resampled GSU is in the new + // direction. + gesture_update = CreateGestureScrollUpdate(0, -6, 60 /* ms */); + HandleResampleScrollEvents(gesture_update, 60 /* ms */); + EXPECT_NEAR(-9, + static_cast<const blink::WebGestureEvent*>(gesture_update.get()) + ->data.scroll_update.delta_y, + kEpsilon); + EXPECT_NEAR(36, GetLastAccumulatedDelta().y(), kEpsilon); +} + } // namespace test } // namespace ui
diff --git a/ui/events/gesture_detection/gesture_provider.cc b/ui/events/gesture_detection/gesture_provider.cc index 6af37b3..ad21fe07 100644 --- a/ui/events/gesture_detection/gesture_provider.cc +++ b/ui/events/gesture_detection/gesture_provider.cc
@@ -567,18 +567,12 @@ GestureEventData CreateGesture(const GestureEventDetails& details, const MotionEvent& event) const { - return GestureEventData(details, - event.GetPointerId(), - event.GetToolType(), - event.GetEventTime(), - event.GetX(), - event.GetY(), - event.GetRawX(), - event.GetRawY(), + return GestureEventData(details, event.GetPointerId(), event.GetToolType(), + event.GetEventTime(), event.GetX(), event.GetY(), + event.GetRawX(), event.GetRawY(), event.GetPointerCount(), GetBoundingBox(event, details.type()), - event.GetFlags(), - 0U); + event.GetFlags(), event.GetUniqueEventId()); } GestureEventData CreateGesture(EventType type,
diff --git a/ui/events/keycodes/keyboard_code_conversion_x.cc b/ui/events/keycodes/keyboard_code_conversion_x.cc index 34c5ff8..b1e1e3f 100644 --- a/ui/events/keycodes/keyboard_code_conversion_x.cc +++ b/ui/events/keycodes/keyboard_code_conversion_x.cc
@@ -824,7 +824,7 @@ case XK_Select: return VKEY_SELECT; case XK_Print: - return VKEY_PRINT; + return VKEY_SNAPSHOT; case XK_Execute: return VKEY_EXECUTE; case XK_Insert: @@ -1119,7 +1119,7 @@ VKEY_RETURN, // 0x68: KEY_KPENTER KP_Enter VKEY_RCONTROL, // 0x69: KEY_RIGHTCTRL Control_R VKEY_DIVIDE, // 0x6A: KEY_KPSLASH KP_Divide - VKEY_PRINT, // 0x6B: KEY_SYSRQ Print + VKEY_SNAPSHOT, // 0x6B: KEY_SYSRQ Print VKEY_RMENU, // 0x6C: KEY_RIGHTALT Alt_R VKEY_RETURN, // 0x6D: KEY_LINEFEED Linefeed VKEY_HOME, // 0x6E: KEY_HOME Home
diff --git a/ui/events/keycodes/keyboard_codes_posix.h b/ui/events/keycodes/keyboard_codes_posix.h index 3c35b1f..81cfb31 100644 --- a/ui/events/keycodes/keyboard_codes_posix.h +++ b/ui/events/keycodes/keyboard_codes_posix.h
@@ -68,7 +68,7 @@ VKEY_SELECT = 0x29, VKEY_PRINT = 0x2A, VKEY_EXECUTE = 0x2B, - VKEY_SNAPSHOT = 0x2C, + VKEY_SNAPSHOT = 0x2C, // Print Screen / SysRq VKEY_INSERT = 0x2D, VKEY_DELETE = 0x2E, VKEY_HELP = 0x2F,
diff --git a/ui/file_manager/file_manager/foreground/js/actions_model_unittest.html b/ui/file_manager/file_manager/foreground/js/actions_model_unittest.html index 590470f..b1adba13 100644 --- a/ui/file_manager/file_manager/foreground/js/actions_model_unittest.html +++ b/ui/file_manager/file_manager/foreground/js/actions_model_unittest.html
@@ -10,6 +10,8 @@ <script src="../../../../../ui/webui/resources/js/cr/ui/array_data_model.js"></script> <script src="../../../../../ui/webui/resources/js/load_time_data.js"></script> +<script src="../../foreground/js/metadata/mock_metadata.js"></script> + <script src="../../common/js/mock_entry.js"></script> <script src="../../common/js/unittest_util.js"></script> <script src="../../common/js/util.js"></script>
diff --git a/ui/file_manager/file_manager/foreground/js/actions_model_unittest.js b/ui/file_manager/file_manager/foreground/js/actions_model_unittest.js index 9e2b64c..afc947bf 100644 --- a/ui/file_manager/file_manager/foreground/js/actions_model_unittest.js +++ b/ui/file_manager/file_manager/foreground/js/actions_model_unittest.js
@@ -15,21 +15,6 @@ DOWNLOADS_DIRECTORY_LABEL: '' }; -function MockMetadataModel() { - this.properties = null; -} - -MockMetadataModel.prototype.get = function() { - return Promise.resolve([this.properties]); -}; - -MockMetadataModel.prototype.getCache = function() { - return [this.properties]; -}; - -MockMetadataModel.prototype.notifyEntriesChanged = function() { -}; - function MockFolderShortcutsModel() { this.has = false; } @@ -93,7 +78,7 @@ providedFileSystem = volumeManager.getCurrentProfileVolumeInfo( VolumeManagerCommon.VolumeType.PROVIDED).fileSystem; - metadataModel = new MockMetadataModel(); + metadataModel = new MockMetadataModel(null); shortcutsModel = new MockFolderShortcutsModel(); driveSyncHandler = new MockDriveSyncHandler(); ui = new MockUI();
diff --git a/ui/file_manager/file_manager/foreground/js/metadata/BUILD.gn b/ui/file_manager/file_manager/foreground/js/metadata/BUILD.gn index c2c63bc..4269da7 100644 --- a/ui/file_manager/file_manager/foreground/js/metadata/BUILD.gn +++ b/ui/file_manager/file_manager/foreground/js/metadata/BUILD.gn
@@ -168,6 +168,12 @@ js_library("metadata_request") { } +js_library("mock_metadata") { + deps = [ + ":metadata_model", + ] +} + js_library("mpeg_parser") { deps = [ ":metadata_parser",
diff --git a/ui/file_manager/file_manager/foreground/js/metadata/mock_metadata.js b/ui/file_manager/file_manager/foreground/js/metadata/mock_metadata.js new file mode 100644 index 0000000..d5d14b6 --- /dev/null +++ b/ui/file_manager/file_manager/foreground/js/metadata/mock_metadata.js
@@ -0,0 +1,32 @@ +// 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. + +/** + * Returns a mock of metadata model. + * + * @constructor + * @extends {MetadataModel} + * @param {Object} initial_properties + */ +function MockMetadataModel(initial_properties) { + /** + * Dummy properties, which can be overwritten by a test. + * @public {Object} + * @const + */ + this.properties = initial_properties; +} + +/** @override */ +MockMetadataModel.prototype.get = function() { + return Promise.resolve([this.properties]); +}; + +/** @override */ +MockMetadataModel.prototype.getCache = function() { + return [this.properties]; +}; + +/** @override */ +MockMetadataModel.prototype.notifyEntriesChanged = function() {};
diff --git a/ui/file_manager/file_manager/foreground/js/task_controller_unittest.html b/ui/file_manager/file_manager/foreground/js/task_controller_unittest.html index aaf52f2..9257ce73 100644 --- a/ui/file_manager/file_manager/foreground/js/task_controller_unittest.html +++ b/ui/file_manager/file_manager/foreground/js/task_controller_unittest.html
@@ -12,6 +12,9 @@ <script src="../../../../../ui/webui/resources/js/cr/event_target.js"></script> <script src="../../../../../ui/webui/resources/js/cr/ui.js"></script> <script src="../../../../../ui/webui/resources/js/cr/ui/command.js"></script> + +<script src="../../foreground/js/metadata/mock_metadata.js"></script> + <script src="../../common/js/file_type.js"></script> <script src="../../common/js/mock_entry.js"></script> <script src="../../common/js/unittest_util.js"></script>
diff --git a/ui/file_manager/file_manager/foreground/js/task_controller_unittest.js b/ui/file_manager/file_manager/foreground/js/task_controller_unittest.js index 14b1d7fc..5fbac07 100644 --- a/ui/file_manager/file_manager/foreground/js/task_controller_unittest.js +++ b/ui/file_manager/file_manager/foreground/js/task_controller_unittest.js
@@ -6,14 +6,6 @@ recordEnum: function() {} }; -function MockMetadataModel(properties) { - this.properties_ = properties; -} - -MockMetadataModel.prototype.get = function() { - return Promise.resolve([this.properties_]); -}; - function setUp() { // Behavior of window.chrome depends on each test case. window.chrome should // be initialized properly inside each test function.
diff --git a/ui/file_manager/gallery/js/BUILD.gn b/ui/file_manager/gallery/js/BUILD.gn index 9edf7a2..6d7dcb1 100644 --- a/ui/file_manager/gallery/js/BUILD.gn +++ b/ui/file_manager/gallery/js/BUILD.gn
@@ -92,6 +92,14 @@ ] } +js_library("gallery_data_model_unittest") { + deps = [ + ":gallery_data_model", + ":mock_gallery_item", + "../../file_manager/common/js:unittest_util", + ] +} + js_library("gallery_item") { deps = [ ":gallery_util", @@ -127,6 +135,14 @@ js_library("metadata_worker") { } +js_library("mock_gallery_item") { + deps = [ + ":gallery_item", + "../../file_manager/common/js:mock_entry", + "../../file_manager/foreground/js/metadata:mock_metadata", + ] +} + js_library("ribbon") { deps = [ ":gallery_data_model", @@ -182,6 +198,7 @@ js_unit_tests("unit_tests") { deps = [ ":dimmable_ui_controller_unittest", + ":gallery_data_model_unittest", ":gallery_util_unittest", ":ribbon_unittest", ]
diff --git a/ui/file_manager/gallery/js/gallery_data_model_unittest.html b/ui/file_manager/gallery/js/gallery_data_model_unittest.html deleted file mode 100644 index 827bfb4e..0000000 --- a/ui/file_manager/gallery/js/gallery_data_model_unittest.html +++ /dev/null
@@ -1,22 +0,0 @@ -<!DOCTYPE html> -<!-- 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. - --> -<script> -// Define mock Gallery class to define GalleryItem class. -var Gallery = function() {}; -</script> - -<script src="../../../webui/resources/js/assert.js"></script> -<script src="../../../webui/resources/js/cr.js"></script> -<script src="../../../webui/resources/js/cr/event_target.js"></script> -<script src="../../../webui/resources/js/cr/ui/array_data_model.js"></script> -<script src="../../file_manager/common/js/mock_entry.js"></script> -<script src="../../file_manager/common/js/unittest_util.js"></script> -<script src="../../file_manager/common/js/util.js"></script> -<script src="entry_list_watcher.js"></script> -<script src="gallery_data_model.js"></script> -<script src="gallery_item.js"></script> - -<script src="gallery_data_model_unittest.js"></script>
diff --git a/ui/file_manager/gallery/js/gallery_data_model_unittest.js b/ui/file_manager/gallery/js/gallery_data_model_unittest.js index ffd7966c..0a1995d 100644 --- a/ui/file_manager/gallery/js/gallery_data_model_unittest.js +++ b/ui/file_manager/gallery/js/gallery_data_model_unittest.js
@@ -6,37 +6,20 @@ var fileSystem; var item; -/** - * Mock thumbnail model. - */ -function ThumbnailModel() { -} - -ThumbnailModel.prototype.get = function(entries) { - return Promise.resolve(entries.map(function() { - return {}; - })); -}; - function setUp() { - model = new GalleryDataModel( - /* Mock MetadataModel */{ - get: function() { - return Promise.resolve([{}]); - } - }, - /* Mock EntryListWatcher */{}); + // Avoid creating the default EntryListWatcher, since it needs access to + // fileManagerPrivate, which is not in the unit test environment. + let mockEntryListWatcher = /** @type{!EntryListWatcher} */ ({}); + model = new GalleryDataModel(new MockMetadataModel({}), mockEntryListWatcher); + fileSystem = new MockFileSystem('volumeId'); model.fallbackSaveDirectory = fileSystem.root; } function testSaveItemOverwrite(callback) { - var item = new GalleryItem( - new MockEntry(fileSystem, '/test.jpg'), - null, - /* metadataItem */ {}, - /* thumbnailMetadataItem */ {}, - /* original */ true); + var item = new MockGalleryItem( + new MockFileEntry(fileSystem, '/test.jpg'), null, {}, null, + false /* isOriginal */); // Mocking the saveToFile method. item.saveToFile = function( @@ -57,15 +40,13 @@ } function testSaveItemToNewFile(callback) { - var item = new GalleryItem( - new MockEntry(fileSystem, '/test.webp'), - null, - /* metadataItem */ {}, - /* thumbnailMetadataItem */ {}, - /* original */ true); + var item = new MockGalleryItem( + new MockFileEntry(fileSystem, '/test.webp'), null, {}, null, + true /* isOriginal */); // Mocking the saveToFile method. In this case, Gallery saves to a new file // since it cannot overwrite to webp image file. + /** @suppress {accessControls} */ item.saveToFile = function( volumeManager, metadataModel, @@ -74,8 +55,8 @@ overwrite, callback) { // Gallery item track new file. - this.entry_ = new MockEntry(fileSystem, '/test (1).png'); - this.original_ = false; + item.entry_ = new MockFileEntry(fileSystem, '/test (1).png'); + item.original_ = false; callback(true); }; model.push(item);
diff --git a/ui/file_manager/gallery/js/gallery_item_unittest.html b/ui/file_manager/gallery/js/gallery_item_unittest.html index 21b04aee..f89d886 100644 --- a/ui/file_manager/gallery/js/gallery_item_unittest.html +++ b/ui/file_manager/gallery/js/gallery_item_unittest.html
@@ -20,6 +20,7 @@ <script src="../../file_manager/common/js/unittest_util.js"></script> <script src="../../file_manager/common/js/util.js"></script> <script src="../../file_manager/foreground/js/metadata/thumbnail_model.js"></script> +<script src="../../file_manager/foreground/js/metadata/mock_metadata.js"></script> <script src="gallery_item.js"></script> <script src="gallery_util.js"></script>
diff --git a/ui/file_manager/gallery/js/gallery_item_unittest.js b/ui/file_manager/gallery/js/gallery_item_unittest.js index b27e94e..fc82a8b 100644 --- a/ui/file_manager/gallery/js/gallery_item_unittest.js +++ b/ui/file_manager/gallery/js/gallery_item_unittest.js
@@ -35,21 +35,8 @@ }; } -/** - * Returns a mock of metadata model. - * @private - * @return {!MetadataModel} - */ function getMockMetadataModel() { - return { - get: function(entries, names) { - return Promise.resolve([ - {size: 200} - ]); - }, - notifyEntriesChanged: function() { - } - }; + return new MockMetadataModel({size: 200}); } /**
diff --git a/ui/file_manager/gallery/js/image_editor/BUILD.gn b/ui/file_manager/gallery/js/image_editor/BUILD.gn index 0982f7c..86440b6 100644 --- a/ui/file_manager/gallery/js/image_editor/BUILD.gn +++ b/ui/file_manager/gallery/js/image_editor/BUILD.gn
@@ -182,7 +182,7 @@ js_library("image_view_unittest") { deps = [ ":image_view", - "../../../file_manager/common/js:mock_entry", + "..:mock_gallery_item", "//ui/webui/resources/js:webui_resource_test", ] }
diff --git a/ui/file_manager/gallery/js/image_editor/image_view_unittest.js b/ui/file_manager/gallery/js/image_editor/image_view_unittest.js index a2f889e..d42385fe 100644 --- a/ui/file_manager/gallery/js/image_editor/image_view_unittest.js +++ b/ui/file_manager/gallery/js/image_editor/image_view_unittest.js
@@ -2,30 +2,6 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -/** - * Helper to construct testing GalleryItem objects. - * - * @param {!FileEntry} entry - * @param {EntryLocation} locationInfo - * @param {Object} metadataItem - * @param {ThumbnailMetadataItem=} opt_thumbnailMetadataItem - * @param {boolean=} opt_original Whether the entry is original or edited. - * @constructor - * @extends GalleryItem - */ -function MockGalleryItem( - entry, locationInfo, metadataItem, opt_thumbnailMetadataItem, - opt_original) { - let entryLocation = locationInfo || /** @type {!EntryLocation} */ ({}); - GalleryItem.call( - this, entry, entryLocation, /** @type {MetadataItem} */ (metadataItem), - opt_thumbnailMetadataItem || null, opt_original || false); -} - -MockGalleryItem.prototype = { - __proto__: GalleryItem.prototype -}; - function testImageView() { var mockFileSystem = new MockFileSystem('volumeId'); var mockEntry = new MockFileEntry(mockFileSystem, '/test.jpg');
diff --git a/ui/file_manager/gallery/js/mock_gallery_item.js b/ui/file_manager/gallery/js/mock_gallery_item.js new file mode 100644 index 0000000..954f347c --- /dev/null +++ b/ui/file_manager/gallery/js/mock_gallery_item.js
@@ -0,0 +1,27 @@ +// 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. + +/** + * Helper to construct testing GalleryItem objects. + * + * @param {!FileEntry} entry + * @param {EntryLocation} locationInfo + * @param {Object} metadataItem + * @param {ThumbnailMetadataItem=} opt_thumbnailMetadataItem + * @param {boolean=} opt_original Whether the entry is original or edited. + * @constructor + * @extends GalleryItem + */ +function MockGalleryItem( + entry, locationInfo, metadataItem, opt_thumbnailMetadataItem, + opt_original) { + let entryLocation = locationInfo || /** @type {!EntryLocation} */ ({}); + GalleryItem.call( + this, entry, entryLocation, /** @type {MetadataItem} */ (metadataItem), + opt_thumbnailMetadataItem || null, opt_original || false); +} + +MockGalleryItem.prototype = { + __proto__: GalleryItem.prototype +};
diff --git a/ui/file_manager/integration_tests/file_manager/keyboard_operations.js b/ui/file_manager/integration_tests/file_manager/keyboard_operations.js index 216afca..5550d15 100644 --- a/ui/file_manager/integration_tests/file_manager/keyboard_operations.js +++ b/ui/file_manager/integration_tests/file_manager/keyboard_operations.js
@@ -5,22 +5,23 @@ 'use strict'; /** - * Waits until a dialog with an OK button is shown and accepts it. + * Waits until a dialog with an OK button is shown, and accepts it by clicking + * on the dialog's OK button. * - * @param {string} windowId Target window ID. - * @return {Promise} Promise to be fulfilled after clicking the OK button in the - * dialog. + * @param {string} windowId Window ID. + * @return {Promise} Promise to be fulfilled after clicking the OK button. */ function waitAndAcceptDialog(windowId) { - return remoteCall.waitForElement(windowId, '.cr-dialog-ok'). - then(remoteCall.callRemoteTestUtil.bind(remoteCall, - 'fakeMouseClick', - windowId, - ['.cr-dialog-ok'], - null)). - then(function(result) { - chrome.test.assertTrue(result); - return remoteCall.waitForElementLost(windowId, '.cr-dialog-container'); + const dialogButton = '.cr-dialog-ok'; + return remoteCall.waitForElement(windowId, dialogButton) + .then(function() { + return remoteCall.callRemoteTestUtil( + 'fakeMouseClick', windowId, [dialogButton]); + }) + .then(function(result) { + chrome.test.assertTrue(!!result, 'fakeMouseClick failed'); + const dialog = '.cr-dialog-container'; + return remoteCall.waitForElementLost(windowId, dialog); }); }
diff --git a/ui/gfx/win/hwnd_util.cc b/ui/gfx/win/hwnd_util.cc index 32ee201..1b42ccb 100644 --- a/ui/gfx/win/hwnd_util.cc +++ b/ui/gfx/win/hwnd_util.cc
@@ -49,24 +49,21 @@ SWP_NOACTIVATE | SWP_NOZORDER); } -// Turn off optimizations for these functions so they show up in crash reports. -MSVC_DISABLE_OPTIMIZE(); +// Don't inline these functions so they show up in crash reports. -void CrashOutOfMemory() { +NOINLINE void CrashOutOfMemory() { PLOG(FATAL); } -void CrashAccessDenied() { +NOINLINE void CrashAccessDenied() { PLOG(FATAL); } // Crash isn't one of the ones we commonly see. -void CrashOther() { +NOINLINE void CrashOther() { PLOG(FATAL); } -MSVC_ENABLE_OPTIMIZE(); - } // namespace base::string16 GetClassName(HWND window) {
diff --git a/ui/gl/BUILD.gn b/ui/gl/BUILD.gn index 8a1dcb0..904a597f 100644 --- a/ui/gl/BUILD.gn +++ b/ui/gl/BUILD.gn
@@ -64,8 +64,6 @@ "gl_bindings.h", "gl_bindings_autogen_gl.cc", "gl_bindings_autogen_gl.h", - "gl_bindings_autogen_osmesa.cc", - "gl_bindings_autogen_osmesa.h", "gl_context.cc", "gl_context.h", "gl_context_stub.cc", @@ -96,8 +94,6 @@ "gl_image_stub.h", "gl_implementation.cc", "gl_implementation.h", - "gl_osmesa_api_implementation.cc", - "gl_osmesa_api_implementation.h", "gl_share_group.cc", "gl_share_group.h", "gl_state_restorer.cc", @@ -141,7 +137,7 @@ configs += [ "//build/config:precompiled_headers" ] defines = [ "GL_IMPLEMENTATION" ] - include_dirs = [ "//third_party/mesa/src/include" ] + include_dirs = [ "//third_party/mesa_headers" ] all_dependent_configs = [ ":gl_config" ] @@ -155,16 +151,13 @@ "//third_party/angle:includes", ] public_deps = [ - ":osmesa_sources", "//base", - "//third_party/mesa:mesa_headers", + "//third_party/mesa_headers", "//ui/events/platform", "//ui/gfx", "//ui/gfx/geometry", ] - allow_circular_includes_from = [ ":osmesa_sources" ] - data_deps = [] if (enable_swiftshader) { data_deps += [ "//third_party/swiftshader" ] @@ -228,21 +221,12 @@ ] } - # TODO(camurcu): Windows/Ozone uses OSMesa for now. Will be updated. - if (is_android || is_linux || is_fuchsia || (is_win && use_ozone)) { - sources += [ - "gl_implementation_osmesa.cc", - "gl_implementation_osmesa.h", - ] - } if (use_x11) { sources += [ "gl_surface_egl_x11.cc", "gl_surface_egl_x11.h", "gl_surface_glx_x11.cc", "gl_surface_glx_x11.h", - "gl_surface_osmesa_x11.cc", - "gl_surface_osmesa_x11.h", ] deps += [ "//ui/base/x" ] @@ -287,8 +271,6 @@ "gl_context_wgl.h", "gl_image_dxgi.cc", "gl_image_dxgi.h", - "gl_surface_osmesa_win.cc", - "gl_surface_osmesa_win.h", "gl_surface_wgl.cc", "gl_surface_wgl.h", "gl_wgl_api_implementation.cc", @@ -304,7 +286,6 @@ data_deps += [ "//third_party/angle:libEGL", "//third_party/angle:libGLESv2", - "//third_party/mesa:osmesa", "//third_party/swiftshader", ] } @@ -336,6 +317,7 @@ data_deps += [ "//third_party/angle:libEGL", "//third_party/angle:libGLESv2", + "//third_party/mesa_headers", "//third_party/swiftshader", ] } @@ -392,33 +374,6 @@ } } -# OSMesaContext, OSMesaCreateContext and other functions are declared -# and defined in for instance gl/gl_bindings.h and -# gl/gl_bindings_autogen_osmesa.cc. They are also declared slightly -# differently in the real mesa headers in <GL/osmesa.h>. This target -# is for code that uses the real OSMesa API and can't be combined with -# code that uses the wrapper API. -source_set("osmesa_sources") { - # Only a helper build target. Not to be used outside this file. - visibility = [ ":gl" ] - - sources = [ - "gl_context_osmesa.cc", - "gl_context_osmesa.h", - "gl_surface_osmesa.cc", - "gl_surface_osmesa.h", - ] - - deps = [ - "//third_party/mesa:mesa_headers", - "//ui/gfx", - ] - - defines = [ "GL_IMPLEMENTATION" ] - - configs += [ "//third_party/khronos:khronos_headers" ] -} - static_library("gl_unittest_utils") { testonly = true sources = [ @@ -568,7 +523,7 @@ ] data_deps = [ - "//third_party/mesa:osmesa", + "//third_party/mesa_headers", ] if (use_x11) {
diff --git a/ui/gl/DEPS b/ui/gl/DEPS index d80234fc..886b76d 100644 --- a/ui/gl/DEPS +++ b/ui/gl/DEPS
@@ -8,17 +8,6 @@ ] specific_include_rules = { -# gl_surface_osmesa.cc and gl_context_osmesa.cc are the only files -# that should use the osmesa.h header. Everything else should use the -# GLES2 headers from third_party/khronos/ or use gl_bindings.h to get -# access to desktop OpenGL. - "gl_surface_osmesa.cc": [ - "+third_party/mesa/src/include/GL/osmesa.h", - ], - "gl_context_osmesa.cc": [ - "+third_party/mesa/src/include/GL/osmesa.h", - ], - # Allow us to include ANGLE's base platform implementation. "angle_platform_impl.cc": [ "+third_party/angle/include/platform/Platform.h",
diff --git a/ui/gl/generate_bindings.py b/ui/gl/generate_bindings.py index a2cebf1a..e1ae48e 100755 --- a/ui/gl/generate_bindings.py +++ b/ui/gl/generate_bindings.py
@@ -16,7 +16,7 @@ HEADER_PATHS = [ '../../third_party/khronos', - '../../third_party/mesa/src/include', + '../../third_party/mesa_headers', '.', '../../gpu', ] @@ -2110,51 +2110,6 @@ 'arguments': 'GLenum mode, GLsizei n, const GLint* box', }, ] -OSMESA_FUNCTIONS = [ -{ 'return_type': 'void', - 'names': ['OSMesaColorClamp'], - 'arguments': 'GLboolean enable', }, -{ 'return_type': 'OSMesaContext', - 'names': ['OSMesaCreateContext'], - 'arguments': 'GLenum format, OSMesaContext sharelist', }, -{ 'return_type': 'OSMesaContext', - 'names': ['OSMesaCreateContextExt'], - 'arguments': - 'GLenum format, GLint depthBits, GLint stencilBits, GLint accumBits, ' - 'OSMesaContext sharelist', }, -{ 'return_type': 'void', - 'names': ['OSMesaDestroyContext'], - 'arguments': 'OSMesaContext ctx', }, -{ 'return_type': 'GLboolean', - 'names': ['OSMesaGetColorBuffer'], - 'arguments': 'OSMesaContext c, GLint* width, GLint* height, GLint* format, ' - 'void** buffer', }, -{ 'return_type': 'OSMesaContext', - 'names': ['OSMesaGetCurrentContext'], - 'arguments': 'void', }, -{ 'return_type': 'GLboolean', - 'names': ['OSMesaGetDepthBuffer'], - 'arguments': - 'OSMesaContext c, GLint* width, GLint* height, GLint* bytesPerValue, ' - 'void** buffer', }, -{ 'return_type': 'void', - 'names': ['OSMesaGetIntegerv'], - 'arguments': 'GLint pname, GLint* value', }, -{ 'return_type': 'OSMESAproc', - 'names': ['OSMesaGetProcAddress'], - 'arguments': 'const char* funcName', - 'logging_code': """ - GL_SERVICE_LOG("GL_RESULT: " << reinterpret_cast<void*>(result)); -""", }, -{ 'return_type': 'GLboolean', - 'names': ['OSMesaMakeCurrent'], - 'arguments': 'OSMesaContext ctx, void* buffer, GLenum type, GLsizei width, ' - 'GLsizei height', }, -{ 'return_type': 'void', - 'names': ['OSMesaPixelStore'], - 'arguments': 'GLint pname, GLint value', }, -] - EGL_FUNCTIONS = [ { 'return_type': 'EGLBoolean', 'names': ['eglBindAPI'], @@ -2740,7 +2695,6 @@ "GL_EXT_unpack_subimage", ] ], - [OSMESA_FUNCTIONS, 'osmesa', [], []], [EGL_FUNCTIONS, 'egl', [ 'EGL/eglext.h', # Files below are Chromium-specific and shipped with Chromium sources.
diff --git a/ui/gl/gl_bindings.cc b/ui/gl/gl_bindings.cc index 52e4515..d62e012 100644 --- a/ui/gl/gl_bindings.cc +++ b/ui/gl/gl_bindings.cc
@@ -28,10 +28,6 @@ namespace gl { -std::string DriverOSMESA::GetPlatformExtensions() { - return ""; -} - #if defined(OS_WIN) std::string DriverWGL::GetPlatformExtensions() { const char* str = nullptr;
diff --git a/ui/gl/gl_bindings.h b/ui/gl/gl_bindings.h index 01e1b16..429d277d 100644 --- a/ui/gl/gl_bindings.h +++ b/ui/gl/gl_bindings.h
@@ -376,11 +376,9 @@ #define GL_RG8_EXT 0x822B #endif /* GL_EXT_texture_rg */ -// This is from NV_path_rendering, but the Mesa GL header is not up to date with -// the most recent -// version of the extension. This definition could be removed once glext.h -// r27498 or later is -// imported. +// This is from NV_path_rendering, but the GL header is not up to date with the +// most recent version of the extension. This definition could be removed once +// glext.h r27498 or later is imported. #ifndef GL_FRAGMENT_INPUT_NV #define GL_FRAGMENT_INPUT_NV 0x936D #endif @@ -436,15 +434,10 @@ #define GL_MAX_VIEWS_OVR 0x9631 #define GL_FRAMEBUFFER_INCOMPLETE_VIEW_TARGETS_OVR 0x9633 -// Forward declare OSMesa types. -typedef struct osmesa_context *OSMesaContext; -typedef void (*OSMESAproc)(); - // Forward declare EGL types. typedef uint64_t EGLuint64CHROMIUM; #include "gl_bindings_autogen_gl.h" -#include "gl_bindings_autogen_osmesa.h" #if defined(USE_EGL) #include "gl_bindings_autogen_egl.h" @@ -483,18 +476,6 @@ const GLVersionInfo* Version = nullptr; }; -struct GL_EXPORT DriverOSMESA { - void InitializeStaticBindings(); - void InitializeExtensionBindings(); - void ClearBindings(); - - ProcsOSMESA fn; - ExtensionsOSMESA ext; - - private: - static std::string GetPlatformExtensions(); -}; - #if defined(OS_WIN) struct GL_EXPORT DriverWGL { void InitializeStaticBindings(); @@ -545,9 +526,6 @@ #define g_current_gl_version g_current_gl_context_tls->Get()->Version GL_EXPORT extern base::ThreadLocalPointer<CurrentGL>* g_current_gl_context_tls; -GL_EXPORT extern OSMESAApi* g_current_osmesa_context; -GL_EXPORT extern DriverOSMESA g_driver_osmesa; - #if defined(USE_EGL) GL_EXPORT extern EGLApi* g_current_egl_context; GL_EXPORT extern DriverEGL g_driver_egl;
diff --git a/ui/gl/gl_bindings_api_autogen_osmesa.h b/ui/gl/gl_bindings_api_autogen_osmesa.h deleted file mode 100644 index be97f2f..0000000 --- a/ui/gl/gl_bindings_api_autogen_osmesa.h +++ /dev/null
@@ -1,42 +0,0 @@ -// Copyright 2016 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. -// -// This file is auto-generated from -// ui/gl/generate_bindings.py -// It's formatted by clang-format using chromium coding style: -// clang-format -i -style=chromium filename -// DO NOT EDIT! - -// The following line silences a presubmit warning that would otherwise be -// triggered by this: -// no-include-guard-because-multiply-included - -void OSMesaColorClampFn(GLboolean enable) override; -OSMesaContext OSMesaCreateContextFn(GLenum format, - OSMesaContext sharelist) override; -OSMesaContext OSMesaCreateContextExtFn(GLenum format, - GLint depthBits, - GLint stencilBits, - GLint accumBits, - OSMesaContext sharelist) override; -void OSMesaDestroyContextFn(OSMesaContext ctx) override; -GLboolean OSMesaGetColorBufferFn(OSMesaContext c, - GLint* width, - GLint* height, - GLint* format, - void** buffer) override; -OSMesaContext OSMesaGetCurrentContextFn(void) override; -GLboolean OSMesaGetDepthBufferFn(OSMesaContext c, - GLint* width, - GLint* height, - GLint* bytesPerValue, - void** buffer) override; -void OSMesaGetIntegervFn(GLint pname, GLint* value) override; -OSMESAproc OSMesaGetProcAddressFn(const char* funcName) override; -GLboolean OSMesaMakeCurrentFn(OSMesaContext ctx, - void* buffer, - GLenum type, - GLsizei width, - GLsizei height) override; -void OSMesaPixelStoreFn(GLint pname, GLint value) override;
diff --git a/ui/gl/gl_bindings_autogen_osmesa.cc b/ui/gl/gl_bindings_autogen_osmesa.cc deleted file mode 100644 index aefcf12..0000000 --- a/ui/gl/gl_bindings_autogen_osmesa.cc +++ /dev/null
@@ -1,319 +0,0 @@ -// Copyright 2016 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. -// -// This file is auto-generated from -// ui/gl/generate_bindings.py -// It's formatted by clang-format using chromium coding style: -// clang-format -i -style=chromium filename -// DO NOT EDIT! - -#include <string> - -#include "base/trace_event/trace_event.h" -#include "ui/gl/gl_bindings.h" -#include "ui/gl/gl_context.h" -#include "ui/gl/gl_enums.h" -#include "ui/gl/gl_implementation.h" -#include "ui/gl/gl_osmesa_api_implementation.h" -#include "ui/gl/gl_version_info.h" - -namespace gl { - -DriverOSMESA g_driver_osmesa; // Exists in .bss - -void DriverOSMESA::InitializeStaticBindings() { - // Ensure struct has been zero-initialized. - char* this_bytes = reinterpret_cast<char*>(this); - DCHECK(this_bytes[0] == 0); - DCHECK(memcmp(this_bytes, this_bytes + 1, sizeof(*this) - 1) == 0); - - fn.OSMesaColorClampFn = reinterpret_cast<OSMesaColorClampProc>( - GetGLProcAddress("OSMesaColorClamp")); - fn.OSMesaCreateContextFn = reinterpret_cast<OSMesaCreateContextProc>( - GetGLProcAddress("OSMesaCreateContext")); - fn.OSMesaCreateContextExtFn = reinterpret_cast<OSMesaCreateContextExtProc>( - GetGLProcAddress("OSMesaCreateContextExt")); - fn.OSMesaDestroyContextFn = reinterpret_cast<OSMesaDestroyContextProc>( - GetGLProcAddress("OSMesaDestroyContext")); - fn.OSMesaGetColorBufferFn = reinterpret_cast<OSMesaGetColorBufferProc>( - GetGLProcAddress("OSMesaGetColorBuffer")); - fn.OSMesaGetCurrentContextFn = reinterpret_cast<OSMesaGetCurrentContextProc>( - GetGLProcAddress("OSMesaGetCurrentContext")); - fn.OSMesaGetDepthBufferFn = reinterpret_cast<OSMesaGetDepthBufferProc>( - GetGLProcAddress("OSMesaGetDepthBuffer")); - fn.OSMesaGetIntegervFn = reinterpret_cast<OSMesaGetIntegervProc>( - GetGLProcAddress("OSMesaGetIntegerv")); - fn.OSMesaGetProcAddressFn = reinterpret_cast<OSMesaGetProcAddressProc>( - GetGLProcAddress("OSMesaGetProcAddress")); - fn.OSMesaMakeCurrentFn = reinterpret_cast<OSMesaMakeCurrentProc>( - GetGLProcAddress("OSMesaMakeCurrent")); - fn.OSMesaPixelStoreFn = reinterpret_cast<OSMesaPixelStoreProc>( - GetGLProcAddress("OSMesaPixelStore")); -} - -void DriverOSMESA::InitializeExtensionBindings() { - std::string platform_extensions(GetPlatformExtensions()); - gfx::ExtensionSet extensions(gfx::MakeExtensionSet(platform_extensions)); - ALLOW_UNUSED_LOCAL(extensions); -} - -void DriverOSMESA::ClearBindings() { - memset(this, 0, sizeof(*this)); -} - -void OSMESAApiBase::OSMesaColorClampFn(GLboolean enable) { - driver_->fn.OSMesaColorClampFn(enable); -} - -OSMesaContext OSMESAApiBase::OSMesaCreateContextFn(GLenum format, - OSMesaContext sharelist) { - return driver_->fn.OSMesaCreateContextFn(format, sharelist); -} - -OSMesaContext OSMESAApiBase::OSMesaCreateContextExtFn(GLenum format, - GLint depthBits, - GLint stencilBits, - GLint accumBits, - OSMesaContext sharelist) { - return driver_->fn.OSMesaCreateContextExtFn(format, depthBits, stencilBits, - accumBits, sharelist); -} - -void OSMESAApiBase::OSMesaDestroyContextFn(OSMesaContext ctx) { - driver_->fn.OSMesaDestroyContextFn(ctx); -} - -GLboolean OSMESAApiBase::OSMesaGetColorBufferFn(OSMesaContext c, - GLint* width, - GLint* height, - GLint* format, - void** buffer) { - return driver_->fn.OSMesaGetColorBufferFn(c, width, height, format, buffer); -} - -OSMesaContext OSMESAApiBase::OSMesaGetCurrentContextFn(void) { - return driver_->fn.OSMesaGetCurrentContextFn(); -} - -GLboolean OSMESAApiBase::OSMesaGetDepthBufferFn(OSMesaContext c, - GLint* width, - GLint* height, - GLint* bytesPerValue, - void** buffer) { - return driver_->fn.OSMesaGetDepthBufferFn(c, width, height, bytesPerValue, - buffer); -} - -void OSMESAApiBase::OSMesaGetIntegervFn(GLint pname, GLint* value) { - driver_->fn.OSMesaGetIntegervFn(pname, value); -} - -OSMESAproc OSMESAApiBase::OSMesaGetProcAddressFn(const char* funcName) { - return driver_->fn.OSMesaGetProcAddressFn(funcName); -} - -GLboolean OSMESAApiBase::OSMesaMakeCurrentFn(OSMesaContext ctx, - void* buffer, - GLenum type, - GLsizei width, - GLsizei height) { - return driver_->fn.OSMesaMakeCurrentFn(ctx, buffer, type, width, height); -} - -void OSMESAApiBase::OSMesaPixelStoreFn(GLint pname, GLint value) { - driver_->fn.OSMesaPixelStoreFn(pname, value); -} - -void TraceOSMESAApi::OSMesaColorClampFn(GLboolean enable) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::OSMesaColorClamp") - osmesa_api_->OSMesaColorClampFn(enable); -} - -OSMesaContext TraceOSMESAApi::OSMesaCreateContextFn(GLenum format, - OSMesaContext sharelist) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::OSMesaCreateContext") - return osmesa_api_->OSMesaCreateContextFn(format, sharelist); -} - -OSMesaContext TraceOSMESAApi::OSMesaCreateContextExtFn( - GLenum format, - GLint depthBits, - GLint stencilBits, - GLint accumBits, - OSMesaContext sharelist) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::OSMesaCreateContextExt") - return osmesa_api_->OSMesaCreateContextExtFn(format, depthBits, stencilBits, - accumBits, sharelist); -} - -void TraceOSMESAApi::OSMesaDestroyContextFn(OSMesaContext ctx) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::OSMesaDestroyContext") - osmesa_api_->OSMesaDestroyContextFn(ctx); -} - -GLboolean TraceOSMESAApi::OSMesaGetColorBufferFn(OSMesaContext c, - GLint* width, - GLint* height, - GLint* format, - void** buffer) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::OSMesaGetColorBuffer") - return osmesa_api_->OSMesaGetColorBufferFn(c, width, height, format, buffer); -} - -OSMesaContext TraceOSMESAApi::OSMesaGetCurrentContextFn(void) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::OSMesaGetCurrentContext") - return osmesa_api_->OSMesaGetCurrentContextFn(); -} - -GLboolean TraceOSMESAApi::OSMesaGetDepthBufferFn(OSMesaContext c, - GLint* width, - GLint* height, - GLint* bytesPerValue, - void** buffer) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::OSMesaGetDepthBuffer") - return osmesa_api_->OSMesaGetDepthBufferFn(c, width, height, bytesPerValue, - buffer); -} - -void TraceOSMESAApi::OSMesaGetIntegervFn(GLint pname, GLint* value) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::OSMesaGetIntegerv") - osmesa_api_->OSMesaGetIntegervFn(pname, value); -} - -OSMESAproc TraceOSMESAApi::OSMesaGetProcAddressFn(const char* funcName) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::OSMesaGetProcAddress") - return osmesa_api_->OSMesaGetProcAddressFn(funcName); -} - -GLboolean TraceOSMESAApi::OSMesaMakeCurrentFn(OSMesaContext ctx, - void* buffer, - GLenum type, - GLsizei width, - GLsizei height) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::OSMesaMakeCurrent") - return osmesa_api_->OSMesaMakeCurrentFn(ctx, buffer, type, width, height); -} - -void TraceOSMESAApi::OSMesaPixelStoreFn(GLint pname, GLint value) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::OSMesaPixelStore") - osmesa_api_->OSMesaPixelStoreFn(pname, value); -} - -void DebugOSMESAApi::OSMesaColorClampFn(GLboolean enable) { - GL_SERVICE_LOG("OSMesaColorClamp" - << "(" << GLEnums::GetStringBool(enable) << ")"); - osmesa_api_->OSMesaColorClampFn(enable); -} - -OSMesaContext DebugOSMESAApi::OSMesaCreateContextFn(GLenum format, - OSMesaContext sharelist) { - GL_SERVICE_LOG("OSMesaCreateContext" - << "(" << GLEnums::GetStringEnum(format) << ", " << sharelist - << ")"); - OSMesaContext result = osmesa_api_->OSMesaCreateContextFn(format, sharelist); - GL_SERVICE_LOG("GL_RESULT: " << result); - return result; -} - -OSMesaContext DebugOSMESAApi::OSMesaCreateContextExtFn( - GLenum format, - GLint depthBits, - GLint stencilBits, - GLint accumBits, - OSMesaContext sharelist) { - GL_SERVICE_LOG("OSMesaCreateContextExt" - << "(" << GLEnums::GetStringEnum(format) << ", " << depthBits - << ", " << stencilBits << ", " << accumBits << ", " - << sharelist << ")"); - OSMesaContext result = osmesa_api_->OSMesaCreateContextExtFn( - format, depthBits, stencilBits, accumBits, sharelist); - GL_SERVICE_LOG("GL_RESULT: " << result); - return result; -} - -void DebugOSMESAApi::OSMesaDestroyContextFn(OSMesaContext ctx) { - GL_SERVICE_LOG("OSMesaDestroyContext" - << "(" << ctx << ")"); - osmesa_api_->OSMesaDestroyContextFn(ctx); -} - -GLboolean DebugOSMESAApi::OSMesaGetColorBufferFn(OSMesaContext c, - GLint* width, - GLint* height, - GLint* format, - void** buffer) { - GL_SERVICE_LOG("OSMesaGetColorBuffer" - << "(" << c << ", " << static_cast<const void*>(width) << ", " - << static_cast<const void*>(height) << ", " - << static_cast<const void*>(format) << ", " << buffer << ")"); - GLboolean result = - osmesa_api_->OSMesaGetColorBufferFn(c, width, height, format, buffer); - GL_SERVICE_LOG("GL_RESULT: " << result); - return result; -} - -OSMesaContext DebugOSMESAApi::OSMesaGetCurrentContextFn(void) { - GL_SERVICE_LOG("OSMesaGetCurrentContext" - << "(" - << ")"); - OSMesaContext result = osmesa_api_->OSMesaGetCurrentContextFn(); - GL_SERVICE_LOG("GL_RESULT: " << result); - return result; -} - -GLboolean DebugOSMESAApi::OSMesaGetDepthBufferFn(OSMesaContext c, - GLint* width, - GLint* height, - GLint* bytesPerValue, - void** buffer) { - GL_SERVICE_LOG("OSMesaGetDepthBuffer" - << "(" << c << ", " << static_cast<const void*>(width) << ", " - << static_cast<const void*>(height) << ", " - << static_cast<const void*>(bytesPerValue) << ", " << buffer - << ")"); - GLboolean result = osmesa_api_->OSMesaGetDepthBufferFn(c, width, height, - bytesPerValue, buffer); - GL_SERVICE_LOG("GL_RESULT: " << result); - return result; -} - -void DebugOSMESAApi::OSMesaGetIntegervFn(GLint pname, GLint* value) { - GL_SERVICE_LOG("OSMesaGetIntegerv" - << "(" << pname << ", " << static_cast<const void*>(value) - << ")"); - osmesa_api_->OSMesaGetIntegervFn(pname, value); -} - -OSMESAproc DebugOSMESAApi::OSMesaGetProcAddressFn(const char* funcName) { - GL_SERVICE_LOG("OSMesaGetProcAddress" - << "(" << funcName << ")"); - OSMESAproc result = osmesa_api_->OSMesaGetProcAddressFn(funcName); - - GL_SERVICE_LOG("GL_RESULT: " << reinterpret_cast<void*>(result)); - - return result; -} - -GLboolean DebugOSMESAApi::OSMesaMakeCurrentFn(OSMesaContext ctx, - void* buffer, - GLenum type, - GLsizei width, - GLsizei height) { - GL_SERVICE_LOG("OSMesaMakeCurrent" - << "(" << ctx << ", " << static_cast<const void*>(buffer) - << ", " << GLEnums::GetStringEnum(type) << ", " << width - << ", " << height << ")"); - GLboolean result = - osmesa_api_->OSMesaMakeCurrentFn(ctx, buffer, type, width, height); - GL_SERVICE_LOG("GL_RESULT: " << result); - return result; -} - -void DebugOSMESAApi::OSMesaPixelStoreFn(GLint pname, GLint value) { - GL_SERVICE_LOG("OSMesaPixelStore" - << "(" << pname << ", " << value << ")"); - osmesa_api_->OSMesaPixelStoreFn(pname, value); -} - -} // namespace gl
diff --git a/ui/gl/gl_bindings_autogen_osmesa.h b/ui/gl/gl_bindings_autogen_osmesa.h deleted file mode 100644 index baa9587..0000000 --- a/ui/gl/gl_bindings_autogen_osmesa.h +++ /dev/null
@@ -1,127 +0,0 @@ -// Copyright 2016 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. -// -// This file is auto-generated from -// ui/gl/generate_bindings.py -// It's formatted by clang-format using chromium coding style: -// clang-format -i -style=chromium filename -// DO NOT EDIT! - -#ifndef UI_GL_GL_BINDINGS_AUTOGEN_OSMESA_H_ -#define UI_GL_GL_BINDINGS_AUTOGEN_OSMESA_H_ - -#include <string> - -namespace gl { - -class GLContext; - -typedef void(GL_BINDING_CALL* OSMesaColorClampProc)(GLboolean enable); -typedef OSMesaContext(GL_BINDING_CALL* OSMesaCreateContextProc)( - GLenum format, - OSMesaContext sharelist); -typedef OSMesaContext(GL_BINDING_CALL* OSMesaCreateContextExtProc)( - GLenum format, - GLint depthBits, - GLint stencilBits, - GLint accumBits, - OSMesaContext sharelist); -typedef void(GL_BINDING_CALL* OSMesaDestroyContextProc)(OSMesaContext ctx); -typedef GLboolean(GL_BINDING_CALL* OSMesaGetColorBufferProc)(OSMesaContext c, - GLint* width, - GLint* height, - GLint* format, - void** buffer); -typedef OSMesaContext(GL_BINDING_CALL* OSMesaGetCurrentContextProc)(void); -typedef GLboolean(GL_BINDING_CALL* OSMesaGetDepthBufferProc)( - OSMesaContext c, - GLint* width, - GLint* height, - GLint* bytesPerValue, - void** buffer); -typedef void(GL_BINDING_CALL* OSMesaGetIntegervProc)(GLint pname, GLint* value); -typedef OSMESAproc(GL_BINDING_CALL* OSMesaGetProcAddressProc)( - const char* funcName); -typedef GLboolean(GL_BINDING_CALL* OSMesaMakeCurrentProc)(OSMesaContext ctx, - void* buffer, - GLenum type, - GLsizei width, - GLsizei height); -typedef void(GL_BINDING_CALL* OSMesaPixelStoreProc)(GLint pname, GLint value); - -struct ExtensionsOSMESA {}; - -struct ProcsOSMESA { - OSMesaColorClampProc OSMesaColorClampFn; - OSMesaCreateContextProc OSMesaCreateContextFn; - OSMesaCreateContextExtProc OSMesaCreateContextExtFn; - OSMesaDestroyContextProc OSMesaDestroyContextFn; - OSMesaGetColorBufferProc OSMesaGetColorBufferFn; - OSMesaGetCurrentContextProc OSMesaGetCurrentContextFn; - OSMesaGetDepthBufferProc OSMesaGetDepthBufferFn; - OSMesaGetIntegervProc OSMesaGetIntegervFn; - OSMesaGetProcAddressProc OSMesaGetProcAddressFn; - OSMesaMakeCurrentProc OSMesaMakeCurrentFn; - OSMesaPixelStoreProc OSMesaPixelStoreFn; -}; - -class GL_EXPORT OSMESAApi { - public: - OSMESAApi(); - virtual ~OSMESAApi(); - - virtual void SetDisabledExtensions(const std::string& disabled_extensions) {} - - virtual void OSMesaColorClampFn(GLboolean enable) = 0; - virtual OSMesaContext OSMesaCreateContextFn(GLenum format, - OSMesaContext sharelist) = 0; - virtual OSMesaContext OSMesaCreateContextExtFn(GLenum format, - GLint depthBits, - GLint stencilBits, - GLint accumBits, - OSMesaContext sharelist) = 0; - virtual void OSMesaDestroyContextFn(OSMesaContext ctx) = 0; - virtual GLboolean OSMesaGetColorBufferFn(OSMesaContext c, - GLint* width, - GLint* height, - GLint* format, - void** buffer) = 0; - virtual OSMesaContext OSMesaGetCurrentContextFn(void) = 0; - virtual GLboolean OSMesaGetDepthBufferFn(OSMesaContext c, - GLint* width, - GLint* height, - GLint* bytesPerValue, - void** buffer) = 0; - virtual void OSMesaGetIntegervFn(GLint pname, GLint* value) = 0; - virtual OSMESAproc OSMesaGetProcAddressFn(const char* funcName) = 0; - virtual GLboolean OSMesaMakeCurrentFn(OSMesaContext ctx, - void* buffer, - GLenum type, - GLsizei width, - GLsizei height) = 0; - virtual void OSMesaPixelStoreFn(GLint pname, GLint value) = 0; -}; - -} // namespace gl - -#define OSMesaColorClamp ::gl::g_current_osmesa_context->OSMesaColorClampFn -#define OSMesaCreateContext \ - ::gl::g_current_osmesa_context->OSMesaCreateContextFn -#define OSMesaCreateContextExt \ - ::gl::g_current_osmesa_context->OSMesaCreateContextExtFn -#define OSMesaDestroyContext \ - ::gl::g_current_osmesa_context->OSMesaDestroyContextFn -#define OSMesaGetColorBuffer \ - ::gl::g_current_osmesa_context->OSMesaGetColorBufferFn -#define OSMesaGetCurrentContext \ - ::gl::g_current_osmesa_context->OSMesaGetCurrentContextFn -#define OSMesaGetDepthBuffer \ - ::gl::g_current_osmesa_context->OSMesaGetDepthBufferFn -#define OSMesaGetIntegerv ::gl::g_current_osmesa_context->OSMesaGetIntegervFn -#define OSMesaGetProcAddress \ - ::gl::g_current_osmesa_context->OSMesaGetProcAddressFn -#define OSMesaMakeCurrent ::gl::g_current_osmesa_context->OSMesaMakeCurrentFn -#define OSMesaPixelStore ::gl::g_current_osmesa_context->OSMesaPixelStoreFn - -#endif // UI_GL_GL_BINDINGS_AUTOGEN_OSMESA_H_
diff --git a/ui/gl/gl_context.cc b/ui/gl/gl_context.cc index 37d5d8d..b268e3d 100644 --- a/ui/gl/gl_context.cc +++ b/ui/gl/gl_context.cc
@@ -225,7 +225,6 @@ case kGLImplementationEGLGLES2: case kGLImplementationSwiftShaderGL: return true; - case kGLImplementationOSMesaGL: case kGLImplementationAppleGL: return false; case kGLImplementationMockGL:
diff --git a/ui/gl/gl_context_osmesa.cc b/ui/gl/gl_context_osmesa.cc deleted file mode 100644 index 81611e9..0000000 --- a/ui/gl/gl_context_osmesa.cc +++ /dev/null
@@ -1,151 +0,0 @@ -// Copyright (c) 2012 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 "ui/gl/gl_context_osmesa.h" - -#include "base/logging.h" -#include "third_party/mesa/src/include/GL/osmesa.h" -#include "ui/gfx/geometry/size.h" -#include "ui/gl/gl_bindings.h" -#include "ui/gl/gl_surface.h" - -namespace gl { - -GLContextOSMesa::GLContextOSMesa(GLShareGroup* share_group) - : GLContextReal(share_group), - context_(nullptr), - is_released_(false) { -} - -bool GLContextOSMesa::Initialize(GLSurface* compatible_surface, - const GLContextAttribs& attribs) { - // webgl_compatibility_context and disabling bind_generates_resource are not - // supported. - DCHECK(!attribs.webgl_compatibility_context && - attribs.bind_generates_resource); - - DCHECK(!context_); - - OSMesaContext share_handle = static_cast<OSMesaContext>( - share_group() ? share_group()->GetHandle() : nullptr); - - GLuint format = 0; - switch (compatible_surface->GetFormat().GetPixelLayout()) { - case GLSurfaceFormat::PIXEL_LAYOUT_BGRA: - format = OSMESA_BGRA; - break; - case GLSurfaceFormat::PIXEL_LAYOUT_RGBA: - format = OSMESA_RGBA; - break; - default: - NOTREACHED(); - return false; - } - context_ = OSMesaCreateContextExt(format, - 0, // depth bits - 0, // stencil bits - 0, // accum bits - share_handle); - if (!context_) { - LOG(ERROR) << "OSMesaCreateContextExt failed."; - return false; - } - - return true; -} - -void GLContextOSMesa::Destroy() { - if (context_) { - OSMesaDestroyContext(static_cast<OSMesaContext>(context_)); - context_ = nullptr; - } -} - -bool GLContextOSMesa::MakeCurrent(GLSurface* surface) { - DCHECK(context_); - - gfx::Size size = surface->GetSize(); - - ScopedReleaseCurrent release_current; - if (!OSMesaMakeCurrent(context_, - surface->GetHandle(), - GL_UNSIGNED_BYTE, - size.width(), - size.height())) { - LOG(ERROR) << "OSMesaMakeCurrent failed."; - Destroy(); - return false; - } - // Track that we're no longer in a released state to workaround a mesa issue. - is_released_ = false; - - // Set this as soon as the context is current, since we might call into GL. - BindGLApi(); - - // Row 0 is at the top. - OSMesaPixelStore(OSMESA_Y_UP, 0); - - SetCurrent(surface); - InitializeDynamicBindings(); - - if (!surface->OnMakeCurrent(this)) { - LOG(ERROR) << "Could not make current."; - return false; - } - - release_current.Cancel(); - return true; -} - -void GLContextOSMesa::ReleaseCurrent(GLSurface* surface) { - if (!IsCurrent(surface)) - return; - - SetCurrent(nullptr); - - // Calling |OSMesaMakeCurrent| with nullptr here does not work to release the - // context. As a workaround, keep track of the release state, so that we can - // correctly determine the state of |IsCurrent|. - is_released_ = true; - OSMesaMakeCurrent(nullptr, nullptr, GL_UNSIGNED_BYTE, 0, 0); -} - -bool GLContextOSMesa::IsCurrent(GLSurface* surface) { - DCHECK(context_); - - // |OSMesaGetCurrentContext| doesn't correctly return nullptr when we release, - // check the tracked |is_released_|. See |ReleaseCurrent|. - bool native_context_is_current = !is_released_ && - context_ == OSMesaGetCurrentContext(); - - // If our context is current then our notion of which GLContext is - // current must be correct. On the other hand, third-party code - // using OpenGL might change the current context. - DCHECK(!native_context_is_current || (GetRealCurrent() == this)); - - if (!native_context_is_current) - return false; - - if (surface) { - GLint width; - GLint height; - GLint format; - void* buffer = nullptr; - OSMesaGetColorBuffer(context_, &width, &height, &format, &buffer); - if (buffer != surface->GetHandle()) - return false; - } - - return true; -} - -void* GLContextOSMesa::GetHandle() { - return context_; -} - -GLContextOSMesa::~GLContextOSMesa() { - Destroy(); -} - -} // namespace gl
diff --git a/ui/gl/gl_context_osmesa.h b/ui/gl/gl_context_osmesa.h deleted file mode 100644 index 6366e91d..0000000 --- a/ui/gl/gl_context_osmesa.h +++ /dev/null
@@ -1,47 +0,0 @@ -// Copyright (c) 2012 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 UI_GL_GL_CONTEXT_OSMESA_H_ -#define UI_GL_GL_CONTEXT_OSMESA_H_ - -#include "base/compiler_specific.h" -#include "base/macros.h" -#include "ui/gl/gl_context.h" -#include "ui/gl/gl_export.h" - -typedef struct osmesa_context* OSMesaContext; - -namespace gl { - -class GLShareGroup; -class GLSurface; - -// Encapsulates an OSMesa OpenGL context that uses software rendering. -class GL_EXPORT GLContextOSMesa : public GLContextReal { - public: - explicit GLContextOSMesa(GLShareGroup* share_group); - - // Implement GLContext. - bool Initialize(GLSurface* compatible_surface, - const GLContextAttribs& attribs) override; - bool MakeCurrent(GLSurface* surface) override; - void ReleaseCurrent(GLSurface* surface) override; - bool IsCurrent(GLSurface* surface) override; - void* GetHandle() override; - - protected: - ~GLContextOSMesa() override; - - private: - void Destroy(); - - OSMesaContext context_; - bool is_released_; - - DISALLOW_COPY_AND_ASSIGN(GLContextOSMesa); -}; - -} // namespace gl - -#endif // UI_GL_GL_CONTEXT_OSMESA_H_
diff --git a/ui/gl/gl_enums_implementation_autogen.h b/ui/gl/gl_enums_implementation_autogen.h index 1aaf6900..27a69b10 100644 --- a/ui/gl/gl_enums_implementation_autogen.h +++ b/ui/gl/gl_enums_implementation_autogen.h
@@ -13,4633 +13,6176 @@ static const GLEnums::EnumToString enum_to_string_table[] = { { - 0, "GL_FALSE", + 0, + "GL_FALSE", }, { - 0x00, "GL_CLOSE_PATH_NV", + 0x00, + "GL_CLOSE_PATH_NV", }, { - 0x0000, "GL_POINTS", + 0x0000, + "GL_POINTS", }, { - 0x00000000, "GL_PERFQUERY_SINGLE_CONTEXT_INTEL", + 0x00000000, + "GL_PERFQUERY_SINGLE_CONTEXT_INTEL", }, { - 0x00000001, "GL_SYNC_FLUSH_COMMANDS_BIT_APPLE", + 0x00000001, + "GL_SYNC_FLUSH_COMMANDS_BIT_APPLE", }, { - 0x00000002, "GL_CONTEXT_FLAG_DEBUG_BIT_KHR", + 0x00000002, + "GL_CONTEXT_FLAG_DEBUG_BIT_KHR", }, { - 0x00000004, "GL_GEOMETRY_SHADER_BIT_OES", + 0x00000004, + "GL_GEOMETRY_SHADER_BIT_OES", }, { - 0x00000008, "GL_CONTEXT_FLAG_NO_ERROR_BIT_KHR", + 0x00000008, + "GL_CONTEXT_FLAG_NO_ERROR_BIT_KHR", }, { - 0x00000010, "GL_TESS_EVALUATION_SHADER_BIT_OES", + 0x00000010, + "GL_TESS_EVALUATION_SHADER_BIT_OES", }, { - 0x00000020, "GL_COLOR_BUFFER_BIT5_QCOM", + 0x00000020, + "GL_COLOR_BUFFER_BIT5_QCOM", }, { - 0x00000040, "GL_COLOR_BUFFER_BIT6_QCOM", + 0x00000040, + "GL_COLOR_BUFFER_BIT6_QCOM", }, { - 0x00000080, "GL_COLOR_BUFFER_BIT7_QCOM", + 0x00000080, + "GL_COLOR_BUFFER_BIT7_QCOM", }, { - 0x00000100, "GL_DEPTH_BUFFER_BIT", + 0x00000100, + "GL_DEPTH_BUFFER_BIT", }, { - 0x00000200, "GL_DEPTH_BUFFER_BIT1_QCOM", + 0x00000200, + "GL_DEPTH_BUFFER_BIT1_QCOM", }, { - 0x00000400, "GL_STENCIL_BUFFER_BIT", + 0x00000400, + "GL_STENCIL_BUFFER_BIT", }, { - 0x00000800, "GL_DEPTH_BUFFER_BIT3_QCOM", + 0x00000800, + "GL_DEPTH_BUFFER_BIT3_QCOM", }, { - 0x00001000, "GL_DEPTH_BUFFER_BIT4_QCOM", + 0x00001000, + "GL_DEPTH_BUFFER_BIT4_QCOM", }, { - 0x00002000, "GL_DEPTH_BUFFER_BIT5_QCOM", + 0x00002000, + "GL_DEPTH_BUFFER_BIT5_QCOM", }, { - 0x00004000, "GL_COLOR_BUFFER_BIT", + 0x00004000, + "GL_COLOR_BUFFER_BIT", }, { - 0x00008000, "GL_COVERAGE_BUFFER_BIT_NV", + 0x00008000, + "GL_COVERAGE_BUFFER_BIT_NV", }, { - 0x0001, "GL_LINES", + 0x0001, + "GL_LINES", }, { - 0x00010000, "GL_FONT_X_MIN_BOUNDS_BIT_NV", + 0x00010000, + "GL_FONT_X_MIN_BOUNDS_BIT_NV", }, { - 0x0002, "GL_LINE_LOOP", + 0x0002, + "GL_LINE_LOOP", }, { - 0x00020000, "GL_FONT_Y_MIN_BOUNDS_BIT_NV", + 0x00020000, + "GL_FONT_Y_MIN_BOUNDS_BIT_NV", }, { - 0x0003, "GL_LINE_STRIP", + 0x0003, + "GL_LINE_STRIP", }, { - 0x0004, "GL_TRIANGLES", + 0x0004, + "GL_TRIANGLES", }, { - 0x00040000, "GL_FONT_X_MAX_BOUNDS_BIT_NV", + 0x00040000, + "GL_FONT_X_MAX_BOUNDS_BIT_NV", }, { - 0x0005, "GL_TRIANGLE_STRIP", + 0x0005, + "GL_TRIANGLE_STRIP", }, { - 0x0006, "GL_TRIANGLE_FAN", + 0x0006, + "GL_TRIANGLE_FAN", }, { - 0x0007, "GL_QUADS_OES", + 0x0007, + "GL_QUADS_OES", }, { - 0x0008, "GL_MAP_INVALIDATE_BUFFER_BIT_EXT", + 0x0008, + "GL_MAP_INVALIDATE_BUFFER_BIT_EXT", }, { - 0x00080000, "GL_FONT_Y_MAX_BOUNDS_BIT_NV", + 0x00080000, + "GL_FONT_Y_MAX_BOUNDS_BIT_NV", }, { - 0x000A, "GL_LINES_ADJACENCY_OES", + 0x000A, + "GL_LINES_ADJACENCY_OES", }, { - 0x000B, "GL_LINE_STRIP_ADJACENCY_OES", + 0x000B, + "GL_LINE_STRIP_ADJACENCY_OES", }, { - 0x000C, "GL_TRIANGLES_ADJACENCY_OES", + 0x000C, + "GL_TRIANGLES_ADJACENCY_OES", }, { - 0x000D, "GL_TRIANGLE_STRIP_ADJACENCY_OES", + 0x000D, + "GL_TRIANGLE_STRIP_ADJACENCY_OES", }, { - 0x000E, "GL_PATCHES_OES", + 0x000E, + "GL_PATCHES_OES", }, { - 0x0010, "GL_MAP_FLUSH_EXPLICIT_BIT_EXT", + 0x0010, + "GL_MAP_FLUSH_EXPLICIT_BIT_EXT", }, { - 0x00100000, "GL_FONT_UNITS_PER_EM_BIT_NV", + 0x00100000, + "GL_FONT_UNITS_PER_EM_BIT_NV", }, { - 0x0020, "GL_MAP_UNSYNCHRONIZED_BIT_EXT", + 0x0020, + "GL_MAP_UNSYNCHRONIZED_BIT_EXT", }, { - 0x00200000, "GL_FONT_ASCENDER_BIT_NV", + 0x00200000, + "GL_FONT_ASCENDER_BIT_NV", }, { - 0x0040, "GL_MAP_PERSISTENT_BIT_EXT", + 0x0040, + "GL_MAP_PERSISTENT_BIT_EXT", }, { - 0x00400000, "GL_FONT_DESCENDER_BIT_NV", + 0x00400000, + "GL_FONT_DESCENDER_BIT_NV", }, { - 0x0080, "GL_MAP_COHERENT_BIT_EXT", + 0x0080, + "GL_MAP_COHERENT_BIT_EXT", }, { - 0x00800000, "GL_FONT_HEIGHT_BIT_NV", + 0x00800000, + "GL_FONT_HEIGHT_BIT_NV", }, { - 0x01, "GL_BOLD_BIT_NV", + 0x01, + "GL_BOLD_BIT_NV", }, { - 0x0100, "GL_DYNAMIC_STORAGE_BIT_EXT", + 0x0100, + "GL_DYNAMIC_STORAGE_BIT_EXT", }, { - 0x01000000, "GL_FONT_MAX_ADVANCE_WIDTH_BIT_NV", + 0x01000000, + "GL_FONT_MAX_ADVANCE_WIDTH_BIT_NV", }, { - 0x02, "GL_MOVE_TO_NV", + 0x02, + "GL_MOVE_TO_NV", }, { - 0x0200, "GL_NEVER", + 0x0200, + "GL_NEVER", }, { - 0x02000000, "GL_FONT_MAX_ADVANCE_HEIGHT_BIT_NV", + 0x02000000, + "GL_FONT_MAX_ADVANCE_HEIGHT_BIT_NV", }, { - 0x0201, "GL_LESS", + 0x0201, + "GL_LESS", }, { - 0x0202, "GL_EQUAL", + 0x0202, + "GL_EQUAL", }, { - 0x0203, "GL_LEQUAL", + 0x0203, + "GL_LEQUAL", }, { - 0x0204, "GL_GREATER", + 0x0204, + "GL_GREATER", }, { - 0x0205, "GL_NOTEQUAL", + 0x0205, + "GL_NOTEQUAL", }, { - 0x0206, "GL_GEQUAL", + 0x0206, + "GL_GEQUAL", }, { - 0x0207, "GL_ALWAYS", + 0x0207, + "GL_ALWAYS", }, { - 0x03, "GL_RELATIVE_MOVE_TO_NV", + 0x03, + "GL_RELATIVE_MOVE_TO_NV", }, { - 0x0300, "GL_SRC_COLOR", + 0x0300, + "GL_SRC_COLOR", }, { - 0x0301, "GL_ONE_MINUS_SRC_COLOR", + 0x0301, + "GL_ONE_MINUS_SRC_COLOR", }, { - 0x0302, "GL_SRC_ALPHA", + 0x0302, + "GL_SRC_ALPHA", }, { - 0x0303, "GL_ONE_MINUS_SRC_ALPHA", + 0x0303, + "GL_ONE_MINUS_SRC_ALPHA", }, { - 0x0304, "GL_DST_ALPHA", + 0x0304, + "GL_DST_ALPHA", }, { - 0x0305, "GL_ONE_MINUS_DST_ALPHA", + 0x0305, + "GL_ONE_MINUS_DST_ALPHA", }, { - 0x0306, "GL_DST_COLOR", + 0x0306, + "GL_DST_COLOR", }, { - 0x0307, "GL_ONE_MINUS_DST_COLOR", + 0x0307, + "GL_ONE_MINUS_DST_COLOR", }, { - 0x0308, "GL_SRC_ALPHA_SATURATE", + 0x0308, + "GL_SRC_ALPHA_SATURATE", }, { - 0x04, "GL_LINE_TO_NV", + 0x04, + "GL_LINE_TO_NV", }, { - 0x04000000, "GL_FONT_UNDERLINE_POSITION_BIT_NV", + 0x04000000, + "GL_FONT_UNDERLINE_POSITION_BIT_NV", }, { - 0x0404, "GL_FRONT", + 0x0404, + "GL_FRONT", }, { - 0x0405, "GL_BACK", + 0x0405, + "GL_BACK", }, { - 0x0408, "GL_FRONT_AND_BACK", + 0x0408, + "GL_FRONT_AND_BACK", }, { - 0x05, "GL_RELATIVE_LINE_TO_NV", + 0x05, + "GL_RELATIVE_LINE_TO_NV", }, { - 0x0500, "GL_INVALID_ENUM", + 0x0500, + "GL_INVALID_ENUM", }, { - 0x0501, "GL_INVALID_VALUE", + 0x0501, + "GL_INVALID_VALUE", }, { - 0x0502, "GL_INVALID_OPERATION", + 0x0502, + "GL_INVALID_OPERATION", }, { - 0x0503, "GL_STACK_OVERFLOW_KHR", + 0x0503, + "GL_STACK_OVERFLOW_KHR", }, { - 0x0504, "GL_STACK_UNDERFLOW_KHR", + 0x0504, + "GL_STACK_UNDERFLOW_KHR", }, { - 0x0505, "GL_OUT_OF_MEMORY", + 0x0505, + "GL_OUT_OF_MEMORY", }, { - 0x0506, "GL_INVALID_FRAMEBUFFER_OPERATION", + 0x0506, + "GL_INVALID_FRAMEBUFFER_OPERATION", }, { - 0x0507, "GL_CONTEXT_LOST_KHR", + 0x0507, + "GL_CONTEXT_LOST_KHR", }, { - 0x06, "GL_HORIZONTAL_LINE_TO_NV", + 0x06, + "GL_HORIZONTAL_LINE_TO_NV", }, { - 0x07, "GL_RELATIVE_HORIZONTAL_LINE_TO_NV", + 0x07, + "GL_RELATIVE_HORIZONTAL_LINE_TO_NV", }, { - 0x08, "GL_VERTICAL_LINE_TO_NV", + 0x08, + "GL_VERTICAL_LINE_TO_NV", }, { - 0x08000000, "GL_FONT_UNDERLINE_THICKNESS_BIT_NV", + 0x08000000, + "GL_FONT_UNDERLINE_THICKNESS_BIT_NV", }, { - 0x09, "GL_RELATIVE_VERTICAL_LINE_TO_NV", + 0x09, + "GL_RELATIVE_VERTICAL_LINE_TO_NV", }, { - 0x0900, "GL_CW", + 0x0900, + "GL_CW", }, { - 0x0901, "GL_CCW", + 0x0901, + "GL_CCW", }, { - 0x0A, "GL_QUADRATIC_CURVE_TO_NV", + 0x0A, + "GL_QUADRATIC_CURVE_TO_NV", }, { - 0x0B, "GL_RELATIVE_QUADRATIC_CURVE_TO_NV", + 0x0B, + "GL_RELATIVE_QUADRATIC_CURVE_TO_NV", }, { - 0x0B21, "GL_LINE_WIDTH", + 0x0B21, + "GL_LINE_WIDTH", }, { - 0x0B40, "GL_POLYGON_MODE_NV", + 0x0B40, + "GL_POLYGON_MODE_NV", }, { - 0x0B44, "GL_CULL_FACE", + 0x0B44, + "GL_CULL_FACE", }, { - 0x0B45, "GL_CULL_FACE_MODE", + 0x0B45, + "GL_CULL_FACE_MODE", }, { - 0x0B46, "GL_FRONT_FACE", + 0x0B46, + "GL_FRONT_FACE", }, { - 0x0B70, "GL_DEPTH_RANGE", + 0x0B70, + "GL_DEPTH_RANGE", }, { - 0x0B71, "GL_DEPTH_TEST", + 0x0B71, + "GL_DEPTH_TEST", }, { - 0x0B72, "GL_DEPTH_WRITEMASK", + 0x0B72, + "GL_DEPTH_WRITEMASK", }, { - 0x0B73, "GL_DEPTH_CLEAR_VALUE", + 0x0B73, + "GL_DEPTH_CLEAR_VALUE", }, { - 0x0B74, "GL_DEPTH_FUNC", + 0x0B74, + "GL_DEPTH_FUNC", }, { - 0x0B90, "GL_STENCIL_TEST", + 0x0B90, + "GL_STENCIL_TEST", }, { - 0x0B91, "GL_STENCIL_CLEAR_VALUE", + 0x0B91, + "GL_STENCIL_CLEAR_VALUE", }, { - 0x0B92, "GL_STENCIL_FUNC", + 0x0B92, + "GL_STENCIL_FUNC", }, { - 0x0B93, "GL_STENCIL_VALUE_MASK", + 0x0B93, + "GL_STENCIL_VALUE_MASK", }, { - 0x0B94, "GL_STENCIL_FAIL", + 0x0B94, + "GL_STENCIL_FAIL", }, { - 0x0B95, "GL_STENCIL_PASS_DEPTH_FAIL", + 0x0B95, + "GL_STENCIL_PASS_DEPTH_FAIL", }, { - 0x0B96, "GL_STENCIL_PASS_DEPTH_PASS", + 0x0B96, + "GL_STENCIL_PASS_DEPTH_PASS", }, { - 0x0B97, "GL_STENCIL_REF", + 0x0B97, + "GL_STENCIL_REF", }, { - 0x0B98, "GL_STENCIL_WRITEMASK", + 0x0B98, + "GL_STENCIL_WRITEMASK", }, { - 0x0BA2, "GL_VIEWPORT", + 0x0BA2, + "GL_VIEWPORT", }, { - 0x0BA3, "GL_PATH_MODELVIEW_STACK_DEPTH_NV", + 0x0BA3, + "GL_PATH_MODELVIEW_STACK_DEPTH_NV", }, { - 0x0BA4, "GL_PATH_PROJECTION_STACK_DEPTH_NV", + 0x0BA4, + "GL_PATH_PROJECTION_STACK_DEPTH_NV", }, { - 0x0BA6, "GL_PATH_MODELVIEW_MATRIX_NV", + 0x0BA6, + "GL_PATH_MODELVIEW_MATRIX_NV", }, { - 0x0BA7, "GL_PATH_PROJECTION_MATRIX_NV", + 0x0BA7, + "GL_PATH_PROJECTION_MATRIX_NV", }, { - 0x0BC0, "GL_ALPHA_TEST_QCOM", + 0x0BC0, + "GL_ALPHA_TEST_QCOM", }, { - 0x0BC1, "GL_ALPHA_TEST_FUNC_QCOM", + 0x0BC1, + "GL_ALPHA_TEST_FUNC_QCOM", }, { - 0x0BC2, "GL_ALPHA_TEST_REF_QCOM", + 0x0BC2, + "GL_ALPHA_TEST_REF_QCOM", }, { - 0x0BD0, "GL_DITHER", + 0x0BD0, + "GL_DITHER", }, { - 0x0BE2, "GL_BLEND", + 0x0BE2, + "GL_BLEND", }, { - 0x0C, "GL_CUBIC_CURVE_TO_NV", + 0x0C, + "GL_CUBIC_CURVE_TO_NV", }, { - 0x0C01, "GL_DRAW_BUFFER_EXT", + 0x0C01, + "GL_DRAW_BUFFER_EXT", }, { - 0x0C02, "GL_READ_BUFFER_EXT", + 0x0C02, + "GL_READ_BUFFER_EXT", }, { - 0x0C10, "GL_SCISSOR_BOX", + 0x0C10, + "GL_SCISSOR_BOX", }, { - 0x0C11, "GL_SCISSOR_TEST", + 0x0C11, + "GL_SCISSOR_TEST", }, { - 0x0C22, "GL_COLOR_CLEAR_VALUE", + 0x0C22, + "GL_COLOR_CLEAR_VALUE", }, { - 0x0C23, "GL_COLOR_WRITEMASK", + 0x0C23, + "GL_COLOR_WRITEMASK", }, { - 0x0CF2, "GL_UNPACK_ROW_LENGTH_EXT", + 0x0CF2, + "GL_UNPACK_ROW_LENGTH_EXT", }, { - 0x0CF3, "GL_UNPACK_SKIP_ROWS_EXT", + 0x0CF3, + "GL_UNPACK_SKIP_ROWS_EXT", }, { - 0x0CF4, "GL_UNPACK_SKIP_PIXELS_EXT", + 0x0CF4, + "GL_UNPACK_SKIP_PIXELS_EXT", }, { - 0x0CF5, "GL_UNPACK_ALIGNMENT", + 0x0CF5, + "GL_UNPACK_ALIGNMENT", }, { - 0x0D, "GL_RELATIVE_CUBIC_CURVE_TO_NV", + 0x0D, + "GL_RELATIVE_CUBIC_CURVE_TO_NV", }, { - 0x0D02, "GL_PACK_ROW_LENGTH", + 0x0D02, + "GL_PACK_ROW_LENGTH", }, { - 0x0D03, "GL_PACK_SKIP_ROWS", + 0x0D03, + "GL_PACK_SKIP_ROWS", }, { - 0x0D04, "GL_PACK_SKIP_PIXELS", + 0x0D04, + "GL_PACK_SKIP_PIXELS", }, { - 0x0D05, "GL_PACK_ALIGNMENT", + 0x0D05, + "GL_PACK_ALIGNMENT", }, { - 0x0D32, "GL_MAX_CLIP_DISTANCES_APPLE", + 0x0D32, + "GL_MAX_CLIP_DISTANCES_APPLE", }, { - 0x0D33, "GL_MAX_TEXTURE_SIZE", + 0x0D33, + "GL_MAX_TEXTURE_SIZE", }, { - 0x0D36, "GL_PATH_MAX_MODELVIEW_STACK_DEPTH_NV", + 0x0D36, + "GL_PATH_MAX_MODELVIEW_STACK_DEPTH_NV", }, { - 0x0D38, "GL_PATH_MAX_PROJECTION_STACK_DEPTH_NV", + 0x0D38, + "GL_PATH_MAX_PROJECTION_STACK_DEPTH_NV", }, { - 0x0D3A, "GL_MAX_VIEWPORT_DIMS", + 0x0D3A, + "GL_MAX_VIEWPORT_DIMS", }, { - 0x0D50, "GL_SUBPIXEL_BITS", + 0x0D50, + "GL_SUBPIXEL_BITS", }, { - 0x0D52, "GL_RED_BITS", + 0x0D52, + "GL_RED_BITS", }, { - 0x0D53, "GL_GREEN_BITS", + 0x0D53, + "GL_GREEN_BITS", }, { - 0x0D54, "GL_BLUE_BITS", + 0x0D54, + "GL_BLUE_BITS", }, { - 0x0D55, "GL_ALPHA_BITS", + 0x0D55, + "GL_ALPHA_BITS", }, { - 0x0D56, "GL_DEPTH_BITS", + 0x0D56, + "GL_DEPTH_BITS", }, { - 0x0D57, "GL_STENCIL_BITS", + 0x0D57, + "GL_STENCIL_BITS", }, { - 0x0DE1, "GL_TEXTURE_2D", + 0x0DE1, + "GL_TEXTURE_2D", }, { - 0x0E, "GL_SMOOTH_QUADRATIC_CURVE_TO_NV", + 0x0E, + "GL_SMOOTH_QUADRATIC_CURVE_TO_NV", }, { - 0x0F, "GL_RELATIVE_SMOOTH_QUADRATIC_CURVE_TO_NV", + 0x0F, + "GL_RELATIVE_SMOOTH_QUADRATIC_CURVE_TO_NV", }, { - 0x1, "GL_CA_LAYER_EDGE_LEFT_CHROMIUM", + 0x1, + "GL_CA_LAYER_EDGE_LEFT_CHROMIUM", }, { - 0x10, "GL_SMOOTH_CUBIC_CURVE_TO_NV", + 0x10, + "GL_SMOOTH_CUBIC_CURVE_TO_NV", }, { - 0x100, "GL_GLYPH_HAS_KERNING_BIT_NV", + 0x100, + "GL_GLYPH_HAS_KERNING_BIT_NV", }, { - 0x1000, "GL_TEXTURE_WIDTH", + 0x1000, + "GL_TEXTURE_WIDTH", }, { - 0x10000000, "GL_FONT_HAS_KERNING_BIT_NV", + 0x10000000, + "GL_FONT_HAS_KERNING_BIT_NV", }, { - 0x1001, "GL_TEXTURE_HEIGHT", + 0x1001, + "GL_TEXTURE_HEIGHT", }, { - 0x1003, "GL_TEXTURE_INTERNAL_FORMAT", + 0x1003, + "GL_TEXTURE_INTERNAL_FORMAT", }, { - 0x1004, "GL_TEXTURE_BORDER_COLOR_OES", + 0x1004, + "GL_TEXTURE_BORDER_COLOR_OES", }, { - 0x11, "GL_RELATIVE_SMOOTH_CUBIC_CURVE_TO_NV", + 0x11, + "GL_RELATIVE_SMOOTH_CUBIC_CURVE_TO_NV", }, { - 0x1100, "GL_DONT_CARE", + 0x1100, + "GL_DONT_CARE", }, { - 0x1101, "GL_FASTEST", + 0x1101, + "GL_FASTEST", }, { - 0x1102, "GL_NICEST", + 0x1102, + "GL_NICEST", }, { - 0x12, "GL_SMALL_CCW_ARC_TO_NV", + 0x12, + "GL_SMALL_CCW_ARC_TO_NV", }, { - 0x13, "GL_RELATIVE_SMALL_CCW_ARC_TO_NV", + 0x13, + "GL_RELATIVE_SMALL_CCW_ARC_TO_NV", }, { - 0x14, "GL_SMALL_CW_ARC_TO_NV", + 0x14, + "GL_SMALL_CW_ARC_TO_NV", }, { - 0x1400, "GL_BYTE", + 0x1400, + "GL_BYTE", }, { - 0x1401, "GL_UNSIGNED_BYTE", + 0x1401, + "GL_UNSIGNED_BYTE", }, { - 0x1402, "GL_SHORT", + 0x1402, + "GL_SHORT", }, { - 0x1403, "GL_UNSIGNED_SHORT", + 0x1403, + "GL_UNSIGNED_SHORT", }, { - 0x1404, "GL_INT", + 0x1404, + "GL_INT", }, { - 0x1405, "GL_UNSIGNED_INT", + 0x1405, + "GL_UNSIGNED_INT", }, { - 0x1406, "GL_FLOAT", + 0x1406, + "GL_FLOAT", }, { - 0x140B, "GL_HALF_FLOAT", + 0x140B, + "GL_HALF_FLOAT", }, { - 0x140C, "GL_FIXED", + 0x140C, + "GL_FIXED", }, { - 0x140E, "GL_INT64_NV", + 0x140E, + "GL_INT64_NV", }, { - 0x140F, "GL_UNSIGNED_INT64_NV", + 0x140F, + "GL_UNSIGNED_INT64_NV", }, { - 0x15, "GL_RELATIVE_SMALL_CW_ARC_TO_NV", + 0x15, + "GL_RELATIVE_SMALL_CW_ARC_TO_NV", }, { - 0x1506, "GL_XOR_NV", + 0x1506, + "GL_XOR_NV", }, { - 0x150A, "GL_INVERT", + 0x150A, + "GL_INVERT", }, { - 0x16, "GL_LARGE_CCW_ARC_TO_NV", + 0x16, + "GL_LARGE_CCW_ARC_TO_NV", }, { - 0x17, "GL_RELATIVE_LARGE_CCW_ARC_TO_NV", + 0x17, + "GL_RELATIVE_LARGE_CCW_ARC_TO_NV", }, { - 0x1700, "GL_PATH_MODELVIEW_NV", + 0x1700, + "GL_PATH_MODELVIEW_NV", }, { - 0x1701, "GL_PATH_PROJECTION_NV", + 0x1701, + "GL_PATH_PROJECTION_NV", }, { - 0x1702, "GL_TEXTURE", + 0x1702, + "GL_TEXTURE", }, { - 0x18, "GL_LARGE_CW_ARC_TO_NV", + 0x18, + "GL_LARGE_CW_ARC_TO_NV", }, { - 0x1800, "GL_COLOR_EXT", + 0x1800, + "GL_COLOR_EXT", }, { - 0x1801, "GL_DEPTH_EXT", + 0x1801, + "GL_DEPTH_EXT", }, { - 0x1802, "GL_STENCIL_EXT", + 0x1802, + "GL_STENCIL_EXT", }, { - 0x19, "GL_RELATIVE_LARGE_CW_ARC_TO_NV", + 0x19, + "GL_RELATIVE_LARGE_CW_ARC_TO_NV", }, { - 0x1901, "GL_STENCIL_INDEX_OES", + 0x1901, + "GL_STENCIL_INDEX_OES", }, { - 0x1902, "GL_DEPTH_COMPONENT", + 0x1902, + "GL_DEPTH_COMPONENT", }, { - 0x1903, "GL_RED_EXT", + 0x1903, + "GL_RED_EXT", }, { - 0x1904, "GL_GREEN_NV", + 0x1904, + "GL_GREEN_NV", }, { - 0x1905, "GL_BLUE_NV", + 0x1905, + "GL_BLUE_NV", }, { - 0x1906, "GL_ALPHA", + 0x1906, + "GL_ALPHA", }, { - 0x1907, "GL_RGB", + 0x1907, + "GL_RGB", }, { - 0x1908, "GL_RGBA", + 0x1908, + "GL_RGBA", }, { - 0x1909, "GL_LUMINANCE", + 0x1909, + "GL_LUMINANCE", }, { - 0x190A, "GL_LUMINANCE_ALPHA", + 0x190A, + "GL_LUMINANCE_ALPHA", }, { - 0x1A, "GL_CONIC_CURVE_TO_NV", + 0x1A, + "GL_CONIC_CURVE_TO_NV", }, { - 0x1B, "GL_RELATIVE_CONIC_CURVE_TO_NV", + 0x1B, + "GL_RELATIVE_CONIC_CURVE_TO_NV", }, { - 0x1B00, "GL_POINT_NV", + 0x1B00, + "GL_POINT_NV", }, { - 0x1B01, "GL_LINE_NV", + 0x1B01, + "GL_LINE_NV", }, { - 0x1B02, "GL_FILL_NV", + 0x1B02, + "GL_FILL_NV", }, { - 0x1D00, "GL_FLAT_CHROMIUM", + 0x1D00, + "GL_FLAT_CHROMIUM", }, { - 0x1E00, "GL_KEEP", + 0x1E00, + "GL_KEEP", }, { - 0x1E01, "GL_REPLACE", + 0x1E01, + "GL_REPLACE", }, { - 0x1E02, "GL_INCR", + 0x1E02, + "GL_INCR", }, { - 0x1E03, "GL_DECR", + 0x1E03, + "GL_DECR", }, { - 0x1F00, "GL_VENDOR", + 0x1F00, + "GL_VENDOR", }, { - 0x1F01, "GL_RENDERER", + 0x1F01, + "GL_RENDERER", }, { - 0x1F02, "GL_VERSION", + 0x1F02, + "GL_VERSION", }, { - 0x1F03, "GL_EXTENSIONS", + 0x1F03, + "GL_EXTENSIONS", }, { - 0x2, "GL_CA_LAYER_EDGE_RIGHT_CHROMIUM", + 0x2, + "GL_CA_LAYER_EDGE_RIGHT_CHROMIUM", }, { - 0x20, "GL_GLYPH_VERTICAL_BEARING_X_BIT_NV", + 0x20, + "GL_GLYPH_VERTICAL_BEARING_X_BIT_NV", }, { - 0x20000000, "GL_FONT_NUM_GLYPH_INDICES_BIT_NV", + 0x20000000, + "GL_FONT_NUM_GLYPH_INDICES_BIT_NV", }, { - 0x2400, "GL_EYE_LINEAR_CHROMIUM", + 0x2400, + "GL_EYE_LINEAR_CHROMIUM", }, { - 0x2401, "GL_OBJECT_LINEAR_CHROMIUM", + 0x2401, + "GL_OBJECT_LINEAR_CHROMIUM", }, { - 0x2600, "GL_NEAREST", + 0x2600, + "GL_NEAREST", }, { - 0x2601, "GL_LINEAR", + 0x2601, + "GL_LINEAR", }, { - 0x2700, "GL_NEAREST_MIPMAP_NEAREST", + 0x2700, + "GL_NEAREST_MIPMAP_NEAREST", }, { - 0x2701, "GL_LINEAR_MIPMAP_NEAREST", + 0x2701, + "GL_LINEAR_MIPMAP_NEAREST", }, { - 0x2702, "GL_NEAREST_MIPMAP_LINEAR", + 0x2702, + "GL_NEAREST_MIPMAP_LINEAR", }, { - 0x2703, "GL_LINEAR_MIPMAP_LINEAR", + 0x2703, + "GL_LINEAR_MIPMAP_LINEAR", }, { - 0x2800, "GL_TEXTURE_MAG_FILTER", + 0x2800, + "GL_TEXTURE_MAG_FILTER", }, { - 0x2801, "GL_TEXTURE_MIN_FILTER", + 0x2801, + "GL_TEXTURE_MIN_FILTER", }, { - 0x2802, "GL_TEXTURE_WRAP_S", + 0x2802, + "GL_TEXTURE_WRAP_S", }, { - 0x2803, "GL_TEXTURE_WRAP_T", + 0x2803, + "GL_TEXTURE_WRAP_T", }, { - 0x2901, "GL_REPEAT", + 0x2901, + "GL_REPEAT", }, { - 0x2A00, "GL_POLYGON_OFFSET_UNITS", + 0x2A00, + "GL_POLYGON_OFFSET_UNITS", }, { - 0x2A01, "GL_POLYGON_OFFSET_POINT_NV", + 0x2A01, + "GL_POLYGON_OFFSET_POINT_NV", }, { - 0x2A02, "GL_POLYGON_OFFSET_LINE_NV", + 0x2A02, + "GL_POLYGON_OFFSET_LINE_NV", }, { - 0x3000, "GL_CLIP_DISTANCE0_APPLE", + 0x3000, + "GL_CLIP_DISTANCE0_APPLE", }, { - 0x3001, "GL_CLIP_DISTANCE1_APPLE", + 0x3001, + "GL_CLIP_DISTANCE1_APPLE", }, { - 0x3002, "GL_CLIP_DISTANCE2_APPLE", + 0x3002, + "GL_CLIP_DISTANCE2_APPLE", }, { - 0x3003, "GL_CLIP_DISTANCE3_APPLE", + 0x3003, + "GL_CLIP_DISTANCE3_APPLE", }, { - 0x3004, "GL_CLIP_DISTANCE4_APPLE", + 0x3004, + "GL_CLIP_DISTANCE4_APPLE", }, { - 0x3005, "GL_CLIP_DISTANCE5_APPLE", + 0x3005, + "GL_CLIP_DISTANCE5_APPLE", }, { - 0x3006, "GL_CLIP_DISTANCE6_APPLE", + 0x3006, + "GL_CLIP_DISTANCE6_APPLE", }, { - 0x3007, "GL_CLIP_DISTANCE7_APPLE", + 0x3007, + "GL_CLIP_DISTANCE7_APPLE", }, { - 0x300E, "GL_CONTEXT_LOST", + 0x300E, + "GL_CONTEXT_LOST", }, { - 0x4, "GL_CA_LAYER_EDGE_BOTTOM_CHROMIUM", + 0x4, + "GL_CA_LAYER_EDGE_BOTTOM_CHROMIUM", }, { - 0x40, "GL_GLYPH_VERTICAL_BEARING_Y_BIT_NV", + 0x40, + "GL_GLYPH_VERTICAL_BEARING_Y_BIT_NV", }, { - 0x40000000, "GL_MULTISAMPLE_BUFFER_BIT6_QCOM", + 0x40000000, + "GL_MULTISAMPLE_BUFFER_BIT6_QCOM", }, { - 0x6000, "GL_SCANOUT_CHROMIUM", + 0x6000, + "GL_SCANOUT_CHROMIUM", }, { - 0x6003, "GL_GET_ERROR_QUERY_CHROMIUM", + 0x6003, + "GL_GET_ERROR_QUERY_CHROMIUM", }, { - 0x6004, "GL_COMMANDS_ISSUED_CHROMIUM", + 0x6004, + "GL_COMMANDS_ISSUED_CHROMIUM", }, { - 0x6006, "GL_ASYNC_PIXEL_PACK_COMPLETED_CHROMIUM", + 0x6006, + "GL_ASYNC_PIXEL_PACK_COMPLETED_CHROMIUM", }, { - 0x6007, "GL_LATENCY_QUERY_CHROMIUM", + 0x6007, + "GL_LATENCY_QUERY_CHROMIUM", }, { - 0x78EC, "GL_PIXEL_UNPACK_TRANSFER_BUFFER_CHROMIUM", + 0x78EC, + "GL_PIXEL_UNPACK_TRANSFER_BUFFER_CHROMIUM", }, { - 0x78ED, "GL_PIXEL_PACK_TRANSFER_BUFFER_CHROMIUM", + 0x78ED, + "GL_PIXEL_PACK_TRANSFER_BUFFER_CHROMIUM", }, { - 0x78EE, "GL_PIXEL_PACK_TRANSFER_BUFFER_BINDING_CHROMIUM", + 0x78EE, + "GL_PIXEL_PACK_TRANSFER_BUFFER_BINDING_CHROMIUM", }, { - 0x78EF, "GL_PIXEL_UNPACK_TRANSFER_BUFFER_BINDING_CHROMIUM", + 0x78EF, + "GL_PIXEL_UNPACK_TRANSFER_BUFFER_BINDING_CHROMIUM", }, { - 0x78FA, "GL_RGB_YCRCB_420_CHROMIUM", + 0x78FA, + "GL_RGB_YCRCB_420_CHROMIUM", }, { - 0x78FB, "GL_RGB_YCBCR_422_CHROMIUM", + 0x78FB, + "GL_RGB_YCBCR_422_CHROMIUM", }, { - 0x78FC, "GL_RGB_YCBCR_420V_CHROMIUM", + 0x78FC, + "GL_RGB_YCBCR_420V_CHROMIUM", }, { - 0x8, "GL_CA_LAYER_EDGE_TOP_CHROMIUM", + 0x8, + "GL_CA_LAYER_EDGE_TOP_CHROMIUM", }, { - 0x80, "GL_GLYPH_VERTICAL_BEARING_ADVANCE_BIT_NV", + 0x80, + "GL_GLYPH_VERTICAL_BEARING_ADVANCE_BIT_NV", }, { - 0x80000000, "GL_MULTISAMPLE_BUFFER_BIT7_QCOM", + 0x80000000, + "GL_MULTISAMPLE_BUFFER_BIT7_QCOM", }, { - 0x8001, "GL_CONSTANT_COLOR", + 0x8001, + "GL_CONSTANT_COLOR", }, { - 0x8002, "GL_ONE_MINUS_CONSTANT_COLOR", + 0x8002, + "GL_ONE_MINUS_CONSTANT_COLOR", }, { - 0x8003, "GL_CONSTANT_ALPHA", + 0x8003, + "GL_CONSTANT_ALPHA", }, { - 0x8004, "GL_ONE_MINUS_CONSTANT_ALPHA", + 0x8004, + "GL_ONE_MINUS_CONSTANT_ALPHA", }, { - 0x8005, "GL_BLEND_COLOR", + 0x8005, + "GL_BLEND_COLOR", }, { - 0x8006, "GL_FUNC_ADD", + 0x8006, + "GL_FUNC_ADD", }, { - 0x8007, "GL_MIN", + 0x8007, + "GL_MIN", }, { - 0x8008, "GL_MAX", + 0x8008, + "GL_MAX", }, { - 0x8009, "GL_BLEND_EQUATION", + 0x8009, + "GL_BLEND_EQUATION", }, { - 0x800A, "GL_FUNC_SUBTRACT", + 0x800A, + "GL_FUNC_SUBTRACT", }, { - 0x800B, "GL_FUNC_REVERSE_SUBTRACT", + 0x800B, + "GL_FUNC_REVERSE_SUBTRACT", }, { - 0x8033, "GL_UNSIGNED_SHORT_4_4_4_4", + 0x8033, + "GL_UNSIGNED_SHORT_4_4_4_4", }, { - 0x8034, "GL_UNSIGNED_SHORT_5_5_5_1", + 0x8034, + "GL_UNSIGNED_SHORT_5_5_5_1", }, { - 0x8037, "GL_POLYGON_OFFSET_FILL", + 0x8037, + "GL_POLYGON_OFFSET_FILL", }, { - 0x8038, "GL_POLYGON_OFFSET_FACTOR", + 0x8038, + "GL_POLYGON_OFFSET_FACTOR", }, { - 0x803C, "GL_ALPHA8_OES", + 0x803C, + "GL_ALPHA8_OES", }, { - 0x8040, "GL_LUMINANCE8_OES", + 0x8040, + "GL_LUMINANCE8_OES", }, { - 0x8043, "GL_LUMINANCE4_ALPHA4_OES", + 0x8043, + "GL_LUMINANCE4_ALPHA4_OES", }, { - 0x8045, "GL_LUMINANCE8_ALPHA8_OES", + 0x8045, + "GL_LUMINANCE8_ALPHA8_OES", }, { - 0x8051, "GL_RGB8_OES", + 0x8051, + "GL_RGB8_OES", }, { - 0x8052, "GL_RGB10_EXT", + 0x8052, + "GL_RGB10_EXT", }, { - 0x8054, "GL_RGB16_EXT", + 0x8054, + "GL_RGB16_EXT", }, { - 0x8056, "GL_RGBA4", + 0x8056, + "GL_RGBA4", }, { - 0x8057, "GL_RGB5_A1", + 0x8057, + "GL_RGB5_A1", }, { - 0x8058, "GL_RGBA8_OES", + 0x8058, + "GL_RGBA8_OES", }, { - 0x8059, "GL_RGB10_A2_EXT", + 0x8059, + "GL_RGB10_A2_EXT", }, { - 0x805B, "GL_RGBA16_EXT", + 0x805B, + "GL_RGBA16_EXT", }, { - 0x805C, "GL_TEXTURE_RED_SIZE", + 0x805C, + "GL_TEXTURE_RED_SIZE", }, { - 0x805D, "GL_TEXTURE_GREEN_SIZE", + 0x805D, + "GL_TEXTURE_GREEN_SIZE", }, { - 0x805E, "GL_TEXTURE_BLUE_SIZE", + 0x805E, + "GL_TEXTURE_BLUE_SIZE", }, { - 0x805F, "GL_TEXTURE_ALPHA_SIZE", + 0x805F, + "GL_TEXTURE_ALPHA_SIZE", }, { - 0x8069, "GL_TEXTURE_BINDING_2D", + 0x8069, + "GL_TEXTURE_BINDING_2D", }, { - 0x806A, "GL_TEXTURE_BINDING_3D_OES", + 0x806A, + "GL_TEXTURE_BINDING_3D_OES", }, { - 0x806D, "GL_UNPACK_SKIP_IMAGES", + 0x806D, + "GL_UNPACK_SKIP_IMAGES", }, { - 0x806E, "GL_UNPACK_IMAGE_HEIGHT", + 0x806E, + "GL_UNPACK_IMAGE_HEIGHT", }, { - 0x806F, "GL_TEXTURE_3D_OES", + 0x806F, + "GL_TEXTURE_3D_OES", }, { - 0x8071, "GL_TEXTURE_DEPTH", + 0x8071, + "GL_TEXTURE_DEPTH", }, { - 0x8072, "GL_TEXTURE_WRAP_R_OES", + 0x8072, + "GL_TEXTURE_WRAP_R_OES", }, { - 0x8073, "GL_MAX_3D_TEXTURE_SIZE_OES", + 0x8073, + "GL_MAX_3D_TEXTURE_SIZE_OES", }, { - 0x8074, "GL_VERTEX_ARRAY_KHR", + 0x8074, + "GL_VERTEX_ARRAY_KHR", }, { - 0x809D, "GL_MULTISAMPLE_EXT", + 0x809D, + "GL_MULTISAMPLE_EXT", }, { - 0x809E, "GL_SAMPLE_ALPHA_TO_COVERAGE", + 0x809E, + "GL_SAMPLE_ALPHA_TO_COVERAGE", }, { - 0x809F, "GL_SAMPLE_ALPHA_TO_ONE_EXT", + 0x809F, + "GL_SAMPLE_ALPHA_TO_ONE_EXT", }, { - 0x80A0, "GL_SAMPLE_COVERAGE", + 0x80A0, + "GL_SAMPLE_COVERAGE", }, { - 0x80A8, "GL_SAMPLE_BUFFERS", + 0x80A8, + "GL_SAMPLE_BUFFERS", }, { - 0x80A9, "GL_SAMPLES", + 0x80A9, + "GL_SAMPLES", }, { - 0x80AA, "GL_SAMPLE_COVERAGE_VALUE", + 0x80AA, + "GL_SAMPLE_COVERAGE_VALUE", }, { - 0x80AB, "GL_SAMPLE_COVERAGE_INVERT", + 0x80AB, + "GL_SAMPLE_COVERAGE_INVERT", }, { - 0x80C8, "GL_BLEND_DST_RGB", + 0x80C8, + "GL_BLEND_DST_RGB", }, { - 0x80C9, "GL_BLEND_SRC_RGB", + 0x80C9, + "GL_BLEND_SRC_RGB", }, { - 0x80CA, "GL_BLEND_DST_ALPHA", + 0x80CA, + "GL_BLEND_DST_ALPHA", }, { - 0x80CB, "GL_BLEND_SRC_ALPHA", + 0x80CB, + "GL_BLEND_SRC_ALPHA", }, { - 0x80E1, "GL_BGRA_EXT", + 0x80E1, + "GL_BGRA_EXT", }, { - 0x80E8, "GL_MAX_ELEMENTS_VERTICES", + 0x80E8, + "GL_MAX_ELEMENTS_VERTICES", }, { - 0x80E9, "GL_MAX_ELEMENTS_INDICES", + 0x80E9, + "GL_MAX_ELEMENTS_INDICES", }, { - 0x812D, "GL_CLAMP_TO_BORDER_OES", + 0x812D, + "GL_CLAMP_TO_BORDER_OES", }, { - 0x812F, "GL_CLAMP_TO_EDGE", + 0x812F, + "GL_CLAMP_TO_EDGE", }, { - 0x813A, "GL_TEXTURE_MIN_LOD", + 0x813A, + "GL_TEXTURE_MIN_LOD", }, { - 0x813B, "GL_TEXTURE_MAX_LOD", + 0x813B, + "GL_TEXTURE_MAX_LOD", }, { - 0x813C, "GL_TEXTURE_BASE_LEVEL", + 0x813C, + "GL_TEXTURE_BASE_LEVEL", }, { - 0x813D, "GL_TEXTURE_MAX_LEVEL_APPLE", + 0x813D, + "GL_TEXTURE_MAX_LEVEL_APPLE", }, { - 0x8192, "GL_GENERATE_MIPMAP_HINT", + 0x8192, + "GL_GENERATE_MIPMAP_HINT", }, { - 0x81A5, "GL_DEPTH_COMPONENT16", + 0x81A5, + "GL_DEPTH_COMPONENT16", }, { - 0x81A6, "GL_DEPTH_COMPONENT24_OES", + 0x81A6, + "GL_DEPTH_COMPONENT24_OES", }, { - 0x81A7, "GL_DEPTH_COMPONENT32_OES", + 0x81A7, + "GL_DEPTH_COMPONENT32_OES", }, { - 0x8210, "GL_FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING_EXT", + 0x8210, + "GL_FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING_EXT", }, { - 0x8211, "GL_FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE_EXT", + 0x8211, + "GL_FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE_EXT", }, { - 0x8212, "GL_FRAMEBUFFER_ATTACHMENT_RED_SIZE", + 0x8212, + "GL_FRAMEBUFFER_ATTACHMENT_RED_SIZE", }, { - 0x8213, "GL_FRAMEBUFFER_ATTACHMENT_GREEN_SIZE", + 0x8213, + "GL_FRAMEBUFFER_ATTACHMENT_GREEN_SIZE", }, { - 0x8214, "GL_FRAMEBUFFER_ATTACHMENT_BLUE_SIZE", + 0x8214, + "GL_FRAMEBUFFER_ATTACHMENT_BLUE_SIZE", }, { - 0x8215, "GL_FRAMEBUFFER_ATTACHMENT_ALPHA_SIZE", + 0x8215, + "GL_FRAMEBUFFER_ATTACHMENT_ALPHA_SIZE", }, { - 0x8216, "GL_FRAMEBUFFER_ATTACHMENT_DEPTH_SIZE", + 0x8216, + "GL_FRAMEBUFFER_ATTACHMENT_DEPTH_SIZE", }, { - 0x8217, "GL_FRAMEBUFFER_ATTACHMENT_STENCIL_SIZE", + 0x8217, + "GL_FRAMEBUFFER_ATTACHMENT_STENCIL_SIZE", }, { - 0x8218, "GL_FRAMEBUFFER_DEFAULT", + 0x8218, + "GL_FRAMEBUFFER_DEFAULT", }, { - 0x8219, "GL_FRAMEBUFFER_UNDEFINED_OES", + 0x8219, + "GL_FRAMEBUFFER_UNDEFINED_OES", }, { - 0x821A, "GL_DEPTH_STENCIL_ATTACHMENT", + 0x821A, + "GL_DEPTH_STENCIL_ATTACHMENT", }, { - 0x821B, "GL_MAJOR_VERSION", + 0x821B, + "GL_MAJOR_VERSION", }, { - 0x821C, "GL_MINOR_VERSION", + 0x821C, + "GL_MINOR_VERSION", }, { - 0x821D, "GL_NUM_EXTENSIONS", + 0x821D, + "GL_NUM_EXTENSIONS", }, { - 0x821F, "GL_BUFFER_IMMUTABLE_STORAGE_EXT", + 0x821F, + "GL_BUFFER_IMMUTABLE_STORAGE_EXT", }, { - 0x8220, "GL_BUFFER_STORAGE_FLAGS_EXT", + 0x8220, + "GL_BUFFER_STORAGE_FLAGS_EXT", }, { - 0x8221, "GL_PRIMITIVE_RESTART_FOR_PATCHES_SUPPORTED_OES", + 0x8221, + "GL_PRIMITIVE_RESTART_FOR_PATCHES_SUPPORTED_OES", }, { - 0x8227, "GL_RG_EXT", + 0x8227, + "GL_RG_EXT", }, { - 0x8228, "GL_RG_INTEGER", + 0x8228, + "GL_RG_INTEGER", }, { - 0x8229, "GL_R8_EXT", + 0x8229, + "GL_R8_EXT", }, { - 0x822A, "GL_R16_EXT", + 0x822A, + "GL_R16_EXT", }, { - 0x822B, "GL_RG8_EXT", + 0x822B, + "GL_RG8_EXT", }, { - 0x822C, "GL_RG16_EXT", + 0x822C, + "GL_RG16_EXT", }, { - 0x822D, "GL_R16F_EXT", + 0x822D, + "GL_R16F_EXT", }, { - 0x822E, "GL_R32F_EXT", + 0x822E, + "GL_R32F_EXT", }, { - 0x822F, "GL_RG16F_EXT", + 0x822F, + "GL_RG16F_EXT", }, { - 0x8230, "GL_RG32F_EXT", + 0x8230, + "GL_RG32F_EXT", }, { - 0x8231, "GL_R8I", + 0x8231, + "GL_R8I", }, { - 0x8232, "GL_R8UI", + 0x8232, + "GL_R8UI", }, { - 0x8233, "GL_R16I", + 0x8233, + "GL_R16I", }, { - 0x8234, "GL_R16UI", + 0x8234, + "GL_R16UI", }, { - 0x8235, "GL_R32I", + 0x8235, + "GL_R32I", }, { - 0x8236, "GL_R32UI", + 0x8236, + "GL_R32UI", }, { - 0x8237, "GL_RG8I", + 0x8237, + "GL_RG8I", }, { - 0x8238, "GL_RG8UI", + 0x8238, + "GL_RG8UI", }, { - 0x8239, "GL_RG16I", + 0x8239, + "GL_RG16I", }, { - 0x823A, "GL_RG16UI", + 0x823A, + "GL_RG16UI", }, { - 0x823B, "GL_RG32I", + 0x823B, + "GL_RG32I", }, { - 0x823C, "GL_RG32UI", + 0x823C, + "GL_RG32UI", }, { - 0x8242, "GL_DEBUG_OUTPUT_SYNCHRONOUS_KHR", + 0x8242, + "GL_DEBUG_OUTPUT_SYNCHRONOUS_KHR", }, { - 0x8243, "GL_DEBUG_NEXT_LOGGED_MESSAGE_LENGTH_KHR", + 0x8243, + "GL_DEBUG_NEXT_LOGGED_MESSAGE_LENGTH_KHR", }, { - 0x8244, "GL_DEBUG_CALLBACK_FUNCTION_KHR", + 0x8244, + "GL_DEBUG_CALLBACK_FUNCTION_KHR", }, { - 0x8245, "GL_DEBUG_CALLBACK_USER_PARAM_KHR", + 0x8245, + "GL_DEBUG_CALLBACK_USER_PARAM_KHR", }, { - 0x8246, "GL_DEBUG_SOURCE_API_KHR", + 0x8246, + "GL_DEBUG_SOURCE_API_KHR", }, { - 0x8247, "GL_DEBUG_SOURCE_WINDOW_SYSTEM_KHR", + 0x8247, + "GL_DEBUG_SOURCE_WINDOW_SYSTEM_KHR", }, { - 0x8248, "GL_DEBUG_SOURCE_SHADER_COMPILER_KHR", + 0x8248, + "GL_DEBUG_SOURCE_SHADER_COMPILER_KHR", }, { - 0x8249, "GL_DEBUG_SOURCE_THIRD_PARTY_KHR", + 0x8249, + "GL_DEBUG_SOURCE_THIRD_PARTY_KHR", }, { - 0x824A, "GL_DEBUG_SOURCE_APPLICATION_KHR", + 0x824A, + "GL_DEBUG_SOURCE_APPLICATION_KHR", }, { - 0x824B, "GL_DEBUG_SOURCE_OTHER_KHR", + 0x824B, + "GL_DEBUG_SOURCE_OTHER_KHR", }, { - 0x824C, "GL_DEBUG_TYPE_ERROR_KHR", + 0x824C, + "GL_DEBUG_TYPE_ERROR_KHR", }, { - 0x824D, "GL_DEBUG_TYPE_DEPRECATED_BEHAVIOR_KHR", + 0x824D, + "GL_DEBUG_TYPE_DEPRECATED_BEHAVIOR_KHR", }, { - 0x824E, "GL_DEBUG_TYPE_UNDEFINED_BEHAVIOR_KHR", + 0x824E, + "GL_DEBUG_TYPE_UNDEFINED_BEHAVIOR_KHR", }, { - 0x824F, "GL_DEBUG_TYPE_PORTABILITY_KHR", + 0x824F, + "GL_DEBUG_TYPE_PORTABILITY_KHR", }, { - 0x8250, "GL_DEBUG_TYPE_PERFORMANCE_KHR", + 0x8250, + "GL_DEBUG_TYPE_PERFORMANCE_KHR", }, { - 0x8251, "GL_DEBUG_TYPE_OTHER_KHR", + 0x8251, + "GL_DEBUG_TYPE_OTHER_KHR", }, { - 0x8252, "GL_LOSE_CONTEXT_ON_RESET_KHR", + 0x8252, + "GL_LOSE_CONTEXT_ON_RESET_KHR", }, { - 0x8253, "GL_GUILTY_CONTEXT_RESET_KHR", + 0x8253, + "GL_GUILTY_CONTEXT_RESET_KHR", }, { - 0x8254, "GL_INNOCENT_CONTEXT_RESET_KHR", + 0x8254, + "GL_INNOCENT_CONTEXT_RESET_KHR", }, { - 0x8255, "GL_UNKNOWN_CONTEXT_RESET_KHR", + 0x8255, + "GL_UNKNOWN_CONTEXT_RESET_KHR", }, { - 0x8256, "GL_RESET_NOTIFICATION_STRATEGY_KHR", + 0x8256, + "GL_RESET_NOTIFICATION_STRATEGY_KHR", }, { - 0x8257, "GL_PROGRAM_BINARY_RETRIEVABLE_HINT", + 0x8257, + "GL_PROGRAM_BINARY_RETRIEVABLE_HINT", }, { - 0x8258, "GL_PROGRAM_SEPARABLE_EXT", + 0x8258, + "GL_PROGRAM_SEPARABLE_EXT", }, { - 0x8259, "GL_ACTIVE_PROGRAM_EXT", + 0x8259, + "GL_ACTIVE_PROGRAM_EXT", }, { - 0x825A, "GL_PROGRAM_PIPELINE_BINDING_EXT", + 0x825A, + "GL_PROGRAM_PIPELINE_BINDING_EXT", }, { - 0x825B, "GL_MAX_VIEWPORTS_OES", + 0x825B, + "GL_MAX_VIEWPORTS_OES", }, { - 0x825C, "GL_VIEWPORT_SUBPIXEL_BITS_OES", + 0x825C, + "GL_VIEWPORT_SUBPIXEL_BITS_OES", }, { - 0x825D, "GL_VIEWPORT_BOUNDS_RANGE_OES", + 0x825D, + "GL_VIEWPORT_BOUNDS_RANGE_OES", }, { - 0x825E, "GL_LAYER_PROVOKING_VERTEX_OES", + 0x825E, + "GL_LAYER_PROVOKING_VERTEX_OES", }, { - 0x825F, "GL_VIEWPORT_INDEX_PROVOKING_VERTEX_OES", + 0x825F, + "GL_VIEWPORT_INDEX_PROVOKING_VERTEX_OES", }, { - 0x8260, "GL_UNDEFINED_VERTEX_OES", + 0x8260, + "GL_UNDEFINED_VERTEX_OES", }, { - 0x8261, "GL_NO_RESET_NOTIFICATION_KHR", + 0x8261, + "GL_NO_RESET_NOTIFICATION_KHR", }, { - 0x8262, "GL_MAX_COMPUTE_SHARED_MEMORY_SIZE", + 0x8262, + "GL_MAX_COMPUTE_SHARED_MEMORY_SIZE", }, { - 0x8263, "GL_MAX_COMPUTE_UNIFORM_COMPONENTS", + 0x8263, + "GL_MAX_COMPUTE_UNIFORM_COMPONENTS", }, { - 0x8264, "GL_MAX_COMPUTE_ATOMIC_COUNTER_BUFFERS", + 0x8264, + "GL_MAX_COMPUTE_ATOMIC_COUNTER_BUFFERS", }, { - 0x8265, "GL_MAX_COMPUTE_ATOMIC_COUNTERS", + 0x8265, + "GL_MAX_COMPUTE_ATOMIC_COUNTERS", }, { - 0x8266, "GL_MAX_COMBINED_COMPUTE_UNIFORM_COMPONENTS", + 0x8266, + "GL_MAX_COMBINED_COMPUTE_UNIFORM_COMPONENTS", }, { - 0x8267, "GL_COMPUTE_WORK_GROUP_SIZE", + 0x8267, + "GL_COMPUTE_WORK_GROUP_SIZE", }, { - 0x8268, "GL_DEBUG_TYPE_MARKER_KHR", + 0x8268, + "GL_DEBUG_TYPE_MARKER_KHR", }, { - 0x8269, "GL_DEBUG_TYPE_PUSH_GROUP_KHR", + 0x8269, + "GL_DEBUG_TYPE_PUSH_GROUP_KHR", }, { - 0x826A, "GL_DEBUG_TYPE_POP_GROUP_KHR", + 0x826A, + "GL_DEBUG_TYPE_POP_GROUP_KHR", }, { - 0x826B, "GL_DEBUG_SEVERITY_NOTIFICATION_KHR", + 0x826B, + "GL_DEBUG_SEVERITY_NOTIFICATION_KHR", }, { - 0x826C, "GL_MAX_DEBUG_GROUP_STACK_DEPTH_KHR", + 0x826C, + "GL_MAX_DEBUG_GROUP_STACK_DEPTH_KHR", }, { - 0x826D, "GL_DEBUG_GROUP_STACK_DEPTH_KHR", + 0x826D, + "GL_DEBUG_GROUP_STACK_DEPTH_KHR", }, { - 0x826E, "GL_MAX_UNIFORM_LOCATIONS", + 0x826E, + "GL_MAX_UNIFORM_LOCATIONS", }, { - 0x82D4, "GL_VERTEX_ATTRIB_BINDING", + 0x82D4, + "GL_VERTEX_ATTRIB_BINDING", }, { - 0x82D5, "GL_VERTEX_ATTRIB_RELATIVE_OFFSET", + 0x82D5, + "GL_VERTEX_ATTRIB_RELATIVE_OFFSET", }, { - 0x82D6, "GL_VERTEX_BINDING_DIVISOR", + 0x82D6, + "GL_VERTEX_BINDING_DIVISOR", }, { - 0x82D7, "GL_VERTEX_BINDING_OFFSET", + 0x82D7, + "GL_VERTEX_BINDING_OFFSET", }, { - 0x82D8, "GL_VERTEX_BINDING_STRIDE", + 0x82D8, + "GL_VERTEX_BINDING_STRIDE", }, { - 0x82D9, "GL_MAX_VERTEX_ATTRIB_RELATIVE_OFFSET", + 0x82D9, + "GL_MAX_VERTEX_ATTRIB_RELATIVE_OFFSET", }, { - 0x82DA, "GL_MAX_VERTEX_ATTRIB_BINDINGS", + 0x82DA, + "GL_MAX_VERTEX_ATTRIB_BINDINGS", }, { - 0x82DB, "GL_TEXTURE_VIEW_MIN_LEVEL_OES", + 0x82DB, + "GL_TEXTURE_VIEW_MIN_LEVEL_OES", }, { - 0x82DC, "GL_TEXTURE_VIEW_NUM_LEVELS_OES", + 0x82DC, + "GL_TEXTURE_VIEW_NUM_LEVELS_OES", }, { - 0x82DD, "GL_TEXTURE_VIEW_MIN_LAYER_OES", + 0x82DD, + "GL_TEXTURE_VIEW_MIN_LAYER_OES", }, { - 0x82DE, "GL_TEXTURE_VIEW_NUM_LAYERS_OES", + 0x82DE, + "GL_TEXTURE_VIEW_NUM_LAYERS_OES", }, { - 0x82DF, "GL_TEXTURE_IMMUTABLE_LEVELS", + 0x82DF, + "GL_TEXTURE_IMMUTABLE_LEVELS", }, { - 0x82E0, "GL_BUFFER_KHR", + 0x82E0, + "GL_BUFFER_KHR", }, { - 0x82E1, "GL_SHADER_KHR", + 0x82E1, + "GL_SHADER_KHR", }, { - 0x82E2, "GL_PROGRAM_KHR", + 0x82E2, + "GL_PROGRAM_KHR", }, { - 0x82E3, "GL_QUERY_KHR", + 0x82E3, + "GL_QUERY_KHR", }, { - 0x82E4, "GL_PROGRAM_PIPELINE_KHR", + 0x82E4, + "GL_PROGRAM_PIPELINE_KHR", }, { - 0x82E5, "GL_MAX_VERTEX_ATTRIB_STRIDE", + 0x82E5, + "GL_MAX_VERTEX_ATTRIB_STRIDE", }, { - 0x82E6, "GL_SAMPLER_KHR", + 0x82E6, + "GL_SAMPLER_KHR", }, { - 0x82E8, "GL_MAX_LABEL_LENGTH_KHR", + 0x82E8, + "GL_MAX_LABEL_LENGTH_KHR", }, { - 0x82F9, "GL_MAX_CULL_DISTANCES_EXT", + 0x82F9, + "GL_MAX_CULL_DISTANCES_EXT", }, { - 0x82FA, "GL_MAX_COMBINED_CLIP_AND_CULL_DISTANCES_EXT", + 0x82FA, + "GL_MAX_COMBINED_CLIP_AND_CULL_DISTANCES_EXT", }, { - 0x82FB, "GL_CONTEXT_RELEASE_BEHAVIOR_KHR", + 0x82FB, + "GL_CONTEXT_RELEASE_BEHAVIOR_KHR", }, { - 0x82FC, "GL_CONTEXT_RELEASE_BEHAVIOR_FLUSH_KHR", + 0x82FC, + "GL_CONTEXT_RELEASE_BEHAVIOR_FLUSH_KHR", }, { - 0x8363, "GL_UNSIGNED_SHORT_5_6_5", + 0x8363, + "GL_UNSIGNED_SHORT_5_6_5", }, { - 0x8365, "GL_UNSIGNED_SHORT_4_4_4_4_REV_EXT", + 0x8365, + "GL_UNSIGNED_SHORT_4_4_4_4_REV_EXT", }, { - 0x8366, "GL_UNSIGNED_SHORT_1_5_5_5_REV_EXT", + 0x8366, + "GL_UNSIGNED_SHORT_1_5_5_5_REV_EXT", }, { - 0x8368, "GL_UNSIGNED_INT_2_10_10_10_REV_EXT", + 0x8368, + "GL_UNSIGNED_INT_2_10_10_10_REV_EXT", }, { - 0x8370, "GL_MIRRORED_REPEAT", + 0x8370, + "GL_MIRRORED_REPEAT", }, { - 0x83F0, "GL_COMPRESSED_RGB_S3TC_DXT1_EXT", + 0x83F0, + "GL_COMPRESSED_RGB_S3TC_DXT1_EXT", }, { - 0x83F1, "GL_COMPRESSED_RGBA_S3TC_DXT1_EXT", + 0x83F1, + "GL_COMPRESSED_RGBA_S3TC_DXT1_EXT", }, { - 0x83F2, "GL_COMPRESSED_RGBA_S3TC_DXT3_ANGLE", + 0x83F2, + "GL_COMPRESSED_RGBA_S3TC_DXT3_ANGLE", }, { - 0x83F3, "GL_COMPRESSED_RGBA_S3TC_DXT5_ANGLE", + 0x83F3, + "GL_COMPRESSED_RGBA_S3TC_DXT5_ANGLE", }, { - 0x83F9, "GL_PERFQUERY_DONOT_FLUSH_INTEL", + 0x83F9, + "GL_PERFQUERY_DONOT_FLUSH_INTEL", }, { - 0x83FA, "GL_PERFQUERY_FLUSH_INTEL", + 0x83FA, + "GL_PERFQUERY_FLUSH_INTEL", }, { - 0x83FB, "GL_PERFQUERY_WAIT_INTEL", + 0x83FB, + "GL_PERFQUERY_WAIT_INTEL", }, { - 0x83FE, "GL_CONSERVATIVE_RASTERIZATION_INTEL", + 0x83FE, + "GL_CONSERVATIVE_RASTERIZATION_INTEL", }, { - 0x846D, "GL_ALIASED_POINT_SIZE_RANGE", + 0x846D, + "GL_ALIASED_POINT_SIZE_RANGE", }, { - 0x846E, "GL_ALIASED_LINE_WIDTH_RANGE", + 0x846E, + "GL_ALIASED_LINE_WIDTH_RANGE", }, { - 0x84C0, "GL_TEXTURE0", + 0x84C0, + "GL_TEXTURE0", }, { - 0x84C1, "GL_TEXTURE1", + 0x84C1, + "GL_TEXTURE1", }, { - 0x84C2, "GL_TEXTURE2", + 0x84C2, + "GL_TEXTURE2", }, { - 0x84C3, "GL_TEXTURE3", + 0x84C3, + "GL_TEXTURE3", }, { - 0x84C4, "GL_TEXTURE4", + 0x84C4, + "GL_TEXTURE4", }, { - 0x84C5, "GL_TEXTURE5", + 0x84C5, + "GL_TEXTURE5", }, { - 0x84C6, "GL_TEXTURE6", + 0x84C6, + "GL_TEXTURE6", }, { - 0x84C7, "GL_TEXTURE7", + 0x84C7, + "GL_TEXTURE7", }, { - 0x84C8, "GL_TEXTURE8", + 0x84C8, + "GL_TEXTURE8", }, { - 0x84C9, "GL_TEXTURE9", + 0x84C9, + "GL_TEXTURE9", }, { - 0x84CA, "GL_TEXTURE10", + 0x84CA, + "GL_TEXTURE10", }, { - 0x84CB, "GL_TEXTURE11", + 0x84CB, + "GL_TEXTURE11", }, { - 0x84CC, "GL_TEXTURE12", + 0x84CC, + "GL_TEXTURE12", }, { - 0x84CD, "GL_TEXTURE13", + 0x84CD, + "GL_TEXTURE13", }, { - 0x84CE, "GL_TEXTURE14", + 0x84CE, + "GL_TEXTURE14", }, { - 0x84CF, "GL_TEXTURE15", + 0x84CF, + "GL_TEXTURE15", }, { - 0x84D0, "GL_TEXTURE16", + 0x84D0, + "GL_TEXTURE16", }, { - 0x84D1, "GL_TEXTURE17", + 0x84D1, + "GL_TEXTURE17", }, { - 0x84D2, "GL_TEXTURE18", + 0x84D2, + "GL_TEXTURE18", }, { - 0x84D3, "GL_TEXTURE19", + 0x84D3, + "GL_TEXTURE19", }, { - 0x84D4, "GL_TEXTURE20", + 0x84D4, + "GL_TEXTURE20", }, { - 0x84D5, "GL_TEXTURE21", + 0x84D5, + "GL_TEXTURE21", }, { - 0x84D6, "GL_TEXTURE22", + 0x84D6, + "GL_TEXTURE22", }, { - 0x84D7, "GL_TEXTURE23", + 0x84D7, + "GL_TEXTURE23", }, { - 0x84D8, "GL_TEXTURE24", + 0x84D8, + "GL_TEXTURE24", }, { - 0x84D9, "GL_TEXTURE25", + 0x84D9, + "GL_TEXTURE25", }, { - 0x84DA, "GL_TEXTURE26", + 0x84DA, + "GL_TEXTURE26", }, { - 0x84DB, "GL_TEXTURE27", + 0x84DB, + "GL_TEXTURE27", }, { - 0x84DC, "GL_TEXTURE28", + 0x84DC, + "GL_TEXTURE28", }, { - 0x84DD, "GL_TEXTURE29", + 0x84DD, + "GL_TEXTURE29", }, { - 0x84DE, "GL_TEXTURE30", + 0x84DE, + "GL_TEXTURE30", }, { - 0x84DF, "GL_TEXTURE31", + 0x84DF, + "GL_TEXTURE31", }, { - 0x84E0, "GL_ACTIVE_TEXTURE", + 0x84E0, + "GL_ACTIVE_TEXTURE", }, { - 0x84E3, "GL_PATH_TRANSPOSE_MODELVIEW_MATRIX_NV", + 0x84E3, + "GL_PATH_TRANSPOSE_MODELVIEW_MATRIX_NV", }, { - 0x84E4, "GL_PATH_TRANSPOSE_PROJECTION_MATRIX_NV", + 0x84E4, + "GL_PATH_TRANSPOSE_PROJECTION_MATRIX_NV", }, { - 0x84E8, "GL_MAX_RENDERBUFFER_SIZE", + 0x84E8, + "GL_MAX_RENDERBUFFER_SIZE", }, { - 0x84F2, "GL_ALL_COMPLETED_NV", + 0x84F2, + "GL_ALL_COMPLETED_NV", }, { - 0x84F3, "GL_FENCE_STATUS_NV", + 0x84F3, + "GL_FENCE_STATUS_NV", }, { - 0x84F4, "GL_FENCE_CONDITION_NV", + 0x84F4, + "GL_FENCE_CONDITION_NV", }, { - 0x84F5, "GL_TEXTURE_RECTANGLE_ARB", + 0x84F5, + "GL_TEXTURE_RECTANGLE_ARB", }, { - 0x84F6, "GL_TEXTURE_BINDING_RECTANGLE_ARB", + 0x84F6, + "GL_TEXTURE_BINDING_RECTANGLE_ARB", }, { - 0x84F7, "GL_COMMANDS_COMPLETED_CHROMIUM", + 0x84F7, + "GL_COMMANDS_COMPLETED_CHROMIUM", }, { - 0x84F8, "GL_READBACK_SHADOW_COPIES_UPDATED_CHROMIUM", + 0x84F8, + "GL_READBACK_SHADOW_COPIES_UPDATED_CHROMIUM", }, { - 0x84F9, "GL_DEPTH_STENCIL_OES", + 0x84F9, + "GL_DEPTH_STENCIL_OES", }, { - 0x84FA, "GL_UNSIGNED_INT_24_8_OES", + 0x84FA, + "GL_UNSIGNED_INT_24_8_OES", }, { - 0x84FD, "GL_MAX_TEXTURE_LOD_BIAS", + 0x84FD, + "GL_MAX_TEXTURE_LOD_BIAS", }, { - 0x84FE, "GL_TEXTURE_MAX_ANISOTROPY_EXT", + 0x84FE, + "GL_TEXTURE_MAX_ANISOTROPY_EXT", }, { - 0x84FF, "GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT", + 0x84FF, + "GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT", }, { - 0x8507, "GL_INCR_WRAP", + 0x8507, + "GL_INCR_WRAP", }, { - 0x8508, "GL_DECR_WRAP", + 0x8508, + "GL_DECR_WRAP", }, { - 0x8513, "GL_TEXTURE_CUBE_MAP", + 0x8513, + "GL_TEXTURE_CUBE_MAP", }, { - 0x8514, "GL_TEXTURE_BINDING_CUBE_MAP", + 0x8514, + "GL_TEXTURE_BINDING_CUBE_MAP", }, { - 0x8515, "GL_TEXTURE_CUBE_MAP_POSITIVE_X", + 0x8515, + "GL_TEXTURE_CUBE_MAP_POSITIVE_X", }, { - 0x8516, "GL_TEXTURE_CUBE_MAP_NEGATIVE_X", + 0x8516, + "GL_TEXTURE_CUBE_MAP_NEGATIVE_X", }, { - 0x8517, "GL_TEXTURE_CUBE_MAP_POSITIVE_Y", + 0x8517, + "GL_TEXTURE_CUBE_MAP_POSITIVE_Y", }, { - 0x8518, "GL_TEXTURE_CUBE_MAP_NEGATIVE_Y", + 0x8518, + "GL_TEXTURE_CUBE_MAP_NEGATIVE_Y", }, { - 0x8519, "GL_TEXTURE_CUBE_MAP_POSITIVE_Z", + 0x8519, + "GL_TEXTURE_CUBE_MAP_POSITIVE_Z", }, { - 0x851A, "GL_TEXTURE_CUBE_MAP_NEGATIVE_Z", + 0x851A, + "GL_TEXTURE_CUBE_MAP_NEGATIVE_Z", }, { - 0x851C, "GL_MAX_CUBE_MAP_TEXTURE_SIZE", + 0x851C, + "GL_MAX_CUBE_MAP_TEXTURE_SIZE", }, { - 0x8576, "GL_CONSTANT_CHROMIUM", + 0x8576, + "GL_CONSTANT_CHROMIUM", }, { - 0x8589, "GL_SRC1_ALPHA_EXT", + 0x8589, + "GL_SRC1_ALPHA_EXT", }, { - 0x85B5, "GL_VERTEX_ARRAY_BINDING_OES", + 0x85B5, + "GL_VERTEX_ARRAY_BINDING_OES", }, { - 0x85BA, "GL_UNSIGNED_SHORT_8_8_APPLE", + 0x85BA, + "GL_UNSIGNED_SHORT_8_8_APPLE", }, { - 0x85BB, "GL_UNSIGNED_SHORT_8_8_REV_APPLE", + 0x85BB, + "GL_UNSIGNED_SHORT_8_8_REV_APPLE", }, { - 0x8622, "GL_VERTEX_ATTRIB_ARRAY_ENABLED", + 0x8622, + "GL_VERTEX_ATTRIB_ARRAY_ENABLED", }, { - 0x8623, "GL_VERTEX_ATTRIB_ARRAY_SIZE", + 0x8623, + "GL_VERTEX_ATTRIB_ARRAY_SIZE", }, { - 0x8624, "GL_VERTEX_ATTRIB_ARRAY_STRIDE", + 0x8624, + "GL_VERTEX_ATTRIB_ARRAY_STRIDE", }, { - 0x8625, "GL_VERTEX_ATTRIB_ARRAY_TYPE", + 0x8625, + "GL_VERTEX_ATTRIB_ARRAY_TYPE", }, { - 0x8626, "GL_CURRENT_VERTEX_ATTRIB", + 0x8626, + "GL_CURRENT_VERTEX_ATTRIB", }, { - 0x8645, "GL_VERTEX_ATTRIB_ARRAY_POINTER", + 0x8645, + "GL_VERTEX_ATTRIB_ARRAY_POINTER", }, { - 0x86A1, "GL_TEXTURE_COMPRESSED", + 0x86A1, + "GL_TEXTURE_COMPRESSED", }, { - 0x86A2, "GL_NUM_COMPRESSED_TEXTURE_FORMATS", + 0x86A2, + "GL_NUM_COMPRESSED_TEXTURE_FORMATS", }, { - 0x86A3, "GL_COMPRESSED_TEXTURE_FORMATS", + 0x86A3, + "GL_COMPRESSED_TEXTURE_FORMATS", }, { - 0x8740, "GL_Z400_BINARY_AMD", + 0x8740, + "GL_Z400_BINARY_AMD", }, { - 0x8741, "GL_PROGRAM_BINARY_LENGTH_OES", + 0x8741, + "GL_PROGRAM_BINARY_LENGTH_OES", }, { - 0x8764, "GL_BUFFER_SIZE", + 0x8764, + "GL_BUFFER_SIZE", }, { - 0x8765, "GL_BUFFER_USAGE", + 0x8765, + "GL_BUFFER_USAGE", }, { - 0x87EE, "GL_ATC_RGBA_INTERPOLATED_ALPHA_AMD", + 0x87EE, + "GL_ATC_RGBA_INTERPOLATED_ALPHA_AMD", }, { - 0x87F9, "GL_3DC_X_AMD", + 0x87F9, + "GL_3DC_X_AMD", }, { - 0x87FA, "GL_3DC_XY_AMD", + 0x87FA, + "GL_3DC_XY_AMD", }, { - 0x87FE, "GL_NUM_PROGRAM_BINARY_FORMATS_OES", + 0x87FE, + "GL_NUM_PROGRAM_BINARY_FORMATS_OES", }, { - 0x87FF, "GL_PROGRAM_BINARY_FORMATS_OES", + 0x87FF, + "GL_PROGRAM_BINARY_FORMATS_OES", }, { - 0x8800, "GL_STENCIL_BACK_FUNC", + 0x8800, + "GL_STENCIL_BACK_FUNC", }, { - 0x8801, "GL_STENCIL_BACK_FAIL", + 0x8801, + "GL_STENCIL_BACK_FAIL", }, { - 0x8802, "GL_STENCIL_BACK_PASS_DEPTH_FAIL", + 0x8802, + "GL_STENCIL_BACK_PASS_DEPTH_FAIL", }, { - 0x8803, "GL_STENCIL_BACK_PASS_DEPTH_PASS", + 0x8803, + "GL_STENCIL_BACK_PASS_DEPTH_PASS", }, { - 0x8814, "GL_RGBA32F_EXT", + 0x8814, + "GL_RGBA32F_EXT", }, { - 0x8815, "GL_RGB32F_EXT", + 0x8815, + "GL_RGB32F_EXT", }, { - 0x8816, "GL_ALPHA32F_EXT", + 0x8816, + "GL_ALPHA32F_EXT", }, { - 0x8818, "GL_LUMINANCE32F_EXT", + 0x8818, + "GL_LUMINANCE32F_EXT", }, { - 0x8819, "GL_LUMINANCE_ALPHA32F_EXT", + 0x8819, + "GL_LUMINANCE_ALPHA32F_EXT", }, { - 0x881A, "GL_RGBA16F_EXT", + 0x881A, + "GL_RGBA16F_EXT", }, { - 0x881B, "GL_RGB16F_EXT", + 0x881B, + "GL_RGB16F_EXT", }, { - 0x881C, "GL_ALPHA16F_EXT", + 0x881C, + "GL_ALPHA16F_EXT", }, { - 0x881E, "GL_LUMINANCE16F_EXT", + 0x881E, + "GL_LUMINANCE16F_EXT", }, { - 0x881F, "GL_LUMINANCE_ALPHA16F_EXT", + 0x881F, + "GL_LUMINANCE_ALPHA16F_EXT", }, { - 0x8823, "GL_WRITEONLY_RENDERING_QCOM", + 0x8823, + "GL_WRITEONLY_RENDERING_QCOM", }, { - 0x8824, "GL_MAX_DRAW_BUFFERS_EXT", + 0x8824, + "GL_MAX_DRAW_BUFFERS_EXT", }, { - 0x8825, "GL_DRAW_BUFFER0_EXT", + 0x8825, + "GL_DRAW_BUFFER0_EXT", }, { - 0x8826, "GL_DRAW_BUFFER1_EXT", + 0x8826, + "GL_DRAW_BUFFER1_EXT", }, { - 0x8827, "GL_DRAW_BUFFER2_EXT", + 0x8827, + "GL_DRAW_BUFFER2_EXT", }, { - 0x8828, "GL_DRAW_BUFFER3_EXT", + 0x8828, + "GL_DRAW_BUFFER3_EXT", }, { - 0x8829, "GL_DRAW_BUFFER4_EXT", + 0x8829, + "GL_DRAW_BUFFER4_EXT", }, { - 0x882A, "GL_DRAW_BUFFER5_EXT", + 0x882A, + "GL_DRAW_BUFFER5_EXT", }, { - 0x882B, "GL_DRAW_BUFFER6_EXT", + 0x882B, + "GL_DRAW_BUFFER6_EXT", }, { - 0x882C, "GL_DRAW_BUFFER7_EXT", + 0x882C, + "GL_DRAW_BUFFER7_EXT", }, { - 0x882D, "GL_DRAW_BUFFER8_EXT", + 0x882D, + "GL_DRAW_BUFFER8_EXT", }, { - 0x882E, "GL_DRAW_BUFFER9_EXT", + 0x882E, + "GL_DRAW_BUFFER9_EXT", }, { - 0x882F, "GL_DRAW_BUFFER10_EXT", + 0x882F, + "GL_DRAW_BUFFER10_EXT", }, { - 0x8830, "GL_DRAW_BUFFER11_EXT", + 0x8830, + "GL_DRAW_BUFFER11_EXT", }, { - 0x8831, "GL_DRAW_BUFFER12_EXT", + 0x8831, + "GL_DRAW_BUFFER12_EXT", }, { - 0x8832, "GL_DRAW_BUFFER13_EXT", + 0x8832, + "GL_DRAW_BUFFER13_EXT", }, { - 0x8833, "GL_DRAW_BUFFER14_EXT", + 0x8833, + "GL_DRAW_BUFFER14_EXT", }, { - 0x8834, "GL_DRAW_BUFFER15_EXT", + 0x8834, + "GL_DRAW_BUFFER15_EXT", }, { - 0x883D, "GL_BLEND_EQUATION_ALPHA", + 0x883D, + "GL_BLEND_EQUATION_ALPHA", }, { - 0x884A, "GL_TEXTURE_DEPTH_SIZE", + 0x884A, + "GL_TEXTURE_DEPTH_SIZE", }, { - 0x884C, "GL_TEXTURE_COMPARE_MODE_EXT", + 0x884C, + "GL_TEXTURE_COMPARE_MODE_EXT", }, { - 0x884D, "GL_TEXTURE_COMPARE_FUNC_EXT", + 0x884D, + "GL_TEXTURE_COMPARE_FUNC_EXT", }, { - 0x884E, "GL_COMPARE_REF_TO_TEXTURE_EXT", + 0x884E, + "GL_COMPARE_REF_TO_TEXTURE_EXT", }, { - 0x8864, "GL_QUERY_COUNTER_BITS_EXT", + 0x8864, + "GL_QUERY_COUNTER_BITS_EXT", }, { - 0x8865, "GL_CURRENT_QUERY_EXT", + 0x8865, + "GL_CURRENT_QUERY_EXT", }, { - 0x8866, "GL_QUERY_RESULT_EXT", + 0x8866, + "GL_QUERY_RESULT_EXT", }, { - 0x8867, "GL_QUERY_RESULT_AVAILABLE_EXT", + 0x8867, + "GL_QUERY_RESULT_AVAILABLE_EXT", }, { - 0x8869, "GL_MAX_VERTEX_ATTRIBS", + 0x8869, + "GL_MAX_VERTEX_ATTRIBS", }, { - 0x886A, "GL_VERTEX_ATTRIB_ARRAY_NORMALIZED", + 0x886A, + "GL_VERTEX_ATTRIB_ARRAY_NORMALIZED", }, { - 0x886C, "GL_MAX_TESS_CONTROL_INPUT_COMPONENTS_OES", + 0x886C, + "GL_MAX_TESS_CONTROL_INPUT_COMPONENTS_OES", }, { - 0x886D, "GL_MAX_TESS_EVALUATION_INPUT_COMPONENTS_OES", + 0x886D, + "GL_MAX_TESS_EVALUATION_INPUT_COMPONENTS_OES", }, { - 0x8872, "GL_MAX_TEXTURE_IMAGE_UNITS", + 0x8872, + "GL_MAX_TEXTURE_IMAGE_UNITS", }, { - 0x887F, "GL_GEOMETRY_SHADER_INVOCATIONS_OES", + 0x887F, + "GL_GEOMETRY_SHADER_INVOCATIONS_OES", }, { - 0x8892, "GL_ARRAY_BUFFER", + 0x8892, + "GL_ARRAY_BUFFER", }, { - 0x8893, "GL_ELEMENT_ARRAY_BUFFER", + 0x8893, + "GL_ELEMENT_ARRAY_BUFFER", }, { - 0x8894, "GL_ARRAY_BUFFER_BINDING", + 0x8894, + "GL_ARRAY_BUFFER_BINDING", }, { - 0x8895, "GL_ELEMENT_ARRAY_BUFFER_BINDING", + 0x8895, + "GL_ELEMENT_ARRAY_BUFFER_BINDING", }, { - 0x889F, "GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING", + 0x889F, + "GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING", }, { - 0x88B8, "GL_READ_ONLY", + 0x88B8, + "GL_READ_ONLY", }, { - 0x88B9, "GL_WRITE_ONLY_OES", + 0x88B9, + "GL_WRITE_ONLY_OES", }, { - 0x88BA, "GL_READ_WRITE", + 0x88BA, + "GL_READ_WRITE", }, { - 0x88BB, "GL_BUFFER_ACCESS_OES", + 0x88BB, + "GL_BUFFER_ACCESS_OES", }, { - 0x88BC, "GL_BUFFER_MAPPED_OES", + 0x88BC, + "GL_BUFFER_MAPPED_OES", }, { - 0x88BD, "GL_BUFFER_MAP_POINTER_OES", + 0x88BD, + "GL_BUFFER_MAP_POINTER_OES", }, { - 0x88BF, "GL_TIME_ELAPSED_EXT", + 0x88BF, + "GL_TIME_ELAPSED_EXT", }, { - 0x88E0, "GL_STREAM_DRAW", + 0x88E0, + "GL_STREAM_DRAW", }, { - 0x88E1, "GL_STREAM_READ", + 0x88E1, + "GL_STREAM_READ", }, { - 0x88E2, "GL_STREAM_COPY", + 0x88E2, + "GL_STREAM_COPY", }, { - 0x88E4, "GL_STATIC_DRAW", + 0x88E4, + "GL_STATIC_DRAW", }, { - 0x88E5, "GL_STATIC_READ", + 0x88E5, + "GL_STATIC_READ", }, { - 0x88E6, "GL_STATIC_COPY", + 0x88E6, + "GL_STATIC_COPY", }, { - 0x88E8, "GL_DYNAMIC_DRAW", + 0x88E8, + "GL_DYNAMIC_DRAW", }, { - 0x88E9, "GL_DYNAMIC_READ", + 0x88E9, + "GL_DYNAMIC_READ", }, { - 0x88EA, "GL_DYNAMIC_COPY", + 0x88EA, + "GL_DYNAMIC_COPY", }, { - 0x88EB, "GL_PIXEL_PACK_BUFFER", + 0x88EB, + "GL_PIXEL_PACK_BUFFER", }, { - 0x88EC, "GL_PIXEL_UNPACK_BUFFER", + 0x88EC, + "GL_PIXEL_UNPACK_BUFFER", }, { - 0x88ED, "GL_PIXEL_PACK_BUFFER_BINDING", + 0x88ED, + "GL_PIXEL_PACK_BUFFER_BINDING", }, { - 0x88EE, "GL_ETC1_SRGB8_NV", + 0x88EE, + "GL_ETC1_SRGB8_NV", }, { - 0x88EF, "GL_PIXEL_UNPACK_BUFFER_BINDING", + 0x88EF, + "GL_PIXEL_UNPACK_BUFFER_BINDING", }, { - 0x88F0, "GL_DEPTH24_STENCIL8_OES", + 0x88F0, + "GL_DEPTH24_STENCIL8_OES", }, { - 0x88F1, "GL_TEXTURE_STENCIL_SIZE", + 0x88F1, + "GL_TEXTURE_STENCIL_SIZE", }, { - 0x88F9, "GL_SRC1_COLOR_EXT", + 0x88F9, + "GL_SRC1_COLOR_EXT", }, { - 0x88FA, "GL_ONE_MINUS_SRC1_COLOR_EXT", + 0x88FA, + "GL_ONE_MINUS_SRC1_COLOR_EXT", }, { - 0x88FB, "GL_ONE_MINUS_SRC1_ALPHA_EXT", + 0x88FB, + "GL_ONE_MINUS_SRC1_ALPHA_EXT", }, { - 0x88FC, "GL_MAX_DUAL_SOURCE_DRAW_BUFFERS_EXT", + 0x88FC, + "GL_MAX_DUAL_SOURCE_DRAW_BUFFERS_EXT", }, { - 0x88FD, "GL_VERTEX_ATTRIB_ARRAY_INTEGER", + 0x88FD, + "GL_VERTEX_ATTRIB_ARRAY_INTEGER", }, { - 0x88FE, "GL_VERTEX_ATTRIB_ARRAY_DIVISOR_ANGLE", + 0x88FE, + "GL_VERTEX_ATTRIB_ARRAY_DIVISOR_ANGLE", }, { - 0x88FF, "GL_MAX_ARRAY_TEXTURE_LAYERS", + 0x88FF, + "GL_MAX_ARRAY_TEXTURE_LAYERS", }, { - 0x8904, "GL_MIN_PROGRAM_TEXEL_OFFSET", + 0x8904, + "GL_MIN_PROGRAM_TEXEL_OFFSET", }, { - 0x8905, "GL_MAX_PROGRAM_TEXEL_OFFSET", + 0x8905, + "GL_MAX_PROGRAM_TEXEL_OFFSET", }, { - 0x8914, "GL_SAMPLES_PASSED_ARB", + 0x8914, + "GL_SAMPLES_PASSED_ARB", }, { - 0x8916, "GL_GEOMETRY_LINKED_VERTICES_OUT_OES", + 0x8916, + "GL_GEOMETRY_LINKED_VERTICES_OUT_OES", }, { - 0x8917, "GL_GEOMETRY_LINKED_INPUT_TYPE_OES", + 0x8917, + "GL_GEOMETRY_LINKED_INPUT_TYPE_OES", }, { - 0x8918, "GL_GEOMETRY_LINKED_OUTPUT_TYPE_OES", + 0x8918, + "GL_GEOMETRY_LINKED_OUTPUT_TYPE_OES", }, { - 0x8919, "GL_SAMPLER_BINDING", + 0x8919, + "GL_SAMPLER_BINDING", }, { - 0x8A11, "GL_UNIFORM_BUFFER", + 0x8A11, + "GL_UNIFORM_BUFFER", }, { - 0x8A1F, "GL_RGB_422_APPLE", + 0x8A1F, + "GL_RGB_422_APPLE", }, { - 0x8A28, "GL_UNIFORM_BUFFER_BINDING", + 0x8A28, + "GL_UNIFORM_BUFFER_BINDING", }, { - 0x8A29, "GL_UNIFORM_BUFFER_START", + 0x8A29, + "GL_UNIFORM_BUFFER_START", }, { - 0x8A2A, "GL_UNIFORM_BUFFER_SIZE", + 0x8A2A, + "GL_UNIFORM_BUFFER_SIZE", }, { - 0x8A2B, "GL_MAX_VERTEX_UNIFORM_BLOCKS", + 0x8A2B, + "GL_MAX_VERTEX_UNIFORM_BLOCKS", }, { - 0x8A2C, "GL_MAX_GEOMETRY_UNIFORM_BLOCKS_OES", + 0x8A2C, + "GL_MAX_GEOMETRY_UNIFORM_BLOCKS_OES", }, { - 0x8A2D, "GL_MAX_FRAGMENT_UNIFORM_BLOCKS", + 0x8A2D, + "GL_MAX_FRAGMENT_UNIFORM_BLOCKS", }, { - 0x8A2E, "GL_MAX_COMBINED_UNIFORM_BLOCKS", + 0x8A2E, + "GL_MAX_COMBINED_UNIFORM_BLOCKS", }, { - 0x8A2F, "GL_MAX_UNIFORM_BUFFER_BINDINGS", + 0x8A2F, + "GL_MAX_UNIFORM_BUFFER_BINDINGS", }, { - 0x8A30, "GL_MAX_UNIFORM_BLOCK_SIZE", + 0x8A30, + "GL_MAX_UNIFORM_BLOCK_SIZE", }, { - 0x8A31, "GL_MAX_COMBINED_VERTEX_UNIFORM_COMPONENTS", + 0x8A31, + "GL_MAX_COMBINED_VERTEX_UNIFORM_COMPONENTS", }, { - 0x8A32, "GL_MAX_COMBINED_GEOMETRY_UNIFORM_COMPONENTS_OES", + 0x8A32, + "GL_MAX_COMBINED_GEOMETRY_UNIFORM_COMPONENTS_OES", }, { - 0x8A33, "GL_MAX_COMBINED_FRAGMENT_UNIFORM_COMPONENTS", + 0x8A33, + "GL_MAX_COMBINED_FRAGMENT_UNIFORM_COMPONENTS", }, { - 0x8A34, "GL_UNIFORM_BUFFER_OFFSET_ALIGNMENT", + 0x8A34, + "GL_UNIFORM_BUFFER_OFFSET_ALIGNMENT", }, { - 0x8A35, "GL_ACTIVE_UNIFORM_BLOCK_MAX_NAME_LENGTH", + 0x8A35, + "GL_ACTIVE_UNIFORM_BLOCK_MAX_NAME_LENGTH", }, { - 0x8A36, "GL_ACTIVE_UNIFORM_BLOCKS", + 0x8A36, + "GL_ACTIVE_UNIFORM_BLOCKS", }, { - 0x8A37, "GL_UNIFORM_TYPE", + 0x8A37, + "GL_UNIFORM_TYPE", }, { - 0x8A38, "GL_UNIFORM_SIZE", + 0x8A38, + "GL_UNIFORM_SIZE", }, { - 0x8A39, "GL_UNIFORM_NAME_LENGTH", + 0x8A39, + "GL_UNIFORM_NAME_LENGTH", }, { - 0x8A3A, "GL_UNIFORM_BLOCK_INDEX", + 0x8A3A, + "GL_UNIFORM_BLOCK_INDEX", }, { - 0x8A3B, "GL_UNIFORM_OFFSET", + 0x8A3B, + "GL_UNIFORM_OFFSET", }, { - 0x8A3C, "GL_UNIFORM_ARRAY_STRIDE", + 0x8A3C, + "GL_UNIFORM_ARRAY_STRIDE", }, { - 0x8A3D, "GL_UNIFORM_MATRIX_STRIDE", + 0x8A3D, + "GL_UNIFORM_MATRIX_STRIDE", }, { - 0x8A3E, "GL_UNIFORM_IS_ROW_MAJOR", + 0x8A3E, + "GL_UNIFORM_IS_ROW_MAJOR", }, { - 0x8A3F, "GL_UNIFORM_BLOCK_BINDING", + 0x8A3F, + "GL_UNIFORM_BLOCK_BINDING", }, { - 0x8A40, "GL_UNIFORM_BLOCK_DATA_SIZE", + 0x8A40, + "GL_UNIFORM_BLOCK_DATA_SIZE", }, { - 0x8A41, "GL_UNIFORM_BLOCK_NAME_LENGTH", + 0x8A41, + "GL_UNIFORM_BLOCK_NAME_LENGTH", }, { - 0x8A42, "GL_UNIFORM_BLOCK_ACTIVE_UNIFORMS", + 0x8A42, + "GL_UNIFORM_BLOCK_ACTIVE_UNIFORMS", }, { - 0x8A43, "GL_UNIFORM_BLOCK_ACTIVE_UNIFORM_INDICES", + 0x8A43, + "GL_UNIFORM_BLOCK_ACTIVE_UNIFORM_INDICES", }, { - 0x8A44, "GL_UNIFORM_BLOCK_REFERENCED_BY_VERTEX_SHADER", + 0x8A44, + "GL_UNIFORM_BLOCK_REFERENCED_BY_VERTEX_SHADER", }, { - 0x8A46, "GL_UNIFORM_BLOCK_REFERENCED_BY_FRAGMENT_SHADER", + 0x8A46, + "GL_UNIFORM_BLOCK_REFERENCED_BY_FRAGMENT_SHADER", }, { - 0x8A48, "GL_TEXTURE_SRGB_DECODE_EXT", + 0x8A48, + "GL_TEXTURE_SRGB_DECODE_EXT", }, { - 0x8A49, "GL_DECODE_EXT", + 0x8A49, + "GL_DECODE_EXT", }, { - 0x8A4A, "GL_SKIP_DECODE_EXT", + 0x8A4A, + "GL_SKIP_DECODE_EXT", }, { - 0x8A4F, "GL_PROGRAM_PIPELINE_OBJECT_EXT", + 0x8A4F, + "GL_PROGRAM_PIPELINE_OBJECT_EXT", }, { - 0x8A51, "GL_RGB_RAW_422_APPLE", + 0x8A51, + "GL_RGB_RAW_422_APPLE", }, { - 0x8A52, "GL_FRAGMENT_SHADER_DISCARDS_SAMPLES_EXT", + 0x8A52, + "GL_FRAGMENT_SHADER_DISCARDS_SAMPLES_EXT", }, { - 0x8A53, "GL_SYNC_OBJECT_APPLE", + 0x8A53, + "GL_SYNC_OBJECT_APPLE", }, { - 0x8A54, "GL_COMPRESSED_SRGB_PVRTC_2BPPV1_EXT", + 0x8A54, + "GL_COMPRESSED_SRGB_PVRTC_2BPPV1_EXT", }, { - 0x8A55, "GL_COMPRESSED_SRGB_PVRTC_4BPPV1_EXT", + 0x8A55, + "GL_COMPRESSED_SRGB_PVRTC_4BPPV1_EXT", }, { - 0x8A56, "GL_COMPRESSED_SRGB_ALPHA_PVRTC_2BPPV1_EXT", + 0x8A56, + "GL_COMPRESSED_SRGB_ALPHA_PVRTC_2BPPV1_EXT", }, { - 0x8A57, "GL_COMPRESSED_SRGB_ALPHA_PVRTC_4BPPV1_EXT", + 0x8A57, + "GL_COMPRESSED_SRGB_ALPHA_PVRTC_4BPPV1_EXT", }, { - 0x8AF0, "GL_TEXTURE_FILTERING_HINT_CHROMIUM", + 0x8AF0, + "GL_TEXTURE_FILTERING_HINT_CHROMIUM", }, { - 0x8AF1, "GL_COLOR_SPACE_UNSPECIFIED_CHROMIUM", + 0x8AF1, + "GL_COLOR_SPACE_UNSPECIFIED_CHROMIUM", }, { - 0x8AF2, "GL_COLOR_SPACE_SCRGB_LINEAR_CHROMIUM", + 0x8AF2, + "GL_COLOR_SPACE_SCRGB_LINEAR_CHROMIUM", }, { - 0x8AF3, "GL_COLOR_SPACE_SRGB_CHROMIUM", + 0x8AF3, + "GL_COLOR_SPACE_SRGB_CHROMIUM", }, { - 0x8AF4, "GL_COLOR_SPACE_DISPLAY_P3_CHROMIUM", + 0x8AF4, + "GL_COLOR_SPACE_DISPLAY_P3_CHROMIUM", }, { - 0x8B30, "GL_FRAGMENT_SHADER", + 0x8B30, + "GL_FRAGMENT_SHADER", }, { - 0x8B31, "GL_VERTEX_SHADER", + 0x8B31, + "GL_VERTEX_SHADER", }, { - 0x8B40, "GL_PROGRAM_OBJECT_EXT", + 0x8B40, + "GL_PROGRAM_OBJECT_EXT", }, { - 0x8B48, "GL_SHADER_OBJECT_EXT", + 0x8B48, + "GL_SHADER_OBJECT_EXT", }, { - 0x8B49, "GL_MAX_FRAGMENT_UNIFORM_COMPONENTS", + 0x8B49, + "GL_MAX_FRAGMENT_UNIFORM_COMPONENTS", }, { - 0x8B4A, "GL_MAX_VERTEX_UNIFORM_COMPONENTS", + 0x8B4A, + "GL_MAX_VERTEX_UNIFORM_COMPONENTS", }, { - 0x8B4B, "GL_MAX_VARYING_COMPONENTS", + 0x8B4B, + "GL_MAX_VARYING_COMPONENTS", }, { - 0x8B4C, "GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS", + 0x8B4C, + "GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS", }, { - 0x8B4D, "GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS", + 0x8B4D, + "GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS", }, { - 0x8B4F, "GL_SHADER_TYPE", + 0x8B4F, + "GL_SHADER_TYPE", }, { - 0x8B50, "GL_FLOAT_VEC2", + 0x8B50, + "GL_FLOAT_VEC2", }, { - 0x8B51, "GL_FLOAT_VEC3", + 0x8B51, + "GL_FLOAT_VEC3", }, { - 0x8B52, "GL_FLOAT_VEC4", + 0x8B52, + "GL_FLOAT_VEC4", }, { - 0x8B53, "GL_INT_VEC2", + 0x8B53, + "GL_INT_VEC2", }, { - 0x8B54, "GL_INT_VEC3", + 0x8B54, + "GL_INT_VEC3", }, { - 0x8B55, "GL_INT_VEC4", + 0x8B55, + "GL_INT_VEC4", }, { - 0x8B56, "GL_BOOL", + 0x8B56, + "GL_BOOL", }, { - 0x8B57, "GL_BOOL_VEC2", + 0x8B57, + "GL_BOOL_VEC2", }, { - 0x8B58, "GL_BOOL_VEC3", + 0x8B58, + "GL_BOOL_VEC3", }, { - 0x8B59, "GL_BOOL_VEC4", + 0x8B59, + "GL_BOOL_VEC4", }, { - 0x8B5A, "GL_FLOAT_MAT2", + 0x8B5A, + "GL_FLOAT_MAT2", }, { - 0x8B5B, "GL_FLOAT_MAT3", + 0x8B5B, + "GL_FLOAT_MAT3", }, { - 0x8B5C, "GL_FLOAT_MAT4", + 0x8B5C, + "GL_FLOAT_MAT4", }, { - 0x8B5E, "GL_SAMPLER_2D", + 0x8B5E, + "GL_SAMPLER_2D", }, { - 0x8B5F, "GL_SAMPLER_3D_OES", + 0x8B5F, + "GL_SAMPLER_3D_OES", }, { - 0x8B60, "GL_SAMPLER_CUBE", + 0x8B60, + "GL_SAMPLER_CUBE", }, { - 0x8B62, "GL_SAMPLER_2D_SHADOW_EXT", + 0x8B62, + "GL_SAMPLER_2D_SHADOW_EXT", }, { - 0x8B63, "GL_SAMPLER_2D_RECT_ARB", + 0x8B63, + "GL_SAMPLER_2D_RECT_ARB", }, { - 0x8B65, "GL_FLOAT_MAT2x3_NV", + 0x8B65, + "GL_FLOAT_MAT2x3_NV", }, { - 0x8B66, "GL_FLOAT_MAT2x4_NV", + 0x8B66, + "GL_FLOAT_MAT2x4_NV", }, { - 0x8B67, "GL_FLOAT_MAT3x2_NV", + 0x8B67, + "GL_FLOAT_MAT3x2_NV", }, { - 0x8B68, "GL_FLOAT_MAT3x4_NV", + 0x8B68, + "GL_FLOAT_MAT3x4_NV", }, { - 0x8B69, "GL_FLOAT_MAT4x2_NV", + 0x8B69, + "GL_FLOAT_MAT4x2_NV", }, { - 0x8B6A, "GL_FLOAT_MAT4x3_NV", + 0x8B6A, + "GL_FLOAT_MAT4x3_NV", }, { - 0x8B80, "GL_DELETE_STATUS", + 0x8B80, + "GL_DELETE_STATUS", }, { - 0x8B81, "GL_COMPILE_STATUS", + 0x8B81, + "GL_COMPILE_STATUS", }, { - 0x8B82, "GL_LINK_STATUS", + 0x8B82, + "GL_LINK_STATUS", }, { - 0x8B83, "GL_VALIDATE_STATUS", + 0x8B83, + "GL_VALIDATE_STATUS", }, { - 0x8B84, "GL_INFO_LOG_LENGTH", + 0x8B84, + "GL_INFO_LOG_LENGTH", }, { - 0x8B85, "GL_ATTACHED_SHADERS", + 0x8B85, + "GL_ATTACHED_SHADERS", }, { - 0x8B86, "GL_ACTIVE_UNIFORMS", + 0x8B86, + "GL_ACTIVE_UNIFORMS", }, { - 0x8B87, "GL_ACTIVE_UNIFORM_MAX_LENGTH", + 0x8B87, + "GL_ACTIVE_UNIFORM_MAX_LENGTH", }, { - 0x8B88, "GL_SHADER_SOURCE_LENGTH", + 0x8B88, + "GL_SHADER_SOURCE_LENGTH", }, { - 0x8B89, "GL_ACTIVE_ATTRIBUTES", + 0x8B89, + "GL_ACTIVE_ATTRIBUTES", }, { - 0x8B8A, "GL_ACTIVE_ATTRIBUTE_MAX_LENGTH", + 0x8B8A, + "GL_ACTIVE_ATTRIBUTE_MAX_LENGTH", }, { - 0x8B8B, "GL_FRAGMENT_SHADER_DERIVATIVE_HINT_OES", + 0x8B8B, + "GL_FRAGMENT_SHADER_DERIVATIVE_HINT_OES", }, { - 0x8B8C, "GL_SHADING_LANGUAGE_VERSION", + 0x8B8C, + "GL_SHADING_LANGUAGE_VERSION", }, { - 0x8B8D, "GL_CURRENT_PROGRAM", + 0x8B8D, + "GL_CURRENT_PROGRAM", }, { - 0x8B90, "GL_PALETTE4_RGB8_OES", + 0x8B90, + "GL_PALETTE4_RGB8_OES", }, { - 0x8B91, "GL_PALETTE4_RGBA8_OES", + 0x8B91, + "GL_PALETTE4_RGBA8_OES", }, { - 0x8B92, "GL_PALETTE4_R5_G6_B5_OES", + 0x8B92, + "GL_PALETTE4_R5_G6_B5_OES", }, { - 0x8B93, "GL_PALETTE4_RGBA4_OES", + 0x8B93, + "GL_PALETTE4_RGBA4_OES", }, { - 0x8B94, "GL_PALETTE4_RGB5_A1_OES", + 0x8B94, + "GL_PALETTE4_RGB5_A1_OES", }, { - 0x8B95, "GL_PALETTE8_RGB8_OES", + 0x8B95, + "GL_PALETTE8_RGB8_OES", }, { - 0x8B96, "GL_PALETTE8_RGBA8_OES", + 0x8B96, + "GL_PALETTE8_RGBA8_OES", }, { - 0x8B97, "GL_PALETTE8_R5_G6_B5_OES", + 0x8B97, + "GL_PALETTE8_R5_G6_B5_OES", }, { - 0x8B98, "GL_PALETTE8_RGBA4_OES", + 0x8B98, + "GL_PALETTE8_RGBA4_OES", }, { - 0x8B99, "GL_PALETTE8_RGB5_A1_OES", + 0x8B99, + "GL_PALETTE8_RGB5_A1_OES", }, { - 0x8B9A, "GL_IMPLEMENTATION_COLOR_READ_TYPE", + 0x8B9A, + "GL_IMPLEMENTATION_COLOR_READ_TYPE", }, { - 0x8B9B, "GL_IMPLEMENTATION_COLOR_READ_FORMAT", + 0x8B9B, + "GL_IMPLEMENTATION_COLOR_READ_FORMAT", }, { - 0x8BBB, "GL_FRAMEBUFFER_FLIP_Y_MESA", + 0x8BBB, + "GL_FRAMEBUFFER_FLIP_Y_MESA", }, { - 0x8BC0, "GL_COUNTER_TYPE_AMD", + 0x8BC0, + "GL_COUNTER_TYPE_AMD", }, { - 0x8BC1, "GL_COUNTER_RANGE_AMD", + 0x8BC1, + "GL_COUNTER_RANGE_AMD", }, { - 0x8BC2, "GL_UNSIGNED_INT64_AMD", + 0x8BC2, + "GL_UNSIGNED_INT64_AMD", }, { - 0x8BC3, "GL_PERCENTAGE_AMD", + 0x8BC3, + "GL_PERCENTAGE_AMD", }, { - 0x8BC4, "GL_PERFMON_RESULT_AVAILABLE_AMD", + 0x8BC4, + "GL_PERFMON_RESULT_AVAILABLE_AMD", }, { - 0x8BC5, "GL_PERFMON_RESULT_SIZE_AMD", + 0x8BC5, + "GL_PERFMON_RESULT_SIZE_AMD", }, { - 0x8BC6, "GL_PERFMON_RESULT_AMD", + 0x8BC6, + "GL_PERFMON_RESULT_AMD", }, { - 0x8BD2, "GL_TEXTURE_WIDTH_QCOM", + 0x8BD2, + "GL_TEXTURE_WIDTH_QCOM", }, { - 0x8BD3, "GL_TEXTURE_HEIGHT_QCOM", + 0x8BD3, + "GL_TEXTURE_HEIGHT_QCOM", }, { - 0x8BD4, "GL_TEXTURE_DEPTH_QCOM", + 0x8BD4, + "GL_TEXTURE_DEPTH_QCOM", }, { - 0x8BD5, "GL_TEXTURE_INTERNAL_FORMAT_QCOM", + 0x8BD5, + "GL_TEXTURE_INTERNAL_FORMAT_QCOM", }, { - 0x8BD6, "GL_TEXTURE_FORMAT_QCOM", + 0x8BD6, + "GL_TEXTURE_FORMAT_QCOM", }, { - 0x8BD7, "GL_TEXTURE_TYPE_QCOM", + 0x8BD7, + "GL_TEXTURE_TYPE_QCOM", }, { - 0x8BD8, "GL_TEXTURE_IMAGE_VALID_QCOM", + 0x8BD8, + "GL_TEXTURE_IMAGE_VALID_QCOM", }, { - 0x8BD9, "GL_TEXTURE_NUM_LEVELS_QCOM", + 0x8BD9, + "GL_TEXTURE_NUM_LEVELS_QCOM", }, { - 0x8BDA, "GL_TEXTURE_TARGET_QCOM", + 0x8BDA, + "GL_TEXTURE_TARGET_QCOM", }, { - 0x8BDB, "GL_TEXTURE_OBJECT_VALID_QCOM", + 0x8BDB, + "GL_TEXTURE_OBJECT_VALID_QCOM", }, { - 0x8BDC, "GL_STATE_RESTORE", + 0x8BDC, + "GL_STATE_RESTORE", }, { - 0x8BE7, "GL_SAMPLER_EXTERNAL_2D_Y2Y_EXT", + 0x8BE7, + "GL_SAMPLER_EXTERNAL_2D_Y2Y_EXT", }, { - 0x8BFA, "GL_TEXTURE_PROTECTED_EXT", + 0x8BFA, + "GL_TEXTURE_PROTECTED_EXT", }, { - 0x8C00, "GL_COMPRESSED_RGB_PVRTC_4BPPV1_IMG", + 0x8C00, + "GL_COMPRESSED_RGB_PVRTC_4BPPV1_IMG", }, { - 0x8C01, "GL_COMPRESSED_RGB_PVRTC_2BPPV1_IMG", + 0x8C01, + "GL_COMPRESSED_RGB_PVRTC_2BPPV1_IMG", }, { - 0x8C02, "GL_COMPRESSED_RGBA_PVRTC_4BPPV1_IMG", + 0x8C02, + "GL_COMPRESSED_RGBA_PVRTC_4BPPV1_IMG", }, { - 0x8C03, "GL_COMPRESSED_RGBA_PVRTC_2BPPV1_IMG", + 0x8C03, + "GL_COMPRESSED_RGBA_PVRTC_2BPPV1_IMG", }, { - 0x8C0A, "GL_SGX_BINARY_IMG", + 0x8C0A, + "GL_SGX_BINARY_IMG", }, { - 0x8C10, "GL_TEXTURE_RED_TYPE", + 0x8C10, + "GL_TEXTURE_RED_TYPE", }, { - 0x8C11, "GL_TEXTURE_GREEN_TYPE", + 0x8C11, + "GL_TEXTURE_GREEN_TYPE", }, { - 0x8C12, "GL_TEXTURE_BLUE_TYPE", + 0x8C12, + "GL_TEXTURE_BLUE_TYPE", }, { - 0x8C13, "GL_TEXTURE_ALPHA_TYPE", + 0x8C13, + "GL_TEXTURE_ALPHA_TYPE", }, { - 0x8C16, "GL_TEXTURE_DEPTH_TYPE", + 0x8C16, + "GL_TEXTURE_DEPTH_TYPE", }, { - 0x8C17, "GL_UNSIGNED_NORMALIZED_EXT", + 0x8C17, + "GL_UNSIGNED_NORMALIZED_EXT", }, { - 0x8C1A, "GL_TEXTURE_2D_ARRAY", + 0x8C1A, + "GL_TEXTURE_2D_ARRAY", }, { - 0x8C1D, "GL_TEXTURE_BINDING_2D_ARRAY", + 0x8C1D, + "GL_TEXTURE_BINDING_2D_ARRAY", }, { - 0x8C29, "GL_MAX_GEOMETRY_TEXTURE_IMAGE_UNITS_OES", + 0x8C29, + "GL_MAX_GEOMETRY_TEXTURE_IMAGE_UNITS_OES", }, { - 0x8C2A, "GL_TEXTURE_BUFFER_OES", + 0x8C2A, + "GL_TEXTURE_BUFFER_OES", }, { - 0x8C2B, "GL_MAX_TEXTURE_BUFFER_SIZE_OES", + 0x8C2B, + "GL_MAX_TEXTURE_BUFFER_SIZE_OES", }, { - 0x8C2C, "GL_TEXTURE_BINDING_BUFFER_OES", + 0x8C2C, + "GL_TEXTURE_BINDING_BUFFER_OES", }, { - 0x8C2D, "GL_TEXTURE_BUFFER_DATA_STORE_BINDING_OES", + 0x8C2D, + "GL_TEXTURE_BUFFER_DATA_STORE_BINDING_OES", }, { - 0x8C2F, "GL_ANY_SAMPLES_PASSED_EXT", + 0x8C2F, + "GL_ANY_SAMPLES_PASSED_EXT", }, { - 0x8C36, "GL_SAMPLE_SHADING_OES", + 0x8C36, + "GL_SAMPLE_SHADING_OES", }, { - 0x8C37, "GL_MIN_SAMPLE_SHADING_VALUE_OES", + 0x8C37, + "GL_MIN_SAMPLE_SHADING_VALUE_OES", }, { - 0x8C3A, "GL_R11F_G11F_B10F_APPLE", + 0x8C3A, + "GL_R11F_G11F_B10F_APPLE", }, { - 0x8C3B, "GL_UNSIGNED_INT_10F_11F_11F_REV_APPLE", + 0x8C3B, + "GL_UNSIGNED_INT_10F_11F_11F_REV_APPLE", }, { - 0x8C3D, "GL_RGB9_E5_APPLE", + 0x8C3D, + "GL_RGB9_E5_APPLE", }, { - 0x8C3E, "GL_UNSIGNED_INT_5_9_9_9_REV_APPLE", + 0x8C3E, + "GL_UNSIGNED_INT_5_9_9_9_REV_APPLE", }, { - 0x8C3F, "GL_TEXTURE_SHARED_SIZE", + 0x8C3F, + "GL_TEXTURE_SHARED_SIZE", }, { - 0x8C40, "GL_SRGB_EXT", + 0x8C40, + "GL_SRGB_EXT", }, { - 0x8C41, "GL_SRGB8_NV", + 0x8C41, + "GL_SRGB8_NV", }, { - 0x8C42, "GL_SRGB_ALPHA_EXT", + 0x8C42, + "GL_SRGB_ALPHA_EXT", }, { - 0x8C43, "GL_SRGB8_ALPHA8_EXT", + 0x8C43, + "GL_SRGB8_ALPHA8_EXT", }, { - 0x8C44, "GL_SLUMINANCE_ALPHA_NV", + 0x8C44, + "GL_SLUMINANCE_ALPHA_NV", }, { - 0x8C45, "GL_SLUMINANCE8_ALPHA8_NV", + 0x8C45, + "GL_SLUMINANCE8_ALPHA8_NV", }, { - 0x8C46, "GL_SLUMINANCE_NV", + 0x8C46, + "GL_SLUMINANCE_NV", }, { - 0x8C47, "GL_SLUMINANCE8_NV", + 0x8C47, + "GL_SLUMINANCE8_NV", }, { - 0x8C4C, "GL_COMPRESSED_SRGB_S3TC_DXT1_NV", + 0x8C4C, + "GL_COMPRESSED_SRGB_S3TC_DXT1_NV", }, { - 0x8C4D, "GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT1_NV", + 0x8C4D, + "GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT1_NV", }, { - 0x8C4E, "GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT3_NV", + 0x8C4E, + "GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT3_NV", }, { - 0x8C4F, "GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT5_NV", + 0x8C4F, + "GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT5_NV", }, { - 0x8C76, "GL_TRANSFORM_FEEDBACK_VARYING_MAX_LENGTH", + 0x8C76, + "GL_TRANSFORM_FEEDBACK_VARYING_MAX_LENGTH", }, { - 0x8C7F, "GL_TRANSFORM_FEEDBACK_BUFFER_MODE", + 0x8C7F, + "GL_TRANSFORM_FEEDBACK_BUFFER_MODE", }, { - 0x8C80, "GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_COMPONENTS", + 0x8C80, + "GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_COMPONENTS", }, { - 0x8C83, "GL_TRANSFORM_FEEDBACK_VARYINGS", + 0x8C83, + "GL_TRANSFORM_FEEDBACK_VARYINGS", }, { - 0x8C84, "GL_TRANSFORM_FEEDBACK_BUFFER_START", + 0x8C84, + "GL_TRANSFORM_FEEDBACK_BUFFER_START", }, { - 0x8C85, "GL_TRANSFORM_FEEDBACK_BUFFER_SIZE", + 0x8C85, + "GL_TRANSFORM_FEEDBACK_BUFFER_SIZE", }, { - 0x8C87, "GL_PRIMITIVES_GENERATED_OES", + 0x8C87, + "GL_PRIMITIVES_GENERATED_OES", }, { - 0x8C88, "GL_TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN", + 0x8C88, + "GL_TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN", }, { - 0x8C89, "GL_RASTERIZER_DISCARD", + 0x8C89, + "GL_RASTERIZER_DISCARD", }, { - 0x8C8A, "GL_MAX_TRANSFORM_FEEDBACK_INTERLEAVED_COMPONENTS", + 0x8C8A, + "GL_MAX_TRANSFORM_FEEDBACK_INTERLEAVED_COMPONENTS", }, { - 0x8C8B, "GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_ATTRIBS", + 0x8C8B, + "GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_ATTRIBS", }, { - 0x8C8C, "GL_INTERLEAVED_ATTRIBS", + 0x8C8C, + "GL_INTERLEAVED_ATTRIBS", }, { - 0x8C8D, "GL_SEPARATE_ATTRIBS", + 0x8C8D, + "GL_SEPARATE_ATTRIBS", }, { - 0x8C8E, "GL_TRANSFORM_FEEDBACK_BUFFER", + 0x8C8E, + "GL_TRANSFORM_FEEDBACK_BUFFER", }, { - 0x8C8F, "GL_TRANSFORM_FEEDBACK_BUFFER_BINDING", + 0x8C8F, + "GL_TRANSFORM_FEEDBACK_BUFFER_BINDING", }, { - 0x8C92, "GL_ATC_RGB_AMD", + 0x8C92, + "GL_ATC_RGB_AMD", }, { - 0x8C93, "GL_ATC_RGBA_EXPLICIT_ALPHA_AMD", + 0x8C93, + "GL_ATC_RGBA_EXPLICIT_ALPHA_AMD", }, { - 0x8CA3, "GL_STENCIL_BACK_REF", + 0x8CA3, + "GL_STENCIL_BACK_REF", }, { - 0x8CA4, "GL_STENCIL_BACK_VALUE_MASK", + 0x8CA4, + "GL_STENCIL_BACK_VALUE_MASK", }, { - 0x8CA5, "GL_STENCIL_BACK_WRITEMASK", + 0x8CA5, + "GL_STENCIL_BACK_WRITEMASK", }, { - 0x8CA6, "GL_FRAMEBUFFER_BINDING", + 0x8CA6, + "GL_FRAMEBUFFER_BINDING", }, { - 0x8CA7, "GL_RENDERBUFFER_BINDING", + 0x8CA7, + "GL_RENDERBUFFER_BINDING", }, { - 0x8CA8, "GL_READ_FRAMEBUFFER_ANGLE", + 0x8CA8, + "GL_READ_FRAMEBUFFER_ANGLE", }, { - 0x8CA9, "GL_DRAW_FRAMEBUFFER_ANGLE", + 0x8CA9, + "GL_DRAW_FRAMEBUFFER_ANGLE", }, { - 0x8CAA, "GL_READ_FRAMEBUFFER_BINDING_ANGLE", + 0x8CAA, + "GL_READ_FRAMEBUFFER_BINDING_ANGLE", }, { - 0x8CAB, "GL_RENDERBUFFER_SAMPLES_ANGLE", + 0x8CAB, + "GL_RENDERBUFFER_SAMPLES_ANGLE", }, { - 0x8CAC, "GL_DEPTH_COMPONENT32F", + 0x8CAC, + "GL_DEPTH_COMPONENT32F", }, { - 0x8CAD, "GL_DEPTH32F_STENCIL8", + 0x8CAD, + "GL_DEPTH32F_STENCIL8", }, { - 0x8CD0, "GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE", + 0x8CD0, + "GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE", }, { - 0x8CD1, "GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME", + 0x8CD1, + "GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME", }, { - 0x8CD2, "GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL", + 0x8CD2, + "GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL", }, { - 0x8CD3, "GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE", + 0x8CD3, + "GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE", }, { - 0x8CD4, "GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_3D_ZOFFSET_OES", + 0x8CD4, + "GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_3D_ZOFFSET_OES", }, { - 0x8CD5, "GL_FRAMEBUFFER_COMPLETE", + 0x8CD5, + "GL_FRAMEBUFFER_COMPLETE", }, { - 0x8CD6, "GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT", + 0x8CD6, + "GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT", }, { - 0x8CD7, "GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT", + 0x8CD7, + "GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT", }, { - 0x8CD9, "GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS", + 0x8CD9, + "GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS", }, { - 0x8CDD, "GL_FRAMEBUFFER_UNSUPPORTED", + 0x8CDD, + "GL_FRAMEBUFFER_UNSUPPORTED", }, { - 0x8CDF, "GL_MAX_COLOR_ATTACHMENTS_EXT", + 0x8CDF, + "GL_MAX_COLOR_ATTACHMENTS_EXT", }, { - 0x8CE0, "GL_COLOR_ATTACHMENT0", + 0x8CE0, + "GL_COLOR_ATTACHMENT0", }, { - 0x8CE1, "GL_COLOR_ATTACHMENT1_EXT", + 0x8CE1, + "GL_COLOR_ATTACHMENT1_EXT", }, { - 0x8CE2, "GL_COLOR_ATTACHMENT2_EXT", + 0x8CE2, + "GL_COLOR_ATTACHMENT2_EXT", }, { - 0x8CE3, "GL_COLOR_ATTACHMENT3_EXT", + 0x8CE3, + "GL_COLOR_ATTACHMENT3_EXT", }, { - 0x8CE4, "GL_COLOR_ATTACHMENT4_EXT", + 0x8CE4, + "GL_COLOR_ATTACHMENT4_EXT", }, { - 0x8CE5, "GL_COLOR_ATTACHMENT5_EXT", + 0x8CE5, + "GL_COLOR_ATTACHMENT5_EXT", }, { - 0x8CE6, "GL_COLOR_ATTACHMENT6_EXT", + 0x8CE6, + "GL_COLOR_ATTACHMENT6_EXT", }, { - 0x8CE7, "GL_COLOR_ATTACHMENT7_EXT", + 0x8CE7, + "GL_COLOR_ATTACHMENT7_EXT", }, { - 0x8CE8, "GL_COLOR_ATTACHMENT8_EXT", + 0x8CE8, + "GL_COLOR_ATTACHMENT8_EXT", }, { - 0x8CE9, "GL_COLOR_ATTACHMENT9_EXT", + 0x8CE9, + "GL_COLOR_ATTACHMENT9_EXT", }, { - 0x8CEA, "GL_COLOR_ATTACHMENT10_EXT", + 0x8CEA, + "GL_COLOR_ATTACHMENT10_EXT", }, { - 0x8CEB, "GL_COLOR_ATTACHMENT11_EXT", + 0x8CEB, + "GL_COLOR_ATTACHMENT11_EXT", }, { - 0x8CEC, "GL_COLOR_ATTACHMENT12_EXT", + 0x8CEC, + "GL_COLOR_ATTACHMENT12_EXT", }, { - 0x8CED, "GL_COLOR_ATTACHMENT13_EXT", + 0x8CED, + "GL_COLOR_ATTACHMENT13_EXT", }, { - 0x8CEE, "GL_COLOR_ATTACHMENT14_EXT", + 0x8CEE, + "GL_COLOR_ATTACHMENT14_EXT", }, { - 0x8CEF, "GL_COLOR_ATTACHMENT15_EXT", + 0x8CEF, + "GL_COLOR_ATTACHMENT15_EXT", }, { - 0x8CF0, "GL_COLOR_ATTACHMENT16", + 0x8CF0, + "GL_COLOR_ATTACHMENT16", }, { - 0x8CF1, "GL_COLOR_ATTACHMENT17", + 0x8CF1, + "GL_COLOR_ATTACHMENT17", }, { - 0x8CF2, "GL_COLOR_ATTACHMENT18", + 0x8CF2, + "GL_COLOR_ATTACHMENT18", }, { - 0x8CF3, "GL_COLOR_ATTACHMENT19", + 0x8CF3, + "GL_COLOR_ATTACHMENT19", }, { - 0x8CF4, "GL_COLOR_ATTACHMENT20", + 0x8CF4, + "GL_COLOR_ATTACHMENT20", }, { - 0x8CF5, "GL_COLOR_ATTACHMENT21", + 0x8CF5, + "GL_COLOR_ATTACHMENT21", }, { - 0x8CF6, "GL_COLOR_ATTACHMENT22", + 0x8CF6, + "GL_COLOR_ATTACHMENT22", }, { - 0x8CF7, "GL_COLOR_ATTACHMENT23", + 0x8CF7, + "GL_COLOR_ATTACHMENT23", }, { - 0x8CF8, "GL_COLOR_ATTACHMENT24", + 0x8CF8, + "GL_COLOR_ATTACHMENT24", }, { - 0x8CF9, "GL_COLOR_ATTACHMENT25", + 0x8CF9, + "GL_COLOR_ATTACHMENT25", }, { - 0x8CFA, "GL_COLOR_ATTACHMENT26", + 0x8CFA, + "GL_COLOR_ATTACHMENT26", }, { - 0x8CFB, "GL_COLOR_ATTACHMENT27", + 0x8CFB, + "GL_COLOR_ATTACHMENT27", }, { - 0x8CFC, "GL_COLOR_ATTACHMENT28", + 0x8CFC, + "GL_COLOR_ATTACHMENT28", }, { - 0x8CFD, "GL_COLOR_ATTACHMENT29", + 0x8CFD, + "GL_COLOR_ATTACHMENT29", }, { - 0x8CFE, "GL_COLOR_ATTACHMENT30", + 0x8CFE, + "GL_COLOR_ATTACHMENT30", }, { - 0x8CFF, "GL_COLOR_ATTACHMENT31", + 0x8CFF, + "GL_COLOR_ATTACHMENT31", }, { - 0x8D00, "GL_DEPTH_ATTACHMENT", + 0x8D00, + "GL_DEPTH_ATTACHMENT", }, { - 0x8D20, "GL_STENCIL_ATTACHMENT", + 0x8D20, + "GL_STENCIL_ATTACHMENT", }, { - 0x8D40, "GL_FRAMEBUFFER", + 0x8D40, + "GL_FRAMEBUFFER", }, { - 0x8D41, "GL_RENDERBUFFER", + 0x8D41, + "GL_RENDERBUFFER", }, { - 0x8D42, "GL_RENDERBUFFER_WIDTH", + 0x8D42, + "GL_RENDERBUFFER_WIDTH", }, { - 0x8D43, "GL_RENDERBUFFER_HEIGHT", + 0x8D43, + "GL_RENDERBUFFER_HEIGHT", }, { - 0x8D44, "GL_RENDERBUFFER_INTERNAL_FORMAT", + 0x8D44, + "GL_RENDERBUFFER_INTERNAL_FORMAT", }, { - 0x8D46, "GL_STENCIL_INDEX1_OES", + 0x8D46, + "GL_STENCIL_INDEX1_OES", }, { - 0x8D47, "GL_STENCIL_INDEX4_OES", + 0x8D47, + "GL_STENCIL_INDEX4_OES", }, { - 0x8D48, "GL_STENCIL_INDEX8", + 0x8D48, + "GL_STENCIL_INDEX8", }, { - 0x8D50, "GL_RENDERBUFFER_RED_SIZE", + 0x8D50, + "GL_RENDERBUFFER_RED_SIZE", }, { - 0x8D51, "GL_RENDERBUFFER_GREEN_SIZE", + 0x8D51, + "GL_RENDERBUFFER_GREEN_SIZE", }, { - 0x8D52, "GL_RENDERBUFFER_BLUE_SIZE", + 0x8D52, + "GL_RENDERBUFFER_BLUE_SIZE", }, { - 0x8D53, "GL_RENDERBUFFER_ALPHA_SIZE", + 0x8D53, + "GL_RENDERBUFFER_ALPHA_SIZE", }, { - 0x8D54, "GL_RENDERBUFFER_DEPTH_SIZE", + 0x8D54, + "GL_RENDERBUFFER_DEPTH_SIZE", }, { - 0x8D55, "GL_RENDERBUFFER_STENCIL_SIZE", + 0x8D55, + "GL_RENDERBUFFER_STENCIL_SIZE", }, { - 0x8D56, "GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE_ANGLE", + 0x8D56, + "GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE_ANGLE", }, { - 0x8D57, "GL_MAX_SAMPLES_ANGLE", + 0x8D57, + "GL_MAX_SAMPLES_ANGLE", }, { - 0x8D61, "GL_HALF_FLOAT_OES", + 0x8D61, + "GL_HALF_FLOAT_OES", }, { - 0x8D62, "GL_RGB565", + 0x8D62, + "GL_RGB565", }, { - 0x8D64, "GL_ETC1_RGB8_OES", + 0x8D64, + "GL_ETC1_RGB8_OES", }, { - 0x8D65, "GL_TEXTURE_EXTERNAL_OES", + 0x8D65, + "GL_TEXTURE_EXTERNAL_OES", }, { - 0x8D66, "GL_SAMPLER_EXTERNAL_OES", + 0x8D66, + "GL_SAMPLER_EXTERNAL_OES", }, { - 0x8D67, "GL_TEXTURE_BINDING_EXTERNAL_OES", + 0x8D67, + "GL_TEXTURE_BINDING_EXTERNAL_OES", }, { - 0x8D68, "GL_REQUIRED_TEXTURE_IMAGE_UNITS_OES", + 0x8D68, + "GL_REQUIRED_TEXTURE_IMAGE_UNITS_OES", }, { - 0x8D69, "GL_PRIMITIVE_RESTART_FIXED_INDEX", + 0x8D69, + "GL_PRIMITIVE_RESTART_FIXED_INDEX", }, { - 0x8D6A, "GL_ANY_SAMPLES_PASSED_CONSERVATIVE_EXT", + 0x8D6A, + "GL_ANY_SAMPLES_PASSED_CONSERVATIVE_EXT", }, { - 0x8D6B, "GL_MAX_ELEMENT_INDEX", + 0x8D6B, + "GL_MAX_ELEMENT_INDEX", }, { - 0x8D6C, "GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_SAMPLES_EXT", + 0x8D6C, + "GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_SAMPLES_EXT", }, { - 0x8D70, "GL_RGBA32UI", + 0x8D70, + "GL_RGBA32UI", }, { - 0x8D71, "GL_RGB32UI", + 0x8D71, + "GL_RGB32UI", }, { - 0x8D76, "GL_RGBA16UI", + 0x8D76, + "GL_RGBA16UI", }, { - 0x8D77, "GL_RGB16UI", + 0x8D77, + "GL_RGB16UI", }, { - 0x8D7C, "GL_RGBA8UI", + 0x8D7C, + "GL_RGBA8UI", }, { - 0x8D7D, "GL_RGB8UI", + 0x8D7D, + "GL_RGB8UI", }, { - 0x8D82, "GL_RGBA32I", + 0x8D82, + "GL_RGBA32I", }, { - 0x8D83, "GL_RGB32I", + 0x8D83, + "GL_RGB32I", }, { - 0x8D88, "GL_RGBA16I", + 0x8D88, + "GL_RGBA16I", }, { - 0x8D89, "GL_RGB16I", + 0x8D89, + "GL_RGB16I", }, { - 0x8D8E, "GL_RGBA8I", + 0x8D8E, + "GL_RGBA8I", }, { - 0x8D8F, "GL_RGB8I", + 0x8D8F, + "GL_RGB8I", }, { - 0x8D94, "GL_RED_INTEGER", + 0x8D94, + "GL_RED_INTEGER", }, { - 0x8D98, "GL_RGB_INTEGER", + 0x8D98, + "GL_RGB_INTEGER", }, { - 0x8D99, "GL_RGBA_INTEGER", + 0x8D99, + "GL_RGBA_INTEGER", }, { - 0x8D9F, "GL_INT_2_10_10_10_REV", + 0x8D9F, + "GL_INT_2_10_10_10_REV", }, { - 0x8DA7, "GL_FRAMEBUFFER_ATTACHMENT_LAYERED_OES", + 0x8DA7, + "GL_FRAMEBUFFER_ATTACHMENT_LAYERED_OES", }, { - 0x8DA8, "GL_FRAMEBUFFER_INCOMPLETE_LAYER_TARGETS_OES", + 0x8DA8, + "GL_FRAMEBUFFER_INCOMPLETE_LAYER_TARGETS_OES", }, { - 0x8DAD, "GL_FLOAT_32_UNSIGNED_INT_24_8_REV", + 0x8DAD, + "GL_FLOAT_32_UNSIGNED_INT_24_8_REV", }, { - 0x8DB9, "GL_FRAMEBUFFER_SRGB_EXT", + 0x8DB9, + "GL_FRAMEBUFFER_SRGB_EXT", }, { - 0x8DC1, "GL_SAMPLER_2D_ARRAY", + 0x8DC1, + "GL_SAMPLER_2D_ARRAY", }, { - 0x8DC2, "GL_SAMPLER_BUFFER_OES", + 0x8DC2, + "GL_SAMPLER_BUFFER_OES", }, { - 0x8DC4, "GL_SAMPLER_2D_ARRAY_SHADOW_NV", + 0x8DC4, + "GL_SAMPLER_2D_ARRAY_SHADOW_NV", }, { - 0x8DC5, "GL_SAMPLER_CUBE_SHADOW_NV", + 0x8DC5, + "GL_SAMPLER_CUBE_SHADOW_NV", }, { - 0x8DC6, "GL_UNSIGNED_INT_VEC2", + 0x8DC6, + "GL_UNSIGNED_INT_VEC2", }, { - 0x8DC7, "GL_UNSIGNED_INT_VEC3", + 0x8DC7, + "GL_UNSIGNED_INT_VEC3", }, { - 0x8DC8, "GL_UNSIGNED_INT_VEC4", + 0x8DC8, + "GL_UNSIGNED_INT_VEC4", }, { - 0x8DCA, "GL_INT_SAMPLER_2D", + 0x8DCA, + "GL_INT_SAMPLER_2D", }, { - 0x8DCB, "GL_INT_SAMPLER_3D", + 0x8DCB, + "GL_INT_SAMPLER_3D", }, { - 0x8DCC, "GL_INT_SAMPLER_CUBE", + 0x8DCC, + "GL_INT_SAMPLER_CUBE", }, { - 0x8DCF, "GL_INT_SAMPLER_2D_ARRAY", + 0x8DCF, + "GL_INT_SAMPLER_2D_ARRAY", }, { - 0x8DD0, "GL_INT_SAMPLER_BUFFER_OES", + 0x8DD0, + "GL_INT_SAMPLER_BUFFER_OES", }, { - 0x8DD2, "GL_UNSIGNED_INT_SAMPLER_2D", + 0x8DD2, + "GL_UNSIGNED_INT_SAMPLER_2D", }, { - 0x8DD3, "GL_UNSIGNED_INT_SAMPLER_3D", + 0x8DD3, + "GL_UNSIGNED_INT_SAMPLER_3D", }, { - 0x8DD4, "GL_UNSIGNED_INT_SAMPLER_CUBE", + 0x8DD4, + "GL_UNSIGNED_INT_SAMPLER_CUBE", }, { - 0x8DD7, "GL_UNSIGNED_INT_SAMPLER_2D_ARRAY", + 0x8DD7, + "GL_UNSIGNED_INT_SAMPLER_2D_ARRAY", }, { - 0x8DD8, "GL_UNSIGNED_INT_SAMPLER_BUFFER_OES", + 0x8DD8, + "GL_UNSIGNED_INT_SAMPLER_BUFFER_OES", }, { - 0x8DD9, "GL_GEOMETRY_SHADER_OES", + 0x8DD9, + "GL_GEOMETRY_SHADER_OES", }, { - 0x8DDF, "GL_MAX_GEOMETRY_UNIFORM_COMPONENTS_OES", + 0x8DDF, + "GL_MAX_GEOMETRY_UNIFORM_COMPONENTS_OES", }, { - 0x8DE0, "GL_MAX_GEOMETRY_OUTPUT_VERTICES_OES", + 0x8DE0, + "GL_MAX_GEOMETRY_OUTPUT_VERTICES_OES", }, { - 0x8DE1, "GL_MAX_GEOMETRY_TOTAL_OUTPUT_COMPONENTS_OES", + 0x8DE1, + "GL_MAX_GEOMETRY_TOTAL_OUTPUT_COMPONENTS_OES", }, { - 0x8DF0, "GL_LOW_FLOAT", + 0x8DF0, + "GL_LOW_FLOAT", }, { - 0x8DF1, "GL_MEDIUM_FLOAT", + 0x8DF1, + "GL_MEDIUM_FLOAT", }, { - 0x8DF2, "GL_HIGH_FLOAT", + 0x8DF2, + "GL_HIGH_FLOAT", }, { - 0x8DF3, "GL_LOW_INT", + 0x8DF3, + "GL_LOW_INT", }, { - 0x8DF4, "GL_MEDIUM_INT", + 0x8DF4, + "GL_MEDIUM_INT", }, { - 0x8DF5, "GL_HIGH_INT", + 0x8DF5, + "GL_HIGH_INT", }, { - 0x8DF6, "GL_UNSIGNED_INT_10_10_10_2_OES", + 0x8DF6, + "GL_UNSIGNED_INT_10_10_10_2_OES", }, { - 0x8DF7, "GL_INT_10_10_10_2_OES", + 0x8DF7, + "GL_INT_10_10_10_2_OES", }, { - 0x8DF8, "GL_SHADER_BINARY_FORMATS", + 0x8DF8, + "GL_SHADER_BINARY_FORMATS", }, { - 0x8DF9, "GL_NUM_SHADER_BINARY_FORMATS", + 0x8DF9, + "GL_NUM_SHADER_BINARY_FORMATS", }, { - 0x8DFA, "GL_SHADER_COMPILER", + 0x8DFA, + "GL_SHADER_COMPILER", }, { - 0x8DFB, "GL_MAX_VERTEX_UNIFORM_VECTORS", + 0x8DFB, + "GL_MAX_VERTEX_UNIFORM_VECTORS", }, { - 0x8DFC, "GL_MAX_VARYING_VECTORS", + 0x8DFC, + "GL_MAX_VARYING_VECTORS", }, { - 0x8DFD, "GL_MAX_FRAGMENT_UNIFORM_VECTORS", + 0x8DFD, + "GL_MAX_FRAGMENT_UNIFORM_VECTORS", }, { - 0x8E13, "GL_QUERY_WAIT_NV", + 0x8E13, + "GL_QUERY_WAIT_NV", }, { - 0x8E14, "GL_QUERY_NO_WAIT_NV", + 0x8E14, + "GL_QUERY_NO_WAIT_NV", }, { - 0x8E15, "GL_QUERY_BY_REGION_WAIT_NV", + 0x8E15, + "GL_QUERY_BY_REGION_WAIT_NV", }, { - 0x8E16, "GL_QUERY_BY_REGION_NO_WAIT_NV", + 0x8E16, + "GL_QUERY_BY_REGION_NO_WAIT_NV", }, { - 0x8E1B, "GL_POLYGON_OFFSET_CLAMP_EXT", + 0x8E1B, + "GL_POLYGON_OFFSET_CLAMP_EXT", }, { - 0x8E1E, "GL_MAX_COMBINED_TESS_CONTROL_UNIFORM_COMPONENTS_OES", + 0x8E1E, + "GL_MAX_COMBINED_TESS_CONTROL_UNIFORM_COMPONENTS_OES", }, { - 0x8E1F, "GL_MAX_COMBINED_TESS_EVALUATION_UNIFORM_COMPONENTS_OES", + 0x8E1F, + "GL_MAX_COMBINED_TESS_EVALUATION_UNIFORM_COMPONENTS_OES", }, { - 0x8E20, "GL_COLOR_SAMPLES_NV", + 0x8E20, + "GL_COLOR_SAMPLES_NV", }, { - 0x8E22, "GL_TRANSFORM_FEEDBACK", + 0x8E22, + "GL_TRANSFORM_FEEDBACK", }, { - 0x8E23, "GL_TRANSFORM_FEEDBACK_PAUSED", + 0x8E23, + "GL_TRANSFORM_FEEDBACK_PAUSED", }, { - 0x8E24, "GL_TRANSFORM_FEEDBACK_ACTIVE", + 0x8E24, + "GL_TRANSFORM_FEEDBACK_ACTIVE", }, { - 0x8E25, "GL_TRANSFORM_FEEDBACK_BINDING", + 0x8E25, + "GL_TRANSFORM_FEEDBACK_BINDING", }, { - 0x8E28, "GL_TIMESTAMP_EXT", + 0x8E28, + "GL_TIMESTAMP_EXT", }, { - 0x8E2C, "GL_DEPTH_COMPONENT16_NONLINEAR_NV", + 0x8E2C, + "GL_DEPTH_COMPONENT16_NONLINEAR_NV", }, { - 0x8E42, "GL_TEXTURE_SWIZZLE_R", + 0x8E42, + "GL_TEXTURE_SWIZZLE_R", }, { - 0x8E43, "GL_TEXTURE_SWIZZLE_G", + 0x8E43, + "GL_TEXTURE_SWIZZLE_G", }, { - 0x8E44, "GL_TEXTURE_SWIZZLE_B", + 0x8E44, + "GL_TEXTURE_SWIZZLE_B", }, { - 0x8E45, "GL_TEXTURE_SWIZZLE_A", + 0x8E45, + "GL_TEXTURE_SWIZZLE_A", }, { - 0x8E4D, "GL_FIRST_VERTEX_CONVENTION_OES", + 0x8E4D, + "GL_FIRST_VERTEX_CONVENTION_OES", }, { - 0x8E4E, "GL_LAST_VERTEX_CONVENTION_OES", + 0x8E4E, + "GL_LAST_VERTEX_CONVENTION_OES", }, { - 0x8E50, "GL_SAMPLE_LOCATION_NV", + 0x8E50, + "GL_SAMPLE_LOCATION_NV", }, { - 0x8E51, "GL_SAMPLE_MASK", + 0x8E51, + "GL_SAMPLE_MASK", }, { - 0x8E52, "GL_SAMPLE_MASK_VALUE", + 0x8E52, + "GL_SAMPLE_MASK_VALUE", }, { - 0x8E59, "GL_MAX_SAMPLE_MASK_WORDS", + 0x8E59, + "GL_MAX_SAMPLE_MASK_WORDS", }, { - 0x8E5A, "GL_MAX_GEOMETRY_SHADER_INVOCATIONS_OES", + 0x8E5A, + "GL_MAX_GEOMETRY_SHADER_INVOCATIONS_OES", }, { - 0x8E5B, "GL_MIN_FRAGMENT_INTERPOLATION_OFFSET_OES", + 0x8E5B, + "GL_MIN_FRAGMENT_INTERPOLATION_OFFSET_OES", }, { - 0x8E5C, "GL_MAX_FRAGMENT_INTERPOLATION_OFFSET_OES", + 0x8E5C, + "GL_MAX_FRAGMENT_INTERPOLATION_OFFSET_OES", }, { - 0x8E5D, "GL_FRAGMENT_INTERPOLATION_OFFSET_BITS_OES", + 0x8E5D, + "GL_FRAGMENT_INTERPOLATION_OFFSET_BITS_OES", }, { - 0x8E5E, "GL_MIN_PROGRAM_TEXTURE_GATHER_OFFSET", + 0x8E5E, + "GL_MIN_PROGRAM_TEXTURE_GATHER_OFFSET", }, { - 0x8E5F, "GL_MAX_PROGRAM_TEXTURE_GATHER_OFFSET", + 0x8E5F, + "GL_MAX_PROGRAM_TEXTURE_GATHER_OFFSET", }, { - 0x8E72, "GL_PATCH_VERTICES_OES", + 0x8E72, + "GL_PATCH_VERTICES_OES", }, { - 0x8E75, "GL_TESS_CONTROL_OUTPUT_VERTICES_OES", + 0x8E75, + "GL_TESS_CONTROL_OUTPUT_VERTICES_OES", }, { - 0x8E76, "GL_TESS_GEN_MODE_OES", + 0x8E76, + "GL_TESS_GEN_MODE_OES", }, { - 0x8E77, "GL_TESS_GEN_SPACING_OES", + 0x8E77, + "GL_TESS_GEN_SPACING_OES", }, { - 0x8E78, "GL_TESS_GEN_VERTEX_ORDER_OES", + 0x8E78, + "GL_TESS_GEN_VERTEX_ORDER_OES", }, { - 0x8E79, "GL_TESS_GEN_POINT_MODE_OES", + 0x8E79, + "GL_TESS_GEN_POINT_MODE_OES", }, { - 0x8E7A, "GL_ISOLINES_OES", + 0x8E7A, + "GL_ISOLINES_OES", }, { - 0x8E7B, "GL_FRACTIONAL_ODD_OES", + 0x8E7B, + "GL_FRACTIONAL_ODD_OES", }, { - 0x8E7C, "GL_FRACTIONAL_EVEN_OES", + 0x8E7C, + "GL_FRACTIONAL_EVEN_OES", }, { - 0x8E7D, "GL_MAX_PATCH_VERTICES_OES", + 0x8E7D, + "GL_MAX_PATCH_VERTICES_OES", }, { - 0x8E7E, "GL_MAX_TESS_GEN_LEVEL_OES", + 0x8E7E, + "GL_MAX_TESS_GEN_LEVEL_OES", }, { - 0x8E7F, "GL_MAX_TESS_CONTROL_UNIFORM_COMPONENTS_OES", + 0x8E7F, + "GL_MAX_TESS_CONTROL_UNIFORM_COMPONENTS_OES", }, { - 0x8E80, "GL_MAX_TESS_EVALUATION_UNIFORM_COMPONENTS_OES", + 0x8E80, + "GL_MAX_TESS_EVALUATION_UNIFORM_COMPONENTS_OES", }, { - 0x8E81, "GL_MAX_TESS_CONTROL_TEXTURE_IMAGE_UNITS_OES", + 0x8E81, + "GL_MAX_TESS_CONTROL_TEXTURE_IMAGE_UNITS_OES", }, { - 0x8E82, "GL_MAX_TESS_EVALUATION_TEXTURE_IMAGE_UNITS_OES", + 0x8E82, + "GL_MAX_TESS_EVALUATION_TEXTURE_IMAGE_UNITS_OES", }, { - 0x8E83, "GL_MAX_TESS_CONTROL_OUTPUT_COMPONENTS_OES", + 0x8E83, + "GL_MAX_TESS_CONTROL_OUTPUT_COMPONENTS_OES", }, { - 0x8E84, "GL_MAX_TESS_PATCH_COMPONENTS_OES", + 0x8E84, + "GL_MAX_TESS_PATCH_COMPONENTS_OES", }, { - 0x8E85, "GL_MAX_TESS_CONTROL_TOTAL_OUTPUT_COMPONENTS_OES", + 0x8E85, + "GL_MAX_TESS_CONTROL_TOTAL_OUTPUT_COMPONENTS_OES", }, { - 0x8E86, "GL_MAX_TESS_EVALUATION_OUTPUT_COMPONENTS_OES", + 0x8E86, + "GL_MAX_TESS_EVALUATION_OUTPUT_COMPONENTS_OES", }, { - 0x8E87, "GL_TESS_EVALUATION_SHADER_OES", + 0x8E87, + "GL_TESS_EVALUATION_SHADER_OES", }, { - 0x8E88, "GL_TESS_CONTROL_SHADER_OES", + 0x8E88, + "GL_TESS_CONTROL_SHADER_OES", }, { - 0x8E89, "GL_MAX_TESS_CONTROL_UNIFORM_BLOCKS_OES", + 0x8E89, + "GL_MAX_TESS_CONTROL_UNIFORM_BLOCKS_OES", }, { - 0x8E8A, "GL_MAX_TESS_EVALUATION_UNIFORM_BLOCKS_OES", + 0x8E8A, + "GL_MAX_TESS_EVALUATION_UNIFORM_BLOCKS_OES", }, { - 0x8ED0, "GL_COVERAGE_COMPONENT_NV", + 0x8ED0, + "GL_COVERAGE_COMPONENT_NV", }, { - 0x8ED1, "GL_COVERAGE_COMPONENT4_NV", + 0x8ED1, + "GL_COVERAGE_COMPONENT4_NV", }, { - 0x8ED2, "GL_COVERAGE_ATTACHMENT_NV", + 0x8ED2, + "GL_COVERAGE_ATTACHMENT_NV", }, { - 0x8ED3, "GL_COVERAGE_BUFFERS_NV", + 0x8ED3, + "GL_COVERAGE_BUFFERS_NV", }, { - 0x8ED4, "GL_COVERAGE_SAMPLES_NV", + 0x8ED4, + "GL_COVERAGE_SAMPLES_NV", }, { - 0x8ED5, "GL_COVERAGE_ALL_FRAGMENTS_NV", + 0x8ED5, + "GL_COVERAGE_ALL_FRAGMENTS_NV", }, { - 0x8ED6, "GL_COVERAGE_EDGE_FRAGMENTS_NV", + 0x8ED6, + "GL_COVERAGE_EDGE_FRAGMENTS_NV", }, { - 0x8ED7, "GL_COVERAGE_AUTOMATIC_NV", + 0x8ED7, + "GL_COVERAGE_AUTOMATIC_NV", }, { - 0x8F10, "GL_INCLUSIVE_EXT", + 0x8F10, + "GL_INCLUSIVE_EXT", }, { - 0x8F11, "GL_EXCLUSIVE_EXT", + 0x8F11, + "GL_EXCLUSIVE_EXT", }, { - 0x8F12, "GL_WINDOW_RECTANGLE_EXT", + 0x8F12, + "GL_WINDOW_RECTANGLE_EXT", }, { - 0x8F13, "GL_WINDOW_RECTANGLE_MODE_EXT", + 0x8F13, + "GL_WINDOW_RECTANGLE_MODE_EXT", }, { - 0x8F14, "GL_MAX_WINDOW_RECTANGLES_EXT", + 0x8F14, + "GL_MAX_WINDOW_RECTANGLES_EXT", }, { - 0x8F15, "GL_NUM_WINDOW_RECTANGLES_EXT", + 0x8F15, + "GL_NUM_WINDOW_RECTANGLES_EXT", }, { - 0x8F36, "GL_COPY_READ_BUFFER_NV", + 0x8F36, + "GL_COPY_READ_BUFFER_NV", }, { - 0x8F37, "GL_COPY_WRITE_BUFFER_NV", + 0x8F37, + "GL_COPY_WRITE_BUFFER_NV", }, { - 0x8F38, "GL_MAX_IMAGE_UNITS", + 0x8F38, + "GL_MAX_IMAGE_UNITS", }, { - 0x8F39, "GL_MAX_COMBINED_SHADER_OUTPUT_RESOURCES", + 0x8F39, + "GL_MAX_COMBINED_SHADER_OUTPUT_RESOURCES", }, { - 0x8F3A, "GL_IMAGE_BINDING_NAME", + 0x8F3A, + "GL_IMAGE_BINDING_NAME", }, { - 0x8F3B, "GL_IMAGE_BINDING_LEVEL", + 0x8F3B, + "GL_IMAGE_BINDING_LEVEL", }, { - 0x8F3C, "GL_IMAGE_BINDING_LAYERED", + 0x8F3C, + "GL_IMAGE_BINDING_LAYERED", }, { - 0x8F3D, "GL_IMAGE_BINDING_LAYER", + 0x8F3D, + "GL_IMAGE_BINDING_LAYER", }, { - 0x8F3E, "GL_IMAGE_BINDING_ACCESS", + 0x8F3E, + "GL_IMAGE_BINDING_ACCESS", }, { - 0x8F3F, "GL_DRAW_INDIRECT_BUFFER", + 0x8F3F, + "GL_DRAW_INDIRECT_BUFFER", }, { - 0x8F43, "GL_DRAW_INDIRECT_BUFFER_BINDING", + 0x8F43, + "GL_DRAW_INDIRECT_BUFFER_BINDING", }, { - 0x8F4F, "GL_VERTEX_BINDING_BUFFER", + 0x8F4F, + "GL_VERTEX_BINDING_BUFFER", }, { - 0x8F60, "GL_MALI_SHADER_BINARY_ARM", + 0x8F60, + "GL_MALI_SHADER_BINARY_ARM", }, { - 0x8F61, "GL_MALI_PROGRAM_BINARY_ARM", + 0x8F61, + "GL_MALI_PROGRAM_BINARY_ARM", }, { - 0x8F63, "GL_MAX_SHADER_PIXEL_LOCAL_STORAGE_FAST_SIZE_EXT", + 0x8F63, + "GL_MAX_SHADER_PIXEL_LOCAL_STORAGE_FAST_SIZE_EXT", }, { - 0x8F64, "GL_SHADER_PIXEL_LOCAL_STORAGE_EXT", + 0x8F64, + "GL_SHADER_PIXEL_LOCAL_STORAGE_EXT", }, { - 0x8F65, "GL_FETCH_PER_SAMPLE_ARM", + 0x8F65, + "GL_FETCH_PER_SAMPLE_ARM", }, { - 0x8F66, "GL_FRAGMENT_SHADER_FRAMEBUFFER_FETCH_MRT_ARM", + 0x8F66, + "GL_FRAGMENT_SHADER_FRAMEBUFFER_FETCH_MRT_ARM", }, { - 0x8F67, "GL_MAX_SHADER_PIXEL_LOCAL_STORAGE_SIZE_EXT", + 0x8F67, + "GL_MAX_SHADER_PIXEL_LOCAL_STORAGE_SIZE_EXT", }, { - 0x8F69, "GL_TEXTURE_ASTC_DECODE_PRECISION_EXT", + 0x8F69, + "GL_TEXTURE_ASTC_DECODE_PRECISION_EXT", }, { - 0x8F94, "GL_R8_SNORM", + 0x8F94, + "GL_R8_SNORM", }, { - 0x8F95, "GL_RG8_SNORM", + 0x8F95, + "GL_RG8_SNORM", }, { - 0x8F96, "GL_RGB8_SNORM", + 0x8F96, + "GL_RGB8_SNORM", }, { - 0x8F97, "GL_RGBA8_SNORM", + 0x8F97, + "GL_RGBA8_SNORM", }, { - 0x8F98, "GL_R16_SNORM_EXT", + 0x8F98, + "GL_R16_SNORM_EXT", }, { - 0x8F99, "GL_RG16_SNORM_EXT", + 0x8F99, + "GL_RG16_SNORM_EXT", }, { - 0x8F9A, "GL_RGB16_SNORM_EXT", + 0x8F9A, + "GL_RGB16_SNORM_EXT", }, { - 0x8F9B, "GL_RGBA16_SNORM_EXT", + 0x8F9B, + "GL_RGBA16_SNORM_EXT", }, { - 0x8F9C, "GL_SIGNED_NORMALIZED", + 0x8F9C, + "GL_SIGNED_NORMALIZED", }, { - 0x8FA0, "GL_PERFMON_GLOBAL_MODE_QCOM", + 0x8FA0, + "GL_PERFMON_GLOBAL_MODE_QCOM", }, { - 0x8FB0, "GL_BINNING_CONTROL_HINT_QCOM", + 0x8FB0, + "GL_BINNING_CONTROL_HINT_QCOM", }, { - 0x8FB1, "GL_CPU_OPTIMIZED_QCOM", + 0x8FB1, + "GL_CPU_OPTIMIZED_QCOM", }, { - 0x8FB2, "GL_GPU_OPTIMIZED_QCOM", + 0x8FB2, + "GL_GPU_OPTIMIZED_QCOM", }, { - 0x8FB3, "GL_RENDER_DIRECT_TO_FRAMEBUFFER_QCOM", + 0x8FB3, + "GL_RENDER_DIRECT_TO_FRAMEBUFFER_QCOM", }, { - 0x8FBB, "GL_GPU_DISJOINT_EXT", + 0x8FBB, + "GL_GPU_DISJOINT_EXT", }, { - 0x8FBD, "GL_SR8_EXT", + 0x8FBD, + "GL_SR8_EXT", }, { - 0x8FBE, "GL_SRG8_EXT", + 0x8FBE, + "GL_SRG8_EXT", }, { - 0x8FC4, "GL_SHADER_BINARY_VIV", + 0x8FC4, + "GL_SHADER_BINARY_VIV", }, { - 0x8FE0, "GL_INT8_NV", + 0x8FE0, + "GL_INT8_NV", }, { - 0x8FE1, "GL_INT8_VEC2_NV", + 0x8FE1, + "GL_INT8_VEC2_NV", }, { - 0x8FE2, "GL_INT8_VEC3_NV", + 0x8FE2, + "GL_INT8_VEC3_NV", }, { - 0x8FE3, "GL_INT8_VEC4_NV", + 0x8FE3, + "GL_INT8_VEC4_NV", }, { - 0x8FE4, "GL_INT16_NV", + 0x8FE4, + "GL_INT16_NV", }, { - 0x8FE5, "GL_INT16_VEC2_NV", + 0x8FE5, + "GL_INT16_VEC2_NV", }, { - 0x8FE6, "GL_INT16_VEC3_NV", + 0x8FE6, + "GL_INT16_VEC3_NV", }, { - 0x8FE7, "GL_INT16_VEC4_NV", + 0x8FE7, + "GL_INT16_VEC4_NV", }, { - 0x8FE9, "GL_INT64_VEC2_NV", + 0x8FE9, + "GL_INT64_VEC2_NV", }, { - 0x8FEA, "GL_INT64_VEC3_NV", + 0x8FEA, + "GL_INT64_VEC3_NV", }, { - 0x8FEB, "GL_INT64_VEC4_NV", + 0x8FEB, + "GL_INT64_VEC4_NV", }, { - 0x8FEC, "GL_UNSIGNED_INT8_NV", + 0x8FEC, + "GL_UNSIGNED_INT8_NV", }, { - 0x8FED, "GL_UNSIGNED_INT8_VEC2_NV", + 0x8FED, + "GL_UNSIGNED_INT8_VEC2_NV", }, { - 0x8FEE, "GL_UNSIGNED_INT8_VEC3_NV", + 0x8FEE, + "GL_UNSIGNED_INT8_VEC3_NV", }, { - 0x8FEF, "GL_UNSIGNED_INT8_VEC4_NV", + 0x8FEF, + "GL_UNSIGNED_INT8_VEC4_NV", }, { - 0x8FF0, "GL_UNSIGNED_INT16_NV", + 0x8FF0, + "GL_UNSIGNED_INT16_NV", }, { - 0x8FF1, "GL_UNSIGNED_INT16_VEC2_NV", + 0x8FF1, + "GL_UNSIGNED_INT16_VEC2_NV", }, { - 0x8FF2, "GL_UNSIGNED_INT16_VEC3_NV", + 0x8FF2, + "GL_UNSIGNED_INT16_VEC3_NV", }, { - 0x8FF3, "GL_UNSIGNED_INT16_VEC4_NV", + 0x8FF3, + "GL_UNSIGNED_INT16_VEC4_NV", }, { - 0x8FF5, "GL_UNSIGNED_INT64_VEC2_NV", + 0x8FF5, + "GL_UNSIGNED_INT64_VEC2_NV", }, { - 0x8FF6, "GL_UNSIGNED_INT64_VEC3_NV", + 0x8FF6, + "GL_UNSIGNED_INT64_VEC3_NV", }, { - 0x8FF7, "GL_UNSIGNED_INT64_VEC4_NV", + 0x8FF7, + "GL_UNSIGNED_INT64_VEC4_NV", }, { - 0x8FF8, "GL_FLOAT16_NV", + 0x8FF8, + "GL_FLOAT16_NV", }, { - 0x8FF9, "GL_FLOAT16_VEC2_NV", + 0x8FF9, + "GL_FLOAT16_VEC2_NV", }, { - 0x8FFA, "GL_FLOAT16_VEC3_NV", + 0x8FFA, + "GL_FLOAT16_VEC3_NV", }, { - 0x8FFB, "GL_FLOAT16_VEC4_NV", + 0x8FFB, + "GL_FLOAT16_VEC4_NV", }, { - 0x9009, "GL_TEXTURE_CUBE_MAP_ARRAY_OES", + 0x9009, + "GL_TEXTURE_CUBE_MAP_ARRAY_OES", }, { - 0x900A, "GL_TEXTURE_BINDING_CUBE_MAP_ARRAY_OES", + 0x900A, + "GL_TEXTURE_BINDING_CUBE_MAP_ARRAY_OES", }, { - 0x900C, "GL_SAMPLER_CUBE_MAP_ARRAY_OES", + 0x900C, + "GL_SAMPLER_CUBE_MAP_ARRAY_OES", }, { - 0x900D, "GL_SAMPLER_CUBE_MAP_ARRAY_SHADOW_OES", + 0x900D, + "GL_SAMPLER_CUBE_MAP_ARRAY_SHADOW_OES", }, { - 0x900E, "GL_INT_SAMPLER_CUBE_MAP_ARRAY_OES", + 0x900E, + "GL_INT_SAMPLER_CUBE_MAP_ARRAY_OES", }, { - 0x900F, "GL_UNSIGNED_INT_SAMPLER_CUBE_MAP_ARRAY_OES", + 0x900F, + "GL_UNSIGNED_INT_SAMPLER_CUBE_MAP_ARRAY_OES", }, { - 0x904D, "GL_IMAGE_2D", + 0x904D, + "GL_IMAGE_2D", }, { - 0x904E, "GL_IMAGE_3D", + 0x904E, + "GL_IMAGE_3D", }, { - 0x9050, "GL_IMAGE_CUBE", + 0x9050, + "GL_IMAGE_CUBE", }, { - 0x9051, "GL_IMAGE_BUFFER_OES", + 0x9051, + "GL_IMAGE_BUFFER_OES", }, { - 0x9053, "GL_IMAGE_2D_ARRAY", + 0x9053, + "GL_IMAGE_2D_ARRAY", }, { - 0x9054, "GL_IMAGE_CUBE_MAP_ARRAY_OES", + 0x9054, + "GL_IMAGE_CUBE_MAP_ARRAY_OES", }, { - 0x9058, "GL_INT_IMAGE_2D", + 0x9058, + "GL_INT_IMAGE_2D", }, { - 0x9059, "GL_INT_IMAGE_3D", + 0x9059, + "GL_INT_IMAGE_3D", }, { - 0x905B, "GL_INT_IMAGE_CUBE", + 0x905B, + "GL_INT_IMAGE_CUBE", }, { - 0x905C, "GL_INT_IMAGE_BUFFER_OES", + 0x905C, + "GL_INT_IMAGE_BUFFER_OES", }, { - 0x905E, "GL_INT_IMAGE_2D_ARRAY", + 0x905E, + "GL_INT_IMAGE_2D_ARRAY", }, { - 0x905F, "GL_INT_IMAGE_CUBE_MAP_ARRAY_OES", + 0x905F, + "GL_INT_IMAGE_CUBE_MAP_ARRAY_OES", }, { - 0x9063, "GL_UNSIGNED_INT_IMAGE_2D", + 0x9063, + "GL_UNSIGNED_INT_IMAGE_2D", }, { - 0x9064, "GL_UNSIGNED_INT_IMAGE_3D", + 0x9064, + "GL_UNSIGNED_INT_IMAGE_3D", }, { - 0x9066, "GL_UNSIGNED_INT_IMAGE_CUBE", + 0x9066, + "GL_UNSIGNED_INT_IMAGE_CUBE", }, { - 0x9067, "GL_UNSIGNED_INT_IMAGE_BUFFER_OES", + 0x9067, + "GL_UNSIGNED_INT_IMAGE_BUFFER_OES", }, { - 0x9069, "GL_UNSIGNED_INT_IMAGE_2D_ARRAY", + 0x9069, + "GL_UNSIGNED_INT_IMAGE_2D_ARRAY", }, { - 0x906A, "GL_UNSIGNED_INT_IMAGE_CUBE_MAP_ARRAY_OES", + 0x906A, + "GL_UNSIGNED_INT_IMAGE_CUBE_MAP_ARRAY_OES", }, { - 0x906E, "GL_IMAGE_BINDING_FORMAT", + 0x906E, + "GL_IMAGE_BINDING_FORMAT", }, { - 0x906F, "GL_RGB10_A2UI", + 0x906F, + "GL_RGB10_A2UI", }, { - 0x9070, "GL_PATH_FORMAT_SVG_NV", + 0x9070, + "GL_PATH_FORMAT_SVG_NV", }, { - 0x9071, "GL_PATH_FORMAT_PS_NV", + 0x9071, + "GL_PATH_FORMAT_PS_NV", }, { - 0x9072, "GL_STANDARD_FONT_NAME_NV", + 0x9072, + "GL_STANDARD_FONT_NAME_NV", }, { - 0x9073, "GL_SYSTEM_FONT_NAME_NV", + 0x9073, + "GL_SYSTEM_FONT_NAME_NV", }, { - 0x9074, "GL_FILE_NAME_NV", + 0x9074, + "GL_FILE_NAME_NV", }, { - 0x9075, "GL_PATH_STROKE_WIDTH_NV", + 0x9075, + "GL_PATH_STROKE_WIDTH_NV", }, { - 0x9076, "GL_PATH_END_CAPS_NV", + 0x9076, + "GL_PATH_END_CAPS_NV", }, { - 0x9077, "GL_PATH_INITIAL_END_CAP_NV", + 0x9077, + "GL_PATH_INITIAL_END_CAP_NV", }, { - 0x9078, "GL_PATH_TERMINAL_END_CAP_NV", + 0x9078, + "GL_PATH_TERMINAL_END_CAP_NV", }, { - 0x9079, "GL_PATH_JOIN_STYLE_NV", + 0x9079, + "GL_PATH_JOIN_STYLE_NV", }, { - 0x907A, "GL_PATH_MITER_LIMIT_NV", + 0x907A, + "GL_PATH_MITER_LIMIT_NV", }, { - 0x907B, "GL_PATH_DASH_CAPS_NV", + 0x907B, + "GL_PATH_DASH_CAPS_NV", }, { - 0x907C, "GL_PATH_INITIAL_DASH_CAP_NV", + 0x907C, + "GL_PATH_INITIAL_DASH_CAP_NV", }, { - 0x907D, "GL_PATH_TERMINAL_DASH_CAP_NV", + 0x907D, + "GL_PATH_TERMINAL_DASH_CAP_NV", }, { - 0x907E, "GL_PATH_DASH_OFFSET_NV", + 0x907E, + "GL_PATH_DASH_OFFSET_NV", }, { - 0x907F, "GL_PATH_CLIENT_LENGTH_NV", + 0x907F, + "GL_PATH_CLIENT_LENGTH_NV", }, { - 0x907a, "GL_PATH_MITER_LIMIT_CHROMIUM", + 0x907a, + "GL_PATH_MITER_LIMIT_CHROMIUM", }, { - 0x9080, "GL_PATH_FILL_MODE_NV", + 0x9080, + "GL_PATH_FILL_MODE_NV", }, { - 0x9081, "GL_PATH_FILL_MASK_NV", + 0x9081, + "GL_PATH_FILL_MASK_NV", }, { - 0x9082, "GL_PATH_FILL_COVER_MODE_NV", + 0x9082, + "GL_PATH_FILL_COVER_MODE_NV", }, { - 0x9083, "GL_PATH_STROKE_COVER_MODE_NV", + 0x9083, + "GL_PATH_STROKE_COVER_MODE_NV", }, { - 0x9084, "GL_PATH_STROKE_MASK_NV", + 0x9084, + "GL_PATH_STROKE_MASK_NV", }, { - 0x9086, "GL_PATH_STROKE_BOUND_CHROMIUM", + 0x9086, + "GL_PATH_STROKE_BOUND_CHROMIUM", }, { - 0x9088, "GL_COUNT_UP_NV", + 0x9088, + "GL_COUNT_UP_NV", }, { - 0x9089, "GL_COUNT_DOWN_NV", + 0x9089, + "GL_COUNT_DOWN_NV", }, { - 0x908A, "GL_PATH_OBJECT_BOUNDING_BOX_NV", + 0x908A, + "GL_PATH_OBJECT_BOUNDING_BOX_NV", }, { - 0x908B, "GL_CONVEX_HULL_NV", + 0x908B, + "GL_CONVEX_HULL_NV", }, { - 0x908D, "GL_BOUNDING_BOX_NV", + 0x908D, + "GL_BOUNDING_BOX_NV", }, { - 0x908E, "GL_TRANSLATE_X_NV", + 0x908E, + "GL_TRANSLATE_X_NV", }, { - 0x908F, "GL_TRANSLATE_Y_NV", + 0x908F, + "GL_TRANSLATE_Y_NV", }, { - 0x9090, "GL_TRANSLATE_2D_NV", + 0x9090, + "GL_TRANSLATE_2D_NV", }, { - 0x9091, "GL_TRANSLATE_3D_NV", + 0x9091, + "GL_TRANSLATE_3D_NV", }, { - 0x9092, "GL_AFFINE_2D_NV", + 0x9092, + "GL_AFFINE_2D_NV", }, { - 0x9094, "GL_AFFINE_3D_NV", + 0x9094, + "GL_AFFINE_3D_NV", }, { - 0x9096, "GL_TRANSPOSE_AFFINE_2D_NV", + 0x9096, + "GL_TRANSPOSE_AFFINE_2D_NV", }, { - 0x9098, "GL_TRANSPOSE_AFFINE_3D_NV", + 0x9098, + "GL_TRANSPOSE_AFFINE_3D_NV", }, { - 0x909A, "GL_UTF8_NV", + 0x909A, + "GL_UTF8_NV", }, { - 0x909B, "GL_UTF16_NV", + 0x909B, + "GL_UTF16_NV", }, { - 0x909C, "GL_BOUNDING_BOX_OF_BOUNDING_BOXES_NV", + 0x909C, + "GL_BOUNDING_BOX_OF_BOUNDING_BOXES_NV", }, { - 0x909D, "GL_PATH_COMMAND_COUNT_NV", + 0x909D, + "GL_PATH_COMMAND_COUNT_NV", }, { - 0x909E, "GL_PATH_COORD_COUNT_NV", + 0x909E, + "GL_PATH_COORD_COUNT_NV", }, { - 0x909F, "GL_PATH_DASH_ARRAY_COUNT_NV", + 0x909F, + "GL_PATH_DASH_ARRAY_COUNT_NV", }, { - 0x90A0, "GL_PATH_COMPUTED_LENGTH_NV", + 0x90A0, + "GL_PATH_COMPUTED_LENGTH_NV", }, { - 0x90A1, "GL_PATH_FILL_BOUNDING_BOX_NV", + 0x90A1, + "GL_PATH_FILL_BOUNDING_BOX_NV", }, { - 0x90A2, "GL_PATH_STROKE_BOUNDING_BOX_NV", + 0x90A2, + "GL_PATH_STROKE_BOUNDING_BOX_NV", }, { - 0x90A3, "GL_SQUARE_NV", + 0x90A3, + "GL_SQUARE_NV", }, { - 0x90A4, "GL_ROUND_NV", + 0x90A4, + "GL_ROUND_NV", }, { - 0x90A5, "GL_TRIANGULAR_NV", + 0x90A5, + "GL_TRIANGULAR_NV", }, { - 0x90A6, "GL_BEVEL_NV", + 0x90A6, + "GL_BEVEL_NV", }, { - 0x90A7, "GL_MITER_REVERT_NV", + 0x90A7, + "GL_MITER_REVERT_NV", }, { - 0x90A8, "GL_MITER_TRUNCATE_NV", + 0x90A8, + "GL_MITER_TRUNCATE_NV", }, { - 0x90A9, "GL_SKIP_MISSING_GLYPH_NV", + 0x90A9, + "GL_SKIP_MISSING_GLYPH_NV", }, { - 0x90AA, "GL_USE_MISSING_GLYPH_NV", + 0x90AA, + "GL_USE_MISSING_GLYPH_NV", }, { - 0x90AB, "GL_PATH_ERROR_POSITION_NV", + 0x90AB, + "GL_PATH_ERROR_POSITION_NV", }, { - 0x90AD, "GL_ACCUM_ADJACENT_PAIRS_NV", + 0x90AD, + "GL_ACCUM_ADJACENT_PAIRS_NV", }, { - 0x90AE, "GL_ADJACENT_PAIRS_NV", + 0x90AE, + "GL_ADJACENT_PAIRS_NV", }, { - 0x90AF, "GL_FIRST_TO_REST_NV", + 0x90AF, + "GL_FIRST_TO_REST_NV", }, { - 0x90B0, "GL_PATH_GEN_MODE_NV", + 0x90B0, + "GL_PATH_GEN_MODE_NV", }, { - 0x90B1, "GL_PATH_GEN_COEFF_NV", + 0x90B1, + "GL_PATH_GEN_COEFF_NV", }, { - 0x90B3, "GL_PATH_GEN_COMPONENTS_NV", + 0x90B3, + "GL_PATH_GEN_COMPONENTS_NV", }, { - 0x90B4, "GL_PATH_DASH_OFFSET_RESET_NV", + 0x90B4, + "GL_PATH_DASH_OFFSET_RESET_NV", }, { - 0x90B5, "GL_MOVE_TO_RESETS_NV", + 0x90B5, + "GL_MOVE_TO_RESETS_NV", }, { - 0x90B6, "GL_MOVE_TO_CONTINUES_NV", + 0x90B6, + "GL_MOVE_TO_CONTINUES_NV", }, { - 0x90B7, "GL_PATH_STENCIL_FUNC_NV", + 0x90B7, + "GL_PATH_STENCIL_FUNC_NV", }, { - 0x90B8, "GL_PATH_STENCIL_REF_NV", + 0x90B8, + "GL_PATH_STENCIL_REF_NV", }, { - 0x90B9, "GL_PATH_STENCIL_VALUE_MASK_NV", + 0x90B9, + "GL_PATH_STENCIL_VALUE_MASK_NV", }, { - 0x90BD, "GL_PATH_STENCIL_DEPTH_OFFSET_FACTOR_NV", + 0x90BD, + "GL_PATH_STENCIL_DEPTH_OFFSET_FACTOR_NV", }, { - 0x90BE, "GL_PATH_STENCIL_DEPTH_OFFSET_UNITS_NV", + 0x90BE, + "GL_PATH_STENCIL_DEPTH_OFFSET_UNITS_NV", }, { - 0x90BF, "GL_PATH_COVER_DEPTH_FUNC_NV", + 0x90BF, + "GL_PATH_COVER_DEPTH_FUNC_NV", }, { - 0x90C7, "GL_IMAGE_FORMAT_COMPATIBILITY_TYPE", + 0x90C7, + "GL_IMAGE_FORMAT_COMPATIBILITY_TYPE", }, { - 0x90C8, "GL_IMAGE_FORMAT_COMPATIBILITY_BY_SIZE", + 0x90C8, + "GL_IMAGE_FORMAT_COMPATIBILITY_BY_SIZE", }, { - 0x90C9, "GL_IMAGE_FORMAT_COMPATIBILITY_BY_CLASS", + 0x90C9, + "GL_IMAGE_FORMAT_COMPATIBILITY_BY_CLASS", }, { - 0x90CA, "GL_MAX_VERTEX_IMAGE_UNIFORMS", + 0x90CA, + "GL_MAX_VERTEX_IMAGE_UNIFORMS", }, { - 0x90CB, "GL_MAX_TESS_CONTROL_IMAGE_UNIFORMS_OES", + 0x90CB, + "GL_MAX_TESS_CONTROL_IMAGE_UNIFORMS_OES", }, { - 0x90CC, "GL_MAX_TESS_EVALUATION_IMAGE_UNIFORMS_OES", + 0x90CC, + "GL_MAX_TESS_EVALUATION_IMAGE_UNIFORMS_OES", }, { - 0x90CD, "GL_MAX_GEOMETRY_IMAGE_UNIFORMS_OES", + 0x90CD, + "GL_MAX_GEOMETRY_IMAGE_UNIFORMS_OES", }, { - 0x90CE, "GL_MAX_FRAGMENT_IMAGE_UNIFORMS", + 0x90CE, + "GL_MAX_FRAGMENT_IMAGE_UNIFORMS", }, { - 0x90CF, "GL_MAX_COMBINED_IMAGE_UNIFORMS", + 0x90CF, + "GL_MAX_COMBINED_IMAGE_UNIFORMS", }, { - 0x90D2, "GL_SHADER_STORAGE_BUFFER", + 0x90D2, + "GL_SHADER_STORAGE_BUFFER", }, { - 0x90D3, "GL_SHADER_STORAGE_BUFFER_BINDING", + 0x90D3, + "GL_SHADER_STORAGE_BUFFER_BINDING", }, { - 0x90D4, "GL_SHADER_STORAGE_BUFFER_START", + 0x90D4, + "GL_SHADER_STORAGE_BUFFER_START", }, { - 0x90D5, "GL_SHADER_STORAGE_BUFFER_SIZE", + 0x90D5, + "GL_SHADER_STORAGE_BUFFER_SIZE", }, { - 0x90D6, "GL_MAX_VERTEX_SHADER_STORAGE_BLOCKS", + 0x90D6, + "GL_MAX_VERTEX_SHADER_STORAGE_BLOCKS", }, { - 0x90D7, "GL_MAX_GEOMETRY_SHADER_STORAGE_BLOCKS_OES", + 0x90D7, + "GL_MAX_GEOMETRY_SHADER_STORAGE_BLOCKS_OES", }, { - 0x90D8, "GL_MAX_TESS_CONTROL_SHADER_STORAGE_BLOCKS_OES", + 0x90D8, + "GL_MAX_TESS_CONTROL_SHADER_STORAGE_BLOCKS_OES", }, { - 0x90D9, "GL_MAX_TESS_EVALUATION_SHADER_STORAGE_BLOCKS_OES", + 0x90D9, + "GL_MAX_TESS_EVALUATION_SHADER_STORAGE_BLOCKS_OES", }, { - 0x90DA, "GL_MAX_FRAGMENT_SHADER_STORAGE_BLOCKS", + 0x90DA, + "GL_MAX_FRAGMENT_SHADER_STORAGE_BLOCKS", }, { - 0x90DB, "GL_MAX_COMPUTE_SHADER_STORAGE_BLOCKS", + 0x90DB, + "GL_MAX_COMPUTE_SHADER_STORAGE_BLOCKS", }, { - 0x90DC, "GL_MAX_COMBINED_SHADER_STORAGE_BLOCKS", + 0x90DC, + "GL_MAX_COMBINED_SHADER_STORAGE_BLOCKS", }, { - 0x90DD, "GL_MAX_SHADER_STORAGE_BUFFER_BINDINGS", + 0x90DD, + "GL_MAX_SHADER_STORAGE_BUFFER_BINDINGS", }, { - 0x90DE, "GL_MAX_SHADER_STORAGE_BLOCK_SIZE", + 0x90DE, + "GL_MAX_SHADER_STORAGE_BLOCK_SIZE", }, { - 0x90DF, "GL_SHADER_STORAGE_BUFFER_OFFSET_ALIGNMENT", + 0x90DF, + "GL_SHADER_STORAGE_BUFFER_OFFSET_ALIGNMENT", }, { - 0x90EA, "GL_DEPTH_STENCIL_TEXTURE_MODE", + 0x90EA, + "GL_DEPTH_STENCIL_TEXTURE_MODE", }, { - 0x90EB, "GL_MAX_COMPUTE_WORK_GROUP_INVOCATIONS", + 0x90EB, + "GL_MAX_COMPUTE_WORK_GROUP_INVOCATIONS", }, { - 0x90EE, "GL_DISPATCH_INDIRECT_BUFFER", + 0x90EE, + "GL_DISPATCH_INDIRECT_BUFFER", }, { - 0x90EF, "GL_DISPATCH_INDIRECT_BUFFER_BINDING", + 0x90EF, + "GL_DISPATCH_INDIRECT_BUFFER_BINDING", }, { - 0x90F0, "GL_COLOR_ATTACHMENT_EXT", + 0x90F0, + "GL_COLOR_ATTACHMENT_EXT", }, { - 0x90F1, "GL_MULTIVIEW_EXT", + 0x90F1, + "GL_MULTIVIEW_EXT", }, { - 0x90F2, "GL_MAX_MULTIVIEW_BUFFERS_EXT", + 0x90F2, + "GL_MAX_MULTIVIEW_BUFFERS_EXT", }, { - 0x90F3, "GL_CONTEXT_ROBUST_ACCESS_KHR", + 0x90F3, + "GL_CONTEXT_ROBUST_ACCESS_KHR", }, { - 0x90a3, "GL_SQUARE_CHROMIUM", + 0x90a3, + "GL_SQUARE_CHROMIUM", }, { - 0x90a4, "GL_ROUND_CHROMIUM", + 0x90a4, + "GL_ROUND_CHROMIUM", }, { - 0x9100, "GL_TEXTURE_2D_MULTISAMPLE", + 0x9100, + "GL_TEXTURE_2D_MULTISAMPLE", }, { - 0x9102, "GL_TEXTURE_2D_MULTISAMPLE_ARRAY_OES", + 0x9102, + "GL_TEXTURE_2D_MULTISAMPLE_ARRAY_OES", }, { - 0x9104, "GL_TEXTURE_BINDING_2D_MULTISAMPLE", + 0x9104, + "GL_TEXTURE_BINDING_2D_MULTISAMPLE", }, { - 0x9105, "GL_TEXTURE_BINDING_2D_MULTISAMPLE_ARRAY_OES", + 0x9105, + "GL_TEXTURE_BINDING_2D_MULTISAMPLE_ARRAY_OES", }, { - 0x9106, "GL_TEXTURE_SAMPLES", + 0x9106, + "GL_TEXTURE_SAMPLES", }, { - 0x9107, "GL_TEXTURE_FIXED_SAMPLE_LOCATIONS", + 0x9107, + "GL_TEXTURE_FIXED_SAMPLE_LOCATIONS", }, { - 0x9108, "GL_SAMPLER_2D_MULTISAMPLE", + 0x9108, + "GL_SAMPLER_2D_MULTISAMPLE", }, { - 0x9109, "GL_INT_SAMPLER_2D_MULTISAMPLE", + 0x9109, + "GL_INT_SAMPLER_2D_MULTISAMPLE", }, { - 0x910A, "GL_UNSIGNED_INT_SAMPLER_2D_MULTISAMPLE", + 0x910A, + "GL_UNSIGNED_INT_SAMPLER_2D_MULTISAMPLE", }, { - 0x910B, "GL_SAMPLER_2D_MULTISAMPLE_ARRAY_OES", + 0x910B, + "GL_SAMPLER_2D_MULTISAMPLE_ARRAY_OES", }, { - 0x910C, "GL_INT_SAMPLER_2D_MULTISAMPLE_ARRAY_OES", + 0x910C, + "GL_INT_SAMPLER_2D_MULTISAMPLE_ARRAY_OES", }, { - 0x910D, "GL_UNSIGNED_INT_SAMPLER_2D_MULTISAMPLE_ARRAY_OES", + 0x910D, + "GL_UNSIGNED_INT_SAMPLER_2D_MULTISAMPLE_ARRAY_OES", }, { - 0x910E, "GL_MAX_COLOR_TEXTURE_SAMPLES", + 0x910E, + "GL_MAX_COLOR_TEXTURE_SAMPLES", }, { - 0x910F, "GL_MAX_DEPTH_TEXTURE_SAMPLES", + 0x910F, + "GL_MAX_DEPTH_TEXTURE_SAMPLES", }, { - 0x9110, "GL_MAX_INTEGER_SAMPLES", + 0x9110, + "GL_MAX_INTEGER_SAMPLES", }, { - 0x9111, "GL_MAX_SERVER_WAIT_TIMEOUT_APPLE", + 0x9111, + "GL_MAX_SERVER_WAIT_TIMEOUT_APPLE", }, { - 0x9112, "GL_OBJECT_TYPE_APPLE", + 0x9112, + "GL_OBJECT_TYPE_APPLE", }, { - 0x9113, "GL_SYNC_CONDITION_APPLE", + 0x9113, + "GL_SYNC_CONDITION_APPLE", }, { - 0x9114, "GL_SYNC_STATUS_APPLE", + 0x9114, + "GL_SYNC_STATUS_APPLE", }, { - 0x9115, "GL_SYNC_FLAGS_APPLE", + 0x9115, + "GL_SYNC_FLAGS_APPLE", }, { - 0x9116, "GL_SYNC_FENCE_APPLE", + 0x9116, + "GL_SYNC_FENCE_APPLE", }, { - 0x9117, "GL_SYNC_GPU_COMMANDS_COMPLETE_APPLE", + 0x9117, + "GL_SYNC_GPU_COMMANDS_COMPLETE_APPLE", }, { - 0x9118, "GL_UNSIGNALED_APPLE", + 0x9118, + "GL_UNSIGNALED_APPLE", }, { - 0x9119, "GL_SIGNALED_APPLE", + 0x9119, + "GL_SIGNALED_APPLE", }, { - 0x911A, "GL_ALREADY_SIGNALED_APPLE", + 0x911A, + "GL_ALREADY_SIGNALED_APPLE", }, { - 0x911B, "GL_TIMEOUT_EXPIRED_APPLE", + 0x911B, + "GL_TIMEOUT_EXPIRED_APPLE", }, { - 0x911C, "GL_CONDITION_SATISFIED_APPLE", + 0x911C, + "GL_CONDITION_SATISFIED_APPLE", }, { - 0x911D, "GL_WAIT_FAILED_APPLE", + 0x911D, + "GL_WAIT_FAILED_APPLE", }, { - 0x911F, "GL_BUFFER_ACCESS_FLAGS", + 0x911F, + "GL_BUFFER_ACCESS_FLAGS", }, { - 0x9120, "GL_BUFFER_MAP_LENGTH", + 0x9120, + "GL_BUFFER_MAP_LENGTH", }, { - 0x9121, "GL_BUFFER_MAP_OFFSET", + 0x9121, + "GL_BUFFER_MAP_OFFSET", }, { - 0x9122, "GL_MAX_VERTEX_OUTPUT_COMPONENTS", + 0x9122, + "GL_MAX_VERTEX_OUTPUT_COMPONENTS", }, { - 0x9123, "GL_MAX_GEOMETRY_INPUT_COMPONENTS_OES", + 0x9123, + "GL_MAX_GEOMETRY_INPUT_COMPONENTS_OES", }, { - 0x9124, "GL_MAX_GEOMETRY_OUTPUT_COMPONENTS_OES", + 0x9124, + "GL_MAX_GEOMETRY_OUTPUT_COMPONENTS_OES", }, { - 0x9125, "GL_MAX_FRAGMENT_INPUT_COMPONENTS", + 0x9125, + "GL_MAX_FRAGMENT_INPUT_COMPONENTS", }, { - 0x912F, "GL_TEXTURE_IMMUTABLE_FORMAT_EXT", + 0x912F, + "GL_TEXTURE_IMMUTABLE_FORMAT_EXT", }, { - 0x9130, "GL_SGX_PROGRAM_BINARY_IMG", + 0x9130, + "GL_SGX_PROGRAM_BINARY_IMG", }, { - 0x9133, "GL_RENDERBUFFER_SAMPLES_IMG", + 0x9133, + "GL_RENDERBUFFER_SAMPLES_IMG", }, { - 0x9134, "GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE_IMG", + 0x9134, + "GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE_IMG", }, { - 0x9135, "GL_MAX_SAMPLES_IMG", + 0x9135, + "GL_MAX_SAMPLES_IMG", }, { - 0x9136, "GL_TEXTURE_SAMPLES_IMG", + 0x9136, + "GL_TEXTURE_SAMPLES_IMG", }, { - 0x9137, "GL_COMPRESSED_RGBA_PVRTC_2BPPV2_IMG", + 0x9137, + "GL_COMPRESSED_RGBA_PVRTC_2BPPV2_IMG", }, { - 0x9138, "GL_COMPRESSED_RGBA_PVRTC_4BPPV2_IMG", + 0x9138, + "GL_COMPRESSED_RGBA_PVRTC_4BPPV2_IMG", }, { - 0x9139, "GL_CUBIC_IMG", + 0x9139, + "GL_CUBIC_IMG", }, { - 0x913A, "GL_CUBIC_MIPMAP_NEAREST_IMG", + 0x913A, + "GL_CUBIC_MIPMAP_NEAREST_IMG", }, { - 0x913B, "GL_CUBIC_MIPMAP_LINEAR_IMG", + 0x913B, + "GL_CUBIC_MIPMAP_LINEAR_IMG", }, { - 0x913C, "GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE_AND_DOWNSAMPLE_IMG", + 0x913C, + "GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE_AND_DOWNSAMPLE_IMG", }, { - 0x913D, "GL_NUM_DOWNSAMPLE_SCALES_IMG", + 0x913D, + "GL_NUM_DOWNSAMPLE_SCALES_IMG", }, { - 0x913E, "GL_DOWNSAMPLE_SCALES_IMG", + 0x913E, + "GL_DOWNSAMPLE_SCALES_IMG", }, { - 0x913F, "GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_SCALE_IMG", + 0x913F, + "GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_SCALE_IMG", }, { - 0x9143, "GL_MAX_DEBUG_MESSAGE_LENGTH_KHR", + 0x9143, + "GL_MAX_DEBUG_MESSAGE_LENGTH_KHR", }, { - 0x9144, "GL_MAX_DEBUG_LOGGED_MESSAGES_KHR", + 0x9144, + "GL_MAX_DEBUG_LOGGED_MESSAGES_KHR", }, { - 0x9145, "GL_DEBUG_LOGGED_MESSAGES_KHR", + 0x9145, + "GL_DEBUG_LOGGED_MESSAGES_KHR", }, { - 0x9146, "GL_DEBUG_SEVERITY_HIGH_KHR", + 0x9146, + "GL_DEBUG_SEVERITY_HIGH_KHR", }, { - 0x9147, "GL_DEBUG_SEVERITY_MEDIUM_KHR", + 0x9147, + "GL_DEBUG_SEVERITY_MEDIUM_KHR", }, { - 0x9148, "GL_DEBUG_SEVERITY_LOW_KHR", + 0x9148, + "GL_DEBUG_SEVERITY_LOW_KHR", }, { - 0x9151, "GL_BUFFER_OBJECT_EXT", + 0x9151, + "GL_BUFFER_OBJECT_EXT", }, { - 0x9153, "GL_QUERY_OBJECT_EXT", + 0x9153, + "GL_QUERY_OBJECT_EXT", }, { - 0x9154, "GL_VERTEX_ARRAY_OBJECT_EXT", + 0x9154, + "GL_VERTEX_ARRAY_OBJECT_EXT", }, { - 0x9195, "GL_VIRTUAL_PAGE_SIZE_X_EXT", + 0x9195, + "GL_VIRTUAL_PAGE_SIZE_X_EXT", }, { - 0x9196, "GL_VIRTUAL_PAGE_SIZE_Y_EXT", + 0x9196, + "GL_VIRTUAL_PAGE_SIZE_Y_EXT", }, { - 0x9197, "GL_VIRTUAL_PAGE_SIZE_Z_EXT", + 0x9197, + "GL_VIRTUAL_PAGE_SIZE_Z_EXT", }, { - 0x9198, "GL_MAX_SPARSE_TEXTURE_SIZE_EXT", + 0x9198, + "GL_MAX_SPARSE_TEXTURE_SIZE_EXT", }, { - 0x9199, "GL_MAX_SPARSE_3D_TEXTURE_SIZE_EXT", + 0x9199, + "GL_MAX_SPARSE_3D_TEXTURE_SIZE_EXT", }, { - 0x919A, "GL_MAX_SPARSE_ARRAY_TEXTURE_LAYERS_EXT", + 0x919A, + "GL_MAX_SPARSE_ARRAY_TEXTURE_LAYERS_EXT", }, { - 0x919D, "GL_TEXTURE_BUFFER_OFFSET_OES", + 0x919D, + "GL_TEXTURE_BUFFER_OFFSET_OES", }, { - 0x919E, "GL_TEXTURE_BUFFER_SIZE_OES", + 0x919E, + "GL_TEXTURE_BUFFER_SIZE_OES", }, { - 0x919F, "GL_TEXTURE_BUFFER_OFFSET_ALIGNMENT_OES", + 0x919F, + "GL_TEXTURE_BUFFER_OFFSET_ALIGNMENT_OES", }, { - 0x91A6, "GL_TEXTURE_SPARSE_EXT", + 0x91A6, + "GL_TEXTURE_SPARSE_EXT", }, { - 0x91A7, "GL_VIRTUAL_PAGE_SIZE_INDEX_EXT", + 0x91A7, + "GL_VIRTUAL_PAGE_SIZE_INDEX_EXT", }, { - 0x91A8, "GL_NUM_VIRTUAL_PAGE_SIZES_EXT", + 0x91A8, + "GL_NUM_VIRTUAL_PAGE_SIZES_EXT", }, { - 0x91A9, "GL_SPARSE_TEXTURE_FULL_ARRAY_CUBE_MIPMAPS_EXT", + 0x91A9, + "GL_SPARSE_TEXTURE_FULL_ARRAY_CUBE_MIPMAPS_EXT", }, { - 0x91AA, "GL_NUM_SPARSE_LEVELS_EXT", + 0x91AA, + "GL_NUM_SPARSE_LEVELS_EXT", }, { - 0x91B9, "GL_COMPUTE_SHADER", + 0x91B9, + "GL_COMPUTE_SHADER", }, { - 0x91BB, "GL_MAX_COMPUTE_UNIFORM_BLOCKS", + 0x91BB, + "GL_MAX_COMPUTE_UNIFORM_BLOCKS", }, { - 0x91BC, "GL_MAX_COMPUTE_TEXTURE_IMAGE_UNITS", + 0x91BC, + "GL_MAX_COMPUTE_TEXTURE_IMAGE_UNITS", }, { - 0x91BD, "GL_MAX_COMPUTE_IMAGE_UNIFORMS", + 0x91BD, + "GL_MAX_COMPUTE_IMAGE_UNIFORMS", }, { - 0x91BE, "GL_MAX_COMPUTE_WORK_GROUP_COUNT", + 0x91BE, + "GL_MAX_COMPUTE_WORK_GROUP_COUNT", }, { - 0x91BF, "GL_MAX_COMPUTE_WORK_GROUP_SIZE", + 0x91BF, + "GL_MAX_COMPUTE_WORK_GROUP_SIZE", }, { - 0x9243, "GL_UNPACK_COLORSPACE_CONVERSION_CHROMIUM", + 0x9243, + "GL_UNPACK_COLORSPACE_CONVERSION_CHROMIUM", }, { - 0x9244, "GL_BIND_GENERATES_RESOURCE_CHROMIUM", + 0x9244, + "GL_BIND_GENERATES_RESOURCE_CHROMIUM", }, { - 0x9245, "GL_OVERLAY_TRANSFORM_NONE_CHROMIUM", + 0x9245, + "GL_OVERLAY_TRANSFORM_NONE_CHROMIUM", }, { - 0x9246, "GL_OVERLAY_TRANSFORM_FLIP_HORIZONTAL_CHROMIUM", + 0x9246, + "GL_OVERLAY_TRANSFORM_FLIP_HORIZONTAL_CHROMIUM", }, { - 0x9247, "GL_OVERLAY_TRANSFORM_FLIP_VERTICAL_CHROMIUM", + 0x9247, + "GL_OVERLAY_TRANSFORM_FLIP_VERTICAL_CHROMIUM", }, { - 0x9248, "GL_OVERLAY_TRANSFORM_ROTATE_90_CHROMIUM", + 0x9248, + "GL_OVERLAY_TRANSFORM_ROTATE_90_CHROMIUM", }, { - 0x9249, "GL_OVERLAY_TRANSFORM_ROTATE_180_CHROMIUM", + 0x9249, + "GL_OVERLAY_TRANSFORM_ROTATE_180_CHROMIUM", }, { - 0x924A, "GL_OVERLAY_TRANSFORM_ROTATE_270_CHROMIUM", + 0x924A, + "GL_OVERLAY_TRANSFORM_ROTATE_270_CHROMIUM", }, { - 0x9250, "GL_SHADER_BINARY_DMP", + 0x9250, + "GL_SHADER_BINARY_DMP", }, { - 0x9251, "GL_SMAPHS30_PROGRAM_BINARY_DMP", + 0x9251, + "GL_SMAPHS30_PROGRAM_BINARY_DMP", }, { - 0x9252, "GL_SMAPHS_PROGRAM_BINARY_DMP", + 0x9252, + "GL_SMAPHS_PROGRAM_BINARY_DMP", }, { - 0x9253, "GL_DMP_PROGRAM_BINARY_DMP", + 0x9253, + "GL_DMP_PROGRAM_BINARY_DMP", }, { - 0x9260, "GL_GCCSO_SHADER_BINARY_FJ", + 0x9260, + "GL_GCCSO_SHADER_BINARY_FJ", }, { - 0x9270, "GL_COMPRESSED_R11_EAC", + 0x9270, + "GL_COMPRESSED_R11_EAC", }, { - 0x9271, "GL_COMPRESSED_SIGNED_R11_EAC", + 0x9271, + "GL_COMPRESSED_SIGNED_R11_EAC", }, { - 0x9272, "GL_COMPRESSED_RG11_EAC", + 0x9272, + "GL_COMPRESSED_RG11_EAC", }, { - 0x9273, "GL_COMPRESSED_SIGNED_RG11_EAC", + 0x9273, + "GL_COMPRESSED_SIGNED_RG11_EAC", }, { - 0x9274, "GL_COMPRESSED_RGB8_ETC2", + 0x9274, + "GL_COMPRESSED_RGB8_ETC2", }, { - 0x9275, "GL_COMPRESSED_SRGB8_ETC2", + 0x9275, + "GL_COMPRESSED_SRGB8_ETC2", }, { - 0x9276, "GL_COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2", + 0x9276, + "GL_COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2", }, { - 0x9277, "GL_COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2", + 0x9277, + "GL_COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2", }, { - 0x9278, "GL_COMPRESSED_RGBA8_ETC2_EAC", + 0x9278, + "GL_COMPRESSED_RGBA8_ETC2_EAC", }, { - 0x9279, "GL_COMPRESSED_SRGB8_ALPHA8_ETC2_EAC", + 0x9279, + "GL_COMPRESSED_SRGB8_ALPHA8_ETC2_EAC", }, { - 0x9280, "GL_BLEND_PREMULTIPLIED_SRC_NV", + 0x9280, + "GL_BLEND_PREMULTIPLIED_SRC_NV", }, { - 0x9281, "GL_BLEND_OVERLAP_NV", + 0x9281, + "GL_BLEND_OVERLAP_NV", }, { - 0x9282, "GL_UNCORRELATED_NV", + 0x9282, + "GL_UNCORRELATED_NV", }, { - 0x9283, "GL_DISJOINT_NV", + 0x9283, + "GL_DISJOINT_NV", }, { - 0x9284, "GL_CONJOINT_NV", + 0x9284, + "GL_CONJOINT_NV", }, { - 0x9285, "GL_BLEND_ADVANCED_COHERENT_KHR", + 0x9285, + "GL_BLEND_ADVANCED_COHERENT_KHR", }, { - 0x9286, "GL_SRC_NV", + 0x9286, + "GL_SRC_NV", }, { - 0x9287, "GL_DST_NV", + 0x9287, + "GL_DST_NV", }, { - 0x9288, "GL_SRC_OVER_NV", + 0x9288, + "GL_SRC_OVER_NV", }, { - 0x9289, "GL_DST_OVER_NV", + 0x9289, + "GL_DST_OVER_NV", }, { - 0x928A, "GL_SRC_IN_NV", + 0x928A, + "GL_SRC_IN_NV", }, { - 0x928B, "GL_DST_IN_NV", + 0x928B, + "GL_DST_IN_NV", }, { - 0x928C, "GL_SRC_OUT_NV", + 0x928C, + "GL_SRC_OUT_NV", }, { - 0x928D, "GL_DST_OUT_NV", + 0x928D, + "GL_DST_OUT_NV", }, { - 0x928E, "GL_SRC_ATOP_NV", + 0x928E, + "GL_SRC_ATOP_NV", }, { - 0x928F, "GL_DST_ATOP_NV", + 0x928F, + "GL_DST_ATOP_NV", }, { - 0x9291, "GL_PLUS_NV", + 0x9291, + "GL_PLUS_NV", }, { - 0x9292, "GL_PLUS_DARKER_NV", + 0x9292, + "GL_PLUS_DARKER_NV", }, { - 0x9294, "GL_MULTIPLY_KHR", + 0x9294, + "GL_MULTIPLY_KHR", }, { - 0x9295, "GL_SCREEN_KHR", + 0x9295, + "GL_SCREEN_KHR", }, { - 0x9296, "GL_OVERLAY_KHR", + 0x9296, + "GL_OVERLAY_KHR", }, { - 0x9297, "GL_DARKEN_KHR", + 0x9297, + "GL_DARKEN_KHR", }, { - 0x9298, "GL_LIGHTEN_KHR", + 0x9298, + "GL_LIGHTEN_KHR", }, { - 0x9299, "GL_COLORDODGE_KHR", + 0x9299, + "GL_COLORDODGE_KHR", }, { - 0x929A, "GL_COLORBURN_KHR", + 0x929A, + "GL_COLORBURN_KHR", }, { - 0x929B, "GL_HARDLIGHT_KHR", + 0x929B, + "GL_HARDLIGHT_KHR", }, { - 0x929C, "GL_SOFTLIGHT_KHR", + 0x929C, + "GL_SOFTLIGHT_KHR", }, { - 0x929E, "GL_DIFFERENCE_KHR", + 0x929E, + "GL_DIFFERENCE_KHR", }, { - 0x929F, "GL_MINUS_NV", + 0x929F, + "GL_MINUS_NV", }, { - 0x92A0, "GL_EXCLUSION_KHR", + 0x92A0, + "GL_EXCLUSION_KHR", }, { - 0x92A1, "GL_CONTRAST_NV", + 0x92A1, + "GL_CONTRAST_NV", }, { - 0x92A3, "GL_INVERT_RGB_NV", + 0x92A3, + "GL_INVERT_RGB_NV", }, { - 0x92A4, "GL_LINEARDODGE_NV", + 0x92A4, + "GL_LINEARDODGE_NV", }, { - 0x92A5, "GL_LINEARBURN_NV", + 0x92A5, + "GL_LINEARBURN_NV", }, { - 0x92A6, "GL_VIVIDLIGHT_NV", + 0x92A6, + "GL_VIVIDLIGHT_NV", }, { - 0x92A7, "GL_LINEARLIGHT_NV", + 0x92A7, + "GL_LINEARLIGHT_NV", }, { - 0x92A8, "GL_PINLIGHT_NV", + 0x92A8, + "GL_PINLIGHT_NV", }, { - 0x92A9, "GL_HARDMIX_NV", + 0x92A9, + "GL_HARDMIX_NV", }, { - 0x92AD, "GL_HSL_HUE_KHR", + 0x92AD, + "GL_HSL_HUE_KHR", }, { - 0x92AE, "GL_HSL_SATURATION_KHR", + 0x92AE, + "GL_HSL_SATURATION_KHR", }, { - 0x92AF, "GL_HSL_COLOR_KHR", + 0x92AF, + "GL_HSL_COLOR_KHR", }, { - 0x92B0, "GL_HSL_LUMINOSITY_KHR", + 0x92B0, + "GL_HSL_LUMINOSITY_KHR", }, { - 0x92B1, "GL_PLUS_CLAMPED_NV", + 0x92B1, + "GL_PLUS_CLAMPED_NV", }, { - 0x92B2, "GL_PLUS_CLAMPED_ALPHA_NV", + 0x92B2, + "GL_PLUS_CLAMPED_ALPHA_NV", }, { - 0x92B3, "GL_MINUS_CLAMPED_NV", + 0x92B3, + "GL_MINUS_CLAMPED_NV", }, { - 0x92B4, "GL_INVERT_OVG_NV", + 0x92B4, + "GL_INVERT_OVG_NV", }, { - 0x92BE, "GL_PRIMITIVE_BOUNDING_BOX_OES", + 0x92BE, + "GL_PRIMITIVE_BOUNDING_BOX_OES", }, { - 0x92C0, "GL_ATOMIC_COUNTER_BUFFER", + 0x92C0, + "GL_ATOMIC_COUNTER_BUFFER", }, { - 0x92C1, "GL_ATOMIC_COUNTER_BUFFER_BINDING", + 0x92C1, + "GL_ATOMIC_COUNTER_BUFFER_BINDING", }, { - 0x92C2, "GL_ATOMIC_COUNTER_BUFFER_START", + 0x92C2, + "GL_ATOMIC_COUNTER_BUFFER_START", }, { - 0x92C3, "GL_ATOMIC_COUNTER_BUFFER_SIZE", + 0x92C3, + "GL_ATOMIC_COUNTER_BUFFER_SIZE", }, { - 0x92CC, "GL_MAX_VERTEX_ATOMIC_COUNTER_BUFFERS", + 0x92CC, + "GL_MAX_VERTEX_ATOMIC_COUNTER_BUFFERS", }, { - 0x92CD, "GL_MAX_TESS_CONTROL_ATOMIC_COUNTER_BUFFERS_OES", + 0x92CD, + "GL_MAX_TESS_CONTROL_ATOMIC_COUNTER_BUFFERS_OES", }, { - 0x92CE, "GL_MAX_TESS_EVALUATION_ATOMIC_COUNTER_BUFFERS_OES", + 0x92CE, + "GL_MAX_TESS_EVALUATION_ATOMIC_COUNTER_BUFFERS_OES", }, { - 0x92CF, "GL_MAX_GEOMETRY_ATOMIC_COUNTER_BUFFERS_OES", + 0x92CF, + "GL_MAX_GEOMETRY_ATOMIC_COUNTER_BUFFERS_OES", }, { - 0x92D0, "GL_MAX_FRAGMENT_ATOMIC_COUNTER_BUFFERS", + 0x92D0, + "GL_MAX_FRAGMENT_ATOMIC_COUNTER_BUFFERS", }, { - 0x92D1, "GL_MAX_COMBINED_ATOMIC_COUNTER_BUFFERS", + 0x92D1, + "GL_MAX_COMBINED_ATOMIC_COUNTER_BUFFERS", }, { - 0x92D2, "GL_MAX_VERTEX_ATOMIC_COUNTERS", + 0x92D2, + "GL_MAX_VERTEX_ATOMIC_COUNTERS", }, { - 0x92D3, "GL_MAX_TESS_CONTROL_ATOMIC_COUNTERS_OES", + 0x92D3, + "GL_MAX_TESS_CONTROL_ATOMIC_COUNTERS_OES", }, { - 0x92D4, "GL_MAX_TESS_EVALUATION_ATOMIC_COUNTERS_OES", + 0x92D4, + "GL_MAX_TESS_EVALUATION_ATOMIC_COUNTERS_OES", }, { - 0x92D5, "GL_MAX_GEOMETRY_ATOMIC_COUNTERS_OES", + 0x92D5, + "GL_MAX_GEOMETRY_ATOMIC_COUNTERS_OES", }, { - 0x92D6, "GL_MAX_FRAGMENT_ATOMIC_COUNTERS", + 0x92D6, + "GL_MAX_FRAGMENT_ATOMIC_COUNTERS", }, { - 0x92D7, "GL_MAX_COMBINED_ATOMIC_COUNTERS", + 0x92D7, + "GL_MAX_COMBINED_ATOMIC_COUNTERS", }, { - 0x92D8, "GL_MAX_ATOMIC_COUNTER_BUFFER_SIZE", + 0x92D8, + "GL_MAX_ATOMIC_COUNTER_BUFFER_SIZE", }, { - 0x92D9, "GL_ACTIVE_ATOMIC_COUNTER_BUFFERS", + 0x92D9, + "GL_ACTIVE_ATOMIC_COUNTER_BUFFERS", }, { - 0x92DB, "GL_UNSIGNED_INT_ATOMIC_COUNTER", + 0x92DB, + "GL_UNSIGNED_INT_ATOMIC_COUNTER", }, { - 0x92DC, "GL_MAX_ATOMIC_COUNTER_BUFFER_BINDINGS", + 0x92DC, + "GL_MAX_ATOMIC_COUNTER_BUFFER_BINDINGS", }, { - 0x92DD, "GL_FRAGMENT_COVERAGE_TO_COLOR_NV", + 0x92DD, + "GL_FRAGMENT_COVERAGE_TO_COLOR_NV", }, { - 0x92DE, "GL_FRAGMENT_COVERAGE_COLOR_NV", + 0x92DE, + "GL_FRAGMENT_COVERAGE_COLOR_NV", }, { - 0x92E0, "GL_DEBUG_OUTPUT_KHR", + 0x92E0, + "GL_DEBUG_OUTPUT_KHR", }, { - 0x92E1, "GL_UNIFORM", + 0x92E1, + "GL_UNIFORM", }, { - 0x92E2, "GL_UNIFORM_BLOCK", + 0x92E2, + "GL_UNIFORM_BLOCK", }, { - 0x92E3, "GL_PROGRAM_INPUT", + 0x92E3, + "GL_PROGRAM_INPUT", }, { - 0x92E4, "GL_PROGRAM_OUTPUT", + 0x92E4, + "GL_PROGRAM_OUTPUT", }, { - 0x92E5, "GL_BUFFER_VARIABLE", + 0x92E5, + "GL_BUFFER_VARIABLE", }, { - 0x92E6, "GL_SHADER_STORAGE_BLOCK", + 0x92E6, + "GL_SHADER_STORAGE_BLOCK", }, { - 0x92E7, "GL_IS_PER_PATCH_OES", + 0x92E7, + "GL_IS_PER_PATCH_OES", }, { - 0x92F4, "GL_TRANSFORM_FEEDBACK_VARYING", + 0x92F4, + "GL_TRANSFORM_FEEDBACK_VARYING", }, { - 0x92F5, "GL_ACTIVE_RESOURCES", + 0x92F5, + "GL_ACTIVE_RESOURCES", }, { - 0x92F6, "GL_MAX_NAME_LENGTH", + 0x92F6, + "GL_MAX_NAME_LENGTH", }, { - 0x92F7, "GL_MAX_NUM_ACTIVE_VARIABLES", + 0x92F7, + "GL_MAX_NUM_ACTIVE_VARIABLES", }, { - 0x92F9, "GL_NAME_LENGTH", + 0x92F9, + "GL_NAME_LENGTH", }, { - 0x92FA, "GL_TYPE", + 0x92FA, + "GL_TYPE", }, { - 0x92FB, "GL_ARRAY_SIZE", + 0x92FB, + "GL_ARRAY_SIZE", }, { - 0x92FC, "GL_OFFSET", + 0x92FC, + "GL_OFFSET", }, { - 0x92FD, "GL_BLOCK_INDEX", + 0x92FD, + "GL_BLOCK_INDEX", }, { - 0x92FE, "GL_ARRAY_STRIDE", + 0x92FE, + "GL_ARRAY_STRIDE", }, { - 0x92FF, "GL_MATRIX_STRIDE", + 0x92FF, + "GL_MATRIX_STRIDE", }, { - 0x9300, "GL_IS_ROW_MAJOR", + 0x9300, + "GL_IS_ROW_MAJOR", }, { - 0x9301, "GL_ATOMIC_COUNTER_BUFFER_INDEX", + 0x9301, + "GL_ATOMIC_COUNTER_BUFFER_INDEX", }, { - 0x9302, "GL_BUFFER_BINDING", + 0x9302, + "GL_BUFFER_BINDING", }, { - 0x9303, "GL_BUFFER_DATA_SIZE", + 0x9303, + "GL_BUFFER_DATA_SIZE", }, { - 0x9304, "GL_NUM_ACTIVE_VARIABLES", + 0x9304, + "GL_NUM_ACTIVE_VARIABLES", }, { - 0x9305, "GL_ACTIVE_VARIABLES", + 0x9305, + "GL_ACTIVE_VARIABLES", }, { - 0x9306, "GL_REFERENCED_BY_VERTEX_SHADER", + 0x9306, + "GL_REFERENCED_BY_VERTEX_SHADER", }, { - 0x9307, "GL_REFERENCED_BY_TESS_CONTROL_SHADER_OES", + 0x9307, + "GL_REFERENCED_BY_TESS_CONTROL_SHADER_OES", }, { - 0x9308, "GL_REFERENCED_BY_TESS_EVALUATION_SHADER_OES", + 0x9308, + "GL_REFERENCED_BY_TESS_EVALUATION_SHADER_OES", }, { - 0x9309, "GL_REFERENCED_BY_GEOMETRY_SHADER_OES", + 0x9309, + "GL_REFERENCED_BY_GEOMETRY_SHADER_OES", }, { - 0x930A, "GL_REFERENCED_BY_FRAGMENT_SHADER", + 0x930A, + "GL_REFERENCED_BY_FRAGMENT_SHADER", }, { - 0x930B, "GL_REFERENCED_BY_COMPUTE_SHADER", + 0x930B, + "GL_REFERENCED_BY_COMPUTE_SHADER", }, { - 0x930C, "GL_TOP_LEVEL_ARRAY_SIZE", + 0x930C, + "GL_TOP_LEVEL_ARRAY_SIZE", }, { - 0x930D, "GL_TOP_LEVEL_ARRAY_STRIDE", + 0x930D, + "GL_TOP_LEVEL_ARRAY_STRIDE", }, { - 0x930E, "GL_LOCATION", + 0x930E, + "GL_LOCATION", }, { - 0x930F, "GL_LOCATION_INDEX_EXT", + 0x930F, + "GL_LOCATION_INDEX_EXT", }, { - 0x9310, "GL_FRAMEBUFFER_DEFAULT_WIDTH", + 0x9310, + "GL_FRAMEBUFFER_DEFAULT_WIDTH", }, { - 0x9311, "GL_FRAMEBUFFER_DEFAULT_HEIGHT", + 0x9311, + "GL_FRAMEBUFFER_DEFAULT_HEIGHT", }, { - 0x9312, "GL_FRAMEBUFFER_DEFAULT_LAYERS_OES", + 0x9312, + "GL_FRAMEBUFFER_DEFAULT_LAYERS_OES", }, { - 0x9313, "GL_FRAMEBUFFER_DEFAULT_SAMPLES", + 0x9313, + "GL_FRAMEBUFFER_DEFAULT_SAMPLES", }, { - 0x9314, "GL_FRAMEBUFFER_DEFAULT_FIXED_SAMPLE_LOCATIONS", + 0x9314, + "GL_FRAMEBUFFER_DEFAULT_FIXED_SAMPLE_LOCATIONS", }, { - 0x9315, "GL_MAX_FRAMEBUFFER_WIDTH", + 0x9315, + "GL_MAX_FRAMEBUFFER_WIDTH", }, { - 0x9316, "GL_MAX_FRAMEBUFFER_HEIGHT", + 0x9316, + "GL_MAX_FRAMEBUFFER_HEIGHT", }, { - 0x9317, "GL_MAX_FRAMEBUFFER_LAYERS_OES", + 0x9317, + "GL_MAX_FRAMEBUFFER_LAYERS_OES", }, { - 0x9318, "GL_MAX_FRAMEBUFFER_SAMPLES", + 0x9318, + "GL_MAX_FRAMEBUFFER_SAMPLES", }, { - 0x9327, "GL_RASTER_MULTISAMPLE_EXT", + 0x9327, + "GL_RASTER_MULTISAMPLE_EXT", }, { - 0x9328, "GL_RASTER_SAMPLES_EXT", + 0x9328, + "GL_RASTER_SAMPLES_EXT", }, { - 0x9329, "GL_MAX_RASTER_SAMPLES_EXT", + 0x9329, + "GL_MAX_RASTER_SAMPLES_EXT", }, { - 0x932A, "GL_RASTER_FIXED_SAMPLE_LOCATIONS_EXT", + 0x932A, + "GL_RASTER_FIXED_SAMPLE_LOCATIONS_EXT", }, { - 0x932B, "GL_MULTISAMPLE_RASTERIZATION_ALLOWED_EXT", + 0x932B, + "GL_MULTISAMPLE_RASTERIZATION_ALLOWED_EXT", }, { - 0x932C, "GL_EFFECTIVE_RASTER_SAMPLES_EXT", + 0x932C, + "GL_EFFECTIVE_RASTER_SAMPLES_EXT", }, { - 0x932D, "GL_DEPTH_SAMPLES_NV", + 0x932D, + "GL_DEPTH_SAMPLES_NV", }, { - 0x932E, "GL_STENCIL_SAMPLES_NV", + 0x932E, + "GL_STENCIL_SAMPLES_NV", }, { - 0x932F, "GL_MIXED_DEPTH_SAMPLES_SUPPORTED_NV", + 0x932F, + "GL_MIXED_DEPTH_SAMPLES_SUPPORTED_NV", }, { - 0x9330, "GL_MIXED_STENCIL_SAMPLES_SUPPORTED_NV", + 0x9330, + "GL_MIXED_STENCIL_SAMPLES_SUPPORTED_NV", }, { - 0x9331, "GL_COVERAGE_MODULATION_TABLE_NV", + 0x9331, + "GL_COVERAGE_MODULATION_TABLE_NV", }, { - 0x9332, "GL_COVERAGE_MODULATION_NV", + 0x9332, + "GL_COVERAGE_MODULATION_NV", }, { - 0x9333, "GL_COVERAGE_MODULATION_TABLE_SIZE_NV", + 0x9333, + "GL_COVERAGE_MODULATION_TABLE_SIZE_NV", }, { - 0x933C, "GL_FILL_RECTANGLE_NV", + 0x933C, + "GL_FILL_RECTANGLE_NV", }, { - 0x933D, "GL_SAMPLE_LOCATION_SUBPIXEL_BITS_NV", + 0x933D, + "GL_SAMPLE_LOCATION_SUBPIXEL_BITS_NV", }, { - 0x933E, "GL_SAMPLE_LOCATION_PIXEL_GRID_WIDTH_NV", + 0x933E, + "GL_SAMPLE_LOCATION_PIXEL_GRID_WIDTH_NV", }, { - 0x933F, "GL_SAMPLE_LOCATION_PIXEL_GRID_HEIGHT_NV", + 0x933F, + "GL_SAMPLE_LOCATION_PIXEL_GRID_HEIGHT_NV", }, { - 0x9340, "GL_PROGRAMMABLE_SAMPLE_LOCATION_TABLE_SIZE_NV", + 0x9340, + "GL_PROGRAMMABLE_SAMPLE_LOCATION_TABLE_SIZE_NV", }, { - 0x9341, "GL_PROGRAMMABLE_SAMPLE_LOCATION_NV", + 0x9341, + "GL_PROGRAMMABLE_SAMPLE_LOCATION_NV", }, { - 0x9342, "GL_FRAMEBUFFER_PROGRAMMABLE_SAMPLE_LOCATIONS_NV", + 0x9342, + "GL_FRAMEBUFFER_PROGRAMMABLE_SAMPLE_LOCATIONS_NV", }, { - 0x9343, "GL_FRAMEBUFFER_SAMPLE_LOCATION_PIXEL_GRID_NV", + 0x9343, + "GL_FRAMEBUFFER_SAMPLE_LOCATION_PIXEL_GRID_NV", }, { - 0x9346, "GL_CONSERVATIVE_RASTERIZATION_NV", + 0x9346, + "GL_CONSERVATIVE_RASTERIZATION_NV", }, { - 0x9347, "GL_SUBPIXEL_PRECISION_BIAS_X_BITS_NV", + 0x9347, + "GL_SUBPIXEL_PRECISION_BIAS_X_BITS_NV", }, { - 0x9348, "GL_SUBPIXEL_PRECISION_BIAS_Y_BITS_NV", + 0x9348, + "GL_SUBPIXEL_PRECISION_BIAS_Y_BITS_NV", }, { - 0x9349, "GL_MAX_SUBPIXEL_PRECISION_BIAS_BITS_NV", + 0x9349, + "GL_MAX_SUBPIXEL_PRECISION_BIAS_BITS_NV", }, { - 0x9350, "GL_VIEWPORT_SWIZZLE_POSITIVE_X_NV", + 0x9350, + "GL_VIEWPORT_SWIZZLE_POSITIVE_X_NV", }, { - 0x9351, "GL_VIEWPORT_SWIZZLE_NEGATIVE_X_NV", + 0x9351, + "GL_VIEWPORT_SWIZZLE_NEGATIVE_X_NV", }, { - 0x9352, "GL_VIEWPORT_SWIZZLE_POSITIVE_Y_NV", + 0x9352, + "GL_VIEWPORT_SWIZZLE_POSITIVE_Y_NV", }, { - 0x9353, "GL_VIEWPORT_SWIZZLE_NEGATIVE_Y_NV", + 0x9353, + "GL_VIEWPORT_SWIZZLE_NEGATIVE_Y_NV", }, { - 0x9354, "GL_VIEWPORT_SWIZZLE_POSITIVE_Z_NV", + 0x9354, + "GL_VIEWPORT_SWIZZLE_POSITIVE_Z_NV", }, { - 0x9355, "GL_VIEWPORT_SWIZZLE_NEGATIVE_Z_NV", + 0x9355, + "GL_VIEWPORT_SWIZZLE_NEGATIVE_Z_NV", }, { - 0x9356, "GL_VIEWPORT_SWIZZLE_POSITIVE_W_NV", + 0x9356, + "GL_VIEWPORT_SWIZZLE_POSITIVE_W_NV", }, { - 0x9357, "GL_VIEWPORT_SWIZZLE_NEGATIVE_W_NV", + 0x9357, + "GL_VIEWPORT_SWIZZLE_NEGATIVE_W_NV", }, { - 0x9358, "GL_VIEWPORT_SWIZZLE_X_NV", + 0x9358, + "GL_VIEWPORT_SWIZZLE_X_NV", }, { - 0x9359, "GL_VIEWPORT_SWIZZLE_Y_NV", + 0x9359, + "GL_VIEWPORT_SWIZZLE_Y_NV", }, { - 0x935A, "GL_VIEWPORT_SWIZZLE_Z_NV", + 0x935A, + "GL_VIEWPORT_SWIZZLE_Z_NV", }, { - 0x935B, "GL_VIEWPORT_SWIZZLE_W_NV", + 0x935B, + "GL_VIEWPORT_SWIZZLE_W_NV", }, { - 0x9368, "GL_FONT_GLYPHS_AVAILABLE_NV", + 0x9368, + "GL_FONT_GLYPHS_AVAILABLE_NV", }, { - 0x9369, "GL_FONT_TARGET_UNAVAILABLE_NV", + 0x9369, + "GL_FONT_TARGET_UNAVAILABLE_NV", }, { - 0x936A, "GL_FONT_UNAVAILABLE_NV", + 0x936A, + "GL_FONT_UNAVAILABLE_NV", }, { - 0x936B, "GL_FONT_UNINTELLIGIBLE_NV", + 0x936B, + "GL_FONT_UNINTELLIGIBLE_NV", }, { - 0x936C, "GL_STANDARD_FONT_FORMAT_NV", + 0x936C, + "GL_STANDARD_FONT_FORMAT_NV", }, { - 0x936D, "GL_FRAGMENT_INPUT_NV", + 0x936D, + "GL_FRAGMENT_INPUT_NV", }, { - 0x9371, "GL_MULTISAMPLES_NV", + 0x9371, + "GL_MULTISAMPLES_NV", }, { - 0x9372, "GL_SUPERSAMPLE_SCALE_X_NV", + 0x9372, + "GL_SUPERSAMPLE_SCALE_X_NV", }, { - 0x9373, "GL_SUPERSAMPLE_SCALE_Y_NV", + 0x9373, + "GL_SUPERSAMPLE_SCALE_Y_NV", }, { - 0x9374, "GL_CONFORMANT_NV", + 0x9374, + "GL_CONFORMANT_NV", }, { - 0x9380, "GL_NUM_SAMPLE_COUNTS", + 0x9380, + "GL_NUM_SAMPLE_COUNTS", }, { - 0x93A0, "GL_TRANSLATED_SHADER_SOURCE_LENGTH_ANGLE", + 0x93A0, + "GL_TRANSLATED_SHADER_SOURCE_LENGTH_ANGLE", }, { - 0x93A1, "GL_BGRA8_EXT", + 0x93A1, + "GL_BGRA8_EXT", }, { - 0x93A2, "GL_TEXTURE_USAGE_ANGLE", + 0x93A2, + "GL_TEXTURE_USAGE_ANGLE", }, { - 0x93A3, "GL_FRAMEBUFFER_ATTACHMENT_ANGLE", + 0x93A3, + "GL_FRAMEBUFFER_ATTACHMENT_ANGLE", }, { - 0x93A4, "GL_PACK_REVERSE_ROW_ORDER_ANGLE", + 0x93A4, + "GL_PACK_REVERSE_ROW_ORDER_ANGLE", }, { - 0x93A6, "GL_PROGRAM_BINARY_ANGLE", + 0x93A6, + "GL_PROGRAM_BINARY_ANGLE", }, { - 0x93B0, "GL_COMPRESSED_RGBA_ASTC_4x4_KHR", + 0x93B0, + "GL_COMPRESSED_RGBA_ASTC_4x4_KHR", }, { - 0x93B1, "GL_COMPRESSED_RGBA_ASTC_5x4_KHR", + 0x93B1, + "GL_COMPRESSED_RGBA_ASTC_5x4_KHR", }, { - 0x93B2, "GL_COMPRESSED_RGBA_ASTC_5x5_KHR", + 0x93B2, + "GL_COMPRESSED_RGBA_ASTC_5x5_KHR", }, { - 0x93B3, "GL_COMPRESSED_RGBA_ASTC_6x5_KHR", + 0x93B3, + "GL_COMPRESSED_RGBA_ASTC_6x5_KHR", }, { - 0x93B4, "GL_COMPRESSED_RGBA_ASTC_6x6_KHR", + 0x93B4, + "GL_COMPRESSED_RGBA_ASTC_6x6_KHR", }, { - 0x93B5, "GL_COMPRESSED_RGBA_ASTC_8x5_KHR", + 0x93B5, + "GL_COMPRESSED_RGBA_ASTC_8x5_KHR", }, { - 0x93B6, "GL_COMPRESSED_RGBA_ASTC_8x6_KHR", + 0x93B6, + "GL_COMPRESSED_RGBA_ASTC_8x6_KHR", }, { - 0x93B7, "GL_COMPRESSED_RGBA_ASTC_8x8_KHR", + 0x93B7, + "GL_COMPRESSED_RGBA_ASTC_8x8_KHR", }, { - 0x93B8, "GL_COMPRESSED_RGBA_ASTC_10x5_KHR", + 0x93B8, + "GL_COMPRESSED_RGBA_ASTC_10x5_KHR", }, { - 0x93B9, "GL_COMPRESSED_RGBA_ASTC_10x6_KHR", + 0x93B9, + "GL_COMPRESSED_RGBA_ASTC_10x6_KHR", }, { - 0x93BA, "GL_COMPRESSED_RGBA_ASTC_10x8_KHR", + 0x93BA, + "GL_COMPRESSED_RGBA_ASTC_10x8_KHR", }, { - 0x93BB, "GL_COMPRESSED_RGBA_ASTC_10x10_KHR", + 0x93BB, + "GL_COMPRESSED_RGBA_ASTC_10x10_KHR", }, { - 0x93BC, "GL_COMPRESSED_RGBA_ASTC_12x10_KHR", + 0x93BC, + "GL_COMPRESSED_RGBA_ASTC_12x10_KHR", }, { - 0x93BD, "GL_COMPRESSED_RGBA_ASTC_12x12_KHR", + 0x93BD, + "GL_COMPRESSED_RGBA_ASTC_12x12_KHR", }, { - 0x93C0, "GL_COMPRESSED_RGBA_ASTC_3x3x3_OES", + 0x93C0, + "GL_COMPRESSED_RGBA_ASTC_3x3x3_OES", }, { - 0x93C1, "GL_COMPRESSED_RGBA_ASTC_4x3x3_OES", + 0x93C1, + "GL_COMPRESSED_RGBA_ASTC_4x3x3_OES", }, { - 0x93C2, "GL_COMPRESSED_RGBA_ASTC_4x4x3_OES", + 0x93C2, + "GL_COMPRESSED_RGBA_ASTC_4x4x3_OES", }, { - 0x93C3, "GL_COMPRESSED_RGBA_ASTC_4x4x4_OES", + 0x93C3, + "GL_COMPRESSED_RGBA_ASTC_4x4x4_OES", }, { - 0x93C4, "GL_COMPRESSED_RGBA_ASTC_5x4x4_OES", + 0x93C4, + "GL_COMPRESSED_RGBA_ASTC_5x4x4_OES", }, { - 0x93C5, "GL_COMPRESSED_RGBA_ASTC_5x5x4_OES", + 0x93C5, + "GL_COMPRESSED_RGBA_ASTC_5x5x4_OES", }, { - 0x93C6, "GL_COMPRESSED_RGBA_ASTC_5x5x5_OES", + 0x93C6, + "GL_COMPRESSED_RGBA_ASTC_5x5x5_OES", }, { - 0x93C7, "GL_COMPRESSED_RGBA_ASTC_6x5x5_OES", + 0x93C7, + "GL_COMPRESSED_RGBA_ASTC_6x5x5_OES", }, { - 0x93C8, "GL_COMPRESSED_RGBA_ASTC_6x6x5_OES", + 0x93C8, + "GL_COMPRESSED_RGBA_ASTC_6x6x5_OES", }, { - 0x93C9, "GL_COMPRESSED_RGBA_ASTC_6x6x6_OES", + 0x93C9, + "GL_COMPRESSED_RGBA_ASTC_6x6x6_OES", }, { - 0x93D0, "GL_COMPRESSED_SRGB8_ALPHA8_ASTC_4x4_KHR", + 0x93D0, + "GL_COMPRESSED_SRGB8_ALPHA8_ASTC_4x4_KHR", }, { - 0x93D1, "GL_COMPRESSED_SRGB8_ALPHA8_ASTC_5x4_KHR", + 0x93D1, + "GL_COMPRESSED_SRGB8_ALPHA8_ASTC_5x4_KHR", }, { - 0x93D2, "GL_COMPRESSED_SRGB8_ALPHA8_ASTC_5x5_KHR", + 0x93D2, + "GL_COMPRESSED_SRGB8_ALPHA8_ASTC_5x5_KHR", }, { - 0x93D3, "GL_COMPRESSED_SRGB8_ALPHA8_ASTC_6x5_KHR", + 0x93D3, + "GL_COMPRESSED_SRGB8_ALPHA8_ASTC_6x5_KHR", }, { - 0x93D4, "GL_COMPRESSED_SRGB8_ALPHA8_ASTC_6x6_KHR", + 0x93D4, + "GL_COMPRESSED_SRGB8_ALPHA8_ASTC_6x6_KHR", }, { - 0x93D5, "GL_COMPRESSED_SRGB8_ALPHA8_ASTC_8x5_KHR", + 0x93D5, + "GL_COMPRESSED_SRGB8_ALPHA8_ASTC_8x5_KHR", }, { - 0x93D6, "GL_COMPRESSED_SRGB8_ALPHA8_ASTC_8x6_KHR", + 0x93D6, + "GL_COMPRESSED_SRGB8_ALPHA8_ASTC_8x6_KHR", }, { - 0x93D7, "GL_COMPRESSED_SRGB8_ALPHA8_ASTC_8x8_KHR", + 0x93D7, + "GL_COMPRESSED_SRGB8_ALPHA8_ASTC_8x8_KHR", }, { - 0x93D8, "GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x5_KHR", + 0x93D8, + "GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x5_KHR", }, { - 0x93D9, "GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x6_KHR", + 0x93D9, + "GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x6_KHR", }, { - 0x93DA, "GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x8_KHR", + 0x93DA, + "GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x8_KHR", }, { - 0x93DB, "GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x10_KHR", + 0x93DB, + "GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x10_KHR", }, { - 0x93DC, "GL_COMPRESSED_SRGB8_ALPHA8_ASTC_12x10_KHR", + 0x93DC, + "GL_COMPRESSED_SRGB8_ALPHA8_ASTC_12x10_KHR", }, { - 0x93DD, "GL_COMPRESSED_SRGB8_ALPHA8_ASTC_12x12_KHR", + 0x93DD, + "GL_COMPRESSED_SRGB8_ALPHA8_ASTC_12x12_KHR", }, { - 0x93E0, "GL_COMPRESSED_SRGB8_ALPHA8_ASTC_3x3x3_OES", + 0x93E0, + "GL_COMPRESSED_SRGB8_ALPHA8_ASTC_3x3x3_OES", }, { - 0x93E1, "GL_COMPRESSED_SRGB8_ALPHA8_ASTC_4x3x3_OES", + 0x93E1, + "GL_COMPRESSED_SRGB8_ALPHA8_ASTC_4x3x3_OES", }, { - 0x93E2, "GL_COMPRESSED_SRGB8_ALPHA8_ASTC_4x4x3_OES", + 0x93E2, + "GL_COMPRESSED_SRGB8_ALPHA8_ASTC_4x4x3_OES", }, { - 0x93E3, "GL_COMPRESSED_SRGB8_ALPHA8_ASTC_4x4x4_OES", + 0x93E3, + "GL_COMPRESSED_SRGB8_ALPHA8_ASTC_4x4x4_OES", }, { - 0x93E4, "GL_COMPRESSED_SRGB8_ALPHA8_ASTC_5x4x4_OES", + 0x93E4, + "GL_COMPRESSED_SRGB8_ALPHA8_ASTC_5x4x4_OES", }, { - 0x93E5, "GL_COMPRESSED_SRGB8_ALPHA8_ASTC_5x5x4_OES", + 0x93E5, + "GL_COMPRESSED_SRGB8_ALPHA8_ASTC_5x5x4_OES", }, { - 0x93E6, "GL_COMPRESSED_SRGB8_ALPHA8_ASTC_5x5x5_OES", + 0x93E6, + "GL_COMPRESSED_SRGB8_ALPHA8_ASTC_5x5x5_OES", }, { - 0x93E7, "GL_COMPRESSED_SRGB8_ALPHA8_ASTC_6x5x5_OES", + 0x93E7, + "GL_COMPRESSED_SRGB8_ALPHA8_ASTC_6x5x5_OES", }, { - 0x93E8, "GL_COMPRESSED_SRGB8_ALPHA8_ASTC_6x6x5_OES", + 0x93E8, + "GL_COMPRESSED_SRGB8_ALPHA8_ASTC_6x6x5_OES", }, { - 0x93E9, "GL_COMPRESSED_SRGB8_ALPHA8_ASTC_6x6x6_OES", + 0x93E9, + "GL_COMPRESSED_SRGB8_ALPHA8_ASTC_6x6x6_OES", }, { - 0x93F0, "GL_COMPRESSED_SRGB_ALPHA_PVRTC_2BPPV2_IMG", + 0x93F0, + "GL_COMPRESSED_SRGB_ALPHA_PVRTC_2BPPV2_IMG", }, { - 0x93F1, "GL_COMPRESSED_SRGB_ALPHA_PVRTC_4BPPV2_IMG", + 0x93F1, + "GL_COMPRESSED_SRGB_ALPHA_PVRTC_4BPPV2_IMG", }, { - 0x94F0, "GL_PERFQUERY_COUNTER_EVENT_INTEL", + 0x94F0, + "GL_PERFQUERY_COUNTER_EVENT_INTEL", }, { - 0x94F1, "GL_PERFQUERY_COUNTER_DURATION_NORM_INTEL", + 0x94F1, + "GL_PERFQUERY_COUNTER_DURATION_NORM_INTEL", }, { - 0x94F2, "GL_PERFQUERY_COUNTER_DURATION_RAW_INTEL", + 0x94F2, + "GL_PERFQUERY_COUNTER_DURATION_RAW_INTEL", }, { - 0x94F3, "GL_PERFQUERY_COUNTER_THROUGHPUT_INTEL", + 0x94F3, + "GL_PERFQUERY_COUNTER_THROUGHPUT_INTEL", }, { - 0x94F4, "GL_PERFQUERY_COUNTER_RAW_INTEL", + 0x94F4, + "GL_PERFQUERY_COUNTER_RAW_INTEL", }, { - 0x94F5, "GL_PERFQUERY_COUNTER_TIMESTAMP_INTEL", + 0x94F5, + "GL_PERFQUERY_COUNTER_TIMESTAMP_INTEL", }, { - 0x94F8, "GL_PERFQUERY_COUNTER_DATA_UINT32_INTEL", + 0x94F8, + "GL_PERFQUERY_COUNTER_DATA_UINT32_INTEL", }, { - 0x94F9, "GL_PERFQUERY_COUNTER_DATA_UINT64_INTEL", + 0x94F9, + "GL_PERFQUERY_COUNTER_DATA_UINT64_INTEL", }, { - 0x94FA, "GL_PERFQUERY_COUNTER_DATA_FLOAT_INTEL", + 0x94FA, + "GL_PERFQUERY_COUNTER_DATA_FLOAT_INTEL", }, { - 0x94FB, "GL_PERFQUERY_COUNTER_DATA_DOUBLE_INTEL", + 0x94FB, + "GL_PERFQUERY_COUNTER_DATA_DOUBLE_INTEL", }, { - 0x94FC, "GL_PERFQUERY_COUNTER_DATA_BOOL32_INTEL", + 0x94FC, + "GL_PERFQUERY_COUNTER_DATA_BOOL32_INTEL", }, { - 0x94FD, "GL_PERFQUERY_QUERY_NAME_LENGTH_MAX_INTEL", + 0x94FD, + "GL_PERFQUERY_QUERY_NAME_LENGTH_MAX_INTEL", }, { - 0x94FE, "GL_PERFQUERY_COUNTER_NAME_LENGTH_MAX_INTEL", + 0x94FE, + "GL_PERFQUERY_COUNTER_NAME_LENGTH_MAX_INTEL", }, { - 0x94FF, "GL_PERFQUERY_COUNTER_DESC_LENGTH_MAX_INTEL", + 0x94FF, + "GL_PERFQUERY_COUNTER_DESC_LENGTH_MAX_INTEL", }, { - 0x9500, "GL_PERFQUERY_GPA_EXTENDED_COUNTERS_INTEL", + 0x9500, + "GL_PERFQUERY_GPA_EXTENDED_COUNTERS_INTEL", }, { - 0x954D, "GL_CONSERVATIVE_RASTER_MODE_NV", + 0x954D, + "GL_CONSERVATIVE_RASTER_MODE_NV", }, { - 0x954E, "GL_CONSERVATIVE_RASTER_MODE_POST_SNAP_NV", + 0x954E, + "GL_CONSERVATIVE_RASTER_MODE_POST_SNAP_NV", }, { - 0x954F, "GL_CONSERVATIVE_RASTER_MODE_PRE_SNAP_TRIANGLES_NV", + 0x954F, + "GL_CONSERVATIVE_RASTER_MODE_PRE_SNAP_TRIANGLES_NV", }, { - 0x9630, "GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_NUM_VIEWS_OVR", + 0x9630, + "GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_NUM_VIEWS_OVR", }, { - 0x9631, "GL_MAX_VIEWS_OVR", + 0x9631, + "GL_MAX_VIEWS_OVR", }, { - 0x9632, "GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_BASE_VIEW_INDEX_OVR", + 0x9632, + "GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_BASE_VIEW_INDEX_OVR", }, { - 0x9633, "GL_FRAMEBUFFER_INCOMPLETE_VIEW_TARGETS_OVR", + 0x9633, + "GL_FRAMEBUFFER_INCOMPLETE_VIEW_TARGETS_OVR", }, { - 0x9650, "GL_MAX_SHADER_COMBINED_LOCAL_STORAGE_FAST_SIZE_EXT", + 0x9650, + "GL_MAX_SHADER_COMBINED_LOCAL_STORAGE_FAST_SIZE_EXT", }, { - 0x9651, "GL_MAX_SHADER_COMBINED_LOCAL_STORAGE_SIZE_EXT", + 0x9651, + "GL_MAX_SHADER_COMBINED_LOCAL_STORAGE_SIZE_EXT", }, { 0x9652, @@ -4647,73 +6190,96 @@ "EXT", }, { - 0xC0, "GL_SHARED_EDGE_NV", + 0xC0, + "GL_SHARED_EDGE_NV", }, { - 0xE8, "GL_ROUNDED_RECT_NV", + 0xE8, + "GL_ROUNDED_RECT_NV", }, { - 0xE9, "GL_RELATIVE_ROUNDED_RECT_NV", + 0xE9, + "GL_RELATIVE_ROUNDED_RECT_NV", }, { - 0xEA, "GL_ROUNDED_RECT2_NV", + 0xEA, + "GL_ROUNDED_RECT2_NV", }, { - 0xEB, "GL_RELATIVE_ROUNDED_RECT2_NV", + 0xEB, + "GL_RELATIVE_ROUNDED_RECT2_NV", }, { - 0xEC, "GL_ROUNDED_RECT4_NV", + 0xEC, + "GL_ROUNDED_RECT4_NV", }, { - 0xED, "GL_RELATIVE_ROUNDED_RECT4_NV", + 0xED, + "GL_RELATIVE_ROUNDED_RECT4_NV", }, { - 0xEE, "GL_ROUNDED_RECT8_NV", + 0xEE, + "GL_ROUNDED_RECT8_NV", }, { - 0xEF, "GL_RELATIVE_ROUNDED_RECT8_NV", + 0xEF, + "GL_RELATIVE_ROUNDED_RECT8_NV", }, { - 0xF0, "GL_RESTART_PATH_NV", + 0xF0, + "GL_RESTART_PATH_NV", }, { - 0xF2, "GL_DUP_FIRST_CUBIC_CURVE_TO_NV", + 0xF2, + "GL_DUP_FIRST_CUBIC_CURVE_TO_NV", }, { - 0xF4, "GL_DUP_LAST_CUBIC_CURVE_TO_NV", + 0xF4, + "GL_DUP_LAST_CUBIC_CURVE_TO_NV", }, { - 0xF6, "GL_RECT_NV", + 0xF6, + "GL_RECT_NV", }, { - 0xF7, "GL_RELATIVE_RECT_NV", + 0xF7, + "GL_RELATIVE_RECT_NV", }, { - 0xF8, "GL_CIRCULAR_CCW_ARC_TO_NV", + 0xF8, + "GL_CIRCULAR_CCW_ARC_TO_NV", }, { - 0xFA, "GL_CIRCULAR_CW_ARC_TO_NV", + 0xFA, + "GL_CIRCULAR_CW_ARC_TO_NV", }, { - 0xFC, "GL_CIRCULAR_TANGENT_ARC_TO_NV", + 0xFC, + "GL_CIRCULAR_TANGENT_ARC_TO_NV", }, { - 0xFE, "GL_ARC_TO_NV", + 0xFE, + "GL_ARC_TO_NV", }, { - 0xFF, "GL_RELATIVE_ARC_TO_NV", + 0xFF, + "GL_RELATIVE_ARC_TO_NV", }, { - 0xFFFFFFFF, "GL_ALL_SHADER_BITS_EXT", + 0xFFFFFFFF, + "GL_ALL_SHADER_BITS_EXT", }, { - 1, "GL_GLES_PROTOTYPES", + 1, + "GL_GLES_PROTOTYPES", }, { - 16, "GL_MAILBOX_SIZE_CHROMIUM", + 16, + "GL_MAILBOX_SIZE_CHROMIUM", }, { - 24, "GL_SYNC_TOKEN_SIZE_CHROMIUM", + 24, + "GL_SYNC_TOKEN_SIZE_CHROMIUM", }, };
diff --git a/ui/gl/gl_implementation.cc b/ui/gl/gl_implementation.cc index a0fd367..0f0ecbf 100644 --- a/ui/gl/gl_implementation.cc +++ b/ui/gl/gl_implementation.cc
@@ -33,7 +33,6 @@ GLImplementation implementation; } kGLImplementationNamePairs[] = { {kGLImplementationDesktopName, kGLImplementationDesktopGL}, - {kGLImplementationOSMesaName, kGLImplementationOSMesaGL}, {kGLImplementationSwiftShaderName, kGLImplementationSwiftShaderGL}, #if defined(OS_MACOSX) {kGLImplementationAppleName, kGLImplementationAppleGL}, @@ -98,7 +97,6 @@ } // namespace base::ThreadLocalPointer<CurrentGL>* g_current_gl_context_tls = NULL; -OSMESAApi* g_current_osmesa_context; #if defined(USE_EGL) EGLApi* g_current_egl_context; @@ -122,13 +120,7 @@ } GLImplementation GetSoftwareGLImplementation() { -#if (BUILDFLAG(ENABLE_SWIFTSHADER) && \ - (defined(OS_WIN) || defined(OS_LINUX) || \ - (defined(OS_MACOSX) && defined(USE_EGL)))) return kGLImplementationSwiftShaderGL; -#else - return kGLImplementationOSMesaGL; -#endif } const char* GetGLImplementationName(GLImplementation implementation) { @@ -151,7 +143,6 @@ bool HasDesktopGLFeatures() { return kGLImplementationDesktopGL == g_gl_implementation || kGLImplementationDesktopGLCoreProfile == g_gl_implementation || - kGLImplementationOSMesaGL == g_gl_implementation || kGLImplementationAppleGL == g_gl_implementation; }
diff --git a/ui/gl/gl_implementation.h b/ui/gl/gl_implementation.h index 0c5a996..f3e43f76 100644 --- a/ui/gl/gl_implementation.h +++ b/ui/gl/gl_implementation.h
@@ -25,7 +25,6 @@ kGLImplementationNone, kGLImplementationDesktopGL, kGLImplementationDesktopGLCoreProfile, - kGLImplementationOSMesaGL, kGLImplementationSwiftShaderGL, kGLImplementationAppleGL, kGLImplementationEGLGLES2,
diff --git a/ui/gl/gl_implementation_osmesa.cc b/ui/gl/gl_implementation_osmesa.cc deleted file mode 100644 index 34b38de..0000000 --- a/ui/gl/gl_implementation_osmesa.cc +++ /dev/null
@@ -1,67 +0,0 @@ -// Copyright 2014 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -#include "ui/gl/gl_implementation_osmesa.h" - -#include "base/files/file_path.h" -#include "base/logging.h" -#include "base/native_library.h" -#include "base/path_service.h" -#include "build/build_config.h" -#include "ui/gl/gl_bindings.h" -#include "ui/gl/gl_gl_api_implementation.h" -#include "ui/gl/gl_implementation.h" -#include "ui/gl/gl_osmesa_api_implementation.h" - -namespace gl { - -bool InitializeStaticGLBindingsOSMesaGL() { - base::FilePath module_path; - -#if !defined(OS_FUCHSIA) - // On all platforms except Fuchsia libosmesa.so is expected to be in the same - // directory as the chrome binary. Pass full path to dlopen() to ensure we - // load the right version. - // - // On Fuchsia libraries are normally in the lib directory. The loader service - // will load libosmesa.so that belongs to the chrome package when dlopen() is - // called with relative path. - if (!base::PathService::Get(base::DIR_MODULE, &module_path)) { - LOG(ERROR) << "PathService::Get failed."; - return false; - } -#endif // !defined(OS_FUCHSIA) - -#if defined(OS_WIN) - base::FilePath library_path = - module_path.Append(FILE_PATH_LITERAL("osmesa.dll")); -#else - base::FilePath library_path = - module_path.Append(FILE_PATH_LITERAL("libosmesa.so")); -#endif - - base::NativeLibrary library = LoadLibraryAndPrintError(library_path); - if (!library) - return false; - - GLGetProcAddressProc get_proc_address = - reinterpret_cast<GLGetProcAddressProc>( - base::GetFunctionPointerFromNativeLibrary(library, - "OSMesaGetProcAddress")); - if (!get_proc_address) { - LOG(ERROR) << "OSMesaGetProcAddress not found."; - base::UnloadNativeLibrary(library); - return false; - } - - SetGLGetProcAddressProc(get_proc_address); - AddGLNativeLibrary(library); - SetGLImplementation(kGLImplementationOSMesaGL); - - InitializeStaticGLBindingsGL(); - InitializeStaticGLBindingsOSMESA(); - return true; -} - -} // namespace gl
diff --git a/ui/gl/gl_implementation_osmesa.h b/ui/gl/gl_implementation_osmesa.h deleted file mode 100644 index ba08e3f..0000000 --- a/ui/gl/gl_implementation_osmesa.h +++ /dev/null
@@ -1,18 +0,0 @@ -// Copyright 2014 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -#ifndef UI_GL_GL_IMPLEMENTATION_OSMESA_H_ -#define UI_GL_GL_IMPLEMENTATION_OSMESA_H_ - -#include "base/files/file_path.h" -#include "base/native_library.h" -#include "ui/gl/gl_export.h" - -namespace gl { - -GL_EXPORT bool InitializeStaticGLBindingsOSMesaGL(); - -} // namespace gl - -#endif // UI_GL_GL_IMPLEMENTATION_OSMESA_H_
diff --git a/ui/gl/gl_osmesa_api_implementation.cc b/ui/gl/gl_osmesa_api_implementation.cc deleted file mode 100644 index 081fc32..0000000 --- a/ui/gl/gl_osmesa_api_implementation.cc +++ /dev/null
@@ -1,76 +0,0 @@ -// Copyright (c) 2012 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 "ui/gl/gl_osmesa_api_implementation.h" - -namespace gl { - -RealOSMESAApi* g_real_osmesa = nullptr; -DebugOSMESAApi* g_debug_osmesa = nullptr; - -void InitializeStaticGLBindingsOSMESA() { - g_driver_osmesa.InitializeStaticBindings(); - if (!g_real_osmesa) { - g_real_osmesa = new RealOSMESAApi(); - } - g_real_osmesa->Initialize(&g_driver_osmesa); - g_current_osmesa_context = g_real_osmesa; - g_driver_osmesa.InitializeExtensionBindings(); -} - -void InitializeDebugGLBindingsOSMESA() { - if (!g_debug_osmesa) { - g_debug_osmesa = new DebugOSMESAApi(g_real_osmesa); - } - g_current_osmesa_context = g_debug_osmesa; -} - -void ClearBindingsOSMESA() { - if (g_debug_osmesa) { - delete g_debug_osmesa; - g_debug_osmesa = NULL; - } - if (g_real_osmesa) { - delete g_real_osmesa; - g_real_osmesa = NULL; - } - g_current_osmesa_context = NULL; - g_driver_osmesa.ClearBindings(); -} - -OSMESAApi::OSMESAApi() { -} - -OSMESAApi::~OSMESAApi() { -} - -OSMESAApiBase::OSMESAApiBase() - : driver_(NULL) { -} - -OSMESAApiBase::~OSMESAApiBase() { -} - -void OSMESAApiBase::InitializeBase(DriverOSMESA* driver) { - driver_ = driver; -} - -RealOSMESAApi::RealOSMESAApi() { -} - -RealOSMESAApi::~RealOSMESAApi() { -} - -void RealOSMESAApi::Initialize(DriverOSMESA* driver) { - InitializeBase(driver); -} - -DebugOSMESAApi::DebugOSMESAApi(OSMESAApi* osmesa_api) - : osmesa_api_(osmesa_api) {} -DebugOSMESAApi::~DebugOSMESAApi() {} - -TraceOSMESAApi::~TraceOSMESAApi() { -} - -} // namespace gl
diff --git a/ui/gl/gl_osmesa_api_implementation.h b/ui/gl/gl_osmesa_api_implementation.h deleted file mode 100644 index 6163b19..0000000 --- a/ui/gl/gl_osmesa_api_implementation.h +++ /dev/null
@@ -1,75 +0,0 @@ -// Copyright (c) 2012 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 UI_GL_GL_OSMESA_API_IMPLEMENTATION_H_ -#define UI_GL_GL_OSMESA_API_IMPLEMENTATION_H_ - -#include "base/compiler_specific.h" -#include "ui/gl/gl_bindings.h" -#include "ui/gl/gl_export.h" - -namespace gl { - -GL_EXPORT void InitializeStaticGLBindingsOSMESA(); -GL_EXPORT void InitializeDebugGLBindingsOSMESA(); -GL_EXPORT void ClearBindingsOSMESA(); - -class GL_EXPORT OSMESAApiBase : public OSMESAApi { - public: - // Include the auto-generated part of this class. We split this because - // it means we can easily edit the non-auto generated parts right here in - // this file instead of having to edit some template or the code generator. - #include "gl_bindings_api_autogen_osmesa.h" - - protected: - OSMESAApiBase(); - ~OSMESAApiBase() override; - void InitializeBase(DriverOSMESA* driver); - - DriverOSMESA* driver_; -}; - -class GL_EXPORT RealOSMESAApi : public OSMESAApiBase { - public: - RealOSMESAApi(); - ~RealOSMESAApi() override; - void Initialize(DriverOSMESA* driver); -}; - -// Logs debug information for every OSMESA call. -class GL_EXPORT DebugOSMESAApi : public OSMESAApi { - public: - DebugOSMESAApi(OSMESAApi* osmesa_api); - ~DebugOSMESAApi() override; - - // Include the auto-generated part of this class. We split this because - // it means we can easily edit the non-auto generated parts right here in - // this file instead of having to edit some template or the code generator. - #include "gl_bindings_api_autogen_osmesa.h" - - private: - OSMESAApi* osmesa_api_; -}; - -// Inserts a TRACE for every OSMESA call. -class GL_EXPORT TraceOSMESAApi : public OSMESAApi { - public: - TraceOSMESAApi(OSMESAApi* osmesa_api) : osmesa_api_(osmesa_api) { } - ~TraceOSMESAApi() override; - - // Include the auto-generated part of this class. We split this because - // it means we can easily edit the non-auto generated parts right here in - // this file instead of having to edit some template or the code generator. - #include "gl_bindings_api_autogen_osmesa.h" - - private: - OSMESAApi* osmesa_api_; -}; - -} // namespace gl - -#endif // UI_GL_GL_OSMESA_API_IMPLEMENTATION_H_ - - -
diff --git a/ui/gl/gl_surface_osmesa.cc b/ui/gl/gl_surface_osmesa.cc deleted file mode 100644 index 3894f05..0000000 --- a/ui/gl/gl_surface_osmesa.cc +++ /dev/null
@@ -1,132 +0,0 @@ -// Copyright (c) 2012 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 "ui/gl/gl_surface_osmesa.h" - -#include <algorithm> - -#include "base/logging.h" -#include "base/numerics/safe_math.h" -#include "base/threading/thread_task_runner_handle.h" -#include "third_party/mesa/src/include/GL/osmesa.h" -#include "ui/gl/gl_bindings.h" -#include "ui/gl/gl_context.h" -#include "ui/gl/scoped_make_current.h" - -namespace gl { - -GLSurfaceOSMesa::GLSurfaceOSMesa(GLSurfaceFormat format, - const gfx::Size& size) - : size_(size), - format_(format) { - // Implementations of OSMesa surface do not support having a 0 size. In such - // cases use a (1, 1) surface. - if (size_.GetArea() == 0) - size_.SetSize(1, 1); -} - -bool GLSurfaceOSMesa::Initialize(GLSurfaceFormat format) { - return Resize(size_, 1.f, ColorSpace::UNSPECIFIED, true); -} - -void GLSurfaceOSMesa::Destroy() { - buffer_.reset(); -} - -bool GLSurfaceOSMesa::Resize(const gfx::Size& new_size, - float scale_factor, - ColorSpace color_space, - bool has_alpha) { - std::unique_ptr<ui::ScopedMakeCurrent> scoped_make_current; - GLContext* current_context = GLContext::GetCurrent(); - bool was_current = - current_context && current_context->IsCurrent(this); - if (was_current) { - scoped_make_current.reset( - new ui::ScopedMakeCurrent(current_context, this)); - current_context->ReleaseCurrent(this); - } - - // Preserve the old buffer. - std::unique_ptr<int32_t[]> old_buffer(buffer_.release()); - - base::CheckedNumeric<int> checked_size = sizeof(buffer_[0]); - checked_size *= new_size.width(); - checked_size *= new_size.height(); - if (!checked_size.IsValid()) - return false; - - // Allocate a new one. - buffer_.reset(new int32_t[new_size.GetArea()]); - if (!buffer_.get()) - return false; - - memset(buffer_.get(), 0, new_size.GetArea() * sizeof(buffer_[0])); - - // Copy the old back buffer into the new buffer. - if (old_buffer.get()) { - int copy_width = std::min(size_.width(), new_size.width()); - int copy_height = std::min(size_.height(), new_size.height()); - for (int y = 0; y < copy_height; ++y) { - for (int x = 0; x < copy_width; ++x) { - buffer_[y * new_size.width() + x] = old_buffer[y * size_.width() + x]; - } - } - } - - size_ = new_size; - - return true; -} - -bool GLSurfaceOSMesa::IsOffscreen() { - return true; -} - -gfx::SwapResult GLSurfaceOSMesa::SwapBuffers( - const PresentationCallback& callback) { - NOTREACHED() << "Should not call SwapBuffers on an GLSurfaceOSMesa."; - return gfx::SwapResult::SWAP_FAILED; -} - -gfx::Size GLSurfaceOSMesa::GetSize() { - return size_; -} - -void* GLSurfaceOSMesa::GetHandle() { - return buffer_.get(); -} - -GLSurfaceFormat GLSurfaceOSMesa::GetFormat() { - return format_; -} - -GLSurfaceOSMesa::~GLSurfaceOSMesa() { - Destroy(); -} - -bool GLSurfaceOSMesaHeadless::IsOffscreen() { return false; } - -gfx::SwapResult GLSurfaceOSMesaHeadless::SwapBuffers( - const PresentationCallback& callback) { - gfx::PresentationFeedback feedback(base::TimeTicks::Now(), base::TimeDelta(), - 0 /* flags */); - base::ThreadTaskRunnerHandle::Get()->PostTask( - FROM_HERE, base::BindOnce(callback, feedback)); - return gfx::SwapResult::SWAP_ACK; -} - -bool GLSurfaceOSMesaHeadless::SupportsPresentationCallback() { - return true; -} - -GLSurfaceOSMesaHeadless::GLSurfaceOSMesaHeadless() - : GLSurfaceOSMesa( - GLSurfaceFormat(GLSurfaceFormat::PIXEL_LAYOUT_BGRA), - gfx::Size(1, 1)) { -} - -GLSurfaceOSMesaHeadless::~GLSurfaceOSMesaHeadless() { Destroy(); } - -} // namespace gl
diff --git a/ui/gl/gl_surface_osmesa.h b/ui/gl/gl_surface_osmesa.h deleted file mode 100644 index e06974f..0000000 --- a/ui/gl/gl_surface_osmesa.h +++ /dev/null
@@ -1,71 +0,0 @@ -// Copyright (c) 2012 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 UI_GL_GL_SURFACE_OSMESA_H_ -#define UI_GL_GL_SURFACE_OSMESA_H_ - -#include <stdint.h> - -#include <memory> - -#include "base/macros.h" -#include "ui/gfx/geometry/size.h" -#include "ui/gl/gl_export.h" -#include "ui/gl/gl_surface.h" - -namespace gl { - -// A surface that the Mesa software renderer draws to. This is actually just a -// buffer in system memory. GetHandle returns a pointer to the buffer. These -// surfaces can be resized and resizing preserves the contents. -class GL_EXPORT GLSurfaceOSMesa : public GLSurface { - public: - GLSurfaceOSMesa(GLSurfaceFormat format, const gfx::Size& size); - - // Implement GLSurface. - bool Initialize(GLSurfaceFormat format) override; - void Destroy() override; - bool Resize(const gfx::Size& new_size, - float scale_factor, - ColorSpace color_space, - bool has_alpha) override; - bool IsOffscreen() override; - gfx::SwapResult SwapBuffers(const PresentationCallback& callback) override; - gfx::Size GetSize() override; - void* GetHandle() override; - GLSurfaceFormat GetFormat() override; - - protected: - ~GLSurfaceOSMesa() override; - - private: - gfx::Size size_; - GLSurfaceFormat format_; - std::unique_ptr<int32_t[]> buffer_; - - DISALLOW_COPY_AND_ASSIGN(GLSurfaceOSMesa); -}; - -// A thin subclass of |GLSurfaceOSMesa| that can be used in place -// of a native hardware-provided surface when a native surface -// provider is not available. -class GL_EXPORT GLSurfaceOSMesaHeadless : public GLSurfaceOSMesa { - public: - GLSurfaceOSMesaHeadless(); - - // GLSurfaceOSMesa overrides: - bool IsOffscreen() override; - gfx::SwapResult SwapBuffers(const PresentationCallback& callback) override; - bool SupportsPresentationCallback() override; - - protected: - ~GLSurfaceOSMesaHeadless() override; - - private: - DISALLOW_COPY_AND_ASSIGN(GLSurfaceOSMesaHeadless); -}; - -} // namespace gl - -#endif // UI_GL_GL_SURFACE_OSMESA_H_
diff --git a/ui/gl/gl_surface_osmesa_win.cc b/ui/gl/gl_surface_osmesa_win.cc deleted file mode 100644 index 4730ae5..0000000 --- a/ui/gl/gl_surface_osmesa_win.cc +++ /dev/null
@@ -1,126 +0,0 @@ -// Copyright 2016 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -#include "ui/gl/gl_surface_osmesa_win.h" - -#include <memory> - -#include "base/command_line.h" -#include "base/logging.h" -#include "base/macros.h" -#include "base/threading/thread_task_runner_handle.h" -#include "base/trace_event/trace_event.h" -#include "base/win/windows_version.h" -#include "ui/gl/gl_bindings.h" -#include "ui/gl/gl_implementation.h" -#include "ui/gl/gl_surface_egl.h" -#include "ui/gl/gl_surface_wgl.h" -#include "ui/gl/vsync_provider_win.h" - -// From ANGLE's egl/eglext.h. -#if !defined(EGL_D3D11_ELSE_D3D9_DISPLAY_ANGLE) -#define EGL_D3D11_ELSE_D3D9_DISPLAY_ANGLE \ - reinterpret_cast<EGLNativeDisplayType>(-2) -#endif - -namespace gl { - -// Use BGRA, because StretchDIBits from RGBA causes later PrintWindow or -// BitBlt from the HWND to return all 0s, which causes the snapshot mechanism -// not to work. -GLSurfaceOSMesaWin::GLSurfaceOSMesaWin(gfx::AcceleratedWidget window) - : GLSurfaceOSMesa(GLSurfaceFormat(GLSurfaceFormat::PIXEL_LAYOUT_BGRA), - gfx::Size(1, 1)), - window_(window), - device_context_(NULL) { - DCHECK(window); -} - -GLSurfaceOSMesaWin::~GLSurfaceOSMesaWin() { - Destroy(); -} - -bool GLSurfaceOSMesaWin::Initialize(GLSurfaceFormat format) { - if (!GLSurfaceOSMesa::Initialize(format)) - return false; - - device_context_ = GetDC(window_); - return true; -} - -void GLSurfaceOSMesaWin::Destroy() { - if (window_ && device_context_) - ReleaseDC(window_, device_context_); - - device_context_ = NULL; - - GLSurfaceOSMesa::Destroy(); -} - -bool GLSurfaceOSMesaWin::IsOffscreen() { - return false; -} - -gfx::SwapResult GLSurfaceOSMesaWin::SwapBuffers( - const PresentationCallback& callback) { - DCHECK(device_context_); - - gfx::Size size = GetSize(); - return PostSubBuffer(0, 0, size.width(), size.height(), callback); -} - -bool GLSurfaceOSMesaWin::SupportsPresentationCallback() { - return true; -} - -bool GLSurfaceOSMesaWin::SupportsPostSubBuffer() { - return true; -} - -gfx::SwapResult GLSurfaceOSMesaWin::PostSubBuffer( - int x, - int y, - int width, - int height, - const PresentationCallback& callback) { - DCHECK(device_context_); - - gfx::Size size = GetSize(); - - // Note: negating the height below causes GDI to treat the bitmap data as row - // 0 being at the top. - BITMAPV4HEADER info = {sizeof(BITMAPV4HEADER)}; - info.bV4Width = size.width(); - info.bV4Height = -size.height(); - info.bV4Planes = 1; - info.bV4BitCount = 32; - info.bV4V4Compression = BI_BITFIELDS; - info.bV4RedMask = 0x00FF0000; - info.bV4GreenMask = 0x0000FF00; - info.bV4BlueMask = 0x000000FF; - info.bV4AlphaMask = 0xFF000000; - - // Copy the back buffer to the window's device context. Do not check whether - // StretchDIBits succeeds or not. It will fail if the window has been - // destroyed but it is preferable to allow rendering to silently fail if the - // window is destroyed. This is because the primary application of this - // class of GLContext is for testing and we do not want every GL related ui / - // browser test to become flaky if there is a race condition between GL - // context destruction and window destruction. - StretchDIBits(device_context_, x, size.height() - y - height, width, height, - x, y, width, height, GetHandle(), - reinterpret_cast<BITMAPINFO*>(&info), DIB_RGB_COLORS, SRCCOPY); - - constexpr int64_t kRefreshIntervalInMicroseconds = - base::Time::kMicrosecondsPerSecond / 60; - gfx::PresentationFeedback feedback( - base::TimeTicks::Now(), - base::TimeDelta::FromMicroseconds(kRefreshIntervalInMicroseconds), - 0 /* flags */); - base::ThreadTaskRunnerHandle::Get()->PostTask( - FROM_HERE, base::BindOnce(callback, feedback)); - return gfx::SwapResult::SWAP_ACK; -} - -} // namespace gl
diff --git a/ui/gl/gl_surface_osmesa_win.h b/ui/gl/gl_surface_osmesa_win.h deleted file mode 100644 index 16843dfc..0000000 --- a/ui/gl/gl_surface_osmesa_win.h +++ /dev/null
@@ -1,48 +0,0 @@ -// Copyright 2016 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -#ifndef UI_GL_GL_SURFACE_OSMESA_WIN_H_ -#define UI_GL_GL_SURFACE_OSMESA_WIN_H_ - -#include <dwmapi.h> - -#include "base/macros.h" -#include "ui/gfx/native_widget_types.h" -#include "ui/gl/gl_export.h" -#include "ui/gl/gl_surface.h" -#include "ui/gl/gl_surface_osmesa.h" - -namespace gl { - -// This OSMesa GL surface can use GDI to swap the contents of the buffer to a -// view. -class GL_EXPORT GLSurfaceOSMesaWin : public GLSurfaceOSMesa { - public: - explicit GLSurfaceOSMesaWin(gfx::AcceleratedWidget window); - - // Implement subset of GLSurface. - bool Initialize(GLSurfaceFormat format) override; - void Destroy() override; - bool IsOffscreen() override; - gfx::SwapResult SwapBuffers(const PresentationCallback& callback) override; - bool SupportsPresentationCallback() override; - bool SupportsPostSubBuffer() override; - gfx::SwapResult PostSubBuffer(int x, - int y, - int width, - int height, - const PresentationCallback& callback) override; - - private: - ~GLSurfaceOSMesaWin() override; - - gfx::AcceleratedWidget window_; - HDC device_context_; - - DISALLOW_COPY_AND_ASSIGN(GLSurfaceOSMesaWin); -}; - -} // namespace gl - -#endif // UI_GL_GL_SURFACE_OSMESA_WIN_H_
diff --git a/ui/gl/gl_surface_osmesa_x11.cc b/ui/gl/gl_surface_osmesa_x11.cc deleted file mode 100644 index da1618e..0000000 --- a/ui/gl/gl_surface_osmesa_x11.cc +++ /dev/null
@@ -1,200 +0,0 @@ -// Copyright 2016 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -#include "ui/gl/gl_surface_osmesa_x11.h" - -#include <stdint.h> - -#include "base/logging.h" -#include "base/trace_event/trace_event.h" -#include "ui/gfx/x/x11_types.h" -#include "ui/gl/gl_bindings.h" -#include "ui/gl/gl_implementation.h" - -namespace gl { - -GLSurfaceOSMesaX11::GLSurfaceOSMesaX11(gfx::AcceleratedWidget window) - : GLSurfaceOSMesa( - GLSurfaceFormat(GLSurfaceFormat::PIXEL_LAYOUT_BGRA), - gfx::Size(1, 1)), - xdisplay_(gfx::GetXDisplay()), - window_graphics_context_(0), - window_(window), - pixmap_graphics_context_(0), - pixmap_(0) { - DCHECK(xdisplay_); - DCHECK(window_); -} - -// static -bool GLSurfaceOSMesaX11::InitializeOneOff() { - static bool initialized = false; - if (initialized) - return true; - - if (!gfx::GetXDisplay()) { - LOG(ERROR) << "XOpenDisplay failed."; - return false; - } - - initialized = true; - return true; -} - -bool GLSurfaceOSMesaX11::Initialize(GLSurfaceFormat format) { - if (!GLSurfaceOSMesa::Initialize(format)) - return false; - - window_graphics_context_ = XCreateGC(xdisplay_, window_, 0, NULL); - if (!window_graphics_context_) { - LOG(ERROR) << "XCreateGC failed."; - Destroy(); - return false; - } - - return true; -} - -void GLSurfaceOSMesaX11::Destroy() { - if (pixmap_graphics_context_) { - XFreeGC(xdisplay_, pixmap_graphics_context_); - pixmap_graphics_context_ = NULL; - } - - if (pixmap_) { - XFreePixmap(xdisplay_, pixmap_); - pixmap_ = 0; - } - - if (window_graphics_context_) { - XFreeGC(xdisplay_, window_graphics_context_); - window_graphics_context_ = NULL; - } - - XSync(xdisplay_, x11::False); -} - -bool GLSurfaceOSMesaX11::Resize(const gfx::Size& new_size, - float scale_factor, - ColorSpace color_space, - bool alpha) { - if (!GLSurfaceOSMesa::Resize(new_size, scale_factor, color_space, alpha)) - return false; - - XWindowAttributes attributes; - if (!XGetWindowAttributes(xdisplay_, window_, &attributes)) { - LOG(ERROR) << "XGetWindowAttributes failed for window " << window_ << "."; - return false; - } - - // Destroy the previous pixmap and graphics context. - if (pixmap_graphics_context_) { - XFreeGC(xdisplay_, pixmap_graphics_context_); - pixmap_graphics_context_ = NULL; - } - if (pixmap_) { - XFreePixmap(xdisplay_, pixmap_); - pixmap_ = 0; - } - - // Recreate a pixmap to hold the frame. - pixmap_ = XCreatePixmap(xdisplay_, window_, new_size.width(), - new_size.height(), attributes.depth); - if (!pixmap_) { - LOG(ERROR) << "XCreatePixmap failed."; - return false; - } - - // Recreate a graphics context for the pixmap. - pixmap_graphics_context_ = XCreateGC(xdisplay_, pixmap_, 0, NULL); - if (!pixmap_graphics_context_) { - LOG(ERROR) << "XCreateGC failed"; - return false; - } - - return true; -} - -bool GLSurfaceOSMesaX11::IsOffscreen() { - return false; -} - -gfx::SwapResult GLSurfaceOSMesaX11::SwapBuffers( - const PresentationCallback& callback) { - // TODO(penghuang): Provide useful presentation feedback. - // https://crbug.com/776877 - TRACE_EVENT2("gpu", "GLSurfaceOSMesaX11:RealSwapBuffers", "width", - GetSize().width(), "height", GetSize().height()); - - gfx::Size size = GetSize(); - - XWindowAttributes attributes; - if (!XGetWindowAttributes(xdisplay_, window_, &attributes)) { - LOG(ERROR) << "XGetWindowAttributes failed for window " << window_ << "."; - return gfx::SwapResult::SWAP_FAILED; - } - - // Copy the frame into the pixmap. - gfx::PutARGBImage(xdisplay_, attributes.visual, attributes.depth, pixmap_, - pixmap_graphics_context_, - static_cast<const uint8_t*>(GetHandle()), size.width(), - size.height()); - - // Copy the pixmap to the window. - XCopyArea(xdisplay_, pixmap_, window_, window_graphics_context_, 0, 0, - size.width(), size.height(), 0, 0); - - return gfx::SwapResult::SWAP_ACK; -} - -bool GLSurfaceOSMesaX11::SupportsPostSubBuffer() { - return true; -} - -gfx::SwapResult GLSurfaceOSMesaX11::PostSubBuffer( - int x, - int y, - int width, - int height, - const PresentationCallback& callback) { - gfx::Size size = GetSize(); - - // Move (0,0) from lower-left to upper-left - y = size.height() - y - height; - - XWindowAttributes attributes; - if (!XGetWindowAttributes(xdisplay_, window_, &attributes)) { - LOG(ERROR) << "XGetWindowAttributes failed for window " << window_ << "."; - return gfx::SwapResult::SWAP_FAILED; - } - - // Copy the frame into the pixmap. - gfx::PutARGBImage(xdisplay_, attributes.visual, attributes.depth, pixmap_, - pixmap_graphics_context_, - static_cast<const uint8_t*>(GetHandle()), size.width(), - size.height(), x, y, x, y, width, height); - - // Copy the pixmap to the window. - XCopyArea(xdisplay_, pixmap_, window_, window_graphics_context_, x, y, width, - height, x, y); - - constexpr int64_t kRefreshIntervalInMicroseconds = - base::Time::kMicrosecondsPerSecond / 60; - callback.Run(gfx::PresentationFeedback( - base::TimeTicks::Now(), - base::TimeDelta::FromMicroseconds(kRefreshIntervalInMicroseconds), - 0 /* flags */)); - - return gfx::SwapResult::SWAP_ACK; -} - -bool GLSurfaceOSMesaX11::SupportsPresentationCallback() { - return true; -} - -GLSurfaceOSMesaX11::~GLSurfaceOSMesaX11() { - Destroy(); -} - -} // namespace gl
diff --git a/ui/gl/gl_surface_osmesa_x11.h b/ui/gl/gl_surface_osmesa_x11.h deleted file mode 100644 index 415e4c91..0000000 --- a/ui/gl/gl_surface_osmesa_x11.h +++ /dev/null
@@ -1,57 +0,0 @@ -// Copyright 2016 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -#ifndef UI_GL_GL_SURFACE_OSMESA_X11_H_ -#define UI_GL_GL_SURFACE_OSMESA_X11_H_ - -#include "base/macros.h" -#include "ui/gfx/native_widget_types.h" -#include "ui/gfx/x/x11.h" -#include "ui/gl/gl_export.h" -#include "ui/gl/gl_surface.h" -#include "ui/gl/gl_surface_osmesa.h" - -namespace gl { - -// This OSMesa GL surface can use XLib to swap the contents of the buffer to a -// view. -class GL_EXPORT GLSurfaceOSMesaX11 : public GLSurfaceOSMesa { - public: - explicit GLSurfaceOSMesaX11(gfx::AcceleratedWidget window); - - static bool InitializeOneOff(); - - // Implement a subset of GLSurface. - bool Initialize(GLSurfaceFormat format) override; - void Destroy() override; - bool Resize(const gfx::Size& new_size, - float scale_factor, - ColorSpace color_space, - bool alpha) override; - bool IsOffscreen() override; - gfx::SwapResult SwapBuffers(const PresentationCallback& callback) override; - bool SupportsPostSubBuffer() override; - gfx::SwapResult PostSubBuffer(int x, - int y, - int width, - int height, - const PresentationCallback& callback) override; - bool SupportsPresentationCallback() override; - - protected: - ~GLSurfaceOSMesaX11() override; - - private: - Display* xdisplay_; - GC window_graphics_context_; - gfx::AcceleratedWidget window_; - GC pixmap_graphics_context_; - Pixmap pixmap_; - - DISALLOW_COPY_AND_ASSIGN(GLSurfaceOSMesaX11); -}; - -} // namespace gl - -#endif // UI_GL_GL_SURFACE_OSMESA_X11_H_
diff --git a/ui/gl/gl_switches.cc b/ui/gl/gl_switches.cc index fdd16103..b45bb333 100644 --- a/ui/gl/gl_switches.cc +++ b/ui/gl/gl_switches.cc
@@ -8,7 +8,6 @@ namespace gl { const char kGLImplementationDesktopName[] = "desktop"; -const char kGLImplementationOSMesaName[] = "osmesa"; const char kGLImplementationAppleName[] = "apple"; const char kGLImplementationEGLName[] = "egl"; const char kGLImplementationANGLEName[] = "angle"; @@ -66,7 +65,6 @@ // default). // egl: whatever EGL / GLES2 the user has installed (Windows default - actually // ANGLE). -// osmesa: The OSMesa software renderer. // swiftshader: The SwiftShader software renderer. const char kUseGL[] = "use-gl";
diff --git a/ui/gl/gl_switches.h b/ui/gl/gl_switches.h index 5fd00a7..3dab7a1 100644 --- a/ui/gl/gl_switches.h +++ b/ui/gl/gl_switches.h
@@ -14,7 +14,6 @@ // The GL implementation names that can be passed to --use-gl. GL_EXPORT extern const char kGLImplementationDesktopName[]; -GL_EXPORT extern const char kGLImplementationOSMesaName[]; GL_EXPORT extern const char kGLImplementationAppleName[]; GL_EXPORT extern const char kGLImplementationEGLName[]; GL_EXPORT extern const char kGLImplementationANGLEName[];
diff --git a/ui/gl/init/gl_factory_android.cc b/ui/gl/init/gl_factory_android.cc index b4fd14f..a9e2d4cc 100644 --- a/ui/gl/init/gl_factory_android.cc +++ b/ui/gl/init/gl_factory_android.cc
@@ -9,14 +9,12 @@ #include "ui/gl/gl_bindings.h" #include "ui/gl/gl_context.h" #include "ui/gl/gl_context_egl.h" -#include "ui/gl/gl_context_osmesa.h" #include "ui/gl/gl_context_stub.h" #include "ui/gl/gl_egl_api_implementation.h" #include "ui/gl/gl_implementation.h" #include "ui/gl/gl_share_group.h" #include "ui/gl/gl_surface.h" #include "ui/gl/gl_surface_egl.h" -#include "ui/gl/gl_surface_osmesa.h" #include "ui/gl/gl_surface_stub.h" namespace gl { @@ -69,7 +67,6 @@ std::vector<GLImplementation> GetAllowedGLImplementations() { std::vector<GLImplementation> impls; impls.push_back(kGLImplementationEGLGLES2); - impls.push_back(kGLImplementationOSMesaGL); return impls; } @@ -95,9 +92,6 @@ stub_context->SetUseStubApi(true); return stub_context; } - case kGLImplementationOSMesaGL: - return InitializeGLContext(new GLContextOSMesa(share_group), - compatible_surface, attribs); case kGLImplementationDisabled: NOTREACHED(); return nullptr; @@ -117,8 +111,6 @@ TRACE_EVENT0("gpu", "gl::init::CreateViewGLSurface"); CHECK_NE(kGLImplementationNone, GetGLImplementation()); switch (GetGLImplementation()) { - case kGLImplementationOSMesaGL: - return InitializeGLSurface(new GLSurfaceOSMesaHeadless()); case kGLImplementationEGLGLES2: if (window != gfx::kNullAcceleratedWidget) { return InitializeGLSurface(new NativeViewGLSurfaceEGL(window, nullptr)); @@ -136,11 +128,6 @@ TRACE_EVENT0("gpu", "gl::init::CreateOffscreenGLSurface"); CHECK_NE(kGLImplementationNone, GetGLImplementation()); switch (GetGLImplementation()) { - case kGLImplementationOSMesaGL: { - format.SetDefaultPixelLayout(GLSurfaceFormat::PIXEL_LAYOUT_BGRA); - return InitializeGLSurfaceWithFormat( - new GLSurfaceOSMesa(format, size), format); - } case kGLImplementationEGLGLES2: { if (GLSurfaceEGL::IsEGLSurfacelessContextSupported() && (size.width() == 0 && size.height() == 0)) { @@ -169,7 +156,6 @@ break; case kGLImplementationMockGL: case kGLImplementationStubGL: - case kGLImplementationOSMesaGL: break; default: NOTREACHED(); @@ -184,7 +170,6 @@ return InitializeExtensionSettingsOneOffEGL(); case kGLImplementationMockGL: case kGLImplementationStubGL: - case kGLImplementationOSMesaGL: return true; default: NOTREACHED();
diff --git a/ui/gl/init/gl_factory_mac.cc b/ui/gl/init/gl_factory_mac.cc index da1b21f..b764ef94 100644 --- a/ui/gl/init/gl_factory_mac.cc +++ b/ui/gl/init/gl_factory_mac.cc
@@ -9,13 +9,11 @@ #include "base/trace_event/trace_event.h" #include "ui/gl/gl_bindings.h" #include "ui/gl/gl_context_cgl.h" -#include "ui/gl/gl_context_osmesa.h" #include "ui/gl/gl_context_stub.h" #include "ui/gl/gl_features.h" #include "ui/gl/gl_implementation.h" #include "ui/gl/gl_share_group.h" #include "ui/gl/gl_surface.h" -#include "ui/gl/gl_surface_osmesa.h" #include "ui/gl/gl_surface_stub.h" #include "ui/gl/gl_switches.h" @@ -71,7 +69,6 @@ #endif // BUILDFLAG(USE_EGL_ON_MAC) impls.push_back(kGLImplementationDesktopGL); impls.push_back(kGLImplementationAppleGL); - impls.push_back(kGLImplementationOSMesaGL); return impls; } @@ -95,9 +92,6 @@ return InitializeGLContext(new GLContextEGL(share_group), compatible_surface, attribs); #endif // BUILDFLAG(USE_EGL_ON_MAC) - case kGLImplementationOSMesaGL: - return InitializeGLContext(new GLContextOSMesa(share_group), - compatible_surface, attribs); case kGLImplementationMockGL: return new GLContextStub(share_group); case kGLImplementationStubGL: { @@ -123,9 +117,6 @@ NOTIMPLEMENTED() << "No onscreen support on Mac."; return nullptr; } - case kGLImplementationOSMesaGL: { - return InitializeGLSurface(new GLSurfaceOSMesaHeadless()); - } case kGLImplementationMockGL: case kGLImplementationStubGL: return new GLSurfaceStub; @@ -139,10 +130,6 @@ const gfx::Size& size, GLSurfaceFormat format) { TRACE_EVENT0("gpu", "gl::init::CreateOffscreenGLSurface"); switch (GetGLImplementation()) { - case kGLImplementationOSMesaGL: - format.SetDefaultPixelLayout(GLSurfaceFormat::PIXEL_LAYOUT_RGBA); - return InitializeGLSurfaceWithFormat( - new GLSurfaceOSMesa(format, size), format); case kGLImplementationDesktopGL: case kGLImplementationDesktopGLCoreProfile: case kGLImplementationAppleGL:
diff --git a/ui/gl/init/gl_factory_win.cc b/ui/gl/init/gl_factory_win.cc index 0cbf989..2fd24ae 100644 --- a/ui/gl/init/gl_factory_win.cc +++ b/ui/gl/init/gl_factory_win.cc
@@ -8,7 +8,6 @@ #include "base/trace_event/trace_event.h" #include "ui/gl/gl_context.h" #include "ui/gl/gl_context_egl.h" -#include "ui/gl/gl_context_osmesa.h" #include "ui/gl/gl_context_stub.h" #include "ui/gl/gl_context_wgl.h" #include "ui/gl/gl_egl_api_implementation.h" @@ -16,8 +15,6 @@ #include "ui/gl/gl_share_group.h" #include "ui/gl/gl_surface.h" #include "ui/gl/gl_surface_egl.h" -#include "ui/gl/gl_surface_osmesa.h" -#include "ui/gl/gl_surface_osmesa_win.h" #include "ui/gl/gl_surface_stub.h" #include "ui/gl/gl_surface_wgl.h" #include "ui/gl/gl_wgl_api_implementation.h" @@ -30,7 +27,6 @@ std::vector<GLImplementation> impls; impls.push_back(kGLImplementationEGLGLES2); impls.push_back(kGLImplementationDesktopGL); - impls.push_back(kGLImplementationOSMesaGL); impls.push_back(kGLImplementationSwiftShaderGL); return impls; } @@ -51,9 +47,6 @@ const GLContextAttribs& attribs) { TRACE_EVENT0("gpu", "gl::init::CreateGLContext"); switch (GetGLImplementation()) { - case kGLImplementationOSMesaGL: - return InitializeGLContext(new GLContextOSMesa(share_group), - compatible_surface, attribs); case kGLImplementationSwiftShaderGL: case kGLImplementationEGLGLES2: return InitializeGLContext(new GLContextEGL(share_group), @@ -78,9 +71,6 @@ scoped_refptr<GLSurface> CreateViewGLSurface(gfx::AcceleratedWidget window) { TRACE_EVENT0("gpu", "gl::init::CreateViewGLSurface"); switch (GetGLImplementation()) { - case kGLImplementationOSMesaGL: - return InitializeGLSurface( - base::MakeRefCounted<GLSurfaceOSMesaWin>(window)); case kGLImplementationSwiftShaderGL: case kGLImplementationEGLGLES2: { DCHECK_NE(window, gfx::kNullAcceleratedWidget); @@ -103,10 +93,6 @@ const gfx::Size& size, GLSurfaceFormat format) { TRACE_EVENT0("gpu", "gl::init::CreateOffscreenGLSurface"); switch (GetGLImplementation()) { - case kGLImplementationOSMesaGL: - format.SetDefaultPixelLayout(GLSurfaceFormat::PIXEL_LAYOUT_RGBA); - return InitializeGLSurfaceWithFormat( - new GLSurfaceOSMesa(format, size), format); case kGLImplementationSwiftShaderGL: case kGLImplementationEGLGLES2: if (GLSurfaceEGL::IsEGLSurfacelessContextSupported() && @@ -139,7 +125,6 @@ SetDisabledExtensionsEGL(disabled_extensions); break; case kGLImplementationSwiftShaderGL: - case kGLImplementationOSMesaGL: case kGLImplementationMockGL: case kGLImplementationStubGL: break; @@ -157,7 +142,6 @@ case kGLImplementationEGLGLES2: return InitializeExtensionSettingsOneOffEGL(); case kGLImplementationSwiftShaderGL: - case kGLImplementationOSMesaGL: case kGLImplementationMockGL: case kGLImplementationStubGL: return true;
diff --git a/ui/gl/init/gl_factory_x11.cc b/ui/gl/init/gl_factory_x11.cc index b55fe76b..4a09c1c 100644 --- a/ui/gl/init/gl_factory_x11.cc +++ b/ui/gl/init/gl_factory_x11.cc
@@ -8,7 +8,6 @@ #include "ui/gl/gl_context.h" #include "ui/gl/gl_context_egl.h" #include "ui/gl/gl_context_glx.h" -#include "ui/gl/gl_context_osmesa.h" #include "ui/gl/gl_context_stub.h" #include "ui/gl/gl_egl_api_implementation.h" #include "ui/gl/gl_glx_api_implementation.h" @@ -19,8 +18,6 @@ #include "ui/gl/gl_surface_egl_x11.h" #include "ui/gl/gl_surface_glx.h" #include "ui/gl/gl_surface_glx_x11.h" -#include "ui/gl/gl_surface_osmesa.h" -#include "ui/gl/gl_surface_osmesa_x11.h" #include "ui/gl/gl_surface_stub.h" namespace gl { @@ -30,7 +27,6 @@ std::vector<GLImplementation> impls; impls.push_back(kGLImplementationDesktopGL); impls.push_back(kGLImplementationEGLGLES2); - impls.push_back(kGLImplementationOSMesaGL); impls.push_back(kGLImplementationSwiftShaderGL); return impls; } @@ -51,9 +47,6 @@ const GLContextAttribs& attribs) { TRACE_EVENT0("gpu", "gl::init::CreateGLContext"); switch (GetGLImplementation()) { - case kGLImplementationOSMesaGL: - return InitializeGLContext(new GLContextOSMesa(share_group), - compatible_surface, attribs); case kGLImplementationDesktopGL: return InitializeGLContext(new GLContextGLX(share_group), compatible_surface, attribs); @@ -78,8 +71,6 @@ scoped_refptr<GLSurface> CreateViewGLSurface(gfx::AcceleratedWidget window) { TRACE_EVENT0("gpu", "gl::init::CreateViewGLSurface"); switch (GetGLImplementation()) { - case kGLImplementationOSMesaGL: - return InitializeGLSurface(new GLSurfaceOSMesaX11(window)); case kGLImplementationDesktopGL: return InitializeGLSurface(new GLSurfaceGLXX11(window)); case kGLImplementationSwiftShaderGL: @@ -99,10 +90,6 @@ const gfx::Size& size, GLSurfaceFormat format) { TRACE_EVENT0("gpu", "gl::init::CreateOffscreenGLSurface"); switch (GetGLImplementation()) { - case kGLImplementationOSMesaGL: - format.SetDefaultPixelLayout(GLSurfaceFormat::PIXEL_LAYOUT_RGBA); - return InitializeGLSurfaceWithFormat( - new GLSurfaceOSMesa(format, size), format); case kGLImplementationDesktopGL: return InitializeGLSurfaceWithFormat( new UnmappedNativeViewGLSurfaceGLX(size), format); @@ -135,7 +122,6 @@ SetDisabledExtensionsEGL(disabled_extensions); break; case kGLImplementationSwiftShaderGL: - case kGLImplementationOSMesaGL: case kGLImplementationMockGL: case kGLImplementationStubGL: break; @@ -153,7 +139,6 @@ case kGLImplementationEGLGLES2: return InitializeExtensionSettingsOneOffEGL(); case kGLImplementationSwiftShaderGL: - case kGLImplementationOSMesaGL: case kGLImplementationMockGL: case kGLImplementationStubGL: return true;
diff --git a/ui/gl/init/gl_initializer_android.cc b/ui/gl/init/gl_initializer_android.cc index 3981015d..46ec1c7 100644 --- a/ui/gl/init/gl_initializer_android.cc +++ b/ui/gl/init/gl_initializer_android.cc
@@ -13,8 +13,6 @@ #include "ui/gl/gl_egl_api_implementation.h" #include "ui/gl/gl_features.h" #include "ui/gl/gl_gl_api_implementation.h" -#include "ui/gl/gl_implementation_osmesa.h" -#include "ui/gl/gl_osmesa_api_implementation.h" #include "ui/gl/gl_surface_egl.h" #if BUILDFLAG(USE_STATIC_ANGLE) @@ -89,8 +87,6 @@ switch (implementation) { case kGLImplementationEGLGLES2: return InitializeStaticEGLInternal(); - case kGLImplementationOSMesaGL: - return InitializeStaticGLBindingsOSMesaGL(); case kGLImplementationMockGL: case kGLImplementationStubGL: SetGLImplementation(implementation); @@ -106,14 +102,12 @@ void InitializeDebugGLBindings() { InitializeDebugGLBindingsEGL(); InitializeDebugGLBindingsGL(); - InitializeDebugGLBindingsOSMESA(); } void ShutdownGLPlatform() { GLSurfaceEGL::ShutdownOneOff(); ClearBindingsEGL(); ClearBindingsGL(); - ClearBindingsOSMESA(); } } // namespace init
diff --git a/ui/gl/init/gl_initializer_mac.cc b/ui/gl/init/gl_initializer_mac.cc index f4789eb..a89aad20 100644 --- a/ui/gl/init/gl_initializer_mac.cc +++ b/ui/gl/init/gl_initializer_mac.cc
@@ -21,7 +21,6 @@ #include "ui/gl/gl_features.h" #include "ui/gl/gl_gl_api_implementation.h" #include "ui/gl/gl_implementation.h" -#include "ui/gl/gl_osmesa_api_implementation.h" #include "ui/gl/gl_surface.h" #include "ui/gl/gpu_switching_manager.h" @@ -76,49 +75,6 @@ return true; } -bool InitializeStaticOSMesaInternal() { - // osmesa.so is located in the build directory. This code path is only - // valid in a developer build environment. - base::FilePath exe_path; - if (!base::PathService::Get(base::FILE_EXE, &exe_path)) { - LOG(ERROR) << "PathService::Get failed."; - return false; - } - base::FilePath bundle_path = base::mac::GetAppBundlePath(exe_path); - // Some unit test targets depend on osmesa but aren't built as app - // bundles. In that case, the .so is next to the executable. - if (bundle_path.empty()) - bundle_path = exe_path; - base::FilePath build_dir_path = bundle_path.DirName(); - base::FilePath osmesa_path = build_dir_path.Append("osmesa.so"); - - // When using OSMesa, just use OSMesaGetProcAddress to find entry points. - base::NativeLibrary library = base::LoadNativeLibrary(osmesa_path, NULL); - if (!library) { - LOG(ERROR) << "osmesa.so not found at " << osmesa_path.value(); - return false; - } - - GLGetProcAddressProc get_proc_address = - reinterpret_cast<GLGetProcAddressProc>( - base::GetFunctionPointerFromNativeLibrary(library, - "OSMesaGetProcAddress")); - if (!get_proc_address) { - LOG(ERROR) << "OSMesaGetProcAddress not found."; - base::UnloadNativeLibrary(library); - return false; - } - - SetGLGetProcAddressProc(get_proc_address); - AddGLNativeLibrary(library); - SetGLImplementation(kGLImplementationOSMesaGL); - - InitializeStaticGLBindingsGL(); - InitializeStaticGLBindingsOSMESA(); - - return true; -} - bool InitializeStaticCGLInternal(GLImplementation implementation) { base::NativeLibrary library = base::LoadNativeLibrary(base::FilePath(kOpenGLFrameworkPath), nullptr); @@ -245,8 +201,6 @@ base::ThreadRestrictions::ScopedAllowIO allow_io; switch (implementation) { - case kGLImplementationOSMesaGL: - return InitializeStaticOSMesaInternal(); case kGLImplementationDesktopGL: case kGLImplementationDesktopGLCoreProfile: case kGLImplementationAppleGL: @@ -270,12 +224,10 @@ void InitializeDebugGLBindings() { InitializeDebugGLBindingsGL(); - InitializeDebugGLBindingsOSMESA(); } void ShutdownGLPlatform() { ClearBindingsGL(); - ClearBindingsOSMESA(); } } // namespace init
diff --git a/ui/gl/init/gl_initializer_win.cc b/ui/gl/init/gl_initializer_win.cc index 2ac954a..54cc8c3 100644 --- a/ui/gl/init/gl_initializer_win.cc +++ b/ui/gl/init/gl_initializer_win.cc
@@ -21,7 +21,6 @@ #include "ui/gl/gl_egl_api_implementation.h" #include "ui/gl/gl_features.h" #include "ui/gl/gl_gl_api_implementation.h" -#include "ui/gl/gl_osmesa_api_implementation.h" #include "ui/gl/gl_surface_egl.h" #include "ui/gl/gl_surface_wgl.h" #include "ui/gl/gl_wgl_api_implementation.h" @@ -48,41 +47,6 @@ return true; } -bool InitializeStaticOSMesaInternal() { - base::FilePath module_path; - base::PathService::Get(base::DIR_MODULE, &module_path); - base::NativeLibrary library = - base::LoadNativeLibrary(module_path.Append(L"osmesa.dll"), nullptr); - if (!library) { - base::PathService::Get(base::DIR_EXE, &module_path); - library = - base::LoadNativeLibrary(module_path.Append(L"osmesa.dll"), nullptr); - if (!library) { - DVLOG(1) << "osmesa.dll not found"; - return false; - } - } - - GLGetProcAddressProc get_proc_address = - reinterpret_cast<GLGetProcAddressProc>( - base::GetFunctionPointerFromNativeLibrary(library, - "OSMesaGetProcAddress")); - if (!get_proc_address) { - DLOG(ERROR) << "OSMesaGetProcAddress not found."; - base::UnloadNativeLibrary(library); - return false; - } - - SetGLGetProcAddressProc(get_proc_address); - AddGLNativeLibrary(library); - SetGLImplementation(kGLImplementationOSMesaGL); - - InitializeStaticGLBindingsGL(); - InitializeStaticGLBindingsOSMESA(); - - return true; -} - bool InitializeStaticEGLInternal(GLImplementation implementation) { base::FilePath module_path; if (!base::PathService::Get(base::DIR_MODULE, &module_path)) @@ -233,7 +197,6 @@ return false; } break; - case kGLImplementationOSMesaGL: case kGLImplementationMockGL: case kGLImplementationStubGL: break; @@ -256,8 +219,6 @@ base::ThreadRestrictions::ScopedAllowIO allow_io; switch (implementation) { - case kGLImplementationOSMesaGL: - return InitializeStaticOSMesaInternal(); case kGLImplementationSwiftShaderGL: case kGLImplementationEGLGLES2: return InitializeStaticEGLInternal(implementation); @@ -278,7 +239,6 @@ void InitializeDebugGLBindings() { InitializeDebugGLBindingsEGL(); InitializeDebugGLBindingsGL(); - InitializeDebugGLBindingsOSMESA(); InitializeDebugGLBindingsWGL(); } @@ -286,7 +246,6 @@ GLSurfaceEGL::ShutdownOneOff(); ClearBindingsEGL(); ClearBindingsGL(); - ClearBindingsOSMESA(); ClearBindingsWGL(); }
diff --git a/ui/gl/init/gl_initializer_x11.cc b/ui/gl/init/gl_initializer_x11.cc index 6a8fe0f5..0a97a38 100644 --- a/ui/gl/init/gl_initializer_x11.cc +++ b/ui/gl/init/gl_initializer_x11.cc
@@ -17,11 +17,8 @@ #include "ui/gl/gl_features.h" #include "ui/gl/gl_gl_api_implementation.h" #include "ui/gl/gl_glx_api_implementation.h" -#include "ui/gl/gl_implementation_osmesa.h" -#include "ui/gl/gl_osmesa_api_implementation.h" #include "ui/gl/gl_surface_egl.h" #include "ui/gl/gl_surface_glx.h" -#include "ui/gl/gl_surface_osmesa_x11.h" #include "ui/gl/gl_switches.h" namespace gl { @@ -144,13 +141,6 @@ } // namespace bool InitializeGLOneOffPlatform() { - const base::CommandLine* command_line = - base::CommandLine::ForCurrentProcess(); - if (command_line->HasSwitch(switches::kHeadless) && - command_line->GetSwitchValueASCII(switches::kUseGL) == - kGLImplementationOSMesaName) - return true; - switch (GetGLImplementation()) { case kGLImplementationDesktopGL: if (!GLSurfaceGLX::InitializeOneOff()) { @@ -158,12 +148,6 @@ return false; } return true; - case kGLImplementationOSMesaGL: - if (!GLSurfaceOSMesaX11::InitializeOneOff()) { - LOG(ERROR) << "GLSurfaceOSMesaX11::InitializeOneOff failed."; - return false; - } - return true; case kGLImplementationSwiftShaderGL: case kGLImplementationEGLGLES2: if (!GLSurfaceEGL::InitializeOneOff(gfx::GetXDisplay())) { @@ -189,8 +173,6 @@ base::ThreadRestrictions::ScopedAllowIO allow_io; switch (implementation) { - case kGLImplementationOSMesaGL: - return InitializeStaticGLBindingsOSMesaGL(); case kGLImplementationDesktopGL: return InitializeStaticGLXInternal(); case kGLImplementationSwiftShaderGL: @@ -212,7 +194,6 @@ InitializeDebugGLBindingsEGL(); InitializeDebugGLBindingsGL(); InitializeDebugGLBindingsGLX(); - InitializeDebugGLBindingsOSMESA(); } void ShutdownGLPlatform() { @@ -221,7 +202,6 @@ ClearBindingsEGL(); ClearBindingsGL(); ClearBindingsGLX(); - ClearBindingsOSMESA(); } } // namespace init
diff --git a/ui/gl/test/gl_surface_test_support.cc b/ui/gl/test/gl_surface_test_support.cc index 2293d3a..50f0bef 100644 --- a/ui/gl/test/gl_surface_test_support.cc +++ b/ui/gl/test/gl_surface_test_support.cc
@@ -53,7 +53,7 @@ #if defined(OS_ANDROID) || defined(OS_FUCHSIA) // On Android we always use hardware GL. - // On Fuchsia, we always use fake GL, but we don't want Mesa or other software + // On Fuchsia, we always use fake GL, but we don't want any software // GLs, but rather a stub implementation. use_software_gl = false; #endif
diff --git a/ui/gl/test/gl_surface_test_support.h b/ui/gl/test/gl_surface_test_support.h index 747ffd1c..90d3754 100644 --- a/ui/gl/test/gl_surface_test_support.h +++ b/ui/gl/test/gl_surface_test_support.h
@@ -14,7 +14,7 @@ static void InitializeOneOff(); static void InitializeNoExtensionsOneOff(); static void InitializeOneOffImplementation(GLImplementation impl, - bool fallback_to_osmesa); + bool fallback_to_swiftshader); static void InitializeOneOffWithMockBindings(); static void InitializeOneOffWithStubBindings(); };
diff --git a/ui/message_center/BUILD.gn b/ui/message_center/BUILD.gn index 1799333..9924381 100644 --- a/ui/message_center/BUILD.gn +++ b/ui/message_center/BUILD.gn
@@ -230,7 +230,7 @@ ] data_deps = [ - "//third_party/mesa:osmesa", + "//third_party/mesa_headers", "//ui/resources:ui_test_pak_data", ]
diff --git a/ui/message_center/views/message_popup_collection.h b/ui/message_center/views/message_popup_collection.h index 2b05ea8d..36337a57 100644 --- a/ui/message_center/views/message_popup_collection.h +++ b/ui/message_center/views/message_popup_collection.h
@@ -5,6 +5,8 @@ #ifndef UI_MESSAGE_CENTER_VIEWS_MESSAGE_POPUP_COLLECTION_H_ #define UI_MESSAGE_CENTER_VIEWS_MESSAGE_POPUP_COLLECTION_H_ +#include <memory> + #include "ui/gfx/animation/animation_delegate.h" #include "ui/gfx/geometry/rect.h" #include "ui/message_center/message_center_export.h"
diff --git a/ui/ozone/BUILD.gn b/ui/ozone/BUILD.gn index 3363568..b35403f1 100644 --- a/ui/ozone/BUILD.gn +++ b/ui/ozone/BUILD.gn
@@ -91,6 +91,7 @@ "public/overlay_surface_candidate.h", "public/ozone_switches.cc", "public/ozone_switches.h", + "public/platform_screen.h", "public/surface_factory_ozone.cc", "public/surface_factory_ozone.h", "public/surface_ozone_canvas.h", @@ -104,6 +105,7 @@ "//gpu/vulkan:buildflags", "//ipc", "//skia", + "//ui/display", "//ui/display/types", "//ui/display/util", "//ui/events",
diff --git a/ui/ozone/common/BUILD.gn b/ui/ozone/common/BUILD.gn index dfb125b..5ad1bd3 100644 --- a/ui/ozone/common/BUILD.gn +++ b/ui/ozone/common/BUILD.gn
@@ -13,8 +13,6 @@ "egl_util.h", "gl_ozone_egl.cc", "gl_ozone_egl.h", - "gl_ozone_osmesa.cc", - "gl_ozone_osmesa.h", "gl_surface_egl_readback.cc", "gl_surface_egl_readback.h", "gpu/ozone_gpu_message_generator.cc", @@ -37,7 +35,7 @@ ] data_deps = [ - "//third_party/mesa:osmesa", + "//third_party/mesa_headers", ] visibility = [ "//ui/ozone/platform/*" ]
diff --git a/ui/ozone/common/gl_ozone_osmesa.cc b/ui/ozone/common/gl_ozone_osmesa.cc deleted file mode 100644 index 395995d..0000000 --- a/ui/ozone/common/gl_ozone_osmesa.cc +++ /dev/null
@@ -1,80 +0,0 @@ -// Copyright 2017 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -#include "ui/ozone/common/gl_ozone_osmesa.h" - -#include "build/build_config.h" -#include "ui/gl/gl_bindings.h" -#include "ui/gl/gl_context.h" -#include "ui/gl/gl_context_osmesa.h" -#include "ui/gl/gl_gl_api_implementation.h" -#include "ui/gl/gl_implementation_osmesa.h" -#include "ui/gl/gl_osmesa_api_implementation.h" -#include "ui/gl/gl_share_group.h" -#include "ui/gl/gl_surface.h" -#include "ui/gl/gl_surface_format.h" -#include "ui/gl/gl_surface_osmesa.h" - -namespace ui { - -GLOzoneOSMesa::GLOzoneOSMesa() {} - -GLOzoneOSMesa::~GLOzoneOSMesa() {} - -bool GLOzoneOSMesa::InitializeGLOneOffPlatform() { - return true; -} - -bool GLOzoneOSMesa::InitializeStaticGLBindings( - gl::GLImplementation implementation) { - return gl::InitializeStaticGLBindingsOSMesaGL(); -} - -void GLOzoneOSMesa::InitializeDebugGLBindings() { - gl::InitializeDebugGLBindingsGL(); - gl::InitializeDebugGLBindingsOSMESA(); -} - -void GLOzoneOSMesa::SetDisabledExtensionsPlatform( - const std::string& disabled_extensions) {} - -bool GLOzoneOSMesa::InitializeExtensionSettingsOneOffPlatform() { - return true; -} - -void GLOzoneOSMesa::ShutdownGL() { - gl::ClearBindingsGL(); - gl::ClearBindingsOSMESA(); -} - -bool GLOzoneOSMesa::GetGLWindowSystemBindingInfo( - gl::GLWindowSystemBindingInfo* info) { - return false; -} - -scoped_refptr<gl::GLContext> GLOzoneOSMesa::CreateGLContext( - gl::GLShareGroup* share_group, - gl::GLSurface* compatible_surface, - const gl::GLContextAttribs& attribs) { - return gl::InitializeGLContext(new gl::GLContextOSMesa(share_group), - compatible_surface, attribs); -} - -scoped_refptr<gl::GLSurface> GLOzoneOSMesa::CreateViewGLSurface( - gfx::AcceleratedWidget window) { - return gl::InitializeGLSurface(new gl::GLSurfaceOSMesaHeadless()); -} - -scoped_refptr<gl::GLSurface> GLOzoneOSMesa::CreateSurfacelessViewGLSurface( - gfx::AcceleratedWidget window) { - return nullptr; -} - -scoped_refptr<gl::GLSurface> GLOzoneOSMesa::CreateOffscreenGLSurface( - const gfx::Size& size) { - return gl::InitializeGLSurface( - new gl::GLSurfaceOSMesa(gl::GLSurfaceFormat::PIXEL_LAYOUT_BGRA, size)); -} - -} // namespace ui
diff --git a/ui/ozone/common/gl_ozone_osmesa.h b/ui/ozone/common/gl_ozone_osmesa.h deleted file mode 100644 index 3b09ba9..0000000 --- a/ui/ozone/common/gl_ozone_osmesa.h +++ /dev/null
@@ -1,47 +0,0 @@ -// Copyright 2017 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -#ifndef UI_OZONE_COMMON_GL_OZONE_OSMESA_H_ -#define UI_OZONE_COMMON_GL_OZONE_OSMESA_H_ - -#include "base/macros.h" -#include "ui/gl/gl_implementation.h" -#include "ui/ozone/public/gl_ozone.h" - -namespace ui { - -// GLOzone implementation that uses OSMesa. -class GLOzoneOSMesa : public GLOzone { - public: - GLOzoneOSMesa(); - ~GLOzoneOSMesa() override; - - // GLOzone: - bool InitializeGLOneOffPlatform() override; - bool InitializeStaticGLBindings(gl::GLImplementation implementation) override; - void InitializeDebugGLBindings() override; - void SetDisabledExtensionsPlatform( - const std::string& disabled_extensions) override; - bool InitializeExtensionSettingsOneOffPlatform() override; - void ShutdownGL() override; - bool GetGLWindowSystemBindingInfo( - gl::GLWindowSystemBindingInfo* info) override; - scoped_refptr<gl::GLContext> CreateGLContext( - gl::GLShareGroup* share_group, - gl::GLSurface* compatible_surface, - const gl::GLContextAttribs& attribs) override; - scoped_refptr<gl::GLSurface> CreateViewGLSurface( - gfx::AcceleratedWidget window) override; - scoped_refptr<gl::GLSurface> CreateSurfacelessViewGLSurface( - gfx::AcceleratedWidget window) override; - scoped_refptr<gl::GLSurface> CreateOffscreenGLSurface( - const gfx::Size& size) override; - - private: - DISALLOW_COPY_AND_ASSIGN(GLOzoneOSMesa); -}; - -} // namespace ui - -#endif // UI_OZONE_COMMON_GL_OZONE_OSMESA_H_
diff --git a/ui/ozone/gl/BUILD.gn b/ui/ozone/gl/BUILD.gn index 78b0e52..8c7b4f40 100644 --- a/ui/ozone/gl/BUILD.gn +++ b/ui/ozone/gl/BUILD.gn
@@ -19,6 +19,6 @@ ] data_deps = [ - "//third_party/mesa:osmesa", + "//third_party/mesa_headers", ] }
diff --git a/ui/ozone/platform/cast/surface_factory_cast.cc b/ui/ozone/platform/cast/surface_factory_cast.cc index 510d435..18093f9 100644 --- a/ui/ozone/platform/cast/surface_factory_cast.cc +++ b/ui/ozone/platform/cast/surface_factory_cast.cc
@@ -13,7 +13,6 @@ #include "ui/gfx/geometry/rect.h" #include "ui/gfx/native_pixmap.h" #include "ui/gfx/vsync_provider.h" -#include "ui/ozone/common/gl_ozone_osmesa.h" #include "ui/ozone/public/surface_ozone_canvas.h" namespace ui { @@ -85,8 +84,7 @@ SurfaceFactoryCast::SurfaceFactoryCast() : SurfaceFactoryCast(nullptr) {} SurfaceFactoryCast::SurfaceFactoryCast( - std::unique_ptr<chromecast::CastEglPlatform> egl_platform) - : osmesa_implementation_(std::make_unique<GLOzoneOSMesa>()) { + std::unique_ptr<chromecast::CastEglPlatform> egl_platform) { if (egl_platform) { egl_implementation_ = std::make_unique<GLOzoneEglCast>(std::move(egl_platform)); @@ -100,7 +98,6 @@ std::vector<gl::GLImplementation> impls; if (egl_implementation_) impls.push_back(gl::kGLImplementationEGLGLES2); - impls.push_back(gl::kGLImplementationOSMesaGL); return impls; } @@ -108,8 +105,6 @@ switch (implementation) { case gl::kGLImplementationEGLGLES2: return egl_implementation_.get(); - case gl::kGLImplementationOSMesaGL: - return osmesa_implementation_.get(); default: return nullptr; }
diff --git a/ui/ozone/platform/cast/surface_factory_cast.h b/ui/ozone/platform/cast/surface_factory_cast.h index c63f38b..9c5315e 100644 --- a/ui/ozone/platform/cast/surface_factory_cast.h +++ b/ui/ozone/platform/cast/surface_factory_cast.h
@@ -41,7 +41,6 @@ private: std::unique_ptr<GLOzoneEglCast> egl_implementation_; - std::unique_ptr<GLOzone> osmesa_implementation_; DISALLOW_COPY_AND_ASSIGN(SurfaceFactoryCast); };
diff --git a/ui/ozone/platform/drm/gpu/gbm_surface_factory.cc b/ui/ozone/platform/drm/gpu/gbm_surface_factory.cc index 3b748ce..fc0315c3 100644 --- a/ui/ozone/platform/drm/gpu/gbm_surface_factory.cc +++ b/ui/ozone/platform/drm/gpu/gbm_surface_factory.cc
@@ -16,7 +16,6 @@ #include "ui/gl/gl_surface_egl.h" #include "ui/ozone/common/egl_util.h" #include "ui/ozone/common/gl_ozone_egl.h" -#include "ui/ozone/common/gl_ozone_osmesa.h" #include "ui/ozone/platform/drm/common/drm_util.h" #include "ui/ozone/platform/drm/gpu/drm_thread_proxy.h" #include "ui/ozone/platform/drm/gpu/drm_window_proxy.h" @@ -103,7 +102,6 @@ GbmSurfaceFactory::GbmSurfaceFactory(DrmThreadProxy* drm_thread_proxy) : egl_implementation_( std::make_unique<GLOzoneEGLGbm>(this, drm_thread_proxy)), - osmesa_implementation_(std::make_unique<GLOzoneOSMesa>()), drm_thread_proxy_(drm_thread_proxy) {} GbmSurfaceFactory::~GbmSurfaceFactory() { @@ -133,7 +131,6 @@ GbmSurfaceFactory::GetAllowedGLImplementations() { DCHECK(thread_checker_.CalledOnValidThread()); return std::vector<gl::GLImplementation>{gl::kGLImplementationEGLGLES2, - gl::kGLImplementationOSMesaGL, gl::kGLImplementationSwiftShaderGL}; } @@ -142,8 +139,6 @@ case gl::kGLImplementationEGLGLES2: case gl::kGLImplementationSwiftShaderGL: return egl_implementation_.get(); - case gl::kGLImplementationOSMesaGL: - return osmesa_implementation_.get(); default: return nullptr; }
diff --git a/ui/ozone/platform/drm/gpu/gbm_surface_factory.h b/ui/ozone/platform/drm/gpu/gbm_surface_factory.h index 469e939a..17ade46 100644 --- a/ui/ozone/platform/drm/gpu/gbm_surface_factory.h +++ b/ui/ozone/platform/drm/gpu/gbm_surface_factory.h
@@ -84,7 +84,6 @@ const gfx::NativePixmapHandle& handle); std::unique_ptr<GLOzone> egl_implementation_; - std::unique_ptr<GLOzone> osmesa_implementation_; base::ThreadChecker thread_checker_;
diff --git a/ui/ozone/platform/headless/BUILD.gn b/ui/ozone/platform/headless/BUILD.gn index 500d15e6..046dec9 100644 --- a/ui/ozone/platform/headless/BUILD.gn +++ b/ui/ozone/platform/headless/BUILD.gn
@@ -8,8 +8,6 @@ sources = [ "client_native_pixmap_factory_headless.cc", "client_native_pixmap_factory_headless.h", - "gl_surface_osmesa_png.cc", - "gl_surface_osmesa_png.h", "headless_native_display_delegate.cc", "headless_native_display_delegate.h", "headless_surface_factory.cc",
diff --git a/ui/ozone/platform/headless/gl_surface_osmesa_png.cc b/ui/ozone/platform/headless/gl_surface_osmesa_png.cc deleted file mode 100644 index 911fc8c..0000000 --- a/ui/ozone/platform/headless/gl_surface_osmesa_png.cc +++ /dev/null
@@ -1,78 +0,0 @@ -// Copyright 2017 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -#include "ui/ozone/platform/headless/gl_surface_osmesa_png.h" - -#include <vector> - -#include "base/files/file_util.h" -#include "base/task/post_task.h" -#include "base/threading/thread_task_runner_handle.h" -#include "ui/gfx/codec/png_codec.h" - -namespace ui { -namespace { - -constexpr int kBytesPerPixelBGRA = 4; - -void WritePngToFile(const base::FilePath& path, - std::vector<unsigned char> png_data) { - DCHECK(!path.empty()); - base::WriteFile(path, reinterpret_cast<const char*>(png_data.data()), - png_data.size()); -} - -} // namespace - -GLSurfaceOSMesaPng::GLSurfaceOSMesaPng(base::FilePath output_path) - : GLSurfaceOSMesa( - gl::GLSurfaceFormat(gl::GLSurfaceFormat::PIXEL_LAYOUT_BGRA), - gfx::Size(1, 1)), - output_path_(output_path) {} - -bool GLSurfaceOSMesaPng::IsOffscreen() { - return false; -} - -gfx::SwapResult GLSurfaceOSMesaPng::SwapBuffers( - const PresentationCallback& callback) { - if (!output_path_.empty()) - WriteBufferToPng(); - - base::ThreadTaskRunnerHandle::Get()->PostTask( - FROM_HERE, - base::BindOnce(callback, gfx::PresentationFeedback(base::TimeTicks::Now(), - base::TimeDelta(), - 0 /* flags */))); - return gfx::SwapResult::SWAP_ACK; -} - -bool GLSurfaceOSMesaPng::SupportsPresentationCallback() { - return true; -} - -GLSurfaceOSMesaPng::~GLSurfaceOSMesaPng() { - Destroy(); -} - -void GLSurfaceOSMesaPng::WriteBufferToPng() { - // TODO(crbug.com/783792): Writing the PNG to a file won't work with the GPU - // sandbox. This will produce no output unless --no-sandbox is used. Make this - // work with a file handle passed from browser process and possibly change - // output to be video. - gfx::Size size = GetSize(); - std::vector<unsigned char> png_data; - if (gfx::PNGCodec::Encode(static_cast<unsigned char*>(GetHandle()), - gfx::PNGCodec::FORMAT_BGRA, size, - size.width() * kBytesPerPixelBGRA, - false /* discard_transparency */, - std::vector<gfx::PNGCodec::Comment>(), &png_data)) { - base::PostTaskWithTraits( - FROM_HERE, - {base::MayBlock(), base::TaskShutdownBehavior::CONTINUE_ON_SHUTDOWN}, - base::BindOnce(&WritePngToFile, output_path_, std::move(png_data))); - } -} - -} // namespace ui
diff --git a/ui/ozone/platform/headless/gl_surface_osmesa_png.h b/ui/ozone/platform/headless/gl_surface_osmesa_png.h deleted file mode 100644 index dc124841f..0000000 --- a/ui/ozone/platform/headless/gl_surface_osmesa_png.h +++ /dev/null
@@ -1,38 +0,0 @@ -// Copyright 2017 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -#ifndef UI_OZONE_PLATFORM_HEADLESS_GL_SURFACE_OSMESA_PNG_H_ -#define UI_OZONE_PLATFORM_HEADLESS_GL_SURFACE_OSMESA_PNG_H_ - -#include "base/files/file_path.h" -#include "base/macros.h" -#include "ui/gl/gl_surface_osmesa.h" - -namespace ui { - -class GLSurfaceOSMesaPng : public gl::GLSurfaceOSMesa { - public: - explicit GLSurfaceOSMesaPng(base::FilePath output_path); - - // gl::GLSurfaceOSMesa: - bool IsOffscreen() override; - gfx::SwapResult SwapBuffers(const PresentationCallback& callback) override; - bool SupportsPresentationCallback() override; - - private: - ~GLSurfaceOSMesaPng() override; - - // Write contents of buffer out to PNG file at |output_path_|. - void WriteBufferToPng(); - - // If not empty then buffer contents will be written out to this location on - // swap. - base::FilePath output_path_; - - DISALLOW_COPY_AND_ASSIGN(GLSurfaceOSMesaPng); -}; - -} // namespace ui - -#endif // UI_OZONE_PLATFORM_HEADLESS_GL_SURFACE_OSMESA_PNG_H_
diff --git a/ui/ozone/platform/headless/headless_surface_factory.cc b/ui/ozone/platform/headless/headless_surface_factory.cc index 6108464..0c1e1187 100644 --- a/ui/ozone/platform/headless/headless_surface_factory.cc +++ b/ui/ozone/platform/headless/headless_surface_factory.cc
@@ -20,9 +20,7 @@ #include "ui/gl/gl_surface_egl.h" #include "ui/ozone/common/egl_util.h" #include "ui/ozone/common/gl_ozone_egl.h" -#include "ui/ozone/common/gl_ozone_osmesa.h" #include "ui/ozone/common/gl_surface_egl_readback.h" -#include "ui/ozone/platform/headless/gl_surface_osmesa_png.h" #include "ui/ozone/platform/headless/headless_window.h" #include "ui/ozone/platform/headless/headless_window_manager.h" #include "ui/ozone/public/surface_ozone_canvas.h" @@ -111,26 +109,6 @@ DISALLOW_COPY_AND_ASSIGN(TestPixmap); }; -class GLOzoneOSMesaHeadless : public GLOzoneOSMesa { - public: - explicit GLOzoneOSMesaHeadless(HeadlessSurfaceFactory* surface_factory) - : surface_factory_(surface_factory) {} - - ~GLOzoneOSMesaHeadless() override = default; - - // GLOzone: - scoped_refptr<gl::GLSurface> CreateViewGLSurface( - gfx::AcceleratedWidget window) override { - return gl::InitializeGLSurface( - new GLSurfaceOSMesaPng(surface_factory_->GetPathForWidget(window))); - } - - private: - HeadlessSurfaceFactory* const surface_factory_; - - DISALLOW_COPY_AND_ASSIGN(GLOzoneOSMesaHeadless); -}; - class GLOzoneEGLHeadless : public GLOzoneEGL { public: GLOzoneEGLHeadless() = default; @@ -166,7 +144,6 @@ HeadlessSurfaceFactory::HeadlessSurfaceFactory(base::FilePath base_path) : base_path_(base_path), - osmesa_implementation_(std::make_unique<GLOzoneOSMesaHeadless>(this)), swiftshader_implementation_(std::make_unique<GLOzoneEGLHeadless>()) { CheckBasePath(); } @@ -190,15 +167,12 @@ std::vector<gl::GLImplementation> HeadlessSurfaceFactory::GetAllowedGLImplementations() { - return std::vector<gl::GLImplementation>{gl::kGLImplementationOSMesaGL, - gl::kGLImplementationSwiftShaderGL}; + return std::vector<gl::GLImplementation>{gl::kGLImplementationSwiftShaderGL}; } GLOzone* HeadlessSurfaceFactory::GetGLOzone( gl::GLImplementation implementation) { switch (implementation) { - case gl::kGLImplementationOSMesaGL: - return osmesa_implementation_.get(); case gl::kGLImplementationEGLGLES2: case gl::kGLImplementationSwiftShaderGL: return swiftshader_implementation_.get();
diff --git a/ui/ozone/platform/headless/headless_surface_factory.h b/ui/ozone/platform/headless/headless_surface_factory.h index 21302a48..c803f50 100644 --- a/ui/ozone/platform/headless/headless_surface_factory.h +++ b/ui/ozone/platform/headless/headless_surface_factory.h
@@ -39,7 +39,6 @@ // Base path for window output PNGs. base::FilePath base_path_; - std::unique_ptr<GLOzone> osmesa_implementation_; std::unique_ptr<GLOzone> swiftshader_implementation_; DISALLOW_COPY_AND_ASSIGN(HeadlessSurfaceFactory);
diff --git a/ui/ozone/platform/scenic/BUILD.gn b/ui/ozone/platform/scenic/BUILD.gn index 62f2375..4ba23191 100644 --- a/ui/ozone/platform/scenic/BUILD.gn +++ b/ui/ozone/platform/scenic/BUILD.gn
@@ -10,6 +10,8 @@ "client_native_pixmap_factory_scenic.h", "ozone_platform_scenic.cc", "ozone_platform_scenic.h", + "scenic_screen.cc", + "scenic_screen.h", "scenic_session.cc", "scenic_session.h", "scenic_surface_factory.cc",
diff --git a/ui/ozone/platform/scenic/ozone_platform_scenic.cc b/ui/ozone/platform/scenic/ozone_platform_scenic.cc index a43368d..5bb85d465 100644 --- a/ui/ozone/platform/scenic/ozone_platform_scenic.cc +++ b/ui/ozone/platform/scenic/ozone_platform_scenic.cc
@@ -97,6 +97,10 @@ return std::make_unique<display::FakeDisplayDelegate>(); } + std::unique_ptr<PlatformScreen> CreateScreen() override { + return window_manager_.CreateScreen(); + } + void InitializeUI(const InitParams& params) override { if (!PlatformEventSource::GetInstance()) platform_event_source_ = std::make_unique<ScenicPlatformEventSource>();
diff --git a/ui/ozone/platform/scenic/scenic_screen.cc b/ui/ozone/platform/scenic/scenic_screen.cc new file mode 100644 index 0000000..632bfad0 --- /dev/null +++ b/ui/ozone/platform/scenic/scenic_screen.cc
@@ -0,0 +1,120 @@ +// 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 "ui/ozone/platform/scenic/scenic_screen.h" + +#include "ui/display/display.h" +#include "ui/display/display_observer.h" +#include "ui/gfx/geometry/point.h" + +namespace ui { + +ScenicScreen::ScenicScreen() : weak_factory_(this) {} + +ScenicScreen::~ScenicScreen() = default; + +void ScenicScreen::OnWindowAdded(int32_t window_id) { + // Ensure that |window_id| is greater than the id of all other windows. This + // allows pushing the new entry to the end of the list while keeping it + // sorted. + DCHECK(displays_.empty() || (window_id > displays_.back().id())); + displays_.push_back(display::Display(window_id)); + + for (auto& observer : observers_) + observer.OnDisplayAdded(displays_.back()); +} + +void ScenicScreen::OnWindowRemoved(int32_t window_id) { + auto it = FindDisplayById(window_id); + DCHECK(it != displays_.end()); + display::Display removed_display = *it; + displays_.erase(it); + + for (auto& observer : observers_) + observer.OnDisplayAdded(removed_display); +} + +void ScenicScreen::OnWindowMetrics(int32_t window_id, + float device_pixel_ratio) { + DisplayVector::const_iterator const_it = FindDisplayById(window_id); + DisplayVector::iterator it = + displays_.begin() + (const_it - displays_.begin()); + + DCHECK(it != displays_.end()); + it->set_device_scale_factor(device_pixel_ratio); + + for (auto& observer : observers_) { + observer.OnDisplayMetricsChanged( + *it, display::DisplayObserver::DISPLAY_METRIC_DEVICE_SCALE_FACTOR); + } +} + +base::WeakPtr<ScenicScreen> ScenicScreen::GetWeakPtr() { + return weak_factory_.GetWeakPtr(); +} + +const std::vector<display::Display>& ScenicScreen::GetAllDisplays() const { + return displays_; +} + +display::Display ScenicScreen::GetPrimaryDisplay() const { + // There is no primary display. + return display::Display(); +} + +display::Display ScenicScreen::GetDisplayForAcceleratedWidget( + gfx::AcceleratedWidget widget) const { + auto display_it = FindDisplayById(widget); + if (display_it == displays_.end()) { + NOTREACHED(); + return display::Display(); + } + + return *display_it; +} + +gfx::Point ScenicScreen::GetCursorScreenPoint() const { + NOTIMPLEMENTED(); + return gfx::Point(); +} + +gfx::AcceleratedWidget ScenicScreen::GetAcceleratedWidgetAtScreenPoint( + const gfx::Point& point) const { + NOTIMPLEMENTED(); + return gfx::kNullAcceleratedWidget; +} + +display::Display ScenicScreen::GetDisplayNearestPoint( + const gfx::Point& point) const { + NOTREACHED(); + return display::Display(); +} + +display::Display ScenicScreen::GetDisplayMatching( + const gfx::Rect& match_rect) const { + NOTREACHED(); + return display::Display(); +} + +void ScenicScreen::AddObserver(display::DisplayObserver* observer) { + observers_.AddObserver(observer); +} + +void ScenicScreen::RemoveObserver(display::DisplayObserver* observer) { + observers_.RemoveObserver(observer); +} + +ScenicScreen::DisplayVector::const_iterator ScenicScreen::FindDisplayById( + int32_t id) const { + DisplayVector::const_iterator r = + std::lower_bound(displays_.begin(), displays_.end(), id, + [](const display::Display& display, int32_t id) { + return display.id() < id; + }); + if (r != displays_.end() && r->id() == id) + return r; + return displays_.end(); +} + +} // namespace ui
diff --git a/ui/ozone/platform/scenic/scenic_screen.h b/ui/ozone/platform/scenic/scenic_screen.h new file mode 100644 index 0000000..a8da1cc --- /dev/null +++ b/ui/ozone/platform/scenic/scenic_screen.h
@@ -0,0 +1,59 @@ +// 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 UI_OZONE_PLATFORM_SCENIC_SCENIC_SCREEN_H_ +#define UI_OZONE_PLATFORM_SCENIC_SCENIC_SCREEN_H_ + +#include "base/macros.h" +#include "base/memory/weak_ptr.h" +#include "base/observer_list.h" +#include "ui/ozone/public/ozone_platform.h" +#include "ui/ozone/public/platform_screen.h" + +namespace ui { + +// A PlatformScreen implementation for Scenic. +class ScenicScreen : public PlatformScreen { + public: + ScenicScreen(); + ~ScenicScreen() override; + + void OnWindowAdded(int32_t window_id); + void OnWindowRemoved(int32_t window_id); + void OnWindowMetrics(int32_t window_id, float device_pixel_ratio); + + base::WeakPtr<ScenicScreen> GetWeakPtr(); + + // display::Screen implementation. + const std::vector<display::Display>& GetAllDisplays() const override; + display::Display GetPrimaryDisplay() const override; + display::Display GetDisplayForAcceleratedWidget( + gfx::AcceleratedWidget widget) const override; + gfx::Point GetCursorScreenPoint() const override; + gfx::AcceleratedWidget GetAcceleratedWidgetAtScreenPoint( + const gfx::Point& point) const override; + display::Display GetDisplayNearestPoint( + const gfx::Point& point) const override; + display::Display GetDisplayMatching( + const gfx::Rect& match_rect) const override; + void AddObserver(display::DisplayObserver* observer) override; + void RemoveObserver(display::DisplayObserver* observer) override; + + private: + using DisplayVector = std::vector<display::Display>; + + DisplayVector::const_iterator FindDisplayById(int32_t id) const; + + DisplayVector displays_; + + base::ObserverList<display::DisplayObserver> observers_; + + base::WeakPtrFactory<ScenicScreen> weak_factory_; + + DISALLOW_COPY_AND_ASSIGN(ScenicScreen); +}; + +} // namespace ui + +#endif // UI_OZONE_PLATFORM_SCENIC_SCENIC_SCREEN_H_
diff --git a/ui/ozone/platform/scenic/scenic_window.cc b/ui/ozone/platform/scenic/scenic_window.cc index eb96043c..c9ffffa 100644 --- a/ui/ozone/platform/scenic/scenic_window.cc +++ b/ui/ozone/platform/scenic/scenic_window.cc
@@ -220,21 +220,18 @@ continue; auto& metrics = event.gfx().metrics(); - if (metrics.node_id == parent_node_id_) { - float new_device_pixel_ratio = - std::max(metrics.metrics.scale_x, metrics.metrics.scale_y); - if (device_pixel_ratio_ == 0.0) { - device_pixel_ratio_ = new_device_pixel_ratio; - if (!size_dips_.IsEmpty()) - UpdateSize(); - } else if (device_pixel_ratio_ != new_device_pixel_ratio) { - // Ozone currently doesn't support dynamic changes in - // device_pixel_ratio. - // TODO(crbug.com/850650): Update Ozone/Aura to allow DPI changes - // after OnAcceleratedWidgetAvailable(). - NOTIMPLEMENTED() << "Ignoring display metrics event."; - } - } + if (metrics.node_id != parent_node_id_) + continue; + + device_pixel_ratio_ = + std::max(metrics.metrics.scale_x, metrics.metrics.scale_y); + + ScenicScreen* screen = manager_->screen(); + if (screen) + screen->OnWindowMetrics(window_id_, device_pixel_ratio_); + + if (!size_dips_.IsEmpty()) + UpdateSize(); } }
diff --git a/ui/ozone/platform/scenic/scenic_window_manager.cc b/ui/ozone/platform/scenic/scenic_window_manager.cc index 76defc6..9db874b 100644 --- a/ui/ozone/platform/scenic/scenic_window_manager.cc +++ b/ui/ozone/platform/scenic/scenic_window_manager.cc
@@ -11,6 +11,13 @@ ScenicWindowManager::ScenicWindowManager() = default; ScenicWindowManager::~ScenicWindowManager() = default; +std::unique_ptr<PlatformScreen> ScenicWindowManager::CreateScreen() { + DCHECK(windows_.IsEmpty()); + auto screen = std::make_unique<ScenicScreen>(); + screen_ = screen->GetWeakPtr(); + return screen; +} + fuchsia::ui::viewsv1::ViewManager* ScenicWindowManager::GetViewManager() { if (!view_manager_) { view_manager_ = base::fuchsia::ComponentContext::GetDefault() @@ -32,13 +39,18 @@ } int32_t ScenicWindowManager::AddWindow(ScenicWindow* window) { - return windows_.Add(window); + int32_t id = windows_.Add(window); + if (screen_) + screen_->OnWindowAdded(id); + return id; } void ScenicWindowManager::RemoveWindow(int32_t window_id, ScenicWindow* window) { DCHECK_EQ(window, windows_.Lookup(window_id)); windows_.Remove(window_id); + if (screen_) + screen_->OnWindowRemoved(window_id); } ScenicWindow* ScenicWindowManager::GetWindow(int32_t window_id) {
diff --git a/ui/ozone/platform/scenic/scenic_window_manager.h b/ui/ozone/platform/scenic/scenic_window_manager.h index f78c14f39..e219ace 100644 --- a/ui/ozone/platform/scenic/scenic_window_manager.h +++ b/ui/ozone/platform/scenic/scenic_window_manager.h
@@ -15,6 +15,7 @@ #include "base/threading/thread_checker.h" #include "ui/gfx/native_widget_types.h" #include "ui/ozone/ozone_export.h" +#include "ui/ozone/platform/scenic/scenic_screen.h" #include "ui/ozone/public/surface_factory_ozone.h" namespace ui { @@ -33,6 +34,8 @@ ScenicWindowManager(); ~ScenicWindowManager(); + std::unique_ptr<PlatformScreen> CreateScreen(); + // ViewManager and Scenic services that are used by ScenicWindow. Both // interfaces are initialized lazily on the first call and they don't change // afterwards. ScenicWindowManager keeps the ownership. @@ -46,11 +49,15 @@ // Called by ScenicWindow destructor to unregister |window|. void RemoveWindow(int32_t window_id, ScenicWindow* window); + ScenicScreen* screen() { return screen_.get(); } + ScenicWindow* GetWindow(int32_t window_id); private: base::IDMap<ScenicWindow*> windows_; + base::WeakPtr<ScenicScreen> screen_; + fuchsia::ui::viewsv1::ViewManagerPtr view_manager_; fuchsia::ui::scenic::ScenicPtr scenic_;
diff --git a/ui/ozone/platform/wayland/wayland_surface_factory.cc b/ui/ozone/platform/wayland/wayland_surface_factory.cc index 83b4d6f4..6e9834e 100644 --- a/ui/ozone/platform/wayland/wayland_surface_factory.cc +++ b/ui/ozone/platform/wayland/wayland_surface_factory.cc
@@ -14,7 +14,6 @@ #include "ui/gfx/vsync_provider.h" #include "ui/ozone/common/egl_util.h" #include "ui/ozone/common/gl_ozone_egl.h" -#include "ui/ozone/common/gl_ozone_osmesa.h" #include "ui/ozone/platform/wayland/gl_surface_wayland.h" #include "ui/ozone/platform/wayland/wayland_connection.h" #include "ui/ozone/platform/wayland/wayland_object.h" @@ -186,8 +185,7 @@ } // namespace WaylandSurfaceFactory::WaylandSurfaceFactory(WaylandConnection* connection) - : connection_(connection), - osmesa_implementation_(std::make_unique<GLOzoneOSMesa>()) { + : connection_(connection) { if (connection_) egl_implementation_ = std::make_unique<GLOzoneEGLWayland>(connection_); } @@ -210,7 +208,6 @@ impls.push_back(gl::kGLImplementationEGLGLES2); impls.push_back(gl::kGLImplementationSwiftShaderGL); } - impls.push_back(gl::kGLImplementationOSMesaGL); return impls; } @@ -220,8 +217,6 @@ case gl::kGLImplementationEGLGLES2: case gl::kGLImplementationSwiftShaderGL: return egl_implementation_.get(); - case gl::kGLImplementationOSMesaGL: - return osmesa_implementation_.get(); default: return nullptr; }
diff --git a/ui/ozone/platform/wayland/wayland_surface_factory.h b/ui/ozone/platform/wayland/wayland_surface_factory.h index 3d3aac9..f320bc5 100644 --- a/ui/ozone/platform/wayland/wayland_surface_factory.h +++ b/ui/ozone/platform/wayland/wayland_surface_factory.h
@@ -38,7 +38,6 @@ private: WaylandConnection* connection_; std::unique_ptr<GLOzone> egl_implementation_; - std::unique_ptr<GLOzone> osmesa_implementation_; DISALLOW_COPY_AND_ASSIGN(WaylandSurfaceFactory); };
diff --git a/ui/ozone/platform/x11/x11_surface_factory.cc b/ui/ozone/platform/x11/x11_surface_factory.cc index 55cba8a1..74aa63ce 100644 --- a/ui/ozone/platform/x11/x11_surface_factory.cc +++ b/ui/ozone/platform/x11/x11_surface_factory.cc
@@ -10,7 +10,6 @@ #include "ui/gl/gl_surface_egl.h" #include "ui/ozone/common/egl_util.h" #include "ui/ozone/common/gl_ozone_egl.h" -#include "ui/ozone/common/gl_ozone_osmesa.h" #include "ui/ozone/platform/x11/gl_ozone_glx.h" #include "ui/ozone/platform/x11/gl_surface_egl_ozone_x11.h" #include "ui/ozone/platform/x11/gl_surface_egl_readback_x11.h" @@ -71,16 +70,15 @@ X11SurfaceFactory::X11SurfaceFactory() : glx_implementation_(std::make_unique<GLOzoneGLX>()), - egl_implementation_(std::make_unique<GLOzoneEGLX11>()), - osmesa_implementation_(std::make_unique<GLOzoneOSMesa>()) {} + egl_implementation_(std::make_unique<GLOzoneEGLX11>()) {} X11SurfaceFactory::~X11SurfaceFactory() {} std::vector<gl::GLImplementation> X11SurfaceFactory::GetAllowedGLImplementations() { - return std::vector<gl::GLImplementation>{ - gl::kGLImplementationDesktopGL, gl::kGLImplementationEGLGLES2, - gl::kGLImplementationOSMesaGL, gl::kGLImplementationSwiftShaderGL}; + return std::vector<gl::GLImplementation>{gl::kGLImplementationDesktopGL, + gl::kGLImplementationEGLGLES2, + gl::kGLImplementationSwiftShaderGL}; } GLOzone* X11SurfaceFactory::GetGLOzone(gl::GLImplementation implementation) { @@ -90,8 +88,6 @@ case gl::kGLImplementationEGLGLES2: case gl::kGLImplementationSwiftShaderGL: return egl_implementation_.get(); - case gl::kGLImplementationOSMesaGL: - return osmesa_implementation_.get(); default: return nullptr; }
diff --git a/ui/ozone/platform/x11/x11_surface_factory.h b/ui/ozone/platform/x11/x11_surface_factory.h index 13537327..d2674546 100644 --- a/ui/ozone/platform/x11/x11_surface_factory.h +++ b/ui/ozone/platform/x11/x11_surface_factory.h
@@ -33,7 +33,6 @@ private: std::unique_ptr<GLOzone> glx_implementation_; std::unique_ptr<GLOzone> egl_implementation_; - std::unique_ptr<GLOzone> osmesa_implementation_; DISALLOW_COPY_AND_ASSIGN(X11SurfaceFactory); };
diff --git a/ui/ozone/public/ozone_platform.cc b/ui/ozone/public/ozone_platform.cc index 1a731e2..b496a02 100644 --- a/ui/ozone/public/ozone_platform.cc +++ b/ui/ozone/public/ozone_platform.cc
@@ -7,9 +7,11 @@ #include "base/lazy_instance.h" #include "base/logging.h" #include "base/trace_event/trace_event.h" +#include "ui/display/screen.h" #include "ui/events/devices/device_data_manager.h" #include "ui/ozone/platform_object.h" #include "ui/ozone/platform_selection.h" +#include "ui/ozone/public/platform_screen.h" namespace ui { @@ -111,6 +113,10 @@ return nullptr; } +std::unique_ptr<PlatformScreen> OzonePlatform::CreateScreen() { + return nullptr; +} + const OzonePlatform::PlatformProperties& OzonePlatform::GetPlatformProperties() { return kDefaultPlatformProperties;
diff --git a/ui/ozone/public/ozone_platform.h b/ui/ozone/public/ozone_platform.h index c6073ed..ecf1fd85 100644 --- a/ui/ozone/public/ozone_platform.h +++ b/ui/ozone/public/ozone_platform.h
@@ -7,11 +7,13 @@ #include <memory> +#include "base/callback.h" #include "base/macros.h" #include "base/message_loop/message_loop.h" #include "services/service_manager/public/cpp/bind_source_info.h" #include "services/service_manager/public/cpp/binder_registry.h" #include "ui/events/system_input_injector.h" +#include "ui/gfx/native_widget_types.h" #include "ui/ozone/ozone_export.h" namespace display { @@ -32,6 +34,7 @@ class InputController; class GpuPlatformSupportHost; class OverlayManagerOzone; +class PlatformScreen; class PlatformWindow; class PlatformWindowDelegate; class SurfaceFactoryOzone; @@ -139,6 +142,7 @@ PlatformWindowInitProperties properties) = 0; virtual std::unique_ptr<display::NativeDisplayDelegate> CreateNativeDisplayDelegate() = 0; + virtual std::unique_ptr<PlatformScreen> CreateScreen(); // Returns a struct that contains configuration and requirements for the // current platform implementation.
diff --git a/ui/ozone/public/platform_screen.h b/ui/ozone/public/platform_screen.h new file mode 100644 index 0000000..d998751 --- /dev/null +++ b/ui/ozone/public/platform_screen.h
@@ -0,0 +1,59 @@ +// 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 UI_OZONE_PUBLIC_PLATFORM_SCREEN_H_ +#define UI_OZONE_PUBLIC_PLATFORM_SCREEN_H_ + +#include "ui/gfx/native_widget_types.h" + +namespace display { +class Display; +class DisplayObserver; +} // namespace display + +namespace gfx { +class Point; +class Rect; +} // namespace gfx + +namespace ui { + +class PlatformScreen { + public: + PlatformScreen() = default; + virtual ~PlatformScreen() = default; + + virtual const std::vector<display::Display>& GetAllDisplays() const = 0; + + virtual display::Display GetPrimaryDisplay() const = 0; + + // Returns Desktop objects that the |widget| belongs to. + virtual display::Display GetDisplayForAcceleratedWidget( + gfx::AcceleratedWidget widget) const = 0; + + // Returns cursor position in DIPs relative to the desktop. + virtual gfx::Point GetCursorScreenPoint() const = 0; + + virtual gfx::AcceleratedWidget GetAcceleratedWidgetAtScreenPoint( + const gfx::Point& point) const = 0; + + // Returns the display nearest the specified point. |point| must be in DIPs. + virtual display::Display GetDisplayNearestPoint( + const gfx::Point& point) const = 0; + + // Returns the display that most closely intersects the provided rect. + virtual display::Display GetDisplayMatching( + const gfx::Rect& match_rect) const = 0; + + // Adds/Removes display observers. + virtual void AddObserver(display::DisplayObserver* observer) = 0; + virtual void RemoveObserver(display::DisplayObserver* observer) = 0; + + private: + DISALLOW_COPY_AND_ASSIGN(PlatformScreen); +}; + +} // namespace ui + +#endif // UI_OZONE_PUBLIC_PLATFORM_SCREEN_H_ \ No newline at end of file
diff --git a/ui/touch_selection/BUILD.gn b/ui/touch_selection/BUILD.gn index 3fb63af..bd12693 100644 --- a/ui/touch_selection/BUILD.gn +++ b/ui/touch_selection/BUILD.gn
@@ -91,7 +91,7 @@ ] data_deps = [ - "//third_party/mesa:osmesa", + "//third_party/mesa_headers", ] }
diff --git a/ui/views/BUILD.gn b/ui/views/BUILD.gn index f7c6fb2..5472b21 100644 --- a/ui/views/BUILD.gn +++ b/ui/views/BUILD.gn
@@ -79,6 +79,7 @@ "border.h", "bubble/bubble_border.h", "bubble/bubble_dialog_delegate.h", + "bubble/bubble_dialog_delegate_view.h", "bubble/bubble_frame_view.h", "bubble/info_bubble.h", "bubble/tooltip_icon.h", @@ -274,7 +275,7 @@ "background.cc", "border.cc", "bubble/bubble_border.cc", - "bubble/bubble_dialog_delegate.cc", + "bubble/bubble_dialog_delegate_view.cc", "bubble/bubble_frame_view.cc", "bubble/info_bubble.cc", "bubble/tooltip_icon.cc", @@ -934,7 +935,7 @@ "animation/square_ink_drop_ripple_unittest.cc", "border_unittest.cc", "bubble/bubble_border_unittest.cc", - "bubble/bubble_dialog_delegate_unittest.cc", + "bubble/bubble_dialog_delegate_view_unittest.cc", "bubble/bubble_frame_view_unittest.cc", "cocoa/bridged_native_widget_unittest.mm", "cocoa/cocoa_mouse_capture_unittest.mm",
diff --git a/ui/views/bubble/bubble_dialog_delegate.h b/ui/views/bubble/bubble_dialog_delegate.h index d039304..4369916 100644 --- a/ui/views/bubble/bubble_dialog_delegate.h +++ b/ui/views/bubble/bubble_dialog_delegate.h
@@ -1,239 +1,12 @@ -// Copyright 2016 The Chromium Authors. All rights reserved. +// 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 UI_VIEWS_BUBBLE_BUBBLE_DIALOG_DELEGATE_H_ #define UI_VIEWS_BUBBLE_BUBBLE_DIALOG_DELEGATE_H_ -#include <memory> +// TEMPORARY - http://crbug.com/873422 +// Do not include bubble_dialog_delegate.h. +#include "ui/views/bubble/bubble_dialog_delegate_view.h" -#include "base/gtest_prod_util.h" -#include "base/macros.h" -#include "build/build_config.h" -#include "ui/accessibility/ax_enums.mojom.h" -#include "ui/views/bubble/bubble_border.h" -#include "ui/views/widget/widget.h" -#include "ui/views/widget/widget_observer.h" -#include "ui/views/window/dialog_delegate.h" - -#if defined(OS_MACOSX) -#include "ui/base/cocoa/bubble_closer.h" -#endif - -namespace gfx { -class Rect; -} - -namespace views { - -class BubbleFrameView; -class ViewTracker; - -// BubbleDialogDelegateView is a special DialogDelegateView for bubbles. -class VIEWS_EXPORT BubbleDialogDelegateView : public DialogDelegateView, - public WidgetObserver { - public: - // Internal class name. - static const char kViewClassName[]; - - enum class CloseReason { - DEACTIVATION, - CLOSE_BUTTON, - UNKNOWN, - }; - - ~BubbleDialogDelegateView() override; - - // Create and initialize the bubble Widget(s) with proper bounds. - static Widget* CreateBubble(BubbleDialogDelegateView* bubble_delegate); - - // DialogDelegateView: - BubbleDialogDelegateView* AsBubbleDialogDelegate() override; - bool ShouldShowCloseButton() const override; - ClientView* CreateClientView(Widget* widget) override; - NonClientFrameView* CreateNonClientFrameView(Widget* widget) override; - const char* GetClassName() const override; - - // WidgetObserver: - void OnWidgetDestroying(Widget* widget) override; - void OnWidgetVisibilityChanging(Widget* widget, bool visible) override; - void OnWidgetVisibilityChanged(Widget* widget, bool visible) override; - void OnWidgetActivationChanged(Widget* widget, bool active) override; - void OnWidgetBoundsChanged(Widget* widget, - const gfx::Rect& new_bounds) override; - - bool close_on_deactivate() const { return close_on_deactivate_; } - void set_close_on_deactivate(bool close) { close_on_deactivate_ = close; } - - View* GetAnchorView() const; - Widget* anchor_widget() const { return anchor_widget_; } - - // The anchor rect is used in the absence of an assigned anchor view. - const gfx::Rect& anchor_rect() const { return anchor_rect_; } - - BubbleBorder::Arrow arrow() const { return arrow_; } - void set_arrow(BubbleBorder::Arrow arrow) { arrow_ = arrow; } - - void set_mirror_arrow_in_rtl(bool mirror) { mirror_arrow_in_rtl_ = mirror; } - - BubbleBorder::Shadow shadow() const { return shadow_; } - void set_shadow(BubbleBorder::Shadow shadow) { shadow_ = shadow; } - - SkColor color() const { return color_; } - void set_color(SkColor color) { - color_ = color; - color_explicitly_set_ = true; - } - - void set_title_margins(const gfx::Insets& title_margins) { - title_margins_ = title_margins; - } - - // TODO(pbos): Remove by overriding Views::GetAnchorBoundsInScreen() instead. - // See https://crbug.com/869928. - const gfx::Insets& anchor_view_insets() const { return anchor_view_insets_; } - void set_anchor_view_insets(const gfx::Insets& i) { anchor_view_insets_ = i; } - - gfx::NativeView parent_window() const { return parent_window_; } - void set_parent_window(gfx::NativeView window) { parent_window_ = window; } - - bool accept_events() const { return accept_events_; } - void set_accept_events(bool accept_events) { accept_events_ = accept_events; } - - bool adjust_if_offscreen() const { return adjust_if_offscreen_; } - void set_adjust_if_offscreen(bool adjust) { adjust_if_offscreen_ = adjust; } - - // Get the arrow's anchor rect in screen space. - virtual gfx::Rect GetAnchorRect() const; - - // Allows delegates to provide custom parameters before widget initialization. - virtual void OnBeforeBubbleWidgetInit(Widget::InitParams* params, - Widget* widget) const; - - // Sets the content margins to a default picked for smaller bubbles. - void UseCompactMargins(); - - // Call this method when the anchor bounds have changed to reposition the - // bubble. The bubble is automatically repositioned when the anchor view - // bounds change as a result of the widget's bounds changing. - void OnAnchorBoundsChanged(); - - // If this is called, enables focus to traverse from the anchor view - // to inside this dialog and back out. This may become the default in - // the future. - void EnableFocusTraversalFromAnchorView(); - - protected: - BubbleDialogDelegateView(); - // |shadow| usually doesn't need to be explicitly set, just uses the default - // argument. Unless on Mac when the bubble needs to use Views base shadow, - // override it with suitable bubble border type. - BubbleDialogDelegateView( - View* anchor_view, - BubbleBorder::Arrow arrow, - BubbleBorder::Shadow shadow = BubbleBorder::DIALOG_SHADOW); - - // Get bubble bounds from the anchor rect and client view's preferred size. - virtual gfx::Rect GetBubbleBounds(); - - // DialogDelegateView: - ax::mojom::Role GetAccessibleWindowRole() const override; - - // Disallow overrides of GetMinimumSize and GetMaximumSize(). These would only - // be called by the FrameView, but the BubbleFrameView ignores these. Bubbles - // are not user-sizable and always size to their preferred size (plus any - // border / frame). - gfx::Size GetMinimumSize() const final; - gfx::Size GetMaximumSize() const final; - - void OnNativeThemeChanged(const ui::NativeTheme* theme) override; - - // Perform view initialization on the contents for bubble sizing. - virtual void Init(); - - // Sets the anchor view or rect and repositions the bubble. Note that if a - // valid view gets passed, the anchor rect will get ignored. If the view gets - // deleted, but no new view gets set, the last known anchor postion will get - // returned. - void SetAnchorView(View* anchor_view); - void SetAnchorRect(const gfx::Rect& rect); - - // Resize and potentially move the bubble to fit the content's preferred size. - virtual void SizeToContents(); - - BubbleFrameView* GetBubbleFrameView() const; - - private: - friend class BubbleBorderDelegate; - friend class BubbleWindowTargeter; - - FRIEND_TEST_ALL_PREFIXES(BubbleDelegateTest, CreateDelegate); - FRIEND_TEST_ALL_PREFIXES(BubbleDelegateTest, NonClientHitTest); - - // Update the bubble color from |theme|, unless it was explicitly set. - void UpdateColorsFromTheme(const ui::NativeTheme* theme); - - // Handles widget visibility changes. - void HandleVisibilityChanged(Widget* widget, bool visible); - - // Called when a deactivation is detected. - void OnDeactivate(); - - // When a bubble is visible, the anchor widget should always render as active. - void UpdateAnchorWidgetRenderState(bool visible); - - // A flag controlling bubble closure on deactivation. - bool close_on_deactivate_; - - // The view and widget to which this bubble is anchored. Since an anchor view - // can be deleted without notice, we store it in a ViewTracker and retrieve - // it from there. It will make sure that the view is still valid. - std::unique_ptr<ViewTracker> anchor_view_tracker_; - Widget* anchor_widget_; - - // The anchor rect used in the absence of an anchor view. - mutable gfx::Rect anchor_rect_; - - // The arrow's location on the bubble. - BubbleBorder::Arrow arrow_; - - // Automatically mirror the arrow in RTL layout. - bool mirror_arrow_in_rtl_; - - // Bubble border shadow to use. - BubbleBorder::Shadow shadow_; - - // The background color of the bubble; and flag for when it's explicitly set. - SkColor color_; - bool color_explicitly_set_; - - // The margins around the title. - // TODO(tapted): Investigate deleting this when MD is default. - gfx::Insets title_margins_; - - // Insets applied to the |anchor_view_| bounds. - gfx::Insets anchor_view_insets_; - - // Specifies whether the bubble (or its border) handles mouse events, etc. - bool accept_events_; - - // If true (defaults to true), the arrow may be mirrored and moved to fit the - // bubble on screen better. It would be a no-op if the bubble has no arrow. - bool adjust_if_offscreen_; - - // Parent native window of the bubble. - gfx::NativeView parent_window_; - -#if defined(OS_MACOSX) - // Special handler for close_on_deactivate() on Mac. Window (de)activation is - // suppressed by the WindowServer when clicking rapidly, so the bubble must - // monitor clicks as well for the desired behavior. - std::unique_ptr<ui::BubbleCloser> mac_bubble_closer_; -#endif - - DISALLOW_COPY_AND_ASSIGN(BubbleDialogDelegateView); -}; - -} // namespace views - -#endif // UI_VIEWS_BUBBLE_BUBBLE_DELEGATE2_H_ +#endif // UI_VIEWS_BUBBLE_BUBBLE_DIALOG_DELEGATE_H_
diff --git a/ui/views/bubble/bubble_dialog_delegate.cc b/ui/views/bubble/bubble_dialog_delegate_view.cc similarity index 99% rename from ui/views/bubble/bubble_dialog_delegate.cc rename to ui/views/bubble/bubble_dialog_delegate_view.cc index 80884e20..6349e776 100644 --- a/ui/views/bubble/bubble_dialog_delegate.cc +++ b/ui/views/bubble/bubble_dialog_delegate_view.cc
@@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "ui/views/bubble/bubble_dialog_delegate.h" +#include "ui/views/bubble/bubble_dialog_delegate_view.h" #include "base/metrics/histogram_macros.h" #include "build/build_config.h"
diff --git a/ui/views/bubble/bubble_dialog_delegate_view.h b/ui/views/bubble/bubble_dialog_delegate_view.h new file mode 100644 index 0000000..8b83610 --- /dev/null +++ b/ui/views/bubble/bubble_dialog_delegate_view.h
@@ -0,0 +1,239 @@ +// Copyright 2016 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#ifndef UI_VIEWS_BUBBLE_BUBBLE_DIALOG_DELEGATE_VIEW_H_ +#define UI_VIEWS_BUBBLE_BUBBLE_DIALOG_DELEGATE_VIEW_H_ + +#include <memory> + +#include "base/gtest_prod_util.h" +#include "base/macros.h" +#include "build/build_config.h" +#include "ui/accessibility/ax_enums.mojom.h" +#include "ui/views/bubble/bubble_border.h" +#include "ui/views/widget/widget.h" +#include "ui/views/widget/widget_observer.h" +#include "ui/views/window/dialog_delegate.h" + +#if defined(OS_MACOSX) +#include "ui/base/cocoa/bubble_closer.h" +#endif + +namespace gfx { +class Rect; +} + +namespace views { + +class BubbleFrameView; +class ViewTracker; + +// BubbleDialogDelegateView is a special DialogDelegateView for bubbles. +class VIEWS_EXPORT BubbleDialogDelegateView : public DialogDelegateView, + public WidgetObserver { + public: + // Internal class name. + static const char kViewClassName[]; + + enum class CloseReason { + DEACTIVATION, + CLOSE_BUTTON, + UNKNOWN, + }; + + ~BubbleDialogDelegateView() override; + + // Create and initialize the bubble Widget(s) with proper bounds. + static Widget* CreateBubble(BubbleDialogDelegateView* bubble_delegate); + + // DialogDelegateView: + BubbleDialogDelegateView* AsBubbleDialogDelegate() override; + bool ShouldShowCloseButton() const override; + ClientView* CreateClientView(Widget* widget) override; + NonClientFrameView* CreateNonClientFrameView(Widget* widget) override; + const char* GetClassName() const override; + + // WidgetObserver: + void OnWidgetDestroying(Widget* widget) override; + void OnWidgetVisibilityChanging(Widget* widget, bool visible) override; + void OnWidgetVisibilityChanged(Widget* widget, bool visible) override; + void OnWidgetActivationChanged(Widget* widget, bool active) override; + void OnWidgetBoundsChanged(Widget* widget, + const gfx::Rect& new_bounds) override; + + bool close_on_deactivate() const { return close_on_deactivate_; } + void set_close_on_deactivate(bool close) { close_on_deactivate_ = close; } + + View* GetAnchorView() const; + Widget* anchor_widget() const { return anchor_widget_; } + + // The anchor rect is used in the absence of an assigned anchor view. + const gfx::Rect& anchor_rect() const { return anchor_rect_; } + + BubbleBorder::Arrow arrow() const { return arrow_; } + void set_arrow(BubbleBorder::Arrow arrow) { arrow_ = arrow; } + + void set_mirror_arrow_in_rtl(bool mirror) { mirror_arrow_in_rtl_ = mirror; } + + BubbleBorder::Shadow shadow() const { return shadow_; } + void set_shadow(BubbleBorder::Shadow shadow) { shadow_ = shadow; } + + SkColor color() const { return color_; } + void set_color(SkColor color) { + color_ = color; + color_explicitly_set_ = true; + } + + void set_title_margins(const gfx::Insets& title_margins) { + title_margins_ = title_margins; + } + + // TODO(pbos): Remove by overriding Views::GetAnchorBoundsInScreen() instead. + // See https://crbug.com/869928. + const gfx::Insets& anchor_view_insets() const { return anchor_view_insets_; } + void set_anchor_view_insets(const gfx::Insets& i) { anchor_view_insets_ = i; } + + gfx::NativeView parent_window() const { return parent_window_; } + void set_parent_window(gfx::NativeView window) { parent_window_ = window; } + + bool accept_events() const { return accept_events_; } + void set_accept_events(bool accept_events) { accept_events_ = accept_events; } + + bool adjust_if_offscreen() const { return adjust_if_offscreen_; } + void set_adjust_if_offscreen(bool adjust) { adjust_if_offscreen_ = adjust; } + + // Get the arrow's anchor rect in screen space. + virtual gfx::Rect GetAnchorRect() const; + + // Allows delegates to provide custom parameters before widget initialization. + virtual void OnBeforeBubbleWidgetInit(Widget::InitParams* params, + Widget* widget) const; + + // Sets the content margins to a default picked for smaller bubbles. + void UseCompactMargins(); + + // Call this method when the anchor bounds have changed to reposition the + // bubble. The bubble is automatically repositioned when the anchor view + // bounds change as a result of the widget's bounds changing. + void OnAnchorBoundsChanged(); + + // If this is called, enables focus to traverse from the anchor view + // to inside this dialog and back out. This may become the default in + // the future. + void EnableFocusTraversalFromAnchorView(); + + protected: + BubbleDialogDelegateView(); + // |shadow| usually doesn't need to be explicitly set, just uses the default + // argument. Unless on Mac when the bubble needs to use Views base shadow, + // override it with suitable bubble border type. + BubbleDialogDelegateView( + View* anchor_view, + BubbleBorder::Arrow arrow, + BubbleBorder::Shadow shadow = BubbleBorder::DIALOG_SHADOW); + + // Get bubble bounds from the anchor rect and client view's preferred size. + virtual gfx::Rect GetBubbleBounds(); + + // DialogDelegateView: + ax::mojom::Role GetAccessibleWindowRole() const override; + + // Disallow overrides of GetMinimumSize and GetMaximumSize(). These would only + // be called by the FrameView, but the BubbleFrameView ignores these. Bubbles + // are not user-sizable and always size to their preferred size (plus any + // border / frame). + gfx::Size GetMinimumSize() const final; + gfx::Size GetMaximumSize() const final; + + void OnNativeThemeChanged(const ui::NativeTheme* theme) override; + + // Perform view initialization on the contents for bubble sizing. + virtual void Init(); + + // Sets the anchor view or rect and repositions the bubble. Note that if a + // valid view gets passed, the anchor rect will get ignored. If the view gets + // deleted, but no new view gets set, the last known anchor postion will get + // returned. + void SetAnchorView(View* anchor_view); + void SetAnchorRect(const gfx::Rect& rect); + + // Resize and potentially move the bubble to fit the content's preferred size. + virtual void SizeToContents(); + + BubbleFrameView* GetBubbleFrameView() const; + + private: + friend class BubbleBorderDelegate; + friend class BubbleWindowTargeter; + + FRIEND_TEST_ALL_PREFIXES(BubbleDelegateTest, CreateDelegate); + FRIEND_TEST_ALL_PREFIXES(BubbleDelegateTest, NonClientHitTest); + + // Update the bubble color from |theme|, unless it was explicitly set. + void UpdateColorsFromTheme(const ui::NativeTheme* theme); + + // Handles widget visibility changes. + void HandleVisibilityChanged(Widget* widget, bool visible); + + // Called when a deactivation is detected. + void OnDeactivate(); + + // When a bubble is visible, the anchor widget should always render as active. + void UpdateAnchorWidgetRenderState(bool visible); + + // A flag controlling bubble closure on deactivation. + bool close_on_deactivate_; + + // The view and widget to which this bubble is anchored. Since an anchor view + // can be deleted without notice, we store it in a ViewTracker and retrieve + // it from there. It will make sure that the view is still valid. + std::unique_ptr<ViewTracker> anchor_view_tracker_; + Widget* anchor_widget_; + + // The anchor rect used in the absence of an anchor view. + mutable gfx::Rect anchor_rect_; + + // The arrow's location on the bubble. + BubbleBorder::Arrow arrow_; + + // Automatically mirror the arrow in RTL layout. + bool mirror_arrow_in_rtl_; + + // Bubble border shadow to use. + BubbleBorder::Shadow shadow_; + + // The background color of the bubble; and flag for when it's explicitly set. + SkColor color_; + bool color_explicitly_set_; + + // The margins around the title. + // TODO(tapted): Investigate deleting this when MD is default. + gfx::Insets title_margins_; + + // Insets applied to the |anchor_view_| bounds. + gfx::Insets anchor_view_insets_; + + // Specifies whether the bubble (or its border) handles mouse events, etc. + bool accept_events_; + + // If true (defaults to true), the arrow may be mirrored and moved to fit the + // bubble on screen better. It would be a no-op if the bubble has no arrow. + bool adjust_if_offscreen_; + + // Parent native window of the bubble. + gfx::NativeView parent_window_; + +#if defined(OS_MACOSX) + // Special handler for close_on_deactivate() on Mac. Window (de)activation is + // suppressed by the WindowServer when clicking rapidly, so the bubble must + // monitor clicks as well for the desired behavior. + std::unique_ptr<ui::BubbleCloser> mac_bubble_closer_; +#endif + + DISALLOW_COPY_AND_ASSIGN(BubbleDialogDelegateView); +}; + +} // namespace views + +#endif // UI_VIEWS_BUBBLE_BUBBLE_DIALOG_DELEGATE_VIEW_H_
diff --git a/ui/views/bubble/bubble_dialog_delegate_unittest.cc b/ui/views/bubble/bubble_dialog_delegate_view_unittest.cc similarity index 94% rename from ui/views/bubble/bubble_dialog_delegate_unittest.cc rename to ui/views/bubble/bubble_dialog_delegate_view_unittest.cc index 7c2ff06..5de626a 100644 --- a/ui/views/bubble/bubble_dialog_delegate_unittest.cc +++ b/ui/views/bubble/bubble_dialog_delegate_view_unittest.cc
@@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "ui/views/bubble/bubble_dialog_delegate.h" +#include "ui/views/bubble/bubble_dialog_delegate_view.h" #include <stddef.h> @@ -86,10 +86,10 @@ DISALLOW_COPY_AND_ASSIGN(TestBubbleDialogDelegateView); }; -class BubbleDialogDelegateTest : public ViewsTestBase { +class BubbleDialogDelegateViewTest : public ViewsTestBase { public: - BubbleDialogDelegateTest() {} - ~BubbleDialogDelegateTest() override {} + BubbleDialogDelegateViewTest() {} + ~BubbleDialogDelegateViewTest() override {} // Creates and shows a test widget that owns its native widget. Widget* CreateTestWidget() { @@ -102,12 +102,12 @@ } private: - DISALLOW_COPY_AND_ASSIGN(BubbleDialogDelegateTest); + DISALLOW_COPY_AND_ASSIGN(BubbleDialogDelegateViewTest); }; } // namespace -TEST_F(BubbleDialogDelegateTest, CreateDelegate) { +TEST_F(BubbleDialogDelegateViewTest, CreateDelegate) { std::unique_ptr<Widget> anchor_widget(CreateTestWidget()); TestBubbleDialogDelegateView* bubble_delegate = new TestBubbleDialogDelegateView(anchor_widget->GetContentsView()); @@ -127,7 +127,7 @@ EXPECT_TRUE(bubble_observer.widget_closed()); } -TEST_F(BubbleDialogDelegateTest, MirrorArrowInRtl) { +TEST_F(BubbleDialogDelegateViewTest, MirrorArrowInRtl) { std::string default_locale = base::i18n::GetConfiguredLocale(); std::unique_ptr<Widget> anchor_widget(CreateTestWidget()); for (bool rtl : {false, true}) { @@ -146,7 +146,7 @@ base::i18n::SetICUDefaultLocale(default_locale); } -TEST_F(BubbleDialogDelegateTest, CloseAnchorWidget) { +TEST_F(BubbleDialogDelegateViewTest, CloseAnchorWidget) { std::unique_ptr<Widget> anchor_widget(CreateTestWidget()); BubbleDialogDelegateView* bubble_delegate = new TestBubbleDialogDelegateView(anchor_widget->GetContentsView()); @@ -177,7 +177,7 @@ // This test checks that the bubble delegate is capable to handle an early // destruction of the used anchor view. (Animations and delayed closure of the // bubble will call upon the anchor view to get its location). -TEST_F(BubbleDialogDelegateTest, CloseAnchorViewTest) { +TEST_F(BubbleDialogDelegateViewTest, CloseAnchorViewTest) { // Create an anchor widget and add a view to be used as an anchor view. std::unique_ptr<Widget> anchor_widget(CreateTestWidget()); std::unique_ptr<View> anchor_view(new View()); @@ -211,7 +211,7 @@ } // Testing that a move of the anchor view will lead to new bubble locations. -TEST_F(BubbleDialogDelegateTest, TestAnchorRectMovesWithViewTest) { +TEST_F(BubbleDialogDelegateViewTest, TestAnchorRectMovesWithViewTest) { // Create an anchor widget and add a view to be used as anchor view. std::unique_ptr<Widget> anchor_widget(CreateTestWidget()); TestBubbleDialogDelegateView* bubble_delegate = @@ -226,7 +226,7 @@ EXPECT_NE(view_rect.ToString(), view_rect_2.ToString()); } -TEST_F(BubbleDialogDelegateTest, ResetAnchorWidget) { +TEST_F(BubbleDialogDelegateViewTest, ResetAnchorWidget) { std::unique_ptr<Widget> anchor_widget(CreateTestWidget()); BubbleDialogDelegateView* bubble_delegate = new TestBubbleDialogDelegateView(anchor_widget->GetContentsView()); @@ -267,7 +267,7 @@ EXPECT_TRUE(bubble_observer.widget_closed()); } -TEST_F(BubbleDialogDelegateTest, InitiallyFocusedView) { +TEST_F(BubbleDialogDelegateViewTest, InitiallyFocusedView) { std::unique_ptr<Widget> anchor_widget(CreateTestWidget()); BubbleDialogDelegateView* bubble_delegate = new TestBubbleDialogDelegateView(anchor_widget->GetContentsView()); @@ -279,7 +279,7 @@ bubble_widget->CloseNow(); } -TEST_F(BubbleDialogDelegateTest, NonClientHitTest) { +TEST_F(BubbleDialogDelegateViewTest, NonClientHitTest) { std::unique_ptr<Widget> anchor_widget(CreateTestWidget()); TestBubbleDialogDelegateView* bubble_delegate = new TestBubbleDialogDelegateView(anchor_widget->GetContentsView()); @@ -300,7 +300,7 @@ } } -TEST_F(BubbleDialogDelegateTest, VisibleWhenAnchorWidgetBoundsChanged) { +TEST_F(BubbleDialogDelegateViewTest, VisibleWhenAnchorWidgetBoundsChanged) { std::unique_ptr<Widget> anchor_widget(CreateTestWidget()); BubbleDialogDelegateView* bubble_delegate = new TestBubbleDialogDelegateView(anchor_widget->GetContentsView()); @@ -317,7 +317,7 @@ // Test that setting WidgetDelegate::set_can_activate() to false makes the // widget created via BubbleDialogDelegateView::CreateBubble() not activatable. -TEST_F(BubbleDialogDelegateTest, NotActivatable) { +TEST_F(BubbleDialogDelegateViewTest, NotActivatable) { std::unique_ptr<Widget> anchor_widget(CreateTestWidget()); BubbleDialogDelegateView* bubble_delegate = new TestBubbleDialogDelegateView(anchor_widget->GetContentsView()); @@ -328,7 +328,7 @@ EXPECT_FALSE(bubble_widget->CanActivate()); } -TEST_F(BubbleDialogDelegateTest, CloseMethods) { +TEST_F(BubbleDialogDelegateViewTest, CloseMethods) { { std::unique_ptr<Widget> anchor_widget(CreateTestWidget()); BubbleDialogDelegateView* bubble_delegate = @@ -372,7 +372,7 @@ } } -TEST_F(BubbleDialogDelegateTest, CustomTitle) { +TEST_F(BubbleDialogDelegateViewTest, CustomTitle) { std::unique_ptr<Widget> anchor_widget(CreateTestWidget()); TestBubbleDialogDelegateView* bubble_delegate = new TestBubbleDialogDelegateView(anchor_widget->GetContentsView()); @@ -446,7 +446,7 @@ // Ensure the BubbleFrameView correctly resizes when the title is provided by a // StyledLabel. -TEST_F(BubbleDialogDelegateTest, StyledLabelTitle) { +TEST_F(BubbleDialogDelegateViewTest, StyledLabelTitle) { std::unique_ptr<Widget> anchor_widget(CreateTestWidget()); TestBubbleDialogDelegateView* bubble_delegate = new TestBubbleDialogDelegateView(anchor_widget->GetContentsView()); @@ -477,7 +477,7 @@ bubble_widget->GetWindowBoundsInScreen().height()); } -TEST_F(BubbleDialogDelegateTest, VisibleAnchorChanges) { +TEST_F(BubbleDialogDelegateViewTest, VisibleAnchorChanges) { std::unique_ptr<Widget> anchor_widget(CreateTestWidget()); TestBubbleDialogDelegateView* bubble_delegate = new TestBubbleDialogDelegateView(nullptr);
diff --git a/ui/views/bubble/bubble_frame_view.cc b/ui/views/bubble/bubble_frame_view.cc index 47028fc..f43e505 100644 --- a/ui/views/bubble/bubble_frame_view.cc +++ b/ui/views/bubble/bubble_frame_view.cc
@@ -24,7 +24,7 @@ #include "ui/resources/grit/ui_resources.h" #include "ui/strings/grit/ui_strings.h" #include "ui/views/bubble/bubble_border.h" -#include "ui/views/bubble/bubble_dialog_delegate.h" +#include "ui/views/bubble/bubble_dialog_delegate_view.h" #include "ui/views/controls/button/image_button.h" #include "ui/views/controls/button/image_button_factory.h" #include "ui/views/controls/image_view.h"
diff --git a/ui/views/bubble/bubble_frame_view.h b/ui/views/bubble/bubble_frame_view.h index 8dedcaf..eef3fda 100644 --- a/ui/views/bubble/bubble_frame_view.h +++ b/ui/views/bubble/bubble_frame_view.h
@@ -116,7 +116,7 @@ FRIEND_TEST_ALL_PREFIXES(BubbleFrameViewTest, RemoveFootnoteView); FRIEND_TEST_ALL_PREFIXES(BubbleFrameViewTest, LayoutWithIcon); FRIEND_TEST_ALL_PREFIXES(BubbleDelegateTest, CloseReasons); - FRIEND_TEST_ALL_PREFIXES(BubbleDialogDelegateTest, CloseMethods); + FRIEND_TEST_ALL_PREFIXES(BubbleDialogDelegateViewTest, CloseMethods); // Mirrors the bubble's arrow location on the |vertical| or horizontal axis, // if the generated window bounds don't fit in the monitor bounds.
diff --git a/ui/views/bubble/bubble_frame_view_unittest.cc b/ui/views/bubble/bubble_frame_view_unittest.cc index 36c307e6..0a060d2 100644 --- a/ui/views/bubble/bubble_frame_view_unittest.cc +++ b/ui/views/bubble/bubble_frame_view_unittest.cc
@@ -14,7 +14,7 @@ #include "ui/gfx/geometry/size.h" #include "ui/gfx/text_utils.h" #include "ui/views/bubble/bubble_border.h" -#include "ui/views/bubble/bubble_dialog_delegate.h" +#include "ui/views/bubble/bubble_dialog_delegate_view.h" #include "ui/views/controls/button/label_button.h" #include "ui/views/test/test_layout_provider.h" #include "ui/views/test/test_views.h"
diff --git a/ui/views/bubble/info_bubble.h b/ui/views/bubble/info_bubble.h index 1c0e5074..c1f092d 100644 --- a/ui/views/bubble/info_bubble.h +++ b/ui/views/bubble/info_bubble.h
@@ -8,7 +8,7 @@ #include "base/compiler_specific.h" #include "base/macros.h" #include "base/strings/string16.h" -#include "ui/views/bubble/bubble_dialog_delegate.h" +#include "ui/views/bubble/bubble_dialog_delegate_view.h" namespace views {
diff --git a/ui/views/bubble/tray_bubble_view.h b/ui/views/bubble/tray_bubble_view.h index 346641e..5ef44978 100644 --- a/ui/views/bubble/tray_bubble_view.h +++ b/ui/views/bubble/tray_bubble_view.h
@@ -12,7 +12,7 @@ #include "ui/accessibility/ax_enums.mojom.h" #include "ui/events/event.h" #include "ui/gfx/native_widget_types.h" -#include "ui/views/bubble/bubble_dialog_delegate.h" +#include "ui/views/bubble/bubble_dialog_delegate_view.h" #include "ui/views/mouse_watcher.h" #include "ui/views/views_export.h"
diff --git a/ui/views/controls/button/checkbox.cc b/ui/views/controls/button/checkbox.cc index b0387e69..1038a13f 100644 --- a/ui/views/controls/button/checkbox.cc +++ b/ui/views/controls/button/checkbox.cc
@@ -41,7 +41,6 @@ set_request_focus_on_press(false); SetInkDropMode(InkDropMode::ON); set_has_ink_drop_action_on_click(true); - focus_ring_ = FocusRing::Install(this); // Limit the checkbox height to match the legacy appearance. const gfx::Size preferred_size(LabelButton::CalculatePreferredSize()); @@ -138,8 +137,8 @@ void Checkbox::Layout() { LabelButton::Layout(); - if (focus_ring_ && !image()->bounds().IsEmpty()) - focus_ring_->SetPath(GetFocusRingPath()); + if (focus_ring() && !image()->bounds().IsEmpty()) + focus_ring()->SetPath(GetFocusRingPath()); } SkPath Checkbox::GetFocusRingPath() const {
diff --git a/ui/views/controls/button/checkbox.h b/ui/views/controls/button/checkbox.h index db6e630..d2b6f12e 100644 --- a/ui/views/controls/button/checkbox.h +++ b/ui/views/controls/button/checkbox.h
@@ -84,9 +84,6 @@ // The unique id for the associated label's accessible object. int32_t label_ax_id_; - // The focus ring to use for this Checkbox. - std::unique_ptr<FocusRing> focus_ring_; - DISALLOW_COPY_AND_ASSIGN(Checkbox); };
diff --git a/ui/views/controls/menu/menu_pre_target_handler.cc b/ui/views/controls/menu/menu_pre_target_handler.cc index 9f9dd94..1ea390e 100644 --- a/ui/views/controls/menu/menu_pre_target_handler.cc +++ b/ui/views/controls/menu/menu_pre_target_handler.cc
@@ -23,7 +23,7 @@ MenuPreTargetHandler::MenuPreTargetHandler(MenuController* controller, Widget* owner) : controller_(controller), root_(GetOwnerRootWindow(owner)) { - aura::Env::GetInstanceDontCreate()->AddPreTargetHandler( + aura::Env::GetInstance()->AddPreTargetHandler( this, ui::EventTarget::Priority::kSystem); if (root_) { wm::GetActivationClient(root_)->AddObserver(this); @@ -32,7 +32,7 @@ } MenuPreTargetHandler::~MenuPreTargetHandler() { - aura::Env::GetInstanceDontCreate()->RemovePreTargetHandler(this); + aura::Env::GetInstance()->RemovePreTargetHandler(this); Cleanup(); }
diff --git a/ui/views/examples/bubble_example.cc b/ui/views/examples/bubble_example.cc index 3437ab2..a93f6c4 100644 --- a/ui/views/examples/bubble_example.cc +++ b/ui/views/examples/bubble_example.cc
@@ -7,7 +7,7 @@ #include "base/macros.h" #include "base/strings/utf_string_conversions.h" #include "ui/gfx/geometry/insets.h" -#include "ui/views/bubble/bubble_dialog_delegate.h" +#include "ui/views/bubble/bubble_dialog_delegate_view.h" #include "ui/views/controls/button/label_button.h" #include "ui/views/controls/label.h" #include "ui/views/layout/box_layout.h"
diff --git a/ui/views/examples/dialog_example.cc b/ui/views/examples/dialog_example.cc index e10f2fa..7b5ce6b7 100644 --- a/ui/views/examples/dialog_example.cc +++ b/ui/views/examples/dialog_example.cc
@@ -6,7 +6,7 @@ #include "base/macros.h" #include "base/strings/utf_string_conversions.h" -#include "ui/views/bubble/bubble_dialog_delegate.h" +#include "ui/views/bubble/bubble_dialog_delegate_view.h" #include "ui/views/controls/button/checkbox.h" #include "ui/views/controls/button/label_button.h" #include "ui/views/controls/button/md_text_button.h"
diff --git a/ui/views/focus/focus_manager_unittest.cc b/ui/views/focus/focus_manager_unittest.cc index 5e7c7a6..ed29e917 100644 --- a/ui/views/focus/focus_manager_unittest.cc +++ b/ui/views/focus/focus_manager_unittest.cc
@@ -17,7 +17,7 @@ #include "ui/base/accelerators/test_accelerator_target.h" #include "ui/events/keycodes/keyboard_codes.h" #include "ui/views/accessible_pane_view.h" -#include "ui/views/bubble/bubble_dialog_delegate.h" +#include "ui/views/bubble/bubble_dialog_delegate_view.h" #include "ui/views/focus/focus_manager_delegate.h" #include "ui/views/focus/focus_manager_factory.h" #include "ui/views/focus/widget_focus_manager.h"
diff --git a/ui/views/focus/focus_search.cc b/ui/views/focus/focus_search.cc index 4c33f0b..c0e33176 100644 --- a/ui/views/focus/focus_search.cc +++ b/ui/views/focus/focus_search.cc
@@ -5,7 +5,7 @@ #include "ui/views/focus/focus_search.h" #include "base/logging.h" -#include "ui/views/bubble/bubble_dialog_delegate.h" +#include "ui/views/bubble/bubble_dialog_delegate_view.h" #include "ui/views/focus/focus_manager.h" #include "ui/views/view.h" #include "ui/views/view_properties.h"
diff --git a/ui/views/mus/mus_client.cc b/ui/views/mus/mus_client.cc index a493643..edccaae 100644 --- a/ui/views/mus/mus_client.cc +++ b/ui/views/mus/mus_client.cc
@@ -85,16 +85,6 @@ cursor_factory_ozone_ = std::make_unique<ui::CursorDataFactoryOzone>(); #endif - scoped_refptr<base::SingleThreadTaskRunner> io_task_runner = - params.io_task_runner; - if (!io_task_runner) { - 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(); - } - property_converter_ = std::make_unique<aura::PropertyConverter>(); property_converter_->RegisterPrimitiveProperty( ::wm::kShadowElevationKey, @@ -107,10 +97,9 @@ service_manager::Connector* connector = params.connector; if (!params.window_tree_client) { - DCHECK(io_task_runner); owned_window_tree_client_ = aura::WindowTreeClient::CreateForWindowTreeFactory( - connector, this, true, std::move(io_task_runner)); + connector, this, true, std::move(params.io_task_runner)); window_tree_client_ = owned_window_tree_client_.get(); aura::Env::GetInstance()->SetWindowTreeClient(window_tree_client_); } else {
diff --git a/ui/views/mus/remote_view/remote_view_host.cc b/ui/views/mus/remote_view/remote_view_host.cc index c5f9e57..a203d2b 100644 --- a/ui/views/mus/remote_view/remote_view_host.cc +++ b/ui/views/mus/remote_view/remote_view_host.cc
@@ -22,7 +22,7 @@ int embed_flags, EmbedCallback callback) { // Only works with mus. - DCHECK_EQ(aura::Env::Mode::MUS, aura::Env::GetInstanceDontCreate()->mode()); + DCHECK_EQ(aura::Env::Mode::MUS, aura::Env::GetInstance()->mode()); embed_token_ = embed_token; embed_flags_ = embed_flags;
diff --git a/ui/views/touchui/touch_selection_menu_runner_views.cc b/ui/views/touchui/touch_selection_menu_runner_views.cc index df2048df..7a99a8f 100644 --- a/ui/views/touchui/touch_selection_menu_runner_views.cc +++ b/ui/views/touchui/touch_selection_menu_runner_views.cc
@@ -18,7 +18,7 @@ #include "ui/gfx/geometry/size.h" #include "ui/gfx/text_utils.h" #include "ui/strings/grit/ui_strings.h" -#include "ui/views/bubble/bubble_dialog_delegate.h" +#include "ui/views/bubble/bubble_dialog_delegate_view.h" #include "ui/views/controls/button/button.h" #include "ui/views/controls/button/label_button.h" #include "ui/views/layout/box_layout.h"
diff --git a/ui/views/view_properties.cc b/ui/views/view_properties.cc index 40547e6e..e55acc0 100644 --- a/ui/views/view_properties.cc +++ b/ui/views/view_properties.cc
@@ -6,7 +6,7 @@ #include "ui/base/hit_test.h" #include "ui/gfx/geometry/insets.h" -#include "ui/views/bubble/bubble_dialog_delegate.h" +#include "ui/views/bubble/bubble_dialog_delegate_view.h" #if !defined(USE_AURA) // aura_constants.cc also declared the bool and int[32_t]
diff --git a/ui/views/views_test_suite.cc b/ui/views/views_test_suite.cc index bd46fca..e579a7d 100644 --- a/ui/views/views_test_suite.cc +++ b/ui/views/views_test_suite.cc
@@ -45,10 +45,6 @@ base::TestSuite::Initialize(); gl::GLSurfaceTestSupport::InitializeOneOff(); -#if defined(OS_MACOSX) - gpu::ImageTransportSurface::SetAllowOSMesaForTesting(true); -#endif - ui::RegisterPathProvider(); base::FilePath ui_test_pak_path;
diff --git a/ui/views/widget/native_widget_mac_interactive_uitest.mm b/ui/views/widget/native_widget_mac_interactive_uitest.mm index f6d68885..bb6fe00 100644 --- a/ui/views/widget/native_widget_mac_interactive_uitest.mm +++ b/ui/views/widget/native_widget_mac_interactive_uitest.mm
@@ -12,7 +12,7 @@ #include "ui/base/test/ui_controls.h" #import "ui/base/test/windowed_nsnotification_observer.h" #import "ui/events/test/cocoa_test_event_utils.h" -#include "ui/views/bubble/bubble_dialog_delegate.h" +#include "ui/views/bubble/bubble_dialog_delegate_view.h" #include "ui/views/controls/textfield/textfield.h" #include "ui/views/test/test_widget_observer.h" #include "ui/views/test/views_interactive_ui_test_base.h"
diff --git a/ui/views/widget/native_widget_mac_unittest.mm b/ui/views/widget/native_widget_mac_unittest.mm index 9ae776f..48fdedd 100644 --- a/ui/views/widget/native_widget_mac_unittest.mm +++ b/ui/views/widget/native_widget_mac_unittest.mm
@@ -27,7 +27,7 @@ #import "ui/events/test/cocoa_test_event_utils.h" #include "ui/events/test/event_generator.h" #import "ui/gfx/mac/coordinate_conversion.h" -#include "ui/views/bubble/bubble_dialog_delegate.h" +#include "ui/views/bubble/bubble_dialog_delegate_view.h" #import "ui/views/cocoa/bridged_content_view.h" #import "ui/views/cocoa/bridged_native_widget.h" #import "ui/views/cocoa/native_widget_mac_nswindow.h"
diff --git a/ui/views/widget/widget_unittest.cc b/ui/views/widget/widget_unittest.cc index fafce53..54b1319 100644 --- a/ui/views/widget/widget_unittest.cc +++ b/ui/views/widget/widget_unittest.cc
@@ -20,7 +20,7 @@ #include "ui/events/test/event_generator.h" #include "ui/gfx/geometry/point.h" #include "ui/gfx/native_widget_types.h" -#include "ui/views/bubble/bubble_dialog_delegate.h" +#include "ui/views/bubble/bubble_dialog_delegate_view.h" #include "ui/views/controls/textfield/textfield.h" #include "ui/views/event_monitor.h" #include "ui/views/test/native_widget_factory.h"
diff --git a/ui/views/win/hwnd_message_handler.cc b/ui/views/win/hwnd_message_handler.cc index 28145ae..595f215b 100644 --- a/ui/views/win/hwnd_message_handler.cc +++ b/ui/views/win/hwnd_message_handler.cc
@@ -2987,10 +2987,14 @@ base::WeakPtr<HWNDMessageHandler> ref(msg_handler_weak_factory_.GetWeakPtr()); delegate_->HandleTouchEvent(&event); - if (event_type == ui::ET_TOUCH_RELEASED) - id_generator_.ReleaseNumber(pointer_id); - if (ref) + if (ref) { + // Release the pointer id only when |HWNDMessageHandler| and |id_generator_| + // are not destroyed. + if (event_type == ui::ET_TOUCH_RELEASED) + id_generator_.ReleaseNumber(pointer_id); + SetMsgHandled(event.handled()); + } return 0; }
diff --git a/ui/webui/resources/cr_elements/cr_expand_button/cr_expand_button.html b/ui/webui/resources/cr_elements/cr_expand_button/cr_expand_button.html index a0166be6..37a0ca53 100644 --- a/ui/webui/resources/cr_elements/cr_expand_button/cr_expand_button.html +++ b/ui/webui/resources/cr_elements/cr_expand_button/cr_expand_button.html
@@ -25,7 +25,7 @@ flex: 1; } </style> - <div id="outer"> + <div id="outer" actionable> <div id="label"><slot></slot></div> <paper-icon-button-light class$="[[iconName_(expanded)]]"> <button disabled="[[disabled]]" aria-label$="[[alt]]"
diff --git a/ui/webui/resources/cr_elements/cr_expand_button/cr_expand_button.js b/ui/webui/resources/cr_elements/cr_expand_button/cr_expand_button.js index 423e73d..d7729d5 100644 --- a/ui/webui/resources/cr_elements/cr_expand_button/cr_expand_button.js +++ b/ui/webui/resources/cr_elements/cr_expand_button/cr_expand_button.js
@@ -54,7 +54,6 @@ return expanded ? 'true' : 'false'; }, - /** * @param {boolean} expanded * @private @@ -111,6 +110,9 @@ * @private */ updateRippleHoldDown_: function(holdDown) { - this.$$('paper-ripple').holdDown = holdDown; + const button = /** @type {{ensureRipple: Function, getRipple: Function}} */ + (this.$$('paper-icon-button-light')); + button.ensureRipple(); + button.getRipple().holdDown = holdDown; }, });
diff --git a/ui/wm/BUILD.gn b/ui/wm/BUILD.gn index bea3a4e2..c1bb78d1 100644 --- a/ui/wm/BUILD.gn +++ b/ui/wm/BUILD.gn
@@ -110,6 +110,7 @@ deps = [ ":wm", "//services/service_manager/public/cpp", + "//services/ui/public/cpp", "//services/ui/public/cpp/input_devices", "//services/ui/public/interfaces", "//skia",
diff --git a/ui/wm/test/wm_test_helper.cc b/ui/wm/test/wm_test_helper.cc index 660865c..9cc892a 100644 --- a/ui/wm/test/wm_test_helper.cc +++ b/ui/wm/test/wm_test_helper.cc
@@ -4,17 +4,22 @@ #include "ui/wm/test/wm_test_helper.h" +#include <map> #include <memory> #include <utility> +#include <vector> #include "services/service_manager/public/cpp/connector.h" #include "services/ui/public/cpp/input_devices/input_device_client.h" +#include "services/ui/public/cpp/property_type_converters.h" #include "services/ui/public/interfaces/constants.mojom.h" +#include "services/ui/public/interfaces/window_manager.mojom.h" #include "ui/aura/client/default_capture_client.h" #include "ui/aura/env.h" #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/mus/window_tree_host_mus_init_params.h" #include "ui/aura/test/mus/window_tree_client_private.h" #include "ui/aura/test/test_focus_client.h" #include "ui/aura/window.h" @@ -34,7 +39,7 @@ if (aura::Env::GetInstance()->mode() == aura::Env::Mode::LOCAL) InitLocalHost(default_window_size); else - InitMusHost(connector); + InitMusHost(connector, default_window_size); aura::client::SetWindowParentingClient(host_->window(), this); focus_client_.reset(new aura::test::TestFocusClient); @@ -62,7 +67,8 @@ host_->InitHost(); } -void WMTestHelper::InitMusHost(service_manager::Connector* connector) { +void WMTestHelper::InitMusHost(service_manager::Connector* connector, + const gfx::Size& default_window_size) { DCHECK(!aura::Env::GetInstance()->HasWindowTreeClient()); input_device_client_ = std::make_unique<ui::InputDeviceClient>(); @@ -73,19 +79,24 @@ property_converter_ = std::make_unique<aura::PropertyConverter>(); const bool create_discardable_memory = false; - window_tree_client_ = aura::WindowTreeClient::CreateForWindowTreeHostFactory( + window_tree_client_ = aura::WindowTreeClient::CreateForWindowTreeFactory( connector, this, create_discardable_memory); aura::Env::GetInstance()->SetWindowTreeClient(window_tree_client_.get()); window_tree_client_->WaitForDisplays(); - // ConnectViaWindowTreeHostFactory() should callback to OnEmbed() and set - // |host_|. - DCHECK(host_.get()); + std::map<std::string, std::vector<uint8_t>> properties; + properties[ui::mojom::WindowManager::kBounds_InitProperty] = + mojo::ConvertTo<std::vector<uint8_t>>(gfx::Rect(default_window_size)); + + auto host_mus = std::make_unique<aura::WindowTreeHostMus>( + aura::CreateInitParamsForTopLevel(window_tree_client_.get(), properties)); + host_mus->InitHost(); + + host_ = std::move(host_mus); } void WMTestHelper::OnEmbed( std::unique_ptr<aura::WindowTreeHostMus> window_tree_host) { - host_ = std::move(window_tree_host); } void WMTestHelper::OnUnembed(aura::Window* root) {}
diff --git a/ui/wm/test/wm_test_helper.h b/ui/wm/test/wm_test_helper.h index 8d794fc..320f1df 100644 --- a/ui/wm/test/wm_test_helper.h +++ b/ui/wm/test/wm_test_helper.h
@@ -65,7 +65,8 @@ void InitLocalHost(const gfx::Size& default_window_size); // Used when aura is running in Mode::MUS. - void InitMusHost(service_manager::Connector* connector); + void InitMusHost(service_manager::Connector* connector, + const gfx::Size& default_window_size); // aura::WindowTreeClientDelegate: void OnEmbed(
diff --git a/webrunner/BUILD.gn b/webrunner/BUILD.gn index 81d4652..4363012 100644 --- a/webrunner/BUILD.gn +++ b/webrunner/BUILD.gn
@@ -79,6 +79,7 @@ "//services/network/public/cpp", "//ui/aura", "//ui/display", + "//ui/ozone", "//ui/platform_window", ]
diff --git a/webrunner/browser/DEPS b/webrunner/browser/DEPS index 5791cd1..598b434 100644 --- a/webrunner/browser/DEPS +++ b/webrunner/browser/DEPS
@@ -2,5 +2,6 @@ "+content/public/browser", "+ui/aura", "+ui/display", + "+ui/ozone/public", "+ui/platform_window", ] \ No newline at end of file
diff --git a/webrunner/browser/webrunner_browser_main_parts.cc b/webrunner/browser/webrunner_browser_main_parts.cc index b4315786..852da48 100644 --- a/webrunner/browser/webrunner_browser_main_parts.cc +++ b/webrunner/browser/webrunner_browser_main_parts.cc
@@ -6,6 +6,8 @@ #include "base/command_line.h" #include "base/files/file_util.h" +#include "ui/aura/screen_ozone.h" +#include "ui/ozone/public/ozone_platform.h" #include "webrunner/browser/context_impl.h" #include "webrunner/browser/webrunner_browser_context.h" #include "webrunner/browser/webrunner_screen.h" @@ -17,11 +19,22 @@ zx::channel context_channel) : context_channel_(std::move(context_channel)) {} -WebRunnerBrowserMainParts::~WebRunnerBrowserMainParts() = default; +WebRunnerBrowserMainParts::~WebRunnerBrowserMainParts() { + display::Screen::SetScreenInstance(nullptr); +} void WebRunnerBrowserMainParts::PreMainMessageLoopRun() { DCHECK(!screen_); - screen_ = std::make_unique<WebRunnerScreen>(); + + auto platform_screen = ui::OzonePlatform::GetInstance()->CreateScreen(); + if (platform_screen) { + screen_ = std::make_unique<aura::ScreenOzone>(std::move(platform_screen)); + } else { + // Use dummy display::Screen for Ozone platforms that don't provide + // PlatformScreen. + screen_ = std::make_unique<WebRunnerScreen>(); + } + display::Screen::SetScreenInstance(screen_.get()); DCHECK(!browser_context_);
diff --git a/webrunner/browser/webrunner_browser_main_parts.h b/webrunner/browser/webrunner_browser_main_parts.h index 27c8184..9813a38 100644 --- a/webrunner/browser/webrunner_browser_main_parts.h +++ b/webrunner/browser/webrunner_browser_main_parts.h
@@ -12,11 +12,14 @@ #include "content/public/browser/browser_main_parts.h" #include "webrunner/fidl/chromium/web/cpp/fidl.h" +namespace display { +class Screen; +} + namespace webrunner { class ContextImpl; class WebRunnerBrowserContext; -class WebRunnerScreen; class WebRunnerBrowserMainParts : public content::BrowserMainParts { public: @@ -30,7 +33,7 @@ private: zx::channel context_channel_; - std::unique_ptr<WebRunnerScreen> screen_; + std::unique_ptr<display::Screen> screen_; std::unique_ptr<WebRunnerBrowserContext> browser_context_; std::unique_ptr<ContextImpl> context_impl_;
diff --git a/webrunner/cipd/fidl.yaml b/webrunner/cipd/fidl.yaml index 67724bd..c607b34b 100644 --- a/webrunner/cipd/fidl.yaml +++ b/webrunner/cipd/fidl.yaml
@@ -7,8 +7,14 @@ # To create a CIPD package, run the following command from the build output # directory. # -# cipd create --pkg-def ../../webrunner/cipd/fidl.yaml \ -# -tag version:$(cat fuchsia_artifacts/build_id.txt) +# $ cipd create --pkg-def ../../webrunner/cipd/fidl.yaml \ +# -ref latest \ +# -tag version:$(cat fuchsia_artifacts/build_id.txt) +# +# The most recent package can be discovered by searching for the "latest" ref: +# +# $ cipd describe chromium/fuchsia/fidl -version latest + package: chromium/fuchsia/fidl description: FIDL definitions for the "chromium" service. root: ../fidl
diff --git a/webrunner/cipd/webrunner.yaml b/webrunner/cipd/webrunner.yaml index 73bb6ec..31cd527 100644 --- a/webrunner/cipd/webrunner.yaml +++ b/webrunner/cipd/webrunner.yaml
@@ -14,10 +14,16 @@ # To create a CIPD package, run the following command from the build output # directory. # -# cipd create --pkg-def ../../webrunner/cipd/webrunner.yaml \ -# -pkg-var targetarch:$TARGET_ARCH \ -# -pkg-var outdir:`pwd` \ -# -tag version:$(cat fuchsia_artifacts/build_id.txt) +# $ cipd create --pkg-def ../../webrunner/cipd/webrunner.yaml \ +# -pkg-var targetarch:$TARGET_ARCH \ +# -pkg-var outdir:`pwd` \ +# -ref latest \ +# -tag version:$(cat fuchsia_artifacts/build_id.txt) +# +# The most recent package can be discovered by searching for the "latest" ref: +# +# $ cipd describe chromium/fuchsia/webrunner-$TARGET_ARCH -version latest + package: chromium/fuchsia/webrunner-${targetarch} description: Prebuilt Chrome and Web Runner binaries for Fuchsia. root: ${outdir}/fuchsia_artifacts